Index: configure.in =================================================================== RCS file: /home/wine/wine/configure.in,v retrieving revision 1.204 diff -u -r1.204 configure.in --- configure.in 2001/05/31 21:35:15 1.204 +++ configure.in 2001/06/05 00:49:09 @@ -593,20 +593,39 @@ LDDLLFLAGS="" if test "$LIBEXT" = "so" then - AC_CACHE_CHECK("whether we can build a Linux dll", - ac_cv_c_dll_linux, - [saved_cflags=$CFLAGS - CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic" - AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no") - CFLAGS=$saved_cflags - ]) - if test "$ac_cv_c_dll_linux" = "yes" + OSNAME=`uname` + if test "$OSNAME" = "Linux" then - LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%) -Wl,-rpath,\$(libdir)" - LDDLLFLAGS="-Wl,-Bsymbolic" - else + AC_CACHE_CHECK("whether we can build a Linux dll", + ac_cv_c_dll_linux, + [saved_cflags=$CFLAGS + CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic" + AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no") + CFLAGS=$saved_cflags + ]) + if test "$ac_cv_c_dll_linux" = "yes" + then + LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%) -Wl,-rpath,\$(libdir)" + LDDLLFLAGS="-Wl,-Bsymbolic" + fi + elif test "$OSNAME" = "FreeBSD" + then + AC_CACHE_CHECK("whether we can build a FreeBSD dll", + ac_cv_c_dll_freebsd, + [saved_cflags=$CFLAGS + CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic" + AC_TRY_LINK(,[return 1],ac_cv_c_dll_freebsd="yes",ac_cv_c_dll_freebsd="no") + CFLAGS=$saved_cflags + ]) + if test "$ac_cv_c_dll_freebsd" = "yes" + then + LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%) -Wl,-rpath,\$(libdir)" + LDDLLFLAGS="-Wl,-Bsymbolic" + fi + elif test "$OSNAME" = "UnixWare" + then AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, - ac_cv_c_dll_unixware, + ac_cv_c_dll_unixware, [saved_cflags=$CFLAGS CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic" AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no") @@ -616,22 +635,24 @@ then LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,\$(libdir)/%)" LDDLLFLAGS="-Wl,-B,symbolic" - else - AC_CACHE_CHECK("whether we can build a NetBSD a.out dll", + fi + elif test "$OSNAME" = "NetBSD" + then + AC_CACHE_CHECK("whether we can build a NetBSD dll", ac_cv_c_dll_netbsd, - [saved_cflags=$CFLAGS - CFLAGS="$CFLAGS -fPIC -Wl,-Bshareable,-Bforcearchive" - AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no") - CFLAGS=$saved_cflags - ]) - if test "$ac_cv_c_dll_netbsd" = "yes" - then - LDSHARED="\$(CC) -Wl,-Bshareable,-Bforcearchive" - LDDLLFLAGS="" #FIXME - fi + [saved_cflags=$CFLAGS + CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0" + AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no") + CFLAGS=$saved_cflags + ]) + if test "$ac_cv_c_dll_netbsd" = "yes" + then + LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%) -Wl,-rpath,\$(libdir)" + LDDLLFLAGS="" fi fi - if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no" + + if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_freebsd" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no" then LIBEXT="a" if test "$DLLWRAP" = "dllwrap"; then