1 dnl $Id: configure.in,v 1.179.2.3.2.19 2004-02-14 23:43:47 bfernhomberg Exp $
2 dnl configure.in for netatalk
4 AC_INIT(etc/afpd/main.c)
6 NETATALK_VERSION=`cat $srcdir/VERSION`
7 AC_SUBST(NETATALK_VERSION)
10 AM_INIT_AUTOMAKE(netatalk, ${NETATALK_VERSION})
11 AM_CONFIG_HEADER(config.h)
13 dnl Checks for programs.
25 dnl *********************************************************************
26 dnl FIXME! FIXME! These should be selectable properly, and should produce
27 dnl the proper flags and defines...
28 dnl *********************************************************************
30 ############################################
31 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the plugin loading code
32 #AC_SEARCH_LIBS(dlopen, [dl])
33 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
35 dnl Checks for libraries.
36 dnl Replace `main' with a function in -labs:
37 dnl AC_CHECK_LIB(abs, main)
38 dnl Replace `main' with a function in -laudit:
39 dnl AC_CHECK_LIB(audit, main)
40 dnl Replace `main' with a function in -lauth:
41 dnl AC_CHECK_LIB(auth, main)
42 dnl Replace `main' with a function in -lcmd:
43 dnl AC_CHECK_LIB(cmd, main)
44 dnl Replace `main' with a function in -lcrypt:
45 dnl AC_CHECK_LIB(crypt, main)
46 dnl Replace `main' with a function in -ld:
47 dnl AC_CHECK_LIB(d, main)
48 dnl Replace `main' with a function in -ldl:
49 AC_CHECK_LIB(dl, dlopen)
50 dnl Replace `main' with a function in -lkauth:
51 dnl AC_CHECK_LIB(kauth, main)
52 dnl Replace `main' with a function in -lkrb:
53 dnl AC_CHECK_LIB(krb, main)
54 dnl Replace `main' with a function in -llwp:
55 dnl AC_CHECK_LIB(lwp, main)
56 dnl Replace `main' with a function in -ln:
57 dnl AC_CHECK_LIB(n, main)
58 dnl Replace `main' with a function in -lnsl:
59 AC_CHECK_LIB(nsl, main)
60 dnl Replace `main' with a function in -lprot:
61 dnl AC_CHECK_LIB(prot, main)
62 dnl Replace `main' with a function in -lrx:
63 dnl AC_CHECK_LIB(rx, main)
64 dnl Replace `main' with a function in -lrxkad:
65 dnl AC_CHECK_LIB(rxkad, main)
66 dnl Replace `main' with a function in -lsocket:
67 AC_CHECK_LIB(socket, socket)
68 dnl Replace `main' with a function in -lsys:
69 dnl AC_CHECK_LIB(sys, main)
70 dnl Replace `main' with a function in -lubik:
71 dnl AC_CHECK_LIB(ubik, main)
75 # Check presence of some functions
77 # Check for XPG4 access() function
78 # Be sure to test before adding AFS libs in LIBS path as AFS lib
79 # has such a function that works only on AFS filesystems.
80 AC_CHECK_FUNCS(access)
82 AC_CHECK_FUNCS(pread pwrite)
84 dnl Checks for header files.
88 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)
89 AC_CHECK_HEADER(sys/cdefs.h,,
90 AC_MSG_RESULT([enabling generic cdefs.h from tree])
91 CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
93 AC_CHECK_HEADERS(langinfo.h locale.h)
95 dnl Checks for typedefs, structures, and compiler characteristics.
107 dnl Checks for library functions.
109 AC_PROG_GCC_TRADITIONAL
116 AC_CHECK_FUNCS(getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strcasestr strstr strtoul setpgrp strchr memcpy)
118 AC_CHECK_FUNCS(backtrace_symbols)
119 AC_CHECK_FUNCS(setlocale nl_langinfo)
120 AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
121 AC_CHECK_FUNCS(strlcpy strlcat)
125 dnl Checks for (v)snprintf
126 NETATALK_SNPRINTF_CHECK
128 dnl --------------------------------------------------------------------------
129 dnl specific configuration comes in here:
130 dnl --------------------------------------------------------------------------
132 AC_DEFINE(ADMIN_GRP, 1, [Define if the admin group should be enabled])
134 netatalk_cv_admin_group=yes
135 AC_MSG_CHECKING([for administrative group support])
136 AC_ARG_WITH(admin-group,
137 [ --disable-admin-group disable admin group],[
138 if test "$enableval" = "no"; then
139 AC_DEFINE(ADMIN_GRP, 0, [Define if the admin group should be enabled])
143 netatalk_cv_admin_group=no
153 AC_MSG_CHECKING([for logfile path])
155 [ --with-logfile=PATH path for file used by logger [/var/log/netatalk.log]
156 use --without-logfile to disable logger],[
157 if test x"$withval" = x"no"; then
158 AC_DEFINE(DISABLE_LOGGER, 1, [Define if the logger should not be used])
159 AC_MSG_RESULT([syslog])
160 elif test "$withval" != "yes"; then
161 AC_DEFINE_UNQUOTED(LOGFILEPATH, "$withval", [Path to the log file])
162 AC_MSG_RESULT([$withval])
164 AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log", [Path to the log file])
165 AC_MSG_RESULT([/var/log/netatalk.log])
167 AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log", [Path to the log file])
168 AC_MSG_RESULT([/var/log/netatalk.log])
173 netatalk_cv_with_cracklib=no
174 AC_MSG_CHECKING([for cracklib support])
175 AC_ARG_WITH(cracklib,
176 [ --with-cracklib=DICT enable/set location of cracklib dictionary],[
177 if test "x$withval" != "xno" ; then
179 AC_CHECK_LIB(crack, main, [
180 AC_DEFINE(USE_CRACKLIB, 1, [Define if cracklib should be used])
183 if test "$cracklib" = "yes"; then
184 cracklib="/usr/lib/cracklib_dict"
186 AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
187 [path to cracklib dictionary])
188 AC_MSG_RESULT([setting cracklib dictionary to $cracklib])
189 netatalk_cv_with_cracklib=yes
191 AC_MSG_ERROR([cracklib not found!])
202 netatalk_cv_ddp_enabled=yes
203 AC_MSG_CHECKING([whether to enable DDP])
205 [ --disable-ddp disable DDP],[
206 if test "$enableval" = "no"; then
207 AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
209 netatalk_cv_ddp_enabled=no
218 AC_MSG_CHECKING([whether to enable debug code])
219 AC_ARG_ENABLE(debug1,
220 [ --enable-debug1 enable debug code],[
221 if test "$enableval" != "no"; then
222 if test "$enableval" = "yes"; then
223 AC_DEFINE(DEBUG1, 1, [Define if debugging information should be included])
225 AC_DEFINE_UNQUOTED(DEBUG1, $enableval, [Define if debugging information should be included])
236 AC_MSG_CHECKING([whether to enable verbose debug code])
238 [ --enable-debug enable verbose debug code],[
239 if test "$enableval" != "no"; then
240 if test "$enableval" = "yes"; then
241 AC_DEFINE(DEBUG, 1, [Define if verbose debugging information should be included])
243 AC_DEFINE_UNQUOTED(DEBUG, $enableval, [Define if verbose debugging information should be included])
256 AC_MSG_CHECKING([whether AFP 3.x calls should be enabled])
258 [ --disable-afp3 disable AFP 3.x calls],
260 if test x"$enableval" != x"no"; then
273 if test x"$afp3" = x"yes"; then
275 AC_DEFINE(AFP3x, 1, [Define to enable AFP 3.x support])
277 if test x"$afp3set" = x"yes"; then
278 AC_MSG_ERROR([AFP 3.x support requires Large File Support.])
280 AC_MSG_WARN([AFP 3.x support requires Large File Support. AFP3.x support disabled])
288 dnl ----------- A NOTE ABOUT DROPKLUDGE
289 dnl The trouble with this fix is that if you know what the file is called, it
290 dnl can be read from the Unix side. That's okay for most academic institutions
291 dnl since the students don't have telnet access to the Mac servers. There is
292 dnl currently no one working on further development/fixes of DROPKLUDGE.
295 netatalk_cv_dropkludge=no
296 AC_MSG_CHECKING([whether to enable experimental dropbox support])
297 AC_ARG_ENABLE(dropkludge,
298 [ --enable-dropkludge enable the experimental dropbox fix (INSECURE!) ],[
299 if test "$enableval" = "yes"; then
300 AC_DEFINE(DROPKLUDGE, 1, [Define if you want to use the experimental dropkludge support])
302 netatalk_cv_dropkludge=yes
311 netatalk_cv_force_uidgid=no
312 AC_MSG_CHECKING([whether to enable forcing of uid/gid per volume])
313 AC_ARG_ENABLE(force-uidgid,
314 [ --enable-force-uidgid allow forcing of uid/gid per volume (BROKEN) ],[
315 if test "$enableval" = "yes"; then
316 AC_DEFINE(FORCE_UIDGID, 1, [Define if you want forcing of uid/gid per volume])
317 AC_MSG_RESULT([enabling forcing of uid/gid per volume])
319 netatalk_cv_force_uidgid=yes
328 dnl Check for CNID database backends
330 AC_NETATALK_CNID([bdb_required=yes],[bdb_required=no])
332 dnl Check for Berkeley DB library
333 if test "x$bdb_required" = "xyes"; then
336 AC_MSG_RESULT([Make sure you have the Berkeley DB libraries AND headers installed.])
337 AC_MSG_RESULT([You can download the latest version from http://www.sleepcat.com.])
338 AC_MSG_RESULT([If you have installed BDB in a non standard location use the])
339 AC_MSG_RESULT([--with-bdb=/path/to/bdb configure option.])
340 AC_MSG_ERROR([Berkeley DB library required but not found!])
344 dnl Check for quota support
347 dnl Check for optional server location protocol support (used by MacOS X)
350 dnl Check for PAM libs
351 netatalk_cv_use_pam=no
355 netatalk_cv_use_pam=yes
356 AC_DEFINE(USE_PAM, 1, [Define to enable PAM support])
359 netatalk_cv_use_shadowpw=no
361 [ --with-shadow enable shadow password support [[auto]]],
362 [netatalk_cv_use_shadowpw="$withval"],
363 [netatalk_cv_use_shadowpw=auto]
366 if test "x$netatalk_cv_use_shadowpw" != "xno"; then
367 AC_CHECK_HEADER([shadow.h])
368 if test x"$ac_cv_header_shadow_h" = x"yes"; then
369 netatalk_cv_use_shadowpw=yes
370 AC_DEFINE(SHADOWPW, 1, [Define if shadow passwords should be used])
372 if test "x$shadowpw" = "xyes"; then
373 AC_MSG_ERROR([shadow support not available])
375 netatalk_cv_use_shadowpw=no
380 AC_MSG_CHECKING([whether shadow support should be enabled])
381 if test "x$netatalk_cv_use_shadowpw" = "xyes"; then
389 netatalk_cv_use_shellcheck=yes
390 AC_MSG_CHECKING([whether checking for a valid shell should be enabled])
391 AC_ARG_ENABLE(shell-check,
392 [ --disable-shell-check disable checking for a valid shell],[
393 if test "$enableval" = "no"; then
394 AC_DEFINE(DISABLE_SHELLCHECK, 1, [Define if shell check should be disabled])
396 netatalk_cv_use_shellcheck=no
405 NETATALK_TCP_WRAPPERS
407 AC_MSG_CHECKING([whether system (fcntl) locking should be disabled])
408 AC_ARG_ENABLE(locking,
409 [ --disable-locking disable system locking],[
410 if test "$enableval" = "no"; then
411 AC_DEFINE(DISABLE_LOCKING, 1, [Define if system (fcntl) locking should be disabled])
424 AC_ARG_ENABLE(redhat,
425 [ --enable-redhat use redhat-style sysv configuration ],[
426 if test "$enableval" = "yes"; then
429 AC_MSG_RESULT([enabling redhat-style sysv support])
434 [ --enable-suse use suse-style sysv configuration ],[
435 if test "$enableval" = "yes"; then
438 AC_MSG_RESULT([enabling suse-style sysv support])
442 AC_ARG_ENABLE(cobalt,
443 [ --enable-cobalt use cobalt-style sysv configuration ],
444 if test "$enableval" = "yes"; then
447 AC_MSG_RESULT([enabling cobalt-style sysv support])
450 AC_ARG_ENABLE(netbsd,
451 [ --enable-netbsd use NetBSD-style rc.d configuration ],
452 if test "x$enableval" = "xyes"; then
455 AC_MSG_RESULT([enabling NetBSD-style rc.d support])
458 dnl ----- timelord compilation (disabled by default)
459 AC_MSG_CHECKING([whether timelord should be compiled])
461 AC_ARG_ENABLE(timelord,
462 [ --enable-timelord enable compilation of timelord server],
463 [compile_timelord="$enableval"],
464 [compile_timelord="no"]
466 AC_MSG_RESULT([$compile_timelord])
468 dnl ----- a2boot compilation (disabled by default)
469 AC_MSG_CHECKING([whether a2boot should be compiled])
471 AC_ARG_ENABLE(a2boot,
472 [ --enable-a2boot enable compilation of Apple2 boot server],
473 [compile_a2boot="$enableval"],
474 [compile_a2boot="no"]
476 AC_MSG_RESULT([$compile_a2boot])
478 AC_ARG_WITH(uams-path,
479 [ --with-uams-path=PATH path to UAMs [[PKGCONF/uams]]],[
482 uams_path="${PKGCONFDIR}/uams"
486 dnl --------------------------------------------------------------------------
487 dnl FHS stuff has to be done last because it overrides other defaults
488 dnl --------------------------------------------------------------------------
490 AC_MSG_CHECKING([whether to use Filesystem Hierarchy Standard (FHS) compatibility])
492 [ --enable-fhs use Filesystem Hierarchy Standard (FHS) compatibility],[
493 if test "$enableval" = "yes"; then
494 uams_path="${libdir}/netatalk"
496 PKGCONFDIR=${sysconfdir}/netatalk
497 SERVERTEXT="${PKGCONFDIR}/msg"
499 mandir="/usr/share/man"
500 AC_DEFINE(FHS_COMPATIBILITY, 1, [Define if you want compatibily with the FHS])
510 dnl --------------------------------------------------------------------------
511 dnl post-FHS substitutions, etc
512 dnl --------------------------------------------------------------------------
515 AC_DEFINE_UNQUOTED(UAMS_PATH, "${uams_path}",
516 [path to UAMs [default=PKGCONF/uams]])
517 UAMS_PATH="${uams_path}"
520 dnl --------------------------------------------------------------------------
521 dnl drop in includes for top level directory structures here...
522 dnl --------------------------------------------------------------------------
524 dnl Note: $(top_srcdir)/include should be added before all other includes
525 dnl so that includes from that directory a preferred to includes from
526 dnl /usr/include or similar places.
527 LIBS="$LIBS -L\$(top_srcdir)/libatalk"
528 CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
530 dnl --------------------------------------------------------------------------
531 dnl specific configuration comes in here:
532 dnl --------------------------------------------------------------------------
534 dnl ac_cv_target_os is now host_os, ac_cv_target_cpu is now host_cpu
536 dnl --------------------- determine operating system from "target"
538 *aix*) this_os=aix ;;
539 *freebsd*) this_os=freebsd ;;
540 *hpux11*) this_os=hpux11 ;;
541 *irix*) this_os=irix ;;
542 *linux*) this_os=linux ;;
543 *osx*) this_os=macosx ;;
544 *darwin*) this_os=macosx ;;
545 *netbsd*) this_os=netbsd ;;
546 *openbsd*) this_os=openbsd ;;
547 *osf*) this_os=tru64 ;;
548 *solaris*) this_os=solaris ;;
552 i386|i486|i586|i686|k7) this_cpu=x86 ;;
553 alpha) this_cpu=alpha ;;
554 mips) this_cpu=mips ;;
555 powerpc|ppc) this_cpu=ppc ;;
558 dnl --------------------- operating system specific flags (port from sys/*)
560 dnl ----- AIX specific -----
561 if test x"$this_os" = "xaix"; then
562 AC_MSG_RESULT([ * AIX specific configuration])
563 AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
565 dnl This is probably a lie; AIX 4.3 supports a 64-bit long
566 dnl compilation environment. It's enough to get things defined
567 dnl right in endian.h provided that long long is supported, though.
568 AC_DEFINE(HAVE_32BIT_LONGS, 1, [Define if the data type long has 32 bit])
571 dnl ----- FreeBSD specific -----
572 if test x"$this_os" = "xfreebsd"; then
573 AC_MSG_RESULT([ * FreeBSD specific configuration])
574 AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
575 AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics])
577 dnl AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
580 dnl ----- HP-UX 11 specific -----
581 if test x"$this_os" = "xhpux11"; then
582 AC_MSG_RESULT([ * HP-UX 11 specific configuration])
584 AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
585 AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
588 dnl ----- IRIX specific -----
589 if test x"$this_os" = "xirix"; then
590 AC_MSG_RESULT([ * IRIX specific configuration])
592 AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
595 dnl ----- Linux specific -----
596 if test x"$this_os" = "xlinux"; then
597 AC_MSG_RESULT([ * Linux specific configuration])
599 dnl ----- kernel 2.6 changed struct at_addr to atalk_addr
600 AC_MSG_CHECKING([for struct atalk_addr])
601 dnl AC_COMPILE_IFELSE([
603 #include <sys/socket.h>
604 #include <asm/types.h>
605 #include <linux/atalk.h>
609 struct atalk_addr foo;
614 ac_have_atalk_addr=yes
620 if test "x$ac_have_atalk_addr" = "xyes"; then
621 AC_DEFINE(HAVE_ATALK_ADDR, 1, [set if struct at_addr is called atalk_addr])
624 dnl ----- check if we need the quotactl wrapper
625 # AC_CHECK_HEADERS(sys/quota.h linux/quota.h)
626 # AC_CHECK_FUNC(quotactl,,
627 # AC_DEFINE(NEED_QUOTACTL_WRAPPER, 1, [Define if the quotactl wrapper is needed])
628 # AC_MSG_RESULT([enabling quotactl wrapper])
631 # For quotas on Linux XFS filesystems
632 AC_CHECK_HEADERS(linux/xqm.h linux/xfs_fs.h)
633 AC_CHECK_HEADERS(xfs/libxfs.h xfs/xqm.h xfs/xfs_fs.h)
635 AC_CHECK_HEADERS(linux/dqblk_xfs.h)
638 dnl ----- as far as I can tell, dbtob always does the wrong thing
639 dnl ----- on every single version of linux I've ever played with.
640 dnl ----- see etc/afpd/quota.c
641 AC_DEFINE(HAVE_BROKEN_DBTOB, 1, [Define if dbtob is broken])
643 netatalk_cv_linux_sendfile=no
644 AC_ARG_ENABLE(sendfile,
645 [ --enable-sendfile use sendfile syscall default (no) ],[
646 if test "$enableval" = "yes"; then
647 netatalk_cv_linux_sendfile=yes
649 AC_MSG_RESULT([enabling sendfile syscall])
653 if test x"$netatalk_cv_linux_sendfile" = "xyes"; then
654 AC_CACHE_CHECK([for linux sendfile support],netatalk_cv_HAVE_SENDFILE,[
655 AC_TRY_LINK([#include <sys/sendfile.h>],
660 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
662 netatalk_cv_HAVE_SENDFILE=yes,netatalk_cv_HAVE_SENDFILE=no)])
664 # Try and cope with broken Linux sendfile....
665 AC_CACHE_CHECK([for broken linux sendfile support],netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE,[
667 #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
668 #undef _FILE_OFFSET_BITS
670 #include <sys/sendfile.h>],
675 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
677 netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE=no,netatalk_cv_HAVE_BROKEN_SENDFILE=cross)])
679 if test x"$netatalk_cv_HAVE_SENDFILE" = x"yes"; then
680 AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available])
681 AC_DEFINE(SENDFILE_FLAVOR_LINUX,1,[Whether linux sendfile() API is available])
682 AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() should be used])
683 elif test x"$netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
684 AC_DEFINE(SENDFILE_FLAVOR_LINUX,1,[Whether linux sendfile() API is available])
685 AC_DEFINE(LINUX_BROKEN_SENDFILE_API,1,[Whether (linux) sendfile() is broken])
686 AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile should be used])
688 netatalk_cv_linux_sendfile=no
693 dnl ----- Linux/alpha specific -----
694 if test x"$this_cpu" = "xalpha"; then
695 AC_MSG_RESULT([enabling gcc memcpy bug workaround])
696 AC_DEFINE(HAVE_GCC_MEMCPY_BUG, 1, [Define if memcpy is buggy])
703 dnl ----- Mac OSX specific -----
704 if test x"$this_os" = "xmacosx"; then
705 AC_MSG_RESULT([ * Mac OSX specific configuration])
706 AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
707 AC_DEFINE(HAVE_BROKEN_CPP, 1, [Define if cpp is broken])
708 AC_DEFINE(HAVE_2ARG_DBTOB, 1, [Define if dbtob takes two arguments])
709 dnl AC_DEFINE(NO_DLFCN_H)
710 AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
711 AC_DEFINE(NO_QUOTA_SUPPORT, 1, [Define if Quota support should be disabled])
712 AC_DEFINE(MACOSX_SERVER, 1, [Define if compiling for MacOS X Server])
715 dnl ----- NetBSD specific -----
716 if test x"$this_os" = "xnetbsd"; then
717 AC_MSG_RESULT([ * NetBSD specific configuration])
718 AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
719 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
720 # NetBSD ELF machines don't have to have DLSYM_PREPEND_UNDERSCORE.
721 # If this test is true, it's not an ELF box.
722 # This REALLY should be a configure test.
723 AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
725 CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
728 dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
729 AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
732 dnl ----- OpenBSD specific -----
733 if test x"$this_os" = "xopenbsd"; then
734 AC_MSG_RESULT([ * OpenBSD specific configuration])
735 AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
736 AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
738 dnl ----- OpenBSD does not have crypt.h, uses unistd.h -----
739 AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
742 dnl ----- Solaris specific -----
743 if test x"$this_os" = "xsolaris"; then
744 AC_MSG_RESULT([ * Solaris specific configuration])
745 AC_DEFINE(__svr4__, 1, [Solaris compatibility macro])
746 AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
747 AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
748 AC_DEFINE(SOLARIS, 1, [Solaris compatibility macro])
749 CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
752 AC_MSG_RESULT([enabling Solaris kernel module build])
756 dnl ----- Tru64 specific -----
757 if test x"$this_os" = "xtru64"; then
758 AC_MSG_RESULT([ * Tru64 specific configuration])
759 AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
760 AC_DEFINE(HAVE_64BIT_LONGS, 1, [Define if the data type long has 64 bit])
761 dnl AC_DEFINE(USE_MOUNT_H)
762 AC_DEFINE(USE_OLD_RQUOTA, 1, [Define to use old rquota])
763 dnl AC_DEFINE(USE_UFS_QUOTA_H)
764 AC_DEFINE(TRU64, 1, [Define on Tru64 platforms])
765 AC_DEFINE(_OSF_SOURCE, 1, [Define if the *passwd UAMs should be used])
766 AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Define for Berkeley DB 4])
767 AC_CHECK_LIB(security,set_auth_parameters)
768 CFLAGS="-I\$(top_srcdir)/sys/tru64 $CFLAGS"
773 dnl -- look for openssl
776 dnl -- check for crypt
779 dnl --------------------- check for building PGP UAM module
781 AC_MSG_CHECKING([whether the PGP UAM should be build])
782 AC_ARG_ENABLE(pgp-uam,
783 [ --enable-pgp-uam enable build of PGP UAM module],[
784 if test "$enableval" = "yes"; then
785 if test "$compile_ssl" = "yes"; then
786 AC_DEFINE(UAM_PGP, 1, [Define if the PGP UAM module should be compiled])
798 dnl --------------------- check for building Kerberos v4 UAM module
800 AC_MSG_CHECKING([whether the Kerberos IV UAM should be build])
801 AC_ARG_ENABLE(krb4-uam,
802 [ --enable-krb4-uam enable build of Kerberos v4 UAM module],[
803 if test "$enableval" = "yes"; then
804 AC_DEFINE(UAM_KRB4, 1, [Define if the Kerberos 4 UAM module should be compiled])
815 dnl --------------------- check for building Kerberos V UAM module
817 netatalk_cv_build_krb5_uam=no
818 AC_ARG_ENABLE(krbV-uam,
819 [ --enable-krbV-uam enable build of Kerberos V UAM module],
821 if test x"$enableval" = x"yes"; then
822 NETATALK_GSSAPI_CHECK([
823 netatalk_cv_build_krb5_uam=yes
825 AC_MSG_ERROR([need GSSAPI to build Kerberos V UAM])
832 AC_MSG_CHECKING([whether Kerberos V UAM should be build])
833 if test x"$netatalk_cv_build_krb5_uam" = x"yes"; then
838 AM_CONDITIONAL(USE_GSSAPI, test x"$netatalk_cv_build_krb5_uam" = x"yes")
840 dnl --------------------- overwrite the config files . . . or not.
842 AC_MSG_CHECKING([whether configuration files should be overwritten])
843 AC_ARG_ENABLE(overwrite,
844 [ --enable-overwrite overwrite configuration files during installation],
845 [OVERWRITE_CONFIG="${enable_overwrite}"],
846 [OVERWRITE_CONFIG="no"]
848 AC_MSG_RESULT([$OVERWRITE_CONFIG])
850 dnl --------------------- last minute substitutions
854 AC_SUBST(OVERWRITE_CONFIG)
856 AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
857 AM_CONDITIONAL(COMPILE_TIMELORD, test x$compile_timelord = xyes)
858 AM_CONDITIONAL(COMPILE_A2BOOT, test x$compile_a2boot = xyes)
859 AM_CONDITIONAL(USE_DHX, test x$compile_ssl = xyes)
860 AM_CONDITIONAL(USE_KERBEROS, test x$compile_kerberos = xyes)
861 AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
862 AM_CONDITIONAL(USE_PAM, test x$netatalk_cv_install_pam = xyes)
863 AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
864 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
865 AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
866 AM_CONDITIONAL(USE_NETBSD, test x$sysv_style = xnetbsd)
867 AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
868 AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
869 AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
870 AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
872 dnl --------------------- generate files
876 bin/adv1tov2/Makefile
879 bin/afppasswd/Makefile
882 bin/cnid/cnid2_create
883 bin/getzones/Makefile
884 bin/megatron/Makefile
891 contrib/macusers/Makefile
892 contrib/macusers/macusers
895 contrib/printing/Makefile
896 contrib/shell_utils/Makefile
897 contrib/shell_utils/afpd-mtab.pl
898 contrib/shell_utils/apple_cp
899 contrib/shell_utils/apple_mv
900 contrib/shell_utils/apple_rm
901 contrib/shell_utils/cleanappledouble.pl
902 contrib/shell_utils/netatalkshorternamelinks.pl
903 contrib/timelord/Makefile
904 contrib/a2boot/Makefile
906 distrib/config/Makefile
907 distrib/config/netatalk-config
908 distrib/initscripts/Makefile
914 etc/cnid_dbd/Makefile
916 etc/uams/uams_krb4/Makefile
920 include/atalk/Makefile
922 libatalk/adouble/Makefile
923 libatalk/asp/Makefile
924 libatalk/atp/Makefile
925 libatalk/cnid/Makefile
926 libatalk/cnid/db3/Makefile
927 libatalk/cnid/cdb/Makefile
928 libatalk/cnid/last/Makefile
929 libatalk/cnid/mtab/Makefile
930 libatalk/cnid/dbd/Makefile
931 libatalk/cnid/hash/Makefile
932 libatalk/cnid/tdb/Makefile
933 libatalk/compat/Makefile
934 libatalk/dsi/Makefile
935 libatalk/nbp/Makefile
936 libatalk/netddp/Makefile
937 libatalk/util/Makefile
938 libatalk/tdb/Makefile
939 libatalk/unicode/Makefile
940 libatalk/unicode/charsets/Makefile
950 sys/generic/sys/Makefile
951 sys/netatalk/Makefile
953 sys/netbsd/netatalk/Makefile
955 sys/solaris/Makefile.kernel
959 [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
962 AC_NETATALK_LIBS_SUMMARY
963 AC_NETATALK_CONFIG_SUMMARY