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