summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2003-01-15 05:00:04 +0000
committerMartin Pool <mbp@samba.org>2003-01-15 05:00:04 +0000
commitac4869ad2a233059fb14cc3363967a8673a2bd41 (patch)
tree202b38ecb87c311d2e059bf4487efe6a280a0c88 /source3/configure.in
parenta84db36fae74cf0a6b40bec9ae604e3e47172082 (diff)
downloadsamba-ac4869ad2a233059fb14cc3363967a8673a2bd41.tar.gz
samba-ac4869ad2a233059fb14cc3363967a8673a2bd41.tar.bz2
samba-ac4869ad2a233059fb14cc3363967a8673a2bd41.zip
Fix bug where the existence of config.cache would cause functions like
yp_get_default_domain to be misdetected. According to the autoconf manual we need to check for libraries before looking for functions in them. (This used to be commit 468c487df42c6fc25d1862f36995b3d9a78902ff)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in17
1 files changed, 3 insertions, 14 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 402e739c00..7e3ec6a256 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -509,11 +509,7 @@ fi
############################################
# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the plugin loading code
-AC_CHECK_FUNCS(dlopen)
-if test x"$ac_cv_func_dlopen" = x"no"; then
- AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
- AC_DEFINE(HAVE_DLOPEN,1,[Whether we have dlopen()])])
-fi
+AC_SEARCH_LIBS(dlopen, [dl])
# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
############################################
@@ -616,12 +612,8 @@ AC_FUNC_MEMCMP
###############################################
# test for where we get crypt() from
-AC_CHECK_FUNCS(crypt)
-if test x"$ac_cv_func_crypt" = x"no"; then
- AC_CHECK_LIB(crypt, crypt, [AUTHLIBS="$AUTHLIBS -lcrypt";
+AC_SEARCH_LIBS(crypt, [crypt], [AUTHLIBS="$AUTHLIBS -lcrypt";
AC_DEFINE(HAVE_CRYPT,1,[Whether the system has the crypt() function])])
-fi
-
###############################################
# Readline included by default unless explicitly asked not to
@@ -730,11 +722,8 @@ fi
###############################################
# test for where we get yp_get_default_domain() from
+AC_SEARCH_LIBS(yp_get_default_domain, [nsl])
AC_CHECK_FUNCS(yp_get_default_domain)
-if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
- AC_CHECK_LIB(nsl, yp_get_default_domain, [LIBS="$LIBS -lnsl";
- AC_DEFINE(HAVE_YP_GET_DEFAULT_DOMAIN,1,[Whether the system has yp_get_default_domain()])])
-fi
# Check if we have execl, if not we need to compile smbrun.
AC_CHECK_FUNCS(execl)