]> arthur.barton.de Git - netatalk.git/blob - configure.in
ffa16bf77ff6243a2aee8fa35735634fe443b180
[netatalk.git] / configure.in
1 dnl $Id: configure.in,v 1.201 2003-12-15 06:56:33 srittau Exp $
2 dnl configure.in for netatalk
3
4 AC_INIT(etc/afpd/main.c)
5
6 NETATALK_VERSION=`cat $srcdir/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
14 dnl Checks for programs.
15 dnl
16
17 AC_PROG_AWK
18 AC_PROG_CC
19 AC_PROG_GCC_TRADITIONAL
20 AC_PROG_INSTALL
21 AC_PROG_LN_S
22 AC_PROG_MAKE_SET
23 AC_LIBTOOL_DLOPEN
24 AM_PROG_LIBTOOL
25 AC_PROG_PERL
26 AC_PROG_GREP
27 AC_PROG_PS
28 AC_PROG_DVIPS
29 AC_PROG_TROFF2PS
30
31 dnl
32 dnl Checks for presence of some functions.
33 dnl
34
35 AC_CHECK_FUNCS(pread pwrite)
36
37 dnl
38 dnl Checks for header files.
39 dnl
40
41 AC_HEADER_STDC
42 AC_HEADER_SYS_WAIT
43 AC_HEADER_TIME
44 AC_CHECK_HEADERS(fcntl.h limits.h stdint.h strings.h sys/fcntl.h sys/time.h sys/mnttab.h sys/statvfs.h sys/stat.h sys/vfs.h mntent.h unistd.h termios.h sys/termios.h netdb.h sgtty.h sys/mount.h statfs.h sys/types.h dlfcn.h errno.h sys/errno.h)
45 AC_CHECK_HEADER(sys/cdefs.h,,
46         AC_MSG_RESULT([enabling generic cdefs.h from tree])
47         CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
48 )
49
50 dnl
51 dnl Checks for typedefs, structures, and compiler characteristics.
52 dnl
53
54 AC_C_CONST
55 AC_TYPE_UID_T
56 AC_C_INLINE
57 AC_TYPE_MODE_T
58 AC_TYPE_OFF_T
59 AC_TYPE_PID_T
60 AC_TYPE_SIZE_T
61 AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
62
63 dnl
64 dnl Checks for library functions.
65 dnl
66
67 AC_FUNC_MEMCMP
68 AC_CHECK_FUNCS(strcasestr strchr memcpy)
69 NETATALK_SNPRINTF_CHECK
70
71 dnl
72 dnl Configuration options.
73 dnl
74
75 NETATALK_ADMINGRP_CHECK
76 NETATALK_AFS_CHECK
77 NETATALK_CONFIG_DIRS
78
79 AC_MSG_CHECKING([for logfile path])
80 AC_ARG_WITH(logfile,
81         [  --with-logfile=PATH     path for file used by logger [/var/log/netatalk.log]
82                           use --without-logfile to disable logger], [
83         if test "x$withval" == "xno"; then
84                 AC_DEFINE(DISABLE_LOGGER, 1, [Define if the logger should not be used])
85                 AC_MSG_RESULT([syslog])
86         elif test "$withval" != "yes"; then
87                 AC_DEFINE_UNQUOTED(LOGFILEPATH, "$withval", [Path to the log file])
88                 AC_MSG_RESULT([$withval])
89         else
90                 AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log", [Path to the log file])
91                 AC_MSG_RESULT([/var/log/netatalk.log]) 
92         fi], [
93                 AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log", [Path to the log file])
94                 AC_MSG_RESULT([/var/log/netatalk.log])
95         ]
96 )
97
98 AC_ARG_WITH(cracklib,
99         [  --with-cracklib=DICT    enable/set location of cracklib dictionary],
100         if test "x$withval" != "xno" ; then
101                 cracklib="$withval"
102                 AC_CHECK_LIB(crack, main,
103                         AC_DEFINE(USE_CRACKLIB, 1, [Define if cracklib should be used])
104                         LIBS="$LIBS -lcrack"
105                         AC_MSG_RESULT([enabling cracklib support])
106                         if test "$cracklib" = "yes"; then
107                                 cracklib="/usr/lib/cracklib_dict"
108                         fi
109                         AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
110                                 [path to cracklib dictionary])
111                         AC_MSG_RESULT([setting cracklib dictionary to $cracklib]),
112                         AC_MSG_ERROR([cracklib not found!])
113                 )
114         fi
115 )
116
117 AC_MSG_CHECKING([whether to enable DDP])
118 AC_ARG_ENABLE(ddp,
119         [  --disable-ddp           disable DDP], [
120         if test "x$enableval" = "xno"; then 
121                 AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
122                 AC_MSG_RESULT([no])
123         else
124                 AC_MSG_RESULT([yes])
125         fi
126         ], [
127                 AC_MSG_RESULT([yes])
128         ]
129 )
130
131 AC_MSG_CHECKING([whether to enable debugging code])
132 AC_ARG_ENABLE(debug,
133         [  --enable-debug          enable debug code], [
134         if test "x$enableval" != "xno"; then
135                 if test "x$enableval" = "xyes"; then
136                         AC_DEFINE(DEBUG, 1, [Define if debugging information should be included])
137                 else
138                         AC_DEFINE_UNQUOTED(DEBUG, $enableval, [Define if debugging information should be included])
139                 fi 
140                 AC_MSG_RESULT([yes])
141         else
142                 AC_MSG_RESULT([no])
143         fi
144         ], [
145                 AC_MSG_RESULT([no])
146         ]
147 )
148
149 afp3=no
150 AC_ARG_ENABLE(afp3,
151         [  --enable-afp3           enable AFP 3.x calls],
152         if test "$enableval" = "yes"; then
153                 afp3=yes
154                 AC_DEFINE(AFP3x, 1, [Define to enable AFP 3.x support])
155                 AC_MSG_RESULT([enabling AFP 3.x calls])
156         fi
157 )
158
159 if test "$afp3" = "yes"; then
160         AM_ICONV
161         AC_SYS_LARGEFILE
162 fi
163
164
165 dnl ----------- A NOTE ABOUT DROPKLUDGE
166 dnl The trouble with this fix is that if you know what the file is called, it
167 dnl can be read from the Unix side.  That's okay for most academic institutions
168 dnl since the students don't have telnet access to the Mac servers.  There is
169 dnl currently no one working on further development/fixes of DROPKLUDGE.
170 dnl -----------
171
172 AC_MSG_CHECKING([whether to enable experimental dropbox support])
173 AC_ARG_ENABLE(dropkludge,
174         [  --enable-dropkludge     enable the experimental dropbox fix (INSECURE!) ], [
175         if test "x$enableval" = "xyes"; then 
176                 AC_DEFINE(DROPKLUDGE, 1, [Define if you want to use the experimental dropkludge support])
177                 AC_MSG_RESULT([yes])
178         else
179                 AC_MSG_RESULT([no])
180         fi
181         ], [AC_MSG_RESULT([no])]
182 )
183
184 AC_MSG_CHECKING([whether to enable forcing of uid/gid per volume])
185 AC_ARG_ENABLE(force-uidgid,
186         [  --enable-force-uidgid   allow forcing of uid/gid per volume (BROKEN) ], [
187         if test "x$enableval" = "xyes"; then
188                 AC_DEFINE(FORCE_UIDGID, 1, [Define if you want forcing of uid/gid per volume])
189                 AC_MSG_RESULT([yes])
190         else
191                 AC_MSG_RESULT([no])
192         fi
193         ], [AC_MSG_RESULT([no])]
194 )
195
196 NETATALK_ARG_DID
197
198 dnl Determine whether or not to use filename mangling
199 AC_MSG_CHECKING([whether to use filename mangling])
200 AC_ARG_WITH(mangling,
201         [  --with-mangling         enable filename mangling],
202         [
203                 if test "x$withval" = "xyes"; then
204                         if test "x$did_scheme" != "xcnid"; then
205                                 AC_MSG_ERROR([DID scheme must be CNID to use filename mangling])
206                         else
207                                 AC_DEFINE(FILE_MANGLING, 1, [Define if file name mangling should be used])
208                                 AC_MSG_RESULT([yes])
209                         fi
210                 else
211                         AC_MSG_RESULT([no])
212                 fi
213         ], [
214                 if test "x$did_scheme" = "xcnid"; then
215                         AC_DEFINE(FILE_MANGLING, 1, [Define if file name mangling should be used])
216                         AC_MSG_RESULT([yes])
217                 else
218                         AC_MSG_RESULT([no])
219                 fi
220         ]
221 )
222
223 if test "$did_scheme" = "cnid"; then
224     USE_CDB="yes"
225 else
226     USE_CDB="no"
227 fi
228
229 dnl Determine whether or not to use CDB or transactional DB store
230 AC_MSG_CHECKING([whether to use CNID with Concurrent Data Store])
231 AC_ARG_WITH(cdb,
232         [  --with-cdb              enable CNID with Concurrent Data Store],
233         if test "$withval" = "no"; then
234             if test "x$did_scheme" != "xcnid"; then
235                 USE_CDB="no"
236                 AC_MSG_ERROR([DID scheme must be CNID to use CDB])
237             else
238                 USE_CDB="no"
239                 AC_MSG_RESULT([no])
240             fi
241         else
242             USE_CDB="yes"
243             AC_MSG_RESULT([yes])
244         fi
245         , AC_MSG_RESULT([yes])
246 )
247
248 if test "$USE_CDB" = "yes"; then
249     AC_DEFINE(CNID_DB_CDB, 1, [Define if CNID should be used with Concurrent Data Store])
250 fi
251
252 dnl Check for quota support
253 AC_CHECK_QUOTA
254
255 dnl Check for optional server location protocol support (used by MacOS X)
256 NETATALK_SRVLOC
257
258 dnl Check for gssapi
259 NETATALK_GSSAPI_CHECK
260
261 dnl Check for PAM libs
262 AC_PATH_PAM([
263         use_pam_so=yes
264         compile_pam=yes
265         AC_DEFINE(USE_PAM, 1, [Define to enable PAM support])
266 ])
267
268 AC_MSG_CHECKING([whether shadow support should be enabled])
269 AC_ARG_WITH(shadow,
270         [  --with-shadow           enable shadow password support],
271         [shadowpw="$withval"],
272         [shadowpw=no]
273 )
274 if test "x$shadowpw" = "xyes"; then
275         AC_DEFINE(SHADOWPW, 1, [Define if shadow passwords should be used])
276 fi
277 AC_MSG_RESULT([$shadowpw])
278
279 AC_ARG_ENABLE(shell-check,
280         [  --disable-shell-check   disable checking for a valid shell],
281         if test "$enableval" = "no"; then 
282                 AC_DEFINE(DISABLE_SHELLCHECK, 1, [Define if shell check should be disabled])
283                 AC_MSG_RESULT([disabling valid shell check])
284         fi
285 )
286
287 NETATALK_TCP_WRAPPERS
288
289 AC_ARG_ENABLE(redhat,
290         [  --enable-redhat         use redhat-style sysv configuration ],
291         if test "$enableval" = "yes"; then
292                 sysv_style=redhat
293         fi
294         AC_MSG_RESULT([enabling redhat-style sysv support])
295 )
296
297 AC_ARG_ENABLE(suse,
298         [  --enable-suse           use suse-style sysv configuration ],
299         if test "$enableval" = "yes"; then
300                 sysv_style=suse
301         fi
302         AC_MSG_RESULT([enabling suse-style sysv support])
303 )
304
305 AC_ARG_ENABLE(cobalt,
306         [  --enable-cobalt         use cobalt-style sysv configuration ],
307         if test "$enableval" = "yes"; then
308                 sysv_style=cobalt
309         fi
310         AC_MSG_RESULT([enabling cobalt-style sysv support])
311 )
312
313 AC_ARG_ENABLE(netbsd,
314         [  --enable-netbsd         use NetBSD-style rc.d configuration ],
315         if test "x$enableval" = "xyes"; then
316                 sysv_style=netbsd
317         fi
318         AC_MSG_RESULT([enabling NetBSD-style rc.d support])
319 )
320
321 dnl ----- a2boot compilation (disabled by default)
322 AC_MSG_CHECKING([whether a2boot should be compiled])
323 compile_a2boot=no
324 AC_ARG_ENABLE(a2boot,
325         [  --enable-a2boot         enable compilation of Apple2 boot server],
326         [compile_a2boot="$enableval"],
327         [compile_a2boot="no"]
328 )
329 AC_MSG_RESULT([$compile_a2boot])
330
331 AC_ARG_WITH(uams-path,
332         [  --with-uams-path=PATH   path to UAMs [[PKGCONF/uams]]],
333         uams_path="$withval",
334         uams_path="${PKGCONFDIR}/uams"
335 )
336
337 dnl --------------------------------------------------------------------------
338 dnl FHS stuff has to be done last because it overrides other defaults
339 dnl --------------------------------------------------------------------------
340
341 AC_ARG_ENABLE(fhs,
342         [  --enable-fhs            use Filesystem Hierarchy Standard (FHS) compatibility],
343         if test "$enableval" = "yes"; then
344                 uams_path="${libdir}/netatalk"
345                 sysconfdir="/etc"
346                 PKGCONFDIR=${sysconfdir}/netatalk
347                 SERVERTEXT="${PKGCONFDIR}/msg"
348                 NLSDIR="${PKGCONFDIR}/nls"
349                 use_pam_so=yes
350                 mandir="/usr/share/man"
351                 AC_DEFINE(FHS_COMPATIBILITY, 1, [Define if you want compatibily with the FHS])
352         fi
353         AC_MSG_RESULT([enabling Filesystem Hierarchy Standard (FHS) compatibility])
354 )
355
356 dnl --------------------------------------------------------------------------
357 dnl post-FHS substitutions, etc
358 dnl --------------------------------------------------------------------------
359
360 dnl ***** UAMS_PATH
361 AC_DEFINE_UNQUOTED(UAMS_PATH, "${uams_path}",
362         [path to UAMs [default=PKGCONF/uams]])
363 UAMS_PATH="${uams_path}"
364 AC_SUBST(UAMS_PATH)
365
366 dnl --------------------------------------------------------------------------
367 dnl drop in includes for top level directory structures here...
368 dnl --------------------------------------------------------------------------
369
370 dnl Note: $(top_srcdir)/include should be added before all other includes
371 dnl       so that includes from that directory a preferred to includes from
372 dnl       /usr/include or similar places.
373 LIBS="$LIBS -L\$(top_srcdir)/libatalk"
374 CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
375
376 dnl --------------------------------------------------------------------------
377 dnl specific configuration comes in here:
378 dnl --------------------------------------------------------------------------
379
380 dnl ac_cv_target_os is now host_os, ac_cv_target_cpu is now host_cpu
381
382 dnl --------------------- determine operating system from "target"
383 case "$host_os" in
384         *aix*)                          this_os=aix ;;
385         *freebsd*)                      this_os=freebsd ;;
386         *hpux11*)                       this_os=hpux11 ;;
387         *irix*)                         this_os=irix ;;
388         *linux*)                        this_os=linux ;;
389         *osx*)                          this_os=macosx ;;
390         *darwin*)                       this_os=macosx ;;
391         *netbsd*)                       this_os=netbsd ;;
392         *openbsd*)                      this_os=openbsd ;;
393         *osf*)                          this_os=tru64 ;;
394         *solaris*)                      this_os=solaris ;;
395 esac
396
397 case "$host_cpu" in
398         i386|i486|i586|i686|k7)         this_cpu=x86 ;;
399         alpha)                                          this_cpu=alpha ;;
400         mips)                                           this_cpu=mips ;;
401         powerpc|ppc)                            this_cpu=ppc ;;
402 esac
403
404 dnl --------------------- operating system specific flags (port from sys/*)
405
406 dnl ----- AIX specific -----
407 if test x"$this_os" = "xaix"; then
408         AC_MSG_RESULT([ * AIX specific configuration])
409
410         dnl This is probably a lie; AIX 4.3 supports a 64-bit long
411         dnl compilation environment.  It's enough to get things defined
412         dnl right in endian.h provided that long long is supported, though.
413         AC_DEFINE(HAVE_32BIT_LONGS, 1, [Define if the data type long has 32 bit])
414 fi
415
416 dnl ----- FreeBSD specific -----
417 if test x"$this_os" = "xfreebsd"; then 
418         AC_MSG_RESULT([ * FreeBSD specific configuration])
419         AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
420         AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics])
421
422         AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
423 fi
424
425 dnl ----- HP-UX 11 specific -----
426 if test x"$this_os" = "xhpux11"; then
427         AC_MSG_RESULT([ * HP-UX 11 specific configuration])
428
429         AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
430 fi
431
432 dnl ----- Linux specific -----
433 ac_have_atalk_addr=no
434 if test x"$this_os" = "xlinux"; then 
435         AC_MSG_RESULT([ * Linux specific configuration])
436
437         dnl ----- kernel 2.6 changed struct at_addr to atalk_addr
438         AC_MSG_CHECKING([for struct atalk_addr])
439         AC_COMPILE_IFELSE([
440 #include <sys/socket.h>
441 #include <asm/types.h>
442 #include <linux/atalk.h>
443
444 int main() {
445        struct atalk_addr foo;
446
447        return 0;
448 }
449         ], [
450                 ac_have_atalk_addr=yes
451                 AC_MSG_RESULT([yes])
452         ], [
453                 AC_MSG_RESULT([no])
454         ])
455
456 if test "x$ac_have_atalk_addr" = "xyes"; then
457         AC_DEFINE(HAVE_ATALK_ADDR, 1, [set if struct at_addr is called atalk_addr])
458 fi
459
460         dnl ----- as far as I can tell, dbtob always does the wrong thing
461         dnl ----- on every single version of linux I've ever played with.
462         dnl ----- see etc/afpd/quota.c
463         AC_DEFINE(HAVE_BROKEN_DBTOB, 1, [Define if dbtob is broken])
464
465         dnl --- added by Yoshinobu Ishizaki (2001.03.13) ---
466         dnl ----- check if version is newer than 2.2.x
467         changequote(<<,>>)
468         majorvers="`uname -r | sed 's/\([0-9]\)..*/\1/'`"
469         minorvers="`uname -r | sed 's/[0-9]\.\([0-9]\)\..*/\1/'`"
470         if [ $majorvers -ge 2 ]; then
471                 if [ $minorvers -ge 2 ]; then
472                         changequote([,])
473                         AC_MSG_RESULT([ * found Linux 2.2.x or higher])
474                         AC_DEFINE(SENDFILE_FLAVOR_LINUX, 1, [Define if the sendfile() function uses Linux semantics])
475                 else
476                         AC_MSG_RESULT([ * found Linux 2.0.x ]) 
477                 fi
478         fi
479
480         dnl ----- Linux/alpha specific -----
481         if test x"$this_cpu" = "xalpha"; then 
482                 AC_MSG_RESULT([enabling gcc memcpy bug workaround])
483                 AC_DEFINE(HAVE_GCC_MEMCPY_BUG, 1, [Define if memcpy is buggy])
484         fi
485         need_dash_r=no
486 fi
487
488 dnl ----- Mac OSX specific -----
489 if test x"$this_os" = "xmacosx"; then 
490         AC_MSG_RESULT([ * Mac OSX specific configuration])
491         AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
492         AC_DEFINE(HAVE_BROKEN_CPP, 1, [Define if cpp is broken])
493         AC_DEFINE(HAVE_2ARG_DBTOB, 1, [Define if dbtob takes two arguments])
494         dnl AC_DEFINE(NO_DLFCN_H)
495         AC_DEFINE(MACOSX_SERVER, 1, [Define if compiling for MacOS X Server])
496 fi
497
498 dnl ----- NetBSD specific -----
499 if test x"$this_os" = "xnetbsd"; then 
500         AC_MSG_RESULT([ * NetBSD specific configuration])
501         AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
502         if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
503                 # NetBSD ELF machines don't have to have DLSYM_PREPEND_UNDERSCORE.
504                 # If this test is true, it's not an ELF box.
505                 # This REALLY should be a configure test.
506                 AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
507         fi
508         CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
509         need_dash_r=yes 
510
511         dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
512         AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
513         AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
514 fi
515
516 dnl ----- OpenBSD specific -----
517 if test x"$this_os" = "xopenbsd"; then 
518         AC_MSG_RESULT([ * OpenBSD specific configuration])
519         AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
520         AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
521
522         dnl ----- OpenBSD does not have crypt.h, uses unistd.h -----
523         AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
524         AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist])
525 fi
526
527 dnl ----- Solaris specific -----
528 if test x"$this_os" = "xsolaris"; then 
529         AC_MSG_RESULT([ * Solaris specific configuration])
530         AC_DEFINE(__svr4__, 1, [Solaris compatibility macro])
531         AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
532         AC_DEFINE(SOLARIS, 1, [Solaris compatibility macro])
533         CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
534         need_dash_r=yes
535
536         AC_MSG_RESULT([enabling Solaris kernel module build])
537         solaris_module=yes
538 fi
539
540 dnl ----- Tru64 specific -----
541 if test x"$this_os" = "xtru64"; then 
542         AC_MSG_RESULT([ * Tru64 specific configuration])
543         AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
544         AC_DEFINE(HAVE_64BIT_LONGS, 1, [Define if the data type long has 64 bit])
545         dnl AC_DEFINE(USE_MOUNT_H)
546         AC_DEFINE(USE_OLD_RQUOTA, 1, [Define to use old rquota])
547         AC_DEFINE(TRU64, 1, [Define on Tru64 platforms])
548         AC_CHECK_LIB(security,set_auth_parameters)
549         CFLAGS="-I\$(top_srcdir)/sys/tru64 $CFLAGS"
550         need_dash_r=no
551         sysv_style=tru64
552 fi
553
554 dnl -- look for OpenSSL and other crypt libraries
555 AC_PATH_GCRYPT
556 AC_PATH_SSL
557
558 dnl --------------------- check for building Kerberos v4 UAM module
559
560 AC_ARG_ENABLE(krb4-uam,
561         [  --enable-krb4-uam       enable build of Kerberos v4 UAM module],
562         if test "$enableval" = "yes"; then
563                 AC_DEFINE(UAM_KRB4, 1, [Define if the Kerberos 4 UAM module should be compiled])
564                 compile_kerberos=yes
565                 AC_MSG_RESULT([enabling build with Kerberos v4 UAM module])
566         fi
567 )
568 dnl --------------------- overwrite the config files . . . or not.
569
570 AC_MSG_CHECKING([whether configuration files should be overwritten])
571 AC_ARG_ENABLE(overwrite,
572         [  --enable-overwrite      overwrite configuration files during installation],
573         [OVERWRITE_CONFIG="${enable_overwrite}"],
574         [OVERWRITE_CONFIG="no"]
575 )
576 AC_MSG_RESULT([$OVERWRITE_CONFIG])
577
578 dnl --------------------- last minute substitutions
579
580 AC_SUBST(LIBS)
581 AC_SUBST(CFLAGS)
582 AC_SUBST(OVERWRITE_CONFIG)
583
584 AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
585 AM_CONDITIONAL(COMPILE_A2BOOT, test x$compile_a2boot = xyes)
586 AM_CONDITIONAL(USE_DHX, test x$compile_ssl = xyes)
587 AM_CONDITIONAL(USE_KERBEROS, test x$compile_kerberos = xyes)
588 AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
589 AM_CONDITIONAL(USE_PAM, test x$compile_pam = xyes)
590 AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
591 AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
592 AM_CONDITIONAL(USE_NETBSD, test x$sysv_style = xnetbsd)
593 AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
594 AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
595 AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
596 AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
597
598 dnl --------------------- generate files
599
600 AC_OUTPUT([Makefile
601         bin/Makefile
602         bin/adv1tov2/Makefile
603         bin/aecho/Makefile
604         bin/afile/Makefile
605         bin/afppasswd/Makefile
606         bin/cnid/Makefile
607         bin/cnid/cnid_maint
608         bin/getzones/Makefile
609         bin/megatron/Makefile
610         bin/nbp/Makefile
611         bin/pap/Makefile
612         bin/psorder/Makefile
613         config/Makefile
614         contrib/Makefile
615         contrib/macusers/Makefile
616         contrib/macusers/macusers
617         contrib/nu/Makefile
618         contrib/nu/nu
619         contrib/printing/Makefile
620         contrib/shell_utils/Makefile
621         contrib/shell_utils/afpd-mtab.pl
622         contrib/shell_utils/apple_cp
623         contrib/shell_utils/apple_mv
624         contrib/shell_utils/apple_rm
625         contrib/shell_utils/cleanappledouble.pl
626         contrib/shell_utils/lp2pap.sh
627         contrib/shell_utils/netatalkshorternamelinks.pl
628         contrib/timelord/Makefile
629         contrib/a2boot/Makefile
630         distrib/Makefile
631         distrib/config/Makefile
632         distrib/config/netatalk-config
633         distrib/initscripts/Makefile
634         distrib/m4/Makefile
635         doc/Makefile
636         etc/Makefile
637         etc/afpd/Makefile
638         etc/afpd/nls/Makefile
639         etc/atalkd/Makefile
640         etc/uams/Makefile
641         etc/uams/uams_krb4/Makefile
642         etc/papd/Makefile
643         etc/psf/Makefile
644         etc/psf/etc2ps.sh
645         include/Makefile
646         include/atalk/Makefile
647         libatalk/Makefile
648         libatalk/adouble/Makefile
649         libatalk/asp/Makefile
650         libatalk/atp/Makefile
651         libatalk/cnid/Makefile
652         libatalk/compat/Makefile
653         libatalk/dsi/Makefile
654         libatalk/nbp/Makefile
655         libatalk/netddp/Makefile
656         libatalk/util/Makefile
657         macros/Makefile
658         man/Makefile
659         man/man1/Makefile
660         man/man3/Makefile
661         man/man4/Makefile
662         man/man5/Makefile
663         man/man8/Makefile
664         sys/Makefile
665         sys/generic/Makefile
666         sys/generic/sys/Makefile
667         sys/netatalk/Makefile
668         sys/netbsd/Makefile
669         sys/netbsd/netatalk/Makefile
670         sys/solaris/Makefile
671         sys/solaris/Makefile.kernel
672         sys/sunos/Makefile
673         sys/ultrix/Makefile
674         ],
675         [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
676 )
677