X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure.in;h=825e763663652341c893962d9d1b1852626e1dd5;hb=1b9ea96ec7af7715b4cecf7b89e41c5ac4fe7e51;hp=4425151ae2617a9bae74f1d1b8b659ba44b062cb;hpb=9753ac7c67d4871ea344993538b08c3850ad12e7;p=netatalk.git diff --git a/configure.in b/configure.in index 4425151a..825e7636 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.217 2009-04-28 13:01:24 franklahm Exp $ +dnl $Id: configure.in,v 1.233 2009-11-27 21:15:48 franklahm Exp $ dnl configure.in for netatalk AC_INIT(etc/afpd/main.c) @@ -13,6 +13,7 @@ AM_CONFIG_HEADER(config.h) dnl Checks for programs. AC_PROG_AWK AC_PROG_CC +AC_PROG_CC_C99 AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET @@ -206,22 +207,6 @@ NETATALK_AFS_CHECK NETATALK_CONFIG_DIRS -AC_MSG_CHECKING([whether to force logfile]) -AC_ARG_WITH(logfile, - [ --with-logfile=PATH force logging to file PATH],[ - if test x"$withval" = x"no"; then - AC_MSG_RESULT([no, syslog]) - elif test "$withval" != "yes"; then - AC_DEFINE_UNQUOTED(LOGFILEPATH, "$withval", [Path to the log file]) - AC_MSG_RESULT([$withval]) - else - AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/netatalk.log", [Path to the log file]) - AC_MSG_RESULT([/var/log/netatalk.log]) - fi],[ - AC_MSG_RESULT([no, syslog]) - ] -) - netatalk_cv_with_cracklib=no AC_ARG_WITH(cracklib, [ --with-cracklib=DICT enable/set location of cracklib dictionary],[ @@ -640,6 +625,12 @@ case "$host_cpu" in powerpc|ppc) this_cpu=ppc ;; esac +dnl --------------------- GNU source +case "$this_os" in + linux) AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions]) + ;; +esac + dnl --------------------- operating system specific flags (port from sys/*) dnl ----- AIX specific ----- @@ -722,16 +713,22 @@ fi dnl ----- see etc/afpd/quota.c AC_DEFINE(HAVE_BROKEN_DBTOB, 1, [Define if dbtob is broken]) - netatalk_cv_linux_sendfile=no -dnl disable this for now, code doesn't use sendfile anyway -dnl AC_ARG_ENABLE(sendfile, -dnl [ --enable-sendfile use sendfile syscall default (no) ],[ -dnl if test "$enableval" = "yes"; then -dnl netatalk_cv_linux_sendfile=yes -dnl fi -dnl AC_MSG_RESULT([enabling sendfile syscall]) -dnl ] -dnl ) + netatalk_cv_linux_sendfile=yes + AC_MSG_CHECKING([use sendfile syscall]) + AC_ARG_ENABLE(sendfile, + [ --disable-sendfile disable linux sendfile syscall],[ + if test x"$enableval" = x"no"; then + netatalk_cv_linux_sendfile=no + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([yes]) + + fi + ],[ + AC_MSG_RESULT([yes]) + ] + + ) if test x"$netatalk_cv_linux_sendfile" = "xyes"; then AC_CACHE_CHECK([for linux sendfile support],netatalk_cv_HAVE_SENDFILE,[ @@ -1058,27 +1055,106 @@ fi AC_SUBST(LIBATALK_ACLS) dnl --------------------- check for Extended Attributes support -neta_cv_extattrs="no" -AC_MSG_CHECKING([if Extended Attribute Support should be enabled]) -AC_ARG_ENABLE(extattrs, - [ --enable-extattrs enable Extended Attributes],[ - if test x"$enableval" = x"yes"; then - AC_MSG_RESULT([yes]) - neta_cv_extattrs="yes" - else - AC_MSG_RESULT([no]) - fi],[ - AC_MSG_RESULT([no]) - ] -) -if test x$neta_cv_extattrs = xyes; then - AC_CHECK_LIB(c,attropen,neta_cv_extattrs=yes,neta_cv_extattrs=no) +neta_cv_eas="files" +neta_cv_eas_sys_found=no +neta_cv_eas_sys_not_found=no + +AC_CHECK_HEADERS(sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h sys/ea.h) + +case "$this_os" in + + *osf*) + AC_SEARCH_LIBS(getproplist, [proplist]) + AC_CHECK_FUNCS([getproplist fgetproplist setproplist fsetproplist], + [neta_cv_eas_sys_found=yes], + [neta_cv_eas_sys_not_found=yes]) + AC_CHECK_FUNCS([delproplist fdelproplist add_proplist_entry get_proplist_entry],, + [neta_cv_eas_sys_not_found=yes]) + AC_CHECK_FUNCS([sizeof_proplist_entry],, + [neta_cv_eas_sys_not_found=yes]) + ;; + + *solaris*) + AC_CHECK_FUNCS([attropen], + [neta_cv_eas_sys_found=yes], + [neta_cv_eas_sys_not_found=yes]) + ;; + + *) + AC_SEARCH_LIBS(getxattr, [attr]) + + if test "x$neta_cv_eas_sys_found" != "xyes" ; then + AC_CHECK_FUNCS([getxattr lgetxattr fgetxattr listxattr llistxattr], + [neta_cv_eas_sys_found=yes], + [neta_cv_eas_sys_not_found=yes]) + AC_CHECK_FUNCS([flistxattr removexattr lremovexattr fremovexattr],, + [neta_cv_eas_sys_not_found=yes]) + AC_CHECK_FUNCS([setxattr lsetxattr fsetxattr],, + [neta_cv_eas_sys_not_found=yes]) + fi + + if test "x$neta_cv_eas_sys_found" != "xyes" ; then + AC_CHECK_FUNCS([getea fgetea lgetea listea flistea llistea], + [neta_cv_eas_sys_found=yes], + [neta_cv_eas_sys_not_found=yes]) + AC_CHECK_FUNCS([removeea fremoveea lremoveea setea fsetea lsetea],, + [neta_cv_eas_sys_not_found=yes]) + fi + + if test "x$neta_cv_eas_sys_found" != "xyes" ; then + AC_CHECK_FUNCS([attr_get attr_list attr_set attr_remove],, + [neta_cv_eas_sys_not_found=yes]) + AC_CHECK_FUNCS([attr_getf attr_listf attr_setf attr_removef],, + [neta_cv_eas_sys_not_found=yes]) + fi + ;; +esac + +# Do xattr functions take additional options like on Darwin? +if test x"$ac_cv_func_getxattr" = x"yes" ; then + AC_CACHE_CHECK([whether xattr interface takes additional options], smb_attr_cv_xattr_add_opt, [ + old_LIBS=$LIBS + LIBS="$LIBS $ACL_LIBS" + AC_TRY_COMPILE([ + #include + #if HAVE_ATTR_XATTR_H + #include + #elif HAVE_SYS_XATTR_H + #include + #endif + ],[ + getxattr(0, 0, 0, 0, 0, 0); + ], + [smb_attr_cv_xattr_add_opt=yes], + [smb_attr_cv_xattr_add_opt=no;LIBS=$old_LIBS]) + ]) + if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then + AC_DEFINE(XATTR_ADD_OPT, 1, [xattr functions have additional options]) + fi fi -if test x$neta_cv_extattrs = xyes; then - AC_MSG_NOTICE([Enabling Extended Attributes support]) - AC_DEFINE([HAVE_EXT_ATTRS], 1, [Enable Extended Attributes]) + +# 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" + fi fi +dnl --------------------- Netatalk Webmin +NETATALK_WEBMIN + dnl --------------------- last minute substitutions AC_SUBST(LIBS) @@ -1091,7 +1167,6 @@ AM_CONDITIONAL(COMPILE_A2BOOT, test x$compile_a2boot = xyes) AM_CONDITIONAL(HAVE_LIBGCRYPT, test x$neta_cv_have_libgcrypt = xyes) AM_CONDITIONAL(HAVE_OPENSSL, test x$neta_cv_have_openssl = xyes) AM_CONDITIONAL(USE_NFSv4_ACLS, test x$neta_cv_nfsv4acl = xyes) -AM_CONDITIONAL(USE_EXT_ATTRS, test x$neta_cv_extattrs = xyes) AM_CONDITIONAL(USE_DHX, test x$neta_cv_compile_dhx = xyes) AM_CONDITIONAL(USE_DHX2, test x$neta_cv_compile_dhx2 = xyes) AM_CONDITIONAL(USE_RANDNUM, test x$neta_cv_have_openssl = xyes) @@ -1122,17 +1197,17 @@ AC_OUTPUT([Makefile bin/afile/Makefile bin/afppasswd/Makefile bin/cnid/Makefile - bin/cnid/cnid_maint bin/cnid/cnid2_create bin/getzones/Makefile bin/megatron/Makefile + bin/misc/Makefile bin/nbp/Makefile bin/pap/Makefile bin/psorder/Makefile bin/uniconv/Makefile config/Makefile + config/pam/Makefile contrib/Makefile - contrib/acltests/Makefile contrib/macusers/Makefile contrib/macusers/macusers contrib/nu/Makefile @@ -1143,7 +1218,6 @@ AC_OUTPUT([Makefile contrib/shell_utils/apple_cp contrib/shell_utils/apple_mv contrib/shell_utils/apple_rm - contrib/shell_utils/apple_cleanup contrib/shell_utils/asip-status.pl contrib/timelord/Makefile contrib/a2boot/Makefile @@ -1169,12 +1243,10 @@ AC_OUTPUT([Makefile libatalk/asp/Makefile libatalk/atp/Makefile libatalk/cnid/Makefile - libatalk/cnid/db3/Makefile libatalk/cnid/cdb/Makefile libatalk/cnid/last/Makefile libatalk/cnid/mtab/Makefile libatalk/cnid/dbd/Makefile - libatalk/cnid/hash/Makefile libatalk/cnid/tdb/Makefile libatalk/compat/Makefile libatalk/dsi/Makefile @@ -1185,6 +1257,7 @@ AC_OUTPUT([Makefile libatalk/tdb/Makefile libatalk/unicode/Makefile libatalk/unicode/charsets/Makefile + libatalk/vfs/Makefile macros/Makefile man/Makefile man/man1/Makefile