From: Elizabeth Barham Date: Fri, 4 Oct 2002 15:34:50 +0000 (+0000) Subject: * libtool.m4 (AC_LIBTOOL_SETUP): GCC now checks -shared to X-Git-Tag: release-1-5~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=14a18a2500ef78f77657860855ff744db4c140aa;p=thirdparty%2Flibtool.git * libtool.m4 (AC_LIBTOOL_SETUP): GCC now checks -shared to create a dll for Windows targets. --- diff --git a/ChangeLog b/ChangeLog index 114c8baa9..902677a90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-10-04 Elizabeth Barham + + * libtool.m4 (AC_LIBTOOL_SETUP): GCC now checks -shared to + create a dll for Windows targets. + 2002-09-24 Robert Boehne * ltmain.in: Fixed a few spelling errors. diff --git a/libtool.m4 b/libtool.m4 index 3566c3f40..7b454202e 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -507,11 +507,14 @@ AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], case $host/$CC in *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) # old mingw systems require "-dll" to link a DLL, while more recent ones - # require "-mdll" + # require "-mdll" (and still newer ones would rather have "-shared") SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mdll" + CFLAGS="$CFLAGS -shared" AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, - [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) + [AC_TRY_LINK([],[],[lt_cv_cc_dll_switch=-shared], + [ + CFLAGS="$SAVE_CFLAGS -mdll" + AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])]) CFLAGS="$SAVE_CFLAGS" ;; *-*-cygwin* | *-*-pw32*) # cygwin systems need to pass --dll to the linker, and not link