]> arthur.barton.de Git - netatalk.git/blobdiff - configure.in
Merge from branch-2-1: umask on upriv volumes
[netatalk.git] / configure.in
index 9dad52e1cfb9aa3b4cc2a51a863dbaee547f3c8c..939bb2c4ab3c122bba5615e59946f736360571c2 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.241 2010-04-03 07:11:33 franklahm Exp $
+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)
@@ -232,19 +232,20 @@ AC_ARG_WITH(cracklib,
 AC_MSG_CHECKING([for cracklib support])
 AC_MSG_RESULT([$netatalk_cv_with_cracklib])
 
-netatalk_cv_ddp_enabled=yes
+netatalk_cv_ddp_enabled=no
 AC_MSG_CHECKING([whether to enable DDP])
 AC_ARG_ENABLE(ddp,
-       [  --disable-ddp           disable DDP],[
-       if test "$enableval" = "no"; then 
-               AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
-               AC_MSG_RESULT([no])
-               netatalk_cv_ddp_enabled=no
+       [  --enable-ddp           enable DDP],[
+       if test "$enableval" = "yes"; then 
+               AC_MSG_RESULT([yes])
+               netatalk_cv_ddp_enabled=yes
        else
                AC_MSG_RESULT([yes])
+               AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
        fi
        ],[
-               AC_MSG_RESULT([yes])
+               AC_MSG_RESULT([no])
+               AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
        ]
 )
 
@@ -278,9 +279,11 @@ AC_ARG_ENABLE(debug,
                AC_MSG_RESULT([yes])
        else
                AC_MSG_RESULT([no])
+        AC_DEFINE(NDEBUG, 1, [Disable assertions])
        fi
        ],[
                AC_MSG_RESULT([no])
+        AC_DEFINE(NDEBUG, 1, [Disable assertions])
        ]
 )
 
@@ -597,6 +600,8 @@ dnl       /usr/include or similar places.
 LIBS="$LIBS -L\$(top_srcdir)/libatalk"
 CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
 
+AC_DEFINE(OPEN_NOFOLLOW_ERRNO, ELOOP, errno returned by open with O_NOFOLLOW)
+
 dnl --------------------------------------------------------------------------
 dnl specific configuration comes in here:
 dnl --------------------------------------------------------------------------
@@ -650,6 +655,7 @@ if test x"$this_os" = "xfreebsd"; then
        AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
        AC_DEFINE(FREEBSD, 1, [Define if OS is FreeBSD])
        AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics])
+    AC_DEFINE(OPEN_NOFOLLOW_ERRNO, EMLINK, errno returned by open with O_NOFOLLOW)
 fi
 
 dnl ----- HP-UX 11 specific -----
@@ -795,8 +801,10 @@ 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])
+    AC_DEFINE(OPEN_NOFOLLOW_ERRNO, EFTYPE, errno returned by open with O_NOFOLLOW)
+
+       CFLAGS="-I\$(top_srcdir)/sys/netbsd $CFLAGS"
        need_dash_r=yes 
 
        dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
@@ -823,7 +831,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; then
+       if test -x /usr/ccs/bin/ld && test x$netatalk_cv_ddp_enabled = yes ; then
                solaris_module=yes
        fi
        AC_MSG_RESULT([$solaris_module])
@@ -1055,7 +1063,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
 
@@ -1080,6 +1088,22 @@ case "$this_os" in
                    [neta_cv_eas_sys_not_found=yes])
   ;;
 
+  'freebsd')
+    AC_CHECK_FUNCS([extattr_delete_fd extattr_delete_file extattr_delete_link],
+                   [neta_cv_eas_sys_found=yes],
+                   [neta_cv_eas_sys_not_found=yes])
+    AC_CHECK_FUNCS([extattr_get_fd extattr_get_file extattr_get_link],,
+                   [neta_cv_eas_sys_not_found=yes])
+    AC_CHECK_FUNCS([extattr_list_fd extattr_list_file extattr_list_link],,
+                   [neta_cv_eas_sys_not_found=yes])
+    AC_CHECK_FUNCS([extattr_set_fd extattr_set_file extattr_set_link],,
+                   [neta_cv_eas_sys_not_found=yes])
+  ;;
+
+  *freebsd4* | *dragonfly* )
+    AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work])
+  ;;
+
   *)
        AC_SEARCH_LIBS(getxattr, [attr])
 
@@ -1133,22 +1157,9 @@ if test x"$ac_cv_func_getxattr" = x"yes" ; then
        fi
 fi
 
-# Check if we have extattr
-case "$this_os" in
-  *freebsd4* | *dragonfly* )
-    AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work])
-    ;;
-  *)
-    AC_CHECK_FUNCS(extattr_delete_fd extattr_delete_file extattr_delete_link)
-    AC_CHECK_FUNCS(extattr_get_fd extattr_get_file extattr_get_link)
-    AC_CHECK_FUNCS(extattr_list_fd extattr_list_file extattr_list_link)
-    AC_CHECK_FUNCS(extattr_set_fd extattr_set_file extattr_set_link)
-    ;;
-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
 
@@ -1216,6 +1227,7 @@ AM_CONDITIONAL(USE_GENTOO, test x$sysv_style = xgentoo)
 AM_CONDITIONAL(USE_DEBIAN, test x$sysv_style = xdebian)
 AM_CONDITIONAL(USE_UNDEF, test x$sysv_style = x)
 AM_CONDITIONAL(USE_BDB, test x$bdb_required = xyes)
+AM_CONDITIONAL(USE_APPLETALK, test x$netatalk_cv_ddp_enabled = xyes)
 
 dnl --------------------- generate files
 
@@ -1270,6 +1282,7 @@ AC_OUTPUT([Makefile
        libatalk/adouble/Makefile
        libatalk/asp/Makefile
        libatalk/atp/Makefile
+       libatalk/bstring/Makefile
        libatalk/cnid/Makefile
        libatalk/cnid/cdb/Makefile
        libatalk/cnid/last/Makefile
@@ -1301,6 +1314,8 @@ AC_OUTPUT([Makefile
        sys/solaris/Makefile
        sys/sunos/Makefile
        sys/ultrix/Makefile
+    test/Makefile
+    test/afpd/Makefile
        ],
        [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
 )