From 9c9d1edf74d72837488fd820e8d596d3e5e0d9a8 Mon Sep 17 00:00:00 2001 From: Jack Wink Date: Sun, 28 Dec 2014 12:59:53 -0500 Subject: [PATCH] check to see if '-Wl,-pie' is supported before using it --- configure.ac | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 1be45244..d4a436bc 100644 --- a/configure.ac +++ b/configure.ac @@ -159,10 +159,13 @@ 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], - [AX_CHECK_LINK_FLAG([-pie], - [CFLAGS="$CFLAGS -fPIE" - LDFLAGS="$LDFLAGS -Wl,-pie"]) + AX_CHECK_LINK_FLAG([-fPIE], [ + CFLAGS="$CFLAGS -fPIE" + AX_CHECK_COMPILE_FLAG(["-Wl,-pie"], [ + LDFLAGS="$LDFLAGS -Wl,-pie" + ], [ + LDFLAGS="$LDFLAGS -pie" + ]) ]) ]) ])