summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-04-02 12:03:43 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-05 05:42:38 -0400
commit958c6fbdc7ba76313f6f6d110f5a0ee2474d26b6 (patch)
tree28042a1582176404d9fba26d54d27f7ec80c74de /configure.ac
parent0de2012cc05b12a810d27f5c9009c870cf6fabfd (diff)
downloadhaskell-958c6fbdc7ba76313f6f6d110f5a0ee2474d26b6.tar.gz
configure: Move libdw search logic to macro
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac54
1 files changed, 1 insertions, 53 deletions
diff --git a/configure.ac b/configure.ac
index 2eaa55ac0d..5582c9fb2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1280,59 +1280,7 @@ case ${TargetOS} in
AC_DEFINE_UNQUOTED([RTS_LINKER_USE_MMAP], [$RtsLinkerUseMmap],
[Use mmap in the runtime linker])
-dnl ** Have libdw?
-dnl --------------------------------------------------------------
-AC_ARG_WITH([libdw-libraries],
- [AS_HELP_STRING([--with-libdw-libraries=ARG],
- [Find libraries for libdw in ARG [default=system default]])
- ],
- [
- LibdwLibDir="$withval"
- LIBDW_LDFLAGS="-L$withval"
- ])
-
-AC_SUBST(LibdwLibDir)
-
-AC_ARG_WITH([libdw-includes],
- [AS_HELP_STRING([--with-libdw-includes=ARG],
- [Find includes for libdw in ARG [default=system default]])
- ],
- [
- LibdwIncludeDir="$withval"
- LIBDW_CFLAGS="-I$withval"
- ])
-
-AC_SUBST(LibdwIncludeDir)
-
-UseLibdw=NO
-USE_LIBDW=0
-AC_ARG_ENABLE(dwarf-unwind,
- [AS_HELP_STRING([--enable-dwarf-unwind],
- [Enable DWARF unwinding support in the runtime system via elfutils' libdw [default=no]])])
-if test "$enable_dwarf_unwind" = "yes" ; then
- CFLAGS2="$CFLAGS"
- CFLAGS="$LIBDW_CFLAGS $CFLAGS"
- LDFLAGS2="$LDFLAGS"
- LDFLAGS="$LIBDW_LDFLAGS $LDFLAGS"
-
- AC_CHECK_LIB(dw, dwfl_attach_state,
- [AC_CHECK_HEADERS([elfutils/libdw.h], [break], [])
- UseLibdw=YES],
- [AC_MSG_ERROR([Cannot find system libdw (required by --enable-dwarf-unwind)])])
-
- CFLAGS="$CFLAGS2"
- LDFLAGS="$LDFLAGS2"
-fi
-
-AC_SUBST(UseLibdw)
-if test $UseLibdw = "YES" ; then
- USE_LIBDW=1
- AC_SUBST([CabalHaveLibdw],[True])
-else
- AC_SUBST([CabalHaveLibdw],[False])
-fi
-AC_DEFINE_UNQUOTED([USE_LIBDW], [$USE_LIBDW], [Set to 1 to use libdw])
-
+FP_FIND_LIBDW
FP_FIND_LIBNUMA
dnl ** Documentation