X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure.in;h=1c107098d246ef6e5d13af149acacc9ad06916ca;hb=6a4fd48595d21b56d43e1c7970582b2e3343efd9;hp=2bc96634814f073a29d74b82ecaf72f9ed70f3d4;hpb=22341f6f5409c6c780b13431d078a96b2d363596;p=netatalk.git diff --git a/configure.in b/configure.in index 2bc96634..1c107098 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.226 2009-11-16 02:04:47 didg Exp $ +dnl $Id: configure.in,v 1.238 2010-02-10 14:05:36 franklahm Exp $ dnl configure.in for netatalk AC_INIT(etc/afpd/main.c) @@ -713,14 +713,21 @@ fi dnl ----- see etc/afpd/quota.c AC_DEFINE(HAVE_BROKEN_DBTOB, 1, [Define if dbtob is broken]) - netatalk_cv_linux_sendfile=no + netatalk_cv_linux_sendfile=yes + AC_MSG_CHECKING([use sendfile syscall]) AC_ARG_ENABLE(sendfile, - [ --enable-sendfile use sendfile syscall default (no) ],[ - if test "$enableval" = "yes"; then - netatalk_cv_linux_sendfile=yes + [ --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([enabling sendfile syscall]) - ] + ],[ + AC_MSG_RESULT([yes]) + ] + ) if test x"$netatalk_cv_linux_sendfile" = "xyes"; then @@ -1048,36 +1055,58 @@ fi AC_SUBST(LIBATALK_ACLS) dnl --------------------- check for Extended Attributes support -neta_cv_eas="adouble" -neta_cv_eas="$neta_cv_eas Solaris" -neta_cv_solaris_eas="yes" +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) -AC_CHECK_HEADERS(sys/ea.h) +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) - AC_CHECK_FUNCS(delproplist fdelproplist add_proplist_entry get_proplist_entry) - AC_CHECK_FUNCS(sizeof_proplist_entry) + 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]) - AC_CHECK_FUNCS(getxattr lgetxattr fgetxattr listxattr llistxattr) - AC_CHECK_FUNCS(getea fgetea lgetea listea flistea llistea) - AC_CHECK_FUNCS(removeea fremoveea lremoveea setea fsetea lsetea) - AC_CHECK_FUNCS(flistxattr removexattr lremovexattr fremovexattr) - AC_CHECK_FUNCS(setxattr lsetxattr fsetxattr) - AC_CHECK_FUNCS(attr_get attr_list attr_set attr_remove) - AC_CHECK_FUNCS(attr_getf attr_listf attr_setf attr_removef) - ;; -esac -# Check if attropen() is present if this is Solaris -case "$this_os" in - *solaris*) - AC_CHECK_FUNCS(attropen) + 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 @@ -1117,6 +1146,41 @@ case "$this_os" in ;; 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 --------------------- 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 + #include + #include + + 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 @@ -1132,7 +1196,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_SOLARIS_EAS, test x$neta_cv_solaris_eas = 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) @@ -1163,7 +1226,6 @@ 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 @@ -1173,19 +1235,17 @@ AC_OUTPUT([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 - contrib/nu/nu contrib/printing/Makefile contrib/shell_utils/Makefile contrib/shell_utils/afpd-mtab.pl contrib/shell_utils/apple_cp + contrib/shell_utils/apple_dump 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 @@ -1211,12 +1271,9 @@ 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