diff options
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 177 |
1 files changed, 109 insertions, 68 deletions
diff --git a/source3/configure.in b/source3/configure.in index e298ec658c..36c89efe2b 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -72,7 +72,6 @@ AC_SUBST(LIBWBCLIENT_SHARED_TARGET) AC_SUBST(LIBWBCLIENT_SHARED) AC_SUBST(LIBWBCLIENT_STATIC_TARGET) AC_SUBST(LIBWBCLIENT_STATIC) -AC_SUBST(LIBWBCLIENT_TARGET) AC_SUBST(LIBWBCLIENT_SOVER) AC_SUBST(LIBWBCLIENT) AC_SUBST(LIBWBCLIENT_LIBS) @@ -381,10 +380,60 @@ AC_SUBST(DYNEXP) dnl Add modules that have to be built by default here dnl These have to be built static: -default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template" +default_static_modules="" +default_static_modules="$default_static_modules pdb_smbpasswd" +default_static_modules="$default_static_modules pdb_tdbsam" +default_static_modules="$default_static_modules pdb_wbc_sam" +default_static_modules="$default_static_modules rpc_lsarpc" +default_static_modules="$default_static_modules rpc_samr" +default_static_modules="$default_static_modules rpc_winreg" +default_static_modules="$default_static_modules rpc_initshutdown" +default_static_modules="$default_static_modules rpc_dssetup" +default_static_modules="$default_static_modules rpc_wkssvc" +default_static_modules="$default_static_modules rpc_svcctl" +default_static_modules="$default_static_modules rpc_ntsvcs" +default_static_modules="$default_static_modules rpc_netlogon" +default_static_modules="$default_static_modules rpc_netdfs" +default_static_modules="$default_static_modules rpc_srvsvc" +default_static_modules="$default_static_modules rpc_spoolss" +default_static_modules="$default_static_modules rpc_eventlog" +default_static_modules="$default_static_modules auth_sam" +default_static_modules="$default_static_modules auth_unix" +default_static_modules="$default_static_modules auth_winbind" +default_static_modules="$default_static_modules auth_wbc" +default_static_modules="$default_static_modules auth_server" +default_static_modules="$default_static_modules auth_domain" +default_static_modules="$default_static_modules auth_builtin" +default_static_modules="$default_static_modules auth_netlogond" +default_static_modules="$default_static_modules vfs_default" +default_static_modules="$default_static_modules nss_info_template" dnl These are preferably build shared, and static if dlopen() is not available -default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen vfs_catia" +default_shared_modules="" +default_shared_modules="$default_shared_modules vfs_recycle" +default_shared_modules="$default_shared_modules vfs_audit" +default_shared_modules="$default_shared_modules vfs_extd_audit" +default_shared_modules="$default_shared_modules vfs_full_audit" +default_shared_modules="$default_shared_modules vfs_netatalk" +default_shared_modules="$default_shared_modules vfs_fake_perms" +default_shared_modules="$default_shared_modules vfs_default_quota" +default_shared_modules="$default_shared_modules vfs_readonly" +default_shared_modules="$default_shared_modules vfs_cap" +default_shared_modules="$default_shared_modules vfs_expand_msdfs" +default_shared_modules="$default_shared_modules vfs_shadow_copy" +default_shared_modules="$default_shared_modules vfs_shadow_copy2" +default_shared_modules="$default_shared_modules charset_CP850" +default_shared_modules="$default_shared_modules charset_CP437" +default_shared_modules="$default_shared_modules auth_script" +default_shared_modules="$default_shared_modules vfs_readahead" +default_shared_modules="$default_shared_modules vfs_xattr_tdb" +default_shared_modules="$default_shared_modules vfs_streams_xattr" +default_shared_modules="$default_shared_modules vfs_streams_depot" +default_shared_modules="$default_shared_modules vfs_acl_xattr" +default_shared_modules="$default_shared_modules vfs_acl_tdb" +default_shared_modules="$default_shared_modules vfs_smb_traffic_analyzer" +default_shared_modules="$default_shared_modules vfs_preopen" +default_shared_modules="$default_shared_modules vfs_catia" if test "x$developer" = xyes; then default_static_modules="$default_static_modules rpc_rpcecho pdb_ads" @@ -743,7 +792,7 @@ if test x$enable_cups != xno; then ac_save_PRINT_LIBS=$PRINT_LIBS CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`" LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`" - PRINT_LIBS="-lcups" + PRINT_LIBS="$PRINT_LIBS -lcups" AC_CHECK_HEADERS(cups/cups.h cups/language.h) if test x"$ac_cv_header_cups_cups_h" = xyes -a \ x"$ac_cv_header_cups_language_h" = xyes; then @@ -1706,6 +1755,23 @@ fi AC_MSG_RESULT($BLDSHARED) +if test x"${ac_cv_prog_gnu_ld}" = x"yes"; then + saved_ldflags="$LDFLAGS" + AC_MSG_CHECKING([if --as-needed works]) + LDFLAGS="--as-needed $saved_ldflags" + AC_TRY_LINK([],[], + [AC_MSG_RESULT([yes]) + LD_AS_NEEDED_FLAG=--as-needed], + AC_MSG_RESULT([no])) + AC_MSG_CHECKING([if -Wl,--as-needed works]) + LDFLAGS="-Wl,--as-needed $saved_ldflags" + AC_TRY_LINK([],[], + [AC_MSG_RESULT([yes]) + LD_AS_NEEDED_FLAG=-Wl,--as-needed], + AC_MSG_RESULT([no])) + LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags" +fi + AC_MSG_CHECKING([LDFLAGS]) AC_MSG_RESULT([$LDFLAGS]) AC_MSG_CHECKING([DYNEXP]) @@ -3368,6 +3434,10 @@ if test x"$with_ads_support" != x"no"; then AC_CHECK_FUNC_EXT(krb5_fwd_tgt_creds, $KRB5_LIBS) AC_CHECK_FUNC_EXT(krb5_auth_con_set_req_cksumtype, $KRB5_LIBS) + # MIT krb5 1.7beta3 (in Ubuntu Karmic) does not have this declaration + # but does have the symbol + AC_CHECK_DECLS(krb5_auth_con_set_req_cksumtype, [], [], [#include <krb5.h>]) + LIBS="$KRB5_LIBS $LIBS" AC_CACHE_CHECK(whether krb5_ticket contains kvno and enctype, @@ -4201,31 +4271,45 @@ fi # try_pam != no PAM_MODULES="" INSTALL_PAM_MODULES="" UNINSTALL_PAM_MODULES="" + +try_pam_smbpass=auto AC_MSG_CHECKING(whether to use pam_smbpass) AC_ARG_WITH(pam_smbpass, -[AS_HELP_STRING([--with-pam_smbpass], [Build PAM module for authenticating against passdb backends (default=no)])], +[AS_HELP_STRING([--with-pam_smbpass], [Build PAM module for authenticating against passdb backends (default=auto)])], [ case "$withval" in - yes) - AC_MSG_RESULT(yes) + yes|no|auto) + try_pam_smbpass=$withval + ;; + *) + AC_MSG_ERROR([valid options are yes,no,auto]) + ;; + esac +]) - # Conditions under which pam_smbpass should not be built. +if test x"${try_pam_smbpass}" = xno ; then + use_pam_smbpass=no +else + use_pam_smbpass=yes + # Conditions under which pam_smbpass can't be built. + if test x"$BLDSHARED" != xtrue ; then + if test x"${try_pam_smbpass}" = xyes ; then + AC_MSG_ERROR([No support for shared modules]) + fi + use_pam_smbpass=no + elif test x"$create_pam_modules" != xyes ; then + if test x"${try_pam_smbpass}" = xyes ; then + AC_MSG_ERROR([No support for PAM MODULES]) + fi + use_pam_smbpass=no + fi - if test x"$BLDSHARED" != x"true"; then - AC_MSG_ERROR([No support for shared modules]) - elif test x"$create_pam_modules" != x"yes"; then - AC_MSG_ERROR([No support for PAM MODULES]) - else - PAM_MODULES="pam_smbpass" - INSTALL_PAM_MODULES="installpammodules" - UNINSTALL_PAM_MODULES="uninstallpammodules" - fi - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) + if test x"${use_pam_smbpass}" = xyes ; then + PAM_MODULES="pam_smbpass" + INSTALL_PAM_MODULES="installpammodules" + UNINSTALL_PAM_MODULES="uninstallpammodules" + fi +fi +AC_MSG_RESULT([$use_pam_smbpass]) ## @@ -4740,7 +4824,7 @@ AC_ARG_ENABLE(external_libtalloc, [AS_HELP_STRING([--enable-external-libtalloc], if test "x$enable_external_libtalloc" != xno then - PKG_CHECK_MODULES(LIBTALLOC, talloc >= 2.0.0, + PKG_CHECK_MODULES(LIBTALLOC, talloc >= 2.0.1, [ enable_external_libtalloc=yes ], [ if test x$enable_external_libtalloc = xyes; then AC_MSG_ERROR([Unable to find libtalloc]) @@ -4809,47 +4893,6 @@ then AC_SUBST(TDBTORTURE) fi - -AC_ARG_ENABLE(external_liblua, - [AS_HELP_STRING([--enable-external-liblua], - [Enable external lua [default=auto]])], - [ enable_external_liblua=$enableval ], - [ enable_external_liblua=auto ]) - -if test "x$enable_external_liblua" != xno -then - PKG_CHECK_MODULES(LIBLUA, lua5.1 >= 5.1.4, - [ enable_external_liblua=yes ], - [ - if test x$enable_external_liblua = xyes; then - AC_MSG_ERROR([Unable to find liblua]) - else - enable_external_liblua=no - fi - ]) -fi - -AC_SUBST(LIBLUA_OBJ0) -if test "x$enable_external_liblua" = xno -then - LINK_LIBLUA=STATIC - SMB_LIBRARY(lua, 0) - LIBLUA_OBJ0="lua-5.1.4/src/lapi.o lua-5.1.4/src/lauxlib.o \ - lua-5.1.4/src/lbaselib.o lua-5.1.4/src/lcode.o \ - lua-5.1.4/src/ldblib.o lua-5.1.4/src/ldebug.o lua-5.1.4/src/ldo.o \ - lua-5.1.4/src/ldump.o lua-5.1.4/src/lfunc.o lua-5.1.4/src/lgc.o \ - lua-5.1.4/src/linit.o lua-5.1.4/src/liolib.o lua-5.1.4/src/llex.o \ - lua-5.1.4/src/lmathlib.o lua-5.1.4/src/lmem.o \ - lua-5.1.4/src/loadlib.o lua-5.1.4/src/lobject.o \ - lua-5.1.4/src/lopcodes.o lua-5.1.4/src/loslib.o \ - lua-5.1.4/src/lparser.o lua-5.1.4/src/lstate.o \ - lua-5.1.4/src/lstring.o lua-5.1.4/src/lstrlib.o \ - lua-5.1.4/src/ltable.o lua-5.1.4/src/ltablib.o lua-5.1.4/src/ltm.o \ - lua-5.1.4/src/lundump.o lua-5.1.4/src/lvm.o \ - lua-5.1.4/src/lzio.o lua-5.1.4/src/print.o" - AC_SUBST(LIBLUA_OBJ0) -fi - SMB_LIBRARY(netapi, 0) SMB_LIBRARY(smbclient, 0) SMB_LIBRARY(smbsharemodes, 0) @@ -5987,14 +6030,12 @@ else ## Only worry about libwbclient if we have shared # library support LIBWBCLIENT_SHARED=$LIBWBCLIENT_SHARED_TARGET - LIBWBCLIENT_TARGET=$LIBWBCLIENT_SHARED_TARGET LIBWBCLIENT=libwbclient INSTALL_LIBWBCLIENT=installlibwbclient UNINSTALL_LIBWBCLIENT=uninstalllibwbclient LIBWBCLIENT_LIBS="-lwbclient" else LIBWBCLIENT_STATIC=$LIBWBCLIENT_STATIC_TARGET - LIBWBCLIENT_TARGET=$LIBWBCLIENT_STATIC_TARGET LIBWBCLIENT_LIBS=$LIBWBCLIENT_STATIC_TARGET fi fi |