From 9972de845a9b45abd0a92ca8fe2eac9e487fdcaf Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 14 Sep 2001 15:31:35 +0000 Subject: [PATCH] autoconf fixes to replace HAVE_TDBPWD with HAVE_TDBSAM --- source/configure | 105 ++++++++++++++++++++++---------------------- source/configure.in | 5 +-- source/include/config.h.in | 2 +- source/passdb/pdb_tdb.c | 4 +- source/passdb/smbpassfile.c | 2 +- 5 files changed, 58 insertions(+), 60 deletions(-) diff --git a/source/configure b/source/configure index 959ade7fd63..aca9c1a977e 100755 --- a/source/configure +++ b/source/configure @@ -1047,7 +1047,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in gawk mawk nawk awk +for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -11334,17 +11334,16 @@ fi # check for a TDB password database echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6 echo "configure:11337: checking whether to use TDB password database" >&5 -# Check whether --with-tdbpwd or --without-tdbpwd was given. -if test "${with_tdbpwd+set}" = set; then - withval="$with_tdbpwd" +# Check whether --with-tdbsam or --without-tdbsam was given. +if test "${with_tdbsam+set}" = set; then + withval="$with_tdbsam" case "$withval" in yes) echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF -#define WITH_TDBPWD 1 +#define WITH_TDBSAM 1 EOF - { echo "configure: error: TDB password database not supported in this version." 1>&2; exit 1; } ;; *) echo "$ac_t""no" 1>&6 @@ -11359,7 +11358,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6 -echo "configure:11363: checking whether to use LDAP password database" >&5 +echo "configure:11362: checking whether to use LDAP password database" >&5 # Check whether --with-ldap or --without-ldap was given. if test "${with_ldap+set}" = set; then withval="$with_ldap" @@ -11403,7 +11402,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:11407: checking whether to use NISPLUS_HOME" >&5 +echo "configure:11406: checking whether to use NISPLUS_HOME" >&5 # Check whether --with-nisplus-home or --without-nisplus-home was given. if test "${with_nisplus_home+set}" = set; then withval="$with_nisplus_home" @@ -11428,7 +11427,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:11432: checking whether to use SSL" >&5 +echo "configure:11431: checking whether to use SSL" >&5 # Check whether --with-ssl or --without-ssl was given. if test "${with_ssl+set}" = set; then withval="$with_ssl" @@ -11487,7 +11486,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:11491: checking whether to use syslog logging" >&5 +echo "configure:11490: checking whether to use syslog logging" >&5 # Check whether --with-syslog or --without-syslog was given. if test "${with_syslog+set}" = set; then withval="$with_syslog" @@ -11512,7 +11511,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:11516: checking whether to use profiling" >&5 +echo "configure:11515: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -11540,7 +11539,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:11544: checking whether to support disk-quotas" >&5 +echo "configure:11543: checking whether to support disk-quotas" >&5 # Check whether --with-quotas or --without-quotas was given. if test "${with_quotas+set}" = set; then withval="$with_quotas" @@ -11564,7 +11563,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:11568: checking whether to support utmp accounting" >&5 +echo "configure:11567: checking whether to support utmp accounting" >&5 # Check whether --with-utmp or --without-utmp was given. if test "${with_utmp+set}" = set; then withval="$with_utmp" @@ -11590,7 +11589,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:11594: checking whether to support Microsoft Dfs" >&5 +echo "configure:11593: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -11616,7 +11615,7 @@ fi # check for Samba VFS support echo $ac_n "checking whether to support the experimantal Samba vfs""... $ac_c" 1>&6 -echo "configure:11620: checking whether to support the experimantal Samba vfs" >&5 +echo "configure:11619: checking whether to support the experimantal Samba vfs" >&5 # Check whether --with-vfs or --without-vfs was given. if test "${with_vfs+set}" = set; then withval="$with_vfs" @@ -11641,14 +11640,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:11645: checking how to get filesystem space usage" >&5 +echo "configure:11644: checking how to get filesystem space usage" >&5 space=no # Test for statvfs64. if test $space = no; then # SVR4 echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6 -echo "configure:11652: checking statvfs64 function (SVR4)" >&5 +echo "configure:11651: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11656,7 +11655,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statvfs64=yes else @@ -11703,12 +11702,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:11707: checking statvfs function (SVR4)" >&5 +echo "configure:11706: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11716,7 +11715,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:11720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* fu_cv_sys_stat_statvfs=yes else @@ -11741,7 +11740,7 @@ fi if test $space = no; then # DEC Alpha running OSF/1 echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 -echo "configure:11745: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:11744: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11749,7 +11748,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -11762,7 +11761,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:11766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs3_osf1=yes else @@ -11789,7 +11788,7 @@ fi if test $space = no; then # AIX echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 -echo "configure:11793: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:11792: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11797,7 +11796,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_bsize=yes else @@ -11843,7 +11842,7 @@ fi if test $space = no; then # SVR3 echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 -echo "configure:11847: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:11846: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11851,7 +11850,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -11861,7 +11860,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:11865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs4=yes else @@ -11888,7 +11887,7 @@ fi if test $space = no; then # 4.4BSD and NetBSD echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 -echo "configure:11892: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:11891: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11896,7 +11895,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -11912,7 +11911,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:11916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_fsize=yes else @@ -11939,7 +11938,7 @@ fi if test $space = no; then # Ultrix echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 -echo "configure:11943: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:11942: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11947,7 +11946,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -11967,7 +11966,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:11971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_fs_data=yes else @@ -12000,9 +11999,9 @@ fi # file support. # echo $ac_n "checking checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12004: checking checking if large file support can be enabled" >&5 +echo "configure:12003: checking checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12082,7 +12081,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12086: checking whether to support ACLs" >&5 +echo "configure:12085: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12128,7 +12127,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12132: checking for acl_get_file in -lacl" >&5 +echo "configure:12131: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12136,7 +12135,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12175,13 +12174,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12179: checking for ACL support" >&5 +echo "configure:12178: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12189,7 +12188,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12209,13 +12208,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12213: checking for acl_get_perm_np" >&5 +echo "configure:12212: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12223,7 +12222,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12278,7 +12277,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12282: checking whether to build winbind" >&5 +echo "configure:12281: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -12357,11 +12356,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else diff --git a/source/configure.in b/source/configure.in index 3e3f0cf5fc4..bf53df120cb 100644 --- a/source/configure.in +++ b/source/configure.in @@ -1746,13 +1746,12 @@ fi ################################################# # check for a TDB password database AC_MSG_CHECKING(whether to use TDB password database) -AC_ARG_WITH(tdbpwd, +AC_ARG_WITH(tdbsam, [ --with-tdbsam Include TDB password database (default=no)], [ case "$withval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_TDBPWD) - AC_MSG_ERROR([TDB password database not supported in this version.]) + AC_DEFINE(WITH_TDBSAM) ;; *) AC_MSG_RESULT(no) diff --git a/source/include/config.h.in b/source/include/config.h.in index 24a89c1ff35..435ed0abfe0 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -124,7 +124,7 @@ #undef WITH_SSL #undef WITH_LDAP #undef WITH_NISPLUS -#undef WITH_TDBPWD +#undef WITH_TDBSAM #undef WITH_PAM #undef WITH_PAM_SMBPASS #undef WITH_NISPLUS_HOME diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c index c7969170269..f885f385aa3 100644 --- a/source/passdb/pdb_tdb.c +++ b/source/passdb/pdb_tdb.c @@ -21,7 +21,7 @@ #include "includes.h" -#ifdef WITH_TDBPWD +#ifdef WITH_TDBSAM #define PASSDB_FILE_NAME "/passdb.tdb" #define TDB_FORMAT_STRING "BBBBBBBBBBBBBBBBBBddBBwdwdBdd" @@ -812,4 +812,4 @@ BOOL pdb_add_sam_account (SAM_ACCOUNT *newpwd) #else /* Do *NOT* make this function static. It breaks the compile on gcc. JRA */ void samtdb_dummy_function(void) { } /* stop some compilers complaining */ -#endif /* WITH_TDBPWD */ +#endif /* WITH_TDBSAM */ diff --git a/source/passdb/smbpassfile.c b/source/passdb/smbpassfile.c index 99bb307fe17..089e16ddea2 100644 --- a/source/passdb/smbpassfile.c +++ b/source/passdb/smbpassfile.c @@ -84,7 +84,7 @@ static void get_trust_account_file_name( char *domain, char *name, char *mac_fil { unsigned int mac_file_len; char *p; -#ifdef WITH_TDBPWD +#ifdef WITH_TDBSAM pstrcpy(mac_file, lp_tdb_passwd_file()); #else pstrcpy(mac_file, lp_smb_passwd_file()); -- 2.11.4.GIT