~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

Viewing changes to source3/configure.in

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
m4_include(pkg.m4)
24
24
 
25
25
AC_LIBREPLACE_CC_CHECKS
 
26
AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR
26
27
 
27
28
m4_include(../lib/tevent/libtevent.m4)
28
29
 
36
37
SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}"
37
38
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
38
39
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
39
 
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
40
40
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
41
41
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
42
42
 
69
69
AC_SUBST(INSTALL_LIBWBCLIENT)
70
70
AC_SUBST(UNINSTALL_LIBWBCLIENT)
71
71
AC_SUBST(LIBWBCLIENT_SHARED_TARGET)
 
72
AC_SUBST(LIBWBCLIENT_SHARED_TARGET_SOVER)
 
73
AC_SUBST(LIBWBCLIENT_SHARED_TARGET_FULLVER)
72
74
AC_SUBST(LIBWBCLIENT_SHARED)
73
75
AC_SUBST(LIBWBCLIENT_STATIC_TARGET)
74
76
AC_SUBST(LIBWBCLIENT_STATIC)
75
77
AC_SUBST(LIBWBCLIENT_SOVER)
 
78
AC_SUBST(LIBWBCLIENT_FULLVER)
76
79
AC_SUBST(LIBWBCLIENT)
77
80
AC_SUBST(LIBWBCLIENT_LIBS)
78
81
 
123
126
 
124
127
m4_include(m4/swat.m4)
125
128
 
 
129
DEVELOPER_CFLAGS="-DDEBUG_PASSWORD -DDEVELOPER"
 
130
 
126
131
# Probe the gcc version for extra CFLAGS. We always stash these in
127
132
# DEVELOPER_CFLAGS, so that you can turn them on and off with a simple
128
133
# Makefile edit, avoiding the need to re-run configure.
129
134
if test x"$ac_cv_prog_gcc" = x"yes" ; then
130
 
        DEVELOPER_CFLAGS="-g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
 
135
        DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings"
131
136
        # Add -Wdeclaration-after-statement if compiler supports it
132
137
        AC_CACHE_CHECK(
133
138
          [that the C compiler understands -Wdeclaration-after-statement],
194
199
)
195
200
 
196
201
dnl Checks for programs.
197
 
merged_build_possible=yes
 
202
AC_ARG_ENABLE(smbtorture4,
 
203
        [AS_HELP_STRING([--enable-smbtorture4], [Enable building smbtorture4 (default=auto)])])
 
204
 
 
205
if test x$enable_smbtorture4 != xno; then
 
206
        smbtorture4_possible=yes
 
207
else
 
208
        smbtorture4_possible=no
 
209
fi
198
210
 
199
211
AC_PROG_INSTALL
200
212
AC_PROG_AWK
201
213
# Check for GNU make
202
214
m4_include(../m4/check_make.m4)
203
 
AC_SAMBA_GNU_MAKE([true], [merged_build_possible=no])
 
215
AC_SAMBA_GNU_MAKE([true], [true])
204
216
 
205
217
# Check for perl
206
218
m4_include(../m4/check_perl.m4)
207
 
AC_SAMBA_PERL([true], [merged_build_possible=no])
 
219
AC_SAMBA_PERL([true], [smbtorture4_possible=no])
 
220
 
 
221
# Check for python
 
222
m4_include(../m4/check_python.m4)
 
223
AC_SAMBA_PYTHON_DEVEL([true], [smbtorture4_possible=no])
208
224
 
209
225
AC_CHECK_TOOL(AR, ar)
210
226
 
231
247
        else
232
248
           AC_MSG_CHECKING(GNU ld release version)
233
249
           changequote(,)dnl
234
 
           ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^[^0-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
 
250
           ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | awk '{print $NF}' | sed -n 's,\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
235
251
           ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
236
252
           ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
237
253
           changequote([,])dnl
335
351
                return 0;
336
352
        }
337
353
],
338
 
        samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv__CC_NEGATIVE_ENUM_VALUES=no)])
 
354
        samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv_CC_NEGATIVE_ENUM_VALUES=no)])
339
355
if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
340
356
        AC_MSG_WARN([using --uint-enums for pidl])
341
357
        PIDL_ARGS="$PIDL_ARGS --uint-enums"
395
411
 
396
412
dnl Add modules that have to be built by default here
397
413
dnl These have to be built static:
398
 
default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
 
414
default_static_modules=""
 
415
default_static_modules="$default_static_modules pdb_smbpasswd"
 
416
default_static_modules="$default_static_modules pdb_tdbsam"
 
417
default_static_modules="$default_static_modules pdb_wbc_sam"
 
418
default_static_modules="$default_static_modules rpc_lsarpc"
 
419
default_static_modules="$default_static_modules rpc_samr"
 
420
default_static_modules="$default_static_modules rpc_winreg"
 
421
default_static_modules="$default_static_modules rpc_initshutdown"
 
422
default_static_modules="$default_static_modules rpc_dssetup"
 
423
default_static_modules="$default_static_modules rpc_wkssvc"
 
424
default_static_modules="$default_static_modules rpc_svcctl"
 
425
default_static_modules="$default_static_modules rpc_ntsvcs"
 
426
default_static_modules="$default_static_modules rpc_netlogon"
 
427
default_static_modules="$default_static_modules rpc_netdfs"
 
428
default_static_modules="$default_static_modules rpc_srvsvc"
 
429
default_static_modules="$default_static_modules rpc_spoolss"
 
430
default_static_modules="$default_static_modules rpc_eventlog"
 
431
default_static_modules="$default_static_modules auth_sam"
 
432
default_static_modules="$default_static_modules auth_unix"
 
433
default_static_modules="$default_static_modules auth_winbind"
 
434
default_static_modules="$default_static_modules auth_wbc"
 
435
default_static_modules="$default_static_modules auth_server"
 
436
default_static_modules="$default_static_modules auth_domain"
 
437
default_static_modules="$default_static_modules auth_builtin"
 
438
default_static_modules="$default_static_modules vfs_default"
 
439
default_static_modules="$default_static_modules nss_info_template"
399
440
 
400
441
dnl These are preferably build shared, and static if dlopen() is not available
401
 
default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen vfs_catia vfs_scannedonly"
 
442
default_shared_modules=""
 
443
default_shared_modules="$default_shared_modules vfs_recycle"
 
444
default_shared_modules="$default_shared_modules vfs_audit"
 
445
default_shared_modules="$default_shared_modules vfs_extd_audit"
 
446
default_shared_modules="$default_shared_modules vfs_full_audit"
 
447
default_shared_modules="$default_shared_modules vfs_netatalk"
 
448
default_shared_modules="$default_shared_modules vfs_fake_perms"
 
449
default_shared_modules="$default_shared_modules vfs_default_quota"
 
450
default_shared_modules="$default_shared_modules vfs_readonly"
 
451
default_shared_modules="$default_shared_modules vfs_cap"
 
452
default_shared_modules="$default_shared_modules vfs_expand_msdfs"
 
453
default_shared_modules="$default_shared_modules vfs_shadow_copy"
 
454
default_shared_modules="$default_shared_modules vfs_shadow_copy2"
 
455
default_shared_modules="$default_shared_modules charset_CP850"
 
456
default_shared_modules="$default_shared_modules charset_CP437"
 
457
default_shared_modules="$default_shared_modules auth_script"
 
458
default_shared_modules="$default_shared_modules vfs_readahead"
 
459
default_shared_modules="$default_shared_modules vfs_xattr_tdb"
 
460
default_shared_modules="$default_shared_modules vfs_streams_xattr"
 
461
default_shared_modules="$default_shared_modules vfs_streams_depot"
 
462
default_shared_modules="$default_shared_modules vfs_acl_xattr"
 
463
default_shared_modules="$default_shared_modules vfs_acl_tdb"
 
464
default_shared_modules="$default_shared_modules vfs_smb_traffic_analyzer"
 
465
default_shared_modules="$default_shared_modules vfs_preopen"
 
466
default_shared_modules="$default_shared_modules vfs_catia"
 
467
default_shared_modules="$default_shared_modules vfs_scannedonly"
 
468
default_shared_modules="$default_shared_modules vfs_crossrename"
 
469
default_shared_modules="$default_shared_modules vfs_linux_xfs_sgid"
 
470
default_shared_modules="$default_shared_modules vfs_time_audit"
 
471
default_shared_modules="$default_shared_modules idmap_autorid"
402
472
 
403
473
if test "x$developer" = xyes; then
404
474
   default_static_modules="$default_static_modules rpc_rpcecho pdb_ads"
 
475
   default_static_modules="$default_static_modules auth_netlogond"
405
476
   default_shared_modules="$default_shared_modules charset_weird perfcount_test"
406
477
fi
407
478
 
457
528
                                AC_MSG_RESULT([no large file support])
458
529
                                ;;
459
530
                        5.*)
 
531
                        LDFLAGS="$LDFLAGS -lthread"
 
532
                        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
460
533
                        AC_MSG_RESULT([enabling large file support])
461
534
                        if test "$ac_cv_prog_gcc" = yes; then
462
535
                                ${CC-cc} -v >conftest.c 2>&1
464
537
                                rm -fr conftest.c
465
538
                                case "$ac_cv_gcc_compiler_version_number" in
466
539
                                        *"gcc version 2.6"*|*"gcc version 2.7"*)
467
 
                                                CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE -D_REENTRANT"
468
 
                                                LDFLAGS="$LDFLAGS -lthread"
 
540
                                                CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
469
541
                                                AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
470
542
                                                ;;
471
543
                                        *)
472
 
                                                CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
473
 
                                                LDFLAGS="$LDFLAGS -lthread"
 
544
                                                CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
474
545
                                                AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
475
546
                                                AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
476
547
                                                ;;
477
548
                                esac
478
549
                        else
479
 
                                CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
480
 
                                LDFLAGS="$LDFLAGS -lthread"
 
550
                                CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
481
551
                                AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
482
552
                                AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
483
553
                        fi
679
749
AC_CHECK_HEADERS(langinfo.h locale.h)
680
750
AC_CHECK_HEADERS(xfs/libxfs.h)
681
751
AC_CHECK_HEADERS(netgroup.h)
 
752
AC_CHECK_HEADERS(linux/falloc.h)
682
753
 
683
754
AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[
684
755
#if HAVE_RPC_RPC_H
699
770
# subdirectory of headers.
700
771
AC_CHECK_HEADERS(valgrind.h valgrind/valgrind.h valgrind/memcheck.h)
701
772
 
 
773
if test x"$enable_developer" = x"yes" ; then
 
774
   if test x"$ac_cv_header_valgrind_h" = xyes -o \
 
775
           x"$ac_cv_header_valgrind_valgrind_h" = xyes ; then
 
776
      AC_DEFINE(VALGRIND,1,[Whether we have valgrind headers])
 
777
   fi
 
778
fi
 
779
 
702
780
#
703
781
# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
704
782
# This causes configure to fail to detect it. Check for shadow separately on HPUX.
767
845
                        # dendencies including thread libraries - use cups-config only if really
768
846
                        # required. 
769
847
                        AC_CHECK_LIB_EXT(cups, ac_save_PRINT_LIBS , httpConnect,
770
 
                                [PRINT_LIBS"$ac_save_PRINT_LIBS -lcups"],
 
848
                                [PRINT_LIBS="$ac_save_PRINT_LIBS -lcups"],
771
849
                                [AC_MSG_WARN([your cups library doesn't link with -lcups alone, it might be underlinked.]) ;
772
850
                                 PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG --libs`"])
773
851
 
881
959
        [#include <signal.h>])
882
960
fi
883
961
 
884
 
AC_CACHE_CHECK([for struct timespec type],samba_cv_struct_timespec, [
885
 
    AC_TRY_COMPILE([
886
 
#include <sys/types.h>
887
 
#if STDC_HEADERS
888
 
#include <stdlib.h>
889
 
#include <stddef.h>
890
 
#endif
891
 
#if TIME_WITH_SYS_TIME
892
 
# include <sys/time.h>
893
 
# include <time.h>
894
 
#else
895
 
# if HAVE_SYS_TIME_H
896
 
#  include <sys/time.h>
897
 
# else
898
 
#  include <time.h>
899
 
# endif
900
 
#endif
901
 
],[struct timespec ts;],
902
 
        samba_cv_struct_timespec=yes,samba_cv_struct_timespec=no)])
903
 
if test x"$samba_cv_struct_timespec" = x"yes"; then
904
 
   AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec])
905
 
fi
906
 
 
907
962
# and glibc has setresuid under linux but the function does
908
963
# nothing until kernel 2.1.44! very dumb.
909
964
AC_CACHE_CHECK([for real setresuid],samba_cv_have_setresuid,[
1019
1074
AC_CHECK_FUNCS(getcwd fchown chmod fchmod mknod mknod64)
1020
1075
AC_CHECK_FUNCS(strtol)
1021
1076
AC_CHECK_FUNCS(strchr chflags)
1022
 
AC_CHECK_FUNCS(getrlimit fsync fdatasync setpgid)
 
1077
AC_CHECK_FUNCS(getrlimit fsync setpgid)
 
1078
AC_CHECK_FUNCS(fdatasync,,[AC_CHECK_LIB_EXT(rt, LIBS, fdatasync)])
1023
1079
AC_CHECK_FUNCS(setsid glob strpbrk crypt16 getauthuid)
1024
1080
AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent)
1025
 
AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf)
 
1081
AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf)
1026
1082
AC_CHECK_FUNCS(getgrset)
1027
1083
AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf stat64 fstat64)
1028
1084
AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64)
 
1085
AC_CHECK_FUNCS(fallocate fallocate64)
1029
1086
AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam)
1030
1087
AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64)
 
1088
AC_CHECK_FUNCS(fdopendir fdopendir64)
1031
1089
AC_CHECK_FUNCS(getpwent_r)
1032
1090
AC_CHECK_FUNCS(getdents64)
1033
1091
AC_CHECK_FUNCS(setenv strcasecmp fcvt fcvtl)
1034
1092
AC_CHECK_FUNCS(syslog vsyslog timegm)
1035
1093
AC_CHECK_FUNCS(setlocale nl_langinfo)
1036
1094
AC_CHECK_FUNCS(nanosleep,,[AC_CHECK_LIB_EXT(rt, LIBS, nanosleep)])
1037
 
AC_CHECK_FUNCS(utimensat)
 
1095
AC_CHECK_FUNCS(lutimes futimes utimensat futimens)
1038
1096
AC_CHECK_FUNCS(mlock munlock mlockall munlockall)
1039
1097
AC_CHECK_FUNCS(memalign posix_memalign hstrerror)
1040
1098
AC_CHECK_HEADERS(sys/mman.h)
1054
1112
# check for sysctlbyname for BSD systems
1055
1113
AC_CHECK_FUNCS(sysctlbyname)
1056
1114
 
 
1115
#################################################
 
1116
# Check to see if core dump directory is defined in linux
 
1117
# with /proc/sys/kernel/core_pattern
 
1118
 
 
1119
AC_CHECK_FILE([/proc/sys/kernel/core_pattern],
 
1120
        AC_DEFINE(HAVE_SYS_KERNEL_PROC_CORE_PATTERN, 1,
 
1121
        [Whether Linux kernel uses core_pattern for core files]),
 
1122
         [])
 
1123
 
1057
1124
#############################
1058
1125
# check if building with gpfs
1059
1126
AC_CHECK_HEADERS(gpfs_gpl.h)
1060
1127
if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then
1061
1128
    AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL headers are available])
1062
1129
    default_shared_modules="$default_shared_modules vfs_gpfs"
 
1130
    default_shared_modules="$default_shared_modules vfs_gpfs_hsm_notify"
1063
1131
fi
1064
1132
 
1065
1133
#############################################
1380
1448
AC_CHECK_FUNCS(strsignal)
1381
1449
 
1382
1450
############################################
1383
 
# Check if we have libattr
 
1451
# Check for EA implementations
1384
1452
case "$host_os" in
1385
1453
  *osf*)
1386
1454
        AC_SEARCH_LIBS(getproplist, [proplist])
1388
1456
        AC_CHECK_FUNCS(delproplist fdelproplist add_proplist_entry get_proplist_entry)
1389
1457
        AC_CHECK_FUNCS(sizeof_proplist_entry)
1390
1458
  ;;
1391
 
  *)
1392
 
        AC_SEARCH_LIBS(getxattr, [attr])
1393
 
        AC_CHECK_FUNCS(getxattr lgetxattr fgetxattr listxattr llistxattr)
1394
 
        AC_CHECK_FUNCS(getea fgetea lgetea listea flistea llistea)
1395
 
        AC_CHECK_FUNCS(removeea fremoveea lremoveea setea fsetea lsetea)
1396
 
        AC_CHECK_FUNCS(flistxattr removexattr lremovexattr fremovexattr)
1397
 
        AC_CHECK_FUNCS(setxattr lsetxattr fsetxattr)
1398
 
        AC_CHECK_FUNCS(attr_get attr_list attr_set attr_remove)
1399
 
        AC_CHECK_FUNCS(attr_getf attr_listf attr_setf attr_removef)
 
1459
  *freebsd4* | *dragonfly* )
 
1460
        AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work])
1400
1461
  ;;
1401
 
esac
1402
 
 
1403
 
########################################################
1404
 
# Check if attropen() is present if this is Solaris
1405
 
case "$host_os" in
1406
1462
  *solaris*)
1407
1463
        AC_CHECK_FUNCS(attropen)
1408
1464
  ;;
 
1465
  *)
 
1466
        AC_SEARCH_LIBS(getxattr, [attr])
 
1467
        AC_CHECK_FUNCS(getxattr,[
 
1468
                AC_CHECK_FUNCS(lgetxattr fgetxattr listxattr llistxattr flistxattr removexattr lremovexattr fremovexattr setxattr lsetxattr fsetxattr)
 
1469
                ])
 
1470
        AC_CHECK_FUNCS(getea,[
 
1471
                AC_CHECK_FUNCS(fgetea lgetea listea flistea llistea removeea fremoveea lremoveea setea fsetea lsetea)
 
1472
                ])
 
1473
        AC_CHECK_FUNCS(attr_get,[
 
1474
                AC_CHECK_FUNCS(attr_list attr_set attr_remove attr_getf attr_listf attr_setf attr_removef)
 
1475
                ])
 
1476
        AC_CHECK_FUNCS(extattr_delete_file,[
 
1477
                AC_CHECK_FUNCS(extattr_delete_fd extattr_delete_link extattr_get_fd extattr_get_file extattr_get_link extattr_list_fd extattr_list_file extattr_list_link extattr_set_fd extattr_set_file extattr_set_link)
 
1478
                ])
 
1479
  ;;
1409
1480
esac
1410
1481
 
1411
1482
########################################################
1432
1503
        fi
1433
1504
fi
1434
1505
 
1435
 
# Check if we have extattr
1436
 
case "$host_os" in
1437
 
  *freebsd4* | *dragonfly* )
1438
 
    AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work])
1439
 
    ;;
1440
 
  *)
1441
 
    AC_CHECK_FUNCS(extattr_delete_fd extattr_delete_file extattr_delete_link)
1442
 
    AC_CHECK_FUNCS(extattr_get_fd extattr_get_file extattr_get_link)
1443
 
    AC_CHECK_FUNCS(extattr_list_fd extattr_list_file extattr_list_link)
1444
 
    AC_CHECK_FUNCS(extattr_set_fd extattr_set_file extattr_set_link)
1445
 
    ;;
1446
 
esac
1447
 
 
1448
1506
AC_DISABLE_STATIC
1449
1507
AC_ENABLE_SHARED
1450
1508
 
1622
1680
                        AC_DEFINE(BROKEN_STRNDUP,1,[Does strndup work correctly])
1623
1681
                        ;;
1624
1682
                *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
1625
 
                        # Use special PIC flags for the native HP-UX compiler.
1626
 
                                BLDSHARED="true"
1627
 
                                SHLD="cc"
1628
 
                                LDSHFLAGS="-b -Wl,-B,symbolic,-b,-z"
1629
 
                                SONAMEFLAG="-Wl,+h "
 
1683
                        # ia64: 64bit build using gcc with CFLAGS="-mpl64"
 
1684
                        #       64bit build using HP's cc with CFLAGS="+DD64"
 
1685
                        # hppa: 64bit build unsupported by gcc
 
1686
                        #       64bit build using HP's cc with CFLAGS="+DA2.0w"
 
1687
                        # HP-UX 11.00 ld needs PHSS_33034
 
1688
                        BLDSHARED="true"
 
1689
                        if test "${GCC}" = "yes"; then
 
1690
                                PICFLAG="-fPIC"
 
1691
                                LDSHFLAGS="-shared"
 
1692
                        else
1630
1693
                                PICFLAG="+z"
1631
 
                        if test "${GCC}" = "yes"; then
1632
 
                                PICFLAG="-fPIC"
1633
 
                        else
1634
 
                                PICFLAG="+z +ESnolit"
 
1694
                                LDSHFLAGS="-b"
 
1695
                                # "Uses depth-first symbol resolution"
 
1696
                                LDSHFLAGS="$LDSHFLAGS -Wl,-B,symbolic,-b"
 
1697
                                if test "$host_cpu" != "ia64"; then
 
1698
                                        # "don't store literals in read-only memory" (?):
 
1699
                                        PICFLAG="$PICFLAG +ESnolit"
 
1700
                                fi
1635
1701
                        fi
1636
1702
                        if test "$host_cpu" = "ia64"; then
1637
1703
                                SHLIBEXT="so"
1638
 
                              PICFLAG="+z"
1639
 
                                DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
 
1704
                                # TODO: does the linker find the right 32/64 bit version of the libs? :
 
1705
                                DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32:/usr/local/lib/hpux64:/usr/lib/hpux64"
1640
1706
                        else
1641
1707
                                SHLIBEXT="sl"
1642
1708
                                DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib"
1643
1709
                        fi
 
1710
                        if test "$ac_cv_prog_gnu_ld" = "yes"; then
 
1711
                                SONAMEFLAG="-Wl,-soname="
 
1712
                        else
 
1713
                                SONAMEFLAG="-Wl,+h,"
 
1714
                        fi
 
1715
                        # PIE/PIC flags at link time are required on HP-UX because
 
1716
                        # linking requires a temporary source file, which is being
 
1717
                        # compiled with the indicated flags - which need to contain
 
1718
                        # PIC flags when we don't support PIE flags:
 
1719
                        if test "$PIE_LDFLAGS" = "" ; then
 
1720
                                PIE_LDFLAGS=\${PICFLAG}
 
1721
                        fi
1644
1722
                        AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
1645
1723
                        AC_DEFINE(POSIX_ACL_NEEDS_MASK,1,[Does a POSIX ACL need a mask element])
1646
1724
                        ;;
1653
1731
                        fi
1654
1732
                        AC_DEFINE(STAT_ST_BLOCKSIZE,512)
1655
1733
                        AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
 
1734
                        for flags in "-expect_unresolved '*'" "-Wl,-expect_unresolved,'*'" ; do
 
1735
                                saved_ldflags="$LDFLAGS"
 
1736
                                AC_MSG_CHECKING([if $flags works])
 
1737
                                LDFLAGS="$flags $saved_ldflags"
 
1738
                                AC_TRY_LINK([],[],
 
1739
                                        [AC_MSG_RESULT([yes])
 
1740
                                        LDSHFLAGS_Z_NODEFS=$flags],
 
1741
                                        AC_MSG_RESULT([no]))
 
1742
                                LDFLAGS="$saved_ldflags"
 
1743
                                test x"$LDSHFLAGS_Z_NODEFS" != x && break
 
1744
                        done
1656
1745
                        ;;
1657
1746
                *sco*) AC_DEFINE(SCO,1,[Whether the host os is sco unix])
1658
1747
                        AC_DEFINE(STAT_ST_BLOCKSIZE,512)
1730
1819
 
1731
1820
AC_MSG_RESULT($BLDSHARED)
1732
1821
 
1733
 
saved_before_as_needed_ldflags="$LDFLAGS"
1734
 
for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
 
1822
if test x"$enable_developer" = x"yes" ; then
 
1823
        default_as_needed=auto
 
1824
else
 
1825
        default_as_needed=no
 
1826
fi
 
1827
AC_ARG_ENABLE(as-needed,
 
1828
        AS_HELP_STRING([--enable-as-needed],
 
1829
        [Turn on as-needed support if available (default=no)]),
 
1830
        [enable_as_needed=$enableval],
 
1831
        [enable_as_needed=$default_as_needed])
 
1832
if test "x$enable_as_needed" != xno; then
 
1833
    saved_before_as_needed_ldflags="$LDFLAGS"
 
1834
    for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
1735
1835
        saved_ldflags="$LDFLAGS"
1736
1836
        AC_MSG_CHECKING([if $flags works])
1737
1837
        LDFLAGS="$flags $saved_ldflags"
1742
1842
                AC_MSG_RESULT([no]))
1743
1843
        LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags"
1744
1844
        test x"$ld_as_needed_flag_found" = xyes && break
1745
 
done
 
1845
    done
 
1846
fi
 
1847
 
 
1848
if test x$ld_as_needed_flag_found = xyes -a x$enable_as_needed = xauto ; then
 
1849
# check if ld has bug described in https://bugzilla.samba.org/show_bug.cgi?id=7209#c17
 
1850
        AC_MSG_CHECKING([if $LD_AS_NEEDED_FLAG has explicit external libs bug])
 
1851
cat > conftest_shb.c <<END
 
1852
void b() {}
 
1853
END
 
1854
cat > conftest_sha.c <<END
 
1855
extern void b();
 
1856
void a() {
 
1857
        b();
 
1858
}
 
1859
END
 
1860
cat > conftest.c <<END
 
1861
extern void a();
 
1862
int main() {
 
1863
        a();
 
1864
        return 0;
 
1865
}
 
1866
END
 
1867
 
 
1868
        rm -fr conftest
 
1869
        AC_TRY_COMMAND([$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o conftest_sha.o conftest_sha.c 1>&AS_MESSAGE_LOG_FD 2>&1])
 
1870
        AC_TRY_COMMAND([$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o conftest_shb.o conftest_shb.c 1>&AS_MESSAGE_LOG_FD 2>&1])
 
1871
        TESTCMD="`eval echo \"$SHLD $LDSHFLAGS $PICFLAG\"`"
 
1872
        AC_TRY_COMMAND([$TESTCMD -o libconftest_shb.$SHLIBEXT conftest_shb.o 1>&AS_MESSAGE_LOG_FD 2>&1])
 
1873
        AC_TRY_COMMAND([$TESTCMD -o libconftest_sha.$SHLIBEXT conftest_sha.o 1>&AS_MESSAGE_LOG_FD 2>&1])
 
1874
        AC_TRY_COMMAND([$CC -o conftest conftest.c $LDFLAGS -L. -lconftest_sha -lconftest_shb 1>&AS_MESSAGE_LOG_FD 2>&1])
 
1875
        if AC_TRY_COMMAND([eval "$LIB_PATH_VAR=. ./conftest 1>&AS_MESSAGE_LOG_FD 2>&1"])
 
1876
        then
 
1877
                AC_MSG_RESULT([no])
 
1878
        else
 
1879
                ld_as_needed_flag_found=no
 
1880
                LDFLAGS="$saved_before_as_needed_ldflags"
 
1881
                AC_MSG_RESULT([yes])
 
1882
        fi
 
1883
        rm conftest* libconftest*
 
1884
fi
1746
1885
 
1747
1886
# check if we have to disable LD_AS_NEEDED_FLAG:
1748
1887
# On some systems for a veriety of reasons linking with
1817
1956
   # variables so they need to be eval'ed.
1818
1957
   if AC_TRY_COMMAND([$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.o ${srcdir-.}/../tests/shlib.c 1>&AS_MESSAGE_LOG_FD])
1819
1958
   then
1820
 
     if AC_TRY_COMMAND([`eval echo "$SHLD $LDSHFLAGS $PICFLAG"` -o "shlib.$SHLIBEXT" shlib.o 1>&AS_MESSAGE_LOG_FD])
 
1959
     TESTCMD="`eval echo \"$SHLD $LDSHFLAGS $PICFLAG\"`"
 
1960
     TESTCMD="$TESTCMD -o \"shlib.$SHLIBEXT\" shlib.o"
 
1961
     if AC_TRY_COMMAND([eval $TESTCMD 1>&AS_MESSAGE_LOG_FD 2>&1])
1821
1962
     then
1822
1963
       ac_cv_shlib_works=yes
1823
1964
     fi
1837
1978
        SHLD="shared-libraries-disabled"
1838
1979
        PICFLAG="${PIE_CFLAGS}"
1839
1980
        SHLIBEXT="shared_libraries_disabled"
1840
 
        merged_build_possible=no
 
1981
        smbtorture4_possible=no
1841
1982
fi
1842
1983
 
1843
1984
AC_MSG_CHECKING([used PICFLAG])
1845
1986
 
1846
1987
AC_DEFINE_UNQUOTED(SHLIBEXT, "$SHLIBEXT", [Shared library extension])
1847
1988
 
1848
 
AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR
1849
1989
 
1850
1990
 
1851
1991
###########################################################
1852
1992
#
1853
 
# Configuration of subsystem / libraries
 
1993
# Configuration of subsystems / libraries
1854
1994
#
1855
1995
###########################################################
1856
1996
 
1942
2082
#  TODO: for talloc and tdb (at least), these should
1943
2083
#  be extracted from their respective source directories
1944
2084
#
1945
 
AC_ARG_ENABLE(external_libtalloc, [AS_HELP_STRING([--enable-external-libtalloc], [Enable external talloc [default=auto]])],
1946
 
[ enable_external_libtalloc=$enableval ], [ enable_external_libtalloc=auto ])
 
2085
AC_ARG_ENABLE(external_libtalloc,
 
2086
        [AS_HELP_STRING([--enable-external-libtalloc],
 
2087
                [Enable external talloc [default=auto]])],
 
2088
        [ enable_external_libtalloc=$enableval ],
 
2089
        [ enable_external_libtalloc=auto ])
1947
2090
 
1948
2091
if test "x$enable_external_libtalloc" != xno
1949
2092
then
1950
2093
        PKG_CHECK_MODULES(LIBTALLOC, talloc >= 2.0.1,
1951
2094
                [ enable_external_libtalloc=yes ],
1952
 
                [if test x$enable_external_libtalloc = xyes; then
 
2095
                [ if test x$enable_external_libtalloc = xyes; then
1953
2096
                        AC_MSG_ERROR([Unable to find libtalloc])
1954
2097
                  else
1955
2098
                        enable_external_libtalloc=no
1960
2103
if test "x$enable_external_libtalloc" = xno
1961
2104
then
1962
2105
        m4_include(../lib/talloc/libtalloc.m4)
1963
 
        LINK_LIBTALLOC=STATIC
1964
 
        SMB_LIBRARY(talloc, 2)
 
2106
        if test x"$USESHARED" == x"no" ; then
 
2107
                LINK_LIBTALLOC=STATIC
 
2108
        fi
 
2109
        LIBTALLOCVERSION=`grep ^VERSION ${tallocdir}/wscript | sed -e "s/'//g" -e 's/.* //'`
 
2110
        SMB_LIBRARY(talloc, 2, ${LIBTALLOCVERSION})
1965
2111
        LIBTALLOC_OBJ0=""
1966
2112
        for obj in ${TALLOC_OBJ}; do
1967
2113
                LIBTALLOC_OBJ0="${LIBTALLOC_OBJ0} ${tallocdir}/${obj}"
1978
2124
AC_ARG_ENABLE(external_libtdb,
1979
2125
        [AS_HELP_STRING([--enable-external-libtdb],
1980
2126
                [Enable external tdb [default=auto]])],
1981
 
                [ enable_external_libtalloc=$enableval ],
1982
 
                [ enable_external_libtalloc=auto ])
 
2127
                [ enable_external_libtdb=$enableval ],
 
2128
                [ enable_external_libtdb=auto ])
1983
2129
 
1984
2130
if test "x$enable_external_libtdb" != xno
1985
2131
then
1986
 
        PKG_CHECK_MODULES(LIBTDB, tdb >= 1.2.1,
 
2132
        PKG_CHECK_MODULES(LIBTDB, tdb >= 1.2.6,
1987
2133
                [ enable_external_libtdb=yes ],
1988
2134
                [
1989
2135
                if test x$enable_external_libtdb = xyes; then
1998
2144
if test "x$enable_external_libtdb" = xno
1999
2145
then
2000
2146
        m4_include(../lib/tdb/libtdb.m4)
2001
 
        LINK_LIBTDB=STATIC
2002
 
        SMB_LIBRARY(tdb, 1)
 
2147
        if test x"$USESHARED" == x"no" ; then
 
2148
                LINK_LIBTDB=STATIC
 
2149
        fi
 
2150
        LIBTDBVERSION=`grep ^VERSION ${tdbdir}/wscript | sed -e "s/'//g" -e 's/.* //'`
 
2151
        SMB_LIBRARY(tdb, 1, ${LIBTDBVERSION})
2003
2152
        LIBTDB_OBJ0=""
 
2153
        LIBTDB_LIBS="$LIBTDB_LIBS $TDB_DEPS"
2004
2154
        for obj in ${TDB_OBJ}; do
2005
2155
                LIBTDB_OBJ0="${LIBTDB_OBJ0} ${tdbdir}/${obj}"
2006
2156
        done
2012
2162
        AC_SUBST(TDBBACKUP)
2013
2163
        TDBDUMP="bin/tdbdump\$(EXEEXT)"
2014
2164
        AC_SUBST(TDBDUMP)
 
2165
        TDBRESTORE="bin/tdbrestore\$(EXEEXT)"
 
2166
        AC_SUBST(TDBRESTORE)
2015
2167
        TDBTOOL="bin/tdbtool\$(EXEEXT)"
2016
2168
        AC_SUBST(TDBTOOL)
2017
2169
        TDBTORTURE="bin/tdbtorture\$(EXEEXT)"
2018
2170
        AC_SUBST(TDBTORTURE)
 
2171
        ac_cv_have_tdb_err_nesting=yes
 
2172
else
 
2173
        AC_TRY_COMPILE([#include <tdb.h>],
 
2174
                       [enum TDB_ERROR err = TDB_ERR_NESTING],
 
2175
                       ac_cv_have_tdb_err_nesting=yes,
 
2176
                       ac_cv_have_tdb_err_nesting=no)
 
2177
fi
 
2178
 
 
2179
if test x"$ac_cv_have_tdb_err_nesting" = xyes; then
 
2180
   AC_DEFINE(HAVE_TDB_ERR_NESTING, 1, [Whether we have TDB_ERR_NESTING])
2019
2181
fi
2020
2182
 
2021
2183
SMB_LIBRARY(netapi, 0)
2022
2184
SMB_LIBRARY(smbclient, 0)
2023
2185
SMB_LIBRARY(smbsharemodes, 0)
2024
 
SMB_LIBRARY(addns, 0, no, [undefined API])
 
2186
SMB_LIBRARY(addns, 0, [], no, [undefined API])
2025
2187
 
2026
2188
 
2027
2189
 
2243
2405
    AC_DEFINE(HAVE_FUNCTION_MACRO,1,[Whether there is a __FUNCTION__ macro])
2244
2406
fi
2245
2407
 
2246
 
AC_CACHE_CHECK([if gettimeofday takes tz argument],samba_cv_HAVE_GETTIMEOFDAY_TZ,[
2247
 
AC_TRY_LINK([
2248
 
#include <sys/time.h>
2249
 
#include <unistd.h>], [struct timeval tv; return gettimeofday(&tv, NULL);],
2250
 
           samba_cv_HAVE_GETTIMEOFDAY_TZ=yes,
2251
 
           samba_cv_HAVE_GETTIMEOFDAY_TZ=no)])
2252
 
if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
2253
 
    AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday takes a tz argument])
2254
 
fi
2255
 
 
2256
 
if test x"$samba_cv_WITH_PROFILE" = x"yes"; then
2257
 
 
2258
 
    # On some systems (eg. Linux) librt can pull in libpthread. We
2259
 
    # don't want this to happen because libpthreads changes signal delivery
2260
 
    # semantics in ways we are not prepared for. This breaks Linux oplocks
2261
 
    # which rely on signals.
2262
 
 
2263
 
    AC_LIBTESTFUNC(rt, clock_gettime,
2264
 
            [
2265
 
                            AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
2266
 
                                [Whether clock_gettime is available])
2267
 
                            SMB_CHECK_CLOCK_ID(CLOCK_MONOTONIC)
2268
 
                            SMB_CHECK_CLOCK_ID(CLOCK_PROCESS_CPUTIME_ID)
2269
 
                            SMB_CHECK_CLOCK_ID(CLOCK_REALTIME)
2270
 
                        ])
2271
 
 
 
2408
if test x"$libreplace_cv_HAVE_CLOCK_GETTIME_IN_LIBRT" = xyes ; then
 
2409
        LIBS="$LIBS -lrt"
2272
2410
fi
2273
2411
 
2274
2412
AC_CACHE_CHECK([for broken readdir name],samba_cv_HAVE_BROKEN_READDIR_NAME,[
2424
2562
fi
2425
2563
# end utmp details
2426
2564
 
 
2565
AC_CACHE_CHECK([for linux fallocate],samba_cv_HAVE_LINUX_FALLOCATE,[
 
2566
AC_TRY_COMPILE([
 
2567
#if defined(HAVE_UNISTD_H)
 
2568
#include <unistd.h>
 
2569
#endif
 
2570
#include <sys/types.h>
 
2571
#define _GNU_SOURCE
 
2572
#include <fcntl.h>
 
2573
#if defined(HAVE_LINUX_FALLOC_H)
 
2574
#include <linux/falloc.h>
 
2575
#endif],
 
2576
[int ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 10);],
 
2577
samba_cv_HAVE_LINUX_FALLOCATE=yes,samba_cv_HAVE_LINUX_FALLOCATE=no)])
 
2578
if test x"$samba_cv_HAVE_LINUX_FALLOCATE" = x"yes" && test x"$ac_cv_func_fallocate" = x"yes"; then
 
2579
    AC_DEFINE(HAVE_LINUX_FALLOCATE,1,[Whether the Linux 'fallocate' function is available])
 
2580
fi
 
2581
 
 
2582
AC_CACHE_CHECK([for linux fallocate64],samba_cv_HAVE_LINUX_FALLOCATE64,[
 
2583
AC_TRY_COMPILE([
 
2584
#if defined(HAVE_UNISTD_H)
 
2585
#include <unistd.h>
 
2586
#endif
 
2587
#include <sys/types.h>
 
2588
#define _GNU_SOURCE
 
2589
#include <fcntl.h>
 
2590
#if defined(HAVE_LINUX_FALLOC_H)
 
2591
#include <linux/falloc.h>
 
2592
#endif],
 
2593
[int ret = fallocate64(0, FALLOC_FL_KEEP_SIZE, 0, 10);],
 
2594
samba_cv_HAVE_LINUX_FALLOCATE64=yes,samba_cv_HAVE_LINUX_FALLOCATE64=no)])
 
2595
if test x"$samba_cv_HAVE_LINUX_FALLOCATE64" = x"yes" && test x"$ac_cv_func_fallocate64" = x"yes"; then
 
2596
    AC_DEFINE(HAVE_LINUX_FALLOCATE64,1,[Whether the Linux 'fallocate64' function is available])
 
2597
fi
2427
2598
 
2428
2599
ICONV_LOOK_DIRS="/usr /usr/local /sw /opt"
2429
2600
AC_ARG_WITH(libiconv,
2674
2845
        # On IRIX, libfam requires libC, but other FAM implementations
2675
2846
        # might not need it.
2676
2847
        AC_CHECK_LIB(fam, FAMOpen2,
2677
 
            [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam"],
2678
 
            [samba_cv_HAVE_LIBFAM=no])
 
2848
            [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam";
 
2849
            AC_DEFINE(HAVE_FAMOPEN2, 1, Define to 1 if there is support for FAMOpen2)],
 
2850
            [samba_cv_HAVE_LIBFAM=no])
2679
2851
 
2680
2852
        if test x"$samba_cv_HAVE_LIBFAM" = x"no" ; then
2681
2853
            samba_fam_xtra=-lC
2682
2854
            AC_CHECK_LIB_EXT(fam, samba_fam_xtra, FAMOpen2,
2683
 
                [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam -lC"],
2684
 
                [samba_cv_HAVE_LIBFAM=no])
 
2855
                [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam -lC";
 
2856
                AC_DEFINE(HAVE_FAMOPEN2, 1, Define to 1 if there is support for FAMOpen2)],
 
2857
                [samba_cv_HAVE_LIBFAM=no])
2685
2858
            unset samba_fam_xtra
2686
2859
        fi
2687
2860
    fi
2688
 
 
2689
2861
    if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then
2690
2862
        default_shared_modules="$default_shared_modules vfs_notify_fam"
2691
2863
        AC_TRY_COMPILE([#include <fam.h>],
2695
2867
                    [])
2696
2868
    fi
2697
2869
 
 
2870
    if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then
 
2871
        AC_CHECK_LIB(fam, FAMNoExists,
 
2872
            [AC_DEFINE(HAVE_FAMNOEXISTS, 1, Define to 1 if there is support for FAMNoExists)])
 
2873
    fi
 
2874
 
2698
2875
    if test x$enable_fam = xyes && test x"$samba_cv_HAVE_LIBFAM" != xyes ; then
2699
2876
        AC_MSG_ERROR(FAM support requested but FAM library not available )
2700
2877
    fi
3239
3416
AC_MSG_CHECKING([for LDAP support])
3240
3417
 
3241
3418
AC_ARG_WITH(ldap,
3242
 
[AS_HELP_STRING([--with-ldap], [LDAP support (default yes)])],
 
3419
[AS_HELP_STRING([--with-ldap], [LDAP support (default=auto)])],
3243
3420
[ case "$withval" in
3244
3421
    yes|no)
3245
3422
        with_ldap_support=$withval
3252
3429
AC_SUBST(SMBLDAP)
3253
3430
SMBLDAPUTIL=""
3254
3431
AC_SUBST(SMBLDAPUTIL)
3255
 
LDBLDAP=""
3256
 
AC_SUBST(LDBLDAP)
3257
3432
 
3258
3433
if test x"$with_ldap_support" != x"no"; then
3259
3434
 
3389
3564
AC_MSG_CHECKING([for Active Directory and krb5 support])
3390
3565
 
3391
3566
AC_ARG_WITH(ads,
3392
 
[AS_HELP_STRING([--with-ads], [Active Directory support (default auto)])],
 
3567
[AS_HELP_STRING([--with-ads], [Active Directory support (default=auto)])],
3393
3568
[ case "$withval" in
3394
3569
    yes|no)
3395
3570
        with_ads_support="$withval"
3600
3775
    CPPFLAGS=$ac_save_CPPFLAGS
3601
3776
    LDFLAGS=$ac_save_LDFLAGS
3602
3777
  fi
3603
 
  AC_CHECK_HEADERS([krb5/locate_plugin.h], [], [],
3604
 
[[#ifdef HAVE_KRB5_H
3605
 
 #include <krb5.h>
3606
 
 #endif
3607
 
]])
3608
 
 
3609
 
  if test x"$ac_cv_header_krb5_locate_plugin_h" = x"yes"; then
3610
 
        WINBIND_KRB5_LOCATOR="bin/winbind_krb5_locator.$SHLIBEXT"
3611
 
        if test x"$BLDSHARED" = x"true" ; then
3612
 
                EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WINBIND_KRB5_LOCATOR"
3613
 
        fi
3614
 
  fi
3615
3778
 
3616
3779
  # check for new heimdal KRB5_DEPRECATED handling
3617
3780
 
3639
3802
 
3640
3803
  # now check for gssapi headers.  This is also done here to allow for
3641
3804
  # different kerberos include paths
3642
 
  AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h com_err.h)
 
3805
  AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h gssapi/gssapi_ext.h com_err.h)
3643
3806
 
3644
3807
  ##################################################################
3645
3808
  # we might need the k5crypto and com_err libraries on some systems
3664
3827
  # now see if we can find the gssapi libs in standard paths
3665
3828
  if test x"$have_gssapi" != x"yes"; then
3666
3829
     AC_CHECK_LIB_EXT(gssapi_krb5, KRB5_LIBS,gss_display_status,[],[],have_gssapi=yes)
 
3830
     AC_CHECK_FUNC_EXT(gss_wrap_iov, $KRB5_LIBS)
3667
3831
  fi
3668
3832
 
3669
3833
  AC_CHECK_FUNC_EXT(krb5_set_real_time, $KRB5_LIBS)
3715
3879
  AC_CHECK_FUNC_EXT(krb5_get_credentials_for_user, $KRB5_LIBS)
3716
3880
  AC_CHECK_FUNC_EXT(krb5_get_host_realm, $KRB5_LIBS)
3717
3881
  AC_CHECK_FUNC_EXT(krb5_free_host_realm, $KRB5_LIBS)
 
3882
  AC_CHECK_FUNC_EXT(gss_get_name_attribute, $KRB5_LIBS)
3718
3883
 
3719
3884
  # MIT krb5 1.8 does not expose this call (yet)
3720
3885
  AC_CHECK_DECLS(krb5_get_credentials_for_user, [], [], [#include <krb5.h>])
3922
4087
              [Whether the krb5_keyblock struct has a keyvalue property])
3923
4088
  fi
3924
4089
 
 
4090
  found_arcfour_hmac=no
3925
4091
  AC_CACHE_CHECK([for ENCTYPE_ARCFOUR_HMAC_MD5],
3926
4092
                 samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,[
3927
4093
    AC_TRY_COMPILE([#include <krb5.h>],
3939
4105
  if test x"$samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5" = x"yes" -a\
3940
4106
          x"$samba_cv_HAVE_KEYTYPE_ARCFOUR_56" = x"yes"; then
3941
4107
    AC_DEFINE(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,1,
3942
 
              [Whether the ENCTYPE_ARCFOUR_HMAC_MD5 key type is available])
 
4108
              [Whether the ENCTYPE_ARCFOUR_HMAC_MD5 key type definition is available])
 
4109
    found_arcfour_hmac=yes
 
4110
  fi
 
4111
  AC_CACHE_CHECK([for ENCTYPE_ARCFOUR_HMAC],
 
4112
                 samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC,[
 
4113
    AC_TRY_COMPILE([#include <krb5.h>],
 
4114
      [krb5_enctype enctype; enctype = ENCTYPE_ARCFOUR_HMAC;],
 
4115
      samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC=yes,
 
4116
      samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC=no)])
 
4117
  if test x"$samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC" = x"yes"; then
 
4118
    AC_DEFINE(HAVE_ENCTYPE_ARCFOUR_HMAC,1,
 
4119
              [Whether the ENCTYPE_ARCFOUR_HMAC key type definition is available])
 
4120
    found_arcfour_hmac=yes
3943
4121
  fi
3944
4122
 
3945
4123
  AC_CACHE_CHECK([for AP_OPTS_USE_SUBKEY],
4182
4360
  # NOTE: all tests should be done before this block!
4183
4361
  #
4184
4362
  #
 
4363
  if test x"$found_arcfour_hmac" != x"yes"; then
 
4364
    AC_MSG_WARN(arcfour-hmac-md5 encryption type not found in -lkrb5)
 
4365
    use_ads=no
 
4366
  fi
 
4367
 
4185
4368
  if test x"$ac_cv_lib_ext_krb5_krb5_mk_req_extended" != x"yes"; then
4186
4369
    AC_MSG_WARN(krb5_mk_req_extended not found in -lkrb5)
4187
4370
    use_ads=no
4260
4443
fi
4261
4444
 
4262
4445
if test x"$use_ads" != xyes; then
4263
 
        merged_build_possible=no
 
4446
        smbtorture4_possible=no
4264
4447
fi
4265
4448
 
4266
4449
AC_CHECK_LIB_EXT(nscd, NSCD_LIBS, nscd_flush_cache)
4270
4453
########################################################
4271
4454
# Compile with DNS Updates support?
4272
4455
 
4273
 
with_dnsupdate_support=no
 
4456
with_dnsupdate_support=auto
4274
4457
AC_MSG_CHECKING([whether to enable DNS Updates support])
4275
4458
 
4276
4459
AC_ARG_WITH(dnsupdate,
4277
 
[AS_HELP_STRING([--with-dnsupdate], [Enable DNS Updates support (default no)])],
 
4460
[AS_HELP_STRING([--with-dnsupdate], [Enable DNS Updates support (default=auto)])],
4278
4461
[ case "$withval" in
4279
4462
    yes|no)
4280
4463
        with_dnsupdate_support=$withval
4286
4469
if test x"$with_dnsupdate_support" != x"no"; then
4287
4470
 
4288
4471
  ################################################################
4289
 
  # first test for Active Directory support being enabled
4290
 
  #if test x"$with_ads_support" = x"no"; then
4291
 
  #             AC_MSG_ERROR(Active Directory support is required to enable DNS Update support)
4292
 
  #             with_dnsupdate_support=no
4293
 
  #fi           
 
4472
  # first test for AD / GSSAPI support being enabled
 
4473
        if test x"$have_gssapi" != xyes ; then
 
4474
                if test x"$with_dnsupdate_support" = x"yes" ; then
 
4475
                        AC_MSG_ERROR(DNS Updates support only possible with AD and GSSAPI support)
 
4476
                else
 
4477
                        AC_MSG_NOTICE(DNS Updates support only possible with AD and GSSAPI support)
 
4478
                        with_dnsupdate_support=no
 
4479
                fi
 
4480
        fi
4294
4481
  ##################################################################
4295
4482
  # then test for uuid.h (necessary to generate unique DNS keynames
4296
4483
  # (uuid.h is required for this test)
4297
 
  AC_CHECK_HEADERS(uuid/uuid.h)
 
4484
        AC_CHECK_HEADERS(uuid/uuid.h)
4298
4485
 
4299
 
  if test x"$ac_cv_header_uuid_uuid_h" != x"yes"; then
4300
 
        if test x"$with_dnsupdate_support" = x"yes"; then
4301
 
         AC_MSG_ERROR(uuid.h is needed to enable DNS Updates support)
4302
 
        else
4303
 
         AC_MSG_WARN(uuid.h is needed to enable DNS Updates support)
 
4486
        
 
4487
        if test x"$ac_cv_header_uuid_uuid_h" != x"yes"; then
 
4488
                if test x"$with_dnsupdate_support" = x"yes"; then
 
4489
                        AC_MSG_ERROR(uuid.h is needed to enable DNS Updates support)
 
4490
                else
 
4491
                        AC_MSG_NOTICE(uuid.h is needed to enable DNS Updates support)
 
4492
                fi
 
4493
                with_dnsupdate_support=no
4304
4494
        fi
4305
 
        with_dnsupdate_support=no
4306
 
  fi
4307
4495
fi
4308
4496
 
4309
4497
if test x"$with_dnsupdate_support" != x"no"; then
4335
4523
            with_dnsupdate_support=no
4336
4524
        ])
4337
4525
fi
 
4526
  # finally print out the result:
 
4527
AC_MSG_CHECKING(whether DNS Updates support is used)
 
4528
AC_MSG_RESULT([$with_dnsupdate_support])
 
4529
 
4338
4530
 
4339
4531
#################################################
4340
4532
# check for automount support
4354
4546
)
4355
4547
 
4356
4548
#################################################
4357
 
# check for mount- and umount.cifs support
4358
 
CIFSMOUNT_PROGS=""
4359
 
INSTALL_CIFSMOUNT=""
4360
 
UNINSTALL_CIFSMOUNT=""
4361
 
AC_MSG_CHECKING(whether to build mount.cifs)
4362
 
AC_ARG_WITH(cifsmount,
4363
 
[AS_HELP_STRING([--with-cifsmount], [Include mount.cifs (Linux only) support (default=yes)])],
4364
 
[ case "$withval" in
4365
 
  no)
4366
 
        AC_MSG_RESULT(no)
4367
 
        ;;
4368
 
  *)
4369
 
        case "$host_os" in
4370
 
        *linux*)
4371
 
                AC_MSG_RESULT(yes)
4372
 
                AC_DEFINE(WITH_CIFSMOUNT,1,[Whether to build mount.cifs])
4373
 
                CIFSMOUNT_PROGS="bin/mount.cifs"
4374
 
                INSTALL_CIFSMOUNT="installcifsmount"
4375
 
                UNINSTALL_CIFSMOUNT="uninstallcifsmount"
4376
 
                ;;
4377
 
        *)
4378
 
                AC_MSG_ERROR(not on a linux system!)
4379
 
                ;;
4380
 
        esac
4381
 
    ;;
4382
 
  esac ],
4383
 
[ case "$host_os" in
4384
 
  *linux*)
4385
 
        AC_MSG_RESULT(yes)
4386
 
        AC_DEFINE(WITH_CIFSMOUNT,1,[Whether to build mount.cifs])
4387
 
        CIFSMOUNT_PROGS="bin/mount.cifs"
4388
 
        INSTALL_CIFSMOUNT="installcifsmount"
4389
 
        UNINSTALL_CIFSMOUNT="uninstallcifsmount"
4390
 
        ;;
4391
 
  *)
4392
 
        AC_MSG_RESULT(no)
4393
 
        ;;
4394
 
  esac ]
4395
 
)
4396
 
 
4397
 
CIFSUMOUNT_PROGS=""
4398
 
INSTALL_CIFSUMOUNT=""
4399
 
UNINSTALL_CIFSUMOUNT=""
4400
 
AC_MSG_CHECKING(whether to build umount.cifs)
4401
 
AC_ARG_WITH(cifsumount,
4402
 
[AS_HELP_STRING([--with-cifsumount], [Include umount.cifs (Linux only) support (default=no)])],
4403
 
[ case "$withval" in
4404
 
  yes)
4405
 
        case "$host_os" in
4406
 
        *linux*)
4407
 
                AC_MSG_RESULT(yes)
4408
 
                AC_DEFINE(WITH_CIFSUMOUNT,1,[Whether to build umount.cifs])
4409
 
                CIFSUMOUNT_PROGS="bin/umount.cifs"
4410
 
                INSTALL_CIFSUMOUNT="installcifsumount"
4411
 
                UNINSTALL_CIFSUMOUNT="uninstallcifsumount"
4412
 
                ;;
4413
 
        *)
4414
 
                AC_MSG_ERROR(not on a linux system!)
4415
 
                ;;
4416
 
        esac
4417
 
        ;;
4418
 
  *)
4419
 
        AC_MSG_RESULT(no)
4420
 
        ;;
4421
 
  esac ],
4422
 
  AC_MSG_RESULT(no)
4423
 
)
4424
 
 
4425
 
#################################################
4426
 
# check for cifs.upcall support
4427
 
AC_CHECK_HEADERS([keyutils.h], [HAVE_KEYUTILS_H=1], [HAVE_KEYUTILS_H=0])
4428
 
CIFSUPCALL_PROGS=""
4429
 
INSTALL_CIFSUPCALL=""
4430
 
UNINSTALL_CIFSUPCALL=""
4431
 
AC_MSG_CHECKING(whether to build cifs.upcall)
4432
 
AC_ARG_WITH(cifsupcall,
4433
 
[AS_HELP_STRING([--with-cifsupcall], [Include cifs.upcall (Linux only) support (default=yes)])],
4434
 
[ case "$withval" in
4435
 
  no)
4436
 
        AC_MSG_RESULT(no)
4437
 
        ;;
4438
 
  *)
4439
 
        case "$host_os" in
4440
 
        *linux*)
4441
 
                if test x"$use_ads" != x"yes"; then
4442
 
                        AC_MSG_ERROR(ADS support should be enabled for building cifs.upcall)
4443
 
                elif test x"$HAVE_KEYUTILS_H" != "x1"; then
4444
 
                        AC_MSG_ERROR(keyutils package is required for cifs.upcall)
4445
 
                else
4446
 
                        AC_MSG_RESULT(yes)
4447
 
                        AC_DEFINE(WITH_CIFSUPCALL,1,[whether to build cifs.upcall])
4448
 
                        CIFSUPCALL_PROGS="bin/cifs.upcall"
4449
 
                        INSTALL_CIFSUPCALL="installcifsupcall"
4450
 
                        UNINSTALL_CIFSUPCALL="uninstallcifsupcall"
4451
 
                fi
4452
 
                ;;
4453
 
        *)
4454
 
                AC_MSG_ERROR(not on a linux system!)
4455
 
                ;;
4456
 
        esac
4457
 
    ;;
4458
 
  esac ],
4459
 
[ case "$host_os" in
4460
 
  *linux*)
4461
 
        if test x"$use_ads" != x"yes"; then
4462
 
                AC_MSG_WARN(ADS support should be enabled for building cifs.upcall)
4463
 
        elif test x"$HAVE_KEYUTILS_H" != "x1"; then
4464
 
                AC_MSG_WARN(keyutils package is required for cifs.upcall)
4465
 
        else
4466
 
                AC_MSG_RESULT(yes)
4467
 
                AC_DEFINE(WITH_CIFSUPCALL,1,[whether to build cifs.upcall])
4468
 
                CIFSUPCALL_PROGS="bin/cifs.upcall"
4469
 
                INSTALL_CIFSUPCALL="installcifsupcall"
4470
 
                UNINSTALL_CIFSUPCALL="uninstallcifsupcall"
4471
 
        fi
4472
 
        ;;
4473
 
  *)
4474
 
        AC_MSG_RESULT(no)
4475
 
        ;;
4476
 
  esac ]
4477
 
)
4478
 
 
4479
 
 
4480
 
#################################################
4481
4549
# Check for a PAM clear-text auth, accounts, password
4482
4550
# and session support. Most PAM implementations keep their
4483
4551
# headers in /usr/include/security. Darwin keeps its in
4561
4629
 
4562
4630
        AC_MSG_CHECKING(whether to have PAM MODULES support)
4563
4631
        AC_MSG_RESULT([$create_pam_modules])
 
4632
 
 
4633
        AC_TRY_COMPILE([
 
4634
                #if defined(HAVE_SECURITY_PAM_APPL_H)
 
4635
                #include <security/pam_appl.h>
 
4636
                #elif defined(HAVE_PAM_PAM_APPL_H)
 
4637
                #include <pam/pam_appl.h>
 
4638
                #endif],[
 
4639
                pam_set_item(0, PAM_RHOST, 0);
 
4640
                ],
 
4641
                AC_DEFINE(HAVE_PAM_RHOST, 1,
 
4642
                          [Define to 1 if PAM_RHOST is available]),[])
 
4643
 
 
4644
        AC_TRY_COMPILE([
 
4645
                #if defined(HAVE_SECURITY_PAM_APPL_H)
 
4646
                #include <security/pam_appl.h>
 
4647
                #elif defined(HAVE_PAM_PAM_APPL_H)
 
4648
                #include <pam/pam_appl.h>
 
4649
                #endif],[
 
4650
                pam_set_item(0, PAM_TTY, 0);
 
4651
                ],
 
4652
                AC_DEFINE(HAVE_PAM_TTY, 1,
 
4653
                          [Define to 1 if PAM_TTY is available]),[])
 
4654
 
4564
4655
fi # try_pam != no
4565
4656
 
4566
4657
#################################################
4977
5068
fi
4978
5069
fi
4979
5070
 
 
5071
if test x"$samba_cv_SYSQUOTA_FOUND" != x"no"; then
 
5072
AC_CACHE_CHECK([whether the sys_quota interface works with NFS],samba_cv_SYSQUOTA_WORKS_NFS,[
 
5073
SAVE_CPPFLAGS="$CPPFLAGS"
 
5074
CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
 
5075
AC_TRY_COMPILE([
 
5076
#include "confdefs.h"
 
5077
#define NO_PROTO_H 1
 
5078
#define NO_CONFIG_H 1
 
5079
#define HAVE_SYS_QUOTAS 1
 
5080
#define HAVE_NFS_QUOTAS 1
 
5081
#include "${srcdir-.}/lib/sysquotas_nfs.c"
 
5082
],[],samba_cv_SYSQUOTA_WORKS_NFS=yes,samba_cv_SYSQUOTA_WORKS_NFS=no)
 
5083
CPPFLAGS="$SAVE_CPPFLAGS"
 
5084
])
 
5085
if test x"$samba_cv_SYSQUOTA_WORKS_NFS" = x"yes"; then
 
5086
    if test x"$samba_cv_WE_USE_SYS_QUOTAS" = x"yes"; then
 
5087
        AC_DEFINE(HAVE_NFS_QUOTAS,1,[Whether nfs quota support is available])
 
5088
    fi
 
5089
fi
 
5090
fi
 
5091
 
4980
5092
if test x"$samba_cv_SYSQUOTA_FOUND" != x"no" -a x"$samba_cv_found_xfs_header" = x"yes"; then
4981
5093
AC_CACHE_CHECK([whether the sys_quota interface works with XFS],samba_cv_SYSQUOTA_WORKS_XFS,[
4982
5094
SAVE_CPPFLAGS="$CPPFLAGS"
5307
5419
fi
5308
5420
AC_MSG_RESULT([$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT])
5309
5421
 
 
5422
 
5310
5423
#################################################
5311
5424
# check for cluster extensions
5312
5425
 
5313
 
CTDB_CFLAGS=""
5314
 
AC_SUBST(CTDB_CFLAGS)
 
5426
AC_MSG_CHECKING(cluster support)
 
5427
AC_ARG_WITH(cluster-support,
 
5428
[AS_HELP_STRING([--with-cluster-support], [Enable cluster extensions (default=auto)])])
 
5429
 
 
5430
if test x"$with_cluster_support" = x ; then
 
5431
        with_cluster_support="auto"
 
5432
fi
 
5433
 
 
5434
AC_MSG_RESULT($with_cluster_support)
 
5435
 
5315
5436
AC_ARG_WITH(ctdb,
5316
5437
[AS_HELP_STRING([--with-ctdb=DIR], [Where to find ctdb sources])],
5317
5438
[ case "$withval" in
5323
5444
    ;;
5324
5445
  esac])
5325
5446
 
 
5447
AC_ARG_ENABLE(old-ctdb,
 
5448
        [AS_HELP_STRING([--enable-old-ctdb],
 
5449
                [Enable build against (too) old ctdb version (default=no)])],,
 
5450
                [enable_old_ctdb=no])
 
5451
 
 
5452
 
 
5453
if test "$with_cluster_support" != "no" ; then
 
5454
 
 
5455
AC_MSG_NOTICE(checking whether cluster support is available)
 
5456
 
 
5457
have_cluster_support="yes"
 
5458
ctdb_broken="no"
 
5459
 
5326
5460
SAVED_CPPFLAGS="$CPPFLAGS"
5327
5461
CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS} $CTDB_CPPFLAGS"
5328
 
ctdb_broken="missing or broken headers"
5329
5462
 
5330
5463
AC_CHECK_HEADERS(ctdb.h ctdb_private.h,,,[
5331
5464
#include "confdefs.h"
5339
5472
#include <ctdb.h>
5340
5473
])
5341
5474
 
5342
 
AC_HAVE_DECL(CTDB_CONTROL_TRANS3_COMMIT,[
5343
 
#include "confdefs.h"
5344
 
#define NO_CONFIG_H
5345
 
#include "replace.h"
5346
 
#include "system/wait.h"
5347
 
#include "system/network.h"
5348
 
#include <talloc.h>
5349
 
#include <tdb.h>
5350
 
#include <ctdb.h>
5351
 
#include <ctdb_private.h>
5352
 
])
5353
 
if test x"$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" = x"yes"; then
5354
 
        ctdb_broken=no
5355
 
else
5356
 
        ctdb_broken="ctdb transaction support missing or too old"
5357
 
fi
5358
 
 
5359
 
# in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client
5360
 
AC_CHECK_TYPE(struct ctdb_tcp_client,[
5361
 
        AC_DEFINE([ctdb_control_tcp],[ctdb_tcp_client],[ctdb ipv4 support])
5362
 
],,[
5363
 
#include "confdefs.h"
5364
 
#define NO_CONFIG_H
5365
 
#include "replace.h"
5366
 
#include "system/wait.h"
5367
 
#include "system/network.h"
5368
 
#include <talloc.h>
5369
 
#include <tdb.h>
5370
 
#include <ctdb.h>
5371
 
#include <ctdb_private.h>
5372
 
])
5373
 
 
5374
 
AC_CHECK_TYPE(struct ctdb_control_tcp,[
5375
 
        AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP],[1],[ctdb ipv4 support])
5376
 
],[
5377
 
        ctdb_broken="missing struct ctdb_control_tcp"
5378
 
],[
5379
 
#include "confdefs.h"
5380
 
#define NO_CONFIG_H
5381
 
#include "replace.h"
5382
 
#include "system/wait.h"
5383
 
#include "system/network.h"
5384
 
#include <talloc.h>
5385
 
#include <tdb.h>
5386
 
#include <ctdb.h>
5387
 
#include <ctdb_private.h>
5388
 
])
5389
 
 
5390
 
AC_CHECK_TYPE(struct ctdb_control_tcp_addr,[
5391
 
        AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR],[1],[ctdb ipv6 support])
5392
 
],,[
5393
 
#include "confdefs.h"
5394
 
#define NO_CONFIG_H
5395
 
#include "replace.h"
5396
 
#include "system/wait.h"
5397
 
#include "system/network.h"
5398
 
#include <talloc.h>
5399
 
#include <tdb.h>
5400
 
#include <ctdb.h>
5401
 
#include <ctdb_private.h>
5402
 
])
 
5475
if test "x$have_cluster_support" = "xyes" -a \
 
5476
        "x$ac_cv_header_ctdb_h" != "xyes"
 
5477
then
 
5478
        have_cluster_support=no
 
5479
        ctdb_broken="ctdb.h is required for cluster support"
 
5480
fi
 
5481
 
 
5482
if test "x$have_cluster_support" = "xyes" -a \
 
5483
        "x$ac_cv_header_ctdb_h" != "xyes"
 
5484
then
 
5485
        have_cluster_support=no
 
5486
        ctdb_broken="ctdb_private.h is required for cluster support"
 
5487
fi
 
5488
 
 
5489
 
 
5490
if test "x$have_cluster_support" = "xyes" ; then
 
5491
        AC_HAVE_DECL(CTDB_CONTROL_TRANS3_COMMIT,[
 
5492
        #include "confdefs.h"
 
5493
        #define NO_CONFIG_H
 
5494
        #include "replace.h"
 
5495
        #include "system/wait.h"
 
5496
        #include "system/network.h"
 
5497
        #include <talloc.h>
 
5498
        #include <tdb.h>
 
5499
        #include <ctdb.h>
 
5500
        #include <ctdb_private.h>
 
5501
        ])
 
5502
        if test x"$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" != x"yes"; then
 
5503
                ctdb_broken="ctdb transaction support missing or too old"
 
5504
                have_cluster_support=no
 
5505
        fi
 
5506
fi
 
5507
 
 
5508
if test "x$have_cluster_support" = "xyes" ; then
 
5509
        AC_HAVE_DECL(CTDB_CONTROL_SCHEDULE_FOR_DELETION,[
 
5510
        #include "confdefs.h"
 
5511
        #define NO_CONFIG_H
 
5512
        #include "replace.h"
 
5513
        #include "system/wait.h"
 
5514
        #include "system/network.h"
 
5515
        #include <talloc.h>
 
5516
        #include <tdb.h>
 
5517
        #include <ctdb.h>
 
5518
        #include <ctdb_private.h>
 
5519
        ])
 
5520
        if test x"$ac_cv_have_CTDB_CONTROL_SCHEDULE_FOR_DELETION_decl" != x"yes"
 
5521
        then
 
5522
                if test "x$enable_old_ctdb" = "xyes" ; then
 
5523
                        AC_MSG_WARN([ignoring missing SCHEDULE_FOR_DELETION (--enable-old-ctdb)])
 
5524
                else
 
5525
                        ctdb_broken="support for SCHEDULE_FOR_DELETION control missing"
 
5526
                        have_cluster_support=no
 
5527
                fi
 
5528
        fi
 
5529
fi
 
5530
 
 
5531
if test "x$have_cluster_support" = "xyes" ; then
 
5532
        # In ctdb 1.0.57, ctdb_control_tcp was temporarily renamed
 
5533
        # to ctdb_tcp_client.
 
5534
        AC_CHECK_TYPE(struct ctdb_tcp_client,[
 
5535
                AC_DEFINE([ctdb_control_tcp],[ctdb_tcp_client],[ctdb ipv4 support])
 
5536
        ],,[
 
5537
        #include "confdefs.h"
 
5538
        #define NO_CONFIG_H
 
5539
        #include "replace.h"
 
5540
        #include "system/wait.h"
 
5541
        #include "system/network.h"
 
5542
        #include <talloc.h>
 
5543
        #include <tdb.h>
 
5544
        #include <ctdb.h>
 
5545
        #include <ctdb_private.h>
 
5546
        ])
 
5547
fi
 
5548
 
 
5549
if test "x$have_cluster_support" = "xyes" ; then
 
5550
        AC_CHECK_TYPE(struct ctdb_control_tcp,[
 
5551
                AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP],[1],[ctdb ipv4 support])
 
5552
        ],[
 
5553
                ctdb_broken="missing struct ctdb_control_tcp"
 
5554
                have_cluster_support=no
 
5555
        ],[
 
5556
        #include "confdefs.h"
 
5557
        #define NO_CONFIG_H
 
5558
        #include "replace.h"
 
5559
        #include "system/wait.h"
 
5560
        #include "system/network.h"
 
5561
        #include <talloc.h>
 
5562
        #include <tdb.h>
 
5563
        #include <ctdb.h>
 
5564
        #include <ctdb_private.h>
 
5565
        ])
 
5566
fi
 
5567
 
 
5568
# test for optional ipv6 support in ctdb:
 
5569
if test "x$have_cluster_support" = "xyes" ; then
 
5570
        AC_CHECK_TYPE(struct ctdb_control_tcp_addr,[
 
5571
                AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR],[1],[ctdb ipv6 support])
 
5572
        ],,[
 
5573
        #include "confdefs.h"
 
5574
        #define NO_CONFIG_H
 
5575
        #include "replace.h"
 
5576
        #include "system/wait.h"
 
5577
        #include "system/network.h"
 
5578
        #include <talloc.h>
 
5579
        #include <tdb.h>
 
5580
        #include <ctdb.h>
 
5581
        #include <ctdb_private.h>
 
5582
        ])
 
5583
fi
 
5584
 
5403
5585
CPPFLAGS="$SAVED_CPPFLAGS"
5404
5586
 
5405
 
AC_MSG_CHECKING(cluster support)
5406
 
AC_ARG_WITH(cluster-support,
5407
 
[AS_HELP_STRING([--with-cluster-support], [Enable cluster extensions (default=auto)])])
5408
 
 
5409
 
if test x"$with_cluster_support" = x ; then
5410
 
        with_cluster_support="auto"
5411
 
fi
5412
 
 
5413
 
if test x"$ac_cv_header_ctdb_private_h" != x"yes"; then
5414
 
        if test "x$with_cluster_support" = "xyes"; then
5415
 
                AC_MSG_ERROR("ctdb_private.h is required for cluster support")
5416
 
        fi
5417
 
        with_cluster_support=no
5418
 
fi
5419
 
 
5420
 
if test x"$ctdb_broken" != x"no"; then
5421
 
        if test "x$with_cluster_support" = "xyes"; then
5422
 
                AC_MSG_ERROR(["cluster support: $ctdb_broken"])
5423
 
        fi
 
5587
fi # (if test "$with_cluster_support" != "no")
 
5588
 
 
5589
if test x"$have_cluster_support" = "xno" ; then
 
5590
        case "$with_cluster_support" in
 
5591
        yes)
 
5592
                AC_MSG_ERROR(["cluster support not available: $ctdb_broken"])
 
5593
                ;;
 
5594
        auto)
 
5595
                AC_MSG_WARN(["cluster support not available: $ctdb_broken"])
 
5596
                ;;
 
5597
        esac
5424
5598
        with_cluster_support=no
5425
5599
fi
5426
5600
 
5427
5601
if test "x$with_cluster_support" != "xno"; then
5428
5602
    AC_DEFINE(CLUSTER_SUPPORT,1,[Whether to enable cluster extensions])
5429
5603
    SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${CTDB_CPPFLAGS}"
5430
 
    AC_MSG_RESULT(yes)
 
5604
    AC_MSG_NOTICE(Building with cluster support)
5431
5605
else
5432
 
    AC_MSG_RESULT(no)
 
5606
    AC_MSG_NOTICE(Building without cluster support)
5433
5607
fi
5434
5608
 
 
5609
 
 
5610
#################################################
 
5611
# check for rtnetlink
 
5612
 
 
5613
AC_CHECK_HEADERS([linux/netlink.h],
 
5614
  AC_CHECK_HEADERS([linux/rtnetlink.h],[],[],
 
5615
                   [#include <bits/sockaddr.h>
 
5616
                    #include <linux/netlink.h>]),
 
5617
  [],[#include <bits/sockaddr.h>])
 
5618
 
5435
5619
#################################################
5436
5620
# check for ACL support
5437
5621
 
5545
5729
        esac
5546
5730
fi # with_acl_support
5547
5731
 
5548
 
 
 
5732
#################################################
 
5733
# check if we have FreeBSD sunacl
 
5734
case "$host_os" in
 
5735
*freebsd*)
 
5736
    AC_CHECK_HEADER(sunacl.h)
 
5737
    if test x"$ac_cv_header_sunacl_h" = xyes ; then
 
5738
       AC_DEFINE(HAVE_FREEBSD_SUNACL_H,1,[Whether we have FreeBSD sunacl around])
 
5739
       ZFSACL_LIBS=-lsunacl
 
5740
       AC_SUBST(ZFSACL_LIBS)
 
5741
       default_shared_modules="$default_shared_modules vfs_zfsacl"
 
5742
    fi
 
5743
    ;;
 
5744
esac
5549
5745
 
5550
5746
#################################################
5551
5747
# check for AIO support
5560
5756
        case "$host_os" in
5561
5757
        *)
5562
5758
                AIO_LIBS=$LIBS
 
5759
                no_rt_LIBS=$LIBS
5563
5760
                AC_CHECK_LIB(rt,aio_read,[AIO_LIBS="$LIBS -lrt"])
 
5761
                LIBS=$no_rt_LIBS
5564
5762
                AC_CHECK_LIB(aio,aio_read,[AIO_LIBS="$LIBS -laio"])
5565
5763
                AC_CACHE_CHECK([for asynchronous io support],samba_cv_HAVE_AIO,[
5566
5764
                aio_LIBS=$LIBS
6185
6383
        LIBWBCLIENT_SHARED_TARGET=bin/libwbclient.$SHLIBEXT
6186
6384
        LIBWBCLIENT_STATIC_TARGET=bin/libwbclient.a
6187
6385
        LIBWBCLIENT_SOVER=0
 
6386
        LIBWBCLIENT_FULLVER=0
 
6387
        LIBWBCLIENT_SHARED_TARGET_SOVER=$LIBWBCLIENT_SHARED_TARGET.$LIBWBCLIENT_SOVER
 
6388
        LIBWBCLIENT_SHARED_TARGET_FULLVER=$LIBWBCLIENT_SHARED_TARGET.$LIBWBCLIENT_FULLVER
6188
6389
        if test $BLDSHARED = true -a x"$HAVE_WINBIND" = x"yes" -a x"$BUILD_LIBWBCLIENT_SHARED" = x"yes"; then
6189
6390
                NSS_MODULES="${WINBIND_NSS} ${WINBIND_WINS_NSS}"
6190
6391
                ## Only worry about libwbclient if we have shared
6211
6412
                INSTALL_PAM_MODULES="installpammodules"
6212
6413
                UNINSTALL_PAM_MODULES="uninstallpammodules"
6213
6414
        fi
 
6415
 
 
6416
        # we use winbind, check for krb5 locate_plugin support:
 
6417
        AC_CHECK_HEADERS([krb5/locate_plugin.h], [], [],
 
6418
                [[#ifdef HAVE_KRB5_H
 
6419
                 #include <krb5.h>
 
6420
                 #endif
 
6421
        ]])
 
6422
        if test x"$ac_cv_header_krb5_locate_plugin_h" = x"yes"; then
 
6423
                WINBIND_KRB5_LOCATOR="bin/winbind_krb5_locator.$SHLIBEXT"
 
6424
                if test x"$BLDSHARED" = x"true" ; then
 
6425
                        EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WINBIND_KRB5_LOCATOR"
 
6426
                fi
 
6427
        fi
 
6428
        # end of krb5 locate_plugin check
6214
6429
else
6215
6430
        AC_MSG_RESULT(no$winbind_no_reason)
6216
6431
fi
6258
6473
    AC_DEFINE(HAVE_PEERCRED,1,[Whether we can use SO_PEERCRED to get socket credentials])
6259
6474
fi
6260
6475
 
 
6476
AC_CACHE_CHECK([for getpeereid],samba_cv_HAVE_GETPEEREID,[
 
6477
AC_TRY_LINK([#include <sys/types.h>
 
6478
#include <unistd.h>],
 
6479
[uid_t uid; gid_t gid; int ret;
 
6480
 ret = getpeereid(0, &uid, &gid);
 
6481
],
 
6482
samba_cv_HAVE_GETPEEREID=yes,samba_cv_HAVE_GETPEEREID=no)])
 
6483
if test x"$samba_cv_HAVE_GETPEEREID" = xyes; then
 
6484
   AC_DEFINE(HAVE_GETPEEREID,1,
 
6485
             [Whether we have getpeereid to get socket credentials])
 
6486
fi
 
6487
 
6261
6488
 
6262
6489
#################################################
6263
6490
# Check to see if we should use the included popt
6435
6662
[AS_HELP_STRING([--enable-pthreadpool], [Enable pthreads pool helper support (default=no)])])
6436
6663
 
6437
6664
if test x"$enable_pthreadpool" = xyes -a x"$samba_cv_HAVE_PTHREAD" != x"yes"; then
6438
 
        AC_MSG_ERROR([pthreadpool support cannot be enabled when pthread support was found])
 
6665
        AC_MSG_ERROR([pthreadpool support cannot be enabled when pthread support was not found])
6439
6666
fi
6440
6667
 
6441
6668
if test x"$enable_pthreadpool" = x"yes" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; then
6442
6669
    LIBS="$LIBS $PTHREAD_LDFLAGS"
6443
6670
    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
6444
6671
    AC_DEFINE(WITH_PTHREADPOOL, 1, [Whether to include pthreadpool helpers])
6445
 
    AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool.o")
 
6672
    AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool/pthreadpool.o")
 
6673
    PTHREADPOOLTEST="bin/pthreadpooltest\$(EXEEXT)"
 
6674
    AC_SUBST(PTHREADPOOLTEST)
6446
6675
fi
6447
6676
 
6448
6677
#################################################
6470
6699
    AC_MSG_RESULT(yes)
6471
6700
    BUILD_INIPARSER='$(INIPARSER_OBJ)'
6472
6701
        INIPARSERLIBS=""
6473
 
    FLAGS1="$FLAGS1 -I\$(srcdir)/iniparser/src"
 
6702
    FLAGS1="$FLAGS1 -I\$(srcdir)/../lib/iniparser/src"
6474
6703
else
6475
6704
    AC_MSG_RESULT(no)
6476
6705
        BUILD_INIPARSER=""
6480
6709
AC_SUBST(INIPARSERLIBS)
6481
6710
AC_SUBST(FLAGS1)
6482
6711
 
 
6712
###################################################
 
6713
# Check for different/missing (set|get|end)netgrent prototypes
 
6714
CFLAGS_SAVE=$CFLAGS
 
6715
if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then
 
6716
        CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
 
6717
fi
 
6718
AC_CACHE_CHECK([for setnetgrent prototype],samba_cv_setnetgrent_prototype, [
 
6719
    AC_TRY_COMPILE([#include<netdb.h>
 
6720
                    #ifdef HAVE_NETGROUP_H
 
6721
                    #include<netgroup.h>
 
6722
                    #endif],[setnetgrent("foo")],
 
6723
                    samba_cv_setnetgrent_prototype=yes, samba_cv_setnetgrent_prototype=no)])
 
6724
if test x"$samba_cv_setnetgrent_prototype" = x"yes"; then
 
6725
    AC_DEFINE(HAVE_SETNETGRENT_PROTOTYPE, 1, [If setnetgrent prototype is defined])
 
6726
fi
 
6727
AC_CACHE_CHECK([for getnetgrent prototype],samba_cv_getnetgrent_prototype, [
 
6728
    AC_TRY_COMPILE([#include<netdb.h>
 
6729
                    #ifdef HAVE_NETGROUP_H
 
6730
                    #include<netgroup.h>
 
6731
                    #endif],[char *dom, *user,*host; getnetgrent(&dom,&user,&host)],
 
6732
                    samba_cv_getnetgrent_prototype=yes, samba_cv_getnetgrent_prototype=no)])
 
6733
if test x"$samba_cv_getnetgrent_prototype" = x"yes"; then
 
6734
    AC_DEFINE(HAVE_GETNETGRENT_PROTOTYPE, 1, [If getnetgrent prototype is defined])
 
6735
fi
 
6736
AC_CACHE_CHECK([for endnetgrent prototype],samba_cv_endnetgrent_prototype, [
 
6737
    AC_TRY_COMPILE([#include<netdb.h>
 
6738
                    #ifdef HAVE_NETGROUP_H
 
6739
                    #include<netgroup.h>
 
6740
                    #endif],[endnetgrent()],
 
6741
                    samba_cv_endnetgrent_prototype=yes, samba_cv_endnetgrent_prototype=no)])
 
6742
if test x"$samba_cv_endnetgrent_prototype" = x"yes"; then
 
6743
    AC_DEFINE(HAVE_ENDNETGRENT_PROTOTYPE, 1, [If endnetgrent prototype is defined])
 
6744
fi
6483
6745
 
 
6746
CFLAGS=$CFLAGS_SAVE
6484
6747
 
6485
6748
# Checks for the vfs_fileid module
6486
6749
# Start
6561
6824
        AC_SUBST(SMBD_FAM_LIBS)
6562
6825
fi
6563
6826
 
6564
 
SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o passdb/pdb_nds.o, "bin/ldapsam.$SHLIBEXT", PDB,
 
6827
SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o passdb/pdb_nds.o passdb/pdb_ipa.o,
 
6828
                   "bin/ldapsam.$SHLIBEXT", PDB,
6565
6829
                   [ PASSDB_LIBS="$PASSDB_LIBS $LDAP_LIBS" ] )
6566
6830
SMB_MODULE(pdb_ads, passdb/pdb_ads.o \$(TLDAP_OBJ), "bin/ads.$SHLIBEXT", PDB)
6567
6831
SMB_MODULE(pdb_smbpasswd, passdb/pdb_smbpasswd.o, "bin/smbpasswd.$SHLIBEXT", PDB)
6569
6833
SMB_MODULE(pdb_wbc_sam, passdb/pdb_wbc_sam.o, "bin/wbc_sam.$SHLIBEXT", PDB)
6570
6834
SMB_SUBSYSTEM(PDB,passdb/pdb_interface.o)
6571
6835
 
6572
 
 
6573
 
SMB_MODULE(rpc_lsarpc, \$(RPC_LSA_OBJ), "bin/librpc_lsarpc.$SHLIBEXT", RPC)
6574
 
SMB_MODULE(rpc_winreg, \$(RPC_REG_OBJ), "bin/librpc_winreg.$SHLIBEXT", RPC)
6575
 
SMB_MODULE(rpc_initshutdown, \$(RPC_INITSHUTDOWN_OBJ), "bin/librpc_initshutdown.$SHLIBEXT", RPC)
6576
 
SMB_MODULE(rpc_dssetup, \$(RPC_DSSETUP_OBJ), "bin/librpc_dssetup.$SHLIBEXT", RPC)
6577
 
SMB_MODULE(rpc_wkssvc, \$(RPC_WKS_OBJ), "bin/librpc_wkssvc.$SHLIBEXT", RPC)
6578
 
SMB_MODULE(rpc_svcctl, \$(RPC_SVCCTL_OBJ), "bin/librpc_svcctl.$SHLIBEXT", RPC)
6579
 
SMB_MODULE(rpc_ntsvcs, \$(RPC_NTSVCS_OBJ), "bin/librpc_ntsvcs.$SHLIBEXT", RPC)
6580
 
SMB_MODULE(rpc_netlogon, \$(RPC_NETLOG_OBJ), "bin/librpc_NETLOGON.$SHLIBEXT", RPC)
6581
 
SMB_MODULE(rpc_netdfs, \$(RPC_DFS_OBJ), "bin/librpc_netdfs.$SHLIBEXT", RPC)
6582
 
SMB_MODULE(rpc_srvsvc, \$(RPC_SVC_OBJ), "bin/librpc_svcsvc.$SHLIBEXT", RPC)
6583
 
SMB_MODULE(rpc_spoolss, \$(RPC_SPOOLSS_OBJ), "bin/librpc_spoolss.$SHLIBEXT", RPC)
6584
 
SMB_MODULE(rpc_eventlog, \$(RPC_EVENTLOG_OBJ), "bin/librpc_eventlog.$SHLIBEXT", RPC)
6585
 
SMB_MODULE(rpc_samr, \$(RPC_SAMR_OBJ), "bin/librpc_samr.$SHLIBEXT", RPC)
6586
 
SMB_MODULE(rpc_rpcecho, \$(RPC_ECHO_OBJ), "bin/librpc_rpcecho.$SHLIBEXT", RPC)
6587
 
SMB_SUBSYSTEM(RPC,smbd/server.o)
6588
 
 
6589
6836
SMB_MODULE(idmap_ldap, winbindd/idmap_ldap.o, "bin/ldap.$SHLIBEXT", IDMAP)
6590
6837
SMB_MODULE(idmap_tdb, winbindd/idmap_tdb.o, "bin/tdb.$SHLIBEXT", IDMAP)
6591
6838
SMB_MODULE(idmap_tdb2, winbindd/idmap_tdb2.o, "bin/tdb2.$SHLIBEXT", IDMAP)
6592
6839
SMB_MODULE(idmap_passdb, winbindd/idmap_passdb.o, "bin/passdb.$SHLIBEXT", IDMAP)
6593
6840
SMB_MODULE(idmap_nss, winbindd/idmap_nss.o, "bin/nss.$SHLIBEXT", IDMAP)
6594
6841
SMB_MODULE(idmap_rid, winbindd/idmap_rid.o, "bin/rid.$SHLIBEXT", IDMAP)
 
6842
SMB_MODULE(idmap_autorid, winbindd/idmap_autorid.o, "bin/autorid.$SHLIBEXT", IDMAP)
6595
6843
SMB_MODULE(idmap_ad, winbindd/idmap_ad.o, "bin/ad.$SHLIBEXT", IDMAP)
6596
6844
SMB_MODULE(idmap_hash, \$(IDMAP_HASH_OBJ), "bin/hash.$SHLIBEXT", IDMAP)
6597
6845
SMB_MODULE(idmap_adex, \$(IDMAP_ADEX_OBJ), "bin/adex.$SHLIBEXT", IDMAP)
6646
6894
SMB_MODULE(vfs_prealloc, \$(VFS_PREALLOC_OBJ), "bin/prealloc.$SHLIBEXT", VFS)
6647
6895
SMB_MODULE(vfs_commit, \$(VFS_COMMIT_OBJ), "bin/commit.$SHLIBEXT", VFS)
6648
6896
SMB_MODULE(vfs_gpfs, \$(VFS_GPFS_OBJ), "bin/gpfs.$SHLIBEXT", VFS)
 
6897
SMB_MODULE(vfs_gpfs_hsm_notify, \$(VFS_GPFS_PREFETCH_OBJ), "bin/gpfs_hsm_notify.$SHLIBEXT", VFS)
6649
6898
SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), "bin/readahead.$SHLIBEXT", VFS)
6650
6899
SMB_MODULE(vfs_tsmsm, \$(VFS_TSMSM_OBJ), "bin/tsmsm.$SHLIBEXT", VFS)
6651
6900
SMB_MODULE(vfs_fileid, \$(VFS_FILEID_OBJ), "bin/fileid.$SHLIBEXT", VFS)
6661
6910
SMB_MODULE(vfs_onefs_shadow_copy, \$(VFS_ONEFS_SHADOW_COPY), "bin/onefs_shadow_copy.$SHLIBEXT", VFS)
6662
6911
SMB_MODULE(vfs_dirsort, \$(VFS_DIRSORT_OBJ), "bin/dirsort.$SHLIBEXT", VFS)
6663
6912
SMB_MODULE(vfs_scannedonly, \$(VFS_SCANNEDONLY_OBJ), "bin/scannedonly.$SHLIBEXT", VFS)
 
6913
SMB_MODULE(vfs_crossrename, \$(VFS_CROSSRENAME_OBJ), "bin/crossrename.$SHLIBEXT", VFS)
 
6914
SMB_MODULE(vfs_linux_xfs_sgid, \$(VFS_LINUX_XFS_SGID_OBJ), "bin/linux_xfs_sgid.$SHLIBEXT", VFS)
 
6915
SMB_MODULE(vfs_time_audit, \$(VFS_TIME_AUDIT_OBJ), "bin/time_audit.$SHLIBEXT", VFS)
6664
6916
 
6665
6917
SMB_SUBSYSTEM(VFS,smbd/vfs.o)
6666
6918
 
6765
7017
 
6766
7018
fi
6767
7019
 
6768
 
AC_ARG_ENABLE(merged-build, 
6769
 
[AS_HELP_STRING([--enable-merged-build], [Build Samba 4 as well])], 
6770
 
[ enable_merged_build=$enableval ], [ enable_merged_build=auto ])
6771
 
 
6772
 
if test x"$enable_merged_build" = x"yes" -a \
6773
 
        x"$merged_build_possible" = x"no" ; then
6774
 
        AC_MSG_ERROR(Merged build required but not possible)
6775
 
fi
6776
 
 
6777
7020
m4_include(../lib/zlib/zlib.m4)
6778
7021
 
6779
 
if test x$enable_merged_build = xauto; then
6780
 
        # Check for python
6781
 
        m4_include(../m4/check_python.m4)
6782
 
        AC_SAMBA_PYTHON_DEVEL([true], [merged_build_possible=no])
6783
 
 
6784
 
        AC_MSG_CHECKING([whether it would be possible to do a merged build])
6785
 
        AC_MSG_RESULT([$merged_build_possible])
6786
 
 
6787
 
        # Enable merged build automatically if possible, when in developer mode
6788
 
        # Don't enable  merged build automatically in 3.4.0.
6789
 
        #if test "x$developer" = xyes; then
6790
 
        #       enable_merged_build=$merged_build_possible
6791
 
        #fi
6792
 
fi
6793
 
 
6794
 
if test x$enable_merged_build = xyes; then
6795
 
        MERGED_BUILD=1
 
7022
if test x$smbtorture4_possible = xyes; then
6796
7023
        saved_USESHARED="$USESHARED"
6797
7024
        USESHARED="false"
6798
 
        m4_include(samba4.m4)
 
7025
        smbtorture4_path="bin/smbtorture4"
 
7026
        smbtorture4_option="-t bin/smbtorture4"
 
7027
        AC_SUBST(smbtorture4_path)
 
7028
        AC_SUBST(smbtorture4_option)
6799
7029
        USESHARED="$saved_USESHARED"
 
7030
        SMBTORTURE4="bin/smbtorture4"
 
7031
        AC_SUBST(SMBTORTURE4)
6800
7032
fi
6801
7033
 
6802
7034
AC_SUBST(ZLIB_LIBS)
6870
7102
AC_SUBST(SMBD_LIBS)
6871
7103
 
6872
7104
CFLAGS="${CFLAGS} \$(FLAGS)"
6873
 
 
6874
 
if test x$MERGED_BUILD != x1; then
6875
 
        CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3"
6876
 
else
6877
 
        if test x"$BLDSHARED" = x"true" ; then
6878
 
                LDFLAGS="$LDFLAGS -L./bin"
6879
 
        fi
6880
 
fi
6881
 
 
6882
 
AC_SUBST(MAKEFILE)
6883
 
if test x$samba_cv_gnu_make = xyes; then
6884
 
        MAKEFILE=Makefile
6885
 
else
6886
 
        # When we don't have GNU Make, generate a copy of Makefile.in 
6887
 
        # that doesn't have the "include " statements but just includes 
6888
 
        # the files verbatim.
6889
 
        MAKEFILE=Makefile-noincludes
6890
 
        $PERL ./script/expand-includes.pl Makefile.in > $MAKEFILE.in
6891
 
fi
6892
 
AC_OUTPUT($MAKEFILE
 
7105
CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3"
 
7106
 
 
7107
# If we had to expand the includes, make tsure the output file is moved back
 
7108
AC_OUTPUT_COMMANDS([
 
7109
if test -f Makefile-noincludes -a ! -f Makefile -a ! -h Makefile ; then
 
7110
        ln -s Makefile-noincludes Makefile
 
7111
fi
 
7112
])
 
7113
 
 
7114
AC_OUTPUT(Makefile
6893
7115
          script/findsmb smbadduser script/gen-8bit-gap.sh script/installbin.sh script/uninstallbin.sh
6894
7116
          lib/netapi/examples/Makefile
6895
7117
          lib/netapi/tests/Makefile
6899
7121
          pkgconfig/smbsharemodes.pc
6900
7122
          ../examples/libsmbclient/Makefile.internal
6901
7123
          )
6902
 
dnl If we had to expand the includes, make tsure the output file is moved back
6903
 
AC_OUTPUT_COMMANDS([
6904
 
if test x$MAKEFILE != Makefile; then
6905
 
        mv $MAKEFILE Makefile
6906
 
fi
6907
 
])
6908
7124
 
6909
7125
#################################################
6910
7126
# Print very concise instructions on building/use