Fix autoconf's testing for shared libraries
Firewall/CSI at cimmetry.com
Firewall/CSI at cimmetry.com
Mon Sep 20 09:05:48 CDT 2004
Skipped content of type multipart/alternative-------------- next part --------------
--- ../clean/wine-20040914/aclocal.m4 2004-06-14 15:34:42.000000000 -0400
+++ aclocal.m4 2004-09-17 14:32:04.000000000 -0400
@@ -68,6 +68,16 @@
AC_TRY_LINK([],[],[$2],[$3])
CFLAGS=$ac_wine_try_cflags_saved])
+dnl **** Check if we can link an empty shared lib (no main) with special CFLAGS ****
+dnl
+dnl Usage: WINE_TRY_SHLIB(flags,[action-if-yes,[action-if-no]])
+dnl
+AC_DEFUN([WINE_TRY_SHLIB],
+[ac_wine_try_cflags_saved=$CFLAGS
+CFLAGS="$CFLAGS $1"
+AC_LINK_IFELSE([void myfunc() { ; };],[$2],[$3])
+CFLAGS=$ac_wine_try_cflags_saved])
+
dnl **** Check whether we need to define a symbol on the compiler command line ****
dnl
dnl Usage: WINE_CHECK_DEFINE(name),[action-if-yes,[action-if-no]])
--- ../clean/wine-20040914/configure.ac 2004-09-14 15:27:58.000000000 -0400
+++ configure.ac 2004-09-17 14:32:26.000000000 -0400
@@ -869,7 +869,7 @@
DLLFLAGS="$DLLFLAGS -fPIC"
DLLEXT=".so"
AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
- [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
+ [WINE_TRY_SHLIB([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
if test "$ac_cv_c_dll_gnuelf" = "yes"
then
@@ -923,7 +923,7 @@
else
AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
- [WINE_TRY_CFLAGS([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
+ [WINE_TRY_SHLIB([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
if test "$ac_cv_c_dll_unixware" = "yes"
then
@@ -932,7 +932,7 @@
else
AC_CACHE_CHECK(whether we can build a Mach-O (Mac OS X/Darwin) dll, ac_cv_c_dll_macho,
- [WINE_TRY_CFLAGS([-bundle], ac_cv_c_dll_macho="yes", ac_cv_c_dll_macho="no")])
+ [WINE_TRY_SHLIB([-bundle], ac_cv_c_dll_macho="yes", ac_cv_c_dll_macho="no")])
if test "$ac_cv_c_dll_macho" = "yes"
then
LIBEXT="dylib"
@@ -949,6 +949,15 @@
AC_SUBST(IOKITLIB,"-framework IOKit")
dnl using IOKit imply we use CoreFoundation too
IOKITLIB = "$IOKITLIB $COREFOUNDATIONLIB"
+ else
+ AC_CACHE_CHECK(whether we can build an HP-UX dll, ac_cv_c_dll_hpux,
+ [WINE_TRY_SHLIB([-shared], ac_cv_c_dll_hpux="yes", ac_cv_c_dll_hpux="no")])
+ if test "$ac_cv_c_dll_hpux" = "yes"
+ then
+ LIBEXT="sl"
+ LDDLLFLAGS="-shared"
+ LDSHARED="\$(CC) -shared"
+ fi
fi
fi
fi
More information about the wine-patches
mailing list