1 dnl $Id: configure.in,v 1.179.2.3.2.4 2003-09-13 02:46:27 bfernhomberg Exp $
2 dnl configure.in for netatalk
4 AC_INIT(bin/adv1tov2/adv1tov2.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, socket)
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)
73 AC_MSG_RESULT([ LIBS = $LIBS])
76 # Check presence of some functions
78 # Check for XPG4 access() function
79 # Be sure to test before adding AFS libs in LIBS path as AFS lib
80 # has such a function that works only on AFS filesystems.
81 AC_CHECK_FUNCS(access)
83 AC_CHECK_FUNCS(pread pwrite)
85 dnl Checks for header files.
89 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)
90 AC_CHECK_HEADER(sys/cdefs.h,,
91 AC_MSG_RESULT([enabling generic cdefs.h from tree])
92 CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
94 AC_CHECK_HEADERS(langinfo.h locale.h)
96 dnl Checks for typedefs, structures, and compiler characteristics.
108 dnl Checks for library functions.
110 AC_PROG_GCC_TRADITIONAL
117 AC_CHECK_FUNCS(getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strcasestr strstr strtoul setpgrp strchr memcpy)
119 AC_CHECK_FUNCS(backtrace_symbols)
120 AC_CHECK_FUNCS(setlocale nl_langinfo)
121 AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
124 dnl Checks for (v)snprintf
125 NETATALK_SNPRINTF_CHECK
126 AC_MSG_RESULT([ LIBS = $LIBS])
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 AC_ARG_WITH(admin-group,
135 [ --disable-admin-group disable admin group],
136 if test "$enableval" = "no"; then
137 AC_DEFINE(ADMIN_GRP, 0, [Define if the admin group should be enabled])
138 AC_MSG_RESULT([disabling administrative group support])
147 [ --with-logfile=PATH path for file used by logger [/var/log/netatalk.log]
148 use --without-logfile to disable logger],
149 if test "$withval" = "no"; then
150 AC_DEFINE(DISABLE_LOGGER, 1, [Define if the logger should not be used])
151 AC_MSG_RESULT([logger disabled])
152 elif test "$withval" != "yes"; then
153 AC_DEFINE_UNQUOTED(LOGFILEPATH, "$withval", [Path to the log file])
154 AC_MSG_RESULT([logfile set to $withval])
156 AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log", [Path to the log file])
157 AC_MSG_RESULT([logfile set to default])
159 AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log", [Path to the log file])
160 AC_MSG_RESULT([logfile set to default])
163 AC_ARG_WITH(cracklib,
164 [ --with-cracklib=DICT enable/set location of cracklib dictionary],
165 if test "x$withval" != "xno" ; then
167 AC_CHECK_LIB(crack, main,
168 AC_DEFINE(USE_CRACKLIB, 1, [Define if cracklib should be used])
170 AC_MSG_RESULT([enabling cracklib support])
171 if test "$cracklib" = "yes"; then
172 cracklib="/usr/lib/cracklib_dict"
174 AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
175 [path to cracklib dictionary])
176 AC_MSG_RESULT([setting cracklib dictionary to $cracklib]),
177 AC_MSG_ERROR([cracklib not found!])
183 [ --disable-ddp disable DDP],
184 if test "$enableval" = "no"; then
185 AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
186 AC_MSG_RESULT([disabling DDP])
190 AC_ARG_ENABLE(debug1,
191 [ --enable-debug1 enable debug code],
192 if test "$enableval" != "no"; then
193 if test "$enableval" = "yes"; then
194 AC_DEFINE(DEBUG1, 1, [Define if debugging information should be included])
196 AC_DEFINE_UNQUOTED(DEBUG1, $enableval, [Define if debugging information should be included])
198 AC_MSG_RESULT([enabling debugging code])
203 [ --enable-debug enable verbose debug code],
204 if test "$enableval" != "no"; then
205 if test "$enableval" = "yes"; then
206 AC_DEFINE(DEBUG, 1, [Define if verbose debugging information should be included])
208 AC_DEFINE_UNQUOTED(DEBUG, $enableval, [Define if verbose debugging information should be included])
210 AC_MSG_RESULT([enabling verbose debugging code])
216 [ --enable-afp3 enable AFP 3.x calls],
217 if test "$enableval" = "yes"; then
219 AC_DEFINE(AFP3x, 1, [Define to enable AFP 3.x support])
220 AC_MSG_RESULT([enabling AFP 3.x calls])
224 if test "$afp3" = "yes"; then
228 NETATALK_GSSAPI_CHECK
231 dnl ----------- A NOTE ABOUT DROPKLUDGE
232 dnl The trouble with this fix is that if you know what the file is called, it
233 dnl can be read from the Unix side. That's okay for most academic institutions
234 dnl since the students don't have telnet access to the Mac servers. There is
235 dnl currently no one working on further development/fixes of DROPKLUDGE.
238 AC_ARG_ENABLE(dropkludge,
239 [ --enable-dropkludge enable the experimental dropbox fix (INSECURE!) ],
240 if test "$enableval" = "yes"; then
241 AC_DEFINE(DROPKLUDGE, 1, [Define if you want to use the experimental dropkludge support])
242 AC_MSG_RESULT([enabling experimental dropbox support])
246 AC_ARG_ENABLE(force-uidgid,
247 [ --enable-force-uidgid allow forcing of uid/gid per volume (BROKEN) ],
248 if test "$enableval" = "yes"; then
249 AC_DEFINE(FORCE_UIDGID, 1, [Define if you want forcing of uid/gid per volume])
250 AC_MSG_RESULT([enabling forcing of uid/gid per volume])
254 dnl Don't use BDB unless it's needed
257 dnl Determine whether or not to use DB3 Concurrent Data Store
258 AC_MSG_CHECKING([whether or not to use DB3 Concurrent Data Store])
259 AC_ARG_WITH(cnid-cdb-backend,
260 [ --with-cnid-cdb-backend enable CNID with Concurrent DB3 Data Store],
261 if test x"$withval" = x"no"; then
269 if test $use_cdb_backend = yes; then
271 AC_DEFINE(CNID_BACKEND_CDB, 1, [Define if CNID Concurrent DB3 backend should be compiled.])
272 DEFAULT_CNID_SCHEME=cdb
278 dnl Determine whether or not to use Database Daemon CNID backend
279 AC_MSG_CHECKING([whether or not to use Database Daemon CNID backend])
280 AC_ARG_WITH(cnid-dbd-backend,
281 [ --with-cnid-dbd-backend enable CNID with Database Daemon Data Store],
282 if test x"$withval" = x"no"; then
293 dnl Determine whether or not to use with transaction support in Database Daemon
294 AC_MSG_CHECKING([whether or not to use Database Daemon with transaction support])
295 AC_ARG_WITH(cnid-dbd-txn,
296 [ --with-cnid-dbd-txn enable transaction support for dbd backend],
297 if test x"$withval" = x"no"; then
308 if test $use_dbd_txn = yes; then
310 AC_DEFINE(CNID_BACKEND_DBD_TXN, 1, [Define if CNID Database Daemon backend has transaction support])
312 if test x"$use_dbd_backend" = x; then
317 if test $use_dbd_backend = yes; then
318 AC_DEFINE(CNID_BACKEND_DBD, 1, [Define if CNID Database Daemon backend should be compiled.])
319 if test x"$DEFAULT_CNID_SCHEME" = x; then
320 DEFAULT_CNID_SCHEME=dbd
325 dnl Determine whether or not to use DB3 transactional data store
326 AC_MSG_CHECKING([whether or not to use DB3 transactional DB store])
327 AC_ARG_WITH(cnid-db3-backend,
328 [ --with-cnid-db3-backend enable CNID with transactional DB3 Data Store],
329 if test x"$withval" = x"no"; then
337 if test $use_db3_backend = yes; then
339 AC_DEFINE(CNID_BACKEND_DB3, 1, [Define if CNID transactional DB3 backend should be compiled.])
340 if test x"$DEFAULT_CNID_SCHEME" = x; then
341 DEFAULT_CNID_SCHEME=db3
348 dnl Determine whether or not to use LAST DID scheme
349 AC_MSG_CHECKING([whether or not to use LAST DID scheme])
350 AC_ARG_WITH(cnid-last-backend,
351 [ --with-cnid-last-backend enable LAST CNID scheme],
352 if test x"$withval" = x"no"; then
360 if test $use_last_backend = yes; then
362 AC_DEFINE(CNID_BACKEND_LAST, 1, [Define if CNID LAST scheme backend should be compiled.])
363 if test x"$DEFAULT_CNID_SCHEME" = x; then
364 DEFAULT_CNID_SCHEME=last
370 dnl Determine whether or not to use HASH DID scheme
371 AC_MSG_CHECKING([whether or not to use HASH DID scheme])
372 AC_ARG_WITH(cnid-hash-backend,
373 [ --with-cnid-hash-backend enable HASH CNID scheme],
374 if test x"$withval" = x"no"; then
382 if test $use_hash_backend = yes; then
384 AC_DEFINE(CNID_BACKEND_HASH, 1, [Define if CNID HASH scheme backend should be compiled.])
385 if test x"$DEFAULT_CNID_SCHEME" = x; then
386 DEFAULT_CNID_SCHEME=hash
392 dnl Determine whether or not to use TDB DID scheme
393 AC_MSG_CHECKING([whether or not to use TDB DID scheme])
394 AC_ARG_WITH(cnid-tdb-backend,
395 [ --with-cnid-tdb-backend enable DID CNID scheme],
396 if test x"$withval" = x"no"; then
404 if test $use_tdb_backend = yes; then
406 AC_DEFINE(CNID_BACKEND_TDB, 1, [Define if CNID TDB scheme backend should be compiled.])
407 if test x"$DEFAULT_TDB_SCHEME" = x; then
408 DEFAULT_TDB_SCHEME=tdb
414 dnl Determine whether or not to use MTAB DID scheme
415 AC_MSG_CHECKING([whether or not to use MTAB DID scheme])
416 AC_ARG_WITH(cnid-mtab-backend,
417 [ --with-cnid-mtab-backend enable MTAB CNID scheme],
418 if test x"$withval" = x"no"; then
426 if test $use_mtab_backend = yes; then
428 AC_DEFINE(CNID_BACKEND_MTAB, 1, [Define if CNID MTAB scheme backend should be compiled.])
429 if test x"$DEFAULT_CNID_SCHEME" = x; then
430 DEFAULT_CNID_SCHEME=mtab
436 dnl Set default DID scheme
437 AC_MSG_CHECKING([default DID scheme])
438 AC_ARG_WITH(cnid-default-backend,
439 [ --with-cnid-default-backend=val set default DID scheme],
440 if test x"$withval" = x; then
441 AC_MSG_RESULT([ignored])
443 DEFAULT_CNID_SCHEME=$withval
444 AC_MSG_RESULT($DEFAULT_CNID_SCHEME)
446 ,AC_MSG_RESULT($DEFAULT_CNID_SCHEME)
449 if test x"$DEFAULT_CNID_SCHEME" = x; then
450 AC_MSG_ERROR([No DID schemes compiled in ])
453 #eval "default_scheme_selected=\$use_$DEFAULT_CNID_SCHEME_backend"
454 #echo "default_scheme_selected=[$default_scheme_selected]"
455 #if test x"$default_scheme_selected" = xyes; then
456 # AC_MSG_CHECKING([Checking whether default CNID scheme has been activated])
457 # AC_MSG_RESULT([yes])
459 # AC_MSG_ERROR([Default CNID scheme is disabled ! Enable it or select other as default.])
462 AC_DEFINE_UNQUOTED(DEFAULT_CNID_SCHEME, "$DEFAULT_CNID_SCHEME", [Default CNID scheme to be used])
464 dnl Check for Berkeley DB library
465 if test "x$bdb_required" = "xyes"; then
466 AC_PATH_BDB(, [AC_MSG_ERROR([Berkeley DB library not found!])])
469 dnl Check for quota support
472 dnl Check for optional server location protocol support (used by MacOS X)
475 AC_MSG_RESULT([ LIBS = $LIBS])
476 dnl Check for PAM libs
478 PAPD_LIBS="$PAPD_LIBS $PAM_LIBS"
479 AFPD_LIBS="$AFPD_LIBS $PAM_LIBS"
482 AC_DEFINE(USE_PAM, 1, [Define to enable PAM support])
485 AC_MSG_CHECKING([whether shadow support should be enabled])
487 [ --with-shadow enable shadow password support],
488 [shadowpw="$withval"],
491 if test "x$shadowpw" = "xyes"; then
492 AC_DEFINE(SHADOWPW, 1, [Define if shadow passwords should be used])
494 AC_MSG_RESULT([$shadowpw])
496 AC_ARG_ENABLE(shell-check,
497 [ --disable-shell-check disable checking for a valid shell],
498 if test "$enableval" = "no"; then
499 AC_DEFINE(DISABLE_SHELLCHECK, 1, [Define if shell check should be disabled])
500 AC_MSG_RESULT([disabling valid shell check])
504 #AC_ARG_WITH(tcp-wrappers,
505 # [ --with-tcp-wrappers enable TCP wrappers support],[
506 # AC_CHECK_HEADERS(tcpd.h)
507 # AC_CHECK_LIB(wrap, tcpd_warn,
508 # AC_DEFINE(TCPWRAP, 1, [Define if TCP wrappers should be used])
509 # AFPD_LIBS="$AFPD_LIBS -lwrap"
510 # AC_MSG_RESULT([enabling TCP wrappers support])
513 NETATALK_TCP_WRAPPERS
515 AC_ARG_ENABLE(redhat,
516 [ --enable-redhat use redhat-style sysv configuration ],
517 if test "$enableval" = "yes"; then
520 AC_MSG_RESULT([enabling redhat-style sysv support])
524 [ --enable-suse use suse-style sysv configuration ],
525 if test "$enableval" = "yes"; then
528 AC_MSG_RESULT([enabling suse-style sysv support])
531 AC_ARG_ENABLE(cobalt,
532 [ --enable-cobalt use cobalt-style sysv configuration ],
533 if test "$enableval" = "yes"; then
536 AC_MSG_RESULT([enabling cobalt-style sysv support])
539 AC_ARG_ENABLE(netbsd,
540 [ --enable-netbsd use NetBSD-style rc.d configuration ],
541 if test "x$enableval" = "xyes"; then
544 AC_MSG_RESULT([enabling NetBSD-style rc.d support])
547 dnl ----- timelord compilation (disabled by default)
548 AC_MSG_CHECKING([whether timelord should be compiled])
550 AC_ARG_ENABLE(timelord,
551 [ --enable-timelord enable compilation of timelord server],
552 [compile_timelord="$enableval"],
553 [compile_timelord="no"]
555 AC_MSG_RESULT([$compile_timelord])
557 dnl ----- a2boot compilation (disabled by default)
558 AC_MSG_CHECKING([whether a2boot should be compiled])
560 AC_ARG_ENABLE(a2boot,
561 [ --enable-a2boot enable compilation of Apple2 boot server],
562 [compile_a2boot="$enableval"],
563 [compile_a2boot="no"]
565 AC_MSG_RESULT([$compile_a2boot])
567 AC_ARG_WITH(uams-path,
568 [ --with-uams-path=PATH path to UAMs [[PKGCONF/uams]]],
569 uams_path="$withval",
570 uams_path="${PKGCONFDIR}/uams"
573 dnl --------------------------------------------------------------------------
574 dnl FHS stuff has to be done last because it overrides other defaults
575 dnl --------------------------------------------------------------------------
578 [ --enable-fhs use Filesystem Hierarchy Standard (FHS) compatibility],
579 if test "$enableval" = "yes"; then
580 uams_path="${libdir}/netatalk"
582 PKGCONFDIR=${sysconfdir}/netatalk
583 SERVERTEXT="${PKGCONFDIR}/msg"
585 mandir="/usr/share/man"
586 AC_DEFINE(FHS_COMPATIBILITY, 1, [Define if you want compatibily with the FHS])
588 AC_MSG_RESULT([enabling Filesystem Hierarchy Standard (FHS) compatibility])
591 dnl --------------------------------------------------------------------------
592 dnl post-FHS substitutions, etc
593 dnl --------------------------------------------------------------------------
596 AC_DEFINE_UNQUOTED(UAMS_PATH, "${uams_path}",
597 [path to UAMs [default=PKGCONF/uams]])
598 UAMS_PATH="${uams_path}"
601 dnl --------------------------------------------------------------------------
602 dnl drop in includes for top level directory structures here...
603 dnl --------------------------------------------------------------------------
605 dnl Note: $(top_srcdir)/include should be added before all other includes
606 dnl so that includes from that directory a preferred to includes from
607 dnl /usr/include or similar places.
608 LIBS="$LIBS -L\$(top_srcdir)/libatalk"
609 CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
611 dnl --------------------------------------------------------------------------
612 dnl specific configuration comes in here:
613 dnl --------------------------------------------------------------------------
615 dnl ac_cv_target_os is now host_os, ac_cv_target_cpu is now host_cpu
617 dnl --------------------- determine operating system from "target"
619 *aix*) this_os=aix ;;
620 *freebsd*) this_os=freebsd ;;
621 *hpux11*) this_os=hpux11 ;;
622 *irix*) this_os=irix ;;
623 *linux*) this_os=linux ;;
624 *osx*) this_os=macosx ;;
625 *darwin*) this_os=macosx ;;
626 *netbsd*) this_os=netbsd ;;
627 *openbsd*) this_os=openbsd ;;
628 *osf*) this_os=tru64 ;;
629 *solaris*) this_os=solaris ;;
633 i386|i486|i586|i686|k7) this_cpu=x86 ;;
634 alpha) this_cpu=alpha ;;
635 mips) this_cpu=mips ;;
636 powerpc|ppc) this_cpu=ppc ;;
639 dnl --------------------- operating system specific flags (port from sys/*)
641 dnl ----- AIX specific -----
642 if test x"$this_os" = "xaix"; then
643 AC_MSG_RESULT([ * AIX specific configuration])
644 AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
646 dnl This is probably a lie; AIX 4.3 supports a 64-bit long
647 dnl compilation environment. It's enough to get things defined
648 dnl right in endian.h provided that long long is supported, though.
649 AC_DEFINE(HAVE_32BIT_LONGS, 1, [Define if the data type long has 32 bit])
652 dnl ----- FreeBSD specific -----
653 if test x"$this_os" = "xfreebsd"; then
654 AC_MSG_RESULT([ * FreeBSD specific configuration])
655 AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
656 AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics])
658 AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
661 dnl ----- HP-UX 11 specific -----
662 if test x"$this_os" = "xhpux11"; then
663 AC_MSG_RESULT([ * HP-UX 11 specific configuration])
665 AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
666 AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
669 dnl ----- IRIX specific -----
670 if test x"$this_os" = "xirix"; then
671 AC_MSG_RESULT([ * IRIX specific configuration])
673 AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
676 dnl ----- Linux specific -----
677 if test x"$this_os" = "xlinux"; then
678 AC_MSG_RESULT([ * Linux specific configuration])
680 dnl ----- check if we need the quotactl wrapper
681 # AC_CHECK_HEADERS(sys/quota.h linux/quota.h)
682 # AC_CHECK_FUNC(quotactl,,
683 # AC_DEFINE(NEED_QUOTACTL_WRAPPER, 1, [Define if the quotactl wrapper is needed])
684 # AC_MSG_RESULT([enabling quotactl wrapper])
687 # For quotas on Linux XFS filesystems
688 AC_CHECK_HEADERS(linux/xqm.h linux/xfs_fs.h)
689 AC_CHECK_HEADERS(xfs/libxfs.h xfs/xqm.h xfs/xfs_fs.h)
691 AC_CHECK_HEADERS(linux/dqblk_xfs.h)
694 dnl ----- as far as I can tell, dbtob always does the wrong thing
695 dnl ----- on every single version of linux I've ever played with.
696 dnl ----- see etc/afpd/quota.c
697 AC_DEFINE(HAVE_BROKEN_DBTOB, 1, [Define if dbtob is broken])
700 AC_ARG_ENABLE(sendfile,
701 [ --enable-sendfile use sendfile syscall default (no) ],
702 if test "$enableval" = "yes"; then
705 AC_MSG_RESULT([enabling sendfile syscall])
708 if test x"$linux_sendfile" = "xyes"; then
709 dnl --- added by Yoshinobu Ishizaki (2001.03.13) ---
710 dnl ----- check if version is newer than 2.2.x
712 majorvers="`uname -r | sed 's/\([0-9]\)..*/\1/'`"
713 minorvers="`uname -r | sed 's/[0-9]\.\([0-9]\)\..*/\1/'`"
714 if [ $majorvers -ge 2 ]; then
715 if [ $minorvers -ge 2 ]; then
717 AC_MSG_RESULT([ * found Linux 2.2.x or higher])
718 AC_DEFINE(SENDFILE_FLAVOR_LINUX, 1, [Define if the sendfile() function uses Linux semantics])
720 AC_MSG_RESULT([ * found Linux 2.0.x ])
725 dnl ----- Linux/alpha specific -----
726 if test x"$this_cpu" = "xalpha"; then
727 AC_MSG_RESULT([enabling gcc memcpy bug workaround])
728 AC_DEFINE(HAVE_GCC_MEMCPY_BUG, 1, [Define if memcpy is buggy])
735 dnl ----- Mac OSX specific -----
736 if test x"$this_os" = "xmacosx"; then
737 AC_MSG_RESULT([ * Mac OSX specific configuration])
738 AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
739 AC_DEFINE(HAVE_BROKEN_CPP, 1, [Define if cpp is broken])
740 AC_DEFINE(HAVE_2ARG_DBTOB, 1, [Define if dbtob takes two arguments])
741 dnl AC_DEFINE(NO_DLFCN_H)
742 AC_DEFINE(MACOSX_SERVER, 1, [Define if compiling for MacOS X Server])
745 dnl ----- NetBSD specific -----
746 if test x"$this_os" = "xnetbsd"; then
747 AC_MSG_RESULT([ * NetBSD specific configuration])
748 AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
749 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
750 # NetBSD ELF machines don't have to have DLSYM_PREPEND_UNDERSCORE.
751 # If this test is true, it's not an ELF box.
752 # This REALLY should be a configure test.
753 AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
755 CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
758 dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
759 AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
760 AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
763 dnl ----- OpenBSD specific -----
764 if test x"$this_os" = "xopenbsd"; then
765 AC_MSG_RESULT([ * OpenBSD specific configuration])
766 AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
767 AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
769 dnl ----- OpenBSD does not have crypt.h, uses unistd.h -----
770 AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
771 AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
774 dnl ----- Solaris specific -----
775 if test x"$this_os" = "xsolaris"; then
776 AC_MSG_RESULT([ * Solaris specific configuration])
777 AC_DEFINE(__svr4__, 1, [Solaris compatibility macro])
778 AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
779 AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
780 AC_DEFINE(SOLARIS, 1, [Solaris compatibility macro])
781 CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
784 AC_MSG_RESULT([enabling Solaris kernel module build])
788 dnl ----- Tru64 specific -----
789 if test x"$this_os" = "xtru64"; then
790 AC_MSG_RESULT([ * Tru64 specific configuration])
791 AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
792 AC_DEFINE(HAVE_64BIT_LONGS, 1, [Define if the data type long has 64 bit])
793 dnl AC_DEFINE(USE_MOUNT_H)
794 AC_DEFINE(USE_OLD_RQUOTA, 1, [Define to use old rquota])
795 dnl AC_DEFINE(USE_UFS_QUOTA_H)
796 AC_DEFINE(TRU64, 1, [Define on Tru64 platforms])
797 AC_CHECK_LIB(security,set_auth_parameters)
798 CFLAGS="-I\$(top_srcdir)/sys/tru64 $CFLAGS"
803 dnl -- look for openssl
804 AC_MSG_RESULT([ LIBS = $LIBS])
807 dnl --------------------- check for building PGP UAM module
809 AC_ARG_ENABLE(pgp-uam,
810 [ --enable-pgp-uam enable build of PGP UAM module],
811 if test "$enableval" = "yes"; then
812 if test "$compile_ssl" = "yes"; then
813 AC_DEFINE(UAM_PGP, 1, [Define if the PGP UAM module should be compiled])
815 AC_MSG_RESULT([enabling build with PGP UAM module])
820 dnl --------------------- check for building Kerberos v4 UAM module
822 AC_ARG_ENABLE(krb4-uam,
823 [ --enable-krb4-uam enable build of Kerberos v4 UAM module],
824 if test "$enableval" = "yes"; then
825 AC_DEFINE(UAM_KRB4, 1, [Define if the Kerberos 4 UAM module should be compiled])
827 AC_MSG_RESULT([enabling build with Kerberos v4 UAM module])
830 dnl --------------------- overwrite the config files . . . or not.
832 AC_MSG_CHECKING([whether configuration files should be overwritten])
833 AC_ARG_ENABLE(overwrite,
834 [ --enable-overwrite overwrite configuration files during installation],
835 [OVERWRITE_CONFIG="${enable_overwrite}"],
836 [OVERWRITE_CONFIG="no"]
838 AC_MSG_RESULT([$OVERWRITE_CONFIG])
840 dnl --------------------- last minute substitutions
846 AC_SUBST(OVERWRITE_CONFIG)
848 AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
849 AM_CONDITIONAL(COMPILE_TIMELORD, test x$compile_timelord = xyes)
850 AM_CONDITIONAL(COMPILE_A2BOOT, test x$compile_a2boot = xyes)
851 AM_CONDITIONAL(USE_DHX, test x$compile_ssl = xyes)
852 AM_CONDITIONAL(USE_KERBEROS, test x$compile_kerberos = xyes)
853 AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
854 AM_CONDITIONAL(USE_PAM, test x$compile_pam = xyes)
855 AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
856 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
857 AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
858 AM_CONDITIONAL(USE_NETBSD, test x$sysv_style = xnetbsd)
859 AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
860 AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
861 AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
862 AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
864 dnl --------------------- generate files
868 bin/adv1tov2/Makefile
871 bin/afppasswd/Makefile
874 bin/getzones/Makefile
875 bin/megatron/Makefile
881 contrib/macusers/Makefile
882 contrib/macusers/macusers
885 contrib/printing/Makefile
886 contrib/shell_utils/Makefile
887 contrib/shell_utils/afpd-mtab.pl
888 contrib/shell_utils/apple_cp
889 contrib/shell_utils/apple_mv
890 contrib/shell_utils/apple_rm
891 contrib/shell_utils/cleanappledouble.pl
892 contrib/shell_utils/netatalkshorternamelinks.pl
893 contrib/timelord/Makefile
894 contrib/a2boot/Makefile
896 distrib/config/Makefile
897 distrib/config/netatalk-config
898 distrib/initscripts/Makefile
904 etc/cnid_dbd/Makefile
906 etc/uams/uams_krb4/Makefile
910 include/atalk/Makefile
912 libatalk/adouble/Makefile
913 libatalk/asp/Makefile
914 libatalk/atp/Makefile
915 libatalk/cnid/Makefile
916 libatalk/cnid/db3/Makefile
917 libatalk/cnid/cdb/Makefile
918 libatalk/cnid/last/Makefile
919 libatalk/cnid/mtab/Makefile
920 libatalk/cnid/dbd/Makefile
921 libatalk/cnid/hash/Makefile
922 libatalk/cnid/tdb/Makefile
923 libatalk/compat/Makefile
924 libatalk/dsi/Makefile
925 libatalk/nbp/Makefile
926 libatalk/netddp/Makefile
927 libatalk/util/Makefile
928 libatalk/tdb/Makefile
929 libatalk/unicode/Makefile
930 libatalk/unicode/charsets/Makefile
940 sys/generic/sys/Makefile
941 sys/netatalk/Makefile
943 sys/netbsd/netatalk/Makefile
945 sys/solaris/Makefile.kernel
949 [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
953 #################################################
954 # Display summary of libraries detected
956 AC_MSG_RESULT([Using libraries:])
957 AC_MSG_RESULT([ LIBS = $LIBS])
958 AC_MSG_RESULT([ SSL_LIBS = $SSL_LIBS])
959 AC_MSG_RESULT([ GSSAPI_LIBS = $GSSAPI_LIBS])
960 AC_MSG_RESULT([ BDB_LIBS = $BDB_LIBS])
961 AC_MSG_RESULT([ AFPD_LIBS= $AFPD_LIBS])
962 AC_MSG_RESULT([ PAPD_LIBS= $PAPD_LIBS])
963 AC_MSG_RESULT([ CFLAGS = $CFLAGS])