configure: make use of LIBREPLACE_NETWORK_LIBS instead of redoing the tests
authorStefan Metzmacher <metze@samba.org>
Fri, 16 May 2008 10:50:16 +0000 (12:50 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 17 May 2008 11:18:34 +0000 (13:18 +0200)
metze
(This used to be commit 6b782b58971cbbe56ead5d7e8db6eb8c3526e8ee)

source3/configure.in

index c781c90cfe98ed0f9c2cfc322f2d04477af7d0f2..b969b68ac83f4332eca122665cd6a556fa40ad85 100644 (file)
@@ -664,7 +664,7 @@ done
 AC_SUBST(LIBREPLACE_OBJS)
 
 # add -ldl to the global LIBS
-LIBS="${LIBS} ${LIBDL}"
+LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
 
 AC_CHECK_HEADERS(aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h)
 AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h memory.h alloca.h)
@@ -998,40 +998,6 @@ AC_CHECK_LIB(readline, history_list,
             [],
             [$TERMLIBS])
 
-# The following test taken from the cvs sources
-# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
-# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
-# libsocket.so which has a bad implementation of gethostbyname (it
-# only looks in /etc/hosts), so we only look for -lsocket if we need
-# it.
-AC_CHECK_FUNCS(connect)
-if test x"$ac_cv_func_connect" = x"no"; then
-    case "$LIBS" in
-    *-lnsl*) ;;
-    *) AC_CHECK_LIB(nsl_s, connect) ;;
-    esac
-    case "$LIBS" in
-    *-lnsl*) ;;
-    *) AC_CHECK_LIB(nsl, connect) ;;
-    esac
-    case "$LIBS" in
-    *-lsocket*) ;;
-    *) AC_CHECK_LIB(socket, connect) ;;
-    esac
-    case "$LIBS" in
-    *-linet*) ;;
-    *) AC_CHECK_LIB(inet, connect) ;;
-    esac
-    dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value
-    dnl has been cached.
-    if test x"$ac_cv_lib_socket_connect" = x"yes" ||
-       test x"$ac_cv_lib_inet_connect" = x"yes"; then
-        # ac_cv_func_connect=yes
-        # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
-        AC_DEFINE(HAVE_CONNECT,1,[Whether the system has connect()])
-    fi
-fi
-
 ###############################################
 # test for where we get yp_get_default_domain() from
 AC_SEARCH_LIBS(yp_get_default_domain, [nsl])
@@ -5710,8 +5676,8 @@ case "$host_os" in
                NSSSONAMEVERSIONSUFFIX=".1"
                WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o \
                    nsswitch/winbind_nss_linux.o"
-               WINBIND_NSS_EXTRA_LIBS="-lsocket"
-               PAM_WINBIND_EXTRA_LIBS="-lsocket"
+               WINBIND_NSS_EXTRA_LIBS="${LIBREPLACE_NETWORK_LIBS}"
+               PAM_WINBIND_EXTRA_LIBS="${LIBREPLACE_NETWORK_LIBS}"
                ;;
        *hpux11*)
                WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"