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