-dnl -*- mode: m4-mode -*-
dnl Process this file with autoconf to produce a configure script.
dnl We must use autotools 2.53 or above
dnl Add modules that have to be built by default here
dnl These have to be built static:
-default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_unix rpc_lsa rpc_samr rpc_reg rpc_wks rpc_net rpc_dfs rpc_srv rpc_spoolss auth_rhosts auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin idmap_winbind"
+default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsa rpc_samr rpc_reg rpc_wks rpc_net rpc_dfs rpc_srv rpc_spoolss auth_rhosts auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin idmap_winbind"
+
+dnl These are preferably build shared, and static if dlopen() is not available
+default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_fake_perms vfs_netatalk"
if test "x$enable_developer" = xyes; then
default_static_modules="$default_static_modules rpc_echo"
+ default_shared_modules="$default_shared_modules charset_weird"
fi
-dnl These are preferably build shared, and static if dlopen() is not available
-default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_fake_perms vfs_netatalk"
-
#
# Config CPPFLAG settings for strange OS's that must be set
# before other tests.
# test for where we get readline() from
AC_MSG_CHECKING(whether to use readline)
AC_ARG_WITH(readline,
-[ --with-readline[=DIR] Look for readline include/libs in DIR (default=auto) ],
+[ --with-readline[=DIR] Look for readline include/libs in DIR (default=auto) ],
[ case "$with_readline" in
yes)
AC_MSG_RESULT(yes)
AC_MSG_CHECKING([whether to use Active Directory])
AC_ARG_WITH(ads,
-[ --with-ads Active Directory support (default yes)],
+[ --with-ads Active Directory support (default yes)],
[ case "$withval" in
no)
with_ads_support=no
AC_MSG_CHECKING([whether to use LDAP])
AC_ARG_WITH(ldap,
-[ --with-ldap LDAP support (default yes)],
+[ --with-ldap LDAP support (default yes)],
[ case "$withval" in
no)
with_ldap_support=no
fi
########################################################
-# Compile with MySQL support?
-AM_PATH_MYSQL([0.11.0],[default_shared_modules="$default_shared_modules pdb_mysql"],[])
-CFLAGS="$CFLAGS $MYSQL_CFLAGS"
-
-########################################################
-# Compile with XML support?
-AM_PATH_XML2([2.0.0],[default_shared_modules="$default_shared_modules pdb_xml"],[])
-CFLAGS="$CFLAGS $XML_CFLAGS"
+# Compile experimental passdb backends?
+# (pdb_xml, pdb_mysql)
+AC_MSG_CHECKING(whether to build experimental passdb libraries)
+AC_ARG_WITH(expsam,
+[ --with-expsam=<list> Include experimental passdb libraries (default=no)]
+[ Valid choices include (comma separated list): ]
+[ xml, mysql, & nisplussam ],
+[ expsam_pdb_modules=`echo "$withval" | sed 's/,/ /g'`
+ if test "z$expsam_pdb_modules" = "zyes"; then
+ expsam_pdb_modules="xml mysql nisplussam"
+ fi
+ AC_MSG_RESULT($expsam_pdb_modules)
+ for i in $expsam_pdb_modules
+ do
+ case "$i" in
+ xml)
+ ## pdb_xml
+ AM_PATH_XML2([2.0.0],[default_shared_modules="$default_shared_modules pdb_xml"],[])
+ CFLAGS="$CFLAGS $XML_CFLAGS"
+ ;;
+ mysql)
+ ## pdb_mysql
+ AM_PATH_MYSQL([0.11.0],[default_shared_modules="$default_shared_modules pdb_mysql"],[])
+ CFLAGS="$CFLAGS $MYSQL_CFLAGS"
+ ;;
+ nisplussam)
+ ## pdb_nisplussam
+ MODULE_pdb_nisplussam=SHARED
+ ;;
+ *)
+ echo "Unknown module name \"$i\"! Exiting..."
+ exit 1
+ ;;
+ esac
+ done ],
+ AC_MSG_RESULT(no)
+)
#################################################
# check for automount support
# check for pam_smbpass support
AC_MSG_CHECKING(whether to use pam_smbpass)
AC_ARG_WITH(pam_smbpass,
-[ --with-pam_smbpass Build a PAM module to allow other applications to use our smbpasswd file (default=no)],
+[ --with-pam_smbpass Build PAM module for authenticating against passdb backends (default=no)],
[ case "$withval" in
yes)
AC_MSG_RESULT(yes)
# check for a LDAP password database configuration backwards compatibility
AC_MSG_CHECKING(whether to use LDAP SAM 2.2 compatible configuration)
AC_ARG_WITH(ldapsam,
-[ --with-ldapsam Include LDAP SAM 2.2 compatible configuration (default=no)],
+[ --with-ldapsam Include LDAP SAM 2.2 compatible configuration (default=no)],
[ case "$withval" in
yes)
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(whether to use IDMAP only for [ug]id mapping)
AC_ARG_WITH(idmap,
-[ --with-idmap Include experimental IDMAP support (default=yes)],
+[ --with-idmap Include experimental IDMAP support (default=yes)],
[ case "$withval" in
yes)
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_TRU64_ACLS,1,[Whether Tru64 ACLs are available])
ACLLIBS="$ACLLIBS -lpacl"
;;
+ *freebsd5*)
+ AC_MSG_RESULT(Using FreeBSD posix ACLs)
+ AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether FreeBSD POSIX ACLs are available])
+ AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
+ ;;
*)
AC_CHECK_LIB(acl,acl_get_file,[ACLLIBS="$ACLLIBS -lacl"])
AC_CACHE_CHECK([for ACL support],samba_cv_HAVE_POSIX_ACLS,[
with_sendfile_support=yes
AC_MSG_CHECKING(whether to check to support sendfile)
AC_ARG_WITH(sendfile-support,
-[ --with-sendfile-support Check for sendfile support (default=yes)],
+[ --with-sendfile-support Check for sendfile support (default=yes)],
[ case "$withval" in
yes)
# Define the winbind shared library name and any specific linker flags
# it needs to be built with.
-WINBIND_NSS=libnss_winbind
+WINBIND_NSS=libnss_winbind.$SHLIBEXT
WINBIND_NSS_LDSHFLAGS=$LDSHFLAGS
case "$host_os" in
;;
*irix*)
WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_irix.o"
- WINBIND_NSS="libns_winbind"
+ WINBIND_NSS="libns_winbind.$SHLIBEXT"
;;
*solaris*)
# Solaris winbind client is implemented as a wrapper around
*aix*)
WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_aix.o"
WINBIND_NSS_LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-ewb_aix_init"
+ WINBIND_NSS="WINBIND"
;;
*)
HAVE_WINBIND=no
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.$SHLIBEXT"
- ;;
- *)
- SHLIB_PROGS="$SHLIB_PROGS nsswitch/libnss_winbind.$SHLIBEXT"
- ;;
- esac
+ SHLIB_PROGS="$SHLIB_PROGS nsswitch/$WINBIND_NSS"
+
if test x"$with_pam" = x"yes"; then
SHLIB_PROGS="$SHLIB_PROGS nsswitch/pam_winbind.$SHLIBEXT"
fi
done
fi ])
-SMB_MODULE(pdb_xml, modules/xml.o, "bin/xml.$SHLIBEXT", PDB,
+###########################################################################
+## contributed pdb_modules
+
+SMB_MODULE(pdb_xml, passdb/pdb_xml.o, "bin/xml.$SHLIBEXT", PDB,
[ PASSDBLIBS="$PASSDBLIBS $XML_LIBS" ] )
-SMB_MODULE(pdb_mysql, modules/mysql.o, "bin/mysql.$SHLIBEXT", PDB,
+SMB_MODULE(pdb_mysql, passdb/pdb_mysql.o, "bin/mysql.$SHLIBEXT", PDB,
[ PASSDBLIBS="$PASSDBLIBS $MYSQL_LIBS" ] )
+SMB_MODULE(pdb_nisplussam, passdb/pdb_nisplus.o, "bin/nisplussam.$SHLIBEXT", PDB)
+
+## end of contributed pdb_modules
+###########################################################################
+
SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o, "bin/ldapsam.$SHLIBEXT", PDB,
[ PASSDBLIBS="$PASSDBLIBS $LDAP_LIBS" ] )
SMB_MODULE(pdb_smbpasswd, passdb/pdb_smbpasswd.o, "bin/smbpasswd.$SHLIBEXT", PDB)
SMB_MODULE(rpc_echo, \$(RPC_ECHO_OBJ), "bin/librpc_echo.$SHLIBEXT", RPC)
SMB_SUBSYSTEM(RPC)
-SMB_MODULE(charset_weird, modules/developer.o, "bin/developer.$SHLIBEXT", CHARSET)
+SMB_MODULE(charset_weird, modules/developer.o, "bin/weird.$SHLIBEXT", CHARSET)
SMB_SUBSYSTEM(CHARSET)
SMB_MODULE(auth_rhosts, \$(AUTH_RHOSTS_OBJ), "bin/rhosts.$SHLIBEXT", AUTH)