SMB_VERSION_STRING=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2`
echo "SAMBA VERSION: ${SMB_VERSION_STRING}"
-SAMBA_VERSION_SVN_REVISION=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_SVN_REVISION' | cut -d ' ' -f3-`
-if test -n "${SAMBA_VERSION_SVN_REVISION}";then
- echo "BUILD REVISION: ${SAMBA_VERSION_SVN_REVISION}"
+SAMBA_VERSION_GIT_COMMIT_FULLREV=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_FULLREV' | cut -d ' ' -f3- | cut -d '"' -f2`
+if test -n "${SAMBA_VERSION_GIT_COMMIT_FULLREV}";then
+ echo "BUILD COMMIT REVISION: ${SAMBA_VERSION_GIT_COMMIT_FULLREV}"
+fi
+SAMBA_VERSION_GIT_COMMIT_DATE=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_DATE' | cut -d ' ' -f3-`
+if test -n "${SAMBA_VERSION_GIT_COMMIT_DATE}";then
+ echo "BUILD COMMIT DATE: ${SAMBA_VERSION_GIT_COMMIT_DATE}"
+fi
+SAMBA_VERSION_GIT_COMMIT_TIME=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_TIME' | cut -d ' ' -f3-`
+if test -n "${SAMBA_VERSION_GIT_COMMIT_TIME}";then
+ echo "BUILD COMMIT TIME: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
+
+ # just to keep the build-farm gui happy for now...
+ echo "BUILD REVISION: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
fi
AC_LIBREPLACE_LOCATION_CHECKS
configdir="\${LIBDIR}"
swatdir="\${prefix}/swat"
-AC_ARG_WITH(fhs,
+AC_ARG_WITH(fhs,
[ --with-fhs Use FHS-compliant paths (default=no)],
[ case "$withval" in
yes)
logfilebase="\${VARDIR}/log/samba"
privatedir="\${CONFIGDIR}/private"
libdir="\${prefix}/lib/samba"
- configdir="${sysconfdir}/samba"
+ configdir="\${sysconfdir}/samba"
swatdir="\${DATADIR}/samba/swat"
;;
esac])
AC_SUBST(KRB5_LIBS)
AC_SUBST(UUID_LIBS)
AC_SUBST(LDAP_LIBS)
-AC_SUBST(SHLIB_PROGS)
AC_SUBST(PAM_MODULES)
AC_SUBST(INSTALL_PAM_MODULES)
AC_SUBST(UNINSTALL_PAM_MODULES)
-AC_SUBST(SMBWRAPPER)
-AC_SUBST(SMBWRAP_OBJS)
-AC_SUBST(SMBWRAP_INC)
+AC_SUBST(NSS_MODULES)
AC_SUBST(EXTRA_BIN_PROGS)
AC_SUBST(SMBMOUNT_PROGS)
AC_SUBST(CIFSMOUNT_PROGS)
## check for --enable-debug first before checking CFLAGS before
## so that we don't mix -O and -g
-AC_ARG_ENABLE(debug,
+AC_ARG_ENABLE(debug,
[ --enable-debug Turn on compiler debugging information (default=no)],
[if eval "test x$enable_debug = xyes"; then
CFLAGS="${CFLAGS} -g"
* )
smbtorture4_path="$withval"
if test -z "$smbtorture4_path" -a ! -f $smbtorture4_path; then
- AC_MSG_ERROR(['$smbtorture_path' does not exist!])
+ AC_MSG_ERROR(['$smbtorture_path' does not exist!])
fi
;;
esac
if test "x$enable_dmalloc" = xyes
then
AC_DEFINE(ENABLE_DMALLOC, 1, [Define to turn on dmalloc debugging])
- AC_DEFINE(DMALLOC_FUNC_CHECK, 1,
+ AC_DEFINE(DMALLOC_FUNC_CHECK, 1,
[Define to check invariants around some common functions])
LIBS="$LIBS -ldmalloc"
fi
LD=ld
AC_PROG_LD_GNU
-dnl Certain versions of GNU ld the default is not to have the
+dnl Certain versions of GNU ld the default is not to have the
dnl --allow-shlib-undefined flag defined. This causes a stackload of
dnl warnings when building modules.
if test "$ac_cv_prog_gnu_ld" = "yes"; then
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"
-else
+else
dnl Check if the C compiler understands -w2
AC_CACHE_CHECK([that the C compiler understands -w2],samba_cv_HAVE_w2, [
AC_TRY_RUN_STRICT([
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 rpc_lsa rpc_samr rpc_winreg rpc_initshutdown rpc_lsa_ds rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_net rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog rpc_unixinfo auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin vfs_default nss_info_template"
+default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsa rpc_samr rpc_reg rpc_shutdown rpc_lsa_ds rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_net rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog rpc_echo auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin vfs_default 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 charset_CP850 charset_CP437 auth_script"
+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 charset_CP850 charset_CP437 auth_script vfs_readahead"
if test "x$developer" = xyes; then
default_static_modules="$default_static_modules rpc_rpcecho"
# case statement; its first reference must be unconditional.
#
case "$host_os" in
-# Try to work out if this is the native HPUX compiler that uses the -Ae flag.
*hpux*)
#
# Defines needed for HPUX support.
AC_MSG_RESULT([enabling large file support])
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
AC_DEFINE(_LARGE_FILES, 1, [Whether to enable large file support])
- ;;
+ ;;
#
# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
# to the existance of large files..
*darwin*)
AC_DEFINE(BROKEN_UNICODE_COMPOSE_CHARACTERS, 1, [Does this system use unicode compose characters])
- # Add a system specific charset module.
+# Add a system specific charset module.
default_shared_modules="$default_shared_modules charset_macosxfs"
;;
AC_CHECK_HEADERS(nss.h nss_common.h nsswitch.h ns_api.h sys/security.h)
AC_CHECK_HEADERS(syscall.h sys/syscall.h)
-AC_CHECK_HEADERS(sys/acl.h sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h)
+AC_CHECK_HEADERS(sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h)
AC_CHECK_HEADERS(sys/ea.h sys/proplist.h)
AC_CHECK_HEADERS(sys/cdefs.h glob.h)
# For experimental utmp support (lastlog on some BSD-like systems)
AC_CHECK_HEADERS(utmp.h utmpx.h lastlog.h)
-
+
AC_CHECK_SIZEOF(int,cross)
AC_CHECK_SIZEOF(long,cross)
AC_CHECK_SIZEOF(long long,cross)
AC_CHECK_TYPE(offset_t,loff_t)
AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_TYPE(wchar_t, unsigned short)
-AC_CHECK_TYPE(comparison_fn_t,
+AC_CHECK_TYPE(comparison_fn_t,
[AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])])
############################################
#include <sys/socket.h>
#include <sys/un.h>],
[
- struct sockaddr_un sunaddr;
+ struct sockaddr_un sunaddr;
sunaddr.sun_family = AF_UNIX;
],
samba_cv_unixsocket=yes,samba_cv_unixsocket=no)])
# code will generate warnings on one of them unless we have a few
# special cases.
AC_CHECK_LIB(readline, rl_completion_matches,
- [AC_DEFINE(HAVE_NEW_LIBREADLINE, 1,
+ [AC_DEFINE(HAVE_NEW_LIBREADLINE, 1,
[Do we have rl_completion_matches?])],
[],
[$TERMLIBS])
esac
dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value
dnl has been cached.
- if test x"$ac_cv_lib_socket_connect" = x"yes" ||
+ if test x"$ac_cv_lib_socket_connect" = x"yes" ||
test x"$ac_cv_lib_inet_connect" = x"yes"; then
# ac_cv_func_connect=yes
# don't! it would cause AC_CHECK_FUNC to succeed next time configure is run
AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strerror chown fchown chmod fchmod chroot link mknod mknod64)
AC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtouq __strtoull)
-AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync memset strlcpy strlcat setpgid)
+AC_CHECK_FUNCS(fstat strchr utime utimes chflags)
+AC_CHECK_FUNCS(getrlimit fsync 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(setlocale nl_langinfo)
AC_CHECK_FUNCS(nanosleep)
AC_CHECK_FUNCS(mlock munlock mlockall munlockall)
+AC_CHECK_FUNCS(memalign posix_memalign)
AC_CHECK_HEADERS(sys/mman.h)
# setbuffer, shmget, shm_open are needed for smbtorture
AC_CHECK_FUNCS(setbuffer shmget shm_open)
-AC_CHECK_FUNCS(makecontext getcontext setcontext swapcontext)
# Find a method of generating a stack trace
AC_CHECK_HEADERS(execinfo.h libexc.h libunwind.h)
],
[
unw_context_t ctx; unw_cursor_t cur;
- char buf[256]; unw_word_t off;
+ char buf[256]; unw_word_t off;
unw_getcontext(&ctx); unw_init_local(&cur, &ctx);
unw_get_proc_name(&cur, buf, sizeof(buf), &off);
],
AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[])
#
-#
+#
#
case "$host_os" in
*linux*)
# Check whether struct stat has timestamps with sub-second resolution.
# At least IRIX and Solaris have these.
#
-# We check that
+# We check that
# all of st_mtim, st_atim and st_ctim exist
# all of the members are in fact of type struct timespec
#
;;
esac
+########################################################
+# Check if attropen() is present if this is Solaris
+case "$host_os" in
+ *solaris*)
+ AC_CHECK_FUNCS(attropen)
+ ;;
+esac
+
########################################################
# Do xattr functions take additional options like on Darwin?
if test x"$ac_cv_func_getxattr" = x"yes" ; then
# this bit needs to be modified for each OS that supports share libs
# You need to specify how to create a shared library and
-# how to compile C code to produce PIC object files
+ # how to compile C code to produce PIC object files
-AC_MSG_CHECKING([ability to build shared libraries])
+ AC_MSG_CHECKING([ability to build shared libraries])
-# and these are for particular systems
-case "$host_os" in
+ # and these are for particular systems
+ case "$host_os" in
*linux*) AC_DEFINE(LINUX,1,[Whether the host os is linux])
BLDSHARED="true"
if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then
- LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined"
+ LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined"
else
- LDSHFLAGS="-shared -Wl,-Bsymbolic"
+ LDSHFLAGS="-shared -Wl,-Bsymbolic"
fi
DYNEXP="-Wl,--export-dynamic"
PICFLAG="-fPIC"
fi
else
PICFLAG="-KPIC"
- ## ${CFLAGS} added for building 64-bit shared
+ ## ${CFLAGS} added for building 64-bit shared
## libs using Sun's Compiler
LDSHFLAGS="-G \${CFLAGS}"
fi
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
;;
- *netbsd* | *freebsd* | *dragonfly* )
+ *netbsd* | *freebsd* | *dragonfly* )
BLDSHARED="true"
LDSHFLAGS="-shared"
DYNEXP="-Wl,--export-dynamic"
SHLD="\${LD}"
if test "${GCC}" = "yes"; then
PICFLAG="-fPIC"
- else
+ else
PICFLAG="-KPIC"
fi
AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
;;
*hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
# Use special PIC flags for the native HP-UX compiler.
- if test $ac_cv_prog_cc_Ae = yes; then
BLDSHARED="true"
SHLD="cc"
LDSHFLAGS="-b -Wl,-B,symbolic,-b,-z"
SONAMEFLAG="-Wl,+h "
PICFLAG="+z"
- elif test "${GCC}" = "yes"; then
+ if test "${GCC}" = "yes"; then
PICFLAG="-fPIC"
+ else
+ PICFLAG="+z"
fi
if test "$host_cpu" = "ia64"; then
SHLIBEXT="so"
BLDSHARED="true"
LDSHFLAGS="-bundle -flat_namespace -undefined suppress"
SHLIBEXT="dylib"
- # Since gcc doesn't fail on unrecognised options, the
- # PIE test incorrectly succeeds. Darwin gcc does not
- # actually support the PIE stuff.
- PIE_LDFLAGS=
- PIE_CFLAGS=
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;;
*)
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;;
-esac
+ esac
if test "$enable_shared" != "yes"; then
BLDSHARED=false
fi
-AC_MSG_RESULT($BLDSHARED)
+ AC_MSG_RESULT($BLDSHARED)
AC_MSG_CHECKING([LDFLAGS])
AC_MSG_RESULT([$LDFLAGS])
AC_MSG_CHECKING([NSSSONAMEVERSIONSUFFIX])
AC_MSG_RESULT([$NSSSONAMEVERSIONSUFFIX])
-AC_CACHE_CHECK([whether building shared libraries actually works],
+AC_CACHE_CHECK([whether building shared libraries actually works],
[ac_cv_shlib_works],[
# try building a trivial shared library
ac_cv_shlib_works=no
AC_DEFINE(COMPILER_SUPPORTS_LL,1,[Whether the compiler supports the LL prefix on long long integers])
fi
-
+
+AC_CACHE_CHECK([for 64 bit time_t],samba_cv_SIZEOF_TIME_T,[
+AC_TRY_RUN([#include <time.h>
+main() { exit((sizeof(time_t) == 8) ? 0 : 1); }],
+samba_cv_SIZEOF_TIME_T=yes,samba_cv_SIZEOF_TIME_T=no,samba_cv_SIZEOF_TIME_T=cross)])
+if test x"$samba_cv_SIZEOF_TIME_T" = x"yes"; then
+ AC_DEFINE(SIZEOF_TIME_T,8,[The size of the 'time_t' type])
+fi
+
AC_CACHE_CHECK([for 64 bit off_t],samba_cv_SIZEOF_OFF_T,[
AC_TRY_RUN([#include <stdio.h>
#include <sys/stat.h>
fi
AC_CACHE_CHECK([if gettimeofday takes tz argument],samba_cv_HAVE_GETTIMEOFDAY_TZ,[
-AC_TRY_RUN([
+AC_TRY_LINK([
#include <sys/time.h>
-#include <unistd.h>
-main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}],
- samba_cv_HAVE_GETTIMEOFDAY_TZ=yes,samba_cv_HAVE_GETTIMEOFDAY_TZ=no,samba_cv_HAVE_GETTIMEOFDAY_TZ=cross)])
+#include <unistd.h>], [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() is available])
+ AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday takes a tz argument])
fi
if test x"$samba_cv_WITH_PROFILE" = x"yes"; then
AC_LIBTESTFUNC(rt, clock_gettime,
[
- AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
- [Whether clock_gettime is available])
- SMB_CHECK_CLOCK_ID(CLOCK_MONOTONIC)
- SMB_CHECK_CLOCK_ID(CLOCK_PROCESS_CPUTIME_ID)
- SMB_CHECK_CLOCK_ID(CLOCK_REALTIME)
- ])
+ AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
+ [Whether clock_gettime is available])
+ SMB_CHECK_CLOCK_ID(CLOCK_MONOTONIC)
+ SMB_CHECK_CLOCK_ID(CLOCK_PROCESS_CPUTIME_ID)
+ SMB_CHECK_CLOCK_ID(CLOCK_REALTIME)
+ ])
fi
AC_TRY_RUN([
#include <sys/types.h>
#include <stdarg.h>
-void foo(const char *format, ...) {
+void foo(const char *format, ...) {
va_list ap;
int len;
char buf[5];
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
+fi
AC_CACHE_CHECK([for ut_user in utmp],samba_cv_HAVE_UT_UT_USER,[
AC_TRY_COMPILE([#include <sys/types.h>
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
+fi
AC_CACHE_CHECK([for ut_id in utmp],samba_cv_HAVE_UT_UT_ID,[
AC_TRY_COMPILE([#include <sys/types.h>
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
+fi
AC_CACHE_CHECK([for ut_host in utmp],samba_cv_HAVE_UT_UT_HOST,[
AC_TRY_COMPILE([#include <sys/types.h>
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
+fi
AC_CACHE_CHECK([for ut_time in utmp],samba_cv_HAVE_UT_UT_TIME,[
AC_TRY_COMPILE([#include <sys/types.h>
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
+fi
AC_CACHE_CHECK([for ut_tv in utmp],samba_cv_HAVE_UT_UT_TV,[
AC_TRY_COMPILE([#include <sys/types.h>
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
+fi
AC_CACHE_CHECK([for ut_type in utmp],samba_cv_HAVE_UT_UT_TYPE,[
AC_TRY_COMPILE([#include <sys/types.h>
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
+fi
AC_CACHE_CHECK([for ut_pid in utmp],samba_cv_HAVE_UT_UT_PID,[
AC_TRY_COMPILE([#include <sys/types.h>
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
+fi
AC_CACHE_CHECK([for ut_exit in utmp],samba_cv_HAVE_UT_UT_EXIT,[
AC_TRY_COMPILE([#include <sys/types.h>
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
+fi
AC_CACHE_CHECK([for ut_addr in utmp],samba_cv_HAVE_UT_UT_ADDR,[
AC_TRY_COMPILE([#include <sys/types.h>
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
+fi
if test x$ac_cv_func_pututline = xyes ; then
AC_CACHE_CHECK([whether pututline returns pointer],samba_cv_PUTUTLINE_RETURNS_UTMP,[
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
+fi
fi
# end utmp details
dnl Check lib and lib32 library variants to cater for IRIX ABI-specific
dnl installation paths. This gets a little tricky since we might have iconv
dnl in both libiconv and in libc. In this case the jm_ICONV test will always
-dnl succeed when the header is found. To counter this, make sure the
+dnl succeed when the header is found. To counter this, make sure the
dnl library directory is there and check the ABI directory first (which
dnl should be harmless on other systems.
dnl For IA64 HPUX systems, the libs are located in lib/hpux32 instead of lib.
if test "$default_dos_charset" != "no" -a \
"$default_dos_charset" != "cross" -a \
- "$default_display_charset" != "no" -a \
+ "$default_display_charset" != "no" -a \
"$default_display_charset" != "cross" -a \
"$default_unix_charset" != "no" -a \
"$default_unix_charset" != "cross"
if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; then
- AC_MSG_WARN([Sufficient support for iconv function was not found.
+ AC_MSG_WARN([Sufficient support for iconv function was not found.
Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!])
AC_DEFINE_UNQUOTED(DEFAULT_DOS_CHARSET,"ASCII",[Default dos charset name])
AC_DEFINE_UNQUOTED(DEFAULT_DISPLAY_CHARSET,"ASCII",[Default display charset name])
AC_CACHE_CHECK([for inotify support],samba_cv_HAVE_INOTIFY,[
AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h)
-AC_CHECK_FUNC(inotify_init)
+AC_CHECK_FUNCS(inotify_init)
AC_HAVE_DECL(__NR_inotify_init, [#include <asm/unistd.h>])
],
samba_cv_HAVE_INOTIFY=yes,
# On IRIX, libfam requires libC, but other FAM implementations
# might not need it.
AC_CHECK_LIB(fam, FAMOpen2,
- [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam"],
+ [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam"],
[samba_cv_HAVE_LIBFAM=no])
if test x"$samba_cv_HAVE_LIBFAM" = x"no" ; then
samba_fam_xtra=-lC
AC_CHECK_LIB_EXT(fam, samba_fam_xtra, FAMOpen2,
- [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam -lC"],
+ [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam -lC"],
[samba_cv_HAVE_LIBFAM=no])
unset samba_fam_xtra
fi
fi
fi
+AC_SUBST(SMB_FAM_LIBS)
+
#################################################
# Check for DMAPI interfaces in libdm/libjfsdm/libxsdm
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-main() {
+main() {
struct stat st;
- char tpl[20]="/tmp/test.XXXXXX";
- int fd = mkstemp(tpl);
+ char tpl[20]="/tmp/test.XXXXXX";
+ int fd = mkstemp(tpl);
if (fd == -1) exit(1);
unlink(tpl);
if (fstat(fd, &st) != 0) exit(1);
dnl
dnl Don't check for 64 bit fcntl locking if we know that the
dnl glibc2.1 broken check has succeeded.
-dnl
+dnl
AC_CACHE_CHECK([for 64 bit fcntl locking],samba_cv_HAVE_STRUCT_FLOCK64,[
AC_TRY_RUN([
samba_cv_HAVE_STAT_ST_BLOCKS=yes,samba_cv_HAVE_STAT_ST_BLOCKS=no,samba_cv_HAVE_STAT_ST_BLOCKS=cross)])
if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
AC_DEFINE(HAVE_STAT_ST_BLOCKS,1,[Whether the stat struct has a st_block property])
-fi
+fi
AC_CACHE_CHECK([for st_blksize in struct stat],samba_cv_HAVE_STAT_ST_BLKSIZE,[
AC_TRY_COMPILE([#include <sys/types.h>
AC_DEFINE(HAVE_STAT_ST_BLKSIZE,1,[Whether the stat struct has a st_blksize property])
fi
+AC_CACHE_CHECK([for st_flags in struct stat],
+ samba_cv_HAVE_STAT_ST_FLAGS,
+ [
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>],
+ [struct stat st; st.st_flags = 0;],
+ samba_cv_HAVE_STAT_ST_FLAGS=yes,
+ samba_cv_HAVE_STAT_ST_FLAGS=no,
+ samba_cv_HAVE_STAT_ST_FLAGS=cross)
+ ])
+
+if test x"$samba_cv_HAVE_STAT_ST_FLAGS" = x"yes"; then
+ AC_DEFINE(HAVE_STAT_ST_FLAGS, 1,
+ [Whether the stat struct has a st_flags member])
+fi
+
case "$host_os" in
*linux*)
AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[
else
AC_MSG_RESULT(no)
fi
-
+
# check for afs.h
have_afs_headers=no
AC_CHECK_HEADERS(afs.h afs/afs.h)
# first test for ldap.h and lber.h
# (ldap.h is required for this test)
AC_CHECK_HEADERS(ldap.h lber.h)
-
+
if test x"$ac_cv_header_ldap_h" != x"yes"; then
if test x"$with_ldap_support" = x"yes"; then
AC_MSG_ERROR(ldap.h is needed for LDAP support)
fi
##################################################################
- # HP/UX does not have ber_tag_t, disable LDAP there
- AC_CHECK_TYPE(ber_tag_t,,,[#include <lber.h>])
- if test x"$ac_cv_type_ber_tag_t" != x"yes"; then
- if test x"$with_ldap_support" = x"yes"; then
- AC_MSG_ERROR(ber_tag_t is needed for LDAP support)
- else
+ # HP/UX does not have ber_tag_t in lber.h - it must be configured as
+ # unsigned int in include/includes.h
+ case $host_os in
+ *hpux*)
AC_MSG_WARN(ber_tag_t is needed for LDAP support)
- fi
- with_ldap_support=no
- fi
+ AC_MSG_WARN(ber_tag_t must be configured in includes.h for hpux)
+ with_ldap_support=yes
+ ;;
+ *)
+ AC_CHECK_TYPE(ber_tag_t,,,[#include <lber.h>])
+ if test x"$ac_cv_type_ber_tag_t" != x"yes"; then
+ if test x"$with_ldap_support" = x"yes"; then
+ AC_MSG_ERROR(ber_tag_t is needed for LDAP support)
+ else
+ AC_MSG_WARN(ber_tag_t is needed for LDAP support)
+ fi
+ with_ldap_support=no
+ fi
+ ;;
+ esac
fi
if test x"$with_ldap_support" != x"no"; then
# this test must be before the libldap test
AC_CHECK_LIB_EXT(lber, LDAP_LIBS, ber_scanf)
+ #######################################################
+ # if we have LBER_OPT_LOG_PRINT_FN, we can intercept
+ # ldap logging and print it out in the samba logs
+ AC_CACHE_CHECK([for LBER_OPT_LOG_PRINT_FN],
+ samba_cv_HAVE_LBER_OPT_LOG_PRINT_FN,
+ [AC_TRY_COMPILE([#include <lber.h>],
+ [int val = LBER_OPT_LOG_PRINT_FN;],
+ samba_cv_HAVE_LBER_OPT_LOG_PRINT_FN=yes,
+ samba_cv_HAVE_LBER_OPT_LOG_PRINT_FN=no)])
+
+ if test x"$samba_cv_HAVE_LBER_OPT_LOG_PRINT_FN" = x"yes"; then
+ AC_DEFINE(HAVE_LBER_LOG_PRINT_FN, 1,
+ [Support for LDAP/LBER logging interception])
+ fi
+
########################################################
# now see if we can find the ldap libs in standard paths
AC_CHECK_LIB_EXT(ldap, LDAP_LIBS, ldap_init)
AC_CACHE_CHECK(whether ldap_set_rebind_proc takes 3 arguments, smb_ldap_cv_ldap_set_rebind_proc, [
AC_TRY_COMPILE([
#include <lber.h>
- #include <ldap.h>],
- [ldap_set_rebind_proc(0, 0, 0);],
- [smb_ldap_cv_ldap_set_rebind_proc=3],
+ #include <ldap.h>],
+ [ldap_set_rebind_proc(0, 0, 0);],
+ [smb_ldap_cv_ldap_set_rebind_proc=3],
[smb_ldap_cv_ldap_set_rebind_proc=2]
- )
+ )
])
-
+
AC_DEFINE_UNQUOTED(LDAP_SET_REBIND_PROC_ARGS, $smb_ldap_cv_ldap_set_rebind_proc, [Number of arguments to ldap_set_rebind_proc])
AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS)
-
+
if test x"$ac_cv_lib_ext_ldap_ldap_init" = x"yes"; then
AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available])
CPPFLAGS="$CPPFLAGS -DLDAP_DEPRECATED"
default_shared_modules="$default_shared_modules";
SMBLDAP="lib/smbldap.o"
SMBLDAPUTIL="lib/smbldap_util.o"
- if test x"$ac_cv_func_ext_ldap_initialize" != x"yes"; then
- AC_MSG_WARN(Disabling ldb_ldap support (requires ldap_initialize))
- else
- AC_DEFINE(HAVE_LDB_LDAP,1,[Whether ldb_ldap is available])
- LDBLDAP="lib/ldb/ldb_ldap/ldb_ldap.o"
- fi
with_ldap_support=yes
AC_MSG_CHECKING(whether LDAP support is used)
AC_MSG_RESULT(yes)
else
AC_MSG_WARN(libldap is needed for LDAP support)
fi
-
+
LDAP_LIBS=""
with_ldap_support=no
fi
# Check to see whether there is enough LDAP functionality to be able
# to build AD support.
+# HPUX only has ldap_init; ok, we take care of this in smbldap.c
+case "$host_os" in
+ *hpux*)
+ AC_CHECK_FUNC_EXT(ldap_init,$LDAP_LIBS)
+
+ if test x"$ac_cv_func_ext_ldap_init" != x"yes"; then
+ if test x"$with_ads_support" = x"yes"; then
+ AC_MSG_ERROR(Active Directory support on HPUX requires ldap_init)
+ elif test x"$with_ads_support" = x"auto"; then
+ AC_MSG_WARN(Disabling Active Directory support (requires ldap_init on HPUX))
+ with_ads_support=no
+ fi
+ fi
+ ;;
+ *)
AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS)
if test x"$ac_cv_func_ext_ldap_initialize" != x"yes"; then
with_ads_support=no
fi
fi
+ ;;
+esac
+
AC_CHECK_FUNC_EXT(ldap_add_result_entry,$LDAP_LIBS)
# Do no harm to the values of CFLAGS and LIBS while testing for
# Kerberos support.
-
+
if test x$FOUND_KRB5 = x"no"; then
#################################################
# check for location of Kerberos 5 install
LDFLAGS="";export LDFLAGS
KRB5_LIBS="`$KRB5CONFIG --libs gssapi`"
KRB5_LDFLAGS="`$KRB5CONFIG --libs gssapi | sed s/-lgss.*//`"
- KRB5_CFLAGS="`$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`"
+ KRB5_CFLAGS="`$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`"
KRB5_CPPFLAGS="`$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`"
CFLAGS=$ac_save_CFLAGS;export CFLAGS
LDFLAGS=$ac_save_LDFLAGS;export LDFLAGS
else
AC_MSG_RESULT(no. Fallback to previous krb5 detection strategy)
fi
-
+
if test x$FOUND_KRB5 = x"no"; then
#################################################
# see if this box has the SuSE location for the heimdal krb implementation
# Turn off AD support and restore CFLAGS and LIBS variables
with_ads_support="no"
-
+
CFLAGS=$ac_save_CFLAGS
CPPFLAGS=$ac_save_CPPFLAGS
LDFLAGS=$ac_save_LDFLAGS
fi
+ AC_CHECK_HEADERS(krb5/locate_plugin.h)
fi
# Now we have determined whether we really want ADS support
AC_CHECK_FUNC_EXT(krb5_set_default_tgs_ktypes, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_principal2salt, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_use_enctype, $KRB5_LIBS)
- AC_CHECK_FUNC_EXT(krb5_string_to_key, $KRB5_LIBS)
+ AC_CHECK_FUNC_EXT(krb5_string_to_key, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_get_pw_salt, $KRB5_LIBS)
- AC_CHECK_FUNC_EXT(krb5_string_to_key_salt, $KRB5_LIBS)
+ AC_CHECK_FUNC_EXT(krb5_string_to_key_salt, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_auth_con_setkey, $KRB5_LIBS)
- AC_CHECK_FUNC_EXT(krb5_auth_con_setuseruserkey, $KRB5_LIBS)
+ AC_CHECK_FUNC_EXT(krb5_auth_con_setuseruserkey, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_locate_kdc, $KRB5_LIBS)
- AC_CHECK_FUNC_EXT(krb5_get_permitted_enctypes, $KRB5_LIBS)
- AC_CHECK_FUNC_EXT(krb5_get_default_in_tkt_etypes, $KRB5_LIBS)
+ AC_CHECK_FUNC_EXT(krb5_get_permitted_enctypes, $KRB5_LIBS)
+ AC_CHECK_FUNC_EXT(krb5_get_default_in_tkt_etypes, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_free_data_contents, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_principal_get_comp_string, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_free_unparsed_name, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_crypto_destroy, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_decode_ap_req, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(free_AP_REQ, $KRB5_LIBS)
+ AC_CHECK_FUNC_EXT(krb5_verify_checksum, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_c_verify_checksum, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_principal_compare_any_realm, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_parse_name_norealm, $KRB5_LIBS)
[Whether the krb5_ticket structure contains the kvno and enctype])
fi
+ AC_CACHE_CHECK(whether krb5_get_init_creds_opt_free takes a context argument,
+ smb_krb5_creds_opt_free_context,
+ [
+ AC_TRY_COMPILE([
+ #include <krb5.h>],
+ [
+ krb5_context ctx;
+ krb5_get_init_creds_opt *opt = NULL;
+ krb5_get_init_creds_opt_free(ctx, opt);
+ ],
+ [smb_krb5_creds_opt_free_context=yes],
+ [smb_krb5_creds_opt_free_context=no]
+ )
+ ])
+
+ if test x"$smb_krb5_creds_opt_free_context" = x"yes" ; then
+ AC_DEFINE(KRB5_CREDS_OPT_FREE_REQUIRES_CONTEXT, 1,
+ [Whether krb5_get_init_creds_opt_free takes a context argument])
+ fi
+
AC_CACHE_CHECK(whether krb5_verify_checksum takes 7 arguments, smb_krb5_verify_checksum, [
AC_TRY_COMPILE([
- #include <krb5.h>],
- [krb5_verify_checksum(0, 0, 0, 0, 0, 0, 0);],
- [smb_krb5_verify_checksum=7],
- [smb_krb5_verify_checksum=6],
- )
+ #include <krb5.h>],
+ [krb5_verify_checksum(0, 0, 0, 0, 0, 0, 0);],
+ [smb_krb5_verify_checksum=7],
+ [smb_krb5_verify_checksum=6],
+ )
])
AC_DEFINE_UNQUOTED(KRB5_VERIFY_CHECKSUM_ARGS, $smb_krb5_verify_checksum, [Number of arguments to krb5_verify_checksum])
[Whether the krb5_address struct has a addr_type property])
fi
- AC_CACHE_CHECK([for enc_part2 in krb5_ticket],
+ AC_CACHE_CHECK([for enc_part2 in krb5_ticket],
samba_cv_HAVE_KRB5_TKT_ENC_PART2,
[AC_TRY_COMPILE([#include <krb5.h>],
[krb5_ticket tkt; tkt.enc_part2->authorization_data[0]->contents = NULL;],
AC_DEFINE(HAVE_KRB5_KU_OTHER_CKSUM,1,
[Whether KRB5_KU_OTHER_CKSUM is available])
fi
-
+
AC_CACHE_CHECK([for KRB5_KEYUSAGE_APP_DATA_CKSUM],
samba_cv_HAVE_KRB5_KEYUSAGE_APP_DATA_CKSUM,[
AC_TRY_COMPILE([#include <krb5.h>],
[Whether the type krb5_addresses type exists])
fi
+ AC_CACHE_CHECK([whether krb5_mk_error takes 3 arguments MIT or 9 Heimdal],
+ samba_cv_HAVE_SHORT_KRB5_MK_ERROR_INTERFACE, [
+ AC_TRY_COMPILE([#include <krb5.h>],
+ [
+ krb5_mk_error(0,0,0);],
+ samba_cv_HAVE_SHORT_KRB5_MK_ERROR_INTERFACE=yes,
+ samba_cv_HAVE_SHORT_KRB5_MK_ERROR_INTERFACE=no)])
+
+ if test x"$samba_cv_HAVE_SHORT_KRB5_MK_ERROR_INTERFACE" = x"yes"; then
+ AC_DEFINE(HAVE_SHORT_KRB5_MK_ERROR_INTERFACE,1,
+ [whether krb5_mk_error takes 3 arguments MIT or 9 Heimdal])
+ fi
+
+
+ AC_CACHE_CHECK([for krb5_principal_get_realm],
+ samba_cv_HAVE_KRB5_PRINCIPAL_GET_REALM,[
+ AC_TRY_LINK([#include <krb5.h>],
+ [krb5_context ctx = NULL; krb5_principal princ = NULL; const char *str = krb5_principal_get_realm(ctx, princ);],
+ samba_cv_HAVE_KRB5_PRINCIPAL_GET_REALM=yes,
+ samba_cv_HAVE_KRB5_PRINCIPAL_GET_REALM=no)])
+
+ if test x"$samba_cv_HAVE_KRB5_PRINCIPAL_GET_REALM" = x"yes"; then
+ AC_DEFINE(HAVE_KRB5_PRINCIPAL_GET_REALM,1,
+ [Whether the function krb5_principal_get_realm is defined])
+ fi
+
+ AC_CACHE_CHECK([for krb5_princ_realm],
+ samba_cv_HAVE_KRB5_PRINC_REALM,[
+ AC_TRY_LINK([#include <krb5.h>],
+ [krb5_context ctx = NULL; krb5_principal princ = NULL; const char *str = krb5_princ_realm(ctx, princ)->data;],
+ samba_cv_HAVE_KRB5_PRINC_REALM=yes,
+ samba_cv_HAVE_KRB5_PRINC_REALM=no)])
+
+ if test x"$samba_cv_HAVE_KRB5_PRINC_REALM" = x"yes"; then
+ AC_DEFINE(HAVE_KRB5_PRINC_REALM,1,
+ [Whether the macro krb5_princ_realm is defined])
+ fi
+
#
#
# Now the decisions whether we can support krb5
- #
+ #
# NOTE: all tests should be done before this block!
#
#
AC_REMOVE_DEFINE(HAVE_GSSAPI_GSSAPI_GENERIC_H)
AC_REMOVE_DEFINE(HAVE_GSSAPI_GSSAPI_H)
KRB5_LIBS=""
- with_ads_support=no
+ with_ads_support=no
fi
AC_MSG_CHECKING(whether Active Directory and krb5 support is used)
AC_MSG_RESULT([$use_ads])
# then test for uuid.h (necessary to generate unique DNS keynames
# (uuid.h is required for this test)
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)
# Now see if we can find the uuid libs in standard paths
# On some systems, the uuid API is in libc, so we have to
# be careful not to insert a spurious -luuid.
-
+
UUID_LIBS=""
AC_LIBTESTFUNC(uuid, uuid_generate,
[
#include <security/pam_appl.h>
#endif
]])
- if test x"$ac_cv_header_security_pam_modules_h" = x"no"; then
+ if test x"$ac_cv_header_security_pam_modules_h" = x"no"; then
if test x"${try_pam}" = x"yes";then
AC_MSG_ERROR([--with-pam=yes but security/pam_modules.h not found])
- fi
+ fi
create_pam_modules=no
- fi
+ fi
if test x"$use_pam" = x"yes"; then
- AC_DEFINE(WITH_PAM,1,[Whether to include PAM support])
+ AC_DEFINE(WITH_PAM,1,[Whether to include PAM support])
AC_DEFINE(HAVE_LIBPAM,1,[Whether libpam is available])
AUTH_LIBS="$AUTH_LIBS $PAM_LIBS"
- with_pam_for_crypt=yes
+ with_pam_for_crypt=yes
if test x"$create_pam_modules" = x"yes"; then
AC_DEFINE(WITH_PAM_MODULES,1,[Whether to include PAM MODULES support])
fi
#################################################
-# check for a NISPLUS_HOME support
+# 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)],
fi
fi
-# if we have struct dqblk .dqb_fsoftlimit instead of .dqb_isoftlimit on IRIX
+# if we have struct dqblk .dqb_fsoftlimit instead of .dqb_isoftlimit on IRIX
AC_CACHE_CHECK([if struct dqblk has .dqb_fsoftlimit],samba_cv_HAVE_DQB_FSOFTLIMIT, [
AC_TRY_COMPILE([
#include "confdefs.h"
if test x"$samba_cv_WITH_SYS_QUOTAS" = x"yes"; then
if test x"$samba_cv_SYSQUOTA_FOUND" != x"yes"; then
- # if --with-sys-quotas=yes then build it
+ # if --with-sys-quotas=yes then build it
# you have can use the get/set quota command smb.conf
# options then
samba_cv_SYSQUOTA_FOUND=auto
fi
if test x"$samba_cv_TRY_SYS_QUOTAS" != x"yes"; then
- # if --with-sys-quotas=yes then build it
+ # if --with-sys-quotas=yes then build it
# you have can use the get/set quota command smb.conf
# options then
samba_cv_TRY_SYS_QUOTAS=auto
])
if test x"$samba_cv_SYSQUOTA_WORKS" = x"yes"; then
AC_MSG_CHECKING(whether to use the new lib/sysquotas.c interface)
- if test x"$samba_cv_TRY_SYS_QUOTAS" != x"no"; then
+ if test x"$samba_cv_TRY_SYS_QUOTAS" != x"no"; then
AC_DEFINE(WITH_QUOTAS,1,[Whether to use disk quota support])
AC_DEFINE(HAVE_SYS_QUOTAS,1,[Whether the new lib/sysquotas.c interface can be used])
samba_cv_WE_USE_SYS_QUOTAS=yes
AC_ARG_WITH(libmsrpc,
[ --with-libmsrpc Build the libmsrpc shared library (default=yes if shared libs supported)],
[ case "$withval" in
- no)
+ no)
AC_MSG_RESULT(no)
;;
*)
AC_ARG_WITH(libaddns,
[ --with-libaddns Build the libaddns shared library (default=yes if shared libs supported)],
[ case "$withval" in
- no)
+ no)
AC_MSG_RESULT(no)
;;
*)
AC_ARG_WITH(libsmbclient,
[ --with-libsmbclient Build the libsmbclient shared library (default=yes if shared libs supported)],
[ case "$withval" in
- no)
+ no)
AC_MSG_RESULT(no)
;;
*)
# check for cluster extensions
AC_MSG_CHECKING(whether to include cluster support)
-AC_ARG_WITH(cluster-support,
+AC_ARG_WITH(cluster-support,
[ --with-cluster-support Enable cluster extensions (default=no)])
if test "x$with_cluster_support" = "xyes"; then
AC_DEFINE(CLUSTER_SUPPORT,1,[Whether to enable cluster extensions])
AC_MSG_RESULT(Using FreeBSD posix ACLs)
AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether FreeBSD POSIX ACLs are available])
AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
+ default_static_modules="$default_static_modules vfs_posixacl"
;;
*linux*)
AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"])
AC_MSG_RESULT(yes)
)
+############################################
+# See if we have the Linux readahead syscall.
+
+AC_CACHE_CHECK([for Linux readahead],
+ samba_cv_HAVE_LINUX_READAHEAD,[
+ AC_TRY_LINK([
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <fcntl.h>],
+ [ssize_t err = readahead(0,0,0x80000);],
+ samba_cv_HAVE_LINUX_READAHEAD=yes,
+ samba_cv_HAVE_LINUX_READAHEAD=no)])
+
+if test x"$samba_cv_HAVE_LINUX_READAHEAD" = x"yes"; then
+ AC_DEFINE(HAVE_LINUX_READAHEAD,1,
+ [Whether Linux readahead is available])
+fi
+
+############################################
+# See if we have the posix_fadvise syscall.
+
+AC_CACHE_CHECK([for posix_fadvise],
+ samba_cv_HAVE_POSIX_FADVISE,[
+ AC_TRY_LINK([
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <fcntl.h>],
+ [ssize_t err = posix_fadvise(0,0,0x80000,POSIX_FADV_WILLNEED);],
+ samba_cv_HAVE_POSIX_FADVISE=yes,
+ samba_cv_HAVE_POSIX_FADVISE=no)])
+
+if test x"$samba_cv_HAVE_POSIX_FADVISE" = x"yes"; then
+ AC_DEFINE(HAVE_POSIX_FADVISE,1,
+ [Whether posix_fadvise is available])
+fi
+
+
#################################################
# Check whether winbind is supported on this platform. If so we need to
WINBIND_NSS_LDSHFLAGS=$LDSHFLAGS
NSSSONAMEVERSIONSUFFIX=""
+SMB_KRB5_LOCATOR="bin/smb_krb5_locator.$SHLIBEXT"
+
case "$host_os" in
*linux*)
NSSSONAMEVERSIONSUFFIX=".2"
AC_SUBST(WINBIND_NSS_EXTRA_LIBS)
AC_SUBST(NSSSONAMEVERSIONSUFFIX)
+AC_SUBST(SMB_KRB5_LOCATOR)
+
# Check the setting of --with-winbind
AC_ARG_WITH(winbind,
[ --with-winbind Build winbind (default, if supported by OS)],
-[
+[
case "$withval" in
yes)
HAVE_WINBIND=yes
WINBIND_WINS_NSS=""
fi
+if test $BLDSHARED = true -a x"$HAVE_WINBIND" = x"yes"; then
+ NSS_MODULES="${WINBIND_NSS} ${WINBIND_WINS_NSS}"
+fi
+
if test x"$HAVE_WINBIND" = x"yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_WINBIND,1,[Whether to build winbind])
EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd\$(EXEEXT)"
- if test $BLDSHARED = true; then
- SHLIB_PROGS="$SHLIB_PROGS $WINBIND_NSS $WINBIND_WINS_NSS"
-
- if test x"$create_pam_modules" = x"yes"; then
- PAM_MODULES="$PAM_MODULES pam_winbind"
- INSTALL_PAM_MODULES="installpammodules"
- UNINSTALL_PAM_MODULES="uninstallpammodules"
- fi
+ if test $BLDSHARED = true -a x"$create_pam_modules" = x"yes"; then
+ PAM_MODULES="$PAM_MODULES pam_winbind"
+ INSTALL_PAM_MODULES="installpammodules"
+ UNINSTALL_PAM_MODULES="uninstallpammodules"
fi
else
AC_MSG_RESULT(no$winbind_no_reason)
[#include <nss_dbdefs.h>])
# Solaris has some extra fields in struct passwd that need to be
-# initialised otherwise nscd crashes.
-
+# initialised otherwise nscd crashes.
+
AC_CHECK_MEMBER(struct passwd.pw_comment,
AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),,
[#include <pwd.h>])
#################################################
-# Check to see if we should use the included popt
+# Check to see if we should use the included popt
AC_ARG_WITH(included-popt,
[ --with-included-popt use bundled popt library, not from system],
-[
+[
case "$withval" in
yes)
INCLUDED_POPT=yes
FLAGS1="-I\$(srcdir)/popt"
else
AC_MSG_RESULT(no)
- BUILD_POPT=""
+ BUILD_POPT=""
POPTLIBS="-lpopt"
fi
AC_SUBST(BUILD_POPT)
AC_SUBST(FLAGS1)
#################################################
-# Check to see if we should use the included iniparser
+# Check to see if we should use the included iniparser
AC_ARG_WITH(included-iniparser,
[ --with-included-iniparser use bundled iniparser library, not from system],
-[
+[
case "$withval" in
yes)
INCLUDED_INIPARSER=yes
dnl Always built these modules static
MODULE_rpc_spoolss=STATIC
-MODULE_rpc_srvsvc=STATIC
+MODULE_rpc_srv=STATIC
MODULE_idmap_tdb=STATIC
MODULE_idmap_passdb=STATIC
MODULE_idmap_nss=STATIC
-MODULE_idmap_passdb=STATIC
-MODULE_idmap_nss=STATIC
-
MODULE_nss_info_template=STATIC
AC_ARG_WITH(static-modules,
done
fi ])
-SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o passdb/pdb_nds.o, "bin/ldapsam.$SHLIBEXT", PDB,
+SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o passdb/pdb_nds.o, "bin/ldapsam.$SHLIBEXT", PDB,
[ PASSDB_LIBS="$PASSDB_LIBS $LDAP_LIBS" ] )
SMB_MODULE(pdb_smbpasswd, passdb/pdb_smbpasswd.o, "bin/smbpasswd.$SHLIBEXT", PDB)
SMB_MODULE(pdb_tdbsam, passdb/pdb_tdb.o, "bin/tdbsam.$SHLIBEXT", PDB)
SMB_MODULE(rpc_lsa, \$(RPC_LSA_OBJ), "bin/librpc_lsarpc.$SHLIBEXT", RPC)
-SMB_MODULE(rpc_winreg, \$(RPC_REG_OBJ), "bin/librpc_winreg.$SHLIBEXT", RPC)
-SMB_MODULE(rpc_initshutdown, \$(RPC_INITSHUTDOWN_OBJ), "bin/librpc_initshutdown.$SHLIBEXT", RPC)
+SMB_MODULE(rpc_reg, \$(RPC_REG_OBJ), "bin/librpc_reg.$SHLIBEXT", RPC)
SMB_MODULE(rpc_lsa_ds, \$(RPC_LSA_DS_OBJ), "bin/librpc_lsa_ds.$SHLIBEXT", RPC)
SMB_MODULE(rpc_wkssvc, \$(RPC_WKS_OBJ), "bin/librpc_wkssvc.$SHLIBEXT", RPC)
SMB_MODULE(rpc_svcctl, \$(RPC_SVCCTL_OBJ), "bin/librpc_svcctl.$SHLIBEXT", RPC)
SMB_MODULE(rpc_ntsvcs, \$(RPC_NTSVCS_OBJ), "bin/librpc_ntsvcs.$SHLIBEXT", RPC)
SMB_MODULE(rpc_net, \$(RPC_NETLOG_OBJ), "bin/librpc_NETLOGON.$SHLIBEXT", RPC)
SMB_MODULE(rpc_netdfs, \$(RPC_DFS_OBJ), "bin/librpc_netdfs.$SHLIBEXT", RPC)
-SMB_MODULE(rpc_srvsvc, \$(RPC_SVC_OBJ), "bin/librpc_srvsvc.$SHLIBEXT", RPC)
+SMB_MODULE(rpc_srv, \$(RPC_SVC_OBJ), "bin/librpc_svc.$SHLIBEXT", RPC)
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_echo.$SHLIBEXT", RPC)
-SMB_MODULE(rpc_unixinfo, \$(RPC_UNIXINFO_OBJ), "bin/librpc_unixinfo.$SHLIBEXT", RPC)
+SMB_MODULE(rpc_echo, \$(RPC_ECHO_OBJ), "bin/librpc_echo.$SHLIBEXT", RPC)
SMB_SUBSYSTEM(RPC,smbd/server.o)
SMB_MODULE(idmap_ldap, nsswitch/idmap_ldap.o, "bin/ldap.$SHLIBEXT", IDMAP)
SMB_MODULE(vfs_prealloc, \$(VFS_PREALLOC_OBJ), "bin/prealloc.$SHLIBEXT", VFS)
SMB_MODULE(vfs_commit, \$(VFS_COMMIT_OBJ), "bin/commit.$SHLIBEXT", VFS)
SMB_MODULE(vfs_gpfs, \$(VFS_GPFS_OBJ), "bin/gpfs.$SHLIBEXT", VFS)
+SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), "bin/readahead.$SHLIBEXT", VFS)
SMB_MODULE(vfs_notify_fam, \$(VFS_NOTIFY_FAM_OBJ), "bin/notify_fam.$SHLIBEXT", VFS)
SMB_SUBSYSTEM(VFS,smbd/vfs.o)
# Stuff the smbd-only libraries at the end of the smbd link
# path (if we have them).
-SMBD_LIBS="$samba_fam_libs $samba_dmapi_libs"
+SMBD_LIBS="$samba_dmapi_libs"
AC_SUBST(SMBD_LIBS)
AC_OUTPUT(include/stamp-h Makefile script/findsmb smbadduser script/gen-8bit-gap.sh script/installbin.sh script/uninstallbin.sh)