Bug 506493 - Resync' configure.in between c-c and m-c; (Av1) Copy bug 512504, Remove useless AC_DEFINE(HAVE_LIBDL).
authorSerge Gautherie <sgautherie.bz@free.fr>
Tue, 20 Apr 2010 05:50:21 +0200
changeset 5468 3533388a385646b9b7f1965ad9e7334b7b67a83c
parent 5467 2f484966ab849e6546bcab54e239cee8f150ea4c
child 5469 5fe44b996457af4d9c1ff932dbeb4fe40b53514e
push id4224
push usersgautherie.bz@free.fr
push dateTue, 20 Apr 2010 03:51:06 +0000
treeherdercomm-central@3533388a3856 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs506493, 512504
Bug 506493 - Resync' configure.in between c-c and m-c; (Av1) Copy bug 512504, Remove useless AC_DEFINE(HAVE_LIBDL). r=Callek. Bug 512504 - OS/2 don't link against external libs that are stubs when the real function is in libc
configure.in
--- a/configure.in
+++ b/configure.in
@@ -3202,31 +3202,33 @@ case $target in
 	;;
 *)
 	AC_CHECK_LIB(c_r, gethostbyname_r)
 	;;
 esac
 
 dnl We don't want to link with libdl even if it's present on OS X, since
 dnl it's not used and not part of the default installation.
-dnl The same goes for BeOS.
+dnl The same goes for BeOS. OS/2 has dlfcn in libc.
 dnl We don't want to link against libm or libpthread on Darwin since
 dnl they both are just symlinks to libSystem and explicitly linking
 dnl against libSystem causes issues when debugging (see bug 299601).
 case $target in
 *-darwin*)
     ;;
 *-beos*)
     ;;
+*-os2*)
+    ;;
 *)
     AC_CHECK_LIB(m, atan)
     AC_CHECK_LIB(dl, dlopen,
     AC_CHECK_HEADER(dlfcn.h, 
         LIBS="-ldl $LIBS"
-        AC_DEFINE(HAVE_LIBDL)))
+        ))
     ;;
 esac
 
 _SAVE_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -D_GNU_SOURCE"
 AC_CHECK_FUNCS(dladdr)
 CFLAGS="$_SAVE_CFLAGS"
 
@@ -3236,17 +3238,24 @@ if test ! "$GNU_CXX"; then
     *-aix*)
 	AC_CHECK_LIB(C_r, demangle)
 	;;
      *)
 	AC_CHECK_LIB(C, demangle)
 	;;
      esac
 fi
-AC_CHECK_LIB(socket, socket)
+
+dnl OS/2 has socket in libc.
+case $target in
+*-os2*)
+    ;;
+*)
+    AC_CHECK_LIB(socket, socket)
+esac
 
 XLDFLAGS="$X_LIBS"
 XLIBS="$X_EXTRA_LIBS"
 
 dnl ========================================================
 dnl Checks for X libraries.
 dnl Ordering is important.
 dnl Xt is dependent upon SM as of X11R6