]> arthur.barton.de Git - netatalk.git/blob - configure.in
removed the configure-time option for specifying CAPDIR. This is now
[netatalk.git] / configure.in
1 dnl $Id: configure.in,v 1.77 2001-05-24 00:12:01 samnoble 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 AM_PROG_LIBTOOL
13
14 dnl Reset locations to proper places
15 AC_PREFIX_DEFAULT(/usr/local)
16
17 dnl Checks for programs.
18 AC_PROG_AWK
19 AC_PROG_CC
20 AC_PROG_INSTALL
21 AC_PROG_LN_S
22 AC_PROG_MAKE_SET
23 AC_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 -lcom_err:
40 AC_CHECK_LIB(com_err, main)
41 dnl Replace `main' with a function in -lcrypt:
42 AC_CHECK_LIB(crypt, main)
43 dnl Replace `main' with a function in -ld:
44 AC_CHECK_LIB(d, main)
45 dnl Replace `main' with a function in -ldb:
46 AC_CHECK_LIB(db, main)
47 dnl Replace `main' with a function in -ldl:
48 AC_CHECK_LIB(dl, main)
49 dnl Replace `main' with a function in -lkauth:
50 AC_CHECK_LIB(kauth, main)
51 dnl Replace `main' with a function in -lkrb:
52 AC_CHECK_LIB(krb, main)
53 dnl Replace `main' with a function in -llwp:
54 AC_CHECK_LIB(lwp, main)
55 dnl Replace `main' with a function in -ln:
56 AC_CHECK_LIB(n, main)
57 dnl Replace `main' with a function in -lnsl:
58 AC_CHECK_LIB(nsl, main)
59 dnl Replace `main' with a function in -lprot:
60 AC_CHECK_LIB(prot, main)
61 dnl Replace `main' with a function in -lresolv:
62 AC_CHECK_LIB(resolv, main)
63 dnl Replace `main' with a function in -lrpcsvc:
64 AC_CHECK_LIB(rpcsvc, main)
65 dnl Replace `main' with a function in -lrx:
66 AC_CHECK_LIB(rx, main)
67 dnl Replace `main' with a function in -lrxkad:
68 AC_CHECK_LIB(rxkad, main)
69 dnl Replace `main' with a function in -lsocket:
70 AC_CHECK_LIB(socket, main)
71 dnl Replace `main' with a function in -lsys:
72 AC_CHECK_LIB(sys, main)
73 dnl Replace `main' with a function in -lubik:
74 AC_CHECK_LIB(ubik, main)
75
76 #
77 # Check presence of some functions
78 #
79 # Check for XPG4 access() function
80 # Be sure to test before adding AFS libs in LIBS path as AFS lib
81 # has such a function that works only on AFS filesystems.
82 AC_CHECK_FUNCS(access)
83
84 dnl Checks for header files.
85 AC_HEADER_DIRENT
86 AC_HEADER_STDC
87 AC_HEADER_SYS_WAIT
88 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/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)
89 AC_CHECK_HEADER(sys/cdefs.h,,
90         AC_MSG_RESULT([enabling generic cdefs.h from tree])
91         CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
92 )
93
94 # Allow user to specify flags
95 AC_ARG_WITH(cflags,
96         [  --with-cflags           specify additional flags to pass to compiler],
97         [
98                 if test "x$withval" != "xno" ; then
99                         CFLAGS="$CFLAGS $withval"
100                 fi
101         ]       
102 )
103 AC_ARG_WITH(libs,
104         [  --with-libs             specify additional libraries to link with],
105         [
106                 if test "x$withval" != "xno" ; then
107                         LIBS="$LIBS $withval"
108                 fi
109         ]
110 )
111
112 dnl Checks for typedefs, structures, and compiler characteristics.
113 AC_C_CONST
114 AC_TYPE_UID_T
115 AC_C_INLINE
116 AC_TYPE_MODE_T
117 AC_TYPE_OFF_T
118 AC_TYPE_PID_T
119 AC_TYPE_SIZE_T
120 AC_STRUCT_ST_RDEV
121 AC_HEADER_TIME
122 AC_STRUCT_TM
123
124 dnl Checks for library functions.
125 AC_TYPE_GETGROUPS
126 AC_PROG_GCC_TRADITIONAL
127 AC_FUNC_MEMCMP
128 AC_HEADER_MAJOR
129 AC_FUNC_MMAP
130 AC_TYPE_SIGNAL
131 AC_FUNC_UTIME_NULL
132 AC_FUNC_WAIT3
133 AC_CHECK_FUNCS(getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strstr strtoul setpgrp)
134 AC_FUNC_SETPGRP
135
136 dnl --------------------------------------------------------------------------
137 dnl specific configuration comes in here:
138 dnl --------------------------------------------------------------------------
139
140 AC_DEFINE(ADMIN_GRP, 1)
141
142 AC_ARG_WITH(admin-group,
143         [  --disable-admin-group  disable admin group],
144         if test "$enableval" = "no"; then
145                 AC_DEFINE(ADMIN_GRP, 0)
146                 AC_MSG_RESULT([disabling administrative group support])
147         fi
148  )
149
150 AC_ARG_ENABLE(afs,
151         [  --enable-afs           enable AFS support],
152         if test "$enableval" = "yes"; then
153                 AC_DEFINE(AFS, 1)
154                 AC_MSG_RESULT([enabling AFS support])
155         fi
156 )
157
158 AC_ARG_WITH(config-dir,
159         [  --with-config-dir=path  path to config files [default=$ac_default_prefix/etc]],
160                 config_dir="$withval",
161                 config_dir="${prefix}/etc"
162 )
163
164 AC_ARG_WITH(cracklib,
165         [  --with-cracklib=dict    enable/set location of cracklib dictionary],
166         cracklib="$withval"
167         AC_CHECK_LIB(crack, main,
168                 AC_DEFINE(USE_CRACKLIB) 
169                 LIBS="$LIBS -lcrack"
170                 AC_MSG_RESULT([enabling cracklib support])
171                 if test "$cracklib" = "yes"; then
172                         cracklib="/usr/lib/cracklib_dict"
173                 fi
174                 AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
175                         [path to cracklib dictionary])
176                 AC_MSG_RESULT([setting cracklib dictionary to $cracklib]),
177                 AC_MSG_ERROR([cracklib not found!])
178         )
179 )
180
181 AC_ARG_ENABLE(ddp,
182         [  --disable-ddp           disable DDP],
183         if test "$enableval" = "no"; then 
184                 AC_DEFINE(NO_DDP, 1)
185                 AC_MSG_RESULT([disabling DDP])
186         fi
187 )
188
189 AC_ARG_ENABLE(debug,
190         [  --enable-debug          enable debug code],
191         if test "$enableval" != "no"; then
192                 if test "$enableval" = "yes"; then
193                         AC_DEFINE(DEBUG, 1)
194                 else
195                         AC_DEFINE_UNQUOTED(DEBUG, $enableval)
196                 fi 
197                 AC_MSG_RESULT([enabling debugging code])
198         else
199                 AC_DEFINE(DEBUG, 0)
200         fi
201 )
202
203
204 dnl ----------- A NOTE ABOUT DROPKLUDGE
205 dnl The trouble with this fix is that if you know what the file is called, it
206 dnl can be read from the Unix side.  That's okay for most academic institutions
207 dnl since the students don't have telnet access to the Mac servers.  There is
208 dnl currently no one working on further development/fixes of DROPKLUDGE.
209 dnl -----------
210
211 AC_ARG_ENABLE(dropkludge,
212         [  --enable-dropkludge     enable the experimental dropbox fix (INSECURE!) ],
213         if test "$enableval" = "yes"; then 
214                 AC_DEFINE(DROPKLUDGE, 1)
215                 AC_MSG_RESULT([enabling experimental dropbox support])
216         fi
217 )
218
219 AC_ARG_ENABLE(force-uidgid,
220         [  --enable-force-uidgid   allow forcing of uid/gid per volume (BROKEN) ],
221         if test "$enableval" = "yes"; then 
222                 AC_DEFINE(FORCE_UIDGID, 1)
223                 AC_MSG_RESULT([enabling forcing of uid/gid per volume])
224         fi
225 )
226
227 AC_ARG_ENABLE(lastdid,
228         [  --enable-lastdid        enable build without DID dev/inode mapping kludge],
229         if test "$enableval" = "yes"; then 
230                 AC_DEFINE(USE_LASTDID, 1)
231                 AC_MSG_RESULT([enabling build without DID dev/inode mapping kludge])
232         fi
233 )
234
235 msg_dir=""
236 AC_ARG_WITH(message-dir,
237         [  --with-msg-dir=path     path to message files [default=$ac_default_prefix/etc/msg]],
238                 msg_dir="$withval"
239                 if test x"$msg_dir" = "x"; then
240                         msg_dir="${prefix}/etc/msg"
241                 fi
242                 AC_DEFINE_UNQUOTED(SERVERTEXT, "$msg_dir",
243                         [path to message dir [default=$ac_default_prefix/etc/msg]])
244                 SERVERTEXT="$msg_dir"
245                 AC_SUBST(SERVERTEXT)
246 )
247
248 AC_CHECK_LIB(pam, pam_start,
249         AC_DEFINE(USE_PAM, 1)
250         LIBS="$LIBS -lpam"
251         compile_pam=yes
252 )
253 AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
254
255 AC_ARG_WITH(pam,
256         [  --with-pam              enable password authentication modules support],
257         if test "x$compile_pam" = "xyes"; then
258                 use_pam_so=yes
259                 AC_MSG_RESULT([enabling pam modules support])
260         else
261                 AC_MSG_RESULT([pam libraries not found. Disabling pam modules support])
262         fi
263 )
264
265 shadowpw=no
266 AC_ARG_WITH(shadow,
267         [  --with-shadow           enable shadow password support],
268         AC_MSG_RESULT([enabling shadow password support])
269         AC_DEFINE(SHADOWPW)
270         shadowpw=yes
271 )
272
273 AC_ARG_ENABLE(shell-check,
274         [  --disable-shell-check   disable checking for a valid shell],
275         if test "$enableval" = "no"; then 
276                 AC_DEFINE(DISABLE_SHELLCHECK, 1)
277                 AC_MSG_RESULT([disabling valid shell check])
278         fi
279 )
280
281 AC_ARG_WITH(flock-locks,
282         [  --with-flock-locks      enable flock locks support],
283         AC_MSG_RESULT([enabling flock locks])
284         AC_DEFINE(USE_FLOCK_LOCKS)
285 )
286
287 AC_ARG_WITH(tcp-wrappers,
288         [  --with-tcp-wrappers     enable TCP wrappers support],
289         AC_CHECK_LIB(wrap, tcpd_warn,
290                 AC_DEFINE(TCPWRAP)
291                 AFPD_LIBS="$AFPD_LIBS -lwrap"
292                 AC_MSG_RESULT([enabling TCP wrappers support])
293         )
294 )
295
296 AC_ARG_ENABLE(redhat,
297         [  --enable-redhat         use redhat-style sysv configuration ],
298         if test "$enableval" = "yes"; then
299                 sysv_style=redhat
300         fi
301         AC_MSG_RESULT([enabling redhat-style sysv support])
302 )
303
304 AC_ARG_ENABLE(suse,
305         [  --enable-suse           use suse-style sysv configuration ],
306         if test "$enableval" = "yes"; then
307                 sysv_style=suse
308         fi
309         AC_MSG_RESULT([enabling suse-style sysv support])
310 )
311
312 AC_ARG_ENABLE(cobalt,
313         [  --enable-cobalt         use cobalt-style sysv configuration ],
314         if test "$enableval" = "yes"; then
315                 sysv_style=cobalt
316         fi
317         AC_MSG_RESULT([enabling cobalt-style sysv support])
318 )
319
320 dnl ----- timelord compilation (disabled by default)
321 compile_timelord=no
322 AC_ARG_ENABLE(timelord,
323         [  --enable-timelord       enable compilation of timelord server],
324         if test "$enableval" = "yes"; then
325                 compile_timelord=yes
326         fi
327         AC_MSG_RESULT([enabling timelord compilation])
328 )
329
330 AC_ARG_WITH(uams-path,
331         [  --with-uams-path=path   path to UAMs [default=$ac_default_prefix/etc/uams]],
332         uams_path="$withval",
333         uams_path="${config_dir}/uams"
334 )
335
336 dnl --------------------------------------------------------------------------
337 dnl FHS stuff has to be done last because it overrides other defaults
338 dnl --------------------------------------------------------------------------
339
340 AC_ARG_ENABLE(fhs,
341         [  --enable-fhs            use Filesystem Hierarchy Standard (FHS) compatibility],
342         if test "$enableval" = "yes"; then
343                 uams_path="/usr/lib/netatalk"
344                 config_dir="/etc/netatalk"
345                 use_pam_so=yes
346                 dnl FIXME: NEED TO HAVE --mandir=/usr/share/man AT SOME POINT...
347                 AC_DEFINE(FHS_COMPATIBILITY)
348         fi
349         AC_MSG_RESULT([enabling Filesystem Hierarchy Standard (FHS) compatibility])
350 )
351
352 dnl --------------------------------------------------------------------------
353 dnl post-FHS substitutions, etc
354 dnl --------------------------------------------------------------------------
355
356 dnl ***** CONFIG_DIR
357 AC_DEFINE_UNQUOTED(CONFIG_DIR, "${config_dir}",
358         [path to config dir [default=$ac_default_prefix/etc]])
359 CONFIG_DIR="${config_dir}"
360 AC_SUBST(CONFIG_DIR)
361 AC_MSG_RESULT([setting configuration files location to $CONFIG_DIR])
362
363 ***** UAMS_PATH
364 AC_DEFINE_UNQUOTED(UAMS_PATH, "${uams_path}",
365         [path to UAMs [default=$ac_default_prefix/etc/uams]])
366 UAMS_PATH="${uams_path}"
367 AC_SUBST(UAMS_PATH)
368
369 dnl --------------------------------------------------------------------------
370 dnl drop in includes for top level directory structures here...
371 dnl --------------------------------------------------------------------------
372 LDFLAGS="$LDFLAGS -L\$(top_srcdir)/libatalk/"
373 CFLAGS="$CFLAGS -I\$(top_srcdir)/include -I\$(top_srcdir)/sys"
374
375 dnl --------------------------------------------------------------------------
376 dnl specific configuration comes in here:
377 dnl --------------------------------------------------------------------------
378
379 dnl ac_cv_target_os is now host_os, ac_cv_target_cpu is now host_cpu
380
381 dnl --------------------- determine operating system from "target"
382 case "$host_os" in
383         *freebsd*)                      this_os=freebsd ;;
384         *linux*)                        this_os=linux ;;
385         *osx*)                          this_os=macosx ;;
386         *netbsd*)                       this_os=netbsd ;;
387         *openbsd*)                      this_os=openbsd ;;
388         *osf*)                          this_os=tru64 ;;
389         *solaris*)                      this_os=solaris ;;
390 esac
391
392 case "$host_cpu" in
393         i386|i486|i586|i686|k7)         this_cpu=x86 ;;
394         alpha)                                          this_cpu=alpha ;;
395         mips)                                           this_cpu=mips ;;
396         powerpc|ppc)                            this_cpu=ppc ;;
397 esac
398
399 dnl --------------------- operating system specific flags (port from sys/*)
400
401 dnl ----- FreeBSD specific -----
402 if test x"$this_os" = "xfreebsd"; then 
403         AC_MSG_RESULT([ * FreeBSD specific configuration])
404         AC_DEFINE(BSD4_4)
405         AC_DEFINE(SENDFILE_FLAVOR_BSD)
406
407         dnl ----- Set -shared flag
408         LDSHAREDFLAGS="-shared"
409 fi
410
411 dnl ----- Linux specific -----
412 if test x"$this_os" = "xlinux"; then 
413         AC_MSG_RESULT([ * Linux specific configuration])
414
415         dnl ----- Set -shared flag
416         LDSHAREDFLAGS="-shared"
417
418         dnl ----- check if we need the quotactl wrapper
419         AC_CHECK_HEADER(sys/quota.h,,
420                 AC_MSG_RESULT([enabling quotactl wrapper])
421                 AC_DEFINE(NEED_QUOTACTL_WRAPPER)
422         )
423
424         dnl ----- as far as I can tell, dbtob always does the wrong thing
425         dnl ----- on every single version of linux I've ever played with.
426         dnl ----- see etc/afpd/quota.c
427         AC_DEFINE(HAVE_BROKEN_DBTOB)
428
429         dnl --- added by Yoshinobu Ishizaki (2001.03.13) ---
430         dnl ----- check if version is newer than 2.2.x
431         changequote(<<,>>)
432         majorvers="`uname -r | sed 's/\([0-9]\)..*/\1/'`"
433         minorvers="`uname -r | sed 's/[0-9]\.\([0-9]\)\..*/\1/'`"
434         if [ $majorvers -ge 2 ]; then
435                 if [ $minorvers -ge 2 ]; then
436                         changequote([,])
437                         AC_MSG_RESULT([ * found Linux 2.2.x or higher])
438                         AC_DEFINE(SENDFILE_FLAVOR_LINUX)
439                 else
440                         AC_MSG_RESULT([ * found Linux 2.0.x ]) 
441                 fi
442         fi
443
444         dnl ----- Linux/alpha specific -----
445         if test x"$this_cpu" = "xalpha"; then 
446                 AC_MSG_RESULT([enabling gcc memcpy bug workaround])
447                 AC_DEFINE(HAVE_GCC_MEMCPY_BUG)
448         fi
449         need_dash_r=no
450 fi
451
452 dnl ----- Mac OSX specific -----
453 if test x"$this_os" = "xmacosx"; then 
454         AC_MSG_RESULT([ * Mac OSX specific configuration])
455         AC_DEFINE(BSD4_4)
456         AC_DEFINE(HAVE_BROKEN_CPP)
457         AC_DEFINE(HAVE_2ARG_DBTOB)
458         AC_DEFINE(NO_DLFCN_H)
459         AC_DEFINE(MACOSX_SERVER)
460
461         dnl ----- Set -shared flag
462         LDSHAREDFLAGS="-shared"
463 fi
464
465 dnl ----- NetBSD specific -----
466 if test x"$this_os" = "xnetbsd"; then 
467         AC_MSG_RESULT([ * NetBSD specific configuration])
468         AC_DEFINE(BSD4_4)
469         AC_DEFINE(DLSYM_PREPEND_UNDERSCORE)
470         CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
471         need_dash_r=yes 
472
473         dnl ----- Set -shared flag
474         LDSHAREDFLAGS="-shared"
475
476         dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
477         AC_DEFINE(UAM_DHX, 1)
478         AC_DEFINE(UAM_RNDNUM, 1)
479         compile_dhx=yes
480         compile_ssl=yes
481         AC_DEFINE(NO_CRYPT_H, 1)
482 fi
483
484 dnl ----- OpenBSD specific -----
485 if test x"$this_os" = "xopenbsd"; then 
486         AC_MSG_RESULT([ * OpenBSD specific configuration])
487         AC_DEFINE(BSD4_4)
488         AC_DEFINE(DLSYM_PREPEND_UNDERSCORE)
489
490         dnl ----- Set -shared flag
491         LDSHAREDFLAGS="-Bforcearchive -shared"
492
493         dnl ----- OpenBSD does not have crypt.h, uses unistd.h -----
494         AC_DEFINE(UAM_DHX, 1)
495         AC_DEFINE(UAM_RNDNUM, 1)
496         compile_dhx=yes
497         compile_ssl=yes
498         AC_DEFINE(NO_CRYPT_H, 1)
499 fi
500
501 dnl ----- Solaris specific -----
502 if test x"$this_os" = "xsolaris"; then 
503         AC_MSG_RESULT([ * Solaris specific configuration])
504         AC_DEFINE(__svr4__)
505         AC_DEFINE(_ISOC9X_SOURCE)
506         AC_DEFINE(NO_STRUCT_TM_GMTOFF)
507         AC_DEFINE(SOLARIS)
508         CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
509         need_dash_r=yes
510
511         dnl ----- Set -shared flag
512         LDSHAREDFLAGS="-G"
513
514         AC_MSG_RESULT([enabling Solaris kernel module build])
515         solaris_module=yes
516 fi
517
518 dnl ----- Tru64 specific -----
519 if test x"$this_os" = "xtru64"; then 
520         AC_MSG_RESULT([ * Tru64 specific configuration])
521         AC_DEFINE(NO_DDP)
522         AC_DEFINE(HAVE_64BIT_LONGS)
523         dnl AC_DEFINE(USE_MOUNT_H)
524         AC_DEFINE(USE_OLD_RQUOTA)
525         dnl AC_DEFINE(USE_UFS_QUOTA_H)
526         AC_DEFINE(TRU64)
527         AC_CHECK_LIB(security,set_auth_parameters)
528         CFLAGS="-I\$(top_srcdir)/sys/tru64 $CFLAGS"
529         LDSHAREDFLAGS="-shared -expect_unresolved \*"
530         need_dash_r=no
531         sysv_style=tru64
532
533         dnl ----- Set -shared flag
534         LDSHAREDFLAGS="-shared"
535 fi
536
537 dnl -- look for openssl  
538 AC_ARG_WITH(ssl-dir,
539         [  --with-ssl-dir=PATH     specify path to openssl installation (must contain
540                           lib and include dirs) ],
541         [
542                 if test "x$withval" != "xno"; then
543                         tryssldir=$withval
544                 fi
545         ]
546 )
547
548 for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl/ /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl /usr/local/ssl ; do
549         if test -f "$ssldir/include/openssl/cast.h" ; then
550                 LDFLAGS="$LDFLAGS -L$ssldir/lib -L$ssldir"
551                 CFLAGS="$CFLAGS -I$ssldir/include -I$ssldir/include/openssl"
552                 if test "$need_dash_r" = "yes"; then
553                         LIBS="$LIBS -R$ssldir/lib -R$ssldir"
554                 fi
555
556                 dnl Check for the crypto library:
557                 AC_CHECK_LIB(crypto, main)
558                 dnl LIBS="$LIBS -lcrypto"
559                 dnl Check for "DES" library (for SSLeay, not openssl):
560                 AC_CHECK_LIB(des, main)
561
562                 AC_DEFINE(OPENSSL_DHX,  1)
563                 AC_DEFINE(UAM_DHX,      1)
564                 AC_DEFINE(UAM_RNDNUM,   1)
565                 compile_dhx=yes
566                 compile_ssl=yes
567                 AC_MSG_RESULT([Found ssl and enabling RANDNUM and DHX support "$ssldir"])
568                 break
569         fi
570 done
571
572 dnl --------------------- check for building PGP UAM module
573
574 AC_ARG_ENABLE(pgp-uam,
575         [  --enable-pgp-uam        enable build of PGP UAM module],
576         if test "$enableval" = "yes"; then 
577                 if test "$compile_ssl" = "yes"; then 
578                         AC_DEFINE(UAM_PGP, 1)
579                         compile_pgp=yes
580                         AC_MSG_RESULT([enabling build with PGP UAM module])
581                 fi
582         fi
583 )
584
585 dnl --------------------- last minute substitutions
586
587 AC_SUBST(LIBS)
588 AC_SUBST(AFPD_LIBS)
589 AC_SUBST(PAPD_LIBS)
590
591 AC_SUBST(CFLAGS)
592 AC_SUBST(LDSHAREDFLAGS)
593
594 AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
595 AM_CONDITIONAL(COMPILE_TIMELORD, test x$compile_timelord = xyes)
596 AM_CONDITIONAL(USE_DHX, test x$compile_dhx = xyes)
597 AM_CONDITIONAL(USE_KERBEROS, test x$compile_kerberos = xyes)
598 AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
599 AM_CONDITIONAL(USE_PAM, test x$compile_pam = xyes)
600 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
601 AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
602 AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
603 AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
604 AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
605 AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
606
607 dnl --------------------- generate files
608
609 AC_OUTPUT([Makefile
610         bin/Makefile
611         bin/adv1tov2/Makefile
612         bin/aecho/Makefile
613         bin/afile/Makefile
614         bin/afppasswd/Makefile
615         bin/getzones/Makefile
616         bin/megatron/Makefile
617         bin/nbp/Makefile
618         bin/pap/Makefile
619         bin/psorder/Makefile
620         config/Makefile
621         contrib/Makefile
622         contrib/macusers/Makefile
623         contrib/nu/Makefile
624         contrib/printing/Makefile
625         contrib/shell_utils/Makefile
626         contrib/timelord/Makefile
627         distrib/Makefile
628         distrib/config/Makefile
629         distrib/config/netatalk-config
630         distrib/initscripts/Makefile
631         distrib/m4/Makefile
632         doc/Makefile
633         etc/Makefile
634         etc/afpd/Makefile
635         etc/afpd/nls/Makefile
636         etc/atalkd/Makefile
637         etc/uams/Makefile
638         etc/uams/uams_krb4/Makefile
639         etc/papd/Makefile
640         etc/psf/Makefile
641         include/Makefile
642         include/atalk/Makefile
643         libatalk/Makefile
644         libatalk/adouble/Makefile
645         libatalk/asp/Makefile
646         libatalk/atp/Makefile
647         libatalk/compat/Makefile
648         libatalk/dsi/Makefile
649         libatalk/nbp/Makefile
650         libatalk/netddp/Makefile
651         libatalk/util/Makefile
652         man/Makefile
653         man/man1/Makefile
654         man/man3/Makefile
655         man/man4/Makefile
656         man/man5/Makefile
657         man/man8/Makefile
658         sys/Makefile
659         sys/netatalk/Makefile
660         ],
661         [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
662 )
663