svn rev #3285: trunk/

ghudson@MIT.EDU ghudson at MIT.EDU
Sat Nov 21 13:59:33 EST 2009


Commit By: ghudson
Log Message:
Add in a simple test for -lsocket -lnsl to make subsequent tests
(such as those for IPV6) work.



Changed Files:
U   trunk/configure.ac
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2009-11-21 17:29:32 UTC (rev 3284)
+++ trunk/configure.ac	2009-11-21 18:59:33 UTC (rev 3285)
@@ -54,6 +54,14 @@
 # on most Linux systems.
 AC_DEFINE(_GNU_SOURCE, 1, [Enable extended glibc prototypes])
 
+# We could rely on krb5-config to provide this, except that some of
+# the later tests (particularly those in KRB5_AC_INET6) rely on
+# -lsocket -lnsl being in LIBS on platforms which need them.  This is
+# a very simplified test, aimed mainly at Solaris, and may break on
+# some older or more obscure operating systems.
+AC_CHECK_FUNC(socket, [],
+  [AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", [], -lnsl)])
+
 AC_HEADER_STDARG
 AC_HEADER_TIME
 CHECK_DIRENT




More information about the Krb5-appl-commits mailing list