]> arthur.barton.de Git - netatalk.git/blob - configure.in
Add dbd manpage
[netatalk.git] / configure.in
1 dnl $Id: configure.in,v 1.217 2009-04-28 13:01:24 franklahm 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 Checks for programs.
14 AC_PROG_AWK
15 AC_PROG_CC
16 AC_PROG_INSTALL
17 AC_PROG_LN_S
18 AC_PROG_MAKE_SET
19 AC_LIBTOOL_DLOPEN
20 AC_PROG_LIBTOOL
21 AC_PROG_PERL
22 AC_PROG_GREP
23 AC_PROG_PS
24
25 AM_PROG_CC_C_O
26
27 dnl *********************************************************************
28 dnl FIXME! FIXME! These should be selectable properly, and should produce
29 dnl the proper flags and defines...
30 dnl *********************************************************************
31
32 ############################################
33 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the plugin loading code
34 #AC_SEARCH_LIBS(dlopen, [dl])
35 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
36
37 dnl Checks for libraries.
38 dnl Replace `main' with a function in -labs:
39 dnl AC_CHECK_LIB(abs, main)
40 dnl Replace `main' with a function in -laudit:
41 dnl AC_CHECK_LIB(audit, main)
42 dnl Replace `main' with a function in -lauth:
43 dnl AC_CHECK_LIB(auth, main)
44 dnl Replace `main' with a function in -lcmd:
45 dnl AC_CHECK_LIB(cmd, main)
46 dnl Replace `main' with a function in -lcrypt:
47 dnl AC_CHECK_LIB(crypt, main)
48 dnl Replace `main' with a function in -ld:
49 dnl AC_CHECK_LIB(d, main)
50 dnl Replace `main' with a function in -ldl:
51 dnl AC_CHECK_LIB(dl, dlopen)
52 dnl Replace `main' with a function in -lkauth:
53 dnl AC_CHECK_LIB(kauth, main)
54 dnl Replace `main' with a function in -lkrb:
55 dnl AC_CHECK_LIB(krb, main)
56 dnl Replace `main' with a function in -llwp:
57 dnl AC_CHECK_LIB(lwp, main)
58 dnl Replace `main' with a function in -ln:
59 dnl AC_CHECK_LIB(n, main)
60
61 dnl not the right stuff but should be enough for now
62 AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
63 AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])
64
65 dnl Replace `main' with a function in -lprot:
66 dnl AC_CHECK_LIB(prot, main)
67 dnl Replace `main' with a function in -lrx:
68 dnl AC_CHECK_LIB(rx, main)
69 dnl Replace `main' with a function in -lrxkad:
70 dnl AC_CHECK_LIB(rxkad, main)
71 dnl Replace `main' with a function in -lsys:
72 dnl AC_CHECK_LIB(sys, main)
73 dnl Replace `main' with a function in -lubik:
74 dnl AC_CHECK_LIB(ubik, main)
75
76
77 #
78 # Check presence of some functions
79 #
80 # Check for XPG4 access() function
81 # Be sure to test before adding AFS libs in LIBS path as AFS lib
82 # has such a function that works only on AFS filesystems.
83 AC_CHECK_FUNCS(access)
84
85 AC_CHECK_FUNCS(pread pwrite)
86
87 dnl Checks for header files.
88 AC_HEADER_DIRENT
89 AC_HEADER_STDC
90 AC_HEADER_SYS_WAIT
91 AC_CHECK_HEADERS(fcntl.h limits.h stdint.h strings.h time.h sys/param.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 statfs.h sys/types.h dlfcn.h errno.h sys/errno.h sys/uio.h)
92 AC_CHECK_HEADER(sys/cdefs.h,,
93         AC_MSG_RESULT([enabling generic cdefs.h from tree])
94         CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
95 )
96 AC_CHECK_HEADERS([sys/mount.h], , , 
97 [#ifdef HAVE_SYS_PARAM_H
98 #include <sys/param.h>
99 #endif
100 ])
101
102 AC_CHECK_HEADERS(langinfo.h locale.h sys/filio.h)
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 --------------------------------------------------------------------------
117 dnl check if dlsym needs to add an underscore, uses libtool macros 
118 dnl --------------------------------------------------------------------------
119 AC_LTDL_DLLIB
120 AC_CHECK_FUNCS(dlopen dlsym dlclose)
121 AC_LTDL_DLSYM_USCORE
122 if test x"$libltdl_cv_need_uscore" = xyes; then
123     AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
124 fi
125
126
127 dnl Checks for library functions.
128 AC_TYPE_GETGROUPS
129 AC_PROG_GCC_TRADITIONAL
130 AC_FUNC_MEMCMP
131 AC_HEADER_MAJOR
132 AC_FUNC_MMAP
133 AC_TYPE_SIGNAL
134 AC_FUNC_UTIME_NULL
135 AC_FUNC_WAIT3
136 AC_CHECK_FUNCS(getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strcasestr strstr strtoul strchr memcpy)
137 AC_CHECK_FUNCS(backtrace_symbols setlocale nl_langinfo)
138 AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
139 AC_CHECK_FUNCS(strlcpy strlcat setlinebuf gethostid dirfd)
140 AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
141 AC_CACHE_SAVE
142
143 dnl Checks for (v)snprintf
144 NETATALK_SNPRINTF_CHECK
145
146 dnl --------------------------------------------------------------------------
147 dnl 64bit platform check
148 dnl --------------------------------------------------------------------------
149
150 AC_MSG_CHECKING([whether to check for 64bit libraries])
151 dnl Determine libdir name
152 case $host in
153 *-*-linux*)
154   # Test if the compiler is 64bit
155   echo 'int i;' > conftest.$ac_ext
156   atalk_cv_cc_64bit_output=no
157   if AC_TRY_EVAL(ac_compile); then
158     case `/usr/bin/file conftest.$ac_objext` in
159     *"ELF 64"*)
160       atalk_cv_cc_64bit_output=yes
161       ;;
162     esac
163   fi
164   rm -rf conftest*
165   ;;
166 esac
167
168 dnl
169 dnl FIXME: Do we need something like this for Solaris 64bit?
170 dnl
171
172 case $host_cpu:$atalk_cv_cc_64bit_output in
173 powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
174   atalk_libname="lib64"
175   AC_MSG_RESULT([yes])
176   ;;
177 *:*)
178   atalk_libname="lib"
179   AC_MSG_RESULT([no])
180   ;;
181 esac
182
183 dnl --------------------------------------------------------------------------
184 dnl specific configuration comes in here:
185 dnl --------------------------------------------------------------------------
186
187
188 netatalk_cv_admin_group=yes
189 AC_MSG_CHECKING([for administrative group support])
190 AC_ARG_ENABLE(admin-group,
191         [  --disable-admin-group   disable admin group],[
192         if test x"$enableval" = x"no"; then
193                 AC_DEFINE(ADMIN_GRP, 0, [Define if the admin group should be enabled])
194                 netatalk_cv_admin_group=no
195                 AC_MSG_RESULT([no])
196         else
197                 AC_DEFINE(ADMIN_GRP, 1, [Define if the admin group should be enabled])
198                 AC_MSG_RESULT([yes])
199         fi],[
200                 AC_DEFINE(ADMIN_GRP, 1, [Define if the admin group should be enabled])
201                 AC_MSG_RESULT([yes])
202         ]
203 )
204
205 NETATALK_AFS_CHECK
206
207 NETATALK_CONFIG_DIRS
208
209 AC_MSG_CHECKING([whether to force logfile])
210 AC_ARG_WITH(logfile,
211         [  --with-logfile=PATH     force logging to file PATH],[
212         if test x"$withval" = x"no"; then
213                 AC_MSG_RESULT([no, syslog])
214         elif test "$withval" != "yes"; then
215                 AC_DEFINE_UNQUOTED(LOGFILEPATH, "$withval", [Path to the log file])
216                 AC_MSG_RESULT([$withval])
217         else
218                 AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log", [Path to the log file])
219                 AC_MSG_RESULT([/var/log/netatalk.log]) 
220         fi],[
221         AC_MSG_RESULT([no, syslog])
222         ]
223 )
224
225 netatalk_cv_with_cracklib=no
226 AC_ARG_WITH(cracklib,
227         [  --with-cracklib=DICT    enable/set location of cracklib dictionary],[
228         if test "x$withval" != "xno" ; then
229                 cracklib="$withval"
230                 AC_CHECK_LIB(crack, main, [
231                         AC_DEFINE(USE_CRACKLIB, 1, [Define if cracklib should be used])
232                         LIBS="$LIBS -lcrack"
233                         if test "$cracklib" = "yes"; then
234                                 cracklib="/usr/$atalk_libname/cracklib_dict"
235                         fi
236                         AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
237                                 [path to cracklib dictionary])
238                         AC_MSG_RESULT([setting cracklib dictionary to $cracklib])
239                         netatalk_cv_with_cracklib=yes
240                         ],[
241                         AC_MSG_ERROR([cracklib not found!])
242                         ]
243                 )
244         fi
245         ]
246 )
247 AC_MSG_CHECKING([for cracklib support])
248 AC_MSG_RESULT([$netatalk_cv_with_cracklib])
249
250 netatalk_cv_ddp_enabled=yes
251 AC_MSG_CHECKING([whether to enable DDP])
252 AC_ARG_ENABLE(ddp,
253         [  --disable-ddp           disable DDP],[
254         if test "$enableval" = "no"; then 
255                 AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
256                 AC_MSG_RESULT([no])
257                 netatalk_cv_ddp_enabled=no
258         else
259                 AC_MSG_RESULT([yes])
260         fi
261         ],[
262                 AC_MSG_RESULT([yes])
263         ]
264 )
265
266 AC_MSG_CHECKING([whether to enable debug code])
267 AC_ARG_ENABLE(debug1,
268         [  --enable-debug1         enable debug code],[
269         if test "$enableval" != "no"; then
270                 if test "$enableval" = "yes"; then
271                         AC_DEFINE(DEBUG1, 1, [Define if debugging information should be included])
272                 else
273                         AC_DEFINE_UNQUOTED(DEBUG1, $enableval, [Define if debugging information should be included])
274                 fi 
275                 AC_MSG_RESULT([yes])
276         else
277                 AC_MSG_RESULT([no])
278         fi
279         ],[
280                 AC_MSG_RESULT([no])
281         ]
282 )
283
284 AC_MSG_CHECKING([whether to enable verbose debug code])
285 AC_ARG_ENABLE(debug,
286         [  --enable-debug          enable verbose debug code],[
287         if test "$enableval" != "no"; then
288                 if test "$enableval" = "yes"; then
289                         AC_DEFINE(DEBUG, 1, [Define if verbose debugging information should be included])
290                 else
291                         AC_DEFINE_UNQUOTED(DEBUG, $enableval, [Define if verbose debugging information should be included])
292                 fi 
293                 AC_MSG_RESULT([yes])
294         else
295                 AC_MSG_RESULT([no])
296         fi
297         ],[
298                 AC_MSG_RESULT([no])
299         ]
300 )
301
302 AC_MSG_CHECKING([whether to enable debugging with debuggers])
303 AC_ARG_ENABLE(debugging,
304         [  --enable-debugging      disable SIGALRM timers and DSI tickles (eg for debugging with gdb/dbx/...)],[
305         if test "$enableval" != "no"; then
306                 if test "$enableval" = "yes"; then
307                         AC_DEFINE(DEBUGGING, 1, [Define if you want to disable SIGALRM timers and DSI tickles])
308                 else
309                         AC_DEFINE_UNQUOTED(DEBUGGING, $enableval, [Define if you want to disable SIGALRM timers and DSI tickles])
310                 fi 
311                 AC_MSG_RESULT([yes])
312         else
313                 AC_MSG_RESULT([no])
314         fi
315         ],[
316                 AC_MSG_RESULT([no])
317         ]
318 )
319
320
321 afp3=no
322 afp3set=no
323 AC_MSG_CHECKING([whether AFP 3.x calls should be enabled])
324 AC_ARG_ENABLE(afp3,
325         [  --disable-afp3          disable AFP 3.x calls],
326         [
327             if test x"$enableval" != x"no"; then
328                 afp3set=yes
329                 afp3=yes
330                 AC_MSG_RESULT([yes])
331             else
332                 AC_MSG_RESULT([no])
333             fi
334         ],[
335             AC_MSG_RESULT([yes])
336             afp3=yes
337         ]
338 )
339
340 if test x"$afp3" = x"yes"; then
341         AC_SYS_LARGEFILE([
342                 AC_DEFINE(AFP3x, 1, [Define to enable AFP 3.x support])
343         ],[
344                 if test x"$afp3set" = x"yes"; then
345                         AC_MSG_ERROR([AFP 3.x support requires Large File Support.])
346                 else
347                         AC_MSG_WARN([AFP 3.x support requires Large File Support. AFP3.x support disabled])
348                         afp3=no
349                 fi
350         ])
351 fi
352
353 AC_CHECK_ICONV
354
355 dnl ----------- A NOTE ABOUT DROPKLUDGE
356 dnl The trouble with this fix is that if you know what the file is called, it
357 dnl can be read from the Unix side.  That's okay for most academic institutions
358 dnl since the students don't have telnet access to the Mac servers.  There is
359 dnl currently no one working on further development/fixes of DROPKLUDGE.
360 dnl -----------
361
362 netatalk_cv_dropkludge=no
363 AC_MSG_CHECKING([whether to enable experimental dropbox support])
364 AC_ARG_ENABLE(dropkludge,
365         [  --enable-dropkludge     enable the experimental dropbox fix (INSECURE!) ],[
366         if test "$enableval" = "yes"; then 
367                 AC_DEFINE(DROPKLUDGE, 1, [Define if you want to use the experimental dropkludge support])
368                 AC_MSG_RESULT([yes])
369                 netatalk_cv_dropkludge=yes
370         else
371                 AC_MSG_RESULT([no])
372         fi
373         ],[
374                 AC_MSG_RESULT([no])
375         ]
376 )
377
378 netatalk_cv_force_uidgid=no
379 AC_MSG_CHECKING([whether to enable forcing of uid/gid per volume])
380 AC_ARG_ENABLE(force-uidgid,
381         [  --enable-force-uidgid   allow forcing of uid/gid per volume (BROKEN) ],[
382         if test "$enableval" = "yes"; then
383                 AC_DEFINE(FORCE_UIDGID, 1, [Define if you want forcing of uid/gid per volume])
384                 AC_MSG_RESULT([enabling forcing of uid/gid per volume])
385                 AC_MSG_RESULT([yes])
386                 netatalk_cv_force_uidgid=yes
387         else
388                 AC_MSG_RESULT([no])
389         fi
390         ],[
391                 AC_MSG_RESULT([no])
392         ]
393 )
394
395 dnl Check for CNID database backends
396 bdb_required=no
397 AC_NETATALK_CNID([bdb_required=yes],[bdb_required=no])
398
399 dnl Check for quota support
400 AC_CHECK_QUOTA
401
402 dnl Check for optional server location protocol support (used by MacOS X)
403 NETATALK_SRVLOC
404
405 dnl Check for PAM libs
406 netatalk_cv_use_pam=no
407 AC_PATH_PAM([
408         use_pam_so=yes
409         compile_pam=yes
410         netatalk_cv_use_pam=yes
411         AC_DEFINE(USE_PAM, 1, [Define to enable PAM support])
412 ])
413
414 netatalk_cv_use_shadowpw=no
415 AC_ARG_WITH(shadow,
416         [  --with-shadow           enable shadow password support [[auto]]],
417         [netatalk_cv_use_shadowpw="$withval"],
418         [netatalk_cv_use_shadowpw=auto]
419 )
420
421 if test "x$netatalk_cv_use_shadowpw" != "xno"; then
422     AC_CHECK_HEADER([shadow.h])
423     if test x"$ac_cv_header_shadow_h" = x"yes"; then
424         netatalk_cv_use_shadowpw=yes
425         AC_DEFINE(SHADOWPW, 1, [Define if shadow passwords should be used])
426     else 
427       if test "x$shadowpw" = "xyes"; then
428         AC_MSG_ERROR([shadow support not available])
429       else
430         netatalk_cv_use_shadowpw=no
431       fi
432     fi 
433 fi
434
435 AC_MSG_CHECKING([whether shadow support should be enabled])
436 if test "x$netatalk_cv_use_shadowpw" = "xyes"; then
437         AC_MSG_RESULT([yes])
438 else
439         AC_MSG_RESULT([no])
440 fi
441         
442         
443         
444 netatalk_cv_use_shellcheck=yes
445 AC_MSG_CHECKING([whether checking for a valid shell should be enabled])
446 AC_ARG_ENABLE(shell-check,
447         [  --disable-shell-check   disable checking for a valid shell],[
448         if test "$enableval" = "no"; then 
449                 AC_DEFINE(DISABLE_SHELLCHECK, 1, [Define if shell check should be disabled])
450                 AC_MSG_RESULT([no])
451                 netatalk_cv_use_shellcheck=no
452         else
453                 AC_MSG_RESULT([yes])
454         fi
455         ],[
456                 AC_MSG_RESULT([yes])
457         ]
458 )
459
460 NETATALK_TCP_WRAPPERS
461
462 AC_MSG_CHECKING([whether system (fcntl) locking should be disabled])
463 AC_ARG_ENABLE(locking,
464         [  --disable-locking       disable system locking],[
465                 if test "$enableval" = "no"; then
466                         AC_DEFINE(DISABLE_LOCKING, 1, [Define if system (fcntl) locking should be disabled])
467                         AC_MSG_RESULT([yes])
468                 else
469                         AC_MSG_RESULT([no])
470                 fi
471                 
472         ],[
473                 AC_MSG_RESULT([no])
474         ]
475
476 )
477
478
479 AC_ARG_ENABLE(redhat,
480         [  --enable-redhat         use redhat-style sysv configuration ],[
481         if test "$enableval" = "yes"; then
482                 sysv_style=redhat
483         fi
484         AC_MSG_RESULT([enabling redhat-style sysv support])
485         ]
486 )
487
488 AC_ARG_ENABLE(suse,
489         [  --enable-suse           use suse-style sysv configuration ],[
490         if test "$enableval" = "yes"; then
491                 sysv_style=suse
492         fi
493         AC_MSG_RESULT([enabling suse-style sysv support])
494         ]
495 )
496
497 AC_ARG_ENABLE(gentoo,
498         [  --enable-gentoo         use gentoo-style sysv configuration ],[
499         if test "$enableval" = "yes"; then
500                 sysv_style=gentoo
501         fi
502         AC_MSG_RESULT([enabling gentoo-style sysv support])
503         ]
504 )
505
506 AC_ARG_ENABLE(cobalt,
507         [  --enable-cobalt         use cobalt-style sysv configuration ],
508         if test "$enableval" = "yes"; then
509                 sysv_style=cobalt
510         fi
511         AC_MSG_RESULT([enabling cobalt-style sysv support])
512 )
513
514 AC_ARG_ENABLE(netbsd,
515         [  --enable-netbsd         use NetBSD-style rc.d configuration ],
516         if test "x$enableval" = "xyes"; then
517                 sysv_style=netbsd
518         fi
519         AC_MSG_RESULT([enabling NetBSD-style rc.d support])
520 )
521
522 AC_ARG_ENABLE(debian,
523         [  --enable-debian         use debian-style sysv configuration ],[
524         if test "$enableval" = "yes"; then
525                 sysv_style=debian
526         fi
527         AC_MSG_RESULT([enabling debian-style sysv support])
528         ]
529 )
530
531 dnl ----- timelord compilation (disabled by default)
532 AC_MSG_CHECKING([whether timelord should be compiled])
533 compile_timelord=no
534 AC_ARG_ENABLE(timelord,
535         [  --enable-timelord       enable compilation of timelord server],
536         [compile_timelord="$enableval"],
537         [compile_timelord="no"]
538 )
539 AC_MSG_RESULT([$compile_timelord])
540
541 dnl ----- a2boot compilation (disabled by default)
542 AC_MSG_CHECKING([whether a2boot should be compiled])
543 compile_a2boot=no
544 AC_ARG_ENABLE(a2boot,
545         [  --enable-a2boot         enable compilation of Apple2 boot server],
546         [compile_a2boot="$enableval"],
547         [compile_a2boot="no"]
548 )
549 AC_MSG_RESULT([$compile_a2boot])
550
551 AC_ARG_WITH(uams-path,
552         [  --with-uams-path=PATH   path to UAMs [[PKGCONF/uams]]],[
553                 uams_path="$withval"
554         ],[
555                 uams_path="${PKGCONFDIR}/uams"
556         ]
557 )
558
559 NETATALK_AC_CUPS
560
561 dnl check if we can use attribute unused (gcc only) from ethereal
562 AC_MSG_CHECKING(to see if we can add '__attribute__((unused))' to CFLAGS)
563 if test x$GCC != x ; then
564   CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
565   AC_MSG_RESULT(yes)
566 else
567   CFLAGS="-D_U_=\"\" $CFLAGS"
568   AC_MSG_RESULT(no)
569 fi
570
571 dnl --------------------------------------------------------------------------
572 dnl FHS stuff has to be done last because it overrides other defaults
573 dnl --------------------------------------------------------------------------
574
575 AC_MSG_CHECKING([whether to use Filesystem Hierarchy Standard (FHS) compatibility])
576 AC_ARG_ENABLE(fhs,
577         [  --enable-fhs            use Filesystem Hierarchy Standard (FHS) compatibility],[
578         if test "$enableval" = "yes"; then
579                 uams_path="${libdir}/netatalk"
580                 sysconfdir="/etc"
581                 PKGCONFDIR=${sysconfdir}/netatalk
582                 SERVERTEXT="${PKGCONFDIR}/msg"
583                 use_pam_so=yes
584                 mandir="/usr/share/man"
585                 AC_DEFINE(FHS_COMPATIBILITY, 1, [Define if you want compatibily with the FHS])
586                 AC_MSG_RESULT([yes])
587         else
588                 AC_MSG_RESULT([no])
589         fi
590         ],[
591                 AC_MSG_RESULT([no])
592         ]
593 )
594
595 dnl --------------------------------------------------------------------------
596 dnl post-FHS substitutions, etc
597 dnl --------------------------------------------------------------------------
598
599 dnl ***** UAMS_PATH
600 dnl AC_DEFINE_UNQUOTED(UAMS_PATH, "${uams_path}",
601 dnl     [path to UAMs [default=PKGCONF/uams]])
602 UAMS_PATH="${uams_path}"
603 AC_SUBST(UAMS_PATH)
604
605 dnl --------------------------------------------------------------------------
606 dnl drop in includes for top level directory structures here...
607 dnl --------------------------------------------------------------------------
608
609 dnl Note: $(top_srcdir)/include should be added before all other includes
610 dnl       so that includes from that directory a preferred to includes from
611 dnl       /usr/include or similar places.
612 LIBS="$LIBS -L\$(top_srcdir)/libatalk"
613 CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
614
615 dnl --------------------------------------------------------------------------
616 dnl specific configuration comes in here:
617 dnl --------------------------------------------------------------------------
618
619 dnl ac_cv_target_os is now host_os, ac_cv_target_cpu is now host_cpu
620
621 dnl --------------------- determine operating system from "target"
622 case "$host_os" in
623         *aix*)                          this_os=aix ;;
624         *freebsd*)                      this_os=freebsd ;;
625         *hpux11*)                       this_os=hpux11 ;;
626         *irix*)                         this_os=irix ;;
627         *linux*)                        this_os=linux ;;
628         *osx*)                          this_os=macosx ;;
629         *darwin*)                       this_os=macosx ;;
630         *netbsd*)                       this_os=netbsd ;;
631         *openbsd*)                      this_os=openbsd ;;
632         *osf*)                          this_os=tru64 ;;
633         *solaris*)                      this_os=solaris ;;
634 esac
635
636 case "$host_cpu" in
637         i386|i486|i586|i686|k7)         this_cpu=x86 ;;
638         alpha)                                          this_cpu=alpha ;;
639         mips)                                           this_cpu=mips ;;
640         powerpc|ppc)                            this_cpu=ppc ;;
641 esac
642
643 dnl --------------------- operating system specific flags (port from sys/*)
644
645 dnl ----- AIX specific -----
646 if test x"$this_os" = "xaix"; then
647         AC_MSG_RESULT([ * AIX specific configuration])
648         AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
649
650         dnl This is probably a lie; AIX 4.3 supports a 64-bit long
651         dnl compilation environment.  It's enough to get things defined
652         dnl right in endian.h provided that long long is supported, though.
653         AC_DEFINE(HAVE_32BIT_LONGS, 1, [Define if the data type long has 32 bit])
654 fi
655
656 dnl ----- FreeBSD specific -----
657 if test x"$this_os" = "xfreebsd"; then 
658         AC_MSG_RESULT([ * FreeBSD specific configuration])
659         AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
660         AC_DEFINE(FREEBSD, 1, [Define if OS is FreeBSD])
661         AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics])
662 fi
663
664 dnl ----- HP-UX 11 specific -----
665 if test x"$this_os" = "xhpux11"; then
666         AC_MSG_RESULT([ * HP-UX 11 specific configuration])
667
668         AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
669         AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
670 fi
671
672 dnl ----- IRIX specific -----
673 if test x"$this_os" = "xirix"; then
674         AC_MSG_RESULT([ * IRIX specific configuration])
675
676         AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
677 fi
678
679 dnl ----- Linux specific -----
680 if test x"$this_os" = "xlinux"; then 
681         AC_MSG_RESULT([ * Linux specific configuration])
682         
683         dnl ----- kernel 2.6 changed struct at_addr to atalk_addr
684         AC_MSG_CHECKING([for struct atalk_addr])
685 dnl     AC_COMPILE_IFELSE([
686         AC_TRY_COMPILE([
687 #include <sys/socket.h>
688 #include <asm/types.h>
689 #include <linux/atalk.h>
690
691         struct atalk_addr foo;
692 ],
693 [ ], [
694                 ac_have_atalk_addr=yes
695                 AC_MSG_RESULT([yes])
696         ], [
697                 AC_MSG_RESULT([no])
698         ])
699
700 if test "x$ac_have_atalk_addr" = "xyes"; then
701         AC_DEFINE(HAVE_ATALK_ADDR, 1, [set if struct at_addr is called atalk_addr])
702 fi
703
704         dnl ----- check if we need the quotactl wrapper
705 #       AC_CHECK_HEADERS(sys/quota.h linux/quota.h)
706 #       AC_CHECK_FUNC(quotactl,,
707 #               AC_DEFINE(NEED_QUOTACTL_WRAPPER, 1, [Define if the quotactl wrapper is needed])
708 #               AC_MSG_RESULT([enabling quotactl wrapper])
709 #       )
710
711         # For quotas on Linux XFS filesystems
712         
713         # For linux > 2.5.56
714         AC_CHECK_HEADERS(linux/dqblk_xfs.h,,
715                 [AC_CHECK_HEADERS(linux/xqm.h linux/xfs_fs.h)
716                 AC_CHECK_HEADERS(xfs/libxfs.h xfs/xqm.h xfs/xfs_fs.h)]
717         )
718
719
720         dnl ----- as far as I can tell, dbtob always does the wrong thing
721         dnl ----- on every single version of linux I've ever played with.
722         dnl ----- see etc/afpd/quota.c
723         AC_DEFINE(HAVE_BROKEN_DBTOB, 1, [Define if dbtob is broken])
724
725         netatalk_cv_linux_sendfile=no
726 dnl     disable this for now, code doesn't use sendfile anyway
727 dnl        AC_ARG_ENABLE(sendfile,
728 dnl         [  --enable-sendfile       use sendfile syscall default (no) ],[
729 dnl             if test "$enableval" = "yes"; then
730 dnl                     netatalk_cv_linux_sendfile=yes
731 dnl             fi
732 dnl             AC_MSG_RESULT([enabling sendfile syscall])
733 dnl         ]
734 dnl       )
735
736         if test x"$netatalk_cv_linux_sendfile" = "xyes"; then 
737             AC_CACHE_CHECK([for linux sendfile support],netatalk_cv_HAVE_SENDFILE,[
738             AC_TRY_LINK([#include <sys/sendfile.h>],
739 [\
740 int tofd, fromfd;
741 off_t offset;
742 size_t total;
743 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
744 ],
745 netatalk_cv_HAVE_SENDFILE=yes,netatalk_cv_HAVE_SENDFILE=no)])
746
747 # Try and cope with broken Linux sendfile....
748             AC_CACHE_CHECK([for broken linux sendfile support],netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE,[
749             AC_TRY_LINK([\
750 #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
751 #undef _FILE_OFFSET_BITS
752 #endif
753 #include <sys/sendfile.h>],
754 [\
755 int tofd, fromfd;
756 off_t offset;
757 size_t total;
758 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
759 ],
760 netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE=no,netatalk_cv_HAVE_BROKEN_SENDFILE=cross)])
761
762             if test x"$netatalk_cv_HAVE_SENDFILE" = x"yes"; then
763                 AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available])
764                 AC_DEFINE(SENDFILE_FLAVOR_LINUX,1,[Whether linux sendfile() API is available])
765                 AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() should be used])
766             elif test x"$netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
767                 AC_DEFINE(SENDFILE_FLAVOR_LINUX,1,[Whether linux sendfile() API is available])
768                 AC_DEFINE(LINUX_BROKEN_SENDFILE_API,1,[Whether (linux) sendfile() is broken])
769                 AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile should be used])
770             else
771                 netatalk_cv_linux_sendfile=no
772                 AC_MSG_RESULT(no);
773             fi
774         fi
775
776         dnl ----- Linux/alpha specific -----
777         if test x"$this_cpu" = "xalpha"; then 
778                 AC_MSG_RESULT([enabling gcc memcpy bug workaround])
779                 AC_DEFINE(HAVE_GCC_MEMCPY_BUG, 1, [Define if memcpy is buggy])
780         fi
781         need_dash_r=no
782
783
784 fi
785
786 dnl ----- Mac OSX specific -----
787 if test x"$this_os" = "xmacosx"; then 
788         AC_MSG_RESULT([ * Mac OSX specific configuration])
789         AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
790         AC_DEFINE(HAVE_2ARG_DBTOB, 1, [Define if dbtob takes two arguments])
791         dnl AC_DEFINE(NO_DLFCN_H)
792         AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
793         AC_DEFINE(NO_QUOTA_SUPPORT, 1, [Define if Quota support should be disabled])
794         AC_DEFINE(MACOSX_SERVER, 1, [Define if compiling for MacOS X Server])
795 fi
796
797 dnl ----- NetBSD specific -----
798 if test x"$this_os" = "xnetbsd"; then 
799         AC_MSG_RESULT([ * NetBSD specific configuration])
800         AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
801         AC_DEFINE(NETBSD, 1, [Define if OS is FreeBSD])
802         CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
803         need_dash_r=yes 
804
805         dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
806         AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
807 fi
808
809 dnl ----- OpenBSD specific -----
810 if test x"$this_os" = "xopenbsd"; then 
811         AC_MSG_RESULT([ * OpenBSD specific configuration])
812         dnl ----- OpenBSD does not have crypt.h, uses unistd.h -----
813         AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
814 fi
815
816 dnl ----- Solaris specific -----
817 if test x"$this_os" = "xsolaris"; then 
818         AC_MSG_RESULT([ * Solaris specific configuration])
819         AC_DEFINE(__svr4__, 1, [Solaris compatibility macro])
820         AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
821         AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
822         AC_DEFINE(SOLARIS, 1, [Solaris compatibility macro])
823         CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
824         need_dash_r=yes
825         sysv_style=solaris
826
827         solaris_module=no
828         AC_MSG_CHECKING([if we can build Solaris kernel module])
829         if test -x /usr/ccs/bin/ld; then
830                 solaris_module=yes
831         fi
832         AC_MSG_RESULT([$solaris_module])
833
834         COMPILE_64BIT_KMODULE=no
835         KCFLAGS=""
836         KLDFLAGS=""
837         COMPILE_KERNEL_GCC=no
838
839         if test "$solaris_module" = "yes"; then
840            dnl Solaris kernel module stuff
841            AC_MSG_CHECKING([if we have to build a 64bit kernel module])
842
843            # check for isainfo, if not found it has to be a 32 bit kernel (<=2.6)       
844            if test -x /usr/bin/isainfo; then
845                 # check for 64 bit platform
846                 if isainfo -kv | grep '^64-bit'; then
847                         COMPILE_64BIT_KMODULE=yes
848                 fi
849            fi
850
851            AC_MSG_RESULT([$COMPILE_64BIT_KMODULE])
852
853            if test "${GCC}" = yes; then
854                 COMPILE_KERNEL_GCC=yes
855                 if test "$COMPILE_64BIT_KMODULE" = yes; then
856                 
857                         AC_MSG_CHECKING([if we can build a 64bit kernel module])
858                         
859                         case `$CC --version 2>/dev/null` in
860                         [[12]].* | 3.0.*)
861                                 COMPILE_64BIT_KMODULE=no
862                                 COMPILE_KERNEL_GCC=no   
863                                 solaris_module=no;;
864                         *)
865                                 # use for 64 bit
866                                 KCFLAGS="-m64"
867                                 #KLDFLAGS="-melf64_sparc"
868                                 KLDFLAGS="-64";;
869                         esac    
870                         
871                         AC_MSG_RESULT([$COMPILE_64BIT_KMODULE])
872                         
873                 else
874                         KCFLAGS=""
875                         KLDFLAGS=""
876                 fi
877                 KCFLAGS="$KCFLAGS -D_KERNEL -Wall -Wstrict-prototypes"
878            else
879                 if test "$COMPILE_64BIT_KMODULE" = yes; then
880                 # use Sun CC (for a 64-bit kernel, uncomment " -xarch=v9 -xregs=no%appl ")
881                         KCFLAGS="-xarch=v9 -xregs=no%appl"
882                         KLDFLAGS="-64"
883                 else
884                         KCFLAGS=""
885                         KLDFLAGS=""
886                 fi
887                 KCFLAGS="-D_KERNEL $KCFLAGS -mno-app-regs -munaligned-doubles -fpcc-struct-return"
888            fi
889
890            AC_CACHE_CHECK([for timeout_id_t],netatalk_cv_HAVE_TIMEOUT_ID_T,[
891            AC_TRY_LINK([\
892 #include <sys/stream.h>
893 #include <sys/ddi.h>],
894 [\
895 timeout_id_t dummy;
896 ],
897 netatalk_cv_HAVE_TIMEOUT_ID_T=yes,netatalk_cv_HAVE_TIMEOUT_ID_T=no,netatalk_cv_HAVE_TIMEOUT_ID_T=cross)])
898
899            AC_DEFINE(HAVE_TIMEOUT_ID_T, test x"$netatalk_cv_HAVE_TIMEOUT_ID" = x"yes", [define for timeout_id_t])
900         fi
901
902         AC_SUBST(COMPILE_KERNEL_GCC)
903         AC_SUBST(COMPILE_64BIT_KMODULE)
904         AC_SUBST(KCFLAGS)
905         AC_SUBST(KLDFLAGS)
906 fi
907
908 dnl ----- Tru64 specific -----
909 if test x"$this_os" = "xtru64"; then 
910         AC_MSG_RESULT([ * Tru64 specific configuration])
911         AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
912         AC_DEFINE(HAVE_64BIT_LONGS, 1, [Define if the data type long has 64 bit])
913         dnl AC_DEFINE(USE_MOUNT_H)
914         AC_DEFINE(USE_OLD_RQUOTA, 1, [Define to use old rquota])
915         dnl AC_DEFINE(USE_UFS_QUOTA_H)
916         AC_DEFINE(TRU64, 1, [Define on Tru64 platforms])
917         AC_DEFINE(_OSF_SOURCE, 1, [Define if the *passwd UAMs should be used])
918         AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Define for Berkeley DB 4])
919         AC_CHECK_LIB(security,set_auth_parameters)
920         CFLAGS="-I\$(top_srcdir)/sys/tru64 $CFLAGS"
921         need_dash_r=no
922         sysv_style=tru64
923 fi
924
925 dnl -- check for libgcrypt, if found enables DHX UAM
926 AM_PATH_LIBGCRYPT([1:1.2.3],[neta_cv_compile_dhx2=yes
927                         neta_cv_have_libgcrypt=yes
928                         AC_MSG_NOTICE([Enabling DHX2 UAM])
929                         AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define if the DHX2 modules should be built with libgcrypt])
930                         AC_DEFINE(UAM_DHX2, 1, [Define if the DHX2 UAM modules should be compiled])
931                         ])
932
933 dnl -- look for openssl, if found enables DHX UAM and Randnum UAM
934 AC_PATH_SSL
935
936 dnl Check for Berkeley DB library
937 if test "x$bdb_required" = "xyes"; then
938         AC_PATH_BDB(, [
939                 AC_MSG_RESULT([])
940                 AC_MSG_RESULT([Make sure you have the required Berkeley DB libraries AND headers installed.])
941                 AC_MSG_RESULT([You can download the latest version from http://www.sleepycat.com.])
942                 AC_MSG_RESULT([If you have installed BDB in a non standard location use the])
943                 AC_MSG_RESULT([--with-bdb=/path/to/bdb configure option and make sure])
944                 AC_MSG_RESULT([your linker is configured to check for libraries there.])
945                 AC_MSG_ERROR([Berkeley DB library required but not found!])
946         ])
947 fi
948
949 dnl -- check for crypt
950 AC_CRYPT
951
952 dnl --------------------- check for building PGP UAM module
953
954 AC_MSG_CHECKING([whether the PGP UAM should be build])
955 AC_ARG_ENABLE(pgp-uam,
956         [  --enable-pgp-uam        enable build of PGP UAM module],[
957         if test "$enableval" = "yes"; then 
958                 if test "x$neta_cv_have_openssl" = "xyes"; then 
959                         AC_DEFINE(UAM_PGP, 1, [Define if the PGP UAM module should be compiled])
960                         compile_pgp=yes
961                         AC_MSG_RESULT([yes])
962                 else
963                         AC_MSG_RESULT([no])
964                 fi
965         fi
966         ],[
967                 AC_MSG_RESULT([no])
968         ]
969 )
970
971 dnl --------------------- check for building Kerberos v4 UAM module
972
973 AC_MSG_CHECKING([whether the Kerberos IV UAM should be build])
974 AC_ARG_ENABLE(krb4-uam,
975         [  --enable-krb4-uam       enable build of Kerberos v4 UAM module],[
976         if test "$enableval" = "yes"; then
977                 AC_DEFINE(UAM_KRB4, 1, [Define if the Kerberos 4 UAM module should be compiled])
978                 compile_kerberos=yes
979                 AC_MSG_RESULT([yes])
980         else
981                 AC_MSG_RESULT([no])
982         fi
983         ],[
984                 AC_MSG_RESULT([no])
985         ]
986 )
987
988 dnl --------------------- check for building Kerberos V UAM module
989
990 netatalk_cv_build_krb5_uam=no
991 AC_ARG_ENABLE(krbV-uam,
992         [  --enable-krbV-uam       enable build of Kerberos V UAM module],
993         [
994                 if test x"$enableval" = x"yes"; then
995                         NETATALK_GSSAPI_CHECK([
996                                 netatalk_cv_build_krb5_uam=yes
997                         ],[
998                                 AC_MSG_ERROR([need GSSAPI to build Kerberos V UAM])
999                         ])
1000                 fi
1001         ]
1002         
1003 )
1004
1005 AC_MSG_CHECKING([whether Kerberos V UAM should be build])
1006 if test x"$netatalk_cv_build_krb5_uam" = x"yes"; then
1007         AC_MSG_RESULT([yes])
1008 else
1009         AC_MSG_RESULT([no])
1010 fi
1011 AM_CONDITIONAL(USE_GSSAPI, test x"$netatalk_cv_build_krb5_uam" = x"yes")
1012
1013 dnl --------------------- overwrite the config files . . . or not.
1014
1015 AC_MSG_CHECKING([whether configuration files should be overwritten])
1016 AC_ARG_ENABLE(overwrite,
1017         [  --enable-overwrite      overwrite configuration files during installation],
1018         [OVERWRITE_CONFIG="${enable_overwrite}"],
1019         [OVERWRITE_CONFIG="no"]
1020 )
1021 AC_MSG_RESULT([$OVERWRITE_CONFIG])
1022
1023 dnl --------------------- check for ACL support
1024 neta_cv_nfsv4acl="no"
1025 AC_MSG_CHECKING([if NFSv4 ACL Support should be enabled])
1026 AC_ARG_ENABLE(nfsv4acls,
1027         [  --enable-nfsv4acls      enable NFSv4 ACL Support],[
1028         if test x"$enableval" = x"yes"; then
1029            AC_MSG_RESULT([yes])
1030            neta_cv_nfsv4acl="yes"
1031         else
1032            AC_MSG_RESULT([no])
1033         fi],[
1034            AC_MSG_RESULT([no])
1035         ]
1036 )
1037 if test x$neta_cv_nfsv4acl = xyes; then
1038         AC_CHECK_HEADER([ldap.h],,[
1039                 AC_MSG_ERROR([ACL Support need the LDAP client headers not found.])
1040                 neta_cv_nfsv4acl=no
1041                 ]
1042         )
1043         AC_CHECK_LIB(ldap,ldap_init,neta_cv_nfsv4acl=yes,neta_cv_nfsv4acl=no)
1044 fi
1045 if test x$neta_cv_nfsv4acl = xyes; then
1046         AC_CHECK_HEADER([sys/acl.h],[
1047                 AC_DEFINE([HAVE_NFSv4_ACLS], 1, [Enable ACL code])
1048                 AC_MSG_NOTICE([Enabling ACL support])
1049                 ],
1050                 neta_cv_nfsv4acl=no
1051         )
1052 fi
1053 if test x$neta_cv_nfsv4acl = xyes; then
1054         LIBATALK_ACLS="acl/libacl.la"
1055 else
1056         LIBATALK_ACLS=""
1057 fi
1058 AC_SUBST(LIBATALK_ACLS)
1059
1060 dnl --------------------- check for Extended Attributes support
1061 neta_cv_extattrs="no"
1062 AC_MSG_CHECKING([if Extended Attribute Support should be enabled])
1063 AC_ARG_ENABLE(extattrs,
1064         [  --enable-extattrs       enable Extended Attributes],[
1065         if test x"$enableval" = x"yes"; then
1066            AC_MSG_RESULT([yes])
1067            neta_cv_extattrs="yes"
1068         else
1069            AC_MSG_RESULT([no])
1070         fi],[
1071            AC_MSG_RESULT([no])
1072         ]
1073 )
1074 if test x$neta_cv_extattrs = xyes; then
1075         AC_CHECK_LIB(c,attropen,neta_cv_extattrs=yes,neta_cv_extattrs=no)
1076 fi
1077 if test x$neta_cv_extattrs = xyes; then
1078         AC_MSG_NOTICE([Enabling Extended Attributes support])
1079         AC_DEFINE([HAVE_EXT_ATTRS], 1, [Enable Extended Attributes])
1080 fi
1081
1082 dnl --------------------- last minute substitutions
1083
1084 AC_SUBST(LIBS)
1085 AC_SUBST(CFLAGS)
1086 AC_SUBST(OVERWRITE_CONFIG)
1087
1088 AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
1089 AM_CONDITIONAL(COMPILE_TIMELORD, test x$compile_timelord = xyes)
1090 AM_CONDITIONAL(COMPILE_A2BOOT, test x$compile_a2boot = xyes)
1091 AM_CONDITIONAL(HAVE_LIBGCRYPT, test x$neta_cv_have_libgcrypt = xyes)
1092 AM_CONDITIONAL(HAVE_OPENSSL, test x$neta_cv_have_openssl = xyes)
1093 AM_CONDITIONAL(USE_NFSv4_ACLS, test x$neta_cv_nfsv4acl = xyes)
1094 AM_CONDITIONAL(USE_EXT_ATTRS, test x$neta_cv_extattrs = xyes)
1095 AM_CONDITIONAL(USE_DHX, test x$neta_cv_compile_dhx = xyes)
1096 AM_CONDITIONAL(USE_DHX2, test x$neta_cv_compile_dhx2 = xyes)
1097 AM_CONDITIONAL(USE_RANDNUM, test x$neta_cv_have_openssl = xyes)
1098 AM_CONDITIONAL(USE_KERBEROS, test x$compile_kerberos = xyes)
1099 AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
1100 AM_CONDITIONAL(USE_PAM, test x$netatalk_cv_install_pam = xyes)
1101 AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
1102 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
1103 AM_CONDITIONAL(DEFAULT_HOOK, test x$neta_cv_have_libgcrypt != xyes && test x$neta_cv_have_openssl != xyes)
1104 AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
1105 AM_CONDITIONAL(USE_NETBSD, test x$sysv_style = xnetbsd)
1106 AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
1107 AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
1108 AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
1109 AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
1110 AM_CONDITIONAL(USE_SOLARIS, test x$sysv_style = xsolaris)
1111 AM_CONDITIONAL(USE_GENTOO, test x$sysv_style = xgentoo)
1112 AM_CONDITIONAL(USE_DEBIAN, test x$sysv_style = xdebian)
1113 AM_CONDITIONAL(USE_UNDEF, test x$sysv_style = x)
1114 AM_CONDITIONAL(USE_BDB, test x$bdb_required = xyes)
1115
1116 dnl --------------------- generate files
1117
1118 AC_OUTPUT([Makefile
1119         bin/Makefile
1120         bin/adv1tov2/Makefile
1121         bin/aecho/Makefile
1122         bin/afile/Makefile
1123         bin/afppasswd/Makefile
1124         bin/cnid/Makefile
1125         bin/cnid/cnid_maint
1126         bin/cnid/cnid2_create
1127         bin/getzones/Makefile
1128         bin/megatron/Makefile
1129         bin/nbp/Makefile
1130         bin/pap/Makefile
1131         bin/psorder/Makefile
1132         bin/uniconv/Makefile
1133         config/Makefile
1134         contrib/Makefile
1135         contrib/acltests/Makefile
1136         contrib/macusers/Makefile
1137         contrib/macusers/macusers
1138         contrib/nu/Makefile
1139         contrib/nu/nu
1140         contrib/printing/Makefile
1141         contrib/shell_utils/Makefile
1142         contrib/shell_utils/afpd-mtab.pl
1143         contrib/shell_utils/apple_cp
1144         contrib/shell_utils/apple_mv
1145         contrib/shell_utils/apple_rm
1146         contrib/shell_utils/apple_cleanup
1147         contrib/shell_utils/asip-status.pl
1148         contrib/timelord/Makefile
1149         contrib/a2boot/Makefile
1150         distrib/Makefile
1151         distrib/config/Makefile
1152         distrib/config/netatalk-config
1153         distrib/initscripts/Makefile
1154         distrib/m4/Makefile
1155         doc/Makefile
1156         etc/Makefile
1157         etc/afpd/Makefile
1158         etc/atalkd/Makefile
1159         etc/cnid_dbd/Makefile
1160         etc/uams/Makefile
1161         etc/uams/uams_krb4/Makefile
1162         etc/papd/Makefile
1163         etc/psf/Makefile
1164         include/Makefile
1165         include/atalk/Makefile
1166         libatalk/Makefile
1167         libatalk/acl/Makefile
1168         libatalk/adouble/Makefile
1169         libatalk/asp/Makefile
1170         libatalk/atp/Makefile
1171         libatalk/cnid/Makefile
1172         libatalk/cnid/db3/Makefile
1173         libatalk/cnid/cdb/Makefile
1174         libatalk/cnid/last/Makefile
1175         libatalk/cnid/mtab/Makefile
1176         libatalk/cnid/dbd/Makefile
1177         libatalk/cnid/hash/Makefile
1178         libatalk/cnid/tdb/Makefile
1179         libatalk/compat/Makefile
1180         libatalk/dsi/Makefile
1181         libatalk/nbp/Makefile
1182         libatalk/netddp/Makefile
1183         libatalk/util/Makefile
1184         libatalk/util/test/Makefile
1185         libatalk/tdb/Makefile
1186         libatalk/unicode/Makefile
1187         libatalk/unicode/charsets/Makefile
1188         macros/Makefile
1189         man/Makefile
1190         man/man1/Makefile
1191         man/man3/Makefile
1192         man/man4/Makefile
1193         man/man5/Makefile
1194         man/man8/Makefile
1195         sys/Makefile
1196         sys/generic/Makefile
1197         sys/generic/sys/Makefile
1198         sys/netatalk/Makefile
1199         sys/netbsd/Makefile
1200         sys/netbsd/netatalk/Makefile
1201         sys/solaris/Makefile
1202         sys/sunos/Makefile
1203         sys/ultrix/Makefile
1204         ],
1205         [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
1206 )
1207
1208 AC_NETATALK_LIBS_SUMMARY
1209 AC_NETATALK_CONFIG_SUMMARY