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