diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-08-08 05:25:04 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-08-08 05:25:04 +0000 |
commit | 04c6cba5c2f6f3eeca67a7c28e8d0d45347e6042 (patch) | |
tree | e09ea8aadf876bd98cadecbd93e3b93313b46ea8 /source3/configure.in | |
parent | 963e96f3a980b20925e21ed2f9d3744c21802cce (diff) | |
download | samba-04c6cba5c2f6f3eeca67a7c28e8d0d45347e6042.tar.gz samba-04c6cba5c2f6f3eeca67a7c28e8d0d45347e6042.tar.bz2 samba-04c6cba5c2f6f3eeca67a7c28e8d0d45347e6042.zip |
we have to have the test for -lsocket before the test for some
functions (notably innetgr) to ensure we don't replace them if they
are in -lsocket
(This used to be commit d1212048903fff8725e501001ac84b019c21b939)
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/source3/configure.in b/source3/configure.in index 4f62df4b17..f7cb4889d8 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -105,6 +105,37 @@ if test "$ac_cv_lib_pam_pam_authenticate" = "yes"; then fi]) fi +# 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_FUNC(connect, :, +[case "$LIBS" in +*-lnsl*) ;; +*) AC_CHECK_LIB(nsl_s, printf) ;; +esac +case "$LIBS" in +*-lnsl*) ;; +*) AC_CHECK_LIB(nsl, printf) ;; +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 "$ac_cv_lib_socket_connect" = "yes" || + test "$ac_cv_lib_inet_connect" = "yes"; then + ac_cv_func_connect=yes + AC_DEFINE(HAVE_CONNECT) +fi]) + AC_CHECK_FUNCS(waitpid getcwd strdup strerror chown chmod chroot) AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync execl) @@ -191,37 +222,6 @@ AC_TRY_RUN([#include "tests/ftruncate.c"], echo yes;AC_DEFINE(HAVE_FTRUNCATE_EXTEND), echo no) -# 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_FUNC(connect, :, -[case "$LIBS" in -*-lnsl*) ;; -*) AC_CHECK_LIB(nsl_s, printf) ;; -esac -case "$LIBS" in -*-lnsl*) ;; -*) AC_CHECK_LIB(nsl, printf) ;; -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 "$ac_cv_lib_socket_connect" = "yes" || - test "$ac_cv_lib_inet_connect" = "yes"; then - ac_cv_func_connect=yes - AC_DEFINE(HAVE_CONNECT) -fi]) - echo $ac_n "checking for broken getgroups ... $ac_c" AC_TRY_RUN([#include "tests/getgroups.c"], echo yes;AC_DEFINE(HAVE_BROKEN_GETGROUPS), |