summaryrefslogtreecommitdiff
path: root/source4/heimdal_build/config.m4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-04-24 18:00:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:19 -0500
commit306baa12f803d06f86efd62438b9f996da2eff07 (patch)
treeefa3ee2b7aff48abe5e833b120250faaefb80308 /source4/heimdal_build/config.m4
parent62bdececc6de25d1dfdc5c27b5600180d2c8f446 (diff)
downloadsamba-306baa12f803d06f86efd62438b9f996da2eff07.tar.gz
samba-306baa12f803d06f86efd62438b9f996da2eff07.tar.bz2
samba-306baa12f803d06f86efd62438b9f996da2eff07.zip
r15219: Look for gai_strerror in more places, so we don't conflict with the
system library. This might help the build on proprietory unixes Andrew Bartlett (This used to be commit f1da657d5629425b55c9bd89427ef5d8c19f9636)
Diffstat (limited to 'source4/heimdal_build/config.m4')
-rw-r--r--source4/heimdal_build/config.m422
1 files changed, 16 insertions, 6 deletions
diff --git a/source4/heimdal_build/config.m4 b/source4/heimdal_build/config.m4
index 92e38e42c2..4a3ad4d947 100644
--- a/source4/heimdal_build/config.m4
+++ b/source4/heimdal_build/config.m4
@@ -239,15 +239,25 @@ fi
# only add gai_strerror if needed
SMB_ENABLE(HEIMDAL_ROKEN_GAI_STRERROR, NO)
AC_CHECK_FUNC(gai_strerror)
+
if test t$ac_cv_func_gai_strerror != tyes; then
- AC_SEARCH_LIBS_EXT(gai_strerror, [xnet], XNET_LIBS)
- AC_CHECK_FUNC_EXT(gai_strerror, $XNET_LIBS)
- if test t$ac_cv_func_ext_gai_strerror != tyes; then
- SMB_ENABLE(HEIMDAL_ROKEN_GAI_STRERROR, YES)
+ AC_CHECK_LIB_EXT(nsl, GAI_LIBS, gai_strerror)
+ AC_CHECK_LIB_EXT(socket, GAI_LIBS, gai_strerror)
+ AC_CHECK_LIB_EXT(xnet, GAI_LIBS, gai_strerror)
+
+ dnl We can't just call AC_CHECK_FUNCS(gai_strerror) here, because the value
+ dnl has been cached.
+ if test x"$ac_cv_lib_ext_nsl_gai_strerror" = x"yes" ||
+ test x"$ac_cv_lib_ext_socket_gai_strerror" = x"yes" ||
+ test x"$ac_cv_lib_ext_xnet_gai_strerror" = x"yes"; then
+ AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether the system has gai_strerror()])
+ SMB_EXT_LIB_ENABLE(GAI, YES)
else
- AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether gai_strerror() is available])
+ SMB_ENABLE(HEIMDAL_ROKEN_GAI_STRERROR, YES)
fi
+
else
AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether gai_strerror() is available])
fi
-SMB_EXT_LIB(XNET,[${XNET_LIBS}],[${XNET_CFLAGS}],[${XNET_CPPFLAGS}],[${XNET_LDFLAGS}])
+
+SMB_EXT_LIB(GAI,[${GAI_LIBS}],[${GAI_CFLAGS}],[${GAI_CPPFLAGS}],[${GAI_LDFLAGS}])