]> arthur.barton.de Git - netatalk.git/blob - configure.in
Remove redundant AC_PREFIX_DEFAULT.
[netatalk.git] / configure.in
1 dnl $Id: configure.in,v 1.144 2001-12-16 18:37:57 srittau 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(cracklib,
137         [  --with-cracklib=DICT    enable/set location of cracklib dictionary],
138         if test "x$withval" != "xno" ; then
139                 cracklib="$withval"
140                 AC_CHECK_LIB(crack, main,
141                         AC_DEFINE(USE_CRACKLIB) 
142                         LIBS="$LIBS -lcrack"
143                         AC_MSG_RESULT([enabling cracklib support])
144                         if test "$cracklib" = "yes"; then
145                                 cracklib="/usr/lib/cracklib_dict"
146                         fi
147                         AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
148                                 [path to cracklib dictionary])
149                         AC_MSG_RESULT([setting cracklib dictionary to $cracklib]),
150                         AC_MSG_ERROR([cracklib not found!])
151                 )
152         fi
153 )
154
155 AC_ARG_ENABLE(ddp,
156         [  --disable-ddp           disable DDP],
157         if test "$enableval" = "no"; then 
158                 AC_DEFINE(NO_DDP, 1)
159                 AC_MSG_RESULT([disabling DDP])
160         fi
161 )
162
163 AC_ARG_ENABLE(debug,
164         [  --enable-debug          enable debug code],
165         if test "$enableval" != "no"; then
166                 if test "$enableval" = "yes"; then
167                         AC_DEFINE(DEBUG, 1)
168                 else
169                         AC_DEFINE_UNQUOTED(DEBUG, $enableval)
170                 fi 
171                 AC_MSG_RESULT([enabling debugging code])
172         else
173                 AC_DEFINE(DEBUG, 0)
174         fi
175 )
176
177
178 dnl ----------- A NOTE ABOUT DROPKLUDGE
179 dnl The trouble with this fix is that if you know what the file is called, it
180 dnl can be read from the Unix side.  That's okay for most academic institutions
181 dnl since the students don't have telnet access to the Mac servers.  There is
182 dnl currently no one working on further development/fixes of DROPKLUDGE.
183 dnl -----------
184
185 AC_ARG_ENABLE(dropkludge,
186         [  --enable-dropkludge     enable the experimental dropbox fix (INSECURE!) ],
187         if test "$enableval" = "yes"; then 
188                 AC_DEFINE(DROPKLUDGE, 1)
189                 AC_MSG_RESULT([enabling experimental dropbox support])
190         fi
191 )
192
193 AC_ARG_ENABLE(force-uidgid,
194         [  --enable-force-uidgid   allow forcing of uid/gid per volume (BROKEN) ],
195         if test "$enableval" = "yes"; then
196                 AC_DEFINE(FORCE_UIDGID, 1)
197                 AC_MSG_RESULT([enabling forcing of uid/gid per volume])
198         fi
199 )
200
201 dnl Don't use DB3 unless it's needed
202 db3_required=no
203
204
205 dnl Determine DID scheme
206 AC_MSG_CHECKING([for DID scheme to use])
207 AC_ARG_WITH(did,
208         [  --with-did=SCHEME       set DID scheme (last,hash,mtab,cnid)],
209         [ did_scheme="$withval" ],
210         [ did_scheme="last" ]
211 )
212
213 if test "x$did_scheme" = "xlast"; then
214         AC_DEFINE(USE_LASTDID, 1)
215         AC_MSG_RESULT([last])
216 elif test "x$did_scheme" = "xhash"; then
217         AC_MSG_RESULT([device/inode-based hashing])
218 elif test "x$did_scheme" = "xmtab"; then
219         AC_DEFINE(DID_MTAB, 1)
220         AC_MSG_RESULT([mtab-based DID creation support])
221 elif test "x$did_scheme" = "xcnid"; then
222         db3_required="yes"
223         AC_DEFINE(CNID_DB, 1)
224         AC_MSG_RESULT([enabling build with CNID DB support])
225 else
226         AC_MSG_ERROR([unknown DID scheme])
227 fi
228 AM_CONDITIONAL(COMPILE_CNID, test "x$did_scheme" = "xcnid")
229
230 dnl Check for Berkeley DB3 library
231 if test "x$db3_required" = "xyes"; then
232         AC_PATH_DB3(, [AC_MSG_ERROR([Berkeley DB3 library not found!])])
233 fi
234
235 dnl Check for quota support
236 AC_CHECK_QUOTA
237
238 msg_dir=""
239 AC_ARG_WITH(message-dir,
240         [  --with-message-dir=PATH path to message files [[PKGCONF/msg]]],
241                 msg_dir="$withval"
242                 if test x"$msg_dir" = "x"; then
243                         msg_dir="${PKGCONFDIR}/msg"
244                 fi
245                 AC_DEFINE_UNQUOTED(SERVERTEXT, "$msg_dir",
246                         [path to message dir [[PKGCONF/msg]]])
247                 SERVERTEXT="$msg_dir"
248                 AC_SUBST(SERVERTEXT)
249 )
250
251 dnl Check for optional server location protocol support (used by MacOS X)
252 NETATALK_SRVLOC
253
254 dnl Check for PAM libs
255 AC_PATH_PAM([
256         PAPD_LIBS="$PAPD_LIBS $PAM_LIBS"
257         AFPD_LIBS="$AFPD_LIBS $PAM_LIBS"
258         use_pam_so=yes
259         compile_pam=yes
260         AC_DEFINE(USE_PAM)
261 ])
262
263 AC_MSG_CHECKING([whether shadow support should be enabled])
264 AC_ARG_WITH(shadow,
265         [  --with-shadow           enable shadow password support],
266         [shadowpw="$withval"],
267         [shadowpw=no]
268 )
269 if test "x$shadowpw" = "xyes"; then
270         AC_DEFINE(SHADOWPW)
271 fi
272 AC_MSG_RESULT([$shadowpw])
273
274 AC_ARG_ENABLE(shell-check,
275         [  --disable-shell-check   disable checking for a valid shell],
276         if test "$enableval" = "no"; then 
277                 AC_DEFINE(DISABLE_SHELLCHECK, 1)
278                 AC_MSG_RESULT([disabling valid shell check])
279         fi
280 )
281
282 AC_MSG_CHECKING([whether flock locks should be enabled])
283 AC_ARG_WITH(flock-locks,
284         [  --with-flock-locks      enable flock locks support],
285         [flock_locks="$withval"],
286         [flock_locks="no"]
287 )
288 if test "x$flock_locks" = "xyes"; then
289         AC_DEFINE(USE_FLOCK_LOCKS)
290 fi
291 AC_MSG_RESULT([$flock_locks])
292
293 AC_ARG_WITH(tcp-wrappers,
294         [  --with-tcp-wrappers     enable TCP wrappers support],
295         AC_CHECK_LIB(wrap, tcpd_warn,
296                 AC_DEFINE(TCPWRAP)
297                 AFPD_LIBS="$AFPD_LIBS -lwrap"
298                 AC_MSG_RESULT([enabling TCP wrappers support])
299         )
300 )
301
302 AC_ARG_ENABLE(redhat,
303         [  --enable-redhat         use redhat-style sysv configuration ],
304         if test "$enableval" = "yes"; then
305                 sysv_style=redhat
306         fi
307         AC_MSG_RESULT([enabling redhat-style sysv support])
308 )
309
310 AC_ARG_ENABLE(suse,
311         [  --enable-suse           use suse-style sysv configuration ],
312         if test "$enableval" = "yes"; then
313                 sysv_style=suse
314         fi
315         AC_MSG_RESULT([enabling suse-style sysv support])
316 )
317
318 AC_ARG_ENABLE(cobalt,
319         [  --enable-cobalt         use cobalt-style sysv configuration ],
320         if test "$enableval" = "yes"; then
321                 sysv_style=cobalt
322         fi
323         AC_MSG_RESULT([enabling cobalt-style sysv support])
324 )
325
326 dnl ----- timelord compilation (disabled by default)
327 AC_MSG_CHECKING([whether timelord should be compiled])
328 compile_timelord=no
329 AC_ARG_ENABLE(timelord,
330         [  --enable-timelord       enable compilation of timelord server],
331         [compile_timelord="$enableval"],
332         [compile_timelord="no"]
333 )
334 AC_MSG_RESULT([$compile_timelord])
335
336 AC_ARG_WITH(uams-path,
337         [  --with-uams-path=PATH   path to UAMs [[PKGCONF/uams]]],
338         uams_path="$withval",
339         uams_path="${PKGCONFDIR}/uams"
340 )
341
342 dnl --------------------------------------------------------------------------
343 dnl FHS stuff has to be done last because it overrides other defaults
344 dnl --------------------------------------------------------------------------
345
346 AC_ARG_ENABLE(fhs,
347         [  --enable-fhs            use Filesystem Hierarchy Standard (FHS) compatibility],
348         if test "$enableval" = "yes"; then
349                 uams_path="/usr/lib/netatalk"
350                 sysconfdir="/etc"
351                 PKGCONFDIR=${sysconfdir}/netatalk
352                 use_pam_so=yes
353                 mandir="/usr/share/man"
354                 AC_DEFINE(FHS_COMPATIBILITY)
355         fi
356         AC_MSG_RESULT([enabling Filesystem Hierarchy Standard (FHS) compatibility])
357 )
358
359 dnl --------------------------------------------------------------------------
360 dnl post-FHS substitutions, etc
361 dnl --------------------------------------------------------------------------
362
363 dnl ***** UAMS_PATH
364 AC_DEFINE_UNQUOTED(UAMS_PATH, "${uams_path}",
365         [path to UAMs [default=PKGCONF/uams]])
366 UAMS_PATH="${uams_path}"
367 AC_SUBST(UAMS_PATH)
368
369 dnl --------------------------------------------------------------------------
370 dnl drop in includes for top level directory structures here...
371 dnl --------------------------------------------------------------------------
372
373 dnl Note: $(top_srcdir)/include should be added before all other includes
374 dnl       so that includes from that directory a preferred to includes from
375 dnl       /usr/include or similar places.
376 LIBS="$LIBS -L\$(top_srcdir)/libatalk"
377 CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
378
379 dnl --------------------------------------------------------------------------
380 dnl specific configuration comes in here:
381 dnl --------------------------------------------------------------------------
382
383 dnl ac_cv_target_os is now host_os, ac_cv_target_cpu is now host_cpu
384
385 dnl --------------------- determine operating system from "target"
386 case "$host_os" in
387         *aix*)                          this_os=aix ;;
388         *freebsd*)                      this_os=freebsd ;;
389         *hpux11*)                       this_os=hpux11 ;;
390         *irix*)                         this_os=irix ;;
391         *linux*)                        this_os=linux ;;
392         *osx*)                          this_os=macosx ;;
393         *darwin*)                       this_os=macosx ;;
394         *netbsd*)                       this_os=netbsd ;;
395         *openbsd*)                      this_os=openbsd ;;
396         *osf*)                          this_os=tru64 ;;
397         *solaris*)                      this_os=solaris ;;
398 esac
399
400 case "$host_cpu" in
401         i386|i486|i586|i686|k7)         this_cpu=x86 ;;
402         alpha)                                          this_cpu=alpha ;;
403         mips)                                           this_cpu=mips ;;
404         powerpc|ppc)                            this_cpu=ppc ;;
405 esac
406
407 dnl --------------------- operating system specific flags (port from sys/*)
408
409 dnl ----- AIX specific -----
410 if test x"$this_os" = "xaix"; then
411         AC_MSG_RESULT([ * AIX specific configuration])
412         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
413
414         dnl This is probably a lie; AIX 4.3 supports a 64-bit long
415         dnl compilation environment.  It's enough to get things defined
416         dnl right in endian.h provided that long long is supported, though.
417         AC_DEFINE(HAVE_32BIT_LONGS)
418 fi
419
420 dnl ----- FreeBSD specific -----
421 if test x"$this_os" = "xfreebsd"; then 
422         AC_MSG_RESULT([ * FreeBSD specific configuration])
423         AC_DEFINE(BSD4_4)
424         AC_DEFINE(SENDFILE_FLAVOR_BSD)
425
426         AC_DEFINE(NO_CRYPT_H, 1)
427 fi
428
429 dnl ----- HP-UX 11 specific -----
430 if test x"$this_os" = "xhpux11"; then
431         AC_MSG_RESULT([ * HP-UX 11 specific configuration])
432
433         AC_DEFINE(_ISOC9X_SOURCE)
434         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
435 fi
436
437 dnl ----- IRIX specific -----
438 if test x"$this_os" = "xirix"; then
439         AC_MSG_RESULT([ * IRIX specific configuration])
440
441         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
442 fi
443
444 dnl ----- Linux specific -----
445 if test x"$this_os" = "xlinux"; then 
446         AC_MSG_RESULT([ * Linux specific configuration])
447
448         dnl ----- check if we need the quotactl wrapper
449         AC_CHECK_HEADERS(sys/quota.h linux/quota.h)
450         AC_CHECK_FUNC(quotactl,,
451                 AC_DEFINE(NEED_QUOTACTL_WRAPPER)
452                 AC_MSG_RESULT([enabling quotactl wrapper])
453         )
454
455         dnl ----- as far as I can tell, dbtob always does the wrong thing
456         dnl ----- on every single version of linux I've ever played with.
457         dnl ----- see etc/afpd/quota.c
458         AC_DEFINE(HAVE_BROKEN_DBTOB)
459
460         dnl --- added by Yoshinobu Ishizaki (2001.03.13) ---
461         dnl ----- check if version is newer than 2.2.x
462         changequote(<<,>>)
463         majorvers="`uname -r | sed 's/\([0-9]\)..*/\1/'`"
464         minorvers="`uname -r | sed 's/[0-9]\.\([0-9]\)\..*/\1/'`"
465         if [ $majorvers -ge 2 ]; then
466                 if [ $minorvers -ge 2 ]; then
467                         changequote([,])
468                         AC_MSG_RESULT([ * found Linux 2.2.x or higher])
469                         AC_DEFINE(SENDFILE_FLAVOR_LINUX)
470                 else
471                         AC_MSG_RESULT([ * found Linux 2.0.x ]) 
472                 fi
473         fi
474
475         dnl ----- Linux/alpha specific -----
476         if test x"$this_cpu" = "xalpha"; then 
477                 AC_MSG_RESULT([enabling gcc memcpy bug workaround])
478                 AC_DEFINE(HAVE_GCC_MEMCPY_BUG)
479         fi
480         need_dash_r=no
481 fi
482
483 dnl ----- Mac OSX specific -----
484 if test x"$this_os" = "xmacosx"; then 
485         AC_MSG_RESULT([ * Mac OSX specific configuration])
486         AC_DEFINE(BSD4_4)
487         AC_DEFINE(HAVE_BROKEN_CPP)
488         AC_DEFINE(HAVE_2ARG_DBTOB)
489         dnl AC_DEFINE(NO_DLFCN_H)
490         AC_DEFINE(MACOSX_SERVER)
491 fi
492
493 dnl ----- NetBSD specific -----
494 if test x"$this_os" = "xnetbsd"; then 
495         AC_MSG_RESULT([ * NetBSD specific configuration])
496         AC_DEFINE(BSD4_4)
497         AC_DEFINE(DLSYM_PREPEND_UNDERSCORE)
498         CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
499         need_dash_r=yes 
500
501         dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
502         AC_DEFINE(UAM_DHX, 1)
503         AC_DEFINE(NO_CRYPT_H, 1)
504 fi
505
506 dnl ----- OpenBSD specific -----
507 if test x"$this_os" = "xopenbsd"; then 
508         AC_MSG_RESULT([ * OpenBSD specific configuration])
509         AC_DEFINE(BSD4_4)
510         AC_DEFINE(DLSYM_PREPEND_UNDERSCORE)
511
512         dnl ----- OpenBSD does not have crypt.h, uses unistd.h -----
513         AC_DEFINE(UAM_DHX, 1)
514         AC_DEFINE(NO_CRYPT_H, 1)
515 fi
516
517 dnl ----- Solaris specific -----
518 if test x"$this_os" = "xsolaris"; then 
519         AC_MSG_RESULT([ * Solaris specific configuration])
520         AC_DEFINE(__svr4__)
521         AC_DEFINE(_ISOC9X_SOURCE)
522         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
523         AC_DEFINE(SOLARIS)
524         CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
525         need_dash_r=yes
526
527         AC_MSG_RESULT([enabling Solaris kernel module build])
528         solaris_module=yes
529 fi
530
531 dnl ----- Tru64 specific -----
532 if test x"$this_os" = "xtru64"; then 
533         AC_MSG_RESULT([ * Tru64 specific configuration])
534         AC_DEFINE(NO_DDP)
535         AC_DEFINE(HAVE_64BIT_LONGS)
536         dnl AC_DEFINE(USE_MOUNT_H)
537         AC_DEFINE(USE_OLD_RQUOTA)
538         dnl AC_DEFINE(USE_UFS_QUOTA_H)
539         AC_DEFINE(TRU64)
540         AC_CHECK_LIB(security,set_auth_parameters)
541         CFLAGS="-I\$(top_srcdir)/sys/tru64 $CFLAGS"
542         need_dash_r=no
543         sysv_style=tru64
544 fi
545
546 dnl -- look for openssl
547 AC_PATH_SSL
548
549 dnl --------------------- check for building PGP UAM module
550
551 AC_ARG_ENABLE(pgp-uam,
552         [  --enable-pgp-uam        enable build of PGP UAM module],
553         if test "$enableval" = "yes"; then 
554                 if test "$compile_ssl" = "yes"; then 
555                         AC_DEFINE(UAM_PGP, 1)
556                         compile_pgp=yes
557                         AC_MSG_RESULT([enabling build with PGP UAM module])
558                 fi
559         fi
560 )
561
562 dnl --------------------- check for building Kerberos v4 UAM module
563
564 AC_ARG_ENABLE(krb4-uam,
565         [  --enable-krb4-uam       enable build of Kerberos v4 UAM module],
566         if test "$enableval" = "yes"; then
567                 AC_DEFINE(UAM_KRB4, 1)
568                 compile_kerberos=yes
569                 AC_MSG_RESULT([enabling build with Kerberos v4 UAM module])
570         fi
571 )
572 dnl --------------------- overwrite the config files . . . or not.
573
574 AC_MSG_CHECKING([whether configuration files should be overwritten])
575 AC_ARG_ENABLE(overwrite,
576         [  --enable-overwrite      overwrite configuration files during installation],
577         [OVERWRITE_CONFIG="${enable_overwrite}"],
578         [OVERWRITE_CONFIG="no"]
579 )
580 AC_MSG_RESULT([$OVERWRITE_CONFIG])
581
582 dnl --------------------- last minute substitutions
583
584 AC_SUBST(LIBS)
585 AC_SUBST(AFPD_LIBS)
586 AC_SUBST(PAPD_LIBS)
587 AC_SUBST(CFLAGS)
588 AC_SUBST(PKGCONFDIR)
589 AC_SUBST(OVERWRITE_CONFIG)
590
591 AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
592 AM_CONDITIONAL(COMPILE_TIMELORD, test x$compile_timelord = xyes)
593 AM_CONDITIONAL(USE_DHX, test x$compile_ssl = xyes)
594 AM_CONDITIONAL(USE_KERBEROS, test x$compile_kerberos = xyes)
595 AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
596 AM_CONDITIONAL(USE_PAM, test x$compile_pam = xyes)
597 AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
598 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
599 AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
600 AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
601 AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
602 AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
603 AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
604
605 dnl --------------------- generate files
606
607 AC_OUTPUT([Makefile
608         bin/Makefile
609         bin/adv1tov2/Makefile
610         bin/aecho/Makefile
611         bin/afile/Makefile
612         bin/afppasswd/Makefile
613         bin/cnid/Makefile
614         bin/getzones/Makefile
615         bin/megatron/Makefile
616         bin/nbp/Makefile
617         bin/pap/Makefile
618         bin/psorder/Makefile
619         config/Makefile
620         contrib/Makefile
621         contrib/macusers/Makefile
622         contrib/nu/Makefile
623         contrib/printing/Makefile
624         contrib/shell_utils/Makefile
625         contrib/timelord/Makefile
626         distrib/Makefile
627         distrib/config/Makefile
628         distrib/config/netatalk-config
629         distrib/initscripts/Makefile
630         distrib/m4/Makefile
631         doc/Makefile
632         etc/Makefile
633         etc/afpd/Makefile
634         etc/afpd/nls/Makefile
635         etc/atalkd/Makefile
636         etc/uams/Makefile
637         etc/uams/uams_krb4/Makefile
638         etc/papd/Makefile
639         etc/psf/Makefile
640         include/Makefile
641         include/atalk/Makefile
642         libatalk/Makefile
643         libatalk/adouble/Makefile
644         libatalk/asp/Makefile
645         libatalk/atp/Makefile
646         libatalk/cnid/Makefile
647         libatalk/compat/Makefile
648         libatalk/dsi/Makefile
649         libatalk/nbp/Makefile
650         libatalk/netddp/Makefile
651         libatalk/util/Makefile
652         macros/Makefile
653         man/Makefile
654         man/man1/Makefile
655         man/man3/Makefile
656         man/man4/Makefile
657         man/man5/Makefile
658         man/man8/Makefile
659         sys/Makefile
660         sys/generic/Makefile
661         sys/generic/sys/Makefile
662         sys/netatalk/Makefile
663         sys/netbsd/Makefile
664         sys/netbsd/netatalk/Makefile
665         sys/solaris/Makefile
666         sys/sunos/Makefile
667         sys/ultrix/Makefile
668         ],
669         [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
670 )
671