Do not pass -fPIC on Windows. Add msys as a host_os value to detect Windows as well.

This commit is contained in:
Frank Denis 2014-08-04 14:30:07 -07:00
parent 4d02391067
commit b9be5fbd45

View File

@ -70,13 +70,13 @@ AS_IF([test "x$EMSCRIPTEN" != "x"],[
AC_MSG_WARN([compiling to javascript - asm implementations disabled])
])
AS_CASE([$host], [x86_64-*-mingw* | x86_64-*-cygwin*], [enable_asm="no"])
AS_CASE([$host], [x86_64-*-mingw*|x86_64-*-cygwin*|x86_64-*-msys], [enable_asm="no"])
AC_ARG_ENABLE(pie,
[AS_HELP_STRING(--disable-pie,Do not produce position independent executables)],
enable_pie=$enableval, enable_pie="maybe")
AS_CASE([$host_os], [mingw*], [enable_pie="no"])
AS_CASE([$host_os], [mingw*|cygwin*|msys], [enable_pie="no"])
AC_ARG_ENABLE(blocking-random,
[AS_HELP_STRING(--enable-blocking-random,Use /dev/random instead of /dev/urandom)],
@ -142,11 +142,13 @@ CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],
[CFLAGS="$CFLAGS -fvisibility=hidden"])
AS_CASE([$host_os], [cygwin*|mingw*|msys|pw32*|cegcc*], [ ], [
AX_CHECK_COMPILE_FLAG([-fPIC], [
AX_CHECK_LINK_FLAG([-fPIC],
[CFLAGS="$CFLAGS -fPIC"]
)
])
])
AS_IF([test "$enable_pie" != "no"],[
AX_CHECK_COMPILE_FLAG([-fPIE], [
@ -174,7 +176,7 @@ AC_ARG_ENABLE(soname-versions,
)
AS_CASE([$host_os],
[cygwin* | mingw* | pw32* | cegcc*], [
[cygwin*|mingw*|msys|pw32*|cegcc*], [
AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [LDFLAGS="$LDFLAGS -Wl,--dynamicbase"])
AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [LDFLAGS="$LDFLAGS -Wl,--nxcompat"])
])
@ -182,7 +184,7 @@ AS_CASE([$host_os],
AS_IF([test "x$enable_ssp" != "xno"],[
AS_CASE([$host_os],
[cygwin* | mingw* | pw32* | cegcc*], [ ],
[cygwin*|mingw*|msys|pw32*|cegcc*], [ ],
[dragonfly*], [
AX_CHECK_COMPILE_FLAG([-fstack-protector], [
AX_CHECK_LINK_FLAG([-fstack-protector],