]> arthur.barton.de Git - netatalk.git/blob - configure.in
Fix up cnid_didname_verify so that it works with automake/autoconf.
[netatalk.git] / configure.in
1 dnl $Id: configure.in,v 1.139 2001-12-10 07:20:37 jmarcus Exp $
2 dnl configure.in for netatalk
3
4 AC_INIT(bin/adv1tov2/adv1tov2.c)
5
6 NETATALK_VERSION=`cat 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 Reset locations to proper places
14 AC_PREFIX_DEFAULT(/usr/local)
15
16 dnl Checks for programs.
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
25 dnl *********************************************************************
26 dnl FIXME! FIXME! These should be selectable properly, and should produce
27 dnl the proper flags and defines...
28 dnl *********************************************************************
29
30 dnl Checks for libraries.
31 dnl Replace `main' with a function in -labs:
32 AC_CHECK_LIB(abs, main)
33 dnl Replace `main' with a function in -laudit:
34 AC_CHECK_LIB(audit, main)
35 dnl Replace `main' with a function in -lauth:
36 AC_CHECK_LIB(auth, main)
37 dnl Replace `main' with a function in -lcmd:
38 AC_CHECK_LIB(cmd, main)
39 dnl Replace `main' with a function in -lcrypt:
40 AC_CHECK_LIB(crypt, main)
41 dnl Replace `main' with a function in -ld:
42 AC_CHECK_LIB(d, main)
43 dnl Replace `main' with a function in -ldl:
44 AC_CHECK_LIB(dl, main)
45 dnl Replace `main' with a function in -lkauth:
46 AC_CHECK_LIB(kauth, main)
47 dnl Replace `main' with a function in -lkrb:
48 AC_CHECK_LIB(krb, main)
49 dnl Replace `main' with a function in -llwp:
50 AC_CHECK_LIB(lwp, main)
51 dnl Replace `main' with a function in -ln:
52 AC_CHECK_LIB(n, main)
53 dnl Replace `main' with a function in -lnsl:
54 AC_CHECK_LIB(nsl, main)
55 dnl Replace `main' with a function in -lprot:
56 AC_CHECK_LIB(prot, main)
57 dnl Replace `main' with a function in -lrx:
58 AC_CHECK_LIB(rx, main)
59 dnl Replace `main' with a function in -lrxkad:
60 AC_CHECK_LIB(rxkad, main)
61 dnl Replace `main' with a function in -lsocket:
62 AC_CHECK_LIB(socket, main)
63 dnl Replace `main' with a function in -lsys:
64 AC_CHECK_LIB(sys, main)
65 dnl Replace `main' with a function in -lubik:
66 AC_CHECK_LIB(ubik, main)
67
68 #
69 # Check presence of some functions
70 #
71 # Check for XPG4 access() function
72 # Be sure to test before adding AFS libs in LIBS path as AFS lib
73 # has such a function that works only on AFS filesystems.
74 AC_CHECK_FUNCS(access)
75
76 dnl Checks for header files.
77 AC_HEADER_DIRENT
78 AC_HEADER_STDC
79 AC_HEADER_SYS_WAIT
80 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 sys/mount.h statfs.h sys/types.h dlfcn.h errno.h sys/errno.h)
81 AC_CHECK_HEADER(sys/cdefs.h,,
82         AC_MSG_RESULT([enabling generic cdefs.h from tree])
83         CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
84 )
85
86 # Allow user to specify flags
87 AC_ARG_WITH(cflags,
88         [  --with-cflags           specify additional flags to pass to compiler],
89         [
90                 if test "x$withval" != "xno" ; then
91                         CFLAGS="$CFLAGS $withval"
92                 fi
93         ]       
94 )
95 AC_ARG_WITH(libs,
96         [  --with-libs             specify additional libraries to link with],
97         [
98                 if test "x$withval" != "xno" ; then
99                         LIBS="$LIBS $withval"
100                 fi
101         ]
102 )
103
104 dnl Checks for typedefs, structures, and compiler characteristics.
105 AC_C_CONST
106 AC_TYPE_UID_T
107 AC_C_INLINE
108 AC_TYPE_MODE_T
109 AC_TYPE_OFF_T
110 AC_TYPE_PID_T
111 AC_TYPE_SIZE_T
112 AC_STRUCT_ST_RDEV
113 AC_HEADER_TIME
114 AC_STRUCT_TM
115
116 dnl Checks for library functions.
117 AC_TYPE_GETGROUPS
118 AC_PROG_GCC_TRADITIONAL
119 AC_FUNC_MEMCMP
120 AC_HEADER_MAJOR
121 AC_FUNC_MMAP
122 AC_TYPE_SIGNAL
123 AC_FUNC_UTIME_NULL
124 AC_FUNC_WAIT3
125 AC_CHECK_FUNCS(flock getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strstr strtoul setpgrp strchr memcpy)
126 AC_FUNC_SETPGRP
127
128 dnl --------------------------------------------------------------------------
129 dnl specific configuration comes in here:
130 dnl --------------------------------------------------------------------------
131
132 AC_DEFINE(ADMIN_GRP, 1)
133
134 AC_ARG_WITH(admin-group,
135         [  --disable-admin-group   disable admin group],
136         if test "$enableval" = "no"; then
137                 AC_DEFINE(ADMIN_GRP, 0)
138                 AC_MSG_RESULT([disabling administrative group support])
139         fi
140  )
141
142 AC_ARG_ENABLE(afs,
143         [  --enable-afs            enable AFS support],
144         if test "$enableval" = "yes"; then
145                 AC_DEFINE(AFS, 1)
146                 AC_MSG_RESULT([enabling AFS support])
147         fi
148 )
149
150 AC_ARG_WITH(pkgconfdir,
151         [  --with-pkgconfdir=DIR   package specific configuration in DIR
152                           [[SYSCONF/netatalk]]],
153                 PKGCONFDIR="$withval",
154                 PKGCONFDIR="${sysconfdir}/netatalk"
155 )
156
157 AC_ARG_WITH(cracklib,
158         [  --with-cracklib=DICT    enable/set location of cracklib dictionary],
159         if test "x$withval" != "xno" ; then
160                 cracklib="$withval"
161                 AC_CHECK_LIB(crack, main,
162                         AC_DEFINE(USE_CRACKLIB) 
163                         LIBS="$LIBS -lcrack"
164                         AC_MSG_RESULT([enabling cracklib support])
165                         if test "$cracklib" = "yes"; then
166                                 cracklib="/usr/lib/cracklib_dict"
167                         fi
168                         AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
169                                 [path to cracklib dictionary])
170                         AC_MSG_RESULT([setting cracklib dictionary to $cracklib]),
171                         AC_MSG_ERROR([cracklib not found!])
172                 )
173         fi
174 )
175
176 AC_ARG_ENABLE(ddp,
177         [  --disable-ddp           disable DDP],
178         if test "$enableval" = "no"; then 
179                 AC_DEFINE(NO_DDP, 1)
180                 AC_MSG_RESULT([disabling DDP])
181         fi
182 )
183
184 AC_ARG_ENABLE(debug,
185         [  --enable-debug          enable debug code],
186         if test "$enableval" != "no"; then
187                 if test "$enableval" = "yes"; then
188                         AC_DEFINE(DEBUG, 1)
189                 else
190                         AC_DEFINE_UNQUOTED(DEBUG, $enableval)
191                 fi 
192                 AC_MSG_RESULT([enabling debugging code])
193         else
194                 AC_DEFINE(DEBUG, 0)
195         fi
196 )
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_ARG_ENABLE(dropkludge,
207         [  --enable-dropkludge     enable the experimental dropbox fix (INSECURE!) ],
208         if test "$enableval" = "yes"; then 
209                 AC_DEFINE(DROPKLUDGE, 1)
210                 AC_MSG_RESULT([enabling experimental dropbox support])
211         fi
212 )
213
214 AC_ARG_ENABLE(force-uidgid,
215         [  --enable-force-uidgid   allow forcing of uid/gid per volume (BROKEN) ],
216         if test "$enableval" = "yes"; then
217                 AC_DEFINE(FORCE_UIDGID, 1)
218                 AC_MSG_RESULT([enabling forcing of uid/gid per volume])
219         fi
220 )
221
222 dnl Don't use DB3 unless it's needed
223 db3_required=no
224
225
226 dnl Determine DID scheme
227 AC_MSG_CHECKING([for DID scheme to use])
228 AC_ARG_WITH(did,
229         [  --with-did=SCHEME       set DID scheme (last,hash,mtab,cnid)],
230         [ did_scheme="$withval" ],
231         [ did_scheme="last" ]
232 )
233
234 if test "x$did_scheme" = "xlast"; then
235         AC_DEFINE(USE_LASTDID, 1)
236         AC_MSG_RESULT([last])
237 elif test "x$did_scheme" = "xhash"; then
238         AC_MSG_RESULT([device/inode-based hashing])
239 elif test "x$did_scheme" = "xmtab"; then
240         AC_DEFINE(DID_MTAB, 1)
241         AC_MSG_RESULT([mtab-based DID creation support])
242 elif test "x$did_scheme" = "xcnid"; then
243         db3_required="yes"
244         AC_DEFINE(CNID_DB, 1)
245         AC_MSG_RESULT([enabling build with CNID DB support])
246 else
247         AC_MSG_ERROR([unknown DID scheme])
248 fi
249
250 dnl Check for Berkeley DB3 library
251 if test "x$db3_required" = "xyes"; then
252         AC_PATH_DB3(, [AC_MSG_ERROR([Berkeley DB3 library not found!])])
253 fi
254
255 dnl Check for quota support
256 AC_CHECK_QUOTA
257
258 msg_dir=""
259 AC_ARG_WITH(message-dir,
260         [  --with-message-dir=PATH path to message files [[PKGCONF/msg]]],
261                 msg_dir="$withval"
262                 if test x"$msg_dir" = "x"; then
263                         msg_dir="${PKGCONFDIR}/msg"
264                 fi
265                 AC_DEFINE_UNQUOTED(SERVERTEXT, "$msg_dir",
266                         [path to message dir [[PKGCONF/msg]]])
267                 SERVERTEXT="$msg_dir"
268                 AC_SUBST(SERVERTEXT)
269 )
270
271 AC_ARG_ENABLE(srvloc,
272         [  --enable-srvloc         turn on Server Location Protocol support (EXPERIMENTAL)],
273         srvloc=$enableval,
274         srvloc=no
275 )
276
277 dnl Conditional for optional server location protocol support (used by OS X)
278 AM_CONDITIONAL(USE_SRVLOC, test "x$srvloc" != "xno")
279 if test "x$srvloc" != "xno"; then
280     for slpdir in "" $srvloc /usr /usr/local ; do
281                 if test -f "$slpdir/include/slp.h" ; then
282                         LIBS="$LIBS -L$slpdir/lib -lslp"
283                         CFLAGS="$CFLAGS -I$slpdir/include"
284                 AC_CHECK_LIB(slp,SLPOpen)
285                 AC_CHECK_FUNCS(SLPReg SLPDereg SLPClose)
286                 AC_DEFINE(USE_SRVLOC, 1)
287                         break
288                 fi
289         done
290 fi
291
292 # Check for PAM libs
293 AC_PATH_PAM([
294         PAPD_LIBS="$PAPD_LIBS $PAM_LIBS"
295         AFPD_LIBS="$AFPD_LIBS $PAM_LIBS"
296         use_pam_so=yes
297         compile_pam=yes
298         AC_DEFINE(USE_PAM)
299 ])
300
301 AC_MSG_CHECKING([whether shadow support should be enabled])
302 AC_ARG_WITH(shadow,
303         [  --with-shadow           enable shadow password support],
304         [shadowpw="$withval"],
305         [shadowpw=no]
306 )
307 if test "x$shadowpw" = "xyes"; then
308         AC_DEFINE(SHADOWPW)
309 fi
310 AC_MSG_RESULT([$shadowpw])
311
312 AC_ARG_ENABLE(shell-check,
313         [  --disable-shell-check   disable checking for a valid shell],
314         if test "$enableval" = "no"; then 
315                 AC_DEFINE(DISABLE_SHELLCHECK, 1)
316                 AC_MSG_RESULT([disabling valid shell check])
317         fi
318 )
319
320 AC_MSG_CHECKING([whether flock locks should be enabled])
321 AC_ARG_WITH(flock-locks,
322         [  --with-flock-locks      enable flock locks support],
323         [flock_locks="$withval"],
324         [flock_locks="no"]
325 )
326 if test "x$flock_locks" = "xyes"; then
327         AC_DEFINE(USE_FLOCK_LOCKS)
328 fi
329 AC_MSG_RESULT([$flock_locks])
330
331 AC_ARG_WITH(tcp-wrappers,
332         [  --with-tcp-wrappers     enable TCP wrappers support],
333         AC_CHECK_LIB(wrap, tcpd_warn,
334                 AC_DEFINE(TCPWRAP)
335                 AFPD_LIBS="$AFPD_LIBS -lwrap"
336                 AC_MSG_RESULT([enabling TCP wrappers support])
337         )
338 )
339
340 AC_ARG_ENABLE(redhat,
341         [  --enable-redhat         use redhat-style sysv configuration ],
342         if test "$enableval" = "yes"; then
343                 sysv_style=redhat
344         fi
345         AC_MSG_RESULT([enabling redhat-style sysv support])
346 )
347
348 AC_ARG_ENABLE(suse,
349         [  --enable-suse           use suse-style sysv configuration ],
350         if test "$enableval" = "yes"; then
351                 sysv_style=suse
352         fi
353         AC_MSG_RESULT([enabling suse-style sysv support])
354 )
355
356 AC_ARG_ENABLE(cobalt,
357         [  --enable-cobalt         use cobalt-style sysv configuration ],
358         if test "$enableval" = "yes"; then
359                 sysv_style=cobalt
360         fi
361         AC_MSG_RESULT([enabling cobalt-style sysv support])
362 )
363
364 dnl ----- timelord compilation (disabled by default)
365 AC_MSG_CHECKING([whether timelord should be compiled])
366 compile_timelord=no
367 AC_ARG_ENABLE(timelord,
368         [  --enable-timelord       enable compilation of timelord server],
369         [compile_timelord="$enableval"],
370         [compile_timelord="no"]
371 )
372 AC_MSG_RESULT([$compile_timelord])
373
374 AC_ARG_WITH(uams-path,
375         [  --with-uams-path=PATH   path to UAMs [[PKGCONF/uams]]],
376         uams_path="$withval",
377         uams_path="${PKGCONFDIR}/uams"
378 )
379
380 dnl --------------------------------------------------------------------------
381 dnl FHS stuff has to be done last because it overrides other defaults
382 dnl --------------------------------------------------------------------------
383
384 AC_ARG_ENABLE(fhs,
385         [  --enable-fhs            use Filesystem Hierarchy Standard (FHS) compatibility],
386         if test "$enableval" = "yes"; then
387                 uams_path="/usr/lib/netatalk"
388                 sysconfdir="/etc"
389                 PKGCONFDIR=${sysconfdir}/netatalk
390                 use_pam_so=yes
391                 dnl FIXME: NEED TO HAVE --mandir=/usr/share/man AT SOME POINT...
392                 AC_DEFINE(FHS_COMPATIBILITY)
393         fi
394         AC_MSG_RESULT([enabling Filesystem Hierarchy Standard (FHS) compatibility])
395 )
396
397 dnl --------------------------------------------------------------------------
398 dnl post-FHS substitutions, etc
399 dnl --------------------------------------------------------------------------
400
401 dnl ***** UAMS_PATH
402 AC_DEFINE_UNQUOTED(UAMS_PATH, "${uams_path}",
403         [path to UAMs [default=PKGCONF/uams]])
404 UAMS_PATH="${uams_path}"
405 AC_SUBST(UAMS_PATH)
406
407 dnl --------------------------------------------------------------------------
408 dnl drop in includes for top level directory structures here...
409 dnl --------------------------------------------------------------------------
410
411 dnl Note: $(top_srcdir)/include should be added before all other includes
412 dnl       so that includes from that directory a preferred to includes from
413 dnl       /usr/include or similar places.
414 LIBS="$LIBS -L\$(top_srcdir)/libatalk"
415 CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
416
417 dnl --------------------------------------------------------------------------
418 dnl specific configuration comes in here:
419 dnl --------------------------------------------------------------------------
420
421 dnl ac_cv_target_os is now host_os, ac_cv_target_cpu is now host_cpu
422
423 dnl --------------------- determine operating system from "target"
424 case "$host_os" in
425         *aix*)                          this_os=aix ;;
426         *freebsd*)                      this_os=freebsd ;;
427         *hpux11*)                       this_os=hpux11 ;;
428         *irix*)                         this_os=irix ;;
429         *linux*)                        this_os=linux ;;
430         *osx*)                          this_os=macosx ;;
431         *darwin*)                       this_os=macosx ;;
432         *netbsd*)                       this_os=netbsd ;;
433         *openbsd*)                      this_os=openbsd ;;
434         *osf*)                          this_os=tru64 ;;
435         *solaris*)                      this_os=solaris ;;
436 esac
437
438 case "$host_cpu" in
439         i386|i486|i586|i686|k7)         this_cpu=x86 ;;
440         alpha)                                          this_cpu=alpha ;;
441         mips)                                           this_cpu=mips ;;
442         powerpc|ppc)                            this_cpu=ppc ;;
443 esac
444
445 dnl --------------------- operating system specific flags (port from sys/*)
446
447 dnl ----- AIX specific -----
448 if test x"$this_os" = "xaix"; then
449         AC_MSG_RESULT([ * AIX specific configuration])
450         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
451
452         dnl This is probably a lie; AIX 4.3 supports a 64-bit long
453         dnl compilation environment.  It's enough to get things defined
454         dnl right in endian.h provided that long long is supported, though.
455         AC_DEFINE(HAVE_32BIT_LONGS)
456 fi
457
458 dnl ----- FreeBSD specific -----
459 if test x"$this_os" = "xfreebsd"; then 
460         AC_MSG_RESULT([ * FreeBSD specific configuration])
461         AC_DEFINE(BSD4_4)
462         AC_DEFINE(SENDFILE_FLAVOR_BSD)
463
464         AC_DEFINE(NO_CRYPT_H, 1)
465 fi
466
467 dnl ----- HP-UX 11 specific -----
468 if test x"$this_os" = "xhpux11"; then
469         AC_MSG_RESULT([ * HP-UX 11 specific configuration])
470
471         AC_DEFINE(_ISOC9X_SOURCE)
472         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
473 fi
474
475 dnl ----- IRIX specific -----
476 if test x"$this_os" = "xirix"; then
477         AC_MSG_RESULT([ * IRIX specific configuration])
478
479         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
480 fi
481
482 dnl ----- Linux specific -----
483 if test x"$this_os" = "xlinux"; then 
484         AC_MSG_RESULT([ * Linux specific configuration])
485
486         dnl ----- check if we need the quotactl wrapper
487         AC_CHECK_HEADERS(sys/quota.h linux/quota.h)
488         AC_CHECK_FUNC(quotactl,,
489                 AC_DEFINE(NEED_QUOTACTL_WRAPPER)
490                 AC_MSG_RESULT([enabling quotactl wrapper])
491         )
492
493         dnl ----- as far as I can tell, dbtob always does the wrong thing
494         dnl ----- on every single version of linux I've ever played with.
495         dnl ----- see etc/afpd/quota.c
496         AC_DEFINE(HAVE_BROKEN_DBTOB)
497
498         dnl --- added by Yoshinobu Ishizaki (2001.03.13) ---
499         dnl ----- check if version is newer than 2.2.x
500         changequote(<<,>>)
501         majorvers="`uname -r | sed 's/\([0-9]\)..*/\1/'`"
502         minorvers="`uname -r | sed 's/[0-9]\.\([0-9]\)\..*/\1/'`"
503         if [ $majorvers -ge 2 ]; then
504                 if [ $minorvers -ge 2 ]; then
505                         changequote([,])
506                         AC_MSG_RESULT([ * found Linux 2.2.x or higher])
507                         AC_DEFINE(SENDFILE_FLAVOR_LINUX)
508                 else
509                         AC_MSG_RESULT([ * found Linux 2.0.x ]) 
510                 fi
511         fi
512
513         dnl ----- Linux/alpha specific -----
514         if test x"$this_cpu" = "xalpha"; then 
515                 AC_MSG_RESULT([enabling gcc memcpy bug workaround])
516                 AC_DEFINE(HAVE_GCC_MEMCPY_BUG)
517         fi
518         need_dash_r=no
519 fi
520
521 dnl ----- Mac OSX specific -----
522 if test x"$this_os" = "xmacosx"; then 
523         AC_MSG_RESULT([ * Mac OSX specific configuration])
524         AC_DEFINE(BSD4_4)
525         AC_DEFINE(HAVE_BROKEN_CPP)
526         AC_DEFINE(HAVE_2ARG_DBTOB)
527         dnl AC_DEFINE(NO_DLFCN_H)
528         AC_DEFINE(MACOSX_SERVER)
529 fi
530
531 dnl ----- NetBSD specific -----
532 if test x"$this_os" = "xnetbsd"; then 
533         AC_MSG_RESULT([ * NetBSD specific configuration])
534         AC_DEFINE(BSD4_4)
535         AC_DEFINE(DLSYM_PREPEND_UNDERSCORE)
536         CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
537         need_dash_r=yes 
538
539         dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
540         AC_DEFINE(UAM_DHX, 1)
541         AC_DEFINE(NO_CRYPT_H, 1)
542 fi
543
544 dnl ----- OpenBSD specific -----
545 if test x"$this_os" = "xopenbsd"; then 
546         AC_MSG_RESULT([ * OpenBSD specific configuration])
547         AC_DEFINE(BSD4_4)
548         AC_DEFINE(DLSYM_PREPEND_UNDERSCORE)
549
550         dnl ----- OpenBSD does not have crypt.h, uses unistd.h -----
551         AC_DEFINE(UAM_DHX, 1)
552         AC_DEFINE(NO_CRYPT_H, 1)
553 fi
554
555 dnl ----- Solaris specific -----
556 if test x"$this_os" = "xsolaris"; then 
557         AC_MSG_RESULT([ * Solaris specific configuration])
558         AC_DEFINE(__svr4__)
559         AC_DEFINE(_ISOC9X_SOURCE)
560         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
561         AC_DEFINE(SOLARIS)
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)
573         AC_DEFINE(HAVE_64BIT_LONGS)
574         dnl AC_DEFINE(USE_MOUNT_H)
575         AC_DEFINE(USE_OLD_RQUOTA)
576         dnl AC_DEFINE(USE_UFS_QUOTA_H)
577         AC_DEFINE(TRU64)
578         AC_CHECK_LIB(security,set_auth_parameters)
579         CFLAGS="-I\$(top_srcdir)/sys/tru64 $CFLAGS"
580         need_dash_r=no
581         sysv_style=tru64
582 fi
583
584 dnl -- look for openssl
585 AC_PATH_SSL
586
587 dnl --------------------- check for building PGP UAM module
588
589 AC_ARG_ENABLE(pgp-uam,
590         [  --enable-pgp-uam        enable build of PGP UAM module],
591         if test "$enableval" = "yes"; then 
592                 if test "$compile_ssl" = "yes"; then 
593                         AC_DEFINE(UAM_PGP, 1)
594                         compile_pgp=yes
595                         AC_MSG_RESULT([enabling build with PGP UAM module])
596                 fi
597         fi
598 )
599
600 dnl --------------------- check for building Kerberos v4 UAM module
601
602 AC_ARG_ENABLE(krb4-uam,
603         [  --enable-krb4-uam       enable build of Kerberos v4 UAM module],
604         if test "$enableval" = "yes"; then
605                 AC_DEFINE(UAM_KRB4, 1)
606                 compile_kerberos=yes
607                 AC_MSG_RESULT([enabling build with Kerberos v4 UAM module])
608         fi
609 )
610 dnl --------------------- overwrite the config files . . . or not.
611
612 AC_MSG_CHECKING([whether configuration files should be overwritten])
613 AC_ARG_ENABLE(overwrite,
614         [  --enable-overwrite      overwrite configuration files during installation],
615         [OVERWRITE_CONFIG="${enable_overwrite}"],
616         [OVERWRITE_CONFIG="no"]
617 )
618 AC_MSG_RESULT([$OVERWRITE_CONFIG])
619
620 dnl --------------------- last minute substitutions
621
622 AC_SUBST(LIBS)
623 AC_SUBST(AFPD_LIBS)
624 AC_SUBST(PAPD_LIBS)
625 AC_SUBST(CFLAGS)
626 AC_SUBST(PKGCONFDIR)
627 AC_SUBST(OVERWRITE_CONFIG)
628
629 AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
630 AM_CONDITIONAL(COMPILE_TIMELORD, test x$compile_timelord = xyes)
631 AM_CONDITIONAL(USE_DHX, test x$compile_ssl = xyes)
632 AM_CONDITIONAL(USE_KERBEROS, test x$compile_kerberos = xyes)
633 AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
634 AM_CONDITIONAL(USE_PAM, test x$compile_pam = xyes)
635 AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
636 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
637 AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
638 AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
639 AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
640 AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
641 AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
642
643 dnl --------------------- generate files
644
645 AC_OUTPUT([Makefile
646         bin/Makefile
647         bin/adv1tov2/Makefile
648         bin/aecho/Makefile
649         bin/afile/Makefile
650         bin/afppasswd/Makefile
651         bin/cnid/Makefile
652         bin/getzones/Makefile
653         bin/megatron/Makefile
654         bin/nbp/Makefile
655         bin/pap/Makefile
656         bin/psorder/Makefile
657         config/Makefile
658         contrib/Makefile
659         contrib/macusers/Makefile
660         contrib/nu/Makefile
661         contrib/printing/Makefile
662         contrib/shell_utils/Makefile
663         contrib/timelord/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         include/Makefile
679         include/atalk/Makefile
680         libatalk/Makefile
681         libatalk/adouble/Makefile
682         libatalk/asp/Makefile
683         libatalk/atp/Makefile
684         libatalk/cnid/Makefile
685         libatalk/compat/Makefile
686         libatalk/dsi/Makefile
687         libatalk/nbp/Makefile
688         libatalk/netddp/Makefile
689         libatalk/util/Makefile
690         macros/Makefile
691         man/Makefile
692         man/man1/Makefile
693         man/man3/Makefile
694         man/man4/Makefile
695         man/man5/Makefile
696         man/man8/Makefile
697         sys/Makefile
698         sys/generic/Makefile
699         sys/generic/sys/Makefile
700         sys/netatalk/Makefile
701         sys/netbsd/Makefile
702         sys/netbsd/netatalk/Makefile
703         sys/solaris/Makefile
704         sys/sunos/Makefile
705         sys/ultrix/Makefile
706         ],
707         [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
708 )
709