X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=source%2Fconfigure.in;h=6fb46874e91786c692c264c7a38d26a8c602a5fc;hb=e5b3c08;hp=b938812812c578be8689da772020fe2e6c7be392;hpb=44365130ce794e442f52ec7cf3fc51065f713c5f;p=jerry%2Fsamba.git diff --git a/source/configure.in b/source/configure.in index b93881281..6fb46874e 100644 --- a/source/configure.in +++ b/source/configure.in @@ -6,12 +6,29 @@ AC_INIT(include/includes.h) AC_CONFIG_HEADER(include/config.h) AC_DEFINE(CONFIG_H_IS_FROM_SAMBA,1,[Marker for samba's config.h]) +case "$PATH" in + */usr/ucb*) + AC_MSG_WARN([\$PATH contains /usr/ucb - build errors may follow]) + ;; +esac + 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 @@ -163,6 +180,20 @@ AC_ARG_WITH(logfilebase, ;; esac]) + +################################################# +# set ctdb source directory location +AC_ARG_WITH(ctdb, +[ --with-ctdb=DIR Where to find ctdb sources], +[ case "$withval" in + yes|no) + AC_MSG_WARN([--with-ctdb called without argument]) + ;; + * ) + ctdbdir="$withval" + ;; + esac]) + ################################################# # set lib directory location AC_ARG_WITH(libdir, @@ -248,6 +279,7 @@ AC_SUBST(configdir) AC_SUBST(lockdir) AC_SUBST(piddir) AC_SUBST(logfilebase) +AC_SUBST(ctdbdir) AC_SUBST(privatedir) AC_SUBST(swatdir) AC_SUBST(bindir) @@ -259,9 +291,10 @@ dnl Unique-to-Samba variables we'll be playing with. AC_SUBST(SAMBA_CPPFLAGS) AC_SUBST(SHELL) AC_SUBST(LDSHFLAGS) -AC_SUBST(MODULE_EXPORTS) AC_SUBST(SONAMEFLAG) AC_SUBST(SHLD) +AC_SUBST(MODULE_EXPORTS) +AC_SUBST(DSO_EXPORTS) AC_SUBST(HOST_OS) AC_SUBST(PICFLAG) AC_SUBST(PIE_CFLAGS) @@ -271,10 +304,6 @@ AC_SUBST(INSTALLLIBCMD_SH) AC_SUBST(INSTALLLIBCMD_A) AC_SUBST(UNINSTALLLIBCMD_SH) AC_SUBST(UNINSTALLLIBCMD_A) -AC_SUBST(INSTALL_LIBMSRPC) -AC_SUBST(UNINSTALL_LIBMSRPC) -AC_SUBST(LIBMSRPC_SHARED) -AC_SUBST(LIBMSRPC) AC_SUBST(INSTALL_LIBADDNS) AC_SUBST(UNINSTALL_LIBADDNS) AC_SUBST(LIBADDNS_SHARED) @@ -332,6 +361,23 @@ AC_LIBREPLACE_CC_CHECKS m4_include(lib/socket_wrapper/config.m4) +SWAT_SBIN_TARGETS='bin/swat$(EXEEXT)' +SWAT_INSTALL_TARGETS=installswat + +AC_ARG_ENABLE(swat, +[ --enable-swat Build the SWAT tool (default=yes)], +[ + case "$enable_swat" in + no) + SWAT_SBIN_TARGETS='' + SWAT_INSTALL_TARGETS='' + ;; + esac +]) + +AC_SUBST(SWAT_SBIN_TARGETS) +AC_SUBST(SWAT_INSTALL_TARGETS) + ################################################# # set prefix for 'make test' selftest_prefix="./" @@ -348,35 +394,6 @@ AC_ARG_WITH(selftest-prefix, esac ]) -AC_ARG_ENABLE(launchd, -[ --enable-launchd Support running under launchd (default=auto)]) - -if test x"$enable_launchd" != x"no" ; then - AC_CACHE_CHECK([whether to include launchd support], - samba_cv_launchd_support, - [ - AC_TRY_COMPILE( - [ -#include - ], - [ - launchd_msg(NULL); - launchd_data_get_fd(NULL); - ], - samba_cv_launchd_support=yes, - samba_cv_launchd_support=no) - ]) - - if test x"$samba_cv_launchd_support" = x"yes" ; then - AC_DEFINE(WITH_LAUNCHD_SUPPORT, 1, - [Whether launchd support should be enabled]) - else - if test x"$enable_launchd" = x"yes" ; then - AC_ERROR(launchd support is not available) - fi - fi -fi - ################################################# # set path of samba4's smbtorture smbtorture4_path="" @@ -399,7 +416,19 @@ AC_ARG_WITH(smbtorture4_path, AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)], [if eval "test x$enable_developer = xyes"; then developer=yes - DEVELOPER_CFLAGS="-gstabs -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER" + fi]) + +AC_ARG_ENABLE(krb5developer, [ --enable-krb5developer Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)], + [if eval "test x$enable_krb5developer = xyes"; then + developer=yes + krb5_developer=yes + fi]) + +# Probe the gcc version for extra CFLAGS. We always stash these in +# DEVELOPER_CFLAGS, so that you can turn them on and off with a simple +# Makefile edit, avoiding the need to re-run configure. +if test x"$ac_cv_prog_gcc" = x"yes" ; then + DEVELOPER_CFLAGS="-gstabs -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER" # Add -Wdeclaration-after-statement if compiler supports it AC_CACHE_CHECK( [that the C compiler understands -Wdeclaration-after-statement], @@ -412,12 +441,12 @@ AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings a samba_cv_HAVE_Wdeclaration_after_statement=yes, samba_cv_HAVE_Wdeclaration_after_statement=no, samba_cv_HAVE_Wdeclaration_after_statement=cross) - ]) - if test x"$samba_cv_HAVE_Wdeclaration_after_statement" = x"yes"; then + + if test x"$samba_cv_HAVE_Wdeclaration_after_statement" = x"yes"; then DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wdeclaration-after-statement" - fi - # here + fi + #-Werror-implicit-function-declaration AC_CACHE_CHECK( [that the C compiler understands -Werror-implicit-function-declaration], @@ -434,13 +463,13 @@ AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings a if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Werror-implicit-function-declaration" fi - fi]) -AC_ARG_ENABLE(krb5developer, [ --enable-krb5developer Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)], - [if eval "test x$enable_krb5developer = xyes"; then - developer=yes - CFLAGS="${CFLAGS} -gstabs -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER" - fi]) + # krb5developer is like developer, except we don't get + # -Wstrict-prototypes. + if test x"$krb5_developer" != x"$yes" ; then + DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Wstrict-prototypes" + fi +fi AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc Enable heap debugging [default=no]]) @@ -497,6 +526,9 @@ if test "$ac_cv_prog_gnu_ld" = "yes"; then if test "$ac_cv_gnu_ld_date" -lt 20030217; then ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes fi + if test "$ac_cv_gnu_ld_date" -gt 20030101; then + ac_cv_gnu_ld_version_script=yes + fi else AC_MSG_CHECKING(GNU ld release version) changequote(,)dnl @@ -512,6 +544,9 @@ if test "$ac_cv_prog_gnu_ld" = "yes"; then if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes fi + if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_l= d_vernr_major"=2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then + ac_cv_gnu_ld_version_script=yes + fi fi fi @@ -591,35 +626,7 @@ if test x"$SMB_BUILD_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then PIDL_ARGS="$PIDL_ARGS --uint-enums" fi -############################################ -# Check whether we can do automatic dependency tracking - -m4_include(m4/substnot.m4) -m4_include(m4/cond.m4) -m4_include(m4/make.m4) -m4_include(m4/depout.m4) -m4_include(m4/lead-dot.m4) -m4_include(m4/check_gnu_make.m4) -m4_include(m4/depend.m4) - -# Using the dependency files requires GNU make until someone adds support -# for Makefile includes for other make implementations. Note that -# CHECK_GNU_MAKE() can find a non-default make. -CHECK_GNU_MAKE() -if test "x$_cv_gnu_make_command" != "x" -a \ - x`which make` = x`which "$_cv_gnu_make_command"` ; then - AC_SUBST(MAKE, $_cv_gnu_make_command) -else - # If GNU make is not the default, don't enable GNU-isms because we can't - # guarantee that GNU make will actually be the make that is invoked. - ifGNUmake='#' -fi - -AM_DEP_TRACK() -_AM_DEPENDENCIES(CC) - -############################################ -# Figure out the flags to support named structure initializers +dnl Figure out the flags to support named structure initializers LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_ERROR([c99 structure initializer are not supported])]) @@ -639,6 +646,10 @@ UNAME_P=`(uname -p) 2>/dev/null` || UNAME_P="unknown" AC_MSG_CHECKING(uname -p) AC_MSG_RESULT(${UNAME_P}) +UNAME_I=`(uname -i) 2>/dev/null` || UNAME_I="unknown" +AC_MSG_CHECKING(uname -i) +AC_MSG_RESULT(${UNAME_I}) + dnl Add #include for broken IRIX header files case "$host_os" in *irix6*) @@ -665,7 +676,7 @@ AC_SUBST(DYNEXP) 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 rpc_epmapper 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_winreg rpc_initshutdown rpc_lsa_ds rpc_wkssvc rpc_svcctl2 rpc_ntsvcs rpc_net rpc_netdfs rpc_srvsvc2 rpc_spoolss rpc_eventlog2 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 vfs_readahead" @@ -688,24 +699,9 @@ case "$host_os" in # password hashing - hence the USE_BOTH_CRYPT_CALLS define. # case `uname -r` in - *9*|*10*) - CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4 -DMAX_POSITIVE_LOCK_OFFSET=0x1ffffffffffLL" - AC_DEFINE(USE_BOTH_CRYPT_CALLS, 1, [Whether to use both of HPUX' crypt calls]) - AC_DEFINE(_HPUX_SOURCE, 1, [Whether to use HPUX extensions]) - AC_DEFINE(_POSIX_SOURCE, 1, [Whether to use POSIX compatible functions]) - AC_DEFINE(_ALIGNMENT_REQUIRED,1,[Required alignment]) - AC_DEFINE(_MAX_ALIGNMENT,4,[Maximum alignment]) - ;; - *11*) - CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4 -DMAX_POSITIVE_LOCK_OFFSET=0x1ffffffffffLL" - AC_DEFINE(USE_BOTH_CRYPT_CALLS, 1, [Whether to use both of HPUX' crypt calls]) - AC_DEFINE(_HPUX_SOURCE, 1, [Whether to use HPUX extensions]) - AC_DEFINE(_POSIX_SOURCE, 1, [Whether to use POSIX compatible functions]) - AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to use large file support]) - AC_DEFINE(_ALIGNMENT_REQUIRED, 1, [Required alignment]) - AC_DEFINE(_MAX_ALIGNMENT, 4, [Maximum alignment]) - AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Unix 98 sources -- needed for socklen_t in getsockopt on HP/UX 11]) - ;; + *9*|*10*|*11) + AC_DEFINE(USE_BOTH_CRYPT_CALLS, 1, [Whether to use both of HPUX' crypt calls]) + ;; esac ;; @@ -808,11 +804,11 @@ case "$host_os" in CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" AC_TRY_RUN([ #include -int main () { +main () { #if _LFS64_LARGEFILE == 1 -return 0; +exit(0); #else -return 1; +exit(1); #endif }], [SINIX_LFS_SUPPORT=yes], [SINIX_LFS_SUPPORT=no], [SINIX_LFS_SUPPORT=cross]) CPPFLAGS="$old_CPPFLAGS" @@ -827,15 +823,6 @@ return 1; fi ;; -# Systems with LFS support. -# - gnu* | k*bsd*-gnu) - CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" - AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) - AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits]) - AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions]) - ;; - # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support. # *linux*) @@ -847,7 +834,7 @@ return 1; #include #include #include -int main() { +main() { #if _LFS64_LARGEFILE == 1 struct utsname uts; char *release; @@ -859,9 +846,9 @@ int main() { int libc_minor = __GLIBC_MINOR__; if (libc_major < 2) - return 1; + exit(1); if (libc_minor < 2) - return 1; + exit(1); #endif /* Ensure this is kernel 2.4 or higher */ @@ -872,10 +859,10 @@ int main() { minor = atoi(strsep(&release, ".")); if (major > 2 || (major == 2 && minor > 3)) - return 0; - return 1; + exit(0); + exit(1); #else - return 1; + exit(1); #endif } ], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross]) @@ -896,7 +883,7 @@ int main() { *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" ;; @@ -908,9 +895,9 @@ int main() { #include main () { #if _LFS64_LARGEFILE == 1 -return 0; +exit(0); #else -return 1; +exit(1); #endif }], [GLIBC_LFS_SUPPORT=yes], [GLIBC_LFS_SUPPORT=no], [GLIBC_LFS_SUPPORT=cross]) CPPFLAGS="$old_CPPFLAGS" @@ -939,11 +926,11 @@ LIBS="${LIBS} ${LIBDL}" AC_CHECK_HEADERS(aio.h arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h) AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h memory.h alloca.h) -AC_CHECK_HEADERS(limits.h float.h) +AC_CHECK_HEADERS(limits.h float.h pthread.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/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h) -AC_CHECK_HEADERS(sys/un.h) +AC_CHECK_HEADERS(sys/un.h ifaddrs.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 sys/sockio.h) AC_CHECK_HEADERS(sys/sysmacros.h) @@ -1100,19 +1087,6 @@ if test x"$samba_cv_unixsocket" = x"yes"; then fi -AC_CACHE_CHECK([for socklen_t type],samba_cv_socklen_t, [ - AC_TRY_COMPILE([ -#include -#if STDC_HEADERS -#include -#include -#endif -#include ],[socklen_t i = 0], - samba_cv_socklen_t=yes,samba_cv_socklen_t=no)]) -if test x"$samba_cv_socklen_t" = x"yes"; then - AC_DEFINE(HAVE_SOCKLEN_T_TYPE,1,[Whether we have the variable type socklen_t]) -fi - AC_CACHE_CHECK([for sig_atomic_t type],samba_cv_sig_atomic_t, [ AC_TRY_COMPILE([ #include @@ -1162,7 +1136,7 @@ AC_HAVE_DECL(snprintf, [#include ]) # nothing until kernel 2.1.44! very dumb. AC_CACHE_CHECK([for real setresuid],samba_cv_have_setresuid,[ AC_TRY_RUN([#include -int main() { setresuid(1,1,1); setresuid(2,2,2); return errno==EPERM?0:1;}], +main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}], samba_cv_have_setresuid=yes,samba_cv_have_setresuid=no,samba_cv_have_setresuid=cross)]) if test x"$samba_cv_have_setresuid" = x"yes"; then AC_DEFINE(HAVE_SETRESUID,1,[Whether the system has setresuid]) @@ -1173,7 +1147,7 @@ fi AC_CACHE_CHECK([for real setresgid],samba_cv_have_setresgid,[ AC_TRY_RUN([#include #include -int main() { errno = 0; setresgid(1,1,1); return errno != 0 ? (errno==EPERM ? 0 : 1) : 0;}], +main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}], samba_cv_have_setresgid=yes,samba_cv_have_setresgid=no,samba_cv_have_setresgid=cross)]) if test x"$samba_cv_have_setresgid" = x"yes"; then AC_DEFINE(HAVE_SETRESGID,1,[Whether the system has setresgid]) @@ -1304,7 +1278,7 @@ if test x"$ac_cv_func_execl" = x"no"; then EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)" fi -AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strerror chown fchown chmod fchmod chroot link mknod mknod64) +AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strerror chown fchown lchown chmod fchmod chroot link mknod mknod64) AC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtouq __strtoull) AC_CHECK_FUNCS(fstat strchr utime utimes chflags) AC_CHECK_FUNCS(getrlimit fsync memset strlcpy strlcat setpgid) @@ -1322,11 +1296,10 @@ AC_CHECK_FUNCS(syslog vsyslog timegm) 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_FUNCS(memalign posix_memalign hstrerror) 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) @@ -1352,15 +1325,33 @@ LIBS="$save_LIBS" # any of them. AC_MSG_CHECKING([for libunwind]) save_LIBS=$LIBS -if test x"$UNAME_P" = xunknown ; then - # This probably won't link without the platform-specific libunwind. - LIBS="$LIBS -lunwind" -else - # Add the platform-specific libunwind module. uname -p seems the most - # plausible option and works for ia64, where libunwind is most useful. - LIBS="$LIBS -lunwind -lunwind-$UNAME_P" + +UNWIND_ARCH="unknown" +if test x"$UNAME_I" != x"unknown"; then + UNWIND_ARCH="$UNAME_I" +elif test x"$UNAME_M" != x"unknown"; then + UNWIND_ARCH="$UNAME_M" +elif test x"$UNAME_P" != x"unknown"; then + UNWIND_ARCH="$UNAME_P" fi +case "$UNWIND_ARCH" in + unknown) + # This probably won't link without + # the platform-specific libunwind. + LIBS="$LIBS -lunwind" + ;; + i386|i586|i686) + # Add the platform-specific libunwind module. + LIBS="$LIBS -lunwind -lunwind-x86" + ;; + *) + # Add the platform-specific libunwind module. + # based on uname -i, uname -m or uname -p + LIBS="$LIBS -lunwind -lunwind-$UNWIND_ARCH" + ;; +esac + AC_TRY_LINK( [ #ifdef HAVE_LIBUNWIND_H @@ -1459,35 +1450,25 @@ AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[]) # # case "$host_os" in - linux*-gnu* | gnu* | k*bsd*-gnu) + *linux*) # glibc <= 2.3.2 has a broken getgrouplist - AC_CACHE_CHECK([for a broken Linux getgrouplist API], - linux_getgrouplist_ok, - [ - AC_TRY_RUN([ + AC_TRY_RUN([ #include #include - - int main() { - /* glibc up to 2.3 has a broken getgrouplist */ +main() { + /* glibc up to 2.3 has a broken getgrouplist */ #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) - int libc_major = __GLIBC__; - int libc_minor = __GLIBC_MINOR__; + int libc_major = __GLIBC__; + int libc_minor = __GLIBC_MINOR__; - if (libc_major < 2) - return 1; - if ((libc_major == 2) && (libc_minor <= 3)) - return 1; + if (libc_major < 2) + exit(1); + if ((libc_major == 2) && (libc_minor <= 3)) + exit(1); #endif - return 0; - } - - ], - [linux_getgrouplist_ok=yes], - [linux_getgrouplist_ok=no], - [linux_getgrouplist_ok=cross]) - ]) - + exit(0); +} +], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no]) if test x"$linux_getgrouplist_ok" = x"yes"; then AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist]) fi @@ -1508,7 +1489,7 @@ if test x$ac_cv_func_stat64 = xno ; then #include #endif #include -], [struct stat64 st64; return stat64(".",&st64);], [ac_cv_func_stat64=yes]) +], [struct stat64 st64; exit(stat64(".",&st64));], [ac_cv_func_stat64=yes]) AC_MSG_RESULT([$ac_cv_func_stat64]) if test x$ac_cv_func_stat64 = xyes ; then AC_DEFINE(HAVE_STAT64,1,[Whether stat64() is available]) @@ -1522,7 +1503,7 @@ if test x$ac_cv_func_lstat64 = xno ; then #include #endif #include -], [struct stat64 st64; return lstat64(".",&st64);], [ac_cv_func_lstat64=yes]) +], [struct stat64 st64; exit(lstat64(".",&st64));], [ac_cv_func_lstat64=yes]) AC_MSG_RESULT([$ac_cv_func_lstat64]) if test x$ac_cv_func_lstat64 = xyes ; then AC_DEFINE(HAVE_LSTAT64,[Whether lstat64() is available]) @@ -1536,7 +1517,7 @@ if test x$ac_cv_func_fstat64 = xno ; then #include #endif #include -], [struct stat64 st64; return fstat64(0,&st64);], [ac_cv_func_fstat64=yes]) +], [struct stat64 st64; exit(fstat64(0,&st64));], [ac_cv_func_fstat64=yes]) AC_MSG_RESULT([$ac_cv_func_fstat64]) if test x$ac_cv_func_fstat64 = xyes ; then AC_DEFINE(HAVE_FSTAT64,1,[Whether fstat64() is available]) @@ -1686,6 +1667,14 @@ case "$host_os" in ;; 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 @@ -1762,20 +1751,17 @@ SONAMEFLAG="#" SHLD="\${CC} \${CFLAGS}" PICFLAG="${PIE_CFLAGS}" SHLIBEXT="so" - +DSO_EXPORTS="" # 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 - linux*-gnu* | gnu* | k*bsd*-gnu) - case "$host_os" in - linux*) AC_DEFINE(LINUX,1,[Whether the host os is linux]) ;; - esac + # 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" @@ -1873,10 +1859,11 @@ case "$host_os" in if test "${GCC}" = "yes"; then PICFLAG="-fPIC" else - PICFLAG="+z" + PICFLAG="+z +ESnolit" fi if test "$host_cpu" = "ia64"; then SHLIBEXT="so" + PICFLAG="+z" DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32" else SHLIBEXT="sl" @@ -1940,25 +1927,30 @@ case "$host_os" in *darwin*) AC_DEFINE(DARWINOS,1,[Whether the host os is Darwin/MacOSX]) BLDSHARED="true" LDSHFLAGS="-bundle -flat_namespace -undefined suppress" - MODULE_EXPORTS="-exported_symbols_list \$(srcdir)/modules/exports.darwin" 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= + MODULE_EXPORTS="-exported_symbols_list \$(srcdir)/exports/modules-darwin.syms" + 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 +if test "$enable_shared" = yes -a "${ac_cv_gnu_ld_version_script}" = yes; then + DSO_EXPORTS=\$\(DSO_EXPORTS_CMD\) +fi + AC_MSG_RESULT($BLDSHARED) AC_MSG_CHECKING([LDFLAGS]) @@ -2022,7 +2014,7 @@ AC_DEFINE_UNQUOTED(SHLIBEXT, "$SHLIBEXT", [Shared library extension]) AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[ AC_TRY_RUN([#include -int main() { long long x = 1000000; x *= x; return ((x/1000000) == 1000000)? 0: 1; }], +main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], samba_cv_have_longlong=yes,samba_cv_have_longlong=no,samba_cv_have_longlong=cross)]) if test x"$samba_cv_have_longlong" = x"yes"; then AC_DEFINE(HAVE_LONGLONG,1,[Whether the host supports long long's]) @@ -2043,10 +2035,18 @@ if test x"$samba_cv_compiler_supports_ll" = x"yes"; then fi +AC_CACHE_CHECK([for 64 bit time_t],samba_cv_SIZEOF_TIME_T,[ +AC_TRY_RUN([#include +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 #include -int main() { return (sizeof(off_t) == 8) ? 0 : 1; }], +main() { exit((sizeof(off_t) == 8) ? 0 : 1); }], samba_cv_SIZEOF_OFF_T=yes,samba_cv_SIZEOF_OFF_T=no,samba_cv_SIZEOF_OFF_T=cross)]) if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then AC_DEFINE(SIZEOF_OFF_T,8,[The size of the 'off_t' type]) @@ -2059,7 +2059,7 @@ AC_TRY_RUN([ #endif #include #include -int main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) return 1; return (lstat64("/dev/null", &st)==0)?0:1; }], +main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }], samba_cv_HAVE_OFF64_T=yes,samba_cv_HAVE_OFF64_T=no,samba_cv_HAVE_OFF64_T=cross)]) if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then AC_DEFINE(HAVE_OFF64_T,1,[Whether off64_t is available]) @@ -2072,7 +2072,7 @@ AC_TRY_RUN([ #endif #include #include -int main() { return (sizeof(ino_t) == 8) ? 0 : 1; }], +main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }], samba_cv_SIZEOF_INO_T=yes,samba_cv_SIZEOF_INO_T=no,samba_cv_SIZEOF_INO_T=cross)]) if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then AC_DEFINE(SIZEOF_INO_T,8,[The size of the 'ino_t' type]) @@ -2085,7 +2085,7 @@ AC_TRY_RUN([ #endif #include #include -int main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) return 1; return (lstat64("/dev/null", &st)==0)?0:1; }], +main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }], samba_cv_HAVE_INO64_T=yes,samba_cv_HAVE_INO64_T=no,samba_cv_HAVE_INO64_T=cross)]) if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then AC_DEFINE(HAVE_INO64_T,1,[Whether the 'ino64_t' type is available]) @@ -2098,7 +2098,7 @@ AC_TRY_RUN([ #endif #include #include -int main() { return (sizeof(dev_t) == 8) ? 0 : 1; }], +main() { exit((sizeof(dev_t) == 8) ? 0 : 1); }], samba_cv_SIZEOF_DEV_T=yes,samba_cv_SIZEOF_DEV_T=no,samba_cv_SIZEOF_DEV_T=cross)]) if test x"$samba_cv_SIZEOF_DEV_T" = x"yes"; then AC_DEFINE(SIZEOF_DEV_T,8,[The size of the 'dev_t' type]) @@ -2111,7 +2111,7 @@ AC_TRY_RUN([ #endif #include #include -int main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) return 1; return (lstat64("/dev/null", &st)==0)?0:1; }], +main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }], samba_cv_HAVE_DEV64_T=yes,samba_cv_HAVE_DEV64_T=no,samba_cv_HAVE_DEV64_T=cross)]) if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then AC_DEFINE(HAVE_DEV64_T,1,[Whether the 'dev64_t' type is available]) @@ -2149,7 +2149,7 @@ AC_TRY_RUN([ #include #endif #include -int main() { dev_t dev; int i = major(dev); return 0; }], +main() { dev_t dev; int i = major(dev); return 0; }], samba_cv_HAVE_DEVICE_MAJOR_FN=yes,samba_cv_HAVE_DEVICE_MAJOR_FN=no,samba_cv_HAVE_DEVICE_MAJOR_FN=cross)]) if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then AC_DEFINE(HAVE_DEVICE_MAJOR_FN,1,[Whether the major macro for dev_t is available]) @@ -2161,7 +2161,7 @@ AC_TRY_RUN([ #include #endif #include -int main() { dev_t dev; int i = minor(dev); return 0; }], +main() { dev_t dev; int i = minor(dev); return 0; }], samba_cv_HAVE_DEVICE_MINOR_FN=yes,samba_cv_HAVE_DEVICE_MINOR_FN=no,samba_cv_HAVE_DEVICE_MINOR_FN=cross)]) if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then AC_DEFINE(HAVE_DEVICE_MINOR_FN,1,[Whether the minor macro for dev_t is available]) @@ -2173,7 +2173,7 @@ AC_TRY_RUN([ #include #endif #include -int main() { dev_t dev = makedev(1,2); return 0; }], +main() { dev_t dev = makedev(1,2); return 0; }], samba_cv_HAVE_MAKEDEV=yes,samba_cv_HAVE_MAKEDEV=no,samba_cv_HAVE_MAKEDEV=cross)]) if test x"$samba_cv_HAVE_MAKEDEV" = x"yes"; then AC_DEFINE(HAVE_MAKEDEV,1,[Whether the macro for makedev is available]) @@ -2181,7 +2181,7 @@ fi AC_CACHE_CHECK([for unsigned char],samba_cv_HAVE_UNSIGNED_CHAR,[ AC_TRY_RUN([#include -int main() { char c; c=250; return (c > 0)?0:1; }], +main() { char c; c=250; exit((c > 0)?0:1); }], samba_cv_HAVE_UNSIGNED_CHAR=yes,samba_cv_HAVE_UNSIGNED_CHAR=no,samba_cv_HAVE_UNSIGNED_CHAR=cross)]) if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then AC_DEFINE(HAVE_UNSIGNED_CHAR,1,[Whether the 'unsigned char' type is available]) @@ -2214,13 +2214,13 @@ if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then fi AC_CACHE_CHECK([if gettimeofday takes tz argument],samba_cv_HAVE_GETTIMEOFDAY_TZ,[ -AC_TRY_RUN([ +AC_TRY_LINK([ #include -#include -int main() { struct timeval tv; return gettimeofday(&tv, NULL);}], - samba_cv_HAVE_GETTIMEOFDAY_TZ=yes,samba_cv_HAVE_GETTIMEOFDAY_TZ=no,samba_cv_HAVE_GETTIMEOFDAY_TZ=cross)]) +#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() 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 @@ -2232,12 +2232,12 @@ 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 @@ -2271,18 +2271,18 @@ void foo(const char *format, ...) { va_start(ap, format); len = vsnprintf(buf, 0, format, ap); va_end(ap); - if (len != 5) return 1; + if (len != 5) exit(1); va_start(ap, format); len = vsnprintf(0, 0, format, ap); va_end(ap); - if (len != 5) return 1; + if (len != 5) exit(1); - if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) return 1; + if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); - return 0; + exit(0); } -int main() { foo("hello"); } +main() { foo("hello"); } ], samba_cv_HAVE_C99_VSNPRINTF=yes,samba_cv_HAVE_C99_VSNPRINTF=no,samba_cv_HAVE_C99_VSNPRINTF=cross)]) if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then @@ -2292,9 +2292,9 @@ fi AC_CACHE_CHECK([for broken readdir name],samba_cv_HAVE_BROKEN_READDIR_NAME,[ AC_TRY_RUN([#include #include -int main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); +main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && -di->d_name[0] == 0) return 0; return 1;} ], +di->d_name[0] == 0) exit(0); exit(1);} ], samba_cv_HAVE_BROKEN_READDIR_NAME=yes,samba_cv_HAVE_BROKEN_READDIR_NAME=no,samba_cv_HAVE_BROKEN_READDIR_NAME=cross)]) if test x"$samba_cv_HAVE_BROKEN_READDIR_NAME" = x"yes"; then AC_DEFINE(HAVE_BROKEN_READDIR_NAME,1,[Whether readdir() returns the wrong name offset]) @@ -2303,7 +2303,7 @@ fi AC_CACHE_CHECK([for utimbuf],samba_cv_HAVE_UTIMBUF,[ AC_TRY_COMPILE([#include #include ], -[struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; return utime("foo.c",&tbuf);], +[struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));], samba_cv_HAVE_UTIMBUF=yes,samba_cv_HAVE_UTIMBUF=no,samba_cv_HAVE_UTIMBUF=cross)]) if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then AC_DEFINE(HAVE_UTIMBUF,1,[Whether struct utimbuf is available]) @@ -2400,6 +2400,16 @@ 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 +dnl Look for the IPv6 varient by preference. Many systems have both. +AC_CACHE_CHECK([for ut_addr_v6 in utmp],samba_cv_HAVE_UT_UT_ADDR_V6,[ +AC_TRY_COMPILE([#include +#include ], +[struct utmp ut; ut.ut_addr_v6[0] = 0;], +samba_cv_HAVE_UT_UT_ADDR_V6=yes,samba_cv_HAVE_UT_UT_ADDR_V6=no,samba_cv_HAVE_UT_UT_ADDR_V6=cross)]) +if test x"$samba_cv_HAVE_UT_UT_ADDR_V6" = x"yes"; then + AC_DEFINE(HAVE_UT_UT_ADDR_V6,1,[Whether the utmp struct has a property ut_addr_v6]) +fi + AC_CACHE_CHECK([for ut_addr in utmp],samba_cv_HAVE_UT_UT_ADDR,[ AC_TRY_COMPILE([#include #include ], @@ -2433,8 +2443,7 @@ fi # end utmp details -ICONV_LOCATION=standard -LOOK_DIRS="/usr /usr/local /sw /opt" +ICONV_LOOK_DIRS="/usr /usr/local /sw /opt" AC_ARG_WITH(libiconv, [ --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) ], [ @@ -2443,62 +2452,69 @@ AC_ARG_WITH(libiconv, else if test "$withval" != "yes" ; then ICONV_PATH_SPEC=yes - LOOK_DIRS="$withval" + ICONV_LOOK_DIRS="$withval" fi fi ]) -for i in $LOOK_DIRS ; do - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS +for i in $ICONV_LOOK_DIRS ; do + + save_LIBS="$LIBS" + save_LDFLAGS="$LDFLAGS" + save_CPPFLAGS="$CPPFLAGS" + + iconv_current_LIBS="" + iconv_current_LDFLAGS="" + iconv_current_CPPFLAGS="" + ICONV_FOUND="no" unset libext - CPPFLAGS="$CPPFLAGS -I$i/include" -dnl This is here to handle -withval stuff for --with-libiconv -dnl Perhaps we should always add a -L - -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 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. + + # This is here to handle -withval stuff for --with-libiconv + # Perhaps we should always add a -L + CPPFLAGS="$save_CPPFLAGS -I$i/include" + + # Check lib and lib32 library variants to cater for IRIX ABI-specific + # installation paths. This gets a little tricky since we might have iconv + # in both libiconv and in libc. In this case the jm_ICONV test will always + # succeed when the header is found. To counter this, make sure the + # library directory is there and check the ABI directory first (which + # should be harmless on other systems. + # For IA64 HPUX systems, the libs are located in lib/hpux32 instead of lib. for l in "lib32" "lib" "lib/hpux32"; do if test -d "$i/$l" ; then LDFLAGS="$save_LDFLAGS -L$i/$l" - LIBS= - export LDFLAGS LIBS CPPFLAGS -dnl Try to find iconv(3) + LIBS= + export LDFLAGS LIBS CPPFLAGS + # Try to find iconv(3) jm_ICONV($i/$l) if test x"$ICONV_FOUND" = "xyes" ; then - libext="$l" - break; - fi + libext="$l" + break + fi fi done if test x"$ICONV_FOUND" = "xyes" ; then - LDFLAGS=$save_LDFLAGS - LIB_ADD_DIR(LDFLAGS, "$i/$libext") - CFLAGS_ADD_DIR(CPPFLAGS, "$i/include") - LIBS="$save_LIBS" - ICONV_LOCATION=$i - export LDFLAGS LIBS CPPFLAGS -dnl Now, check for a working iconv ... we want to do it here because -dnl there might be a working iconv further down the list of LOOK_DIRS - - ############ - # check for iconv in libc - ic_save_LIBS="$LIBS" - if test x"$ICONV_PATH_SPEC" = "xyes" ; then - LIBS="$LIBS -L$ICONV_LOCATION/$libext" - fi + iconv_current_LDFLAGS="-L$i/$libext" + iconv_current_CPPFLAGS="-I$i/include" + if test x"$jm_cv_lib_iconv" != x; then - LIBS="$LIBS -l$jm_cv_lib_iconv" + iconv_current_LIBS="$LIBS -l$jm_cv_lib_iconv" + else + # We found iconv in libc. + iconv_current_LIBS="" fi -dnl AC_CACHE_CHECK([for working iconv],samba_cv_HAVE_NATIVE_ICONV,[ + + fi + + if test x"$ICONV_FOUND" = "xyes" ; then + + LDFLAGS="$save_LDFLAGS $iconv_current_LDFLAGS" + CPPFLAGS="$save_CPPFLAGS $iconv_current_CPPFLAGS" + LIBS="$save_LIBS $iconv_current_LIBS" + export LDFLAGS LIBS CPPFLAGS + default_dos_charset=no default_display_charset=no default_unix_charset=no @@ -2506,28 +2522,30 @@ dnl AC_CACHE_CHECK([for working iconv],samba_cv_HAVE_NATIVE_ICONV,[ # check for default dos charset name for j in CP850 IBM850 ; do rjs_CHARSET($j) - if test x"$ICONV_CHARSET" = x"$j"; then - default_dos_charset="\"$j\"" + default_dos_charset="$ICONV_CHARSET" + if test x"$default_dos_charset" = x"$j"; then break fi done + # check for default display charset name for j in ASCII 646 ; do rjs_CHARSET($j) - if test x"$ICONV_CHARSET" = x"$j"; then - default_display_charset="\"$j\"" + default_display_charset="$ICONV_CHARSET" + if test x"$default_display_charset" = x"$j"; then break fi done + # check for default unix charset name for j in UTF-8 UTF8 ; do rjs_CHARSET($j) - if test x"$ICONV_CHARSET" = x"$j"; then - default_unix_charset="\"$j\"" + default_unix_charset="$ICONV_CHARSET" + if test x"$default_unix_charset" = x"$j"; then break fi done - + if test "$default_dos_charset" != "no" -a \ "$default_dos_charset" != "cross" -a \ "$default_display_charset" != "no" -a \ @@ -2536,38 +2554,63 @@ dnl AC_CACHE_CHECK([for working iconv],samba_cv_HAVE_NATIVE_ICONV,[ "$default_unix_charset" != "cross" then samba_cv_HAVE_NATIVE_ICONV=yes - else if test "$default_dos_charset" = "cross" -o \ + else + if test "$default_dos_charset" = "cross" -o \ "$default_display_charset" = "cross" -o \ "$default_unix_charset" = "cross" - then - samba_cv_HAVE_NATIVE_ICONV=cross - else - samba_cv_HAVE_NATIVE_ICONV=no + then + samba_cv_HAVE_NATIVE_ICONV=cross + else + samba_cv_HAVE_NATIVE_ICONV=no + fi fi + + # At this point, we have a libiconv candidate. We know that + # we have the right headers and libraries, but we don't know + # whether it does the conversions we want. We can't test this + # because we are cross-compiling. This is not necessarily a big + # deal, since we can't guarantee that the results we get now will + # match the results we get at runtime anyway. + if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"cross" ; then + default_dos_charset="CP850" + default_display_charset="ASCII" + default_unix_charset="UTF-8" + samba_cv_HAVE_NATIVE_ICONV=yes + AC_MSG_WARN(assuming the libiconv in $iconv_current_LDFLAGS can convert) + AC_MSG_WARN([$default_dos_charset, $default_display_charset and $default_unix_charset to UCS-16LE]) fi -dnl ]) - - LIBS="$ic_save_LIBS" - if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - if test x"$jm_cv_lib_iconv" != x; then - LIBS="$LIBS -l$jm_cv_lib_iconv" - fi - dnl Add the flags we need to CPPFLAGS and LDFLAGS - CFLAGS_ADD_DIR(CPPFLAGS, "$i/include") - LIB_ADD_DIR(LDFLAGS, "$i/$libext") - export CPPFLAGS - AC_DEFINE(HAVE_NATIVE_ICONV,1,[Whether to use native iconv]) - AC_DEFINE_UNQUOTED(DEFAULT_DOS_CHARSET,$default_dos_charset,[Default dos charset name]) - AC_DEFINE_UNQUOTED(DEFAULT_DISPLAY_CHARSET,$default_display_charset,[Default display charset name]) - AC_DEFINE_UNQUOTED(DEFAULT_UNIX_CHARSET,$default_unix_charset,[Default unix charset name]) + + if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes" ; then + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + + if test x"$iconv_current_LIBS" != x; then + LIBS="$LIBS $iconv_current_LIBS" + fi + + # Add the flags we need to CPPFLAGS and LDFLAGS + CPPFLAGS="$CPPFLAGS $iconv_current_CPPFLAGS" + LDFLAGS="$LDFLAGS $iconv_current_LDFLAGS" + + # Turn the #defines into string literals + default_dos_charset="\"$default_dos_charset\"" + default_display_charset="\"$default_display_charset\"" + default_unix_charset="\"$default_unix_charset\"" + + AC_DEFINE(HAVE_NATIVE_ICONV,1,[Whether to use native iconv]) + AC_DEFINE_UNQUOTED(DEFAULT_DOS_CHARSET,$default_dos_charset,[Default dos charset name]) + AC_DEFINE_UNQUOTED(DEFAULT_DISPLAY_CHARSET,$default_display_charset,[Default display charset name]) + AC_DEFINE_UNQUOTED(DEFAULT_UNIX_CHARSET,$default_unix_charset,[Default unix charset name]) + break fi -dnl We didn't find a working iconv, so keep going + + # We didn't find a working iconv, so keep going fi -dnl We only need to clean these up here for the next pass through the loop + + # We only need to clean these up here for the next pass through the loop CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS @@ -2592,7 +2635,7 @@ AC_TRY_RUN([ #ifndef F_GETLEASE #define F_GETLEASE 1025 #endif -int main() { +main() { int fd = open("/dev/null", O_RDONLY); return fcntl(fd, F_GETLEASE, 0) == -1; } @@ -2610,8 +2653,8 @@ AC_TRY_RUN([ #ifndef F_NOTIFY #define F_NOTIFY 1026 #endif -int main() { - return fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0; +main() { + exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0); } ], samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes,samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no,samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross)]) @@ -2645,13 +2688,13 @@ if test x$enable_fam != xno; then # 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 @@ -2671,6 +2714,8 @@ if test x$enable_fam != xno; then fi fi +AC_SUBST(SMB_FAM_LIBS) + ################################################# # Check for DMAPI interfaces in libdm/libjfsdm/libxsdm @@ -2686,8 +2731,8 @@ AC_TRY_RUN([ #define LOCK_MAND 32 #define LOCK_READ 64 #endif -int main() { - return flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0; +main() { + exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0); } ], samba_cv_HAVE_KERNEL_SHARE_MODES=yes,samba_cv_HAVE_KERNEL_SHARE_MODES=no,samba_cv_HAVE_KERNEL_SHARE_MODES=cross)]) @@ -2723,15 +2768,15 @@ if test x"$samba_cv_HAVE_SYS_CAPABILITY_H" = x"yes"; then AC_TRY_RUN([ #include #include -int main() { +main() { cap_t cap; cap_value_t vals[1]; if (!(cap = cap_get_proc())) - return 1; + exit(1); vals[0] = CAP_CHOWN; cap_set_flag(cap, CAP_INHERITABLE, 1, vals, CAP_CLEAR); cap_set_proc(cap); - return 0; + exit(0); }], samba_cv_HAVE_POSIX_CAPABILITIES=yes, samba_cv_HAVE_POSIX_CAPABILITIES=no, @@ -2853,15 +2898,15 @@ AC_TRY_RUN([#include #include #include #include -int main() { +main() { struct stat st; char tpl[20]="/tmp/test.XXXXXX"; int fd = mkstemp(tpl); - if (fd == -1) return 1; + if (fd == -1) exit(1); unlink(tpl); - if (fstat(fd, &st) != 0) return 1; - if ((st.st_mode & 0777) != 0600) return 1; - return 0; + if (fstat(fd, &st) != 0) exit(1); + if ((st.st_mode & 0777) != 0600) exit(1); + exit(0); }], samba_cv_HAVE_SECURE_MKSTEMP=yes, samba_cv_HAVE_SECURE_MKSTEMP=no, @@ -2871,12 +2916,7 @@ if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then fi AC_CACHE_CHECK([for broken readdir],samba_cv_HAVE_BROKEN_READDIR,[ - AC_TRY_RUN([ -#include "${srcdir-.}/lib/replace/test/os2_delete.c" -int main(void) { - return test_readdir_os2_delete(); -} -], + AC_TRY_RUN([#include "${srcdir-.}/tests/os2_delete.c"], [samba_cv_HAVE_BROKEN_READDIR=no], [samba_cv_HAVE_BROKEN_READDIR=yes], [samba_cv_HAVE_BROKEN_READDIR="assuming not"])]) @@ -2885,10 +2925,7 @@ if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then AC_CACHE_CHECK([for replacing readdir],samba_cv_REPLACE_READDIR,[ AC_TRY_RUN([ #include "${srcdir-.}/lib/repdir.c" -#include "${srcdir-.}/lib/replace/test/os2_delete.c" -int main(void) { - return test_readdir_os2_delete(); -], +#include "${srcdir-.}/tests/os2_delete.c"], samba_cv_REPLACE_READDIR=yes,samba_cv_REPLACE_READDIR=no)]) fi @@ -2902,6 +2939,60 @@ SMB_CHECK_SYSCONF(_SC_NPROCESSORS_ONLN) SMB_CHECK_SYSCONF(_SC_PAGESIZE) AC_CHECK_FUNCS(getpagesize) +dnl test for socklen_t +AC_CACHE_CHECK([for socklen_t],samba_cv_HAVE_SA_FAMILY_T,[ +AC_TRY_COMPILE([ +#include +#include +#include +#include +#include +], +[ +socklen_t foo; +], +samba_cv_HAVE_SOCKLEN_T=yes,samba_cv_HAVE_SOCKLEN_T=no)]) +if test x"$samba_cv_HAVE_SOCKLEN_T" = x"yes"; then + AC_DEFINE(HAVE_SOCKLEN_T,1,[Whether the system has socklen_t]) +fi + +dnl test for sa_family_t +AC_CACHE_CHECK([for sa_family_t],samba_cv_HAVE_SA_FAMILY_T,[ +AC_TRY_COMPILE([ +#include +#include +#include +#include +#include +], +[ +sa_family_t foo; +], +samba_cv_HAVE_SA_FAMILY_T=yes,samba_cv_HAVE_SA_FAMILY_T=no)]) +if test x"$samba_cv_HAVE_SA_FAMILY_T" = x"yes"; then + AC_DEFINE(HAVE_SA_FAMILY_T,1,[Whether the system has sa_family_t]) +fi + +dnl test for getifaddrs and freeifaddrs +AC_CACHE_CHECK([for getifaddrs and freeifaddrs],samba_cv_HAVE_GETIFADDRS,[ +AC_TRY_COMPILE([ +#include +#include +#include +#include +#include +#include ], +[ +struct ifaddrs *ifp = NULL; +int ret = getifaddrs (&ifp); +freeifaddrs(ifp); +], +samba_cv_HAVE_GETIFADDRS=yes,samba_cv_HAVE_GETIFADDRS=no)]) +if test x"$samba_cv_HAVE_GETIFADDRS" = x"yes"; then + AC_DEFINE(HAVE_GETIFADDRS,1,[Whether the system has getifaddrs]) + AC_DEFINE(HAVE_FREEIFADDRS,1,[Whether the system has freeifaddrs]) +fi + ################## # look for a method of finding the list of network interfaces iface=no; @@ -2919,6 +3010,21 @@ if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available]) fi +if test $iface = no; then +AC_CACHE_CHECK([for iface getifaddrs],samba_cv_HAVE_IFACE_GETIFADDRS,[ +SAVE_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}" +AC_TRY_RUN([ +#define HAVE_IFACE_GETIFADDRS 1 +#define AUTOCONF_TEST 1 +#include "${srcdir-.}/lib/interfaces.c"], + samba_cv_HAVE_IFACE_GETIFADDRS=yes,samba_cv_HAVE_IFACE_GETIFADDRS=no,samba_cv_HAVE_IFACE_GETIFADDRS=cross)]) +CPPFLAGS="$SAVE_CPPFLAGS" +if test x"$samba_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then + iface=yes;AC_DEFINE(HAVE_IFACE_GETIFADDRS,1,[Whether iface getifaddrs is available]) +fi +fi + if test $iface = no; then AC_CACHE_CHECK([for iface ifconf],samba_cv_HAVE_IFACE_IFCONF,[ SAVE_CPPFLAGS="$CPPFLAGS" @@ -2949,6 +3055,54 @@ if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then fi fi +dnl test for ipv6 +AC_CACHE_CHECK([for ipv6 support],samba_cv_HAVE_IPV6,[ +AC_TRY_COMPILE([ +#include +#include +#include ], +[ +struct sockaddr_storage sa_store; +struct addrinfo *ai = NULL; +int s = socket(AF_INET6, SOCK_STREAM, 0); +int ret = getaddrinfo(NULL, NULL, NULL, &ai); +if (ret != 0) { + const char *es = gai_strerror(ret); +} +freeaddrinfo(ai); +], +samba_cv_HAVE_IPV6=yes,samba_cv_HAVE_IPV6=no)]) +if test x"$samba_cv_HAVE_IPV6" = x"yes"; then + AC_DEFINE(HAVE_IPV6,1,[Whether the system has IPv6 support]) +fi + +dnl test for struct sockaddr_storage +AC_CACHE_CHECK([for struct sockaddr_storage],samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE,[ +AC_TRY_COMPILE([ +#include +#include +#include ], +[ +struct sockaddr_storage sa_store; +], +samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE=yes,samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE=no)]) +if test x"$samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE" = x"yes"; then + AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,1,[Whether the system has struct sockaddr_storage]) +fi + +dnl test for struct struct sockaddr_in6 +AC_CACHE_CHECK([for struct sockaddr_in6],samba_cv_HAVE_STRUCT_SOCKADDR_IN6,[ +AC_TRY_COMPILE([ +#include +#include +#include ], +[ +struct sockaddr_in6 sa6; +], +samba_cv_HAVE_STRUCT_SOCKADDR_IN6=yes,samba_cv_HAVE_STRUCT_SOCKADDR_IN6=no)]) +if test x"$samba_cv_HAVE_STRUCT_SOCKADDR_IN6" = x"yes"; then + AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6,1,[Whether the system has struct sockaddr_in6]) +fi ################################################ # look for a method of setting the effective uid @@ -3006,6 +3160,21 @@ if test x"$samba_cv_USE_SETUIDX" = x"yes"; then fi fi +AC_CACHE_CHECK([for the Darwin initgroups system call], + samba_cv_DARWIN_INITGROUPS, + AC_TRY_LINK([ +#include +#include + ], + [ syscall(SYS_initgroups, 16, NULL, NULL, 0); ], + samba_cv_DARWIN_INITGROUPS=yes, + samba_cv_DARWIN_INITGROUPS=no) +) + +if test x"$samba_cv_DARWIN_INITGROUPS" = x"yes" ; then + AC_DEFINE(HAVE_DARWIN_INITGROUPS, 1, + [Whether to use the Darwin-specific initgroups system call]) +fi AC_CACHE_CHECK([for working mmap],samba_cv_HAVE_MMAP,[ AC_TRY_RUN([#include "${srcdir-.}/tests/shared_mmap.c"], @@ -3049,11 +3218,11 @@ dnl #ifdef HAVE_SYS_FCNTL_H #include #endif -int main() { struct flock64 fl64; +main() { struct flock64 fl64; #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64) -return 0; +exit(0); #else -return 1; +exit(1); #endif }], samba_cv_HAVE_STRUCT_FLOCK64=yes,samba_cv_HAVE_STRUCT_FLOCK64=no,samba_cv_HAVE_STRUCT_FLOCK64=cross)]) @@ -3134,11 +3303,10 @@ fi AC_CACHE_CHECK([if the realpath function allows a NULL argument],samba_cv_REALPATH_TAKES_NULL,[ AC_TRY_RUN([ #include -#include #include -int main() { +main() { char *newpath = realpath("/tmp", NULL); - return (newpath != NULL) ? 0 : 1; + exit ((newpath != NULL) ? 0 : 1); } ], samba_cv_REALPATH_TAKES_NULL=yes,samba_cv_REALPATH_TAKES_NULL=no,samba_cv_REALPATH_TAKES_NULL=cross)]) @@ -3330,6 +3498,22 @@ 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 ber_sockbuf_add_io() is available we can add + # SASL wrapping hooks + AC_CHECK_FUNC_EXT(ber_sockbuf_add_io,$LDAP_LIBS) + + AC_CACHE_CHECK([for LDAP_OPT_SOCKBUF],samba_cv_HAVE_LDAP_OPT_SOCKBUF,[ + AC_TRY_COMPILE([#include ], + [int val = LDAP_OPT_SOCKBUF;], + samba_cv_HAVE_LDAP_OPT_SOCKBUF=yes, + samba_cv_HAVE_LDAP_OPT_SOCKBUF=no)]) + + if test x"$ac_cv_func_ext_ber_sockbuf_add_io" = x"yes" -a \ + x"$samba_cv_HAVE_LDAP_OPT_SOCKBUF" = x"yes"; then + AC_DEFINE(HAVE_LDAP_SASL_WRAPPING, 1, [Support for SASL wrapping]) + fi + ######################################################## # now see if we can find the ldap libs in standard paths AC_CHECK_LIB_EXT(ldap, LDAP_LIBS, ldap_init) @@ -3361,12 +3545,6 @@ if test x"$with_ldap_support" != x"no"; then 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) @@ -3583,6 +3761,10 @@ if test x"$with_ads_support" != x"no"; then LDFLAGS=$ac_save_LDFLAGS fi AC_CHECK_HEADERS(krb5/locate_plugin.h) + if test x"$ac_cv_header_krb5_locate_plugin_h" = x"yes"; then + SMB_KRB5_LOCATOR="bin/smb_krb5_locator.$SHLIBEXT" + EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $SMB_KRB5_LOCATOR" + fi fi # Now we have determined whether we really want ADS support @@ -3982,7 +4164,7 @@ if test x"$with_ads_support" != x"no"; then samba_cv_HAVE_WRFILE_KEYTAB,[ AC_TRY_RUN([ #include - int main() + main() { krb5_context context; krb5_keytab keytab; @@ -4044,7 +4226,7 @@ if test x"$with_ads_support" != x"no"; then AC_TRY_RUN_STRICT([ #include int main(void) { - krb5_context context; + krb5_context context = NULL; char *str = NULL; krb5_enctype_to_string(context, 1, &str); if (str) free (str); @@ -4320,7 +4502,11 @@ AC_ARG_WITH(cifsmount, ################################################# -# check for a PAM clear-text auth, accounts, password and session support +# Check for a PAM clear-text auth, accounts, password +# and session support. Most PAM implementations keep their +# headers in /usr/include/security. Darwin keeps its in +# /usr/include/pam. + with_pam_for_crypt=no try_pam=no AC_MSG_CHECKING(whether to try PAM support) @@ -4340,10 +4526,13 @@ if test x"${try_pam}" != x"no";then use_pam=yes create_pam_modules=yes - AC_CHECK_HEADERS(security/pam_appl.h) - if test x"$ac_cv_header_security_pam_appl_h" != x"yes"; then + # Most systems have PAM headers in /usr/include/security, but Darwin + # has them in /usr/include/pam. + AC_CHECK_HEADERS(security/pam_appl.h pam/pam_appl.h) + if test x"$ac_cv_header_security_pam_appl_h" != x"yes" -a \ + x"$ac_cv_header_pam_pam_appl_h" != x"yes"; then if test x"${try_pam}" = x"yes";then - AC_MSG_ERROR([--with-pam=yes but security/pam_appl.h not found]) + AC_MSG_ERROR([--with-pam=yes but pam_appl.h not found]) fi use_pam=no create_pam_modules=no @@ -4358,29 +4547,34 @@ if test x"${try_pam}" != x"no";then create_pam_modules=no fi - AC_CHECK_HEADERS(security/pam_modules.h,,,[[ + AC_CHECK_HEADERS(security/pam_modules.h pam/pam_modules.h,,,[[ #if HAVE_SECURITY_PAM_APPL_H #include #endif + #if HAVE_PAM_PAM_APPL_H + #include + #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" -a \ + x"$ac_cv_header_pam_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 + AC_MSG_ERROR([--with-pam=yes but pam_modules.h not found]) + 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]) # this checks are optional, # we don't care about the results here AC_CHECK_HEADERS(security/pam_ext.h security/_pam_macros.h) + AC_CHECK_HEADERS(pam/pam_ext.h pam/_pam_macros.h) AC_CHECK_FUNC_EXT(pam_vsyslog,$PAM_LIBS) else AC_MSG_WARN([PAM support detected but PAM MODULES support is missing]) @@ -4604,6 +4798,9 @@ AC_CHECK_HEADER(asm/types.h,[ # For quotas on Veritas VxFS filesystems AC_CHECK_HEADERS(sys/fs/vx_quota.h) +# For quotas on Linux XFS filesystems +AC_CHECK_HEADERS(linux/dqblk_xfs.h) + # For sys/quota.h and linux/quota.h AC_CHECK_HEADERS(sys/quota.h) @@ -4845,53 +5042,6 @@ if test $enable_static = yes; then UNINSTALLLIBCMD_A="rm -f" fi -################################################# -# should we build libmsrpc? -INSTALL_LIBMSRPC= -UNINSTALL_LIBMSRPC= -LIBMSRPC_SHARED= -LIBMSRPC= -AC_MSG_CHECKING(whether to build the libmsrpc shared library) -AC_ARG_WITH(libmsrpc, -[ --with-libmsrpc Build the libmsrpc shared library (default=yes if shared libs supported)], -[ case "$withval" in - no) - AC_MSG_RESULT(no) - ;; - *) - if test $BLDSHARED = true; then - LIBMSRPC_SHARED=bin/libmsrpc.$SHLIBEXT - LIBMSRPC=libmsrpc - AC_MSG_RESULT(yes) - else - enable_static=yes - AC_MSG_RESULT(no shared library support -- will supply static library) - fi - if test $enable_static = yes; then - LIBMSRPC=libmsrpc - fi - INSTALL_LIBMSRPC=installlibmsrpc - UNINSTALL_LIBMSRPC=uninstalllibmsrpc - ;; - esac ], -[ -# if unspecified, default is to built it if possible. - if test $BLDSHARED = true; then - LIBMSRPC_SHARED=bin/libmsrpc.$SHLIBEXT - LIBMSRPC=libmsrpc - AC_MSG_RESULT(yes) - else - enable_static=yes - AC_MSG_RESULT(no shared library support -- will supply static library) - fi - if test $enable_static = yes; then - LIBMSRPC=libmsrpc - fi] - INSTALL_LIBMSRPC=installlibmsrpc - UNINSTALL_LIBMSRPC=uninstalllibmsrpc -) - - ################################################# # should we build libaddns? INSTALL_LIBADDNS= @@ -4900,12 +5050,12 @@ LIBADDNS_SHARED= LIBADDNS= AC_MSG_CHECKING(whether to build the libaddns shared library) AC_ARG_WITH(libaddns, -[ --with-libaddns Build the libaddns shared library (default=yes if shared libs supported)], +[ --with-libaddns Build the libaddns shared library (default=no undefined API)], [ case "$withval" in - no) + *) AC_MSG_RESULT(no) ;; - *) + yes) if test $BLDSHARED = true; then LIBADDNS_SHARED=bin/libaddns.$SHLIBEXT LIBADDNS=libaddns @@ -4920,22 +5070,7 @@ AC_ARG_WITH(libaddns, INSTALL_LIBADDNS=installlibaddns UNINSTALL_LIBADDNS=uninstalllibaddns ;; - esac ], -[ -# if unspecified, default is to built it if possible. - if test $BLDSHARED = true; then - LIBADDNS_SHARED=bin/libaddns.$SHLIBEXT - LIBADDNS=libaddns - AC_MSG_RESULT(yes) - else - enable_static=yes - AC_MSG_RESULT(no shared library support -- will supply static library) - fi - if test $enable_static = yes; then - LIBADDNS=libaddns - fi] - INSTALL_LIBADDNS=installlibaddns - UNINSTALL_LIBADDNS=uninstalllibaddns + esac ] ) ################################################# @@ -5044,7 +5179,7 @@ if test $space = no; then main () { struct statvfs64 fsd; - return statvfs64 (".", &fsd); + exit (statvfs64 (".", &fsd)); }], fu_cv_sys_stat_statvfs64=yes, fu_cv_sys_stat_statvfs64=no, @@ -5097,7 +5232,7 @@ if test $space = no; then { struct statfs fsd; fsd.f_fsize = 0; - return statfs (".", &fsd, sizeof (struct statfs)); + exit (statfs (".", &fsd, sizeof (struct statfs))); }], fu_cv_sys_stat_statfs3_osf1=yes, fu_cv_sys_stat_statfs3_osf1=no, @@ -5128,7 +5263,7 @@ member (AIX, 4.3BSD)]) { struct statfs fsd; fsd.f_bsize = 0; - return statfs (".", &fsd); + exit (statfs (".", &fsd)); }], fu_cv_sys_stat_statfs2_bsize=yes, fu_cv_sys_stat_statfs2_bsize=no, @@ -5149,7 +5284,7 @@ if test $space = no; then main () { struct statfs fsd; - return statfs (".", &fsd, sizeof fsd, 0); + exit (statfs (".", &fsd, sizeof fsd, 0)); }], fu_cv_sys_stat_statfs4=yes, fu_cv_sys_stat_statfs4=no, @@ -5177,7 +5312,7 @@ member (4.4BSD and NetBSD)]) { struct statfs fsd; fsd.f_fsize = 0; - return statfs (".", &fsd); + exit (statfs (".", &fsd)); }], fu_cv_sys_stat_statfs2_fsize=yes, fu_cv_sys_stat_statfs2_fsize=no, @@ -5208,7 +5343,7 @@ if test $space = no; then struct fs_data fsd; /* Ultrix's statfs returns 1 for success, 0 for not mounted, -1 for failure. */ - return statfs (".", &fsd) != 1; + exit (statfs (".", &fsd) != 1); }], fu_cv_sys_stat_fs_data=yes, fu_cv_sys_stat_fs_data=no, @@ -5262,54 +5397,71 @@ fi AC_MSG_CHECKING(whether to support ACLs) AC_ARG_WITH(acl-support, -[ --with-acl-support Include ACL support (default=no)], +[ --with-acl-support Include ACL support (default=auto)], [ case "$withval" in - yes) + yes|no) + with_acl_support="$withval" + ;; + esac ]) +if test x"$with_acl_support" = x ; then + with_acl_support="auto" +fi + +AC_MSG_RESULT($with_acl_support) + +if test x"$with_acl_support" = x"no"; then + AC_MSG_RESULT(Disabling ACL support) + AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support should be built in]) +else + AC_MSG_NOTICE(checking whether ACL support is available:) case "$host_os" in *sysv5*) - AC_MSG_RESULT(Using UnixWare ACLs) + AC_MSG_NOTICE(Using UnixWare ACLs) AC_DEFINE(HAVE_UNIXWARE_ACLS,1,[Whether UnixWare ACLs are available]) default_static_modules="$default_static_modules vfs_solarisacl" ;; *solaris*) - AC_MSG_RESULT(Using solaris ACLs) + AC_MSG_NOTICE(Using solaris ACLs) AC_DEFINE(HAVE_SOLARIS_ACLS,1,[Whether solaris ACLs are available]) ACL_LIBS="$ACL_LIBS -lsec" default_static_modules="$default_static_modules vfs_solarisacl" ;; *hpux*) - AC_MSG_RESULT(Using HPUX ACLs) + AC_MSG_NOTICE(Using HPUX ACLs) AC_DEFINE(HAVE_HPUX_ACLS,1,[Whether HPUX ACLs are available]) default_static_modules="$default_static_modules vfs_hpuxacl" ;; *irix*) - AC_MSG_RESULT(Using IRIX ACLs) + AC_MSG_NOTICE(Using IRIX ACLs) AC_DEFINE(HAVE_IRIX_ACLS,1,[Whether IRIX ACLs are available]) default_static_modules="$default_static_modules vfs_irixacl" ;; *aix*) - AC_MSG_RESULT(Using AIX ACLs) + AC_MSG_NOTICE(Using AIX ACLs) AC_DEFINE(HAVE_AIX_ACLS,1,[Whether AIX ACLs are available]) default_static_modules="$default_static_modules vfs_aixacl" ;; *osf*) - AC_MSG_RESULT(Using Tru64 ACLs) + AC_MSG_NOTICE(Using Tru64 ACLs) AC_DEFINE(HAVE_TRU64_ACLS,1,[Whether Tru64 ACLs are available]) ACL_LIBS="$ACL_LIBS -lpacl" default_static_modules="$default_static_modules vfs_tru64acl" ;; - *freebsd[[5-9]]*) - 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]) + *darwin*) + AC_MSG_NOTICE(ACLs on Darwin currently not supported) + AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support is available]) ;; - *linux*) - AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"]) - AC_CHECK_LIB(acl,acl_get_file,[ACL_LIBS="$ACL_LIBS -lacl"]) - AC_CACHE_CHECK([for ACL support],samba_cv_HAVE_POSIX_ACLS,[ + *) + AC_CHECK_LIB(acl,acl_get_file,[ACL_LIBS="$ACL_LIBS -lacl"]) + case "$host_os" in + *linux*) + AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"]) + ;; + esac + AC_CACHE_CHECK([for POSIX ACL support],samba_cv_HAVE_POSIX_ACLS,[ acl_LIBS=$LIBS - LIBS="$LIBS -lacl" + LIBS="$LIBS $ACL_LIBS" AC_TRY_LINK([ #include #include @@ -5324,11 +5476,11 @@ AC_ARG_WITH(acl-support, LIBS=$acl_LIBS ]) if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then - AC_MSG_RESULT(Using posix ACLs) + AC_MSG_NOTICE(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" + LIBS="$LIBS $ACL_LIBS" AC_TRY_LINK([ #include #include @@ -5344,63 +5496,16 @@ AC_ARG_WITH(acl-support, 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 + default_static_modules="$default_static_modules vfs_posixacl" + else + AC_MSG_NOTICE(ACL support is not avaliable) + AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support is available]) fi - ;; - *) - AC_CHECK_LIB(acl,acl_get_file,[ACL_LIBS="$ACL_LIBS -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) -) +fi # with_acl_support + -if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then - default_static_modules="$default_static_modules vfs_posixacl" -fi ################################################# # check for AIO support @@ -5554,7 +5659,7 @@ AC_ARG_WITH(sendfile-support, AC_MSG_RESULT(yes); case "$host_os" in - linux*-gnu* | gnu* | k*bsd*-gnu) + *linux*) AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[ AC_TRY_LINK([#include ], [\ @@ -5803,7 +5908,6 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) AC_CACHE_CHECK([for Linux readahead], samba_cv_HAVE_LINUX_READAHEAD,[ - AC_TRY_LINK([ #if defined(HAVE_UNISTD_H) #include @@ -5818,6 +5922,8 @@ if test x"$samba_cv_HAVE_LINUX_READAHEAD" = x"yes"; then [Whether Linux readahead is available]) fi +AC_HAVE_DECL(readahead, [#include ]) + ############################################ # See if we have the posix_fadvise syscall. @@ -5856,15 +5962,14 @@ WINBIND_NSS="nsswitch/libnss_winbind.$SHLIBEXT" WINBIND_WINS_NSS="nsswitch/libnss_wins.$SHLIBEXT" WINBIND_NSS_LDSHFLAGS=$LDSHFLAGS NSSSONAMEVERSIONSUFFIX="" - -SMB_KRB5_LOCATOR="bin/smb_krb5_locator.$SHLIBEXT" +WINBIND_NSS_PTHREAD="" case "$host_os" in - linux*-gnu* | gnu* | k*bsd*-gnu) + *linux*) NSSSONAMEVERSIONSUFFIX=".2" WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_linux.o" ;; - freebsd5*|*freebsd[[6-9]]*) + *freebsd[[5-9]]*) # FreeBSD winbind client is implemented as a wrapper around # the Linux version. NSSSONAMEVERSIONSUFFIX=".1" @@ -5921,6 +6026,9 @@ case "$host_os" in ;; esac +AC_CHECK_LIB(pthread, pthread_mutex_lock, [WINBIND_NSS_PTHREAD="-lpthread" + AC_DEFINE(HAVE_PTHREAD, 1, [whether pthread exists])]) +AC_SUBST(WINBIND_NSS_PTHREAD) AC_SUBST(WINBIND_NSS) AC_SUBST(WINBIND_WINS_NSS) AC_SUBST(WINBIND_NSS_LDSHFLAGS) @@ -6016,6 +6124,7 @@ if test x"$samba_cv_HAVE_PEERCRED" = x"yes"; then AC_DEFINE(HAVE_PEERCRED,1,[Whether we can use SO_PEERCRED to get socket credentials]) fi + ################################################# # Check to see if we should use the included popt @@ -6044,7 +6153,7 @@ if test x"$INCLUDED_POPT" = x"yes"; then FLAGS1="-I\$(srcdir)/popt" else AC_MSG_RESULT(no) - BUILD_POPT="" + BUILD_POPT="" POPTLIBS="-lpopt" fi AC_SUBST(BUILD_POPT) @@ -6088,33 +6197,36 @@ AC_SUBST(FLAGS1) -################################################# -# Check if the user wants Python +# Checks for the vfs_fileid module +# Start +AC_CHECK_FUNC(getmntent) -# At the moment, you can use this to set which Python binary to link -# against. (Libraries built for Python2.2 can't be used by 2.1, -# though they can coexist in different directories.) In the future -# this might make the Python stuff be built by default. +AC_CHECK_HEADERS(sys/statfs.h) -# Defaulting python breaks the clean target if python isn't installed +AC_MSG_CHECKING([vfs_fileid: checking for statfs() and struct statfs.f_fsid)]) +AC_CACHE_VAL(vfsfileid_cv_statfs,[ + AC_TRY_RUN([ + #include + #include + int main(void) + { + struct statfs fsd; + fsid_t fsid = fsd.f_fsid; + return statfs (".", &fsd); + }], + vfsfileid_cv_statfs=yes, + vfsfileid_cv_statfs=no, + vfsfileid_cv_statfs=cross) +]) +AC_MSG_RESULT($vfsfileid_cv_statfs) -PYTHON= +if test x"$ac_cv_func_getmntent" = x"yes" -a \ + x"$vfsfileid_cv_statfs" = x"yes"; then + default_shared_modules="$default_shared_modules vfs_fileid" +fi +# End +# Checks for the vfs_fileid module -AC_ARG_WITH(python, -[ --with-python=PYTHONNAME build Python libraries], -[ case "${withval-python}" in - yes) - PYTHON=python - EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS python_ext" - ;; - no) - PYTHON= - ;; - *) - PYTHON=${withval-python} - ;; - esac ]) -AC_SUBST(PYTHON) for i in `echo $default_static_modules | sed -e 's/,/ /g'` do @@ -6133,7 +6245,7 @@ done dnl Always built these modules static MODULE_rpc_spoolss=STATIC -MODULE_rpc_srvsvc=STATIC +MODULE_rpc_srvsvc2=STATIC MODULE_idmap_tdb=STATIC MODULE_idmap_passdb=STATIC MODULE_idmap_nss=STATIC @@ -6170,29 +6282,27 @@ 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_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_svcctl2, \$(RPC_SVCCTL_OBJ), "bin/librpc_svcctl2.$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_srvsvc2, \$(RPC_SVC_OBJ), "bin/librpc_svcsvc2.$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_eventlog2, \$(RPC_EVENTLOG_OBJ), "bin/librpc_eventlog2.$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_epmapper, \$(RPC_EPMAPPER_OBJ), "bin/librpc_epmapper.$SHLIBEXT", RPC) +SMB_MODULE(rpc_rpcecho, \$(RPC_ECHO_OBJ), "bin/librpc_rpcecho.$SHLIBEXT", RPC) SMB_SUBSYSTEM(RPC,smbd/server.o) -SMB_MODULE(idmap_ldap, nsswitch/idmap_ldap.o, "bin/ldap.$SHLIBEXT", IDMAP) -SMB_MODULE(idmap_tdb, nsswitch/idmap_tdb.o, "bin/tdb.$SHLIBEXT", IDMAP) -SMB_MODULE(idmap_passdb, nsswitch/idmap_passdb.o, "bin/passdb.$SHLIBEXT", IDMAP) -SMB_MODULE(idmap_nss, nsswitch/idmap_nss.o, "bin/nss.$SHLIBEXT", IDMAP) -SMB_MODULE(idmap_rid, nsswitch/idmap_rid.o, "bin/rid.$SHLIBEXT", IDMAP) -SMB_MODULE(idmap_ad, nsswitch/idmap_ad.o, "bin/ad.$SHLIBEXT", IDMAP) -SMB_SUBSYSTEM(IDMAP, nsswitch/idmap.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) +SMB_MODULE(idmap_passdb, winbindd/idmap_passdb.o, "bin/passdb.$SHLIBEXT", IDMAP) +SMB_MODULE(idmap_nss, winbindd/idmap_nss.o, "bin/nss.$SHLIBEXT", IDMAP) +SMB_MODULE(idmap_rid, winbindd/idmap_rid.o, "bin/rid.$SHLIBEXT", IDMAP) +SMB_MODULE(idmap_ad, winbindd/idmap_ad.o, "bin/ad.$SHLIBEXT", IDMAP) +SMB_SUBSYSTEM(IDMAP, winbindd/idmap.o) -SMB_MODULE(nss_info_template, nsswitch/nss_info_template.o, "bin/template.$SHLIBEXT", NSS_INFO) -SMB_SUBSYSTEM(NSS_INFO, nsswitch/nss_info.o) +SMB_MODULE(nss_info_template, winbindd/nss_info_template.o, "bin/template.$SHLIBEXT", NSS_INFO) +SMB_SUBSYSTEM(NSS_INFO, winbindd/nss_info.o) SMB_MODULE(charset_weird, modules/weird.o, "bin/weird.$SHLIBEXT", CHARSET) SMB_MODULE(charset_CP850, modules/CP850.o, "bin/CP850.$SHLIBEXT", CHARSET) @@ -6234,8 +6344,8 @@ SMB_MODULE(vfs_cacheprime, \$(VFS_CACHEPRIME_OBJ), "bin/cacheprime.$SHLIBEXT", V 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_notify_fam, \$(VFS_NOTIFY_FAM_OBJ), "bin/notify_fam.$SHLIBEXT", VFS) SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), "bin/readahead.$SHLIBEXT", VFS) +SMB_MODULE(vfs_fileid, \$(VFS_FILEID_OBJ), "bin/fileid.$SHLIBEXT", VFS) SMB_SUBSYSTEM(VFS,smbd/vfs.o) @@ -6366,8 +6476,9 @@ AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"], AC_MSG_WARN([cannot run when cross-compiling])) dnl Merge in developer cflags from now on -if test x"$developer" = x"yes"; then - CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}" +AC_SUBST(DEVELOPER_CFLAGS) +if test x"$krb5_developer" = x"yes" -o x"$developer" = x"yes"; then + CFLAGS="${CFLAGS} \$(DEVELOPER_CFLAGS)" fi builddir=`pwd` @@ -6375,10 +6486,10 @@ AC_SUBST(builddir) # 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) +AC_OUTPUT(Makefile library-versions script/findsmb smbadduser script/gen-8bit-gap.sh script/installbin.sh script/uninstallbin.sh) ################################################# # Print very concise instructions on building/use