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