diff --git a/configure.ac b/configure.ac index a17f8ebf..2c700e21 100644 --- a/configure.ac +++ b/configure.ac @@ -61,6 +61,7 @@ AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overf case $host_os in cygwin* | mingw* | pw32* | cegcc*) + LIBTOOL_EXTRA_FLAGS=-module AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [LDFLAGS="$LDFLAGS -Wl,--dynamicbase"]) AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [LDFLAGS="$LDFLAGS -Wl,--nxcompat"]) AX_CHECK_COMPILE_FLAG([-fstack-protector-all], [ @@ -207,6 +208,7 @@ AC_ARG_WITH(safecode, AC_SUBST([MAINT]) AC_SUBST([SODIUM_PATH]) +AC_SUBST([LIBTOOL_EXTRA_FLAGS]) dnl Libtool. diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index a9121dc3..0d97029f 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -84,7 +84,8 @@ libsodium_la_LDFLAGS = \ $(AM_LDFLAGS) \ -export-dynamic \ -version-info $(SODIUM_LIBRARY_VERSION) \ - -no-undefined + -no-undefined \ + $(LIBTOOL_EXTRA_FLAGS) libsodium_la_CPPFLAGS = \ $(LTDLINCL) \