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