From 52565edee1de36e2f976284ec2027fb5f97cbdbe Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 23 Apr 2013 21:55:48 -0700 Subject: [PATCH] Remove LIBTOOL_EXTRA_FLAGS and -fPIC (implicit) on Win32 --- configure.ac | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 4c834efb..b67d95b3 100644 --- a/configure.ac +++ b/configure.ac @@ -42,11 +42,16 @@ AS_IF([test "$cross_compiling" != no], AC_DEFINE(CROSS_COMPILING, [1], [define if you are cross-compiling]) ) -AX_CHECK_COMPILE_FLAG([-fPIC], [ - AX_CHECK_LINK_FLAG([-fPIC], - [CFLAGS="$CFLAGS -fPIC"] - ) -]) +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) ;; + *) + AX_CHECK_COMPILE_FLAG([-fPIC], [ + AX_CHECK_LINK_FLAG([-fPIC], + [CFLAGS="$CFLAGS -fPIC"] + ) + ]) + ;; +esac AS_IF([test "$enable_pie" != "no"],[ AX_CHECK_COMPILE_FLAG([-fPIE], [ @@ -65,7 +70,6 @@ AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overf LIBTOOL_EXTRA_FLAGS="-version-info $SODIUM_LIBRARY_VERSION" case $host_os in cygwin* | mingw* | pw32* | cegcc*) - LIBTOOL_EXTRA_FLAGS="-module -avoid-version" AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [LDFLAGS="$LDFLAGS -Wl,--dynamicbase"]) AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [LDFLAGS="$LDFLAGS -Wl,--nxcompat"]) ;;