From 0d90f4b47b463b2e68dd63ab30a2f022ddece14b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 29 Jan 2004 16:08:19 +0000 Subject: remove unused configure checks and options --with-acl-support --with-sendfile-support --with-manpages-langs --with-utmp --with-quotas --with-nisplus-home --with-profiling-data --with-syslog --with-pam_smbpass --with-pam --with-smbmount --with-automount --with-dce-dfs --with-afs --with-smbwrapper poll and poll.h I'm sure we need some of this but e.g. acl, sendfile and quotas belong only to the posix ntvfs module, so the tests will to into a seperate config.m4 file, when we need them... metze (This used to be commit 9bf405dd40c2133700a55fc6e163e975b4e62a66) --- source4/Makefile.in | 1 - source4/configure.in | 745 +-------------------------------------------------- 2 files changed, 2 insertions(+), 744 deletions(-) diff --git a/source4/Makefile.in b/source4/Makefile.in index 41349df249..4c3f216867 100644 --- a/source4/Makefile.in +++ b/source4/Makefile.in @@ -19,7 +19,6 @@ CFLAGS=@CFLAGS@ CPPFLAGS=@CPPFLAGS@ LDFLAGS=@LDFLAGS@ LDSHFLAGS=@LDSHFLAGS@ @LDFLAGS@ @CFLAGS@ -AWK=@AWK@ PERL=@PERL@ DYNEXP=@DYNEXP@ diff --git a/source4/configure.in b/source4/configure.in index 6145871911..567916e836 100644 --- a/source4/configure.in +++ b/source4/configure.in @@ -480,7 +480,7 @@ case "$host_os" in esac AC_CHECK_HEADERS(shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h) AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h) -AC_CHECK_HEADERS(stropts.h poll.h) +AC_CHECK_HEADERS(stropts.h) AC_CHECK_HEADERS(sys/capability.h syscall.h sys/syscall.h) AC_CHECK_HEADERS(sys/acl.h) @@ -731,7 +731,7 @@ AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnle AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid) AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid) AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) -AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf realpath) +AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf realpath) AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64) AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64) AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf) @@ -1248,124 +1248,6 @@ if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then AC_DEFINE(HAVE_UTIMBUF,1,[Whether struct utimbuf is available]) fi -dnl utmp and utmpx come in many flavours -dnl We need to check for many of them -dnl But we don't need to do each and every one, because our code uses -dnl mostly just the utmp (not utmpx) fields. - -AC_CHECK_FUNCS(pututline pututxline updwtmp updwtmpx getutmpx) - -AC_CACHE_CHECK([for ut_name in utmp],samba_cv_HAVE_UT_UT_NAME,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmp ut; ut.ut_name[0] = 'a';], -samba_cv_HAVE_UT_UT_NAME=yes,samba_cv_HAVE_UT_UT_NAME=no,samba_cv_HAVE_UT_UT_NAME=cross)]) -if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then - AC_DEFINE(HAVE_UT_UT_NAME,1,[Whether the utmp struct has a property ut_name]) -fi - -AC_CACHE_CHECK([for ut_user in utmp],samba_cv_HAVE_UT_UT_USER,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmp ut; ut.ut_user[0] = 'a';], -samba_cv_HAVE_UT_UT_USER=yes,samba_cv_HAVE_UT_UT_USER=no,samba_cv_HAVE_UT_UT_USER=cross)]) -if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then - AC_DEFINE(HAVE_UT_UT_USER,1,[Whether the utmp struct has a property ut_user]) -fi - -AC_CACHE_CHECK([for ut_id in utmp],samba_cv_HAVE_UT_UT_ID,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmp ut; ut.ut_id[0] = 'a';], -samba_cv_HAVE_UT_UT_ID=yes,samba_cv_HAVE_UT_UT_ID=no,samba_cv_HAVE_UT_UT_ID=cross)]) -if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then - AC_DEFINE(HAVE_UT_UT_ID,1,[Whether the utmp struct has a property ut_id]) -fi - -AC_CACHE_CHECK([for ut_host in utmp],samba_cv_HAVE_UT_UT_HOST,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmp ut; ut.ut_host[0] = 'a';], -samba_cv_HAVE_UT_UT_HOST=yes,samba_cv_HAVE_UT_UT_HOST=no,samba_cv_HAVE_UT_UT_HOST=cross)]) -if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then - AC_DEFINE(HAVE_UT_UT_HOST,1,[Whether the utmp struct has a property ut_host]) -fi - -AC_CACHE_CHECK([for ut_time in utmp],samba_cv_HAVE_UT_UT_TIME,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmp ut; time_t t; ut.ut_time = t;], -samba_cv_HAVE_UT_UT_TIME=yes,samba_cv_HAVE_UT_UT_TIME=no,samba_cv_HAVE_UT_UT_TIME=cross)]) -if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then - AC_DEFINE(HAVE_UT_UT_TIME,1,[Whether the utmp struct has a property ut_time]) -fi - -AC_CACHE_CHECK([for ut_tv in utmp],samba_cv_HAVE_UT_UT_TV,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmp ut; struct timeval tv; ut.ut_tv = tv;], -samba_cv_HAVE_UT_UT_TV=yes,samba_cv_HAVE_UT_UT_TV=no,samba_cv_HAVE_UT_UT_TV=cross)]) -if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then - AC_DEFINE(HAVE_UT_UT_TV,1,[Whether the utmp struct has a property ut_tv]) -fi - -AC_CACHE_CHECK([for ut_type in utmp],samba_cv_HAVE_UT_UT_TYPE,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmp ut; ut.ut_type = 0;], -samba_cv_HAVE_UT_UT_TYPE=yes,samba_cv_HAVE_UT_UT_TYPE=no,samba_cv_HAVE_UT_UT_TYPE=cross)]) -if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then - AC_DEFINE(HAVE_UT_UT_TYPE,1,[Whether the utmp struct has a property ut_type]) -fi - -AC_CACHE_CHECK([for ut_pid in utmp],samba_cv_HAVE_UT_UT_PID,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmp ut; ut.ut_pid = 0;], -samba_cv_HAVE_UT_UT_PID=yes,samba_cv_HAVE_UT_UT_PID=no,samba_cv_HAVE_UT_UT_PID=cross)]) -if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then - AC_DEFINE(HAVE_UT_UT_PID,1,[Whether the utmp struct has a property ut_pid]) -fi - -AC_CACHE_CHECK([for ut_exit in utmp],samba_cv_HAVE_UT_UT_EXIT,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmp ut; ut.ut_exit.e_exit = 0;], -samba_cv_HAVE_UT_UT_EXIT=yes,samba_cv_HAVE_UT_UT_EXIT=no,samba_cv_HAVE_UT_UT_EXIT=cross)]) -if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then - AC_DEFINE(HAVE_UT_UT_EXIT,1,[Whether the utmp struct has a property ut_exit]) -fi - -AC_CACHE_CHECK([for ut_addr in utmp],samba_cv_HAVE_UT_UT_ADDR,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmp ut; ut.ut_addr = 0;], -samba_cv_HAVE_UT_UT_ADDR=yes,samba_cv_HAVE_UT_UT_ADDR=no,samba_cv_HAVE_UT_UT_ADDR=cross)]) -if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then - AC_DEFINE(HAVE_UT_UT_ADDR,1,[Whether the utmp struct has a property ut_addr]) -fi - -if test x$ac_cv_func_pututline = xyes ; then - AC_CACHE_CHECK([whether pututline returns pointer],samba_cv_PUTUTLINE_RETURNS_UTMP,[ - AC_TRY_COMPILE([#include -#include ], - [struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);], - samba_cv_PUTUTLINE_RETURNS_UTMP=yes,samba_cv_PUTUTLINE_RETURNS_UTMP=no)]) - if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then - AC_DEFINE(PUTUTLINE_RETURNS_UTMP,1,[Whether pututline returns pointer]) - fi -fi - -AC_CACHE_CHECK([for ut_syslen in utmpx],samba_cv_HAVE_UX_UT_SYSLEN,[ -AC_TRY_COMPILE([#include -#include ], -[struct utmpx ux; ux.ut_syslen = 0;], -samba_cv_HAVE_UX_UT_SYSLEN=yes,samba_cv_HAVE_UX_UT_SYSLEN=no,samba_cv_HAVE_UX_UT_SYSLEN=cross)]) -if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then - AC_DEFINE(HAVE_UX_UT_SYSLEN,1,[Whether the utmpx struct has a property ut_syslen]) -fi - - ICONV_LOCATION=standard LOOK_DIRS="/usr /usr/local /sw" AC_ARG_WITH(libiconv, @@ -1896,65 +1778,6 @@ if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then AC_DEFINE(BROKEN_NISPLUS_INCLUDE_FILES,1,[Whether the nisplus include files are broken]) fi - -################################################# -# check for smbwrapper support -AC_MSG_CHECKING(whether to use smbwrapper) -AC_ARG_WITH(smbwrapper, -[ --with-smbwrapper Include SMB wrapper support (default=no) ], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_SMBWRAPPER,1,[Whether to include smbwrapper support]) - WRAPPROG="bin/smbsh\$(EXEEXT)" - WRAP="bin/smbwrapper.$SHLIBEXT" - - if test x$ATTEMPT_WRAP32_BUILD = x; then - WRAP32="" - else - WRAP32=bin/smbwrapper.32.$SHLIBEXT - fi - -# Conditions under which smbwrapper should not be built. - - if test x$PICFLAG = x; then - echo No support for PIC code - disabling smbwrapper and smbsh - WRAPPROG="" - WRAP="" - WRAP32="" - elif test x$ac_cv_func_syscall = xno; then - AC_MSG_RESULT([No syscall() -- disabling smbwrapper and smbsh]) - WRAPPROG="" - WRAP="" - WRAP32="" - fi - EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WRAPPROG $WRAP $WRAP32" - SMBWRAPPER="$WRAPPROG $WRAP $WRAP32" - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -################################################# -# check for AFS clear-text auth support -AC_MSG_CHECKING(whether to use AFS clear-text auth) -AC_ARG_WITH(afs, -[ --with-afs Include AFS clear-text auth support (default=no) ], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_AFS,1,[Whether to include AFS clear-text auth support]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - ################################################# # check for pthread support AC_MSG_CHECKING(whether to use pthreads) @@ -1977,122 +1800,9 @@ AC_ARG_WITH(pthreads, AC_SUBST(SMBD_EXTRA_OBJS) AC_SUBST(SMBD_EXTRA_LIBS) - -################################################# -# check for the DFS clear-text auth system -AC_MSG_CHECKING(whether to use DFS clear-text auth) -AC_ARG_WITH(dfs, -[ --with-dce-dfs Include DCE/DFS clear-text auth support (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_DFS,1,[Whether to include DFS support]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - sinclude(libads/config.m4) sinclude(passdb/config.m4) -################################################# -# check for automount support -AC_MSG_CHECKING(whether to use automount) -AC_ARG_WITH(automount, -[ --with-automount Include automount support (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_AUTOMOUNT,1,[Whether to include automount support]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -################################################# -# check for smbmount support -AC_MSG_CHECKING(whether to use smbmount) -AC_ARG_WITH(smbmount, -[ --with-smbmount Include smbmount (Linux only) support (default=no)], -[ case "$withval" in - yes) - case "$host_os" in - *linux*) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_SMBMOUNT,1,[Whether to build smbmount]) - EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbmount bin/smbmnt bin/smbumount" - ;; - *) - AC_MSG_ERROR(not on a linux system!) - ;; - esac - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - - -################################################# -# check for a PAM clear-text auth, accounts, password and session support -with_pam_for_crypt=no -AC_MSG_CHECKING(whether to use PAM) -AC_ARG_WITH(pam, -[ --with-pam Include PAM support (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(no) - AC_MSG_WARN(pam is disabled in samba4 until someone fixes it) -# AC_MSG_RESULT(yes) -# AC_DEFINE(WITH_PAM,1,[Whether to include PAM support]) -# AUTHLIBS="$AUTHLIBS -lpam" -# with_pam_for_crypt=yes - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -# we can't build a pam module if we don't have pam. -AC_CHECK_LIB(pam, pam_get_data, [AC_DEFINE(HAVE_LIBPAM,1,[Whether libpam is available])]) - -################################################# -# check for pam_smbpass support -AC_MSG_CHECKING(whether to use pam_smbpass) -AC_ARG_WITH(pam_smbpass, -[ --with-pam_smbpass Build a PAM module to allow other applications to use our smbpasswd file (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - -# Conditions under which pam_smbpass should not be built. - - if test x$PICFLAG = x; then - AC_MSG_RESULT([No support for PIC code - disabling pam_smbpass]) - elif test x$ac_cv_lib_pam_pam_get_data = xno; then - AC_MSG_RESULT([No libpam found -- disabling pam_smbpass]) - else - SHLIB_PROGS="$SHLIB_PROGS bin/pam_smbpass.so" - fi - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - - ############################################### # test for where we get crypt() from AC_SEARCH_LIBS(crypt, [crypt], @@ -2117,157 +1827,6 @@ if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then fi fi -################################################# -# check for a NISPLUS_HOME support -AC_MSG_CHECKING(whether to use NISPLUS_HOME) -AC_ARG_WITH(nisplus-home, -[ --with-nisplus-home Include NISPLUS_HOME support (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_NISPLUS_HOME,1,[Whether to include nisplus_home support]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -################################################# -# check for syslog logging -AC_MSG_CHECKING(whether to use syslog logging) -AC_ARG_WITH(syslog, -[ --with-syslog Include experimental SYSLOG support (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_SYSLOG,1,[Whether to include experimental syslog support]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -################################################# -# check for a shared memory profiling support -AC_MSG_CHECKING(whether to use profiling) -AC_ARG_WITH(profiling-data, -[ --with-profiling-data Include gathering source code profile information (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_PROFILE,1,[Whether to use profiling]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -################################################# -# check for a NISPLUS_HOME support -AC_MSG_CHECKING(whether to use NISPLUS_HOME) -AC_ARG_WITH(nisplus-home, -[ --with-nisplus-home Include NISPLUS_HOME support (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_NISPLUS_HOME,1,[Whether to include nisplus_home support]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -################################################# -# check for experimental disk-quotas support -QUOTAOBJS=smbd/noquotas.o - -AC_MSG_CHECKING(whether to support disk-quotas) -AC_ARG_WITH(quotas, -[ --with-quotas Include experimental disk-quota support (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - case "$host_os" in - *linux*) - # Check for kernel 2.4.x quota braindamage... - AC_CACHE_CHECK([for linux 2.4.x quota braindamage..],samba_cv_linux_2_4_quota_braindamage, [ - AC_TRY_COMPILE([#include -#include -#include -#include -#include -#include ],[struct mem_dqblk D;], - samba_cv_linux_2_4_quota_braindamage=yes,samba_cv_linux_2_4_quota_braindamage=no)]) -if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then - AC_DEFINE(LINUX_QUOTAS_2,1,[linux 2.4.x quota braindamage]) -else - AC_DEFINE(LINUX_QUOTAS_1,1,[linux quotas]) -fi - ;; - *) - ;; - esac - QUOTAOBJS=smbd/quotas.o - AC_DEFINE(WITH_QUOTAS,1,[Whether to include experimental quota support]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) -AC_SUBST(QUOTAOBJS) - -################################################# -# check for experimental utmp accounting - -AC_MSG_CHECKING(whether to support utmp accounting) -AC_ARG_WITH(utmp, -[ --with-utmp Include experimental utmp accounting (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_UTMP,1,[Whether to include experimental utmp accounting]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -################################################# -# choose native language(s) of man pages -AC_MSG_CHECKING(chosen man pages' language(s)) -AC_ARG_WITH(manpages-langs, -[ --with-manpages-langs={en,ja,pl} Choose man pages' language(s). (en)], -[ case "$withval" in - yes|no) - AC_MSG_WARN(--with-manpages-langs called without argument - will use default) - manlangs="en" - ;; - *) - manlangs="$withval" - ;; - esac - - AC_MSG_RESULT($manlangs) - manlangs=`echo $manlangs | sed "s/,/ /g"` # replacing commas with spaces to produce a list - AC_SUBST(manlangs)], - - [manlangs="en" - AC_MSG_RESULT($manlangs) - AC_SUBST(manlangs)] -) - ################################################# # these tests are taken from the GNU fileutils package AC_CHECKING(how to get filesystem space usage) @@ -2475,306 +2034,6 @@ if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then fi AC_MSG_RESULT([$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT]) -################################################# -# check for ACL support - -AC_MSG_CHECKING(whether to support ACLs) -AC_ARG_WITH(acl-support, -[ --with-acl-support Include ACL support (default=no)], -[ case "$withval" in - yes) - - case "$host_os" in - *sysv5*) - AC_MSG_RESULT(Using UnixWare ACLs) - AC_DEFINE(HAVE_UNIXWARE_ACLS,1,[Whether UnixWare ACLs are available]) - ;; - *solaris*) - AC_MSG_RESULT(Using solaris ACLs) - AC_DEFINE(HAVE_SOLARIS_ACLS,1,[Whether solaris ACLs are available]) - ;; - *hpux*) - AC_MSG_RESULT(Using HPUX ACLs) - AC_DEFINE(HAVE_HPUX_ACLS,1,[Whether HPUX ACLs are available]) - ;; - *irix*) - AC_MSG_RESULT(Using IRIX ACLs) - AC_DEFINE(HAVE_IRIX_ACLS,1,[Whether IRIX ACLs are available]) - ;; - *aix*) - AC_MSG_RESULT(Using AIX ACLs) - AC_DEFINE(HAVE_AIX_ACLS,1,[Whether AIX ACLs are available]) - ;; - *osf*) - AC_MSG_RESULT(Using Tru64 ACLs) - AC_DEFINE(HAVE_TRU64_ACLS,1,[Whether Tru64 ACLs are available]) - ACLLIBS="$ACLLIBS -lpacl" - ;; - *) - AC_CHECK_LIB(acl,acl_get_file,[ACLLIBS="$ACLLIBS -lacl"]) - AC_CACHE_CHECK([for ACL support],samba_cv_HAVE_POSIX_ACLS,[ - acl_LIBS=$LIBS - LIBS="$LIBS -lacl" - AC_TRY_LINK([#include -#include ], -[ acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);], -samba_cv_HAVE_POSIX_ACLS=yes,samba_cv_HAVE_POSIX_ACLS=no) - LIBS=$acl_LIBS]) - if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then - AC_MSG_RESULT(Using posix ACLs) - AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether POSIX ACLs are available]) - AC_CACHE_CHECK([for acl_get_perm_np],samba_cv_HAVE_ACL_GET_PERM_NP,[ - acl_LIBS=$LIBS - LIBS="$LIBS -lacl" - AC_TRY_LINK([#include -#include ], -[ acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);], -samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_cv_HAVE_ACL_GET_PERM_NP=no) - LIBS=$acl_LIBS]) - if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then - AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available]) - fi - fi - ;; - esac - ;; - *) - AC_MSG_RESULT(no) - AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support is available]) - ;; - esac ], - AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support should be built in]) - AC_MSG_RESULT(no) -) - -################################################# -# check for sendfile support - -with_sendfile_support=yes -AC_MSG_CHECKING(whether to check to support sendfile) -AC_ARG_WITH(sendfile-support, -[ --with-sendfile-support Check for sendfile support (default=yes)], -[ case "$withval" in - yes) - - AC_MSG_RESULT(yes); - - case "$host_os" in - *linux*) - AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[ - AC_TRY_LINK([#include ], -[\ -int tofd, fromfd; -off64_t offset; -size_t total; -ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total); -], -samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) - - AC_CACHE_CHECK([for linux sendfile support],samba_cv_HAVE_SENDFILE,[ - AC_TRY_LINK([#include ], -[\ -int tofd, fromfd; -off_t offset; -size_t total; -ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); -], -samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) - -# Try and cope with broken Linux sendfile.... - AC_CACHE_CHECK([for broken linux sendfile support],samba_cv_HAVE_BROKEN_LINUX_SENDFILE,[ - AC_TRY_LINK([\ -#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) -#undef _FILE_OFFSET_BITS -#endif -#include ], -[\ -int tofd, fromfd; -off_t offset; -size_t total; -ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); -], -samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)]) - - if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then - AC_DEFINE(HAVE_SENDFILE64,1,[Whether 64-bit sendfile() is available]) - AC_DEFINE(LINUX_SENDFILE_API,1,[Whether linux sendfile() API is available]) - AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() should be used]) - elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then - AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available]) - AC_DEFINE(LINUX_SENDFILE_API,1,[Whether linux sendfile() API is available]) - AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() should be used]) - elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then - AC_DEFINE(LINUX_BROKEN_SENDFILE_API,1,[Whether (linux) sendfile() is broken]) - AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile should be used]) - else - AC_MSG_RESULT(no); - fi - - ;; - *freebsd*) - AC_CACHE_CHECK([for freebsd sendfile support],samba_cv_HAVE_SENDFILE,[ - AC_TRY_LINK([\ -#include -#include -#include -#include ], -[\ - int fromfd, tofd, ret, total=0; - off_t offset, nwritten; - struct sf_hdtr hdr; - struct iovec hdtrl; - hdr.headers = &hdtrl; - hdr.hdr_cnt = 1; - hdr.trailers = NULL; - hdr.trl_cnt = 0; - hdtrl.iov_base = NULL; - hdtrl.iov_len = 0; - ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0); -], -samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) - - if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then - AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() support is available]) - AC_DEFINE(FREEBSD_SENDFILE_API,1,[Whether the FreeBSD sendfile() API is available]) - AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() support should be included]) - else - AC_MSG_RESULT(no); - fi - ;; - - *hpux*) - AC_CACHE_CHECK([for hpux sendfile64 support],samba_cv_HAVE_SENDFILE64,[ - AC_TRY_LINK([\ -#include -#include ], -[\ - int fromfd, tofd; - size_t total=0; - struct iovec hdtrl[2]; - ssize_t nwritten; - off64_t offset; - - hdtrl[0].iov_base = 0; - hdtrl[0].iov_len = 0; - - nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0); -], -samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) - if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then - AC_DEFINE(HAVE_SENDFILE64,1,[Whether sendfile64() is available]) - AC_DEFINE(HPUX_SENDFILE_API,1,[Whether the hpux sendfile() API is available]) - AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() support should be included]) - else - AC_MSG_RESULT(no); - fi - - AC_CACHE_CHECK([for hpux sendfile support],samba_cv_HAVE_SENDFILE,[ - AC_TRY_LINK([\ -#include -#include ], -[\ - int fromfd, tofd; - size_t total=0; - struct iovec hdtrl[2]; - ssize_t nwritten; - off_t offset; - - hdtrl[0].iov_base = 0; - hdtrl[0].iov_len = 0; - - nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0); -], -samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) - if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then - AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available]) - AC_DEFINE(HPUX_SENDFILE_API,1,[Whether the hpux sendfile() API is available]) - AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() support should be included]) - else - AC_MSG_RESULT(no); - fi - ;; - - *solaris*) - AC_CHECK_LIB(sendfile,sendfilev) - AC_CACHE_CHECK([for solaris sendfilev64 support],samba_cv_HAVE_SENDFILEV64,[ - AC_TRY_LINK([\ -#include ], -[\ - int sfvcnt; - size_t xferred; - struct sendfilevec vec[2]; - ssize_t nwritten; - int tofd; - - sfvcnt = 2; - - vec[0].sfv_fd = SFV_FD_SELF; - vec[0].sfv_flag = 0; - vec[0].sfv_off = 0; - vec[0].sfv_len = 0; - - vec[1].sfv_fd = 0; - vec[1].sfv_flag = 0; - vec[1].sfv_off = 0; - vec[1].sfv_len = 0; - nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred); -], -samba_cv_HAVE_SENDFILEV64=yes,samba_cv_HAVE_SENDFILEV64=no)]) - - if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then - AC_DEFINE(HAVE_SENDFILEV64,1,[Whether sendfilev64() is available]) - AC_DEFINE(SOLARIS_SENDFILE_API,1,[Whether the soloris sendfile() API is available]) - AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() support should be included]) - else - AC_MSG_RESULT(no); - fi - - AC_CACHE_CHECK([for solaris sendfilev support],samba_cv_HAVE_SENDFILEV,[ - AC_TRY_LINK([\ -#include ], -[\ - int sfvcnt; - size_t xferred; - struct sendfilevec vec[2]; - ssize_t nwritten; - int tofd; - - sfvcnt = 2; - - vec[0].sfv_fd = SFV_FD_SELF; - vec[0].sfv_flag = 0; - vec[0].sfv_off = 0; - vec[0].sfv_len = 0; - - vec[1].sfv_fd = 0; - vec[1].sfv_flag = 0; - vec[1].sfv_off = 0; - vec[1].sfv_len = 0; - nwritten = sendfilev(tofd, vec, sfvcnt, &xferred); -], -samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)]) - - if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then - AC_DEFINE(HAVE_SENDFILEV,1,[Whether sendfilev() is available]) - AC_DEFINE(SOLARIS_SENDFILE_API,1,[Whether the solaris sendfile() API is available]) - AC_DEFINE(WITH_SENDFILE,1,[Whether to include sendfile() support]) - else - AC_MSG_RESULT(no); - fi - ;; - - *) - ;; - esac - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(yes) -) - sinclude(nsswitch/config.m4) sinclude(popt/config.m4) -- cgit