Index: config/ChangeLog =================================================================== RCS file: /cvs/lyx/lyx-devel/config/ChangeLog,v retrieving revision 1.95 diff -u -r1.95 ChangeLog --- config/ChangeLog 2003/03/10 19:18:42 1.95 +++ config/ChangeLog 2003/03/11 13:13:35 @@ -1,3 +1,8 @@ +2003-03-11 Kayvan Sylvan + + * libtool.m4: Add some checks for Win32 GCC based on + info from http://bugzilla.gnome.org/showattachment.cgi?attach_id=12253 + 2003-03-10 Lars Gullik Bjønnes * pspell.m4: simplify pspell checking even more Index: config/libtool.m4 =================================================================== RCS file: /cvs/lyx/lyx-devel/config/libtool.m4,v retrieving revision 1.5 diff -u -r1.5 libtool.m4 --- config/libtool.m4 2002/08/14 11:24:22 1.5 +++ config/libtool.m4 2003/03/11 13:13:36 @@ -1186,7 +1186,45 @@ # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no + else + # Ensure MSVC-compatible struct packing convention. + # Depends on GCC version. gcc2 uses -fnative-struct while + # gcc3 uses -mms-bitfields. + # + msnative_struct='' + AC_MSG_CHECKING([how to get MSVC-compatible struct packing]) + case `$CC --version | sed -e 's,\..*,.,' -e q` in + 2.) + if $CC -v --help 2>/dev/null | grep fnative-struct > /dev/null; then + msnative_struct='-fnative-struct' + fi + ;; + *) + if $CC -v --help 2>/dev/null | grep ms-bitfields > /dev/null; then + msnative_struct='-mms-bitfields' + fi + ;; + esac + if test x"$msnative_struct" = x; then + AC_MSG_RESULT([no way]) + AC_MSG_WARN([produced libraries might be incompatible with MSVC libs]) + else + CXXFLAGS="$CXXFLAGS $msnative_struct" + AC_MSG_RESULT([${msnative_struct}]) + fi fi + + # Export all symbols to Win32 DLL using MinGW 2.0 ld. + WIN32_LD_EXPORT_ALL_SYMBOLS='' + AC_MSG_CHECKING([whether ld accepts --export-all-symbols]) + if $LD --help 2>&1 | egrep 'export-all-symbols' > /dev/null; then + WIN32_LD_EXPORT_ALL_SYMBOLS='-Wl,--export-all-symbols' + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + AC_SUBST(WIN32_LD_EXPORT_ALL_SYMBOLS) + ;; esac