]> arthur.barton.de Git - netatalk.git/blobdiff - configure.in
Integrate downstream NetBSD patches
[netatalk.git] / configure.in
index ef3b073498b1f3a50a25a4b994e444d867bea0b7..99d3f0272d93e30d9d995a7f591d1906d8c692b8 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.236 2010-01-04 10:02:18 franklahm Exp $
+dnl $Id: configure.in,v 1.243 2010-04-12 14:28:42 franklahm Exp $
 dnl configure.in for netatalk
 
 AC_INIT(etc/afpd/main.c)
@@ -135,9 +135,9 @@ 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)
+AC_CHECK_FUNCS(backtrace_symbols setlocale nl_langinfo strlcpy strlcat setlinebuf dirfd pselect)
 AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
-AC_CHECK_FUNCS(strlcpy strlcat setlinebuf gethostid dirfd)
+AC_CHECK_FUNC(renameat, AC_DEFINE([_ATFILE_SOURCE], 1, AT file source)) 
 AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
 AC_CACHE_SAVE
 
@@ -795,8 +795,8 @@ dnl ----- NetBSD specific -----
 if test x"$this_os" = "xnetbsd"; then 
        AC_MSG_RESULT([ * NetBSD specific configuration])
        AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
-       AC_DEFINE(NETBSD, 1, [Define if OS is FreeBSD])
-       CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
+       AC_DEFINE(NETBSD, 1, [Define if OS is NetBSD])
+       CFLAGS="-I\$(top_srcdir)/sys/netbsd $CFLAGS"
        need_dash_r=yes 
 
        dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
@@ -1055,7 +1055,7 @@ fi
 AC_SUBST(LIBATALK_ACLS)
 
 dnl --------------------- check for Extended Attributes support
-neta_cv_eas="files"
+neta_cv_eas="ad"
 neta_cv_eas_sys_found=no
 neta_cv_eas_sys_not_found=no
 
@@ -1148,10 +1148,39 @@ esac
 
 if test "x$neta_cv_eas_sys_found" = "xyes" ; then
    if test "x$neta_cv_eas_sys_not_found" != "xyes" ; then
-      neta_cv_eas="$neta_cv_eas | native"
+      neta_cv_eas="$neta_cv_eas | sys"
    fi
 fi
 
+dnl --------------------- Check if realpath() takes NULL
+AC_CACHE_CHECK([if the realpath function allows a NULL argument],
+    neta_cv_REALPATH_TAKES_NULL, [
+        AC_TRY_RUN([
+            #include <stdio.h>
+            #include <limits.h>
+            #include <signal.h>
+
+            void exit_on_core(int ignored) {
+                 exit(1);
+            }
+
+            main() {
+                char *newpath;
+                signal(SIGSEGV, exit_on_core);
+                newpath = realpath("/tmp", NULL);
+                exit((newpath != NULL) ? 0 : 1);
+            }],
+            neta_cv_REALPATH_TAKES_NULL=yes,
+            neta_cv_REALPATH_TAKES_NULL=no,
+            neta_cv_REALPATH_TAKES_NULL=cross
+        )
+    ]
+)
+
+if test x"$neta_cv_REALPATH_TAKES_NULL" = x"yes"; then
+    AC_DEFINE(REALPATH_TAKES_NULL,1,[Whether the realpath function allows NULL])
+fi
+
 dnl --------------------- Netatalk Webmin
 NETATALK_WEBMIN
 
@@ -1244,7 +1273,6 @@ AC_OUTPUT([Makefile
        libatalk/cnid/Makefile
        libatalk/cnid/cdb/Makefile
        libatalk/cnid/last/Makefile
-       libatalk/cnid/mtab/Makefile
        libatalk/cnid/dbd/Makefile
        libatalk/cnid/tdb/Makefile
        libatalk/compat/Makefile