FreeBSD5 ACL fix.
[kai/samba.git] / source3 / configure.in
index ce53358d09b80d9914b333af1e0bbdc6ab1d36cf..58eb2339b32f35216cf789f60200f05d13f6fc47 100644 (file)
@@ -1,4 +1,3 @@
-dnl -*- mode: m4-mode -*-
 dnl Process this file with autoconf to produce a configure script.
 
 dnl We must use autotools 2.53 or above
@@ -247,13 +246,14 @@ 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"
 
+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.
@@ -996,7 +996,7 @@ if test "$enable_shared" = "yes"; then
                        ;;
                *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix])
                        BLDSHARED="true"
-                       LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
+                       LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry,-berok"
                        DYNEXP="-Wl,-brtl,-bexpall"
                        PICFLAG="-O2"
                        if test "${GCC}" != "yes"; then
@@ -2079,15 +2079,15 @@ ac_save_CFLAGS="$CFLAGS"
 ac_save_LIBS="$LIBS"
 CFLAGS=""
 LIBS=""
-       
+
   #################################################
   # 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`"
+    CFLAGS="$CFLAGS `$KRB5_CONFIG --cflags | sed s/@INCLUDE_des@//`" 
+    CPPFLAGS="$CPPFLAGS `$KRB5_CONFIG --cflags | sed s/@INCLUDE_des@//`"
     FOUND_KRB5=yes
     AC_MSG_RESULT(yes)
   else
@@ -2433,24 +2433,6 @@ if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
 fi
 fi
 
-# New experimental SAM system
-
-AC_MSG_CHECKING([whether to build the new (experimental) SAM database])
-AC_ARG_WITH(sam,
-[  --with-sam              Build new (experimental) SAM database (default=no)],
-[ case "$withval" in
-  yes)
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(WITH_SAM,1,[Whether to build the new (experimental) SAM database])
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-  esac ],
-  AC_MSG_RESULT(no)
-)
-
-
 ########################################################################################
 ##
 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
@@ -2950,6 +2932,11 @@ AC_ARG_WITH(acl-support,
                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,[
@@ -3229,7 +3216,7 @@ HAVE_WINBIND=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
@@ -3238,7 +3225,7 @@ 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
@@ -3253,6 +3240,7 @@ case "$host_os" in
        *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
@@ -3299,14 +3287,8 @@ if test x"$HAVE_WINBIND" = x"yes"; then
        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
@@ -3443,9 +3425,9 @@ AC_ARG_WITH(shared-modules,
        done
 fi ])
 
-SMB_MODULE(pdb_xml, modules/xml.o, "bin/xml.$SHLIBEXT", PDB,
+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_ldap, passdb/pdb_ldap.o, "bin/ldapsam.$SHLIBEXT", PDB, 
                   [ PASSDBLIBS="$PASSDBLIBS $LDAP_LIBS" ] )
@@ -3467,7 +3449,7 @@ SMB_MODULE(rpc_samr, \$(RPC_SAMR_OBJ), "bin/librpc_samr.$SHLIBEXT", RPC)
 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)