From 193225dd424c72209b54d867fac64b7415cff529 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Apr 2002 11:43:02 +0000 Subject: patch from Alexander Bokovoy needed for dlopen on bsd systems (This used to be commit 38fd99e84176106ed700f637e9292d2a4c1385b4) --- source3/configure.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index 91ea0ff99e..b38bd77d3b 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -299,7 +299,7 @@ AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/i AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h) AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h) AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h) -AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h ldap.h lber.h) +AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h) # # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT. @@ -369,9 +369,13 @@ if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then fi ############################################ -# we need libdl for PAM, the password database plugins and the new VFS code -AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl"; - AC_DEFINE(HAVE_LIBDL)]) +# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS 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)]) +fi +# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then ############################################ # check if the compiler can do immediate structures -- cgit