summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-04-15 11:43:41 +0200
committerBen Gamari <ben@smart-cactus.org>2016-04-16 00:21:41 +0200
commite9ad48935fa48aa32dc39a55512168ba5f5bdbd2 (patch)
tree8145731d2744dad11d8baba583d9fa5c20482313 /distrib
parenta7ee2d4c4229b27af324ebac93081f692835365d (diff)
downloadhaskell-e9ad48935fa48aa32dc39a55512168ba5f5bdbd2.tar.gz
libdw: More precise version check
Test Plan: Try configure in an environment with older `libdw` Reviewers: hvr, austin Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D2103 GHC Trac Issues: #11820
Diffstat (limited to 'distrib')
-rw-r--r--distrib/configure.ac.in10
1 files changed, 8 insertions, 2 deletions
diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in
index 1df58d508b..c0610c632e 100644
--- a/distrib/configure.ac.in
+++ b/distrib/configure.ac.in
@@ -93,8 +93,14 @@ AC_SUBST([LdCmd])
dnl ** Have libdw?
dnl --------------------------------------------------------------
-AC_CHECK_LIB(dw, dwfl_begin, [HaveLibdw=YES], [HaveLibdw=NO])
-AC_SUBST(HaveLibdw)
+dnl Check for a usable version of libdw/elfutils
+dnl Currently we need 0.158 or newer.
+BinDistNeedsLibdw=@HaveLibdw@
+if test "x$BinDistNeedsLibdw" = "xyes" ; then
+ AC_CHECK_LIB(dw, dwfl_attach_state, [HaveLibdw=YES],
+ [AC_MSG_ERROR([Binary distribution was built with libdw support but target system doesn't have supported libdw version (needs at least 0.158)])]
+ )];
+fi
FP_GCC_VERSION
AC_PROG_CPP