[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
autoconf test for nsl and socket libraries (ITS#1543)
Full_Name: Albert Chin-A-Young
Version: 2.0.21
OS: Solaris, HP-UX, IRIX, Tru64 UNIX, AIX
URL: ftp://ftp.thewrittenword.com/outgoing/pub/openldap-2.0.21-2.patch
Submission from: (NULL) (64.32.187.114)
It is generally considered bad to use a library simply if it exists. This
applies to the following autoconf test in configure.in:
AC_CHECK_FUNC(socket, :, [
dnl hopefully we won't include too many libraries
AC_CHECK_LIB(socket, main)
AC_CHECK_LIB(net, main)
AC_CHECK_LIB(nsl_s, main)
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(inet, socket)
AC_CHECK_LIB(gen, main)
])
Much better would be the following:
AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
We have tested this on Solaris 2.5.1, 2.6, 7, 8, HP-UX 11.00, Tru64 UNIX 4.0D,
5.0A, 5.1, IRIX 6.2, 6.5, and AIX 4.3.2 successfully.
Patch at:
ftp://ftp.thewrittenword.com/outgoing/pub/openldap-2.0.21-2.patch