]> arthur.barton.de Git - netatalk.git/blob - configure.in
merged logging code into main branch. use configure option --without-logfile to...
[netatalk.git] / configure.in
1 dnl $Id: configure.in,v 1.145 2002-01-04 04:45:46 sibaz Exp $
2 dnl configure.in for netatalk
3
4 AC_INIT(bin/adv1tov2/adv1tov2.c)
5
6 NETATALK_VERSION=`cat VERSION`
7 AC_SUBST(NETATALK_VERSION)
8
9 AC_CANONICAL_SYSTEM
10 AM_INIT_AUTOMAKE(netatalk, ${NETATALK_VERSION})
11 AM_CONFIG_HEADER(config.h)
12
13 dnl Checks for programs.
14 AC_PROG_AWK
15 AC_PROG_CC
16 AC_PROG_INSTALL
17 AC_PROG_LN_S
18 AC_PROG_MAKE_SET
19 AC_LIBTOOL_DLOPEN
20 AM_PROG_LIBTOOL
21
22 dnl *********************************************************************
23 dnl FIXME! FIXME! These should be selectable properly, and should produce
24 dnl the proper flags and defines...
25 dnl *********************************************************************
26
27 dnl Checks for libraries.
28 dnl Replace `main' with a function in -labs:
29 AC_CHECK_LIB(abs, main)
30 dnl Replace `main' with a function in -laudit:
31 AC_CHECK_LIB(audit, main)
32 dnl Replace `main' with a function in -lauth:
33 AC_CHECK_LIB(auth, main)
34 dnl Replace `main' with a function in -lcmd:
35 AC_CHECK_LIB(cmd, main)
36 dnl Replace `main' with a function in -lcrypt:
37 AC_CHECK_LIB(crypt, main)
38 dnl Replace `main' with a function in -ld:
39 AC_CHECK_LIB(d, main)
40 dnl Replace `main' with a function in -ldl:
41 AC_CHECK_LIB(dl, main)
42 dnl Replace `main' with a function in -lkauth:
43 AC_CHECK_LIB(kauth, main)
44 dnl Replace `main' with a function in -lkrb:
45 AC_CHECK_LIB(krb, main)
46 dnl Replace `main' with a function in -llwp:
47 AC_CHECK_LIB(lwp, main)
48 dnl Replace `main' with a function in -ln:
49 AC_CHECK_LIB(n, main)
50 dnl Replace `main' with a function in -lnsl:
51 AC_CHECK_LIB(nsl, main)
52 dnl Replace `main' with a function in -lprot:
53 AC_CHECK_LIB(prot, main)
54 dnl Replace `main' with a function in -lrx:
55 AC_CHECK_LIB(rx, main)
56 dnl Replace `main' with a function in -lrxkad:
57 AC_CHECK_LIB(rxkad, main)
58 dnl Replace `main' with a function in -lsocket:
59 AC_CHECK_LIB(socket, main)
60 dnl Replace `main' with a function in -lsys:
61 AC_CHECK_LIB(sys, main)
62 dnl Replace `main' with a function in -lubik:
63 AC_CHECK_LIB(ubik, main)
64
65 #
66 # Check presence of some functions
67 #
68 # Check for XPG4 access() function
69 # Be sure to test before adding AFS libs in LIBS path as AFS lib
70 # has such a function that works only on AFS filesystems.
71 AC_CHECK_FUNCS(access)
72
73 dnl Checks for header files.
74 AC_HEADER_DIRENT
75 AC_HEADER_STDC
76 AC_HEADER_SYS_WAIT
77 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)
78 AC_CHECK_HEADER(sys/cdefs.h,,
79         AC_MSG_RESULT([enabling generic cdefs.h from tree])
80         CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
81 )
82
83 dnl Checks for typedefs, structures, and compiler characteristics.
84 AC_C_CONST
85 AC_TYPE_UID_T
86 AC_C_INLINE
87 AC_TYPE_MODE_T
88 AC_TYPE_OFF_T
89 AC_TYPE_PID_T
90 AC_TYPE_SIZE_T
91 AC_STRUCT_ST_RDEV
92 AC_HEADER_TIME
93 AC_STRUCT_TM
94
95 dnl Checks for library functions.
96 AC_TYPE_GETGROUPS
97 AC_PROG_GCC_TRADITIONAL
98 AC_FUNC_MEMCMP
99 AC_HEADER_MAJOR
100 AC_FUNC_MMAP
101 AC_TYPE_SIGNAL
102 AC_FUNC_UTIME_NULL
103 AC_FUNC_WAIT3
104 AC_CHECK_FUNCS(flock getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strstr strtoul setpgrp strchr memcpy)
105 AC_FUNC_SETPGRP
106
107 dnl --------------------------------------------------------------------------
108 dnl specific configuration comes in here:
109 dnl --------------------------------------------------------------------------
110
111 AC_DEFINE(ADMIN_GRP, 1)
112
113 AC_ARG_WITH(admin-group,
114         [  --disable-admin-group   disable admin group],
115         if test "$enableval" = "no"; then
116                 AC_DEFINE(ADMIN_GRP, 0)
117                 AC_MSG_RESULT([disabling administrative group support])
118         fi
119  )
120
121 AC_ARG_ENABLE(afs,
122         [  --enable-afs            enable AFS support],
123         if test "$enableval" = "yes"; then
124                 AC_DEFINE(AFS, 1)
125                 AC_MSG_RESULT([enabling AFS support])
126         fi
127 )
128
129 AC_ARG_WITH(pkgconfdir,
130         [  --with-pkgconfdir=DIR   package specific configuration in DIR
131                           [[SYSCONF/netatalk]]],
132                 PKGCONFDIR="$withval",
133                 PKGCONFDIR="${sysconfdir}/netatalk"
134 )
135
136 AC_ARG_WITH(logfile,
137         [  --with-logfile=PATH     path for file used by logger [/var/log/netatalk.log]
138                           use --without-logfile to disable logger],
139         if test "$withval" = "no"; then
140                 AC_DEFINE(DISABLE_LOGGER, 1)
141                 AC_MSG_RESULT([logger disabled])
142         elif test "$withval" != "yes"; then
143                 AC_DEFINE_UNQUOTED(LOGFILEPATH, $withval)
144                 AC_MSG_RESULT([logfile set to $withval])
145         else
146                 AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log")
147                 AC_MSG_RESULT([logfile set to default]) 
148         fi,
149                 AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log")
150                 AC_MSG_RESULT([logfile set to default])
151 )
152
153 AC_ARG_WITH(cracklib,
154         [  --with-cracklib=DICT    enable/set location of cracklib dictionary],
155         if test "x$withval" != "xno" ; then
156                 cracklib="$withval"
157                 AC_CHECK_LIB(crack, main,
158                         AC_DEFINE(USE_CRACKLIB) 
159                         LIBS="$LIBS -lcrack"
160                         AC_MSG_RESULT([enabling cracklib support])
161                         if test "$cracklib" = "yes"; then
162                                 cracklib="/usr/lib/cracklib_dict"
163                         fi
164                         AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
165                                 [path to cracklib dictionary])
166                         AC_MSG_RESULT([setting cracklib dictionary to $cracklib]),
167                         AC_MSG_ERROR([cracklib not found!])
168                 )
169         fi
170 )
171
172 AC_ARG_ENABLE(ddp,
173         [  --disable-ddp           disable DDP],
174         if test "$enableval" = "no"; then 
175                 AC_DEFINE(NO_DDP, 1)
176                 AC_MSG_RESULT([disabling DDP])
177         fi
178 )
179
180 AC_ARG_ENABLE(debug,
181         [  --enable-debug          enable debug code],
182         if test "$enableval" != "no"; then
183                 if test "$enableval" = "yes"; then
184                         AC_DEFINE(DEBUG, 1)
185                 else
186                         AC_DEFINE_UNQUOTED(DEBUG, $enableval)
187                 fi 
188                 AC_MSG_RESULT([enabling debugging code])
189         else
190                 AC_DEFINE(DEBUG, 0)
191         fi
192 )
193
194
195 dnl ----------- A NOTE ABOUT DROPKLUDGE
196 dnl The trouble with this fix is that if you know what the file is called, it
197 dnl can be read from the Unix side.  That's okay for most academic institutions
198 dnl since the students don't have telnet access to the Mac servers.  There is
199 dnl currently no one working on further development/fixes of DROPKLUDGE.
200 dnl -----------
201
202 AC_ARG_ENABLE(dropkludge,
203         [  --enable-dropkludge     enable the experimental dropbox fix (INSECURE!) ],
204         if test "$enableval" = "yes"; then 
205                 AC_DEFINE(DROPKLUDGE, 1)
206                 AC_MSG_RESULT([enabling experimental dropbox support])
207         fi
208 )
209
210 AC_ARG_ENABLE(force-uidgid,
211         [  --enable-force-uidgid   allow forcing of uid/gid per volume (BROKEN) ],
212         if test "$enableval" = "yes"; then
213                 AC_DEFINE(FORCE_UIDGID, 1)
214                 AC_MSG_RESULT([enabling forcing of uid/gid per volume])
215         fi
216 )
217
218 dnl Don't use DB3 unless it's needed
219 db3_required=no
220
221
222 dnl Determine DID scheme
223 AC_MSG_CHECKING([for DID scheme to use])
224 AC_ARG_WITH(did,
225         [  --with-did=SCHEME       set DID scheme (last,hash,mtab,cnid)],
226         [ did_scheme="$withval" ],
227         [ did_scheme="last" ]
228 )
229
230 if test "x$did_scheme" = "xlast"; then
231         AC_DEFINE(USE_LASTDID, 1)
232         AC_MSG_RESULT([last])
233 elif test "x$did_scheme" = "xhash"; then
234         AC_MSG_RESULT([device/inode-based hashing])
235 elif test "x$did_scheme" = "xmtab"; then
236         AC_DEFINE(DID_MTAB, 1)
237         AC_MSG_RESULT([mtab-based DID creation support])
238 elif test "x$did_scheme" = "xcnid"; then
239         db3_required="yes"
240         AC_DEFINE(CNID_DB, 1)
241         AC_MSG_RESULT([enabling build with CNID DB support])
242 else
243         AC_MSG_ERROR([unknown DID scheme])
244 fi
245 AM_CONDITIONAL(COMPILE_CNID, test "x$did_scheme" = "xcnid")
246
247 dnl Check for Berkeley DB3 library
248 if test "x$db3_required" = "xyes"; then
249         AC_PATH_DB3(, [AC_MSG_ERROR([Berkeley DB3 library not found!])])
250 fi
251
252 dnl Check for quota support
253 AC_CHECK_QUOTA
254
255 msg_dir=""
256 AC_ARG_WITH(message-dir,
257         [  --with-message-dir=PATH path to message files [[PKGCONF/msg]]],
258                 msg_dir="$withval"
259                 if test x"$msg_dir" = "x"; then
260                         msg_dir="${PKGCONFDIR}/msg"
261                 fi
262                 AC_DEFINE_UNQUOTED(SERVERTEXT, "$msg_dir",
263                         [path to message dir [[PKGCONF/msg]]])
264                 SERVERTEXT="$msg_dir"
265                 AC_SUBST(SERVERTEXT)
266 )
267
268 dnl Check for optional server location protocol support (used by MacOS X)
269 NETATALK_SRVLOC
270
271 dnl Check for PAM libs
272 AC_PATH_PAM([
273         PAPD_LIBS="$PAPD_LIBS $PAM_LIBS"
274         AFPD_LIBS="$AFPD_LIBS $PAM_LIBS"
275         use_pam_so=yes
276         compile_pam=yes
277         AC_DEFINE(USE_PAM)
278 ])
279
280 AC_MSG_CHECKING([whether shadow support should be enabled])
281 AC_ARG_WITH(shadow,
282         [  --with-shadow           enable shadow password support],
283         [shadowpw="$withval"],
284         [shadowpw=no]
285 )
286 if test "x$shadowpw" = "xyes"; then
287         AC_DEFINE(SHADOWPW)
288 fi
289 AC_MSG_RESULT([$shadowpw])
290
291 AC_ARG_ENABLE(shell-check,
292         [  --disable-shell-check   disable checking for a valid shell],
293         if test "$enableval" = "no"; then 
294                 AC_DEFINE(DISABLE_SHELLCHECK, 1)
295                 AC_MSG_RESULT([disabling valid shell check])
296         fi
297 )
298
299 AC_MSG_CHECKING([whether flock locks should be enabled])
300 AC_ARG_WITH(flock-locks,
301         [  --with-flock-locks      enable flock locks support],
302         [flock_locks="$withval"],
303         [flock_locks="no"]
304 )
305 if test "x$flock_locks" = "xyes"; then
306         AC_DEFINE(USE_FLOCK_LOCKS)
307 fi
308 AC_MSG_RESULT([$flock_locks])
309
310 AC_ARG_WITH(tcp-wrappers,
311         [  --with-tcp-wrappers     enable TCP wrappers support],
312         AC_CHECK_LIB(wrap, tcpd_warn,
313                 AC_DEFINE(TCPWRAP)
314                 AFPD_LIBS="$AFPD_LIBS -lwrap"
315                 AC_MSG_RESULT([enabling TCP wrappers support])
316         )
317 )
318
319 AC_ARG_ENABLE(redhat,
320         [  --enable-redhat         use redhat-style sysv configuration ],
321         if test "$enableval" = "yes"; then
322                 sysv_style=redhat
323         fi
324         AC_MSG_RESULT([enabling redhat-style sysv support])
325 )
326
327 AC_ARG_ENABLE(suse,
328         [  --enable-suse           use suse-style sysv configuration ],
329         if test "$enableval" = "yes"; then
330                 sysv_style=suse
331         fi
332         AC_MSG_RESULT([enabling suse-style sysv support])
333 )
334
335 AC_ARG_ENABLE(cobalt,
336         [  --enable-cobalt         use cobalt-style sysv configuration ],
337         if test "$enableval" = "yes"; then
338                 sysv_style=cobalt
339         fi
340         AC_MSG_RESULT([enabling cobalt-style sysv support])
341 )
342
343 dnl ----- timelord compilation (disabled by default)
344 AC_MSG_CHECKING([whether timelord should be compiled])
345 compile_timelord=no
346 AC_ARG_ENABLE(timelord,
347         [  --enable-timelord       enable compilation of timelord server],
348         [compile_timelord="$enableval"],
349         [compile_timelord="no"]
350 )
351 AC_MSG_RESULT([$compile_timelord])
352
353 AC_ARG_WITH(uams-path,
354         [  --with-uams-path=PATH   path to UAMs [[PKGCONF/uams]]],
355         uams_path="$withval",
356         uams_path="${PKGCONFDIR}/uams"
357 )
358
359 dnl --------------------------------------------------------------------------
360 dnl FHS stuff has to be done last because it overrides other defaults
361 dnl --------------------------------------------------------------------------
362
363 AC_ARG_ENABLE(fhs,
364         [  --enable-fhs            use Filesystem Hierarchy Standard (FHS) compatibility],
365         if test "$enableval" = "yes"; then
366                 uams_path="/usr/lib/netatalk"
367                 sysconfdir="/etc"
368                 PKGCONFDIR=${sysconfdir}/netatalk
369                 use_pam_so=yes
370                 mandir="/usr/share/man"
371                 AC_DEFINE(FHS_COMPATIBILITY)
372         fi
373         AC_MSG_RESULT([enabling Filesystem Hierarchy Standard (FHS) compatibility])
374 )
375
376 dnl --------------------------------------------------------------------------
377 dnl post-FHS substitutions, etc
378 dnl --------------------------------------------------------------------------
379
380 dnl ***** UAMS_PATH
381 AC_DEFINE_UNQUOTED(UAMS_PATH, "${uams_path}",
382         [path to UAMs [default=PKGCONF/uams]])
383 UAMS_PATH="${uams_path}"
384 AC_SUBST(UAMS_PATH)
385
386 dnl --------------------------------------------------------------------------
387 dnl drop in includes for top level directory structures here...
388 dnl --------------------------------------------------------------------------
389
390 dnl Note: $(top_srcdir)/include should be added before all other includes
391 dnl       so that includes from that directory a preferred to includes from
392 dnl       /usr/include or similar places.
393 LIBS="$LIBS -L\$(top_srcdir)/libatalk"
394 CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
395
396 dnl --------------------------------------------------------------------------
397 dnl specific configuration comes in here:
398 dnl --------------------------------------------------------------------------
399
400 dnl ac_cv_target_os is now host_os, ac_cv_target_cpu is now host_cpu
401
402 dnl --------------------- determine operating system from "target"
403 case "$host_os" in
404         *aix*)                          this_os=aix ;;
405         *freebsd*)                      this_os=freebsd ;;
406         *hpux11*)                       this_os=hpux11 ;;
407         *irix*)                         this_os=irix ;;
408         *linux*)                        this_os=linux ;;
409         *osx*)                          this_os=macosx ;;
410         *darwin*)                       this_os=macosx ;;
411         *netbsd*)                       this_os=netbsd ;;
412         *openbsd*)                      this_os=openbsd ;;
413         *osf*)                          this_os=tru64 ;;
414         *solaris*)                      this_os=solaris ;;
415 esac
416
417 case "$host_cpu" in
418         i386|i486|i586|i686|k7)         this_cpu=x86 ;;
419         alpha)                                          this_cpu=alpha ;;
420         mips)                                           this_cpu=mips ;;
421         powerpc|ppc)                            this_cpu=ppc ;;
422 esac
423
424 dnl --------------------- operating system specific flags (port from sys/*)
425
426 dnl ----- AIX specific -----
427 if test x"$this_os" = "xaix"; then
428         AC_MSG_RESULT([ * AIX specific configuration])
429         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
430
431         dnl This is probably a lie; AIX 4.3 supports a 64-bit long
432         dnl compilation environment.  It's enough to get things defined
433         dnl right in endian.h provided that long long is supported, though.
434         AC_DEFINE(HAVE_32BIT_LONGS)
435 fi
436
437 dnl ----- FreeBSD specific -----
438 if test x"$this_os" = "xfreebsd"; then 
439         AC_MSG_RESULT([ * FreeBSD specific configuration])
440         AC_DEFINE(BSD4_4)
441         AC_DEFINE(SENDFILE_FLAVOR_BSD)
442
443         AC_DEFINE(NO_CRYPT_H, 1)
444 fi
445
446 dnl ----- HP-UX 11 specific -----
447 if test x"$this_os" = "xhpux11"; then
448         AC_MSG_RESULT([ * HP-UX 11 specific configuration])
449
450         AC_DEFINE(_ISOC9X_SOURCE)
451         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
452 fi
453
454 dnl ----- IRIX specific -----
455 if test x"$this_os" = "xirix"; then
456         AC_MSG_RESULT([ * IRIX specific configuration])
457
458         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
459 fi
460
461 dnl ----- Linux specific -----
462 if test x"$this_os" = "xlinux"; then 
463         AC_MSG_RESULT([ * Linux specific configuration])
464
465         dnl ----- check if we need the quotactl wrapper
466         AC_CHECK_HEADERS(sys/quota.h linux/quota.h)
467         AC_CHECK_FUNC(quotactl,,
468                 AC_DEFINE(NEED_QUOTACTL_WRAPPER)
469                 AC_MSG_RESULT([enabling quotactl wrapper])
470         )
471
472         dnl ----- as far as I can tell, dbtob always does the wrong thing
473         dnl ----- on every single version of linux I've ever played with.
474         dnl ----- see etc/afpd/quota.c
475         AC_DEFINE(HAVE_BROKEN_DBTOB)
476
477         dnl --- added by Yoshinobu Ishizaki (2001.03.13) ---
478         dnl ----- check if version is newer than 2.2.x
479         changequote(<<,>>)
480         majorvers="`uname -r | sed 's/\([0-9]\)..*/\1/'`"
481         minorvers="`uname -r | sed 's/[0-9]\.\([0-9]\)\..*/\1/'`"
482         if [ $majorvers -ge 2 ]; then
483                 if [ $minorvers -ge 2 ]; then
484                         changequote([,])
485                         AC_MSG_RESULT([ * found Linux 2.2.x or higher])
486                         AC_DEFINE(SENDFILE_FLAVOR_LINUX)
487                 else
488                         AC_MSG_RESULT([ * found Linux 2.0.x ]) 
489                 fi
490         fi
491
492         dnl ----- Linux/alpha specific -----
493         if test x"$this_cpu" = "xalpha"; then 
494                 AC_MSG_RESULT([enabling gcc memcpy bug workaround])
495                 AC_DEFINE(HAVE_GCC_MEMCPY_BUG)
496         fi
497         need_dash_r=no
498 fi
499
500 dnl ----- Mac OSX specific -----
501 if test x"$this_os" = "xmacosx"; then 
502         AC_MSG_RESULT([ * Mac OSX specific configuration])
503         AC_DEFINE(BSD4_4)
504         AC_DEFINE(HAVE_BROKEN_CPP)
505         AC_DEFINE(HAVE_2ARG_DBTOB)
506         dnl AC_DEFINE(NO_DLFCN_H)
507         AC_DEFINE(MACOSX_SERVER)
508 fi
509
510 dnl ----- NetBSD specific -----
511 if test x"$this_os" = "xnetbsd"; then 
512         AC_MSG_RESULT([ * NetBSD specific configuration])
513         AC_DEFINE(BSD4_4)
514         AC_DEFINE(DLSYM_PREPEND_UNDERSCORE)
515         CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
516         need_dash_r=yes 
517
518         dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
519         AC_DEFINE(UAM_DHX, 1)
520         AC_DEFINE(NO_CRYPT_H, 1)
521 fi
522
523 dnl ----- OpenBSD specific -----
524 if test x"$this_os" = "xopenbsd"; then 
525         AC_MSG_RESULT([ * OpenBSD specific configuration])
526         AC_DEFINE(BSD4_4)
527         AC_DEFINE(DLSYM_PREPEND_UNDERSCORE)
528
529         dnl ----- OpenBSD does not have crypt.h, uses unistd.h -----
530         AC_DEFINE(UAM_DHX, 1)
531         AC_DEFINE(NO_CRYPT_H, 1)
532 fi
533
534 dnl ----- Solaris specific -----
535 if test x"$this_os" = "xsolaris"; then 
536         AC_MSG_RESULT([ * Solaris specific configuration])
537         AC_DEFINE(__svr4__)
538         AC_DEFINE(_ISOC9X_SOURCE)
539         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
540         AC_DEFINE(SOLARIS)
541         CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
542         need_dash_r=yes
543
544         AC_MSG_RESULT([enabling Solaris kernel module build])
545         solaris_module=yes
546 fi
547
548 dnl ----- Tru64 specific -----
549 if test x"$this_os" = "xtru64"; then 
550         AC_MSG_RESULT([ * Tru64 specific configuration])
551         AC_DEFINE(NO_DDP)
552         AC_DEFINE(HAVE_64BIT_LONGS)
553         dnl AC_DEFINE(USE_MOUNT_H)
554         AC_DEFINE(USE_OLD_RQUOTA)
555         dnl AC_DEFINE(USE_UFS_QUOTA_H)
556         AC_DEFINE(TRU64)
557         AC_CHECK_LIB(security,set_auth_parameters)
558         CFLAGS="-I\$(top_srcdir)/sys/tru64 $CFLAGS"
559         need_dash_r=no
560         sysv_style=tru64
561 fi
562
563 dnl -- look for openssl
564 AC_PATH_SSL
565
566 dnl --------------------- check for building PGP UAM module
567
568 AC_ARG_ENABLE(pgp-uam,
569         [  --enable-pgp-uam        enable build of PGP UAM module],
570         if test "$enableval" = "yes"; then 
571                 if test "$compile_ssl" = "yes"; then 
572                         AC_DEFINE(UAM_PGP, 1)
573                         compile_pgp=yes
574                         AC_MSG_RESULT([enabling build with PGP UAM module])
575                 fi
576         fi
577 )
578
579 dnl --------------------- check for building Kerberos v4 UAM module
580
581 AC_ARG_ENABLE(krb4-uam,
582         [  --enable-krb4-uam       enable build of Kerberos v4 UAM module],
583         if test "$enableval" = "yes"; then
584                 AC_DEFINE(UAM_KRB4, 1)
585                 compile_kerberos=yes
586                 AC_MSG_RESULT([enabling build with Kerberos v4 UAM module])
587         fi
588 )
589 dnl --------------------- overwrite the config files . . . or not.
590
591 AC_MSG_CHECKING([whether configuration files should be overwritten])
592 AC_ARG_ENABLE(overwrite,
593         [  --enable-overwrite      overwrite configuration files during installation],
594         [OVERWRITE_CONFIG="${enable_overwrite}"],
595         [OVERWRITE_CONFIG="no"]
596 )
597 AC_MSG_RESULT([$OVERWRITE_CONFIG])
598
599 dnl --------------------- last minute substitutions
600
601 AC_SUBST(LIBS)
602 AC_SUBST(AFPD_LIBS)
603 AC_SUBST(PAPD_LIBS)
604 AC_SUBST(CFLAGS)
605 AC_SUBST(PKGCONFDIR)
606 AC_SUBST(OVERWRITE_CONFIG)
607
608 AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
609 AM_CONDITIONAL(COMPILE_TIMELORD, test x$compile_timelord = xyes)
610 AM_CONDITIONAL(USE_DHX, test x$compile_ssl = xyes)
611 AM_CONDITIONAL(USE_KERBEROS, test x$compile_kerberos = xyes)
612 AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
613 AM_CONDITIONAL(USE_PAM, test x$compile_pam = xyes)
614 AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
615 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
616 AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
617 AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
618 AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
619 AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
620 AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
621
622 dnl --------------------- generate files
623
624 AC_OUTPUT([Makefile
625         bin/Makefile
626         bin/adv1tov2/Makefile
627         bin/aecho/Makefile
628         bin/afile/Makefile
629         bin/afppasswd/Makefile
630         bin/cnid/Makefile
631         bin/getzones/Makefile
632         bin/megatron/Makefile
633         bin/nbp/Makefile
634         bin/pap/Makefile
635         bin/psorder/Makefile
636         config/Makefile
637         contrib/Makefile
638         contrib/macusers/Makefile
639         contrib/nu/Makefile
640         contrib/printing/Makefile
641         contrib/shell_utils/Makefile
642         contrib/timelord/Makefile
643         distrib/Makefile
644         distrib/config/Makefile
645         distrib/config/netatalk-config
646         distrib/initscripts/Makefile
647         distrib/m4/Makefile
648         doc/Makefile
649         etc/Makefile
650         etc/afpd/Makefile
651         etc/afpd/nls/Makefile
652         etc/atalkd/Makefile
653         etc/uams/Makefile
654         etc/uams/uams_krb4/Makefile
655         etc/papd/Makefile
656         etc/psf/Makefile
657         include/Makefile
658         include/atalk/Makefile
659         libatalk/Makefile
660         libatalk/adouble/Makefile
661         libatalk/asp/Makefile
662         libatalk/atp/Makefile
663         libatalk/cnid/Makefile
664         libatalk/compat/Makefile
665         libatalk/dsi/Makefile
666         libatalk/nbp/Makefile
667         libatalk/netddp/Makefile
668         libatalk/util/Makefile
669         macros/Makefile
670         man/Makefile
671         man/man1/Makefile
672         man/man3/Makefile
673         man/man4/Makefile
674         man/man5/Makefile
675         man/man8/Makefile
676         sys/Makefile
677         sys/generic/Makefile
678         sys/generic/sys/Makefile
679         sys/netatalk/Makefile
680         sys/netbsd/Makefile
681         sys/netbsd/netatalk/Makefile
682         sys/solaris/Makefile
683         sys/sunos/Makefile
684         sys/ultrix/Makefile
685         ],
686         [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
687 )
688