]> arthur.barton.de Git - netatalk.git/blobdiff - configure.in
Start locking using Berkeley db
[netatalk.git] / configure.in
index 9a06906c0600f07313b1541757b8f2247048fe82..81b02430e6f877ccf9fa4e421f9cac4554be0cb7 100644 (file)
@@ -23,31 +23,30 @@ AC_PROG_GREP
 AC_PROG_PS
 AM_PROG_CC_C_O
 
-dnl Checks for header files.
-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 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"
-)
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_INLINE
+
+dnl Request SUSv3 standard interfaces plus anything else the platform may have
+CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D_GNU_SOURCE"
+
+dnl Configure libevent
+AC_CONFIG_SUBDIRS([libevent])
+
+dnl Checks for header files, some checks are obsolete, unfortunately the code
+dnl uses the resulting macros, so the code has to cleaned up too before
+dnl we can remove the checks here.
+AC_CHECK_HEADERS(mntent.h unistd.h termios.h ufs/quota.h)
+AC_CHECK_HEADERS(netdb.h sgtty.h statfs.h dlfcn.h langinfo.h locale.h)
+AC_CHECK_HEADERS(sys/param.h sys/fcntl.h sys/termios.h)
+AC_CHECK_HEADERS(sys/mnttab.h sys/statvfs.h sys/stat.h sys/vfs.h)
+dnl Checks for header files, conformed to be required as of 2011
+AC_CHECK_HEADERS(sys/epoll.h)
 AC_CHECK_HEADERS([sys/mount.h], , , 
 [#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
 ])
 
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_UID_T
-AC_C_INLINE
-AC_TYPE_MODE_T
-AC_TYPE_OFF_T
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_STRUCT_ST_RDEV
-AC_HEADER_TIME
-AC_STRUCT_TM
 
 dnl --------------------------------------------------------------------------
 dnl check if dlsym needs to add an underscore, uses libtool macros 
@@ -59,35 +58,25 @@ if test x"$libltdl_cv_need_uscore" = xyes; then
     AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
 fi
 
-dnl Checks for library functions.
-AC_TYPE_GETGROUPS
-AC_PROG_GCC_TRADITIONAL
-AC_FUNC_MEMCMP
-AC_HEADER_MAJOR
-AC_FUNC_MMAP
-AC_TYPE_SIGNAL
-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 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)) 
+dnl Special hecks
 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])])
+dnl these tests have been comfirmed to be needed in 2011
+AC_CHECK_FUNC(renameat, AC_DEFINE([_ATFILE_SOURCE], 1, AT file source)) 
+AC_CHECK_FUNC(epoll_create, AC_DEFINE([HAVE_EPOLL], 1, Whether Linux epoll is available)) 
+AC_CHECK_FUNCS(backtrace_symbols dirfd getusershell pread pwrite pselect)
+AC_CHECK_FUNCS(setlinebuf strlcat strlcpy strnlen)
+
+dnl search for necessary libraries
+AC_SEARCH_LIBS(gethostbyname, nsl)
+AC_SEARCH_LIBS(connect, socket)
+AC_SEARCH_LIBS(pthread_sigmask, pthread,,[AC_MSG_ERROR([missing pthread_sigmask])])
 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_SNPRINTF_CHECK
-
 dnl --------------------------------------------------------------------------
 dnl 64bit platform check
 dnl --------------------------------------------------------------------------
@@ -542,8 +531,8 @@ dnl --------------------------------------------------------------------------
 dnl Note: $(top_srcdir)/include should be added before all other includes
 dnl       so that includes from that directory a preferred to includes from
 dnl       /usr/include or similar places.
-LIBS="$LIBS -L\$(top_srcdir)/libatalk"
-CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
+LIBS="$LIBS -L\$(top_srcdir)/libatalk -L\$(top_srcdir)/libevent"
+CFLAGS="-I\$(top_srcdir)/include -I\$(top_srcdir)/sys -I\$(top_srcdir)/libevent/include $CFLAGS"
 
 AC_DEFINE(OPEN_NOFOLLOW_ERRNO, ELOOP, errno returned by open with O_NOFOLLOW)
 
@@ -776,7 +765,7 @@ if test x"$this_os" = "xsolaris"; then
 
        solaris_module=no
        AC_MSG_CHECKING([if we can build Solaris kernel module])
-       if test -x /usr/ccs/bin/ld && test x$netatalk_cv_ddp_enabled = yes ; then
+       if test -x /usr/ccs/bin/ld && test x"$netatalk_cv_ddp_enabled" = x"yes" ; then
                solaris_module=yes
        fi
        AC_MSG_RESULT([$solaris_module])
@@ -1253,8 +1242,6 @@ dnl --------------------- Netatalk Webmin
 NETATALK_WEBMIN
 
 dnl --------------------- last minute substitutions
-dnl Request SUSv3 standard interfaces
-CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600 -D__EXTENSIONS__"
 AC_SUBST(LIBS)
 AC_SUBST(CFLAGS)
 AC_SUBST(OVERWRITE_CONFIG)
@@ -1293,7 +1280,6 @@ dnl --------------------- generate files
 AC_OUTPUT([Makefile
        bin/Makefile
        bin/ad/Makefile
-       bin/adv1tov2/Makefile
        bin/aecho/Makefile
        bin/afppasswd/Makefile
        bin/cnid/Makefile
@@ -1327,6 +1313,7 @@ AC_OUTPUT([Makefile
        etc/afpd/Makefile
        etc/atalkd/Makefile
        etc/cnid_dbd/Makefile
+       etc/netalockd/Makefile
        etc/uams/Makefile
        etc/uams/uams_krb4/Makefile
        etc/papd/Makefile
@@ -1346,12 +1333,17 @@ AC_OUTPUT([Makefile
        libatalk/cnid/tdb/Makefile
        libatalk/compat/Makefile
        libatalk/dsi/Makefile
+       libatalk/locking/Makefile
        libatalk/nbp/Makefile
        libatalk/netddp/Makefile
-       libatalk/util/Makefile
+       libatalk/rpc/Makefile
+       libatalk/talloc/Makefile
+       libatalk/tevent/Makefile
+       libatalk/tsocket/Makefile
        libatalk/tdb/Makefile
        libatalk/unicode/Makefile
        libatalk/unicode/charsets/Makefile
+       libatalk/util/Makefile
        libatalk/vfs/Makefile
        macros/Makefile
        man/Makefile
@@ -1361,8 +1353,6 @@ AC_OUTPUT([Makefile
        man/man5/Makefile
        man/man8/Makefile
        sys/Makefile
-       sys/generic/Makefile
-       sys/generic/sys/Makefile
        sys/netatalk/Makefile
        sys/netbsd/Makefile
        sys/netbsd/netatalk/Makefile
@@ -1371,6 +1361,7 @@ AC_OUTPUT([Makefile
        sys/ultrix/Makefile
        test/Makefile
        test/afpd/Makefile
+       test/netalockd/Makefile
        ],
        [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
 )