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