diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-06-01 06:14:00 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-06-01 06:14:00 +1000 |
commit | 0676e68cf5fe8696f1f760fef0f35dba14db1104 (patch) | |
tree | eade146204a9d1e64767e3eeb62feb1dbef789da /configure.ac | |
parent | 930e74f8f494962745c16a59f156a0ed9f2f1df1 (diff) | |
download | haskell-0676e68cf5fe8696f1f760fef0f35dba14db1104.tar.gz |
Fix detection and use of `USE_LIBDW`
Test Plan: Configure/build with and without --enable-libdw
Reviewers: trofi, hvr, austin, simonmar, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2276
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 4adf9c5558..15561d059f 100644 --- a/configure.ac +++ b/configure.ac @@ -1092,14 +1092,22 @@ AC_DEFINE_UNQUOTED([RTS_LINKER_USE_MMAP], [$RtsLinkerUseMmap], dnl ** Have libdw? dnl -------------------------------------------------------------- -AC_ARG_ENABLE(libdw, +UseLibdw=NO +USE_LIBDW=0 +AC_ARG_ENABLE(dwarf-unwind, [AC_HELP_STRING([--enable-dwarf-unwind], [Enable DWARF unwinding support in the runtime system via elfutils' libdw [default=no]])], - [AC_CHECK_LIB(dw, dwfl_attach_state, [HaveLibdw=YES], [HaveLibdw=NO])], - [HaveLibdw=NO] + [AC_CHECK_LIB(dw, dwfl_attach_state, [UseLibdw=YES], [UseLibdw=NO])], + [UseLibdw=NO] ) -AC_SUBST(HaveLibdw) +AC_SUBST(UseLibdw) +if test $UseLibdw = "YES" ; then + USE_LIBDW=1 +fi +AC_DEFINE_UNQUOTED([USE_LIBDW], [$USE_LIBDW], [Set to 1 to use libdw]) +dnl ** Documentation +dnl -------------------------------------------------------------- if test -n "$SPHINXBUILD"; then BUILD_MAN=YES BUILD_SPHINX_HTML=YES |