aboutsummaryrefslogtreecommitdiff
path: root/libmpx/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'libmpx/configure.ac')
-rw-r--r--libmpx/configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/libmpx/configure.ac b/libmpx/configure.ac
index fe0d3f2266e..3f8b50f8eba 100644
--- a/libmpx/configure.ac
+++ b/libmpx/configure.ac
@@ -40,7 +40,18 @@ AC_MSG_RESULT($LIBMPX_SUPPORTED)
AM_CONDITIONAL(LIBMPX_SUPPORTED, [test "x$LIBMPX_SUPPORTED" = "xyes"])
link_libmpx="-lpthread"
+link_mpx=""
+AC_MSG_CHECKING([whether ld accepts -z bndplt])
+echo "int main() {};" > conftest.c
+if AC_TRY_COMMAND([${CC} ${CFLAGS} -Wl,-z,bndplt -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
+then
+ AC_MSG_RESULT([yes])
+ link_mpx="$link_mpx -z bndplt"
+else
+ AC_MSG_RESULT([no])
+fi
AC_SUBST(link_libmpx)
+AC_SUBST(link_mpx)
AM_INIT_AUTOMAKE(foreign no-dist no-dependencies)
AM_ENABLE_MULTILIB(, ..)