From cd2581b4c05b828889d2011c89100d0934dc3875 Mon Sep 17 00:00:00 2001 From: zimmerma Date: Thu, 3 Nov 2011 15:54:46 +0000 Subject: tentative fix for win32 dll cf http://sourceware.org/autobook/autobook/autobook_88.html and http://lists.gforge.inria.fr/pipermail/mpc-discuss/2011-November/000990.html git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1108 211d60ee-9f03-0410-a15a-8952a2c7a4e4 --- configure.ac | 2 ++ m4/mpc.m4 | 4 ++-- src/Makefile.am | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index e7b88c5..1d89134 100644 --- a/configure.ac +++ b/configure.ac @@ -207,6 +207,8 @@ AS_IF([test "x$enable_logging" = "xyes"], ) # Configs for Windows DLLs +AC_SUBST(MPC_LDFLAGS) +AC_LIBTOOL_WIN32_DLL case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) MPC_WINDOWS diff --git a/m4/mpc.m4 b/m4/mpc.m4 index 108b47e..4227c92 100644 --- a/m4/mpc.m4 +++ b/m4/mpc.m4 @@ -198,12 +198,12 @@ AC_DEFUN([MPC_GMP_CC_CFLAGS], [ # DESCRIPTION # # Additional checks on windows -# libtool requires "--no-undefined" for win32 dll +# libtool requires "-no-undefined" for win32 dll # It also disables the tests involving the linking with LIBGMP if DLL # AC_DEFUN([MPC_WINDOWS], [ if test "$enable_shared" = yes; then - LDFLAGS="$LDFLAGS -Wl,--no-undefined" + MPC_LDFLAGS="$MPC_LDFLAGS -no-undefined" AC_MSG_CHECKING(for DLL/static gmp) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include "gmp.h" diff --git a/src/Makefile.am b/src/Makefile.am index 1e99ca9..0f0ddd6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,7 +18,7 @@ ## along with this program. If not, see http://www.gnu.org/licenses/ . lib_LTLIBRARIES = libmpc.la -libmpc_la_LDFLAGS = -version-info 2:0:0 +libmpc_la_LDFLAGS = $(MPC_LDFLAGS) -version-info 2:0:0 libmpc_la_SOURCES = mpc-impl.h abs.c acos.c acosh.c add.c add_fr.c \ add_si.c add_ui.c arg.c asin.c asinh.c atan.c atanh.c clear.c cmp.c \ cmp_si_si.c conj.c cos.c cosh.c div_2exp.c div.c div_fr.c div_ui.c exp.c \ -- cgit v1.2.1