From 1ce56adbef6c3fc5345c90f126c0b7a26a1d19b9 Mon Sep 17 00:00:00 2001 From: Jack Wink Date: Sun, 28 Dec 2014 13:17:09 -0500 Subject: [PATCH] a second stab at detecting valid linker flags --- configure.ac | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d4a436bc..9eb77c54 100644 --- a/configure.ac +++ b/configure.ac @@ -160,12 +160,16 @@ AS_CASE([$host_os], [cygwin*|mingw*|msys|pw32*|cegcc*], [ ], [ AS_IF([test "$enable_pie" != "no"],[ AX_CHECK_COMPILE_FLAG([-fPIE], [ AX_CHECK_LINK_FLAG([-fPIE], [ - CFLAGS="$CFLAGS -fPIE" - AX_CHECK_COMPILE_FLAG(["-Wl,-pie"], [ + AX_CHECK_LINK_FLAG([-Wl,-pie], [ + CFLAGS="$CFLAGS -fPIE" LDFLAGS="$LDFLAGS -Wl,-pie" ], [ - LDFLAGS="$LDFLAGS -pie" + AX_CHECK_LINK_FLAG([-pie], [ + CFLAGS="$CFLAGS -fPIE" + LDFLAGS="$LDFLAGS -pie" + ]) ]) + AX_CHECK_LINK_FLAG([-pie], []) ]) ]) ])