X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=blobdiff_plain;f=source3%2Fconfigure.in;h=82664d6c4a6757ad6ba85592a352599d1499f83a;hp=027433611bad4a1946a8ae8227273d82179872c1;hb=e8a99ac980ef3700436dc44ad5cab32da642aea6;hpb=f7250144ed06b00fc1fbf1854d38483c427fad87 diff --git a/source3/configure.in b/source3/configure.in index 027433611ba..82664d6c4a6 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -72,7 +72,6 @@ AC_SUBST(LIBWBCLIENT_SHARED_TARGET) AC_SUBST(LIBWBCLIENT_SHARED) AC_SUBST(LIBWBCLIENT_STATIC_TARGET) AC_SUBST(LIBWBCLIENT_STATIC) -AC_SUBST(LIBWBCLIENT_TARGET) AC_SUBST(LIBWBCLIENT_SOVER) AC_SUBST(LIBWBCLIENT) AC_SUBST(LIBWBCLIENT_LIBS) @@ -121,6 +120,7 @@ fi m4_include(../lib/socket_wrapper/config.m4) m4_include(../lib/nss_wrapper/config.m4) +m4_include(../lib/util/time.m4) m4_include(m4/swat.m4) @@ -137,7 +137,7 @@ if test x"$ac_cv_prog_gcc" = x"yes" ; then int main(void) { return 0; - }],[-Wdeclaration-after-statement],[$CPPFLAGS],[$LDFLAGS], + }],[$CFLAGS -Wdeclaration-after-statement],[$CPPFLAGS],[$LDFLAGS], samba_cv_HAVE_Wdeclaration_after_statement=yes, samba_cv_HAVE_Wdeclaration_after_statement=no, samba_cv_HAVE_Wdeclaration_after_statement=cross) @@ -155,7 +155,7 @@ if test x"$ac_cv_prog_gcc" = x"yes" ; then int main(void) { return 0; - }],[-Werror-implicit-function-declaration],[$CPPFLAGS],[$LDFLAGS], + }],[$CFLAGS -Werror-implicit-function-declaration],[$CPPFLAGS],[$LDFLAGS], samba_cv_HAVE_Werror_implicit_function_declaration=yes, samba_cv_HAVE_Werror_implicit_function_declaration=no, samba_cv_HAVE_Werror_implicit_function_declaration=cross) @@ -269,7 +269,7 @@ AC_CACHE_CHECK([that the C compiler understands -Werror],samba_cv_HAVE_Werror, [ int main(void) { return 0; - }],[-Werror],[$CPPFLAGS],[$LDFLAGS], + }],[$CFLAGS -Werror],[$CPPFLAGS],[$LDFLAGS], samba_cv_HAVE_Werror=yes,samba_cv_HAVE_Werror=no,samba_cv_HAVE_Werror=cross)]) if test x"$samba_cv_HAVE_Werror" = x"yes"; then Werror_FLAGS="-Werror" @@ -280,7 +280,7 @@ AC_CACHE_CHECK([that the C compiler understands -w2],samba_cv_HAVE_w2, [ int main(void) { return 0; - }],[-w2],[$CPPFLAGS],[$LDFLAGS], + }],[$CFLAGS -w2],[$CPPFLAGS],[$LDFLAGS], samba_cv_HAVE_w2=yes,samba_cv_HAVE_w2=no,samba_cv_HAVE_w2=cross)]) if test x"$samba_cv_HAVE_w2" = x"yes"; then Werror_FLAGS="-w2" @@ -291,7 +291,7 @@ AC_CACHE_CHECK([that the C compiler understands -errwarn],samba_cv_HAVE_errwarn, int main(void) { return 0; - }],[-errwarn=%all],[$CPPFLAGS],[$LDFLAGS], + }],[$CFLAGS -errwarn=%all],[$CPPFLAGS],[$LDFLAGS], samba_cv_HAVE_errwarn=yes,samba_cv_HAVE_errwarn=no,samba_cv_HAVE_errwarn=cross)]) if test x"$samba_cv_HAVE_errwarn" = x"yes"; then Werror_FLAGS="-errwarn=%all" @@ -378,13 +378,68 @@ esac DYNEXP= AC_SUBST(DYNEXP) +LDSHFLAGS_Z_DEFS= +AC_SUBST(LDSHFLAGS_Z_DEFS) +LDSHFLAGS_Z_NODEFS= +AC_SUBST(LDSHFLAGS_Z_NODEFS) dnl Add modules that have to be built by default here dnl These have to be built static: -default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template" +default_static_modules="" +default_static_modules="$default_static_modules pdb_smbpasswd" +default_static_modules="$default_static_modules pdb_tdbsam" +default_static_modules="$default_static_modules pdb_wbc_sam" +default_static_modules="$default_static_modules rpc_lsarpc" +default_static_modules="$default_static_modules rpc_samr" +default_static_modules="$default_static_modules rpc_winreg" +default_static_modules="$default_static_modules rpc_initshutdown" +default_static_modules="$default_static_modules rpc_dssetup" +default_static_modules="$default_static_modules rpc_wkssvc" +default_static_modules="$default_static_modules rpc_svcctl" +default_static_modules="$default_static_modules rpc_ntsvcs" +default_static_modules="$default_static_modules rpc_netlogon" +default_static_modules="$default_static_modules rpc_netdfs" +default_static_modules="$default_static_modules rpc_srvsvc" +default_static_modules="$default_static_modules rpc_spoolss" +default_static_modules="$default_static_modules rpc_eventlog" +default_static_modules="$default_static_modules auth_sam" +default_static_modules="$default_static_modules auth_unix" +default_static_modules="$default_static_modules auth_winbind" +default_static_modules="$default_static_modules auth_wbc" +default_static_modules="$default_static_modules auth_server" +default_static_modules="$default_static_modules auth_domain" +default_static_modules="$default_static_modules auth_builtin" +default_static_modules="$default_static_modules auth_netlogond" +default_static_modules="$default_static_modules vfs_default" +default_static_modules="$default_static_modules nss_info_template" dnl These are preferably build shared, and static if dlopen() is not available -default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen" +default_shared_modules="" +default_shared_modules="$default_shared_modules vfs_recycle" +default_shared_modules="$default_shared_modules vfs_audit" +default_shared_modules="$default_shared_modules vfs_extd_audit" +default_shared_modules="$default_shared_modules vfs_full_audit" +default_shared_modules="$default_shared_modules vfs_netatalk" +default_shared_modules="$default_shared_modules vfs_fake_perms" +default_shared_modules="$default_shared_modules vfs_default_quota" +default_shared_modules="$default_shared_modules vfs_readonly" +default_shared_modules="$default_shared_modules vfs_cap" +default_shared_modules="$default_shared_modules vfs_expand_msdfs" +default_shared_modules="$default_shared_modules vfs_shadow_copy" +default_shared_modules="$default_shared_modules vfs_shadow_copy2" +default_shared_modules="$default_shared_modules charset_CP850" +default_shared_modules="$default_shared_modules charset_CP437" +default_shared_modules="$default_shared_modules auth_script" +default_shared_modules="$default_shared_modules vfs_readahead" +default_shared_modules="$default_shared_modules vfs_xattr_tdb" +default_shared_modules="$default_shared_modules vfs_streams_xattr" +default_shared_modules="$default_shared_modules vfs_streams_depot" +default_shared_modules="$default_shared_modules vfs_acl_xattr" +default_shared_modules="$default_shared_modules vfs_acl_tdb" +default_shared_modules="$default_shared_modules vfs_smb_traffic_analyzer" +default_shared_modules="$default_shared_modules vfs_preopen" +default_shared_modules="$default_shared_modules vfs_catia" +default_shared_modules="$default_shared_modules vfs_scannedonly" if test "x$developer" = xyes; then default_static_modules="$default_static_modules rpc_rpcecho pdb_ads" @@ -622,6 +677,10 @@ exit(1); fi AC_MSG_RESULT([$GLIBC_LFS_SUPPORT]) ;; + *qnx*) + CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" + AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) + ;; esac @@ -636,12 +695,13 @@ CPPFLAGS="${SAVE_CPPFLAGS}" LIBREPLACE_DIR=`echo ${libreplacedir} | sed -e "s;${srcdir};;" -e "s;^/;;"` -LIBREPLACE_OBJS="" -for obj in ${LIBREPLACEOBJ}; do - LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}" -done +LIBREPLACE_OBJS="${LIBREPLACEOBJ}" AC_SUBST(LIBREPLACE_OBJS) +LIBREPLACE_LIBS="${LIBREPLACE_NETWORK_LIBS}" +AC_SUBST(LIBREPLACE_LIBS) + + # add -ldl to the global LIBS LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}" AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}" @@ -651,7 +711,7 @@ AC_CHECK_HEADERS(aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h AC_CHECK_HEADERS(unistd.h grp.h sys/id.h memory.h alloca.h) AC_CHECK_HEADERS(limits.h float.h pthread.h libintl.h) AC_CHECK_HEADERS(rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h) -AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h) +AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h sys/sysctl.h) AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h) AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h) AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h) @@ -742,7 +802,7 @@ if test x$enable_cups != xno; then ac_save_PRINT_LIBS=$PRINT_LIBS CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`" LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`" - PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`" + PRINT_LIBS="$PRINT_LIBS -lcups" AC_CHECK_HEADERS(cups/cups.h cups/language.h) if test x"$ac_cv_header_cups_cups_h" = xyes -a \ x"$ac_cv_header_cups_language_h" = xyes; then @@ -999,7 +1059,7 @@ AC_CHECK_FUNCS(setsid glob strpbrk crypt16 getauthuid) AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf) AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf stat64 fstat64) -AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64) +AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64) AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam) AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64) AC_CHECK_FUNCS(getpwent_r) @@ -1008,12 +1068,15 @@ AC_CHECK_FUNCS(setenv strcasecmp fcvt fcvtl) AC_CHECK_FUNCS(syslog vsyslog timegm) AC_CHECK_FUNCS(setlocale nl_langinfo) AC_CHECK_FUNCS(nanosleep,,[AC_CHECK_LIB_EXT(rt, LIBS, nanosleep)]) +AC_CHECK_FUNCS(lutimes futimes utimensat futimens) AC_CHECK_FUNCS(mlock munlock mlockall munlockall) AC_CHECK_FUNCS(memalign posix_memalign hstrerror) AC_CHECK_HEADERS(sys/mman.h) # setbuffer, shmget, shm_open are needed for smbtorture AC_CHECK_FUNCS(shmget shm_open) AC_CHECK_FUNCS(gettext dgettext) +AC_CHECK_FUNCS(bindtextdomain textdomain) +AC_CHECK_FUNCS(strupr) # Find a method of generating a stack trace AC_CHECK_HEADERS(execinfo.h libexc.h libunwind.h) @@ -1025,33 +1088,13 @@ AC_CHECK_LIB(exc, trace_back_stack) # check for sysctlbyname for BSD systems AC_CHECK_FUNCS(sysctlbyname) -printf "%s" "checking for GPFS GPL libs... " -save_LIBS="$LIBS" -LIBS="$LIBS -lgpfs_gpl" -AC_TRY_LINK([#include ], - [gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)], - samba_cv_HAVE_GPFS=yes, - samba_cv_HAVE_GPFS=no) -echo $samba_cv_HAVE_GPFS -if test x"$samba_cv_HAVE_GPFS" = x"yes"; then - AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL libs are available]) - default_shared_modules="$default_shared_modules vfs_gpfs" -fi -LIBS="$save_LIBS" - -printf "%s" "checking for GPFS libs (with 3.2.1 PTF8 available as GPL)... " -save_LIBS="$LIBS" -LIBS="$LIBS -lgpfs" -AC_TRY_LINK([#include ], - [gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)], - samba_cv_HAVE_GPFS=yes, - samba_cv_HAVE_GPFS=no) -echo $samba_cv_HAVE_GPFS -if test x"$samba_cv_HAVE_GPFS" = x"yes"; then - AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL libs are available]) +############################# +# check if building with gpfs +AC_CHECK_HEADERS(gpfs_gpl.h) +if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then + AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL headers are available]) default_shared_modules="$default_shared_modules vfs_gpfs" fi -LIBS="$save_LIBS" ############################################# # check if building on Isilon OneFS @@ -1203,7 +1246,7 @@ AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[]) case "$host_os" in *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu) # glibc <= 2.3.2 has a broken getgrouplist - AC_TRY_RUN([ + AC_CACHE_CHECK([for good getgrouplist],samba_cv_linux_getgrouplist_ok,[AC_TRY_RUN([ #include #include main() { @@ -1219,8 +1262,10 @@ main() { #endif exit(0); } -], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no]) - if test x"$linux_getgrouplist_ok" = x"yes"; then +], [samba_cv_linux_getgrouplist_ok=yes], + [samba_cv_linux_getgrouplist_ok=no], + [samba_cv_linux_getgrouplist_ok=cross])]) + if test x"$samba_cv_linux_getgrouplist_ok" = x"yes"; then AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist]) fi ;; @@ -1500,15 +1545,15 @@ DSO_EXPORTS="" # and these are for particular systems case "$host_os" in - *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu) - case "$host_os" in *linux*) - AC_DEFINE(LINUX,1,[Whether the host os is linux]) ;; + *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu | *qnx*) + case "$host_os" in + *linux*) AC_DEFINE(LINUX,1,[Whether the host os is linux]) ;; + *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx]) ;; esac BLDSHARED="true" + LDSHFLAGS="-shared -Wl,-Bsymbolic" if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then - LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined" - else - LDSHFLAGS="-shared -Wl,-Bsymbolic" + LDSHFLAGS_Z_NODEFS="-Wl,--allow-shlib-undefined" fi DYNEXP="-Wl,--export-dynamic" PICFLAG="-fPIC" @@ -1616,9 +1661,6 @@ DSO_EXPORTS="" AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block]) AC_DEFINE(POSIX_ACL_NEEDS_MASK,1,[Does a POSIX ACL need a mask element]) ;; - *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx]) - AC_DEFINE(STAT_ST_BLOCKSIZE,512) - ;; *osf*) AC_DEFINE(OSF1,1,[Whether the host os is osf1]) BLDSHARED="true" LDSHFLAGS="-shared" @@ -1703,6 +1745,40 @@ fi AC_MSG_RESULT($BLDSHARED) +for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do + saved_ldflags="$LDFLAGS" + AC_MSG_CHECKING([if $flags works]) + LDFLAGS="$flags $saved_ldflags" + AC_TRY_LINK([],[], + [AC_MSG_RESULT([yes]) + LD_AS_NEEDED_FLAG=$flags + ld_as_needed_flag_found=yes], + AC_MSG_RESULT([no])) + LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags" + test x"$ld_as_needed_flag_found" = xyes && break +done + +# for historical reasons almost all linkers don't complain about unresolved +# symbols in shared libs. Except for the internal samba modules we want to get +# errors when we produce a shared lib with unresolved symbols. On some +# platforms unresolved symbols might be intended, so we might have to add +# platform specific exceptions here. + +for flags in "-Wl,-z,defs" "-error_unresolved" "-Wl,-error_unresolved" ; do + saved_ldflags="$LDFLAGS" + AC_MSG_CHECKING([if $flags works]) + LDFLAGS="$flags $saved_ldflags" + AC_TRY_LINK([],[], + [AC_MSG_RESULT([yes]) + LDSHFLAGS_Z_DEFS=$flags + ldshflags_z_defs_found=yes], + AC_MSG_RESULT([no])) + LDFLAGS=$saved_ldflags + test x"$ldshflags_z_defs_found" = xyes && break +done + +AC_MSG_CHECKING([LDSHFLAGS_Z_DEFS]) +AC_MSG_RESULT([$LDSHFLAGS_Z_DEFS]) AC_MSG_CHECKING([LDFLAGS]) AC_MSG_RESULT([$LDFLAGS]) AC_MSG_CHECKING([DYNEXP]) @@ -1763,6 +1839,194 @@ AC_DEFINE_UNQUOTED(SHLIBEXT, "$SHLIBEXT", [Shared library extension]) AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR + +########################################################### +# +# Configuration of subsystems / libraries +# +########################################################### + +INSTALLLIBCMD_SH=: +INSTALLLIBCMD_A=: +UNINSTALLLIBCMD_SH=: +UNINSTALLLIBCMD_A=: + +if test $BLDSHARED = true; then + INSTALLLIBCMD_SH="\$(INSTALLCMD)" + UNINSTALLLIBCMD_SH="rm -f" +fi +if test $enable_static = yes; then + INSTALLLIBCMD_A="\$(INSTALLCMD)" + UNINSTALLLIBCMD_A="rm -f" +fi + +################################################# +# --disable-shared-libs +# can be used to disable the internal use of shared libs altogether +# (this only has an effect when building shared libs is enabled) +# +USESHARED=false +AC_SUBST(USESHARED) + +AC_MSG_CHECKING(whether to use shared libraries internally) +AC_ARG_ENABLE([shared-libs], + AS_HELP_STRING([--enable-shared-libs], + [Use shared libraries internally (default=yes)]), + [enable_shared_libs=$enableval], + [enable_shared_libs=yes]) + +if test x"$enable_shared_libs" != x"no" ; then + USESHARED=$BLDSHARED +fi + +AC_MSG_RESULT([$USESHARED]) + +if test x"$enable_shared_libs" = x"yes" -a x"$BLDSHARED" != x"true" ; then + AC_MSG_WARN([--enable-shared-libs: no support for shared libraries]) +fi + +################################################# +# --with-static-libs=LIBS: +# link (internal) libs dynamically or statically? +# +# If a subsystem is built as a library then this controls whether they are +# linked into Samba targets statically or dynamically: +# +# * If we build the shared library at all, we link dynamically by default. +# +# * We only link statically if we don't build shared or if the library +# appears in the --with-static-libs configure option. +# +# Example: +# --with-static-libs=libtalloc makes use of libtalloc.a instead +# of linking the dynamic variant with -ltalloc. +# +# NOTE: This option only affects libraries that we do not only build +# but that samba also links against as libraries (as opposed to linking +# the plain object files. - This has to be configured in Makefile.in. +# So in particular it does not harm to give invalid or unknown names here. +# + +AC_ARG_WITH([static-libs], + [AS_HELP_STRING([--with-static-libs=LIBS], + [Comma-separated list of names of (internal) libraries to link statically (instead of dynamically)])], + [AS_IF([test $withval], + [for lib in `echo $withval | sed -e 's/,/ /g'` ; do + [lib=`echo $lib | tr '[a-z]' '[A-Z]'`] + eval LINK_$lib=STATIC + done], [])], + []) + +# +# WORKAROUND: +# until we have organized other internal subsystems (as util, registry +# and smbconf) into shared libraries, we CAN NOT link libnetapi +# dynamically to samba programs. +# +LINK_LIBNETAPI=STATIC + +LINK_LIBSMBCLIENT=STATIC + +# +# The library versions are hardcoded here +# and filled into the LIBFOO_SOVER variable. +# +# TODO: for talloc and tdb (at least), these should +# be extracted from their respective source directories +# +AC_ARG_ENABLE(external_libtalloc, [AS_HELP_STRING([--enable-external-libtalloc], [Enable external talloc [default=auto]])], +[ enable_external_libtalloc=$enableval ], [ enable_external_libtalloc=auto ]) + +if test "x$enable_external_libtalloc" != xno +then + PKG_CHECK_MODULES(LIBTALLOC, talloc >= 2.0.1, + [ enable_external_libtalloc=yes ], + [ if test x$enable_external_libtalloc = xyes; then + AC_MSG_ERROR([Unable to find libtalloc]) + else + enable_external_libtalloc=no + fi + ]) +fi + +if test "x$enable_external_libtalloc" = xno +then + m4_include(../lib/talloc/libtalloc.m4) + LINK_LIBTALLOC=STATIC + SMB_LIBRARY(talloc, 2) + LIBTALLOC_OBJ0="" + for obj in ${TALLOC_OBJ}; do + LIBTALLOC_OBJ0="${LIBTALLOC_OBJ0} ${tallocdir}/${obj}" + done + SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}" + SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CONFIGURE_CPPFLAGS} ${TALLOC_CFLAGS}" + AC_SUBST(LIBTALLOC_OBJ0) + + TALLOCTORT="bin/talloctort\$(EXEEXT)" + AC_SUBST(TALLOCTORT) +fi + + +AC_ARG_ENABLE(external_libtdb, + [AS_HELP_STRING([--enable-external-libtdb], + [Enable external tdb [default=auto]])], + [ enable_external_libtalloc=$enableval ], + [ enable_external_libtalloc=auto ]) + +if test "x$enable_external_libtdb" != xno +then + PKG_CHECK_MODULES(LIBTDB, tdb >= 1.1.7, + [ enable_external_libtdb=yes ], + [ + if test x$enable_external_libtdb = xyes; then + AC_MSG_ERROR([Unable to find libtdb]) + else + enable_external_libtdb=no + fi + ]) +fi + +AC_SUBST(LIBTDB_OBJ0) +if test "x$enable_external_libtdb" = xno +then + m4_include(../lib/tdb/libtdb.m4) + LINK_LIBTDB=STATIC + SMB_LIBRARY(tdb, 1) + LIBTDB_OBJ0="" + for obj in ${TDB_OBJ}; do + LIBTDB_OBJ0="${LIBTDB_OBJ0} ${tdbdir}/${obj}" + done + AC_SUBST(LIBTDB_OBJ0) + SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}" + SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CONFIGURE_CPPFLAGS} ${TDB_CFLAGS}" + + TDBBACKUP="bin/tdbbackup\$(EXEEXT)" + AC_SUBST(TDBBACKUP) + TDBDUMP="bin/tdbdump\$(EXEEXT)" + AC_SUBST(TDBDUMP) + TDBTOOL="bin/tdbtool\$(EXEEXT)" + AC_SUBST(TDBTOOL) + TDBTORTURE="bin/tdbtorture\$(EXEEXT)" + AC_SUBST(TDBTORTURE) + ac_cv_have_tdb_err_nesting=yes +else + AC_TRY_COMPILE([#include "tdb.h"], + [enum TDB_ERROR err = TDB_ERR_NESTING], + ac_cv_have_tdb_err_nesting=yes, + ac_cv_have_tdb_err_nesting=no) +fi + +if test x"$ac_cv_have_tdb_err_nesting" = xyes; then + AC_DEFINE(HAVE_TDB_ERR_NESTING, 1, [Whether we have TDB_ERR_NESTING]) +fi + +SMB_LIBRARY(netapi, 0) +SMB_LIBRARY(smbclient, 0) +SMB_LIBRARY(smbsharemodes, 0) +SMB_LIBRARY(addns, 0, no, [undefined API]) + + + ################ AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[ @@ -1956,15 +2220,6 @@ if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then AC_DEFINE(HAVE_FUNCTION_MACRO,1,[Whether there is a __FUNCTION__ macro]) fi -AC_CACHE_CHECK([if gettimeofday takes tz argument],samba_cv_HAVE_GETTIMEOFDAY_TZ,[ -AC_TRY_LINK([ -#include -#include ], [struct timeval tv; return gettimeofday(&tv, NULL);], - samba_cv_HAVE_GETTIMEOFDAY_TZ=yes, - samba_cv_HAVE_GETTIMEOFDAY_TZ=no)]) -if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then - AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday takes a tz argument]) -fi if test x"$samba_cv_WITH_PROFILE" = x"yes"; then @@ -2012,7 +2267,7 @@ 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_CHECK_FUNCS(pututline pututxline updwtmp updwtmpx getutmpx getutxent) AC_CACHE_CHECK([for ut_name in utmp],samba_cv_HAVE_UT_UT_NAME,[ AC_TRY_COMPILE([#include @@ -2717,6 +2972,22 @@ exit(1); fi fi +# glibc up to 2.3.6 had dangerously broken posix_fallocate(). DON'T USE IT. +AC_CACHE_CHECK([for broken posix_fallocate],samba_cv_HAVE_BROKEN_POSIX_FALLOCATE,[ +AC_TRY_COMPILE([ + #define _XOPEN_SOURCE 600 + #include + #if defined(__GLIBC__) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 4)) + probably broken posix_fallocate + #endif +], [ +], +samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=no,samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=yes)]) +if test x"$samba_cv_HAVE_BROKEN_POSIX_FALLOCATE" = xyes; then + AC_DEFINE(HAVE_BROKEN_POSIX_FALLOCATE,, Whether we have a broken posix_fallocate) +fi + + AC_CACHE_CHECK([for st_blocks in struct stat],samba_cv_HAVE_STAT_ST_BLOCKS,[ AC_TRY_COMPILE([#include #include @@ -2915,7 +3186,7 @@ with_ldap_support=auto AC_MSG_CHECKING([for LDAP support]) AC_ARG_WITH(ldap, -[AS_HELP_STRING([--with-ldap], [LDAP support (default yes)])], +[AS_HELP_STRING([--with-ldap], [LDAP support (default=yes)])], [ case "$withval" in yes|no) with_ldap_support=$withval @@ -3065,7 +3336,7 @@ with_ads_support=auto AC_MSG_CHECKING([for Active Directory and krb5 support]) AC_ARG_WITH(ads, -[AS_HELP_STRING([--with-ads], [Active Directory support (default auto)])], +[AS_HELP_STRING([--with-ads], [Active Directory support (default=auto)])], [ case "$withval" in yes|no) with_ads_support="$withval" @@ -3276,13 +3547,34 @@ if test x"$with_ads_support" != x"no"; then CPPFLAGS=$ac_save_CPPFLAGS LDFLAGS=$ac_save_LDFLAGS fi - AC_CHECK_HEADERS(krb5/locate_plugin.h) + AC_CHECK_HEADERS([krb5/locate_plugin.h], [], [], +[[#ifdef HAVE_KRB5_H + #include + #endif +]]) + if test x"$ac_cv_header_krb5_locate_plugin_h" = x"yes"; then WINBIND_KRB5_LOCATOR="bin/winbind_krb5_locator.$SHLIBEXT" if test x"$BLDSHARED" = x"true" ; then EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WINBIND_KRB5_LOCATOR" fi fi + + # check for new heimdal KRB5_DEPRECATED handling + + AC_CACHE_CHECK([for KRB5_DEPRECATED define taking an identifier], + samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER,[ + AC_TRY_COMPILE( + [#define KRB5_DEPRECATED 1 + #include ], + [], + samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=yes, + samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=no)]) + + if test x"$samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER" = x"yes"; then + AC_DEFINE(HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER, 1, + [Whether to use deprecated krb5 interfaces]) + fi fi # Now we have determined whether we really want ADS support @@ -3364,6 +3656,16 @@ if test x"$with_ads_support" != x"no"; then AC_CHECK_FUNC_EXT(krb5_enctype_to_string, $KRB5_LIBS) AC_CHECK_FUNC_EXT(krb5_fwd_tgt_creds, $KRB5_LIBS) AC_CHECK_FUNC_EXT(krb5_auth_con_set_req_cksumtype, $KRB5_LIBS) + AC_CHECK_FUNC_EXT(krb5_get_creds_opt_alloc, $KRB5_LIBS) + AC_CHECK_FUNC_EXT(krb5_get_creds_opt_set_impersonate, $KRB5_LIBS) + AC_CHECK_FUNC_EXT(krb5_get_creds, $KRB5_LIBS) + AC_CHECK_FUNC_EXT(krb5_get_credentials_for_user, $KRB5_LIBS) + # MIT krb5 1.8 does not expose this call (yet) + AC_CHECK_DECLS(krb5_get_credentials_for_user, [], [], [#include ]) + + # MIT krb5 1.7beta3 (in Ubuntu Karmic) does not have this declaration + # but does have the symbol + AC_CHECK_DECLS(krb5_auth_con_set_req_cksumtype, [], [], [#include ]) LIBS="$KRB5_LIBS $LIBS" @@ -3753,7 +4055,7 @@ if test x"$with_ads_support" != x"no"; then if (str) free (str); return 0; } - ],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], + ],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=yes, smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=no)]) @@ -3771,7 +4073,7 @@ if test x"$with_ads_support" != x"no"; then krb5_enctype_to_string(1, buf, 256); return 0; } - ],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], + ],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], smb_krb5_cv_enctype_to_string_takes_size_t_arg=yes, smb_krb5_cv_enctype_to_string_takes_size_t_arg=no)]) @@ -3900,11 +4202,11 @@ PASSDB_LIBS="$PASSDB_LIBS $NSCD_LIBS" ######################################################## # Compile with DNS Updates support? -with_dnsupdate_support=no +with_dnsupdate_support=auto AC_MSG_CHECKING([whether to enable DNS Updates support]) AC_ARG_WITH(dnsupdate, -[AS_HELP_STRING([--with-dnsupdate], [Enable DNS Updates support (default no)])], +[AS_HELP_STRING([--with-dnsupdate], [Enable DNS Updates support (default=auto)])], [ case "$withval" in yes|no) with_dnsupdate_support=$withval @@ -3916,24 +4218,29 @@ AC_MSG_RESULT($with_dnsupdate_support) if test x"$with_dnsupdate_support" != x"no"; then ################################################################ - # first test for Active Directory support being enabled - #if test x"$with_ads_support" = x"no"; then - # AC_MSG_ERROR(Active Directory support is required to enable DNS Update support) - # with_dnsupdate_support=no - #fi + # first test for AD / GSSAPI support being enabled + if test x"$have_gssapi" != xyes ; then + if test x"$with_dnsupdate_support" = x"yes" ; then + AC_MSG_ERROR(DNS Updates support only possible with AD and GSSAPI support) + else + AC_MSG_NOTICE(DNS Updates support only possible with AD and GSSAPI support) + with_dnsupdate_support=no + fi + fi ################################################################## # then test for uuid.h (necessary to generate unique DNS keynames # (uuid.h is required for this test) - AC_CHECK_HEADERS(uuid/uuid.h) + AC_CHECK_HEADERS(uuid/uuid.h) - if test x"$ac_cv_header_uuid_uuid_h" != x"yes"; then - if test x"$with_dnsupdate_support" = x"yes"; then - AC_MSG_ERROR(uuid.h is needed to enable DNS Updates support) - else - AC_MSG_WARN(uuid.h is needed to enable DNS Updates support) + + if test x"$ac_cv_header_uuid_uuid_h" != x"yes"; then + if test x"$with_dnsupdate_support" = x"yes"; then + AC_MSG_ERROR(uuid.h is needed to enable DNS Updates support) + else + AC_MSG_NOTICE(uuid.h is needed to enable DNS Updates support) + fi + with_dnsupdate_support=no fi - with_dnsupdate_support=no - fi fi if test x"$with_dnsupdate_support" != x"no"; then @@ -3965,6 +4272,10 @@ if test x"$with_dnsupdate_support" != x"no"; then with_dnsupdate_support=no ]) fi + # finally print out the result: +AC_MSG_CHECKING(whether DNS Updates support is used) +AC_MSG_RESULT([$with_dnsupdate_support]) + ################################################# # check for automount support @@ -4114,12 +4425,12 @@ AC_ARG_WITH(cifsupcall, # /usr/include/pam. with_pam_for_crypt=no -try_pam=no +try_pam=auto AC_MSG_CHECKING(whether to try PAM support) AC_ARG_WITH(pam, -[AS_HELP_STRING([--with-pam], [Include PAM support (default=no)])], +[AS_HELP_STRING([--with-pam], [Include PAM support (default=auto)])], [ case "$withval" in - yes|no) + yes|no|auto) try_pam=$withval ;; esac @@ -4193,36 +4504,83 @@ if test x"${try_pam}" != x"no";then AC_MSG_RESULT([$create_pam_modules]) fi # try_pam != no +################################################# +# check for PAM_RADIO_TYPE +AC_TRY_COMPILE([ +#if (!defined(LINUX)) + +#define PAM_EXTERN extern +#if defined(HAVE_SECURITY_PAM_APPL_H) +#include +#elif defined(HAVE_PAM_PAM_APPL_H) +#include +#endif + +#endif + +#if defined(HAVE_SECURITY_PAM_MODULES_H) +#include +#elif defined(HAVE_PAM_PAM_MODULES_H) +#include +#endif + +#if defined(HAVE_SECURITY__PAM_MACROS_H) +#include +#elif defined(HAVE_PAM__PAM_MACROS_H) +#include +#endif + +#ifdef HAVE_SECURITY_PAM_EXT_H +#include +#endif +], +[int i; i = PAM_RADIO_TYPE; ], +AC_DEFINE(HAVE_PAM_RADIO_TYPE, 1, [Define to 1 if PAM_RADIO_TYPE is available]),[]) + ################################################# # check for pam_smbpass support PAM_MODULES="" INSTALL_PAM_MODULES="" UNINSTALL_PAM_MODULES="" + +try_pam_smbpass=auto AC_MSG_CHECKING(whether to use pam_smbpass) AC_ARG_WITH(pam_smbpass, -[AS_HELP_STRING([--with-pam_smbpass], [Build PAM module for authenticating against passdb backends (default=no)])], +[AS_HELP_STRING([--with-pam_smbpass], [Build PAM module for authenticating against passdb backends (default=auto)])], [ case "$withval" in - yes) - AC_MSG_RESULT(yes) + yes|no|auto) + try_pam_smbpass=$withval + ;; + *) + AC_MSG_ERROR([valid options are yes,no,auto]) + ;; + esac +]) - # Conditions under which pam_smbpass should not be built. +if test x"${try_pam_smbpass}" = xno ; then + use_pam_smbpass=no +else + use_pam_smbpass=yes + # Conditions under which pam_smbpass can't be built. + if test x"$BLDSHARED" != xtrue ; then + if test x"${try_pam_smbpass}" = xyes ; then + AC_MSG_ERROR([No support for shared modules]) + fi + use_pam_smbpass=no + elif test x"$create_pam_modules" != xyes ; then + if test x"${try_pam_smbpass}" = xyes ; then + AC_MSG_ERROR([No support for PAM MODULES]) + fi + use_pam_smbpass=no + fi - if test x"$BLDSHARED" != x"true"; then - AC_MSG_ERROR([No support for shared modules]) - elif test x"$create_pam_modules" != x"yes"; then - AC_MSG_ERROR([No support for PAM MODULES]) - else - PAM_MODULES="pam_smbpass" - INSTALL_PAM_MODULES="installpammodules" - UNINSTALL_PAM_MODULES="uninstallpammodules" - fi - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) + if test x"${use_pam_smbpass}" = xyes ; then + PAM_MODULES="pam_smbpass" + INSTALL_PAM_MODULES="installpammodules" + UNINSTALL_PAM_MODULES="uninstallpammodules" + fi +fi +AC_MSG_RESULT([$use_pam_smbpass]) ## @@ -4463,7 +4821,7 @@ AC_TRY_RUN_STRICT([ #define HAVE_QUOTACTL_4A 1 #define AUTOCONF_TEST 1 #include "confdefs.h" -#include "${srcdir-.}/../tests/sysquotas.c"],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], +#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], samba_cv_HAVE_QUOTACTL_4A=yes,samba_cv_HAVE_QUOTACTL_4A=no,samba_cv_HAVE_QUOTACTL_4A=cross)]) if test x"$samba_cv_HAVE_QUOTACTL_4A" = x"yes"; then samba_cv_SYSQUOTA_FOUND=yes; @@ -4478,7 +4836,7 @@ AC_TRY_RUN_STRICT([ #define HAVE_QUOTACTL_4B 1 #define AUTOCONF_TEST 1 #include "confdefs.h" -#include "${srcdir-.}/../tests/sysquotas.c"],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], +#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], samba_cv_HAVE_QUOTACTL_4B=yes,samba_cv_HAVE_QUOTACTL_4B=no,samba_cv_HAVE_QUOTACTL_4B=cross)]) if test x"$samba_cv_HAVE_QUOTACTL_4B" = x"yes"; then echo "int quotactl(const char *path, int cmd, int id, char *addr) is not reworked for the new sys_quota api" @@ -4494,7 +4852,7 @@ AC_TRY_RUN_STRICT([ #define HAVE_QUOTACTL_3 1 #define AUTOCONF_TEST 1 #include "confdefs.h" -#include "${srcdir-.}/../tests/sysquotas.c"],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], +#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], samba_cv_HAVE_QUOTACTL_3=yes,samba_cv_HAVE_QUOTACTL_3=no,samba_cv_HAVE_QUOTACTL_3=cross)]) if test x"$samba_cv_HAVE_QUOTACTL_3" = x"yes"; then echo "CRAY int quotactl (char *spec, int request, char *arg) is NOT reworked for the sys_quota api" @@ -4644,214 +5002,6 @@ else AC_MSG_RESULT(no$utmp_no_reason) fi -INSTALLLIBCMD_SH=: -INSTALLLIBCMD_A=: -UNINSTALLLIBCMD_SH=: -UNINSTALLLIBCMD_A=: - -if test $BLDSHARED = true; then - INSTALLLIBCMD_SH="\$(INSTALLCMD)" - UNINSTALLLIBCMD_SH="rm -f" -fi -if test $enable_static = yes; then - INSTALLLIBCMD_A="\$(INSTALLCMD)" - UNINSTALLLIBCMD_A="rm -f" -fi - -################################################# -# --disable-shared-libs -# can be used to disable the internal use of shared libs altogether -# (this only has an effect when building shared libs is enabled) -# -USESHARED=false -AC_SUBST(USESHARED) - -AC_MSG_CHECKING(whether to use shared libraries internally) -AC_ARG_ENABLE([shared-libs], - AS_HELP_STRING([--enable-shared-libs], - [Use shared libraries internally (default=yes)]), - [enable_shared_libs=$enableval], - [enable_shared_libs=yes]) - -if test x"$enable_shared_libs" != x"no" ; then - USESHARED=$BLDSHARED -fi - -AC_MSG_RESULT([$USESHARED]) - -if test x"$enable_shared_libs" = x"yes" -a x"$BLDSHARED" != x"true" ; then - AC_MSG_WARN([--enable-shared-libs: no support for shared libraries]) -fi - -################################################# -# --with-static-libs=LIBS: -# link (internal) libs dynamically or statically? -# -# If a subsystem is built as a library then this controls whether they are -# linked into Samba targets statically or dynamically: -# -# * If we build the shared library at all, we link dynamically by default. -# -# * We only link statically if we don't build shared or if the library -# appears in the --with-static-libs configure option. -# -# Example: -# --with-static-libs=libtalloc makes use of libtalloc.a instead -# of linking the dynamic variant with -ltalloc. -# -# NOTE: This option only affects libraries that we do not only build -# but that samba also links against as libraries (as opposed to linking -# the plain object files. - This has to be configured in Makefile.in. -# So in particular it does not harm to give invalid or unknown names here. -# - -AC_ARG_WITH([static-libs], - [AS_HELP_STRING([--with-static-libs=LIBS], - [Comma-separated list of names of (internal) libraries to link statically (instead of dynamically)])], - [AS_IF([test $withval], - [for lib in `echo $withval | sed -e 's/,/ /g'` ; do - [lib=`echo $lib | tr '[a-z]' '[A-Z]'`] - eval LINK_$lib=STATIC - done], [])], - []) - -# -# WORKAROUND: -# until we have organized other internal subsystems (as util, registry -# and smbconf) into shared libraries, we CAN NOT link libnetapi -# dynamically to samba programs. -# -LINK_LIBNETAPI=STATIC - -LINK_LIBSMBCLIENT=STATIC - -# -# The library versions are hardcoded here -# and filled into the LIBFOO_SOVER variable. -# -# TODO: for talloc and tdb (at least), these should -# be extracted from their respective source directories -# -AC_ARG_ENABLE(external_libtalloc, [AS_HELP_STRING([--enable-external-libtalloc], [Enable external talloc [default=auto]])], -[ enable_external_libtalloc=$enableval ], [ enable_external_libtalloc=auto ]) - -if test "x$enable_external_libtalloc" != xno -then - PKG_CHECK_MODULES(LIBTALLOC, talloc >= 1.3.0, - [ enable_external_libtalloc=yes ], - [ if test x$enable_external_libtalloc = xyes; then - AC_MSG_ERROR([Unable to find libtalloc]) - else - enable_external_libtalloc=no - fi - ]) -fi - -if test "x$enable_external_libtalloc" = xno -then - m4_include(../lib/talloc/libtalloc.m4) - LINK_LIBTALLOC=STATIC - SMB_LIBRARY(talloc, 1) - LIBTALLOC_OBJ0="" - for obj in ${TALLOC_OBJ}; do - LIBTALLOC_OBJ0="${LIBTALLOC_OBJ0} ${tallocdir}/${obj}" - done - SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}" - AC_SUBST(LIBTALLOC_OBJ0) - - TALLOCTORT="bin/talloctort\$(EXEEXT)" - AC_SUBST(TALLOCTORT) -fi - - -AC_ARG_ENABLE(external_libtdb, - [AS_HELP_STRING([--enable-external-libtdb], - [Enable external tdb [default=auto]])], - [ enable_external_libtalloc=$enableval ], - [ enable_external_libtalloc=auto ]) - -if test "x$enable_external_libtdb" != xno -then - PKG_CHECK_MODULES(LIBTDB, tdb >= 1.1.4, - [ enable_external_libtdb=yes ], - [ - if test x$enable_external_libtdb = xyes; then - AC_MSG_ERROR([Unable to find libtdb]) - else - enable_external_libtdb=no - fi - ]) -fi - -AC_SUBST(LIBTDB_OBJ0) -if test "x$enable_external_libtdb" = xno -then - m4_include(../lib/tdb/libtdb.m4) - LINK_LIBTDB=STATIC - SMB_LIBRARY(tdb, 1) - LIBTDB_OBJ0="" - for obj in ${TDB_OBJ}; do - LIBTDB_OBJ0="${LIBTDB_OBJ0} ${tdbdir}/${obj}" - done - AC_SUBST(LIBTDB_OBJ0) - SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}" - - TDBBACKUP="bin/tdbbackup\$(EXEEXT)" - AC_SUBST(TDBBACKUP) - TDBDUMP="bin/tdbdump\$(EXEEXT)" - AC_SUBST(TDBDUMP) - TDBTOOL="bin/tdbtool\$(EXEEXT)" - AC_SUBST(TDBTOOL) - TDBTORTURE="bin/tdbtorture\$(EXEEXT)" - AC_SUBST(TDBTORTURE) -fi - - -AC_ARG_ENABLE(external_liblua, - [AS_HELP_STRING([--enable-external-liblua], - [Enable external lua [default=auto]])], - [ enable_external_liblua=$enableval ], - [ enable_external_liblua=auto ]) - -if test "x$enable_external_liblua" != xno -then - PKG_CHECK_MODULES(LIBLUA, lua5.1 >= 5.1.4, - [ enable_external_liblua=yes ], - [ - if test x$enable_external_liblua = xyes; then - AC_MSG_ERROR([Unable to find liblua]) - else - enable_external_liblua=no - fi - ]) -fi - -AC_SUBST(LIBLUA_OBJ0) -if test "x$enable_external_liblua" = xno -then - LINK_LIBLUA=STATIC - SMB_LIBRARY(lua, 0) - LIBLUA_OBJ0="lua-5.1.4/src/lapi.o lua-5.1.4/src/lauxlib.o \ - lua-5.1.4/src/lbaselib.o lua-5.1.4/src/lcode.o \ - lua-5.1.4/src/ldblib.o lua-5.1.4/src/ldebug.o lua-5.1.4/src/ldo.o \ - lua-5.1.4/src/ldump.o lua-5.1.4/src/lfunc.o lua-5.1.4/src/lgc.o \ - lua-5.1.4/src/linit.o lua-5.1.4/src/liolib.o lua-5.1.4/src/llex.o \ - lua-5.1.4/src/lmathlib.o lua-5.1.4/src/lmem.o \ - lua-5.1.4/src/loadlib.o lua-5.1.4/src/lobject.o \ - lua-5.1.4/src/lopcodes.o lua-5.1.4/src/loslib.o \ - lua-5.1.4/src/lparser.o lua-5.1.4/src/lstate.o \ - lua-5.1.4/src/lstring.o lua-5.1.4/src/lstrlib.o \ - lua-5.1.4/src/ltable.o lua-5.1.4/src/ltablib.o lua-5.1.4/src/ltm.o \ - lua-5.1.4/src/lundump.o lua-5.1.4/src/lvm.o \ - lua-5.1.4/src/lzio.o lua-5.1.4/src/print.o" - AC_SUBST(LIBLUA_OBJ0) -fi - -SMB_LIBRARY(netapi, 0) -SMB_LIBRARY(smbclient, 0) -SMB_LIBRARY(smbsharemodes, 0) -SMB_LIBRARY(addns, 0, no, [undefined API]) - ################################################# # these tests are taken from the GNU fileutils package @@ -5115,7 +5265,7 @@ AC_ARG_WITH(ctdb, esac]) SAVED_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $CTDB_CPPFLAGS" +CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS} $CTDB_CPPFLAGS" ctdb_broken="missing or broken headers" AC_CHECK_HEADERS(ctdb.h ctdb_private.h,,,[ @@ -5147,6 +5297,23 @@ else ctdb_broken="missing transaction support" fi +AC_HAVE_DECL(CTDB_CONTROL_TRANS2_ACTIVE,[ +#include "confdefs.h" +#define NO_CONFIG_H +#include "replace.h" +#include "system/wait.h" +#include "system/network.h" +#include +#include +#include +#include +]) +if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_ACTIVE_decl" = x"yes"; then + ctdb_broken=no +else + ctdb_broken="transaction support too old" +fi + # in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client AC_CHECK_TYPE(struct ctdb_tcp_client,[ AC_DEFINE([ctdb_control_tcp],[ctdb_tcp_client],[ctdb ipv4 support]) @@ -5910,8 +6077,6 @@ case "$host_os" in NSSSONAMEVERSIONSUFFIX=".1" WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_solaris.o \ ../nsswitch/winbind_nss_linux.o" - WINBIND_NSS_EXTRA_LIBS="${LIBREPLACE_NETWORK_LIBS}" - PAM_WINBIND_EXTRA_LIBS="${LIBREPLACE_NETWORK_LIBS}" ;; *hpux11*) WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_solaris.o" @@ -5984,14 +6149,12 @@ else ## Only worry about libwbclient if we have shared # library support LIBWBCLIENT_SHARED=$LIBWBCLIENT_SHARED_TARGET - LIBWBCLIENT_TARGET=$LIBWBCLIENT_SHARED_TARGET LIBWBCLIENT=libwbclient INSTALL_LIBWBCLIENT=installlibwbclient UNINSTALL_LIBWBCLIENT=uninstalllibwbclient LIBWBCLIENT_LIBS="-lwbclient" else LIBWBCLIENT_STATIC=$LIBWBCLIENT_STATIC_TARGET - LIBWBCLIENT_TARGET=$LIBWBCLIENT_STATIC_TARGET LIBWBCLIENT_LIBS=$LIBWBCLIENT_STATIC_TARGET fi fi @@ -6021,9 +6184,7 @@ AC_SUBST(WINBIND_NSS) AC_SUBST(WINBIND_WINS_NSS) AC_SUBST(WINBIND_NSS_LDSHFLAGS) AC_SUBST(WINBIND_NSS_EXTRA_OBJS) -AC_SUBST(WINBIND_NSS_EXTRA_LIBS) AC_SUBST(NSSSONAMEVERSIONSUFFIX) -AC_SUBST(PAM_WINBIND_EXTRA_LIBS) AC_SUBST(WINBIND_KRB5_LOCATOR) @@ -6153,12 +6314,12 @@ if test x"$enable_avahi" != x"no"; then fi save_LIBS="$LIBS" - AC_CHECK_LIB(avahi-client, avahi_client_new) - AC_CHECK_LIB(avahi-common, avahi_strerror) + AC_CHECK_LIB(avahi-client, avahi_client_new,[have_avahi_client_new=yes]) + AC_CHECK_LIB(avahi-common, avahi_strerror,[have_avahi_strerror=yes]) LIBS="$save_LIBS" - if test x"$ac_cv_lib_ext_avahi_client_avahi_client_new" != x"yes" -o \ - test x"$ac_cv_lib_ext_avahi_common_avahi_strerror" != x"yes" ; then + if test x"$have_avahi_client_new" != x"yes" -o \ + x"$have_avahi_strerror" != x"yes" ; then have_avahi_support=no fi @@ -6327,7 +6488,7 @@ SMB_MODULE(rpc_spoolss, \$(RPC_SPOOLSS_OBJ), "bin/librpc_spoolss.$SHLIBEXT", RPC SMB_MODULE(rpc_eventlog, \$(RPC_EVENTLOG_OBJ), "bin/librpc_eventlog.$SHLIBEXT", RPC) SMB_MODULE(rpc_samr, \$(RPC_SAMR_OBJ), "bin/librpc_samr.$SHLIBEXT", RPC) SMB_MODULE(rpc_rpcecho, \$(RPC_ECHO_OBJ), "bin/librpc_rpcecho.$SHLIBEXT", RPC) -SMB_SUBSYSTEM(RPC,smbd/server.o) +SMB_SUBSYSTEM(RPC,smbd/process.o) SMB_MODULE(idmap_ldap, winbindd/idmap_ldap.o, "bin/ldap.$SHLIBEXT", IDMAP) SMB_MODULE(idmap_tdb, winbindd/idmap_tdb.o, "bin/tdb.$SHLIBEXT", IDMAP) @@ -6403,6 +6564,7 @@ SMB_MODULE(vfs_smb_traffic_analyzer, \$(VFS_SMB_TRAFFIC_ANALYZER_OBJ), "bin/smb_ SMB_MODULE(vfs_onefs, \$(VFS_ONEFS), "bin/onefs.$SHLIBEXT", VFS) SMB_MODULE(vfs_onefs_shadow_copy, \$(VFS_ONEFS_SHADOW_COPY), "bin/onefs_shadow_copy.$SHLIBEXT", VFS) SMB_MODULE(vfs_dirsort, \$(VFS_DIRSORT_OBJ), "bin/dirsort.$SHLIBEXT", VFS) +SMB_MODULE(vfs_scannedonly, \$(VFS_SCANNEDONLY_OBJ), "bin/scannedonly.$SHLIBEXT", VFS) SMB_SUBSYSTEM(VFS,smbd/vfs.o)