Changeset 745 for trunk/server/source3/configure.in
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/configure.in
r620 r745 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) … … 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-.}/.." … … 74 74 AC_SUBST(LIBWBCLIENT_STATIC) 75 75 AC_SUBST(LIBWBCLIENT_SOVER) 76 AC_SUBST(LIBWBCLIENT_FULLVER) 76 77 AC_SUBST(LIBWBCLIENT) 77 78 AC_SUBST(LIBWBCLIENT_LIBS) … … 124 125 m4_include(m4/swat.m4) 125 126 127 DEVELOPER_CFLAGS="-DDEBUG_PASSWORD -DDEVELOPER" 128 126 129 # Probe the gcc version for extra CFLAGS. We always stash these in 127 130 # DEVELOPER_CFLAGS, so that you can turn them on and off with a simple 128 131 # Makefile edit, avoiding the need to re-run configure. 129 132 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"133 DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings" 131 134 # Add -Wdeclaration-after-statement if compiler supports it 132 135 AC_CACHE_CHECK( … … 195 198 196 199 dnl Checks for programs. 197 merged_build_possible=yes 200 AC_ARG_ENABLE(smbtorture4, 201 [AS_HELP_STRING([--enable-smbtorture4], [Enable building smbtorture4 (default=auto)])]) 202 203 if test x$enable_smbtorture4 != xno; then 204 smbtorture4_possible=yes 205 else 206 smbtorture4_possible=no 207 fi 198 208 199 209 AC_PROG_INSTALL … … 201 211 # Check for GNU make 202 212 m4_include(../m4/check_make.m4) 203 AC_SAMBA_GNU_MAKE([true], [ merged_build_possible=no])213 AC_SAMBA_GNU_MAKE([true], [true]) 204 214 205 215 # Check for perl 206 216 m4_include(../m4/check_perl.m4) 207 AC_SAMBA_PERL([true], [merged_build_possible=no]) 217 AC_SAMBA_PERL([true], [smbtorture4_possible=no]) 218 219 # Check for python 220 m4_include(../m4/check_python.m4) 221 AC_SAMBA_PYTHON_DEVEL([true], [smbtorture4_possible=no]) 208 222 209 223 AC_CHECK_TOOL(AR, ar) … … 232 246 AC_MSG_CHECKING(GNU ld release version) 233 247 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'`248 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 249 ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1` 236 250 ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2` … … 336 350 } 337 351 ], 338 samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv_ _CC_NEGATIVE_ENUM_VALUES=no)])352 samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv_CC_NEGATIVE_ENUM_VALUES=no)]) 339 353 if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then 340 354 AC_MSG_WARN([using --uint-enums for pidl]) … … 396 410 dnl Add modules that have to be built by default here 397 411 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" 412 default_static_modules="" 413 default_static_modules="$default_static_modules pdb_smbpasswd" 414 default_static_modules="$default_static_modules pdb_tdbsam" 415 default_static_modules="$default_static_modules pdb_wbc_sam" 416 default_static_modules="$default_static_modules rpc_lsarpc" 417 default_static_modules="$default_static_modules rpc_samr" 418 default_static_modules="$default_static_modules rpc_winreg" 419 default_static_modules="$default_static_modules rpc_initshutdown" 420 default_static_modules="$default_static_modules rpc_dssetup" 421 default_static_modules="$default_static_modules rpc_wkssvc" 422 default_static_modules="$default_static_modules rpc_svcctl" 423 default_static_modules="$default_static_modules rpc_ntsvcs" 424 default_static_modules="$default_static_modules rpc_netlogon" 425 default_static_modules="$default_static_modules rpc_netdfs" 426 default_static_modules="$default_static_modules rpc_srvsvc" 427 default_static_modules="$default_static_modules rpc_spoolss" 428 default_static_modules="$default_static_modules rpc_eventlog" 429 default_static_modules="$default_static_modules auth_sam" 430 default_static_modules="$default_static_modules auth_unix" 431 default_static_modules="$default_static_modules auth_winbind" 432 default_static_modules="$default_static_modules auth_wbc" 433 default_static_modules="$default_static_modules auth_server" 434 default_static_modules="$default_static_modules auth_domain" 435 default_static_modules="$default_static_modules auth_builtin" 436 default_static_modules="$default_static_modules vfs_default" 437 default_static_modules="$default_static_modules nss_info_template" 399 438 400 439 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" 440 default_shared_modules="" 441 default_shared_modules="$default_shared_modules vfs_recycle" 442 default_shared_modules="$default_shared_modules vfs_audit" 443 default_shared_modules="$default_shared_modules vfs_extd_audit" 444 default_shared_modules="$default_shared_modules vfs_full_audit" 445 default_shared_modules="$default_shared_modules vfs_netatalk" 446 default_shared_modules="$default_shared_modules vfs_fake_perms" 447 default_shared_modules="$default_shared_modules vfs_default_quota" 448 default_shared_modules="$default_shared_modules vfs_readonly" 449 default_shared_modules="$default_shared_modules vfs_cap" 450 default_shared_modules="$default_shared_modules vfs_expand_msdfs" 451 default_shared_modules="$default_shared_modules vfs_shadow_copy" 452 default_shared_modules="$default_shared_modules vfs_shadow_copy2" 453 default_shared_modules="$default_shared_modules charset_CP850" 454 default_shared_modules="$default_shared_modules charset_CP437" 455 default_shared_modules="$default_shared_modules auth_script" 456 default_shared_modules="$default_shared_modules vfs_readahead" 457 default_shared_modules="$default_shared_modules vfs_xattr_tdb" 458 default_shared_modules="$default_shared_modules vfs_streams_xattr" 459 default_shared_modules="$default_shared_modules vfs_streams_depot" 460 default_shared_modules="$default_shared_modules vfs_acl_xattr" 461 default_shared_modules="$default_shared_modules vfs_acl_tdb" 462 default_shared_modules="$default_shared_modules vfs_smb_traffic_analyzer" 463 default_shared_modules="$default_shared_modules vfs_preopen" 464 default_shared_modules="$default_shared_modules vfs_catia" 465 default_shared_modules="$default_shared_modules vfs_scannedonly" 466 default_shared_modules="$default_shared_modules vfs_crossrename" 467 default_shared_modules="$default_shared_modules vfs_linux_xfs_sgid" 468 default_shared_modules="$default_shared_modules vfs_time_audit" 469 default_shared_modules="$default_shared_modules idmap_autorid" 402 470 403 471 if test "x$developer" = xyes; then 404 472 default_static_modules="$default_static_modules rpc_rpcecho pdb_ads" 473 default_static_modules="$default_static_modules auth_netlogond" 405 474 default_shared_modules="$default_shared_modules charset_weird perfcount_test" 406 475 fi … … 458 527 ;; 459 528 5.*) 529 LDFLAGS="$LDFLAGS -lthread" 530 CPPFLAGS="$CPPFLAGS -D_REENTRANT" 460 531 AC_MSG_RESULT([enabling large file support]) 461 532 if test "$ac_cv_prog_gcc" = yes; then … … 465 536 case "$ac_cv_gcc_compiler_version_number" in 466 537 *"gcc version 2.6"*|*"gcc version 2.7"*) 467 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE -D_REENTRANT" 468 LDFLAGS="$LDFLAGS -lthread" 538 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" 469 539 AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) 470 540 ;; 471 541 *) 472 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64" 473 LDFLAGS="$LDFLAGS -lthread" 542 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" 474 543 AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) 475 544 AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits]) … … 477 546 esac 478 547 else 479 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64" 480 LDFLAGS="$LDFLAGS -lthread" 548 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" 481 549 AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) 482 550 AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits]) … … 680 748 AC_CHECK_HEADERS(xfs/libxfs.h) 681 749 AC_CHECK_HEADERS(netgroup.h) 750 AC_CHECK_HEADERS(linux/falloc.h) 682 751 683 752 AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[ … … 699 768 # subdirectory of headers. 700 769 AC_CHECK_HEADERS(valgrind.h valgrind/valgrind.h valgrind/memcheck.h) 770 771 if test x"$enable_developer" = x"yes" ; then 772 if test x"$ac_cv_header_valgrind_h" = xyes -o \ 773 x"$ac_cv_header_valgrind_valgrind_h" = xyes ; then 774 AC_DEFINE(VALGRIND,1,[Whether we have valgrind headers]) 775 fi 776 fi 701 777 702 778 # … … 757 833 if test "x$CUPS_CONFIG" != x; then 758 834 759 ac_save_CFLAGS=$CFLAGS760 835 ac_save_LDFLAGS=$LDFLAGS 761 836 ac_save_PRINT_LIBS=$PRINT_LIBS 762 case "$host_os" in763 *os2*)764 PRINT_LIBS="$PRINT_LIBS -lcups -pthread"765 ;;766 *)767 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"768 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"769 PRINT_LIBS="$PRINT_LIBS -lcups"770 ;;771 esac772 837 AC_CHECK_HEADERS(cups/cups.h cups/language.h) 773 838 … … 779 844 # required. 780 845 AC_CHECK_LIB_EXT(cups, ac_save_PRINT_LIBS , httpConnect, 781 [PRINT_LIBS "$ac_save_PRINT_LIBS -lcups"],846 [PRINT_LIBS="$ac_save_PRINT_LIBS -lcups"], 782 847 [AC_MSG_WARN([your cups library doesn't link with -lcups alone, it might be underlinked.]) ; 783 848 PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG --libs`"]) … … 893 958 fi 894 959 895 AC_CACHE_CHECK([for struct timespec type],samba_cv_struct_timespec, [896 AC_TRY_COMPILE([897 #include <sys/types.h>898 #if STDC_HEADERS899 #include <stdlib.h>900 #include <stddef.h>901 #endif902 #if TIME_WITH_SYS_TIME903 # include <sys/time.h>904 # include <time.h>905 #else906 # if HAVE_SYS_TIME_H907 # include <sys/time.h>908 # else909 # include <time.h>910 # endif911 #endif912 ],[struct timespec ts;],913 samba_cv_struct_timespec=yes,samba_cv_struct_timespec=no)])914 if test x"$samba_cv_struct_timespec" = x"yes"; then915 AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec])916 fi917 918 960 # and glibc has setresuid under linux but the function does 919 961 # nothing until kernel 2.1.44! very dumb. … … 1031 1073 AC_CHECK_FUNCS(strtol) 1032 1074 AC_CHECK_FUNCS(strchr chflags) 1033 AC_CHECK_FUNCS(getrlimit fsync fdatasync setpgid) 1075 AC_CHECK_FUNCS(getrlimit fsync setpgid) 1076 AC_CHECK_FUNCS(fdatasync,,[AC_CHECK_LIB_EXT(rt, LIBS, fdatasync)]) 1034 1077 AC_CHECK_FUNCS(setsid glob strpbrk crypt16 getauthuid) 1035 1078 AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) 1036 AC_CHECK_FUNCS(initgroups select pollrdchk getgrnam getgrent pathconf)1079 AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf) 1037 1080 AC_CHECK_FUNCS(getgrset) 1038 1081 AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf stat64 fstat64) 1039 1082 AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64) 1083 AC_CHECK_FUNCS(fallocate fallocate64) 1040 1084 AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam) 1041 1085 AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64) 1086 AC_CHECK_FUNCS(fdopendir fdopendir64) 1042 1087 AC_CHECK_FUNCS(getpwent_r) 1043 1088 AC_CHECK_FUNCS(getdents64) … … 1046 1091 AC_CHECK_FUNCS(setlocale nl_langinfo) 1047 1092 AC_CHECK_FUNCS(nanosleep,,[AC_CHECK_LIB_EXT(rt, LIBS, nanosleep)]) 1048 AC_CHECK_FUNCS( utimensat)1093 AC_CHECK_FUNCS(lutimes futimes utimensat futimens) 1049 1094 AC_CHECK_FUNCS(mlock munlock mlockall munlockall) 1050 1095 AC_CHECK_FUNCS(memalign posix_memalign hstrerror) … … 1066 1111 AC_CHECK_FUNCS(sysctlbyname) 1067 1112 1113 ################################################# 1114 # Check to see if core dump directory is defined in linux 1115 # with /proc/sys/kernel/core_pattern 1116 1117 AC_CHECK_FILE([/proc/sys/kernel/core_pattern], 1118 AC_DEFINE(HAVE_SYS_KERNEL_PROC_CORE_PATTERN, 1, 1119 [Whether Linux kernel uses core_pattern for core files]), 1120 []) 1121 1068 1122 ############################# 1069 1123 # check if building with gpfs … … 1072 1126 AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL headers are available]) 1073 1127 default_shared_modules="$default_shared_modules vfs_gpfs" 1128 default_shared_modules="$default_shared_modules vfs_gpfs_hsm_notify" 1074 1129 fi 1075 1130 … … 1392 1447 1393 1448 ############################################ 1394 # Check if we have libattr1449 # Check for EA implementations 1395 1450 case "$host_os" in 1396 1451 *osf*) … … 1400 1455 AC_CHECK_FUNCS(sizeof_proplist_entry) 1401 1456 ;; 1457 *freebsd4* | *dragonfly* ) 1458 AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work]) 1459 ;; 1460 *solaris*) 1461 AC_CHECK_FUNCS(attropen) 1462 ;; 1402 1463 *) 1403 1464 AC_SEARCH_LIBS(getxattr, [attr]) 1404 AC_CHECK_FUNCS(getxattr lgetxattr fgetxattr listxattr llistxattr) 1405 AC_CHECK_FUNCS(getea fgetea lgetea listea flistea llistea) 1406 AC_CHECK_FUNCS(removeea fremoveea lremoveea setea fsetea lsetea) 1407 AC_CHECK_FUNCS(flistxattr removexattr lremovexattr fremovexattr) 1408 AC_CHECK_FUNCS(setxattr lsetxattr fsetxattr) 1409 AC_CHECK_FUNCS(attr_get attr_list attr_set attr_remove) 1410 AC_CHECK_FUNCS(attr_getf attr_listf attr_setf attr_removef) 1411 ;; 1412 esac 1413 1414 ######################################################## 1415 # Check if attropen() is present if this is Solaris 1416 case "$host_os" in 1417 *solaris*) 1418 AC_CHECK_FUNCS(attropen) 1465 AC_CHECK_FUNCS(getxattr,[ 1466 AC_CHECK_FUNCS(lgetxattr fgetxattr listxattr llistxattr flistxattr removexattr lremovexattr fremovexattr setxattr lsetxattr fsetxattr) 1467 ]) 1468 AC_CHECK_FUNCS(getea,[ 1469 AC_CHECK_FUNCS(fgetea lgetea listea flistea llistea removeea fremoveea lremoveea setea fsetea lsetea) 1470 ]) 1471 AC_CHECK_FUNCS(attr_get,[ 1472 AC_CHECK_FUNCS(attr_list attr_set attr_remove attr_getf attr_listf attr_setf attr_removef) 1473 ]) 1474 AC_CHECK_FUNCS(extattr_delete_file,[ 1475 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) 1476 ]) 1419 1477 ;; 1420 1478 esac … … 1443 1501 fi 1444 1502 fi 1445 1446 # Check if we have extattr1447 case "$host_os" in1448 *freebsd4* | *dragonfly* )1449 AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work])1450 ;;1451 *)1452 AC_CHECK_FUNCS(extattr_delete_fd extattr_delete_file extattr_delete_link)1453 AC_CHECK_FUNCS(extattr_get_fd extattr_get_file extattr_get_link)1454 AC_CHECK_FUNCS(extattr_list_fd extattr_list_file extattr_list_link)1455 AC_CHECK_FUNCS(extattr_set_fd extattr_set_file extattr_set_link)1456 ;;1457 esac1458 1503 1459 1504 AC_DISABLE_STATIC … … 1634 1679 ;; 1635 1680 *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX]) 1636 # Use special PIC flags for the native HP-UX compiler.1637 BLDSHARED="true"1638 SHLD="cc"1639 LDSHFLAGS="-b -Wl,-B,symbolic,-b,-z"1640 SONAMEFLAG="-Wl,+h "1641 PICFLAG="+z"1681 # ia64: 64bit build using gcc with CFLAGS="-mpl64" 1682 # 64bit build using HP's cc with CFLAGS="+DD64" 1683 # hppa: 64bit build unsupported by gcc 1684 # 64bit build using HP's cc with CFLAGS="+DA2.0w" 1685 # HP-UX 11.00 ld needs PHSS_33034 1686 BLDSHARED="true" 1642 1687 if test "${GCC}" = "yes"; then 1643 1688 PICFLAG="-fPIC" 1689 LDSHFLAGS="-shared" 1644 1690 else 1645 PICFLAG="+z +ESnolit" 1691 PICFLAG="+z" 1692 LDSHFLAGS="-b" 1693 # "Uses depth-first symbol resolution" 1694 LDSHFLAGS="$LDSHFLAGS -Wl,-B,symbolic,-b" 1695 if test "$host_cpu" != "ia64"; then 1696 # "don't store literals in read-only memory" (?): 1697 PICFLAG="$PICFLAG +ESnolit" 1698 fi 1646 1699 fi 1647 1700 if test "$host_cpu" = "ia64"; then 1648 1701 SHLIBEXT="so" 1649 PICFLAG="+z"1650 DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32 "1702 # TODO: does the linker find the right 32/64 bit version of the libs? : 1703 DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32:/usr/local/lib/hpux64:/usr/lib/hpux64" 1651 1704 else 1652 1705 SHLIBEXT="sl" 1653 1706 DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib" 1707 fi 1708 if test "$ac_cv_prog_gnu_ld" = "yes"; then 1709 SONAMEFLAG="-Wl,-soname=" 1710 else 1711 SONAMEFLAG="-Wl,+h," 1712 fi 1713 # PIE/PIC flags at link time are required on HP-UX because 1714 # linking requires a temporary source file, which is being 1715 # compiled with the indicated flags - which need to contain 1716 # PIC flags when we don't support PIE flags: 1717 if test "$PIE_LDFLAGS" = "" ; then 1718 PIE_LDFLAGS=\${PICFLAG} 1654 1719 fi 1655 1720 AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block]) … … 1665 1730 AC_DEFINE(STAT_ST_BLOCKSIZE,512) 1666 1731 AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly]) 1732 for flags in "-expect_unresolved '*'" "-Wl,-expect_unresolved,'*'" ; do 1733 saved_ldflags="$LDFLAGS" 1734 AC_MSG_CHECKING([if $flags works]) 1735 LDFLAGS="$flags $saved_ldflags" 1736 AC_TRY_LINK([],[], 1737 [AC_MSG_RESULT([yes]) 1738 LDSHFLAGS_Z_NODEFS=$flags], 1739 AC_MSG_RESULT([no])) 1740 LDFLAGS="$saved_ldflags" 1741 test x"$LDSHFLAGS_Z_NODEFS" != x && break 1742 done 1667 1743 ;; 1668 1744 *sco*) AC_DEFINE(SCO,1,[Whether the host os is sco unix]) … … 1723 1799 ;; 1724 1800 1725 *os2*) AC_DEFINE(OS2, 1,[Weather the host os is OS/2])1726 BLDSHARED="true"1727 LDSHFLAGS="-ZDll"1728 SHLIBEXT="dll"1729 AC_DEFINE(STAT_ST_BLOCKSIZE, 512)1730 ;;1731 1732 1801 *) 1733 1802 AC_DEFINE(STAT_ST_BLOCKSIZE,512) … … 1749 1818 AC_MSG_RESULT($BLDSHARED) 1750 1819 1751 saved_before_as_needed_ldflags="$LDFLAGS" 1752 for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do 1820 if test x"$enable_developer" = x"yes" ; then 1821 default_as_needed=auto 1822 else 1823 default_as_needed=no 1824 fi 1825 AC_ARG_ENABLE(as-needed, 1826 AS_HELP_STRING([--enable-as-needed], 1827 [Turn on as-needed support if available (default=no)]), 1828 [enable_as_needed=$enableval], 1829 [enable_as_needed=$default_as_needed]) 1830 if test "x$enable_as_needed" != xno; then 1831 saved_before_as_needed_ldflags="$LDFLAGS" 1832 for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do 1753 1833 saved_ldflags="$LDFLAGS" 1754 1834 AC_MSG_CHECKING([if $flags works]) … … 1761 1841 LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags" 1762 1842 test x"$ld_as_needed_flag_found" = xyes && break 1763 done 1843 done 1844 fi 1845 1846 if test x$ld_as_needed_flag_found = xyes -a x$enable_as_needed = xauto ; then 1847 # check if ld has bug described in https://bugzilla.samba.org/show_bug.cgi?id=7209#c17 1848 AC_MSG_CHECKING([if $LD_AS_NEEDED_FLAG has explicit external libs bug]) 1849 cat > conftest_shb.c <<END 1850 void b() {} 1851 END 1852 cat > conftest_sha.c <<END 1853 extern void b(); 1854 void a() { 1855 b(); 1856 } 1857 END 1858 cat > conftest.c <<END 1859 extern void a(); 1860 int main() { 1861 a(); 1862 return 0; 1863 } 1864 END 1865 1866 rm -fr conftest 1867 AC_TRY_COMMAND([$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o conftest_sha.o conftest_sha.c 1>&AS_MESSAGE_LOG_FD 2>&1]) 1868 AC_TRY_COMMAND([$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o conftest_shb.o conftest_shb.c 1>&AS_MESSAGE_LOG_FD 2>&1]) 1869 TESTCMD="`eval echo \"$SHLD $LDSHFLAGS $PICFLAG\"`" 1870 AC_TRY_COMMAND([$TESTCMD -o libconftest_shb.$SHLIBEXT conftest_shb.o 1>&AS_MESSAGE_LOG_FD 2>&1]) 1871 AC_TRY_COMMAND([$TESTCMD -o libconftest_sha.$SHLIBEXT conftest_sha.o 1>&AS_MESSAGE_LOG_FD 2>&1]) 1872 AC_TRY_COMMAND([$CC -o conftest conftest.c $LDFLAGS -L. -lconftest_sha -lconftest_shb 1>&AS_MESSAGE_LOG_FD 2>&1]) 1873 if AC_TRY_COMMAND([eval "$LIB_PATH_VAR=. ./conftest 1>&AS_MESSAGE_LOG_FD 2>&1"]) 1874 then 1875 AC_MSG_RESULT([no]) 1876 else 1877 ld_as_needed_flag_found=no 1878 LDFLAGS="$saved_before_as_needed_ldflags" 1879 AC_MSG_RESULT([yes]) 1880 fi 1881 rm conftest* libconftest* 1882 fi 1764 1883 1765 1884 # check if we have to disable LD_AS_NEEDED_FLAG: … … 1836 1955 if AC_TRY_COMMAND([$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.o ${srcdir-.}/../tests/shlib.c 1>&AS_MESSAGE_LOG_FD]) 1837 1956 then 1838 if AC_TRY_COMMAND([`eval echo "$SHLD $LDSHFLAGS $PICFLAG"` -o "shlib.$SHLIBEXT" shlib.o 1>&AS_MESSAGE_LOG_FD]) 1957 TESTCMD="`eval echo \"$SHLD $LDSHFLAGS $PICFLAG\"`" 1958 TESTCMD="$TESTCMD -o \"shlib.$SHLIBEXT\" shlib.o" 1959 if AC_TRY_COMMAND([eval $TESTCMD 1>&AS_MESSAGE_LOG_FD 2>&1]) 1839 1960 then 1840 1961 ac_cv_shlib_works=yes … … 1856 1977 PICFLAG="${PIE_CFLAGS}" 1857 1978 SHLIBEXT="shared_libraries_disabled" 1858 merged_build_possible=no1979 smbtorture4_possible=no 1859 1980 fi 1860 1981 … … 1864 1985 AC_DEFINE_UNQUOTED(SHLIBEXT, "$SHLIBEXT", [Shared library extension]) 1865 1986 1866 AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR1867 1987 1868 1988 1869 1989 ########################################################### 1870 1990 # 1871 # Configuration of subsystem / libraries1991 # Configuration of subsystems / libraries 1872 1992 # 1873 1993 ########################################################### … … 1961 2081 # be extracted from their respective source directories 1962 2082 # 1963 AC_ARG_ENABLE(external_libtalloc, [AS_HELP_STRING([--enable-external-libtalloc], [Enable external talloc [default=auto]])], 1964 [ enable_external_libtalloc=$enableval ], [ enable_external_libtalloc=auto ]) 2083 AC_ARG_ENABLE(external_libtalloc, 2084 [AS_HELP_STRING([--enable-external-libtalloc], 2085 [Enable external talloc [default=auto]])], 2086 [ enable_external_libtalloc=$enableval ], 2087 [ enable_external_libtalloc=auto ]) 1965 2088 1966 2089 if test "x$enable_external_libtalloc" != xno … … 1968 2091 PKG_CHECK_MODULES(LIBTALLOC, talloc >= 2.0.1, 1969 2092 [ enable_external_libtalloc=yes ], 1970 [ if test x$enable_external_libtalloc = xyes; then2093 [ if test x$enable_external_libtalloc = xyes; then 1971 2094 AC_MSG_ERROR([Unable to find libtalloc]) 1972 2095 else … … 1979 2102 then 1980 2103 m4_include(../lib/talloc/libtalloc.m4) 1981 LINK_LIBTALLOC=STATIC 1982 SMB_LIBRARY(talloc, 2) 2104 if test x"$USESHARED" == x"no" ; then 2105 LINK_LIBTALLOC=STATIC 2106 fi 2107 LIBTALLOCVERSION=`grep ^VERSION ${tallocdir}/wscript | sed -e "s/'//g" -e 's/.* //'` 2108 SMB_LIBRARY(talloc, 2, ${LIBTALLOCVERSION}) 1983 2109 LIBTALLOC_OBJ0="" 1984 2110 for obj in ${TALLOC_OBJ}; do … … 1997 2123 [AS_HELP_STRING([--enable-external-libtdb], 1998 2124 [Enable external tdb [default=auto]])], 1999 [ enable_external_libt alloc=$enableval ],2000 [ enable_external_libt alloc=auto ])2125 [ enable_external_libtdb=$enableval ], 2126 [ enable_external_libtdb=auto ]) 2001 2127 2002 2128 if test "x$enable_external_libtdb" != xno 2003 2129 then 2004 PKG_CHECK_MODULES(LIBTDB, tdb >= 1.2. 1,2130 PKG_CHECK_MODULES(LIBTDB, tdb >= 1.2.6, 2005 2131 [ enable_external_libtdb=yes ], 2006 2132 [ … … 2017 2143 then 2018 2144 m4_include(../lib/tdb/libtdb.m4) 2019 LINK_LIBTDB=STATIC 2020 SMB_LIBRARY(tdb, 1) 2145 if test x"$USESHARED" == x"no" ; then 2146 LINK_LIBTDB=STATIC 2147 fi 2148 LIBTDBVERSION=`grep ^VERSION ${tdbdir}/wscript | sed -e "s/'//g" -e 's/.* //'` 2149 SMB_LIBRARY(tdb, 1, ${LIBTDBVERSION}) 2021 2150 LIBTDB_OBJ0="" 2151 LIBTDB_LIBS="$LIBTDB_LIBS $TDB_DEPS" 2022 2152 for obj in ${TDB_OBJ}; do 2023 2153 LIBTDB_OBJ0="${LIBTDB_OBJ0} ${tdbdir}/${obj}" … … 2031 2161 TDBDUMP="bin/tdbdump\$(EXEEXT)" 2032 2162 AC_SUBST(TDBDUMP) 2163 TDBRESTORE="bin/tdbrestore\$(EXEEXT)" 2164 AC_SUBST(TDBRESTORE) 2033 2165 TDBTOOL="bin/tdbtool\$(EXEEXT)" 2034 2166 AC_SUBST(TDBTOOL) 2035 2167 TDBTORTURE="bin/tdbtorture\$(EXEEXT)" 2036 2168 AC_SUBST(TDBTORTURE) 2169 ac_cv_have_tdb_err_nesting=yes 2170 else 2171 AC_TRY_COMPILE([#include <tdb.h>], 2172 [enum TDB_ERROR err = TDB_ERR_NESTING], 2173 ac_cv_have_tdb_err_nesting=yes, 2174 ac_cv_have_tdb_err_nesting=no) 2175 fi 2176 2177 if test x"$ac_cv_have_tdb_err_nesting" = xyes; then 2178 AC_DEFINE(HAVE_TDB_ERR_NESTING, 1, [Whether we have TDB_ERR_NESTING]) 2037 2179 fi 2038 2180 … … 2040 2182 SMB_LIBRARY(smbclient, 0) 2041 2183 SMB_LIBRARY(smbsharemodes, 0) 2042 SMB_LIBRARY(addns, 0, no, [undefined API])2184 SMB_LIBRARY(addns, 0, [], no, [undefined API]) 2043 2185 2044 2186 … … 2262 2404 fi 2263 2405 2264 AC_CACHE_CHECK([if gettimeofday takes tz argument],samba_cv_HAVE_GETTIMEOFDAY_TZ,[ 2265 AC_TRY_LINK([ 2266 #include <sys/time.h> 2267 #include <unistd.h>], [struct timeval tv; return gettimeofday(&tv, NULL);], 2268 samba_cv_HAVE_GETTIMEOFDAY_TZ=yes, 2269 samba_cv_HAVE_GETTIMEOFDAY_TZ=no)]) 2270 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then 2271 AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday takes a tz argument]) 2272 fi 2273 2274 if test x"$samba_cv_WITH_PROFILE" = x"yes"; then 2275 2276 # On some systems (eg. Linux) librt can pull in libpthread. We 2277 # don't want this to happen because libpthreads changes signal delivery 2278 # semantics in ways we are not prepared for. This breaks Linux oplocks 2279 # which rely on signals. 2280 2281 AC_LIBTESTFUNC(rt, clock_gettime, 2282 [ 2283 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, 2284 [Whether clock_gettime is available]) 2285 SMB_CHECK_CLOCK_ID(CLOCK_MONOTONIC) 2286 SMB_CHECK_CLOCK_ID(CLOCK_PROCESS_CPUTIME_ID) 2287 SMB_CHECK_CLOCK_ID(CLOCK_REALTIME) 2288 ]) 2289 2406 if test x"$libreplace_cv_HAVE_CLOCK_GETTIME_IN_LIBRT" = xyes ; then 2407 LIBS="$LIBS -lrt" 2290 2408 fi 2291 2409 … … 2443 2561 # end utmp details 2444 2562 2563 AC_CACHE_CHECK([for linux fallocate],samba_cv_HAVE_LINUX_FALLOCATE,[ 2564 AC_TRY_COMPILE([ 2565 #if defined(HAVE_UNISTD_H) 2566 #include <unistd.h> 2567 #endif 2568 #include <sys/types.h> 2569 #define _GNU_SOURCE 2570 #include <fcntl.h> 2571 #if defined(HAVE_LINUX_FALLOC_H) 2572 #include <linux/falloc.h> 2573 #endif], 2574 [int ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 10);], 2575 samba_cv_HAVE_LINUX_FALLOCATE=yes,samba_cv_HAVE_LINUX_FALLOCATE=no)]) 2576 if test x"$samba_cv_HAVE_LINUX_FALLOCATE" = x"yes" && test x"$ac_cv_func_fallocate" = x"yes"; then 2577 AC_DEFINE(HAVE_LINUX_FALLOCATE,1,[Whether the Linux 'fallocate' function is available]) 2578 fi 2579 2580 AC_CACHE_CHECK([for linux fallocate64],samba_cv_HAVE_LINUX_FALLOCATE64,[ 2581 AC_TRY_COMPILE([ 2582 #if defined(HAVE_UNISTD_H) 2583 #include <unistd.h> 2584 #endif 2585 #include <sys/types.h> 2586 #define _GNU_SOURCE 2587 #include <fcntl.h> 2588 #if defined(HAVE_LINUX_FALLOC_H) 2589 #include <linux/falloc.h> 2590 #endif], 2591 [int ret = fallocate64(0, FALLOC_FL_KEEP_SIZE, 0, 10);], 2592 samba_cv_HAVE_LINUX_FALLOCATE64=yes,samba_cv_HAVE_LINUX_FALLOCATE64=no)]) 2593 if test x"$samba_cv_HAVE_LINUX_FALLOCATE64" = x"yes" && test x"$ac_cv_func_fallocate64" = x"yes"; then 2594 AC_DEFINE(HAVE_LINUX_FALLOCATE64,1,[Whether the Linux 'fallocate64' function is available]) 2595 fi 2445 2596 2446 2597 ICONV_LOOK_DIRS="/usr /usr/local /sw /opt" … … 2693 2844 # might not need it. 2694 2845 AC_CHECK_LIB(fam, FAMOpen2, 2695 [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam"], 2696 [samba_cv_HAVE_LIBFAM=no]) 2846 [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam"; 2847 AC_DEFINE(HAVE_FAMOPEN2, 1, Define to 1 if there is support for FAMOpen2)], 2848 [samba_cv_HAVE_LIBFAM=no]) 2697 2849 2698 2850 if test x"$samba_cv_HAVE_LIBFAM" = x"no" ; then 2699 2851 samba_fam_xtra=-lC 2700 2852 AC_CHECK_LIB_EXT(fam, samba_fam_xtra, FAMOpen2, 2701 [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam -lC"], 2702 [samba_cv_HAVE_LIBFAM=no]) 2853 [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam -lC"; 2854 AC_DEFINE(HAVE_FAMOPEN2, 1, Define to 1 if there is support for FAMOpen2)], 2855 [samba_cv_HAVE_LIBFAM=no]) 2703 2856 unset samba_fam_xtra 2704 2857 fi 2705 2858 fi 2706 2707 2859 if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then 2708 2860 default_shared_modules="$default_shared_modules vfs_notify_fam" … … 2712 2864 [Whether fam.h contains a typedef for enum FAMCodes]), 2713 2865 []) 2866 fi 2867 2868 if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then 2869 AC_CHECK_LIB(fam, FAMNoExists, 2870 [AC_DEFINE(HAVE_FAMNOEXISTS, 1, Define to 1 if there is support for FAMNoExists)]) 2714 2871 fi 2715 2872 … … 3258 3415 3259 3416 AC_ARG_WITH(ldap, 3260 [AS_HELP_STRING([--with-ldap], [LDAP support (default yes)])],3417 [AS_HELP_STRING([--with-ldap], [LDAP support (default=auto)])], 3261 3418 [ case "$withval" in 3262 3419 yes|no) … … 3271 3428 SMBLDAPUTIL="" 3272 3429 AC_SUBST(SMBLDAPUTIL) 3273 LDBLDAP=""3274 AC_SUBST(LDBLDAP)3275 3430 3276 3431 if test x"$with_ldap_support" != x"no"; then … … 3408 3563 3409 3564 AC_ARG_WITH(ads, 3410 [AS_HELP_STRING([--with-ads], [Active Directory support (default 3565 [AS_HELP_STRING([--with-ads], [Active Directory support (default=auto)])], 3411 3566 [ case "$withval" in 3412 3567 yes|no) … … 3619 3774 LDFLAGS=$ac_save_LDFLAGS 3620 3775 fi 3621 AC_CHECK_HEADERS([krb5/locate_plugin.h], [], [],3622 [[#ifdef HAVE_KRB5_H3623 #include <krb5.h>3624 #endif3625 ]])3626 3627 if test x"$ac_cv_header_krb5_locate_plugin_h" = x"yes"; then3628 WINBIND_KRB5_LOCATOR="bin/winbind_krb5_locator.$SHLIBEXT"3629 if test x"$BLDSHARED" = x"true" ; then3630 EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WINBIND_KRB5_LOCATOR"3631 fi3632 fi3633 3776 3634 3777 # check for new heimdal KRB5_DEPRECATED handling … … 3658 3801 # now check for gssapi headers. This is also done here to allow for 3659 3802 # different kerberos include paths 3660 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h com_err.h)3803 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h gssapi/gssapi_ext.h com_err.h) 3661 3804 3662 3805 ################################################################## … … 3683 3826 if test x"$have_gssapi" != x"yes"; then 3684 3827 AC_CHECK_LIB_EXT(gssapi_krb5, KRB5_LIBS,gss_display_status,[],[],have_gssapi=yes) 3828 AC_CHECK_FUNC_EXT(gss_wrap_iov, $KRB5_LIBS) 3685 3829 fi 3686 3830 … … 3734 3878 AC_CHECK_FUNC_EXT(krb5_get_host_realm, $KRB5_LIBS) 3735 3879 AC_CHECK_FUNC_EXT(krb5_free_host_realm, $KRB5_LIBS) 3880 AC_CHECK_FUNC_EXT(gss_get_name_attribute, $KRB5_LIBS) 3736 3881 3737 3882 # MIT krb5 1.8 does not expose this call (yet) … … 3941 4086 fi 3942 4087 4088 found_arcfour_hmac=no 3943 4089 AC_CACHE_CHECK([for ENCTYPE_ARCFOUR_HMAC_MD5], 3944 4090 samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,[ … … 3958 4104 x"$samba_cv_HAVE_KEYTYPE_ARCFOUR_56" = x"yes"; then 3959 4105 AC_DEFINE(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,1, 3960 [Whether the ENCTYPE_ARCFOUR_HMAC_MD5 key type is available]) 4106 [Whether the ENCTYPE_ARCFOUR_HMAC_MD5 key type definition is available]) 4107 found_arcfour_hmac=yes 4108 fi 4109 AC_CACHE_CHECK([for ENCTYPE_ARCFOUR_HMAC], 4110 samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC,[ 4111 AC_TRY_COMPILE([#include <krb5.h>], 4112 [krb5_enctype enctype; enctype = ENCTYPE_ARCFOUR_HMAC;], 4113 samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC=yes, 4114 samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC=no)]) 4115 if test x"$samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC" = x"yes"; then 4116 AC_DEFINE(HAVE_ENCTYPE_ARCFOUR_HMAC,1, 4117 [Whether the ENCTYPE_ARCFOUR_HMAC key type definition is available]) 4118 found_arcfour_hmac=yes 3961 4119 fi 3962 4120 … … 4201 4359 # 4202 4360 # 4361 if test x"$found_arcfour_hmac" != x"yes"; then 4362 AC_MSG_WARN(arcfour-hmac-md5 encryption type not found in -lkrb5) 4363 use_ads=no 4364 fi 4365 4203 4366 if test x"$ac_cv_lib_ext_krb5_krb5_mk_req_extended" != x"yes"; then 4204 4367 AC_MSG_WARN(krb5_mk_req_extended not found in -lkrb5) … … 4279 4442 4280 4443 if test x"$use_ads" != xyes; then 4281 merged_build_possible=no4444 smbtorture4_possible=no 4282 4445 fi 4283 4446 … … 4289 4452 # Compile with DNS Updates support? 4290 4453 4291 with_dnsupdate_support= no4454 with_dnsupdate_support=auto 4292 4455 AC_MSG_CHECKING([whether to enable DNS Updates support]) 4293 4456 4294 4457 AC_ARG_WITH(dnsupdate, 4295 [AS_HELP_STRING([--with-dnsupdate], [Enable DNS Updates support (default no)])],4458 [AS_HELP_STRING([--with-dnsupdate], [Enable DNS Updates support (default=auto)])], 4296 4459 [ case "$withval" in 4297 4460 yes|no) … … 4305 4468 4306 4469 ################################################################ 4307 # first test for Active Directory support being enabled 4308 #if test x"$with_ads_support" = x"no"; then 4309 # AC_MSG_ERROR(Active Directory support is required to enable DNS Update support) 4310 # with_dnsupdate_support=no 4311 #fi 4470 # first test for AD / GSSAPI support being enabled 4471 if test x"$have_gssapi" != xyes ; then 4472 if test x"$with_dnsupdate_support" = x"yes" ; then 4473 AC_MSG_ERROR(DNS Updates support only possible with AD and GSSAPI support) 4474 else 4475 AC_MSG_NOTICE(DNS Updates support only possible with AD and GSSAPI support) 4476 with_dnsupdate_support=no 4477 fi 4478 fi 4312 4479 ################################################################## 4313 4480 # then test for uuid.h (necessary to generate unique DNS keynames 4314 4481 # (uuid.h is required for this test) 4315 AC_CHECK_HEADERS(uuid/uuid.h) 4316 4317 if test x"$ac_cv_header_uuid_uuid_h" != x"yes"; then 4318 if test x"$with_dnsupdate_support" = x"yes"; then 4319 AC_MSG_ERROR(uuid.h is needed to enable DNS Updates support) 4320 else 4321 AC_MSG_WARN(uuid.h is needed to enable DNS Updates support) 4482 AC_CHECK_HEADERS(uuid/uuid.h) 4483 4484 4485 if test x"$ac_cv_header_uuid_uuid_h" != x"yes"; then 4486 if test x"$with_dnsupdate_support" = x"yes"; then 4487 AC_MSG_ERROR(uuid.h is needed to enable DNS Updates support) 4488 else 4489 AC_MSG_NOTICE(uuid.h is needed to enable DNS Updates support) 4490 fi 4491 with_dnsupdate_support=no 4322 4492 fi 4323 with_dnsupdate_support=no4324 fi4325 4493 fi 4326 4494 … … 4354 4522 ]) 4355 4523 fi 4524 # finally print out the result: 4525 AC_MSG_CHECKING(whether DNS Updates support is used) 4526 AC_MSG_RESULT([$with_dnsupdate_support]) 4527 4356 4528 4357 4529 ################################################# … … 4373 4545 4374 4546 ################################################# 4375 # check for mount- and umount.cifs support4376 CIFSMOUNT_PROGS=""4377 INSTALL_CIFSMOUNT=""4378 UNINSTALL_CIFSMOUNT=""4379 AC_MSG_CHECKING(whether to build mount.cifs)4380 AC_ARG_WITH(cifsmount,4381 [AS_HELP_STRING([--with-cifsmount], [Include mount.cifs (Linux only) support (default=yes)])],4382 [ case "$withval" in4383 no)4384 AC_MSG_RESULT(no)4385 ;;4386 *)4387 case "$host_os" in4388 *linux*)4389 AC_MSG_RESULT(yes)4390 AC_DEFINE(WITH_CIFSMOUNT,1,[Whether to build mount.cifs])4391 CIFSMOUNT_PROGS="bin/mount.cifs"4392 INSTALL_CIFSMOUNT="installcifsmount"4393 UNINSTALL_CIFSMOUNT="uninstallcifsmount"4394 ;;4395 *)4396 AC_MSG_ERROR(not on a linux system!)4397 ;;4398 esac4399 ;;4400 esac ],4401 [ case "$host_os" in4402 *linux*)4403 AC_MSG_RESULT(yes)4404 AC_DEFINE(WITH_CIFSMOUNT,1,[Whether to build mount.cifs])4405 CIFSMOUNT_PROGS="bin/mount.cifs"4406 INSTALL_CIFSMOUNT="installcifsmount"4407 UNINSTALL_CIFSMOUNT="uninstallcifsmount"4408 ;;4409 *)4410 AC_MSG_RESULT(no)4411 ;;4412 esac ]4413 )4414 4415 CIFSUMOUNT_PROGS=""4416 INSTALL_CIFSUMOUNT=""4417 UNINSTALL_CIFSUMOUNT=""4418 AC_MSG_CHECKING(whether to build umount.cifs)4419 AC_ARG_WITH(cifsumount,4420 [AS_HELP_STRING([--with-cifsumount], [Include umount.cifs (Linux only) support (default=no)])],4421 [ case "$withval" in4422 yes)4423 case "$host_os" in4424 *linux*)4425 AC_MSG_RESULT(yes)4426 AC_DEFINE(WITH_CIFSUMOUNT,1,[Whether to build umount.cifs])4427 CIFSUMOUNT_PROGS="bin/umount.cifs"4428 INSTALL_CIFSUMOUNT="installcifsumount"4429 UNINSTALL_CIFSUMOUNT="uninstallcifsumount"4430 ;;4431 *)4432 AC_MSG_ERROR(not on a linux system!)4433 ;;4434 esac4435 ;;4436 *)4437 AC_MSG_RESULT(no)4438 ;;4439 esac ],4440 AC_MSG_RESULT(no)4441 )4442 4443 #################################################4444 # check for cifs.upcall support4445 AC_CHECK_HEADERS([keyutils.h], [HAVE_KEYUTILS_H=1], [HAVE_KEYUTILS_H=0])4446 CIFSUPCALL_PROGS=""4447 INSTALL_CIFSUPCALL=""4448 UNINSTALL_CIFSUPCALL=""4449 AC_MSG_CHECKING(whether to build cifs.upcall)4450 AC_ARG_WITH(cifsupcall,4451 [AS_HELP_STRING([--with-cifsupcall], [Include cifs.upcall (Linux only) support (default=yes)])],4452 [ case "$withval" in4453 no)4454 AC_MSG_RESULT(no)4455 ;;4456 *)4457 case "$host_os" in4458 *linux*)4459 if test x"$use_ads" != x"yes"; then4460 AC_MSG_ERROR(ADS support should be enabled for building cifs.upcall)4461 elif test x"$HAVE_KEYUTILS_H" != "x1"; then4462 AC_MSG_ERROR(keyutils package is required for cifs.upcall)4463 else4464 AC_MSG_RESULT(yes)4465 AC_DEFINE(WITH_CIFSUPCALL,1,[whether to build cifs.upcall])4466 CIFSUPCALL_PROGS="bin/cifs.upcall"4467 INSTALL_CIFSUPCALL="installcifsupcall"4468 UNINSTALL_CIFSUPCALL="uninstallcifsupcall"4469 fi4470 ;;4471 *)4472 AC_MSG_ERROR(not on a linux system!)4473 ;;4474 esac4475 ;;4476 esac ],4477 [ case "$host_os" in4478 *linux*)4479 if test x"$use_ads" != x"yes"; then4480 AC_MSG_WARN(ADS support should be enabled for building cifs.upcall)4481 elif test x"$HAVE_KEYUTILS_H" != "x1"; then4482 AC_MSG_WARN(keyutils package is required for cifs.upcall)4483 else4484 AC_MSG_RESULT(yes)4485 AC_DEFINE(WITH_CIFSUPCALL,1,[whether to build cifs.upcall])4486 CIFSUPCALL_PROGS="bin/cifs.upcall"4487 INSTALL_CIFSUPCALL="installcifsupcall"4488 UNINSTALL_CIFSUPCALL="uninstallcifsupcall"4489 fi4490 ;;4491 *)4492 AC_MSG_RESULT(no)4493 ;;4494 esac ]4495 )4496 4497 4498 #################################################4499 4547 # Check for a PAM clear-text auth, accounts, password 4500 4548 # and session support. Most PAM implementations keep their … … 4580 4628 AC_MSG_CHECKING(whether to have PAM MODULES support) 4581 4629 AC_MSG_RESULT([$create_pam_modules]) 4630 4631 AC_TRY_COMPILE([ 4632 #if defined(HAVE_SECURITY_PAM_APPL_H) 4633 #include <security/pam_appl.h> 4634 #elif defined(HAVE_PAM_PAM_APPL_H) 4635 #include <pam/pam_appl.h> 4636 #endif],[ 4637 pam_set_item(0, PAM_RHOST, 0); 4638 ], 4639 AC_DEFINE(HAVE_PAM_RHOST, 1, 4640 [Define to 1 if PAM_RHOST is available]),[]) 4641 4642 AC_TRY_COMPILE([ 4643 #if defined(HAVE_SECURITY_PAM_APPL_H) 4644 #include <security/pam_appl.h> 4645 #elif defined(HAVE_PAM_PAM_APPL_H) 4646 #include <pam/pam_appl.h> 4647 #endif],[ 4648 pam_set_item(0, PAM_TTY, 0); 4649 ], 4650 AC_DEFINE(HAVE_PAM_TTY, 1, 4651 [Define to 1 if PAM_TTY is available]),[]) 4652 4582 4653 fi # try_pam != no 4583 4654 … … 4996 5067 fi 4997 5068 5069 if test x"$samba_cv_SYSQUOTA_FOUND" != x"no"; then 5070 AC_CACHE_CHECK([whether the sys_quota interface works with NFS],samba_cv_SYSQUOTA_WORKS_NFS,[ 5071 SAVE_CPPFLAGS="$CPPFLAGS" 5072 CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}" 5073 AC_TRY_COMPILE([ 5074 #include "confdefs.h" 5075 #define NO_PROTO_H 1 5076 #define NO_CONFIG_H 1 5077 #define HAVE_SYS_QUOTAS 1 5078 #define HAVE_NFS_QUOTAS 1 5079 #include "${srcdir-.}/lib/sysquotas_nfs.c" 5080 ],[],samba_cv_SYSQUOTA_WORKS_NFS=yes,samba_cv_SYSQUOTA_WORKS_NFS=no) 5081 CPPFLAGS="$SAVE_CPPFLAGS" 5082 ]) 5083 if test x"$samba_cv_SYSQUOTA_WORKS_NFS" = x"yes"; then 5084 if test x"$samba_cv_WE_USE_SYS_QUOTAS" = x"yes"; then 5085 AC_DEFINE(HAVE_NFS_QUOTAS,1,[Whether nfs quota support is available]) 5086 fi 5087 fi 5088 fi 5089 4998 5090 if test x"$samba_cv_SYSQUOTA_FOUND" != x"no" -a x"$samba_cv_found_xfs_header" = x"yes"; then 4999 5091 AC_CACHE_CHECK([whether the sys_quota interface works with XFS],samba_cv_SYSQUOTA_WORKS_XFS,[ … … 5326 5418 AC_MSG_RESULT([$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT]) 5327 5419 5420 5328 5421 ################################################# 5329 5422 # check for cluster extensions 5330 5423 5331 CTDB_CFLAGS="" 5332 AC_SUBST(CTDB_CFLAGS) 5424 AC_MSG_CHECKING(cluster support) 5425 AC_ARG_WITH(cluster-support, 5426 [AS_HELP_STRING([--with-cluster-support], [Enable cluster extensions (default=auto)])]) 5427 5428 if test x"$with_cluster_support" = x ; then 5429 with_cluster_support="auto" 5430 fi 5431 5432 AC_MSG_RESULT($with_cluster_support) 5433 5333 5434 AC_ARG_WITH(ctdb, 5334 5435 [AS_HELP_STRING([--with-ctdb=DIR], [Where to find ctdb sources])], … … 5342 5443 esac]) 5343 5444 5445 AC_ARG_ENABLE(old-ctdb, 5446 [AS_HELP_STRING([--enable-old-ctdb], 5447 [Enable build against (too) old ctdb version (default=no)])],, 5448 [enable_old_ctdb=no]) 5449 5450 5451 if test "$with_cluster_support" != "no" ; then 5452 5453 AC_MSG_NOTICE(checking whether cluster support is available) 5454 5455 have_cluster_support="yes" 5456 ctdb_broken="no" 5457 5344 5458 SAVED_CPPFLAGS="$CPPFLAGS" 5345 5459 CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS} $CTDB_CPPFLAGS" 5346 ctdb_broken="missing or broken headers"5347 5460 5348 5461 AC_CHECK_HEADERS(ctdb.h ctdb_private.h,,,[ … … 5358 5471 ]) 5359 5472 5360 AC_HAVE_DECL(CTDB_CONTROL_TRANS3_COMMIT,[ 5361 #include "confdefs.h" 5362 #define NO_CONFIG_H 5363 #include "replace.h" 5364 #include "system/wait.h" 5365 #include "system/network.h" 5366 #include <talloc.h> 5367 #include <tdb.h> 5368 #include <ctdb.h> 5369 #include <ctdb_private.h> 5370 ]) 5371 if test x"$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" = x"yes"; then 5372 ctdb_broken=no 5373 else 5374 ctdb_broken="ctdb transaction support missing or too old" 5375 fi 5376 5377 # in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client 5378 AC_CHECK_TYPE(struct ctdb_tcp_client,[ 5379 AC_DEFINE([ctdb_control_tcp],[ctdb_tcp_client],[ctdb ipv4 support]) 5380 ],,[ 5381 #include "confdefs.h" 5382 #define NO_CONFIG_H 5383 #include "replace.h" 5384 #include "system/wait.h" 5385 #include "system/network.h" 5386 #include <talloc.h> 5387 #include <tdb.h> 5388 #include <ctdb.h> 5389 #include <ctdb_private.h> 5390 ]) 5391 5392 AC_CHECK_TYPE(struct ctdb_control_tcp,[ 5393 AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP],[1],[ctdb ipv4 support]) 5394 ],[ 5395 ctdb_broken="missing struct ctdb_control_tcp" 5396 ],[ 5397 #include "confdefs.h" 5398 #define NO_CONFIG_H 5399 #include "replace.h" 5400 #include "system/wait.h" 5401 #include "system/network.h" 5402 #include <talloc.h> 5403 #include <tdb.h> 5404 #include <ctdb.h> 5405 #include <ctdb_private.h> 5406 ]) 5407 5408 AC_CHECK_TYPE(struct ctdb_control_tcp_addr,[ 5409 AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR],[1],[ctdb ipv6 support]) 5410 ],,[ 5411 #include "confdefs.h" 5412 #define NO_CONFIG_H 5413 #include "replace.h" 5414 #include "system/wait.h" 5415 #include "system/network.h" 5416 #include <talloc.h> 5417 #include <tdb.h> 5418 #include <ctdb.h> 5419 #include <ctdb_private.h> 5420 ]) 5473 if test "x$have_cluster_support" = "xyes" -a \ 5474 "x$ac_cv_header_ctdb_h" != "xyes" 5475 then 5476 have_cluster_support=no 5477 ctdb_broken="ctdb.h is required for cluster support" 5478 fi 5479 5480 if test "x$have_cluster_support" = "xyes" -a \ 5481 "x$ac_cv_header_ctdb_h" != "xyes" 5482 then 5483 have_cluster_support=no 5484 ctdb_broken="ctdb_private.h is required for cluster support" 5485 fi 5486 5487 5488 if test "x$have_cluster_support" = "xyes" ; then 5489 AC_HAVE_DECL(CTDB_CONTROL_TRANS3_COMMIT,[ 5490 #include "confdefs.h" 5491 #define NO_CONFIG_H 5492 #include "replace.h" 5493 #include "system/wait.h" 5494 #include "system/network.h" 5495 #include <talloc.h> 5496 #include <tdb.h> 5497 #include <ctdb.h> 5498 #include <ctdb_private.h> 5499 ]) 5500 if test x"$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" != x"yes"; then 5501 ctdb_broken="ctdb transaction support missing or too old" 5502 have_cluster_support=no 5503 fi 5504 fi 5505 5506 if test "x$have_cluster_support" = "xyes" ; then 5507 AC_HAVE_DECL(CTDB_CONTROL_SCHEDULE_FOR_DELETION,[ 5508 #include "confdefs.h" 5509 #define NO_CONFIG_H 5510 #include "replace.h" 5511 #include "system/wait.h" 5512 #include "system/network.h" 5513 #include <talloc.h> 5514 #include <tdb.h> 5515 #include <ctdb.h> 5516 #include <ctdb_private.h> 5517 ]) 5518 if test x"$ac_cv_have_CTDB_CONTROL_SCHEDULE_FOR_DELETION_decl" != x"yes" 5519 then 5520 if test "x$enable_old_ctdb" = "xyes" ; then 5521 AC_MSG_WARN([ignoring missing SCHEDULE_FOR_DELETION (--enable-old-ctdb)]) 5522 else 5523 ctdb_broken="support for SCHEDULE_FOR_DELETION control missing" 5524 have_cluster_support=no 5525 fi 5526 fi 5527 fi 5528 5529 if test "x$have_cluster_support" = "xyes" ; then 5530 # In ctdb 1.0.57, ctdb_control_tcp was temporarily renamed 5531 # to ctdb_tcp_client. 5532 AC_CHECK_TYPE(struct ctdb_tcp_client,[ 5533 AC_DEFINE([ctdb_control_tcp],[ctdb_tcp_client],[ctdb ipv4 support]) 5534 ],,[ 5535 #include "confdefs.h" 5536 #define NO_CONFIG_H 5537 #include "replace.h" 5538 #include "system/wait.h" 5539 #include "system/network.h" 5540 #include <talloc.h> 5541 #include <tdb.h> 5542 #include <ctdb.h> 5543 #include <ctdb_private.h> 5544 ]) 5545 fi 5546 5547 if test "x$have_cluster_support" = "xyes" ; then 5548 AC_CHECK_TYPE(struct ctdb_control_tcp,[ 5549 AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP],[1],[ctdb ipv4 support]) 5550 ],[ 5551 ctdb_broken="missing struct ctdb_control_tcp" 5552 have_cluster_support=no 5553 ],[ 5554 #include "confdefs.h" 5555 #define NO_CONFIG_H 5556 #include "replace.h" 5557 #include "system/wait.h" 5558 #include "system/network.h" 5559 #include <talloc.h> 5560 #include <tdb.h> 5561 #include <ctdb.h> 5562 #include <ctdb_private.h> 5563 ]) 5564 fi 5565 5566 # test for optional ipv6 support in ctdb: 5567 if test "x$have_cluster_support" = "xyes" ; then 5568 AC_CHECK_TYPE(struct ctdb_control_tcp_addr,[ 5569 AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR],[1],[ctdb ipv6 support]) 5570 ],,[ 5571 #include "confdefs.h" 5572 #define NO_CONFIG_H 5573 #include "replace.h" 5574 #include "system/wait.h" 5575 #include "system/network.h" 5576 #include <talloc.h> 5577 #include <tdb.h> 5578 #include <ctdb.h> 5579 #include <ctdb_private.h> 5580 ]) 5581 fi 5582 5421 5583 CPPFLAGS="$SAVED_CPPFLAGS" 5422 5584 5423 AC_MSG_CHECKING(cluster support) 5424 AC_ARG_WITH(cluster-support, 5425 [AS_HELP_STRING([--with-cluster-support], [Enable cluster extensions (default=auto)])]) 5426 5427 if test x"$with_cluster_support" = x ; then 5428 with_cluster_support="auto" 5429 fi 5430 5431 if test x"$ac_cv_header_ctdb_private_h" != x"yes"; then 5432 if test "x$with_cluster_support" = "xyes"; then 5433 AC_MSG_ERROR("ctdb_private.h is required for cluster support") 5434 fi 5435 with_cluster_support=no 5436 fi 5437 5438 if test x"$ctdb_broken" != x"no"; then 5439 if test "x$with_cluster_support" = "xyes"; then 5440 AC_MSG_ERROR(["cluster support: $ctdb_broken"]) 5441 fi 5585 fi # (if test "$with_cluster_support" != "no") 5586 5587 if test x"$have_cluster_support" = "xno" ; then 5588 case "$with_cluster_support" in 5589 yes) 5590 AC_MSG_ERROR(["cluster support not available: $ctdb_broken"]) 5591 ;; 5592 auto) 5593 AC_MSG_WARN(["cluster support not available: $ctdb_broken"]) 5594 ;; 5595 esac 5442 5596 with_cluster_support=no 5443 5597 fi … … 5446 5600 AC_DEFINE(CLUSTER_SUPPORT,1,[Whether to enable cluster extensions]) 5447 5601 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${CTDB_CPPFLAGS}" 5448 AC_MSG_ RESULT(yes)5602 AC_MSG_NOTICE(Building with cluster support) 5449 5603 else 5450 AC_MSG_RESULT(no) 5451 fi 5604 AC_MSG_NOTICE(Building without cluster support) 5605 fi 5606 5607 5608 ################################################# 5609 # check for rtnetlink 5610 5611 AC_CHECK_HEADERS([linux/netlink.h], 5612 AC_CHECK_HEADERS([linux/rtnetlink.h],[],[], 5613 [#include <bits/sockaddr.h> 5614 #include <linux/netlink.h>]), 5615 [],[#include <bits/sockaddr.h>]) 5452 5616 5453 5617 ################################################# … … 5564 5728 fi # with_acl_support 5565 5729 5566 5730 ################################################# 5731 # check if we have FreeBSD sunacl 5732 case "$host_os" in 5733 *freebsd*) 5734 AC_CHECK_HEADER(sunacl.h) 5735 if test x"$ac_cv_header_sunacl_h" = xyes ; then 5736 AC_DEFINE(HAVE_FREEBSD_SUNACL_H,1,[Whether we have FreeBSD sunacl around]) 5737 ZFSACL_LIBS=-lsunacl 5738 AC_SUBST(ZFSACL_LIBS) 5739 default_shared_modules="$default_shared_modules vfs_zfsacl" 5740 fi 5741 ;; 5742 esac 5567 5743 5568 5744 ################################################# … … 5579 5755 *) 5580 5756 AIO_LIBS=$LIBS 5757 no_rt_LIBS=$LIBS 5581 5758 AC_CHECK_LIB(rt,aio_read,[AIO_LIBS="$LIBS -lrt"]) 5759 LIBS=$no_rt_LIBS 5582 5760 AC_CHECK_LIB(aio,aio_read,[AIO_LIBS="$LIBS -laio"]) 5583 5761 AC_CACHE_CHECK([for asynchronous io support],samba_cv_HAVE_AIO,[ … … 6095 6273 6096 6274 case "$host_os" in 6097 *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu | *os2*)6275 *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu) 6098 6276 NSSSONAMEVERSIONSUFFIX=".2" 6099 6277 WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_linux.o" … … 6204 6382 LIBWBCLIENT_STATIC_TARGET=bin/libwbclient.a 6205 6383 LIBWBCLIENT_SOVER=0 6384 LIBWBCLIENT_FULLVER=0 6206 6385 if test $BLDSHARED = true -a x"$HAVE_WINBIND" = x"yes" -a x"$BUILD_LIBWBCLIENT_SHARED" = x"yes"; then 6207 6386 NSS_MODULES="${WINBIND_NSS} ${WINBIND_WINS_NSS}" … … 6230 6409 UNINSTALL_PAM_MODULES="uninstallpammodules" 6231 6410 fi 6411 6412 # we use winbind, check for krb5 locate_plugin support: 6413 AC_CHECK_HEADERS([krb5/locate_plugin.h], [], [], 6414 [[#ifdef HAVE_KRB5_H 6415 #include <krb5.h> 6416 #endif 6417 ]]) 6418 if test x"$ac_cv_header_krb5_locate_plugin_h" = x"yes"; then 6419 WINBIND_KRB5_LOCATOR="bin/winbind_krb5_locator.$SHLIBEXT" 6420 if test x"$BLDSHARED" = x"true" ; then 6421 EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WINBIND_KRB5_LOCATOR" 6422 fi 6423 fi 6424 # end of krb5 locate_plugin check 6232 6425 else 6233 6426 AC_MSG_RESULT(no$winbind_no_reason) … … 6275 6468 if test x"$samba_cv_HAVE_PEERCRED" = x"yes"; then 6276 6469 AC_DEFINE(HAVE_PEERCRED,1,[Whether we can use SO_PEERCRED to get socket credentials]) 6470 fi 6471 6472 AC_CACHE_CHECK([for getpeereid],samba_cv_HAVE_GETPEEREID,[ 6473 AC_TRY_LINK([#include <sys/types.h> 6474 #include <unistd.h>], 6475 [uid_t uid; gid_t gid; int ret; 6476 ret = getpeereid(0, &uid, &gid); 6477 ], 6478 samba_cv_HAVE_GETPEEREID=yes,samba_cv_HAVE_GETPEEREID=no)]) 6479 if test x"$samba_cv_HAVE_GETPEEREID" = xyes; then 6480 AC_DEFINE(HAVE_GETPEEREID,1, 6481 [Whether we have getpeereid to get socket credentials]) 6277 6482 fi 6278 6483 … … 6454 6659 6455 6660 if test x"$enable_pthreadpool" = xyes -a x"$samba_cv_HAVE_PTHREAD" != x"yes"; then 6456 AC_MSG_ERROR([pthreadpool support cannot be enabled when pthread support was found])6661 AC_MSG_ERROR([pthreadpool support cannot be enabled when pthread support was not found]) 6457 6662 fi 6458 6663 … … 6461 6666 CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 6462 6667 AC_DEFINE(WITH_PTHREADPOOL, 1, [Whether to include pthreadpool helpers]) 6463 AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool.o") 6668 AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool/pthreadpool.o") 6669 PTHREADPOOLTEST="bin/pthreadpooltest\$(EXEEXT)" 6670 AC_SUBST(PTHREADPOOLTEST) 6464 6671 fi 6465 6672 … … 6489 6696 BUILD_INIPARSER='$(INIPARSER_OBJ)' 6490 6697 INIPARSERLIBS="" 6491 FLAGS1="$FLAGS1 -I\$(srcdir)/ iniparser/src"6698 FLAGS1="$FLAGS1 -I\$(srcdir)/../lib/iniparser/src" 6492 6699 else 6493 6700 AC_MSG_RESULT(no) … … 6499 6706 AC_SUBST(FLAGS1) 6500 6707 6501 6708 ################################################### 6709 # Check for different/missing (set|get|end)netgrent prototypes 6710 CFLAGS_SAVE=$CFLAGS 6711 if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then 6712 CFLAGS="$CFLAGS -Werror-implicit-function-declaration" 6713 fi 6714 AC_CACHE_CHECK([for setnetgrent prototype],samba_cv_setnetgrent_prototype, [ 6715 AC_TRY_COMPILE([#include<netdb.h> 6716 #ifdef HAVE_NETGROUP_H 6717 #include<netgroup.h> 6718 #endif],[setnetgrent("foo")], 6719 samba_cv_setnetgrent_prototype=yes, samba_cv_setnetgrent_prototype=no)]) 6720 if test x"$samba_cv_setnetgrent_prototype" = x"yes"; then 6721 AC_DEFINE(HAVE_SETNETGRENT_PROTOTYPE, 1, [If setnetgrent prototype is defined]) 6722 fi 6723 AC_CACHE_CHECK([for getnetgrent prototype],samba_cv_getnetgrent_prototype, [ 6724 AC_TRY_COMPILE([#include<netdb.h> 6725 #ifdef HAVE_NETGROUP_H 6726 #include<netgroup.h> 6727 #endif],[char *dom, *user,*host; getnetgrent(&dom,&user,&host)], 6728 samba_cv_getnetgrent_prototype=yes, samba_cv_getnetgrent_prototype=no)]) 6729 if test x"$samba_cv_getnetgrent_prototype" = x"yes"; then 6730 AC_DEFINE(HAVE_GETNETGRENT_PROTOTYPE, 1, [If getnetgrent prototype is defined]) 6731 fi 6732 AC_CACHE_CHECK([for endnetgrent prototype],samba_cv_endnetgrent_prototype, [ 6733 AC_TRY_COMPILE([#include<netdb.h> 6734 #ifdef HAVE_NETGROUP_H 6735 #include<netgroup.h> 6736 #endif],[endnetgrent()], 6737 samba_cv_endnetgrent_prototype=yes, samba_cv_endnetgrent_prototype=no)]) 6738 if test x"$samba_cv_endnetgrent_prototype" = x"yes"; then 6739 AC_DEFINE(HAVE_ENDNETGRENT_PROTOTYPE, 1, [If endnetgrent prototype is defined]) 6740 fi 6741 6742 CFLAGS=$CFLAGS_SAVE 6502 6743 6503 6744 # Checks for the vfs_fileid module … … 6580 6821 fi 6581 6822 6582 SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o passdb/pdb_nds.o, "bin/ldapsam.$SHLIBEXT", PDB, 6823 SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o passdb/pdb_nds.o passdb/pdb_ipa.o, 6824 "bin/ldapsam.$SHLIBEXT", PDB, 6583 6825 [ PASSDB_LIBS="$PASSDB_LIBS $LDAP_LIBS" ] ) 6584 6826 SMB_MODULE(pdb_ads, passdb/pdb_ads.o \$(TLDAP_OBJ), "bin/ads.$SHLIBEXT", PDB) … … 6588 6830 SMB_SUBSYSTEM(PDB,passdb/pdb_interface.o) 6589 6831 6590 6591 SMB_MODULE(rpc_lsarpc, \$(RPC_LSA_OBJ), "bin/librpc_lsarpc.$SHLIBEXT", RPC)6592 SMB_MODULE(rpc_winreg, \$(RPC_REG_OBJ), "bin/librpc_winreg.$SHLIBEXT", RPC)6593 SMB_MODULE(rpc_initshutdown, \$(RPC_INITSHUTDOWN_OBJ), "bin/librpc_initshutdown.$SHLIBEXT", RPC)6594 SMB_MODULE(rpc_dssetup, \$(RPC_DSSETUP_OBJ), "bin/librpc_dssetup.$SHLIBEXT", RPC)6595 SMB_MODULE(rpc_wkssvc, \$(RPC_WKS_OBJ), "bin/librpc_wkssvc.$SHLIBEXT", RPC)6596 SMB_MODULE(rpc_svcctl, \$(RPC_SVCCTL_OBJ), "bin/librpc_svcctl.$SHLIBEXT", RPC)6597 SMB_MODULE(rpc_ntsvcs, \$(RPC_NTSVCS_OBJ), "bin/librpc_ntsvcs.$SHLIBEXT", RPC)6598 SMB_MODULE(rpc_netlogon, \$(RPC_NETLOG_OBJ), "bin/librpc_NETLOGON.$SHLIBEXT", RPC)6599 SMB_MODULE(rpc_netdfs, \$(RPC_DFS_OBJ), "bin/librpc_netdfs.$SHLIBEXT", RPC)6600 SMB_MODULE(rpc_srvsvc, \$(RPC_SVC_OBJ), "bin/librpc_svcsvc.$SHLIBEXT", RPC)6601 SMB_MODULE(rpc_spoolss, \$(RPC_SPOOLSS_OBJ), "bin/librpc_spoolss.$SHLIBEXT", RPC)6602 SMB_MODULE(rpc_eventlog, \$(RPC_EVENTLOG_OBJ), "bin/librpc_eventlog.$SHLIBEXT", RPC)6603 SMB_MODULE(rpc_samr, \$(RPC_SAMR_OBJ), "bin/librpc_samr.$SHLIBEXT", RPC)6604 SMB_MODULE(rpc_rpcecho, \$(RPC_ECHO_OBJ), "bin/librpc_rpcecho.$SHLIBEXT", RPC)6605 SMB_SUBSYSTEM(RPC,smbd/server.o)6606 6607 6832 SMB_MODULE(idmap_ldap, winbindd/idmap_ldap.o, "bin/ldap.$SHLIBEXT", IDMAP) 6608 6833 SMB_MODULE(idmap_tdb, winbindd/idmap_tdb.o, "bin/tdb.$SHLIBEXT", IDMAP) … … 6611 6836 SMB_MODULE(idmap_nss, winbindd/idmap_nss.o, "bin/nss.$SHLIBEXT", IDMAP) 6612 6837 SMB_MODULE(idmap_rid, winbindd/idmap_rid.o, "bin/rid.$SHLIBEXT", IDMAP) 6838 SMB_MODULE(idmap_autorid, winbindd/idmap_autorid.o, "bin/autorid.$SHLIBEXT", IDMAP) 6613 6839 SMB_MODULE(idmap_ad, winbindd/idmap_ad.o, "bin/ad.$SHLIBEXT", IDMAP) 6614 6840 SMB_MODULE(idmap_hash, \$(IDMAP_HASH_OBJ), "bin/hash.$SHLIBEXT", IDMAP) … … 6665 6891 SMB_MODULE(vfs_commit, \$(VFS_COMMIT_OBJ), "bin/commit.$SHLIBEXT", VFS) 6666 6892 SMB_MODULE(vfs_gpfs, \$(VFS_GPFS_OBJ), "bin/gpfs.$SHLIBEXT", VFS) 6893 SMB_MODULE(vfs_gpfs_hsm_notify, \$(VFS_GPFS_PREFETCH_OBJ), "bin/gpfs_hsm_notify.$SHLIBEXT", VFS) 6667 6894 SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), "bin/readahead.$SHLIBEXT", VFS) 6668 6895 SMB_MODULE(vfs_tsmsm, \$(VFS_TSMSM_OBJ), "bin/tsmsm.$SHLIBEXT", VFS) … … 6680 6907 SMB_MODULE(vfs_dirsort, \$(VFS_DIRSORT_OBJ), "bin/dirsort.$SHLIBEXT", VFS) 6681 6908 SMB_MODULE(vfs_scannedonly, \$(VFS_SCANNEDONLY_OBJ), "bin/scannedonly.$SHLIBEXT", VFS) 6909 SMB_MODULE(vfs_crossrename, \$(VFS_CROSSRENAME_OBJ), "bin/crossrename.$SHLIBEXT", VFS) 6910 SMB_MODULE(vfs_linux_xfs_sgid, \$(VFS_LINUX_XFS_SGID_OBJ), "bin/linux_xfs_sgid.$SHLIBEXT", VFS) 6911 SMB_MODULE(vfs_time_audit, \$(VFS_TIME_AUDIT_OBJ), "bin/time_audit.$SHLIBEXT", VFS) 6682 6912 6683 6913 SMB_SUBSYSTEM(VFS,smbd/vfs.o) … … 6784 7014 fi 6785 7015 6786 AC_ARG_ENABLE(merged-build,6787 [AS_HELP_STRING([--enable-merged-build], [Build Samba 4 as well])],6788 [ enable_merged_build=$enableval ], [ enable_merged_build=auto ])6789 6790 if test x"$enable_merged_build" = x"yes" -a \6791 x"$merged_build_possible" = x"no" ; then6792 AC_MSG_ERROR(Merged build required but not possible)6793 fi6794 6795 7016 m4_include(../lib/zlib/zlib.m4) 6796 7017 6797 if test x$enable_merged_build = xauto; then 6798 # Check for python 6799 m4_include(../m4/check_python.m4) 6800 AC_SAMBA_PYTHON_DEVEL([true], [merged_build_possible=no]) 6801 6802 AC_MSG_CHECKING([whether it would be possible to do a merged build]) 6803 AC_MSG_RESULT([$merged_build_possible]) 6804 6805 # Enable merged build automatically if possible, when in developer mode 6806 # Don't enable merged build automatically in 3.4.0. 6807 #if test "x$developer" = xyes; then 6808 # enable_merged_build=$merged_build_possible 6809 #fi 6810 fi 6811 6812 if test x$enable_merged_build = xyes; then 6813 MERGED_BUILD=1 7018 if test x$smbtorture4_possible = xyes; then 6814 7019 saved_USESHARED="$USESHARED" 6815 7020 USESHARED="false" 6816 m4_include(samba4.m4) 7021 smbtorture4_path="bin/smbtorture4" 7022 smbtorture4_option="-t bin/smbtorture4" 7023 AC_SUBST(smbtorture4_path) 7024 AC_SUBST(smbtorture4_option) 6817 7025 USESHARED="$saved_USESHARED" 7026 SMBTORTURE4="bin/smbtorture4" 7027 AC_SUBST(SMBTORTURE4) 6818 7028 fi 6819 7029 … … 6889 7099 6890 7100 CFLAGS="${CFLAGS} \$(FLAGS)" 6891 6892 if test x$MERGED_BUILD != x1; then 6893 CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3" 6894 else 6895 if test x"$BLDSHARED" = x"true" ; then 6896 LDFLAGS="$LDFLAGS -L./bin" 6897 fi 6898 fi 6899 6900 AC_SUBST(MAKEFILE) 6901 if test x$samba_cv_gnu_make = xyes; then 6902 MAKEFILE=Makefile 6903 else 6904 # When we don't have GNU Make, generate a copy of Makefile.in 6905 # that doesn't have the "include " statements but just includes 6906 # the files verbatim. 6907 MAKEFILE=Makefile-noincludes 6908 $PERL ./script/expand-includes.pl Makefile.in > $MAKEFILE.in 6909 fi 6910 AC_OUTPUT($MAKEFILE 7101 CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3" 7102 7103 # If we had to expand the includes, make tsure the output file is moved back 7104 AC_OUTPUT_COMMANDS([ 7105 if test -f Makefile-noincludes -a ! -f Makefile -a ! -h Makefile ; then 7106 ln -s Makefile-noincludes Makefile 7107 fi 7108 ]) 7109 7110 AC_OUTPUT(Makefile 6911 7111 script/findsmb smbadduser script/gen-8bit-gap.sh script/installbin.sh script/uninstallbin.sh 6912 7112 lib/netapi/examples/Makefile … … 6918 7118 ../examples/libsmbclient/Makefile.internal 6919 7119 ) 6920 dnl If we had to expand the includes, make tsure the output file is moved back6921 AC_OUTPUT_COMMANDS([6922 if test x$MAKEFILE != Makefile; then6923 mv $MAKEFILE Makefile6924 fi6925 ])6926 7120 6927 7121 #################################################
Note:
See TracChangeset
for help on using the changeset viewer.