summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/configure.in575
-rw-r--r--source4/lib/popt/config.m431
-rw-r--r--source4/libads/config.m4247
-rw-r--r--source4/nsswitch/config.m4105
-rw-r--r--source4/ntvfs/config.m418
-rw-r--r--source4/passdb/config.m411
-rw-r--r--source4/popt/config.m431
-rw-r--r--source4/printing/config.m416
-rw-r--r--source4/python/config.m427
-rw-r--r--source4/web/config.m417
10 files changed, 515 insertions, 563 deletions
diff --git a/source4/configure.in b/source4/configure.in
index f2d91b78b1..3f7bfca868 100644
--- a/source4/configure.in
+++ b/source4/configure.in
@@ -81,21 +81,7 @@ AC_ARG_WITH(piddir,
;;
esac])
-#################################################
-# set SWAT directory location
-AC_ARG_WITH(swatdir,
-[ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)],
-[ case "$withval" in
- yes|no)
- #
- # Just in case anybody does it
- #
- AC_MSG_WARN([--with-swatdir called without argument - will use default])
- ;;
- * )
- swatdir="$withval"
- ;;
- esac])
+sinclude(web/config.m4)
#################################################
# set configuration directory location
@@ -134,7 +120,6 @@ AC_SUBST(lockdir)
AC_SUBST(piddir)
AC_SUBST(logfilebase)
AC_SUBST(privatedir)
-AC_SUBST(swatdir)
AC_SUBST(bindir)
AC_SUBST(sbindir)
@@ -179,16 +164,6 @@ AC_ARG_ENABLE(krb5developer, [ --enable-krb5developer Turn on developer warnin
CFLAGS="${CFLAGS} -gstabs -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
fi])
-AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc Enable heap debugging [default=no]])
-
-if test "x$enable_dmalloc" = xyes
-then
- AC_DEFINE(ENABLE_DMALLOC, 1, [Define to turn on dmalloc debugging])
- AC_DEFINE(DMALLOC_FUNC_CHECK, 1,
- [Define to check invariants around some common functions])
- LIBS="$LIBS -ldmalloc"
-fi
-
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
@@ -258,10 +233,10 @@ DYNEXP=
dnl Add modules that have to be built by default here
dnl These have to be built static:
-default_static_modules="pdb_smbpasswd auth_sam auth_unix auth_builtin ntvfs_ipc ntvfs_simple ntvfs_print ntvfs_cifs"
+default_static_modules="ntvfs_ipc ntvfs_simple ntvfs_print ntvfs_cifs"
dnl These are preferably build shared, and static if dlopen() is not available
-default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_netatalk vfs_fake_perms"
+default_shared_modules=""
if test "x$developer" = xyes; then
default_static_modules="$default_static_modules"
@@ -492,7 +467,7 @@ AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h)
+AC_CHECK_HEADERS(arpa/inet.h sys/select.h fcntl.h sys/time.h)
AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h)
AC_CHECK_HEADERS(compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h)
AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
@@ -519,17 +494,7 @@ AC_CHECK_HEADERS(shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/
AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h)
AC_CHECK_HEADERS(stropts.h poll.h)
AC_CHECK_HEADERS(sys/capability.h syscall.h sys/syscall.h)
-AC_CHECK_HEADERS(sys/acl.h sys/cdefs.h glob.h)
-
-# For experimental utmp support (lastlog on some BSD-like systems)
-AC_CHECK_HEADERS(utmp.h utmpx.h lastlog.h)
-
-# For quotas on Veritas VxFS filesystems
-AC_CHECK_HEADERS(sys/fs/vx_quota.h)
-
-# For quotas on Linux XFS filesystems
-AC_CHECK_HEADERS(linux/xqm.h)
-AC_CHECK_HEADERS(xfs/xqm.h)
+AC_CHECK_HEADERS(sys/acl.h)
AC_CHECK_SIZEOF(int,cross)
AC_CHECK_SIZEOF(long,cross)
@@ -555,23 +520,6 @@ AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_TYPE(wchar_t, unsigned short)
############################################
-# for cups support we need libcups, and a handful of header files
-
-AC_ARG_ENABLE(cups,
-[ --enable-cups Turn on CUPS support (default=auto)])
-
-if test x$enable_cups != xno; then
- AC_PATH_PROG(CUPS_CONFIG, cups-config)
-
- if test "x$CUPS_CONFIG" != x; then
- AC_DEFINE(HAVE_CUPS,1,[Whether we have CUPS])
- CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
- LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
- PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
- fi
-fi
-
-############################################
# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the plugin loading code
AC_SEARCH_LIBS(dlopen, [dl])
# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
@@ -1882,6 +1830,7 @@ dnl glibc2.1 broken check has succeeded.
dnl
AC_CACHE_CHECK([for 64 bit fcntl locking],samba_cv_HAVE_STRUCT_FLOCK64,[
+ AC_CHECK_HEADERS(sys/fcntl.h)
AC_TRY_RUN([
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
@@ -2058,246 +2007,8 @@ AC_ARG_WITH(dfs,
AC_MSG_RESULT(no)
)
-#################################################
-# active directory support
-
-with_ads_support=yes
-AC_MSG_CHECKING([whether to use Active Directory])
-
-AC_ARG_WITH(ads,
-[ --with-ads Active Directory support (default yes)],
-[ case "$withval" in
- no)
- with_ads_support=no
- ;;
- esac ])
-
-if test x"$with_ads_support" = x"yes"; then
- AC_DEFINE(WITH_ADS,1,[Whether to include Active Directory support])
-fi
-
-AC_MSG_RESULT($with_ads_support)
-
-FOUND_KRB5=no
-if test x"$with_ads_support" = x"yes"; then
-
- #################################################
- # check for krb5-config from recent MIT and Heimdal kerberos 5
- AC_PATH_PROG(KRB5_CONFIG, krb5-config)
- AC_MSG_CHECKING(for working krb5-config)
- if test -x "$KRB5_CONFIG"; then
- LIBS="$LIBS `$KRB5_CONFIG --libs`"
- CFLAGS="$CFLAGS `$KRB5_CONFIG --cflags`"
- CPPFLAGS="$CPPFLAGS `$KRB5_CONFIG --cflags`"
- FOUND_KRB5=yes
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no. Fallback to previous krb5 detection strategy)
- fi
-
- if test x$FOUND_KRB5 = x"no"; then
- #################################################
- # check for location of Kerberos 5 install
- AC_MSG_CHECKING(for kerberos 5 install path)
- AC_ARG_WITH(krb5,
- [ --with-krb5=base-dir Locate Kerberos 5 support (default=/usr)],
- [ case "$withval" in
- no)
- AC_MSG_RESULT(no)
- ;;
- *)
- AC_MSG_RESULT(yes)
- LIBS="$LIBS -lkrb5"
- CFLAGS="$CFLAGS -I$withval/include"
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
- FOUND_KRB5=yes
- ;;
- esac ],
- AC_MSG_RESULT(no)
- )
- fi
-
-if test x$FOUND_KRB5 = x"no"; then
-#################################################
-# see if this box has the SuSE location for the heimdal kerberos implementation
-AC_MSG_CHECKING(for /usr/include/heimdal)
-if test -d /usr/include/heimdal; then
- if test -f /usr/lib/heimdal/lib/libkrb5.a; then
- LIBS="$LIBS -lkrb5"
- CFLAGS="$CFLAGS -I/usr/include/heimdal"
- CPPFLAGS="$CPPFLAGS -I/usr/include/heimdal"
- LDFLAGS="$LDFLAGS -L/usr/lib/heimdal/lib"
- AC_MSG_RESULT(yes)
- else
- LIBS="$LIBS -lkrb5"
- CFLAGS="$CFLAGS -I/usr/include/heimdal"
- CPPFLAGS="$CPPFLAGS -I/usr/include/heimdal"
- AC_MSG_RESULT(yes)
-
- fi
-else
- AC_MSG_RESULT(no)
-fi
-fi
-
-
-if test x$FOUND_KRB5 = x"no"; then
-#################################################
-# see if this box has the RedHat location for kerberos
-AC_MSG_CHECKING(for /usr/kerberos)
-if test -d /usr/kerberos -a -f /usr/kerberos/lib/libkrb5.a; then
- LIBS="$LIBS -lkrb5"
- LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
- CFLAGS="$CFLAGS -I/usr/kerberos/include"
- CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
-fi
-
- # now check for krb5.h. Some systems have the libraries without the headers!
- # note that this check is done here to allow for different kerberos
- # include paths
- AC_CHECK_HEADERS(krb5.h)
-
- # now check for gssapi headers. This is also done here to allow for
- # different kerberos include paths
- AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h com_err.h)
-
- ##################################################################
- # we might need the k5crypto and com_err libraries on some systems
- AC_CHECK_LIB(com_err, _et_list, [LIBS="$LIBS -lcom_err"])
- AC_CHECK_LIB(k5crypto, krb5_encrypt_data, [LIBS="$LIBS -lk5crypto"])
- # Heimdal checks.
- AC_CHECK_LIB(crypto, des_set_key, [LIBS="$LIBS -lcrypto"])
- AC_CHECK_LIB(asn1, copy_Authenticator, [LIBS="$LIBS -lasn1 -lroken"])
- # Heimdal checks. On static Heimdal gssapi must be linked before krb5.
- AC_CHECK_LIB(gssapi, gss_display_status, [LIBS="$LIBS -lgssapi -lkrb5 -lasn1";
- AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available])])
-
- AC_CHECK_LIB(krb5, krb5_set_real_time, [AC_DEFINE(HAVE_KRB5_SET_REAL_TIME,1,[Whether krb5_set_real_time is available])])
- AC_CHECK_LIB(krb5, krb5_set_default_in_tkt_etypes, [AC_DEFINE(HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES,1,[Whether krb5_set_default_in_tkt_etypes, is available])])
- AC_CHECK_LIB(krb5, krb5_set_default_tgs_ktypes, [AC_DEFINE(HAVE_KRB5_SET_DEFAULT_TGS_KTYPES,1,[Whether krb5_set_default_tgs_ktypes is available])])
-
- AC_CHECK_LIB(krb5, krb5_principal2salt, [AC_DEFINE(HAVE_KRB5_PRINCIPAL2SALT,1,[Whether krb5_principal2salt is available])])
- AC_CHECK_LIB(krb5, krb5_use_enctype, [AC_DEFINE(HAVE_KRB5_USE_ENCTYPE,1,[Whether krb5_use_enctype is available])])
- AC_CHECK_LIB(krb5, krb5_string_to_key, [AC_DEFINE(HAVE_KRB5_STRING_TO_KEY,1,[Whether krb5_string_to_key is available])])
- AC_CHECK_LIB(krb5, krb5_get_pw_salt, [AC_DEFINE(HAVE_KRB5_GET_PW_SALT,1,[Whether krb5_get_pw_salt is available])])
- AC_CHECK_LIB(krb5, krb5_string_to_key_salt, [AC_DEFINE(HAVE_KRB5_STRING_TO_KEY_SALT,1,[Whether krb5_string_to_key_salt is available])])
- AC_CHECK_LIB(krb5, krb5_auth_con_setkey, [AC_DEFINE(HAVE_KRB5_AUTH_CON_SETKEY,1,[Whether krb5_auth_con_setkey is available])])
- AC_CHECK_LIB(krb5, krb5_auth_con_setuseruserkey, [AC_DEFINE(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY,1,[Whether krb5_auth_con_setuseruserkey is available])])
- AC_CHECK_LIB(krb5, krb5_locate_kdc, [AC_DEFINE(HAVE_KRB5_LOCATE_KDC,1,[Whether krb5_locate_kdc is available])])
- AC_CHECK_LIB(krb5, krb5_get_permitted_enctypes, [AC_DEFINE(HAVE_KRB5_GET_PERMITTED_ENCTYPES,1,[Whether krb5_get_permitted_enctypes is available])])
- AC_CHECK_LIB(krb5, krb5_get_default_in_tkt_etypes, [AC_DEFINE(HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES,1,[Whether krb5_get_default_in_tkt_etypes is available])])
- AC_CHECK_LIB(krb5, krb5_free_ktypes, [AC_DEFINE(HAVE_KRB5_FREE_KTYPES,1,[Whether krb5_free_ktypes is available])])
-
-AC_CACHE_CHECK([for addrtype in krb5_address],samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS,[
-AC_TRY_COMPILE([#include <krb5.h>],
-[krb5_address kaddr; kaddr.addrtype = ADDRTYPE_INET;],
-samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS=yes,samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS=no)])
-if test x"$samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS" = x"yes"; then
- AC_DEFINE(HAVE_ADDRTYPE_IN_KRB5_ADDRESS,1,[Whether the krb5_address struct has a addrtype property])
-fi
-
-AC_CACHE_CHECK([for addr_type in krb5_address],samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS,[
-AC_TRY_COMPILE([#include <krb5.h>],
-[krb5_address kaddr; kaddr.addr_type = KRB5_ADDRESS_INET;],
-samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS=yes,samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS=no)])
-if test x"$samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS" = x"yes"; then
- AC_DEFINE(HAVE_ADDR_TYPE_IN_KRB5_ADDRESS,1,[Whether the krb5_address struct has a addr_type property])
-fi
-
-AC_CACHE_CHECK([for enc_part2 in krb5_ticket],samba_cv_HAVE_KRB5_TKT_ENC_PART2,[
-AC_TRY_COMPILE([#include <krb5.h>],
-[krb5_ticket tkt; tkt.enc_part2->authorization_data[0]->contents = NULL;],
-samba_cv_HAVE_KRB5_TKT_ENC_PART2=yes,samba_cv_HAVE_KRB5_TKT_ENC_PART2=no)])
-if test x"$samba_cv_HAVE_KRB5_TKT_ENC_PART2" = x"yes"; then
- AC_DEFINE(HAVE_KRB5_TKT_ENC_PART2,1,[Whether the krb5_ticket struct has a enc_part2 property])
-fi
-
-AC_CACHE_CHECK([for keyvalue in krb5_keyblock],samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE,[
-AC_TRY_COMPILE([#include <krb5.h>],
-[krb5_keyblock key; key.keyvalue.data = NULL;],
-samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE=yes,samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE=no)])
-if test x"$samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE" = x"yes"; then
- AC_DEFINE(HAVE_KRB5_KEYBLOCK_KEYVALUE,1,[Whether the krb5_keyblock struct has a keyvalue property])
-fi
-
-AC_CACHE_CHECK([for ENCTYPE_ARCFOUR_HMAC_MD5],samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,[
-AC_TRY_COMPILE([#include <krb5.h>],
-[krb5_enctype enctype; enctype = ENCTYPE_ARCFOUR_HMAC_MD5;],
-samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5=yes,samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5=no)])
-if test x"$samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5" = x"yes"; then
- AC_DEFINE(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,1,[Whether the ENCTYPE_ARCFOUR_HMAC_MD5 key type is available])
-fi
-
- ########################################################
- # now see if we can find the krb5 libs in standard paths
- # or as specified above
- AC_CHECK_LIB(krb5, krb5_mk_req_extended, [LIBS="$LIBS -lkrb5";
- AC_DEFINE(HAVE_KRB5,1,[Whether KRB5 is available])])
-
- ########################################################
- # now see if we can find the gssapi libs in standard paths
- AC_CHECK_LIB(gssapi_krb5, gss_display_status, [LIBS="$LIBS -lgssapi_krb5";
- AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available])])
-
-fi
-
-########################################################
-# Compile with LDAP support?
-
-with_ldap_support=yes
-AC_MSG_CHECKING([whether to use LDAP])
-
-AC_ARG_WITH(ldap,
-[ --with-ldap LDAP support (default yes)],
-[ case "$withval" in
- no)
- with_ldap_support=no
- ;;
- esac ])
-
-AC_MSG_RESULT($with_ldap_support)
-
-if test x"$with_ldap_support" = x"yes"; then
-
- ##################################################################
- # we might need the lber lib on some systems. To avoid link errors
- # this test must be before the libldap test
- AC_CHECK_LIB(lber, ber_scanf, [LIBS="$LIBS -llber"])
-
- ########################################################
- # now see if we can find the ldap libs in standard paths
- if test x$have_ldap != xyes; then
- AC_CHECK_LIB(ldap, ldap_domain2hostlist, [LIBS="$LIBS -lldap";
- AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available])])
-
- ########################################################
- # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
- # Check found in pam_ldap 145.
- AC_CHECK_FUNCS(ldap_set_rebind_proc)
- AC_CACHE_CHECK(whether ldap_set_rebind_proc takes 3 arguments, pam_ldap_cv_ldap_set_rebind_proc, [
- AC_TRY_COMPILE([
- #include <lber.h>
- #include <ldap.h>], [ldap_set_rebind_proc(0, 0, 0);], [pam_ldap_cv_ldap_set_rebind_proc=3], [pam_ldap_cv_ldap_set_rebind_proc=2]) ])
- AC_DEFINE_UNQUOTED(LDAP_SET_REBIND_PROC_ARGS, $pam_ldap_cv_ldap_set_rebind_proc, [Number of arguments to ldap_set_rebind_proc])
- fi
-fi
-
-########################################################
-# Compile with MySQL support?
-AM_PATH_MYSQL([0.11.0],[MODULE_MYSQL=bin/mysql.so],[MODULE_MYSQL=])
-CFLAGS="$CFLAGS $MYSQL_CFLAGS"
-AC_SUBST(MODULE_MYSQL)
-
-########################################################
-# Compile with XML support?
-AM_PATH_XML2([2.0.0],[MODULE_XML=bin/xml.so],[MODULE_XML=])
-CFLAGS="$CFLAGS $XML_CFLAGS"
-AC_SUBST(MODULE_XML)
+sinclude(libads/config.m4)
+sinclude(passdb/config.m4)
#################################################
# check for automount support
@@ -2467,12 +2178,6 @@ AC_ARG_WITH(profiling-data,
AC_MSG_RESULT(no)
)
-########################################################################################
-##
-## END OF TESTS FOR SAM BACKENDS.
-##
-########################################################################################
-
#################################################
# check for a NISPLUS_HOME support
AC_MSG_CHECKING(whether to use NISPLUS_HOME)
@@ -2491,24 +2196,6 @@ AC_ARG_WITH(nisplus-home,
)
#################################################
-# check for syslog logging
-AC_MSG_CHECKING(whether to use syslog logging)
-AC_ARG_WITH(syslog,
-[ --with-syslog Include experimental SYSLOG support (default=no)],
-[ case "$withval" in
- yes)
- AC_MSG_RESULT(yes)
- AC_DEFINE(WITH_SYSLOG,1,[Whether to include experimental syslog support])
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
- esac ],
- AC_MSG_RESULT(no)
-)
-
-
-#################################################
# check for experimental disk-quotas support
QUOTAOBJS=smbd/noquotas.o
@@ -2592,54 +2279,6 @@ AC_ARG_WITH(manpages-langs,
)
#################################################
-# should we build libsmbclient?
-
-INSTALLCLIENTCMD_SH=:
-INSTALLCLIENTCMD_A=:
-LIBSMBCLIENT_SHARED=
-LIBSMBCLIENT=
-AC_MSG_CHECKING(whether to build the libsmbclient shared library)
-AC_ARG_WITH(libsmbclient,
-[ --with-libsmbclient Build the libsmbclient shared library (default=yes if shared libs supported)],
-[ case "$withval" in
- no)
- AC_MSG_RESULT(no)
- ;;
- *)
- if test $BLDSHARED = true; then
- INSTALLCLIENTCMD_SH="\$(INSTALLCMD)"
- LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
- LIBSMBCLIENT=libsmbclient
- AC_MSG_RESULT(yes)
- else
- enable_static=yes
- AC_MSG_RESULT(no shared library support -- will supply static library)
- fi
- if test $enable_static = yes; then
- INSTALLCLIENTCMD_A="\$(INSTALLCMD)"
- LIBSMBCLIENT=libsmbclient
- fi
- ;;
- esac ],
-[
-# if unspecified, default is to built it iff possible.
- if test $BLDSHARED = true; then
- INSTALLCLIENTCMD_SH="\$(INSTALLCMD)"
- LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
- LIBSMBCLIENT=libsmbclient
- AC_MSG_RESULT(yes)
- else
- enable_static=yes
- AC_MSG_RESULT(no shared library support -- will supply static library)
- fi
- if test $enable_static = yes; then
- INSTALLCLIENTCMD_A="\$(INSTALLCMD)"
- LIBSMBCLIENT=libsmbclient
- fi]
-)
-
-
-#################################################
# these tests are taken from the GNU fileutils package
AC_CHECKING(how to get filesystem space usage)
space=no
@@ -3146,173 +2785,9 @@ samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)])
AC_MSG_RESULT(yes)
)
-
-#################################################
-# Check whether winbind is supported on this platform. If so we need to
-# build and install client programs, sbin programs and shared libraries
-
-AC_MSG_CHECKING(whether to build winbind)
-
-# Initially, the value of $host_os decides whether winbind is supported
-
-case "$host_os" in
- *linux*|*irix*)
- HAVE_WINBIND=yes
- ;;
- *solaris*)
- HAVE_WINBIND=yes
- WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
- WINBIND_NSS_EXTRA_LIBS="-lsocket"
- ;;
- *hpux11*)
- HAVE_WINBIND=yes
- WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
- ;;
- *)
- HAVE_WINBIND=no
- winbind_no_reason=", unsupported on $host_os"
- ;;
-esac
-
-AC_SUBST(WINBIND_NSS_EXTRA_OBJS)
-AC_SUBST(WINBIND_NSS_EXTRA_LIBS)
-
-# Check the setting of --with-winbindd
-
-AC_ARG_WITH(winbind,
-[ --with-winbind Build winbind (default, if supported by OS)],
-[
- case "$withval" in
- yes)
- HAVE_WINBIND=yes
- ;;
- no)
- HAVE_WINBIND=no
- winbind_reason=""
- ;;
- esac ],
-)
-
-# We need unix domain sockets for winbind
-
-if test x"$HAVE_WINBIND" = x"yes"; then
- if test x"$samba_cv_unixsocket" = x"no"; then
- winbind_no_reason=", no unix domain socket support on $host_os"
- HAVE_WINBIND=no
- fi
-fi
-
-# Display test results
-
-if test x"$HAVE_WINBIND" = x"yes"; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(WITH_WINBIND,1,[Whether to build winbind])
-
- EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
- EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd\$(EXEEXT)"
- if test x"$BLDSHARED" = x"true"; then
- case "$host_os" in
- *irix*)
- SHLIB_PROGS="$SHLIB_PROGS nsswitch/libns_winbind.so"
- ;;
- *)
- SHLIB_PROGS="$SHLIB_PROGS nsswitch/libnss_winbind.so"
- ;;
- esac
- if test x"$with_pam" = x"yes"; then
- SHLIB_PROGS="$SHLIB_PROGS nsswitch/pam_winbind.so"
- fi
- fi
-else
- AC_MSG_RESULT(no$winbind_no_reason)
-fi
-
-# Solaris has some extra fields in struct passwd that need to be
-# initialised otherwise nscd crashes. Unfortunately autoconf < 2.50
-# doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
-# this.
-
-#AC_CHECK_MEMBER(struct passwd.pw_comment,
-# AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
-# [#include <pwd.h>])
-
-AC_CACHE_CHECK([whether struct passwd has pw_comment],samba_cv_passwd_pw_comment, [
- AC_TRY_COMPILE([#include <pwd.h>],[struct passwd p; p.pw_comment;],
- samba_cv_passwd_pw_comment=yes,samba_cv_passwd_pw_comment=no)])
-if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
- AC_DEFINE(HAVE_PASSWD_PW_COMMENT,1,[Whether struct passwd has pw_comment])
-fi
-
-#AC_CHECK_MEMBER(struct passwd.pw_age,
-# AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
-# [#include <pwd.h>])
-
-AC_CACHE_CHECK([whether struct passwd has pw_age],samba_cv_passwd_pw_age, [
- AC_TRY_COMPILE([#include <pwd.h>],[struct passwd p; p.pw_age;],
- samba_cv_passwd_pw_age=yes,samba_cv_passwd_pw_age=no)])
-if test x"$samba_cv_passwd_pw_age" = x"yes"; then
- AC_DEFINE(HAVE_PASSWD_PW_AGE,1,[Whether struct passwd has pw_age])
-fi
-
-#################################################
-# Check to see if we should use the included popt
-
-AC_ARG_WITH(included-popt,
-[ --with-included-popt use bundled popt library, not from system],
-[
- case "$withval" in
- yes)
- INCLUDED_POPT=yes
- ;;
- no)
- INCLUDED_POPT=no
- ;;
- esac ],
-)
-if test x"$INCLUDED_POPT" != x"yes"; then
- AC_CHECK_LIB(popt, poptGetContext,
- INCLUDED_POPT=no, INCLUDED_POPT=yes)
-fi
-
-AC_MSG_CHECKING(whether to use included popt)
-if test x"$INCLUDED_POPT" = x"yes"; then
- AC_MSG_RESULT(yes)
- BUILD_POPT='$(POPT_OBJS)'
- FLAGS1="-I$srcdir/popt"
-else
- AC_MSG_RESULT(no)
- LIBS="$LIBS -lpopt"
-fi
-AC_SUBST(BUILD_POPT)
-AC_SUBST(FLAGS1)
-
-#################################################
-# Check if the user wants Python
-
-# At the moment, you can use this to set which Python binary to link
-# against. (Libraries built for Python2.2 can't be used by 2.1,
-# though they can coexist in different directories.) In the future
-# this might make the Python stuff be built by default.
-
-# Defaulting python breaks the clean target if python isn't installed
-
-PYTHON=
-
-AC_ARG_WITH(python,
-[ --with-python=PYTHONNAME build Python libraries],
-[ case "${withval-python}" in
- yes)
- PYTHON=python
- EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS python_ext"
- ;;
- no)
- PYTHON=
- ;;
- *)
- PYTHON=${withval-python}
- ;;
- esac ])
-AC_SUBST(PYTHON)
+sinclude(nsswitch/config.m4)
+sinclude(popt/config.m4)
+sinclude(python/config.m4)
for i in `echo $default_static_modules | sed -e's/,/ /g'`
do
@@ -3330,9 +2805,6 @@ do
done
dnl Always built these modules static
-MODULE_pdb_guest=STATIC
-MODULE_idmap_tdb=STATIC
-
AC_ARG_WITH(static-modules,
[ --with-static-modules=MODULES Comma-seperated list of names of modules to statically link in],
[ if test $withval; then
@@ -3354,22 +2826,7 @@ fi ])
SMB_MODULE(charset_weird, modules/weird.o, "bin/weird.$SHLIBEXT", CHARSET)
SMB_SUBSYSTEM(CHARSET,lib/iconv.o)
-SMB_MODULE(ntvfs_cifs, \$(NTVFS_CIFS_OBJ), "bin/cifs.$SHLIBEXT$", NTVFS)
-SMB_MODULE(ntvfs_simple, \$(NTVFS_SIMPLE_OBJ), "bin/ntvfs_simple.$SHLIBEXT$", NTVFS)
-SMB_MODULE(ntvfs_print, \$(NTVFS_PRINT_OBJ), "bin/ntvfs_print.$SHLIBEXT$", NTVFS)
-SMB_MODULE(ntvfs_ipc, \$(NTVFS_IPC_OBJ), "bin/ntvfs_ipc.$SHLIBEXT$", NTVFS)
-SMB_MODULE(ntvfs_posix, \$(NTVFS_POSIX_OBJ), "bin/ntvfs_posix.$SHLIBEXT$", NTVFS)
-
-# Tank FS
-SMB_MODULE(ntvfs_csm, \$(NTVFS_CSM_OBJ), "bin/ntvfs_csm.$SHLIBEXT$", NTVFS)
-STFS_ENABLED="#"
-if test "$MODULE_ntvfs_csm"; then
- SMBD_EXTRA_LIBS="$SMBD_EXTRA_LIBS \$\(STFS_LIBS\)"
- STFS_ENABLED=
-fi
-AC_SUBST(STFS_ENABLED)
-
-SMB_SUBSYSTEM(NTVFS,ntvfs/ntvfs_base.o)
+sinclude(ntvfs/config.m4)
AC_DEFINE_UNQUOTED(STRING_STATIC_MODULES, "$string_static_modules", [String list of builtin modules])
@@ -3401,11 +2858,3 @@ CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)
CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)
AC_OUTPUT(include/stamp-h Makefile script/findsmb)
-
-#################################################
-# Print very concise instructions on building/use
-if test "x$enable_dmalloc" = xyes
-then
- AC_MSG_RESULT([Note: The dmalloc debug library will be included. To turn it on use])
- AC_MSG_RESULT([ \$ eval \`dmalloc samba\`.])
-fi
diff --git a/source4/lib/popt/config.m4 b/source4/lib/popt/config.m4
new file mode 100644
index 0000000000..7532c5826e
--- /dev/null
+++ b/source4/lib/popt/config.m4
@@ -0,0 +1,31 @@
+#################################################
+# Check to see if we should use the included popt
+
+AC_ARG_WITH(included-popt,
+[ --with-included-popt use bundled popt library, not from system],
+[
+ case "$withval" in
+ yes)
+ INCLUDED_POPT=yes
+ ;;
+ no)
+ INCLUDED_POPT=no
+ ;;
+ esac ],
+)
+if test x"$INCLUDED_POPT" != x"yes"; then
+ AC_CHECK_LIB(popt, poptGetContext,
+ INCLUDED_POPT=no, INCLUDED_POPT=yes)
+fi
+
+AC_MSG_CHECKING(whether to use included popt)
+if test x"$INCLUDED_POPT" = x"yes"; then
+ AC_MSG_RESULT(yes)
+ BUILD_POPT='$(POPT_OBJS)'
+ FLAGS1="-I$srcdir/popt"
+else
+ AC_MSG_RESULT(no)
+ LIBS="$LIBS -lpopt"
+fi
+AC_SUBST(BUILD_POPT)
+AC_SUBST(FLAGS1)
diff --git a/source4/libads/config.m4 b/source4/libads/config.m4
new file mode 100644
index 0000000000..fc3108272e
--- /dev/null
+++ b/source4/libads/config.m4
@@ -0,0 +1,247 @@
+#################################################
+# active directory support
+
+with_ads_support=yes
+AC_MSG_CHECKING([whether to use Active Directory])
+
+AC_ARG_WITH(ads,
+[ --with-ads Active Directory support (default yes)],
+[ case "$withval" in
+ no)
+ with_ads_support=no
+ ;;
+ esac ])
+
+if test x"$with_ads_support" = x"yes"; then
+ AC_DEFINE(WITH_ADS,1,[Whether to include Active Directory support])
+fi
+
+AC_MSG_RESULT($with_ads_support)
+
+FOUND_KRB5=no
+if test x"$with_ads_support" = x"yes"; then
+
+ #################################################
+ # check for krb5-config from recent MIT and Heimdal kerberos 5
+ AC_PATH_PROG(KRB5_CONFIG, krb5-config)
+ AC_MSG_CHECKING(for working krb5-config)
+ if test -x "$KRB5_CONFIG"; then
+ LIBS="$LIBS `$KRB5_CONFIG --libs`"
+ CFLAGS="$CFLAGS `$KRB5_CONFIG --cflags`"
+ CPPFLAGS="$CPPFLAGS `$KRB5_CONFIG --cflags`"
+ FOUND_KRB5=yes
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no. Fallback to previous krb5 detection strategy)
+ fi
+
+ if test x$FOUND_KRB5 = x"no"; then
+ #################################################
+ # check for location of Kerberos 5 install
+ AC_MSG_CHECKING(for kerberos 5 install path)
+ AC_ARG_WITH(krb5,
+ [ --with-krb5=base-dir Locate Kerberos 5 support (default=/usr)],
+ [ case "$withval" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *)
+ AC_MSG_RESULT(yes)
+ LIBS="$LIBS -lkrb5"
+ CFLAGS="$CFLAGS -I$withval/include"
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ FOUND_KRB5=yes
+ ;;
+ esac ],
+ AC_MSG_RESULT(no)
+ )
+ fi
+
+if test x$FOUND_KRB5 = x"no"; then
+#################################################
+# see if this box has the SuSE location for the heimdal kerberos implementation
+AC_MSG_CHECKING(for /usr/include/heimdal)
+if test -d /usr/include/heimdal; then
+ if test -f /usr/lib/heimdal/lib/libkrb5.a; then
+ LIBS="$LIBS -lkrb5"
+ CFLAGS="$CFLAGS -I/usr/include/heimdal"
+ CPPFLAGS="$CPPFLAGS -I/usr/include/heimdal"
+ LDFLAGS="$LDFLAGS -L/usr/lib/heimdal/lib"
+ AC_MSG_RESULT(yes)
+ else
+ LIBS="$LIBS -lkrb5"
+ CFLAGS="$CFLAGS -I/usr/include/heimdal"
+ CPPFLAGS="$CPPFLAGS -I/usr/include/heimdal"
+ AC_MSG_RESULT(yes)
+
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+fi
+
+
+if test x$FOUND_KRB5 = x"no"; then
+#################################################
+# see if this box has the RedHat location for kerberos
+AC_MSG_CHECKING(for /usr/kerberos)
+if test -d /usr/kerberos -a -f /usr/kerberos/lib/libkrb5.a; then
+ LIBS="$LIBS -lkrb5"
+ LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
+ CFLAGS="$CFLAGS -I/usr/kerberos/include"
+ CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+fi
+
+ # now check for krb5.h. Some systems have the libraries without the headers!
+ # note that this check is done here to allow for different kerberos
+ # include paths
+ AC_CHECK_HEADERS(krb5.h)
+
+ # now check for gssapi headers. This is also done here to allow for
+ # different kerberos include paths
+ AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h com_err.h)
+
+ ##################################################################
+ # we might need the k5crypto and com_err libraries on some systems
+ AC_CHECK_LIB(com_err, _et_list, [LIBS="$LIBS -lcom_err"])
+ AC_CHECK_LIB(k5crypto, krb5_encrypt_data, [LIBS="$LIBS -lk5crypto"])
+ # Heimdal checks.
+ AC_CHECK_LIB(crypto, des_set_key, [LIBS="$LIBS -lcrypto"])
+ AC_CHECK_LIB(asn1, copy_Authenticator, [LIBS="$LIBS -lasn1 -lroken"])
+ # Heimdal checks. On static Heimdal gssapi must be linked before krb5.
+ AC_CHECK_LIB(gssapi, gss_display_status, [LIBS="$LIBS -lgssapi -lkrb5 -lasn1";
+ AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available])])
+
+ AC_CHECK_LIB(krb5, krb5_set_real_time, [AC_DEFINE(HAVE_KRB5_SET_REAL_TIME,1,[Whether krb5_set_real_time is available])])
+ AC_CHECK_LIB(krb5, krb5_set_default_in_tkt_etypes, [AC_DEFINE(HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES,1,[Whether krb5_set_default_in_tkt_etypes, is available])])
+ AC_CHECK_LIB(krb5, krb5_set_default_tgs_ktypes, [AC_DEFINE(HAVE_KRB5_SET_DEFAULT_TGS_KTYPES,1,[Whether krb5_set_default_tgs_ktypes is available])])
+
+ AC_CHECK_LIB(krb5, krb5_principal2salt, [AC_DEFINE(HAVE_KRB5_PRINCIPAL2SALT,1,[Whether krb5_principal2salt is available])])
+ AC_CHECK_LIB(krb5, krb5_use_enctype, [AC_DEFINE(HAVE_KRB5_USE_ENCTYPE,1,[Whether krb5_use_enctype is available])])
+ AC_CHECK_LIB(krb5, krb5_string_to_key, [AC_DEFINE(HAVE_KRB5_STRING_TO_KEY,1,[Whether krb5_string_to_key is available])])
+ AC_CHECK_LIB(krb5, krb5_get_pw_salt, [AC_DEFINE(HAVE_KRB5_GET_PW_SALT,1,[Whether krb5_get_pw_salt is available])])
+ AC_CHECK_LIB(krb5, krb5_string_to_key_salt, [AC_DEFINE(HAVE_KRB5_STRING_TO_KEY_SALT,1,[Whether krb5_string_to_key_salt is available])])
+ AC_CHECK_LIB(krb5, krb5_auth_con_setkey, [AC_DEFINE(HAVE_KRB5_AUTH_CON_SETKEY,1,[Whether krb5_auth_con_setkey is available])])
+ AC_CHECK_LIB(krb5, krb5_auth_con_setuseruserkey, [AC_DEFINE(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY,1,[Whether krb5_auth_con_setuseruserkey is available])])
+ AC_CHECK_LIB(krb5, krb5_locate_kdc, [AC_DEFINE(HAVE_KRB5_LOCATE_KDC,1,[Whether krb5_locate_kdc is available])])
+ AC_CHECK_LIB(krb5, krb5_get_permitted_enctypes, [AC_DEFINE(HAVE_KRB5_GET_PERMITTED_ENCTYPES,1,[Whether krb5_get_permitted_enctypes is available])])
+ AC_CHECK_LIB(krb5, krb5_get_default_in_tkt_etypes, [AC_DEFINE(HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES,1,[Whether krb5_get_default_in_tkt_etypes is available])])
+ AC_CHECK_LIB(krb5, krb5_free_ktypes, [AC_DEFINE(HAVE_KRB5_FREE_KTYPES,1,[Whether krb5_free_ktypes is available])])
+
+AC_CACHE_CHECK([for addrtype in krb5_address],samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS,[
+AC_TRY_COMPILE([#include <krb5.h>],
+[krb5_address kaddr; kaddr.addrtype = ADDRTYPE_INET;],
+samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS=yes,samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS=no)])
+if test x"$samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS" = x"yes"; then
+ AC_DEFINE(HAVE_ADDRTYPE_IN_KRB5_ADDRESS,1,[Whether the krb5_address struct has a addrtype property])
+fi
+
+AC_CACHE_CHECK([for addr_type in krb5_address],samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS,[
+AC_TRY_COMPILE([#include <krb5.h>],
+[krb5_address kaddr; kaddr.addr_type = KRB5_ADDRESS_INET;],
+samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS=yes,samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS=no)])
+if test x"$samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS" = x"yes"; then
+ AC_DEFINE(HAVE_ADDR_TYPE_IN_KRB5_ADDRESS,1,[Whether the krb5_address struct has a addr_type property])
+fi
+
+AC_CACHE_CHECK([for enc_part2 in krb5_ticket],samba_cv_HAVE_KRB5_TKT_ENC_PART2,[
+AC_TRY_COMPILE([#include <krb5.h>],
+[krb5_ticket tkt; tkt.enc_part2->authorization_data[0]->contents = NULL;],
+samba_cv_HAVE_KRB5_TKT_ENC_PART2=yes,samba_cv_HAVE_KRB5_TKT_ENC_PART2=no)])
+if test x"$samba_cv_HAVE_KRB5_TKT_ENC_PART2" = x"yes"; then
+ AC_DEFINE(HAVE_KRB5_TKT_ENC_PART2,1,[Whether the krb5_ticket struct has a enc_part2 property])
+fi
+
+AC_CACHE_CHECK([for keyvalue in krb5_keyblock],samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE,[
+AC_TRY_COMPILE([#include <krb5.h>],
+[krb5_keyblock key; key.keyvalue.data = NULL;],
+samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE=yes,samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE=no)])
+if test x"$samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE" = x"yes"; then
+ AC_DEFINE(HAVE_KRB5_KEYBLOCK_KEYVALUE,1,[Whether the krb5_keyblock struct has a keyvalue property])
+fi
+
+AC_CACHE_CHECK([for ENCTYPE_ARCFOUR_HMAC_MD5],samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,[
+AC_TRY_COMPILE([#include <krb5.h>],
+[krb5_enctype enctype; enctype = ENCTYPE_ARCFOUR_HMAC_MD5;],
+samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5=yes,samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5=no)])
+if test x"$samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5" = x"yes"; then
+ AC_DEFINE(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,1,[Whether the ENCTYPE_ARCFOUR_HMAC_MD5 key type is available])
+fi
+
+ ########################################################
+ # now see if we can find the krb5 libs in standard paths
+ # or as specified above
+ AC_CHECK_LIB(krb5, krb5_mk_req_extended, [LIBS="$LIBS -lkrb5";
+ AC_DEFINE(HAVE_KRB5,1,[Whether KRB5 is available])])
+
+ ########################################################
+ # now see if we can find the gssapi libs in standard paths
+ AC_CHECK_LIB(gssapi_krb5, gss_display_status, [LIBS="$LIBS -lgssapi_krb5";
+ AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available])])
+
+fi
+
+########################################################
+# Compile with LDAP support?
+
+with_ldap_support=yes
+AC_MSG_CHECKING([whether to use LDAP])
+
+AC_ARG_WITH(ldap,
+[ --with-ldap LDAP support (default yes)],
+[ case "$withval" in
+ no)
+ with_ldap_support=no
+ ;;
+ esac ])
+
+AC_MSG_RESULT($with_ldap_support)
+
+if test x"$with_ldap_support" = x"yes"; then
+
+ ##################################################################
+ # we might need the lber lib on some systems. To avoid link errors
+ # this test must be before the libldap test
+ AC_CHECK_LIB(lber, ber_scanf, [LIBS="$LIBS -llber"])
+
+ ########################################################
+ # now see if we can find the ldap libs in standard paths
+ if test x$have_ldap != xyes; then
+ AC_CHECK_LIB(ldap, ldap_domain2hostlist, [LIBS="$LIBS -lldap";
+ AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available])])
+
+ ########################################################
+ # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
+ # Check found in pam_ldap 145.
+ AC_CHECK_FUNCS(ldap_set_rebind_proc)
+ AC_CACHE_CHECK(whether ldap_set_rebind_proc takes 3 arguments, pam_ldap_cv_ldap_set_rebind_proc, [
+ AC_TRY_COMPILE([
+ #include <lber.h>
+ #include <ldap.h>], [ldap_set_rebind_proc(0, 0, 0);], [pam_ldap_cv_ldap_set_rebind_proc=3], [pam_ldap_cv_ldap_set_rebind_proc=2]) ])
+ AC_DEFINE_UNQUOTED(LDAP_SET_REBIND_PROC_ARGS, $pam_ldap_cv_ldap_set_rebind_proc, [Number of arguments to ldap_set_rebind_proc])
+ fi
+fi
+
+ check for a PAM clear-text auth, accounts, password and session support
+with_pam_for_crypt=no
+AC_MSG_CHECKING(whether to use PAM)
+AC_ARG_WITH(pam,
+[ --with-pam Include PAM support (default=no)],
+[ case "$withval" in
+ yes)
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(WITH_PAM,1,[Whether to include PAM support])
+ AUTHLIBS="$AUTHLIBS -lpam"
+ with_pam_for_crypt=yes
+ ;;
+ *)
+ AC_MSG_RESULT(no)
+ ;;
+ esac ],
+ AC_MSG_RESULT(no)
+)
diff --git a/source4/nsswitch/config.m4 b/source4/nsswitch/config.m4
new file mode 100644
index 0000000000..2d5efe0eb6
--- /dev/null
+++ b/source4/nsswitch/config.m4
@@ -0,0 +1,105 @@
+#################################################
+# Check whether winbind is supported on this platform. If so we need to
+# build and install client programs, sbin programs and shared libraries
+
+AC_MSG_CHECKING(whether to build winbind)
+
+# Initially, the value of $host_os decides whether winbind is supported
+
+case "$host_os" in
+ *linux*|*irix*)
+ HAVE_WINBIND=yes
+ ;;
+ *solaris*)
+ HAVE_WINBIND=yes
+ WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
+ WINBIND_NSS_EXTRA_LIBS="-lsocket"
+ ;;
+ *hpux11*)
+ HAVE_WINBIND=yes
+ WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
+ ;;
+ *)
+ HAVE_WINBIND=no
+ winbind_no_reason=", unsupported on $host_os"
+ ;;
+esac
+
+AC_SUBST(WINBIND_NSS_EXTRA_OBJS)
+AC_SUBST(WINBIND_NSS_EXTRA_LIBS)
+
+# Check the setting of --with-winbindd
+
+AC_ARG_WITH(winbind,
+[ --with-winbind Build winbind (default, if supported by OS)],
+[
+ case "$withval" in
+ yes)
+ HAVE_WINBIND=yes
+ ;;
+ no)
+ HAVE_WINBIND=no
+ winbind_reason=""
+ ;;
+ esac ],
+)
+
+# We need unix domain sockets for winbind
+if test x"$HAVE_WINBIND" = x"yes"; then
+ if test x"$samba_cv_unixsocket" = x"no"; then
+ winbind_no_reason=", no unix domain socket support on $host_os"
+ HAVE_WINBIND=no
+ fi
+fi
+
+# Display test results
+
+if test x"$HAVE_WINBIND" = x"yes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(WITH_WINBIND,1,[Whether to build winbind])
+
+ EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
+ EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd\$(EXEEXT)"
+ if test x"$BLDSHARED" = x"true"; then
+ case "$host_os" in
+ *irix*)
+ SHLIB_PROGS="$SHLIB_PROGS nsswitch/libns_winbind.so"
+ ;;
+ *)
+ SHLIB_PROGS="$SHLIB_PROGS nsswitch/libnss_winbind.so"
+ ;;
+ esac
+ if test x"$with_pam" = x"yes"; then
+ SHLIB_PROGS="$SHLIB_PROGS nsswitch/pam_winbind.so"
+ fi
+ fi
+else
+ AC_MSG_RESULT(no$winbind_no_reason)
+fi
+
+# Solaris has some extra fields in struct passwd that need to be
+# initialised otherwise nscd crashes. Unfortunately autoconf < 2.50
+# doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
+# this.
+
+#AC_CHECK_MEMBER(struct passwd.pw_comment,
+# AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
+# [#include <pwd.h>])
+
+AC_CACHE_CHECK([whether struct passwd has pw_comment],samba_cv_passwd_pw_comment, [
+ AC_TRY_COMPILE([#include <pwd.h>],[struct passwd p; p.pw_comment;],
+ samba_cv_passwd_pw_comment=yes,samba_cv_passwd_pw_comment=no)])
+if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
+ AC_DEFINE(HAVE_PASSWD_PW_COMMENT,1,[Whether struct passwd has pw_comment])
+fi
+
+#AC_CHECK_MEMBER(struct passwd.pw_age,
+# AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
+# [#include <pwd.h>])
+
+AC_CACHE_CHECK([whether struct passwd has pw_age],samba_cv_passwd_pw_age, [
+ AC_TRY_COMPILE([#include <pwd.h>],[struct passwd p; p.pw_age;],
+ samba_cv_passwd_pw_age=yes,samba_cv_passwd_pw_age=no)])
+if test x"$samba_cv_passwd_pw_age" = x"yes"; then
+ AC_DEFINE(HAVE_PASSWD_PW_AGE,1,[Whether struct passwd has pw_age])
+fi
diff --git a/source4/ntvfs/config.m4 b/source4/ntvfs/config.m4
new file mode 100644
index 0000000000..22ab6dadfa
--- /dev/null
+++ b/source4/ntvfs/config.m4
@@ -0,0 +1,18 @@
+default_static_modules="$default_static_modules ntvfs_ipc ntvfs_simple ntvfs_print ntvfs_cifs"
+
+SMB_MODULE(ntvfs_cifs, \$(NTVFS_CIFS_OBJ), "bin/cifs.$SHLIBEXT$", NTVFS)
+SMB_MODULE(ntvfs_simple, \$(NTVFS_SIMPLE_OBJ), "bin/ntvfs_simple.$SHLIBEXT$", NTVFS)
+SMB_MODULE(ntvfs_print, \$(NTVFS_PRINT_OBJ), "bin/ntvfs_print.$SHLIBEXT$", NTVFS)
+SMB_MODULE(ntvfs_ipc, \$(NTVFS_IPC_OBJ), "bin/ntvfs_ipc.$SHLIBEXT$", NTVFS)
+SMB_MODULE(ntvfs_posix, \$(NTVFS_POSIX_OBJ), "bin/ntvfs_posix.$SHLIBEXT$", NTVFS)
+
+# Tank FS
+SMB_MODULE(ntvfs_csm, \$(NTVFS_CSM_OBJ), "bin/ntvfs_csm.$SHLIBEXT$", NTVFS)
+STFS_ENABLED="#"
+if test "$MODULE_ntvfs_csm"; then
+ SMBD_EXTRA_LIBS="$SMBD_EXTRA_LIBS \$\(STFS_LIBS\)"
+ STFS_ENABLED=
+fi
+AC_SUBST(STFS_ENABLED)
+
+SMB_SUBSYSTEM(NTVFS,ntvfs/ntvfs_base.o)
diff --git a/source4/passdb/config.m4 b/source4/passdb/config.m4
new file mode 100644
index 0000000000..b06aa7d5cf
--- /dev/null
+++ b/source4/passdb/config.m4
@@ -0,0 +1,11 @@
+########################################################
+# Compile with MySQL support?
+AM_PATH_MYSQL([0.11.0],[MODULE_MYSQL=bin/mysql.so],[MODULE_MYSQL=])
+CFLAGS="$CFLAGS $MYSQL_CFLAGS"
+AC_SUBST(MODULE_MYSQL)
+
+########################################################
+# Compile with XML support?
+AM_PATH_XML2([2.0.0],[MODULE_XML=bin/xml.so],[MODULE_XML=])
+CFLAGS="$CFLAGS $XML_CFLAGS"
+AC_SUBST(MODULE_XML)
diff --git a/source4/popt/config.m4 b/source4/popt/config.m4
new file mode 100644
index 0000000000..7532c5826e
--- /dev/null
+++ b/source4/popt/config.m4
@@ -0,0 +1,31 @@
+#################################################
+# Check to see if we should use the included popt
+
+AC_ARG_WITH(included-popt,
+[ --with-included-popt use bundled popt library, not from system],
+[
+ case "$withval" in
+ yes)
+ INCLUDED_POPT=yes
+ ;;
+ no)
+ INCLUDED_POPT=no
+ ;;
+ esac ],
+)
+if test x"$INCLUDED_POPT" != x"yes"; then
+ AC_CHECK_LIB(popt, poptGetContext,
+ INCLUDED_POPT=no, INCLUDED_POPT=yes)
+fi
+
+AC_MSG_CHECKING(whether to use included popt)
+if test x"$INCLUDED_POPT" = x"yes"; then
+ AC_MSG_RESULT(yes)
+ BUILD_POPT='$(POPT_OBJS)'
+ FLAGS1="-I$srcdir/popt"
+else
+ AC_MSG_RESULT(no)
+ LIBS="$LIBS -lpopt"
+fi
+AC_SUBST(BUILD_POPT)
+AC_SUBST(FLAGS1)
diff --git a/source4/printing/config.m4 b/source4/printing/config.m4
new file mode 100644
index 0000000000..ad5e4844e5
--- /dev/null
+++ b/source4/printing/config.m4
@@ -0,0 +1,16 @@
+############################################
+# for cups support we need libcups, and a handful of header files
+
+AC_ARG_ENABLE(cups,
+[ --enable-cups Turn on CUPS support (default=auto)])
+
+if test x$enable_cups != xno; then
+ AC_PATH_PROG(CUPS_CONFIG, cups-config)
+
+ if test "x$CUPS_CONFIG" != x; then
+ AC_DEFINE(HAVE_CUPS,1,[Whether we have CUPS])
+ CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
+ LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
+ PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
+ fi
+fi
diff --git a/source4/python/config.m4 b/source4/python/config.m4
new file mode 100644
index 0000000000..6892b4d604
--- /dev/null
+++ b/source4/python/config.m4
@@ -0,0 +1,27 @@
+#################################################
+# Check if the user wants Python
+
+# At the moment, you can use this to set which Python binary to link
+# against. (Libraries built for Python2.2 can't be used by 2.1,
+# though they can coexist in different directories.) In the future
+# this might make the Python stuff be built by default.
+
+# Defaulting python breaks the clean target if python isn't installed
+
+PYTHON=
+
+AC_ARG_WITH(python,
+[ --with-python=PYTHONNAME build Python libraries],
+[ case "${withval-python}" in
+ yes)
+ PYTHON=python
+ EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS python_ext"
+ ;;
+ no)
+ PYTHON=
+ ;;
+ *)
+ PYTHON=${withval-python}
+ ;;
+ esac ])
+AC_SUBST(PYTHON)
diff --git a/source4/web/config.m4 b/source4/web/config.m4
new file mode 100644
index 0000000000..f8bb33759d
--- /dev/null
+++ b/source4/web/config.m4
@@ -0,0 +1,17 @@
+#################################################
+# set SWAT directory location
+AC_ARG_WITH(swatdir,
+[ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ AC_MSG_WARN([--with-swatdir called without argument - will use default])
+ ;;
+ * )
+ swatdir="$withval"
+ ;;
+ esac])
+
+AC_SUBST(swatdir)