summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-04-26 08:29:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:59 -0500
commitbdac2454952502b90caffc58237d7e60eb66738f (patch)
treed01ffff78bbc72aa82cace46a39732cb62d19893
parent3c68259e3ac7b4886dc64f97510b6c61e95e5a83 (diff)
downloadsamba-bdac2454952502b90caffc58237d7e60eb66738f.tar.gz
samba-bdac2454952502b90caffc58237d7e60eb66738f.tar.bz2
samba-bdac2454952502b90caffc58237d7e60eb66738f.zip
r15265: Try to find inet_pton in -lnsl (should fix linking on sun1)
(This used to be commit a7c13020413a4d9621bef5bf9085b901ffbe1eb4)
-rw-r--r--source4/heimdal_build/config.m413
-rw-r--r--source4/heimdal_build/config.mk3
2 files changed, 15 insertions, 1 deletions
diff --git a/source4/heimdal_build/config.m4 b/source4/heimdal_build/config.m4
index ad0bdee1a8..49ff619386 100644
--- a/source4/heimdal_build/config.m4
+++ b/source4/heimdal_build/config.m4
@@ -65,6 +65,7 @@ AC_CHECK_FUNCS([ \
getprogname \
inet_ntop \
inet_aton \
+ inet_pton \
gethostname \
getnameinfo \
iruserok \
@@ -236,6 +237,18 @@ if test t$ac_cv_func_inet_aton != tyes; then
SMB_ENABLE(HEIMDAL_ROKEN_INET_ATON, YES)
fi
+if test x"$ac_cv_func_inet_pton" = x"no"; then
+ AC_CHECK_LIB_EXT(nsl_s, NSL_LIBS, inet_pton)
+ AC_CHECK_LIB_EXT(nsl, NSL_LIBS, inet_pton)
+ SMB_EXT_LIB_ENABLE(NSL,YES)
+ if test x"$ac_cv_lib_ext_nsl_s_inet_pton" != x"yes" &&
+ test x"$ac_cv_lib_ext_nsl_inet_pton" != x"yes"; then
+ AC_MSG_ERROR([no inet_pton() function available!])
+ fi
+fi
+
+SMB_EXT_LIB(NSL,[${NSL_LIBS}],[],[],[])
+
# only add getprogname if needed
SMB_ENABLE(HEIMDAL_ROKEN_GETPROGNAME, NO)
SMB_ENABLE(HEIMDAL_ROKEN_GETPROGNAME_HOST, NO)
diff --git a/source4/heimdal_build/config.mk b/source4/heimdal_build/config.mk
index 481e82818e..c43327ef78 100644
--- a/source4/heimdal_build/config.mk
+++ b/source4/heimdal_build/config.mk
@@ -349,7 +349,8 @@ PUBLIC_DEPENDENCIES = \
HEIMDAL_ROKEN_GAI_STRERROR \
HEIMDAL_ROKEN_INET_ATON \
HEIMDAL_ROKEN_GETPROGNAME \
- EXT_LIB_GAI
+ EXT_LIB_GAI \
+ EXT_LIB_NSL
# End SUBSYSTEM HEIMDAL_ROKEN
#######################