summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGreg <gmp@wow.st>2016-12-27 17:24:02 -0500
committerGreg <gmp@wow.st>2017-01-04 09:19:04 -0500
commit1b8a6ef561c08097989c63340c369974f5cfadac (patch)
treec2253bdda53bf60256a6ead0c85ec7c0b1091dca
parent802a6aa93fe80d10c9d5f4b95fde30239ef6e6ed (diff)
configure.ac: add conditional for -z,defs
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9b61312..1893945 100644
--- a/configure.ac
+++ b/configure.ac
@@ -219,7 +219,12 @@ if test x"$debug_enabled" != x"yes" ; then
CFLAGS="-DNDEBUG $CFLAGS"
fi
+AS_ECHO_N(["checking to see if linker understands -z,defs... "])
+LDFLAGS_OLD="-Wl $LDFLAGS"
LDFLAGS="-Wl,-z,defs $LDFLAGS"
+AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ AS_ECHO("yes"),
+ AS_ECHO("no"); LDFLAGS="$LDFLAGS_OLD")
dnl
dnl Make sure we can actually handle the "--with-*" and "--enable-*" stuff.