]> arthur.barton.de Git - netatalk.git/commitdiff
configure cleanup, some sync with HEAD, autoenable PAM, shadow and srvloc if found...
authorbfernhomberg <bfernhomberg>
Wed, 29 Oct 2003 23:53:23 +0000 (23:53 +0000)
committerbfernhomberg <bfernhomberg>
Wed, 29 Oct 2003 23:53:23 +0000 (23:53 +0000)
17 files changed:
configure.in
etc/uams/Makefile.am
etc/uams/uams_dhx_passwd.c
etc/uams/uams_passwd.c
macros/Makefile.am
macros/afs-check.m4
macros/cnid-backend.m4 [new file with mode: 0644]
macros/config-checks.m4
macros/db3-check.m4
macros/gssapi-check.m4
macros/iconv.m4
macros/largefile-check.m4
macros/pam-check.m4
macros/srvloc.m4
macros/ssl-check.m4
macros/summary.m4 [new file with mode: 0644]
macros/tcp-wrappers.m4

index 0c5950289772a4581adefa8b6dad703cc6e2daff..3df8d968201d38380cdd654c904bfe94ad68a301 100644 (file)
@@ -1,7 +1,7 @@
-dnl $Id: configure.in,v 1.179.2.3.2.8 2003-10-26 10:33:37 didg Exp $
+dnl $Id: configure.in,v 1.179.2.3.2.9 2003-10-29 23:53:23 bfernhomberg Exp $
 dnl configure.in for netatalk
 
-AC_INIT(bin/adv1tov2/adv1tov2.c)
+AC_INIT(etc/afpd/main.c)
 
 NETATALK_VERSION=`cat $srcdir/VERSION`
 AC_SUBST(NETATALK_VERSION)
@@ -70,7 +70,6 @@ dnl AC_CHECK_LIB(sys, main)
 dnl Replace `main' with a function in -lubik:
 dnl AC_CHECK_LIB(ubik, main)
 
-AC_MSG_RESULT([    LIBS = $LIBS])
 
 #
 # Check presence of some functions
@@ -86,7 +85,7 @@ dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h limits.h stdint.h strings.h sys/fcntl.h sys/file.h sys/ioctl.h sys/time.h sys/mnttab.h sys/statvfs.h sys/stat.h sys/vfs.h mntent.h syslog.h unistd.h termios.h sys/termios.h netdb.h sgtty.h ufs/quota.h mount.h sys/mount.h statfs.h sys/types.h dlfcn.h errno.h sys/errno.h sys/uio.h)
+AC_CHECK_HEADERS(fcntl.h limits.h stdint.h strings.h time.h sys/fcntl.h sys/file.h sys/ioctl.h sys/time.h sys/mnttab.h sys/statvfs.h sys/stat.h sys/vfs.h mntent.h syslog.h unistd.h termios.h sys/termios.h netdb.h sgtty.h ufs/quota.h mount.h sys/mount.h statfs.h sys/types.h dlfcn.h errno.h sys/errno.h sys/uio.h)
 AC_CHECK_HEADER(sys/cdefs.h,,
        AC_MSG_RESULT([enabling generic cdefs.h from tree])
        CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
@@ -119,11 +118,11 @@ AC_FUNC_SETPGRP
 AC_CHECK_FUNCS(backtrace_symbols)
 AC_CHECK_FUNCS(setlocale nl_langinfo)
 AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
+AC_CACHE_SAVE
 
 
 dnl Checks for (v)snprintf
 NETATALK_SNPRINTF_CHECK
-AC_MSG_RESULT([    LIBS = $LIBS])
 
 dnl --------------------------------------------------------------------------
 dnl specific configuration comes in here:
@@ -131,102 +130,159 @@ dnl --------------------------------------------------------------------------
 
 AC_DEFINE(ADMIN_GRP, 1, [Define if the admin group should be enabled])
 
+netatalk_cv_admin_group=yes
+AC_MSG_CHECKING([for administrative group support])
 AC_ARG_WITH(admin-group,
-       [  --disable-admin-group   disable admin group],
+       [  --disable-admin-group   disable admin group],[
         if test "$enableval" = "no"; then
                AC_DEFINE(ADMIN_GRP, 0, [Define if the admin group should be enabled])
-               AC_MSG_RESULT([disabling administrative group support])
-        fi
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               netatalk_cv_admin_group=no
+        fi],[
+               AC_MSG_RESULT([yes])
+       ]
 )
 
 NETATALK_AFS_CHECK
 
 NETATALK_CONFIG_DIRS
 
+AC_MSG_CHECKING([for logfile path])
 AC_ARG_WITH(logfile,
        [  --with-logfile=PATH     path for file used by logger [/var/log/netatalk.log]
-                          use --without-logfile to disable logger],
-        if test "$withval" = "no"; then
+                          use --without-logfile to disable logger],[
+        if test x"$withval" = x"no"; then
                AC_DEFINE(DISABLE_LOGGER, 1, [Define if the logger should not be used])
-               AC_MSG_RESULT([logger disabled])
+               AC_MSG_RESULT([syslog])
        elif test "$withval" != "yes"; then
                AC_DEFINE_UNQUOTED(LOGFILEPATH, "$withval", [Path to the log file])
-               AC_MSG_RESULT([logfile set to $withval])
+               AC_MSG_RESULT([$withval])
        else
                 AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log", [Path to the log file])
-                AC_MSG_RESULT([logfile set to default]) 
-       fi,
+                AC_MSG_RESULT([/var/log/netatalk.log]) 
+       fi],[
                AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log", [Path to the log file])
-               AC_MSG_RESULT([logfile set to default])
+               AC_MSG_RESULT([/var/log/netatalk.log])
+       ]
 )
 
+
+netatalk_cv_with_cracklib=no
+AC_MSG_CHECKING([for cracklib support])
 AC_ARG_WITH(cracklib,
-       [  --with-cracklib=DICT    enable/set location of cracklib dictionary],
+       [  --with-cracklib=DICT    enable/set location of cracklib dictionary],[
        if test "x$withval" != "xno" ; then
                cracklib="$withval"
-               AC_CHECK_LIB(crack, main,
+               AC_CHECK_LIB(crack, main, [
                        AC_DEFINE(USE_CRACKLIB, 1, [Define if cracklib should be used])
                        LIBS="$LIBS -lcrack"
-                       AC_MSG_RESULT([enabling cracklib support])
+                       AC_MSG_RESULT([yes])
                        if test "$cracklib" = "yes"; then
                                cracklib="/usr/lib/cracklib_dict"
                        fi
                        AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
                                [path to cracklib dictionary])
-                       AC_MSG_RESULT([setting cracklib dictionary to $cracklib]),
+                       AC_MSG_RESULT([setting cracklib dictionary to $cracklib])
+                       netatalk_cv_with_cracklib=yes
+                       ],[
                        AC_MSG_ERROR([cracklib not found!])
+                       ]
                )
+       else
+               AC_MSG_RESULT([no])
        fi
+       ],[
+               AC_MSG_RESULT([no])
+       ]
 )
 
+netatalk_cv_ddp_enabled=yes
+AC_MSG_CHECKING([whether to enable DDP])
 AC_ARG_ENABLE(ddp,
-       [  --disable-ddp           disable DDP],
+       [  --disable-ddp           disable DDP],[
        if test "$enableval" = "no"; then 
                AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
-               AC_MSG_RESULT([disabling DDP])
+               AC_MSG_RESULT([no])
+               netatalk_cv_ddp_enabled=no
+       else
+               AC_MSG_RESULT([yes])
        fi
+       ],[
+               AC_MSG_RESULT([yes])
+       ]
 )
 
+AC_MSG_CHECKING([whether to enable debug code])
 AC_ARG_ENABLE(debug1,
-       [  --enable-debug1          enable debug code],
+       [  --enable-debug1         enable debug code],[
        if test "$enableval" != "no"; then
                if test "$enableval" = "yes"; then
                        AC_DEFINE(DEBUG1, 1, [Define if debugging information should be included])
                else
                        AC_DEFINE_UNQUOTED(DEBUG1, $enableval, [Define if debugging information should be included])
                fi 
-               AC_MSG_RESULT([enabling debugging code])
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
        fi
+       ],[
+               AC_MSG_RESULT([no])
+       ]
 )
 
+AC_MSG_CHECKING([whether to enable verbose debug code])
 AC_ARG_ENABLE(debug,
-       [  --enable-debug          enable verbose debug code],
+       [  --enable-debug          enable verbose debug code],[
        if test "$enableval" != "no"; then
                if test "$enableval" = "yes"; then
                        AC_DEFINE(DEBUG, 1, [Define if verbose debugging information should be included])
                else
                        AC_DEFINE_UNQUOTED(DEBUG, $enableval, [Define if verbose debugging information should be included])
                fi 
-               AC_MSG_RESULT([enabling verbose debugging code])
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
        fi
+       ],[
+               AC_MSG_RESULT([no])
+       ]
 )
 
 afp3=no
+afp3set=no
+AC_MSG_CHECKING([whether AFP 3.x calls should be enabled])
 AC_ARG_ENABLE(afp3,
-       [  --enable-afp3           enable AFP 3.x calls],
-       if test "$enableval" = "yes"; then
+       [  --disable-afp3          disable AFP 3.x calls],
+       [
+           if test x"$enableval" != x"no"; then
+               afp3set=yes
                afp3=yes
-               AC_DEFINE(AFP3x, 1, [Define to enable AFP 3.x support])
-               AC_MSG_RESULT([enabling AFP 3.x calls])
-       fi
+               AC_MSG_RESULT([yes])
+           else
+               AC_MSG_RESULT([no])
+           fi
+       ],[
+           AC_MSG_RESULT([yes])
+           afp3=yes
+       ]
 )
 
-if test "$afp3" = "yes"; then
-       AM_ICONV
-        AC_SYS_LARGEFILE
+if test x"$afp3" = x"yes"; then
+        AC_SYS_LARGEFILE([
+               AC_DEFINE(AFP3x, 1, [Define to enable AFP 3.x support])
+       ],[
+               if test x"$afp3set" == x"yes"; then
+                       AC_MSG_ERROR([AFP 3.x support requires Large File Support.])
+               else
+                       AC_MSG_WARN([AFP 3.x support requires Large File Support. AFP3.x support disabled])
+                       afp3=no
+               fi
+       ])
 fi
-NETATALK_GSSAPI_CHECK
 
+AM_ICONV
 
 dnl ----------- A NOTE ABOUT DROPKLUDGE
 dnl The trouble with this fix is that if you know what the file is called, it
@@ -235,251 +291,53 @@ dnl since the students don't have telnet access to the Mac servers.  There is
 dnl currently no one working on further development/fixes of DROPKLUDGE.
 dnl -----------
 
+netatalk_cv_dropkludge=no
+AC_MSG_CHECKING([whether to enable experimental dropbox support])
 AC_ARG_ENABLE(dropkludge,
-       [  --enable-dropkludge     enable the experimental dropbox fix (INSECURE!) ],
+       [  --enable-dropkludge     enable the experimental dropbox fix (INSECURE!) ],[
        if test "$enableval" = "yes"; then 
                AC_DEFINE(DROPKLUDGE, 1, [Define if you want to use the experimental dropkludge support])
-               AC_MSG_RESULT([enabling experimental dropbox support])
+               AC_MSG_RESULT([yes])
+               netatalk_cv_dropkludge=yes
+       else
+               AC_MSG_RESULT([no])
        fi
+       ],[
+               AC_MSG_RESULT([no])
+       ]
 )
 
+netatalk_cv_force_uidgid=no
+AC_MSG_CHECKING([whether to enable forcing of uid/gid per volume])
 AC_ARG_ENABLE(force-uidgid,
-       [  --enable-force-uidgid   allow forcing of uid/gid per volume (BROKEN) ],
+       [  --enable-force-uidgid   allow forcing of uid/gid per volume (BROKEN) ],[
        if test "$enableval" = "yes"; then
                AC_DEFINE(FORCE_UIDGID, 1, [Define if you want forcing of uid/gid per volume])
                AC_MSG_RESULT([enabling forcing of uid/gid per volume])
-       fi
-)
-
-dnl Don't use BDB unless it's needed
-bdb_required=no
-compiled_backends=""
-
-dnl Determine whether or not to use DB3 Concurrent Data Store
-AC_MSG_CHECKING([whether or not to use DB3 Concurrent Data Store])
-AC_ARG_WITH(cnid-cdb-backend,
-       [  --with-cnid-cdb-backend      enable CNID with Concurrent DB3 Data Store],
-       if test x"$withval" = x"no"; then
-           use_cdb_backend=no
-       else
-           use_cdb_backend=yes
-           compiled_backends="$compiled_backends cdb"
-       fi
-       ,use_cdb_backend=yes
-)
-
-if test $use_cdb_backend = yes; then
-                               AC_MSG_RESULT([yes])
-    AC_DEFINE(CNID_BACKEND_CDB, 1, [Define if CNID Concurrent DB3 backend should be compiled.])            
-    DEFAULT_CNID_SCHEME=cdb
-    bdb_required=yes
-else
-    AC_MSG_RESULT([no])
-                       fi
-
-dnl Determine whether or not to use Database Daemon CNID backend
-AC_MSG_CHECKING([whether or not to use Database Daemon CNID backend])
-AC_ARG_WITH(cnid-dbd-backend,
-       [  --with-cnid-dbd-backend      enable CNID with Database Daemon Data Store],
-       if test x"$withval" = x"no"; then
-           AC_MSG_RESULT([no])
-           use_dbd_backend=no
-               else
-           use_dbd_backend=yes
-           AC_MSG_RESULT([yes])
-       fi
-       ,use_dbd_backend=no
-        AC_MSG_RESULT([no])
-)
-
-dnl Determine whether or not to use with transaction support in Database Daemon
-AC_MSG_CHECKING([whether or not to use Database Daemon with transaction support])
-AC_ARG_WITH(cnid-dbd-txn,
-        [  --with-cnid-dbd-txn          enable transaction support for dbd backend],
-       if test x"$withval" = x"no"; then
-           AC_MSG_RESULT([no])
-           use_dbd_txn=no
-       else
-           use_dbd_txn=yes
-           AC_MSG_RESULT([yes])
-       fi
-       ,use_dbd_txn=no
-                       AC_MSG_RESULT([no])
-)
-
-if test $use_dbd_txn = yes; then
-    use_dbd_backend=yes
-    AC_DEFINE(CNID_BACKEND_DBD_TXN, 1, [Define if CNID Database Daemon backend has transaction support])
-else
-    if test x"$use_dbd_backend" = x; then    
-        use_dbd_backend=no
-    fi
-fi
-
-if test $use_dbd_backend = yes; then
-    compiled_backends="$compiled_backends dbd"
-    AC_DEFINE(CNID_BACKEND_DBD, 1, [Define if CNID Database Daemon backend should be compiled.])
-    if test x"$DEFAULT_CNID_SCHEME" = x; then
-        DEFAULT_CNID_SCHEME=dbd
-    fi
-    bdb_required=yes
-fi
-AM_CONDITIONAL(BUILD_DBD_DAEMON, test x"$use_dbd_backend" = x"yes")
-
-dnl Determine whether or not to use DB3 transactional data store
-AC_MSG_CHECKING([whether or not to use DB3 transactional DB store])
-AC_ARG_WITH(cnid-db3-backend,
-        [  --with-cnid-db3-backend     enable CNID with transactional DB3 Data Store],
-       if test x"$withval" = x"no"; then
-           use_db3_backend=no
-       else
-           use_db3_backend=yes
-           $compiled_backends="$compile_backends db3"
-       fi
-       ,use_db3_backend=no
-)
-
-if test $use_db3_backend = yes; then
-                       AC_MSG_RESULT([yes])
-    AC_DEFINE(CNID_BACKEND_DB3, 1, [Define if CNID transactional DB3 backend should be compiled.])
-    if test x"$DEFAULT_CNID_SCHEME" = x; then
-       DEFAULT_CNID_SCHEME=db3
-    fi
-    bdb_required=yes
-               else
-                       AC_MSG_RESULT([no])
-               fi
-
-dnl Determine whether or not to use LAST DID scheme
-AC_MSG_CHECKING([whether or not to use LAST DID scheme])
-AC_ARG_WITH(cnid-last-backend,
-       [  --with-cnid-last-backend     enable LAST CNID scheme],
-       if test x"$withval" = x"no"; then
-           use_last_backend=no
-       else
-           use_last_backend=yes
-           compiled_backends="$compiled_backends last"
-       fi
-       ,use_last_backend=no
-)
-
-if test $use_last_backend = yes; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE(CNID_BACKEND_LAST, 1, [Define if CNID LAST scheme backend should be compiled.])
-    if test x"$DEFAULT_CNID_SCHEME" = x; then
-       DEFAULT_CNID_SCHEME=last
-    fi
-else
-    AC_MSG_RESULT([no])
-fi
-
-dnl Determine whether or not to use HASH DID scheme
-AC_MSG_CHECKING([whether or not to use HASH DID scheme])
-AC_ARG_WITH(cnid-hash-backend,
-       [  --with-cnid-hash-backend     enable HASH CNID scheme],
-       if test x"$withval" = x"no"; then
-           use_hash_backend=no
-       else
-           use_hash_backend=yes
-           compiled_backends="$compiled_backends hash"
-       fi
-       ,use_hash_backend=no
-)
-
-if test $use_hash_backend = yes; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE(CNID_BACKEND_HASH, 1, [Define if CNID HASH scheme backend should be compiled.])
-    if test x"$DEFAULT_CNID_SCHEME" = x; then
-       DEFAULT_CNID_SCHEME=hash
-    fi
-           else
-               AC_MSG_RESULT([no])
-           fi
-
-dnl Determine whether or not to use TDB DID scheme
-AC_MSG_CHECKING([whether or not to use TDB DID scheme])
-AC_ARG_WITH(cnid-tdb-backend,
-       [  --with-cnid-tdb-backend      enable DID CNID scheme],
-       if test x"$withval" = x"no"; then
-           use_tdb_backend=no
+               AC_MSG_RESULT([yes])
+               netatalk_cv_force_uidgid=yes
        else
-           use_tdb_backend=yes
-           compiled_backends="$compiled_backends tdb"
+               AC_MSG_RESULT([no])
        fi
-       ,use_tdb_backend=no
+       ],[
+               AC_MSG_RESULT([no])
+       ]
 )
 
-if test $use_tdb_backend = yes; then
-           AC_MSG_RESULT([yes])
-    AC_DEFINE(CNID_BACKEND_TDB, 1, [Define if CNID TDB scheme backend should be compiled.])
-    if test x"$DEFAULT_TDB_SCHEME" = x; then
-       DEFAULT_CNID_SCHEME=tdb
-       fi
-else
-    AC_MSG_RESULT([no])
-fi
-
-dnl Determine whether or not to use MTAB DID scheme
-AC_MSG_CHECKING([whether or not to use MTAB DID scheme])
-AC_ARG_WITH(cnid-mtab-backend,
-       [  --with-cnid-mtab-backend     enable MTAB CNID scheme],
-       if test x"$withval" = x"no"; then
-           use_mtab_backend=no
-       else
-           use_mtab_backend=yes
-           compiled_backends="$compiled_backends mtab"
-       fi
-       ,use_mtab_backend=no
-)
-
-if test $use_mtab_backend = yes; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE(CNID_BACKEND_MTAB, 1, [Define if CNID MTAB scheme backend should be compiled.])
-    if test x"$DEFAULT_CNID_SCHEME" = x; then
-       DEFAULT_CNID_SCHEME=mtab
-fi
-else           
-    AC_MSG_RESULT([no])
-fi
-
-dnl Set default DID scheme
-AC_MSG_CHECKING([default DID scheme])
-AC_ARG_WITH(cnid-default-backend,
-       [  --with-cnid-default-backend=val      set default DID scheme],
-       if test x"$withval" = x; then
-           AC_MSG_RESULT([ignored])
-       else
-           DEFAULT_CNID_SCHEME=$withval
-           AC_MSG_RESULT($DEFAULT_CNID_SCHEME)
-       fi
-       ,AC_MSG_RESULT($DEFAULT_CNID_SCHEME)
-)
-
-if test x"$DEFAULT_CNID_SCHEME" = x; then
-    AC_MSG_ERROR([No DID schemes compiled in ])
-fi
-
-AC_MSG_CHECKING([whether default CNID scheme has been activated])
-found_scheme=no
-for scheme in $compiled_backends ; do
-    if test "$scheme" = $DEFAULT_CNID_SCHEME ; then    
-        found_scheme=yes
-    fi
-done
-if test x"$found_scheme" = x"no"; then
-        AC_MSG_RESULT([no])
-        AC_MSG_ERROR([Specified default CNID scheme $DEFAULT_CNID_SCHEME was not selected for compilation])
-    else
-        AC_MSG_RESULT([yes])
-fi
-
-AC_DEFINE_UNQUOTED(DEFAULT_CNID_SCHEME, "$DEFAULT_CNID_SCHEME", [Default CNID scheme to be used])
-AC_SUBST(DEFAULT_CNID_SCHEME)
-AC_SUBST(compiled_backends)
+dnl Check for CNID database backends
+bdb_required=no
+AC_NETATALK_CNID
 
 dnl Check for Berkeley DB library
 if test "x$bdb_required" = "xyes"; then
-       AC_PATH_BDB(, [AC_MSG_ERROR([Berkeley DB library not found!])])
+       AC_PATH_BDB(, [
+               AC_MSG_RESULT([])
+               AC_MSG_RESULT([Make sure you have the Berkeley DB libraries AND headers installed.])
+               AC_MSG_RESULT([You can download the latest version from http://www.sleepcat.com.])
+               AC_MSG_RESULT([If you have installed BDB in a non standard location use the])
+               AC_MSG_RESULT([--with-bdb=/path/to/bdb configure option.])
+               AC_MSG_ERROR([Berkeley DB library required but not found!])
+       ])
 fi
 
 dnl Check for quota support
@@ -488,68 +346,96 @@ AC_CHECK_QUOTA
 dnl Check for optional server location protocol support (used by MacOS X)
 NETATALK_SRVLOC
 
-AC_MSG_RESULT([    LIBS = $LIBS])
 dnl Check for PAM libs
+netatalk_cv_use_pam=no
 AC_PATH_PAM([
-       PAPD_LIBS="$PAPD_LIBS $PAM_LIBS"
-       AFPD_LIBS="$AFPD_LIBS $PAM_LIBS"
        use_pam_so=yes
        compile_pam=yes
+       netatalk_cv_use_pam=yes
        AC_DEFINE(USE_PAM, 1, [Define to enable PAM support])
 ])
 
-AC_MSG_CHECKING([whether shadow support should be enabled])
+netatalk_cv_use_shadowpw=no
 AC_ARG_WITH(shadow,
-       [  --with-shadow           enable shadow password support],
-       [shadowpw="$withval"],
-       [shadowpw=no]
+       [  --with-shadow           enable shadow password support [[auto]]],
+       [netatalk_cv_use_shadowpw="$withval"],
+       [netatalk_cv_use_shadowpw=auto]
 )
-if test "x$shadowpw" = "xyes"; then
+
+if test "x$netatalk_cv_use_shadowpw" != "xno"; then
+    AC_CHECK_HEADER([shadow.h])
+    if test x"$ac_cv_header_shadow_h" = x"yes"; then
+       netatalk_cv_use_shadowpw=yes
        AC_DEFINE(SHADOWPW, 1, [Define if shadow passwords should be used])
+    else 
+      if test "x$shadowpw" = "xyes"; then
+        AC_MSG_ERROR([shadow support not available])
+      else
+               netatalk_cv_use_shadowpw=no
+      fi
+    fi 
 fi
-AC_MSG_RESULT([$shadowpw])
 
+AC_MSG_CHECKING([whether shadow support should be enabled])
+if test "x$netatalk_cv_use_shadowpw" == "xyes"; then
+       AC_MSG_RESULT([yes])
+else
+       AC_MSG_RESULT([no])
+fi
+       
+       
+       
+netatalk_cv_use_shellcheck=yes
+AC_MSG_CHECKING([whether checking for a valid shell should be enabled])
 AC_ARG_ENABLE(shell-check,
-       [  --disable-shell-check   disable checking for a valid shell],
+       [  --disable-shell-check   disable checking for a valid shell],[
        if test "$enableval" = "no"; then 
                AC_DEFINE(DISABLE_SHELLCHECK, 1, [Define if shell check should be disabled])
-               AC_MSG_RESULT([disabling valid shell check])
+               AC_MSG_RESULT([no])
+               netatalk_cv_use_shellcheck=no
+       else
+               AC_MSG_RESULT([yes])
        fi
+       ],[
+               AC_MSG_RESULT([yes])
+       ]
 )
 
+NETATALK_TCP_WRAPPERS
+
+AC_MSG_CHECKING([whether system (fcntl) locking should be disabled])
 AC_ARG_ENABLE(locking,
-       [  --disable-locking   disable system locking],
-       if test "$enableval" = "no"; then 
-               AC_DEFINE(DISABLE_LOCKING, 1, [Define if system (fcntl) locking should be disabled])
-               AC_MSG_RESULT([disabling system locking])
-       fi
+        [  --disable-locking       disable system locking],[
+               if test "$enableval" = "no"; then
+                       AC_DEFINE(DISABLE_LOCKING, 1, [Define if system (fcntl) locking should be disabled])
+                       AC_MSG_RESULT([yes])
+               else
+                       AC_MSG_RESULT([no])
+               fi
+               
+       ],[
+               AC_MSG_RESULT([no])
+       ]
+
 )
 
-#AC_ARG_WITH(tcp-wrappers,
-#      [  --with-tcp-wrappers     enable TCP wrappers support],[
-#      AC_CHECK_HEADERS(tcpd.h)
-#      AC_CHECK_LIB(wrap, tcpd_warn,
-#              AC_DEFINE(TCPWRAP, 1, [Define if TCP wrappers should be used])
-#              AFPD_LIBS="$AFPD_LIBS -lwrap"
-#              AC_MSG_RESULT([enabling TCP wrappers support])
-#      )
-#])
-NETATALK_TCP_WRAPPERS
 
 AC_ARG_ENABLE(redhat,
-       [  --enable-redhat         use redhat-style sysv configuration ],
+       [  --enable-redhat         use redhat-style sysv configuration ],[
        if test "$enableval" = "yes"; then
                sysv_style=redhat
        fi
        AC_MSG_RESULT([enabling redhat-style sysv support])
+       ]
 )
 
 AC_ARG_ENABLE(suse,
-       [  --enable-suse           use suse-style sysv configuration ],
+       [  --enable-suse           use suse-style sysv configuration ],[
        if test "$enableval" = "yes"; then
                sysv_style=suse
        fi
        AC_MSG_RESULT([enabling suse-style sysv support])
+       ]
 )
 
 AC_ARG_ENABLE(cobalt,
@@ -582,24 +468,27 @@ dnl ----- a2boot compilation (disabled by default)
 AC_MSG_CHECKING([whether a2boot should be compiled])
 compile_a2boot=no
 AC_ARG_ENABLE(a2boot,
-       [  --enable-a2boot       enable compilation of Apple2 boot server],
+       [  --enable-a2boot         enable compilation of Apple2 boot server],
        [compile_a2boot="$enableval"],
        [compile_a2boot="no"]
 )
 AC_MSG_RESULT([$compile_a2boot])
 
 AC_ARG_WITH(uams-path,
-       [  --with-uams-path=PATH   path to UAMs [[PKGCONF/uams]]],
-       uams_path="$withval",
-       uams_path="${PKGCONFDIR}/uams"
+       [  --with-uams-path=PATH   path to UAMs [[PKGCONF/uams]]],[
+               uams_path="$withval"
+       ],[
+               uams_path="${PKGCONFDIR}/uams"
+       ]
 )
 
 dnl --------------------------------------------------------------------------
 dnl FHS stuff has to be done last because it overrides other defaults
 dnl --------------------------------------------------------------------------
 
+AC_MSG_CHECKING([whether to use Filesystem Hierarchy Standard (FHS) compatibility])
 AC_ARG_ENABLE(fhs,
-       [  --enable-fhs            use Filesystem Hierarchy Standard (FHS) compatibility],
+       [  --enable-fhs            use Filesystem Hierarchy Standard (FHS) compatibility],[
        if test "$enableval" = "yes"; then
                uams_path="${libdir}/netatalk"
                sysconfdir="/etc"
@@ -608,8 +497,13 @@ AC_ARG_ENABLE(fhs,
                use_pam_so=yes
                mandir="/usr/share/man"
                AC_DEFINE(FHS_COMPATIBILITY, 1, [Define if you want compatibily with the FHS])
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
        fi
-       AC_MSG_RESULT([enabling Filesystem Hierarchy Standard (FHS) compatibility])
+       ],[
+               AC_MSG_RESULT([no])
+       ]
 )
 
 dnl --------------------------------------------------------------------------
@@ -679,7 +573,7 @@ if test x"$this_os" = "xfreebsd"; then
        AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
        AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics])
 
-       AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
+dnl    AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
 fi
 
 dnl ----- HP-UX 11 specific -----
@@ -720,16 +614,17 @@ if test x"$this_os" = "xlinux"; then
        dnl ----- see etc/afpd/quota.c
        AC_DEFINE(HAVE_BROKEN_DBTOB, 1, [Define if dbtob is broken])
 
-       linux_sendfile=no
+       netatalk_cv_linux_sendfile=no
         AC_ARG_ENABLE(sendfile,
-           [  --enable-sendfile       use sendfile syscall default (no) ],
-           if test "$enableval" = "yes"; then
-               linux_sendfile=yes
-           fi
-           AC_MSG_RESULT([enabling sendfile syscall])
+           [  --enable-sendfile       use sendfile syscall default (no) ],[
+               if test "$enableval" = "yes"; then
+                       netatalk_cv_linux_sendfile=yes
+               fi
+               AC_MSG_RESULT([enabling sendfile syscall])
+           ]
         )
 
-       if test x"$linux_sendfile" = "xyes"; then 
+       if test x"$netatalk_cv_linux_sendfile" = "xyes"; then 
            AC_CACHE_CHECK([for linux sendfile support],netatalk_cv_HAVE_SENDFILE,[
            AC_TRY_LINK([#include <sys/sendfile.h>],
 [\
@@ -741,7 +636,7 @@ ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
 netatalk_cv_HAVE_SENDFILE=yes,netatalk_cv_HAVE_SENDFILE=no)])
 
 # Try and cope with broken Linux sendfile....
-           AC_CACHE_CHECK([for broken linux sendfile support],samba_cv_HAVE_BROKEN_LINUX_SENDFILE,[
+           AC_CACHE_CHECK([for broken linux sendfile support],netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE,[
            AC_TRY_LINK([\
 #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
 #undef _FILE_OFFSET_BITS
@@ -753,7 +648,7 @@ off_t offset;
 size_t total;
 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
 ],
-netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE=no)])
+netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE=no,netatalk_cv_HAVE_BROKEN_SENDFILE=cross)])
 
            if test x"$netatalk_cv_HAVE_SENDFILE" = x"yes"; then
                AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available])
@@ -764,6 +659,7 @@ netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,netatalk_cv_HAVE_BROKEN_LINUX_SENDFIL
                AC_DEFINE(LINUX_BROKEN_SENDFILE_API,1,[Whether (linux) sendfile() is broken])
                AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile should be used])
            else
+               netatalk_cv_linux_sendfile=no
                AC_MSG_RESULT(no);
            fi
        fi
@@ -803,7 +699,6 @@ if test x"$this_os" = "xnetbsd"; then
 
        dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
        AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
-       AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
 fi
 
 dnl ----- OpenBSD specific -----
@@ -814,7 +709,6 @@ if test x"$this_os" = "xopenbsd"; then
 
        dnl ----- OpenBSD does not have crypt.h, uses unistd.h -----
        AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
-       AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
 fi
 
 dnl ----- Solaris specific -----
@@ -847,32 +741,72 @@ if test x"$this_os" = "xtru64"; then
 fi
 
 dnl -- look for openssl
-AC_MSG_RESULT([    LIBS = $LIBS])
 AC_PATH_SSL
 
+dnl -- check for crypt
+AC_CRYPT
+
 dnl --------------------- check for building PGP UAM module
 
+AC_MSG_CHECKING([whether the PGP UAM should be build])
 AC_ARG_ENABLE(pgp-uam,
-       [  --enable-pgp-uam        enable build of PGP UAM module],
+       [  --enable-pgp-uam        enable build of PGP UAM module],[
        if test "$enableval" = "yes"; then 
                if test "$compile_ssl" = "yes"; then 
                        AC_DEFINE(UAM_PGP, 1, [Define if the PGP UAM module should be compiled])
                        compile_pgp=yes
-                       AC_MSG_RESULT([enabling build with PGP UAM module])
+                       AC_MSG_RESULT([yes])
+               else
+                       AC_MSG_RESULT([no])
                fi
        fi
+       ],[
+               AC_MSG_RESULT([no])
+       ]
 )
 
 dnl --------------------- check for building Kerberos v4 UAM module
 
+AC_MSG_CHECKING([whether the Kerberos IV UAM should be build])
 AC_ARG_ENABLE(krb4-uam,
-       [  --enable-krb4-uam       enable build of Kerberos v4 UAM module],
+       [  --enable-krb4-uam       enable build of Kerberos v4 UAM module],[
        if test "$enableval" = "yes"; then
                AC_DEFINE(UAM_KRB4, 1, [Define if the Kerberos 4 UAM module should be compiled])
                compile_kerberos=yes
-               AC_MSG_RESULT([enabling build with Kerberos v4 UAM module])
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
        fi
+       ],[
+               AC_MSG_RESULT([no])
+       ]
+)
+
+dnl --------------------- check for building Kerberos V UAM module
+
+netatalk_cv_build_krb5_uam=no
+AC_ARG_ENABLE(krbV-uam,
+       [  --enable-krbV-uam       enable build of Kerberos V UAM module],
+       [
+               if test x"$enableval" = x"yes"; then
+                       NETATALK_GSSAPI_CHECK([
+                               netatalk_cv_build_krb5_uam=yes
+                       ],[
+                               AC_MSG_ERROR([need GSSAPI to build Kerberos V UAM])
+                       ])
+               fi
+       ]
+       
 )
+
+AC_MSG_CHECKING([whether Kerberos V UAM should be build])
+if test x"$netatalk_cv_build_krb5_uam" = x"yes"; then
+       AC_MSG_RESULT([yes])
+else
+       AC_MSG_RESULT([no])
+fi
+AM_CONDITIONAL(USE_GSSAPI, test x"$netatalk_cv_build_krb5_uam" = x"yes")
+
 dnl --------------------- overwrite the config files . . . or not.
 
 AC_MSG_CHECKING([whether configuration files should be overwritten])
@@ -886,8 +820,6 @@ AC_MSG_RESULT([$OVERWRITE_CONFIG])
 dnl --------------------- last minute substitutions
 
 AC_SUBST(LIBS)
-AC_SUBST(AFPD_LIBS)
-AC_SUBST(PAPD_LIBS)
 AC_SUBST(CFLAGS)
 AC_SUBST(OVERWRITE_CONFIG)
 
@@ -897,7 +829,7 @@ AM_CONDITIONAL(COMPILE_A2BOOT, test x$compile_a2boot = xyes)
 AM_CONDITIONAL(USE_DHX, test x$compile_ssl = xyes)
 AM_CONDITIONAL(USE_KERBEROS, test x$compile_kerberos = xyes)
 AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
-AM_CONDITIONAL(USE_PAM, test x$compile_pam = xyes)
+AM_CONDITIONAL(USE_PAM, test x$netatalk_cv_install_pam = xyes)
 AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
 AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
@@ -995,17 +927,6 @@ AC_OUTPUT([Makefile
        [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
 )
 
-
-#################################################
-# Display summary of libraries detected
-
-AC_MSG_RESULT([Using libraries:])
-AC_MSG_RESULT([    LIBS = $LIBS])
-AC_MSG_RESULT([    SSL_LIBS = $SSL_LIBS])
-AC_MSG_RESULT([    GSSAPI_LIBS = $GSSAPI_LIBS])
-AC_MSG_RESULT([    BDB_LIBS = $BDB_LIBS])
-AC_MSG_RESULT([    AFPD_LIBS= $AFPD_LIBS])
-AC_MSG_RESULT([    PAPD_LIBS= $PAPD_LIBS])
-AC_MSG_RESULT([    CFLAGS = $CFLAGS])
-
+AM_NETATALK_LIBS_SUMMARY
+AM_NETATALK_CONFIG_SUMMARY
 
index 08af6e4edd4eb4a99c2fa4369f00dafc1117f295..6a5ec78721dd83a122296e22e70868483974b7d1 100644 (file)
@@ -67,10 +67,10 @@ uams_gss_la_CFLAGS            = @CFLAGS@ @GSSAPI_CFLAGS@
 
 uams_guest_la_LDFLAGS      = -module -avoid-version
 uams_randnum_la_LDFLAGS    = -module -avoid-version @SSL_LIBS@
-uams_passwd_la_LDFLAGS     = -module -avoid-version
+uams_passwd_la_LDFLAGS     = -module -avoid-version @CRYPT_LIBS@
 uams_pam_la_LDFLAGS        = -module -avoid-version @PAM_LIBS@
 uams_pgp_la_LDFLAGS        = -module -avoid-version @SSL_LIBS@
-uams_dhx_passwd_la_LDFLAGS = -module -avoid-version @SSL_LIBS@
+uams_dhx_passwd_la_LDFLAGS = -module -avoid-version @SSL_LIBS@ @CRYPT_LIBS@
 uams_dhx_pam_la_LDFLAGS    = -module -avoid-version @SSL_LIBS@ @PAM_LIBS@
 uams_gss_la_LDFLAGS       = -module -avoid-version @GSSAPI_LIBS@ 
 
index 4ad9d77973d18efa1473b316d399b90fb84da3ba..795eca56a6318eb8c388a9b220c99363bf923598 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx_passwd.c,v 1.18.6.1 2003-09-11 23:49:30 bfernhomberg Exp $
+ * $Id: uams_dhx_passwd.c,v 1.18.6.2 2003-10-29 23:53:24 bfernhomberg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -9,6 +9,7 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
+#define _XOPEN_SOURCE /* for crypt() */
 
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */
-#ifndef NO_CRYPT_H
+#ifdef HAVE_CRYPT_H
 #include <crypt.h>
-#endif /* ! NO_CRYPT_H */
+#endif /* ! HAVE_CRYPT_H */
 #include <pwd.h>
-#include <atalk/logger.h>
-
 #ifdef SHADOWPW
 #include <shadow.h>
 #endif /* SHADOWPW */
-
 #if defined(GNUTLS_DHX)
 #include <gnutls/openssl.h>
 #elif defined(OPENSSL_DHX)
@@ -38,6 +36,7 @@
 #include <cast.h>
 #endif /* OPENSSL_DHX */
 
+#include <atalk/logger.h>
 #include <atalk/afp.h>
 #include <atalk/uam.h>
 
index 2ebb30193b3abfd15e5201e50cdb0471d6eabede..28d3374a47fb0424ccac61ba3de8dfd5dd408420 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_passwd.c,v 1.19.2.1.2.1 2003-09-11 23:49:30 bfernhomberg Exp $
+ * $Id: uams_passwd.c,v 1.19.2.1.2.2 2003-10-29 23:53:24 bfernhomberg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -14,7 +14,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-
 /* STDC check */
 #if STDC_HEADERS
 #include <string.h>
@@ -29,15 +28,13 @@ char *strchr (), *strrchr ();
 #define memmove(d,s,n) bcopy ((s), (d), (n))
 #endif /* ! HAVE_MEMCPY */
 #endif /* STDC_HEADERS */
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */
-#ifndef NO_CRYPT_H
+#ifdef HAVE_CRYPT_H
 #include <crypt.h>
-#endif /* ! NO_CRYPT_H */
+#endif /* ! HAVE_CRYPT_H */
 #include <pwd.h>
-#include <atalk/logger.h>
 
 #ifdef SOLARIS
 #define SHADOWPW
@@ -47,6 +44,7 @@ char *strchr (), *strrchr ();
 #include <shadow.h>
 #endif /* SHADOWPW */
 
+#include <atalk/logger.h>
 #include <atalk/afp.h>
 #include <atalk/uam.h>
 
index 4c7a38bf13b8add66c533e72ea137550a31394e1..a64c3153303daaf7b76bfa35a61954e6d87589c7 100644 (file)
@@ -1,13 +1,20 @@
 EXTRA_DIST = \
        afs-check.m4            \
+       cnid-backend.m4         \
        config-checks.m4        \
        db3-check.m4            \
        grep-check.m4           \
+       gssapi-check.m4         \
+       iconv.m4                \
+       largefile-check.m4      \
        pam-check.m4            \
        perl-check.m4           \
        ps-check.m4             \
        quota-check.m4          \
+       snprintf-check.m4       \
        srvloc.m4               \
        ssl-check.m4            \
-       largefile-check.m4      \
-       snprintf-check.m4
+       summary.m4              \
+       tcp-wrappers.m4         \
+       util.m4
+
index 7453a1757993e6debdf80ff496bbab3cbc0ce3cc..5ab9fe4f1b7cac0382f18f39f0f2e0504d9ad54c 100644 (file)
@@ -1,15 +1,16 @@
-dnl $Id: afs-check.m4,v 1.2 2003-01-29 00:16:30 srittau Exp $
+dnl $Id: afs-check.m4,v 1.2.6.1 2003-10-29 23:53:24 bfernhomberg Exp $
 dnl Autoconf macro to check whether AFS support should be enabled
 
 AC_DEFUN([NETATALK_AFS_CHECK], [
        AFS_LIBS=
        AFS_CFLAGS=
 
+       netatalk_cv_afs=no
        AC_ARG_ENABLE(afs,
                [  --enable-afs            enable AFS support],
                [
                        if test "x$enableval" = "xyes"; then
-                               AC_CHECK_LIB(afsauthent, pioctl, ,
+                               AC_CHECK_LIB(afsauthent, pioctl, netatalk_cv_afs=yes,
                                        AC_MSG_ERROR([AFS installation not found])
                                )
                                AFS_LIBS=-lafsauthent
@@ -18,6 +19,13 @@ AC_DEFUN([NETATALK_AFS_CHECK], [
                ]
        )
 
+       AC_MSG_CHECKING([whether to enable AFS support])        
+       if test x"$netatalk_cv_afs" = x"yes"; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+       fi
+
        AC_SUBST(AFS_LIBS)
        AC_SUBST(AFS_CFLAGS)
 ])
diff --git a/macros/cnid-backend.m4 b/macros/cnid-backend.m4
new file mode 100644 (file)
index 0000000..a054849
--- /dev/null
@@ -0,0 +1,243 @@
+AC_DEFUN([AC_NETATALK_CNID], [
+
+    dnl Don't use BDB unless it's needed
+    bdb_required=no
+    compiled_backends=""
+
+    dnl Determine whether or not to use BDB Concurrent Data Store
+    AC_MSG_CHECKING([whether or not to use BDB Concurrent Data Store])
+    AC_ARG_WITH(cnid-cdb-backend,
+       [  --with-cnid-cdb-backend      build CNID with Concurrent BDB Data Store],[
+           if test x"$withval" = x"no"; then
+               use_cdb_backend=no
+        else
+            use_cdb_backend=yes
+        fi
+    ],[use_cdb_backend=yes]
+    )
+
+    if test $use_cdb_backend = yes; then
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(CNID_BACKEND_CDB, 1, [Define if CNID Concurrent BDB backend should be compiled.])        
+        DEFAULT_CNID_SCHEME=cdb
+        bdb_required=yes
+        compiled_backends="$compiled_backends cdb"
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    dnl Determine whether or not to use Database Daemon CNID backend
+    AC_MSG_CHECKING([whether or not to use Database Daemon CNID backend])
+    AC_ARG_WITH(cnid-dbd-backend,
+    [  --with-cnid-dbd-backend       build CNID with Database Daemon Data Store],
+    [   if test x"$withval" = x"no"; then
+            AC_MSG_RESULT([no])
+            use_dbd_backend=no
+        else
+            use_dbd_backend=yes
+            AC_MSG_RESULT([yes])
+        fi
+    ],[
+        use_dbd_backend=no
+        AC_MSG_RESULT([no])
+    ])
+
+    dnl Determine whether or not to use with transaction support in Database Daemon
+    AC_MSG_CHECKING([whether or not to use Database Daemon with transaction support])
+    AC_ARG_WITH(cnid-dbd-txn,
+    [  --with-cnid-dbd-txn           build transaction support for dbd backend],
+    [   if test x"$withval" = x"no"; then
+            AC_MSG_RESULT([no])
+            use_dbd_txn=no
+        else
+            use_dbd_txn=yes
+            AC_MSG_RESULT([yes])
+        fi
+       ],[
+        use_dbd_txn=no
+        AC_MSG_RESULT([no])
+    ])
+
+    if test $use_dbd_txn = yes; then
+        use_dbd_backend=yes
+        AC_DEFINE(CNID_BACKEND_DBD_TXN, 1, [Define if CNID Database Daemon backend has transaction support])
+    else
+        if test x"$use_dbd_backend" = x; then    
+            use_dbd_backend=no
+        fi
+    fi
+
+    if test $use_dbd_backend = yes; then
+        compiled_backends="$compiled_backends dbd"
+        AC_DEFINE(CNID_BACKEND_DBD, 1, [Define if CNID Database Daemon backend should be compiled.])
+        if test x"$DEFAULT_CNID_SCHEME" = x; then
+            DEFAULT_CNID_SCHEME=dbd
+        fi
+        bdb_required=yes
+    fi
+    AM_CONDITIONAL(BUILD_DBD_DAEMON, test x"$use_dbd_backend" = x"yes")
+
+    dnl Determine whether or not to use BDB transactional data store
+    AC_MSG_CHECKING([whether or not to use BDB transactional DB store])
+    AC_ARG_WITH(cnid-db3-backend,
+    [  --with-cnid-db3-backend build CNID with transactional BDB Data Store],
+       [
+           if test x"$withval" = x"no"; then
+            use_db3_backend=no
+        else
+            use_db3_backend=yes
+            $compiled_backends="$compile_backends db3"
+        fi
+    ],[
+        use_db3_backend=no
+    ])
+
+    if test x"$use_db3_backend" = x"yes"; then
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(CNID_BACKEND_DB3, 1, [Define if CNID transactional BDB backend should be compiled.])
+        if test x"$DEFAULT_CNID_SCHEME" = x; then
+            DEFAULT_CNID_SCHEME=db3
+        fi
+        bdb_required=yes
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    dnl Determine whether or not to use LAST DID scheme
+    AC_MSG_CHECKING([whether or not to use LAST DID scheme])
+    AC_ARG_WITH(cnid-last-backend,
+       [  --with-cnid-last-backend     build LAST CNID scheme],
+       [
+        if test x"$withval" = x"no"; then
+            use_last_backend=no
+        else
+            use_last_backend=yes
+            compiled_backends="$compiled_backends last"
+        fi
+    ],[
+        use_last_backend=no
+    ])
+
+    if test $use_last_backend = yes; then
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(CNID_BACKEND_LAST, 1, [Define if CNID LAST scheme backend should be compiled.])
+        if test x"$DEFAULT_CNID_SCHEME" = x; then
+            DEFAULT_CNID_SCHEME=last
+        fi
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    dnl Determine whether or not to use HASH DID scheme
+    AC_MSG_CHECKING([whether or not to use HASH DID scheme])
+    AC_ARG_WITH(cnid-hash-backend,
+       [  --with-cnid-hash-backend     build HASH CNID scheme],
+       [
+        if test x"$withval" = x"no"; then
+            use_hash_backend=no
+        else
+            use_hash_backend=yes
+            compiled_backends="$compiled_backends hash"
+        fi
+    ],[
+        use_hash_backend=no
+    ])
+
+    if test $use_hash_backend = yes; then
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(CNID_BACKEND_HASH, 1, [Define if CNID HASH scheme backend should be compiled.])
+        if test x"$DEFAULT_CNID_SCHEME" = x; then
+            DEFAULT_CNID_SCHEME=hash
+        fi
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    dnl Determine whether or not to use TDB DID scheme
+    AC_MSG_CHECKING([whether or not to use TDB DID scheme])
+    AC_ARG_WITH(cnid-tdb-backend,
+       [  --with-cnid-tdb-backend      build DID CNID scheme],
+    [
+        if test x"$withval" = x"no"; then
+            use_tdb_backend=no
+        else
+            use_tdb_backend=yes
+            compiled_backends="$compiled_backends tdb"
+        fi
+    ],[
+        use_tdb_backend=no
+    ])
+
+    if test $use_tdb_backend = yes; then
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(CNID_BACKEND_TDB, 1, [Define if CNID TDB scheme backend should be compiled.])
+        if test x"$DEFAULT_TDB_SCHEME" = x; then
+            DEFAULT_CNID_SCHEME=tdb
+        fi
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    dnl Determine whether or not to use MTAB DID scheme
+    AC_MSG_CHECKING([whether or not to use MTAB DID scheme])
+    AC_ARG_WITH(cnid-mtab-backend,
+       [  --with-cnid-mtab-backend     build MTAB CNID scheme],
+    [
+        if test x"$withval" = x"no"; then
+            use_mtab_backend=no
+        else
+            use_mtab_backend=yes
+            compiled_backends="$compiled_backends mtab"
+        fi
+    ],[
+        use_mtab_backend=no
+    ])
+
+    if test $use_mtab_backend = yes; then
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(CNID_BACKEND_MTAB, 1, [Define if CNID MTAB scheme backend should be compiled.])
+        if test x"$DEFAULT_CNID_SCHEME" = x; then
+            DEFAULT_CNID_SCHEME=mtab
+        fi
+    else               
+        AC_MSG_RESULT([no])
+    fi
+
+    dnl Set default DID scheme
+    AC_MSG_CHECKING([default DID scheme])
+    AC_ARG_WITH(cnid-default-backend,
+       [  --with-cnid-default-backend=val      set default DID scheme],
+    [
+        if test x"$withval" = x; then
+            AC_MSG_RESULT([ignored])
+        else
+            DEFAULT_CNID_SCHEME=$withval
+            AC_MSG_RESULT($DEFAULT_CNID_SCHEME)
+        fi
+    ],[
+        AC_MSG_RESULT($DEFAULT_CNID_SCHEME)
+    ])
+
+    if test x"$DEFAULT_CNID_SCHEME" = x; then
+        AC_MSG_ERROR([No DID schemes compiled in ])
+    fi
+
+    AC_MSG_CHECKING([whether default CNID scheme has been activated])
+    found_scheme=no
+    for scheme in $compiled_backends ; do
+        if test "$scheme" = $DEFAULT_CNID_SCHEME ; then        
+            found_scheme=yes
+        fi
+    done
+    if test x"$found_scheme" = x"no"; then
+        AC_MSG_RESULT([no])
+        AC_MSG_ERROR([Specified default CNID scheme $DEFAULT_CNID_SCHEME was not selected for compilation])
+    else
+        AC_MSG_RESULT([yes])
+    fi
+
+    AC_DEFINE_UNQUOTED(DEFAULT_CNID_SCHEME, "$DEFAULT_CNID_SCHEME", [Default CNID scheme to be used])
+    AC_SUBST(DEFAULT_CNID_SCHEME)
+    AC_SUBST(compiled_backends)
+
+])
index b1370358959df027fadf0ab27d11079ec489b211..2c1bc916c762801402d384a61397dbeffd96215f 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: config-checks.m4,v 1.3.4.1.2.1 2003-09-13 02:46:28 bfernhomberg Exp $
+dnl $Id: config-checks.m4,v 1.3.4.1.2.2 2003-10-29 23:53:24 bfernhomberg Exp $
 dnl Autoconf macro to set the configuration directories.
 
 AC_DEFUN([NETATALK_CONFIG_DIRS], [
@@ -6,7 +6,7 @@ AC_DEFUN([NETATALK_CONFIG_DIRS], [
 
        AC_ARG_WITH(pkgconfdir,
                [  --with-pkgconfdir=DIR   package specific configuration in DIR
-                          [SYSCONF/netatalk]],
+                          [[SYSCONF/netatalk]]],
                        [
                        if test "x$withval" != "x"; then
                                PKGCONFDIR="$withval"
@@ -18,7 +18,7 @@ AC_DEFUN([NETATALK_CONFIG_DIRS], [
        SERVERTEXT="${PKGCONFDIR}/msg"
 
        AC_ARG_WITH(message-dir,
-               [  --with-message-dir=PATH path to server message files [PKGCONF/msg]],
+               [  --with-message-dir=PATH path to server message files [[PKGCONF/msg]]],
                [
                        if test x"$withval" = x"no";  then 
                                AC_MSG_WARN([*** message-dir is mandatory and cannot be disabled, using default ***])
index a92fbf9d17ecf2751757b8354446e4185a4df3cd..b8f2328516154186713c558deb214b890b9c989d 100644 (file)
-dnl $Id: db3-check.m4,v 1.11 2003-02-24 10:49:57 didg Exp $
+dnl $Id: db3-check.m4,v 1.11.6.1 2003-10-29 23:53:24 bfernhomberg Exp $
 dnl Autoconf macro to check for the Berkeley DB library
 
 AC_DEFUN([AC_PATH_BDB], [
        trybdbdir=""
+       dobdbsearch=yes
+       bdb_search_dirs="/usr/local/include/db4 /usr/local/include /usr/include/db4 /usr/include"
+
+
        AC_ARG_WITH(bdb,
-               [  --with-bdb=PATH         specify path to Berkeley DB installation],
-               if test "x$withval" != "xno"; then
-                       trybdbdir="$withval"
+               [  --with-bdb=PATH         specify path to Berkeley DB installation[[auto]]],
+               if test "x$withval" == "xno"; then
+                       dobdbsearch=no
+               elif test "x$withval" == "xyes"; then
+                       dobdbsearch=yes
+               else
+                       bdb_search_dirs="$withval/include/db4 $withval/include $withval"
                fi
        )
 
        bdbfound=no
-       for bdbdir in "" "$trybdbdir" "$trybdbdir/include" "$trybdbdir/include/db3" "/usr/local/BerkeleyDB.3.3/include" "/usr/local/include/db3" "/usr/local/include" "/usr/include/db3" "/usr/include" ; do
+       if test "x$dobdbsearch" != "xno"; then
+       for bdbdir in $bdb_search_dirs ; do
+               AC_MSG_CHECKING([for Berkeley DB headers in $bdbdir])
                if test -f "$bdbdir/db.h" ; then
-                       bdblibdir="`echo $bdbdir | sed 's/include\/db3$/lib/'`"
+                       AC_MSG_RESULT([yes])
+                       bdblibdir="`echo $bdbdir | sed 's/include\/db4$/lib/'`"
                        bdblibdir="`echo $bdblibdir | sed 's/include$/lib/'`"
-                       bdbbindir="`echo $bdbdir | sed 's/include\/db3$/bin/'`"
+                       bdbbindir="`echo $bdbdir | sed 's/include\/db4$/bin/'`"
                        bdbbindir="`echo $bdbbindir | sed 's/include$/bin/'`"
 
                        savedcflags="$CFLAGS"
                        savedldflags="$LDFLAGS"
+                       savedcppflags="$CPPFLAGS"
                        CFLAGS="$CFLAGS -I$bdbdir"
+                       CPPFLAGS="$CFLAGS -I$bdbdir"
                        LDFLAGS="-L$bdblibdir $LDFLAGS"
-                       AC_CHECK_LIB(db, main, [
+
+                       dnl db_create is BDB >3 specific 
+                       AC_CHECK_LIB(db, db_create, [
                                bdbfound=yes
+                               LDFLAGS="$LDFLAGS -ldb"
+                               BDB_LIBS="-ldb"], [
+                           AC_CHECK_LIB(db4, db_create, [
+                                       bdbfound=yes
+                                       LDFLAGS="$LDFLAGS -ldb4"
+                                       BDB_LIBS="-ldb4"])
+                        ])
+
+                       dnl check for header ... should only fail if the header cannot be compiled
+                       dnl it does exist, otherwise we wouldn't be here
+
+                       if test "x$bdbfound" = "xyes"; then
+                           AC_CHECK_HEADERS([db.h],[
+                               dnl check we have the correct bdb version
+                               AC_MSG_CHECKING(Berkeley DB version >= 4.0)
+                               AC_TRY_RUN([ 
+#if STDC_HEADERS
+#include <stdlib.h>
+#endif
+#include <db.h>
+
+#define DB_MAJOR_REQ   4
+#define DB_MINOR_REQ   0
+#define DB_PATCH_REQ   0
+
+
+int main(void) {
+       int major, minor, patch;
+       char *version_str;
+
+       version_str = db_version(&major, &minor, &patch);
+
+       /* check header version */
+       if (DB_VERSION_MAJOR < DB_MAJOR_REQ || DB_VERSION_MINOR < DB_MINOR_REQ ||
+           DB_VERSION_PATCH < DB_PATCH_REQ )
+               exit (1);
+               
+       /* check library version */
+       if (major < DB_MAJOR_REQ || minor < DB_MINOR_REQ || patch < DB_PATCH_REQ)
+               exit (2);
+
+       /* check header and library match */
+       if ( major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR || patch != DB_VERSION_PATCH)
+               exit(3);
+
+       exit (0);
+}
+], 
+                               atalk_cv_bdbversion="yes", 
+                               atalk_cv_bdbversion="no",
+                               atalk_cv_bdbversion="cross")
+
+                               if test ${atalk_cv_bdbversion} = "yes"; then
+                                  AC_MSG_RESULT(yes)
+                               else
+                                  AC_MSG_RESULT(no)
+                                  bdbfound=no
+                               fi
+                           ],[
+                               bdbfound=no
+                                AC_MSG_WARN([Berkeley DB libraries found, but required header files cannot be used!!!])
+                           ])
+                       fi
+
+                       if test "x$bdbfound" = "xyes"; then
                                if test "$bdbdir" != "/usr/include"; then
                                    BDB_CFLAGS="-I$bdbdir"
                                fi
                                if test "$bdblibdir" != "/usr/lib"; then
-                                   BDB_LIBS="-L$bdblibdir"
+                                   BDB_LIBS="-L$bdblibdir $BDB_LIBS"
                                fi
-                               BDB_LIBS="$BDB_LIBS -ldb"
                                BDB_BIN=$bdbbindir
-                               BDB_PATH="`echo $bdbdir | sed 's,include/db3$,,'`"
-                       ])
+                               BDB_PATH="`echo $bdbdir | sed 's,include\/db4$,,'`"
+                               BDB_PATH="`echo $BDB_PATH | sed 's,include$,,'`"
+                       fi
                        CFLAGS="$savedcflags"
                        LDFLAGS="$savedldflags"
+                       CPPFLAGS="$savedcppflags"
                        break;
+               else
+                       AC_MSG_RESULT([no])
                fi
        done
+       fi
 
        if test "x$bdbfound" = "xyes"; then
                ifelse([$1], , :, [$1])
index aedf73337d184f0c200387f4128175b1150a3ba1..4f4da55c97f02ea8cdd2221eccd5c655bb31af3f 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: gssapi-check.m4,v 1.1.2.1 2003-09-09 16:42:22 didg Exp $
+dnl $Id: gssapi-check.m4,v 1.1.2.2 2003-10-29 23:53:24 bfernhomberg Exp $
 dnl Autoconf macro to check for kerberos
 
 AC_DEFUN([NETATALK_GSSAPI_CHECK], 
@@ -7,15 +7,15 @@ AC_DEFUN([NETATALK_GSSAPI_CHECK],
        GSSAPI_LIBS=""
        GSSAPI_CFLAGS=""
 
-        AC_ARG_ENABLE(gssapi,
-                [  --enable-gssapi[=DIR]     compile Kerberos V UAM],
-                [compilegssapi=$enableval],
-                [compilegssapi=no]
+        AC_ARG_WITH(gssapi,
+                [  --with-gssapi[[=PATH]]    path to GSSAPI for Kerberos V UAM [[auto]]],
+                [compilegssapi=$withval],
+                [compilegssapi=auto]
         )
 
        if test x"$compilegssapi" != x"no"; then
 
-                if test "x$compilegssapi" != "xyes"; then
+                if test "x$compilegssapi" != "xyes" -a "x$compilegssapi" != "xauto"; then
                        GSSAPI_CFLAGS="-I$withval/include"
                        GSSAPI_CPPFLAGS="-I$withval/include"
                        GSSAPI_LDFLAGS="-L$withval/lib"
@@ -123,15 +123,17 @@ AC_DEFUN([NETATALK_GSSAPI_CHECK],
 
 
     AC_MSG_CHECKING(whether GSSAPI support is used)
-               if test x"$ac_cv_lib_gssapi_gss_display_status" = x"yes" || test x"$ac_cv_lib_gssapi_krb5_gss_display_status" = x"yes"; then
-                       AC_DEFINE(HAVE_GSSAPI,1,[Whether to enable GSSAPI support])
-                       AC_MSG_RESULT([yes])
-                       GSSAPI_LIBS="$LIBS $LDLAGS"
-  else
-                       AC_MSG_RESULT([no])
-                       AC_MSG_ERROR([GSSAPI installation not found])
-    GSSAPI_LIBS=""
-  fi
+    if test x"$ac_cv_lib_gssapi_gss_display_status" = x"yes" || test x"$ac_cv_lib_gssapi_krb5_gss_display_status" = x"yes"; then
+       AC_DEFINE(HAVE_GSSAPI,1,[Whether to enable GSSAPI support])
+       AC_MSG_RESULT([yes])
+       GSSAPI_LIBS="$LIBS $LDLAGS"
+     else
+       AC_MSG_RESULT([no])
+       if test x"$compilegssapi" == x"yes"; then
+         AC_MSG_ERROR([GSSAPI installation not found])
+       fi
+        GSSAPI_LIBS=""
+     fi
 
   LIBS="$ac_save_LIBS"
   CFLAGS="$ac_save_CFLAGS"
@@ -139,8 +141,14 @@ AC_DEFUN([NETATALK_GSSAPI_CHECK],
   CPPFLAGS="$ac_save_CPPFLAGS"
        fi
 
-       AM_CONDITIONAL(USE_GSSAPI, test x"$ac_cv_lib_gssapi_gss_display_status" = x"yes")
-  AC_SUBST(GSSAPI_LIBS)
-  AC_SUBST(GSSAPI_CFLAGS)
+        if test x"$ac_cv_lib_gssapi_gss_display_status" = x"yes"; then
+                ifelse([$1], , :, [$1])
+        else
+                ifelse([$2], , :, [$2])
+        fi
+
+
+       AC_SUBST(GSSAPI_LIBS)
+       AC_SUBST(GSSAPI_CFLAGS)
 
 ])
index 5c37287fb08b4e18f577be8d232de7d4c0189136..a2406f4b393be5d520fa96dc05ef971f4a9c04c0 100644 (file)
@@ -7,7 +7,7 @@ dnl     # check for libiconv support
         savedcflags="$CFLAGS"
         savedldflags="$LDFLAGS"
        AC_ARG_WITH(libiconv,
-       [  --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) ],
+       [  --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include [[default=auto]]],
        [ case "$withval" in
          no)
            AC_MSG_RESULT(no)
@@ -17,12 +17,9 @@ dnl  # check for libiconv support
            CFLAGS="$CFLAGS -I$withval/include"
            LDFLAGS="$LDFLAGS -L$withval/lib"
            AC_CHECK_LIB(iconv, iconv_open, [
-                                if test "$withval" != "/usr" && test "$withval" != ""; then
-                                    ICONV_CFLAGS="-I$withval/include"
-                                    ICONV_LIBS ="-L$withval/lib"
-                                fi
-                                ICONV_LIBS="$ICONV_LIBS -liconv"
-                        ])
+                                ICONV_CFLAGS="-I$withval/include"
+                                ICONV_LIBS ="-L$withval/lib -liconv"
+            ])
            AC_DEFINE_UNQUOTED(WITH_LIBICONV, "${withval}",[Path to iconv])
            ;;
          esac ],
@@ -37,14 +34,14 @@ dnl # check for libiconv support
 dnl    ############
 dnl    # check for iconv usability
        AC_CACHE_CHECK([for working iconv],netatalk_cv_HAVE_USABLE_ICONV,[
-               AC_TRY_RUN([
-       #include <iconv.h>
-       main() {
-              iconv_t cd = iconv_open("MAC", "UTF8");
-              if (cd == 0 || cd == (iconv_t)-1) return -1;
-              return 0;
-       }
-       ], netatalk_cv_HAVE_USABLE_ICONV=yes,netatalk_cv_HAVE_USABLE_ICONV=no,netatalk_cv_HAVE_USABLE_ICONV=cross)])
+               AC_TRY_RUN([\
+#include <iconv.h>
+main() {
+       iconv_t cd = iconv_open("MAC", "UTF8");
+       if (cd == 0 || cd == (iconv_t)-1) return -1;
+       return 0;
+}
+], netatalk_cv_HAVE_USABLE_ICONV=yes,netatalk_cv_HAVE_USABLE_ICONV=no,netatalk_cv_HAVE_USABLE_ICONV=cross)])
 
        if test x"$netatalk_cv_HAVE_USABLE_ICONV" = x"yes"; then
            AC_DEFINE(HAVE_USABLE_ICONV,1,[Whether to use native iconv])
@@ -54,19 +51,19 @@ dnl ###########
 dnl    # check if iconv needs const
        if test x"$cv_HAVE_USABLE_ICONV" = x"yes"; then
                AC_CACHE_VAL(am_cv_proto_iconv, [
-               AC_TRY_COMPILE([
-               #include <stdlib.h>
-               #include <iconv.h>
-               extern
-               #ifdef __cplusplus
-               "C"
-               #endif
-               #if defined(__STDC__) || defined(__cplusplus)
-               size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-               #else
-               size_t iconv();
-               #endif
-               ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+               AC_TRY_COMPILE([\
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
                am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
                AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
                        [Define as const if the declaration of iconv() needs const.])
index d16df4eb1c27d37837e00733411b060791cfea7a..75ba94747ed7781e29e35b2458508269b454d4ec 100644 (file)
@@ -34,6 +34,9 @@ define(WX_SYS_LARGEFILE_MACRO_VALUE,
     fi
 ])
 
+
+
+
 dnl AC_SYS_LARGEFILE
 dnl ----------------
 dnl By default, many hosts won't let programs access large files;
@@ -52,11 +55,23 @@ if test "$enable_largefile" != no; then
         WX_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, ac_cv_sys_large_files)
     fi
 
-    AC_MSG_CHECKING(if large file support is available)
-    if test "x$wx_largefile" = "xyes"; then
+    
+    AC_CACHE_CHECK([for 64 bit off_t],netatalk_cv_SIZEOF_OFF_T,[
+    AC_TRY_RUN([#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+main() { exit((sizeof(off_t) == 8) ? 0 : 1); }],
+netatalk_cv_SIZEOF_OFF_T=yes,netatalk_cv_SIZEOF_OFF_T=no,netatalk_cv_SIZEOF_OFF_T=cross)])
+
+    AC_MSG_CHECKING([if large file support is available])
+    if test "x$netatalk_cv_SIZEOF_OFF_T" = "xyes"; then
         AC_DEFINE(HAVE_LARGEFILE_SUPPORT, [], [LARGEFILE support])
+       AC_MSG_RESULT([yes])
+        ifelse([$1], , :, [$1])
+    else
+        AC_MSG_RESULT([no])
+        ifelse([$2], , :, [$2])
     fi
-    AC_MSG_RESULT($wx_largefile)
 fi
 ])
 
index 4c7c1b962833e4398e469ce90673a3bc5614f277..647f69388219ac5ad9d1051615e3dfde1aac12ba 100644 (file)
@@ -1,9 +1,8 @@
-dnl $Id: pam-check.m4,v 1.2 2001-11-25 21:48:01 srittau Exp $
+dnl $Id: pam-check.m4,v 1.2.10.1 2003-10-29 23:53:24 bfernhomberg Exp $
 dnl PAM finding macro
 
 AC_DEFUN([AC_PATH_PAM], [
-       AC_MSG_CHECKING([for PAM])
-       AC_ARG_WITH(pam, [  --with-pam=PATH         specify path to PAM installation],
+       AC_ARG_WITH(pam, [  --with-pam[[=PATH]]       specify path to PAM installation [[auto]]],
                [
                        require_pam="yes"
                        if test "x$withval" = "xno"; then
@@ -18,43 +17,78 @@ AC_DEFUN([AC_PATH_PAM], [
                [PAMDIR="NONE";require_pam="no"]
        )
 
-       if test "x$PAMDIR" = "xNONE" -a "x$require_pam" != "xnever"; then
-               dnl Test for PAM
-               pam_paths="/ /usr /usr/local"
-               for path in $pam_paths; do
+       AC_MSG_CHECKING([for PAM installation directory])
+       if test "$host_os" != "solaris"; then
+               if test "x$PAMDIR" = "xNONE" -a "x$require_pam" != "xnever"; then
+                 dnl Test for PAM
+                 pam_paths="/ /usr /usr/local"
+                 for path in $pam_paths; do
                        if test -d "$path/etc/pam.d"; then
                                PAMDIR="$path"
                                break
                        fi
-               done
+                 done
+               fi
+
+               if test "x$PAMDIR" != "xNONE"; then
+                       AC_MSG_RESULT([yes (path: $PAMDIR)])
+               else
+                       AC_MSG_RESULT([no])
+               fi
+       else
+               AC_MSG_RESULT([/etc/pam.conf (solaris)])
        fi
+               
+       pam_found="no"
+       if test "x$require_pam" != "xnever"; then
 
-       PAM_CFLAGS=""
-       PAM_LIBS=""
+               savedCFLAGS="$CFLAGS"
+               savedLDFLAGS="$LDFLAGS"
+               savedLIBS="$LIBS"
 
-       pam_found="no"
-       if test "x$PAMDIR" != "xNONE"; then
-               AC_MSG_RESULT([yes (path: $PAMDIR)])
-               AC_CHECK_HEADER([security/pam_appl.h],[
+               if test "x$PAMDIR" != "xNONE"; then
+                       PAM_CFLAGS="-I$PAMDIR/include"
+                       PAM_LDFLAGS="-L$PAMDIR/lib"
+                       LDFLAGS="$LDFLAGS $PAM_LDFLAGS"
+                       CFLAGS="$CFLAGS $PAM_CFLAGS"
+               fi
+
+               AC_CHECK_HEADERS(security/pam_appl.h pam/pam_appl.h)
+
+               if test x"$ac_cv_header_security_pam_appl_h" = x"no" -a x"$ac_cv_header_pam_pam_appl_h" = x"no"; then
+                       pam_found=no
+               else
                        AC_CHECK_LIB(pam, pam_set_item, [
-                               PAM_CFLAGS="-I$PAMDIR/include"
-                               PAM_LIBS="-L$PAMDIR/lib -lpam"
+                               PAM_LIBS="$PAM_LDFLAGS -lpam"
                                pam_found="yes"
                        ])
-               ])
-       else
-               AC_MSG_RESULT([no])
+               fi
+               CFLAGS="$savedCFLAGS"
+               LDFLAGS="$savedLDFLAGS"
+               LIBS="$savedLIBS"
+       fi
+
+       netatalk_cv_install_pam=yes
+       if test x"$pam_found" = "xyes" -a "x$PAMDIR" = "xNONE"; then
+               AC_MSG_WARN([PAM support can be compiled, but the install location for the netatalk.pamd file could not be determined. Either install this file by hand or specify the install path.])
+               netatalk_cv_install_pam=no
        fi
 
+       AC_MSG_CHECKING([whether to enable PAM support])
        if test "x$pam_found" = "xno"; then
                if test "x$require_pam" = "xyes"; then
                        AC_MSG_ERROR([PAM support missing])
+               else
+                       AC_MSG_RESULT([no])
                fi
                ifelse([$2], , :, [$2])
        else
+               AC_MSG_RESULT([yes])
                ifelse([$1], , :, [$1])
        fi
 
+        LIB_REMOVE_USR_LIB(PAM_LIBS)
+        CFLAGS_REMOVE_USR_INCLUDE(PAM_CFLAGS)
        AC_SUBST(PAMDIR)
        AC_SUBST(PAM_CFLAGS)
        AC_SUBST(PAM_LIBS)
index d3aa8ac797c1b2e37bcb709db3fbfbbdbf879c82..7ed42a3cbe2ad304e0be7e8abd27df406e5b858b 100644 (file)
@@ -1,50 +1,74 @@
 dnl Check for optional server location protocol support (used by MacOS X)
 
-dnl $Id: srvloc.m4,v 1.8 2003-02-23 16:09:28 jmarcus Exp $
+dnl $Id: srvloc.m4,v 1.8.6.1 2003-10-29 23:53:24 bfernhomberg Exp $
 
 AC_DEFUN([NETATALK_SRVLOC], [
 
        SLP_LIBS=""
        SLP_CFLAGS=""
+       found_slp=no
+       srvlocdir=""
 
        AC_ARG_ENABLE(srvloc,
-               [  --enable-srvloc[=DIR]     turn on Server Location Protocol support],
+               [  --enable-srvloc[[=DIR]]   enable Server Location Protocol (SLP) support [[auto]]],
                [srvloc=$enableval],
-               [srvloc=no]
+               [srvloc=try]
        )
 
        if test "x$srvloc" != "xno"; then
 
                savedcppflags="$CPPFLAGS"
                savedldflags="$LDFLAGS"
-               if test "x$srvloc" = "xyes"; then
-                       srvloc="/usr"
+               if test "x$srvloc" = "xyes" -o "x$srvloc" = "xtry"; then
+                       srvlocdir="/usr"
+               else
+                       srvlocdir="$srvloc"
                fi
-               CPPFLAGS="$CPPFLAGS -I$srvloc/include"
-               LDFLAGS="$LDFLAGS -L$srvloc/lib"
+               CPPFLAGS="$CPPFLAGS -I$srvlocdir/include"
+               LDFLAGS="$LDFLAGS -L$srvlocdir/lib"
 
                AC_MSG_CHECKING([for slp.h])
                AC_TRY_CPP([#include <slp.h>],
-                       [AC_MSG_RESULT([yes])],
+                       [
+                               AC_MSG_RESULT([yes])
+                               found_slp=yes
+                       ],
                        [
                                AC_MSG_RESULT([no])
-                               AC_MSG_ERROR([SLP installation not found])
                        ]
                )
-               AC_CHECK_LIB(slp, SLPOpen, [
-                       if test "$srvloc" != "/usr"; then
-                           SLP_LIBS="-L$srvloc/lib"
-                           SLP_CFLAGS="-I$srvloc/include"
-                       fi
-                       SLP_LIBS="$SLP_LIBS -lslp"
-               ], AC_MSG_ERROR([SLP installation not found]))
-
-               AC_DEFINE(USE_SRVLOC, 1, [Define to enable SLP support])
+               
+               if test "x$found_slp" = "xyes"; then
+                       AC_CHECK_LIB(slp, SLPOpen, [
+                          SLP_LIBS="-L$srvlocdir/lib -lslp"
+                          SLP_CFLAGS="-I$srvlocdir/include"
+                       ],[ 
+                          AC_MSG_RESULT([no])
+                          found_slp=no
+                       ])
+               fi
 
                CPPFLAGS="$savedcppflags"
                LDFLAGS="$savedldflags"
        fi
+       
+       netatalk_cv_srvloc=no
+       AC_MSG_CHECKING([whether to enable srvloc (SLP) support])
+       if test "x$found_slp" = "xyes"; then
+               AC_MSG_RESULT([yes])
+               AC_DEFINE(USE_SRVLOC, 1, [Define to enable SLP support])
+               netatalk_cv_srvloc=yes
+       else
+               AC_MSG_RESULT([no])
+               if test "x$srvloc" != "xno" -a "x$srvloc" != "xtry"; then
+                       AC_MSG_ERROR([SLP installation not found])
+               fi
+       fi
+               
+
 
+       LIB_REMOVE_USR_LIB(SLP_LIBS)
+       CFLAGS_REMOVE_USR_INCLUDE(SLP_CFLAGS)
        AC_SUBST(SLP_LIBS)
        AC_SUBST(SLP_CFLAGS)
 ])
index 04ba343efcfbe19fbfbe6c04f48e760e1a957ff6..8e82adae55bbb9cc0c73cc3546568e77e471cca4 100644 (file)
@@ -1,6 +1,22 @@
-dnl $Id: ssl-check.m4,v 1.8.6.1 2003-09-09 16:42:22 didg Exp $
+dnl $Id: ssl-check.m4,v 1.8.6.2 2003-10-29 23:53:24 bfernhomberg Exp $
 dnl Autoconf macro to check for SSL or OpenSSL
 
+AC_DEFUN([AC_CRYPT], [
+
+       saveLIBS=$LIBS
+       LIBS=""
+       CRYPT_LIBS=""
+
+       AC_CHECK_HEADERS(crypt.h)
+       AC_CHECK_LIB(crypt, main)
+
+       CRYPT_LIBS=$LIBS
+       LIBS=$saveLIBS
+
+       AC_SUBST(CRYPT_LIBS)
+])
+
+
 AC_DEFUN([AC_PATH_SSL], [
        AC_ARG_WITH(ssl-dir, [  --with-ssl-dir=PATH     specify path to OpenSSL installation (must contain
                           lib and include dirs)],
diff --git a/macros/summary.m4 b/macros/summary.m4
new file mode 100644 (file)
index 0000000..aaf9783
--- /dev/null
@@ -0,0 +1,97 @@
+AC_DEFUN([AM_NETATALK_CONFIG_SUMMARY], [
+
+       AC_MSG_RESULT([Configure summary:])
+       AC_MSG_RESULT([    Install style:])
+       AC_MSG_RESULT([         $sysv_style])
+       AC_MSG_RESULT([    AFP:])
+       AC_MSG_RESULT([         AFP 3.x calls activated: $afp3])
+       if test "x$afp3" = "xyes"; then
+               AC_MSG_RESULT([         Large file support (>2GB) for AFP3: $wx_largefile])
+       fi
+       AC_MSG_RESULT([         DDP enabled: $netatalk_cv_ddp_enabled])
+       AC_MSG_RESULT([    CNID:])
+       AC_MSG_RESULT([         backends: $compiled_backends])
+       AC_MSG_RESULT([    UAMS:])
+       uams_using_options=""
+       if test x"$netatalk_cv_use_pam" != x"no"; then
+               uams_using_options="PAM"
+       fi
+       if test "x$netatalk_cv_use_shadowpw" == "xyes"; then
+               uams_using_options="$uams_using_options SHADOW"
+       fi
+       if test "x$compile_ssl" == "xyes"; then
+               AC_MSG_RESULT([         DHX     ($uams_using_options)])
+               AC_MSG_RESULT([         RANDNUM ($uams_using_options)])
+       fi
+       if test x"$netatalk_cv_build_krb5_uam" = x"yes"; then
+               AC_MSG_RESULT([         Kerberos V])
+       fi
+       if test x"$compile_kerberos" = x"yes"; then
+               AC_MSG_RESULT([         Kerberos IV])
+       fi
+       if test x"$compile_pgp" = x"yes"; then
+               AC_MSG_RESULT([         PGP])
+       fi
+       AC_MSG_RESULT([         passwd  ($uams_using_options)])
+       AC_MSG_RESULT([         guest])
+       AC_MSG_RESULT([    Options:])
+       AC_MSG_RESULT([         SLP support:            $netatalk_cv_srvloc])
+       AC_MSG_RESULT([         tcp wrapper support:    $netatalk_cv_tcpwrap])
+       if test x"$netatalk_cv_linux_sendfile" != x; then
+               AC_MSG_RESULT([         Linux sendfile support: $netatalk_cv_linux_sendfile])
+       fi
+       AC_MSG_RESULT([         admin group support:    $netatalk_cv_admin_group])
+       AC_MSG_RESULT([         valid shell check:      $netatalk_cv_use_shellcheck])
+       AC_MSG_RESULT([         cracklib support:       $netatalk_cv_with_cracklib])
+       AC_MSG_RESULT([         dropbox kludge:         $netatalk_cv_dropkludge])
+       AC_MSG_RESULT([         force volume uid/gid:   $netatalk_cv_force_uidgid])
+       AC_MSG_RESULT([         Apple 2 boot support:   $compile_a2boot])
+       if test x"$use_pam_so" = x"yes" -a x"$netatalk_cv_install_pam" = x"no"; then
+               AC_MSG_RESULT([])
+               AC_MSG_WARN([ PAM support was configured for your system, but the netatalk PAM configuration file])
+               AC_MSG_WARN([ cannot be installed. Please install the config/netatalk.pamd file manually.])
+               AC_MSG_WARN([ If you're running solaris you'll have to edit /etc/pam.conf to get PAM working.])
+               AC_MSG_WARN([ You can also re-run configure and specify --without-pam to disable PAM support.])
+       fi
+
+])
+
+
+AC_DEFUN([AM_NETATALK_LIBS_SUMMARY], [
+       dnl #################################################
+       dnl # Display summary of libraries detected
+
+       AC_MSG_RESULT([Using libraries:])
+       AC_MSG_RESULT([    LIBS = $LIBS])
+       AC_MSG_RESULT([    CFLAGS = $CFLAGS])
+       if test x"$compile_ssl" = x"yes"; then
+               AC_MSG_RESULT([    SSL:])
+               AC_MSG_RESULT([        LIBS   = $SSL_LIBS])
+               AC_MSG_RESULT([        CFLAGS = $SSL_CFLAGS])
+       fi
+       if test x"$netatalk_cv_use_pam" = x"yes"; then
+               AC_MSG_RESULT([    PAM:])
+               AC_MSG_RESULT([        LIBS   = $PAM_LIBS])
+               AC_MSG_RESULT([        CFLAGS = $PAM_CFLAGS])
+       fi
+       if test x"$netatalk_cv_use_pam" = x"yes"; then
+               AC_MSG_RESULT([    WRAP:])
+               AC_MSG_RESULT([        LIBS   = $WRAP_LIBS])
+               AC_MSG_RESULT([        CFLAGS = $WRAP_CFLAGS])
+       fi
+       if test x"$bdb_required" = x"yes"; then
+               AC_MSG_RESULT([    BDB:])
+               AC_MSG_RESULT([        LIBS   = $BDB_LIBS])
+               AC_MSG_RESULT([        CFLAGS = $BDB_CFLAGS])
+       fi
+       if test x"$netatalk_cv_build_krb5_uam" = x"yes"; then
+               AC_MSG_RESULT([    GSSAPI:])
+               AC_MSG_RESULT([        LIBS   = $GSSAPI_LIBS])
+               AC_MSG_RESULT([        CFLAGS = $GSSAPI_CFLAGS])
+       fi
+       if test x"$netatalk_cv_srvloc" = x"yes"; then
+               AC_MSG_RESULT([    SRVLOC:])
+               AC_MSG_RESULT([        LIBS   = $SLP_LIBS])
+               AC_MSG_RESULT([        CFLAGS = $SLP_CFLAGS])
+       fi
+])
index 645a7b9571aed1c7f864ee6b1e73aa30b774d299..28f410be12d816f772b4a7457c582f29f4b9f8ef 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: tcp-wrappers.m4,v 1.1.4.1 2003-09-09 16:42:22 didg Exp $
+dnl $Id: tcp-wrappers.m4,v 1.1.4.2 2003-10-29 23:53:24 bfernhomberg Exp $
 
 AC_DEFUN([NETATALK_TCP_WRAPPERS], [
        check=maybe
@@ -24,10 +24,12 @@ AC_DEFUN([NETATALK_TCP_WRAPPERS], [
                fi
        fi
 
+       netatalk_cv_tcpwrap=no
        AC_MSG_CHECKING([whether to enable the TCP wrappers])
        if test "x$enable" == "xyes"; then
                AC_DEFINE(TCPWRAP, 1, [Define if TCP wrappers should be used])
                WRAP_LIBS="-lwrap"
+               netatalk_cv_tcpwrap=yes
                AC_MSG_RESULT([yes])
        else
                if test "x$check" == "xyes"; then