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