-dnl $Id: configure.in,v 1.241 2010/04/03 07:11:33 franklahm Exp $
dnl configure.in for netatalk
AC_INIT(etc/afpd/main.c)
AM_PROG_CC_C_O
-dnl *********************************************************************
-dnl FIXME! FIXME! These should be selectable properly, and should produce
-dnl the proper flags and defines...
-dnl *********************************************************************
-
-############################################
-# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the plugin loading code
-#AC_SEARCH_LIBS(dlopen, [dl])
-# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
-
-dnl Checks for libraries.
-dnl Replace `main' with a function in -labs:
-dnl AC_CHECK_LIB(abs, main)
-dnl Replace `main' with a function in -laudit:
-dnl AC_CHECK_LIB(audit, main)
-dnl Replace `main' with a function in -lauth:
-dnl AC_CHECK_LIB(auth, main)
-dnl Replace `main' with a function in -lcmd:
-dnl AC_CHECK_LIB(cmd, main)
-dnl Replace `main' with a function in -lcrypt:
-dnl AC_CHECK_LIB(crypt, main)
-dnl Replace `main' with a function in -ld:
-dnl AC_CHECK_LIB(d, main)
-dnl Replace `main' with a function in -ldl:
-dnl AC_CHECK_LIB(dl, dlopen)
-dnl Replace `main' with a function in -lkauth:
-dnl AC_CHECK_LIB(kauth, main)
-dnl Replace `main' with a function in -lkrb:
-dnl AC_CHECK_LIB(krb, main)
-dnl Replace `main' with a function in -llwp:
-dnl AC_CHECK_LIB(lwp, main)
-dnl Replace `main' with a function in -ln:
-dnl AC_CHECK_LIB(n, main)
-
-dnl not the right stuff but should be enough for now
-AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
-AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])
-
-dnl Replace `main' with a function in -lprot:
-dnl AC_CHECK_LIB(prot, main)
-dnl Replace `main' with a function in -lrx:
-dnl AC_CHECK_LIB(rx, main)
-dnl Replace `main' with a function in -lrxkad:
-dnl AC_CHECK_LIB(rxkad, main)
-dnl Replace `main' with a function in -lsys:
-dnl AC_CHECK_LIB(sys, main)
-dnl Replace `main' with a function in -lubik:
-dnl AC_CHECK_LIB(ubik, main)
-
-
-#
-# Check presence of some functions
-#
-# Check for XPG4 access() function
-# Be sure to test before adding AFS libs in LIBS path as AFS lib
-# has such a function that works only on AFS filesystems.
-AC_CHECK_FUNCS(access)
-#
-AC_CHECK_FUNCS(pread pwrite)
-
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-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)
+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 langinfo.h locale.h sys/filio.h)
AC_CHECK_HEADER(sys/cdefs.h,,
AC_MSG_RESULT([enabling generic cdefs.h from tree])
CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
#endif
])
-AC_CHECK_HEADERS(langinfo.h locale.h sys/filio.h)
-
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
fi
-
dnl Checks for library functions.
AC_TYPE_GETGROUPS
AC_PROG_GCC_TRADITIONAL
AC_FUNC_UTIME_NULL
AC_FUNC_WAIT3
AC_CHECK_FUNCS(getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strcasestr strstr strtoul strchr memcpy)
-AC_CHECK_FUNCS(backtrace_symbols setlocale nl_langinfo strlcpy strlcat setlinebuf dirfd pselect)
+AC_CHECK_FUNCS(backtrace_symbols setlocale nl_langinfo strlcpy strlcat setlinebuf dirfd pselect access pread pwrite)
AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
AC_CHECK_FUNC(renameat, AC_DEFINE([_ATFILE_SOURCE], 1, AT file source))
AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
+
+AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
+AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])
+dnl search for necessary libs for libpthread stuff
+AC_SEARCH_LIBS(pthread_sigmask, pthread,,
+ [AC_MSG_ERROR([cannot find pthread_sigmask in libc or libpthread])])
+if test x"$ac_cv_search_pthread_sigmask" != x"none required" ; then
+ PTHREAD_LIBS=$ac_cv_search_pthread_sigmask
+fi
+AC_SUBST(PTHREAD_LIBS)
AC_CACHE_SAVE
dnl Checks for (v)snprintf
netatalk_cv_ddp_enabled=no
AC_MSG_CHECKING([whether to enable DDP])
AC_ARG_ENABLE(ddp,
- [ --enable-ddp enable DDP],[
+ [ --enable-ddp enable DDP (AppleTalk)],[
if test "$enableval" = "yes"; then
AC_MSG_RESULT([yes])
netatalk_cv_ddp_enabled=yes
dnl Check for optional server location protocol support (used by MacOS X)
NETATALK_SRVLOC
+dnl Check for optional Zeroconf support
+NETATALK_ZEROCONF
+
dnl Check for PAM libs
netatalk_cv_use_pam=no
AC_PATH_PAM([
dnl --------------------- check for ACL support
AC_MSG_CHECKING(whether to support ACLs)
-AC_ARG_WITH(acl-support,
- [AS_HELP_STRING([--with-acl-support],
+AC_ARG_WITH(acls,
+ [AS_HELP_STRING([--with-acls],
[Include ACL support (default=auto)])],
[ case "$withval" in
yes|no)
dnl --------------------- Netatalk Webmin
NETATALK_WEBMIN
+dnl --------------------- Check for libuuid which is required for TimeMachine
+AC_SEARCH_LIBS([uuid_generate],
+ [uuid], ,
+ AC_MSG_ERROR([missing library libuuid required for TimeMachine]))
+AC_CHECK_HEADER([uuid/uuid.h],
+ AC_DEFINE([HAVE_UUID], 1, [have libuuid]),
+ AC_MSG_ERROR([missing header <uuid/uuid.> from libuuid required for TimeMachine]))
+
dnl --------------------- last minute substitutions
AC_SUBST(LIBS)
sys/solaris/Makefile
sys/sunos/Makefile
sys/ultrix/Makefile
- test/Makefile
- test/afpd/Makefile
+ test/Makefile
+ test/afpd/Makefile
],
[chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
)