Commit 4354cda7 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed NetBSD dll check.

Added check for -Bsymbolic. Fixed LDSHARED definition to support undefined SONAME.
parent dbbc224f
......@@ -492,40 +492,44 @@ fi
dnl **** Check for working dll ****
LDSHARED=""
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"
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 -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%) -Wl,-rpath,\$(libdir)"
LDDLLFLAGS="-Wl,-Bsymbolic"
else
AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
ac_cv_c_dll_unixware,
[saved_cflags=$CFLAGS
CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
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")
CFLAGS=$saved_cflags
])
if test "$ac_cv_c_dll_unixware" = "yes"
then
LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,h,\$(libdir)/%)"
LDDLLFLAGS="-Wl,-B,symbolic"
else
AC_CACHE_CHECK("whether we can build a NetBSD dll",
ac_cv_c_dll_netbsd,
[saved_cflags=$CFLAGS
CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
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="ld -Bshareable -Bforcearchive"
LDSHARED="\$(CC) -Wl,-Bshareable,-Bforcearchive"
LDDLLFLAGS="" #FIXME
fi
fi
fi
......@@ -570,6 +574,7 @@ fi
AC_SUBST(DLL_LINK)
AC_SUBST(DLLFLAGS)
AC_SUBST(LDSHARED)
AC_SUBST(LDDLLFLAGS)
AC_SUBST(LIBEXT)
dnl **** Check for reentrant libc ****
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment