From f7832e935f99ade0c764e063bb06e5ca36dd0bee Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 4 Oct 2002 20:14:41 +0000 Subject: Remove useless spaces - this broke make proto (This used to be commit 0341fb45829c5d13a7e02daaa9b960fdff492323) --- source3/lib/getsmbpass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/lib/getsmbpass.c b/source3/lib/getsmbpass.c index 0874529d32..c271d55404 100644 --- a/source3/lib/getsmbpass.c +++ b/source3/lib/getsmbpass.c @@ -83,7 +83,7 @@ static int tcsetattr(int fd, int flags, struct sgttyb *t) static struct termios t; #endif /* SYSV_TERMIO */ -char *getsmbpass(char *prompt) +char *getsmbpass(char *prompt) { FILE *in, *out; int echo_off; -- cgit From d2eae2a2999de61ddb494780f2477f7f7569b804 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 4 Oct 2002 21:39:09 +0000 Subject: merge native_mode flag in winbindd_domain struct from app-head (This used to be commit dd948a302ad6bd4307ecdfb10510e12185150eae) --- source3/nsswitch/winbindd.h | 1 + source3/nsswitch/winbindd_cm.c | 54 +++++++++++++++++++++++++++++++++++++--- source3/nsswitch/winbindd_util.c | 11 +++++++- source3/rpc_client/cli_pipe.c | 42 ++++++++----------------------- 4 files changed, 72 insertions(+), 36 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd.h b/source3/nsswitch/winbindd.h index dd92ecefe6..4ca59ff1cc 100644 --- a/source3/nsswitch/winbindd.h +++ b/source3/nsswitch/winbindd.h @@ -90,6 +90,7 @@ struct winbindd_domain { fstring name; /* Domain name */ fstring alt_name; /* alt Domain name (if any) */ DOM_SID sid; /* SID for this domain */ + BOOL native_mode; /* is this a win2k domain in native mode ? */ /* Lookup methods for this domain (LDAP or RPC) */ diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 313b9da1bb..91ab5b209d 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -384,7 +384,7 @@ static void add_failed_connection_entry(struct winbindd_cm_conn *new_conn, /* Open a connction to the remote server, cache failures for 30 seconds */ -static NTSTATUS cm_open_connection(const char *domain,const char *pipe_name, +static NTSTATUS cm_open_connection(const char *domain, const iont pipe_index, struct winbindd_cm_conn *new_conn) { struct failed_connection_cache *fcc; @@ -396,7 +396,7 @@ static NTSTATUS cm_open_connection(const char *domain,const char *pipe_name, ZERO_STRUCT(dc_ip); fstrcpy(new_conn->domain, domain); - fstrcpy(new_conn->pipe_name, pipe_name); + fstrcpy(new_conn->pipe_name, get_pipe_name_from_index(pipe_index)); /* Look for a domain controller for this domain. Negative results are cached so don't bother applying the caching for this @@ -460,7 +460,7 @@ static NTSTATUS cm_open_connection(const char *domain,const char *pipe_name, return result; } - if (!cli_nt_session_open (new_conn->cli, get_pipe_index(pipe_name))) { + if ( !cli_nt_session_open (new_conn->cli, pipe_index) ) { result = NT_STATUS_PIPE_NOT_AVAILABLE; add_failed_connection_entry(new_conn, result); cli_shutdown(new_conn->cli); @@ -533,7 +533,7 @@ static NTSTATUS get_connection_from_cache(const char *domain, const char *pipe_n ZERO_STRUCTP(conn); - if (!NT_STATUS_IS_OK(result = cm_open_connection(domain, pipe_name, conn))) { + if (!NT_STATUS_IS_OK(result = cm_open_connection(domain, get_pipe_index(pipe_name), conn))) { DEBUG(3, ("Could not open a connection to %s for %s (%s)\n", domain, pipe_name, nt_errstr(result))); SAFE_FREE(conn); @@ -546,6 +546,52 @@ static NTSTATUS get_connection_from_cache(const char *domain, const char *pipe_n return NT_STATUS_OK; } + +/********************************************************************************** +**********************************************************************************/ + +BOOL cm_check_for_native_mode_win2k( const char *domain ) +{ + NTSTATUS result; + struct winbindd_cm_conn conn; + DS_DOMINFO_CTR ctr; + BOOL ret = False; + + ZERO_STRUCT( conn ); + ZERO_STRUCT( ctr ); + + + if ( !NT_STATUS_IS_OK(result = cm_open_connection(domain, PI_LSARPC_DS, &conn)) ) + { + DEBUG(3, ("cm_check_for_native_mode_win2k: Could not open a connection to %s for PIPE_LSARPC (%s)\n", + domain, nt_errstr(result))); + return False; + } + + if ( conn.cli ) { + if ( !NT_STATUS_IS_OK(cli_ds_getprimarydominfo( conn.cli, + conn.cli->mem_ctx, DsRolePrimaryDomainInfoBasic, &ctr)) ) + { + ret = False; + goto done; + } + } + + if ( (ctr.basic->flags & DSROLE_PRIMARY_DS_RUNNING) + && !(ctr.basic->flags & DSROLE_PRIMARY_DS_MIXED_MODE) ) + { + ret = True; + } + +done: + if ( conn.cli ) + cli_shutdown( conn.cli ); + + return ret; +} + + + /* Return a LSA policy handle on a domain */ CLI_POLICY_HND *cm_get_lsa_handle(char *domain) diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 2016c27881..005b1609b6 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -73,6 +73,7 @@ void free_domain_list(void) } } + /* Add a trusted domain to our list of domains */ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const char *alt_name, struct winbindd_methods *methods, @@ -116,12 +117,20 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const } } - domain->methods = methods; + domain->methods = methods; domain->sequence_number = DOM_SEQUENCE_NONE; domain->last_seq_check = 0; if (sid) { sid_copy(&domain->sid, sid); } + + /* see if this is a native mode win2k domain, but only for our own domain */ + + if ( strequal( lp_workgroup(), domain_name) ) { + domain->native_mode = cm_check_for_native_mode_win2k( domain_name ); + DEBUG(5,("add_trusted_domain: %s is a %s mode domain\n", domain_name, + domain->native_mode ? "native" : "mixed" )); + } /* Link to domain list */ DLIST_ADD(_domain_list, domain); diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 2732c53e5c..7e1289edff 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -952,65 +952,45 @@ static BOOL rpc_pipe_set_hnd_state(struct cli_state *cli, const char *pipe_name, return state_set; } -#if 0 /* JERRY */ - /**************************************************************************** check the rpc bind acknowledge response ****************************************************************************/ -static BOOL valid_pipe_name(const char *pipe_name, RPC_IFACE *abstract, RPC_IFACE *transfer) +int get_pipe_index( const char *pipe_name ) { int pipe_idx = 0; while (pipe_names[pipe_idx].client_pipe != NULL) { - if (strequal(pipe_name, pipe_names[pipe_idx].client_pipe )) { - DEBUG(5,("Bind Abstract Syntax: ")); - dump_data(5, (char*)&(pipe_names[pipe_idx].abstr_syntax), - sizeof(pipe_names[pipe_idx].abstr_syntax)); - DEBUG(5,("Bind Transfer Syntax: ")); - dump_data(5, (char*)&(pipe_names[pipe_idx].trans_syntax), - sizeof(pipe_names[pipe_idx].trans_syntax)); - - /* copy the required syntaxes out so we can do the right bind */ - *transfer = pipe_names[pipe_idx].trans_syntax; - *abstract = pipe_names[pipe_idx].abstr_syntax; - - return True; - } + if (strequal(pipe_name, pipe_names[pipe_idx].client_pipe )) + return pipe_idx; pipe_idx++; }; - DEBUG(5,("Bind RPC Pipe[%s] unsupported\n", pipe_name)); - return False; + return -1; } -#endif /**************************************************************************** check the rpc bind acknowledge response ****************************************************************************/ -int get_pipe_index( const char *pipe_name ) +char* get_pipe_name_from_index( const int pipe_index ) { - int pipe_idx = 0; - while (pipe_names[pipe_idx].client_pipe != NULL) { - if (strequal(pipe_name, pipe_names[pipe_idx].client_pipe )) - return pipe_idx; - pipe_idx++; - }; + if ( (pipe_index < 0) || (pipe_index >= PI_MAX_PIPES) ) + return NULL; - return -1; + return pipe_names[pipe_index].client_pipe; } /**************************************************************************** check the rpc bind acknowledge response ****************************************************************************/ -static BOOL valid_pipe_name_by_idx(const int pipe_idx, RPC_IFACE *abstract, RPC_IFACE *transfer) +static BOOL valid_pipe_name(const int pipe_idx, RPC_IFACE *abstract, RPC_IFACE *transfer) { if ( pipe_idx >= PI_MAX_PIPES ) { - DEBUG(0,("valid_pipe_name_by_idx: Programmer error! Invalid pipe index [%d]\n", + DEBUG(0,("valid_pipe_name: Programmer error! Invalid pipe index [%d]\n", pipe_idx)); return False; } @@ -1178,7 +1158,7 @@ BOOL rpc_pipe_bind(struct cli_state *cli, const int pipe_idx, char *my_name) DEBUG(5,("Bind RPC Pipe[%x]: %s\n", cli->nt_pipe_fnum, pipe_names[pipe_idx].client_pipe)); - if (!valid_pipe_name_by_idx(pipe_idx, &abstract, &transfer)) + if (!valid_pipe_name(pipe_idx, &abstract, &transfer)) return False; prs_init(&rpc_out, 0, cli->mem_ctx, MARSHALL); -- cgit From fac6a13fd3cee8f3f4f7f8e3a2dbb700181c67c3 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 4 Oct 2002 21:46:27 +0000 Subject: fix typo (This used to be commit 38a956c79bbdb5e1eedfcb1cf3ad4f7c906d0cf7) --- source3/nsswitch/winbindd_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 91ab5b209d..def73edde6 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -384,7 +384,7 @@ static void add_failed_connection_entry(struct winbindd_cm_conn *new_conn, /* Open a connction to the remote server, cache failures for 30 seconds */ -static NTSTATUS cm_open_connection(const char *domain, const iont pipe_index, +static NTSTATUS cm_open_connection(const char *domain, const int pipe_index, struct winbindd_cm_conn *new_conn) { struct failed_connection_cache *fcc; -- cgit From 9c94d1a2f72b6fcbbd056804837fc8719806491b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 4 Oct 2002 22:53:30 +0000 Subject: Add a timeout to tdb_lock_bystring(). Ensure we never have more than MAX_PRINT_JOBS in a queue. Jeremy. (This used to be commit bb58a08af459b4abae9d53ab98c15f40638ce52b) --- source3/groupdb/mapping.c | 2 +- source3/include/local.h | 3 ++ source3/include/printing.h | 2 +- source3/lib/account_pol.c | 2 +- source3/param/loadparm.c | 14 ++++++++- source3/passdb/secrets.c | 60 +++++++------------------------------- source3/printing/nt_printing.c | 4 +-- source3/printing/printing.c | 14 ++++----- source3/rpc_server/srv_srvsvc_nt.c | 2 +- source3/tdb/tdb.c | 4 +++ source3/tdb/tdb.h | 2 +- source3/tdb/tdbutil.c | 49 +++++++++++++++++++++++++++---- 12 files changed, 89 insertions(+), 69 deletions(-) (limited to 'source3') diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index 5641431246..0f05316949 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -223,7 +223,7 @@ static BOOL init_group_mapping(void) local_pid = sys_getpid(); /* handle a Samba upgrade */ - tdb_lock_bystring(tdb, vstring); + tdb_lock_bystring(tdb, vstring, 0); /* Cope with byte-reversed older versions of the db. */ vers_id = tdb_fetch_int32(tdb, vstring); diff --git a/source3/include/local.h b/source3/include/local.h index 5096e13fc3..2be9c1e101 100644 --- a/source3/include/local.h +++ b/source3/include/local.h @@ -210,4 +210,7 @@ /* this enables the "rabbit pellet" fix for SMBwritebraw */ #define RABBIT_PELLET_FIX 1 +/* Max number of jobs per print queue. */ +#define PRINT_MAX_JOBID 10000 + #endif diff --git a/source3/include/printing.h b/source3/include/printing.h index 9774a6acd9..38ff7eac36 100644 --- a/source3/include/printing.h +++ b/source3/include/printing.h @@ -65,7 +65,7 @@ extern struct printif generic_printif; extern struct printif cups_printif; #endif /* HAVE_CUPS */ -#define PRINT_MAX_JOBID 10000 +/* PRINT_MAX_JOBID is now defined in local.h */ #define UNIX_JOB_START PRINT_MAX_JOBID #define NEXT_JOBID(j) ((j+1) % PRINT_MAX_JOBID > 0 ? (j+1) % PRINT_MAX_JOBID : 1) diff --git a/source3/lib/account_pol.c b/source3/lib/account_pol.c index b5f205c508..6f51c916d7 100644 --- a/source3/lib/account_pol.c +++ b/source3/lib/account_pol.c @@ -45,7 +45,7 @@ BOOL init_account_policy(void) local_pid = sys_getpid(); /* handle a Samba upgrade */ - tdb_lock_bystring(tdb, vstring); + tdb_lock_bystring(tdb, vstring,0); if (!tdb_fetch_uint32(tdb, vstring, &version) || version != DATABASE_VERSION) { tdb_traverse(tdb, tdb_traverse_delete_fn, NULL); tdb_store_uint32(tdb, vstring, DATABASE_VERSION); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 18cba172c0..ba0866883f 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1798,7 +1798,6 @@ FN_LOCAL_INTEGER(lp_force_dir_security_mode, iDir_Security_force_mode) FN_LOCAL_INTEGER(lp_max_connections, iMaxConnections) FN_LOCAL_INTEGER(lp_defaultcase, iDefaultCase) FN_LOCAL_INTEGER(lp_minprintspace, iMinPrintSpace) -FN_LOCAL_INTEGER(lp_maxprintjobs, iMaxPrintJobs) FN_LOCAL_INTEGER(lp_printing, iPrinting) FN_LOCAL_INTEGER(lp_oplock_contention_limit, iOplockContentionLimit) FN_LOCAL_INTEGER(lp_csc_policy, iCSCPolicy) @@ -4070,3 +4069,16 @@ const char *get_called_name(void) return local_machine; } + +/******************************************************************* + Return the max print jobs per queue. +********************************************************************/ + +int lp_maxprintjobs(int snum) +{ + int maxjobs = LP_SNUM_OK(snum) ? ServicePtrs[snum]->iMaxPrintJobs : sDefault.iMaxPrintJobs; + if (maxjobs <= 0 || maxjobs >= PRINT_MAX_JOBID) + maxjobs = PRINT_MAX_JOBID - 1; + + return maxjobs; +} diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 4b2c76d8b0..ad56fcedd1 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -215,7 +215,7 @@ BOOL secrets_lock_trust_account_password(char *domain, BOOL dolock) return False; if (dolock) - return (tdb_lock_bystring(tdb, trust_keystr(domain)) == 0); + return (tdb_lock_bystring(tdb, trust_keystr(domain),0) == 0); else tdb_unlock_bystring(tdb, trust_keystr(domain)); return True; @@ -579,69 +579,31 @@ NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, int max_num return status; } -static SIG_ATOMIC_T gotalarm; +/******************************************************************************* + Lock the secrets tdb based on a string - this is used as a primitive form of mutex + between smbd instances. +*******************************************************************************/ -/*************************************************************** - Signal function to tell us we timed out. -****************************************************************/ - -static void gotalarm_sig(void) -{ - gotalarm = 1; -} - -/* - lock the secrets tdb based on a string - this is used as a primitive form of mutex - between smbd instances. -*/ BOOL secrets_named_mutex(const char *name, unsigned int timeout) { - TDB_DATA key; int ret; if (!message_init()) return False; - key.dptr = (char *)name; - key.dsize = strlen(name)+1; - - /* Allow tdb_chainlock to be interrupted by an alarm. */ - gotalarm = 0; - tdb_set_lock_alarm(&gotalarm); - - if (timeout) { - CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig); - alarm(timeout); - } - - ret = tdb_chainlock(tdb, key); - - /* Prevent tdb_chainlock from being interrupted by an alarm. */ - tdb_set_lock_alarm(NULL); - - if (timeout) { - alarm(0); - CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN); - if (gotalarm) - return False; - } - + ret = tdb_lock_bystring(tdb, name, timeout); if (ret == 0) DEBUG(10,("secrets_named_mutex: got mutex for %s\n", name )); return (ret == 0); } -/* - unlock a named mutex -*/ +/******************************************************************************* + Unlock a named mutex. +*******************************************************************************/ + void secrets_named_mutex_release(char *name) { - TDB_DATA key; - - key.dptr = name; - key.dsize = strlen(name)+1; - - tdb_chainunlock(tdb, key); + tdb_unlock_bystring(tdb, name); DEBUG(10,("secrets_named_mutex: released mutex for %s\n", name )); } diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 58eba9d87e..fcb493a614 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -287,7 +287,7 @@ BOOL nt_printing_init(void) local_pid = sys_getpid(); /* handle a Samba upgrade */ - tdb_lock_bystring(tdb_drivers, vstring); + tdb_lock_bystring(tdb_drivers, vstring, 0); { int32 vers_id; @@ -362,7 +362,7 @@ uint32 update_c_setprinter(BOOL initialize) int32 c_setprinter; int32 printer_count = 0; - tdb_lock_bystring(tdb_printers, GLOBAL_C_SETPRINTER); + tdb_lock_bystring(tdb_printers, GLOBAL_C_SETPRINTER, 0); /* Traverse the tdb, counting the printers */ tdb_traverse(tdb_printers, traverse_counting_printers, (void *)&printer_count); diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 6474c92c69..91851a37f8 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -257,7 +257,7 @@ BOOL print_backend_init(void) pdb = get_print_db_byname(lp_const_servicename(snum)); if (!pdb) continue; - if (tdb_lock_bystring(pdb->tdb, sversion) == -1) { + if (tdb_lock_bystring(pdb->tdb, sversion, 0) == -1) { DEBUG(0,("print_backend_init: Failed to open printer %s database\n", lp_const_servicename(snum) )); return False; } @@ -883,7 +883,8 @@ static void print_queue_update(int snum) /* Lock the queue for the database update */ slprintf(keystr, sizeof(keystr) - 1, "LOCK/%s", printer_name); - if (tdb_lock_bystring(pdb->tdb, keystr) == -1) { + /* Only wait 10 seconds for this. */ + if (tdb_lock_bystring(pdb->tdb, keystr, 10) == -1) { DEBUG(0,("print_queue_update: Failed to lock printer %s database\n", printer_name)); release_print_db(pdb); return; @@ -1380,9 +1381,8 @@ static int get_queue_status(int snum, print_status_struct *status) data = tdb_fetch(pdb->tdb, key); release_print_db(pdb); if (data.dptr) { - if (data.dsize == sizeof(print_status_struct)) { + if (data.dsize == sizeof(print_status_struct)) memcpy(status, data.dptr, sizeof(print_status_struct)); - } SAFE_FREE(data.dptr); } return status->qcount; @@ -1465,7 +1465,7 @@ uint32 print_job_start(struct current_user *user, int snum, char *jobname, NT_DE } /* Insure the maximum queue size is not violated */ - if (lp_maxprintjobs(snum) && (njobs = print_queue_length(snum,NULL)) > lp_maxprintjobs(snum)) { + if ((njobs = print_queue_length(snum,NULL)) > lp_maxprintjobs(snum)) { DEBUG(3, ("print_job_start: number of jobs (%d) larger than max printjobs per queue (%d).\n", njobs, lp_maxprintjobs(snum) )); release_print_db(pdb); @@ -1473,8 +1473,8 @@ uint32 print_job_start(struct current_user *user, int snum, char *jobname, NT_DE return (uint32)-1; } - /* Lock the database */ - if (tdb_lock_bystring(pdb->tdb, "INFO/nextjob") == -1) { + /* Lock the database - only wait 20 seconds. */ + if (tdb_lock_bystring(pdb->tdb, "INFO/nextjob", 20) == -1) { DEBUG(0,("print_job_start: failed to lock printing database %s\n", printername )); release_print_db(pdb); return (uint32)-1; diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 69945b50b8..ecde51df9f 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -145,7 +145,7 @@ BOOL share_info_db_init(void) local_pid = sys_getpid(); /* handle a Samba upgrade */ - tdb_lock_bystring(share_tdb, vstring); + tdb_lock_bystring(share_tdb, vstring, 0); /* Cope with byte-reversed older versions of the db. */ vers_id = tdb_fetch_int32(share_tdb, vstring); diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index 4143ac7781..c57d23cb6f 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -208,6 +208,10 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset, TDB_LOG((tdb, 5,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d\n", tdb->fd, offset, rw_type, lck_type)); } + /* Was it an alarm timeout ? */ + if (errno == EINTR && palarm_fired && *palarm_fired) + return TDB_ERRCODE(TDB_ERR_LOCK_TIMEOUT, -1); + /* Otherwise - generic lock error. */ /* errno set by fcntl */ return TDB_ERRCODE(TDB_ERR_LOCK, -1); } diff --git a/source3/tdb/tdb.h b/source3/tdb/tdb.h index 42b88aeb16..dda89d0355 100644 --- a/source3/tdb/tdb.h +++ b/source3/tdb/tdb.h @@ -44,7 +44,7 @@ extern "C" { /* error codes */ enum TDB_ERROR {TDB_SUCCESS=0, TDB_ERR_CORRUPT, TDB_ERR_IO, TDB_ERR_LOCK, - TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOEXIST, TDB_ERR_NOLOCK }; + TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOEXIST, TDB_ERR_NOLOCK, TDB_ERR_LOCK_TIMEOUT }; #ifndef u32 #define u32 unsigned diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c index 1a3a8bb9a5..e7650033b8 100644 --- a/source3/tdb/tdbutil.c +++ b/source3/tdb/tdbutil.c @@ -24,18 +24,57 @@ /* these are little tdb utility functions that are meant to make dealing with a tdb database a little less cumbersome in Samba */ +static SIG_ATOMIC_T gotalarm; + +/*************************************************************** + Signal function to tell us we timed out. +****************************************************************/ + +static void gotalarm_sig(void) +{ + gotalarm = 1; +} + +/**************************************************************************** + Lock a chain with timeout (in seconds). +****************************************************************************/ + +int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key, unsigned int timeout) +{ + /* Allow tdb_chainlock to be interrupted by an alarm. */ + int ret; + gotalarm = 0; + tdb_set_lock_alarm(&gotalarm); + + if (timeout) { + CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig); + alarm(timeout); + } + + ret = tdb_chainlock(tdb, key); + + if (timeout) { + alarm(0); + CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN); + if (gotalarm) + return -1; + } + + return ret; +} + /**************************************************************************** - Lock a chain by string. + Lock a chain by string. Return -1 if timeout or lock failed. ****************************************************************************/ -int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval) +int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout) { TDB_DATA key; key.dptr = keyval; key.dsize = strlen(keyval)+1; - return tdb_chainlock(tdb, key); + return tdb_chainlock_with_timeout(tdb, key, timeout); } /**************************************************************************** @@ -230,7 +269,7 @@ int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int int32 val; int32 ret = -1; - if (tdb_lock_bystring(tdb, keystr) == -1) + if (tdb_lock_bystring(tdb, keystr,0) == -1) return -1; if ((val = tdb_fetch_int32(tdb, keystr)) == -1) { @@ -271,7 +310,7 @@ BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, ui uint32 val; BOOL ret = False; - if (tdb_lock_bystring(tdb, keystr) == -1) + if (tdb_lock_bystring(tdb, keystr,0) == -1) return False; if (!tdb_fetch_uint32(tdb, keystr, &val)) { -- cgit From f86f4a4b66f772538185cd7a7aac26c4d9135379 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 5 Oct 2002 00:41:16 +0000 Subject: Turn on sendfile detection by default in HEAD and 3.0. Jeremy. (This used to be commit 6a9d0c9bdd57c135c4565da829b2fa4f44874a6d) --- source3/configure | 85 ++++++++++++++++++++++++------------------------ source3/configure.in | 7 ++-- source3/param/loadparm.c | 8 ----- 3 files changed, 47 insertions(+), 53 deletions(-) (limited to 'source3') diff --git a/source3/configure b/source3/configure index 77ab11a928..9210221f99 100755 --- a/source3/configure +++ b/source3/configure @@ -87,7 +87,7 @@ ac_help="$ac_help ac_help="$ac_help --with-acl-support Include ACL support (default=no)" ac_help="$ac_help - --with-sendfile-support Check for sendfile support (default=no)" + --with-sendfile-support Check for sendfile support (default=yes)" ac_help="$ac_help --with-winbind Build winbind (default, if supported by OS)" ac_help="$ac_help @@ -13909,8 +13909,9 @@ fi ################################################# # check for sendfile support -echo $ac_n "checking whether to check for support sendfile""... $ac_c" 1>&6 -echo "configure:13914: checking whether to check for support sendfile" >&5 +with_sendfile_support=yes +echo $ac_n "checking whether to check to support sendfile""... $ac_c" 1>&6 +echo "configure:13915: checking whether to check to support sendfile" >&5 # Check whether --with-sendfile-support or --without-sendfile-support was given. if test "${with_sendfile_support+set}" = set; then withval="$with_sendfile_support" @@ -13922,13 +13923,13 @@ if test "${with_sendfile_support+set}" = set; then case "$host_os" in *linux*) echo $ac_n "checking for linux sendfile64 support""... $ac_c" 1>&6 -echo "configure:13926: checking for linux sendfile64 support" >&5 +echo "configure:13927: checking for linux sendfile64 support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -13940,7 +13941,7 @@ ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total); ; return 0; } EOF -if { (eval echo configure:13944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILE64=yes else @@ -13955,13 +13956,13 @@ fi echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6 echo $ac_n "checking for linux sendfile support""... $ac_c" 1>&6 -echo "configure:13959: checking for linux sendfile support" >&5 +echo "configure:13960: checking for linux sendfile support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -13973,7 +13974,7 @@ ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); ; return 0; } EOF -if { (eval echo configure:13977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILE=yes else @@ -13989,13 +13990,13 @@ echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6 # Try and cope with broken Linux sendfile.... echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6 -echo "configure:13993: checking for broken linux sendfile support" >&5 +echo "configure:13994: checking for broken linux sendfile support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes else @@ -14067,13 +14068,13 @@ EOF ;; *freebsd*) echo $ac_n "checking for freebsd sendfile support""... $ac_c" 1>&6 -echo "configure:14071: checking for freebsd sendfile support" >&5 +echo "configure:14072: checking for freebsd sendfile support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14095,7 +14096,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILE=yes else @@ -14129,13 +14130,13 @@ EOF *hpux*) echo $ac_n "checking for hpux sendfile64 support""... $ac_c" 1>&6 -echo "configure:14133: checking for hpux sendfile64 support" >&5 +echo "configure:14134: checking for hpux sendfile64 support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14155,7 +14156,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILE64=yes else @@ -14186,13 +14187,13 @@ EOF fi echo $ac_n "checking for hpux sendfile support""... $ac_c" 1>&6 -echo "configure:14190: checking for hpux sendfile support" >&5 +echo "configure:14191: checking for hpux sendfile support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14212,7 +14213,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILE=yes else @@ -14246,13 +14247,13 @@ EOF *solaris*) LIBS="$LIBS -lsendfile" echo $ac_n "checking for solaris sendfilev64 support""... $ac_c" 1>&6 -echo "configure:14250: checking for solaris sendfilev64 support" >&5 +echo "configure:14251: checking for solaris sendfilev64 support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14279,7 +14280,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILEV64=yes else @@ -14311,13 +14312,13 @@ EOF fi echo $ac_n "checking for solaris sendfilev support""... $ac_c" 1>&6 -echo "configure:14315: checking for solaris sendfilev support" >&5 +echo "configure:14316: checking for solaris sendfilev support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14344,7 +14345,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILEV=yes else @@ -14385,7 +14386,7 @@ EOF ;; esac else - echo "$ac_t""no" 1>&6 + echo "$ac_t""yes" 1>&6 fi @@ -14397,7 +14398,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:14401: checking whether to build winbind" >&5 +echo "configure:14402: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -14493,20 +14494,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6 -echo "configure:14497: checking whether struct passwd has pw_comment" >&5 +echo "configure:14498: checking whether struct passwd has pw_comment" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_comment; ; return 0; } EOF -if { (eval echo configure:14510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_comment=yes else @@ -14531,20 +14532,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6 -echo "configure:14535: checking whether struct passwd has pw_age" >&5 +echo "configure:14536: checking whether struct passwd has pw_age" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_age; ; return 0; } EOF -if { (eval echo configure:14548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_age=yes else @@ -14583,7 +14584,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:14587: checking for poptGetContext in -lpopt" >&5 +echo "configure:14588: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14591,7 +14592,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14607: \"$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 @@ -14626,7 +14627,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:14630: checking whether to use included popt" >&5 +echo "configure:14631: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""yes" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -14672,16 +14673,16 @@ fi # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:14676: checking configure summary" >&5 +echo "configure:14677: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 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:14686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else diff --git a/source3/configure.in b/source3/configure.in index 81898e6af7..bfbc09833d 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2737,9 +2737,10 @@ samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_cv_HAVE_ACL_GET_PERM_NP=no)]) ################################################# # check for sendfile support -AC_MSG_CHECKING(whether to check for support sendfile) +with_sendfile_support=yes +AC_MSG_CHECKING(whether to check to support sendfile) AC_ARG_WITH(sendfile-support, -[ --with-sendfile-support Check for sendfile support (default=no)], +[ --with-sendfile-support Check for sendfile support (default=yes)], [ case "$withval" in yes) @@ -2957,7 +2958,7 @@ samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)]) AC_MSG_RESULT(no) ;; esac ], - AC_MSG_RESULT(no) + AC_MSG_RESULT(yes) ) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index ba0866883f..a0c77a0421 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -389,9 +389,7 @@ typedef struct BOOL bUseClientDriver; BOOL bDefaultDevmode; BOOL bNTAclSupport; -#ifdef WITH_SENDFILE BOOL bUseSendfile; -#endif BOOL bProfileAcls; char dummy[3]; /* for alignment */ @@ -513,9 +511,7 @@ static service sDefault = { False, /* bUseClientDriver */ False, /* bDefaultDevmode */ True, /* bNTAclSupport */ -#ifdef WITH_SENDFILE False, /* bUseSendfile */ -#endif False, /* bProfileAcls */ "" /* dummy */ @@ -872,9 +868,7 @@ static struct parm_struct parm_table[] = { {"strict sync", P_BOOL, P_LOCAL, &sDefault.bStrictSync, NULL, NULL, FLAG_SHARE}, {"sync always", P_BOOL, P_LOCAL, &sDefault.bSyncAlways, NULL, NULL, FLAG_SHARE}, {"use mmap", P_BOOL, P_GLOBAL, &Globals.bUseMmap, NULL, NULL, FLAG_DEVELOPER}, -#ifdef WITH_SENDFILE {"use sendfile", P_BOOL, P_LOCAL, &sDefault.bUseSendfile, NULL, NULL, FLAG_SHARE}, -#endif {"hostname lookups", P_BOOL, P_GLOBAL, &Globals.bHostnameLookups, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, {"write cache size", P_INTEGER, P_LOCAL, &sDefault.iWriteCacheSize, NULL, NULL, FLAG_SHARE}, @@ -1783,9 +1777,7 @@ FN_LOCAL_BOOL(lp_inherit_acls, bInheritACLS) FN_LOCAL_BOOL(lp_use_client_driver, bUseClientDriver) FN_LOCAL_BOOL(lp_default_devmode, bDefaultDevmode) FN_LOCAL_BOOL(lp_nt_acl_support, bNTAclSupport) -#ifdef WITH_SENDFILE FN_LOCAL_BOOL(lp_use_sendfile, bUseSendfile) -#endif FN_LOCAL_BOOL(lp_profile_acls, bProfileAcls) FN_LOCAL_INTEGER(lp_create_mask, iCreate_mask) FN_LOCAL_INTEGER(lp_force_create_mode, iCreate_force_mode) -- cgit From 7ee8de012b38d517a3ebccd377b13fe79b9e4103 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 5 Oct 2002 05:43:44 +0000 Subject: Add more common options to popt_common - and start using the ones for debuglevel and configuration file in pdbedit (This used to be commit cb0d03a393d9009c3e16b9d05d88c171de9a9414) --- source3/include/smb.h | 1 + source3/lib/popt_common.c | 60 ++++++++++++++++++++++++++++++++++++++++++----- source3/utils/pdbedit.c | 26 ++++++-------------- 3 files changed, 62 insertions(+), 25 deletions(-) (limited to 'source3') diff --git a/source3/include/smb.h b/source3/include/smb.h index b5ab504415..7ce7599239 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1664,5 +1664,6 @@ typedef struct { /* Common popt structures */ extern struct poptOption popt_common_debug[]; +extern struct poptOption popt_common_configfile[]; #endif /* _SMB_H */ diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index bbc17cb704..1a63405b72 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -3,6 +3,7 @@ Common popt routines Copyright (C) Tim Potter 2001,2002 + Copyright (C) Jelmer Vernooij 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,29 +22,76 @@ #include "includes.h" -/* Handle -d,--debuglevel command line option */ +/* Handle command line options: + * -d,--debuglevel + * -s,--configfile + * -O,--socket-options + */ -static void debug_callback(poptContext con, +extern pstring user_socket_options; +extern BOOL AllowDebugChange; +extern pstring global_myname; + +static void popt_common_callback(poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, const void *data) { - extern BOOL AllowDebugChange; - switch(opt->val) { case 'd': if (arg) { debug_parse_levels(arg); AllowDebugChange = False; } + break; + case 'V': + printf( "Version %s\n", VERSION ); + exit(0); + break; + + case 'O': + pstrcpy(user_socket_options,arg); + break; + + case 's': + pstrcpy(dyn_CONFIGFILE, arg); + break; + + case 'n': + pstrcpy(global_myname,arg); + strupper(global_myname); break; } } struct poptOption popt_common_debug[] = { - { NULL, 0, POPT_ARG_CALLBACK, debug_callback }, - { "debuglevel", 'd', POPT_ARG_STRING, NULL, 'd', "Set debug level", + { NULL, 0, POPT_ARG_CALLBACK, popt_common_callback }, + { "debuglevel", 'd', POPT_ARG_STRING, dyn_CONFIGFILE, 'd', "Set debug level", "DEBUGLEVEL" }, { 0 } }; + +struct poptOption popt_common_configfile[] = { + { NULL, 0, POPT_ARG_CALLBACK, popt_common_callback }, + { "configfile", 's', POPT_ARG_STRING, NULL, 's', "Use alternative configuration file" }, + { 0 } +}; + +struct poptOption popt_common_socket_options[] = { + { NULL, 0, POPT_ARG_CALLBACK, popt_common_callback }, + {"socket-options", 'O', POPT_ARG_STRING, NULL, 'O', "socket options to use" }, + { 0 } +}; + +struct poptOption popt_common_version[] = { + { NULL, 0, POPT_ARG_CALLBACK, popt_common_callback }, + {"version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version" }, + { 0 } +}; + +struct poptOption popt_common_netbios_name[] = { + { NULL, 0, POPT_ARG_CALLBACK, popt_common_callback }, + {"netbiosname", 'n', POPT_ARG_STRING, NULL, 'n', "Primary netbios name"}, + { 0 } +}; diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 6942779556..9508e6db7c 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -23,8 +23,6 @@ #include "includes.h" -#define BIT_CONFIGFILE 0x00000001 -#define BIT_DEBUGLEVEL 0x00000002 #define BIT_BACKEND 0x00000004 #define BIT_VERBOSE 0x00000008 #define BIT_SPSTYLE 0x00000010 @@ -53,7 +51,6 @@ #define MASK_ALWAYS_GOOD 0x0000001F #define MASK_USER_GOOD 0x00001F00 extern pstring global_myname; -extern BOOL AllowDebugChange; /********************************************************* Add all currently available users to another db @@ -450,8 +447,6 @@ int main (int argc, char **argv) static char *backend_out = NULL; static char *logon_script = NULL; static char *profile_path = NULL; - static char *config_file = dyn_CONFIGFILE; - static char *new_debuglevel = NULL; static char *account_policy = NULL; static long int account_policy_value = 0; BOOL account_policy_value_set = False; @@ -468,8 +463,8 @@ int main (int argc, char **argv) {"user", 'u', POPT_ARG_STRING, &user_name, 0, "use username", "USER" }, {"fullname", 'f', POPT_ARG_STRING, &full_name, 0, "set full name", NULL}, {"homedir", 'h', POPT_ARG_STRING, &home_dir, 0, "set home directory", NULL}, - {"drive", 'd', POPT_ARG_STRING, &home_drive, 0, "set home drive", NULL}, - {"script", 's', POPT_ARG_STRING, &logon_script, 0, "set logon script", NULL}, + {"drive", 'D', POPT_ARG_STRING, &home_drive, 0, "set home drive", NULL}, + {"script", 'S', POPT_ARG_STRING, &logon_script, 0, "set logon script", NULL}, {"profile", 'p', POPT_ARG_STRING, &profile_path, 0, "set profile path", NULL}, {"create", 'a', POPT_ARG_NONE, &add_user, 0, "create user", NULL}, {"modify", 'r', POPT_ARG_NONE, &modify_user, 0, "modify user", NULL}, @@ -478,10 +473,10 @@ int main (int argc, char **argv) {"backend", 'b', POPT_ARG_STRING, &backend, 0, "use different passdb backend as default backend", NULL}, {"import", 'i', POPT_ARG_STRING, &backend_in, 0, "import user accounts from this backend", NULL}, {"export", 'e', POPT_ARG_STRING, &backend_out, 0, "export user accounts to this backend", NULL}, - {"debuglevel", 'D', POPT_ARG_STRING, &new_debuglevel, 0,"set debuglevel",NULL}, - {"configfile", 'c', POPT_ARG_STRING, &config_file, 0,"use different configuration file",NULL}, {"account-policy", 'P', POPT_ARG_STRING, &account_policy, 0,"value of an account policy (like maximum password age)",NULL}, {"value", 'V', POPT_ARG_LONG, &account_policy_value, 'V',"set the account policy to this value", NULL}, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug }, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile }, {0,0,0,0} }; @@ -498,13 +493,8 @@ int main (int argc, char **argv) } } - if (new_debuglevel) { - debug_parse_levels(new_debuglevel); - AllowDebugChange = False; - } - - if (!lp_load(config_file,True,False,False)) { - fprintf(stderr, "Can't load %s - run testparm to debug it\n", config_file); + if (!lp_load(dyn_CONFIGFILE,True,False,False)) { + fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE); exit(1); } @@ -519,9 +509,7 @@ int main (int argc, char **argv) strupper(global_myname); - setparms = (config_file ? BIT_CONFIGFILE : 0) + - (new_debuglevel ? BIT_DEBUGLEVEL : 0) + - (backend ? BIT_BACKEND : 0) + + setparms = (backend ? BIT_BACKEND : 0) + (verbose ? BIT_VERBOSE : 0) + (spstyle ? BIT_SPSTYLE : 0) + (full_name ? BIT_FULLNAME : 0) + -- cgit From 4506f260fb6e533174cffef38357b8338c43d717 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sat, 5 Oct 2002 06:50:43 +0000 Subject: Push Steve Langasek's fix ... (This used to be commit 0325b938f5b3d1c592da666b43c7b20dcc7ba5eb) --- source3/smbd/lanman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 8bfad4ab33..3b07eb3a9b 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -72,7 +72,7 @@ static int CopyExpanded(connection_struct *conn, StrnCpy(buf,src,sizeof(buf)/2); pstring_sub(buf,"%S",lp_servicename(snum)); standard_sub_conn(conn,buf,sizeof(buf)); - l = push_ascii(*dst,buf,*n-1, STR_TERMINATE); + l = push_ascii(*dst,buf,*n, STR_TERMINATE); (*dst) += l; (*n) -= l; return l; -- cgit From 11c0d03b5f84102402e59f3aa0c58f2f25015e8b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 5 Oct 2002 07:11:42 +0000 Subject: Use popt_common and use popt for showing help info (This used to be commit de9ea4ee6b3a939044d84f43ce14f10dd16341ce) --- source3/utils/status.c | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) (limited to 'source3') diff --git a/source3/utils/status.c b/source3/utils/status.c index d87497f2fa..7fd7c93615 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -35,8 +35,6 @@ #include "includes.h" -extern BOOL AllowDebugChange; - static pstring Ucrit_username = ""; /* added by OH */ static pid_t Ucrit_pid[100]; /* Ugly !!! */ /* added by OH */ static int Ucrit_MaxPid=0; /* added by OH */ @@ -542,30 +540,27 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo { int c; static int profile_only = 0; - static char *new_debuglevel = NULL; TDB_CONTEXT *tdb; poptContext pc; struct poptOption long_options[] = { - {"processes", 'p', POPT_ARG_NONE, &processes_only}, - {"verbose", 'v', POPT_ARG_NONE, &verbose}, - {"locks", 'L', POPT_ARG_NONE, &locks_only}, - {"shares", 'S', POPT_ARG_NONE, &shares_only}, - {"conf", 's', POPT_ARG_STRING, 0, 's'}, - {"user", 'u', POPT_ARG_STRING, 0, 'u'}, - {"brief", 'b', POPT_ARG_NONE, &brief}, + POPT_AUTOHELP + {"processes", 'p', POPT_ARG_NONE, &processes_only, 'p', "Show processes only" }, + {"verbose", 'v', POPT_ARG_NONE, &verbose, 'v', "Be verbose" }, + {"locks", 'L', POPT_ARG_NONE, &locks_only, 'L', "Show locks only" }, + {"shares", 'S', POPT_ARG_NONE, &shares_only, 'S', "Show shares only" }, + {"user", 'u', POPT_ARG_STRING, 0, 'u', "Switch to user" }, + {"brief", 'b', POPT_ARG_NONE, &brief, 'b', "Be brief" }, #ifdef WITH_PROFILE - {"profile", 'P', POPT_ARG_NONE, &profile_only}, + {"profile", 'P', POPT_ARG_NONE, &profile_only, 'P', "Do profiling" }, #endif /* WITH_PROFILE */ - {"byterange", 'B', POPT_ARG_NONE, &show_brl}, + {"byterange", 'B', POPT_ARG_NONE, &show_brl, 'B', "Include byte range locks"}, { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug }, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile }, { 0, 0, 0, 0} }; - setup_logging(argv[0],True); - AllowDebugChange = False; - DEBUGLEVEL = 0; dbf = x_stderr; if (getuid() != geteuid()) { @@ -578,30 +573,20 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo while ((c = poptGetNextOpt(pc)) != EOF) { switch (c) { - case 's': - pstrcpy(dyn_CONFIGFILE, poptGetOptArg(pc)); - break; case 'u': Ucrit_addUsername(poptGetOptArg(pc)); break; - default: - fprintf(stderr, "Usage: %s [-P] [-v] [-L] [-p] [-S] [-s configfile] [-u username] [-d debuglevel]\n", *argv); - return (-1); } } - - if (!lp_load(dyn_CONFIGFILE,False,False,False)) { - fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE); - return (-1); - } - - if (new_debuglevel) { - debug_parse_levels(new_debuglevel); - } if (verbose) { d_printf("using configfile = %s\n", dyn_CONFIGFILE); } + + if (!lp_load(dyn_CONFIGFILE,False,False,False)) { + fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE); + return (-1); + } if (profile_only) { return profile_dump(); -- cgit From 0040de451eedfb731c68f2de00cde1b0dc82fbbe Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 5 Oct 2002 13:20:06 +0000 Subject: missing prs_align()'s (This used to be commit f149a5a54722fe05c8e30cb217cc72cec6f34e18) --- source3/rpc_parse/parse_ds.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3') diff --git a/source3/rpc_parse/parse_ds.c b/source3/rpc_parse/parse_ds.c index ec5ea45cc8..3c70cabc71 100644 --- a/source3/rpc_parse/parse_ds.c +++ b/source3/rpc_parse/parse_ds.c @@ -50,10 +50,19 @@ static BOOL ds_io_dominfobasic( char *desc, prs_struct *ps, int depth, DSROLE_PR if ( !smb_io_unistr2( "netbios_domain", &p->netbios_domain, p->netbios_ptr, ps, depth) ) return False; + if ( !prs_align(ps) ) + return False; + if ( !smb_io_unistr2( "dns_domain", &p->dns_domain, p->dnsname_ptr, ps, depth) ) return False; + if ( !prs_align(ps) ) + return False; + if ( !smb_io_unistr2( "forest_domain", &p->forest_domain, p->forestname_ptr, ps, depth) ) return False; + if ( !prs_align(ps) ) + return False; + return True; -- cgit From 222075ee279309ce6dec414d8c5018f35aab1044 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 5 Oct 2002 16:10:36 +0000 Subject: Don't use usage function, but use popt for usage and help info (This used to be commit a0e0f3b293a71ee6a7bb0edb626c5e16cb803830) --- source3/nsswitch/wbinfo.c | 75 +++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 38 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index 875df231dc..2e8a618e93 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -643,18 +643,18 @@ int main(int argc, char **argv) { "domain-users", 'u', POPT_ARG_NONE, 0, 'u', "Lists all domain users"}, { "domain-groups", 'g', POPT_ARG_NONE, 0, 'g', "Lists all domain groups" }, - { "WINS-by-name", 'N', POPT_ARG_STRING, &string_arg, 'N', "Converts NetBIOS name to IP (WINS)" }, - { "WINS-by-ip", 'I', POPT_ARG_STRING, &string_arg, 'I', "Converts IP address to NetBIOS name (WINS)" }, - { "name-to-sid", 'n', POPT_ARG_STRING, &string_arg, 'n', "Converts name to sid" }, - { "sid-to-name", 's', POPT_ARG_STRING, &string_arg, 's', "Converts sid to name" }, - { "uid-to-sid", 'U', POPT_ARG_INT, &int_arg, 'U', "Converts uid to sid" }, - { "gid-to-sid", 'G', POPT_ARG_INT, &int_arg, 'G', "Converts gid to sid" }, - { "sid-to-uid", 'S', POPT_ARG_STRING, &string_arg, 'S', "Converts sid to uid" }, - { "sid-to-gid", 'Y', POPT_ARG_STRING, &string_arg, 'Y', "Converts sid to gid" }, + { "WINS-by-name", 'N', POPT_ARG_STRING, &string_arg, 'N', "Converts NetBIOS name to IP (WINS)", "NETBIOS-NAME" }, + { "WINS-by-ip", 'I', POPT_ARG_STRING, &string_arg, 'I', "Converts IP address to NetBIOS name (WINS)", "IP" }, + { "name-to-sid", 'n', POPT_ARG_STRING, &string_arg, 'n', "Converts name to sid", "NAME" }, + { "sid-to-name", 's', POPT_ARG_STRING, &string_arg, 's', "Converts sid to name", "SID" }, + { "uid-to-sid", 'U', POPT_ARG_INT, &int_arg, 'U', "Converts uid to sid" , "UID" }, + { "gid-to-sid", 'G', POPT_ARG_INT, &int_arg, 'G', "Converts gid to sid", "GID" }, + { "sid-to-uid", 'S', POPT_ARG_STRING, &string_arg, 'S', "Converts sid to uid", "SID" }, + { "sid-to-gid", 'Y', POPT_ARG_STRING, &string_arg, 'Y', "Converts sid to gid", "SID" }, { "check-secret", 't', POPT_ARG_NONE, 0, 't', "Check shared secret" }, { "trusted-domains", 'm', POPT_ARG_NONE, 0, 'm', "List trusted domains" }, { "sequence", 0, POPT_ARG_NONE, 0, OPT_SEQUENCE, "show sequence numbers of all domains" }, - { "user-groups", 'r', POPT_ARG_STRING, &string_arg, 'r', "Get user groups" }, + { "user-groups", 'r', POPT_ARG_STRING, &string_arg, 'r', "Get user groups", "USER" }, { "authenticate", 'a', POPT_ARG_STRING, &string_arg, 'a', "authenticate user", "user%password" }, { "set-auth-user", 'A', POPT_ARG_STRING, &string_arg, OPT_SET_AUTH_USER, "Store user and password used by winbindd (root only)", "user%password" }, { "ping", 'p', POPT_ARG_NONE, 0, 'p', "'ping' winbindd to see if it is alive" }, @@ -794,36 +794,35 @@ int main(int argc, char **argv) goto done; } break; - case 'a': { - BOOL got_error = False; - - if (!wbinfo_auth(string_arg)) { - d_printf("Could not authenticate user %s with " - "plaintext password\n", string_arg); - got_error = True; - } - - if (!wbinfo_auth_crap(string_arg)) { - d_printf("Could not authenticate user %s with " - "challenge/response\n", string_arg); - got_error = True; - } - - if (got_error) - goto done; - break; - } - case 'p': { - - if (!wbinfo_ping()) { - d_printf("could not ping winbindd!\n"); - goto done; - } - break; - } + case 'a': { + BOOL got_error = False; + + if (!wbinfo_auth(string_arg)) { + d_printf("Could not authenticate user %s with " + "plaintext password\n", string_arg); + got_error = True; + } + + if (!wbinfo_auth_crap(string_arg)) { + d_printf("Could not authenticate user %s with " + "challenge/response\n", string_arg); + got_error = True; + } + + if (got_error) + goto done; + break; + } + case 'p': { + if (!wbinfo_ping()) { + d_printf("could not ping winbindd!\n"); + goto done; + } + break; + } case OPT_SET_AUTH_USER: - if (!(wbinfo_set_auth_user(string_arg))) - goto done; + if (!(wbinfo_set_auth_user(string_arg))) + goto done; break; default: d_fprintf(stderr, "Invalid option\n"); -- cgit From 272fee58094f4a10ffc978b4f90c444a99a6e945 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 5 Oct 2002 16:45:54 +0000 Subject: Update popt help message and use popt-common (This used to be commit 821b27037b991e143b87f0f1c7186c9a403376f0) --- source3/rpcclient/rpcclient.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'source3') diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index c34f3b08ad..5aa8d2359f 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -591,7 +591,6 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) static char *opt_authfile=NULL, *opt_username=NULL, *opt_domain=NULL, - *opt_configfile=NULL, *opt_logfile=NULL, *opt_ipaddr=NULL; pstring logfile; @@ -604,15 +603,15 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) poptContext pc; struct poptOption long_options[] = { POPT_AUTOHELP - {"authfile", 'A', POPT_ARG_STRING, &opt_authfile, 'A', "File containing user credentials"}, - {"conf", 's', POPT_ARG_STRING, &opt_configfile, 's', "Specify an alternative config file"}, + {"authfile", 'A', POPT_ARG_STRING, &opt_authfile, 'A', "File containing user credentials", "AUTHFILE"}, {"nopass", 'N', POPT_ARG_NONE, &got_pass, 'N', "Don't ask for a password"}, - {"user", 'U', POPT_ARG_STRING, &opt_username, 'U', "Set the network username"}, - {"workgroup", 'W', POPT_ARG_STRING, &opt_domain, 'W', "Set the domain name for user account"}, - {"command", 'c', POPT_ARG_STRING, &cmdstr, 'c', "Execute semicolon separated cmds"}, - {"logfile", 'l', POPT_ARG_STRING, &opt_logfile, 'l', "Logfile to use instead of stdout"}, - {"dest-ip", 'I', POPT_ARG_STRING, &opt_ipaddr, 'I', "Specify destination IP address"}, + {"user", 'U', POPT_ARG_STRING, &opt_username, 'U', "Set the network username", "USER"}, + {"workgroup", 'W', POPT_ARG_STRING, &opt_domain, 'W', "Set the domain name for user account", "DOMAIN"}, + {"command", 'c', POPT_ARG_STRING, &cmdstr, 'c', "Execute semicolon separated cmds", "COMMANDS"}, + {"logfile", 'l', POPT_ARG_STRING, &opt_logfile, 'l', "Logfile to use instead of stdout", "LOGFILE" }, + {"dest-ip", 'I', POPT_ARG_STRING, &opt_ipaddr, 'I', "Specify destination IP address", "IP"}, { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug }, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile }, { NULL } }; @@ -644,10 +643,6 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) interactive = False; break; - case 's': - pstrcpy(dyn_CONFIGFILE, opt_configfile); - break; - case 'U': { char *lp; -- cgit From 650e0274a1ea98a953b2e6f44e7e8e880d418565 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 6 Oct 2002 23:53:34 +0000 Subject: try to put every security descriptors related definitions in the same file. also try to uniform names to a clean scheme. first part. (This used to be commit a123e05877caf90c28980be2d84b1d0b46e4fd21) --- source3/include/rpc_samr.h | 166 -------------------------- source3/include/rpc_secdes.h | 247 +++++++++++++++++++++++++++++++++++++++ source3/include/smb.h | 11 +- source3/lib/util_seaccess.c | 4 +- source3/lib/util_sid.c | 40 +++++-- source3/rpc_server/srv_reg_nt.c | 1 - source3/rpc_server/srv_samr.c | 1 - source3/rpc_server/srv_samr_nt.c | 88 +++++++------- source3/sam/interface.c | 4 +- source3/utils/net_rpc.c | 4 +- 10 files changed, 327 insertions(+), 239 deletions(-) (limited to 'source3') diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h index 6b537715b8..e1fa9c06bc 100644 --- a/source3/include/rpc_samr.h +++ b/source3/include/rpc_samr.h @@ -147,172 +147,6 @@ SamrTestPrivateFunctionsUser #define SAMR_SET_USERINFO 0x3A #define SAMR_CONNECT4 0x3E -/* Access bits to the SAM-object */ - -#define SAMR_ACCESS_UNKNOWN_1 0x00000001 -#define SAMR_ACCESS_SHUTDOWN_SERVER 0x00000002 -#define SAMR_ACCESS_UNKNOWN_4 0x00000004 -#define SAMR_ACCESS_UNKNOWN_8 0x00000008 -#define SAMR_ACCESS_ENUM_DOMAINS 0x00000010 -#define SAMR_ACCESS_OPEN_DOMAIN 0x00000020 - -#define SAMR_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS | \ - SAMR_ACCESS_OPEN_DOMAIN | \ - SAMR_ACCESS_ENUM_DOMAINS | \ - SAMR_ACCESS_UNKNOWN_8 | \ - SAMR_ACCESS_UNKNOWN_4 | \ - SAMR_ACCESS_SHUTDOWN_SERVER | \ - SAMR_ACCESS_UNKNOWN_1 ) - -#define SAMR_READ ( STANDARD_RIGHTS_READ_ACCESS | \ - SAMR_ACCESS_ENUM_DOMAINS ) - -#define SAMR_WRITE ( STANDARD_RIGHTS_WRITE_ACCESS | \ - SAMR_ACCESS_UNKNOWN_8 | \ - SAMR_ACCESS_UNKNOWN_4 | \ - SAMR_ACCESS_SHUTDOWN_SERVER ) - -#define SAMR_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS | \ - SAMR_ACCESS_OPEN_DOMAIN | \ - SAMR_ACCESS_UNKNOWN_1 ) - -/* Access bits to Domain-objects */ - -#define DOMAIN_ACCESS_LOOKUP_INFO_1 0x000000001 -#define DOMAIN_ACCESS_SET_INFO_1 0x000000002 -#define DOMAIN_ACCESS_LOOKUP_INFO_2 0x000000004 -#define DOMAIN_ACCESS_SET_INFO_2 0x000000008 -#define DOMAIN_ACCESS_CREATE_USER 0x000000010 -#define DOMAIN_ACCESS_CREATE_GROUP 0x000000020 -#define DOMAIN_ACCESS_CREATE_ALIAS 0x000000040 -#define DOMAIN_ACCESS_LOOKUP_ALIAS_BY_MEM 0x000000080 -#define DOMAIN_ACCESS_ENUM_ACCOUNTS 0x000000100 -#define DOMAIN_ACCESS_OPEN_ACCOUNT 0x000000200 -#define DOMAIN_ACCESS_SET_INFO_3 0x000000400 - -#define DOMAIN_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS | \ - DOMAIN_ACCESS_SET_INFO_3 | \ - DOMAIN_ACCESS_OPEN_ACCOUNT | \ - DOMAIN_ACCESS_ENUM_ACCOUNTS | \ - DOMAIN_ACCESS_LOOKUP_ALIAS_BY_MEM | \ - DOMAIN_ACCESS_CREATE_ALIAS | \ - DOMAIN_ACCESS_CREATE_GROUP | \ - DOMAIN_ACCESS_CREATE_USER | \ - DOMAIN_ACCESS_SET_INFO_2 | \ - DOMAIN_ACCESS_LOOKUP_INFO_2 | \ - DOMAIN_ACCESS_SET_INFO_1 | \ - DOMAIN_ACCESS_LOOKUP_INFO_1 ) - -#define DOMAIN_READ ( STANDARD_RIGHTS_READ_ACCESS | \ - DOMAIN_ACCESS_LOOKUP_ALIAS_BY_MEM | \ - DOMAIN_ACCESS_LOOKUP_INFO_2 ) - -#define DOMAIN_WRITE ( STANDARD_RIGHTS_WRITE_ACCESS | \ - DOMAIN_ACCESS_SET_INFO_3 | \ - DOMAIN_ACCESS_CREATE_ALIAS | \ - DOMAIN_ACCESS_CREATE_GROUP | \ - DOMAIN_ACCESS_CREATE_USER | \ - DOMAIN_ACCESS_SET_INFO_2 | \ - DOMAIN_ACCESS_SET_INFO_1 ) - -#define DOMAIN_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS | \ - DOMAIN_ACCESS_OPEN_ACCOUNT | \ - DOMAIN_ACCESS_ENUM_ACCOUNTS | \ - DOMAIN_ACCESS_LOOKUP_INFO_1 ) - -/* Access bits to User-objects */ - -#define USER_ACCESS_GET_NAME_ETC 0x00000001 -#define USER_ACCESS_GET_LOCALE 0x00000002 -#define USER_ACCESS_SET_LOC_COM 0x00000004 -#define USER_ACCESS_GET_LOGONINFO 0x00000008 -#define USER_ACCESS_UNKNOWN_10 0x00000010 -#define USER_ACCESS_SET_ATTRIBUTES 0x00000020 -#define USER_ACCESS_CHANGE_PASSWORD 0x00000040 -#define USER_ACCESS_SET_PASSWORD 0x00000080 -#define USER_ACCESS_GET_GROUPS 0x00000100 -#define USER_ACCESS_UNKNOWN_200 0x00000200 -#define USER_ACCESS_UNKNOWN_400 0x00000400 - -#define USER_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS | \ - USER_ACCESS_UNKNOWN_400 | \ - USER_ACCESS_UNKNOWN_200 | \ - USER_ACCESS_GET_GROUPS | \ - USER_ACCESS_SET_PASSWORD | \ - USER_ACCESS_CHANGE_PASSWORD | \ - USER_ACCESS_SET_ATTRIBUTES | \ - USER_ACCESS_UNKNOWN_10 | \ - USER_ACCESS_GET_LOGONINFO | \ - USER_ACCESS_SET_LOC_COM | \ - USER_ACCESS_GET_LOCALE | \ - USER_ACCESS_GET_NAME_ETC ) - -#define USER_READ ( STANDARD_RIGHTS_READ_ACCESS | \ - USER_ACCESS_UNKNOWN_200 | \ - USER_ACCESS_GET_GROUPS | \ - USER_ACCESS_UNKNOWN_10 | \ - USER_ACCESS_GET_LOGONINFO | \ - USER_ACCESS_GET_LOCALE ) - -#define USER_WRITE ( STANDARD_RIGHTS_WRITE_ACCESS | \ - USER_ACCESS_CHANGE_PASSWORD | \ - USER_ACCESS_SET_LOC_COM ) - -#define USER_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS | \ - USER_ACCESS_CHANGE_PASSWORD | \ - USER_ACCESS_GET_NAME_ETC ) - -/* Access bits to Group-objects */ - -#define GROUP_ACCESS_LOOKUP_INFO 0x00000001 -#define GROUP_ACCESS_SET_INFO 0x00000002 -#define GROUP_ACCESS_ADD_MEMBER 0x00000004 -#define GROUP_ACCESS_REMOVE_MEMBER 0x00000008 -#define GROUP_ACCESS_GET_MEMBERS 0x00000010 - -#define GROUP_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS | \ - GROUP_ACCESS_GET_MEMBERS | \ - GROUP_ACCESS_REMOVE_MEMBER | \ - GROUP_ACCESS_ADD_MEMBER | \ - GROUP_ACCESS_SET_INFO | \ - GROUP_ACCESS_LOOKUP_INFO ) - -#define GROUP_READ ( STANDARD_RIGHTS_READ_ACCESS | \ - GROUP_ACCESS_GET_MEMBERS ) - -#define GROUP_WRITE ( STANDARD_RIGHTS_WRITE_ACCESS | \ - GROUP_ACCESS_REMOVE_MEMBER | \ - GROUP_ACCESS_ADD_MEMBER | \ - GROUP_ACCESS_SET_INFO ) - -#define GROUP_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS | \ - GROUP_ACCESS_LOOKUP_INFO ) - -/* Access bits to Alias-objects */ - -#define ALIAS_ACCESS_ADD_MEMBER 0x00000001 -#define ALIAS_ACCESS_REMOVE_MEMBER 0x00000002 -#define ALIAS_ACCESS_GET_MEMBERS 0x00000004 -#define ALIAS_ACCESS_LOOKUP_INFO 0x00000008 -#define ALIAS_ACCESS_SET_INFO 0x00000010 - -#define ALIAS_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS | \ - ALIAS_ACCESS_GET_MEMBERS | \ - ALIAS_ACCESS_REMOVE_MEMBER | \ - ALIAS_ACCESS_ADD_MEMBER | \ - ALIAS_ACCESS_SET_INFO | \ - ALIAS_ACCESS_LOOKUP_INFO ) - -#define ALIAS_READ ( STANDARD_RIGHTS_READ_ACCESS | \ - ALIAS_ACCESS_GET_MEMBERS ) - -#define ALIAS_WRITE ( STANDARD_RIGHTS_WRITE_ACCESS | \ - ALIAS_ACCESS_REMOVE_MEMBER | \ - ALIAS_ACCESS_ADD_MEMBER | \ - ALIAS_ACCESS_SET_INFO ) - -#define ALIAS_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS | \ - ALIAS_ACCESS_LOOKUP_INFO ) typedef struct _DISP_USER_INFO { SAM_ACCOUNT *sam; diff --git a/source3/include/rpc_secdes.h b/source3/include/rpc_secdes.h index e51a5fd2f8..1bb25e8651 100644 --- a/source3/include/rpc_secdes.h +++ b/source3/include/rpc_secdes.h @@ -31,6 +31,7 @@ #define SEC_RIGHTS_READ 0x00020019 #define SEC_RIGHTS_FULL_CONTROL 0x000f003f #define SEC_RIGHTS_MAXIMUM_ALLOWED 0x02000000 + /* for ADS */ #define SEC_RIGHTS_LIST_CONTENTS 0x4 #define SEC_RIGHTS_LIST_OBJECT 0x80 @@ -211,4 +212,250 @@ typedef struct standard_mapping { uint32 std_all; } STANDARD_MAPPING; + +/* Security Access Masks Rights */ + +#define SPECIFIC_RIGHTS_MASK 0x0000FFFF +#define STANDARD_RIGHTS_MASK 0x00FF0000 +#define GENERIC_RIGHTS_MASK 0xF0000000 + +#define SEC_RIGHT_SYSTEM_SECURITY 0x01000000 +#define SEC_RIGHT_MAXIMUM_ALLOWED 0x02000000 + +/* Generic access rights */ + +#define GENERIC_RIGHT_ALL_ACCESS 0x10000000 +#define GENERIC_RIGHT_EXECUTE_ACCESS 0x20000000 +#define GENERIC_RIGHT_WRITE_ACCESS 0x40000000 +#define GENERIC_RIGHT_READ_ACCESS 0x80000000 + +/* Standard access rights. */ + +#define STD_RIGHT_DELETE_ACCESS 0x00010000 +#define STD_RIGHT_READ_CONTROL_ACCESS 0x00020000 +#define STD_RIGHT_WRITE_DAC_ACCESS 0x00040000 +#define STD_RIGHT_WRITE_OWNER_ACCESS 0x00080000 +#define STD_RIGHT_SYNCHRONIZE_ACCESS 0x00100000 + +#define STD_RIGHT_ALL_ACCESS 0x001F0000 + +/* Combinations of standard masks. */ +#define STANDARD_RIGHTS_ALL_ACCESS STD_RIGHT_ALL_ACCESS /* 0x001f0000 */ +#define STANDARD_RIGHTS_EXECUTE_ACCESS STD_RIGHT_READ_CONTROL_ACCESS /* 0x00020000 */ +#define STANDARD_RIGHTS_READ_ACCESS STD_RIGHT_READ_CONTROL_ACCESS /* 0x00020000 */ +#define STANDARD_RIGHTS_WRITE_ACCESS STD_RIGHT_READ_CONTROL_ACCESS /* 0x00020000 */ +#define STANDARD_RIGHTS_REQUIRED_ACCESS \ + (STD_RIGHT_DELETE_ACCESS | \ + STD_RIGHT_READ_CONTROL_ACCESS | \ + STD_RIGHT_WRITE_DAC_ACCESS | \ + STD_RIGHT_WRITE_OWNER_ACCESS) /* 0x000f0000 */ + +/* File Object specific access rights */ + +#define SA_RIGHT_FILE_READ_DATA 0x00000001 +#define SA_RIGHT_FILE_WRITE_DATA 0x00000002 +#define SA_RIGHT_FILE_APPEND_DATA 0x00000004 +#define SA_RIGHT_FILE_READ_EA 0x00000008 +#define SA_RIGHT_FILE_WRITE_EA 0x00000010 +#define SA_RIGHT_FILE_EXECUTE 0x00000020 +#define SA_RIGHT_FILE_DELETE_CHILD 0x00000040 +#define SA_RIGHT_FILE_READ_ATTRIBUTES 0x00000080 +#define SA_RIGHT_FILE_WRITE_ATTRIBUTES 0x00000100 + +#define SA_RIGHT_FILE_ALL_ACCESS 0x000001FF + +#define GENERIC_RIGHTS_FILE_ALL_ACCESS \ + (STANDARD_RIGHTS_REQUIRED_ACCESS| \ + STD_RIGHT_SYNCHRONIZE_ACCESS | \ + SA_RIGHT_FILE_ALL_ACCESS) + +#define GENERIC_RIGHTS_FILE_READ \ + (STANDARD_RIGHTS_READ_ACCESS | \ + STD_RIGHT_SYNCHRONIZE_ACCESS | \ + SA_RIGHT_FILE_READ_DATA | \ + SA_RIGHT_FILE_READ_ATTRIBUTES | \ + SA_RIGHT_FILE_READ_EA) + +#define GENERIC_RIGHTS_FILE_WRITE \ + (STANDARD_RIGHTS_WRITE_ACCESS | \ + STD_RIGHT_SYNCHRONIZE_ACCESS | \ + SA_RIGHT_FILE_WRITE_DATA | \ + SA_RIGHT_FILE_WRITE_ATTRIBUTES | \ + SA_RIGHT_FILE_WRITE_EA | \ + SA_RIGHT_FILE_APPEND_DATA) + +#define GENERIC_RIGHTS_FILE_EXECUTE \ + (STANDARD_RIGHTS_EXECUTE_ACCESS | \ + SA_RIGHT_FILE_READ_ATTRIBUTES | \ + SA_RIGHT_FILE_EXECUTE) + + +/* SAM Object specific access rights */ + +#define SA_RIGHT_SAM_UNKNOWN_1 0x00000001 +#define SA_RIGHT_SAM_SHUTDOWN_SERVER 0x00000002 +#define SA_RIGHT_SAM_UNKNOWN_4 0x00000004 +#define SA_RIGHT_SAM_UNKNOWN_8 0x00000008 +#define SA_RIGHT_SAM_ENUM_DOMAINS 0x00000010 +#define SA_RIGHT_SAM_OPEN_DOMAIN 0x00000020 + +#define SA_RIGHT_SAM_ALL_ACCESS 0x0000003F + +#define GENERIC_RIGHTS_SAM_ALL_ACCESS \ + (STANDARD_RIGHTS_REQUIRED_ACCESS| \ + SA_RIGHT_SAM_ALL_ACCESS) + +#define GENERIC_RIGHTS_SAM_READ \ + (STANDARD_RIGHTS_READ_ACCESS | \ + SA_RIGHT_SAM_ENUM_DOMAINS) + +#define GENERIC_RIGHTS_SAM_WRITE \ + (STANDARD_RIGHTS_WRITE_ACCESS | \ + SA_RIGHT_SAM_UNKNOWN_8 | \ + SA_RIGHT_SAM_UNKNOWN_4 | \ + SA_RIGHT_SAM_SHUTDOWN_SERVER) + +#define GENERIC_RIGHTS_SAM_EXECUTE \ + (STANDARD_RIGHTS_EXECUTE_ACCESS | \ + SA_RIGHT_SAM_OPEN_DOMAIN | \ + SA_RIGHT_SAM_UNKNOWN_1) + + +/* Domain Object specific access rights */ + +#define SA_RIGHT_DOMAIN_LOOKUP_INFO_1 0x00000001 +#define SA_RIGHT_DOMAIN_SET_INFO_1 0x00000002 +#define SA_RIGHT_DOMAIN_LOOKUP_INFO_2 0x00000004 +#define SA_RIGHT_DOMAIN_SET_INFO_2 0x00000008 +#define SA_RIGHT_DOMAIN_CREATE_USER 0x00000010 +#define SA_RIGHT_DOMAIN_CREATE_GROUP 0x00000020 +#define SA_RIGHT_DOMAIN_CREATE_ALIAS 0x00000040 +#define SA_RIGHT_DOMAIN_LOOKUP_ALIAS_BY_MEM 0x00000080 +#define SA_RIGHT_DOMAIN_ENUM_ACCOUNTS 0x00000100 +#define SA_RIGHT_DOMAIN_OPEN_ACCOUNT 0x00000200 +#define SA_RIGHT_DOMAIN_SET_INFO_3 0x00000400 + +#define SA_RIGHT_DOMAIN_ALL_ACCESS 0x000007FF + +#define GENERIC_RIGHTS_DOMAIN_ALL_ACCESS \ + (STANDARD_RIGHTS_REQUIRED_ACCESS| \ + SA_RIGHT_DOMAIN_ALL_ACCESS) + +#define GENERIC_RIGHTS_DOMAIN_READ \ + (STANDARD_RIGHTS_READ_ACCESS | \ + SA_RIGHT_DOMAIN_LOOKUP_ALIAS_BY_MEM | \ + SA_RIGHT_DOMAIN_LOOKUP_INFO_2) + +#define GENERIC_RIGHTS_DOMAIN_WRITE \ + (STANDARD_RIGHTS_WRITE_ACCESS | \ + SA_RIGHT_DOMAIN_SET_INFO_3 | \ + SA_RIGHT_DOMAIN_CREATE_ALIAS | \ + SA_RIGHT_DOMAIN_CREATE_GROUP | \ + SA_RIGHT_DOMAIN_CREATE_USER | \ + SA_RIGHT_DOMAIN_SET_INFO_2 | \ + SA_RIGHT_DOMAIN_SET_INFO_1) + +#define GENERIC_RIGHTS_DOMAIN_EXECUTE \ + (STANDARD_RIGHTS_EXECUTE_ACCESS | \ + SA_RIGHT_DOMAIN_OPEN_ACCOUNT | \ + SA_RIGHT_DOMAIN_ENUM_ACCOUNTS | \ + SA_RIGHT_DOMAIN_LOOKUP_INFO_1) + + +/* User Object specific access rights */ + +#define SA_RIGHT_USER_GET_NAME_ETC 0x00000001 +#define SA_RIGHT_USER_GET_LOCALE 0x00000002 +#define SA_RIGHT_USER_SET_LOC_COM 0x00000004 +#define SA_RIGHT_USER_GET_LOGONINFO 0x00000008 +#define SA_RIGHT_USER_ACCT_FLAGS_EXPIRY 0x00000010 +#define SA_RIGHT_USER_SET_ATTRIBUTES 0x00000020 +#define SA_RIGHT_USER_CHANGE_PASSWORD 0x00000040 +#define SA_RIGHT_USER_SET_PASSWORD 0x00000080 +#define SA_RIGHT_USER_GET_GROUPS 0x00000100 +#define SA_RIGHT_USER_UNKNOWN_200 0x00000200 +#define SA_RIGHT_USER_UNKNOWN_400 0x00000400 + +#define SA_RIGHT_USER_ALL_ACCESS 0x000007FF + +#define GENERIC_RIGHTS_USER_ALL_ACCESS \ + (STANDARD_RIGHTS_REQUIRED_ACCESS| \ + SA_RIGHT_USER_ALL_ACCESS) /* 0x000f07ff */ + +#define GENERIC_RIGHTS_USER_READ \ + (STANDARD_RIGHTS_READ_ACCESS | \ + SA_RIGHT_USER_UNKNOWN_200 | \ + SA_RIGHT_USER_GET_GROUPS | \ + SA_RIGHT_USER_ACCT_FLAGS_EXPIRY | \ + SA_RIGHT_USER_GET_LOGONINFO | \ + SA_RIGHT_USER_GET_LOCALE) /* 0x0002031a */ + +#define GENERIC_RIGHTS_USER_WRITE \ + (STANDARD_RIGHTS_WRITE_ACCESS | \ + SA_RIGHT_USER_CHANGE_PASSWORD | \ + SA_RIGHT_USER_SET_LOC_COM) /* 0x00020044 */ + +#define GENERIC_RIGHTS_USER_EXECUTE \ + (STANDARD_RIGHTS_EXECUTE_ACCESS | \ + SA_RIGHT_USER_CHANGE_PASSWORD | \ + SA_RIGHT_USER_GET_NAME_ETC ) /* 0x00020041 */ + + +/* Group Object specific access rights */ + +#define SA_RIGHT_GROUP_LOOKUP_INFO 0x00000001 +#define SA_RIGHT_GROUP_SET_INFO 0x00000002 +#define SA_RIGHT_GROUP_ADD_MEMBER 0x00000004 +#define SA_RIGHT_GROUP_REMOVE_MEMBER 0x00000008 +#define SA_RIGHT_GROUP_GET_MEMBERS 0x00000010 + +#define SA_RIGHT_GROUP_ALL_ACCESS 0x0000001F + +#define GENERIC_RIGHTS_GROUP_ALL_ACCESS \ + (STANDARD_RIGHTS_REQUIRED_ACCESS| \ + SA_RIGHT_GROUP_ALL_ACCESS) /* 0x000f001f */ + +#define GENERIC_RIGHTS_GROUP_READ \ + (STANDARD_RIGHTS_READ_ACCESS | \ + SA_RIGHT_GROUP_GET_MEMBERS) /* 0x00020010 */ + +#define GENERIC_RIGHTS_GROUP_WRITE \ + (STANDARD_RIGHTS_WRITE_ACCESS | \ + SA_RIGHT_GROUP_REMOVE_MEMBER | \ + SA_RIGHT_GROUP_ADD_MEMBER | \ + SA_RIGHT_GROUP_SET_INFO ) /* 0x0002000e */ + +#define GENERIC_RIGHTS_GROUP_EXECUTE \ + (STANDARD_RIGHTS_EXECUTE_ACCESS | \ + SA_RIGHT_GROUP_LOOKUP_INFO) /* 0x00020001 */ + + +/* Alias Object specific access rights */ + +#define SA_RIGHT_ALIAS_ADD_MEMBER 0x00000001 +#define SA_RIGHT_ALIAS_REMOVE_MEMBER 0x00000002 +#define SA_RIGHT_ALIAS_GET_MEMBERS 0x00000004 +#define SA_RIGHT_ALIAS_LOOKUP_INFO 0x00000008 +#define SA_RIGHT_ALIAS_SET_INFO 0x00000010 + +#define SA_RIGHT_ALIAS_ALL_ACCESS 0x0000001F + +#define GENERIC_RIGHTS_ALIAS_ALL_ACCESS \ + (STANDARD_RIGHTS_REQUIRED_ACCESS| \ + SA_RIGHT_ALIAS_ALL_ACCESS) /* 0x000f001f */ + +#define GENERIC_RIGHTS_ALIAS_READ \ + (STANDARD_RIGHTS_READ_ACCESS | \ + SA_RIGHT_ALIAS_GET_MEMBERS ) /* 0x00020004 */ + +#define GENERIC_RIGHTS_ALIAS_WRITE \ + (STANDARD_RIGHTS_WRITE_ACCESS | \ + SA_RIGHT_ALIAS_REMOVE_MEMBER | \ + SA_RIGHT_ALIAS_ADD_MEMBER | \ + SA_RIGHT_ALIAS_SET_INFO ) /* 0x00020013 */ + +#define GENERIC_RIGHTS_ALIAS_EXECUTE \ + (STANDARD_RIGHTS_EXECUTE_ACCESS | \ + SA_RIGHT_ALIAS_LOOKUP_INFO ) /* 0x00020008 */ + #endif /* _RPC_SECDES_H */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 7ce7599239..1694a8b0fc 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1067,15 +1067,8 @@ struct bitmap { #define WRITE_OWNER_ACCESS (1L<<19) /* 0x00080000 */ #define SYNCHRONIZE_ACCESS (1L<<20) /* 0x00100000 */ -/* Combinations of standard masks. */ -#define STANDARD_RIGHTS_ALL_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS) /* 0x001f0000 */ -#define STANDARD_RIGHTS_EXECUTE_ACCESS (READ_CONTROL_ACCESS) /* 0x00020000 */ -#define STANDARD_RIGHTS_READ_ACCESS (READ_CONTROL_ACCESS) /* 0x00200000 */ -#define STANDARD_RIGHTS_REQUIRED_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS) /* 0x000f0000 */ -#define STANDARD_RIGHTS_WRITE_ACCESS (READ_CONTROL_ACCESS) /* 0x00020000 */ - -#define SYSTEM_SECURITY_ACCESS (1L<<24) /* 0x01000000 */ -#define MAXIMUM_ALLOWED_ACCESS (1L<<25) /* 0x02000000 */ +#define SYSTEM_SECURITY_ACCESS (1L<<24) /* 0x01000000 */ +#define MAXIMUM_ALLOWED_ACCESS (1L<<25) /* 0x02000000 */ #define GENERIC_ALL_ACCESS (1<<28) /* 0x10000000 */ #define GENERIC_EXECUTE_ACCESS (1<<29) /* 0x20000000 */ #define GENERIC_WRITE_ACCESS (1<<30) /* 0x40000000 */ diff --git a/source3/lib/util_seaccess.c b/source3/lib/util_seaccess.c index 456d7ba9e2..21d7fe8599 100644 --- a/source3/lib/util_seaccess.c +++ b/source3/lib/util_seaccess.c @@ -468,11 +468,11 @@ NTSTATUS samr_make_sam_obj_sd(TALLOC_CTX *ctx, SEC_DESC **psd, size_t *sd_size) sid_append_rid(&act_sid, BUILTIN_ALIAS_RID_ACCOUNT_OPS); /*basic access for every one*/ - init_sec_access(&mask, SAMR_EXECUTE | SAMR_READ); + init_sec_access(&mask, GENERIC_RIGHTS_SAM_EXECUTE | GENERIC_RIGHTS_SAM_READ); init_sec_ace(&ace[0], &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); /*full access for builtin aliases Administrators and Account Operators*/ - init_sec_access(&mask, SAMR_ALL_ACCESS); + init_sec_access(&mask, GENERIC_RIGHTS_SAM_ALL_ACCESS); init_sec_ace(&ace[1], &adm_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); init_sec_ace(&ace[2], &act_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index 1439471f64..c5b4a143ea 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -5,6 +5,7 @@ Copyright (C) Luke Kenneth Caseson Leighton 1998-1999 Copyright (C) Jeremy Allison 1999 Copyright (C) Stefan (metze) Metzmacher 2002 + Copyright (C) Simo Sorce 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,16 +38,23 @@ DOM_SID global_sid_NT_Authority; /* NT Authority */ DOM_SID global_sid_System; /* System */ DOM_SID global_sid_NULL; /* NULL sid */ DOM_SID global_sid_Authenticated_Users; /* All authenticated rids */ -DOM_SID global_sid_Network; /* Network rids */ +DOM_SID global_sid_Network; /* Network rids */ -static DOM_SID global_sid_Creator_Owner; /* Creator Owner */ -static DOM_SID global_sid_Creator_Group; /* Creator Group */ -static DOM_SID global_sid_Anonymous; /* Anonymous login */ +static DOM_SID global_sid_Creator_Owner; /* Creator Owner */ +static DOM_SID global_sid_Creator_Group; /* Creator Group */ +static DOM_SID global_sid_Anonymous; /* Anonymous login */ + +DOM_SID global_sid_Builtin; /* Local well-known domain */ +DOM_SID global_sid_Builtin_Administrators; /* Builtin administrators */ +DOM_SID global_sid_Builtin_Users; /* Builtin users */ +DOM_SID global_sid_Builtin_Guests; /* Builtin guest users */ +DOM_SID global_sid_Builtin_Power_Users; /* Builtin power users */ +DOM_SID global_sid_Builtin_Account_Operators; /* Builtin account operators */ +DOM_SID global_sid_Builtin_Server_Operators; /* Builtin server operators */ +DOM_SID global_sid_Builtin_Print_Operators; /* Builtin print operators */ +DOM_SID global_sid_Builtin_Backup_Operators; /* Builtin backup operators */ +DOM_SID global_sid_Builtin_Replicator; /* Builtin replicator */ -DOM_SID global_sid_Builtin; /* Local well-known domain */ -DOM_SID global_sid_Builtin_Administrators; -DOM_SID global_sid_Builtin_Users; -DOM_SID global_sid_Builtin_Guests; /* Builtin guest users */ /* * An NT compatible anonymous token. @@ -112,10 +120,6 @@ void generate_wellknown_sids(void) if (initialised) return; - string_to_sid(&global_sid_Builtin, "S-1-5-32"); - string_to_sid(&global_sid_Builtin_Administrators, "S-1-5-32-544"); - string_to_sid(&global_sid_Builtin_Users, "S-1-5-32-545"); - string_to_sid(&global_sid_Builtin_Guests, "S-1-5-32-546"); string_to_sid(&global_sid_World_Domain, "S-1-1"); string_to_sid(&global_sid_World, "S-1-1-0"); string_to_sid(&global_sid_Creator_Owner_Domain, "S-1-3"); @@ -128,6 +132,18 @@ void generate_wellknown_sids(void) string_to_sid(&global_sid_Network, "S-1-5-2"); string_to_sid(&global_sid_Anonymous, "S-1-5-7"); + /* create well known builtin SIDs */ + string_to_sid(&global_sid_Builtin, "S-1-5-32"); + string_to_sid(&global_sid_Builtin_Administrators, "S-1-5-32-544"); + string_to_sid(&global_sid_Builtin_Users, "S-1-5-32-545"); + string_to_sid(&global_sid_Builtin_Guests, "S-1-5-32-546"); + string_to_sid(&global_sid_Builtin_Power_Users, "S-1-5-32-547"); + string_to_sid(&global_sid_Builtin_Account_Operators, "S-1-5-32-548"); + string_to_sid(&global_sid_Builtin_Server_Operators, "S-1-5-32-549"); + string_to_sid(&global_sid_Builtin_Print_Operators, "S-1-5-32-550"); + string_to_sid(&global_sid_Builtin_Backup_Operators, "S-1-5-32-551"); + string_to_sid(&global_sid_Builtin_Replicator, "S-1-5-32-552"); + /* Create the anon token. */ sid_copy( &anonymous_token.user_sids[0], &global_sid_World); sid_copy( &anonymous_token.user_sids[1], &global_sid_Network); diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index f96de7e533..7435bdb6f7 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -131,7 +131,6 @@ static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY if ( fetch_reg_keys( regkey, &subkeys ) == -1 ) { /* don't really know what to return here */ - result = NT_STATUS_NO_SUCH_FILE; } else { diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c index bc3b8970d6..ab3d94cf75 100644 --- a/source3/rpc_server/srv_samr.c +++ b/source3/rpc_server/srv_samr.c @@ -155,7 +155,6 @@ static BOOL api_samr_set_sec_obj(pipes_struct *p) return False; } - return True; } diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 020a3c6aaf..3073ca8f75 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -64,11 +64,11 @@ struct samr_info { TALLOC_CTX *mem_ctx; }; -struct generic_mapping sam_generic_mapping = {SAMR_READ, SAMR_WRITE, SAMR_EXECUTE, SAMR_ALL_ACCESS}; -struct generic_mapping dom_generic_mapping = {DOMAIN_READ, DOMAIN_WRITE, DOMAIN_EXECUTE, DOMAIN_ALL_ACCESS}; -struct generic_mapping usr_generic_mapping = {USER_READ, USER_WRITE, USER_EXECUTE, USER_ALL_ACCESS}; -struct generic_mapping grp_generic_mapping = {GROUP_READ, GROUP_WRITE, GROUP_EXECUTE, GROUP_ALL_ACCESS}; -struct generic_mapping ali_generic_mapping = {ALIAS_READ, ALIAS_WRITE, ALIAS_EXECUTE, ALIAS_ALL_ACCESS}; +struct generic_mapping sam_generic_mapping = {GENERIC_RIGHTS_SAM_READ, GENERIC_RIGHTS_SAM_WRITE, GENERIC_RIGHTS_SAM_EXECUTE, GENERIC_RIGHTS_SAM_ALL_ACCESS}; +struct generic_mapping dom_generic_mapping = {GENERIC_RIGHTS_DOMAIN_READ, GENERIC_RIGHTS_DOMAIN_WRITE, GENERIC_RIGHTS_DOMAIN_EXECUTE, GENERIC_RIGHTS_DOMAIN_ALL_ACCESS}; +struct generic_mapping usr_generic_mapping = {GENERIC_RIGHTS_USER_READ, GENERIC_RIGHTS_USER_WRITE, GENERIC_RIGHTS_USER_EXECUTE, GENERIC_RIGHTS_USER_ALL_ACCESS}; +struct generic_mapping grp_generic_mapping = {GENERIC_RIGHTS_GROUP_READ, GENERIC_RIGHTS_GROUP_WRITE, GENERIC_RIGHTS_GROUP_EXECUTE, GENERIC_RIGHTS_GROUP_ALL_ACCESS}; +struct generic_mapping ali_generic_mapping = {GENERIC_RIGHTS_ALIAS_READ, GENERIC_RIGHTS_ALIAS_WRITE, GENERIC_RIGHTS_ALIAS_EXECUTE, GENERIC_RIGHTS_ALIAS_ALL_ACCESS}; static NTSTATUS samr_make_dom_obj_sd(TALLOC_CTX *ctx, SEC_DESC **psd, size_t *sd_size); @@ -375,7 +375,7 @@ NTSTATUS _samr_open_domain(pipes_struct *p, SAMR_Q_OPEN_DOMAIN *q_u, SAMR_R_OPEN if (!find_policy_by_hnd(p, &q_u->pol, (void**)&info)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(status = access_check_samr_function(info->acc_granted, SAMR_ACCESS_OPEN_DOMAIN,"_samr_open_domain"))) { + if (!NT_STATUS_IS_OK(status = access_check_samr_function(info->acc_granted, SA_RIGHT_SAM_OPEN_DOMAIN,"_samr_open_domain"))) { return status; } @@ -454,11 +454,11 @@ static NTSTATUS samr_make_dom_obj_sd(TALLOC_CTX *ctx, SEC_DESC **psd, size_t *sd sid_append_rid(&act_sid, BUILTIN_ALIAS_RID_ACCOUNT_OPS); /*basic access for every one*/ - init_sec_access(&mask, DOMAIN_EXECUTE | DOMAIN_READ); + init_sec_access(&mask, GENERIC_RIGHTS_DOMAIN_EXECUTE | GENERIC_RIGHTS_DOMAIN_READ); init_sec_ace(&ace[0], &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); /*full access for builtin aliases Administrators and Account Operators*/ - init_sec_access(&mask, DOMAIN_ALL_ACCESS); + init_sec_access(&mask, GENERIC_RIGHTS_DOMAIN_ALL_ACCESS); init_sec_ace(&ace[1], &adm_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); init_sec_ace(&ace[2], &act_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); @@ -493,16 +493,16 @@ static NTSTATUS samr_make_usr_obj_sd(TALLOC_CTX *ctx, SEC_DESC **psd, size_t *sd sid_append_rid(&act_sid, BUILTIN_ALIAS_RID_ACCOUNT_OPS); /*basic access for every one*/ - init_sec_access(&mask, USER_EXECUTE | USER_READ); + init_sec_access(&mask, GENERIC_RIGHTS_USER_EXECUTE | GENERIC_RIGHTS_USER_READ); init_sec_ace(&ace[0], &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); /*full access for builtin aliases Administrators and Account Operators*/ - init_sec_access(&mask, USER_ALL_ACCESS); + init_sec_access(&mask, GENERIC_RIGHTS_USER_ALL_ACCESS); init_sec_ace(&ace[1], &adm_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); init_sec_ace(&ace[2], &act_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); /*extended access for the user*/ - init_sec_access(&mask,READ_CONTROL_ACCESS | USER_ACCESS_CHANGE_PASSWORD | USER_ACCESS_SET_LOC_COM); + init_sec_access(&mask,READ_CONTROL_ACCESS | SA_RIGHT_USER_CHANGE_PASSWORD | SA_RIGHT_USER_SET_LOC_COM); init_sec_ace(&ace[3], usr_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); if ((psa = make_sec_acl(ctx, NT4_ACL_REVISION, 4, ace)) == NULL) @@ -536,11 +536,11 @@ static NTSTATUS samr_make_grp_obj_sd(TALLOC_CTX *ctx, SEC_DESC **psd, size_t *sd sid_append_rid(&act_sid, BUILTIN_ALIAS_RID_ACCOUNT_OPS); /*basic access for every one*/ - init_sec_access(&mask, GROUP_EXECUTE | GROUP_READ); + init_sec_access(&mask, GENERIC_RIGHTS_GROUP_EXECUTE | GENERIC_RIGHTS_GROUP_READ); init_sec_ace(&ace[0], &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); /*full access for builtin aliases Administrators and Account Operators*/ - init_sec_access(&mask, GROUP_ALL_ACCESS); + init_sec_access(&mask, GENERIC_RIGHTS_GROUP_ALL_ACCESS); init_sec_ace(&ace[1], &adm_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); init_sec_ace(&ace[2], &act_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); @@ -575,11 +575,11 @@ static NTSTATUS samr_make_ali_obj_sd(TALLOC_CTX *ctx, SEC_DESC **psd, size_t *sd sid_append_rid(&act_sid, BUILTIN_ALIAS_RID_ACCOUNT_OPS); /*basic access for every one*/ - init_sec_access(&mask, ALIAS_EXECUTE | ALIAS_READ); + init_sec_access(&mask, GENERIC_RIGHTS_ALIAS_EXECUTE | GENERIC_RIGHTS_ALIAS_READ); init_sec_ace(&ace[0], &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); /*full access for builtin aliases Administrators and Account Operators*/ - init_sec_access(&mask, ALIAS_ALL_ACCESS); + init_sec_access(&mask, GENERIC_RIGHTS_ALIAS_ALL_ACCESS); init_sec_ace(&ace[1], &adm_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); init_sec_ace(&ace[2], &act_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0); @@ -765,7 +765,7 @@ NTSTATUS _samr_enum_dom_users(pipes_struct *p, SAMR_Q_ENUM_DOM_USERS *q_u, domain_sid = info->sid; if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(info->acc_granted, - DOMAIN_ACCESS_ENUM_ACCOUNTS, + SA_RIGHT_DOMAIN_ENUM_ACCOUNTS, "_samr_enum_dom_users"))) { return r_u->status; } @@ -1058,7 +1058,7 @@ NTSTATUS _samr_enum_dom_groups(pipes_struct *p, SAMR_Q_ENUM_DOM_GROUPS *q_u, SAM if (!get_lsa_policy_samr_sid(p, &q_u->pol, &sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, DOMAIN_ACCESS_ENUM_ACCOUNTS, "_samr_enum_dom_groups"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_DOMAIN_ENUM_ACCOUNTS, "_samr_enum_dom_groups"))) { return r_u->status; } @@ -1097,7 +1097,7 @@ NTSTATUS _samr_enum_dom_aliases(pipes_struct *p, SAMR_Q_ENUM_DOM_ALIASES *q_u, S if (!get_lsa_policy_samr_sid(p, &q_u->pol, &sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, DOMAIN_ACCESS_ENUM_ACCOUNTS, "_samr_enum_dom_aliases"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_DOMAIN_ENUM_ACCOUNTS, "_samr_enum_dom_aliases"))) { return r_u->status; } @@ -1320,7 +1320,7 @@ NTSTATUS _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAM /* find the policy handle. open a policy on it. */ if (!get_lsa_policy_samr_sid(p, &q_u->pol, &sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, ALIAS_ACCESS_LOOKUP_INFO, "_samr_query_aliasinfo"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_ALIAS_LOOKUP_INFO, "_samr_query_aliasinfo"))) { return r_u->status; } @@ -1667,7 +1667,7 @@ NTSTATUS _api_samr_open_user(pipes_struct *p, SAMR_Q_OPEN_USER *q_u, SAMR_R_OPEN if (!get_lsa_policy_samr_sid(p, &domain_pol, &sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(nt_status = access_check_samr_function(acc_granted, DOMAIN_ACCESS_OPEN_ACCOUNT, "_samr_open_user"))) { + if (!NT_STATUS_IS_OK(nt_status = access_check_samr_function(acc_granted, SA_RIGHT_DOMAIN_OPEN_ACCOUNT, "_samr_open_user"))) { return nt_status; } @@ -2008,7 +2008,7 @@ NTSTATUS _samr_query_usergroups(pipes_struct *p, SAMR_Q_QUERY_USERGROUPS *q_u, S if (!get_lsa_policy_samr_sid(p, &q_u->pol, &sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, USER_ACCESS_GET_GROUPS, "_samr_query_usergroups"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_USER_GET_GROUPS, "_samr_query_usergroups"))) { return r_u->status; } @@ -2194,7 +2194,7 @@ NTSTATUS _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_ if (!get_lsa_policy_samr_sid(p, &dom_pol, &sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(nt_status = access_check_samr_function(acc_granted, DOMAIN_ACCESS_CREATE_USER, "_samr_create_user"))) { + if (!NT_STATUS_IS_OK(nt_status = access_check_samr_function(acc_granted, SA_RIGHT_DOMAIN_CREATE_USER, "_samr_create_user"))) { return nt_status; } @@ -2496,7 +2496,7 @@ NTSTATUS _samr_lookup_domain(pipes_struct *p, SAMR_Q_LOOKUP_DOMAIN *q_u, SAMR_R_ if (!find_policy_by_hnd(p, &q_u->connect_pol, (void**)&info)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(info->acc_granted, SAMR_ACCESS_OPEN_DOMAIN, "_samr_lookup_domain"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(info->acc_granted, SA_RIGHT_SAM_OPEN_DOMAIN, "_samr_lookup_domain"))) { return r_u->status; } @@ -2569,7 +2569,7 @@ NTSTATUS _samr_enum_domains(pipes_struct *p, SAMR_Q_ENUM_DOMAINS *q_u, SAMR_R_EN if (!find_policy_by_hnd(p, &q_u->pol, (void**)&info)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(info->acc_granted, SAMR_ACCESS_ENUM_DOMAINS, "_samr_enum_domains"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(info->acc_granted, SA_RIGHT_SAM_ENUM_DOMAINS, "_samr_enum_domains"))) { return r_u->status; } @@ -2617,7 +2617,7 @@ NTSTATUS _api_samr_open_alias(pipes_struct *p, SAMR_Q_OPEN_ALIAS *q_u, SAMR_R_OP if (!get_lsa_policy_samr_sid(p, &domain_pol, &sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(status = access_check_samr_function(acc_granted, DOMAIN_ACCESS_OPEN_ACCOUNT, "_samr_open_alias"))) { + if (!NT_STATUS_IS_OK(status = access_check_samr_function(acc_granted, SA_RIGHT_DOMAIN_OPEN_ACCOUNT, "_samr_open_alias"))) { return status; } @@ -2928,7 +2928,7 @@ NTSTATUS _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SE if (!get_lsa_policy_samr_sid(p, pol, &sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - acc_required = USER_ACCESS_SET_LOC_COM | USER_ACCESS_SET_ATTRIBUTES; /* This is probably wrong */ + acc_required = SA_RIGHT_USER_SET_LOC_COM | SA_RIGHT_USER_SET_ATTRIBUTES; /* This is probably wrong */ if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, acc_required, "_samr_set_userinfo"))) { return r_u->status; } @@ -3013,7 +3013,7 @@ NTSTATUS _samr_set_userinfo2(pipes_struct *p, SAMR_Q_SET_USERINFO2 *q_u, SAMR_R_ if (!get_lsa_policy_samr_sid(p, pol, &sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - acc_required = USER_ACCESS_SET_LOC_COM | USER_ACCESS_SET_ATTRIBUTES; /* This is probably wrong */ + acc_required = SA_RIGHT_USER_SET_LOC_COM | SA_RIGHT_USER_SET_ATTRIBUTES; /* This is probably wrong */ if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, acc_required, "_samr_set_userinfo2"))) { return r_u->status; } @@ -3088,8 +3088,8 @@ NTSTATUS _samr_query_useraliases(pipes_struct *p, SAMR_Q_QUERY_USERALIASES *q_u, if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info)) return NT_STATUS_INVALID_HANDLE; - ntstatus1 = access_check_samr_function(info->acc_granted, DOMAIN_ACCESS_LOOKUP_ALIAS_BY_MEM, "_samr_query_useraliases"); - ntstatus2 = access_check_samr_function(info->acc_granted, DOMAIN_ACCESS_OPEN_ACCOUNT, "_samr_query_useraliases"); + ntstatus1 = access_check_samr_function(info->acc_granted, SA_RIGHT_DOMAIN_LOOKUP_ALIAS_BY_MEM, "_samr_query_useraliases"); + ntstatus2 = access_check_samr_function(info->acc_granted, SA_RIGHT_DOMAIN_OPEN_ACCOUNT, "_samr_query_useraliases"); if (!NT_STATUS_IS_OK(ntstatus1) || !NT_STATUS_IS_OK(ntstatus2)) { if (!(NT_STATUS_EQUAL(ntstatus1,NT_STATUS_ACCESS_DENIED) && NT_STATUS_IS_OK(ntstatus2)) && @@ -3168,7 +3168,7 @@ NTSTATUS _samr_query_aliasmem(pipes_struct *p, SAMR_Q_QUERY_ALIASMEM *q_u, SAMR_ return NT_STATUS_INVALID_HANDLE; if (!NT_STATUS_IS_OK(r_u->status = - access_check_samr_function(acc_granted, ALIAS_ACCESS_GET_MEMBERS, "_samr_query_aliasmem"))) { + access_check_samr_function(acc_granted, SA_RIGHT_ALIAS_GET_MEMBERS, "_samr_query_aliasmem"))) { return r_u->status; } @@ -3269,7 +3269,7 @@ NTSTATUS _samr_query_groupmem(pipes_struct *p, SAMR_Q_QUERY_GROUPMEM *q_u, SAMR_ if (!get_lsa_policy_samr_sid(p, &q_u->group_pol, &group_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, GROUP_ACCESS_GET_MEMBERS, "_samr_query_groupmem"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_GROUP_GET_MEMBERS, "_samr_query_groupmem"))) { return r_u->status; } @@ -3361,7 +3361,7 @@ NTSTATUS _samr_add_aliasmem(pipes_struct *p, SAMR_Q_ADD_ALIASMEM *q_u, SAMR_R_AD if (!get_lsa_policy_samr_sid(p, &q_u->alias_pol, &alias_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, ALIAS_ACCESS_ADD_MEMBER, "_samr_add_aliasmem"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_ALIAS_ADD_MEMBER, "_samr_add_aliasmem"))) { return r_u->status; } @@ -3449,7 +3449,7 @@ NTSTATUS _samr_del_aliasmem(pipes_struct *p, SAMR_Q_DEL_ALIASMEM *q_u, SAMR_R_DE if (!get_lsa_policy_samr_sid(p, &q_u->alias_pol, &alias_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, ALIAS_ACCESS_REMOVE_MEMBER, "_samr_del_aliasmem"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_ALIAS_REMOVE_MEMBER, "_samr_del_aliasmem"))) { return r_u->status; } @@ -3520,7 +3520,7 @@ NTSTATUS _samr_add_groupmem(pipes_struct *p, SAMR_Q_ADD_GROUPMEM *q_u, SAMR_R_AD if (!get_lsa_policy_samr_sid(p, &q_u->pol, &group_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, GROUP_ACCESS_ADD_MEMBER, "_samr_add_groupmem"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_GROUP_ADD_MEMBER, "_samr_add_groupmem"))) { return r_u->status; } @@ -3612,7 +3612,7 @@ NTSTATUS _samr_del_groupmem(pipes_struct *p, SAMR_Q_DEL_GROUPMEM *q_u, SAMR_R_DE if (!get_lsa_policy_samr_sid(p, &q_u->pol, &group_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, GROUP_ACCESS_REMOVE_MEMBER, "_samr_del_groupmem"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_GROUP_REMOVE_MEMBER, "_samr_del_groupmem"))) { return r_u->status; } @@ -3692,7 +3692,7 @@ NTSTATUS _samr_delete_dom_user(pipes_struct *p, SAMR_Q_DELETE_DOM_USER *q_u, SAM if (!get_lsa_policy_samr_sid(p, &q_u->user_pol, &user_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, DELETE_ACCESS, "_samr_delete_dom_user"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, STD_RIGHT_DELETE_ACCESS, "_samr_delete_dom_user"))) { return r_u->status; } @@ -3751,7 +3751,7 @@ NTSTATUS _samr_delete_dom_group(pipes_struct *p, SAMR_Q_DELETE_DOM_GROUP *q_u, S if (!get_lsa_policy_samr_sid(p, &q_u->group_pol, &group_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, DELETE_ACCESS, "_samr_delete_dom_group"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, STD_RIGHT_DELETE_ACCESS, "_samr_delete_dom_group"))) { return r_u->status; } @@ -3813,7 +3813,7 @@ NTSTATUS _samr_delete_dom_alias(pipes_struct *p, SAMR_Q_DELETE_DOM_ALIAS *q_u, S if (!get_lsa_policy_samr_sid(p, &q_u->alias_pol, &alias_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, DELETE_ACCESS, "_samr_delete_dom_alias"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, STD_RIGHT_DELETE_ACCESS, "_samr_delete_dom_alias"))) { return r_u->status; } @@ -3876,7 +3876,7 @@ NTSTATUS _samr_create_dom_group(pipes_struct *p, SAMR_Q_CREATE_DOM_GROUP *q_u, S if (!get_lsa_policy_samr_sid(p, &q_u->pol, &dom_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, DOMAIN_ACCESS_CREATE_GROUP, "_samr_create_dom_group"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_DOMAIN_CREATE_GROUP, "_samr_create_dom_group"))) { return r_u->status; } @@ -3941,7 +3941,7 @@ NTSTATUS _samr_create_dom_alias(pipes_struct *p, SAMR_Q_CREATE_DOM_ALIAS *q_u, S if (!get_lsa_policy_samr_sid(p, &q_u->dom_pol, &dom_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, DOMAIN_ACCESS_CREATE_ALIAS, "_samr_create_alias"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_DOMAIN_CREATE_ALIAS, "_samr_create_alias"))) { return r_u->status; } @@ -4003,7 +4003,7 @@ NTSTATUS _samr_query_groupinfo(pipes_struct *p, SAMR_Q_QUERY_GROUPINFO *q_u, SAM if (!get_lsa_policy_samr_sid(p, &q_u->pol, &group_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, GROUP_ACCESS_LOOKUP_INFO, "_samr_query_groupinfo"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_GROUP_LOOKUP_INFO, "_samr_query_groupinfo"))) { return r_u->status; } @@ -4055,7 +4055,7 @@ NTSTATUS _samr_set_groupinfo(pipes_struct *p, SAMR_Q_SET_GROUPINFO *q_u, SAMR_R_ if (!get_lsa_policy_samr_sid(p, &q_u->pol, &group_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, GROUP_ACCESS_SET_INFO, "_samr_set_groupinfo"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_GROUP_SET_INFO, "_samr_set_groupinfo"))) { return r_u->status; } @@ -4102,7 +4102,7 @@ NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_ if (!get_lsa_policy_samr_sid(p, &q_u->alias_pol, &group_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, ALIAS_ACCESS_SET_INFO, "_samr_set_aliasinfo"))) { + if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_ALIAS_SET_INFO, "_samr_set_aliasinfo"))) { return r_u->status; } @@ -4171,7 +4171,7 @@ NTSTATUS _samr_open_group(pipes_struct *p, SAMR_Q_OPEN_GROUP *q_u, SAMR_R_OPEN_G if (!get_lsa_policy_samr_sid(p, &q_u->domain_pol, &sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (!NT_STATUS_IS_OK(status = access_check_samr_function(acc_granted, DOMAIN_ACCESS_OPEN_ACCOUNT, "_samr_open_group"))) { + if (!NT_STATUS_IS_OK(status = access_check_samr_function(acc_granted, SA_RIGHT_DOMAIN_OPEN_ACCOUNT, "_samr_open_group"))) { return status; } diff --git a/source3/sam/interface.c b/source3/sam/interface.c index 4f5e565d2e..d08df42122 100644 --- a/source3/sam/interface.c +++ b/source3/sam/interface.c @@ -639,7 +639,7 @@ NTSTATUS sam_enum_domains(const SAM_CONTEXT *context, const NT_USER_TOKEN *acces return nt_status; } - if (!se_access_check(sd, access_token, SAMR_ACCESS_ENUM_DOMAINS, &acc_granted, &nt_status)) { + if (!se_access_check(sd, access_token, SA_RIGHT_SAM_ENUM_DOMAINS, &acc_granted, &nt_status)) { DEBUG(3,("sam_enum_domains: ACCESS DENIED\n")); return nt_status; } @@ -699,7 +699,7 @@ NTSTATUS sam_lookup_domain(const SAM_CONTEXT *context, const NT_USER_TOKEN *acce return nt_status; } - if (!se_access_check(sd, access_token, SAMR_ACCESS_OPEN_DOMAIN, &acc_granted, &nt_status)) { + if (!se_access_check(sd, access_token, SA_RIGHT_SAM_OPEN_DOMAIN, &acc_granted, &nt_status)) { DEBUG(3,("sam_lookup_domain: ACCESS DENIED\n")); return nt_status; } diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 06538797e2..ae1e8dbbac 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -2014,7 +2014,7 @@ static int rpc_trustdom_list(int argc, const char **argv) }; /* SamrConnect */ - nt_status = cli_samr_connect(cli, mem_ctx, SAMR_ACCESS_OPEN_DOMAIN, + nt_status = cli_samr_connect(cli, mem_ctx, SA_RIGHT_SAM_OPEN_DOMAIN, &connect_hnd); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0, ("Couldn't open SAMR policy handle. Error was %s\n", @@ -2025,7 +2025,7 @@ static int rpc_trustdom_list(int argc, const char **argv) /* SamrOpenDomain - we have to open domain policy handle in order to be able to enumerate accounts*/ nt_status = cli_samr_open_domain(cli, mem_ctx, &connect_hnd, - DOMAIN_ACCESS_ENUM_ACCOUNTS, + SA_RIGHT_DOMAIN_ENUM_ACCOUNTS, &queried_dom_sid, &domain_hnd); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0, ("Couldn't open domain object. Error was %s\n", -- cgit From 774081486597fb477c89d9a3ad4897527b22830e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 7 Oct 2002 15:51:21 +0000 Subject: forgot some bits from previous rpc_secdesc.h rework patch (This used to be commit 738b9237eda8fdb8adb534ab1a84070923f352f1) --- source3/include/smb.h | 2 -- source3/torture/cmd_sam.c | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'source3') diff --git a/source3/include/smb.h b/source3/include/smb.h index 1694a8b0fc..822f2485dd 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1059,8 +1059,6 @@ struct bitmap { #define DESIRED_ACCESS_PIPE 0x2019f /* Generic access masks & rights. */ -#define SPECIFIC_RIGHTS_MASK 0x00FFFFL -#define STANDARD_RIGHTS_MASK 0xFF0000L #define DELETE_ACCESS (1L<<16) /* 0x00010000 */ #define READ_CONTROL_ACCESS (1L<<17) /* 0x00020000 */ #define WRITE_DAC_ACCESS (1L<<18) /* 0x00040000 */ diff --git a/source3/torture/cmd_sam.c b/source3/torture/cmd_sam.c index eb8c17f2f9..3f7f7dfe27 100644 --- a/source3/torture/cmd_sam.c +++ b/source3/torture/cmd_sam.c @@ -218,7 +218,7 @@ static NTSTATUS cmd_show_domain(struct samtest_state *st, TALLOC_CTX *mem_ctx, i return NT_STATUS_INVALID_PARAMETER; } - if (!NT_STATUS_IS_OK(status = sam_get_domain_by_sid(st->context, st->token, DOMAIN_ALL_ACCESS, &sid, &domain))) { + if (!NT_STATUS_IS_OK(status = sam_get_domain_by_sid(st->context, st->token, GENERIC_RIGHTS_DOMAIN_ALL_ACCESS, &sid, &domain))) { printf("sam_get_domain_by_sid failed\n"); return status; } @@ -379,7 +379,7 @@ static NTSTATUS cmd_lookup_account_sid(struct samtest_state *st, TALLOC_CTX *mem return NT_STATUS_INVALID_PARAMETER; } - if (!NT_STATUS_IS_OK(status = sam_get_account_by_sid(st->context, st->token, USER_ALL_ACCESS, &sid, &account))) { + if (!NT_STATUS_IS_OK(status = sam_get_account_by_sid(st->context, st->token, GENERIC_RIGHTS_USER_ALL_ACCESS, &sid, &account))) { printf("context_sam_get_account_by_sid failed: %s\n", nt_errstr(status)); return status; } @@ -400,7 +400,7 @@ static NTSTATUS cmd_lookup_account_name(struct samtest_state *st, TALLOC_CTX *me } - if (!NT_STATUS_IS_OK(status = sam_get_account_by_name(st->context, st->token, USER_ALL_ACCESS, argv[1], argv[2], &account))) { + if (!NT_STATUS_IS_OK(status = sam_get_account_by_name(st->context, st->token, GENERIC_RIGHTS_USER_ALL_ACCESS, argv[1], argv[2], &account))) { printf("context_sam_get_account_by_sid failed: %s\n", nt_errstr(status)); return status; } -- cgit From c983424abb431aef56d09ca41bbb3359e286bfe9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 7 Oct 2002 18:06:17 +0000 Subject: Fix from Andreas Gruenbacher to prevent ACL set on read-only share. Jeremy. (This used to be commit 80d30dbfec03d1d1e82c9e177ff66aa44b4ea993) --- source3/smbd/posix_acls.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3') diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index e6ae1c7d79..6b1b62417a 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -2124,6 +2124,11 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) DEBUG(10,("set_nt_acl: called for file %s\n", fsp->fsp_name )); + if (!CAN_WRITE(conn)) { + DEBUG(10,("set acl rejected on read-only share\n")); + return False; + } + /* * Get the current state of the file. */ -- cgit From c63f6a95aeec73632f486617e58dcc1ea1170d07 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Mon, 7 Oct 2002 18:48:57 +0000 Subject: Fix ability to locate if we are a WINS client. (This used to be commit f896232cffb398ff4fef0b39966b55a049173c60) --- source3/web/swat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/web/swat.c b/source3/web/swat.c index af6fa82ffe..628ab662ce 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -696,9 +696,9 @@ static void wizard_page(void) /* Now determine smb.conf WINS settings */ if (lp_wins_support()) winstype = 1; -/* if (strlen(lp_wins_server_list()) != 0 ) - * winstype = 2; - */ + if (lp_wins_server_list() && if (strlen(*lp_wins_server_list())) + winstype = 2; + /* Do we have a homes share? */ have_home = lp_servicenumber(HOMES_NAME); -- cgit From edff14b075cfa89966b684dfaf95492369a435e7 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Mon, 7 Oct 2002 21:37:37 +0000 Subject: Fix John's little typo ... (This used to be commit 0c8e8a162092aa20a70cadf570f14183ac83c175) --- source3/web/swat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/web/swat.c b/source3/web/swat.c index 628ab662ce..fc38852245 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -696,7 +696,7 @@ static void wizard_page(void) /* Now determine smb.conf WINS settings */ if (lp_wins_support()) winstype = 1; - if (lp_wins_server_list() && if (strlen(*lp_wins_server_list())) + if (lp_wins_server_list() && strlen(*lp_wins_server_list())) winstype = 2; -- cgit From 9727da326008db5007dee907f55b72a5db99422e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 8 Oct 2002 00:19:56 +0000 Subject: Fix based on Jim McDonough's code for ACL inheritance problem. Jeremy. (This used to be commit a6b3acfc7b98066de6f4b0b6044772a4d56795cd) --- source3/smbd/posix_acls.c | 69 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 9 deletions(-) (limited to 'source3') diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 6b1b62417a..87ebddf35a 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -1872,6 +1872,45 @@ static int nt_ace_comp( SEC_ACE *a1, SEC_ACE *a2) return 1; } +/**************************************************************************** + Incoming NT ACLs on a directory can be split into a default POSIX acl (CI|OI|IO) and + a normal POSIX acl. Win2k needs these split acls re-merging into one ACL + with CI|OI set so it is inherited and also applies to the directory. + Based on code from "Jim McDonough" . +****************************************************************************/ + +static size_t merge_default_aces( SEC_ACE *nt_ace_list, size_t num_aces) +{ + size_t i, j; + + for (i = 0; i < num_aces; i++) { + for (j = i+1; j < num_aces; j++) { + /* We know the lower number ACE's are file entries. */ + if ((nt_ace_list[i].type == nt_ace_list[j].type) && + (nt_ace_list[i].size == nt_ace_list[j].size) && + (nt_ace_list[i].info.mask == nt_ace_list[j].info.mask) && + sid_equal(&nt_ace_list[i].trustee, &nt_ace_list[j].trustee) && + (nt_ace_list[i].flags == 0) && + (nt_ace_list[j].flags == (SEC_ACE_FLAG_OBJECT_INHERIT| + SEC_ACE_FLAG_CONTAINER_INHERIT| + SEC_ACE_FLAG_INHERIT_ONLY))) { + /* + * These are identical except for the flags. + * Merge the inherited ACE onto the non-inherited ACE. + */ + + nt_ace_list[i].flags = SEC_ACE_FLAG_OBJECT_INHERIT|SEC_ACE_FLAG_CONTAINER_INHERIT; + if (num_aces - j - 1 > 0) + memmove(&nt_ace_list[j], &nt_ace_list[j+1], (num_aces-j-1) * + sizeof(SEC_ACE)); + num_aces--; + break; + } + } + } + + return num_aces; +} /**************************************************************************** Reply to query a security descriptor from an fsp. If it succeeds it allocates the space for the return elements and returns the size needed to return the @@ -1978,7 +2017,7 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) goto done; } - memset(nt_ace_list, '\0', (num_acls + num_dir_acls) * sizeof(SEC_ACE) ); + memset(nt_ace_list, '\0', (num_acls + num_profile_acls + num_dir_acls) * sizeof(SEC_ACE) ); /* * Create the NT ACE list from the canonical ace lists. @@ -2020,15 +2059,23 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) SEC_ACE_FLAG_INHERIT_ONLY); } + /* + * Merge POSIX default ACLs and normal ACLs into one NT ACE. + * Win2K needs this to get the inheritance correct when replacing ACLs + * on a directory tree. Based on work by Jim @ IBM. + */ + + num_aces = merge_default_aces(nt_ace_list, num_aces); + /* * Sort to force deny entries to the front. */ - if (num_acls + num_dir_acls) - qsort( nt_ace_list, num_acls + num_dir_acls, sizeof(nt_ace_list[0]), QSORT_CAST nt_ace_comp); + if (num_aces) + qsort( nt_ace_list, num_aces, sizeof(nt_ace_list[0]), QSORT_CAST nt_ace_comp); } - if (num_acls) { + if (num_aces) { if((psa = make_sec_acl( main_loop_talloc_get(), ACL_REVISION, num_aces, nt_ace_list)) == NULL) { DEBUG(0,("get_nt_acl: Unable to malloc space for acl.\n")); goto done; @@ -2055,14 +2102,14 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) return sd_size; } -/* - try to chown a file. We will be able to chown it under the following conditions +/**************************************************************************** + Try to chown a file. We will be able to chown it under the following conditions. - 1) if we have root privileges, then it will just work - 2) if we have write permission to the file and dos_filemodes is set + 1) If we have root privileges, then it will just work. + 2) If we have write permission to the file and dos_filemodes is set then allow chown to the currently authenticated user. +****************************************************************************/ - */ static int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid) { int ret; @@ -2409,6 +2456,10 @@ int fchmod_acl(files_struct *fsp, int fd, mode_t mode) return ret; } +/**************************************************************************** + Check for an existing default POSIX ACL on a directory. +****************************************************************************/ + BOOL directory_has_default_acl(connection_struct *conn, const char *fname) { SMB_ACL_T dir_acl = conn->vfs_ops.sys_acl_get_file( conn, fname, SMB_ACL_TYPE_DEFAULT); -- cgit From 0672da5c4376ea8f5dcc3e4fc75c9c4efb1c770e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 8 Oct 2002 15:29:13 +0000 Subject: Third part of my fix for usrmgr. Assuming automagic mapping only in parts of srv_samr_nt is not good. This is soo broken. :-) Volker (This used to be commit 74e4a3479f380b320daa0d46c0ba4daa9f98c18f) --- source3/rpc_server/srv_samr_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 3073ca8f75..6b7318a325 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -931,7 +931,7 @@ static NTSTATUS get_group_alias_entries(TALLOC_CTX *ctx, DOMAIN_GRP **d_grp, DOM for (; (num_entries < max_entries) && (grp != NULL); grp = grp->next) { uint32 trid; - if(!get_group_from_gid(grp->gr_gid, &smap, MAPPING_WITHOUT_PRIV)) + if(!get_group_map_from_gid(grp->gr_gid, &smap, MAPPING_WITHOUT_PRIV)) continue; if (smap.sid_name_use!=SID_NAME_ALIAS) { -- cgit From 5bf57880e7893005bd51a76860dd4752954370d0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 8 Oct 2002 18:24:12 +0000 Subject: Ensure we register the 1c name on the unicast subnet. Jeremy. (This used to be commit ca6146c2d345902446665ebfa88f78a06eb58831) --- source3/nmbd/nmbd_logonnames.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3') diff --git a/source3/nmbd/nmbd_logonnames.c b/source3/nmbd/nmbd_logonnames.c index 1406515d6b..28e0e8a02b 100644 --- a/source3/nmbd/nmbd_logonnames.c +++ b/source3/nmbd/nmbd_logonnames.c @@ -109,6 +109,16 @@ in workgroup %s on subnet %s\n", /* Tell the namelist writer to write out a change. */ subrec->work_changed = True; + /* + * Add the WORKGROUP<1C> name to the UNICAST subnet with the IP address + * for this subnet so we will respond to queries on this name. + */ + { + struct nmb_name nmbname; + make_nmb_name(&nmbname,global_myworkgroup,0x1c); + insert_permanent_name_into_unicast(subrec, &nmbname, 0x1c); + } + DEBUG(0,("become_logon_server_success: Samba is now a logon server \ for workgroup %s on subnet %s\n", work->work_group, subrec->subnet_name)); } -- cgit From 876afb5d0f60a7c358b7b3023e59093ce192aa6b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 8 Oct 2002 18:29:57 +0000 Subject: merge from APP_HEAD * s/driverlocation/comment * detect native mode domain and enumerate local groups Also * Added sendfile stats from SAMBA_2_2 (This used to be commit 764b58e2c0b3179cffe157c0ab58761b156b8423) --- source3/nsswitch/winbindd.h | 8 +++- source3/nsswitch/winbindd_cache.c | 75 ++++++++++++++++++++++++++++++++++++- source3/nsswitch/winbindd_cm.c | 11 +++++- source3/nsswitch/winbindd_group.c | 57 ++++++++++++++++++++++++---- source3/nsswitch/winbindd_rpc.c | 60 +++++++++++++++++++++++++++++ source3/nsswitch/winbindd_util.c | 2 +- source3/rpc_client/cli_pipe.c | 16 ++++++++ source3/rpc_server/srv_spoolss_nt.c | 8 +--- source3/utils/status.c | 5 +++ 9 files changed, 222 insertions(+), 20 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd.h b/source3/nsswitch/winbindd.h index 4ca59ff1cc..e8bcf76bd3 100644 --- a/source3/nsswitch/winbindd.h +++ b/source3/nsswitch/winbindd.h @@ -123,12 +123,18 @@ struct winbindd_methods { uint32 *num_entries, WINBIND_USERINFO **info); - /* get a list of groups */ + /* get a list of domain groups */ NTSTATUS (*enum_dom_groups)(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, uint32 *num_entries, struct acct_info **info); + /* get a list of domain local groups */ + NTSTATUS (*enum_local_groups)(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 *num_entries, + struct acct_info **info); + /* convert one user or group name to a sid */ NTSTATUS (*name_to_sid)(struct winbindd_domain *domain, const char *name, diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index 060139af3e..8c02160e02 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -559,7 +559,7 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain, if (!cache->tdb) goto do_query; - centry = wcache_fetch(cache, domain, "GL/%s", domain->name); + centry = wcache_fetch(cache, domain, "GL/%s/domain", domain->name); if (!centry) goto do_query; *num_entries = centry_uint32(centry); @@ -599,13 +599,83 @@ do_query: centry_put_string(centry, (*info)[i].acct_desc); centry_put_uint32(centry, (*info)[i].rid); } - centry_end(centry, "GL/%s", domain->name); + centry_end(centry, "GL/%s/domain", domain->name); centry_free(centry); skip_save: return status; } +/* list all domain groups */ +static NTSTATUS enum_local_groups(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 *num_entries, + struct acct_info **info) +{ + struct winbind_cache *cache = get_cache(domain); + struct cache_entry *centry = NULL; + NTSTATUS status; + int i; + + if (!cache->tdb) goto do_query; + + centry = wcache_fetch(cache, domain, "GL/%s/local", domain->name); + if (!centry) goto do_query; + + *num_entries = centry_uint32(centry); + + if (*num_entries == 0) goto do_cached; + + (*info) = talloc(mem_ctx, sizeof(**info) * (*num_entries)); + if (! (*info)) smb_panic("enum_dom_groups out of memory"); + for (i=0; i<(*num_entries); i++) { + fstrcpy((*info)[i].acct_name, centry_string(centry, mem_ctx)); + fstrcpy((*info)[i].acct_desc, centry_string(centry, mem_ctx)); + (*info)[i].rid = centry_uint32(centry); + } + +do_cached: + + /* If we are returning cached data and the domain controller + is down then we don't know whether the data is up to date + or not. Return NT_STATUS_MORE_PROCESSING_REQUIRED to + indicate this. */ + + if (wcache_server_down(domain)) { + DEBUG(10, ("query_user_list: returning cached user list and server was down\n")); + status = NT_STATUS_MORE_PROCESSING_REQUIRED; + } else + status = centry->status; + + centry_free(centry); + return status; + +do_query: + *num_entries = 0; + *info = NULL; + + if (wcache_server_down(domain)) { + return NT_STATUS_SERVER_DISABLED; + } + + status = cache->backend->enum_local_groups(domain, mem_ctx, num_entries, info); + + /* and save it */ + refresh_sequence_number(domain, True); + centry = centry_start(domain, status); + if (!centry) goto skip_save; + centry_put_uint32(centry, *num_entries); + for (i=0; i<(*num_entries); i++) { + centry_put_string(centry, (*info)[i].acct_name); + centry_put_string(centry, (*info)[i].acct_desc); + centry_put_uint32(centry, (*info)[i].rid); + } + centry_end(centry, "GL/%s/local", domain->name); + centry_free(centry); + +skip_save: + return status; +} /* convert a single name to a sid in a domain */ static NTSTATUS name_to_sid(struct winbindd_domain *domain, @@ -906,6 +976,7 @@ struct winbindd_methods cache_methods = { True, query_user_list, enum_dom_groups, + enum_local_groups, name_to_sid, sid_to_name, query_user, diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index def73edde6..cb1779f590 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -462,6 +462,15 @@ static NTSTATUS cm_open_connection(const char *domain, const int pipe_index, if ( !cli_nt_session_open (new_conn->cli, pipe_index) ) { result = NT_STATUS_PIPE_NOT_AVAILABLE; + /* + * only cache a failure if we are not trying to open the + * **win2k** specific lsarpc UUID. This could be an NT PDC + * and therefore a failure is normal. This should probably + * be abstracted to a check for 2k specific pipes and wondering + * if the PDC is an NT4 box. but since there is only one 2k + * specific UUID right now, i'm not going to bother. --jerry + */ + if ( !is_win2k_pipe(pipe_index) ) add_failed_connection_entry(new_conn, result); cli_shutdown(new_conn->cli); return result; @@ -563,7 +572,7 @@ BOOL cm_check_for_native_mode_win2k( const char *domain ) if ( !NT_STATUS_IS_OK(result = cm_open_connection(domain, PI_LSARPC_DS, &conn)) ) { - DEBUG(3, ("cm_check_for_native_mode_win2k: Could not open a connection to %s for PIPE_LSARPC (%s)\n", + DEBUG(5, ("cm_check_for_native_mode_win2k: Could not open a connection to %s for PIPE_LSARPC (%s)\n", domain, nt_errstr(result))); return False; } diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index abb6b9da75..dc22be1754 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -406,7 +406,7 @@ static BOOL get_sam_group_entries(struct getent_state *ent) { NTSTATUS status; uint32 num_entries; - struct acct_info *name_list = NULL; + struct acct_info *name_list = NULL, *tmp_name_list = NULL; TALLOC_CTX *mem_ctx; BOOL result = False; struct acct_info *sam_grp_entries = NULL; @@ -436,10 +436,9 @@ static BOOL get_sam_group_entries(struct getent_state *ent) goto done; } - status = domain->methods->enum_dom_groups(domain, - mem_ctx, - &num_entries, - &sam_grp_entries); + /* always get the domain global groups */ + + status = domain->methods->enum_dom_groups(domain, mem_ctx, &num_entries, &sam_grp_entries); if (!NT_STATUS_IS_OK(status)) { DEBUG(3, ("get_sam_group_entries: could not enumerate domain groups! Error: %s", nt_errstr(status))); @@ -450,12 +449,54 @@ static BOOL get_sam_group_entries(struct getent_state *ent) /* Copy entries into return buffer */ if (num_entries) { - name_list = malloc(sizeof(struct acct_info) * num_entries); - memcpy(name_list, sam_grp_entries, - num_entries * sizeof(struct acct_info)); + if ( !(name_list = malloc(sizeof(struct acct_info) * num_entries)) ) { + DEBUG(0,("get_sam_group_entries: Failed to malloc memory for %d domain groups!\n", + num_entries)); + result = False; + goto done; + } + memcpy( name_list, sam_grp_entries, num_entries * sizeof(struct acct_info) ); } ent->num_sam_entries = num_entries; + + /* get the domain local groups if we are a member of + a native win2k domain */ + + if ( domain->native_mode ) + { + DEBUG(4,("get_sam_group_entries: Native Mode 2k domain; enumerating local groups as well\n")); + + status = domain->methods->enum_local_groups(domain, mem_ctx, &num_entries, &sam_grp_entries); + + if ( !NT_STATUS_IS_OK(status) ) { + DEBUG(3,("get_sam_group_entries: Failed to enumerate domain local groups!\n")); + num_entries = 0; + } + else + DEBUG(4,("get_sam_group_entries: Returned %d local groups\n", num_entries)); + + /* Copy entries into return buffer */ + + if ( num_entries ) { + if ( !(tmp_name_list = Realloc( name_list, sizeof(struct acct_info) * (ent->num_sam_entries+num_entries))) ) + { + DEBUG(0,("get_sam_group_entries: Failed to realloc more memory for %d local groups!\n", + num_entries)); + result = False; + SAFE_FREE( name_list ); + goto done; + } + + name_list = tmp_name_list; + + memcpy( &name_list[ent->num_sam_entries], sam_grp_entries, + num_entries * sizeof(struct acct_info) ); + } + + ent->num_sam_entries += num_entries; + } + /* Fill in remaining fields */ diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c index 047280e21e..d3a418027d 100644 --- a/source3/nsswitch/winbindd_rpc.c +++ b/source3/nsswitch/winbindd_rpc.c @@ -183,6 +183,65 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain, return status; } +/* List all domain groups */ + +static NTSTATUS enum_local_groups(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 *num_entries, + struct acct_info **info) +{ + uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; + CLI_POLICY_HND *hnd; + POLICY_HND dom_pol; + NTSTATUS result; + + *num_entries = 0; + *info = NULL; + + if ( !(hnd = cm_get_sam_handle(domain->name)) ) + return NT_STATUS_UNSUCCESSFUL; + + if ( !NT_STATUS_IS_OK(result = cli_samr_open_domain( hnd->cli, mem_ctx, &hnd->pol, + des_access, &domain->sid, &dom_pol)) ) + { + return result; + } + + do { + struct acct_info *info2 = NULL; + uint32 count = 0, start = *num_entries; + TALLOC_CTX *mem_ctx2; + + mem_ctx2 = talloc_init_named("enum_dom_local_groups[rpc]"); + + result = cli_samr_enum_als_groups( hnd->cli, mem_ctx2, &dom_pol, + &start, 0xFFFF, &info2, &count); + + if ( !NT_STATUS_IS_OK(result) + && !NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES) ) + { + talloc_destroy(mem_ctx2); + break; + } + + (*info) = talloc_realloc(mem_ctx, *info, + sizeof(**info) * ((*num_entries) + count)); + if (! *info) { + talloc_destroy(mem_ctx2); + cli_samr_close(hnd->cli, mem_ctx, &dom_pol); + return NT_STATUS_NO_MEMORY; + } + + memcpy(&(*info)[*num_entries], info2, count*sizeof(*info2)); + (*num_entries) += count; + talloc_destroy(mem_ctx2); + } while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)); + + cli_samr_close(hnd->cli, mem_ctx, &dom_pol); + + return result; +} + /* convert a single name to a sid in a domain */ static NTSTATUS name_to_sid(struct winbindd_domain *domain, const char *name, @@ -635,6 +694,7 @@ struct winbindd_methods msrpc_methods = { False, query_user_list, enum_dom_groups, + enum_local_groups, name_to_sid, sid_to_name, query_user, diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 005b1609b6..00354187aa 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -128,7 +128,7 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const if ( strequal( lp_workgroup(), domain_name) ) { domain->native_mode = cm_check_for_native_mode_win2k( domain_name ); - DEBUG(5,("add_trusted_domain: %s is a %s mode domain\n", domain_name, + DEBUG(3,("add_trusted_domain: %s is a %s mode domain\n", domain_name, domain->native_mode ? "native" : "mixed" )); } diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 7e1289edff..71e422f251 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -983,6 +983,22 @@ char* get_pipe_name_from_index( const int pipe_index ) return pipe_names[pipe_index].client_pipe; } +/**************************************************************************** + Check to see if this pipe index points to one of + the pipes only supported by Win2k + ****************************************************************************/ + +BOOL is_win2k_pipe( const int pipe_idx ) +{ + switch ( pipe_idx ) + { + case PI_LSARPC_DS: + return True; + } + + return False; +} + /**************************************************************************** check the rpc bind acknowledge response ****************************************************************************/ diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 41ef599a3c..2851ed79c6 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -5603,23 +5603,17 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer) char *cmd = lp_addprinter_cmd(); char **qlines; pstring command; - pstring driverlocation; int numlines; int ret; int fd; fstring remote_machine = "%m"; - /* build driver path... only 9X architecture is needed for legacy reasons */ - slprintf(driverlocation, sizeof(driverlocation)-1, "\\\\%s\\print$\\WIN40\\0", - get_called_name()); - /* change \ to \\ for the shell */ - all_string_sub(driverlocation,"\\","\\\\",sizeof(pstring)); standard_sub_basic(current_user_info.smb_name, remote_machine,sizeof(remote_machine)); slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"", cmd, printer->info_2->printername, printer->info_2->sharename, printer->info_2->portname, printer->info_2->drivername, - printer->info_2->location, driverlocation, remote_machine); + printer->info_2->location, printer->info_2->comment, remote_machine); DEBUG(10,("Running [%s]\n", command)); ret = smbrun(command, &fd); diff --git a/source3/utils/status.c b/source3/utils/status.c index 7fd7c93615..c84f8c267a 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -173,6 +173,11 @@ static int profile_dump(void) d_printf("write_count: %u\n", profile_p->syscall_write_count); d_printf("write_time: %u\n", profile_p->syscall_write_time); d_printf("write_bytes: %u\n", profile_p->syscall_write_bytes); +#ifdef HAVE_SENDFILE + d_printf("sendfile_count: %u\n", profile_p->syscall_sendfile_count); + d_printf("sendfile_time: %u\n", profile_p->syscall_sendfile_time); + d_printf("sendfile_bytes: %u\n", profile_p->syscall_sendfile_bytes); +#endif d_printf("lseek_count: %u\n", profile_p->syscall_lseek_count); d_printf("lseek_time: %u\n", profile_p->syscall_lseek_time); d_printf("rename_count: %u\n", profile_p->syscall_rename_count); -- cgit From ed07b61c6eb79a14dbcbd5d332ab27e27604df77 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 9 Oct 2002 12:01:24 +0000 Subject: Distclean should remove scripts/findsmb (patch from metze) (This used to be commit e2f9ac5032895f9087707cd9e690fcaf9647562a) --- source3/Makefile.in | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index 11cec4a783..b58661d2fe 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -547,7 +547,7 @@ talloctort : SHOWFLAGS bin/talloctort nsswitch : SHOWFLAGS $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) -wins : SHOWFLAGS nsswitch/libnss_wins.so +wins : SHOWFLAGS nsswitch/libnss_wins.@SHLIBEXT@ everything: all libsmbclient debug2html smbfilter talloctort bin/make_printerdef @@ -785,8 +785,12 @@ bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) libsmbclient: bin/libsmbclient.a bin/libsmbclient.@SHLIBEXT@ +bin/pdb_mysql.@SHLIBEXT@: $(PDB_MYSQL_OBJ) + echo "Building plugin $@" + $(SHLD) $(LDSHFLAGS) -o $@ $(PDB_MYSQL_OBJ) @MYSQL_LIBS@ \ + @SONAMEFLAG@`basename $@` -nsswitch/libnss_wins.so: $(NSS_OBJ) +nsswitch/libnss_wins.@SHLIBEXT@: $(NSS_OBJ) @echo "Linking $@" @$(SHLD) $(LDSHFLAGS) -o $@ $(NSS_OBJ) -lc \ @SONAMEFLAG@`basename $@` @@ -795,17 +799,17 @@ bin/winbindd: $(WINBINDD_OBJ) bin/.dummy @echo Linking $@ @$(LINK) -o $@ $(WINBINDD_OBJ) $(DYNEXP) $(LIBS) -nsswitch/libns_winbind.so: $(WINBIND_NSS_PICOBJS) +nsswitch/libns_winbind.@SHLIBEXT@: $(WINBIND_NSS_PICOBJS) @echo "Linking $@" @$(SHLD) @LDSHFLAGS@ -o $@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@ \ @SONAMEFLAG@`basename $@` -nsswitch/libnss_winbind.so: $(WINBIND_NSS_PICOBJS) +nsswitch/libnss_winbind.@SHLIBEXT@: $(WINBIND_NSS_PICOBJS) @echo "Linking $@" @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@ \ @SONAMEFLAG@`basename $@` -nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ) bin/.dummy +nsswitch/pam_winbind.@SHLIBEXT@: $(PAM_WINBIND_OBJ) bin/.dummy @echo Linking $@ @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) \ @SONAMEFLAG@`basename $@` -lpam @@ -849,7 +853,7 @@ installswat: installdirs @$(SHELL) $(srcdir)/script/installswat.sh $(SWATDIR) $(srcdir) installclientlib: - -$(INSTALLCMD) bin/libsmbclient.so ${prefix}/lib + -$(INSTALLCMD) bin/libsmbclient.@SHLIBEXT@ ${prefix}/lib -$(INSTALLCMD) -d ${prefix}/include -$(INSTALLCMD) include/libsmbclient.h ${prefix}/include @@ -1014,10 +1018,10 @@ ctags: ctags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/` realclean: clean delheaders - -rm -f config.log $(PROGS) $(SPROGS) bin/.dummy - -rmdir bin + -rm -f config.log $(PROGS) $(SPROGS) bin/.dummy script/findsmb distclean: realclean + -rm -f include/stamp-h -rm -f include/config.h Makefile -rm -f config.status config.cache so_locations -rm -rf .deps -- cgit From 01da7d5617d319b1baa9e221051111ad7548feb9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 9 Oct 2002 17:00:04 +0000 Subject: add_printer_hook() fix from APP_HEAD (This used to be commit 94201672a5c3cffd145e9f04a3ddd0d17a57e73b) --- source3/rpc_server/srv_spoolss_nt.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 2851ed79c6..a1eb99cb32 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -363,10 +363,10 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) /* Send SIGHUP to process group... is there a better way? */ kill(0, SIGHUP); - if ( ( i = lp_servicenumber( Printer->dev.handlename ) ) >= 0 ) { - lp_killservice( i ); - return WERR_OK; - } else + /* go ahead and re-read the services immediately */ + reload_services( False ); + + if ( ( i = lp_servicenumber( Printer->dev.handlename ) ) < 0 ) return WERR_ACCESS_DENIED; } @@ -5638,7 +5638,9 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer) /* Send SIGHUP to process group... is there a better way? */ kill(0, SIGHUP); - add_all_printers(); + + /* reload our services immediately */ + reload_services( False ); } file_lines_free(qlines); @@ -5709,6 +5711,13 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, result = WERR_NOMEM; goto done; } + + /* + * make sure we actually reload the services after + * this as smb.conf could have a new section in it + * .... shouldn't .... but could + */ + reload_services(False); } /* Do sanity check on the requested changes for Samba */ @@ -6918,15 +6927,17 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ return WERR_PRINTER_ALREADY_EXISTS; } - if (*lp_addprinter_cmd() ) + if (*lp_addprinter_cmd() ) { if ( !add_printer_hook(printer) ) { free_a_printer(&printer,2); return WERR_ACCESS_DENIED; } + } slprintf(name, sizeof(name)-1, "\\\\%s\\%s", get_called_name(), printer->info_2->sharename); + if ((snum = print_queue_snum(printer->info_2->sharename)) == -1) { free_a_printer(&printer,2); return WERR_ACCESS_DENIED; -- cgit From 278744478b51049ca9dcce619f58f875e9cb8e44 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 9 Oct 2002 17:44:02 +0000 Subject: removed stat() call in lp_add_home() (This used to be commit 07c7048aa4ef37f1b7af228ede391ab16503d9a1) --- source3/param/loadparm.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'source3') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index a0c77a0421..500119575a 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1977,13 +1977,6 @@ BOOL lp_add_home(const char *pszHomename, int iDefaultService, int i; pstring newHomedir; - SMB_STRUCT_STAT buf; - - /* if the user's home directory doesn't exist, then don't - add it to the list of available shares */ - if (sys_stat(pszHomedir, &buf)) - return False; - i = add_a_service(ServicePtrs[iDefaultService], pszHomename); if (i < 0) -- cgit From a92bf85234edbf258ca4907aa4b83f9e717ea5ad Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 9 Oct 2002 18:54:20 +0000 Subject: print job properties fix from APP_HEAD. a null devmode is not a failure. (This used to be commit b507dba452ecbd96ec95242f761501d0c5e0d7b5) --- source3/rpc_server/srv_spoolss_nt.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index a1eb99cb32..c5d46abe57 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -6017,11 +6017,9 @@ static WERROR enumjobs_level2(print_queue_struct *queue, int snum, goto done; } - if (!(devmode = construct_dev_mode(snum))) { - *returned = 0; - result = WERR_NOMEM; - goto done; - } + /* this should not be a failure condition if the devmode is NULL */ + + devmode = construct_dev_mode(snum); for (i=0; i<*returned; i++) fill_job_info_2(&(info[i]), &queue[i], i, snum, ntprinter, @@ -8122,7 +8120,8 @@ static WERROR getjob_level_2(print_queue_struct *queue, int count, int snum, uin /* * if the print job does not have a DEVMODE associated with it, - * just use the one for the printer + * just use the one for the printer. A NULL devicemode is not + * a failure condition */ if ( !(nt_devmode=print_job_devmode( snum, jobid )) ) @@ -8134,11 +8133,6 @@ static WERROR getjob_level_2(print_queue_struct *queue, int count, int snum, uin } } - if ( !devmode ) { - ret = WERR_NOMEM; - goto done; - } - fill_job_info_2(info_2, &(queue[i-1]), i, snum, ntprinter, devmode); *needed += spoolss_size_job_info_2(info_2); -- cgit From 447b4a742ee0ca971828e6b46adc7b7c05b973d7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 9 Oct 2002 19:46:19 +0000 Subject: Use memmove when copies can overlap. Spotted by SUGIOKA Toshinobu . Jeremy. (This used to be commit 71768c488e9b498e8cc77a1cfce0fab873e36068) --- source3/web/cgi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/web/cgi.c b/source3/web/cgi.c index 27cc932abe..c9cb78f6f1 100644 --- a/source3/web/cgi.c +++ b/source3/web/cgi.c @@ -77,7 +77,7 @@ static void unescape(char *buf) *p = (c1<<4) | c2; - memcpy(p+1, p+3, strlen(p+3)+1); + memmove(p+1, p+3, strlen(p+3)+1); p++; } } -- cgit From ac71311ff2f74d602c14c24c0b03d6ef3e81afd1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 9 Oct 2002 22:50:10 +0000 Subject: Added "unknown info level". Jeremy. (This used to be commit afecd1aa52b98f123b226ff172d5ef5768cbb44f) --- source3/libsmb/smberr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3') diff --git a/source3/libsmb/smberr.c b/source3/libsmb/smberr.c index 84b3f507e6..724c8edd54 100644 --- a/source3/libsmb/smberr.c +++ b/source3/libsmb/smberr.c @@ -77,6 +77,7 @@ err_code_struct dos_msgs[] = { {"ERRlogonfailure",ERRlogonfailure,"Logon failure"}, {"ERRdiskfull",ERRdiskfull,"Disk full"}, {"ERRgeneral",ERRgeneral, "General failure"}, + {"ERRunknownlevel",ERRunknownlevel, "Unknown info level"}, {NULL,-1,NULL}}; /* Server Error Messages */ -- cgit From 24d8333c72fb7699542d8ae1625ad4862af3aa07 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 11 Oct 2002 01:17:41 +0000 Subject: Turns out with Win9x, we could occasionally return from unix_convert() given a mangled name without a valid stat struct if the file existed. This would then cause open_file_shared1() to erroneously think the file open was new, thus not check for oplock break, thus causing a spurious EAGAIN reply to the open on a file we already had kernel oplocked.... (phew - that was fun to track down :-). Jeremy. (This used to be commit e23210e4732163e7f005b320235c20c814b41972) --- source3/smbd/filename.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3') diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index d343db26f6..202bd75d4c 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -318,6 +318,18 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen pstrcat(start,"/"); pstrcat(start,rest); *end = '\0'; + } else { + /* + * We just scanned for, and found the end of the path. + * We must return a valid stat struct if it exists. + * JRA. + */ + + if (vfs_stat(conn,name, &st) == 0) { + *pst = st; + } else { + ZERO_STRUCT(st); + } } } /* end else */ -- cgit From 4920d2192206b6e0072d078cfba08f91bb03651d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 12 Oct 2002 00:59:21 +0000 Subject: We already set LDAPv3 at connect time, no need to set it again. (This used to be commit c8e32d485bf205b6965579f94063effd86777f3f) --- source3/passdb/pdb_ldap.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source3') diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index a10e6f2989..38e2e0504d 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1374,7 +1374,6 @@ static NTSTATUS ldapsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT static NTSTATUS ldapsam_modify_entry(LDAP *ldap_struct,SAM_ACCOUNT *newpwd,char *dn,LDAPMod **mods,int ldap_op) { NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; - int version; int rc; switch(ldap_op) @@ -1420,13 +1419,6 @@ static NTSTATUS ldapsam_modify_entry(LDAP *ldap_struct,SAM_ACCOUNT *newpwd,char char *retoid; struct berval *retdata; - if (ldap_get_option(ldap_struct, LDAP_OPT_PROTOCOL_VERSION, &version) == LDAP_OPT_SUCCESS) { - if (version != LDAP_VERSION3) { - version = LDAP_VERSION3; - ldap_set_option (ldap_struct, LDAP_OPT_PROTOCOL_VERSION, &version); - } - } - if ((ber = ber_alloc_t(LBER_USE_DER))==NULL) { DEBUG(0,("ber_alloc_t returns NULL\n")); return ret; -- cgit From 4ac9ccfde4d36e3b6065c65c92dd02dddb78b4f2 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 12 Oct 2002 03:38:07 +0000 Subject: Nice *big* patch from metze. The actual design change is relitivly small however: It all goes back to jerry's 'BOOL store', added to many of the elements in a SAM_ACCOUNT. This ensured that smb.conf defaults did not get 'fixed' into ldap. This was a great win for admins, and this patch follows in the same way. This patch extends the concept - we don't store values back into LDAP unless they have been changed. So if we read a value, but don't update it, or we read a value, find it's not there and use a default, we will not update ldap with that value. This reduced clutter in our LDAP DB, and makes it easier to change defaults later on. Metze's particular problem was that when we 'write back' an unchanged value, we would clear any muliple values in that feild. Now he can still have his mulitivalued 'uid' feild, without Samba changing it for *every* other operation. This also applies to many other attributes, and helps to eliminate a nasty race condition. (Time between get and set) This patch is big, and needs more testing, but metze has tested usrmgr, and I've fixed some pdbedit bugs, and tested domain joins, so it isn't compleatly flawed ;-). The same system will be introduced into the SAM code shortly, but this fixes bugs that people were coming across in production uses of Samba 3.0/HEAD, hence it's inclusion here. Andrew Bartlett (This used to be commit 7f237bde212eb188df84a5d8adb598a93fba8155) --- source3/auth/auth_unix.c | 2 +- source3/auth/auth_util.c | 18 +-- source3/include/passdb.h | 2 +- source3/include/smb.h | 71 ++++++--- source3/lib/bitmap.c | 24 +++ source3/passdb/passdb.c | 55 ++++--- source3/passdb/pdb_compat.c | 8 +- source3/passdb/pdb_get_set.c | 310 ++++++++++++++++++++----------------- source3/passdb/pdb_ldap.c | 260 +++++++++++++++++++------------ source3/passdb/pdb_nisplus.c | 86 +++++----- source3/passdb/pdb_smbpasswd.c | 20 +-- source3/passdb/pdb_tdb.c | 96 ++++++------ source3/rpc_parse/parse_samr.c | 6 +- source3/rpc_server/srv_netlog_nt.c | 4 +- source3/rpc_server/srv_samr_nt.c | 17 +- source3/rpc_server/srv_samr_util.c | 154 ++++++++++-------- source3/smbd/chgpasswd.c | 4 +- source3/smbd/password.c | 2 +- source3/utils/net_rpc_samsync.c | 38 ++--- source3/utils/pdbedit.c | 30 ++-- 20 files changed, 694 insertions(+), 513 deletions(-) (limited to 'source3') diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c index 6f4b3f8b15..1251432b87 100644 --- a/source3/auth/auth_unix.c +++ b/source3/auth/auth_unix.c @@ -49,7 +49,7 @@ static BOOL update_smbpassword_file(const char *user, const char *password) * Remove the account disabled flag - we are updating the * users password from a login. */ - if (!pdb_set_acct_ctrl(sampass, pdb_get_acct_ctrl(sampass) & ~ACB_DISABLED)) { + if (!pdb_set_acct_ctrl(sampass, pdb_get_acct_ctrl(sampass) & ~ACB_DISABLED, PDB_CHANGED)) { pdb_free_sam(&sampass); return False; } diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index ce5fd32337..b14344ef50 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -931,47 +931,47 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, return nt_status; } - if (!pdb_set_user_sid(sam_account, &user_sid)) { + if (!pdb_set_user_sid(sam_account, &user_sid, PDB_CHANGED)) { pdb_free_sam(&sam_account); return NT_STATUS_UNSUCCESSFUL; } - if (!pdb_set_group_sid(sam_account, &group_sid)) { + if (!pdb_set_group_sid(sam_account, &group_sid, PDB_CHANGED)) { pdb_free_sam(&sam_account); return NT_STATUS_UNSUCCESSFUL; } - if (!pdb_set_nt_username(sam_account, nt_username)) { + if (!pdb_set_nt_username(sam_account, nt_username, PDB_CHANGED)) { pdb_free_sam(&sam_account); return NT_STATUS_NO_MEMORY; } - if (!pdb_set_domain(sam_account, nt_domain)) { + if (!pdb_set_domain(sam_account, nt_domain, PDB_CHANGED)) { pdb_free_sam(&sam_account); return NT_STATUS_NO_MEMORY; } - if (!pdb_set_fullname(sam_account, pdb_unistr2_convert(&(info3->uni_full_name)))) { + if (!pdb_set_fullname(sam_account, pdb_unistr2_convert(&(info3->uni_full_name)), PDB_CHANGED)) { pdb_free_sam(&sam_account); return NT_STATUS_NO_MEMORY; } - if (!pdb_set_logon_script(sam_account, pdb_unistr2_convert(&(info3->uni_logon_script)), True)) { + if (!pdb_set_logon_script(sam_account, pdb_unistr2_convert(&(info3->uni_logon_script)), PDB_CHANGED)) { pdb_free_sam(&sam_account); return NT_STATUS_NO_MEMORY; } - if (!pdb_set_profile_path(sam_account, pdb_unistr2_convert(&(info3->uni_profile_path)), True)) { + if (!pdb_set_profile_path(sam_account, pdb_unistr2_convert(&(info3->uni_profile_path)), PDB_CHANGED)) { pdb_free_sam(&sam_account); return NT_STATUS_NO_MEMORY; } - if (!pdb_set_homedir(sam_account, pdb_unistr2_convert(&(info3->uni_home_dir)), True)) { + if (!pdb_set_homedir(sam_account, pdb_unistr2_convert(&(info3->uni_home_dir)), PDB_CHANGED)) { pdb_free_sam(&sam_account); return NT_STATUS_NO_MEMORY; } - if (!pdb_set_dir_drive(sam_account, pdb_unistr2_convert(&(info3->uni_dir_drive)), True)) { + if (!pdb_set_dir_drive(sam_account, pdb_unistr2_convert(&(info3->uni_dir_drive)), PDB_CHANGED)) { pdb_free_sam(&sam_account); return NT_STATUS_NO_MEMORY; } diff --git a/source3/include/passdb.h b/source3/include/passdb.h index 0c694987fe..32f416de4a 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -32,7 +32,7 @@ * this SAMBA will load. Increment this if *ANY* changes are made to the interface. */ -#define PASSDB_INTERFACE_VERSION 2 +#define PASSDB_INTERFACE_VERSION 3 /* use this inside a passdb module */ #define PDB_MODULE_VERSIONING_MAGIC \ diff --git a/source3/include/smb.h b/source3/include/smb.h index 822f2485dd..da83aaff47 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -569,25 +569,59 @@ typedef struct { /* * bit flags representing initialized fields in SAM_ACCOUNT */ -#define FLAG_SAM_UNINIT 0x00000000 -#define FLAG_SAM_UID 0x00000001 -#define FLAG_SAM_GID 0x00000002 -#define FLAG_SAM_SMBHOME 0x00000004 -#define FLAG_SAM_PROFILE 0x00000008 -#define FLAG_SAM_DRIVE 0x00000010 -#define FLAG_SAM_LOGONSCRIPT 0x00000020 -#define FLAG_SAM_LOGONTIME 0x00000040 -#define FLAG_SAM_LOGOFFTIME 0x00000080 -#define FLAG_SAM_KICKOFFTIME 0x00000100 -#define FLAG_SAM_CANCHANGETIME 0x00000200 -#define FLAG_SAM_MUSTCHANGETIME 0x00000400 -#define FLAG_SAM_PLAINTEXT_PW 0x00000800 +enum pdb_elements { + PDB_UNINIT, + PDB_UID, + PDB_GID, + PDB_SMBHOME, + PDB_PROFILE, + PDB_DRIVE, + PDB_LOGONSCRIPT, + PDB_LOGONTIME, + PDB_LOGOFFTIME, + PDB_KICKOFFTIME, + PDB_CANCHANGETIME, + PDB_MUSTCHANGETIME, + PDB_PLAINTEXT_PW, + PDB_USERNAME, + PDB_FULLNAME, + PDB_DOMAIN, + PDB_NTUSERNAME, + PDB_HOURSLEN, + PDB_LOGONDIVS, + PDB_USERSID, + PDB_GROUPSID, + PDB_ACCTCTRL, + PDB_PASSLASTSET, + PDB_UNIXHOMEDIR, + PDB_ACCTDESC, + PDB_WORKSTATIONS, + PDB_UNKNOWNSTR, + PDB_MUNGEDDIAL, + PDB_HOURS, + PDB_UNKNOWN3, + PDB_UNKNOWN5, + PDB_UNKNOWN6, + PDB_LMPASSWD, + PDB_NTPASSWD, + + /* this must be the last element */ + PDB_COUNT, +}; + +enum pdb_value_state { + PDB_DEFAULT=0, + PDB_SET, + PDB_CHANGED +}; #define IS_SAM_UNIX_USER(x) \ - ((pdb_get_init_flag(x) & FLAG_SAM_UID) \ - && (pdb_get_init_flag(x) & FLAG_SAM_GID)) + (( pdb_get_init_flags(x, PDB_UID) != PDB_DEFAULT ) \ + && ( pdb_get_init_flags(x,PDB_GID) != PDB_DEFAULT )) -#define IS_SAM_SET(x, flag) ((x)->private.init_flag & (flag)) +#define IS_SAM_SET(x, flag) (pdb_get_init_flags(x, flag) == PDB_SET) +#define IS_SAM_CHANGED(x, flag) (pdb_get_init_flags(x, flag) == PDB_CHANGED) +#define IS_SAM_DEFAULT(x, flag) (pdb_get_init_flags(x, flag) == PDB_DEFAULT) typedef struct sam_passwd { @@ -599,8 +633,9 @@ typedef struct sam_passwd struct user_data { /* initiailization flags */ - uint32 init_flag; - + struct bitmap *change_flags; + struct bitmap *set_flags; + time_t logon_time; /* logon time */ time_t logoff_time; /* logoff time */ time_t kickoff_time; /* kickoff time */ diff --git a/source3/lib/bitmap.c b/source3/lib/bitmap.c index 8121c38bd5..26d21d085f 100644 --- a/source3/lib/bitmap.c +++ b/source3/lib/bitmap.c @@ -59,6 +59,30 @@ void bitmap_free(struct bitmap *bm) SAFE_FREE(bm); } +/**************************************************************************** +talloc a bitmap +****************************************************************************/ +struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n) +{ + struct bitmap *bm; + + if (!mem_ctx) return NULL; + + bm = (struct bitmap *)talloc(mem_ctx, sizeof(*bm)); + + if (!bm) return NULL; + + bm->n = n; + bm->b = (uint32 *)talloc(mem_ctx, sizeof(bm->b[0])*(n+31)/32); + if (!bm->b) { + return NULL; + } + + memset(bm->b, 0, sizeof(bm->b[0])*(n+31)/32); + + return bm; +} + /**************************************************************************** set a bit in a bitmap ****************************************************************************/ diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 2d8ea858aa..9402f0c94c 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -45,7 +45,6 @@ static void pdb_fill_default_sam(SAM_ACCOUNT *user) /* Don't change these timestamp settings without a good reason. They are important for NT member server compatibility. */ - user->private.init_flag = FLAG_SAM_UNINIT; user->private.uid = user->private.gid = -1; user->private.logon_time = (time_t)0; @@ -177,15 +176,15 @@ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd) pdb_fill_default_sam(sam_account); - pdb_set_username(sam_account, pwd->pw_name); - pdb_set_fullname(sam_account, pwd->pw_gecos); + pdb_set_username(sam_account, pwd->pw_name, PDB_SET); + pdb_set_fullname(sam_account, pwd->pw_gecos, PDB_SET); - pdb_set_unix_homedir(sam_account, pwd->pw_dir); + pdb_set_unix_homedir(sam_account, pwd->pw_dir, PDB_SET); - pdb_set_domain (sam_account, lp_workgroup()); + pdb_set_domain (sam_account, lp_workgroup(), PDB_DEFAULT); - pdb_set_uid(sam_account, pwd->pw_uid); - pdb_set_gid(sam_account, pwd->pw_gid); + pdb_set_uid(sam_account, pwd->pw_uid, PDB_SET); + pdb_set_gid(sam_account, pwd->pw_gid, PDB_SET); /* When we get a proper uid -> SID and SID -> uid allocation mechinism, we should call it here. @@ -200,29 +199,29 @@ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd) /* Ensure this *must* be set right */ if (strcmp(pwd->pw_name, guest_account) == 0) { - if (!pdb_set_user_sid_from_rid(sam_account, DOMAIN_USER_RID_GUEST)) { + if (!pdb_set_user_sid_from_rid(sam_account, DOMAIN_USER_RID_GUEST, PDB_DEFAULT)) { return NT_STATUS_UNSUCCESSFUL; } - if (!pdb_set_group_sid_from_rid(sam_account, DOMAIN_GROUP_RID_GUESTS)) { + if (!pdb_set_group_sid_from_rid(sam_account, DOMAIN_GROUP_RID_GUESTS, PDB_DEFAULT)) { return NT_STATUS_UNSUCCESSFUL; } } else { if (!pdb_set_user_sid_from_rid(sam_account, - fallback_pdb_uid_to_user_rid(pwd->pw_uid))) { + fallback_pdb_uid_to_user_rid(pwd->pw_uid), PDB_SET)) { DEBUG(0,("Can't set User SID from RID!\n")); return NT_STATUS_INVALID_PARAMETER; } /* call the mapping code here */ if(get_group_map_from_gid(pwd->pw_gid, &map, MAPPING_WITHOUT_PRIV)) { - if (!pdb_set_group_sid(sam_account,&map.sid)){ + if (!pdb_set_group_sid(sam_account,&map.sid, PDB_SET)){ DEBUG(0,("Can't set Group SID!\n")); return NT_STATUS_INVALID_PARAMETER; } } else { - if (!pdb_set_group_sid_from_rid(sam_account,pdb_gid_to_group_rid(pwd->pw_gid))) { + if (!pdb_set_group_sid_from_rid(sam_account,pdb_gid_to_group_rid(pwd->pw_gid), PDB_SET)) { DEBUG(0,("Can't set Group SID\n")); return NT_STATUS_INVALID_PARAMETER; } @@ -237,34 +236,34 @@ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd) lp_logon_path(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), - False); + PDB_DEFAULT); pdb_set_homedir(sam_account, talloc_sub_specified((sam_account)->mem_ctx, lp_logon_home(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), - False); + PDB_DEFAULT); pdb_set_dir_drive(sam_account, talloc_sub_specified((sam_account)->mem_ctx, lp_logon_drive(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), - False); + PDB_DEFAULT); pdb_set_logon_script(sam_account, talloc_sub_specified((sam_account)->mem_ctx, lp_logon_script(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), - False); - if (!pdb_set_acct_ctrl(sam_account, ACB_NORMAL)) { + PDB_DEFAULT); + if (!pdb_set_acct_ctrl(sam_account, ACB_NORMAL, PDB_DEFAULT)) { DEBUG(1, ("Failed to set 'normal account' flags for user %s.\n", pwd->pw_name)); return NT_STATUS_UNSUCCESSFUL; } } else { - if (!pdb_set_acct_ctrl(sam_account, ACB_WSTRUST)) { + if (!pdb_set_acct_ctrl(sam_account, ACB_WSTRUST, PDB_DEFAULT)) { DEBUG(1, ("Failed to set 'trusted workstation account' flags for user %s.\n", pwd->pw_name)); return NT_STATUS_UNSUCCESSFUL; } @@ -842,7 +841,7 @@ BOOL local_sid_to_uid(uid_t *puid, const DOM_SID *psid, enum SID_NAME_USE *name_ if (pdb_getsampwsid(sam_user, psid)) { - if (!(pdb_get_init_flag(sam_user) & FLAG_SAM_UID)) { + if (!IS_SAM_SET(sam_user,PDB_UID)&&!IS_SAM_CHANGED(sam_user,PDB_UID)) { pdb_free_sam(&sam_user); return False; } @@ -1037,7 +1036,7 @@ BOOL local_password_change(const char *user_name, int local_flags, return False; } - if (!pdb_set_username(sam_pass, user_name)) { + if (!pdb_set_username(sam_pass, user_name, PDB_CHANGED)) { slprintf(err_str, err_str_len - 1, "Failed to set username for user %s.\n", user_name); pdb_free_sam(&sam_pass); return False; @@ -1051,19 +1050,19 @@ BOOL local_password_change(const char *user_name, int local_flags, /* the 'other' acb bits not being changed here */ other_acb = (pdb_get_acct_ctrl(sam_pass) & (!(ACB_WSTRUST|ACB_DOMTRUST|ACB_SVRTRUST|ACB_NORMAL))); if (local_flags & LOCAL_TRUST_ACCOUNT) { - if (!pdb_set_acct_ctrl(sam_pass, ACB_WSTRUST | other_acb) ) { + if (!pdb_set_acct_ctrl(sam_pass, ACB_WSTRUST | other_acb, PDB_CHANGED) ) { slprintf(err_str, err_str_len - 1, "Failed to set 'trusted workstation account' flags for user %s.\n", user_name); pdb_free_sam(&sam_pass); return False; } } else if (local_flags & LOCAL_INTERDOM_ACCOUNT) { - if (!pdb_set_acct_ctrl(sam_pass, ACB_DOMTRUST | other_acb)) { + if (!pdb_set_acct_ctrl(sam_pass, ACB_DOMTRUST | other_acb, PDB_CHANGED)) { slprintf(err_str, err_str_len - 1, "Failed to set 'domain trust account' flags for user %s.\n", user_name); pdb_free_sam(&sam_pass); return False; } } else { - if (!pdb_set_acct_ctrl(sam_pass, ACB_NORMAL | other_acb)) { + if (!pdb_set_acct_ctrl(sam_pass, ACB_NORMAL | other_acb, PDB_CHANGED)) { slprintf(err_str, err_str_len - 1, "Failed to set 'normal account' flags for user %s.\n", user_name); pdb_free_sam(&sam_pass); return False; @@ -1076,13 +1075,13 @@ BOOL local_password_change(const char *user_name, int local_flags, */ if (local_flags & LOCAL_DISABLE_USER) { - if (!pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)|ACB_DISABLED)) { + if (!pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)|ACB_DISABLED, PDB_CHANGED)) { slprintf(err_str, err_str_len-1, "Failed to set 'disabled' flag for user %s.\n", user_name); pdb_free_sam(&sam_pass); return False; } } else if (local_flags & LOCAL_ENABLE_USER) { - if (!pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)&(~ACB_DISABLED))) { + if (!pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)&(~ACB_DISABLED), PDB_CHANGED)) { slprintf(err_str, err_str_len-1, "Failed to unset 'disabled' flag for user %s.\n", user_name); pdb_free_sam(&sam_pass); return False; @@ -1090,7 +1089,7 @@ BOOL local_password_change(const char *user_name, int local_flags, } if (local_flags & LOCAL_SET_NO_PASSWORD) { - if (!pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)|ACB_PWNOTREQ)) { + if (!pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)|ACB_PWNOTREQ, PDB_CHANGED)) { slprintf(err_str, err_str_len-1, "Failed to set 'no password required' flag for user %s.\n", user_name); pdb_free_sam(&sam_pass); return False; @@ -1106,13 +1105,13 @@ BOOL local_password_change(const char *user_name, int local_flags, * don't create them disabled). JRA. */ if ((pdb_get_lanman_passwd(sam_pass)==NULL) && (pdb_get_acct_ctrl(sam_pass)&ACB_DISABLED)) { - if (!pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)&(~ACB_DISABLED))) { + if (!pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)&(~ACB_DISABLED), PDB_CHANGED)) { slprintf(err_str, err_str_len-1, "Failed to unset 'disabled' flag for user %s.\n", user_name); pdb_free_sam(&sam_pass); return False; } } - if (!pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)&(~ACB_PWNOTREQ))) { + if (!pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)&(~ACB_PWNOTREQ), PDB_CHANGED)) { slprintf(err_str, err_str_len-1, "Failed to unset 'no password required' flag for user %s.\n", user_name); pdb_free_sam(&sam_pass); return False; diff --git a/source3/passdb/pdb_compat.c b/source3/passdb/pdb_compat.c index 713c92e3ac..abd572a7c1 100644 --- a/source3/passdb/pdb_compat.c +++ b/source3/passdb/pdb_compat.c @@ -48,7 +48,7 @@ uint32 pdb_get_group_rid (const SAM_ACCOUNT *sampass) return (0); } -BOOL pdb_set_user_sid_from_rid (SAM_ACCOUNT *sampass, uint32 rid) +BOOL pdb_set_user_sid_from_rid (SAM_ACCOUNT *sampass, uint32 rid, enum pdb_value_state flag) { DOM_SID u_sid; const DOM_SID *global_sam_sid; @@ -66,7 +66,7 @@ BOOL pdb_set_user_sid_from_rid (SAM_ACCOUNT *sampass, uint32 rid) if (!sid_append_rid(&u_sid, rid)) return False; - if (!pdb_set_user_sid(sampass, &u_sid)) + if (!pdb_set_user_sid(sampass, &u_sid, flag)) return False; DEBUG(10, ("pdb_set_user_sid_from_rid:\n\tsetting user sid %s from rid %d\n", @@ -75,7 +75,7 @@ BOOL pdb_set_user_sid_from_rid (SAM_ACCOUNT *sampass, uint32 rid) return True; } -BOOL pdb_set_group_sid_from_rid (SAM_ACCOUNT *sampass, uint32 grid) +BOOL pdb_set_group_sid_from_rid (SAM_ACCOUNT *sampass, uint32 grid, enum pdb_value_state flag) { DOM_SID g_sid; const DOM_SID *global_sam_sid; @@ -93,7 +93,7 @@ BOOL pdb_set_group_sid_from_rid (SAM_ACCOUNT *sampass, uint32 grid) if (!sid_append_rid(&g_sid, grid)) return False; - if (!pdb_set_group_sid(sampass, &g_sid)) + if (!pdb_set_group_sid(sampass, &g_sid, flag)) return False; DEBUG(10, ("pdb_set_group_sid_from_rid:\n\tsetting group sid %s from rid %d\n", diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index 07474693dd..5dfa8667fe 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -37,7 +37,7 @@ #define PDB_NOT_QUITE_NULL "" /********************************************************************* - Collection of get...() functions for SAM_ACCOUNT_INFO. + Collection of get...() functions for SAM_ACCOUNT. ********************************************************************/ uint16 pdb_get_acct_ctrl (const SAM_ACCOUNT *sampass) @@ -178,12 +178,28 @@ const DOM_SID *pdb_get_group_sid(const SAM_ACCOUNT *sampass) * @return the flags indicating the members initialised in the struct. **/ -uint32 pdb_get_init_flag (const SAM_ACCOUNT *sampass) +enum pdb_value_state pdb_get_init_flags (const SAM_ACCOUNT *sampass, enum pdb_elements element) { - if (sampass) - return sampass->private.init_flag; - else - return FLAG_SAM_UNINIT; + enum pdb_value_state ret = PDB_DEFAULT; + + if (!sampass || !sampass->private.change_flags || !sampass->private.set_flags) + return ret; + + if (bitmap_query(sampass->private.set_flags, element)) { + DEBUG(10, ("element %d: SET\n", element)); + ret = PDB_SET; + } + + if (bitmap_query(sampass->private.change_flags, element)) { + DEBUG(10, ("element %d: CHANGED\n", element)); + ret = PDB_CHANGED; + } + + if (ret == PDB_DEFAULT) { + DEBUG(10, ("element %d: DEFAULT\n", element)); + } + + return ret; } uid_t pdb_get_uid (const SAM_ACCOUNT *sampass) @@ -306,7 +322,7 @@ const char* pdb_get_munged_dial (const SAM_ACCOUNT *sampass) return (NULL); } -uint32 pdb_get_unknown3 (const SAM_ACCOUNT *sampass) +uint32 pdb_get_unknown_3 (const SAM_ACCOUNT *sampass) { if (sampass) return (sampass->private.unknown_3); @@ -314,7 +330,7 @@ uint32 pdb_get_unknown3 (const SAM_ACCOUNT *sampass) return (-1); } -uint32 pdb_get_unknown5 (const SAM_ACCOUNT *sampass) +uint32 pdb_get_unknown_5 (const SAM_ACCOUNT *sampass) { if (sampass) return (sampass->private.unknown_5); @@ -322,7 +338,7 @@ uint32 pdb_get_unknown5 (const SAM_ACCOUNT *sampass) return (-1); } -uint32 pdb_get_unknown6 (const SAM_ACCOUNT *sampass) +uint32 pdb_get_unknown_6 (const SAM_ACCOUNT *sampass) { if (sampass) return (sampass->private.unknown_6); @@ -331,113 +347,97 @@ uint32 pdb_get_unknown6 (const SAM_ACCOUNT *sampass) } /********************************************************************* - Collection of set...() functions for SAM_ACCOUNT_INFO. + Collection of set...() functions for SAM_ACCOUNT. ********************************************************************/ -BOOL pdb_set_acct_ctrl (SAM_ACCOUNT *sampass, uint16 flags) +BOOL pdb_set_acct_ctrl (SAM_ACCOUNT *sampass, uint16 acct_ctrl, enum pdb_value_state flag) { if (!sampass) return False; - if (sampass) { - sampass->private.acct_ctrl = flags; - return True; - } - - return False; + sampass->private.acct_ctrl = acct_ctrl; + + return pdb_set_init_flags(sampass, PDB_ACCTCTRL, flag); } -BOOL pdb_set_logon_time (SAM_ACCOUNT *sampass, time_t mytime, BOOL store) +BOOL pdb_set_logon_time (SAM_ACCOUNT *sampass, time_t mytime, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.logon_time = mytime; - if (store) - pdb_set_init_flag(sampass, FLAG_SAM_LOGONTIME); - - return True; + return pdb_set_init_flags(sampass, PDB_LOGONTIME, flag); } -BOOL pdb_set_logoff_time (SAM_ACCOUNT *sampass, time_t mytime, BOOL store) +BOOL pdb_set_logoff_time (SAM_ACCOUNT *sampass, time_t mytime, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.logoff_time = mytime; - if (store) - pdb_set_init_flag(sampass, FLAG_SAM_LOGOFFTIME); - - return True; + return pdb_set_init_flags(sampass, PDB_LOGOFFTIME, flag); } -BOOL pdb_set_kickoff_time (SAM_ACCOUNT *sampass, time_t mytime, BOOL store) +BOOL pdb_set_kickoff_time (SAM_ACCOUNT *sampass, time_t mytime, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.kickoff_time = mytime; - if (store) - pdb_set_init_flag(sampass, FLAG_SAM_KICKOFFTIME); - - return True; + return pdb_set_init_flags(sampass, PDB_KICKOFFTIME, flag); } -BOOL pdb_set_pass_can_change_time (SAM_ACCOUNT *sampass, time_t mytime, BOOL store) +BOOL pdb_set_pass_can_change_time (SAM_ACCOUNT *sampass, time_t mytime, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.pass_can_change_time = mytime; - if (store) - pdb_set_init_flag(sampass, FLAG_SAM_CANCHANGETIME); - - return True; + return pdb_set_init_flags(sampass, PDB_CANCHANGETIME, flag); } -BOOL pdb_set_pass_must_change_time (SAM_ACCOUNT *sampass, time_t mytime, BOOL store) +BOOL pdb_set_pass_must_change_time (SAM_ACCOUNT *sampass, time_t mytime, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.pass_must_change_time = mytime; - if (store) - pdb_set_init_flag(sampass, FLAG_SAM_MUSTCHANGETIME); - - return True; + return pdb_set_init_flags(sampass, PDB_MUSTCHANGETIME, flag); } -BOOL pdb_set_pass_last_set_time (SAM_ACCOUNT *sampass, time_t mytime) +BOOL pdb_set_pass_last_set_time (SAM_ACCOUNT *sampass, time_t mytime, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.pass_last_set_time = mytime; - return True; + return pdb_set_init_flags(sampass, PDB_PASSLASTSET, flag); } -BOOL pdb_set_hours_len (SAM_ACCOUNT *sampass, uint32 len) +BOOL pdb_set_hours_len (SAM_ACCOUNT *sampass, uint32 len, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.hours_len = len; - return True; + + return pdb_set_init_flags(sampass, PDB_HOURSLEN, flag); } -BOOL pdb_set_logon_divs (SAM_ACCOUNT *sampass, uint16 hours) +BOOL pdb_set_logon_divs (SAM_ACCOUNT *sampass, uint16 hours, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.logon_divs = hours; - return True; + + return pdb_set_init_flags(sampass, PDB_LOGONDIVS, flag); } /** @@ -447,18 +447,70 @@ BOOL pdb_set_logon_divs (SAM_ACCOUNT *sampass, uint16 hours) * this flag is only added. **/ -BOOL pdb_set_init_flag (SAM_ACCOUNT *sampass, uint32 flag) +BOOL pdb_set_init_flags (SAM_ACCOUNT *sampass, enum pdb_elements element, enum pdb_value_state value_flag) { - if (!sampass) + if (!sampass || !sampass->mem_ctx) return False; - sampass->private.init_flag |= flag; + if (!sampass->private.set_flags) { + if ((sampass->private.set_flags = + bitmap_talloc(sampass->mem_ctx, + PDB_COUNT))==NULL) { + DEBUG(0,("bitmap_talloc failed\n")); + return False; + } + } + if (!sampass->private.change_flags) { + if ((sampass->private.change_flags = + bitmap_talloc(sampass->mem_ctx, + PDB_COUNT))==NULL) { + DEBUG(0,("bitmap_talloc failed\n")); + return False; + } + } + + switch(value_flag) { + case PDB_CHANGED: + if (!bitmap_set(sampass->private.change_flags, element)) { + DEBUG(0,("Can't set flag: %d in change_flags.\n",element)); + return False; + } + if (!bitmap_set(sampass->private.set_flags, element)) { + DEBUG(0,("Can't set flag: %d in set_falgs.\n",element)); + return False; + } + DEBUG(10, ("element %d -> now CHANGED\n", element)); + break; + case PDB_SET: + if (!bitmap_clear(sampass->private.change_flags, element)) { + DEBUG(0,("Can't set flag: %d in change_flags.\n",element)); + return False; + } + if (!bitmap_set(sampass->private.set_flags, element)) { + DEBUG(0,("Can't set flag: %d in set_falgs.\n",element)); + return False; + } + DEBUG(10, ("element %d -> now SET\n", element)); + break; + case PDB_DEFAULT: + default: + if (!bitmap_clear(sampass->private.change_flags, element)) { + DEBUG(0,("Can't set flag: %d in change_flags.\n",element)); + return False; + } + if (!bitmap_clear(sampass->private.set_flags, element)) { + DEBUG(0,("Can't set flag: %d in set_falgs.\n",element)); + return False; + } + DEBUG(10, ("element %d -> now DEFAULT\n", element)); + break; + } return True; } -BOOL pdb_set_uid (SAM_ACCOUNT *sampass, const uid_t uid) -{ +BOOL pdb_set_uid (SAM_ACCOUNT *sampass, const uid_t uid, enum pdb_value_state flag) +{ if (!sampass) return False; @@ -466,13 +518,11 @@ BOOL pdb_set_uid (SAM_ACCOUNT *sampass, const uid_t uid) (int)uid, (int)sampass->private.uid)); sampass->private.uid = uid; - pdb_set_init_flag(sampass, FLAG_SAM_UID); - - return True; - + + return pdb_set_init_flags(sampass, PDB_UID, flag); } -BOOL pdb_set_gid (SAM_ACCOUNT *sampass, const gid_t gid) +BOOL pdb_set_gid (SAM_ACCOUNT *sampass, const gid_t gid, enum pdb_value_state flag) { if (!sampass) return False; @@ -481,13 +531,11 @@ BOOL pdb_set_gid (SAM_ACCOUNT *sampass, const gid_t gid) (int)gid, (int)sampass->private.gid)); sampass->private.gid = gid; - pdb_set_init_flag(sampass, FLAG_SAM_GID); - - return True; + return pdb_set_init_flags(sampass, PDB_GID, flag); } -BOOL pdb_set_user_sid (SAM_ACCOUNT *sampass, DOM_SID *u_sid) +BOOL pdb_set_user_sid (SAM_ACCOUNT *sampass, DOM_SID *u_sid, enum pdb_value_state flag) { if (!sampass || !u_sid) return False; @@ -496,13 +544,14 @@ BOOL pdb_set_user_sid (SAM_ACCOUNT *sampass, DOM_SID *u_sid) DEBUG(10, ("pdb_set_user_sid: setting user sid %s\n", sid_string_static(&sampass->private.user_sid))); - - return True; + + return pdb_set_init_flags(sampass, PDB_USERSID, flag); } -BOOL pdb_set_user_sid_from_string (SAM_ACCOUNT *sampass, fstring u_sid) +BOOL pdb_set_user_sid_from_string (SAM_ACCOUNT *sampass, fstring u_sid, enum pdb_value_state flag) { DOM_SID new_sid; + if (!sampass || !u_sid) return False; @@ -514,7 +563,7 @@ BOOL pdb_set_user_sid_from_string (SAM_ACCOUNT *sampass, fstring u_sid) return False; } - if (!pdb_set_user_sid(sampass, &new_sid)) { + if (!pdb_set_user_sid(sampass, &new_sid, flag)) { DEBUG(1, ("pdb_set_user_sid_from_string: could not set sid %s on SAM_ACCOUNT!\n", u_sid)); return False; } @@ -522,7 +571,7 @@ BOOL pdb_set_user_sid_from_string (SAM_ACCOUNT *sampass, fstring u_sid) return True; } -BOOL pdb_set_group_sid (SAM_ACCOUNT *sampass, DOM_SID *g_sid) +BOOL pdb_set_group_sid (SAM_ACCOUNT *sampass, DOM_SID *g_sid, enum pdb_value_state flag) { if (!sampass || !g_sid) return False; @@ -532,10 +581,10 @@ BOOL pdb_set_group_sid (SAM_ACCOUNT *sampass, DOM_SID *g_sid) DEBUG(10, ("pdb_set_group_sid: setting group sid %s\n", sid_string_static(&sampass->private.group_sid))); - return True; + return pdb_set_init_flags(sampass, PDB_GROUPSID, flag); } -BOOL pdb_set_group_sid_from_string (SAM_ACCOUNT *sampass, fstring g_sid) +BOOL pdb_set_group_sid_from_string (SAM_ACCOUNT *sampass, fstring g_sid, enum pdb_value_state flag) { DOM_SID new_sid; if (!sampass || !g_sid) @@ -549,7 +598,7 @@ BOOL pdb_set_group_sid_from_string (SAM_ACCOUNT *sampass, fstring g_sid) return False; } - if (!pdb_set_group_sid(sampass, &new_sid)) { + if (!pdb_set_group_sid(sampass, &new_sid, flag)) { DEBUG(1, ("pdb_set_group_sid_from_string: could not set sid %s on SAM_ACCOUNT!\n", g_sid)); return False; } @@ -560,8 +609,8 @@ BOOL pdb_set_group_sid_from_string (SAM_ACCOUNT *sampass, fstring g_sid) Set the user's UNIX name. ********************************************************************/ -BOOL pdb_set_username(SAM_ACCOUNT *sampass, const char *username) -{ +BOOL pdb_set_username(SAM_ACCOUNT *sampass, const char *username, enum pdb_value_state flag) +{ if (!sampass) return False; @@ -579,16 +628,16 @@ BOOL pdb_set_username(SAM_ACCOUNT *sampass, const char *username) } else { sampass->private.username = PDB_NOT_QUITE_NULL; } - - return True; + + return pdb_set_init_flags(sampass, PDB_USERNAME, flag); } /********************************************************************* Set the domain name. ********************************************************************/ -BOOL pdb_set_domain(SAM_ACCOUNT *sampass, const char *domain) -{ +BOOL pdb_set_domain(SAM_ACCOUNT *sampass, const char *domain, enum pdb_value_state flag) +{ if (!sampass) return False; @@ -607,14 +656,14 @@ BOOL pdb_set_domain(SAM_ACCOUNT *sampass, const char *domain) sampass->private.domain = PDB_NOT_QUITE_NULL; } - return True; + return pdb_set_init_flags(sampass, PDB_DOMAIN, flag); } /********************************************************************* Set the user's NT name. ********************************************************************/ -BOOL pdb_set_nt_username(SAM_ACCOUNT *sampass, const char *nt_username) +BOOL pdb_set_nt_username(SAM_ACCOUNT *sampass, const char *nt_username, enum pdb_value_state flag) { if (!sampass) return False; @@ -634,14 +683,14 @@ BOOL pdb_set_nt_username(SAM_ACCOUNT *sampass, const char *nt_username) sampass->private.nt_username = PDB_NOT_QUITE_NULL; } - return True; + return pdb_set_init_flags(sampass, PDB_NTUSERNAME, flag); } /********************************************************************* Set the user's full name. ********************************************************************/ -BOOL pdb_set_fullname(SAM_ACCOUNT *sampass, const char *full_name) +BOOL pdb_set_fullname(SAM_ACCOUNT *sampass, const char *full_name, enum pdb_value_state flag) { if (!sampass) return False; @@ -661,14 +710,14 @@ BOOL pdb_set_fullname(SAM_ACCOUNT *sampass, const char *full_name) sampass->private.full_name = PDB_NOT_QUITE_NULL; } - return True; + return pdb_set_init_flags(sampass, PDB_FULLNAME, flag); } /********************************************************************* Set the user's logon script. ********************************************************************/ -BOOL pdb_set_logon_script(SAM_ACCOUNT *sampass, const char *logon_script, BOOL store) +BOOL pdb_set_logon_script(SAM_ACCOUNT *sampass, const char *logon_script, enum pdb_value_state flag) { if (!sampass) return False; @@ -688,19 +737,14 @@ BOOL pdb_set_logon_script(SAM_ACCOUNT *sampass, const char *logon_script, BOOL s sampass->private.logon_script = PDB_NOT_QUITE_NULL; } - if (store) { - DEBUG(10, ("pdb_set_logon_script: setting logon script sam flag!\n")); - pdb_set_init_flag(sampass, FLAG_SAM_LOGONSCRIPT); - } - - return True; + return pdb_set_init_flags(sampass, PDB_LOGONSCRIPT, flag); } /********************************************************************* Set the user's profile path. ********************************************************************/ -BOOL pdb_set_profile_path (SAM_ACCOUNT *sampass, const char *profile_path, BOOL store) +BOOL pdb_set_profile_path (SAM_ACCOUNT *sampass, const char *profile_path, enum pdb_value_state flag) { if (!sampass) return False; @@ -720,19 +764,14 @@ BOOL pdb_set_profile_path (SAM_ACCOUNT *sampass, const char *profile_path, BOOL sampass->private.profile_path = PDB_NOT_QUITE_NULL; } - if (store) { - DEBUG(10, ("pdb_set_profile_path: setting profile path sam flag!\n")); - pdb_set_init_flag(sampass, FLAG_SAM_PROFILE); - } - - return True; + return pdb_set_init_flags(sampass, PDB_PROFILE, flag); } /********************************************************************* Set the user's directory drive. ********************************************************************/ -BOOL pdb_set_dir_drive (SAM_ACCOUNT *sampass, const char *dir_drive, BOOL store) +BOOL pdb_set_dir_drive (SAM_ACCOUNT *sampass, const char *dir_drive, enum pdb_value_state flag) { if (!sampass) return False; @@ -752,19 +791,14 @@ BOOL pdb_set_dir_drive (SAM_ACCOUNT *sampass, const char *dir_drive, BOOL store) sampass->private.dir_drive = PDB_NOT_QUITE_NULL; } - if (store) { - DEBUG(10, ("pdb_set_dir_drive: setting dir drive sam flag!\n")); - pdb_set_init_flag(sampass, FLAG_SAM_DRIVE); - } - - return True; + return pdb_set_init_flags(sampass, PDB_DRIVE, flag); } /********************************************************************* Set the user's home directory. ********************************************************************/ -BOOL pdb_set_homedir (SAM_ACCOUNT *sampass, const char *home_dir, BOOL store) +BOOL pdb_set_homedir (SAM_ACCOUNT *sampass, const char *home_dir, enum pdb_value_state flag) { if (!sampass) return False; @@ -784,19 +818,14 @@ BOOL pdb_set_homedir (SAM_ACCOUNT *sampass, const char *home_dir, BOOL store) sampass->private.home_dir = PDB_NOT_QUITE_NULL; } - if (store) { - DEBUG(10, ("pdb_set_homedir: setting home dir sam flag!\n")); - pdb_set_init_flag(sampass, FLAG_SAM_SMBHOME); - } - - return True; + return pdb_set_init_flags(sampass, PDB_SMBHOME, flag); } /********************************************************************* Set the user's unix home directory. ********************************************************************/ -BOOL pdb_set_unix_homedir (SAM_ACCOUNT *sampass, const char *unix_home_dir) +BOOL pdb_set_unix_homedir (SAM_ACCOUNT *sampass, const char *unix_home_dir, enum pdb_value_state flag) { if (!sampass) return False; @@ -817,14 +846,14 @@ BOOL pdb_set_unix_homedir (SAM_ACCOUNT *sampass, const char *unix_home_dir) sampass->private.unix_home_dir = PDB_NOT_QUITE_NULL; } - return True; + return pdb_set_init_flags(sampass, PDB_UNIXHOMEDIR, flag); } /********************************************************************* Set the user's account description. ********************************************************************/ -BOOL pdb_set_acct_desc (SAM_ACCOUNT *sampass, const char *acct_desc) +BOOL pdb_set_acct_desc (SAM_ACCOUNT *sampass, const char *acct_desc, enum pdb_value_state flag) { if (!sampass) return False; @@ -841,14 +870,14 @@ BOOL pdb_set_acct_desc (SAM_ACCOUNT *sampass, const char *acct_desc) sampass->private.acct_desc = PDB_NOT_QUITE_NULL; } - return True; + return pdb_set_init_flags(sampass, PDB_ACCTDESC, flag); } /********************************************************************* Set the user's workstation allowed list. ********************************************************************/ -BOOL pdb_set_workstations (SAM_ACCOUNT *sampass, const char *workstations) +BOOL pdb_set_workstations (SAM_ACCOUNT *sampass, const char *workstations, enum pdb_value_state flag) { if (!sampass) return False; @@ -868,14 +897,14 @@ BOOL pdb_set_workstations (SAM_ACCOUNT *sampass, const char *workstations) sampass->private.workstations = PDB_NOT_QUITE_NULL; } - return True; + return pdb_set_init_flags(sampass, PDB_WORKSTATIONS, flag); } /********************************************************************* Set the user's 'unknown_str', whatever the heck this actually is... ********************************************************************/ -BOOL pdb_set_unknown_str (SAM_ACCOUNT *sampass, const char *unknown_str) +BOOL pdb_set_unknown_str (SAM_ACCOUNT *sampass, const char *unknown_str, enum pdb_value_state flag) { if (!sampass) return False; @@ -892,14 +921,14 @@ BOOL pdb_set_unknown_str (SAM_ACCOUNT *sampass, const char *unknown_str) sampass->private.unknown_str = PDB_NOT_QUITE_NULL; } - return True; + return pdb_set_init_flags(sampass, PDB_UNKNOWNSTR, flag); } /********************************************************************* Set the user's dial string. ********************************************************************/ -BOOL pdb_set_munged_dial (SAM_ACCOUNT *sampass, const char *munged_dial) +BOOL pdb_set_munged_dial (SAM_ACCOUNT *sampass, const char *munged_dial, enum pdb_value_state flag) { if (!sampass) return False; @@ -916,14 +945,14 @@ BOOL pdb_set_munged_dial (SAM_ACCOUNT *sampass, const char *munged_dial) sampass->private.munged_dial = PDB_NOT_QUITE_NULL; } - return True; + return pdb_set_init_flags(sampass, PDB_MUNGEDDIAL, flag); } /********************************************************************* Set the user's NT hash. ********************************************************************/ -BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, const uint8 *pwd) +BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, const uint8 pwd[NT_HASH_LEN], enum pdb_value_state flag) { if (!sampass) return False; @@ -932,14 +961,14 @@ BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, const uint8 *pwd) sampass->private.nt_pw = data_blob(pwd, NT_HASH_LEN); - return True; + return pdb_set_init_flags(sampass, PDB_NTPASSWD, flag); } /********************************************************************* Set the user's LM hash. ********************************************************************/ -BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, const uint8 pwd[16]) +BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, const uint8 pwd[LM_HASH_LEN], enum pdb_value_state flag) { if (!sampass) return False; @@ -948,7 +977,7 @@ BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, const uint8 pwd[16]) sampass->private.lm_pw = data_blob(pwd, LM_HASH_LEN); - return True; + return pdb_set_init_flags(sampass, PDB_LMPASSWD, flag); } /********************************************************************* @@ -956,7 +985,7 @@ BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, const uint8 pwd[16]) below) ********************************************************************/ -BOOL pdb_set_plaintext_pw_only (SAM_ACCOUNT *sampass, const char *password) +BOOL pdb_set_plaintext_pw_only (SAM_ACCOUNT *sampass, const char *password, enum pdb_value_state flag) { if (!sampass) return False; @@ -976,37 +1005,40 @@ BOOL pdb_set_plaintext_pw_only (SAM_ACCOUNT *sampass, const char *password) sampass->private.plaintext_pw = NULL; } - return True; + return pdb_set_init_flags(sampass, PDB_PLAINTEXT_PW, flag); } -BOOL pdb_set_unknown_3 (SAM_ACCOUNT *sampass, uint32 unkn) +BOOL pdb_set_unknown_3 (SAM_ACCOUNT *sampass, uint32 unkn, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.unknown_3 = unkn; - return True; + + return pdb_set_init_flags(sampass, PDB_UNKNOWN3, flag); } -BOOL pdb_set_unknown_5 (SAM_ACCOUNT *sampass, uint32 unkn) +BOOL pdb_set_unknown_5 (SAM_ACCOUNT *sampass, uint32 unkn, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.unknown_5 = unkn; - return True; + + return pdb_set_init_flags(sampass, PDB_UNKNOWN5, flag); } -BOOL pdb_set_unknown_6 (SAM_ACCOUNT *sampass, uint32 unkn) +BOOL pdb_set_unknown_6 (SAM_ACCOUNT *sampass, uint32 unkn, enum pdb_value_state flag) { if (!sampass) return False; sampass->private.unknown_6 = unkn; - return True; + + return pdb_set_init_flags(sampass, PDB_UNKNOWN6, flag); } -BOOL pdb_set_hours (SAM_ACCOUNT *sampass, const uint8 *hours) +BOOL pdb_set_hours (SAM_ACCOUNT *sampass, const uint8 *hours, enum pdb_value_state flag) { if (!sampass) return False; @@ -1018,7 +1050,7 @@ BOOL pdb_set_hours (SAM_ACCOUNT *sampass, const uint8 *hours) memcpy (sampass->private.hours, hours, MAX_HOURS_LEN); - return True; + return pdb_set_init_flags(sampass, PDB_HOURS, flag); } @@ -1036,17 +1068,17 @@ BOOL pdb_set_pass_changed_now (SAM_ACCOUNT *sampass) if (!sampass) return False; - if (!pdb_set_pass_last_set_time (sampass, time(NULL))) + if (!pdb_set_pass_last_set_time (sampass, time(NULL), PDB_CHANGED)) return False; if (!account_policy_get(AP_MAX_PASSWORD_AGE, &expire) || (expire==(uint32)-1)) { - if (!pdb_set_pass_must_change_time (sampass, get_time_t_max(), False)) + if (!pdb_set_pass_must_change_time (sampass, get_time_t_max(), PDB_CHANGED)) return False; } else { if (!pdb_set_pass_must_change_time (sampass, pdb_get_pass_last_set_time(sampass) - + expire, True)) + + expire, PDB_CHANGED)) return False; } @@ -1068,13 +1100,13 @@ BOOL pdb_set_plaintext_passwd (SAM_ACCOUNT *sampass, const char *plaintext) nt_lm_owf_gen (plaintext, new_nt_p16, new_lanman_p16); - if (!pdb_set_nt_passwd (sampass, new_nt_p16)) + if (!pdb_set_nt_passwd (sampass, new_nt_p16, PDB_CHANGED)) return False; - if (!pdb_set_lanman_passwd (sampass, new_lanman_p16)) + if (!pdb_set_lanman_passwd (sampass, new_lanman_p16, PDB_CHANGED)) return False; - if (!pdb_set_plaintext_pw_only (sampass, plaintext)) + if (!pdb_set_plaintext_pw_only (sampass, plaintext, PDB_CHANGED)) return False; if (!pdb_set_pass_changed_now (sampass)) diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 38e2e0504d..3f625d1690 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -162,10 +162,12 @@ static BOOL ldapsam_open_connection (struct ldapsam_privates *ldap_state, LDAP * int version; +#ifndef NO_LDAP_SECURITY if (geteuid() != 0) { DEBUG(0, ("ldap_open_connection: cannot access LDAP when not root..\n")); return False; } +#endif #if defined(LDAP_API_FEATURE_X_OPENLDAP) && (LDAP_API_VERSION > 2000) DEBUG(10, ("ldapsam_open_connection: %s\n", ldap_state->uri)); @@ -683,13 +685,13 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, get_single_attribute(ldap_struct, entry, "rid", temp); user_rid = (uint32)atol(temp); - pdb_set_user_sid_from_rid(sampass, user_rid); + pdb_set_user_sid_from_rid(sampass, user_rid, PDB_SET); if (!get_single_attribute(ldap_struct, entry, "primaryGroupID", temp)) { group_rid = 0; } else { group_rid = (uint32)atol(temp); - pdb_set_group_sid_from_rid(sampass, group_rid); + pdb_set_group_sid_from_rid(sampass, group_rid, PDB_SET); } if ((ldap_state->permit_non_unix_accounts) @@ -710,21 +712,21 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, uid = pw->pw_uid; gid = pw->pw_gid; - pdb_set_unix_homedir(sampass, pw->pw_dir); + pdb_set_unix_homedir(sampass, pw->pw_dir, PDB_SET); passwd_free(&pw); - pdb_set_uid(sampass, uid); - pdb_set_gid(sampass, gid); + pdb_set_uid(sampass, uid, PDB_SET); + pdb_set_gid(sampass, gid, PDB_SET); if (group_rid == 0) { GROUP_MAP map; /* call the mapping code here */ if(get_group_map_from_gid(gid, &map, MAPPING_WITHOUT_PRIV)) { - pdb_set_group_sid(sampass, &map.sid); + pdb_set_group_sid(sampass, &map.sid, PDB_SET); } else { - pdb_set_group_sid_from_rid(sampass, pdb_gid_to_group_rid(gid)); + pdb_set_group_sid_from_rid(sampass, pdb_gid_to_group_rid(gid), PDB_SET); } } } @@ -733,42 +735,42 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, /* leave as default */ } else { pass_last_set_time = (time_t) atol(temp); - pdb_set_pass_last_set_time(sampass, pass_last_set_time); + pdb_set_pass_last_set_time(sampass, pass_last_set_time, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "logonTime", temp)) { /* leave as default */ } else { logon_time = (time_t) atol(temp); - pdb_set_logon_time(sampass, logon_time, True); + pdb_set_logon_time(sampass, logon_time, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "logoffTime", temp)) { /* leave as default */ } else { logoff_time = (time_t) atol(temp); - pdb_set_logoff_time(sampass, logoff_time, True); + pdb_set_logoff_time(sampass, logoff_time, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "kickoffTime", temp)) { /* leave as default */ } else { kickoff_time = (time_t) atol(temp); - pdb_set_kickoff_time(sampass, kickoff_time, True); + pdb_set_kickoff_time(sampass, kickoff_time, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "pwdCanChange", temp)) { /* leave as default */ } else { pass_can_change_time = (time_t) atol(temp); - pdb_set_pass_can_change_time(sampass, pass_can_change_time, True); + pdb_set_pass_can_change_time(sampass, pass_can_change_time, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "pwdMustChange", temp)) { /* leave as default */ } else { pass_must_change_time = (time_t) atol(temp); - pdb_set_pass_must_change_time(sampass, pass_must_change_time, True); + pdb_set_pass_must_change_time(sampass, pass_must_change_time, PDB_SET); } /* recommend that 'gecos' and 'displayName' should refer to the same @@ -781,10 +783,10 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, if (!get_single_attribute(ldap_struct, entry, "displayName", fullname)) { /* leave as default */ } else { - pdb_set_fullname(sampass, fullname); + pdb_set_fullname(sampass, fullname, PDB_SET); } } else { - pdb_set_fullname(sampass, fullname); + pdb_set_fullname(sampass, fullname, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "homeDrive", dir_drive)) { @@ -792,9 +794,9 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, lp_logon_drive(), username, domain, uid, gid), - False); + PDB_DEFAULT); } else { - pdb_set_dir_drive(sampass, dir_drive, True); + pdb_set_dir_drive(sampass, dir_drive, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "smbHome", homedir)) { @@ -802,9 +804,9 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, lp_logon_home(), username, domain, uid, gid), - False); + PDB_DEFAULT); } else { - pdb_set_homedir(sampass, homedir, True); + pdb_set_homedir(sampass, homedir, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "scriptPath", logon_script)) { @@ -812,9 +814,9 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, lp_logon_script(), username, domain, uid, gid), - False); + PDB_DEFAULT); } else { - pdb_set_logon_script(sampass, logon_script, True); + pdb_set_logon_script(sampass, logon_script, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "profilePath", profile_path)) { @@ -822,21 +824,21 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, lp_logon_path(), username, domain, uid, gid), - False); + PDB_DEFAULT); } else { - pdb_set_profile_path(sampass, profile_path, True); + pdb_set_profile_path(sampass, profile_path, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "description", acct_desc)) { /* leave as default */ } else { - pdb_set_acct_desc(sampass, acct_desc); + pdb_set_acct_desc(sampass, acct_desc, PDB_SET); } if (!get_single_attribute(ldap_struct, entry, "userWorkstations", workstations)) { /* leave as default */; } else { - pdb_set_workstations(sampass, workstations); + pdb_set_workstations(sampass, workstations, PDB_SET); } /* FIXME: hours stuff should be cleaner */ @@ -850,7 +852,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, } else { pdb_gethexpwd(temp, smblmpwd); memset((char *)temp, '\0', strlen(temp)+1); - if (!pdb_set_lanman_passwd(sampass, smblmpwd)) + if (!pdb_set_lanman_passwd(sampass, smblmpwd, PDB_SET)) return False; ZERO_STRUCT(smblmpwd); } @@ -860,7 +862,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, } else { pdb_gethexpwd(temp, smbntpwd); memset((char *)temp, '\0', strlen(temp)+1); - if (!pdb_set_nt_passwd(sampass, smbntpwd)) + if (!pdb_set_nt_passwd(sampass, smbntpwd, PDB_SET)) return False; ZERO_STRUCT(smbntpwd); } @@ -873,34 +875,43 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, if (acct_ctrl == 0) acct_ctrl |= ACB_NORMAL; - pdb_set_acct_ctrl(sampass, acct_ctrl); + pdb_set_acct_ctrl(sampass, acct_ctrl, PDB_SET); } - pdb_set_hours_len(sampass, hours_len); - pdb_set_logon_divs(sampass, logon_divs); + pdb_set_hours_len(sampass, hours_len, PDB_SET); + pdb_set_logon_divs(sampass, logon_divs, PDB_SET); - pdb_set_username(sampass, username); + pdb_set_username(sampass, username, PDB_SET); - pdb_set_domain(sampass, domain); - pdb_set_nt_username(sampass, nt_username); + pdb_set_domain(sampass, domain, PDB_DEFAULT); + pdb_set_nt_username(sampass, nt_username, PDB_SET); - pdb_set_munged_dial(sampass, munged_dial); + pdb_set_munged_dial(sampass, munged_dial, PDB_SET); - /* pdb_set_unknown_3(sampass, unknown3); */ - /* pdb_set_unknown_5(sampass, unknown5); */ - /* pdb_set_unknown_6(sampass, unknown6); */ + /* pdb_set_unknown_3(sampass, unknown3, PDB_SET); */ + /* pdb_set_unknown_5(sampass, unknown5, PDB_SET); */ + /* pdb_set_unknown_6(sampass, unknown6, PDB_SET); */ - pdb_set_hours(sampass, hours); + pdb_set_hours(sampass, hours, PDB_SET); return True; } +static BOOL need_ldap_mod(BOOL pdb_add, const SAM_ACCOUNT * sampass, enum pdb_elements element) { + if (pdb_add) { + return (!IS_SAM_DEFAULT(sampass, element)); + } else { + return IS_SAM_CHANGED(sampass, element); + } +} + /********************************************************************** Initialize SAM_ACCOUNT from an LDAP query (Based on init_buffer_from_sam in pdb_tdb.c) *********************************************************************/ static BOOL init_ldap_from_sam (struct ldapsam_privates *ldap_state, LDAPMod *** mods, int ldap_op, + BOOL pdb_add, const SAM_ACCOUNT * sampass) { pstring temp; @@ -917,91 +928,110 @@ static BOOL init_ldap_from_sam (struct ldapsam_privates *ldap_state, * took out adding "objectclass: sambaAccount" * do this on a per-mod basis */ - - make_a_mod(mods, ldap_op, "uid", pdb_get_username(sampass)); - DEBUG(2, ("Setting entry for user: %s\n", pdb_get_username(sampass))); - - if ( pdb_get_user_rid(sampass) ) { - rid = pdb_get_user_rid(sampass); - } else if (IS_SAM_SET(sampass, FLAG_SAM_UID)) { + if (need_ldap_mod(pdb_add, sampass, PDB_USERNAME)) { + make_a_mod(mods, ldap_op, "uid", pdb_get_username(sampass)); + DEBUG(2, ("Setting entry for user: %s\n", pdb_get_username(sampass))); + } + + if ((rid = pdb_get_user_rid(sampass))!=0 ) { + if (need_ldap_mod(pdb_add, sampass, PDB_USERSID)) { + slprintf(temp, sizeof(temp) - 1, "%i", rid); + make_a_mod(mods, ldap_op, "rid", temp); + } + } else if (!IS_SAM_DEFAULT(sampass, PDB_UID)) { rid = fallback_pdb_uid_to_user_rid(pdb_get_uid(sampass)); + slprintf(temp, sizeof(temp) - 1, "%i", rid); + make_a_mod(mods, ldap_op, "rid", temp); } else if (ldap_state->permit_non_unix_accounts) { rid = ldapsam_get_next_available_nua_rid(ldap_state); if (rid == 0) { DEBUG(0, ("NO user RID specified on account %s, and findining next available NUA RID failed, cannot store!\n", pdb_get_username(sampass))); return False; } + slprintf(temp, sizeof(temp) - 1, "%i", rid); + make_a_mod(mods, ldap_op, "rid", temp); } else { DEBUG(0, ("NO user RID specified on account %s, cannot store!\n", pdb_get_username(sampass))); return False; } - slprintf(temp, sizeof(temp) - 1, "%i", rid); - make_a_mod(mods, ldap_op, "rid", temp); - if ( pdb_get_group_rid(sampass) ) { - rid = pdb_get_group_rid(sampass); - } else if (IS_SAM_SET(sampass, FLAG_SAM_GID)) { + + if ((rid = pdb_get_group_rid(sampass))!=0 ) { + if (need_ldap_mod(pdb_add, sampass, PDB_GROUPSID)) { + slprintf(temp, sizeof(temp) - 1, "%i", rid); + make_a_mod(mods, ldap_op, "primaryGroupID", temp); + } + } else if (!IS_SAM_DEFAULT(sampass, PDB_GID)) { rid = pdb_gid_to_group_rid(pdb_get_gid(sampass)); + slprintf(temp, sizeof(temp) - 1, "%i", rid); + make_a_mod(mods, ldap_op, "primaryGroupID", temp); } else if (ldap_state->permit_non_unix_accounts) { rid = DOMAIN_GROUP_RID_USERS; + slprintf(temp, sizeof(temp) - 1, "%i", rid); + make_a_mod(mods, ldap_op, "primaryGroupID", temp); } else { DEBUG(0, ("NO group RID specified on account %s, cannot store!\n", pdb_get_username(sampass))); return False; } - slprintf(temp, sizeof(temp) - 1, "%i", rid); - make_a_mod(mods, ldap_op, "primaryGroupID", temp); /* displayName, cn, and gecos should all be the same * most easily accomplished by giving them the same OID * gecos isn't set here b/c it should be handled by the * add-user script */ - - make_a_mod(mods, ldap_op, "displayName", pdb_get_fullname(sampass)); - make_a_mod(mods, ldap_op, "cn", pdb_get_fullname(sampass)); - make_a_mod(mods, ldap_op, "description", pdb_get_acct_desc(sampass)); - make_a_mod(mods, ldap_op, "userWorkstations", pdb_get_workstations(sampass)); - + if (need_ldap_mod(pdb_add, sampass, PDB_FULLNAME)) { + make_a_mod(mods, ldap_op, "displayName", pdb_get_fullname(sampass)); + make_a_mod(mods, ldap_op, "cn", pdb_get_fullname(sampass)); + } + if (need_ldap_mod(pdb_add, sampass, PDB_ACCTDESC)) { + make_a_mod(mods, ldap_op, "description", pdb_get_acct_desc(sampass)); + } + if (need_ldap_mod(pdb_add, sampass, PDB_WORKSTATIONS)) { + make_a_mod(mods, ldap_op, "userWorkstations", pdb_get_workstations(sampass)); + } /* * Only updates fields which have been set (not defaults from smb.conf) */ - if (IS_SAM_SET(sampass, FLAG_SAM_SMBHOME)) + if (need_ldap_mod(pdb_add, sampass, PDB_SMBHOME)) { make_a_mod(mods, ldap_op, "smbHome", pdb_get_homedir(sampass)); - - if (IS_SAM_SET(sampass, FLAG_SAM_DRIVE)) + } + + if (need_ldap_mod(pdb_add, sampass, PDB_DRIVE)) { make_a_mod(mods, ldap_op, "homeDrive", pdb_get_dir_drive(sampass)); + } - if (IS_SAM_SET(sampass, FLAG_SAM_LOGONSCRIPT)) + if (need_ldap_mod(pdb_add, sampass, PDB_LOGONSCRIPT)) { make_a_mod(mods, ldap_op, "scriptPath", pdb_get_logon_script(sampass)); - - if (IS_SAM_SET(sampass, FLAG_SAM_PROFILE)) + } + + if (need_ldap_mod(pdb_add, sampass, PDB_PROFILE)) make_a_mod(mods, ldap_op, "profilePath", pdb_get_profile_path(sampass)); - if (IS_SAM_SET(sampass, FLAG_SAM_LOGONTIME)) { + if (need_ldap_mod(pdb_add, sampass, PDB_LOGONTIME)) { slprintf(temp, sizeof(temp) - 1, "%li", pdb_get_logon_time(sampass)); make_a_mod(mods, ldap_op, "logonTime", temp); } - if (IS_SAM_SET(sampass, FLAG_SAM_LOGOFFTIME)) { + if (need_ldap_mod(pdb_add, sampass, PDB_LOGOFFTIME)) { slprintf(temp, sizeof(temp) - 1, "%li", pdb_get_logoff_time(sampass)); make_a_mod(mods, ldap_op, "logoffTime", temp); } - if (IS_SAM_SET(sampass, FLAG_SAM_KICKOFFTIME)) { + if (need_ldap_mod(pdb_add, sampass, PDB_KICKOFFTIME)) { slprintf (temp, sizeof (temp) - 1, "%li", pdb_get_kickoff_time(sampass)); make_a_mod(mods, ldap_op, "kickoffTime", temp); } - if (IS_SAM_SET(sampass, FLAG_SAM_CANCHANGETIME)) { + if (need_ldap_mod(pdb_add, sampass, PDB_CANCHANGETIME)) { slprintf (temp, sizeof (temp) - 1, "%li", pdb_get_pass_can_change_time(sampass)); make_a_mod(mods, ldap_op, "pwdCanChange", temp); } - if (IS_SAM_SET(sampass, FLAG_SAM_MUSTCHANGETIME)) { + if (need_ldap_mod(pdb_add, sampass, PDB_MUSTCHANGETIME)) { slprintf (temp, sizeof (temp) - 1, "%li", pdb_get_pass_must_change_time(sampass)); make_a_mod(mods, ldap_op, "pwdMustChange", temp); } @@ -1009,22 +1039,28 @@ static BOOL init_ldap_from_sam (struct ldapsam_privates *ldap_state, if ((pdb_get_acct_ctrl(sampass)&(ACB_WSTRUST|ACB_SVRTRUST|ACB_DOMTRUST))|| (lp_ldap_passwd_sync()!=LDAP_PASSWD_SYNC_ONLY)) { - pdb_sethexpwd (temp, pdb_get_lanman_passwd(sampass), pdb_get_acct_ctrl(sampass)); - make_a_mod (mods, ldap_op, "lmPassword", temp); - - pdb_sethexpwd (temp, pdb_get_nt_passwd(sampass), pdb_get_acct_ctrl(sampass)); - make_a_mod (mods, ldap_op, "ntPassword", temp); - - slprintf (temp, sizeof (temp) - 1, "%li", pdb_get_pass_last_set_time(sampass)); - make_a_mod(mods, ldap_op, "pwdLastSet", temp); - + if (need_ldap_mod(pdb_add, sampass, PDB_LMPASSWD)) { + pdb_sethexpwd (temp, pdb_get_lanman_passwd(sampass), pdb_get_acct_ctrl(sampass)); + make_a_mod (mods, ldap_op, "lmPassword", temp); + } + + if (need_ldap_mod(pdb_add, sampass, PDB_NTPASSWD)) { + pdb_sethexpwd (temp, pdb_get_nt_passwd(sampass), pdb_get_acct_ctrl(sampass)); + make_a_mod (mods, ldap_op, "ntPassword", temp); + } + + if (need_ldap_mod(pdb_add, sampass, PDB_PASSLASTSET)) { + slprintf (temp, sizeof (temp) - 1, "%li", pdb_get_pass_last_set_time(sampass)); + make_a_mod(mods, ldap_op, "pwdLastSet", temp); + } } /* FIXME: Hours stuff goes in LDAP */ - - make_a_mod (mods, ldap_op, "acctFlags", pdb_encode_acct_ctrl (pdb_get_acct_ctrl(sampass), - NEW_PW_FORMAT_SPACE_PADDED_LEN)); - + if (need_ldap_mod(pdb_add, sampass, PDB_ACCTCTRL)) { + make_a_mod (mods, ldap_op, "acctFlags", pdb_encode_acct_ctrl (pdb_get_acct_ctrl(sampass), + NEW_PW_FORMAT_SPACE_PADDED_LEN)); + } + return True; } @@ -1371,14 +1407,27 @@ static NTSTATUS ldapsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT return ldapsam_getsampwrid(my_methods, user, rid); } -static NTSTATUS ldapsam_modify_entry(LDAP *ldap_struct,SAM_ACCOUNT *newpwd,char *dn,LDAPMod **mods,int ldap_op) +/******************************************************************** +Do the actual modification - also change a plaittext passord if +it it set. +**********************************************************************/ + +static NTSTATUS ldapsam_modify_entry(LDAP *ldap_struct,SAM_ACCOUNT *newpwd,char *dn,LDAPMod **mods,int ldap_op, BOOL pdb_add) { NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; int rc; - switch(ldap_op) - { - case LDAP_MOD_ADD: + if (!ldap_struct || !newpwd || !dn) { + return NT_STATUS_INVALID_PARAMETER; + } + + if (!mods) { + DEBUG(5,("mods is empty: nothing to modify\n")); + /* may be password change below however */ + } else { + switch(ldap_op) + { + case LDAP_MOD_ADD: make_a_mod(&mods, LDAP_MOD_ADD, "objectclass", "account"); if((rc = ldap_add_s(ldap_struct,dn,mods))!=LDAP_SUCCESS) { char *ld_error; @@ -1392,7 +1441,7 @@ static NTSTATUS ldapsam_modify_entry(LDAP *ldap_struct,SAM_ACCOUNT *newpwd,char return ret; } break; - case LDAP_MOD_REPLACE: + case LDAP_MOD_REPLACE: if((rc = ldap_modify_s(ldap_struct,dn,mods))!=LDAP_SUCCESS) { char *ld_error; ldap_get_option(ldap_struct, LDAP_OPT_ERROR_STRING, @@ -1405,14 +1454,16 @@ static NTSTATUS ldapsam_modify_entry(LDAP *ldap_struct,SAM_ACCOUNT *newpwd,char return ret; } break; - default: + default: DEBUG(0,("Wrong LDAP operation type: %d!\n",ldap_op)); return ret; + } } #ifdef LDAP_EXOP_X_MODIFY_PASSWD if (!(pdb_get_acct_ctrl(newpwd)&(ACB_WSTRUST|ACB_SVRTRUST|ACB_DOMTRUST))&& (lp_ldap_passwd_sync()!=LDAP_PASSWD_SYNC_OFF)&& + need_ldap_mod(pdb_add, newpwd, PDB_PLAINTEXT_PW)&& (pdb_get_plaintext_passwd(newpwd)!=NULL)) { BerElement *ber; struct berval *bv; @@ -1529,6 +1580,18 @@ static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, SAM_A LDAPMessage *entry; LDAPMod **mods; + if (!init_ldap_from_sam(ldap_state, &mods, LDAP_MOD_REPLACE, False, newpwd)) { + DEBUG(0, ("ldapsam_update_sam_account: init_ldap_from_sam failed!\n")); + ldap_msgfree(result); + ldap_unbind(ldap_struct); + return ret; + } + + if (mods == NULL) { + DEBUG(4,("mods is empty: nothing to update for user: %s\n",pdb_get_username(newpwd))); + return NT_STATUS_OK; + } + if (!ldapsam_open_connection(ldap_state, &ldap_struct)) /* open a connection to the server */ return ret; @@ -1547,18 +1610,11 @@ static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, SAM_A return ret; } - if (!init_ldap_from_sam(ldap_state, &mods, LDAP_MOD_REPLACE, newpwd)) { - DEBUG(0, ("ldapsam_update_sam_account: init_ldap_from_sam failed!\n")); - ldap_msgfree(result); - ldap_unbind(ldap_struct); - return ret; - } - entry = ldap_first_entry(ldap_struct, result); dn = ldap_get_dn(ldap_struct, entry); ldap_msgfree(result); - if (NT_STATUS_IS_ERR(ldapsam_modify_entry(ldap_struct,newpwd,dn,mods,LDAP_MOD_REPLACE))) { + if (NT_STATUS_IS_ERR(ldapsam_modify_entry(ldap_struct,newpwd,dn,mods,LDAP_MOD_REPLACE, False))) { DEBUG(0,("failed to modify user with uid = %s\n", pdb_get_username(newpwd))); ldap_mods_free(mods,1); @@ -1649,17 +1705,23 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO ldap_msgfree(result); - if (!init_ldap_from_sam(ldap_state, &mods, ldap_op, newpwd)) { + if (!init_ldap_from_sam(ldap_state, &mods, ldap_op, True, newpwd)) { DEBUG(0, ("ldapsam_add_sam_account: init_ldap_from_sam failed!\n")); ldap_mods_free(mods, 1); ldap_unbind(ldap_struct); return ret; } + + if (mods == NULL) { + DEBUG(0,("mods is empty: nothing to add for user: %s\n",pdb_get_username(newpwd))); + return ret; + } + make_a_mod(&mods, LDAP_MOD_ADD, "objectclass", "sambaAccount"); - if (NT_STATUS_IS_ERR(ldapsam_modify_entry(ldap_struct,newpwd,dn,mods,ldap_op))) { + if (NT_STATUS_IS_ERR(ldapsam_modify_entry(ldap_struct,newpwd,dn,mods,ldap_op, True))) { DEBUG(0,("failed to modify/add user with uid = %s (dn = %s)\n", - pdb_get_username(newpwd),dn)); + pdb_get_username(newpwd),dn)); ldap_mods_free(mods,1); ldap_unbind(ldap_struct); return ret; diff --git a/source3/passdb/pdb_nisplus.c b/source3/passdb/pdb_nisplus.c index de520b6b14..6334408ef5 100644 --- a/source3/passdb/pdb_nisplus.c +++ b/source3/passdb/pdb_nisplus.c @@ -745,7 +745,7 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, /* Don't change these timestamp settings without a good reason. They are important for NT member server compatibility. */ - pdb_set_logon_time (pw_buf, (time_t) 0, True); + pdb_set_logon_time (pw_buf, (time_t) 0, PDB_DEFAULT); ptr = (uchar *) ENTRY_VAL (obj, NPF_LOGON_T); if (ptr && *ptr && (StrnCaseCmp (ptr, "LNT-", 4) == 0)) { int i; @@ -758,11 +758,11 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, if (i == 8) { pdb_set_logon_time (pw_buf, (time_t) strtol (ptr, NULL, 16), - True); + PDB_SET); } } - pdb_set_logoff_time (pw_buf, get_time_t_max (), True); + pdb_set_logoff_time (pw_buf, get_time_t_max (), PDB_DEFAULT); ptr = (uchar *) ENTRY_VAL (obj, NPF_LOGOFF_T); if (ptr && *ptr && (StrnCaseCmp (ptr, "LOT-", 4) == 0)) { int i; @@ -775,11 +775,11 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, if (i == 8) { pdb_set_logoff_time (pw_buf, (time_t) strtol (ptr, NULL, 16), - True); + PDB_SET); } } - pdb_set_kickoff_time (pw_buf, get_time_t_max (), True); + pdb_set_kickoff_time (pw_buf, get_time_t_max (), PDB_DEFAULT); ptr = (uchar *) ENTRY_VAL (obj, NPF_KICK_T); if (ptr && *ptr && (StrnCaseCmp (ptr, "KOT-", 4) == 0)) { int i; @@ -792,11 +792,11 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, if (i == 8) { pdb_set_kickoff_time (pw_buf, (time_t) strtol (ptr, NULL, 16), - True); + PDB_SET); } } - pdb_set_pass_last_set_time (pw_buf, (time_t) 0); + pdb_set_pass_last_set_time (pw_buf, (time_t) 0, PDB_DEFAULT); ptr = (uchar *) ENTRY_VAL (obj, NPF_PWDLSET_T); if (ptr && *ptr && (StrnCaseCmp (ptr, "LCT-", 4) == 0)) { int i; @@ -810,11 +810,12 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, pdb_set_pass_last_set_time (pw_buf, (time_t) strtol (ptr, NULL, - 16)); + 16), + PDB_SET); } } - pdb_set_pass_can_change_time (pw_buf, (time_t) 0, True); + pdb_set_pass_can_change_time (pw_buf, (time_t) 0, PDB_DEFAULT); ptr = (uchar *) ENTRY_VAL (obj, NPF_PWDCCHG_T); if (ptr && *ptr && (StrnCaseCmp (ptr, "CCT-", 4) == 0)) { int i; @@ -829,11 +830,11 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, (time_t) strtol (ptr, NULL, 16), - True); + PDB_SET); } } - pdb_set_pass_must_change_time (pw_buf, get_time_t_max (), True); /* Password never expires. */ + pdb_set_pass_must_change_time (pw_buf, get_time_t_max (), PDB_DEFAULT); /* Password never expires. */ ptr = (uchar *) ENTRY_VAL (obj, NPF_PWDMCHG_T); if (ptr && *ptr && (StrnCaseCmp (ptr, "MCT-", 4) == 0)) { int i; @@ -848,13 +849,13 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, (time_t) strtol (ptr, NULL, 16), - True); + PDB_SET); } } /* string values */ - pdb_set_username (pw_buf, ENTRY_VAL (obj, NPF_NAME)); - pdb_set_domain (pw_buf, lp_workgroup ()); + pdb_set_username (pw_buf, ENTRY_VAL (obj, NPF_NAME), PDB_SET); + pdb_set_domain (pw_buf, lp_workgroup (), PDB_DEFAULT); /* pdb_set_nt_username() -- cant set it here... */ get_single_attribute (obj, NPF_FULL_NAME, full_name, @@ -862,27 +863,27 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, #if 0 unix_to_dos (full_name, True); #endif - pdb_set_fullname (pw_buf, full_name); + pdb_set_fullname (pw_buf, full_name, PDB_SET); pdb_set_acct_ctrl (pw_buf, pdb_decode_acct_ctrl (ENTRY_VAL (obj, - NPF_ACB))); + NPF_ACB), PDB_SET)); get_single_attribute (obj, NPF_ACCT_DESC, acct_desc, sizeof (pstring)); #if 0 unix_to_dos (acct_desc, True); #endif - pdb_set_acct_desc (pw_buf, acct_desc); + pdb_set_acct_desc (pw_buf, acct_desc, PDB_SET); - pdb_set_workstations (pw_buf, ENTRY_VAL (obj, NPF_WORKSTATIONS)); - pdb_set_munged_dial (pw_buf, NULL); + pdb_set_workstations (pw_buf, ENTRY_VAL (obj, NPF_WORKSTATIONS), PDB_SET); + pdb_set_munged_dial (pw_buf, NULL, PDB_DEFAULT); - pdb_set_uid (pw_buf, atoi (ENTRY_VAL (obj, NPF_UID))); - pdb_set_gid (pw_buf, atoi (ENTRY_VAL (obj, NPF_SMB_GRPID))); + pdb_set_uid (pw_buf, atoi (ENTRY_VAL (obj, NPF_UID)), PDB_SET); + pdb_set_gid (pw_buf, atoi (ENTRY_VAL (obj, NPF_SMB_GRPID)), PDB_SET); pdb_set_user_sid_from_rid (pw_buf, - atoi (ENTRY_VAL (obj, NPF_USER_RID))); + atoi (ENTRY_VAL (obj, NPF_USER_RID)), PDB_SET); pdb_set_group_sid_from_rid (pw_buf, - atoi (ENTRY_VAL (obj, NPF_GROUP_RID))); + atoi (ENTRY_VAL (obj, NPF_GROUP_RID)), PDB_SET); /* values, must exist for user */ if (!(pdb_get_acct_ctrl (pw_buf) & ACB_WSTRUST)) { @@ -891,59 +892,60 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, sizeof (pstring)); if (!(home_dir && *home_dir)) { pstrcpy (home_dir, lp_logon_home ()); - pdb_set_homedir (pw_buf, home_dir, False); + pdb_set_homedir (pw_buf, home_dir, PDB_DEFAULT); } else - pdb_set_homedir (pw_buf, home_dir, True); + pdb_set_homedir (pw_buf, home_dir, PDB_SET); get_single_attribute (obj, NPF_DIR_DRIVE, home_drive, sizeof (pstring)); if (!(home_drive && *home_drive)) { pstrcpy (home_drive, lp_logon_drive ()); - pdb_set_dir_drive (pw_buf, home_drive, False); + pdb_set_dir_drive (pw_buf, home_drive, PDB_DEFAULT); } else - pdb_set_dir_drive (pw_buf, home_drive, True); + pdb_set_dir_drive (pw_buf, home_drive, PDB_SET); get_single_attribute (obj, NPF_LOGON_SCRIPT, logon_script, sizeof (pstring)); if (!(logon_script && *logon_script)) { pstrcpy (logon_script, lp_logon_script ()); + pdb_set_logon_script (pw_buf, logon_script, PDB_DEFAULT); } else - pdb_set_logon_script (pw_buf, logon_script, True); + pdb_set_logon_script (pw_buf, logon_script, PDB_SET); get_single_attribute (obj, NPF_PROFILE_PATH, profile_path, sizeof (pstring)); if (!(profile_path && *profile_path)) { pstrcpy (profile_path, lp_logon_path ()); - pdb_set_profile_path (pw_buf, profile_path, False); + pdb_set_profile_path (pw_buf, profile_path, PDB_DEFAULT); } else - pdb_set_profile_path (pw_buf, profile_path, True); + pdb_set_profile_path (pw_buf, profile_path, PDB_SET); } else { /* lkclXXXX this is OBSERVED behaviour by NT PDCs, enforced here. */ - pdb_set_group_sid_from_rid (pw_buf, DOMAIN_GROUP_RID_USERS); + pdb_set_group_sid_from_rid (pw_buf, DOMAIN_GROUP_RID_USERS, PDB_DEFAULT); } /* Check the lanman password column. */ ptr = (char *) ENTRY_VAL (obj, NPF_LMPWD); - if (!pdb_set_lanman_passwd (pw_buf, NULL)) + if (!pdb_set_lanman_passwd (pw_buf, NULL, PDB_DEFAULT)) return False; if (!strncasecmp (ptr, "NO PASSWORD", 11)) { pdb_set_acct_ctrl (pw_buf, - pdb_get_acct_ctrl (pw_buf) | ACB_PWNOTREQ); + pdb_get_acct_ctrl (pw_buf) | ACB_PWNOTREQ, PDB_SET); } else { if (strlen (ptr) != 32 || !pdb_gethexpwd (ptr, smbpwd)) { DEBUG (0, ("malformed LM pwd entry: %s.\n", pdb_get_username (pw_buf))); return False; } - if (!pdb_set_lanman_passwd (pw_buf, smbpwd)) + if (!pdb_set_lanman_passwd (pw_buf, smbpwd, PDB_SET)) return False; } /* Check the NT password column. */ ptr = ENTRY_VAL (obj, NPF_NTPWD); - if (!pdb_set_nt_passwd (pw_buf, NULL)) + if (!pdb_set_nt_passwd (pw_buf, NULL, PDB_DEFAULT)) return False; if (!(pdb_get_acct_ctrl (pw_buf) & ACB_PWNOTREQ) && @@ -953,12 +955,12 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, uid = %d.\n", pdb_get_uid (pw_buf))); return False; } - if (!pdb_set_nt_passwd (pw_buf, smbntpwd)) + if (!pdb_set_nt_passwd (pw_buf, smbntpwd, PDB_SET)) return False; } - pdb_set_unknown_3 (pw_buf, 0xffffff); /* don't know */ - pdb_set_logon_divs (pw_buf, 168); /* hours per week */ + pdb_set_unknown_3 (pw_buf, 0xffffff, PDB_DEFAULT); /* don't know */ + pdb_set_logon_divs (pw_buf, 168, PDB_DEFAULT); /* hours per week */ if ((hours_len = ENTRY_LEN (obj, NPF_HOURS)) == 21) { memcpy (hours, ENTRY_VAL (obj, NPF_HOURS), hours_len); @@ -967,11 +969,11 @@ static BOOL make_sam_from_nisp_object (SAM_ACCOUNT * pw_buf, /* available at all hours */ memset (hours, 0xff, hours_len); } - pdb_set_hours_len (pw_buf, hours_len); - pdb_set_hours (pw_buf, hours); + pdb_set_hours_len (pw_buf, hours_len, PDB_SET); + pdb_set_hours (pw_buf, hours, PDB_SET); - pdb_set_unknown_5 (pw_buf, 0x00020000); /* don't know */ - pdb_set_unknown_6 (pw_buf, 0x000004ec); /* don't know */ + pdb_set_unknown_5 (pw_buf, 0x00020000, PDB_DEFAULT); /* don't know */ + pdb_set_unknown_6 (pw_buf, 0x000004ec, PDB_DEFAULT); /* don't know */ return True; } diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 257b5fa2aa..94a562fc36 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1204,16 +1204,16 @@ static BOOL build_sam_account(struct smbpasswd_privates *smbpasswd_state, && (pw_buf->smb_userid >= smbpasswd_state->low_nua_userid) && (pw_buf->smb_userid <= smbpasswd_state->high_nua_userid)) { - pdb_set_user_sid_from_rid(sam_pass, fallback_pdb_uid_to_user_rid (pw_buf->smb_userid)); + pdb_set_user_sid_from_rid(sam_pass, fallback_pdb_uid_to_user_rid (pw_buf->smb_userid), PDB_SET); /* lkclXXXX this is OBSERVED behaviour by NT PDCs, enforced here. This was down the bottom for machines, but it looks pretty good as a general default for non-unix users. --abartlet 2002-01-08 */ - pdb_set_group_sid_from_rid (sam_pass, DOMAIN_GROUP_RID_USERS); - pdb_set_username (sam_pass, pw_buf->smb_name); - pdb_set_domain (sam_pass, lp_workgroup()); + pdb_set_group_sid_from_rid (sam_pass, DOMAIN_GROUP_RID_USERS, PDB_SET); + pdb_set_username (sam_pass, pw_buf->smb_name, PDB_SET); + pdb_set_domain (sam_pass, lp_workgroup(), PDB_DEFAULT); } else { pwfile = getpwnam_alloc(pw_buf->smb_name); @@ -1229,18 +1229,18 @@ static BOOL build_sam_account(struct smbpasswd_privates *smbpasswd_state, passwd_free(&pwfile); } - pdb_set_nt_passwd (sam_pass, pw_buf->smb_nt_passwd); - pdb_set_lanman_passwd (sam_pass, pw_buf->smb_passwd); - pdb_set_acct_ctrl (sam_pass, pw_buf->acct_ctrl); - pdb_set_pass_last_set_time (sam_pass, pw_buf->pass_last_set_time); - pdb_set_pass_can_change_time (sam_pass, pw_buf->pass_last_set_time, True); + pdb_set_nt_passwd (sam_pass, pw_buf->smb_nt_passwd, PDB_SET); + pdb_set_lanman_passwd (sam_pass, pw_buf->smb_passwd, PDB_SET); + pdb_set_acct_ctrl (sam_pass, pw_buf->acct_ctrl, PDB_SET); + pdb_set_pass_last_set_time (sam_pass, pw_buf->pass_last_set_time, PDB_SET); + pdb_set_pass_can_change_time (sam_pass, pw_buf->pass_last_set_time, PDB_SET); #if 0 /* JERRY */ /* the smbpasswd format doesn't have a must change time field, so we can't get this right. The best we can do is to set this to some time in the future. 21 days seems as reasonable as any other value :) */ - pdb_set_pass_must_change_time (sam_pass, pw_buf->pass_last_set_time + MAX_PASSWORD_AGE); + pdb_set_pass_must_change_time (sam_pass, pw_buf->pass_last_set_time + MAX_PASSWORD_AGE, PDB_DEFAULT); #endif return True; } diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 241b3298b0..fb01539d3f 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -163,28 +163,28 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, uid = pw->pw_uid; gid = pw->pw_gid; - pdb_set_unix_homedir(sampass, pw->pw_dir); + pdb_set_unix_homedir(sampass, pw->pw_dir, PDB_SET); passwd_free(&pw); - pdb_set_uid(sampass, uid); - pdb_set_gid(sampass, gid); + pdb_set_uid(sampass, uid, PDB_SET); + pdb_set_gid(sampass, gid, PDB_SET); } - pdb_set_logon_time(sampass, logon_time, True); - pdb_set_logoff_time(sampass, logoff_time, True); - pdb_set_kickoff_time(sampass, kickoff_time, True); - pdb_set_pass_can_change_time(sampass, pass_can_change_time, True); - pdb_set_pass_must_change_time(sampass, pass_must_change_time, True); - pdb_set_pass_last_set_time(sampass, pass_last_set_time); + pdb_set_logon_time(sampass, logon_time, PDB_SET); + pdb_set_logoff_time(sampass, logoff_time, PDB_SET); + pdb_set_kickoff_time(sampass, kickoff_time, PDB_SET); + pdb_set_pass_can_change_time(sampass, pass_can_change_time, PDB_SET); + pdb_set_pass_must_change_time(sampass, pass_must_change_time, PDB_SET); + pdb_set_pass_last_set_time(sampass, pass_last_set_time, PDB_SET); - pdb_set_username (sampass, username); - pdb_set_domain (sampass, domain); - pdb_set_nt_username (sampass, nt_username); - pdb_set_fullname (sampass, fullname); + pdb_set_username (sampass, username, PDB_SET); + pdb_set_domain (sampass, domain, PDB_SET); + pdb_set_nt_username (sampass, nt_username, PDB_SET); + pdb_set_fullname (sampass, fullname, PDB_SET); if (homedir) { - pdb_set_homedir(sampass, homedir, True); + pdb_set_homedir(sampass, homedir, PDB_SET); } else { pdb_set_homedir(sampass, @@ -192,69 +192,69 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, lp_logon_home(), username, domain, uid, gid), - False); + PDB_DEFAULT); } if (dir_drive) - pdb_set_dir_drive(sampass, dir_drive, True); + pdb_set_dir_drive(sampass, dir_drive, PDB_SET); else { pdb_set_dir_drive(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_drive(), username, domain, uid, gid), - False); + PDB_DEFAULT); } if (logon_script) - pdb_set_logon_script(sampass, logon_script, True); + pdb_set_logon_script(sampass, logon_script, PDB_SET); else { pdb_set_logon_script(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_script(), username, domain, uid, gid), - False); + PDB_DEFAULT); } if (profile_path) { - pdb_set_profile_path(sampass, profile_path, True); + pdb_set_profile_path(sampass, profile_path, PDB_SET); } else { pdb_set_profile_path(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_path(), username, domain, uid, gid), - False); + PDB_DEFAULT); } - pdb_set_acct_desc (sampass, acct_desc); - pdb_set_workstations (sampass, workstations); - pdb_set_munged_dial (sampass, munged_dial); + pdb_set_acct_desc (sampass, acct_desc, PDB_SET); + pdb_set_workstations (sampass, workstations, PDB_SET); + pdb_set_munged_dial (sampass, munged_dial, PDB_SET); if (lm_pw_ptr && lm_pw_len == LM_HASH_LEN) { - if (!pdb_set_lanman_passwd(sampass, lm_pw_ptr)) { + if (!pdb_set_lanman_passwd(sampass, lm_pw_ptr, PDB_SET)) { ret = False; goto done; } } if (nt_pw_ptr && nt_pw_len == NT_HASH_LEN) { - if (!pdb_set_nt_passwd(sampass, nt_pw_ptr)) { + if (!pdb_set_nt_passwd(sampass, nt_pw_ptr, PDB_SET)) { ret = False; goto done; } } - pdb_set_user_sid_from_rid(sampass, user_rid); - pdb_set_group_sid_from_rid(sampass, group_rid); - pdb_set_unknown_3(sampass, unknown_3); - pdb_set_hours_len(sampass, hours_len); - pdb_set_unknown_5(sampass, unknown_5); - pdb_set_unknown_6(sampass, unknown_6); - pdb_set_acct_ctrl(sampass, acct_ctrl); - pdb_set_logon_divs(sampass, logon_divs); - pdb_set_hours(sampass, hours); + pdb_set_user_sid_from_rid(sampass, user_rid, PDB_SET); + pdb_set_group_sid_from_rid(sampass, group_rid, PDB_SET); + pdb_set_unknown_3(sampass, unknown_3, PDB_SET); + pdb_set_hours_len(sampass, hours_len, PDB_SET); + pdb_set_unknown_5(sampass, unknown_5, PDB_SET); + pdb_set_unknown_6(sampass, unknown_6, PDB_SET); + pdb_set_acct_ctrl(sampass, acct_ctrl, PDB_SET); + pdb_set_logon_divs(sampass, logon_divs, PDB_SET); + pdb_set_hours(sampass, hours, PDB_SET); done: @@ -354,23 +354,23 @@ static uint32 init_buffer_from_sam (struct tdbsam_privates *tdb_state, * Only updates fields which have been set (not defaults from smb.conf) */ - if (IS_SAM_SET(sampass, FLAG_SAM_DRIVE)) + if (!IS_SAM_DEFAULT(sampass, PDB_DRIVE)) dir_drive = pdb_get_dir_drive(sampass); else dir_drive = NULL; if (dir_drive) dir_drive_len = strlen(dir_drive) +1; else dir_drive_len = 0; - if (IS_SAM_SET(sampass, FLAG_SAM_SMBHOME)) homedir = pdb_get_homedir(sampass); + if (!IS_SAM_DEFAULT(sampass, PDB_SMBHOME)) homedir = pdb_get_homedir(sampass); else homedir = NULL; if (homedir) homedir_len = strlen(homedir) +1; else homedir_len = 0; - if (IS_SAM_SET(sampass, FLAG_SAM_LOGONSCRIPT)) logon_script = pdb_get_logon_script(sampass); + if (!IS_SAM_DEFAULT(sampass, PDB_LOGONSCRIPT)) logon_script = pdb_get_logon_script(sampass); else logon_script = NULL; if (logon_script) logon_script_len = strlen(logon_script) +1; else logon_script_len = 0; - if (IS_SAM_SET(sampass, FLAG_SAM_PROFILE)) profile_path = pdb_get_profile_path(sampass); + if (!IS_SAM_DEFAULT(sampass, PDB_PROFILE)) profile_path = pdb_get_profile_path(sampass); else profile_path = NULL; if (profile_path) profile_path_len = strlen(profile_path) +1; else profile_path_len = 0; @@ -421,12 +421,12 @@ static uint32 init_buffer_from_sam (struct tdbsam_privates *tdb_state, lm_pw_len, lm_pw, nt_pw_len, nt_pw, pdb_get_acct_ctrl(sampass), - pdb_get_unknown3(sampass), + pdb_get_unknown_3(sampass), pdb_get_logon_divs(sampass), pdb_get_hours_len(sampass), MAX_HOURS_LEN, pdb_get_hours(sampass), - pdb_get_unknown5(sampass), - pdb_get_unknown6(sampass)); + pdb_get_unknown_5(sampass), + pdb_get_unknown_6(sampass)); /* malloc the space needed */ @@ -460,12 +460,12 @@ static uint32 init_buffer_from_sam (struct tdbsam_privates *tdb_state, lm_pw_len, lm_pw, nt_pw_len, nt_pw, pdb_get_acct_ctrl(sampass), - pdb_get_unknown3(sampass), + pdb_get_unknown_3(sampass), pdb_get_logon_divs(sampass), pdb_get_hours_len(sampass), MAX_HOURS_LEN, pdb_get_hours(sampass), - pdb_get_unknown5(sampass), - pdb_get_unknown6(sampass)); + pdb_get_unknown_5(sampass), + pdb_get_unknown_6(sampass)); /* check to make sure we got it correct */ @@ -781,7 +781,7 @@ static BOOL tdb_update_sam(struct pdb_methods *my_methods, SAM_ACCOUNT* newpwd, goto done; } } - pdb_set_user_sid_from_rid(newpwd, user_rid); + pdb_set_user_sid_from_rid(newpwd, user_rid, PDB_CHANGED); } else { user_rid = tdb_state->low_nua_rid; tdb_ret = tdb_change_uint32_atomic(pwd_tdb, "NUA_RID_COUNTER", &user_rid, RID_MULTIPLIER); @@ -794,7 +794,7 @@ static BOOL tdb_update_sam(struct pdb_methods *my_methods, SAM_ACCOUNT* newpwd, ret = False; goto done; } - pdb_set_user_sid_from_rid(newpwd, user_rid); + pdb_set_user_sid_from_rid(newpwd, user_rid, PDB_CHANGED); } } else { DEBUG (0,("tdb_update_sam: Failing to store a SAM_ACCOUNT for [%s] without a RID\n",pdb_get_username(newpwd))); @@ -811,7 +811,7 @@ static BOOL tdb_update_sam(struct pdb_methods *my_methods, SAM_ACCOUNT* newpwd, goto done; } else { /* This seems like a good default choice for non-unix users */ - pdb_set_group_sid_from_rid(newpwd, DOMAIN_GROUP_RID_USERS); + pdb_set_group_sid_from_rid(newpwd, DOMAIN_GROUP_RID_USERS, PDB_DEFAULT); } } else { DEBUG (0,("tdb_update_sam: Failing to store a SAM_ACCOUNT for [%s] without a primary group RID\n",pdb_get_username(newpwd))); diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index ddf51fcf0b..6b96b79047 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -6061,11 +6061,11 @@ NTSTATUS init_sam_user_info21A(SAM_USER_INFO_21 *usr, SAM_ACCOUNT *pw, DOM_SID * usr->user_rid = user_rid; usr->group_rid = group_rid; usr->acb_info = pdb_get_acct_ctrl(pw); - usr->unknown_3 = pdb_get_unknown3(pw); + usr->unknown_3 = pdb_get_unknown_3(pw); usr->logon_divs = pdb_get_logon_divs(pw); usr->ptr_logon_hrs = pdb_get_hours(pw) ? 1 : 0; - usr->unknown_5 = pdb_get_unknown5(pw); /* 0x0002 0000 */ + usr->unknown_5 = pdb_get_unknown_5(pw); /* 0x0002 0000 */ if (pdb_get_pass_must_change_time(pw) == 0) { usr->passmustchange=PASS_MUST_CHANGE_AT_NEXT_LOGON; @@ -6088,7 +6088,7 @@ NTSTATUS init_sam_user_info21A(SAM_USER_INFO_21 *usr, SAM_ACCOUNT *pw, DOM_SID * init_unistr2(&usr->uni_unknown_str, NULL, len_unknown_str); init_unistr2(&usr->uni_munged_dial, munged_dial, len_munged_dial); - usr->unknown_6 = pdb_get_unknown6(pw); + usr->unknown_6 = pdb_get_unknown_6(pw); usr->padding4 = 0; if (pdb_get_hours(pw)) { diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index 4478729e4d..69d619a2b0 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -433,12 +433,12 @@ NTSTATUS _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET * cred_hash3( pwd, q_u->pwd, p->dc.sess_key, 0); /* lies! nt and lm passwords are _not_ the same: don't care */ - if (!pdb_set_lanman_passwd (sampass, pwd)) { + if (!pdb_set_lanman_passwd (sampass, pwd, PDB_CHANGED)) { pdb_free_sam(&sampass); return NT_STATUS_NO_MEMORY; } - if (!pdb_set_nt_passwd (sampass, pwd)) { + if (!pdb_set_nt_passwd (sampass, pwd, PDB_CHANGED)) { pdb_free_sam(&sampass); return NT_STATUS_NO_MEMORY; } diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 6b7318a325..686614e9a4 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -205,8 +205,8 @@ static void samr_clear_sam_passwd(SAM_ACCOUNT *sam_pass) /* These now zero out the old password */ - pdb_set_lanman_passwd(sam_pass, NULL); - pdb_set_nt_passwd(sam_pass, NULL); + pdb_set_lanman_passwd(sam_pass, NULL, PDB_DEFAULT); + pdb_set_nt_passwd(sam_pass, NULL, PDB_DEFAULT); } @@ -2288,13 +2288,13 @@ NTSTATUS _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_ return nt_status; } - if (!pdb_set_username(sam_pass, account)) { + if (!pdb_set_username(sam_pass, account, PDB_CHANGED)) { pdb_free_sam(&sam_pass); return NT_STATUS_NO_MEMORY; } } - pdb_set_acct_ctrl(sam_pass, acb_info); + pdb_set_acct_ctrl(sam_pass, acb_info, PDB_CHANGED); if (!pdb_add_sam_account(sam_pass)) { pdb_free_sam(&sam_pass); @@ -2675,8 +2675,9 @@ static BOOL set_user_info_10(const SAM_USER_INFO_10 *id10, DOM_SID *sid) pdb_free_sam(&pwd); return False; } - - if (!pdb_set_acct_ctrl(pwd, id10->acb_info)) { + + /* FIX ME: check if the value is really changed --metze */ + if (!pdb_set_acct_ctrl(pwd, id10->acb_info, PDB_CHANGED)) { pdb_free_sam(&pwd); return False; } @@ -2712,11 +2713,11 @@ static BOOL set_user_info_12(SAM_USER_INFO_12 *id12, DOM_SID *sid) return False; } - if (!pdb_set_lanman_passwd (pwd, id12->lm_pwd)) { + if (!pdb_set_lanman_passwd (pwd, id12->lm_pwd, PDB_CHANGED)) { pdb_free_sam(&pwd); return False; } - if (!pdb_set_nt_passwd (pwd, id12->nt_pwd)) { + if (!pdb_set_nt_passwd (pwd, id12->nt_pwd, PDB_CHANGED)) { pdb_free_sam(&pwd); return False; } diff --git a/source3/rpc_server/srv_samr_util.c b/source3/rpc_server/srv_samr_util.c index 18297056d6..2a43155c10 100644 --- a/source3/rpc_server/srv_samr_util.c +++ b/source3/rpc_server/srv_samr_util.c @@ -47,14 +47,14 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) stored_time = pdb_get_logon_time(to); DEBUG(10,("INFO_21 LOGON_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_logon_time(to, unix_time, True); + pdb_set_logon_time(to, unix_time, PDB_CHANGED); } if (!nt_time_is_zero(&from->logoff_time)) { unix_time=nt_time_to_unix(&from->logoff_time); stored_time = pdb_get_logoff_time(to); DEBUG(10,("INFO_21 LOGOFF_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_logoff_time(to, unix_time, True); + pdb_set_logoff_time(to, unix_time, PDB_CHANGED); } if (!nt_time_is_zero(&from->kickoff_time)) { @@ -62,7 +62,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) stored_time = pdb_get_kickoff_time(to); DEBUG(10,("INFO_21 KICKOFF_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_kickoff_time(to, unix_time , True); + pdb_set_kickoff_time(to, unix_time , PDB_CHANGED); } if (!nt_time_is_zero(&from->pass_can_change_time)) { @@ -70,14 +70,14 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) stored_time = pdb_get_pass_can_change_time(to); DEBUG(10,("INFO_21 PASS_CAN_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_pass_can_change_time(to, unix_time, True); + pdb_set_pass_can_change_time(to, unix_time, PDB_CHANGED); } if (!nt_time_is_zero(&from->pass_last_set_time)) { unix_time=nt_time_to_unix(&from->pass_last_set_time); stored_time = pdb_get_pass_last_set_time(to); DEBUG(10,("INFO_21 PASS_LAST_SET: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_pass_last_set_time(to, unix_time); + pdb_set_pass_last_set_time(to, unix_time, PDB_CHANGED); } if (!nt_time_is_zero(&from->pass_must_change_time)) { @@ -85,7 +85,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) stored_time=pdb_get_pass_must_change_time(to); DEBUG(10,("INFO_21 PASS_MUST_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_pass_must_change_time(to, unix_time, True); + pdb_set_pass_must_change_time(to, unix_time, PDB_CHANGED); } /* Backend should check this for sainity */ @@ -94,7 +94,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) new_string = pdb_unistr2_convert(&from->uni_user_name); DEBUG(10,("INFO_21 UNI_USER_NAME: %s -> %s\n", old_string, new_string)); if (STRING_CHANGED) - pdb_set_username(to , new_string); + pdb_set_username(to , new_string, PDB_CHANGED); } if (from->hdr_full_name.buffer) { @@ -102,7 +102,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) new_string = pdb_unistr2_convert(&from->uni_user_name); DEBUG(10,("INFO_21 UNI_FULL_NAME: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) - pdb_set_fullname(to , new_string); + pdb_set_fullname(to , new_string, PDB_CHANGED); } if (from->hdr_home_dir.buffer) { @@ -110,7 +110,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) new_string = pdb_unistr2_convert(&from->uni_home_dir); DEBUG(10,("INFO_21 UNI_HOME_DIR: %s -> %s\n",old_string,new_string)); if (STRING_CHANGED) - pdb_set_homedir(to , new_string, True); + pdb_set_homedir(to , new_string, PDB_CHANGED); } if (from->hdr_dir_drive.buffer) { @@ -118,7 +118,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) new_string = pdb_unistr2_convert(&from->uni_dir_drive); DEBUG(10,("INFO_21 UNI_DIR_DRIVE: %s -> %s\n",old_string,new_string)); if (STRING_CHANGED) - pdb_set_dir_drive(to , new_string, True); + pdb_set_dir_drive(to , new_string, PDB_CHANGED); } if (from->hdr_logon_script.buffer) { @@ -126,7 +126,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) new_string = pdb_unistr2_convert(&from->uni_logon_script); DEBUG(10,("INFO_21 UNI_LOGON_SCRIPT: %s -> %s\n",old_string,new_string)); if (STRING_CHANGED) - pdb_set_logon_script(to , new_string, True); + pdb_set_logon_script(to , new_string, PDB_CHANGED); } if (from->hdr_profile_path.buffer) { @@ -134,7 +134,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) new_string = pdb_unistr2_convert(&from->uni_profile_path); DEBUG(10,("INFO_21 UNI_PROFILE_PATH: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) - pdb_set_profile_path(to , new_string, True); + pdb_set_profile_path(to , new_string, PDB_CHANGED); } if (from->hdr_acct_desc.buffer) { @@ -142,7 +142,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) new_string = pdb_unistr2_convert(&from->uni_acct_desc); DEBUG(10,("INFO_21 UNI_ACCT_DESC: %s -> %s\n",old_string,new_string)); if (STRING_CHANGED) - pdb_set_acct_desc(to , new_string); + pdb_set_acct_desc(to , new_string, PDB_CHANGED); } if (from->hdr_workstations.buffer) { @@ -150,7 +150,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) new_string = pdb_unistr2_convert(&from->uni_workstations); DEBUG(10,("INFO_21 UNI_WORKSTATIONS: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) - pdb_set_workstations(to , new_string); + pdb_set_workstations(to , new_string, PDB_CHANGED); } if (from->hdr_unknown_str.buffer) { @@ -158,7 +158,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) new_string = pdb_unistr2_convert(&from->uni_unknown_str); DEBUG(10,("INFO_21 UNI_UNKNOWN_STR: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) - pdb_set_unknown_str(to , new_string); + pdb_set_unknown_str(to , new_string, PDB_CHANGED); } if (from->hdr_munged_dial.buffer) { @@ -166,40 +166,53 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) new_string = pdb_unistr2_convert(&from->uni_munged_dial); DEBUG(10,("INFO_21 UNI_MUNGED_DIAL: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) - pdb_set_munged_dial(to , new_string); + pdb_set_munged_dial(to , new_string, PDB_CHANGED); } - if (from->user_rid) { + if (from->user_rid != pdb_get_user_rid(to)) { DEBUG(10,("INFO_21 USER_RID: %u -> %u NOT UPDATED!\n",pdb_get_user_rid(to),from->user_rid)); /* we really allow this ??? metze */ - /* pdb_set_user_sid_from_rid(to, from->user_rid);*/ + /* pdb_set_user_sid_from_rid(to, from->user_rid, PDB_CHANGED);*/ } - if (from->group_rid) { + if (from->group_rid != pdb_get_group_rid(to)) { DEBUG(10,("INFO_21 GROUP_RID: %u -> %u\n",pdb_get_group_rid(to),from->group_rid)); - pdb_set_group_sid_from_rid(to, from->group_rid); + pdb_set_group_sid_from_rid(to, from->group_rid, PDB_CHANGED); } DEBUG(10,("INFO_21 ACCT_CTRL: %08X -> %08X\n",pdb_get_acct_ctrl(to),from->acb_info)); - pdb_set_acct_ctrl(to, from->acb_info); + if (from->acb_info != pdb_get_acct_ctrl(to)) { + pdb_set_acct_ctrl(to, from->acb_info, PDB_CHANGED); + } - DEBUG(10,("INFO_21 UNKOWN_3: %08X -> %08X\n",pdb_get_unknown3(to),from->unknown_3)); - pdb_set_unknown_3(to, from->unknown_3); - + DEBUG(10,("INFO_21 UNKOWN_3: %08X -> %08X\n",pdb_get_unknown_3(to),from->unknown_3)); + if (from->unknown_3 != pdb_get_unknown_3(to)) { + pdb_set_unknown_3(to, from->unknown_3, PDB_CHANGED); + } DEBUG(15,("INFO_21 LOGON_DIVS: %08X -> %08X\n",pdb_get_logon_divs(to),from->logon_divs)); - pdb_set_logon_divs(to, from->logon_divs); + if (from->logon_divs != pdb_get_logon_divs(to)) { + pdb_set_logon_divs(to, from->logon_divs, PDB_CHANGED); + } DEBUG(15,("INFO_21 LOGON_HRS.LEN: %08X -> %08X\n",pdb_get_hours_len(to),from->logon_hrs.len)); - pdb_set_hours_len(to, from->logon_hrs.len); + if (from->logon_hrs.len != pdb_get_hours_len(to)) { + pdb_set_hours_len(to, from->logon_hrs.len, PDB_CHANGED); + } + DEBUG(15,("INFO_21 LOGON_HRS.HOURS: %s -> %s\n",pdb_get_hours(to),from->logon_hrs.hours)); - pdb_set_hours(to, from->logon_hrs.hours); +/* Fix me: only update if it changes --metze */ + pdb_set_hours(to, from->logon_hrs.hours, PDB_CHANGED); - DEBUG(10,("INFO_21 UNKOWN_5: %08X -> %08X\n",pdb_get_unknown5(to),from->unknown_5)); - pdb_set_unknown_5(to, from->unknown_5); + DEBUG(10,("INFO_21 UNKOWN_5: %08X -> %08X\n",pdb_get_unknown_5(to),from->unknown_5)); + if (from->unknown_5 != pdb_get_unknown_5(to)) { + pdb_set_unknown_5(to, from->unknown_5, PDB_CHANGED); + } - DEBUG(10,("INFO_21 UNKOWN_6: %08X -> %08X\n",pdb_get_unknown6(to),from->unknown_6)); - pdb_set_unknown_6(to, from->unknown_6); + DEBUG(10,("INFO_21 UNKOWN_6: %08X -> %08X\n",pdb_get_unknown_6(to),from->unknown_6)); + if (from->unknown_6 != pdb_get_unknown_6(to)) { + pdb_set_unknown_6(to, from->unknown_6, PDB_CHANGED); + } DEBUG(10,("INFO_21 PADDING1 %02X %02X %02X %02X %02X %02X\n", from->padding1[0], @@ -211,7 +224,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) DEBUG(10,("INFO_21 PASS_MUST_CHANGE_AT_NEXT_LOGON: %02X\n",from->passmustchange)); if (from->passmustchange==PASS_MUST_CHANGE_AT_NEXT_LOGON) { - pdb_set_pass_must_change_time(to,0, True); + pdb_set_pass_must_change_time(to,0, PDB_CHANGED); } DEBUG(10,("INFO_21 PADDING_2: %02X\n",from->padding2)); @@ -236,14 +249,14 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) stored_time = pdb_get_logon_time(to); DEBUG(10,("INFO_23 LOGON_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_logon_time(to, unix_time, True); + pdb_set_logon_time(to, unix_time, PDB_CHANGED); } if (!nt_time_is_zero(&from->logoff_time)) { unix_time=nt_time_to_unix(&from->logoff_time); stored_time = pdb_get_logoff_time(to); DEBUG(10,("INFO_23 LOGOFF_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_logoff_time(to, unix_time, True); + pdb_set_logoff_time(to, unix_time, PDB_CHANGED); } if (!nt_time_is_zero(&from->kickoff_time)) { @@ -251,7 +264,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) stored_time = pdb_get_kickoff_time(to); DEBUG(10,("INFO_23 KICKOFF_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_kickoff_time(to, unix_time , True); + pdb_set_kickoff_time(to, unix_time , PDB_CHANGED); } if (!nt_time_is_zero(&from->pass_can_change_time)) { @@ -259,14 +272,14 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) stored_time = pdb_get_pass_can_change_time(to); DEBUG(10,("INFO_23 PASS_CAN_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_pass_can_change_time(to, unix_time, True); + pdb_set_pass_can_change_time(to, unix_time, PDB_CHANGED); } if (!nt_time_is_zero(&from->pass_last_set_time)) { unix_time=nt_time_to_unix(&from->pass_last_set_time); stored_time = pdb_get_pass_last_set_time(to); DEBUG(10,("INFO_23 PASS_LAST_SET: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_pass_last_set_time(to, unix_time); + pdb_set_pass_last_set_time(to, unix_time, PDB_CHANGED); } if (!nt_time_is_zero(&from->pass_must_change_time)) { @@ -274,7 +287,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) stored_time=pdb_get_pass_must_change_time(to); DEBUG(10,("INFO_23 PASS_MUST_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) - pdb_set_pass_must_change_time(to, unix_time, True); + pdb_set_pass_must_change_time(to, unix_time, PDB_CHANGED); } /* Backend should check this for sainity */ @@ -283,7 +296,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) new_string = pdb_unistr2_convert(&from->uni_user_name); DEBUG(10,("INFO_23 UNI_USER_NAME: %s -> %s\n", old_string, new_string)); if (STRING_CHANGED) - pdb_set_username(to , new_string); + pdb_set_username(to , new_string, PDB_CHANGED); } if (from->hdr_full_name.buffer) { @@ -291,7 +304,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) new_string = pdb_unistr2_convert(&from->uni_user_name); DEBUG(10,("INFO_23 UNI_FULL_NAME: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) - pdb_set_fullname(to , new_string); + pdb_set_fullname(to , new_string, PDB_CHANGED); } if (from->hdr_home_dir.buffer) { @@ -299,7 +312,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) new_string = pdb_unistr2_convert(&from->uni_home_dir); DEBUG(10,("INFO_23 UNI_HOME_DIR: %s -> %s\n",old_string,new_string)); if (STRING_CHANGED) - pdb_set_homedir(to , new_string, True); + pdb_set_homedir(to , new_string, PDB_CHANGED); } if (from->hdr_dir_drive.buffer) { @@ -307,7 +320,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) new_string = pdb_unistr2_convert(&from->uni_dir_drive); DEBUG(10,("INFO_23 UNI_DIR_DRIVE: %s -> %s\n",old_string,new_string)); if (STRING_CHANGED) - pdb_set_dir_drive(to , new_string, True); + pdb_set_dir_drive(to , new_string, PDB_CHANGED); } if (from->hdr_logon_script.buffer) { @@ -315,7 +328,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) new_string = pdb_unistr2_convert(&from->uni_logon_script); DEBUG(10,("INFO_23 UNI_LOGON_SCRIPT: %s -> %s\n",old_string,new_string)); if (STRING_CHANGED) - pdb_set_logon_script(to , new_string, True); + pdb_set_logon_script(to , new_string, PDB_CHANGED); } if (from->hdr_profile_path.buffer) { @@ -323,7 +336,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) new_string = pdb_unistr2_convert(&from->uni_profile_path); DEBUG(10,("INFO_23 UNI_PROFILE_PATH: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) - pdb_set_profile_path(to , new_string, True); + pdb_set_profile_path(to , new_string, PDB_CHANGED); } if (from->hdr_acct_desc.buffer) { @@ -331,7 +344,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) new_string = pdb_unistr2_convert(&from->uni_acct_desc); DEBUG(10,("INFO_23 UNI_ACCT_DESC: %s -> %s\n",old_string,new_string)); if (STRING_CHANGED) - pdb_set_acct_desc(to , new_string); + pdb_set_acct_desc(to , new_string, PDB_CHANGED); } if (from->hdr_workstations.buffer) { @@ -339,7 +352,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) new_string = pdb_unistr2_convert(&from->uni_workstations); DEBUG(10,("INFO_23 UNI_WORKSTATIONS: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) - pdb_set_workstations(to , new_string); + pdb_set_workstations(to , new_string, PDB_CHANGED); } if (from->hdr_unknown_str.buffer) { @@ -347,7 +360,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) new_string = pdb_unistr2_convert(&from->uni_unknown_str); DEBUG(10,("INFO_23 UNI_UNKNOWN_STR: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) - pdb_set_unknown_str(to , new_string); + pdb_set_unknown_str(to , new_string, PDB_CHANGED); } if (from->hdr_munged_dial.buffer) { @@ -355,40 +368,53 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) new_string = pdb_unistr2_convert(&from->uni_munged_dial); DEBUG(10,("INFO_23 UNI_MUNGED_DIAL: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) - pdb_set_munged_dial(to , new_string); + pdb_set_munged_dial(to , new_string, PDB_CHANGED); } - if (from->user_rid) { + if (from->user_rid != pdb_get_user_rid(to)) { DEBUG(10,("INFO_23 USER_RID: %u -> %u NOT UPDATED!\n",pdb_get_user_rid(to),from->user_rid)); /* we really allow this ??? metze */ - /* pdb_set_user_sid_from_rid(to, from->user_rid);*/ + /* pdb_set_user_sid_from_rid(to, from->user_rid, PDB_CHANGED);*/ } - if (from->group_rid) { + if (from->group_rid != pdb_get_group_rid(to)) { DEBUG(10,("INFO_23 GROUP_RID: %u -> %u\n",pdb_get_group_rid(to),from->group_rid)); - pdb_set_group_sid_from_rid(to, from->group_rid); + pdb_set_group_sid_from_rid(to, from->group_rid, PDB_CHANGED); } DEBUG(10,("INFO_23 ACCT_CTRL: %08X -> %08X\n",pdb_get_acct_ctrl(to),from->acb_info)); - pdb_set_acct_ctrl(to, from->acb_info); + if (from->acb_info != pdb_get_acct_ctrl(to)) { + pdb_set_acct_ctrl(to, from->acb_info, PDB_CHANGED); + } - DEBUG(10,("INFO_23 UNKOWN_3: %08X -> %08X\n",pdb_get_unknown3(to),from->unknown_3)); - pdb_set_unknown_3(to, from->unknown_3); - + DEBUG(10,("INFO_23 UNKOWN_3: %08X -> %08X\n",pdb_get_unknown_3(to),from->unknown_3)); + if (from->unknown_3 != pdb_get_unknown_3(to)) { + pdb_set_unknown_3(to, from->unknown_3, PDB_CHANGED); + } DEBUG(15,("INFO_23 LOGON_DIVS: %08X -> %08X\n",pdb_get_logon_divs(to),from->logon_divs)); - pdb_set_logon_divs(to, from->logon_divs); + if (from->logon_divs != pdb_get_logon_divs(to)) { + pdb_set_logon_divs(to, from->logon_divs, PDB_CHANGED); + } DEBUG(15,("INFO_23 LOGON_HRS.LEN: %08X -> %08X\n",pdb_get_hours_len(to),from->logon_hrs.len)); - pdb_set_hours_len(to, from->logon_hrs.len); + if (from->logon_hrs.len != pdb_get_hours_len(to)) { + pdb_set_hours_len(to, from->logon_hrs.len, PDB_CHANGED); + } + DEBUG(15,("INFO_23 LOGON_HRS.HOURS: %s -> %s\n",pdb_get_hours(to),from->logon_hrs.hours)); - pdb_set_hours(to, from->logon_hrs.hours); +/* Fix me: only update if it changes --metze */ + pdb_set_hours(to, from->logon_hrs.hours, PDB_CHANGED); - DEBUG(10,("INFO_23 UNKOWN_5: %08X -> %08X\n",pdb_get_unknown5(to),from->unknown_5)); - pdb_set_unknown_5(to, from->unknown_5); + DEBUG(10,("INFO_23 UNKOWN_5: %08X -> %08X\n",pdb_get_unknown_5(to),from->unknown_5)); + if (from->unknown_5 != pdb_get_unknown_5(to)) { + pdb_set_unknown_5(to, from->unknown_5, PDB_CHANGED); + } - DEBUG(10,("INFO_23 UNKOWN_6: %08X -> %08X\n",pdb_get_unknown6(to),from->unknown_6)); - pdb_set_unknown_6(to, from->unknown_6); + DEBUG(10,("INFO_23 UNKOWN_6: %08X -> %08X\n",pdb_get_unknown_6(to),from->unknown_6)); + if (from->unknown_6 != pdb_get_unknown_6(to)) { + pdb_set_unknown_6(to, from->unknown_6, PDB_CHANGED); + } DEBUG(10,("INFO_23 PADDING1 %02X %02X %02X %02X %02X %02X\n", from->padding1[0], @@ -400,7 +426,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) DEBUG(10,("INFO_23 PASS_MUST_CHANGE_AT_NEXT_LOGON: %02X\n",from->passmustchange)); if (from->passmustchange==PASS_MUST_CHANGE_AT_NEXT_LOGON) { - pdb_set_pass_must_change_time(to,0, True); + pdb_set_pass_must_change_time(to,0, PDB_CHANGED); } DEBUG(10,("INFO_23 PADDING_2: %02X\n",from->padding2)); diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index 9e593b022e..a5274862fc 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -707,11 +707,11 @@ BOOL change_lanman_password(SAM_ACCOUNT *sampass, uchar * pass1, D_P16(pwd, pass2, unenc_new_pw); } - if (!pdb_set_lanman_passwd(sampass, unenc_new_pw)) { + if (!pdb_set_lanman_passwd(sampass, unenc_new_pw, PDB_CHANGED)) { return False; } - if (!pdb_set_nt_passwd (sampass, NULL)) { + if (!pdb_set_nt_passwd (sampass, NULL, PDB_CHANGED)) { return False; /* We lose the NT hash. Sorry. */ } diff --git a/source3/smbd/password.c b/source3/smbd/password.c index f2956237dd..1e87065e31 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -134,7 +134,7 @@ int register_vuid(auth_serversupplied_info *server_info, const char *smb_name) * the new real sam db won't have reference to unix uids or gids */ if (!IS_SAM_UNIX_USER(server_info->sam_account)) { - DEBUG(0,("Attempted session setup with invalid user. No uid/gid in SAM_ACCOUNT (flags:%x)\n", pdb_get_init_flag(server_info->sam_account))); + DEBUG(0,("Attempted session setup with invalid user. No uid/gid in SAM_ACCOUNT\n")); free(vuser); return UID_FIELD_INVALID; } diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 00e5dee0ce..af778fcc0a 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -199,62 +199,62 @@ sam_account_from_delta(SAM_ACCOUNT *account, SAM_ACCOUNT_INFO *delta) desc, workstations, profile. */ unistr2_to_ascii(s, &delta->uni_acct_name, sizeof(s) - 1); - pdb_set_nt_username(account, s); + pdb_set_nt_username(account, s, PDB_CHANGED); /* Unix username is the same - for sainity */ - pdb_set_username(account, s); + pdb_set_username(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_full_name, sizeof(s) - 1); - pdb_set_fullname(account, s); + pdb_set_fullname(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_home_dir, sizeof(s) - 1); - pdb_set_homedir(account, s, True); + pdb_set_homedir(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_dir_drive, sizeof(s) - 1); - pdb_set_dir_drive(account, s, True); + pdb_set_dir_drive(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_logon_script, sizeof(s) - 1); - pdb_set_logon_script(account, s, True); + pdb_set_logon_script(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_acct_desc, sizeof(s) - 1); - pdb_set_acct_desc(account, s); + pdb_set_acct_desc(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_workstations, sizeof(s) - 1); - pdb_set_workstations(account, s); + pdb_set_workstations(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_profile, sizeof(s) - 1); - pdb_set_profile_path(account, s, True); + pdb_set_profile_path(account, s, PDB_CHANGED); /* User and group sid */ - pdb_set_user_sid_from_rid(account, delta->user_rid); - pdb_set_group_sid_from_rid(account, delta->group_rid); + pdb_set_user_sid_from_rid(account, delta->user_rid, PDB_CHANGED); + pdb_set_group_sid_from_rid(account, delta->group_rid, PDB_CHANGED); /* Logon and password information */ - pdb_set_logon_time(account, nt_time_to_unix(&delta->logon_time), True); + pdb_set_logon_time(account, nt_time_to_unix(&delta->logon_time), PDB_CHANGED); pdb_set_logoff_time(account, nt_time_to_unix(&delta->logoff_time), - True); - pdb_set_logon_divs(account, delta->logon_divs); + PDB_CHANGED); + pdb_set_logon_divs(account, delta->logon_divs, PDB_CHANGED); /* TODO: logon hours */ /* TODO: bad password count */ /* TODO: logon count */ pdb_set_pass_last_set_time( - account, nt_time_to_unix(&delta->pwd_last_set_time)); + account, nt_time_to_unix(&delta->pwd_last_set_time), PDB_CHANGED); - pdb_set_kickoff_time(account, get_time_t_max(), True); + pdb_set_kickoff_time(account, get_time_t_max(), PDB_CHANGED); /* Decode hashes from password hash */ sam_pwd_hash(delta->user_rid, delta->pass.buf_lm_pwd, lm_passwd, 0); sam_pwd_hash(delta->user_rid, delta->pass.buf_nt_pwd, nt_passwd, 0); - pdb_set_nt_passwd(account, nt_passwd); - pdb_set_lanman_passwd(account, lm_passwd); + pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED); + pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED); /* TODO: account expiry time */ - pdb_set_acct_ctrl(account, delta->acb_info); + pdb_set_acct_ctrl(account, delta->acb_info, PDB_CHANGED); return NT_STATUS_OK; } diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 9508e6db7c..0151b6b153 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -247,15 +247,15 @@ static int set_user_info (struct pdb_context *in, char *username, char *fullname } if (fullname) - pdb_set_fullname(sam_pwent, fullname); + pdb_set_fullname(sam_pwent, fullname, PDB_CHANGED); if (homedir) - pdb_set_homedir(sam_pwent, homedir, True); + pdb_set_homedir(sam_pwent, homedir, PDB_CHANGED); if (drive) - pdb_set_dir_drive(sam_pwent,drive, True); + pdb_set_dir_drive(sam_pwent,drive, PDB_CHANGED); if (script) - pdb_set_logon_script(sam_pwent, script, True); + pdb_set_logon_script(sam_pwent, script, PDB_CHANGED); if (profile) - pdb_set_profile_path (sam_pwent, profile, True); + pdb_set_profile_path (sam_pwent, profile, PDB_CHANGED); if (NT_STATUS_IS_OK(in->pdb_update_sam_account (in, sam_pwent))) print_user_info (in, username, True, False); @@ -285,7 +285,7 @@ static int new_user (struct pdb_context *in, char *username, char *fullname, cha } else { fprintf (stderr, "WARNING: user %s does not exist in system passwd\n", username); pdb_init_sam(&sam_pwent); - if (!pdb_set_username(sam_pwent, username)) { + if (!pdb_set_username(sam_pwent, username, PDB_CHANGED)) { return False; } } @@ -313,17 +313,17 @@ static int new_user (struct pdb_context *in, char *username, char *fullname, cha SAFE_FREE(password2); if (fullname) - pdb_set_fullname(sam_pwent, fullname); + pdb_set_fullname(sam_pwent, fullname, PDB_CHANGED); if (homedir) - pdb_set_homedir (sam_pwent, homedir, True); + pdb_set_homedir (sam_pwent, homedir, PDB_CHANGED); if (drive) - pdb_set_dir_drive (sam_pwent, drive, True); + pdb_set_dir_drive (sam_pwent, drive, PDB_CHANGED); if (script) - pdb_set_logon_script(sam_pwent, script, True); + pdb_set_logon_script(sam_pwent, script, PDB_CHANGED); if (profile) - pdb_set_profile_path (sam_pwent, profile, True); + pdb_set_profile_path (sam_pwent, profile, PDB_CHANGED); - pdb_set_acct_ctrl (sam_pwent, ACB_NORMAL); + pdb_set_acct_ctrl (sam_pwent, ACB_NORMAL, PDB_CHANGED); if (NT_STATUS_IS_OK(in->pdb_add_sam_account (in, sam_pwent))) { print_user_info (in, username, True, False); @@ -361,11 +361,11 @@ static int new_machine (struct pdb_context *in, char *machinename) pdb_set_plaintext_passwd (sam_pwent, password); - pdb_set_username (sam_pwent, name); + pdb_set_username (sam_pwent, name, PDB_CHANGED); - pdb_set_acct_ctrl (sam_pwent, ACB_WSTRUST); + pdb_set_acct_ctrl (sam_pwent, ACB_WSTRUST, PDB_CHANGED); - pdb_set_group_sid_from_rid(sam_pwent, DOMAIN_GROUP_RID_COMPUTERS); + pdb_set_group_sid_from_rid(sam_pwent, DOMAIN_GROUP_RID_COMPUTERS, PDB_CHANGED); if (NT_STATUS_IS_OK(in->pdb_add_sam_account (in, sam_pwent))) { print_user_info (in, name, True, False); -- cgit From 4d0a35c55e41648cef0213bea6ae4795feca0787 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 14 Oct 2002 12:09:13 +0000 Subject: In my test, sync_context simply has to be incremented. Can somebody with a large domain do a net rpc samdump to verify this? Without this change, I don't get everything from a NT4 SP1 and SP6 PDC. Volker (This used to be commit f6a9180a5ff62932de0d4f890092b0d8281e9d6e) --- source3/utils/net_rpc_samsync.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'source3') diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index af778fcc0a..4b0163bcf5 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -111,7 +111,7 @@ static void display_sam_entry(SAM_DELTA_HDR *hdr_delta, SAM_DELTA_CTR *delta) static void dump_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret_creds) { - unsigned last_rid = -1; + unsigned sync_context = 0; NTSTATUS result; int i; TALLOC_CTX *mem_ctx; @@ -126,15 +126,15 @@ static void dump_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret d_printf("Dumping database %u\n", db_type); do { - result = cli_netlogon_sam_sync(cli, mem_ctx, ret_creds, db_type, last_rid+1, + result = cli_netlogon_sam_sync(cli, mem_ctx, ret_creds, db_type, + sync_context, &num_deltas, &hdr_deltas, &deltas); clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), ret_creds); - last_rid = 0; for (i = 0; i < num_deltas; i++) { display_sam_entry(&hdr_deltas[i], &deltas[i]); - last_rid = hdr_deltas[i].target_rid; } - } while (last_rid && NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)); + sync_context += 1; + } while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)); talloc_destroy(mem_ctx); } @@ -620,7 +620,7 @@ static void fetch_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret_creds, DOM_SID dom_sid) { - unsigned last_rid = -1; + unsigned sync_context = 0; NTSTATUS result; int i; TALLOC_CTX *mem_ctx; @@ -636,17 +636,16 @@ fetch_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret_creds, do { result = cli_netlogon_sam_sync(cli, mem_ctx, ret_creds, - db_type, last_rid+1, + db_type, sync_context, &num_deltas, &hdr_deltas, &deltas); clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), ret_creds); - last_rid = 0; for (i = 0; i < num_deltas; i++) { fetch_sam_entry(&hdr_deltas[i], &deltas[i], dom_sid); - last_rid = hdr_deltas[i].target_rid; } - } while (last_rid && NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)); + sync_context += 1; + } while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)); talloc_destroy(mem_ctx); } -- cgit From fe0d3de7f2cfc316e5ebc27f3a074dda5322b4bc Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 14 Oct 2002 21:40:45 +0000 Subject: Don't use SAM FLAGS from smb.h since they're gone - patch from metze (This used to be commit 82a0abf4c84ddd0672b3c5ea4ba9759abd6778c6) --- source3/sam/account.c | 2 -- source3/sam/get_set_account.c | 33 +++------------------------------ 2 files changed, 3 insertions(+), 32 deletions(-) (limited to 'source3') diff --git a/source3/sam/account.c b/source3/sam/account.c index 9144c23844..1b43db57d9 100644 --- a/source3/sam/account.c +++ b/source3/sam/account.c @@ -37,8 +37,6 @@ static void sam_fill_default_account(SAM_ACCOUNT_HANDLE *account) /* Don't change these timestamp settings without a good reason. They are important for NT member server compatibility. */ - account->private.init_flag = FLAG_SAM_UNINIT; - /* FIXME: We should actually call get_nt_time_max() or sthng * here */ unix_to_nt_time(&(account->private.logoff_time),get_time_t_max()); diff --git a/source3/sam/get_set_account.c b/source3/sam/get_set_account.c index 7bbfe39e14..acac281d21 100644 --- a/source3/sam/get_set_account.c +++ b/source3/sam/get_set_account.c @@ -355,11 +355,11 @@ NTSTATUS sam_get_account_unknown_3(const SAM_ACCOUNT_HANDLE *sampass, uint32 *un Collection of set...() functions for SAM_ACCOUNT_HANDLE_INFO. ********************************************************************/ -NTSTATUS sam_set_account_acct_ctrl(SAM_ACCOUNT_HANDLE *sampass, uint16 flags) +NTSTATUS sam_set_account_acct_ctrl(SAM_ACCOUNT_HANDLE *sampass, uint16 acct_ctrl) { SAM_ASSERT(sampass); - sampass->private.acct_ctrl = flags; + sampass->private.acct_ctrl = acct_ctrl; return NT_STATUS_OK; } @@ -370,8 +370,6 @@ NTSTATUS sam_set_account_logon_time(SAM_ACCOUNT_HANDLE *sampass, NTTIME mytime, sampass->private.logon_time = mytime; - if (store) - sam_set_account_init_flag(sampass, FLAG_SAM_LOGONTIME); return NT_STATUS_UNSUCCESSFUL; } @@ -382,9 +380,6 @@ NTSTATUS sam_set_account_logoff_time(SAM_ACCOUNT_HANDLE *sampass, NTTIME mytime, sampass->private.logoff_time = mytime; - if (store) - sam_set_account_init_flag(sampass, FLAG_SAM_LOGOFFTIME); - return NT_STATUS_OK; } @@ -394,8 +389,6 @@ NTSTATUS sam_set_account_kickoff_time(SAM_ACCOUNT_HANDLE *sampass, NTTIME mytime sampass->private.kickoff_time = mytime; - if (store) - sam_set_account_init_flag(sampass, FLAG_SAM_KICKOFFTIME); return NT_STATUS_OK; } @@ -406,8 +399,6 @@ NTSTATUS sam_set_account_pass_can_change_time(SAM_ACCOUNT_HANDLE *sampass, NTTIM sampass->private.pass_can_change_time = mytime; - if (store) - sam_set_account_init_flag(sampass, FLAG_SAM_CANCHANGETIME); return NT_STATUS_OK; } @@ -418,9 +409,6 @@ NTSTATUS sam_set_account_pass_must_change_time(SAM_ACCOUNT_HANDLE *sampass, NTTI sampass->private.pass_must_change_time = mytime; - if (store) - sam_set_account_init_flag(sampass, FLAG_SAM_MUSTCHANGETIME); - return NT_STATUS_OK; } @@ -585,7 +573,6 @@ NTSTATUS sam_set_account_logon_script(SAM_ACCOUNT_HANDLE *sampass, const char *l sampass->private.logon_script = talloc_strdup(sampass->mem_ctx, logon_script); - sam_set_account_init_flag(sampass, FLAG_SAM_LOGONSCRIPT); return NT_STATUS_OK; } @@ -602,11 +589,6 @@ NTSTATUS sam_set_account_profile_path(SAM_ACCOUNT_HANDLE *sampass, const char *p sampass->private.profile_path = talloc_strdup(sampass->mem_ctx, profile_path); - if (store) { - DEBUG(10, ("sam_set_profile_path: setting profile path sam flag!\n")); - sam_set_account_init_flag(sampass, FLAG_SAM_PROFILE); - } - return NT_STATUS_OK; } @@ -623,11 +605,6 @@ NTSTATUS sam_set_account_dir_drive(SAM_ACCOUNT_HANDLE *sampass, const char *dir_ sampass->private.dir_drive = talloc_strdup(sampass->mem_ctx, dir_drive); - if (store) { - DEBUG(10, ("sam_set_dir_drive: setting dir drive sam flag!\n")); - sam_set_account_init_flag(sampass, FLAG_SAM_DRIVE); - } - return NT_STATUS_OK; } @@ -644,11 +621,6 @@ NTSTATUS sam_set_account_homedir(SAM_ACCOUNT_HANDLE *sampass, const char *home_d sampass->private.home_dir = talloc_strdup(sampass->mem_ctx, home_dir); - if (store) { - DEBUG(10, ("sam_set_homedir: setting home dir sam flag!\n")); - sam_set_account_init_flag(sampass, FLAG_SAM_SMBHOME); - } - return NT_STATUS_OK; } @@ -719,6 +691,7 @@ NTSTATUS sam_set_account_munged_dial(SAM_ACCOUNT_HANDLE *sampass, const char *mu SAM_ASSERT(sampass); sampass->private.munged_dial = talloc_strdup(sampass->mem_ctx, munged_dial); + return NT_STATUS_OK; } -- cgit From 664a9bde0e41c7fc8b06fcfec81d56bcc2e10d1b Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 14 Oct 2002 22:57:59 +0000 Subject: Tidyup of file specific access mask bits. Added directory specific access mask bits. (This used to be commit edbd942a8d0edcb5e7cc3086c3d98c6ff1d6cd80) --- source3/include/smb.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'source3') diff --git a/source3/include/smb.h b/source3/include/smb.h index da83aaff47..e42bcb3319 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1075,20 +1075,25 @@ struct bitmap { #define PIPE_RAW_MODE 0x4 #define PIPE_START_MESSAGE 0x8 -/* these are the constants used in the above call. */ -/* DesiredAccess */ -/* File Specific access rights. */ -#define FILE_READ_DATA 0x001 -#define FILE_WRITE_DATA 0x002 -#define FILE_APPEND_DATA 0x004 -#define FILE_READ_EA 0x008 -#define FILE_WRITE_EA 0x010 -#define FILE_EXECUTE 0x020 -#define FILE_DELETE_CHILD 0x040 -#define FILE_READ_ATTRIBUTES 0x080 -#define FILE_WRITE_ATTRIBUTES 0x100 - -#define FILE_ALL_ACCESS 0x1FF +/* File Specific access rights */ +#define FILE_READ_DATA 0x00000001 +#define FILE_WRITE_DATA 0x00000002 +#define FILE_APPEND_DATA 0x00000004 +#define FILE_READ_EA 0x00000008 /* File and directory */ +#define FILE_WRITE_EA 0x00000010 /* File and directory */ +#define FILE_EXECUTE 0x00000020 +#define FILE_DELETE_CHILD 0x00000040 +#define FILE_READ_ATTRIBUTES 0x00000080 +#define FILE_WRITE_ATTRIBUTES 0x00000100 + +#define FILE_ALL_ACCESS 0x000001FF + +/* Directory specific access rights */ +#define FILE_LIST_DIRECTORY 0x00000001 +#define FILE_ADD_FILE 0x00000002 +#define FILE_ADD_SUBDIRECTORY 0x00000004 +#define FILE_TRAVERSE 0x00000020 +#define FILE_DELETE_CHILD 0x00000040 /* the desired access to use when opening a pipe */ #define DESIRED_ACCESS_PIPE 0x2019f -- cgit From 30acf331a982b6e2655405f8e76aaf1b30ff84fc Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 15 Oct 2002 00:28:04 +0000 Subject: merge from app_head to use GMT in job submission notification (This used to be commit b130c681d2e8e6dcabe8cfd85dd718a294b04233) --- source3/rpc_server/srv_spoolss_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index c5d46abe57..a4dcfdcec9 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -676,7 +676,7 @@ static void notify_system_time(struct spoolss_notify_msg *msg, return; } - if (!make_systemtime(&systime, localtime((time_t *)msg->notify.data))) { + if (!make_systemtime(&systime, gmtime((time_t *)msg->notify.data))) { DEBUG(5, ("notify_system_time: unable to make systemtime\n")); return; } -- cgit From 5139da0bc63163469e5e0378598cfd9b17734b0d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 15 Oct 2002 05:40:24 +0000 Subject: fixed a crash bug on 64 bit systems. Thanks to Anton Blanchard for finding this. (This used to be commit 4ba8608020123a52432e5afaa914e290e4ce8cbf) --- source3/smbd/mangle_hash2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c index a0a3d51139..5adde19eea 100644 --- a/source3/smbd/mangle_hash2.c +++ b/source3/smbd/mangle_hash2.c @@ -147,14 +147,12 @@ static BOOL cache_init(void) { if (prefix_cache) return True; - prefix_cache = malloc(sizeof(char *) * MANGLE_CACHE_SIZE); + prefix_cache = calloc(MANGLE_CACHE_SIZE, sizeof(char *)); if (!prefix_cache) return False; - prefix_cache_hashes = malloc(sizeof(u32) * MANGLE_CACHE_SIZE); + prefix_cache_hashes = calloc(MANGLE_CACHE_SIZE, sizeof(u32)); if (!prefix_cache_hashes) return False; - memset(prefix_cache, 0, sizeof(char *) * MANGLE_CACHE_SIZE); - memset(prefix_cache_hashes, 0, sizeof(char *) * MANGLE_CACHE_SIZE); return True; } -- cgit From 598ebaa2b3bb0ade6e07e0f520a966526142cb19 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 15 Oct 2002 21:29:37 +0000 Subject: Added cli_set_timeout() call. Jeremy. (This used to be commit 94a5c589945ffd4719f7509c162cf994f7914312) --- source3/libsmb/clientgen.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3') diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 2236d8508d..28480043b9 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -22,6 +22,17 @@ #include "includes.h" +/**************************************************************************** + Change the timeout (in milliseconds). +****************************************************************************/ + +unsigned int cli_set_timeout(struct cli_state *cli, unsigned int timeout) +{ + unsigned int old_timeout = cli->timeout; + cli->timeout = timeout; + return old_timeout; +} + /**************************************************************************** Change the port number used to call on. ****************************************************************************/ -- cgit From 2e86b6bcc827cf803734f0e6c2620ade4df1d098 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 15 Oct 2002 21:33:20 +0000 Subject: Change to use sys_read/sys_write. Jeremy. (This used to be commit 042890056d5d4128eaaca346e7898ccda860dbe2) --- source3/nsswitch/winbindd.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index bb4a1b78ec..d394a57837 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -401,13 +401,9 @@ void winbind_client_read(struct winbindd_cli_state *state) /* Read data */ - do { - - n = read(state->sock, state->read_buf_len + - (char *)&state->request, - sizeof(state->request) - state->read_buf_len); - - } while (n == -1 && errno == EINTR); + n = sys_read(state->sock, state->read_buf_len + + (char *)&state->request, + sizeof(state->request) - state->read_buf_len); DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n, sizeof(state->request) - n - state->read_buf_len )); @@ -453,9 +449,7 @@ static void client_write(struct winbindd_cli_state *state) state->write_buf_len; } - do { - num_written = write(state->sock, data, state->write_buf_len); - } while (num_written == -1 && errno == EINTR); + num_written = sys_write(state->sock, data, state->write_buf_len); DEBUG(10,("client_write: wrote %d bytes.\n", num_written )); -- cgit From 04b02e86ac956604366549e4b8542910c16b6ae7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 15 Oct 2002 21:34:40 +0000 Subject: Fix spelling of background_process. Jeremy. (This used to be commit 94fc0ea9f99bc73486ef374a84d2c20ce895ee14) --- source3/nsswitch/winbindd_cache.c | 4 ++-- source3/nsswitch/winbindd_dual.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index 8c02160e02..6ba1d48f5a 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -301,8 +301,8 @@ static struct cache_entry *wcache_fetch(struct winbind_cache *cache, extern BOOL opt_dual_daemon; if (opt_dual_daemon) { - extern BOOL backgroud_process; - backgroud_process = True; + extern BOOL background_process; + background_process = True; } else { centry_free(centry); return NULL; diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c index d32d62edaa..a7523138ea 100644 --- a/source3/nsswitch/winbindd_dual.c +++ b/source3/nsswitch/winbindd_dual.c @@ -35,7 +35,7 @@ #define DBGC_CLASS DBGC_WINBIND extern BOOL opt_dual_daemon; -BOOL backgroud_process = False; +BOOL background_process = False; int dual_daemon_pipe = -1; @@ -82,7 +82,7 @@ void dual_select(fd_set *fds) return; } - n = write(dual_daemon_pipe, + n = sys_write(dual_daemon_pipe, &dual_list->data[dual_list->offset], dual_list->length - dual_list->offset); @@ -114,7 +114,7 @@ void dual_send_request(struct winbindd_cli_state *state) { struct dual_list *list; - if (!backgroud_process) return; + if (!background_process) return; list = malloc(sizeof(*list)); if (!list) return; @@ -132,7 +132,7 @@ void dual_send_request(struct winbindd_cli_state *state) dual_list_end = list; } - backgroud_process = False; + background_process = False; } -- cgit From 909ac9ed0d320d9a384b495feb9ff6417ba617b9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 15 Oct 2002 21:35:41 +0000 Subject: Change default of max_xmit to match W2K. Ensure NT negprot uses it. Jeremy. (This used to be commit e5fbfbcc9dc995b23eb0b46c6f59b03cfe9c02b5) --- source3/param/loadparm.c | 4 +++- source3/smbd/negprot.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 500119575a..5d1ef9b91f 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1289,7 +1289,9 @@ static void init_globals(void) Globals.bLoadPrinters = True; Globals.mangled_stack = 50; - Globals.max_xmit = 65535; + /* Was 65535 (0xFFFF). 0x4101 matches W2K and causes major speed improvements... */ + /* Discovered by 2 days of pain by Don McCall @ HP :-). */ + Globals.max_xmit = 0x4104; Globals.max_mux = 50; /* This is *needed* for profile support. */ Globals.lpqcachetime = 10; Globals.bDisableSpoolss = False; diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 16427b00d7..06a55cb33e 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -275,7 +275,7 @@ static int reply_nt1(char *inbuf, char *outbuf) SSVAL(outbuf,smb_vwv1+1,lp_maxmux()); /* maxmpx */ SSVAL(outbuf,smb_vwv2+1,1); /* num vcs */ - SIVAL(outbuf,smb_vwv3+1,0xffff); /* max buffer. LOTS! */ + SIVAL(outbuf,smb_vwv3+1,max_recv); /* max buffer. LOTS! */ SIVAL(outbuf,smb_vwv5+1,0x10000); /* raw size. full 64k */ SIVAL(outbuf,smb_vwv7+1,sys_getpid()); /* session key */ SIVAL(outbuf,smb_vwv9+1,capabilities); /* capabilities */ -- cgit From d0c11644dc751f8a27efaa318f48064e43cc5eb2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 15 Oct 2002 23:44:15 +0000 Subject: - we need to rescan the trusted domain list regularly to cope with transitive trusts, and trusts that are added while winbindd is running - removed an unnecessary call to time() (This used to be commit 14489ff30bb9eca2c55d36a69c0b45a2db339061) --- source3/nsswitch/winbindd.c | 4 ++++ source3/nsswitch/winbindd_util.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index d394a57837..5b9c5418a1 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -521,6 +521,10 @@ static void process_loop(int accept_sock) message_dispatch(); + /* rescan the trusted domains list. This must be done + regularly to cope with transitive trusts */ + rescan_trusted_domains(); + /* Free up temporary memory */ lp_talloc_free(); diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 00354187aa..c8afea2f72 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -157,7 +157,7 @@ void rescan_trusted_domains(void) if ((unsigned)(t - last_scan) < WINBINDD_RESCAN_FREQ) { return; } - last_scan = time(NULL); + last_scan = t; DEBUG(1, ("scanning trusted domain list\n")); -- cgit From f55eb87af56b68b44e64a2dee5fcfe8248b718cf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 16 Oct 2002 01:28:11 +0000 Subject: SMB_ASSERT to check list terminates. Jeremy (This used to be commit 25f6a9247e88a94cbacdc8fb06dc0d13c53d69bd) --- source3/printing/printing.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3') diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 91851a37f8..7a527eebbf 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -156,6 +156,9 @@ static struct tdb_print_db *get_print_db_byname(const char *printername) pstring printdb_path; for (p = print_db_head, last_entry = print_db_head; p; p = p->next) { + /* Ensure the list terminates... JRA. */ + SMB_ASSERT(p->next != print_db_head); + if (p->tdb && strequal(p->printer_name, printername)) { DLIST_PROMOTE(print_db_head, p); p->ref_count++; -- cgit From 4f001512cdc5fdf27981ffee7e110a6818a978d7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 16 Oct 2002 09:41:42 +0000 Subject: Create group mappings on the fly. Volker (This used to be commit e2fc1de34aaf875a7003f9d15d5f8ecf159130fb) --- source3/groupdb/mapping.c | 40 ++++++++++++++++++++++++---------------- source3/passdb/passdb.c | 2 +- 2 files changed, 25 insertions(+), 17 deletions(-) (limited to 'source3') diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index 0f05316949..d78582e7e5 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -1048,34 +1048,42 @@ Returns a GROUP_MAP struct based on the gid. BOOL get_group_from_gid(gid_t gid, GROUP_MAP *map, BOOL with_priv) { struct group *grp; + fstring name; + DOM_SID sid; + fstring string_sid; + PRIVILEGE_SET priv_set; if(!init_group_mapping()) { DEBUG(0,("failed to initialize group mapping")); return(False); } - if ( (grp=getgrgid(gid)) == NULL) - return False; + if (get_group_map_from_gid(gid, map, with_priv)) + return True; - /* - * make a group map from scratch if doesn't exist. - */ - if (!get_group_map_from_gid(gid, map, with_priv)) { - map->gid=gid; - map->sid_name_use=SID_NAME_ALIAS; - map->systemaccount=PR_ACCESS_FROM_NETWORK; - init_privilege(&map->priv_set); + /* There is no mapping, create one on the fly. This is just + interim, we need a RID allocator in the passdb backend. */ - /* interim solution until we have a last RID allocated */ + if ((grp=getgrgid(gid)) != NULL) { + slprintf(name, sizeof(name), "Group %s", grp->gr_name); + } else { + slprintf(name, sizeof(name), "Group %d", gid); + } - sid_copy(&map->sid, get_global_sam_sid()); - sid_append_rid(&map->sid, pdb_gid_to_group_rid(gid)); + /* interim solution until we have a last RID allocated */ - fstrcpy(map->nt_name, grp->gr_name); - fstrcpy(map->comment, "Local Unix Group"); + sid_copy(&sid, get_global_sam_sid()); + sid_append_rid(&sid, pdb_gid_to_group_rid(gid)); + sid_to_string(string_sid, &sid); + init_privilege(&priv_set); + + if (!add_initial_entry(gid, string_sid, SID_NAME_DOM_GRP, + name, "Local Unix Group", + priv_set, PR_ACCESS_FROM_NETWORK)) { + return False; } - return True; + return get_group_map_from_gid(gid, map, with_priv); } diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 9402f0c94c..dfaf7c88be 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -897,7 +897,7 @@ DOM_SID *local_gid_to_sid(DOM_SID *psid, gid_t gid) sid_copy(psid, get_global_sam_sid()); - if (get_group_map_from_gid(gid, &map, MAPPING_WITHOUT_PRIV)) { + if (get_group_from_gid(gid, &map, MAPPING_WITHOUT_PRIV)) { sid_copy(psid, &map.sid); } else { -- cgit From 9e19e9e9c13e3984dff3c1dfc6b9a292611812f6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 16 Oct 2002 15:49:58 +0000 Subject: No functional change. I'm trying to understand pdb_ldap.c and found an unecessary parameter to ldapsam_search_one_user. Volker (This used to be commit a085670c7e3a0ca82df749592fd5c6a86def1d53) --- source3/passdb/pdb_ldap.c | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'source3') diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 3f625d1690..622b102fea 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -64,7 +64,7 @@ struct ldapsam_privates { LDAPMessage *entry; int index; - /* retrive-once info */ + /* retrieve-once info */ const char *uri; BOOL permit_non_unix_accounts; @@ -425,19 +425,22 @@ static BOOL ldapsam_connect_system(struct ldapsam_privates *ldap_state, LDAP * l /******************************************************************* run the search by name. ******************************************************************/ -static int ldapsam_search_one_user (struct ldapsam_privates *ldap_state, LDAP * ldap_struct, const char *filter, LDAPMessage ** result) +static int ldapsam_search_one_user (LDAP * ldap_struct, const char *filter, + LDAPMessage ** result) { int scope = LDAP_SCOPE_SUBTREE; int rc; DEBUG(2, ("ldapsam_search_one_user: searching for:[%s]\n", filter)); - rc = ldap_search_s(ldap_struct, lp_ldap_suffix (), scope, filter, (char **)attr, 0, result); + rc = ldap_search_s(ldap_struct, lp_ldap_suffix (), scope, filter, + (char **)attr, 0, result); if (rc != LDAP_SUCCESS) { DEBUG(0,("ldapsam_search_one_user: Problem during the LDAP search: %s\n", ldap_err2string (rc))); - DEBUG(3,("ldapsam_search_one_user: Query was: %s, %s\n", lp_ldap_suffix(), + DEBUG(3,("ldapsam_search_one_user: Query was: %s, %s\n", + lp_ldap_suffix(), filter)); } @@ -447,8 +450,9 @@ static int ldapsam_search_one_user (struct ldapsam_privates *ldap_state, LDAP * /******************************************************************* run the search by name. ******************************************************************/ -static int ldapsam_search_one_user_by_name (struct ldapsam_privates *ldap_state, LDAP * ldap_struct, const char *user, - LDAPMessage ** result) +static int ldapsam_search_one_user_by_name (LDAP * ldap_struct, + const char *user, + LDAPMessage ** result) { pstring filter; @@ -464,14 +468,13 @@ static int ldapsam_search_one_user_by_name (struct ldapsam_privates *ldap_state, */ all_string_sub(filter, "%u", user, sizeof(pstring)); - return ldapsam_search_one_user(ldap_state, ldap_struct, filter, result); + return ldapsam_search_one_user(ldap_struct, filter, result); } /******************************************************************* run the search by uid. ******************************************************************/ -static int ldapsam_search_one_user_by_uid(struct ldapsam_privates *ldap_state, - LDAP * ldap_struct, int uid, +static int ldapsam_search_one_user_by_uid(LDAP * ldap_struct, int uid, LDAPMessage ** result) { struct passwd *user; @@ -490,14 +493,13 @@ static int ldapsam_search_one_user_by_uid(struct ldapsam_privates *ldap_state, passwd_free(&user); - return ldapsam_search_one_user(ldap_state, ldap_struct, filter, result); + return ldapsam_search_one_user(ldap_struct, filter, result); } /******************************************************************* run the search by rid. ******************************************************************/ -static int ldapsam_search_one_user_by_rid (struct ldapsam_privates *ldap_state, - LDAP * ldap_struct, uint32 rid, +static int ldapsam_search_one_user_by_rid (LDAP * ldap_struct, uint32 rid, LDAPMessage ** result) { pstring filter; @@ -506,10 +508,10 @@ static int ldapsam_search_one_user_by_rid (struct ldapsam_privates *ldap_state, /* check if the user rid exsists, if not, try searching on the uid */ snprintf(filter, sizeof(filter) - 1, "rid=%i", rid); - rc = ldapsam_search_one_user(ldap_state, ldap_struct, filter, result); + rc = ldapsam_search_one_user(ldap_struct, filter, result); if (rc != LDAP_SUCCESS) - rc = ldapsam_search_one_user_by_uid(ldap_state, ldap_struct, + rc = ldapsam_search_one_user_by_uid(ldap_struct, fallback_pdb_user_rid_to_uid(rid), result); @@ -1080,7 +1082,7 @@ static uint32 check_nua_rid_is_avail(struct ldapsam_privates *ldap_state, uint32 return 0; } - if (ldapsam_search_one_user_by_rid(ldap_state, ldap_struct, final_rid, &result) != LDAP_SUCCESS) { + if (ldapsam_search_one_user_by_rid(ldap_struct, final_rid, &result) != LDAP_SUCCESS) { DEBUG(0, ("Cannot allocate NUA RID %d (0x%x), as the confirmation search failed!\n", final_rid, final_rid)); ldap_msgfree(result); return 0; @@ -1321,7 +1323,7 @@ static NTSTATUS ldapsam_getsampwnam(struct pdb_methods *my_methods, SAM_ACCOUNT ldap_unbind(ldap_struct); return ret; } - if (ldapsam_search_one_user_by_name(ldap_state, ldap_struct, sname, &result) != LDAP_SUCCESS) { + if (ldapsam_search_one_user_by_name(ldap_struct, sname, &result) != LDAP_SUCCESS) { ldap_unbind(ldap_struct); return ret; } @@ -1368,7 +1370,7 @@ static NTSTATUS ldapsam_getsampwrid(struct pdb_methods *my_methods, SAM_ACCOUNT ldap_unbind(ldap_struct); return ret; } - if (ldapsam_search_one_user_by_rid(ldap_state, ldap_struct, rid, &result) != LDAP_SUCCESS) { + if (ldapsam_search_one_user_by_rid(ldap_struct, rid, &result) != LDAP_SUCCESS) { ldap_unbind(ldap_struct); return ret; } @@ -1408,7 +1410,7 @@ static NTSTATUS ldapsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT } /******************************************************************** -Do the actual modification - also change a plaittext passord if +Do the actual modification - also change a plaintext passord if it it set. **********************************************************************/ @@ -1536,7 +1538,7 @@ static NTSTATUS ldapsam_delete_sam_account(struct pdb_methods *my_methods, SAM_A return ret; } - rc = ldapsam_search_one_user_by_name(ldap_state, ldap_struct, sname, &result); + rc = ldapsam_search_one_user_by_name(ldap_struct, sname, &result); if (ldap_count_entries (ldap_struct, result) == 0) { DEBUG (0, ("User doesn't exit!\n")); ldap_msgfree (result); @@ -1600,7 +1602,7 @@ static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, SAM_A return ret; } - rc = ldapsam_search_one_user_by_name(ldap_state, ldap_struct, + rc = ldapsam_search_one_user_by_name(ldap_struct, pdb_get_username(newpwd), &result); if (ldap_count_entries(ldap_struct, result) == 0) { @@ -1661,7 +1663,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO return ret; } - rc = ldapsam_search_one_user_by_name (ldap_state, ldap_struct, username, &result); + rc = ldapsam_search_one_user_by_name (ldap_struct, username, &result); if (ldap_count_entries(ldap_struct, result) != 0) { DEBUG(0,("User already in the base, with samba properties\n")); @@ -1672,7 +1674,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO ldap_msgfree(result); slprintf (filter, sizeof (filter) - 1, "uid=%s", username); - rc = ldapsam_search_one_user(ldap_state, ldap_struct, filter, &result); + rc = ldapsam_search_one_user(ldap_struct, filter, &result); num_result = ldap_count_entries(ldap_struct, result); if (num_result > 1) { -- cgit From a0fbdc3d64efb5ea14baa558bb360168edfef3ca Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 16 Oct 2002 18:21:55 +0000 Subject: fix from APP_HEAD to commit a re-init'd printer to disk (This used to be commit 64a159144483457887df2c6d779e6a139dfc6d1f) --- source3/rpc_server/srv_spoolss_nt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index a4dcfdcec9..3e6d5d6594 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1273,6 +1273,12 @@ void reset_all_printerdata(int msg_type, pid_t src, void *buf, size_t len) DEBUG(5,("reset_all_printerdata: Error resetting printer data for printer [%s], driver [%s]!\n", printer->info_2->printername, printer->info_2->drivername)); } + + result = mod_a_printer( *printer, 2 ); + if ( !W_ERROR_IS_OK(result) ) { + DEBUG(3,("reset_all_printerdata: mod_a_printer() failed! (%s)\n", + get_dos_error_msg(result))); + } } free_a_printer( &printer, 2 ); -- cgit From 33b9cc3f67bb94f51566a29bfca5abd76cd516b3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 16 Oct 2002 20:09:22 +0000 Subject: Never do a ZERO_STRUCT on a structure in a linked list, it's dumb :-). Jeremy. (This used to be commit 0d989a911d742ed5eeb874f5b8350b0931f3d9db) --- source3/printing/printing.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 7a527eebbf..95d8915976 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -183,7 +183,9 @@ static struct tdb_print_db *get_print_db_byname(const char *printername) return NULL; } } - ZERO_STRUCTP(p); + p->tdb = NULL; + p->ref_count = 0; + memset(p->printer_name, '\0', sizeof(p->printer_name)); break; } if (p) { -- cgit From dae2b02f781267d2a00bc627a053abef39299831 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 17 Oct 2002 04:40:53 +0000 Subject: Fix for new arguments of cli_nt_session_open() (This used to be commit cfb0c12eb6412c2cc84785c17ab2f6c89916aa56) --- source3/python/py_common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/python/py_common.c b/source3/python/py_common.c index e21858e072..8742cfa363 100644 --- a/source3/python/py_common.c +++ b/source3/python/py_common.c @@ -218,7 +218,7 @@ BOOL py_parse_creds(PyObject *creds, char **username, char **domain, be freed by calling free(). */ struct cli_state *open_pipe_creds(char *server, PyObject *creds, - char *pipe_name, char **errstr) + int pipe_idx, char **errstr) { char *username, *password, *domain; struct cli_state *cli; @@ -240,10 +240,9 @@ struct cli_state *open_pipe_creds(char *server, PyObject *creds, return NULL; } - if (!cli_nt_session_open(cli, pipe_name)) { + if (!cli_nt_session_open(cli, pipe_idx)) { cli_shutdown(cli); - free(cli); - asprintf(errstr, "error opening %s", pipe_name); + asprintf(errstr, "error opening pipe index %d", pipe_idx); return NULL; } -- cgit From 14df81590cd7f2b26053803de924c8604aad3c3b Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 17 Oct 2002 04:45:25 +0000 Subject: open_pipe_creds() now takes a pipe index instead of a pipe name. (This used to be commit 3a0a30beda4b8be0038c98ccc6f8f01c6dae386a) --- source3/python/py_lsa.c | 2 +- source3/python/py_samr.c | 3 +-- source3/python/py_spoolss_drivers.c | 6 +++--- source3/python/py_spoolss_ports.c | 2 +- source3/python/py_spoolss_printers.c | 6 +++--- 5 files changed, 9 insertions(+), 10 deletions(-) (limited to 'source3') diff --git a/source3/python/py_lsa.c b/source3/python/py_lsa.c index 0584cf716b..d54a2289ef 100644 --- a/source3/python/py_lsa.c +++ b/source3/python/py_lsa.c @@ -78,7 +78,7 @@ static PyObject *lsa_open_policy(PyObject *self, PyObject *args, server += 2; - if (!(cli = open_pipe_creds(server, creds, PIPE_LSARPC, &errstr))) { + if (!(cli = open_pipe_creds(server, creds, PI_LSARPC, &errstr))) { PyErr_SetString(lsa_error, errstr); free(errstr); return NULL; diff --git a/source3/python/py_samr.c b/source3/python/py_samr.c index 917a90a2fb..92a2eaf063 100644 --- a/source3/python/py_samr.c +++ b/source3/python/py_samr.c @@ -393,7 +393,7 @@ static PyObject *samr_connect(PyObject *self, PyObject *args, PyObject *kw) return NULL; } - if (!(cli = open_pipe_creds(server, creds, PIPE_SAMR, &errstr))) { + if (!(cli = open_pipe_creds(server, creds, PI_SAMR, &errstr))) { PyErr_SetString(samr_error, errstr); free(errstr); return NULL; @@ -409,7 +409,6 @@ static PyObject *samr_connect(PyObject *self, PyObject *args, PyObject *kw) if (!NT_STATUS_IS_OK(ntstatus)) { cli_shutdown(cli); - SAFE_FREE(cli); PyErr_SetObject(samr_ntstatus, py_ntstatus_tuple(ntstatus)); goto done; } diff --git a/source3/python/py_spoolss_drivers.c b/source3/python/py_spoolss_drivers.c index 0c242d9181..644280fea2 100644 --- a/source3/python/py_spoolss_drivers.c +++ b/source3/python/py_spoolss_drivers.c @@ -57,7 +57,7 @@ PyObject *spoolss_enumprinterdrivers(PyObject *self, PyObject *args, /* Call rpc function */ - if (!(cli = open_pipe_creds(server, creds, PIPE_SPOOLSS, &errstr))) { + if (!(cli = open_pipe_creds(server, creds, PI_SPOOLSS, &errstr))) { PyErr_SetString(spoolss_error, errstr); free(errstr); goto done; @@ -261,7 +261,7 @@ PyObject *spoolss_getprinterdriverdir(PyObject *self, PyObject *args, /* Call rpc function */ - if (!(cli = open_pipe_creds(server, creds, PIPE_SPOOLSS, &errstr))) { + if (!(cli = open_pipe_creds(server, creds, PI_SPOOLSS, &errstr))) { PyErr_SetString(spoolss_error, errstr); free(errstr); goto done; @@ -341,7 +341,7 @@ PyObject *spoolss_addprinterdriver(PyObject *self, PyObject *args, return NULL; } - if (!(cli = open_pipe_creds(server, creds, PIPE_SPOOLSS, &errstr))) { + if (!(cli = open_pipe_creds(server, creds, PI_SPOOLSS, &errstr))) { PyErr_SetString(spoolss_error, errstr); free(errstr); goto done; diff --git a/source3/python/py_spoolss_ports.c b/source3/python/py_spoolss_ports.c index b5f2102e5e..75c8c4aa28 100644 --- a/source3/python/py_spoolss_ports.c +++ b/source3/python/py_spoolss_ports.c @@ -53,7 +53,7 @@ PyObject *spoolss_enumports(PyObject *self, PyObject *args, PyObject *kw) return NULL; } - if (!(cli = open_pipe_creds(server, creds, PIPE_SPOOLSS, &errstr))) { + if (!(cli = open_pipe_creds(server, creds, PI_SPOOLSS, &errstr))) { PyErr_SetString(spoolss_error, errstr); free(errstr); goto done; diff --git a/source3/python/py_spoolss_printers.c b/source3/python/py_spoolss_printers.c index a300eada86..a96498dddc 100644 --- a/source3/python/py_spoolss_printers.c +++ b/source3/python/py_spoolss_printers.c @@ -56,7 +56,7 @@ PyObject *spoolss_openprinter(PyObject *self, PyObject *args, PyObject *kw) return NULL; } - if (!(cli = open_pipe_creds(server, creds, PIPE_SPOOLSS, &errstr))) { + if (!(cli = open_pipe_creds(server, creds, PI_SPOOLSS, &errstr))) { PyErr_SetString(spoolss_error, errstr); free(errstr); goto done; @@ -304,7 +304,7 @@ PyObject *spoolss_enumprinters(PyObject *self, PyObject *args, PyObject *kw) return NULL; } - if (!(cli = open_pipe_creds(server, creds, PIPE_SPOOLSS, &errstr))) { + if (!(cli = open_pipe_creds(server, creds, PI_SPOOLSS, &errstr))) { PyErr_SetString(spoolss_error, errstr); free(errstr); goto done; @@ -439,7 +439,7 @@ PyObject *spoolss_addprinterex(PyObject *self, PyObject *args, PyObject *kw) &PyDict_Type, &info, &PyDict_Type, &creds)) return NULL; - if (!(cli = open_pipe_creds(server, creds, PIPE_SPOOLSS, &errstr))) { + if (!(cli = open_pipe_creds(server, creds, PI_SPOOLSS, &errstr))) { PyErr_SetString(spoolss_error, errstr); free(errstr); goto done; -- cgit From 4af2e30ecf31da6dd9ac2763c0743f2f5548d443 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 17 Oct 2002 04:48:08 +0000 Subject: make proto (This used to be commit 86c884c3a129d12dc77332c38484bef78c66440e) --- source3/python/py_common_proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/python/py_common_proto.h b/source3/python/py_common_proto.h index 89f0f35fc9..b012c17e15 100644 --- a/source3/python/py_common_proto.h +++ b/source3/python/py_common_proto.h @@ -15,7 +15,7 @@ PyObject *py_setup_logging(PyObject *self, PyObject *args, PyObject *kw); BOOL py_parse_creds(PyObject *creds, char **username, char **domain, char **password, char **errstr); struct cli_state *open_pipe_creds(char *server, PyObject *creds, - char *pipe_name, char **errstr); + int pipe_idx, char **errstr); BOOL get_level_value(PyObject *dict, uint32 *level); /* The following definitions come from python/py_ntsec.c */ -- cgit From e7c011412bbec88baa7fa7469bad1132eda5384c Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 17 Oct 2002 05:08:34 +0000 Subject: Do a SMB_ASSERT() in cli_nt_session_open() when the pipe index is out of range instead of silently failing. (This used to be commit b5111f47b5cf1820550e17663f983674b67bcaff) --- source3/rpc_client/cli_pipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 71e422f251..61c6f2889f 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -1253,8 +1253,9 @@ BOOL cli_nt_session_open(struct cli_state *cli, const int pipe_idx) SMB_ASSERT(cli->nt_pipe_fnum == 0); - if ( (pipe_idx < 0) || (pipe_idx >= PI_MAX_PIPES) ) - return False; + /* The pipe index must fall within our array */ + + SMB_ASSERT((pipe_idx >= 0) && (pipe_idx < PI_MAX_PIPES)); if (cli->capabilities & CAP_NT_SMBS) { if ((fnum = cli_nt_create(cli, &pipe_names[pipe_idx].client_pipe[5], DESIRED_ACCESS_PIPE)) == -1) { -- cgit From 2d51ada52725fda7255558608140fb3ba1794b84 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 17 Oct 2002 05:26:06 +0000 Subject: Ignore python build directory. (This used to be commit 36681c1c2784ebfe63173a442a193ef22e25c3e3) --- source3/.cvsignore | 1 + 1 file changed, 1 insertion(+) (limited to 'source3') diff --git a/source3/.cvsignore b/source3/.cvsignore index b68cf42338..66eeec17a5 100644 --- a/source3/.cvsignore +++ b/source3/.cvsignore @@ -9,6 +9,7 @@ ID ID Makefile bin +build config.cache config.log config.status -- cgit From b1aba7b03b1df1dad779c21445a74b56696efdc0 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 17 Oct 2002 06:39:44 +0000 Subject: When unmarshalling a relstr, don't unmarshall the string data if the offset is zero. Previously we were jumping to the start of the parse buffer (i.e offset zero) and reading string data until we hit a terminating NULL. Test case: in a PRINTER_INFO_0 structure, the servername field may be NULL when doing an enumprinters with flags = PRINTER_ENUM_LOCAL. (This used to be commit e62c6bf066c2242aae605ba707c9775b37bcaca3) --- source3/rpc_parse/parse_spoolss.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3') diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 783dd97ebf..32f0c3a369 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -2097,6 +2097,9 @@ static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *str if (!prs_uint32("offset", ps, depth, &(buffer->string_at_end))) return False; + if (buffer->string_at_end == 0) + return True; + old_offset = prs_offset(ps); if(!prs_set_offset(ps, buffer->string_at_end+buffer->struct_start)) return False; -- cgit From 41a427b6ba3265e52e8fbcd95242dc354b279190 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 17 Oct 2002 07:08:43 +0000 Subject: Revert changes (This used to be commit 84b62f6d96a77ccbc1b4475ab0780a4e4c9d4875) --- source3/passdb/pdb_ldap.c | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'source3') diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 622b102fea..3f625d1690 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -64,7 +64,7 @@ struct ldapsam_privates { LDAPMessage *entry; int index; - /* retrieve-once info */ + /* retrive-once info */ const char *uri; BOOL permit_non_unix_accounts; @@ -425,22 +425,19 @@ static BOOL ldapsam_connect_system(struct ldapsam_privates *ldap_state, LDAP * l /******************************************************************* run the search by name. ******************************************************************/ -static int ldapsam_search_one_user (LDAP * ldap_struct, const char *filter, - LDAPMessage ** result) +static int ldapsam_search_one_user (struct ldapsam_privates *ldap_state, LDAP * ldap_struct, const char *filter, LDAPMessage ** result) { int scope = LDAP_SCOPE_SUBTREE; int rc; DEBUG(2, ("ldapsam_search_one_user: searching for:[%s]\n", filter)); - rc = ldap_search_s(ldap_struct, lp_ldap_suffix (), scope, filter, - (char **)attr, 0, result); + rc = ldap_search_s(ldap_struct, lp_ldap_suffix (), scope, filter, (char **)attr, 0, result); if (rc != LDAP_SUCCESS) { DEBUG(0,("ldapsam_search_one_user: Problem during the LDAP search: %s\n", ldap_err2string (rc))); - DEBUG(3,("ldapsam_search_one_user: Query was: %s, %s\n", - lp_ldap_suffix(), + DEBUG(3,("ldapsam_search_one_user: Query was: %s, %s\n", lp_ldap_suffix(), filter)); } @@ -450,9 +447,8 @@ static int ldapsam_search_one_user (LDAP * ldap_struct, const char *filter, /******************************************************************* run the search by name. ******************************************************************/ -static int ldapsam_search_one_user_by_name (LDAP * ldap_struct, - const char *user, - LDAPMessage ** result) +static int ldapsam_search_one_user_by_name (struct ldapsam_privates *ldap_state, LDAP * ldap_struct, const char *user, + LDAPMessage ** result) { pstring filter; @@ -468,13 +464,14 @@ static int ldapsam_search_one_user_by_name (LDAP * ldap_struct, */ all_string_sub(filter, "%u", user, sizeof(pstring)); - return ldapsam_search_one_user(ldap_struct, filter, result); + return ldapsam_search_one_user(ldap_state, ldap_struct, filter, result); } /******************************************************************* run the search by uid. ******************************************************************/ -static int ldapsam_search_one_user_by_uid(LDAP * ldap_struct, int uid, +static int ldapsam_search_one_user_by_uid(struct ldapsam_privates *ldap_state, + LDAP * ldap_struct, int uid, LDAPMessage ** result) { struct passwd *user; @@ -493,13 +490,14 @@ static int ldapsam_search_one_user_by_uid(LDAP * ldap_struct, int uid, passwd_free(&user); - return ldapsam_search_one_user(ldap_struct, filter, result); + return ldapsam_search_one_user(ldap_state, ldap_struct, filter, result); } /******************************************************************* run the search by rid. ******************************************************************/ -static int ldapsam_search_one_user_by_rid (LDAP * ldap_struct, uint32 rid, +static int ldapsam_search_one_user_by_rid (struct ldapsam_privates *ldap_state, + LDAP * ldap_struct, uint32 rid, LDAPMessage ** result) { pstring filter; @@ -508,10 +506,10 @@ static int ldapsam_search_one_user_by_rid (LDAP * ldap_struct, uint32 rid, /* check if the user rid exsists, if not, try searching on the uid */ snprintf(filter, sizeof(filter) - 1, "rid=%i", rid); - rc = ldapsam_search_one_user(ldap_struct, filter, result); + rc = ldapsam_search_one_user(ldap_state, ldap_struct, filter, result); if (rc != LDAP_SUCCESS) - rc = ldapsam_search_one_user_by_uid(ldap_struct, + rc = ldapsam_search_one_user_by_uid(ldap_state, ldap_struct, fallback_pdb_user_rid_to_uid(rid), result); @@ -1082,7 +1080,7 @@ static uint32 check_nua_rid_is_avail(struct ldapsam_privates *ldap_state, uint32 return 0; } - if (ldapsam_search_one_user_by_rid(ldap_struct, final_rid, &result) != LDAP_SUCCESS) { + if (ldapsam_search_one_user_by_rid(ldap_state, ldap_struct, final_rid, &result) != LDAP_SUCCESS) { DEBUG(0, ("Cannot allocate NUA RID %d (0x%x), as the confirmation search failed!\n", final_rid, final_rid)); ldap_msgfree(result); return 0; @@ -1323,7 +1321,7 @@ static NTSTATUS ldapsam_getsampwnam(struct pdb_methods *my_methods, SAM_ACCOUNT ldap_unbind(ldap_struct); return ret; } - if (ldapsam_search_one_user_by_name(ldap_struct, sname, &result) != LDAP_SUCCESS) { + if (ldapsam_search_one_user_by_name(ldap_state, ldap_struct, sname, &result) != LDAP_SUCCESS) { ldap_unbind(ldap_struct); return ret; } @@ -1370,7 +1368,7 @@ static NTSTATUS ldapsam_getsampwrid(struct pdb_methods *my_methods, SAM_ACCOUNT ldap_unbind(ldap_struct); return ret; } - if (ldapsam_search_one_user_by_rid(ldap_struct, rid, &result) != LDAP_SUCCESS) { + if (ldapsam_search_one_user_by_rid(ldap_state, ldap_struct, rid, &result) != LDAP_SUCCESS) { ldap_unbind(ldap_struct); return ret; } @@ -1410,7 +1408,7 @@ static NTSTATUS ldapsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT } /******************************************************************** -Do the actual modification - also change a plaintext passord if +Do the actual modification - also change a plaittext passord if it it set. **********************************************************************/ @@ -1538,7 +1536,7 @@ static NTSTATUS ldapsam_delete_sam_account(struct pdb_methods *my_methods, SAM_A return ret; } - rc = ldapsam_search_one_user_by_name(ldap_struct, sname, &result); + rc = ldapsam_search_one_user_by_name(ldap_state, ldap_struct, sname, &result); if (ldap_count_entries (ldap_struct, result) == 0) { DEBUG (0, ("User doesn't exit!\n")); ldap_msgfree (result); @@ -1602,7 +1600,7 @@ static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, SAM_A return ret; } - rc = ldapsam_search_one_user_by_name(ldap_struct, + rc = ldapsam_search_one_user_by_name(ldap_state, ldap_struct, pdb_get_username(newpwd), &result); if (ldap_count_entries(ldap_struct, result) == 0) { @@ -1663,7 +1661,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO return ret; } - rc = ldapsam_search_one_user_by_name (ldap_struct, username, &result); + rc = ldapsam_search_one_user_by_name (ldap_state, ldap_struct, username, &result); if (ldap_count_entries(ldap_struct, result) != 0) { DEBUG(0,("User already in the base, with samba properties\n")); @@ -1674,7 +1672,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO ldap_msgfree(result); slprintf (filter, sizeof (filter) - 1, "uid=%s", username); - rc = ldapsam_search_one_user(ldap_struct, filter, &result); + rc = ldapsam_search_one_user(ldap_state, ldap_struct, filter, &result); num_result = ldap_count_entries(ldap_struct, result); if (num_result > 1) { -- cgit From 8cb53d56f21f5a33d7dc55e7bd7cd559a112ac52 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 17 Oct 2002 08:12:20 +0000 Subject: Revert changes (This used to be commit 975fd17f8af0f03f43995deb3fdd9bd5995a1c92) --- source3/groupdb/mapping.c | 40 ++++++++++++++++------------------------ source3/passdb/passdb.c | 2 +- 2 files changed, 17 insertions(+), 25 deletions(-) (limited to 'source3') diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index d78582e7e5..0f05316949 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -1048,42 +1048,34 @@ Returns a GROUP_MAP struct based on the gid. BOOL get_group_from_gid(gid_t gid, GROUP_MAP *map, BOOL with_priv) { struct group *grp; - fstring name; - DOM_SID sid; - fstring string_sid; - PRIVILEGE_SET priv_set; if(!init_group_mapping()) { DEBUG(0,("failed to initialize group mapping")); return(False); } - if (get_group_map_from_gid(gid, map, with_priv)) - return True; - - /* There is no mapping, create one on the fly. This is just - interim, we need a RID allocator in the passdb backend. */ + if ( (grp=getgrgid(gid)) == NULL) + return False; - if ((grp=getgrgid(gid)) != NULL) { - slprintf(name, sizeof(name), "Group %s", grp->gr_name); - } else { - slprintf(name, sizeof(name), "Group %d", gid); - } + /* + * make a group map from scratch if doesn't exist. + */ + if (!get_group_map_from_gid(gid, map, with_priv)) { + map->gid=gid; + map->sid_name_use=SID_NAME_ALIAS; + map->systemaccount=PR_ACCESS_FROM_NETWORK; + init_privilege(&map->priv_set); - /* interim solution until we have a last RID allocated */ + /* interim solution until we have a last RID allocated */ - sid_copy(&sid, get_global_sam_sid()); - sid_append_rid(&sid, pdb_gid_to_group_rid(gid)); - sid_to_string(string_sid, &sid); - init_privilege(&priv_set); + sid_copy(&map->sid, get_global_sam_sid()); + sid_append_rid(&map->sid, pdb_gid_to_group_rid(gid)); - if (!add_initial_entry(gid, string_sid, SID_NAME_DOM_GRP, - name, "Local Unix Group", - priv_set, PR_ACCESS_FROM_NETWORK)) { - return False; + fstrcpy(map->nt_name, grp->gr_name); + fstrcpy(map->comment, "Local Unix Group"); } - return get_group_map_from_gid(gid, map, with_priv); + return True; } diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index dfaf7c88be..9402f0c94c 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -897,7 +897,7 @@ DOM_SID *local_gid_to_sid(DOM_SID *psid, gid_t gid) sid_copy(psid, get_global_sam_sid()); - if (get_group_from_gid(gid, &map, MAPPING_WITHOUT_PRIV)) { + if (get_group_map_from_gid(gid, &map, MAPPING_WITHOUT_PRIV)) { sid_copy(psid, &map.sid); } else { -- cgit From 389a16d9d5331ddc7ae61d3d4ef3a4ee48734d4b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 17 Oct 2002 17:10:29 +0000 Subject: Added new error codes. Fix up connection code to retry in the same way that app-head does. Jeremy. (This used to be commit b521abd86b10573ca8f9116907c81e6deb55f049) --- source3/auth/auth_domain.c | 33 ++++++++++++++++++++--------- source3/client/smbspool.c | 2 +- source3/include/doserr.h | 47 +++++++++++++++++++++++++++++++++++------- source3/libsmb/cliconnect.c | 12 ++++++++++- source3/nsswitch/winbindd_cm.c | 22 ++++++++++++++++---- source3/rpcclient/rpcclient.c | 2 +- source3/smbd/change_trust_pw.c | 2 +- source3/utils/net.c | 4 ++-- source3/utils/smbcacls.c | 2 +- source3/utils/smbtree.c | 2 +- 10 files changed, 99 insertions(+), 29 deletions(-) (limited to 'source3') diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 59b9233a2d..129c486562 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -88,8 +88,7 @@ static NTSTATUS rpc_resolve_dc(const char *server, way to find it, but until we have a RPC call that does this it will have to do */ if (!name_status_find("*", 0x20, 0x20, to_ip, remote_machine)) { - DEBUG(2, ("connect_to_domain_password_server: Can't " - "resolve name for IP %s\n", server)); + DEBUG(2, ("rpc_resolve_dc: Can't resolve name for IP %s\n", server)); return NT_STATUS_NO_LOGON_SERVERS; } @@ -100,7 +99,7 @@ static NTSTATUS rpc_resolve_dc(const char *server, fstrcpy(remote_machine, server); strupper(remote_machine); if (!resolve_name(remote_machine, dest_ip, 0x20)) { - DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", + DEBUG(1,("rpc_resolve_dc: Can't resolve address for %s\n", remote_machine)); return NT_STATUS_NO_LOGON_SERVERS; } @@ -126,18 +125,20 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, const char *server, const char *setup_creds_as, uint16 sec_chan, - const unsigned char *trust_passwd) + const unsigned char *trust_passwd, + BOOL *retry) { struct in_addr dest_ip; fstring remote_machine; NTSTATUS result; uint32 neg_flags = 0x000001ff; - if (lp_security() == SEC_ADS) { + *retry = False; + + if (lp_security() == SEC_ADS) result = ads_resolve_dc(remote_machine, &dest_ip); - } else { + else result = rpc_resolve_dc(server, remote_machine, &dest_ip); - } if (!NT_STATUS_IS_OK(result)) { DEBUG(2,("connect_to_domain_password_server: unable to resolve DC: %s\n", @@ -165,12 +166,14 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, * ACCESS_DENIED errors if 2 auths are done from the same machine. JRA. */ + *retry = True; + if (!grab_server_mutex(server)) return NT_STATUS_NO_LOGON_SERVERS; /* Attempt connection */ result = cli_full_connection(cli, global_myname, remote_machine, - &dest_ip, 0, "IPC$", "IPC", "", "", "",0); + &dest_ip, 0, "IPC$", "IPC", "", "", "",0, retry); if (!NT_STATUS_IS_OK(result)) { release_server_mutex(); @@ -235,7 +238,10 @@ static NTSTATUS attempt_connect_to_dc(struct cli_state **cli, uint16 sec_chan, const unsigned char *trust_passwd) { + NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; + BOOL retry = True; fstring dc_name; + int i; /* * Ignore addresses we have already tried. @@ -247,7 +253,10 @@ static NTSTATUS attempt_connect_to_dc(struct cli_state **cli, if (!lookup_dc_name(global_myname, domain, ip, dc_name)) return NT_STATUS_NO_LOGON_SERVERS; - return connect_to_domain_password_server(cli, dc_name, setup_creds_as, sec_chan, trust_passwd); + for (i = 0; (!NT_STATUS_IS_OK(ret)) && retry && (i < 3); i++) + ret = connect_to_domain_password_server(cli, dc_name, setup_creds_as, + sec_chan, trust_passwd, &retry); + return ret; } /*********************************************************************** @@ -371,7 +380,11 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx, if(lp_security() != SEC_ADS && strequal(remote_machine, "*")) { nt_status = find_connect_pdc(&cli, domain, setup_creds_as, sec_chan, trust_passwd, last_change_time); } else { - nt_status = connect_to_domain_password_server(&cli, remote_machine, setup_creds_as, sec_chan, trust_passwd); + int i; + BOOL retry = False; + for (i = 0; !NT_STATUS_IS_OK(nt_status) && retry && (i < 3); i++) + nt_status = connect_to_domain_password_server(&cli, remote_machine, setup_creds_as, + sec_chan, trust_passwd, &retry); } } diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index ecb5c311c5..ff10963533 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -282,7 +282,7 @@ smb_connect(char *workgroup, /* I - Workgroup */ get_myname(myname); nt_status = cli_full_connection(&c, myname, server, NULL, 0, share, "?????", - username, workgroup, password, 0); + username, workgroup, password, 0, NULL); if (!NT_STATUS_IS_OK(nt_status)) { fprintf(stderr, "ERROR: Connection failed with error %s\n", nt_errstr(nt_status)); diff --git a/source3/include/doserr.h b/source3/include/doserr.h index 93936463e6..576aeda2bf 100644 --- a/source3/include/doserr.h +++ b/source3/include/doserr.h @@ -82,13 +82,28 @@ #define ERRnoipc 66 /* don't support ipc */ /* These errors seem to be only returned by the NT printer driver system */ - +#define ERRdriveralreadyinstalled 1795 /* ERROR_PRINTER_DRIVER_ALREADY_INSTALLED */ +#define ERRunknownprinterport 1796 /* ERROR_UNKNOWN_PORT */ #define ERRunknownprinterdriver 1797 /* ERROR_UNKNOWN_PRINTER_DRIVER */ +#define ERRunknownprintprocessor 1798 /* ERROR_UNKNOWN_PRINTPROCESSOR */ +#define ERRinvalidseparatorfile 1799 /* ERROR_INVALID_SEPARATOR_FILE */ +#define ERRinvalidjobpriority 1800 /* ERROR_INVALID_PRIORITY */ #define ERRinvalidprintername 1801 /* ERROR_INVALID_PRINTER_NAME */ #define ERRprinteralreadyexists 1802 /* ERROR_PRINTER_ALREADY_EXISTS */ +#define ERRinvalidprintercommand 1803 /* ERROR_INVALID_PRINTER_COMMAND */ #define ERRinvaliddatatype 1804 /* ERROR_INVALID_DATATYPE */ #define ERRinvalidenvironment 1805 /* ERROR_INVALID_ENVIRONMENT */ + +#define ERRunknownprintmonitor 3000 /* ERROR_UNKNOWN_PRINT_MONITOR */ #define ERRprinterdriverinuse 3001 /* ERROR_PRINTER_DRIVER_IN_USE */ +#define ERRspoolfilenotfound 3002 /* ERROR_SPOOL_FILE_NOT_FOUND */ +#define ERRnostartdoc 3003 /* ERROR_SPL_NO_STARTDOC */ +#define ERRnoaddjob 3004 /* ERROR_SPL_NO_ADDJOB */ +#define ERRprintprocessoralreadyinstalled 3005 /* ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED */ +#define ERRprintmonitoralreadyinstalled 3006 /* ERROR_PRINT_MONITOR_ALREADY_INSTALLED */ +#define ERRinvalidprintmonitor 3007 /* ERROR_INVALID_PRINT_MONITOR */ +#define ERRprintmonitorinuse 3008 /* ERROR_PRINT_MONITOR_IN_USE */ +#define ERRprinterhasjobsqueued 3009 /* ERROR_PRINTER_HAS_JOBS_QUEUED */ /* Error codes for the ERRSRV class */ @@ -171,20 +186,38 @@ #define WERR_CAN_NOT_COMPLETE W_ERROR(1003) #define WERR_INVALID_SECURITY_DESCRIPTOR W_ERROR(1338) #define WERR_SERVER_UNAVAILABLE W_ERROR(1722) -#define WERR_UNKNOWN_PRINTER_DRIVER W_ERROR(1797) -#define WERR_INVALID_PRINTER_NAME W_ERROR(1801) -#define WERR_PRINTER_ALREADY_EXISTS W_ERROR(1802) -#define WERR_INVALID_DATATYPE W_ERROR(1804) -#define WERR_INVALID_ENVIRONMENT W_ERROR(1805) #define WERR_INVALID_FORM_NAME W_ERROR(1902) #define WERR_INVALID_FORM_SIZE W_ERROR(1903) #define WERR_BUF_TOO_SMALL W_ERROR(2123) #define WERR_JOB_NOT_FOUND W_ERROR(2151) #define WERR_DEST_NOT_FOUND W_ERROR(2152) #define WERR_NOT_LOCAL_DOMAIN W_ERROR(2320) -#define WERR_PRINTER_DRIVER_IN_USE W_ERROR(3001) #define WERR_STATUS_MORE_ENTRIES W_ERROR(0x0105) +#define WERR_PRINTER_DRIVER_ALREADY_INSTALLED W_ERROR(ERRdriveralreadyinstalled) +#define WERR_UNKNOWN_PORT W_ERROR(ERRunknownprinterport) +#define WERR_UNKNOWN_PRINTER_DRIVER W_ERROR(ERRunknownprinterdriver) +#define WERR_UNKNOWN_PRINTPROCESSOR W_ERROR(ERRunknownprintprocessor) +#define WERR_INVALID_SEPARATOR_FILE W_ERROR(ERRinvalidseparatorfile) +#define WERR_INVALID_PRIORITY W_ERROR(ERRinvalidjobpriority) +#define WERR_INVALID_PRINTER_NAME W_ERROR(ERRinvalidprintername) +#define WERR_PRINTER_ALREADY_EXISTS W_ERROR(ERRprinteralreadyexists) +#define WERR_INVALID_PRINTER_COMMAND W_ERROR(ERRinvalidprintercommand) +#define WERR_INVALID_DATATYPE W_ERROR(ERRinvaliddatatype) +#define WERR_INVALID_ENVIRONMENT W_ERROR(ERRinvalidenvironment) + +#define WERR_UNKNOWN_PRINT_MONITOR W_ERROR(ERRunknownprintmonitor) +#define WERR_PRINTER_DRIVER_IN_USE W_ERROR(ERRprinterdriverinuse) +#define WERR_SPOOL_FILE_NOT_FOUND W_ERROR(ERRspoolfilenotfound) +#define WERR_SPL_NO_STARTDOC W_ERROR(ERRnostartdoc) +#define WERR_SPL_NO_ADDJOB W_ERROR(ERRnoaddjob) +#define WERR_PRINT_PROCESSOR_ALREADY_INSTALLED W_ERROR(ERRprintprocessoralreadyinstalled) +#define WERR_PRINT_MONITOR_ALREADY_INSTALLED W_ERROR(ERRprintmonitoralreadyinstalled) +#define WERR_INVALID_PRINT_MONITOR W_ERROR(ERRinvalidprintmonitor) +#define WERR_PRINT_MONITOR_IN_USE W_ERROR(ERRprintmonitorinuse) +#define WERR_PRINTER_HAS_JOBS_QUEUED W_ERROR(ERRprinterhasjobsqueued) + + /* DFS errors */ #ifndef NERR_BASE diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index f005ac21f3..6a21121f43 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1153,6 +1153,7 @@ static void init_creds(struct ntuser_creds *creds, char* username, @param user Username, unix string @param domain User's domain @param password User's password, unencrypted unix string. + @param retry BOOL. Did this connection fail with a retryable error ? */ NTSTATUS cli_full_connection(struct cli_state **output_cli, @@ -1161,7 +1162,8 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli, struct in_addr *dest_ip, int port, char *service, char *service_type, char *user, char *domain, - char *password, int flags) + char *password, int flags, + BOOL *retry) { struct ntuser_creds creds; NTSTATUS nt_status; @@ -1171,6 +1173,9 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli, struct in_addr ip; extern pstring global_myname; + if (retry) + *retry = False; + if (!my_name) my_name = global_myname; @@ -1185,6 +1190,8 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli, return NT_STATUS_UNSUCCESSFUL; } + cli_set_timeout(cli, 10000); /* 10 seconds. */ + if (dest_ip) ip = *dest_ip; else @@ -1201,6 +1208,9 @@ again: return NT_STATUS_UNSUCCESSFUL; } + if (retry) + *retry = True; + if (!cli_session_request(cli, &calling, &called)) { char *p; DEBUG(1,("session request to %s failed (%s)\n", diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index cb1779f590..5f477c78f7 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -392,6 +392,8 @@ static NTSTATUS cm_open_connection(const char *domain, const int pipe_index, NTSTATUS result; char *ipc_username, *ipc_domain, *ipc_password; struct in_addr dc_ip; + int i; + BOOL retry = True; ZERO_STRUCT(dc_ip); @@ -446,10 +448,22 @@ static NTSTATUS cm_open_connection(const char *domain, const int pipe_index, DEBUG(5, ("connecting to %s from %s with username [%s]\\[%s]\n", new_conn->controller, global_myname, ipc_domain, ipc_username)); - result = cli_full_connection(&(new_conn->cli), global_myname, new_conn->controller, - &dc_ip, 0, "IPC$", - "IPC", ipc_username, ipc_domain, - ipc_password, 0); + for (i = 0; retry && (i < 3); i++) { + + if (!secrets_named_mutex(new_conn->controller, 10)) { + DEBUG(0,("cm_open_connection: mutex grab failed for %s\n", new_conn->controller)); + continue; + } + + result = cli_full_connection(&(new_conn->cli), global_myname, new_conn->controller, + &dc_ip, 0, "IPC$", "IPC", ipc_username, ipc_domain, + ipc_password, 0, &retry); + + secrets_named_mutex_release(new_conn->controller); + + if (NT_STATUS_IS_OK(result)) + break; + } SAFE_FREE(ipc_username); SAFE_FREE(ipc_domain); diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 5aa8d2359f..e23140bdb0 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -723,7 +723,7 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) &server_ip, 0, "IPC$", "IPC", username, domain, - password, 0); + password, 0, NULL); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0,("Cannot connect to server. Error was %s\n", nt_errstr(nt_status))); diff --git a/source3/smbd/change_trust_pw.c b/source3/smbd/change_trust_pw.c index 4b2944a96f..5da735e875 100644 --- a/source3/smbd/change_trust_pw.c +++ b/source3/smbd/change_trust_pw.c @@ -50,7 +50,7 @@ static NTSTATUS modify_trust_password( char *domain, char *remote_machine, NULL, 0, "IPC$", "IPC", "", "", - "", 0))) { + "", 0, NULL))) { DEBUG(0,("modify_trust_password: Connection to %s failed!\n", remote_machine)); return NT_STATUS_UNSUCCESSFUL; } diff --git a/source3/utils/net.c b/source3/utils/net.c index b3b72e2465..d38ca58622 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -121,7 +121,7 @@ NTSTATUS connect_to_ipc(struct cli_state **c, struct in_addr *server_ip, server_ip, opt_port, "IPC$", "IPC", opt_user_name, opt_workgroup, - opt_password, 0); + opt_password, 0, NULL); if (NT_STATUS_IS_OK(nt_status)) { return nt_status; @@ -151,7 +151,7 @@ NTSTATUS connect_to_ipc_anonymous(struct cli_state **c, server_ip, opt_port, "IPC$", "IPC", "", "", - "", 0); + "", 0, NULL); if (NT_STATUS_IS_OK(nt_status)) { return nt_status; diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 2e8317f05a..940187407c 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -722,7 +722,7 @@ static struct cli_state *connect_one(char *share) &ip, 0, share, "?????", username, global_myworkgroup, - password, 0))) { + password, 0, NULL))) { return c; } else { DEBUG(0,("cli_full_connection failed! (%s)\n", nt_errstr(nt_status))); diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c index b733f8112f..940120d644 100644 --- a/source3/utils/smbtree.c +++ b/source3/utils/smbtree.c @@ -100,7 +100,7 @@ static struct cli_state *get_ipc_connect(char *server, struct in_addr *server_ip nt_status = cli_full_connection(&cli, myname, server, server_ip, 0, "IPC$", "IPC", user_info->username, lp_workgroup(), user_info->password, - CLI_FULL_CONNECTION_ANNONYMOUS_FALLBACK); + CLI_FULL_CONNECTION_ANNONYMOUS_FALLBACK, NULL); if (NT_STATUS_IS_OK(nt_status)) { return cli; -- cgit From 6ed415f4f5d7b6e65ffa7c91431e3551b397284a Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Fri, 18 Oct 2002 15:09:17 +0000 Subject: Fix build. Extra parm was added to cli_full_connection, but not in locktest2.c. (This used to be commit 51e0f5c2dd469c59a41822dbda293e59794a7dc4) --- source3/torture/locktest2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c index 58817bbd36..c4323ac377 100644 --- a/source3/torture/locktest2.c +++ b/source3/torture/locktest2.c @@ -176,7 +176,8 @@ static struct cli_state *connect_one(char *share) slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++); nt_status = cli_full_connection(&c, myname, server_n, NULL, 0, share, "?????", - username, lp_workgroup(), password, 0); + username, lp_workgroup(), password, 0, + NULL); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0, ("cli_full_connection failed with error %s\n", nt_errstr(nt_status))); -- cgit From fb3d215b396d9c3a1aecf9335a5520bdd604117f Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Fri, 18 Oct 2002 17:29:20 +0000 Subject: Add extra parm to cli_full_connection call. Tim, you should probably look at this. (This used to be commit a9f632ed5d3d033849c25efac419b21e830c5069) --- source3/python/py_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/python/py_common.c b/source3/python/py_common.c index 8742cfa363..364271d57c 100644 --- a/source3/python/py_common.c +++ b/source3/python/py_common.c @@ -233,7 +233,7 @@ struct cli_state *open_pipe_creds(char *server, PyObject *creds, result = cli_full_connection( &cli, NULL, server, NULL, 0, "IPC$", "IPC", - username, domain, password, 0); + username, domain, password, 0, NULL); if (!NT_STATUS_IS_OK(result)) { *errstr = strdup("error connecting to IPC$ pipe"); -- cgit From e1096e69365e0983bd82c73937f0daa1c0143bdd Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 18 Oct 2002 17:42:41 +0000 Subject: NULL enum_local_groups for ads winbindd (temporary workaround). (This used to be commit 06eea39abdb49d9d547707dcb170c988d7276c1d) --- source3/nsswitch/winbindd_ads.c | 1 + source3/nsswitch/winbindd_group.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index 228c4a2a08..abdb4f9ef6 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -675,6 +675,7 @@ struct winbindd_methods ads_methods = { True, query_user_list, enum_dom_groups, + NULL, name_to_sid, sid_to_name, query_user, diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index dc22be1754..507d5caf0f 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -463,7 +463,7 @@ static BOOL get_sam_group_entries(struct getent_state *ent) /* get the domain local groups if we are a member of a native win2k domain */ - if ( domain->native_mode ) + if ( domain->native_mode && domain->methods->enum_local_groups ) { DEBUG(4,("get_sam_group_entries: Native Mode 2k domain; enumerating local groups as well\n")); -- cgit From e13dd2f3025a557bbd71765a684005562591843d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Oct 2002 19:46:28 +0000 Subject: Start to merge the new ACL mapping code from Andreas Gruenbacher . Jeremy. (This used to be commit f6103f866a5e698ab55fdab1444a14e3d8da16bb) --- source3/lib/util_sid.c | 106 +++++++++++++++++++++++++++--------------- source3/passdb/util_sam_sid.c | 48 +++++++++++++++---- 2 files changed, 106 insertions(+), 48 deletions(-) (limited to 'source3') diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index c5b4a143ea..f01479f1cc 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -55,6 +55,11 @@ DOM_SID global_sid_Builtin_Print_Operators; /* Builtin print operators */ DOM_SID global_sid_Builtin_Backup_Operators; /* Builtin backup operators */ DOM_SID global_sid_Builtin_Replicator; /* Builtin replicator */ +#define SECURITY_NULL_SID_AUTHORITY 0 +#define SECURITY_WORLD_SID_AUTHORITY 1 +#define SECURITY_LOCAL_SID_AUTHORITY 2 +#define SECURITY_CREATOR_SID_AUTHORITY 3 +#define SECURITY_NT_AUTHORITY 5 /* * An NT compatible anonymous token. @@ -63,14 +68,14 @@ DOM_SID global_sid_Builtin_Replicator; /* Builtin replicator */ static DOM_SID anon_sid_array[3]; NT_USER_TOKEN anonymous_token = { - 3, - anon_sid_array + 3, + anon_sid_array }; static DOM_SID system_sid_array[4]; NT_USER_TOKEN system_token = { - 1, - system_sid_array + 1, + system_sid_array }; /**************************************************************************** @@ -81,13 +86,13 @@ const static struct { enum SID_NAME_USE sid_type; char *string; } sid_name_type[] = { - {SID_NAME_USER, "user"}, - {SID_NAME_DOM_GRP, "domain group"}, - {SID_NAME_DOMAIN, "domain"}, - {SID_NAME_ALIAS, "local group"}, - {SID_NAME_WKN_GRP, "well-known group"}, - {SID_NAME_DELETED, "deleted account"}, - {SID_NAME_INVALID, "invalid account"}, + {SID_NAME_USER, "User"}, + {SID_NAME_DOM_GRP, "Domain Group"}, + {SID_NAME_DOMAIN, "Domain"}, + {SID_NAME_ALIAS, "Local Group"}, + {SID_NAME_WKN_GRP, "Well-known Group"}, + {SID_NAME_DELETED, "Deleted Account"}, + {SID_NAME_INVALID, "Invalid Account"}, {SID_NAME_UNKNOWN, "UNKNOWN"}, {SID_NAME_USE_NONE, NULL} @@ -106,10 +111,8 @@ const char *sid_type_lookup(uint32 sid_type) /* Default return */ return "SID *TYPE* is INVALID"; - } - /**************************************************************************** Creates some useful well known sids ****************************************************************************/ @@ -117,22 +120,30 @@ const char *sid_type_lookup(uint32 sid_type) void generate_wellknown_sids(void) { static BOOL initialised = False; + if (initialised) return; + /* SECURITY_NULL_SID_AUTHORITY */ + string_to_sid(&global_sid_NULL, "S-1-0-0"); + + /* SECURITY_WORLD_SID_AUTHORITY */ string_to_sid(&global_sid_World_Domain, "S-1-1"); string_to_sid(&global_sid_World, "S-1-1-0"); + + /* SECURITY_CREATOR_SID_AUTHORITY */ string_to_sid(&global_sid_Creator_Owner_Domain, "S-1-3"); string_to_sid(&global_sid_Creator_Owner, "S-1-3-0"); string_to_sid(&global_sid_Creator_Group, "S-1-3-1"); + + /* SECURITY_NT_AUTHORITY */ string_to_sid(&global_sid_NT_Authority, "S-1-5"); - string_to_sid(&global_sid_System, "S-1-5-18"); - string_to_sid(&global_sid_NULL, "S-1-0-0"); - string_to_sid(&global_sid_Authenticated_Users, "S-1-5-11"); string_to_sid(&global_sid_Network, "S-1-5-2"); string_to_sid(&global_sid_Anonymous, "S-1-5-7"); + string_to_sid(&global_sid_Authenticated_Users, "S-1-5-11"); + string_to_sid(&global_sid_System, "S-1-5-18"); - /* create well known builtin SIDs */ + /* SECURITY_BUILTIN_DOMAIN_RID */ string_to_sid(&global_sid_Builtin, "S-1-5-32"); string_to_sid(&global_sid_Builtin_Administrators, "S-1-5-32-544"); string_to_sid(&global_sid_Builtin_Users, "S-1-5-32-545"); @@ -195,40 +206,59 @@ void split_domain_name(const char *fullname, char *domain, char *name) fullname, domain, name)); } +/**************************************************************************** + Test if a SID is wellknown and resolvable. +****************************************************************************/ + +BOOL resolvable_wellknown_sid(DOM_SID *sid) +{ + uint32 ia = (sid->id_auth[5]) + + (sid->id_auth[4] << 8 ) + + (sid->id_auth[3] << 16) + + (sid->id_auth[2] << 24); + + if (sid->sid_rev_num != SEC_DESC_REVISION || sid->num_auths < 1) + return False; + + return (ia == SECURITY_WORLD_SID_AUTHORITY || + ia == SECURITY_CREATOR_SID_AUTHORITY); +} + /***************************************************************** Convert a SID to an ascii string. *****************************************************************/ char *sid_to_string(fstring sidstr_out, const DOM_SID *sid) { - char subauth[16]; - int i; - uint32 ia; + char subauth[16]; + int i; + uint32 ia; - if (!sid) { - fstrcpy(sidstr_out, "(NULL SID)"); - return sidstr_out; - } + if (!sid) { + fstrcpy(sidstr_out, "(NULL SID)"); + return sidstr_out; + } - /* BIG NOTE: this function only does SIDS where the identauth is not >= 2^32 */ - ia = (sid->id_auth[5]) + - (sid->id_auth[4] << 8 ) + - (sid->id_auth[3] << 16) + - (sid->id_auth[2] << 24); + /* BIG NOTE: this function only does SIDS where the identauth is not >= 2^32 */ + ia = (sid->id_auth[5]) + + (sid->id_auth[4] << 8 ) + + (sid->id_auth[3] << 16) + + (sid->id_auth[2] << 24); - slprintf(sidstr_out, sizeof(fstring) - 1, "S-%u-%lu", (unsigned int)sid->sid_rev_num, (unsigned long)ia); + slprintf(sidstr_out, sizeof(fstring) - 1, "S-%u-%lu", (unsigned int)sid->sid_rev_num, (unsigned long)ia); - for (i = 0; i < sid->num_auths; i++) { - slprintf(subauth, sizeof(subauth)-1, "-%lu", (unsigned long)sid->sub_auths[i]); - fstrcat(sidstr_out, subauth); - } + for (i = 0; i < sid->num_auths; i++) { + slprintf(subauth, sizeof(subauth)-1, "-%lu", (unsigned long)sid->sub_auths[i]); + fstrcat(sidstr_out, subauth); + } - return sidstr_out; + return sidstr_out; } -/* - useful function for debug lines -*/ +/***************************************************************** + Useful function for debug lines. +*****************************************************************/ + const char *sid_string_static(const DOM_SID *sid) { static fstring sid_str; diff --git a/source3/passdb/util_sam_sid.c b/source3/passdb/util_sam_sid.c index 6ec1e48ab3..60998003f6 100644 --- a/source3/passdb/util_sam_sid.c +++ b/source3/passdb/util_sam_sid.c @@ -54,7 +54,8 @@ static known_sid_users everyone_users[] = { {0, (enum SID_NAME_USE)0, NULL}}; static known_sid_users creator_owner_users[] = { - { 0, SID_NAME_ALIAS, "Creator Owner" }, + { 0, SID_NAME_WKN_GRP, "Creator Owner" }, + { 1, SID_NAME_WKN_GRP, "Creator Group" }, {0, (enum SID_NAME_USE)0, NULL}}; static known_sid_users nt_authority_users[] = { @@ -80,11 +81,10 @@ static known_sid_users builtin_groups[] = { { BUILTIN_ALIAS_RID_BACKUP_OPS, SID_NAME_ALIAS, "Backup Operators" }, { 0, (enum SID_NAME_USE)0, NULL}}; - - /************************************************************************** - quick init function - *************************************************************************/ + Quick init function. +*************************************************************************/ + static void init_sid_name_map (void) { int i = 0; @@ -105,8 +105,7 @@ static void init_sid_name_map (void) sid_name_map[i].name = global_myname; sid_name_map[i].known_users = NULL; i++; - } - else { + } else { sid_name_map[i].sid = get_global_sam_sid(); sid_name_map[i].name = global_myname; sid_name_map[i].known_users = NULL; @@ -133,8 +132,7 @@ static void init_sid_name_map (void) sid_name_map[i].known_users = &nt_authority_users[0]; i++; - - /* end of array */ + /* End of array. */ sid_name_map[i].sid = NULL; sid_name_map[i].name = NULL; sid_name_map[i].known_users = NULL; @@ -142,7 +140,6 @@ static void init_sid_name_map (void) sid_name_map_initialized = True; return; - } /************************************************************************** @@ -257,6 +254,7 @@ BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain) /***************************************************************** Check if the SID is our domain SID (S-1-5-21-x-y-z). *****************************************************************/ + BOOL sid_check_is_domain(const DOM_SID *sid) { return sid_equal(sid, get_global_sam_sid()); @@ -265,6 +263,7 @@ BOOL sid_check_is_domain(const DOM_SID *sid) /***************************************************************** Check if the SID is our domain SID (S-1-5-21-x-y-z). *****************************************************************/ + BOOL sid_check_is_in_our_domain(const DOM_SID *sid) { DOM_SID dom_sid; @@ -276,3 +275,32 @@ BOOL sid_check_is_in_our_domain(const DOM_SID *sid) return sid_equal(&dom_sid, get_global_sam_sid()); } +/************************************************************************** + Try and map a name to one of the well known SIDs. +***************************************************************************/ + +BOOL map_name_to_wellknown_sid(DOM_SID *sid, enum SID_NAME_USE *use, const char *name) +{ + int i, j; + + if (!sid_name_map_initialized) + init_sid_name_map(); + + for (i=0; sid_name_map[i].sid != NULL; i++) { + known_sid_users *users = sid_name_map[i].known_users; + + if (users == NULL) + continue; + + for (j=0; users[j].known_user_name != NULL; j++) { + if (strequal(users[j].known_user_name, name) == 0) { + sid_copy(sid, sid_name_map[i].sid); + sid_append_rid(sid, users[j].rid); + *use = users[j].sid_name_use; + return True; + } + } + } + + return False; +} -- cgit From e042a93cce2fdadfd88c93b813e10f0cc12f570e Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Fri, 18 Oct 2002 20:11:29 +0000 Subject: Format objectGUIDs on ads dumps. (This used to be commit 7eaf7e7115c75e682b1b9368c6f28c60429885e5) --- source3/lib/util_uuid.c | 39 +++++++++++++++++++++++++++++++++++---- source3/libads/ldap.c | 19 ++++++++++++++++++- 2 files changed, 53 insertions(+), 5 deletions(-) (limited to 'source3') diff --git a/source3/lib/util_uuid.c b/source3/lib/util_uuid.c index 63e2504982..1543094d40 100644 --- a/source3/lib/util_uuid.c +++ b/source3/lib/util_uuid.c @@ -31,7 +31,7 @@ struct uuid { uint32 time_low; uint16 time_mid; uint16 time_hi_and_version; - uint16 clock_seq; + uint8 clock_seq[2]; uint8 node[6]; }; @@ -43,7 +43,7 @@ static void uuid_pack(const struct uuid *uu, GUID *ptr) SIVAL(out, 0, uu->time_low); SSVAL(out, 4, uu->time_mid); SSVAL(out, 6, uu->time_hi_and_version); - SSVAL(out, 8, uu->clock_seq); + memcpy(out+8, uu->clock_seq, 2); memcpy(out+10, uu->node, 6); } @@ -54,7 +54,7 @@ static void uuid_unpack(const GUID in, struct uuid *uu) uu->time_low = IVAL(ptr, 0); uu->time_mid = SVAL(ptr, 4); uu->time_hi_and_version = SVAL(ptr, 6); - uu->clock_seq = SVAL(ptr, 8); + memcpy(uu->clock_seq, ptr+8, 2); memcpy(uu->node, ptr+10, 6); } @@ -66,7 +66,38 @@ void uuid_generate_random(GUID *out) generate_random_buffer(tmp.info, sizeof(tmp.info), True); uuid_unpack(tmp, &uu); - uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000; + uu.clock_seq[0] = (uu.clock_seq[0] & 0x3F) | 0x80; uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF) | 0x4000; uuid_pack(&uu, out); } + +char *uuid_to_string(const GUID in) +{ + struct uuid uu; + char *out; + + uuid_unpack(in, &uu); + + asprintf(&out, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + uu.time_low, uu.time_mid, uu.time_hi_and_version, + uu.clock_seq[0], uu.clock_seq[1], + uu.node[0], uu.node[1], uu.node[2], + uu.node[3], uu.node[4], uu.node[5]); + + return out; +} + +const char *uuid_string_static(const GUID in) +{ + struct uuid uu; + static char out[37]; + + uuid_unpack(in, &uu); + slprintf(out, sizeof(out) -1, + "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + uu.time_low, uu.time_mid, uu.time_hi_and_version, + uu.clock_seq[0], uu.clock_seq[1], + uu.node[0], uu.node[1], uu.node[2], + uu.node[3], uu.node[4], uu.node[5]); + return out; +} diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index d3c8b39e22..2359dbd7ed 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -1106,6 +1106,23 @@ static void dump_binary(const char *field, struct berval **values) } } +struct uuid { + uint32 i1; + uint16 i2; + uint16 i3; + uint8 s[8]; +}; + +static void dump_guid(const char *field, struct berval **values) +{ + int i; + GUID guid; + for (i=0; values[i]; i++) { + memcpy(guid.info, values[i]->bv_val, sizeof(guid.info)); + printf("%s: %s\n", field, uuid_string_static(guid)); + } +} + /* dump a sid result from ldap */ @@ -1172,7 +1189,7 @@ static BOOL ads_dump_field(char *field, void **values, void *data_area) BOOL string; void (*handler)(const char *, struct berval **); } handlers[] = { - {"objectGUID", False, dump_binary}, + {"objectGUID", False, dump_guid}, {"nTSecurityDescriptor", False, dump_sd}, {"dnsRecord", False, dump_binary}, {"objectSid", False, dump_sid}, -- cgit From d00d56faeaf92d0f641b73e837d6a8512cd47260 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 18 Oct 2002 22:27:55 +0000 Subject: It seems that I'm meant to be using the helper function here, not the struct directly... Andrew Bartlett (This used to be commit 0abeb8725e8ea53a468d6004457bb7fa89a0f8b2) --- source3/lib/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/lib/debug.c b/source3/lib/debug.c index f4f3ee2f9f..483db71b85 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -603,7 +603,7 @@ BOOL reopen_logs( void ) (void)umask(oldumask); /* Take over stderr to catch ouput into logs */ - if (dbf && sys_dup2(dbf->fd, 2) == -1) { + if (dbf && sys_dup2(x_fileno(dbf), 2) == -1) { close_low_fds(True); /* Close stderr too, if dup2 can't point it at the logfile */ } -- cgit From 9cfa18208ba515ab2d49f945d955dcb9a5c68103 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 18 Oct 2002 23:27:49 +0000 Subject: Don't encourage people to use -P - it's obsolete (This used to be commit 59ecac901a231383bd4cacb326724f786e3d7244) --- source3/client/client.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source3') diff --git a/source3/client/client.c b/source3/client/client.c index 31c047c1c5..96b9837fef 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2502,7 +2502,6 @@ static void usage(char *pname) d_printf("\t-N don't ask for a password\n"); d_printf("\t-n netbios name. Use this name as my netbios name\n"); d_printf("\t-d debuglevel set the debuglevel\n"); - d_printf("\t-P connect to service as a printer\n"); d_printf("\t-p port connect to the specified port\n"); d_printf("\t-l log basename. Basename for log/debug files\n"); d_printf("\t-h Print this help message.\n"); -- cgit From 955003ebce31773388592e041a2399cb0004a4b3 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 18 Oct 2002 23:52:05 +0000 Subject: must add one to the extra_data size to transfer the 0 string terminator. This was causing "wbinfo --sequence" to access past the end of malloced memory. (This used to be commit 4125c582aaf86ee5d92b0c800266543a390aefce) --- source3/nsswitch/winbindd_misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c index 45f2d42f98..c2e744c0a7 100644 --- a/source3/nsswitch/winbindd_misc.c +++ b/source3/nsswitch/winbindd_misc.c @@ -182,7 +182,8 @@ enum winbindd_result winbindd_show_sequence(struct winbindd_cli_state *state) } state->response.extra_data = extra_data; - state->response.length += strlen(extra_data); + /* must add one to length to copy the 0 for string termination */ + state->response.length += strlen(extra_data) + 1; return WINBINDD_OK; } -- cgit From 0c35d7863293090925ee862285d844936dc38a94 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 19 Oct 2002 07:50:48 +0000 Subject: This fixes some bugs for NT4 usrmgr.exe Volker (This used to be commit 32d6bcf3acefc77873a7241cc0c7e26241a65301) --- source3/rpc_parse/parse_samr.c | 12 +++++++++++- source3/rpc_server/srv_samr_nt.c | 28 +++++++++++++++++++++------- source3/rpc_server/srv_samr_util.c | 2 +- 3 files changed, 33 insertions(+), 9 deletions(-) (limited to 'source3') diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 6b96b79047..08ed28e80a 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -6061,7 +6061,17 @@ NTSTATUS init_sam_user_info21A(SAM_USER_INFO_21 *usr, SAM_ACCOUNT *pw, DOM_SID * usr->user_rid = user_rid; usr->group_rid = group_rid; usr->acb_info = pdb_get_acct_ctrl(pw); - usr->unknown_3 = pdb_get_unknown_3(pw); + + /* + Look at a user on a real NT4 PDC with usrmgr, press + 'ok'. Then you will see that unknown_3 is set to + 0x08f827fa. Look at the user immediately after that again, + and you will see that 0x00fffff is returned. This solves + the problem that you get access denied after having looked + at the user. + -- Volker + */ + usr->unknown_3 = 0x00ffffff; usr->logon_divs = pdb_get_logon_divs(pw); usr->ptr_logon_hrs = pdb_get_hours(pw) ? 1 : 0; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 686614e9a4..126db91700 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -1180,6 +1180,15 @@ NTSTATUS _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, /* Get what we need from the password database */ switch (q_u->switch_level) { case 0x1: + /* When playing with usrmgr, this is necessary + if you want immediate refresh after editing + a user. I would like to do this after the + setuserinfo2, but we do not have access to + the domain handle in that call, only to the + user handle. Where else does this hurt? + -- Volker + */ + free_samr_users(info); case 0x2: case 0x4: become_root(); @@ -3181,7 +3190,7 @@ NTSTATUS _samr_query_aliasmem(pipes_struct *p, SAMR_Q_QUERY_ALIASMEM *q_u, SAMR_ if (sid_equal(&alias_sid, &global_sid_Builtin)) { DEBUG(10, ("lookup on Builtin SID (S-1-5-32)\n")); - if(!get_local_group_from_sid(als_sid, &map, MAPPING_WITHOUT_PRIV)) + if(!get_builtin_group_from_sid(als_sid, &map, MAPPING_WITHOUT_PRIV)) return NT_STATUS_NO_SUCH_ALIAS; } else { if (sid_equal(&alias_sid, get_global_sam_sid())) { @@ -3513,7 +3522,7 @@ NTSTATUS _samr_add_groupmem(pipes_struct *p, SAMR_Q_ADD_GROUPMEM *q_u, SAMR_R_AD GROUP_MAP map; uid_t uid; NTSTATUS ret; - SAM_ACCOUNT *sam_user; + SAM_ACCOUNT *sam_user=NULL; BOOL check; uint32 acc_granted; @@ -3560,19 +3569,21 @@ NTSTATUS _samr_add_groupmem(pipes_struct *p, SAMR_Q_ADD_GROUPMEM *q_u, SAMR_R_AD if ((pwd=getpwuid_alloc(uid)) == NULL) { return NT_STATUS_NO_SUCH_USER; - } else { - passwd_free(&pwd); } - if ((grp=getgrgid(map.gid)) == NULL) + if ((grp=getgrgid(map.gid)) == NULL) { + passwd_free(&pwd); return NT_STATUS_NO_SUCH_GROUP; + } /* we need to copy the name otherwise it's overloaded in user_in_group_list */ fstrcpy(grp_name, grp->gr_name); /* if the user is already in the group */ - if(user_in_group_list(pwd->pw_name, grp_name)) + if(user_in_group_list(pwd->pw_name, grp_name)) { + passwd_free(&pwd); return NT_STATUS_MEMBER_IN_GROUP; + } /* * ok, the group exist, the user exist, the user is not in the group, @@ -3583,9 +3594,12 @@ NTSTATUS _samr_add_groupmem(pipes_struct *p, SAMR_Q_ADD_GROUPMEM *q_u, SAMR_R_AD smb_add_user_group(grp_name, pwd->pw_name); /* check if the user has been added then ... */ - if(!user_in_group_list(pwd->pw_name, grp_name)) + if(!user_in_group_list(pwd->pw_name, grp_name)) { + passwd_free(&pwd); return NT_STATUS_MEMBER_NOT_IN_GROUP; /* don't know what to reply else */ + } + passwd_free(&pwd); return NT_STATUS_OK; } diff --git a/source3/rpc_server/srv_samr_util.c b/source3/rpc_server/srv_samr_util.c index 2a43155c10..84f28eda08 100644 --- a/source3/rpc_server/srv_samr_util.c +++ b/source3/rpc_server/srv_samr_util.c @@ -99,7 +99,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from) if (from->hdr_full_name.buffer) { old_string = pdb_get_fullname(to); - new_string = pdb_unistr2_convert(&from->uni_user_name); + new_string = pdb_unistr2_convert(&from->uni_full_name); DEBUG(10,("INFO_21 UNI_FULL_NAME: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) pdb_set_fullname(to , new_string, PDB_CHANGED); -- cgit From 605ab784015fd5688ec43a5cce1ea5962b27139b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 19 Oct 2002 08:09:28 +0000 Subject: Fix full_name for info23 as well. Thanks, Andrew. Volker (This used to be commit 382c444225fae54ae577baae8948a64a843a2afc) --- source3/rpc_server/srv_samr_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_samr_util.c b/source3/rpc_server/srv_samr_util.c index 84f28eda08..97c7b67839 100644 --- a/source3/rpc_server/srv_samr_util.c +++ b/source3/rpc_server/srv_samr_util.c @@ -301,7 +301,7 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from) if (from->hdr_full_name.buffer) { old_string = pdb_get_fullname(to); - new_string = pdb_unistr2_convert(&from->uni_user_name); + new_string = pdb_unistr2_convert(&from->uni_full_name); DEBUG(10,("INFO_23 UNI_FULL_NAME: %s -> %s\n",old_string, new_string)); if (STRING_CHANGED) pdb_set_fullname(to , new_string, PDB_CHANGED); -- cgit From 7c6400a78f8939d673f5df4f0e2c73f859f4ff23 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 20 Oct 2002 20:43:26 +0000 Subject: Added stubs for query/set security descriptors on files. Not even close to working yet. (This used to be commit b7ef2e8b41bd6a7225b9f21c65c42b8ef0f82a32) --- source3/python/py_samba.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'source3') diff --git a/source3/python/py_samba.c b/source3/python/py_samba.c index c0ade12f65..32b99ca7e9 100644 --- a/source3/python/py_samba.c +++ b/source3/python/py_samba.c @@ -31,6 +31,58 @@ static PyObject *lsa_open_policy(PyObject *self, PyObject *args, return NULL; } +static PyObject *samba_query_secdesc(PyObject *self, PyObject *args, + PyObject *kw) +{ + static char *kwlist[] = { NULL }; + PyObject *py_secdesc; + SEC_DESC *secdesc = NULL; + + /* Parse parameters */ + + if (!PyArg_ParseTupleAndKeywords( + args, kw, "", kwlist)) + return NULL; + + /* FIXME: Fetch security descriptor with cli_query_secdesc*/ + + if (!py_from_SECDESC(&py_secdesc, secdesc)) { + PyErr_SetString( + PyExc_TypeError, + "Invalid security descriptor returned"); + return NULL; + } + + return py_secdesc; + +} + +static PyObject *samba_set_secdesc(PyObject *self, PyObject *args, + PyObject *kw) +{ + static char *kwlist[] = { "security_descriptor", NULL }; + PyObject *py_secdesc; + SEC_DESC *secdesc; + TALLOC_CTX *mem_ctx = talloc_init(); + + /* Parse parameters */ + + if (!PyArg_ParseTupleAndKeywords( + args, kw, "O", kwlist, &py_secdesc)) + return NULL; + + if (!py_to_SECDESC(&secdesc, py_secdesc, mem_ctx)) { + PyErr_SetString(PyExc_TypeError, + "Invalid security descriptor"); + return NULL; + } + + /* FIXME: call cli_set_secdesc() to set security descriptor */ + + Py_INCREF(Py_None); + return Py_None; +} + static PyMethodDef samba_methods[] = { { NULL } }; -- cgit From a07df8249df02fd55098ad1caf16d84cd98fe377 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 00:05:01 +0000 Subject: Bugfix for pidfile_create() from Kelledin. (This used to be commit 4808a95f5f4536774d41bebca76660f010069117) --- source3/lib/pidfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/lib/pidfile.c b/source3/lib/pidfile.c index b98259fe5e..393fb57994 100644 --- a/source3/lib/pidfile.c +++ b/source3/lib/pidfile.c @@ -100,7 +100,7 @@ void pidfile_create(char *name) memset(buf, 0, sizeof(buf)); slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int) sys_getpid()); - if (write(fd, buf, sizeof(buf)) != sizeof(buf)) { + if (write(fd, buf, strlen(buf)) != strlen(buf)) { DEBUG(0,("ERROR: can't write to file %s: %s\n", pidFile, strerror(errno))); exit(1); -- cgit From 47cf2825f8ffa6327c7b392542403c5db6ad91f1 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 02:48:55 +0000 Subject: Zero tallocated memory in decode_printer_info, decode_driver_info, decode_port_info and decode_printerdriver functions. (This used to be commit bf2d9dd5ba2ecc7e0e1bd17049adee6dd80d807c) --- source3/rpc_client/cli_spoolss.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3') diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index ca24d95e33..2c3d48301b 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -56,6 +56,7 @@ static void decode_printer_info_0(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, PRINTER_INFO_0 *inf; inf=(PRINTER_INFO_0 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_0)); + memset(inf, 0, returned*sizeof(PRINTER_INFO_0)); buffer->prs.data_offset=0; @@ -75,6 +76,7 @@ static void decode_printer_info_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, PRINTER_INFO_1 *inf; inf=(PRINTER_INFO_1 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_1)); + memset(inf, 0, returned*sizeof(PRINTER_INFO_1)); buffer->prs.data_offset=0; @@ -94,6 +96,7 @@ static void decode_printer_info_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, PRINTER_INFO_2 *inf; inf=(PRINTER_INFO_2 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_2)); + memset(inf, 0, returned*sizeof(PRINTER_INFO_2)); buffer->prs.data_offset=0; @@ -115,6 +118,7 @@ static void decode_printer_info_3(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, PRINTER_INFO_3 *inf; inf=(PRINTER_INFO_3 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_3)); + memset(inf, 0, returned*sizeof(PRINTER_INFO_3)); buffer->prs.data_offset=0; @@ -135,6 +139,7 @@ static void decode_port_info_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, PORT_INFO_1 *inf; inf=(PORT_INFO_1*)talloc(mem_ctx, returned*sizeof(PORT_INFO_1)); + memset(inf, 0, returned*sizeof(PORT_INFO_1)); prs_set_offset(&buffer->prs, 0); @@ -154,6 +159,7 @@ static void decode_port_info_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, PORT_INFO_2 *inf; inf=(PORT_INFO_2*)talloc(mem_ctx, returned*sizeof(PORT_INFO_2)); + memset(info, 0, returned*sizeof(PORT_INFO_2)); prs_set_offset(&buffer->prs, 0); @@ -173,6 +179,7 @@ static void decode_printer_driver_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, DRIVER_INFO_1 *inf; inf=(DRIVER_INFO_1 *)talloc(mem_ctx, returned*sizeof(DRIVER_INFO_1)); + memset(inf, 0, returned*sizeof(DRIVER_INFO_1)); buffer->prs.data_offset=0; @@ -192,6 +199,7 @@ static void decode_printer_driver_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, DRIVER_INFO_2 *inf; inf=(DRIVER_INFO_2 *)talloc(mem_ctx, returned*sizeof(DRIVER_INFO_2)); + memset(inf, 0, returned*sizeof(DRIVER_INFO_2)); buffer->prs.data_offset=0; @@ -211,6 +219,7 @@ static void decode_printer_driver_3(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, DRIVER_INFO_3 *inf; inf=(DRIVER_INFO_3 *)talloc(mem_ctx, returned*sizeof(DRIVER_INFO_3)); + memset(inf, 0, returned*sizeof(DRIVER_INFO_3)); buffer->prs.data_offset=0; @@ -230,6 +239,7 @@ static void decode_printerdriverdir_1 (TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, DRIVER_DIRECTORY_1 *inf; inf=(DRIVER_DIRECTORY_1 *)talloc(mem_ctx, sizeof(DRIVER_DIRECTORY_1)); + memset(inf, 0, sizeof(DRIVER_DIRECTORY_1)); prs_set_offset(&buffer->prs, 0); -- cgit From d51c1e333b1df1ae1a5523864b3ded1172f5bd4b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Oct 2002 03:40:18 +0000 Subject: a space is a standard valid character in a filename (This used to be commit 0db79d4a379a502362c230a9019d5d71f5af8e0e) --- source3/lib/util_unistr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index eb47252413..01367ba699 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -103,7 +103,7 @@ void init_valid_table(void) static int initialised; static int mapped_file; int i; - const char *allowed = ".!#$%&'()_-@^`~"; + const char *allowed = ".!#$%&'()_-@^`~ "; if (initialised && mapped_file) return; initialised = 1; -- cgit From 66ad44b588c491fc2352016b3c7da97c4f678a29 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Oct 2002 03:47:51 +0000 Subject: reverted an incorrect fix. What I was trying to do was fix a problem with filenames with spaces in mangle_hash.c but the real problem is that mangle_hash.c assumes that the set of valid characters for 8.3 names is the same as the set of valid characters for long names. Thats an invalid assumption, with space being the obvious example. (This used to be commit e0065f4db4a1cfae03a3bb86e5cfea9c45dfa1c3) --- source3/lib/util_unistr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index 01367ba699..eb47252413 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -103,7 +103,7 @@ void init_valid_table(void) static int initialised; static int mapped_file; int i; - const char *allowed = ".!#$%&'()_-@^`~ "; + const char *allowed = ".!#$%&'()_-@^`~"; if (initialised && mapped_file) return; initialised = 1; -- cgit From aed3a9f3435b0d337645d3c7efc8d32194a8c528 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 04:03:49 +0000 Subject: Fix a silly memset typo. Change a int* to a uint32* in the cli_spoolss_enum_ports() function. (This used to be commit 4663d79d3e9dcfef49f7cef1f6205efe58edbdc1) --- source3/rpc_client/cli_spoolss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 2c3d48301b..92077f9637 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -159,7 +159,7 @@ static void decode_port_info_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, PORT_INFO_2 *inf; inf=(PORT_INFO_2*)talloc(mem_ctx, returned*sizeof(PORT_INFO_2)); - memset(info, 0, returned*sizeof(PORT_INFO_2)); + memset(inf, 0, returned*sizeof(PORT_INFO_2)); prs_set_offset(&buffer->prs, 0); @@ -499,7 +499,7 @@ WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 offered, uint32 *needed, - uint32 level, int *num_ports, PORT_INFO_CTR *ctr) + uint32 level, uint32 *num_ports, PORT_INFO_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ENUMPORTS q; -- cgit From 7f62309268bf28dfd44eea23ca4d911742f25e5b Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 04:12:47 +0000 Subject: Fixed DRIVER_INFO_3 conversion function to check for dependent_files key. (This used to be commit 35413be0ac39ce52f009f7750f23b41728d8a35c) --- source3/python/py_spoolss_drivers_conv.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/python/py_spoolss_drivers_conv.c b/source3/python/py_spoolss_drivers_conv.c index 41ff38327e..fd47c0e84d 100644 --- a/source3/python/py_spoolss_drivers_conv.c +++ b/source3/python/py_spoolss_drivers_conv.c @@ -102,10 +102,16 @@ static PyObject *from_dependentfiles(uint16 *dependentfiles) return list; } +static uint16 *to_dependentfiles(PyObject *dict) +{ + return (uint16 *)"abcd\0"; +} + BOOL py_from_DRIVER_INFO_1(PyObject **dict, DRIVER_INFO_1 *info) { *dict = from_struct(info, py_DRIVER_INFO_1); PyDict_SetItemString(*dict, "level", PyInt_FromLong(1)); + return True; } @@ -118,6 +124,7 @@ BOOL py_from_DRIVER_INFO_2(PyObject **dict, DRIVER_INFO_2 *info) { *dict = from_struct(info, py_DRIVER_INFO_2); PyDict_SetItemString(*dict, "level", PyInt_FromLong(2)); + return True; } @@ -129,7 +136,9 @@ BOOL py_to_DRIVER_INFO_2(DRIVER_INFO_2 *info, PyObject *dict) BOOL py_from_DRIVER_INFO_3(PyObject **dict, DRIVER_INFO_3 *info) { *dict = from_struct(info, py_DRIVER_INFO_3); + PyDict_SetItemString(*dict, "level", PyInt_FromLong(3)); + PyDict_SetItemString( *dict, "dependent_files", from_dependentfiles(info->dependentfiles)); @@ -139,12 +148,29 @@ BOOL py_from_DRIVER_INFO_3(PyObject **dict, DRIVER_INFO_3 *info) BOOL py_to_DRIVER_INFO_3(DRIVER_INFO_3 *info, PyObject *dict) { - PyObject *dict_copy = PyDict_Copy(dict); - BOOL result; + PyObject *obj, *dict_copy = PyDict_Copy(dict); + BOOL result = False; + + if (!(obj = PyDict_GetItemString(dict_copy, "dependent_files")) || + !PyList_Check(obj)) + goto done; + + info->dependentfiles = to_dependentfiles(obj); + + PyDict_DelItemString(dict_copy, "dependent_files"); + + if (!(obj = PyDict_GetItemString(dict_copy, "level")) || + !PyInt_Check(obj)) + goto done; PyDict_DelItemString(dict_copy, "level"); - result = to_struct(info, dict_copy, py_DRIVER_INFO_3); + if (!to_struct(info, dict_copy, py_DRIVER_INFO_3)) + goto done; + + result = True; + +done: Py_DECREF(dict_copy); return result; } -- cgit From 69e2a9d7fa689012848b50b40b7b49eeec536d0a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 04:16:12 +0000 Subject: Stricter validation in python->C conversion functions. (This used to be commit 672c07e2432299e3b1015af524dc5c124f61f904) --- source3/python/py_spoolss_forms_conv.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'source3') diff --git a/source3/python/py_spoolss_forms_conv.c b/source3/python/py_spoolss_forms_conv.c index 6ef953cbc9..cfeb475b1e 100644 --- a/source3/python/py_spoolss_forms_conv.c +++ b/source3/python/py_spoolss_forms_conv.c @@ -57,23 +57,30 @@ BOOL py_to_FORM(FORM *form, PyObject *dict) { PyObject *obj, *dict_copy = PyDict_Copy(dict); char *name; + BOOL result = False; - obj = PyDict_GetItemString(dict, "name"); + if (!(obj = PyDict_GetItemString(dict_copy, "name")) || + !PyString_Check(obj)) + goto done; - if (!obj || !PyString_Check(obj)) - return False; + PyDict_DelItemString(dict_copy, "name"); + + if (!(obj = PyDict_GetItemString(dict_copy, "level")) || + !PyInt_Check(obj)) + goto done; PyDict_DelItemString(dict_copy, "level"); - PyDict_DelItemString(dict_copy, "name"); - if (!to_struct(form, dict_copy, py_FORM)) { - Py_DECREF(dict_copy); - return False; - } + if (!to_struct(form, dict_copy, py_FORM)) + goto done; name = PyString_AsString(obj); init_unistr2(&form->name, name, strlen(name) + 1); - return True; + result = True; + +done: + Py_DECREF(dict_copy); + return result; } -- cgit From 354878f76fb6689e26a62ef988564c099991edc0 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 04:17:43 +0000 Subject: level should be a uint32 in enum_ports function. (This used to be commit 121db5b6821df9c6ec05adb2d35c2dde930736f2) --- source3/python/py_spoolss_ports.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/python/py_spoolss_ports.c b/source3/python/py_spoolss_ports.c index 75c8c4aa28..55716aca6e 100644 --- a/source3/python/py_spoolss_ports.c +++ b/source3/python/py_spoolss_ports.c @@ -26,7 +26,7 @@ PyObject *spoolss_enumports(PyObject *self, PyObject *args, PyObject *kw) { WERROR werror; PyObject *result = NULL, *creds = NULL; - int level = 1; + uint32 level = 1; uint32 i, needed, num_ports; static char *kwlist[] = {"server", "level", "creds", NULL}; TALLOC_CTX *mem_ctx = NULL; -- cgit From 48a56c12e268845d037ea0c4115a0df37cb20e26 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Oct 2002 04:30:51 +0000 Subject: add a 'mangle prefix' option to allow people to tune the number of characters used in the prefix for 8.3 names in the hash2 algorithm. The longer the prefix the more readable the 8.3 names will be, but the weaker the hash. this was added because of someone complaining that the new hashing algorithm was unreadable but the old one was broken :) (This used to be commit 3ca3cc838e5b957c7244b21947daddc4ee4c3099) --- source3/param/loadparm.c | 6 ++++- source3/smbd/mangle_hash2.c | 57 ++++++++++++++++++++++++++++++++------------- 2 files changed, 46 insertions(+), 17 deletions(-) (limited to 'source3') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 5d1ef9b91f..7bec315631 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -167,6 +167,7 @@ typedef struct char *szDeleteShareCommand; char *szGuestaccount; char *szManglingMethod; + int mangle_prefix; int max_log_size; char *szLogLevel; int mangled_stack; @@ -911,6 +912,7 @@ static struct parm_struct parm_table[] = { {"Filename Handling", P_SEP, P_SEPARATOR}, {"strip dot", P_BOOL, P_GLOBAL, &Globals.bStripDot, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, {"mangling method", P_STRING, P_GLOBAL, &Globals.szManglingMethod, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, + {"mangle prefix", P_INTEGER, P_GLOBAL, &Globals.mangle_prefix, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, {"mangled stack", P_INTEGER, P_GLOBAL, &Globals.mangled_stack, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, {"default case", P_ENUM, P_LOCAL, &sDefault.iDefaultCase, NULL, enum_case, FLAG_SHARE}, @@ -1247,8 +1249,9 @@ static void init_globals(void) string_set(&Globals.szSMBPasswdFile, dyn_SMB_PASSWD_FILE); string_set(&Globals.szPrivateDir, dyn_PRIVATE_DIR); - /* use the new 'hash2' method by default */ + /* use the new 'hash2' method by default, with a prefix of 1 */ string_set(&Globals.szManglingMethod, "hash2"); + Globals.mangle_prefix = 1; string_set(&Globals.szGuestaccount, GUEST_ACCOUNT); @@ -1535,6 +1538,7 @@ FN_GLOBAL_STRING(lp_os2_driver_map, &Globals.szOs2DriverMap) FN_GLOBAL_STRING(lp_lockdir, &Globals.szLockDir) FN_GLOBAL_STRING(lp_piddir, &Globals.szPidDir) FN_GLOBAL_STRING(lp_mangling_method, &Globals.szManglingMethod) +FN_GLOBAL_INTEGER(lp_mangle_prefix, &Globals.mangle_prefix) #ifdef WITH_UTMP FN_GLOBAL_STRING(lp_utmpdir, &Globals.szUtmpDir) FN_GLOBAL_STRING(lp_wtmpdir, &Globals.szWtmpDir) diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c index 5adde19eea..bbc9020eab 100644 --- a/source3/smbd/mangle_hash2.c +++ b/source3/smbd/mangle_hash2.c @@ -87,6 +87,13 @@ static unsigned char char_flags[256]; #define FLAG_CHECK(c, flag) (char_flags[(unsigned char)(c)] & (flag)) +/* + this determines how many characters are used from the original filename + in the 8.3 mangled name. A larger value leads to a weaker hash and more collisions. + The largest possible value is 6. +*/ +static unsigned mangle_prefix; + /* we will use a very simple direct mapped prefix cache. The big advantage of this cache structure is speed and low memory usage @@ -217,16 +224,18 @@ static BOOL is_mangled_component(const char *name) } } - /* check first character */ - if (! FLAG_CHECK(name[0], FLAG_ASCII)) { - return False; + /* check lead characters */ + for (i=0;i=1;i--) { + for (multiplier=36, i=5;i>=mangle_prefix;i--) { u32 v = base_reverse[(unsigned char)name[i]]; hash += multiplier * v; multiplier *= 36; @@ -478,7 +487,7 @@ static BOOL is_legal_name(const char *name) static void name_map(char *name, BOOL need83, BOOL cache83) { char *dot_p; - char lead_char; + char lead_chars[7]; char extension[4]; int extension_length, i; int prefix_len; @@ -516,15 +525,20 @@ static void name_map(char *name, BOOL need83, BOOL cache83) if (i == 0 || i == 4) dot_p = NULL; } - /* the leading character in the mangled name is taken from - the first character of the name, if it is ascii - otherwise '_' is used + /* the leading characters in the mangled name is taken from + the first characters of the name, if they are ascii otherwise + '_' is used */ - lead_char = name[0]; - if (! FLAG_CHECK(lead_char, FLAG_ASCII)) { - lead_char = '_'; + for (i=0;i=1; i--) { + for (i=5; i>=mangle_prefix; i--) { v = v / 36; new_name[i] = base_forward(v % 36); } @@ -594,7 +610,7 @@ static void init_tables(void) memset(char_flags, 0, sizeof(char_flags)); - for (i=0;i<128;i++) { + for (i=1;i<128;i++) { if ((i >= '0' && i <= '9') || (i >= 'a' && i <= 'z') || (i >= 'A' && i <= 'Z')) { @@ -656,6 +672,15 @@ static struct mangle_fns mangle_fns = { /* return the methods for this mangling implementation */ struct mangle_fns *mangle_hash2_init(void) { + /* the mangle prefix can only be in the mange 1 to 6 */ + mangle_prefix = lp_mangle_prefix(); + if (mangle_prefix > 6) { + mangle_prefix = 6; + } + if (mangle_prefix < 1) { + mangle_prefix = 1; + } + init_tables(); mangle_reset(); -- cgit From d897c63fb596ba9a5a1c6a25f80bdc37b654c611 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 04:44:44 +0000 Subject: Zero some more return values. (This used to be commit 7f45bad319ace07a5bfc21465a0db919131dd608) --- source3/python/py_spoolss_drivers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/python/py_spoolss_drivers.c b/source3/python/py_spoolss_drivers.c index 644280fea2..6daa32d0f4 100644 --- a/source3/python/py_spoolss_drivers.c +++ b/source3/python/py_spoolss_drivers.c @@ -358,7 +358,8 @@ PyObject *spoolss_addprinterdriver(PyObject *self, PyObject *args, } ZERO_STRUCT(ctr); - + ZERO_STRUCT(dinfo); + switch(level) { case 3: ctr.info3 = &dinfo.driver_3; -- cgit From 771fc528ebf3ea6d8580b76449df974c4492aae5 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 04:47:29 +0000 Subject: More cleanups of validation functions. (This used to be commit a4790ba42cc6ee4086dafbc64b1dba790a6c3583) --- source3/python/py_spoolss_forms_conv.c | 5 ++ source3/python/py_spoolss_printers_conv.c | 80 +++++++++++++++++++++++-------- 2 files changed, 66 insertions(+), 19 deletions(-) (limited to 'source3') diff --git a/source3/python/py_spoolss_forms_conv.c b/source3/python/py_spoolss_forms_conv.c index cfeb475b1e..095a318fd2 100644 --- a/source3/python/py_spoolss_forms_conv.c +++ b/source3/python/py_spoolss_forms_conv.c @@ -74,6 +74,11 @@ BOOL py_to_FORM(FORM *form, PyObject *dict) if (!to_struct(form, dict_copy, py_FORM)) goto done; + /* Careful! We can't call PyString_AsString(obj) then delete + obj and still expect to have our pointer pointing somewhere + useful. */ + + obj = PyDict_GetItemString(dict, "name"); name = PyString_AsString(obj); init_unistr2(&form->name, name, strlen(name) + 1); diff --git a/source3/python/py_spoolss_printers_conv.c b/source3/python/py_spoolss_printers_conv.c index 9bef118f2b..3e3ef95b12 100644 --- a/source3/python/py_spoolss_printers_conv.c +++ b/source3/python/py_spoolss_printers_conv.c @@ -161,18 +161,28 @@ BOOL py_from_DEVICEMODE(PyObject **dict, DEVICEMODE *devmode) BOOL py_to_DEVICEMODE(DEVICEMODE *devmode, PyObject *dict) { - PyObject *obj; + PyObject *obj, *dict_copy = PyDict_Copy(dict); + BOOL result = False; - if (!to_struct(devmode, dict, py_DEVICEMODE)) - return False; + if (!(obj = PyDict_GetItemString(dict_copy, "private"))) + goto done; - if (!(obj = PyDict_GetItemString(dict, "private"))) - return False; + if (!PyString_Check(obj)) + goto done; devmode->private = PyString_AsString(obj); devmode->driverextra = PyString_Size(obj); - return True; + PyDict_DelItemString(dict_copy, "private"); + + if (!to_struct(devmode, dict_copy, py_DEVICEMODE)) + goto done; + + result = True; + +done: + Py_DECREF(dict_copy); + return result; } /* @@ -204,12 +214,23 @@ BOOL py_from_PRINTER_INFO_1(PyObject **dict, PRINTER_INFO_1 *info) BOOL py_to_PRINTER_INFO_1(PRINTER_INFO_1 *info, PyObject *dict) { - PyObject *dict_copy = PyDict_Copy(dict); - BOOL result; + PyObject *obj, *dict_copy = PyDict_Copy(dict); + BOOL result = False; + + if (!(obj = PyDict_GetItemString(dict_copy, "level"))) + goto done; + + if (!PyInt_Check(obj)) + goto done; PyDict_DelItemString(dict_copy, "level"); - result = to_struct(info, dict_copy, py_PRINTER_INFO_1); + if (!to_struct(info, dict_copy, py_PRINTER_INFO_1)) + goto done; + + result = True; + +done: Py_DECREF(dict_copy); return result; } @@ -248,26 +269,47 @@ BOOL py_from_PRINTER_INFO_2(PyObject **dict, PRINTER_INFO_2 *info) BOOL py_to_PRINTER_INFO_2(PRINTER_INFO_2 *info, PyObject *dict, TALLOC_CTX *mem_ctx) { - PyObject *obj; + PyObject *obj, *dict_copy = PyDict_Copy(dict); + BOOL result = False; - if (!to_struct(info, dict, py_PRINTER_INFO_2)) - return False; + /* Convert security descriptor */ - if (!(obj = PyDict_GetItemString(dict, "security_descriptor"))) - return False; + if (!(obj = PyDict_GetItemString(dict_copy, "security_descriptor"))) + goto done; + + if (!PyDict_Check(obj)) + goto done; if (!py_to_SECDESC(&info->secdesc, obj, mem_ctx)) - return False; + goto done; - if (!(obj = PyDict_GetItemString(dict, "device_mode"))) - return False; + PyDict_DelItemString(dict_copy, "security_descriptor"); + + /* Convert device mode */ + + if (!(obj = PyDict_GetItemString(dict_copy, "device_mode"))) + goto done; + + if (!PyDict_Check(obj)) + goto done; info->devmode = talloc(mem_ctx, sizeof(DEVICEMODE)); if (!py_to_DEVICEMODE(info->devmode, obj)) - return False; + goto done; - return True; + PyDict_DelItemString(dict_copy, "device_mode"); + + /* Convert remaining elements of dictionary */ + + if (!to_struct(info, dict_copy, py_PRINTER_INFO_2)) + goto done; + + result = True; + +done: + Py_DECREF(dict_copy); + return result; } /* -- cgit From 3b8d11fe503a1e53d7f6a7f1714014253f2b90e3 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 21 Oct 2002 07:41:08 +0000 Subject: Give better error messages for TypeError, which will arise if e.g. you try to pack an Int using a string tdbpack format. (This used to be commit 6139ab3cbca3fc2969d1e578b38394b1f6aeb9c3) --- source3/python/py_tdbpack.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'source3') diff --git a/source3/python/py_tdbpack.c b/source3/python/py_tdbpack.c index e5044943be..06aebe61eb 100644 --- a/source3/python/py_tdbpack.c +++ b/source3/python/py_tdbpack.c @@ -329,18 +329,35 @@ pytdbpack_calc_reqd_len(char *format_str, } +static PyObject *pytdbpack_bad_type(char ch, + const char *expected, + PyObject *val_obj) +{ + PyObject *r = PyObject_Repr(val_obj); + if (!r) + return NULL; + PyErr_Format(PyExc_TypeError, + "tdbpack: format '%c' requires %s, not %s", + ch, expected, PyString_AS_STRING(r)); + Py_DECREF(r); + return val_obj; +} + + /* - Calculate the number of bytes required to pack a single value. -*/ + * Calculate the number of bytes required to pack a single value. While doing + * this, also conduct some initial checks that the argument types are + * reasonable. + * + * Returns -1 on exception. + */ static int pytdbpack_calc_item_len(char ch, PyObject *val_obj) { if (ch == 'd' || ch == 'w') { if (!PyInt_Check(val_obj)) { - PyErr_Format(PyExc_TypeError, - "tdbpack: format '%c' requires an Int", - ch); + pytdbpack_bad_type(ch, "Int", val_obj); return -1; } if (ch == 'w') @@ -353,10 +370,7 @@ pytdbpack_calc_item_len(char ch, else if (ch == 'f' || ch == 'P' || ch == 'B') { /* nul-terminated 8-bit string */ if (!PyString_Check(val_obj)) { - PyErr_Format(PyExc_TypeError, - "tdbpack: format '%c' requires a String", - ch); - return -1; + pytdbpack_bad_type(ch, "String", val_obj); } if (ch == 'B') { @@ -371,7 +385,7 @@ pytdbpack_calc_item_len(char ch, } else { PyErr_Format(PyExc_ValueError, - __FUNCTION__ ": format character '%c' is not supported", + "tdbpack: format character '%c' is not supported", ch); return -1; -- cgit From 4eb2eab364b327d1498d9eb36c743434b689c1e1 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 08:23:20 +0000 Subject: Whoops - this should be in py_smb.c (This used to be commit b740c7e5050b18bc06865451bed3daf3ae09c609) --- source3/python/py_samba.c | 52 ----------------------------------------------- 1 file changed, 52 deletions(-) (limited to 'source3') diff --git a/source3/python/py_samba.c b/source3/python/py_samba.c index 32b99ca7e9..c0ade12f65 100644 --- a/source3/python/py_samba.c +++ b/source3/python/py_samba.c @@ -31,58 +31,6 @@ static PyObject *lsa_open_policy(PyObject *self, PyObject *args, return NULL; } -static PyObject *samba_query_secdesc(PyObject *self, PyObject *args, - PyObject *kw) -{ - static char *kwlist[] = { NULL }; - PyObject *py_secdesc; - SEC_DESC *secdesc = NULL; - - /* Parse parameters */ - - if (!PyArg_ParseTupleAndKeywords( - args, kw, "", kwlist)) - return NULL; - - /* FIXME: Fetch security descriptor with cli_query_secdesc*/ - - if (!py_from_SECDESC(&py_secdesc, secdesc)) { - PyErr_SetString( - PyExc_TypeError, - "Invalid security descriptor returned"); - return NULL; - } - - return py_secdesc; - -} - -static PyObject *samba_set_secdesc(PyObject *self, PyObject *args, - PyObject *kw) -{ - static char *kwlist[] = { "security_descriptor", NULL }; - PyObject *py_secdesc; - SEC_DESC *secdesc; - TALLOC_CTX *mem_ctx = talloc_init(); - - /* Parse parameters */ - - if (!PyArg_ParseTupleAndKeywords( - args, kw, "O", kwlist, &py_secdesc)) - return NULL; - - if (!py_to_SECDESC(&secdesc, py_secdesc, mem_ctx)) { - PyErr_SetString(PyExc_TypeError, - "Invalid security descriptor"); - return NULL; - } - - /* FIXME: call cli_set_secdesc() to set security descriptor */ - - Py_INCREF(Py_None); - return Py_None; -} - static PyMethodDef samba_methods[] = { { NULL } }; -- cgit From 91895706b747345698febcb17bd4b9c445b6f15f Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 09:53:31 +0000 Subject: Fixed up tconx function. Implemented nt_create_andx, query_secdesc and set_secdesc functions. (This used to be commit 3fd568ef5c984f089e7799d9ff55395330716641) --- source3/python/py_smb.c | 133 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 121 insertions(+), 12 deletions(-) (limited to 'source3') diff --git a/source3/python/py_smb.c b/source3/python/py_smb.c index 77d7bb32fc..c9ac24659d 100644 --- a/source3/python/py_smb.c +++ b/source3/python/py_smb.c @@ -102,7 +102,7 @@ static PyObject *py_smb_session_setup(PyObject *self, PyObject *args, char *username, *domain, *password, *errstr; BOOL result; - if (!PyArg_ParseTupleAndKeywords(args, kw, "O", kwlist, &creds)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "|O", kwlist, &creds)) return NULL; if (!py_parse_creds(creds, &username, &domain, &password, &errstr)) { @@ -120,29 +120,125 @@ static PyObject *py_smb_session_setup(PyObject *self, PyObject *args, static PyObject *py_smb_tconx(PyObject *self, PyObject *args, PyObject *kw) { cli_state_object *cli = (cli_state_object *)self; - static char *kwlist[] = { "service", "creds" }; - PyObject *creds; - char *service, *username, *domain, *password, *errstr; + static char *kwlist[] = { "service", NULL }; + char *service; BOOL result; - if (!PyArg_ParseTupleAndKeywords(args, kw, "sO", kwlist, &service, - &creds)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "s", kwlist, &service)) return NULL; - if (!py_parse_creds(creds, &username, &domain, &password, &errstr)) { - free(errstr); + result = cli_send_tconX( + cli->cli, service, strequal(service, "IPC$") ? "IPC" : + "?????", "", 1); + + return Py_BuildValue("i", result); +} + +static PyObject *py_smb_nt_create_andx(PyObject *self, PyObject *args, + PyObject *kw) +{ + cli_state_object *cli = (cli_state_object *)self; + static char *kwlist[] = { "filename", "desired_access", + "file_attributes", "share_access", + "create_disposition", NULL }; + char *filename; + uint32 desired_access, file_attributes = 0, + share_access = FILE_SHARE_READ | FILE_SHARE_WRITE, + create_disposition = FILE_EXISTS_OPEN, create_options = 0; + int result; + + /* Parse parameters */ + + if (!PyArg_ParseTupleAndKeywords( + args, kw, "si|iiii", kwlist, &filename, &desired_access, + &file_attributes, &share_access, &create_disposition, + &create_options)) + return NULL; + + result = cli_nt_create_full( + cli->cli, filename, desired_access, file_attributes, + share_access, create_disposition, create_options); + + /* Return FID */ + + return PyInt_FromLong(result); +} + +static PyObject *py_smb_query_secdesc(PyObject *self, PyObject *args, + PyObject *kw) +{ + cli_state_object *cli = (cli_state_object *)self; + static char *kwlist[] = { "fnum", NULL }; + PyObject *result; + SEC_DESC *secdesc = NULL; + int fnum; + TALLOC_CTX *mem_ctx; + + /* Parse parameters */ + + if (!PyArg_ParseTupleAndKeywords( + args, kw, "i", kwlist, &fnum)) + return NULL; + + mem_ctx = talloc_init(); + + secdesc = cli_query_secdesc(cli->cli, fnum, mem_ctx); + + /* FIXME: we should raise an exception here */ + + if (!secdesc) { + Py_INCREF(Py_None); + result = Py_None; + goto done; + } + + if (!py_from_SECDESC(&result, secdesc)) { + PyErr_SetString( + PyExc_TypeError, + "Invalid security descriptor returned"); + result = NULL; + goto done; + } + + done: + talloc_destroy(mem_ctx); + + return result; + +} + +static PyObject *py_smb_set_secdesc(PyObject *self, PyObject *args, + PyObject *kw) +{ + cli_state_object *cli = (cli_state_object *)self; + static char *kwlist[] = { "fnum", "security_descriptor", NULL }; + PyObject *py_secdesc; + SEC_DESC *secdesc; + TALLOC_CTX *mem_ctx = talloc_init(); + int fnum; + BOOL result; + + /* Parse parameters */ + + if (!PyArg_ParseTupleAndKeywords( + args, kw, "iO", kwlist, &fnum, &py_secdesc)) + return NULL; + + if (!py_to_SECDESC(&secdesc, py_secdesc, mem_ctx)) { + PyErr_SetString(PyExc_TypeError, + "Invalid security descriptor"); return NULL; } - result = cli_send_tconX( - cli->cli, service, strequal(service, "IPC$") ? "IPC" : "?????", - password, strlen(password) + 1); + result = cli_set_secdesc(cli->cli, fnum, secdesc); - return Py_BuildValue("i", result); + return PyInt_FromLong(result); } static PyMethodDef smb_hnd_methods[] = { + /* Session and connection handling */ + { "session_request", (PyCFunction)py_smb_session_request, METH_VARARGS | METH_KEYWORDS, "Request a session" }, @@ -155,6 +251,19 @@ static PyMethodDef smb_hnd_methods[] = { { "tconx", (PyCFunction)py_smb_tconx, METH_VARARGS | METH_KEYWORDS, "Tree connect" }, + /* File operations */ + + { "nt_create_andx", (PyCFunction)py_smb_nt_create_andx, + METH_VARARGS | METH_KEYWORDS, "NT Create&X" }, + + /* Security descriptors */ + + { "query_secdesc", (PyCFunction)py_smb_query_secdesc, + METH_VARARGS | METH_KEYWORDS, "Query security descriptor" }, + + { "set_secdesc", (PyCFunction)py_smb_set_secdesc, + METH_VARARGS | METH_KEYWORDS, "Set security descriptor" }, + { NULL } }; -- cgit From e0d317dd16f130a4290107f9ab1dce20d417d6ad Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 09:54:41 +0000 Subject: The libsmb module uses py_ntsec.o (This used to be commit e27d3d20e3c51fc04f37d92c24f38f91b2d1e1e4) --- source3/python/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/python/setup.py b/source3/python/setup.py index 6d03ca633a..bf62f3b877 100755 --- a/source3/python/setup.py +++ b/source3/python/setup.py @@ -157,7 +157,8 @@ setup( Extension(name = "smb", sources = [samba_srcdir + "python/py_smb.c", - samba_srcdir + "python/py_common.c"], + samba_srcdir + "python/py_common.c", + samba_srcdir + "python/py_ntsec.c"], libraries = lib_list, library_dirs = ["/usr/kerberos/lib"], extra_compile_args = flags_list, -- cgit From d70d4ef34b21d86ede25f00ed1b9726c9e9444be Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 21 Oct 2002 11:13:53 +0000 Subject: Import old pure Python version of tdbpack/unpack, so that we can do compatibility testing against the shiny new C version. This version is slightly modified to not call codepage conversion routines, and renamed tdbutil->oldtdbutil. (This used to be commit 2dc4373727f73a46cd6135413e50917fb7fa538b) --- source3/python/examples/tdbpack/oldtdbutil.py | 144 ++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 source3/python/examples/tdbpack/oldtdbutil.py (limited to 'source3') diff --git a/source3/python/examples/tdbpack/oldtdbutil.py b/source3/python/examples/tdbpack/oldtdbutil.py new file mode 100644 index 0000000000..ac435b8bac --- /dev/null +++ b/source3/python/examples/tdbpack/oldtdbutil.py @@ -0,0 +1,144 @@ +#!/usr/bin/python +############################################################# +# tdbutil +# +# Purpose: +# Contains functions that are used to pack and unpack data +# from Samba's tdb databases. Samba sometimes represents complex +# data structures as a single value in a database. These functions +# allow other python scripts to package data types into a single python +# string and unpackage them. +# +# +# XXXXX: This code is no longer used; it's just here for testing +# compatibility with the new (much faster) C implementation. +# +############################################################## +import string + +def pack(format,list): + retstring = '' + listind = 0 + + # Cycle through format entries + for type in format: + # Null Terminated String + if (type == 'f' or type == 'P'): + retstring = retstring + list[listind] + "\000" + # 4 Byte Number + if (type == 'd'): + retstring = retstring + PackNum(list[listind],4) + # 2 Byte Number + if (type == 'w'): + retstring = retstring + PackNum(list[listind],2) + # Pointer Value + if (type == 'p'): + if (list[listind]): + retstring = retstring + PackNum(1,4) + else: + retstring = retstring + PackNum(0,4) + # Buffer and Length + if (type == 'B'): + # length + length = list[listind] + retstring = retstring + PackNum(length,4) + length = int(length) + listind = listind + 1 + # buffer + retstring = retstring + list[listind][:length] + + listind = listind + 1 + + return retstring + +def unpack(format,buffer): + retlist = [] + bufind = 0 + + lasttype = "" + for type in format: + # Pointer Value + if (type == 'p'): + newvalue = UnpackNum(buffer[bufind:bufind+4]) + bufind = bufind + 4 + if (newvalue): + newvalue = 1L + else: + newvalue = 0L + retlist.append(newvalue) + # Previous character till end of data + elif (type == '$'): + if (lasttype == 'f'): + while (bufind < len(buffer)): + newstring = '' + while (buffer[bufind] != '\000'): + newstring = newstring + buffer[bufind] + bufind = bufind + 1 + bufind = bufind + 1 + retlist.append(newstring) + # Null Terminated String + elif (type == 'f' or type == 'P'): + newstring = '' + while (buffer[bufind] != '\000'): + newstring = newstring + buffer[bufind] + bufind = bufind + 1 + bufind = bufind + 1 + retlist.append(newstring) + # 4 Byte Number + elif (type == 'd'): + newvalue = UnpackNum(buffer[bufind:bufind+4]) + bufind = bufind + 4 + retlist.append(newvalue) + # 2 Byte Number + elif (type == 'w'): + newvalue = UnpackNum(buffer[bufind:bufind+2]) + bufind = bufind + 2 + retlist.append(newvalue) + # Length and Buffer + elif (type == 'B'): + # Length + length = UnpackNum(buffer[bufind:bufind+4]) + bufind = bufind + 4 + retlist.append(length) + length = int(length) + # Buffer + retlist.append(buffer[bufind:bufind+length]) + bufind = bufind + length + + lasttype = type + + return ((retlist,buffer[bufind:])) + +def PackNum(myint,size): + retstring = '' + size = size * 2 + hint = hex(myint)[2:] + + # Check for long notation + if (hint[-1:] == 'L'): + hint = hint[:-1] + + addon = size - len(hint) + for i in range(0,addon): + hint = '0' + hint + + while (size > 0): + val = string.atoi(hint[size-2:size],16) + retstring = retstring + chr(val) + size = size - 2 + + return retstring + +def UnpackNum(buffer): + size = len(buffer) + mystring = '' + + for i in range(size-1,-1,-1): + val = hex(ord(buffer[i]))[2:] + if (len(val) == 1): + val = '0' + val + mystring = mystring + val + if (len(mystring) > 4): + return string.atol(mystring,16) + else: + return string.atoi(mystring,16) -- cgit From 23e608435895a39a4da52c3f649b130140f09662 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 21 Oct 2002 11:44:26 +0000 Subject: Test both new samba.tdbpack and oldtdbutil pack/unpack routines. This makes the test suite fail because at the moment they are in fact not behaving the same way. (This used to be commit 44dd7746ede7f7f9efcf7dabcd351b1d800e535c) --- source3/python/examples/tdbpack/test_tdbpack.py | 66 ++++++++++++++----------- 1 file changed, 37 insertions(+), 29 deletions(-) (limited to 'source3') diff --git a/source3/python/examples/tdbpack/test_tdbpack.py b/source3/python/examples/tdbpack/test_tdbpack.py index 36fed881e3..659dc0efed 100755 --- a/source3/python/examples/tdbpack/test_tdbpack.py +++ b/source3/python/examples/tdbpack/test_tdbpack.py @@ -17,13 +17,12 @@ string, with one character per field.""" __author__ = 'Martin Pool ' import unittest -# import tdbutil +import oldtdbutil import samba.tdbpack -packer = samba.tdbpack.pack -unpacker = samba.tdbpack.unpack - - +both_unpackers = (samba.tdbpack.unpack, oldtdbutil.unpack) +both_packers = (samba.tdbpack.pack, oldtdbutil.pack) + class PackTests(unittest.TestCase): symm_cases = [('B', ['hello' * 51], '\xff\0\0\0' + 'hello' * 51), ('w', [42], '\x2a\0'), @@ -78,11 +77,13 @@ class PackTests(unittest.TestCase): def test_symmetric(self): """Cookbook of symmetric pack/unpack tests """ - for format, values, expected in self.symm_cases: - self.assertEquals(packer(format, values), expected) - out, rest = unpacker(format, expected) - self.assertEquals(rest, '') - self.assertEquals(list(values), list(out)) + for packer in both_packers: + for unpacker in both_unpackers: + for format, values, expected in self.symm_cases: + self.assertEquals(packer(format, values), expected) + out, rest = unpacker(format, expected) + self.assertEquals(rest, '') + self.assertEquals(list(values), list(out)) def test_pack(self): @@ -100,25 +101,30 @@ class PackTests(unittest.TestCase): # as if you called list() ] - for format, values, expected in cases: - self.assertEquals(packer(format, values), expected) + for packer in both_packers: + for format, values, expected in cases: + self.assertEquals(packer(format, values), expected) def test_unpack_extra(self): # Test leftover data - for format, values, packed in self.symm_cases: - out, rest = unpacker(format, packed + 'hello sailor!') - self.assertEquals(rest, 'hello sailor!') - self.assertEquals(list(values), list(out)) + for unpacker in both_unpackers: + for format, values, packed in self.symm_cases: + out, rest = unpacker(format, packed + 'hello sailor!') + self.assertEquals(rest, 'hello sailor!') + self.assertEquals(list(values), list(out)) def test_unpack(self): """Cookbook of tricky unpack tests""" cases = [ + # Apparently I couldn't think of any tests that weren't + # symmetric :-/ ] - for format, values, expected in cases: - out, rest = unpacker(format, expected) - self.assertEquals(rest, '') - self.assertEquals(list(values), list(out)) + for unpacker in both_unpackers: + for format, values, expected in cases: + out, rest = unpacker(format, expected) + self.assertEquals(rest, '') + self.assertEquals(list(values), list(out)) def test_pack_failures(self): @@ -141,7 +147,7 @@ class PackTests(unittest.TestCase): ('f', [2], TypeError), ('P', [None], TypeError), ('P', (), IndexError), - ('f', [packer], TypeError), + ('f', [hex], TypeError), ('fw', ['hello'], IndexError), ('f', [u'hello'], TypeError), ('B', [2], TypeError), @@ -153,10 +159,11 @@ class PackTests(unittest.TestCase): ('fQ', ['2'], IndexError), (2, [2], TypeError), ({}, {}, TypeError)] - for format, values, throwable_class in cases: - def do_pack(): - packer(format, values) - self.assertRaises(throwable_class, do_pack) + for packer in both_packers: + for format, values, throwable_class in cases: + def do_pack(): + packer(format, values) + self.assertRaises(throwable_class, do_pack) def test_unpack_failures(self): @@ -182,10 +189,11 @@ class PackTests(unittest.TestCase): ('B', 'foobar', IndexError), ('BB', '\x01\0\0\0a\x01', IndexError), ] - - for format, values, throwable_class in cases: - def do_unpack(): - unpacker(format, values) + + for unpacker in both_unpackers: + for format, values, throwable_class in cases: + def do_unpack(): + unpacker(format, values) self.assertRaises(throwable_class, do_unpack) -- cgit From a3c4b4cef60e5058bcb3b41f8e32616ac0b2317f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 21 Oct 2002 15:36:51 +0000 Subject: Sync with metze's CVS tree (This used to be commit 2a598d435d3eb46ca28b3591a4f7f9d856ce3c1f) --- source3/sam/sam_ads.c | 332 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 253 insertions(+), 79 deletions(-) (limited to 'source3') diff --git a/source3/sam/sam_ads.c b/source3/sam/sam_ads.c index e10b476997..6cb205d338 100755 --- a/source3/sam/sam_ads.c +++ b/source3/sam/sam_ads.c @@ -30,6 +30,11 @@ static int sam_ads_debug_level = DBGC_SAM; #undef DBGC_CLASS #define DBGC_CLASS sam_ads_debug_level +#ifndef FIXME +#define FIXME( body ) { DEBUG(0,("FIXME: "));\ + DEBUGADD(0,(body));} +#endif + #define ADS_STATUS_OK ADS_ERROR(0) #define ADS_STATUS_UNSUCCESSFUL ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL) #define ADS_STATUS_NOT_IMPLEMENTED ADS_ERROR_NT(NT_STATUS_NOT_IMPLEMENTED) @@ -42,7 +47,7 @@ static int sam_ads_debug_level = DBGC_SAM; #define ADS_ROOT_TREE "" /* Here are private module structs and functions */ -struct sam_ads_privates { +typedef struct sam_ads_privates { ADS_STRUCT *ads_struct; TALLOC_CTX *mem_ctx; BOOL bind_plaintext; @@ -50,7 +55,7 @@ struct sam_ads_privates { char *ads_bind_pw; char *ldap_uri; /* did we need something more? */ -}; +}SAM_ADS_PRIVATES; /* get only these LDAP attributes, witch we really need for an account */ @@ -106,30 +111,30 @@ const char *group_attrs[] = {"objectSid", return our ads connection. We keep the connection open to make things faster ****************************************************/ -static ADS_STATUS sam_ads_cached_connection(struct sam_ads_privates *private) +static ADS_STATUS sam_ads_cached_connection(SAM_ADS_PRIVATES *privates) { ADS_STRUCT *ads_struct; ADS_STATUS ads_status; - if (!private->ads_struct) { - private->ads_struct = ads_init_simple(); - ads_struct = private->ads_struct; - ads_struct->server.ldap_uri = smb_xstrdup(private->ldap_uri); - if ((!private->ads_bind_dn) || (!*private->ads_bind_dn)) { + if (!privates->ads_struct) { + privates->ads_struct = ads_init_simple(); + ads_struct = privates->ads_struct; + ads_struct->server.ldap_uri = smb_xstrdup(privates->ldap_uri); + if ((!privates->ads_bind_dn) || (!*privates->ads_bind_dn)) { ads_struct->auth.flags |= ADS_AUTH_ANON_BIND; } else { ads_struct->auth.user_name - = smb_xstrdup(private->ads_bind_dn); - if (private->ads_bind_pw) { + = smb_xstrdup(privates->ads_bind_dn); + if (privates->ads_bind_pw) { ads_struct->auth.password - = smb_xstrdup(private->ads_bind_pw); + = smb_xstrdup(privates->ads_bind_pw); } } - if (private->bind_plaintext) { + if (privates->bind_plaintext) { ads_struct->auth.flags |= ADS_AUTH_SIMPLE_BIND; } } else { - ads_struct = private->ads_struct; + ads_struct = privates->ads_struct; } if (ads_struct->ld != NULL) { @@ -155,22 +160,22 @@ static ADS_STATUS sam_ads_cached_connection(struct sam_ads_privates *private) ads_status = ads_server_info(ads_struct); if (!ADS_ERR_OK(ads_status)) { DEBUG(0,("Can't set server info: %s\n",ads_errstr(ads_status))); - /* return ads_status; */ /*for now we only warn! */ + /* return ads_status; */ FIXME("for now we only warn!\n"); } DEBUG(2, ("sam_ads_cached_connection: succesful connection to the LDAP server\n")); return ADS_SUCCESS; } -static ADS_STATUS sam_ads_do_search(struct sam_ads_privates *private, const char *bind_path, int scope, const char *exp, const char **attrs, void **res) +static ADS_STATUS sam_ads_do_search(SAM_ADS_PRIVATES *privates, const char *bind_path, int scope, const char *exp, const char **attrs, void **res) { ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL); - ads_status = sam_ads_cached_connection(private); + ads_status = sam_ads_cached_connection(privates); if (!ADS_ERR_OK(ads_status)) return ads_status; - return ads_do_search_retry(private->ads_struct, bind_path, scope, exp, attrs, res); + return ads_do_search_retry(privates->ads_struct, bind_path, scope, exp, attrs, res); } @@ -178,13 +183,13 @@ static ADS_STATUS sam_ads_do_search(struct sam_ads_privates *private, const char here we have to check the update serial number - this is the core of the ldap cache *********************************************/ -static ADS_STATUS sam_ads_usn_is_valid(ADS_STRUCT *ads_struct, uint32 usn_in, uint32 *usn_out) +static ADS_STATUS sam_ads_usn_is_valid(SAM_ADS_PRIVATES *privates, uint32 usn_in, uint32 *usn_out) { ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL); - SAM_ASSERT(ads_struct && usn_out); + SAM_ASSERT(privates && privates->ads_struct && usn_out); - ads_status = ads_USN(ads_struct, usn_out); + ads_status = ads_USN(privates->ads_struct, usn_out); if (!ADS_ERR_OK(ads_status)) return ads_status; @@ -198,13 +203,107 @@ static ADS_STATUS sam_ads_usn_is_valid(ADS_STRUCT *ads_struct, uint32 usn_in, ui Initialize SAM_ACCOUNT_HANDLE from an ADS query ************************************************/ /* not ready :-( */ -static ADS_STATUS ads_entry2sam_account_handle(ADS_STRUCT *ads_struct, SAM_ACCOUNT_HANDLE *account ,const void *entry) +static ADS_STATUS ads_entry2sam_account_handle(SAM_ADS_PRIVATES *privates, SAM_ACCOUNT_HANDLE *account ,void *msg) { - ADS_STATUS ads_status = ADS_STATUS_NOT_IMPLEMENTED; - DEBUG(0,("sam_ads: %s was called!\n",__FUNCTION__)); - SAM_ASSERT(ads_struct && account && entry); + ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_NO_SUCH_USER); + NTSTATUS nt_status = NT_STATUS_NO_SUCH_USER; + ADS_STRUCT *ads_struct = privates->ads_struct; + TALLOC_CTX *mem_ctx = account->mem_ctx; + char *tmp_str = NULL; + + SAM_ASSERT(privates && ads_struct && account && mem_ctx && msg); + FIXME("should we really use ads_pull_username()(or ads_pull_string())?\n"); + if ((account->private.account_name = ads_pull_username(ads_struct, mem_ctx, msg))==NULL) { + DEBUG(0,("ads_pull_username failed\n")); + return ADS_ERROR_NT(NT_STATUS_NO_SUCH_USER); + } + + if ((account->private.full_name = ads_pull_string(ads_struct, mem_ctx, msg,"name"))==NULL) { + DEBUG(3,("ads_pull_string for 'name' failed - skip\n")); + } + + if ((account->private.acct_desc = ads_pull_string(ads_struct, mem_ctx, msg,"description"))!=NULL) { + DEBUG(3,("ads_pull_string for 'acct_desc' failed - skip\n")); + } + + if ((account->private.home_dir = ads_pull_string(ads_struct, mem_ctx, msg,"homeDirectory"))!=NULL) { + DEBUG(3,("ads_pull_string for 'homeDirectory' failed - skip\n")); + } + + if ((account->private.dir_drive = ads_pull_string(ads_struct, mem_ctx, msg,"homeDrive"))!=NULL) { + DEBUG(3,("ads_pull_string for 'homeDrive' failed - skip\n")); + } + + if ((account->private.profile_path = ads_pull_string(ads_struct, mem_ctx, msg,"profilePath"))!=NULL) { + DEBUG(3,("ads_pull_string for 'profilePath' failed - skip\n")); + } + + if ((account->private.logon_script = ads_pull_string(ads_struct, mem_ctx, msg,"scriptPath"))!=NULL) { + DEBUG(3,("ads_pull_string for 'scriptPath' failed - skip\n")); + } + + FIXME("check 'nsNPAllowDialIn' for munged_dial!\n"); + if ((account->private.munged_dial = ads_pull_string(ads_struct, mem_ctx, msg,"userParameters"))!=NULL) { + DEBUG(3,("ads_pull_string for 'userParameters' failed - skip\n")); + } + + if ((account->private.unix_home_dir = ads_pull_string(ads_struct, mem_ctx, msg,"msSFUHomeDrirectory"))!=NULL) { + DEBUG(3,("ads_pull_string for 'msSFUHomeDrirectory' failed - skip\n")); + } +#if 0 + FIXME("use function intern mem_ctx for pwdLastSet\n"); + if ((tmp_str = ads_pull_string(ads_struct, mem_ctx, msg,"pwdLastSet"))!=NULL) { + DEBUG(3,("ads_pull_string for 'pwdLastSet' failed - skip\n")); + } else { + account->private.pass_last_set_time = ads_parse_nttime(tmp_str); + tmp_str = NULL; + + } +#endif + +#if 0 +typedef struct sam_account_handle { + TALLOC_CTX *mem_ctx; + uint32 access_granted; + const struct sam_methods *current_sam_methods; /* sam_methods creating this handle */ + void (*free_fn)(struct sam_account_handle **); + struct sam_account_data { + uint32 init_flag; + NTTIME logon_time; /* logon time */ + NTTIME logoff_time; /* logoff time */ + NTTIME kickoff_time; /* kickoff time */ + NTTIME pass_last_set_time; /* password last set time */ + NTTIME pass_can_change_time; /* password can change time */ + NTTIME pass_must_change_time; /* password must change time */ + char * account_name; /* account_name string */ + SAM_DOMAIN_HANDLE * domain; /* domain of account */ + char *full_name; /* account's full name string */ + char *unix_home_dir; /* UNIX home directory string */ + char *home_dir; /* home directory string */ + char *dir_drive; /* home directory drive string */ + char *logon_script; /* logon script string */ + char *profile_path; /* profile path string */ + char *acct_desc; /* account description string */ + char *workstations; /* login from workstations string */ + char *unknown_str; /* don't know what this is, yet. */ + char *munged_dial; /* munged path name and dial-back tel number */ + DOM_SID account_sid; /* Primary Account SID */ + DOM_SID group_sid; /* Primary Group SID */ + DATA_BLOB lm_pw; /* .data is Null if no password */ + DATA_BLOB nt_pw; /* .data is Null if no password */ + char *plaintext_pw; /* if Null not available */ + uint16 acct_ctrl; /* account info (ACB_xxxx bit-mask) */ + uint32 unknown_1; /* 0x00ff ffff */ + uint16 logon_divs; /* 168 - number of hours in a week */ + uint32 hours_len; /* normally 21 bytes */ + uint8 hours[MAX_HOURS_LEN]; + uint32 unknown_2; /* 0x0002 0000 */ + uint32 unknown_3; /* 0x0000 04ec */ + } private; +} SAM_ACCOUNT_HANDLE; +#endif return ads_status; } @@ -214,29 +313,30 @@ static ADS_STATUS ads_entry2sam_account_handle(ADS_STRUCT *ads_struct, SAM_ACCOU Initialize SAM_GROUP_ENUM from an ads entry ************************************************/ /* not ready :-( */ -static ADS_STATUS ads_entry2sam_group_enum(ADS_STRUCT *ads_struct, TALLOC_CTX *mem_ctx, SAM_GROUP_ENUM **group_enum,const void *entry) +static ADS_STATUS ads_entry2sam_group_enum(SAM_ADS_PRIVATES *privates, TALLOC_CTX *mem_ctx, SAM_GROUP_ENUM **group_enum,const void *entry) { ADS_STATUS ads_status = ADS_STATUS_UNSUCCESSFUL; + ADS_STRUCT *ads_struct = privates->ads_struct; SAM_GROUP_ENUM __group_enum; SAM_GROUP_ENUM *_group_enum = &__group_enum; - SAM_ASSERT(ads_struct && mem_ctx && group_enum && entry); + SAM_ASSERT(privates && ads_struct && mem_ctx && group_enum && entry); *group_enum = _group_enum; DEBUG(3,("sam_ads: ads_entry2sam_account_handle\n")); - if (!ads_pull_sid((ADS_STRUCT *)ads_struct, &entry, "objectSid", &(_group_enum->sid))) { + if (!ads_pull_sid(ads_struct, &entry, "objectSid", &(_group_enum->sid))) { DEBUG(0,("No sid for!?\n")); return ADS_STATUS_UNSUCCESSFUL; } - if (!(_group_enum->group_name = ads_pull_string((ADS_STRUCT *)ads_struct, mem_ctx, &entry, "sAMAccountName"))) { + if (!(_group_enum->group_name = ads_pull_string(ads_struct, mem_ctx, &entry, "sAMAccountName"))) { DEBUG(0,("No groupname found")); return ADS_STATUS_UNSUCCESSFUL; } - if (!(_group_enum->group_desc = ads_pull_string((ADS_STRUCT *)ads_struct, mem_ctx, &entry, "desciption"))) { + if (!(_group_enum->group_desc = ads_pull_string(ads_struct, mem_ctx, &entry, "desciption"))) { DEBUG(0,("No description found")); return ADS_STATUS_UNSUCCESSFUL; } @@ -250,19 +350,21 @@ static ADS_STATUS ads_entry2sam_group_enum(ADS_STRUCT *ads_struct, TALLOC_CTX *m return ads_status; } -static ADS_STATUS sam_ads_access_check(const SAM_METHODS *sam_method, const SEC_DESC *sd, const NT_USER_TOKEN *access_token, uint32 access_desired) +static ADS_STATUS sam_ads_access_check(SAM_ADS_PRIVATES *privates, const SEC_DESC *sd, const NT_USER_TOKEN *access_token, uint32 access_desired, uint32 *acc_granted) { ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_ACCESS_DENIED); NTSTATUS nt_status; - uint32 acc_granted; + uint32 my_acc_granted; - SAM_ASSERT(sam_method && sd && access_token); + SAM_ASSERT(privates && sd && access_token); + /* acc_granted can be set to NULL */ + /* the steps you need are: 1. get_sec_desc for sid 2. se_map_generic(accessdesired, generic_mapping) 3. se_access_check() */ - if (!se_access_check(sd, access_token, access_desired, &acc_granted, &nt_status)) { + if (!se_access_check(sd, access_token, access_desired, (acc_granted)?acc_granted:&my_acc_granted, &nt_status)) { DEBUG(3,("sam_ads_access_check: ACCESS DENIED\n")); ads_status = ADS_ERROR_NT(nt_status); return ads_status; @@ -271,10 +373,9 @@ static ADS_STATUS sam_ads_access_check(const SAM_METHODS *sam_method, const SEC_ return ads_status; } -static ADS_STATUS sam_ads_get_tree_sec_desc(const SAM_METHODS *sam_method, const char *subtree, SEC_DESC **sd) +static ADS_STATUS sam_ads_get_tree_sec_desc(SAM_ADS_PRIVATES *privates, const char *subtree, SEC_DESC **sd) { ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER); - struct sam_ads_privates *privates = (struct sam_ads_privates *)sam_method->private_data; ADS_STRUCT *ads_struct = privates->ads_struct; TALLOC_CTX *mem_ctx = privates->mem_ctx; char *search_path; @@ -282,7 +383,7 @@ static ADS_STATUS sam_ads_get_tree_sec_desc(const SAM_METHODS *sam_method, const void *sec_desc_msg; const char *sec_desc_attrs[] = {"nTSecurityDescriptor",NULL}; - SAM_ASSERT(sam_method && ads_struct && sd); + SAM_ASSERT(privates && ads_struct && mem_ctx && sd); *sd = NULL; if (subtree) { @@ -309,25 +410,33 @@ static ADS_STATUS sam_ads_get_tree_sec_desc(const SAM_METHODS *sam_method, const return ads_status; } -static ADS_STATUS sam_ads_account_policy_get(const SAM_METHODS *sam_method, int field, uint32 *value) +static ADS_STATUS sam_ads_account_policy_get(SAM_ADS_PRIVATES *privates, int field, uint32 *value) { ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER); - struct sam_ads_privates *privates = (struct sam_ads_privates *)sam_method->private_data; ADS_STRUCT *ads_struct = privates->ads_struct; void *ap_res; void *ap_msg; - const char *ap_attrs[] = {"minPwdLength","pwdHistoryLength", - /*"mustLogonToChangePass",*/"lockoutDuration" - "maxPwdAge","minPwdAge",NULL}; + const char *ap_attrs[] = {"minPwdLength",/* AP_MIN_PASSWORD_LEN */ + "pwdHistoryLength",/* AP_PASSWORD_HISTORY */ + "AP_USER_MUST_LOGON_TO_CHG_PASS",/* AP_USER_MUST_LOGON_TO_CHG_PASS */ + "maxPwdAge",/* AP_MAX_PASSWORD_AGE */ + "minPwdAge",/* AP_MIN_PASSWORD_AGE */ + "lockoutDuration",/* AP_LOCK_ACCOUNT_DURATION */ + "AP_RESET_COUNT_TIME",/* AP_RESET_COUNT_TIME */ + "AP_BAD_ATTEMPT_LOCKOUT",/* AP_BAD_ATTEMPT_LOCKOUT */ + "AP_TIME_TO_LOGOUT",/* AP_TIME_TO_LOGOUT */ + NULL}; /*lockOutObservationWindow lockoutThreshold $ pwdProperties*/ static uint32 ap[9]; static uint32 ap_usn = 0; uint32 tmp_usn = 0; - SAM_ASSERT(sam_method && value); + SAM_ASSERT(privates && ads_struct && value); + + FIXME("We need to decode all account_policy attributes!\n"); - ads_status = sam_ads_usn_is_valid(ads_struct,ap_usn,&tmp_usn); + ads_status = sam_ads_usn_is_valid(privates,ap_usn,&tmp_usn); if (!ADS_ERR_OK(ads_status)) { ads_status = sam_ads_do_search(privates, ads_struct->config.bind_path, LDAP_SCOPE_BASE, "(objectClass=*)", ap_attrs, &ap_res); if (!ADS_ERR_OK(ads_status)) @@ -427,6 +536,7 @@ static ADS_STATUS sam_ads_account_policy_get(const SAM_METHODS *sam_method, int return ads_status; } + /********************************** Now the functions off the SAM API ***********************************/ @@ -436,7 +546,7 @@ static NTSTATUS sam_ads_get_sec_desc(const SAM_METHODS *sam_method, const NT_USE const DOM_SID *sid, SEC_DESC **sd) { ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL); - struct sam_ads_privates *privates = (struct sam_ads_privates *)sam_method->private_data; + SAM_ADS_PRIVATES *privates = (struct sam_ads_privates *)sam_method->private_data; ADS_STRUCT *ads_struct = privates->ads_struct; TALLOC_CTX *mem_ctx; char *sidstr,*filter; @@ -448,11 +558,11 @@ static NTSTATUS sam_ads_get_sec_desc(const SAM_METHODS *sam_method, const NT_USE SAM_ASSERT(sam_method && access_token && sid && sd); - ads_status = sam_ads_get_tree_sec_desc(sam_method, ADS_ROOT_TREE, &my_sd); + ads_status = sam_ads_get_tree_sec_desc(privates, ADS_ROOT_TREE, &my_sd); if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); - ads_status = sam_ads_access_check(sam_method, my_sd, access_token, DOMAIN_READ); + ads_status = sam_ads_access_check(privates, my_sd, access_token, GENERIC_RIGHTS_DOMAIN_READ, NULL); if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); @@ -523,17 +633,17 @@ static NTSTATUS sam_ads_lookup_sid(const SAM_METHODS *sam_method, const NT_USER_ enum SID_NAME_USE *type) { ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL); - struct sam_ads_privates *privates = (struct sam_ads_privates *)sam_method->private_data; + SAM_ADS_PRIVATES *privates = (struct sam_ads_privates *)sam_method->private_data; ADS_STRUCT *ads_struct = privates->ads_struct; SEC_DESC *my_sd; SAM_ASSERT(sam_method && access_token && mem_ctx && sid && name && type); - ads_status = sam_ads_get_tree_sec_desc(sam_method, ADS_ROOT_TREE, &my_sd); + ads_status = sam_ads_get_tree_sec_desc(privates, ADS_ROOT_TREE, &my_sd); if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); - ads_status = sam_ads_access_check(sam_method, my_sd, access_token, DOMAIN_READ); + ads_status = sam_ads_access_check(privates, my_sd, access_token, GENERIC_RIGHTS_DOMAIN_READ, NULL); if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); @@ -544,17 +654,17 @@ static NTSTATUS sam_ads_lookup_name(const SAM_METHODS *sam_method, const NT_USER const char *name, DOM_SID *sid, enum SID_NAME_USE *type) { ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL); - struct sam_ads_privates *privates = (struct sam_ads_privates *)sam_method->private_data; + SAM_ADS_PRIVATES *privates = (struct sam_ads_privates *)sam_method->private_data; ADS_STRUCT *ads_struct = privates->ads_struct; SEC_DESC *my_sd; SAM_ASSERT(sam_method && access_token && name && sid && type); - ads_status = sam_ads_get_tree_sec_desc(sam_method, ADS_ROOT_TREE, &my_sd); + ads_status = sam_ads_get_tree_sec_desc(privates, ADS_ROOT_TREE, &my_sd); if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); - ads_status = sam_ads_access_check(sam_method, my_sd, access_token, DOMAIN_READ); + ads_status = sam_ads_access_check(privates, my_sd, access_token, GENERIC_RIGHTS_DOMAIN_READ, NULL); if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); @@ -576,7 +686,7 @@ static NTSTATUS sam_ads_get_domain_handle(const SAM_METHODS *sam_method, const N const uint32 access_desired, SAM_DOMAIN_HANDLE **domain) { ADS_STATUS ads_status = ADS_STATUS_NOT_IMPLEMENTED; - struct sam_ads_privates *privates = (struct sam_ads_privates *)sam_method->private_data; + SAM_ADS_PRIVATES *privates = (struct sam_ads_privates *)sam_method->private_data; TALLOC_CTX *mem_ctx = privates->mem_ctx; /*Fix me is this right??? */ SAM_DOMAIN_HANDLE *dom_handle = NULL; SEC_DESC *sd; @@ -603,11 +713,11 @@ static NTSTATUS sam_ads_get_domain_handle(const SAM_METHODS *sam_method, const N /* check if access can be granted as requested */ - ads_status = sam_ads_get_tree_sec_desc(sam_method, ADS_ROOT_TREE, &sd); + ads_status = sam_ads_get_tree_sec_desc(privates, ADS_ROOT_TREE, &sd); if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); - ads_status = sam_ads_access_check(sam_method, sd, access_token, access_desired); + ads_status = sam_ads_access_check(privates, sd, access_token, access_desired, &acc_granted); if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); @@ -619,62 +729,62 @@ static NTSTATUS sam_ads_get_domain_handle(const SAM_METHODS *sam_method, const N dom_handle->private.servername = "WHOKNOWS"; /* what is the servername */ /*Fix me: sam_ads_account_policy_get() return ADS_STATUS! */ - ads_status = sam_ads_account_policy_get(sam_method, AP_MAX_PASSWORD_AGE, &tmp_value); + ads_status = sam_ads_account_policy_get(privates, AP_MAX_PASSWORD_AGE, &tmp_value); if (!ADS_ERR_OK(ads_status)) { DEBUG(4,("sam_ads_account_policy_get failed for max password age. Useing default\n")); tmp_value = MAX_PASSWORD_AGE; } unix_to_nt_time_abs(&dom_handle->private.max_passwordage,tmp_value); - ads_status = sam_ads_account_policy_get(sam_method, AP_MIN_PASSWORD_AGE, &tmp_value); + ads_status = sam_ads_account_policy_get(privates, AP_MIN_PASSWORD_AGE, &tmp_value); if (!ADS_ERR_OK(ads_status)) { DEBUG(4,("sam_ads_account_policy_get failed for min password age. Useing default\n")); tmp_value = 0; } unix_to_nt_time_abs(&dom_handle->private.min_passwordage, tmp_value); - ads_status = sam_ads_account_policy_get(sam_method, AP_LOCK_ACCOUNT_DURATION, &tmp_value); + ads_status = sam_ads_account_policy_get(privates, AP_LOCK_ACCOUNT_DURATION, &tmp_value); if (!ADS_ERR_OK(ads_status)) { DEBUG(4,("sam_ads_account_policy_get failed for lockout duration. Useing default\n")); tmp_value = 0; } unix_to_nt_time_abs(&dom_handle->private.lockout_duration, tmp_value); - ads_status = sam_ads_account_policy_get(sam_method, AP_RESET_COUNT_TIME, &tmp_value); + ads_status = sam_ads_account_policy_get(privates, AP_RESET_COUNT_TIME, &tmp_value); if (!ADS_ERR_OK(ads_status)) { DEBUG(4,("sam_ads_account_policy_get failed for time till locout count is reset. Useing default\n")); tmp_value = 0; } unix_to_nt_time_abs(&dom_handle->private.reset_count, tmp_value); - ads_status = sam_ads_account_policy_get(sam_method, AP_MIN_PASSWORD_LEN, &tmp_value); + ads_status = sam_ads_account_policy_get(privates, AP_MIN_PASSWORD_LEN, &tmp_value); if (!ADS_ERR_OK(ads_status)) { DEBUG(4,("sam_ads_account_policy_get failed for min password length. Useing default\n")); tmp_value = 0; } dom_handle->private.min_passwordlength = (uint16)tmp_value; - ads_status = sam_ads_account_policy_get(sam_method, AP_PASSWORD_HISTORY, &tmp_value); + ads_status = sam_ads_account_policy_get(privates, AP_PASSWORD_HISTORY, &tmp_value); if (!ADS_ERR_OK(ads_status)) { DEBUG(4,("sam_ads_account_policy_get failed password history. Useing default\n")); tmp_value = 0; } dom_handle->private.password_history = (uint16)tmp_value; - ads_status = sam_ads_account_policy_get(sam_method, AP_BAD_ATTEMPT_LOCKOUT, &tmp_value); + ads_status = sam_ads_account_policy_get(privates, AP_BAD_ATTEMPT_LOCKOUT, &tmp_value); if (!ADS_ERR_OK(ads_status)) { DEBUG(4,("sam_ads_account_policy_get failed for bad attempts till lockout. Useing default\n")); tmp_value = 0; } dom_handle->private.lockout_count = (uint16)tmp_value; - ads_status = sam_ads_account_policy_get(sam_method, AP_TIME_TO_LOGOUT, &tmp_value); + ads_status = sam_ads_account_policy_get(privates, AP_TIME_TO_LOGOUT, &tmp_value); if (!ADS_ERR_OK(ads_status)) { DEBUG(4,("sam_ads_account_policy_get failed for force logout. Useing default\n")); tmp_value = -1; } - ads_status = sam_ads_account_policy_get(sam_method, AP_USER_MUST_LOGON_TO_CHG_PASS, &tmp_value); + ads_status = sam_ads_account_policy_get(privates, AP_USER_MUST_LOGON_TO_CHG_PASS, &tmp_value); if (!ADS_ERR_OK(ads_status)) { DEBUG(4,("sam_ads_account_policy_get failed for user must login to change password. Useing default\n")); tmp_value = 0; @@ -699,15 +809,17 @@ static NTSTATUS sam_ads_create_account(const SAM_METHODS *sam_method, const char *account_name, uint16 acct_ctrl, SAM_ACCOUNT_HANDLE **account) { ADS_STATUS ads_status = ADS_STATUS_NOT_IMPLEMENTED; + SAM_ADS_PRIVATES *privates = (struct sam_ads_privates *)sam_method->private_data; SEC_DESC *sd = NULL; + uint32 acc_granted; - SAM_ASSERT(sam_method && access_token && account_name && account); + SAM_ASSERT(sam_method && privates && access_token && account_name && account); - ads_status = sam_ads_get_tree_sec_desc(sam_method, ADS_SUBTREE_USERS, &sd); + ads_status = sam_ads_get_tree_sec_desc(privates, ADS_SUBTREE_USERS, &sd); if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); - ads_status = sam_ads_access_check(sam_method, sd, access_token, access_desired); + ads_status = sam_ads_access_check(privates, sd, access_token, access_desired, &acc_granted); if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); @@ -715,21 +827,25 @@ static NTSTATUS sam_ads_create_account(const SAM_METHODS *sam_method, if (!ADS_ERR_OK(ads_status)) return ads_ntstatus(ads_status); + (*account)->access_granted = acc_granted; + return ads_ntstatus(ads_status); } static NTSTATUS sam_ads_add_account(const SAM_METHODS *sam_method, const SAM_ACCOUNT_HANDLE *account) { ADS_STATUS ads_status = ADS_ERROR(LDAP_NO_MEMORY); - struct sam_ads_privates *privates = (struct sam_ads_privates *)sam_method->private_data; + SAM_ADS_PRIVATES *privates = (struct sam_ads_privates *)sam_method->private_data; ADS_STRUCT *ads_struct = privates->ads_struct; TALLOC_CTX *mem_ctx = privates->mem_ctx; ADS_MODLIST mods; uint16 acct_ctrl; char *new_dn; + SEC_DESC *sd; + uint32 acc_granted; SAM_ASSERT(sam_method && account); - + ads_status = ADS_ERROR_NT(sam_get_account_acct_ctrl(account,&acct_ctrl)); if (!ADS_ERR_OK(ads_status)) goto done; @@ -892,22 +1008,81 @@ static NTSTATUS sam_ads_enum_accounts(const SAM_METHODS *sam_method, const NT_US return ads_ntstatus(ads_status); } -static NTSTATUS sam_ads_get_account_by_sid(const SAM_METHODS *sam_method, const NT_USER_TOKEN *access_token, const uint32 access_desired, const DOM_SID *accountsid, SAM_ACCOUNT_HANDLE **account) +#if 0 +static NTSTATUS sam_ads_get_account_by_sid(const SAM_METHODS *sam_method, const NT_USER_TOKEN *access_token, const uint32 access_desired, const DOM_SID *account_sid, SAM_ACCOUNT_HANDLE **account) +{ + ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL); + SAM_ADS_PRIVATES *privates = (struct sam_ads_privates *)sam_method->private_data; + ADS_STRUCT *ads_struct = privates->ads_struct; + TALLOC_CTX *mem_ctx = privates->mem_ctx; + SEC_DESC *sd = NULL; + uint32 acc_granted; + + SAM_ASSERT(sam_method && privates && ads_struct && access_token && account_sid && account); + + ads_status = ADS_ERROR_NT(sam_ads_get_sec_desc(sam_method, access_token, account_sid, &my_sd)); + if (!ADS_ERR_OK(ads_status)) + return ads_ntstatus(ads_status); + + ads_status = sam_ads_access_check(privates, sd, access_token, access_desired, &acc_granted); + if (!ADS_ERR_OK(ads_status)) + return ads_ntstatus(ads_status); + + ads_status = ADS_ERROR_NT(sam_init_account(account)); + if (!ADS_ERR_OK(ads_status)) + return ads_ntstatus(ads_status); + + (*account)->access_granted = acc_granted; + + return ads_ntstatus(ads_status); +} +#else +static NTSTATUS sam_ads_get_account_by_sid(const SAM_METHODS *sam_method, const NT_USER_TOKEN *access_token, const uint32 access_desired, const DOM_SID *account_sid, SAM_ACCOUNT_HANDLE **account) { ADS_STATUS ads_status = ADS_STATUS_NOT_IMPLEMENTED; DEBUG(0,("sam_ads: %s was called!\n",__FUNCTION__)); SAM_ASSERT(sam_method); return ads_ntstatus(ads_status); } +#endif -static NTSTATUS sam_ads_get_account_by_name(const SAM_METHODS *sam_method, const NT_USER_TOKEN *access_token, const uint32 access_desired, const char *name, SAM_ACCOUNT_HANDLE **account) +#if 0 +static NTSTATUS sam_ads_get_account_by_name(const SAM_METHODS *sam_method, const NT_USER_TOKEN *access_token, const uint32 access_desired, const char *account_name, SAM_ACCOUNT_HANDLE **account) +{ + ADS_STATUS ads_status = ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL); + SAM_ADS_PRIVATES *privates = (struct sam_ads_privates *)sam_method->private_data; + ADS_STRUCT *ads_struct = privates->ads_struct; + TALLOC_CTX *mem_ctx = privates->mem_ctx; + SEC_DESC *sd = NULL; + uint32 acc_granted; + + SAM_ASSERT(sam_method && privates && ads_struct && access_token && account_name && account); + + ads_status = sam_ads_get_tree_sec_desc(privates, ADS_ROOT_TREE, &sd); + if (!ADS_ERR_OK(ads_status)) + return ads_ntstatus(ads_status); + + ads_status = sam_ads_access_check(privates, sd, access_token, access_desired, &acc_granted); + if (!ADS_ERR_OK(ads_status)) + return ads_ntstatus(ads_status); + + ads_status = ADS_ERROR_NT(sam_init_account(account)); + if (!ADS_ERR_OK(ads_status)) + return ads_ntstatus(ads_status); + + (*account)->access_granted = acc_granted; + + return ads_ntstatus(ads_status); +} +#else +static NTSTATUS sam_ads_get_account_by_name(const SAM_METHODS *sam_method, const NT_USER_TOKEN *access_token, const uint32 access_desired, const char *account_name, SAM_ACCOUNT_HANDLE **account) { ADS_STATUS ads_status = ADS_STATUS_NOT_IMPLEMENTED; DEBUG(0,("sam_ads: %s was called!\n",__FUNCTION__)); SAM_ASSERT(sam_method); return ads_ntstatus(ads_status); } - +#endif /* Group API */ static NTSTATUS sam_ads_create_group(const SAM_METHODS *sam_method, const NT_USER_TOKEN *access_token, uint32 access_desired, const char *group_name, uint16 group_ctrl, SAM_GROUP_HANDLE **group) @@ -945,7 +1120,7 @@ static NTSTATUS sam_ads_delete_group(const SAM_METHODS *sam_method, const SAM_GR static NTSTATUS sam_ads_enum_groups(const SAM_METHODS *sam_method, const NT_USER_TOKEN *access_token, const uint16 group_ctrl, uint32 *groups_count, SAM_GROUP_ENUM **groups) { ADS_STATUS ads_status = ADS_STATUS_NOT_IMPLEMENTED; - struct sam_ads_privates *privates = (struct sam_ads_privates *)sam_method->private_data; + SAM_ADS_PRIVATES *privates = (struct sam_ads_privates *)sam_method->private_data; ADS_STRUCT *ads_struct = privates->ads_struct; TALLOC_CTX *mem_ctx = privates->mem_ctx; void *res = NULL; @@ -965,7 +1140,7 @@ static NTSTATUS sam_ads_enum_groups(const SAM_METHODS *sam_method, const NT_USER DEBUG(3,("ads: enum_dom_groups\n")); - /* Fix Me: get only group from the wanted Type */ + FIXME("get only group from the wanted Type!\n"); asprintf(&filter, "(&(objectClass=group)(groupType=%s))", "*"); ads_status = sam_ads_do_search(privates, ads_struct->config.bind_path, LDAP_SCOPE_SUBTREE, filter, group_enum_attrs, &res); if (!ADS_ERR_OK(ads_status)) { @@ -1071,7 +1246,7 @@ Free our private data ***********************************/ static void sam_ads_free_private_data(void **vp) { - struct sam_ads_privates **sam_ads_state = (struct sam_ads_privates **)vp; + SAM_ADS_PRIVATES **sam_ads_state = (SAM_ADS_PRIVATES **)vp; if ((*sam_ads_state)->ads_struct->ld) { ldap_unbind((*sam_ads_state)->ads_struct->ld); @@ -1080,7 +1255,7 @@ static void sam_ads_free_private_data(void **vp) ads_destroy(&((*sam_ads_state)->ads_struct)); talloc_destroy((*sam_ads_state)->mem_ctx); - /* Fix me: maybe we must free some other stuff here */ + FIXME("maybe we must free some other stuff here\n"); *sam_ads_state = NULL; } @@ -1093,7 +1268,7 @@ Init the ADS SAM backend NTSTATUS sam_init_ads(SAM_METHODS *sam_method, const char *module_params) { ADS_STATUS ads_status; - struct sam_ads_privates *sam_ads_state; + SAM_ADS_PRIVATES *sam_ads_state; TALLOC_CTX *mem_ctx; SAM_ASSERT(sam_method && sam_method->parent); @@ -1142,8 +1317,7 @@ NTSTATUS sam_init_ads(SAM_METHODS *sam_method, const char *module_params) sam_method->sam_get_groups_of_sid = sam_ads_get_groups_of_sid; - /*Fix me: use talloc !*/ - sam_ads_state = talloc_zero(mem_ctx, sizeof(struct sam_ads_privates)); + sam_ads_state = talloc_zero(mem_ctx, sizeof(SAM_ADS_PRIVATES)); if (!sam_ads_state) { DEBUG(0, ("talloc() failed for sam_ads private_data!\n")); return NT_STATUS_NO_MEMORY; -- cgit From 4a5a88f8c908ebf61cced616b0539ff8c97b30b1 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 21 Oct 2002 15:49:26 +0000 Subject: sync with SAMBA_3_0 (This used to be commit 07ac86323f71d6228a222a1680d1c7def0eb7109) --- source3/Makefile.in | 9 +- source3/utils/make_printerdef.c | 585 ---------------------------------------- 2 files changed, 1 insertion(+), 593 deletions(-) delete mode 100644 source3/utils/make_printerdef.c (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index b58661d2fe..da8990b061 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -321,9 +321,6 @@ SWAT_OBJ = $(SWAT_OBJ1) $(PRINTING_OBJ) $(LIBSMB_OBJ) $(LOCKING_OBJ) \ SMBSH_OBJ = smbwrapper/smbsh.o smbwrapper/shared.o \ $(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) -MAKE_PRINTERDEF_OBJ = utils/make_printerdef.o $(PARAM_OBJ) \ - $(UBIQX_OBJ) $(LIB_OBJ) - STATUS_OBJ = utils/status.o $(LOCKING_OBJ) $(PARAM_OBJ) \ $(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) @@ -549,7 +546,7 @@ nsswitch : SHOWFLAGS $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) wins : SHOWFLAGS nsswitch/libnss_wins.@SHLIBEXT@ -everything: all libsmbclient debug2html smbfilter talloctort bin/make_printerdef +everything: all libsmbclient debug2html smbfilter talloctort .SUFFIXES: .SUFFIXES: .c .o .po .po32 .lo @@ -704,10 +701,6 @@ bin/nmblookup: $(NMBLOOKUP_OBJ) bin/.dummy @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(LIBS) -bin/make_printerdef: $(MAKE_PRINTERDEF_OBJ) bin/.dummy - @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(MAKE_PRINTERDEF_OBJ) $(LDFLAGS) $(LIBS) - bin/smbtorture: $(SMBTORTURE_OBJ) bin/.dummy @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(LIBS) diff --git a/source3/utils/make_printerdef.c b/source3/utils/make_printerdef.c deleted file mode 100644 index 35ecd7f3e9..0000000000 --- a/source3/utils/make_printerdef.c +++ /dev/null @@ -1,585 +0,0 @@ - /* - Unix SMB/CIFS implementation. - Create printer definition files. - - Copyright (C) Jean-Francois.Micouleau@utc.fr, 10/26/97 - 1998 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "includes.h" - -/* -#define DEBUGIT -*/ - -char *files_to_copy; -char *driverfile, *datafile, *helpfile, *languagemonitor, *datatype, *vendorsetup; -char buffer[50][sizeof(pstring)]; -char sbuffer[50][sizeof(pstring)]; -char sub_dir[50][2][sizeof(pstring)]; - -static void usage(char *name) -{ - fprintf(stderr,"%s: printer.def \"Printer Name\"\n", name); -} - -static char *myfgets(char *s, int n, FILE *stream) -{ - char *LString1; - char *LString2; - char *temp; - pstring String; - pstring NewString; - int i; - - fgets(s,n,stream); - while ((LString1 = strchr_m(s,'%')) != NULL) { - if (!(LString2 = strchr_m(LString1+1,'%'))) break; - *LString2 = '\0'; - pstrcpy(String,LString1+1); - i = 0; - while(*sbuffer[i]!='\0') { - if (strncmp(sbuffer[i],String,strlen(String))==0) - { - pstrcpy(String,sbuffer[i]); - if ((temp = strchr_m(String,'=')) != NULL) ++temp; - pstrcpy(String,temp); - break; - } - i++; - } - *LString1 = '\0'; - pstrcpy(NewString,s); - pstrcat(NewString,String); - pstrcat(NewString,LString2+1); - pstrcpy(s, NewString); - } - return(s); -} - -/* - This function split a line in two parts - on both side of the equal sign - "entry=value" -*/ -static char *scan(char *chaine,char **entry) -{ - char *value; - char *temp; - int i=0; - - *entry=(char *)malloc(sizeof(pstring)); - value=(char *)malloc(sizeof(pstring)); - - if(*entry == NULL || value == NULL) { - fprintf(stderr,"scan: malloc fail !\n"); - exit(1); - } - - pstrcpy(*entry,chaine); - temp=chaine; - while( temp[i]!='=' && temp[i]!='\0') { - i++; - } - (*entry)[i]='\0'; - if (temp[i]!='\0') { - i++; - } - while( temp[i]==' ' && temp[i]!='\0') { - i++; - } - pstrcpy(value,temp+i); - return (value); -} - -static void build_subdir(void) -{ - int i=0; - int j=0; - char *entry; - char *data; - - while (*buffer[i]!='\0') { - data=scan(buffer[i],&entry); -#ifdef DEBUGIT - fprintf(stderr,"\tentry=data %s:%s\n",entry,data); -#endif - j = strlen(entry); - while (j) { - if (entry[j-1] != ' ') break; - j--; - } - entry[j] = '\0'; - - if (strncmp(data,"11",2)==0) { - pstrcpy(sub_dir[i][0],entry); - pstrcpy(sub_dir[i][1],""); - } - if (strncmp(data,"23",2)==0) { - pstrcpy(sub_dir[i][0],entry); - pstrcpy(sub_dir[i][1],"color\\"); - } -#ifdef DEBUGIT - fprintf(stderr,"\tsubdir %s:%s\n",sub_dir[i][0],sub_dir[i][1]); -#endif - i++; - } -} - -/* - Lockup Strings entry in a file - Return all the lines between the entry and the next one or the end of file - An entry is something between braces. -*/ -static void lookup_strings(FILE *fichier) -{ - int found=0,pointeur=0,i=0; - char *temp,*temp2; - - temp=(char *)malloc(sizeof(pstring)); - temp2=(char *)malloc(sizeof(pstring)); - - if(temp == NULL || temp2 == NULL) { - SAFE_FREE(temp); - SAFE_FREE(temp2); - fprintf(stderr,"lookup_strings: malloc fail !\n"); - exit(1); - } - - *sbuffer[0]='\0'; - - pstrcpy(temp2,"[Strings]"); - - rewind(fichier); -#ifdef DEBUGIT - fprintf(stderr,"\tLooking for Strings\n"); -#endif - - while (!feof(fichier) && found==0) { - *temp='\0'; - fgets(temp,255,fichier); - if (strncmp(temp,temp2,strlen(temp2))==0) found=1; - } - - - while (!feof(fichier) && found==1) { - *temp='\0'; - fgets(temp,255,fichier); - if (*temp=='[') { - found=2; - *sbuffer[pointeur]='\0'; - } - else { - pstrcpy(sbuffer[pointeur],temp); - i=strlen(sbuffer[pointeur])-1; - while (sbuffer[pointeur][i]=='\r' || sbuffer[pointeur][i]=='\n') - sbuffer[pointeur][i--]='\0'; - pointeur++; - } - } - - /* CCMRCF Mod, seg fault or worse if not found */ - if (pointeur == 0) { - fprintf(stderr,"Printer not found\tNo [Strings] block in inf file\n"); - exit(2); - } - -#ifdef DEBUGIT - fprintf(stderr,"\t\tFound %d entries\n",pointeur-1); -#endif -} - - -/* - Lockup an entry in a file - Return all the lines between the entry and the next one or the end of file - An entry is something between braces. -*/ -static void lookup_entry(FILE *fichier,char *chaine) -{ - int found=0,pointeur=0,i=0; - char *temp,*temp2; - - temp=(char *)malloc(sizeof(pstring)); - temp2=(char *)malloc(sizeof(pstring)); - - if(temp == NULL || temp2 == NULL) { - SAFE_FREE(temp); - SAFE_FREE(temp2); - fprintf(stderr,"lookup_entry: malloc fail !\n"); - exit(1); - } - - *buffer[0]='\0'; - - pstrcpy(temp2,"["); - pstrcat(temp2,chaine); - pstrcat(temp2,"]"); - - rewind(fichier); -#ifdef DEBUGIT - fprintf(stderr,"\tLooking for %s\n",chaine); -#endif - - while (!feof(fichier) && found==0) { - *temp='\0'; - myfgets(temp,255,fichier); - if (strncmp(temp,temp2,strlen(temp2))==0) found=1; - } - - - while (!feof(fichier) && found==1) { - *temp='\0'; - myfgets(temp,255,fichier); - if (*temp=='[') { - found=2; - *buffer[pointeur]='\0'; - } - else { - pstrcpy(buffer[pointeur],temp); - i=strlen(buffer[pointeur])-1; - while (buffer[pointeur][i]=='\r' || buffer[pointeur][i]=='\n') - buffer[pointeur][i--]='\0'; - pointeur++; - } - } -#ifdef DEBUGIT - fprintf(stderr,"\t\tFound %d entries\n",pointeur-1); -#endif -} - -static char *find_desc(FILE *fichier,char *text) -{ - char *chaine; - char *long_desc; - char *short_desc; - char *crap = NULL; - char *p; - - int found=0; - - chaine=(char *)malloc(sizeof(pstring)); - long_desc=(char *)malloc(sizeof(pstring)); - short_desc=(char *)malloc(sizeof(pstring)); - if (!chaine || !long_desc || !short_desc) { - SAFE_FREE(chaine); - SAFE_FREE(long_desc); - SAFE_FREE(short_desc); - fprintf(stderr,"find_desc: Unable to malloc memory\n"); - exit(1); - } - - rewind(fichier); - while (!feof(fichier) && found==0) - { - myfgets(chaine,255,fichier); - - long_desc=strtok(chaine,"="); - crap=strtok(NULL,",\r"); - - p=long_desc; - while(*p!='"' && *p!='\0') - p++; - if (*p=='"' && *(p+1)!='\0') p++; - long_desc=p; - - if (*p!='\0') - { - p++; - while(*p!='\"') - p++; - *p='\0'; - } - if (!strcmp(text,long_desc)) - found=1; - } - SAFE_FREE(chaine); - if (!found || !crap) return(NULL); - while(*crap==' ') crap++; - pstrcpy(short_desc,crap); - return(short_desc); -} - -static void scan_copyfiles(FILE *fichier, char *chaine) -{ - char *part; - char *mpart; - int i; - pstring direc; -#ifdef DEBUGIT - fprintf(stderr,"In scan_copyfiles Lookup up of %s\n",chaine); -#endif - fprintf(stderr,"\nCopy the following files to your printer$ share location:\n"); - part=strtok(chaine,","); - do { - /* If the entry start with a @ then it's a file to copy - else it's an entry refering to files to copy - the main difference is when it's an entry - you can have a directory to append before the file name - */ - if (*part=='@') { - if (strlen(files_to_copy) != 0) - pstrcat(files_to_copy,","); - pstrcat(files_to_copy,&part[1]); - fprintf(stderr,"%s\n",&part[1]); - } else { - lookup_entry(fichier,part); - i=0; - pstrcpy(direc,""); - while (*sub_dir[i][0]!='\0') { -#ifdef DEBUGIT - fprintf(stderr,"\tsubdir %s:%s\n",sub_dir[i][0],sub_dir[i][1]); -#endif - if (strcmp(sub_dir[i][0],part)==0) - pstrcpy(direc,sub_dir[i][1]); - i++; - } - i=0; - while (*buffer[i]!='\0') { -/* - * HP inf files have strange entries that this attempts to address - * Entries in the Copy sections normally have only a single file name - * on each line. I have seen the following format in various HP inf files: - * - * pscript.hlp = pscript.hl_ - * hpdcmon.dll,hpdcmon.dl_ - * MSVCRT.DLL,MSVCRT.DL_,,32 - * ctl3dv2.dll,ctl3dv2.dl_,ctl3dv2.tmp - * - * In the first 2 cases you want the first file name - in the last case - * you only want the last file name (at least that is what a Win95 - * machine sent). In the third case you also want the first file name - * (detect by the last component being just a number ?). - * This may still be wrong but at least I get the same list - * of files as seen on a printer test page. - */ - part = strchr_m(buffer[i],'='); - if (part) { - /* - * Case (1) eg. pscript.hlp = pscript.hl_ - chop after the first name. - */ - - *part = '\0'; - - /* - * Now move back to the start and print that. - */ - - while (--part > buffer[i]) { - if ((*part == ' ') || (*part =='\t')) - *part = '\0'; - else - break; - } - } else { - part = strchr_m(buffer[i],','); - if (part) { - /* - * Cases (2-4) - */ - - if ((mpart = strrchr_m(part+1,','))!=NULL) { - /* - * Second ',' - case 3 or 4. - * Check if the last part is just a number, - * if so we need the first part. - */ - - char *endptr = NULL; - BOOL isnumber = False; - - mpart++; - (void)strtol(mpart, &endptr, 10); - - isnumber = ((endptr > mpart) && isdigit(*mpart)); - if(!isnumber) - pstrcpy(buffer[i],mpart+1); - else - *part = '\0'; - } else { - *part = '\0'; - } - while (--part > buffer[i]) - if ((*part == ' ') || (*part =='\t')) *part = '\0'; - else break; - } - } - if (*buffer[i] != ';') { - if (strlen(files_to_copy) != 0) - pstrcat(files_to_copy,","); - pstrcat(files_to_copy,direc); - pstrcat(files_to_copy,buffer[i]); - fprintf(stderr,"%s%s\n",direc,buffer[i]); - } - i++; - } /* end while */ - } - part=strtok(NULL,","); - if (part) { - while( *part ==' ' && *part != '\0') { - part++; - } - } - } while (part!=NULL); - fprintf(stderr,"\n"); -} - - -static void scan_short_desc(FILE *fichier, char *short_desc) -{ - int i=0; - char *temp; - char *copyfiles=0,*datasection=0; - - helpfile=0; - languagemonitor=0; - vendorsetup=0; - datatype="RAW"; - if((temp=(char *)malloc(sizeof(pstring))) == NULL) { - fprintf(stderr, "scan_short_desc: malloc fail !\n"); - exit(1); - } - - driverfile=short_desc; - datafile=short_desc; - - lookup_entry(fichier,short_desc); - - while(*buffer[i]!='\0') { -#ifdef DEBUGIT - fprintf(stderr,"\tLookup up of %s\n",buffer[i]); -#endif - if (strncasecmp(buffer[i],"CopyFiles",9)==0) - copyfiles=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"DataSection",11)==0) - datasection=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"DataFile",8)==0) - datafile=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"DriverFile",10)==0) - driverfile=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"HelpFile",8)==0) - helpfile=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"LanguageMonitor",15)==0) - languagemonitor=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"DefaultDataType",15)==0) - datatype=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"VendorSetup",11)==0) - vendorsetup=scan(buffer[i],&temp); - i++; - } - - if (datasection) { - lookup_entry(fichier,datasection); - - i = 0; - while(*buffer[i]!='\0') { -#ifdef DEBUGIT - fprintf(stderr,"\tLookup up of %s\n",buffer[i]); -#endif - if (strncasecmp(buffer[i],"CopyFiles",9)==0) - copyfiles=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"DataSection",11)==0) - datasection=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"DataFile",8)==0) - datafile=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"DriverFile",10)==0) - driverfile=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"HelpFile",8)==0) - helpfile=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"LanguageMonitor",15)==0) - languagemonitor=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"DefaultDataType",15)==0) - datatype=scan(buffer[i],&temp); - else if (strncasecmp(buffer[i],"VendorSetup",11)==0) - vendorsetup=scan(buffer[i],&temp); - i++; - } - } - - if (languagemonitor) { - temp = strtok(languagemonitor,","); - if (*temp == '"') ++temp; - pstrcpy(languagemonitor,temp); - if ((temp = strchr_m(languagemonitor,'"'))!=NULL) *temp = '\0'; - } - - if (i) fprintf(stderr,"End of section found\n"); - - fprintf(stderr,"CopyFiles: %s\n", - copyfiles?copyfiles:"(null)"); - fprintf(stderr,"Datasection: %s\n", - datasection?datasection:"(null)"); - fprintf(stderr,"Datafile: %s\n", - datafile?datafile:"(null)"); - fprintf(stderr,"Driverfile: %s\n", - driverfile?driverfile:"(null)"); - fprintf(stderr,"Helpfile: %s\n", - helpfile?helpfile:"(null)"); - fprintf(stderr,"LanguageMonitor: %s\n", - languagemonitor?languagemonitor:"(null)"); - fprintf(stderr,"VendorSetup: %s\n", - vendorsetup?vendorsetup:"(null)"); - if (copyfiles) scan_copyfiles(fichier,copyfiles); -} - -int main(int argc, char *argv[]) -{ - char *short_desc; - FILE *inf_file; - - if (argc!=3) - { - usage(argv[0]); - return(-1); - } - - inf_file=sys_fopen(argv[1],"r"); - if (!inf_file) - { - fprintf(stderr,"Description file not found, bye\n"); - return(-1); - } - - lookup_strings(inf_file); - - short_desc=find_desc(inf_file,argv[2]); - if (short_desc==NULL) - { - fprintf(stderr,"Printer not found\n"); - return(-1); - } - else fprintf(stderr,"Found:%s\n",short_desc); - - lookup_entry(inf_file,"DestinationDirs"); - build_subdir(); - - if((files_to_copy=(char *)malloc(2048*sizeof(char))) == NULL) { - fprintf(stderr, "%s: malloc fail.\n", argv[0] ); - exit(1); - } - *files_to_copy='\0'; - scan_short_desc(inf_file,short_desc); - fprintf(stdout,"%s:%s:%s:", - argv[2],driverfile,datafile); - fprintf(stdout,"%s:", - helpfile?helpfile:""); - fprintf(stdout,"%s:", - languagemonitor?languagemonitor:""); - fprintf(stdout,"%s:",datatype); - fprintf(stdout,"%s\n",files_to_copy); - return 0; -} - -- cgit From 307d89b60b26dda2a130d25c1dc2870eba961b0c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 21 Oct 2002 16:28:27 +0000 Subject: Recognize FreeBSD5 correctly (not as being sysv...) (This used to be commit 66ef6b942e00dc0d7742226f24861445d3bc0eb3) --- source3/acconfig.h | 2 + source3/configure | 25747 ++++++++++++++++++++++++++++-------------- source3/configure.in | 5 +- source3/include/config.h.in | 1268 ++- source3/include/includes.h | 5 - 5 files changed, 17788 insertions(+), 9239 deletions(-) (limited to 'source3') diff --git a/source3/acconfig.h b/source3/acconfig.h index e1bceb1edf..7b05525571 100644 --- a/source3/acconfig.h +++ b/source3/acconfig.h @@ -27,6 +27,8 @@ #undef AIX #undef BSD #undef IRIX +#undef UNIXWARE +#undef SYSV #undef IRIX6 #undef HPUX #undef QNX diff --git a/source3/configure b/source3/configure index 9210221f99..58a8bfa68e 100755 --- a/source3/configure +++ b/source3/configure @@ -1,109 +1,322 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.54. # +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -# Defaults: -ac_help= +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="include/includes.h" ac_default_prefix=/usr/local/samba -ac_help="$ac_help - --with-fhs Use FHS-compliant paths (default=no)" -ac_help="$ac_help - --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)" -ac_help="$ac_help - --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)" -ac_help="$ac_help - --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)" -ac_help="$ac_help - --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)" -ac_help="$ac_help - --with-configdir=DIR Where to put configuration files (\$libdir)" -ac_help="$ac_help - --with-logfilebase=DIR Where to put log files (\$(VARDIR))" -ac_help="$ac_help - --enable-debug Turn on compiler debugging information (default=no)" -ac_help="$ac_help - --enable-developer Turn on developer warnings and debugging (default=no)" -ac_help="$ac_help - --enable-krb5developer Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)" -ac_help="$ac_help - --enable-dmalloc Enable heap debugging [default=no]" -ac_help="$ac_help - --enable-cups Turn on CUPS support (default=auto)" -ac_help="$ac_help - --with-readline[=DIR] Look for readline include/libs in DIR (default=auto) " -ac_help="$ac_help - --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) " -ac_help="$ac_help - --with-smbwrapper Include SMB wrapper support (default=no) " -ac_help="$ac_help - --with-afs Include AFS clear-text auth support (default=no) " -ac_help="$ac_help - --with-dce-dfs Include DCE/DFS clear-text auth support (default=no)" -ac_help="$ac_help - --with-ads Active Directory support (default yes)" -ac_help="$ac_help - --with-krb5=base-dir Locate Kerberos 5 support (default=/usr)" -ac_help="$ac_help - --with-ldap LDAP support (default yes)" -ac_help="$ac_help - --with-automount Include AUTOMOUNT support (default=no)" -ac_help="$ac_help - --with-smbmount Include SMBMOUNT (Linux only) support (default=no)" -ac_help="$ac_help - --with-pam Include PAM support (default=no)" -ac_help="$ac_help - --with-pam_smbpass Build a PAM module to allow other applications to use our smbpasswd file (default=no)" -ac_help="$ac_help - --with-sam Build new (experimental) SAM database (default=no)" -ac_help="$ac_help - --with-ldapsam Include LDAP SAM 2.2 compatible configuration (default=no)" -ac_help="$ac_help - --with-tdbsam Include experimental TDB SAM support (default=no)" -ac_help="$ac_help - --with-nisplussam Include NISPLUS SAM support (default=no)" -ac_help="$ac_help - --with-nisplus-home Include NISPLUS_HOME support (default=no)" -ac_help="$ac_help - --with-syslog Include experimental SYSLOG support (default=no)" -ac_help="$ac_help - --with-profiling-data Include gathering source code profile information (default=no)" -ac_help="$ac_help - --with-quotas Include experimental disk-quota support (default=no)" -ac_help="$ac_help - --with-utmp Include experimental utmp accounting (default=no)" -ac_help="$ac_help - --with-manpages-langs={en,ja,pl} Choose man pages' language(s). (en)" -ac_help="$ac_help - --with-libsmbclient Build the libsmbclient shared library (default=yes)" -ac_help="$ac_help - --with-spinlocks Use spin locks instead of fcntl locks (default=no) " -ac_help="$ac_help - --with-acl-support Include ACL support (default=no)" -ac_help="$ac_help - --with-sendfile-support Check for sendfile support (default=yes)" -ac_help="$ac_help - --with-winbind Build winbind (default, if supported by OS)" -ac_help="$ac_help - --with-included-popt use bundled popt library, not from system" -ac_help="$ac_help - --with-python=PYTHONNAME build Python libraries" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configdir lockdir piddir logfilebase privatedir swatdir RUNPROG MPROGS LDSHFLAGS SONAMEFLAG SHLD HOST_OS PAM_MOD WRAP WRAP32 WRAPPROG PICFLAG PICSUFFIX POBAD_CC SHLIBEXT LIBSMBCLIENT_SHARED LIBSMBCLIENT PRINTLIBS AUTHLIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK BROKEN_CC build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CPP EGREP CUPS_CONFIG LIBOBJS TERMLIBS TERMLDFLAGS ROFF DYNEXP QUOTAOBJS manlangs WINBIND_TARGETS WINBIND_STARGETS WINBIND_LTARGETS WINBIND_PAM_TARGETS WINBIND_NSS_EXTRA_OBJS WINBIND_NSS_EXTRA_LIBS BUILD_POPT FLAGS1 PYTHON builddir LTLIBOBJS' +ac_subst_files='' # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -112,10 +325,15 @@ program_transform_name=s,x,x, silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -129,17 +347,9 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -147,59 +357,59 @@ do continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -208,95 +418,47 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -305,19 +467,19 @@ EOF -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -331,26 +493,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -367,7 +529,7 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -377,7 +539,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -388,58 +550,57 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -450,99 +611,110 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -exec 5>./config.log -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=include/includes.h # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -552,13 +724,446 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-debug Turn on compiler debugging information (default=no) + --enable-developer Turn on developer warnings and debugging (default=no) + --enable-krb5developer Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no) + --enable-dmalloc Enable heap debugging default=no + --enable-cups Turn on CUPS support (default=auto) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-fhs Use FHS-compliant paths (default=no) + --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private) + --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks) + --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks) + --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat) + --with-configdir=DIR Where to put configuration files (\$libdir) + --with-logfilebase=DIR Where to put log files (\$(VARDIR)) + --with-readline=DIR Look for readline include/libs in DIR (default=auto) + --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) + --with-smbwrapper Include SMB wrapper support (default=no) + --with-afs Include AFS clear-text auth support (default=no) + --with-dce-dfs Include DCE/DFS clear-text auth support (default=no) + --with-ads Active Directory support (default yes) + --with-krb5=base-dir Locate Kerberos 5 support (default=/usr) + --with-ldap LDAP support (default yes) + --with-automount Include AUTOMOUNT support (default=no) + --with-smbmount Include SMBMOUNT (Linux only) support (default=no) + --with-pam Include PAM support (default=no) + --with-pam_smbpass Build a PAM module to allow other applications to use our smbpasswd file (default=no) + --with-sam Build new (experimental) SAM database (default=no) + --with-ldapsam Include LDAP SAM 2.2 compatible configuration (default=no) + --with-tdbsam Include experimental TDB SAM support (default=no) + --with-nisplussam Include NISPLUS SAM support (default=no) + --with-nisplus-home Include NISPLUS_HOME support (default=no) + --with-syslog Include experimental SYSLOG support (default=no) + --with-profiling-data Include gathering source code profile information (default=no) + --with-quotas Include experimental disk-quota support (default=no) + --with-utmp Include experimental utmp accounting (default=no) + --with-manpages-langs={en,ja,pl} Choose man pages' language(s). (en) + --with-libsmbclient Build the libsmbclient shared library (default=yes) + --with-spinlocks Use spin locks instead of fcntl locks (default=no) + --with-acl-support Include ACL support (default=no) + --with-sendfile-support Check for sendfile support (default=yes) + --with-winbind Build winbind (default, if supported by OS) + --with-included-popt use bundled popt library, not from system + --with-python=PYTHONNAME build Python libraries + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.54. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell meta-characters. +ac_configure_args= +ac_sep= +for ac_arg +do + case $ac_arg in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n ) continue ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " +done + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -569,49 +1174,115 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers include/config.h" + + ################################################# # Directory handling stuff to support both the # legacy SAMBA directories and FHS compliant # ones... + # Check whether --with-fhs or --without-fhs was given. if test "${with_fhs+set}" = set; then withval="$with_fhs" @@ -628,11 +1299,11 @@ else piddir="\$(VARDIR)/locks" privatedir="\${prefix}/private" swatdir="\${prefix}/swat" -fi - +fi; ################################################# # set private directory location + # Check whether --with-privatedir or --without-privatedir was given. if test "${with_privatedir+set}" = set; then withval="$with_privatedir" @@ -641,17 +1312,18 @@ if test "${with_privatedir+set}" = set; then # # Just in case anybody calls it without argument # - echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2 + { echo "$as_me:$LINENO: WARNING: --with-privatedir called without argument - will use default" >&5 +echo "$as_me: WARNING: --with-privatedir called without argument - will use default" >&2;} ;; * ) privatedir="$withval" ;; esac -fi - +fi; ################################################# # set lock directory location + # Check whether --with-lockdir or --without-lockdir was given. if test "${with_lockdir+set}" = set; then withval="$with_lockdir" @@ -660,17 +1332,18 @@ if test "${with_lockdir+set}" = set; then # # Just in case anybody calls it without argument # - echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2 + { echo "$as_me:$LINENO: WARNING: --with-lockdir called without argument - will use default" >&5 +echo "$as_me: WARNING: --with-lockdir called without argument - will use default" >&2;} ;; * ) lockdir="$withval" ;; esac -fi - +fi; ################################################# # set pid directory location + # Check whether --with-piddir or --without-piddir was given. if test "${with_piddir+set}" = set; then withval="$with_piddir" @@ -679,17 +1352,18 @@ if test "${with_piddir+set}" = set; then # # Just in case anybody calls it without argument # - echo "configure: warning: --with-piddir called without argument - will use default" 1>&2 + { echo "$as_me:$LINENO: WARNING: --with-piddir called without argument - will use default" >&5 +echo "$as_me: WARNING: --with-piddir called without argument - will use default" >&2;} ;; * ) piddir="$withval" ;; esac -fi - +fi; ################################################# # set SWAT directory location + # Check whether --with-swatdir or --without-swatdir was given. if test "${with_swatdir+set}" = set; then withval="$with_swatdir" @@ -698,17 +1372,18 @@ if test "${with_swatdir+set}" = set; then # # Just in case anybody does it # - echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2 + { echo "$as_me:$LINENO: WARNING: --with-swatdir called without argument - will use default" >&5 +echo "$as_me: WARNING: --with-swatdir called without argument - will use default" >&2;} ;; * ) swatdir="$withval" ;; esac -fi - +fi; ################################################# # set configuration directory location + # Check whether --with-configdir or --without-configdir was given. if test "${with_configdir+set}" = set; then withval="$with_configdir" @@ -717,17 +1392,18 @@ if test "${with_configdir+set}" = set; then # # Just in case anybody does it # - echo "configure: warning: --with-configdir called without argument - will use default" 1>&2 + { echo "$as_me:$LINENO: WARNING: --with-configdir called without argument - will use default" >&5 +echo "$as_me: WARNING: --with-configdir called without argument - will use default" >&2;} ;; * ) configdir="$withval" ;; esac -fi - +fi; ################################################# # set log directory location + # Check whether --with-logfilebase or --without-logfilebase was given. if test "${with_logfilebase+set}" = set; then withval="$with_logfilebase" @@ -736,14 +1412,14 @@ if test "${with_logfilebase+set}" = set; then # # Just in case anybody does it # - echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2 + { echo "$as_me:$LINENO: WARNING: --with-logfilebase called without argument - will use default" >&5 +echo "$as_me: WARNING: --with-logfilebase called without argument - will use default" >&2;} ;; * ) logfilebase="$withval" ;; esac -fi - +fi; @@ -783,8 +1459,7 @@ if test "${enable_debug+set}" = set; then if eval "test x$enable_debug = xyes"; then CFLAGS="${CFLAGS} -g" fi -fi - +fi; # Check whether --enable-developer or --disable-developer was given. if test "${enable_developer+set}" = set; then @@ -792,8 +1467,7 @@ if test "${enable_developer+set}" = set; then if eval "test x$enable_developer = xyes"; then CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER" fi -fi - +fi; # Check whether --enable-krb5developer or --disable-krb5developer was given. if test "${enable_krb5developer+set}" = set; then @@ -801,237 +1475,627 @@ if test "${enable_krb5developer+set}" = set; then if eval "test x$enable_krb5developer = xyes"; then CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER" fi -fi - +fi; # Check whether --enable-dmalloc or --disable-dmalloc was given. if test "${enable_dmalloc+set}" = set; then enableval="$enable_dmalloc" - : -fi +fi; if test "x$enable_dmalloc" = xyes then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define ENABLE_DMALLOC 1 -EOF +_ACEOF + - cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define DMALLOC_FUNC_CHECK 1 -EOF +_ACEOF + + LIBS="$LIBS -ldmalloc" +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - LIBS="$LIBS -ldmalloc" +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -# Extract the first word of "gcc", so it can be a program name with args. +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:831: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:861: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift - if test $# -gt 0; then + if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:912: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - ;; - esac + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} + { (exit 1); exit 1; }; } -cat > conftest.$ac_ext << EOF +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -#line 955 "configure" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -main(){return(0);} -EOF -if { (eval echo configure:960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool --akim. + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +check \`config.log' for details." >&5 +echo "$as_me: error: C compiler cannot create executables +check \`config.log' for details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no else - ac_cv_prog_cc_cross=yes + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&2;} + { (exit 1); exit 1; }; } + fi fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} + { (exit 1); exit 1; }; } fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:986: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:991: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_gcc=no -fi -fi + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +int +main () +{ -if test $ac_cv_prog_gcc = yes; then - GCC=yes + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done else - GCC= + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} + { (exit 1); exit 1; }; } fi -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1019: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - ac_cv_prog_cc_g=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" + CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" @@ -1045,6 +2109,207 @@ else CFLAGS= fi fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -1056,14 +2321,20 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -1072,103 +2343,122 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1081: checking for a BSD compatible install" >&5 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done - ;; - esac - done - IFS="$ac_save_IFS" + done + ;; +esac +done + fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. - INSTALL="$ac_install_sh" + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' for ac_prog in gawk mawk nawk awk do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1138: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AWK="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -AWK="$ac_cv_prog_AWK" +AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$ac_t""$AWK" 1>&6 + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$AWK" && break + test -n "$AWK" && break done LD=ld -echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1170: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${ac_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then @@ -1177,59 +2467,167 @@ else ac_cv_prog_gnu_ld=no fi fi - -echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6 -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1186: checking for POSIXized ISC" >&5 -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 -then - echo "$ac_t""yes" 1>&6 - ISC=yes # If later tests want to check for ISC. - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi +echo "$as_me:$LINENO: checking for library containing strerror" >&5 +echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 +if test "${ac_cv_search_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$ac_t""no" 1>&6 - ISC= + ac_func_search_save_LIBS=$LIBS +ac_cv_search_strerror=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +int +main () +{ +strerror (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_strerror="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_strerror" = no; then + for ac_lib in cposix; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +int +main () +{ +strerror (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_strerror="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 +echo "${ECHO_T}$ac_cv_search_strerror" >&6 +if test "$ac_cv_search_strerror" != no; then + test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" + fi if test "x$CC" != xcc; then - echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 -echo "configure:1209: checking whether $CC and cc understand -c and -o together" >&5 + echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 else - echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 -echo "configure:1212: checking whether cc understands -c and -o together" >&5 + echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 +echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 fi -set dummy $CC; ac_cc="`echo $2 | - sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" -if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +set dummy $CC; ac_cc=`echo $2 | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'foo(){}' > conftest.c + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. -ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' -if { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' +if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. - if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then - ac_try='cc -c conftest.c -o conftest.o 1>&5' - if { (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { ac_try='cc -c conftest.$ac_ext >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # cc works too. : @@ -1246,12 +2644,15 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - echo "$ac_t""no" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 -EOF +_ACEOF fi @@ -1262,131 +2663,137 @@ else fi -echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6 -echo "configure:1267: checking that the C compiler understands volatile" >&5 -if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking that the C compiler understands volatile" >&5 +echo $ECHO_N "checking that the C compiler understands volatile... $ECHO_C" >&6 +if test "${samba_cv_volatile+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ volatile int i = 0 -; return 0; } -EOF -if { (eval echo configure:1280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_volatile=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_volatile=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_volatile=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_volatile" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_volatile" >&5 +echo "${ECHO_T}$samba_cv_volatile" >&6 if test x"$samba_cv_volatile" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_VOLATILE 1 -EOF +_ACEOF fi +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 +target=$ac_cv_target +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. # The aliases save the names the user supplied, while $host etc. # will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; -esac - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1329: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1350: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1368: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -test "$host_alias" != "$target_alias" && +test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- - case "$host_os" in *irix6*) cat >> confdefs.h <<\EOF #include @@ -1396,19 +2803,23 @@ EOF esac - - echo $ac_n "checking config.cache system type""... $ac_c" 1>&6 -echo "configure:1402: checking config.cache system type" >&5 + + echo "$as_me:$LINENO: checking config.cache system type" >&5 +echo $ECHO_N "checking config.cache system type... $ECHO_C" >&6 if { test x"${ac_cv_host_system_type+set}" = x"set" && test x"$ac_cv_host_system_type" != x"$host"; } || { test x"${ac_cv_build_system_type+set}" = x"set" && test x"$ac_cv_build_system_type" != x"$build"; } || { test x"${ac_cv_target_system_type+set}" = x"set" && test x"$ac_cv_target_system_type" != x"$target"; }; then - echo "$ac_t""different" 1>&6 - { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; } + echo "$as_me:$LINENO: result: different" >&5 +echo "${ECHO_T}different" >&6 + { { echo "$as_me:$LINENO: error: \"you must remove config.cache and restart configure\"" >&5 +echo "$as_me: error: \"you must remove config.cache and restart configure\"" >&2;} + { (exit 1); exit 1; }; } else - echo "$ac_t""same" 1>&6 + echo "$as_me:$LINENO: result: same" >&5 +echo "${ECHO_T}same" >&6 fi ac_cv_host_system_type="$host" ac_cv_build_system_type="$build" @@ -1424,11 +2835,11 @@ DYNEXP= case "$host_os" in # Try to work out if this is the native HPUX compiler that uses the -Ae flag. *hpux*) - - echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6 -echo "configure:1430: checking whether ${CC-cc} accepts -Ae" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -Ae" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -Ae... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_Ae+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then @@ -1439,12 +2850,12 @@ fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_Ae" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_Ae" >&6 # mmap on HPUX is completely broken... - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define MMAP_BLACKLIST 1 -EOF +_ACEOF if test $ac_cv_prog_cc_Ae = yes; then CPPFLAGS="$CPPFLAGS -Ae" @@ -1457,52 +2868,52 @@ EOF case `uname -r` in *9*|*10*) CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_BOTH_CRYPT_CALLS 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _HPUX_SOURCE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _ALIGNMENT_REQUIRED 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _MAX_ALIGNMENT 4 -EOF +_ACEOF ;; *11*) CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_BOTH_CRYPT_CALLS 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _HPUX_SOURCE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _LARGEFILE64_SOURCE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _ALIGNMENT_REQUIRED 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _MAX_ALIGNMENT 4 -EOF +_ACEOF ;; esac @@ -1512,22 +2923,24 @@ EOF # # CRAY Unicos has broken const handling *unicos*) - echo "$ac_t""disabling const" 1>&6 + echo "$as_me:$LINENO: result: disabling const" >&5 +echo "${ECHO_T}disabling const" >&6 CPPFLAGS="$CPPFLAGS -Dconst=" ;; - + # # AIX4.x doesn't even admit to having large # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set. # *aix4*) - echo "$ac_t""enabling large file support" 1>&6 + echo "$as_me:$LINENO: result: enabling large file support" >&5 +echo "${ECHO_T}enabling large file support" >&6 CPPFLAGS="$CPPFLAGS -D_LARGE_FILES" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _LARGE_FILES 1 -EOF +_ACEOF - ;; + ;; # # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit # to the existance of large files.. @@ -1539,43 +2952,45 @@ EOF *solaris*) case `uname -r` in 5.0*|5.1*|5.2*|5.3*|5.5*) - echo "$ac_t""no large file support" 1>&6 + echo "$as_me:$LINENO: result: no large file support" >&5 +echo "${ECHO_T}no large file support" >&6 ;; 5.*) - echo "$ac_t""enabling large file support" 1>&6 - if test "$ac_cv_prog_gcc" = yes; then + echo "$as_me:$LINENO: result: enabling large file support" >&5 +echo "${ECHO_T}enabling large file support" >&6 + if test "$ac_cv_c_compiler_gnu" = yes; then ${CC-cc} -v >conftest.c 2>&1 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c` rm -fr conftest.c case "$ac_cv_gcc_compiler_version_number" in *"gcc version 2.6"*|*"gcc version 2.7"*) CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _LARGEFILE64_SOURCE 1 -EOF +_ACEOF ;; *) CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _LARGEFILE64_SOURCE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _FILE_OFFSET_BITS 64 -EOF +_ACEOF ;; esac else CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _LARGEFILE64_SOURCE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _FILE_OFFSET_BITS 64 -EOF +_ACEOF fi ;; @@ -1586,15 +3001,15 @@ EOF # *sysv4*) if test $host = mips-sni-sysv4 ; then - echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1591: checking for LFS support" >&5 + echo "$as_me:$LINENO: checking for LFS support" >&5 +echo $ECHO_N "checking for LFS support... $ECHO_C" >&6 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then SINIX_LFS_SUPPORT=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -1605,46 +3020,56 @@ exit(0); exit(1); #endif } -EOF -if { (eval echo configure:1610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then SINIX_LFS_SUPPORT=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - SINIX_LFS_SUPPORT=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +SINIX_LFS_SUPPORT=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - CPPFLAGS="$old_CPPFLAGS" if test x$SINIX_LFS_SUPPORT = xyes ; then CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _LARGEFILE64_SOURCE 1 -EOF +_ACEOF CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS" LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS" LIBS="`getconf LFS64_LIBS` $LIBS" fi - echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6 + echo "$as_me:$LINENO: result: $SINIX_LFS_SUPPORT" >&5 +echo "${ECHO_T}$SINIX_LFS_SUPPORT" >&6 fi ;; # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support. # *linux*) - echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1641: checking for LFS support" >&5 + echo "$as_me:$LINENO: checking for LFS support" >&5 +echo $ECHO_N "checking for LFS support... $ECHO_C" >&6 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then LINUX_LFS_SUPPORT=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -1681,48 +3106,58 @@ main() { #endif } -EOF -if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then LINUX_LFS_SUPPORT=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - LINUX_LFS_SUPPORT=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +LINUX_LFS_SUPPORT=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - CPPFLAGS="$old_CPPFLAGS" if test x$LINUX_LFS_SUPPORT = xyes ; then CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _LARGEFILE64_SOURCE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _FILE_OFFSET_BITS 64 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 -EOF +_ACEOF fi - echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6 + echo "$as_me:$LINENO: result: $LINUX_LFS_SUPPORT" >&5 +echo "${ECHO_T}$LINUX_LFS_SUPPORT" >&6 ;; *hurd*) - echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1719: checking for LFS support" >&5 + echo "$as_me:$LINENO: checking for LFS support" >&5 +echo $ECHO_N "checking for LFS support... $ECHO_C" >&6 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then GLIBC_LFS_SUPPORT=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -1733,196 +3168,366 @@ exit(0); exit(1); #endif } -EOF -if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then GLIBC_LFS_SUPPORT=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - GLIBC_LFS_SUPPORT=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +GLIBC_LFS_SUPPORT=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - CPPFLAGS="$old_CPPFLAGS" if test x$GLIBC_LFS_SUPPORT = xyes ; then CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _LARGEFILE64_SOURCE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 -EOF +_ACEOF fi - echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6 + echo "$as_me:$LINENO: result: $GLIBC_LFS_SUPPORT" >&5 +echo "${ECHO_T}$GLIBC_LFS_SUPPORT" >&6 ;; esac -echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1768: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif -int main() { -} $ac_kw foo() { -; return 0; } -EOF -if { (eval echo configure:1782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext done fi - -echo "$ac_t""$ac_cv_c_inline" 1>&6 -case "$ac_cv_c_inline" in +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 +case $ac_cv_c_inline in inline | yes) ;; - no) cat >> confdefs.h <<\EOF -#define inline -EOF + no) +cat >>confdefs.h <<\_ACEOF +#define inline +_ACEOF ;; - *) cat >> confdefs.h <>confdefs.h <<_ACEOF #define inline $ac_cv_c_inline -EOF +_ACEOF ;; esac -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1808: checking how to run the C preprocessor" >&5 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext <&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -rm -f conftest* +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } fi - CPP="$ac_cv_prog_CPP" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_CPP="$CPP" + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi fi -echo "$ac_t""$CPP" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1888: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include #include #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* + +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_cv_header_stdc=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* ac_cv_header_stdc=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then + $EGREP "memchr" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1931,16 +3536,16 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then + $EGREP "free" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1949,604 +3554,1557 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -EOF -if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then : else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_header_stdc=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 -EOF +_ACEOF fi + + + + + ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1996: checking for $ac_hdr that defines DIR" >&5 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include <$ac_hdr> -int main() { -DIR *dirp = 0; -; return 0; } -EOF -if { (eval echo configure:2009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break fi + done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then -echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2034: checking for opendir in -ldir" >&5 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" -LIBS="-ldir $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir(); + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_opendir" = no; then + for ac_lib in dir; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" -int main() { -opendir() -; return 0; } -EOF -if { (eval echo configure:2053: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +LIBS=$ac_func_search_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" + fi else -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2075: checking for opendir in -lx" >&5 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" -LIBS="-lx $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir(); + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_opendir" = no; then + for ac_lib in x; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" -int main() { -opendir() -; return 0; } -EOF -if { (eval echo configure:2094: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +LIBS=$ac_func_search_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lx" -else - echo "$ac_t""no" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" + fi fi -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2117: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include #include -int main() { -struct tm *tp; -; return 0; } -EOF -if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_time=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_header_time" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 -EOF +_ACEOF fi -echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2152: checking for sys/wait.h that is POSIX.1 compatible" >&5 -if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 +if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include #ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif -int main() { -int s; -wait (&s); -s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; -; return 0; } -EOF -if { (eval echo configure:2173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_sys_wait_h=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_sys_wait_h=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 -EOF +_ACEOF fi -for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2197: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi -rm -f conftest* + +done + + + + + + + + +for ac_header in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$ac_t""no" 1>&6 + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + done -for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h + + + + + + + +for ac_header in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2237: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h + + + + + +for ac_header in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2277: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h + + + + + + + +for ac_header in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2317: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h + + + + + + + + +for ac_header in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2357: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h + + + + + + +for ac_header in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2397: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h + + + + + + +for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2437: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h + + + + + +for ac_header in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2477: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in sys/syslog.h syslog.h + + +for ac_header in sys/syslog.h syslog.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2517: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done @@ -2556,649 +5114,2218 @@ done # case "$host_os" in *hpux*) - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ struct spwd testme -; return 0; } -EOF -if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_shadow_h=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_shadow_h=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_shadow_h=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext if test x"$ac_cv_header_shadow_h" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SHADOW_H 1 -EOF +_ACEOF fi ;; esac -for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h + + + + + +for ac_header in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2590: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h + + + + + + +for ac_header in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2630: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in stropts.h poll.h + + +for ac_header in stropts.h poll.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2670: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in sys/capability.h syscall.h sys/syscall.h + + + +for ac_header in sys/capability.h syscall.h sys/syscall.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2710: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -for ac_hdr in sys/acl.h sys/cdefs.h glob.h + + + +for ac_header in sys/acl.h sys/cdefs.h glob.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2750: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done # For experimental utmp support (lastlog on some BSD-like systems) -for ac_hdr in utmp.h utmpx.h lastlog.h + + + +for ac_header in utmp.h utmpx.h lastlog.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2792: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done - + # For quotas on Veritas VxFS filesystems -for ac_hdr in sys/fs/vx_quota.h + +for ac_header in sys/fs/vx_quota.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2834: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done # For quotas on Linux XFS filesystems -for ac_hdr in linux/xqm.h + +for ac_header in linux/xqm.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2876: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done -echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2914: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6 +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((int *) 0) + return 0; +if (sizeof (int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_int=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6 + +echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_int" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then - ac_cv_sizeof_int=cross + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - cat > conftest.$ac_ext <&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -int main() +$ac_includes_default +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) return(1); - fprintf(f, "%d\n", sizeof(int)); - return(0); +static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; +test_array [0] = 0 + + ; + return 0; } -EOF -if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo= ac_hi= fi -rm -fr conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5 +echo "$as_me: error: cannot compute sizeof (int), 77" >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +long longval () { return (long) (sizeof (int)); } +unsigned long ulongval () { return (long) (sizeof (int)); } +#include +#include +int +main () +{ + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (int))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (int)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (int)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5 +echo "$as_me: error: cannot compute sizeof (int), 77" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_int=0 +fi fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int -EOF +_ACEOF -echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2953: checking size of long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6 +if test "${ac_cv_type_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((long *) 0) + return 0; +if (sizeof (long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_long=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6 + +echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then - ac_cv_sizeof_long=cross + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - cat > conftest.$ac_ext <&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -int main() +$ac_includes_default +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) return(1); - fprintf(f, "%d\n", sizeof(long)); - return(0); +static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +test_array [0] = 0 + + ; + return 0; } -EOF -if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo= ac_hi= fi -rm -fr conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5 +echo "$as_me: error: cannot compute sizeof (long), 77" >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +long longval () { return (long) (sizeof (long)); } +unsigned long ulongval () { return (long) (sizeof (long)); } +#include +#include +int +main () +{ + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5 +echo "$as_me: error: cannot compute sizeof (long), 77" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_long=0 fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long -EOF +_ACEOF -echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2992: checking size of short" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for short" >&5 +echo $ECHO_N "checking for short... $ECHO_C" >&6 +if test "${ac_cv_type_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((short *) 0) + return 0; +if (sizeof (short)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_short=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_short=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6 + +echo "$as_me:$LINENO: checking size of short" >&5 +echo $ECHO_N "checking size of short... $ECHO_C" >&6 +if test "${ac_cv_sizeof_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_short" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then - ac_cv_sizeof_short=cross + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - cat > conftest.$ac_ext <&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -int main() +$ac_includes_default +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) return(1); - fprintf(f, "%d\n", sizeof(short)); - return(0); +static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; +test_array [0] = 0 + + ; + return 0; } -EOF -if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_short=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short=0 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo= ac_hi= fi -rm -fr conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_short=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5 +echo "$as_me: error: cannot compute sizeof (short), 77" >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +long longval () { return (long) (sizeof (short)); } +unsigned long ulongval () { return (long) (sizeof (short)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (short))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (short)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (short)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5 +echo "$as_me: error: cannot compute sizeof (short), 77" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_short=0 +fi fi -echo "$ac_t""$ac_cv_sizeof_short" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short -EOF +_ACEOF -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3032: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -int main() { - -/* Ultrix mips cc rejects this. */ -typedef int charset[2]; const charset x; -/* SunOS 4.1.1 cc rejects this. */ -char const *const *ccp; -char **p; -/* NEC SVR4.0.2 mips cc rejects this. */ -struct point {int x, y;}; -static struct point const zero = {0,0}; -/* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in an arm - of an if-expression whose if-part is not a constant expression */ -const char *g = "string"; -ccp = &g + (g ? g-g : 0); -/* HPUX 7.0 cc rejects these. */ -++ccp; -p = (char**) ccp; -ccp = (char const *const *) p; -{ /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif - *t++ = 0; -} -{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; -} -{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; + ; + return 0; } -{ /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_const=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_const=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF fi -echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3107: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif -int main() { -} $ac_kw foo() { -; return 0; } -EOF -if { (eval echo configure:3121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext done fi - -echo "$ac_t""$ac_cv_c_inline" 1>&6 -case "$ac_cv_c_inline" in +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 +case $ac_cv_c_inline in inline | yes) ;; - no) cat >> confdefs.h <<\EOF -#define inline -EOF + no) +cat >>confdefs.h <<\_ACEOF +#define inline +_ACEOF ;; - *) cat >> confdefs.h <>confdefs.h <<_ACEOF #define inline $ac_cv_c_inline -EOF +_ACEOF ;; esac -echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3147: checking whether byte ordering is bigendian" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif -; return 0; } -EOF -if { (eval echo configure:3165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ #if BYTE_ORDER != BIG_ENDIAN not big endian #endif -; return 0; } -EOF -if { (eval echo configure:3180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_bigendian=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi fi -rm -f conftest* else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +rm -f conftest.$ac_objext conftest.$ac_ext else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -main () { +int +main () +{ /* Are we little or big endian? From Harbison&Steele. */ union { @@ -3208,106 +7335,112 @@ main () { u.l = 1; exit (u.c[sizeof (long) - 1] == 1); } -EOF -if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_c_bigendian=yes fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi +rm -f conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +case $ac_cv_c_bigendian in + yes) -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 -EOF +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac -fi -echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3237: checking whether char is unsigned" >&5 -if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +if test "${ac_cv_c_char_unsigned+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$GCC" = yes; then - # GCC predefines this symbol on systems where it applies. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#ifdef __CHAR_UNSIGNED__ - yes -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_c_char_unsigned=yes -else - rm -rf conftest* - ac_cv_c_char_unsigned=no -fi -rm -f conftest* +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0 -else -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_c_char_unsigned=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_char_unsigned=yes fi -rm -fr conftest* -fi - -fi +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 -EOF +_ACEOF fi -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3301: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include #ifdef signal -#undef signal +# undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); @@ -3315,426 +7448,679 @@ extern "C" void (*signal (int, void (*)(int)))(int); void (*signal ()) (); #endif -int main() { +int +main () +{ int i; -; return 0; } -EOF -if { (eval echo configure:3323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_signal=void else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_signal=int fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6 -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal -EOF +_ACEOF -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3342: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +if test "${ac_cv_type_uid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else - rm -rf conftest* ac_cv_type_uid_t=no fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define uid_t int -EOF +_ACEOF + - cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define gid_t int -EOF +_ACEOF fi -echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3376: checking for mode_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +if test "${ac_cv_type_mode_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +$ac_includes_default +int +main () +{ +if ((mode_t *) 0) + return 0; +if (sizeof (mode_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else - rm -rf conftest* - ac_cv_type_mode_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_mode_t=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_type_mode_t" 1>&6 -if test $ac_cv_type_mode_t = no; then - cat >> confdefs.h <<\EOF +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +if test $ac_cv_type_mode_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define mode_t int -EOF +_ACEOF fi -echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3409: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +$ac_includes_default +int +main () +{ +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_off_t=yes else - rm -rf conftest* - ac_cv_type_off_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_off_t=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define off_t long -EOF +_ACEOF fi -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3442: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +$ac_includes_default +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else - rm -rf conftest* - ac_cv_type_size_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_size_t=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define size_t unsigned -EOF +_ACEOF fi -echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3475: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +$ac_includes_default +int +main () +{ +if ((pid_t *) 0) + return 0; +if (sizeof (pid_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else - rm -rf conftest* - ac_cv_type_pid_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_pid_t=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define pid_t int -EOF +_ACEOF fi -echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3508: checking for st_rdev in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 +echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6 +if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -#include -int main() { -struct stat s; s.st_rdev; -; return 0; } -EOF -if { (eval echo configure:3521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_rdev=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_rdev=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 -if test $ac_cv_struct_st_rdev = yes; then - cat >> confdefs.h <<\EOF +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_rdev) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_rdev=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_rdev) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_rdev=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_member_struct_stat_st_rdev=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6 +if test $ac_cv_member_struct_stat_st_rdev = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_RDEV 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF #define HAVE_ST_RDEV 1 -EOF +_ACEOF fi -echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3542: checking for d_off in dirent" >&5 -if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking for d_off in dirent" >&5 +echo $ECHO_N "checking for d_off in dirent... $ECHO_C" >&6 +if test "${ac_cv_dirent_d_off+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include #include -int main() { +int +main () +{ struct dirent d; d.d_off; -; return 0; } -EOF -if { (eval echo configure:3557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_dirent_d_off=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_dirent_d_off=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_dirent_d_off=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_dirent_d_off" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_dirent_d_off" >&5 +echo "${ECHO_T}$ac_cv_dirent_d_off" >&6 if test $ac_cv_dirent_d_off = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_DIRENT_D_OFF 1 -EOF +_ACEOF fi -echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3578: checking for ino_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ino_t" >&5 +echo $ECHO_N "checking for ino_t... $ECHO_C" >&6 +if test "${ac_cv_type_ino_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +$ac_includes_default +int +main () +{ +if ((ino_t *) 0) + return 0; +if (sizeof (ino_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_ino_t=yes else - rm -rf conftest* - ac_cv_type_ino_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_ino_t=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_type_ino_t" 1>&6 -if test $ac_cv_type_ino_t = no; then - cat >> confdefs.h <<\EOF +echo "$as_me:$LINENO: result: $ac_cv_type_ino_t" >&5 +echo "${ECHO_T}$ac_cv_type_ino_t" >&6 +if test $ac_cv_type_ino_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define ino_t unsigned -EOF +_ACEOF fi -echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3611: checking for loff_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for loff_t" >&5 +echo $ECHO_N "checking for loff_t... $ECHO_C" >&6 +if test "${ac_cv_type_loff_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +$ac_includes_default +int +main () +{ +if ((loff_t *) 0) + return 0; +if (sizeof (loff_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_loff_t=yes else - rm -rf conftest* - ac_cv_type_loff_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_loff_t=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_type_loff_t" 1>&6 -if test $ac_cv_type_loff_t = no; then - cat >> confdefs.h <<\EOF +echo "$as_me:$LINENO: result: $ac_cv_type_loff_t" >&5 +echo "${ECHO_T}$ac_cv_type_loff_t" >&6 +if test $ac_cv_type_loff_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define loff_t off_t -EOF +_ACEOF fi -echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3644: checking for offset_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for offset_t" >&5 +echo $ECHO_N "checking for offset_t... $ECHO_C" >&6 +if test "${ac_cv_type_offset_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +$ac_includes_default +int +main () +{ +if ((offset_t *) 0) + return 0; +if (sizeof (offset_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_offset_t=yes else - rm -rf conftest* - ac_cv_type_offset_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_offset_t=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_type_offset_t" 1>&6 -if test $ac_cv_type_offset_t = no; then - cat >> confdefs.h <<\EOF +echo "$as_me:$LINENO: result: $ac_cv_type_offset_t" >&5 +echo "${ECHO_T}$ac_cv_type_offset_t" >&6 +if test $ac_cv_type_offset_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define offset_t loff_t -EOF +_ACEOF fi -echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3677: checking for ssize_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 +if test "${ac_cv_type_ssize_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +$ac_includes_default +int +main () +{ +if ((ssize_t *) 0) + return 0; +if (sizeof (ssize_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_ssize_t=yes else - rm -rf conftest* - ac_cv_type_ssize_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_ssize_t=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 -if test $ac_cv_type_ssize_t = no; then - cat >> confdefs.h <<\EOF +echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 +if test $ac_cv_type_ssize_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define ssize_t int -EOF +_ACEOF fi -echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3710: checking for wchar_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for wchar_t" >&5 +echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6 +if test "${ac_cv_type_wchar_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +$ac_includes_default +int +main () +{ +if ((wchar_t *) 0) + return 0; +if (sizeof (wchar_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_wchar_t=yes else - rm -rf conftest* - ac_cv_type_wchar_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_wchar_t=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_type_wchar_t" 1>&6 -if test $ac_cv_type_wchar_t = no; then - cat >> confdefs.h <<\EOF +echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5 +echo "${ECHO_T}$ac_cv_type_wchar_t" >&6 +if test $ac_cv_type_wchar_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define wchar_t unsigned short -EOF +_ACEOF fi @@ -3745,51 +8131,54 @@ fi # Check whether --enable-cups or --disable-cups was given. if test "${enable_cups+set}" = set; then enableval="$enable_cups" - : -fi +fi; if test x$enable_cups != xno; then # Extract the first word of "cups-config", so it can be a program name with args. set dummy cups-config; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3757: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_CUPS_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$CUPS_CONFIG" in - /*) + case $CUPS_CONFIG in + [\\/]* | ?:[\\/]*) ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CUPS_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG" +CUPS_CONFIG=$ac_cv_path_CUPS_CONFIG + if test -n "$CUPS_CONFIG"; then - echo "$ac_t""$CUPS_CONFIG" 1>&6 + echo "$as_me:$LINENO: result: $CUPS_CONFIG" >&5 +echo "${ECHO_T}$CUPS_CONFIG" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test "x$CUPS_CONFIG" != x; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_CUPS 1 -EOF +_ACEOF CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`" LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`" @@ -3799,104 +8188,132 @@ fi ############################################ # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code + for ac_func in dlopen do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3806: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + fi done if test x"$ac_cv_func_dlopen" = x"no"; then - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3860: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen(); - -int main() { -dlopen() -; return 0; } -EOF -if { (eval echo configure:3879: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then LIBS="$LIBS -ldl"; - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_DLOPEN 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi fi @@ -3904,61 +8321,74 @@ fi ############################################ # check if the compiler can do immediate structures -echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3909: checking for immediate structures" >&5 -if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for immediate structures" >&5 +echo $ECHO_N "checking for immediate structures... $ECHO_C" >&6 +if test "${samba_cv_immediate_structures+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ typedef struct {unsigned x;} FOOBAR; #define X_FOOBAR(x) ((FOOBAR) { x }) #define FOO_ONE X_FOOBAR(1) - FOOBAR f = FOO_ONE; + FOOBAR f = FOO_ONE; static struct { - FOOBAR y; + FOOBAR y; } f2[] = { {FOO_ONE} - }; + }; -; return 0; } -EOF -if { (eval echo configure:3933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_immediate_structures=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_immediate_structures=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_immediate_structures=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_immediate_structures" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_immediate_structures" >&5 +echo "${ECHO_T}$samba_cv_immediate_structures" >&6 if test x"$samba_cv_immediate_structures" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_IMMEDIATE_STRUCTURES 1 -EOF +_ACEOF fi ############################################ # check for unix domain sockets -echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3956: checking for unix domain sockets" >&5 -if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for unix domain sockets" >&5 +echo $ECHO_N "checking for unix domain sockets... $ECHO_C" >&6 +if test "${samba_cv_unixsocket+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -3966,42 +8396,55 @@ else #include #include #include -int main() { +int +main () +{ - struct sockaddr_un sunaddr; + struct sockaddr_un sunaddr; sunaddr.sun_family = AF_UNIX; -; return 0; } -EOF -if { (eval echo configure:3977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_unixsocket=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_unixsocket=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_unixsocket=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_unixsocket" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_unixsocket" >&5 +echo "${ECHO_T}$samba_cv_unixsocket" >&6 if test x"$samba_cv_unixsocket" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UNIXSOCKET 1 -EOF +_ACEOF fi -echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3999: checking for socklen_t type" >&5 -if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for socklen_t type" >&5 +echo $ECHO_N "checking for socklen_t type... $ECHO_C" >&6 +if test "${samba_cv_socklen_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -4010,38 +8453,51 @@ else #include #endif #include -int main() { +int +main () +{ socklen_t i = 0 -; return 0; } -EOF -if { (eval echo configure:4018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_socklen_t=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_socklen_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_socklen_t=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_socklen_t" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_socklen_t" >&5 +echo "${ECHO_T}$samba_cv_socklen_t" >&6 if test x"$samba_cv_socklen_t" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKLEN_T_TYPE 1 -EOF +_ACEOF fi -echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:4039: checking for sig_atomic_t type" >&5 -if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for sig_atomic_t type" >&5 +echo $ECHO_N "checking for sig_atomic_t type... $ECHO_C" >&6 +if test "${samba_cv_sig_atomic_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -4050,493 +8506,677 @@ else #include #endif #include -int main() { +int +main () +{ sig_atomic_t i = 0 -; return 0; } -EOF -if { (eval echo configure:4058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_sig_atomic_t=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_sig_atomic_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_sig_atomic_t=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_sig_atomic_t" >&5 +echo "${ECHO_T}$samba_cv_sig_atomic_t" >&6 if test x"$samba_cv_sig_atomic_t" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SIG_ATOMIC_T_TYPE 1 -EOF +_ACEOF fi # stupid headers have the functions but no declaration. grrrr. - echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:4081: checking for errno declaration" >&5 -if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for errno declaration" >&5 +echo $ECHO_N "checking for errno declaration... $ECHO_C" >&6 +if test "${ac_cv_have_errno_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ int i = (int)errno -; return 0; } -EOF -if { (eval echo configure:4094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_have_errno_decl=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_errno_decl=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_have_errno_decl=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_have_errno_decl" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_have_errno_decl" >&5 +echo "${ECHO_T}$ac_cv_have_errno_decl" >&6 if test x"$ac_cv_have_errno_decl" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ERRNO_DECL 1 -EOF +_ACEOF fi - echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:4116: checking for setresuid declaration" >&5 -if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for setresuid declaration" >&5 +echo $ECHO_N "checking for setresuid declaration... $ECHO_C" >&6 +if test "${ac_cv_have_setresuid_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ int i = (int)setresuid -; return 0; } -EOF -if { (eval echo configure:4129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_have_setresuid_decl=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_setresuid_decl=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_have_setresuid_decl=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_have_setresuid_decl" >&5 +echo "${ECHO_T}$ac_cv_have_setresuid_decl" >&6 if test x"$ac_cv_have_setresuid_decl" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SETRESUID_DECL 1 -EOF +_ACEOF fi - echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:4151: checking for setresgid declaration" >&5 -if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for setresgid declaration" >&5 +echo $ECHO_N "checking for setresgid declaration... $ECHO_C" >&6 +if test "${ac_cv_have_setresgid_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ int i = (int)setresgid -; return 0; } -EOF -if { (eval echo configure:4164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_have_setresgid_decl=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_setresgid_decl=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_have_setresgid_decl=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_have_setresgid_decl" >&5 +echo "${ECHO_T}$ac_cv_have_setresgid_decl" >&6 if test x"$ac_cv_have_setresgid_decl" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SETRESGID_DECL 1 -EOF +_ACEOF fi - echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:4186: checking for asprintf declaration" >&5 -if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for asprintf declaration" >&5 +echo $ECHO_N "checking for asprintf declaration... $ECHO_C" >&6 +if test "${ac_cv_have_asprintf_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ int i = (int)asprintf -; return 0; } -EOF -if { (eval echo configure:4199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_have_asprintf_decl=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_asprintf_decl=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_have_asprintf_decl=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_have_asprintf_decl" >&5 +echo "${ECHO_T}$ac_cv_have_asprintf_decl" >&6 if test x"$ac_cv_have_asprintf_decl" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ASPRINTF_DECL 1 -EOF +_ACEOF fi - echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4221: checking for vasprintf declaration" >&5 -if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for vasprintf declaration" >&5 +echo $ECHO_N "checking for vasprintf declaration... $ECHO_C" >&6 +if test "${ac_cv_have_vasprintf_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ int i = (int)vasprintf -; return 0; } -EOF -if { (eval echo configure:4234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_have_vasprintf_decl=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_vasprintf_decl=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_have_vasprintf_decl=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_have_vasprintf_decl" >&5 +echo "${ECHO_T}$ac_cv_have_vasprintf_decl" >&6 if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_VASPRINTF_DECL 1 -EOF +_ACEOF fi - echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4256: checking for vsnprintf declaration" >&5 -if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for vsnprintf declaration" >&5 +echo $ECHO_N "checking for vsnprintf declaration... $ECHO_C" >&6 +if test "${ac_cv_have_vsnprintf_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ int i = (int)vsnprintf -; return 0; } -EOF -if { (eval echo configure:4269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_have_vsnprintf_decl=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_vsnprintf_decl=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_have_vsnprintf_decl=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_have_vsnprintf_decl" >&5 +echo "${ECHO_T}$ac_cv_have_vsnprintf_decl" >&6 if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_VSNPRINTF_DECL 1 -EOF +_ACEOF fi - echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4291: checking for snprintf declaration" >&5 -if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for snprintf declaration" >&5 +echo $ECHO_N "checking for snprintf declaration... $ECHO_C" >&6 +if test "${ac_cv_have_snprintf_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ int i = (int)snprintf -; return 0; } -EOF -if { (eval echo configure:4304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_have_snprintf_decl=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_snprintf_decl=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_have_snprintf_decl=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_have_snprintf_decl" >&5 +echo "${ECHO_T}$ac_cv_have_snprintf_decl" >&6 if test x"$ac_cv_have_snprintf_decl" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SNPRINTF_DECL 1 -EOF +_ACEOF fi # and glibc has setresuid under linux but the function does # nothing until kernel 2.1.44! very dumb. -echo $ac_n "checking for real setresuid""... $ac_c" 1>&6 -echo "configure:4328: checking for real setresuid" >&5 -if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for real setresuid" >&5 +echo $ECHO_N "checking for real setresuid... $ECHO_C" >&6 +if test "${samba_cv_have_setresuid+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_have_setresuid=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} -EOF -if { (eval echo configure:4342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_have_setresuid=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_have_setresuid=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_have_setresuid=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_have_setresuid" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_have_setresuid" >&5 +echo "${ECHO_T}$samba_cv_have_setresuid" >&6 if test x"$samba_cv_have_setresuid" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SETRESUID 1 -EOF +_ACEOF fi # Do the same check for setresguid... # -echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4367: checking for real setresgid" >&5 -if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for real setresgid" >&5 +echo $ECHO_N "checking for real setresgid... $ECHO_C" >&6 +if test "${samba_cv_have_setresgid+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_have_setresgid=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} -EOF -if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_have_setresgid=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_have_setresgid=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_have_setresgid=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_have_setresgid" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_have_setresgid" >&5 +echo "${ECHO_T}$samba_cv_have_setresgid" >&6 if test x"$samba_cv_have_setresgid" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SETRESGID 1 -EOF +_ACEOF fi -echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4405: checking for 8-bit clean memcmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +if test "${ac_cv_func_memcmp_working+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - ac_cv_func_memcmp_clean=no + ac_cv_func_memcmp_working=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -main() +int +main () { - char c0 = 0x40, c1 = 0x80, c2 = 0x81; - exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1); -} -EOF -if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_func_memcmp_clean=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_memcmp_clean=no -fi -rm -fr conftest* -fi + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = 0x40, c1 = 0x80, c2 = 0x81; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + exit (1); -fi + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 0) + exit (1); + } + exit (0); + } -echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 -test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_memcmp_working=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_func_memcmp_working=no +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext" ############################################### # test for where we get crypt() from + for ac_func in crypt do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4446: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done if test x"$ac_cv_func_crypt" = x"no"; then - echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4500: checking for crypt in -lcrypt" >&5 -ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 +echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 +if test "${ac_cv_lib_crypt_crypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char crypt(); - -int main() { -crypt() -; return 0; } -EOF -if { (eval echo configure:4519: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char crypt (); +int +main () +{ +crypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_crypt_crypt=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_crypt_crypt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 +echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 +if test $ac_cv_lib_crypt_crypt = yes; then AUTHLIBS="$AUTHLIBS -lcrypt"; - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_CRYPT 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi fi @@ -4547,230 +9187,487 @@ fi test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from -echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4552: checking whether to use readline" >&5 +echo "$as_me:$LINENO: checking whether to use readline" >&5 +echo $ECHO_N "checking whether to use readline... $ECHO_C" >&6 + # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" case "$with_readline" in yes) - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + + - for ac_hdr in readline.h history.h readline/readline.h +for ac_header in readline.h history.h readline/readline.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4564: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done - for ac_hdr in readline/history.h + +for ac_header in readline/history.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4604: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done - for ac_hdr in readline.h readline/readline.h + + +for ac_header in readline.h readline/readline.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4645: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + for termlib in ncurses curses termcap terminfo termlib; do - echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4678: checking for tgetent in -l${termlib}" >&5 -ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + as_ac_Lib=`echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh` +echo "$as_me:$LINENO: checking for tgetent in -l${termlib}" >&5 +echo $ECHO_N "checking for tgetent in -l${termlib}... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Lib+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-l${termlib} $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char tgetent(); - -int main() { -tgetent() -; return 0; } -EOF -if { (eval echo configure:4697: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char tgetent (); +int +main () +{ +tgetent (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Lib=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 +if test `eval echo '${'$as_ac_Lib'}'` = yes; then TERMLIBS="-l${termlib}"; break -else - echo "$ac_t""no" 1>&6 fi done - echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4719: checking for rl_callback_handler_install in -lreadline" >&5 -ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5 +echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6 +if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $TERMLIBS $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char rl_callback_handler_install(); - -int main() { -rl_callback_handler_install() -; return 0; } -EOF -if { (eval echo configure:4738: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char rl_callback_handler_install (); +int +main () +{ +rl_callback_handler_install (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_readline_rl_callback_handler_install=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_readline_rl_callback_handler_install=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6 +if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then TERMLIBS="-lreadline $TERMLIBS" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBREADLINE 1 -EOF +_ACEOF break else - echo "$ac_t""no" 1>&6 -TERMLIBS= + TERMLIBS= fi -else - echo "$ac_t""no" 1>&6 fi + done ;; no) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; *) - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at # alternate readline path @@ -4781,216 +9678,469 @@ done LDFLAGS="-L$with_readline/lib $LDFLAGS" CPPFLAGS="-I$with_readline/include $CPPFLAGS" - for ac_hdr in readline.h history.h readline/readline.h + + + +for ac_header in readline.h history.h readline/readline.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4789: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done - for ac_hdr in readline/history.h + +for ac_header in readline/history.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4829: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done - for ac_hdr in readline.h readline/readline.h + + +for ac_header in readline.h readline/readline.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4870: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + for termlib in ncurses curses termcap terminfo termlib; do - echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4903: checking for tgetent in -l${termlib}" >&5 -ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + as_ac_Lib=`echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh` +echo "$as_me:$LINENO: checking for tgetent in -l${termlib}" >&5 +echo $ECHO_N "checking for tgetent in -l${termlib}... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Lib+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-l${termlib} $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char tgetent(); - -int main() { -tgetent() -; return 0; } -EOF -if { (eval echo configure:4922: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char tgetent (); +int +main () +{ +tgetent (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Lib=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 +if test `eval echo '${'$as_ac_Lib'}'` = yes; then TERMLIBS="-l${termlib}"; break -else - echo "$ac_t""no" 1>&6 fi done - echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4944: checking for rl_callback_handler_install in -lreadline" >&5 -ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5 +echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6 +if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $TERMLIBS $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char rl_callback_handler_install(); - -int main() { -rl_callback_handler_install() -; return 0; } -EOF -if { (eval echo configure:4963: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char rl_callback_handler_install (); +int +main () +{ +rl_callback_handler_install (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_readline_rl_callback_handler_install=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_readline_rl_callback_handler_install=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6 +if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then TERMLDFLAGS="-L$with_readline/lib" TERMCPPFLAGS="-I$with_readline/include" CPPFLAGS="-I$with_readline/include $CPPFLAGS" TERMLIBS="-lreadline $TERMLIBS" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBREADLINE 1 -EOF +_ACEOF break else - echo "$ac_t""no" 1>&6 -TERMLIBS= CPPFLAGS=$_cppflags + TERMLIBS= CPPFLAGS=$_cppflags fi -else - echo "$ac_t""no" 1>&6 fi + done @@ -4998,57 +10148,71 @@ done ;; esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; # The readline API changed slightly from readline3 to readline4, so # code will generate warnings on one of them unless we have a few # special cases. -echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 -echo "configure:5013: checking for rl_completion_matches in -lreadline" >&5 -ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5 +echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6 +if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $TERMLIBS $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char rl_completion_matches(); - -int main() { -rl_completion_matches() -; return 0; } -EOF -if { (eval echo configure:5032: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + builtin and then its argument prototype would still apply. */ +char rl_completion_matches (); +int +main () +{ +rl_completion_matches (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_readline_rl_completion_matches=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_readline_rl_completion_matches=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6 +if test $ac_cv_lib_readline_rl_completion_matches = yes; then + +cat >>confdefs.h <<\_ACEOF #define HAVE_NEW_LIBREADLINE 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi @@ -5058,430 +10222,536 @@ fi # libsocket.so which has a bad implementation of gethostbyname (it # only looks in /etc/hosts), so we only look for -lsocket if we need # it. + for ac_func in connect do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5065: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done if test x"$ac_cv_func_connect" = x"no"; then case "$LIBS" in *-lnsl*) ;; - *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 -echo "configure:5121: checking for printf in -lnsl_s" >&5 -ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for printf in -lnsl_s" >&5 +echo $ECHO_N "checking for printf in -lnsl_s... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_s_printf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl_s $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char printf(); - -int main() { -printf() -; return 0; } -EOF -if { (eval echo configure:5140: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_s_printf=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_s_printf=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_printf" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_s_printf" >&6 +if test $ac_cv_lib_nsl_s_printf = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL_S 1 +_ACEOF LIBS="-lnsl_s $LIBS" -else - echo "$ac_t""no" 1>&6 fi ;; esac case "$LIBS" in *-lnsl*) ;; - *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:5171: checking for printf in -lnsl" >&5 -ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for printf in -lnsl" >&5 +echo $ECHO_N "checking for printf in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_printf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char printf(); - -int main() { -printf() -; return 0; } -EOF -if { (eval echo configure:5190: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_printf=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_printf=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_printf" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_printf" >&6 +if test $ac_cv_lib_nsl_printf = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF LIBS="-lnsl $LIBS" -else - echo "$ac_t""no" 1>&6 fi ;; esac case "$LIBS" in *-lsocket*) ;; - *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:5221: checking for connect in -lsocket" >&5 -ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); - -int main() { -connect() -; return 0; } -EOF -if { (eval echo configure:5240: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_socket_connect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +if test $ac_cv_lib_socket_connect = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF LIBS="-lsocket $LIBS" -else - echo "$ac_t""no" 1>&6 fi ;; esac case "$LIBS" in *-linet*) ;; - *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:5271: checking for connect in -linet" >&5 -ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for connect in -linet" >&5 +echo $ECHO_N "checking for connect in -linet... $ECHO_C" >&6 +if test "${ac_cv_lib_inet_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); - -int main() { -connect() -; return 0; } -EOF -if { (eval echo configure:5290: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_inet_connect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_inet_connect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_connect" >&6 +if test $ac_cv_lib_inet_connect = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBINET 1 +_ACEOF LIBS="-linet $LIBS" -else - echo "$ac_t""no" 1>&6 fi ;; esac - if test x"$ac_cv_lib_socket_connect" = x"yes" || + if test x"$ac_cv_lib_socket_connect" = x"yes" || test x"$ac_cv_lib_inet_connect" = x"yes"; then # ac_cv_func_connect=yes # don't! it would cause AC_CHECK_FUNC to succeed next time configure is run - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_CONNECT 1 -EOF +_ACEOF fi fi ############################################### # test for where we get get_yp_default_domain() from + for ac_func in yp_get_default_domain do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5334: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then - echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5388: checking for yp_get_default_domain in -lnsl" >&5 -ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for yp_get_default_domain in -lnsl" >&5 +echo $ECHO_N "checking for yp_get_default_domain in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_yp_get_default_domain+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char yp_get_default_domain(); - -int main() { -yp_get_default_domain() -; return 0; } -EOF -if { (eval echo configure:5407: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char yp_get_default_domain (); +int +main () +{ +yp_get_default_domain (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_yp_get_default_domain=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_yp_get_default_domain=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_yp_get_default_domain" >&6 +if test $ac_cv_lib_nsl_yp_get_default_domain = yes; then LIBS="$LIBS -lnsl"; - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_YP_GET_DEFAULT_DOMAIN 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi - + fi # Check if we have execl, if not we need to compile smbrun. + for ac_func in execl do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5437: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -5491,1437 +10761,1979 @@ else RUNPROG="" fi + + + + + + + + + + + + + + + + + + + for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64 do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5498: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + + + + + for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5553: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + + + + + for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5608: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + + + for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5663: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + + for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5718: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + + + + for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5773: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + + for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5828: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5883: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + + + + + for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5938: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + for ac_func in syslog vsyslog getgrouplist do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5993: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done # setbuffer is needed for smbtorture + for ac_func in setbuffer do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6049: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done # syscall() is needed for smbwrapper. + for ac_func in syscall do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6106: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6162: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6217: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + for ac_func in __getcwd _getcwd do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6272: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + for ac_func in __xstat __fxstat __lxstat do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6327: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + for ac_func in _stat _lstat _fstat __stat __lstat __fstat do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6382: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + + for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6437: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6492: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + for ac_func in getdents _getdents __getdents _lseek __lseek _read __read do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6547: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + for ac_func in _write __write _fork __fork do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6602: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64 do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6657: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + + for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64 do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6712: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + for ac_func in pread _pread __pread pread64 _pread64 __pread64 do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6767: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + + + for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64 do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6822: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + + + + for ac_func in open64 _open64 __open64 creat64 do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6877: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:6905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -6931,10 +12743,10 @@ done # if test x$ac_cv_func_stat64 = xno ; then - echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6936: checking for stat64 in " >&5 - cat > conftest.$ac_ext <" >&5 +echo $ECHO_N "checking for stat64 in ... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -6942,32 +12754,47 @@ echo "configure:6936: checking for stat64 in " >&5 #endif #include -int main() { +int +main () +{ struct stat64 st64; exit(stat64(".",&st64)); -; return 0; } -EOF -if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_stat64=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* - echo "$ac_t""$ac_cv_func_stat64" 1>&6 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + echo "$as_me:$LINENO: result: $ac_cv_func_stat64" >&5 +echo "${ECHO_T}$ac_cv_func_stat64" >&6 if test x$ac_cv_func_stat64 = xyes ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STAT64 1 -EOF +_ACEOF fi fi if test x$ac_cv_func_lstat64 = xno ; then - echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6969: checking for lstat64 in " >&5 - cat > conftest.$ac_ext <" >&5 +echo $ECHO_N "checking for lstat64 in ... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -6975,32 +12802,47 @@ echo "configure:6969: checking for lstat64 in " >&5 #endif #include -int main() { +int +main () +{ struct stat64 st64; exit(lstat64(".",&st64)); -; return 0; } -EOF -if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_lstat64=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* - echo "$ac_t""$ac_cv_func_lstat64" 1>&6 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + echo "$as_me:$LINENO: result: $ac_cv_func_lstat64" >&5 +echo "${ECHO_T}$ac_cv_func_lstat64" >&6 if test x$ac_cv_func_lstat64 = xyes ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LSTAT64 1 -EOF +_ACEOF fi fi if test x$ac_cv_func_fstat64 = xno ; then - echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:7002: checking for fstat64 in " >&5 - cat > conftest.$ac_ext <" >&5 +echo $ECHO_N "checking for fstat64 in ... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -7008,74 +12850,101 @@ echo "configure:7002: checking for fstat64 in " >&5 #endif #include -int main() { +int +main () +{ struct stat64 st64; exit(fstat64(0,&st64)); -; return 0; } -EOF -if { (eval echo configure:7016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_fstat64=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* - echo "$ac_t""$ac_cv_func_fstat64" 1>&6 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + echo "$as_me:$LINENO: result: $ac_cv_func_fstat64" >&5 +echo "${ECHO_T}$ac_cv_func_fstat64" >&6 if test x$ac_cv_func_fstat64 = xyes ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_FSTAT64 1 -EOF +_ACEOF fi fi ##################################### # we might need the resolv library on some systems -echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:7036: checking for dn_expand in -lresolv" >&5 -ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5 +echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6 +if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dn_expand(); - -int main() { -dn_expand() -; return 0; } -EOF -if { (eval echo configure:7055: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_resolv_dn_expand=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_resolv_dn_expand=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_dn_expand" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6 +if test $ac_cv_lib_resolv_dn_expand = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRESOLV 1 +_ACEOF LIBS="-lresolv $LIBS" -else - echo "$ac_t""no" 1>&6 fi @@ -7086,160 +12955,202 @@ fi # case "$LIBS" in - *-lsecurity*) for ac_func in putprpwnam + *-lsecurity*) +for ac_func in putprpwnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7093: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + fi done ;; - *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7146: checking for putprpwnam in -lsecurity" >&5 -ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for putprpwnam in -lsecurity" >&5 +echo $ECHO_N "checking for putprpwnam in -lsecurity... $ECHO_C" >&6 +if test "${ac_cv_lib_security_putprpwnam+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsecurity $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char putprpwnam(); + builtin and then its argument prototype would still apply. */ +char putprpwnam (); +int +main () +{ +putprpwnam (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_security_putprpwnam=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_security_putprpwnam=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_security_putprpwnam" >&5 +echo "${ECHO_T}$ac_cv_lib_security_putprpwnam" >&6 +if test $ac_cv_lib_security_putprpwnam = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSECURITY 1 +_ACEOF -int main() { -putprpwnam() -; return 0; } -EOF -if { (eval echo configure:7165: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lsecurity $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in putprpwnam +for ac_func in putprpwnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7195: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -7247,160 +13158,202 @@ done esac case "$LIBS" in - *-lsec*) for ac_func in putprpwnam + *-lsec*) +for ac_func in putprpwnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7254: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ;; - *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:7307: checking for putprpwnam in -lsec" >&5 -ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for putprpwnam in -lsec" >&5 +echo $ECHO_N "checking for putprpwnam in -lsec... $ECHO_C" >&6 +if test "${ac_cv_lib_sec_putprpwnam+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char putprpwnam(); + builtin and then its argument prototype would still apply. */ +char putprpwnam (); +int +main () +{ +putprpwnam (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_sec_putprpwnam=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_sec_putprpwnam=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_putprpwnam" >&5 +echo "${ECHO_T}$ac_cv_lib_sec_putprpwnam" >&6 +if test $ac_cv_lib_sec_putprpwnam = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSEC 1 +_ACEOF -int main() { -putprpwnam() -; return 0; } -EOF -if { (eval echo configure:7326: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lsec $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in putprpwnam +for ac_func in putprpwnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7356: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -7409,160 +13362,202 @@ done case "$LIBS" in - *-lsecurity*) for ac_func in set_auth_parameters + *-lsecurity*) +for ac_func in set_auth_parameters do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7416: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ;; - *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7469: checking for set_auth_parameters in -lsecurity" >&5 -ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for set_auth_parameters in -lsecurity" >&5 +echo $ECHO_N "checking for set_auth_parameters in -lsecurity... $ECHO_C" >&6 +if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsecurity $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char set_auth_parameters(); + builtin and then its argument prototype would still apply. */ +char set_auth_parameters (); +int +main () +{ +set_auth_parameters (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_security_set_auth_parameters=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_security_set_auth_parameters=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_security_set_auth_parameters" >&5 +echo "${ECHO_T}$ac_cv_lib_security_set_auth_parameters" >&6 +if test $ac_cv_lib_security_set_auth_parameters = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSECURITY 1 +_ACEOF -int main() { -set_auth_parameters() -; return 0; } -EOF -if { (eval echo configure:7488: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lsecurity $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in set_auth_parameters +for ac_func in set_auth_parameters do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7518: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -7570,160 +13565,202 @@ done esac case "$LIBS" in - *-lsec*) for ac_func in set_auth_parameters + *-lsec*) +for ac_func in set_auth_parameters do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7577: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ;; - *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7630: checking for set_auth_parameters in -lsec" >&5 -ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for set_auth_parameters in -lsec" >&5 +echo $ECHO_N "checking for set_auth_parameters in -lsec... $ECHO_C" >&6 +if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char set_auth_parameters(); + builtin and then its argument prototype would still apply. */ +char set_auth_parameters (); +int +main () +{ +set_auth_parameters (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_sec_set_auth_parameters=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_sec_set_auth_parameters=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_set_auth_parameters" >&5 +echo "${ECHO_T}$ac_cv_lib_sec_set_auth_parameters" >&6 +if test $ac_cv_lib_sec_set_auth_parameters = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSEC 1 +_ACEOF -int main() { -set_auth_parameters() -; return 0; } -EOF -if { (eval echo configure:7649: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lsec $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in set_auth_parameters +for ac_func in set_auth_parameters do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7679: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -7733,160 +13770,202 @@ done # UnixWare 7.x has its getspnam in -lgen case "$LIBS" in - *-lgen*) for ac_func in getspnam + *-lgen*) +for ac_func in getspnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7740: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ;; - *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7793: checking for getspnam in -lgen" >&5 -ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5 +echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6 +if test "${ac_cv_lib_gen_getspnam+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lgen $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getspnam(); + builtin and then its argument prototype would still apply. */ +char getspnam (); +int +main () +{ +getspnam (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gen_getspnam=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_gen_getspnam=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5 +echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6 +if test $ac_cv_lib_gen_getspnam = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGEN 1 +_ACEOF -int main() { -getspnam() -; return 0; } -EOF -if { (eval echo configure:7812: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lgen $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in getspnam +for ac_func in getspnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7842: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -7895,160 +13974,202 @@ done case "$LIBS" in - *-lsecurity*) for ac_func in getspnam + *-lsecurity*) +for ac_func in getspnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7902: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ;; - *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7955: checking for getspnam in -lsecurity" >&5 -ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for getspnam in -lsecurity" >&5 +echo $ECHO_N "checking for getspnam in -lsecurity... $ECHO_C" >&6 +if test "${ac_cv_lib_security_getspnam+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsecurity $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getspnam(); + builtin and then its argument prototype would still apply. */ +char getspnam (); +int +main () +{ +getspnam (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_security_getspnam=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_security_getspnam=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_security_getspnam" >&5 +echo "${ECHO_T}$ac_cv_lib_security_getspnam" >&6 +if test $ac_cv_lib_security_getspnam = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSECURITY 1 +_ACEOF -int main() { -getspnam() -; return 0; } -EOF -if { (eval echo configure:7974: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lsecurity $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in getspnam +for ac_func in getspnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8004: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -8056,160 +14177,202 @@ done esac case "$LIBS" in - *-lsec*) for ac_func in getspnam + *-lsec*) +for ac_func in getspnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8063: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:8091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ;; - *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:8116: checking for getspnam in -lsec" >&5 -ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for getspnam in -lsec" >&5 +echo $ECHO_N "checking for getspnam in -lsec... $ECHO_C" >&6 +if test "${ac_cv_lib_sec_getspnam+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getspnam(); + builtin and then its argument prototype would still apply. */ +char getspnam (); +int +main () +{ +getspnam (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_sec_getspnam=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_sec_getspnam=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5 +echo "${ECHO_T}$ac_cv_lib_sec_getspnam" >&6 +if test $ac_cv_lib_sec_getspnam = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSEC 1 +_ACEOF -int main() { -getspnam() -; return 0; } -EOF -if { (eval echo configure:8135: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lsec $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in getspnam +for ac_func in getspnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8165: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:8193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -8218,160 +14381,202 @@ done case "$LIBS" in - *-lsecurity*) for ac_func in bigcrypt + *-lsecurity*) +for ac_func in bigcrypt do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8225: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ;; - *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:8278: checking for bigcrypt in -lsecurity" >&5 -ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for bigcrypt in -lsecurity" >&5 +echo $ECHO_N "checking for bigcrypt in -lsecurity... $ECHO_C" >&6 +if test "${ac_cv_lib_security_bigcrypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsecurity $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char bigcrypt(); + builtin and then its argument prototype would still apply. */ +char bigcrypt (); +int +main () +{ +bigcrypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_security_bigcrypt=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_security_bigcrypt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_security_bigcrypt" >&5 +echo "${ECHO_T}$ac_cv_lib_security_bigcrypt" >&6 +if test $ac_cv_lib_security_bigcrypt = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSECURITY 1 +_ACEOF -int main() { -bigcrypt() -; return 0; } -EOF -if { (eval echo configure:8297: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lsecurity $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in bigcrypt +for ac_func in bigcrypt do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8327: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:8355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -8379,160 +14584,202 @@ done esac case "$LIBS" in - *-lsec*) for ac_func in bigcrypt + *-lsec*) +for ac_func in bigcrypt do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8386: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:8414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ;; - *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8439: checking for bigcrypt in -lsec" >&5 -ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5 +echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6 +if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char bigcrypt(); + builtin and then its argument prototype would still apply. */ +char bigcrypt (); +int +main () +{ +bigcrypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_sec_bigcrypt=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_sec_bigcrypt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5 +echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6 +if test $ac_cv_lib_sec_bigcrypt = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSEC 1 +_ACEOF -int main() { -bigcrypt() -; return 0; } -EOF -if { (eval echo configure:8458: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lsec $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in bigcrypt +for ac_func in bigcrypt do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8488: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -8541,160 +14788,202 @@ done case "$LIBS" in - *-lsecurity*) for ac_func in getprpwnam + *-lsecurity*) +for ac_func in getprpwnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8548: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:8576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ;; - *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8601: checking for getprpwnam in -lsecurity" >&5 -ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5 +echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6 +if test "${ac_cv_lib_security_getprpwnam+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsecurity $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getprpwnam(); + builtin and then its argument prototype would still apply. */ +char getprpwnam (); +int +main () +{ +getprpwnam (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_security_getprpwnam=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_security_getprpwnam=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5 +echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6 +if test $ac_cv_lib_security_getprpwnam = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSECURITY 1 +_ACEOF -int main() { -getprpwnam() -; return 0; } -EOF -if { (eval echo configure:8620: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lsecurity $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in getprpwnam +for ac_func in getprpwnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8650: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:8678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -8702,160 +14991,202 @@ done esac case "$LIBS" in - *-lsec*) for ac_func in getprpwnam + *-lsec*) +for ac_func in getprpwnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8709: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:8737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ;; - *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8762: checking for getprpwnam in -lsec" >&5 -ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5 +echo $ECHO_N "checking for getprpwnam in -lsec... $ECHO_C" >&6 +if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getprpwnam(); + builtin and then its argument prototype would still apply. */ +char getprpwnam (); +int +main () +{ +getprpwnam (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_sec_getprpwnam=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_sec_getprpwnam=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5 +echo "${ECHO_T}$ac_cv_lib_sec_getprpwnam" >&6 +if test $ac_cv_lib_sec_getprpwnam = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSEC 1 +_ACEOF -int main() { -getprpwnam() -; return 0; } -EOF -if { (eval echo configure:8781: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + LIBS="-lsec $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in getprpwnam +for ac_func in getprpwnam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8811: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:8839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -8878,28 +15209,28 @@ POBAD_CC="#" SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" -echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8883: checking ability to build shared libraries" >&5 +echo "$as_me:$LINENO: checking ability to build shared libraries" >&5 +echo $ECHO_N "checking ability to build shared libraries... $ECHO_C" >&6 # and these are for particular systems case "$host_os" in - *linux*) cat >> confdefs.h <<\EOF + *linux*) cat >>confdefs.h <<\_ACEOF #define LINUX 1 -EOF +_ACEOF BLDSHARED="true" - LDSHFLAGS="-shared" + LDSHFLAGS="-shared" DYNEXP="-Wl,--export-dynamic" PICFLAG="-fPIC" SONAMEFLAG="-Wl,-soname=" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_ST_BLOCKSIZE 512 -EOF +_ACEOF ;; - *solaris*) cat >> confdefs.h <<\EOF + *solaris*) cat >>confdefs.h <<\_ACEOF #define SUNOS5 1 -EOF +_ACEOF BLDSHARED="true" LDSHFLAGS="-G" @@ -8911,20 +15242,20 @@ EOF fi else PICFLAG="-KPIC" - ## ${CFLAGS} added for building 64-bit shared + ## ${CFLAGS} added for building 64-bit shared ## libs using Sun's Compiler LDSHFLAGS="-G \${CFLAGS}" POBAD_CC="" PICSUFFIX="po.o" fi - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_ST_BLOCKSIZE 512 -EOF +_ACEOF ;; - *sunos*) cat >> confdefs.h <<\EOF + *sunos*) cat >>confdefs.h <<\_ACEOF #define SUNOS4 1 -EOF +_ACEOF BLDSHARED="true" LDSHFLAGS="-G" @@ -8936,9 +15267,9 @@ EOF DYNEXP="-Wl,--export-dynamic" SONAMEFLAG="-Wl,-soname," PICFLAG="-fPIC -DPIC" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_ST_BLOCKSIZE 512 -EOF +_ACEOF ;; *openbsd*) BLDSHARED="true" @@ -8946,19 +15277,19 @@ EOF DYNEXP="-Wl,-Bdynamic" SONAMEFLAG="-Wl,-soname," PICFLAG="-fPIC" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_ST_BLOCKSIZE 512 -EOF +_ACEOF ;; - *irix*) cat >> confdefs.h <<\EOF + *irix*) cat >>confdefs.h <<\_ACEOF #define IRIX 1 -EOF +_ACEOF case "$host_os" in - *irix6*) cat >> confdefs.h <<\EOF + *irix6*) cat >>confdefs.h <<\_ACEOF #define IRIX6 1 -EOF +_ACEOF ;; esac @@ -8969,17 +15300,17 @@ EOF SHLD="\${LD}" if test "${GCC}" = "yes"; then PICFLAG="-fPIC" - else + else PICFLAG="-KPIC" fi - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_ST_BLOCKSIZE 512 -EOF +_ACEOF ;; - *aix*) cat >> confdefs.h <<\EOF + *aix*) cat >>confdefs.h <<\_ACEOF #define AIX 1 -EOF +_ACEOF BLDSHARED="true" LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry" @@ -8990,14 +15321,14 @@ EOF CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000" fi - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_ST_BLOCKSIZE DEV_BSIZE -EOF +_ACEOF ;; - *hpux*) cat >> confdefs.h <<\EOF + *hpux*) cat >>confdefs.h <<\_ACEOF #define HPUX 1 -EOF +_ACEOF SHLIBEXT="sl" # Use special PIC flags for the native HP-UX compiler. @@ -9009,116 +15340,135 @@ EOF PICFLAG="+z" fi DYNEXP="-Wl,-E" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_ST_BLOCKSIZE 8192 -EOF +_ACEOF ;; - *qnx*) cat >> confdefs.h <<\EOF + *qnx*) cat >>confdefs.h <<\_ACEOF #define QNX 1 -EOF +_ACEOF ;; - *osf*) cat >> confdefs.h <<\EOF + *osf*) cat >>confdefs.h <<\_ACEOF #define OSF1 1 -EOF +_ACEOF BLDSHARED="true" LDSHFLAGS="-shared" SONAMEFLAG="-Wl,-soname," PICFLAG="-fPIC" ;; - *sco*) cat >> confdefs.h <<\EOF + *sco*) cat >>confdefs.h <<\_ACEOF #define SCO 1 -EOF +_ACEOF ;; - *unixware*) cat >> confdefs.h <<\EOF + *unixware*) cat >>confdefs.h <<\_ACEOF #define UNIXWARE 1 -EOF +_ACEOF BLDSHARED="true" LDSHFLAGS="-shared" SONAMEFLAG="-Wl,-soname," PICFLAG="-KPIC" ;; - *next2*) cat >> confdefs.h <<\EOF + *next2*) cat >>confdefs.h <<\_ACEOF #define NEXT2 1 -EOF +_ACEOF ;; *dgux*) # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9051: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ROFF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ROFF"; then ac_cv_prog_ROFF="$ROFF" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_ROFF="groff -etpsR -Tascii -man" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ROFF="groff -etpsR -Tascii -man" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -ROFF="$ac_cv_prog_ROFF" +ROFF=$ac_cv_prog_ROFF if test -n "$ROFF"; then - echo "$ac_t""$ROFF" 1>&6 + echo "$as_me:$LINENO: result: $ROFF" >&5 +echo "${ECHO_T}$ROFF" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi ;; - *sysv4*) + *sysv4*) cat >>confdefs.h <<\_ACEOF +#define SYSV 1 +_ACEOF + case "$host" in *-univel-*) if test "$GCC" != yes ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_MEMSET 1 -EOF +_ACEOF fi LDSHFLAGS="-G" DYNEXP="-Bexport" ;; - *mips-sni-sysv4*) cat >> confdefs.h <<\EOF + *mips-sni-sysv4*) cat >>confdefs.h <<\_ACEOF #define RELIANTUNIX 1 -EOF +_ACEOF ;; esac ;; - *sysv5*) + *sysv5*) cat >>confdefs.h <<\_ACEOF +#define SYSV 1 +_ACEOF + if test "$GCC" != yes ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_MEMSET 1 -EOF +_ACEOF fi LDSHFLAGS="-G" ;; + *sysv*) cat >>confdefs.h <<\_ACEOF +#define SYSV 1 +_ACEOF +;; esac -echo "$ac_t""$BLDSHARED" 1>&6 -echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:9108: checking linker flags for shared libraries" >&5 -echo "$ac_t""$LDSHFLAGS" 1>&6 -echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:9111: checking compiler flags for position-independent code" >&5 -echo "$ac_t""$PICFLAGS" 1>&6 +echo "$as_me:$LINENO: result: $BLDSHARED" >&5 +echo "${ECHO_T}$BLDSHARED" >&6 +echo "$as_me:$LINENO: checking linker flags for shared libraries" >&5 +echo $ECHO_N "checking linker flags for shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $LDSHFLAGS" >&5 +echo "${ECHO_T}$LDSHFLAGS" >&6 +echo "$as_me:$LINENO: checking compiler flags for position-independent code" >&5 +echo $ECHO_N "checking compiler flags for position-independent code... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $PICFLAGS" >&5 +echo "${ECHO_T}$PICFLAGS" >&6 ####################################################### # test whether building a shared library actually works if test $BLDSHARED = true; then -echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6 -echo "configure:9118: checking whether building shared libraries actually works" >&5 -if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether building shared libraries actually works" >&5 +echo $ECHO_N "checking whether building shared libraries actually works... $ECHO_C" >&6 +if test "${ac_cv_shlib_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + ac_cv_shlib_works=no # try building a trivial shared library $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c && @@ -9127,8 +15477,8 @@ else rm -f shlib.so shlib.po fi - -echo "$ac_t""$ac_cv_shlib_works" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_shlib_works" >&5 +echo "${ECHO_T}$ac_cv_shlib_works" >&6 if test $ac_cv_shlib_works = no; then BLDSHARED=false fi @@ -9144,40 +15494,49 @@ fi ################ -echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:9149: checking for long long" >&5 -if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6 +if test "${samba_cv_have_longlong+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } -EOF -if { (eval echo configure:9163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_have_longlong=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_have_longlong=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_have_longlong=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_have_longlong" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_have_longlong" >&5 +echo "${ECHO_T}$samba_cv_have_longlong" >&6 if test x"$samba_cv_have_longlong" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LONGLONG 1 -EOF +_ACEOF fi @@ -9185,90 +15544,112 @@ fi # Check if the compiler supports the LL prefix on long long integers. # AIX needs this. -echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:9190: checking for LL suffix on long long integers" >&5 -if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for LL suffix on long long integers" >&5 +echo $ECHO_N "checking for LL suffix on long long integers... $ECHO_C" >&6 +if test "${samba_cv_compiler_supports_ll+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ long long i = 0x8000000000LL -; return 0; } -EOF -if { (eval echo configure:9203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_compiler_supports_ll=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_compiler_supports_ll=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_compiler_supports_ll=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_compiler_supports_ll" >&5 +echo "${ECHO_T}$samba_cv_compiler_supports_ll" >&6 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define COMPILER_SUPPORTS_LL 1 -EOF +_ACEOF fi - -echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:9225: checking for 64 bit off_t" >&5 -if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking for 64 bit off_t" >&5 +echo $ECHO_N "checking for 64 bit off_t... $ECHO_C" >&6 +if test "${samba_cv_SIZEOF_OFF_T+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } -EOF -if { (eval echo configure:9240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_SIZEOF_OFF_T=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_SIZEOF_OFF_T=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_SIZEOF_OFF_T=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_SIZEOF_OFF_T" >&5 +echo "${ECHO_T}$samba_cv_SIZEOF_OFF_T" >&6 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SIZEOF_OFF_T 8 -EOF +_ACEOF fi -echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:9263: checking for off64_t" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 +if test "${samba_cv_HAVE_OFF64_T+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -9277,78 +15658,96 @@ else #include #include main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } -EOF -if { (eval echo configure:9282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_OFF64_T=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_OFF64_T=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_OFF64_T=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_OFF64_T" >&5 +echo "${ECHO_T}$samba_cv_HAVE_OFF64_T" >&6 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_OFF64_T 1 -EOF +_ACEOF fi -echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:9305: checking for 64 bit ino_t" >&5 -if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for 64 bit ino_t" >&5 +echo $ECHO_N "checking for 64 bit ino_t... $ECHO_C" >&6 +if test "${samba_cv_SIZEOF_INO_T+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } -EOF -if { (eval echo configure:9320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_SIZEOF_INO_T=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_SIZEOF_INO_T=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_SIZEOF_INO_T=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_SIZEOF_INO_T" >&5 +echo "${ECHO_T}$samba_cv_SIZEOF_INO_T" >&6 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SIZEOF_INO_T 8 -EOF +_ACEOF fi -echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:9343: checking for ino64_t" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ino64_t" >&5 +echo $ECHO_N "checking for ino64_t... $ECHO_C" >&6 +if test "${samba_cv_HAVE_INO64_T+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -9357,40 +15756,49 @@ else #include #include main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } -EOF -if { (eval echo configure:9362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_INO64_T=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_INO64_T=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_INO64_T=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_INO64_T" >&5 +echo "${ECHO_T}$samba_cv_HAVE_INO64_T" >&6 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_INO64_T 1 -EOF +_ACEOF fi -echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:9385: checking for dev64_t" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for dev64_t" >&5 +echo $ECHO_N "checking for dev64_t... $ECHO_C" >&6 +if test "${samba_cv_HAVE_DEV64_T+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -9399,37 +15807,46 @@ else #include #include main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } -EOF -if { (eval echo configure:9404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_DEV64_T=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_DEV64_T=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_DEV64_T=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_DEV64_T" >&5 +echo "${ECHO_T}$samba_cv_HAVE_DEV64_T" >&6 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_DEV64_T 1 -EOF +_ACEOF fi -echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9427: checking for struct dirent64" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 +if test "${samba_cv_HAVE_STRUCT_DIRENT64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -9437,41 +15854,54 @@ cat > conftest.$ac_ext < #include -int main() { +int +main () +{ struct dirent64 de; -; return 0; } -EOF -if { (eval echo configure:9445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_STRUCT_DIRENT64=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_STRUCT_DIRENT64=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_STRUCT_DIRENT64=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_STRUCT_DIRENT64" >&5 +echo "${ECHO_T}$samba_cv_HAVE_STRUCT_DIRENT64" >&6 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_DIRENT64 1 -EOF +_ACEOF fi -echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9466: checking for major macro" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for major macro" >&5 +echo $ECHO_N "checking for major macro... $ECHO_C" >&6 +if test "${samba_cv_HAVE_DEVICE_MAJOR_FN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -9479,40 +15909,49 @@ else #endif #include main() { dev_t dev; int i = major(dev); return 0; } -EOF -if { (eval echo configure:9484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_DEVICE_MAJOR_FN=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_DEVICE_MAJOR_FN=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_DEVICE_MAJOR_FN" >&5 +echo "${ECHO_T}$samba_cv_HAVE_DEVICE_MAJOR_FN" >&6 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_MAJOR_FN 1 -EOF +_ACEOF fi -echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9507: checking for minor macro" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for minor macro" >&5 +echo $ECHO_N "checking for minor macro... $ECHO_C" >&6 +if test "${samba_cv_HAVE_DEVICE_MINOR_FN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -9520,296 +15959,388 @@ else #endif #include main() { dev_t dev; int i = minor(dev); return 0; } -EOF -if { (eval echo configure:9525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_DEVICE_MINOR_FN=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_DEVICE_MINOR_FN=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_DEVICE_MINOR_FN=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_DEVICE_MINOR_FN" >&5 +echo "${ECHO_T}$samba_cv_HAVE_DEVICE_MINOR_FN" >&6 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_MINOR_FN 1 -EOF +_ACEOF fi -echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9548: checking for unsigned char" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for unsigned char" >&5 +echo $ECHO_N "checking for unsigned char... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UNSIGNED_CHAR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include main() { char c; c=250; exit((c > 0)?0:1); } -EOF -if { (eval echo configure:9562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UNSIGNED_CHAR=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_UNSIGNED_CHAR=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_UNSIGNED_CHAR=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UNSIGNED_CHAR" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UNSIGNED_CHAR" >&6 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UNSIGNED_CHAR 1 -EOF +_ACEOF fi -echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9585: checking for sin_len in sock" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for sin_len in sock" >&5 +echo $ECHO_N "checking for sin_len in sock... $ECHO_C" >&6 +if test "${samba_cv_HAVE_SOCK_SIN_LEN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include #include -int main() { +int +main () +{ struct sockaddr_in sock; sock.sin_len = sizeof(sock); -; return 0; } -EOF -if { (eval echo configure:9600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_SOCK_SIN_LEN=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_SOCK_SIN_LEN=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_SOCK_SIN_LEN=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_SOCK_SIN_LEN" >&5 +echo "${ECHO_T}$samba_cv_HAVE_SOCK_SIN_LEN" >&6 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SOCK_SIN_LEN 1 -EOF +_ACEOF fi -echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9621: checking whether seekdir returns void" >&5 -if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether seekdir returns void" >&5 +echo $ECHO_N "checking whether seekdir returns void... $ECHO_C" >&6 +if test "${samba_cv_SEEKDIR_RETURNS_VOID+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include void seekdir(DIR *d, long loc) { return; } -int main() { +int +main () +{ return 0; -; return 0; } -EOF -if { (eval echo configure:9636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_SEEKDIR_RETURNS_VOID=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_SEEKDIR_RETURNS_VOID=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_SEEKDIR_RETURNS_VOID=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_SEEKDIR_RETURNS_VOID" >&5 +echo "${ECHO_T}$samba_cv_SEEKDIR_RETURNS_VOID" >&6 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SEEKDIR_RETURNS_VOID 1 -EOF +_ACEOF fi -echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9657: checking for __FILE__ macro" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for __FILE__ macro" >&5 +echo $ECHO_N "checking for __FILE__ macro... $ECHO_C" >&6 +if test "${samba_cv_HAVE_FILE_MACRO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ printf("%s\n", __FILE__); -; return 0; } -EOF -if { (eval echo configure:9670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_FILE_MACRO=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_FILE_MACRO=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_FILE_MACRO=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_FILE_MACRO" >&5 +echo "${ECHO_T}$samba_cv_HAVE_FILE_MACRO" >&6 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_FILE_MACRO 1 -EOF +_ACEOF fi -echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9691: checking for __FUNCTION__ macro" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for __FUNCTION__ macro" >&5 +echo $ECHO_N "checking for __FUNCTION__ macro... $ECHO_C" >&6 +if test "${samba_cv_HAVE_FUNCTION_MACRO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ printf("%s\n", __FUNCTION__); -; return 0; } -EOF -if { (eval echo configure:9704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_FUNCTION_MACRO=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_FUNCTION_MACRO=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_FUNCTION_MACRO=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_FUNCTION_MACRO" >&5 +echo "${ECHO_T}$samba_cv_HAVE_FUNCTION_MACRO" >&6 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_FUNCTION_MACRO 1 -EOF +_ACEOF fi -echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9725: checking if gettimeofday takes tz argument" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking if gettimeofday takes tz argument" >&5 +echo $ECHO_N "checking if gettimeofday takes tz argument... $ECHO_C" >&6 +if test "${samba_cv_HAVE_GETTIMEOFDAY_TZ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} -EOF -if { (eval echo configure:9741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_GETTIMEOFDAY_TZ=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_GETTIMEOFDAY_TZ=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_GETTIMEOFDAY_TZ=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_GETTIMEOFDAY_TZ" >&5 +echo "${ECHO_T}$samba_cv_HAVE_GETTIMEOFDAY_TZ" >&6 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETTIMEOFDAY_TZ 1 -EOF +_ACEOF fi -echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 -echo "configure:9764: checking for __va_copy" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for __va_copy" >&5 +echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6 +if test "${samba_cv_HAVE_VA_COPY+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include va_list ap1,ap2; -int main() { +int +main () +{ __va_copy(ap1,ap2); -; return 0; } -EOF -if { (eval echo configure:9778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_VA_COPY=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_VA_COPY=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_VA_COPY=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_VA_COPY" >&5 +echo "${ECHO_T}$samba_cv_HAVE_VA_COPY" >&6 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_VA_COPY 1 -EOF +_ACEOF fi -echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9799: checking for C99 vsnprintf" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for C99 vsnprintf" >&5 +echo $ECHO_N "checking for C99 vsnprintf... $ECHO_C" >&6 +if test "${samba_cv_HAVE_C99_VSNPRINTF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -void foo(const char *format, ...) { +void foo(const char *format, ...) { va_list ap; int len; char buf[5]; @@ -9830,672 +16361,893 @@ void foo(const char *format, ...) { } main() { foo("hello"); } -EOF -if { (eval echo configure:9835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_C99_VSNPRINTF=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_C99_VSNPRINTF=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_C99_VSNPRINTF=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_C99_VSNPRINTF" >&5 +echo "${ECHO_T}$samba_cv_HAVE_C99_VSNPRINTF" >&6 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_C99_VSNPRINTF 1 -EOF +_ACEOF fi -echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9858: checking for broken readdir" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for broken readdir" >&5 +echo $ECHO_N "checking for broken readdir... $ECHO_C" >&6 +if test "${samba_cv_HAVE_BROKEN_READDIR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && -di->d_name[0] == 0) exit(0); exit(1);} -EOF -if { (eval echo configure:9875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +di->d_name[0] == 0) exit(0); exit(1);} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_BROKEN_READDIR=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_BROKEN_READDIR=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_BROKEN_READDIR=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_BROKEN_READDIR" >&5 +echo "${ECHO_T}$samba_cv_HAVE_BROKEN_READDIR" >&6 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_BROKEN_READDIR 1 -EOF +_ACEOF fi -echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9898: checking for utimbuf" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for utimbuf" >&5 +echo $ECHO_N "checking for utimbuf... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UTIMBUF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); -; return 0; } -EOF -if { (eval echo configure:9912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UTIMBUF=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UTIMBUF=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UTIMBUF=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UTIMBUF" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UTIMBUF" >&6 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UTIMBUF 1 -EOF +_ACEOF fi + + + + + for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9936: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:9964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done -echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9990: checking for ut_name in utmp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_name in utmp" >&5 +echo $ECHO_N "checking for ut_name in utmp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UT_UT_NAME+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp ut; ut.ut_name[0] = 'a'; -; return 0; } -EOF -if { (eval echo configure:10004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UT_UT_NAME=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UT_UT_NAME=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UT_UT_NAME=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UT_UT_NAME" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UT_UT_NAME" >&6 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_NAME 1 -EOF +_ACEOF -fi +fi -echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:10025: checking for ut_user in utmp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_user in utmp" >&5 +echo $ECHO_N "checking for ut_user in utmp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UT_UT_USER+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp ut; ut.ut_user[0] = 'a'; -; return 0; } -EOF -if { (eval echo configure:10039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UT_UT_USER=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UT_UT_USER=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UT_UT_USER=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UT_UT_USER" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UT_UT_USER" >&6 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_USER 1 -EOF +_ACEOF -fi +fi -echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:10060: checking for ut_id in utmp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_id in utmp" >&5 +echo $ECHO_N "checking for ut_id in utmp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UT_UT_ID+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp ut; ut.ut_id[0] = 'a'; -; return 0; } -EOF -if { (eval echo configure:10074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UT_UT_ID=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UT_UT_ID=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UT_UT_ID=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UT_UT_ID" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UT_UT_ID" >&6 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_ID 1 -EOF +_ACEOF -fi +fi -echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:10095: checking for ut_host in utmp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_host in utmp" >&5 +echo $ECHO_N "checking for ut_host in utmp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UT_UT_HOST+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp ut; ut.ut_host[0] = 'a'; -; return 0; } -EOF -if { (eval echo configure:10109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UT_UT_HOST=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UT_UT_HOST=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UT_UT_HOST=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UT_UT_HOST" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UT_UT_HOST" >&6 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_HOST 1 -EOF +_ACEOF -fi +fi -echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:10130: checking for ut_time in utmp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_time in utmp" >&5 +echo $ECHO_N "checking for ut_time in utmp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UT_UT_TIME+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp ut; time_t t; ut.ut_time = t; -; return 0; } -EOF -if { (eval echo configure:10144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UT_UT_TIME=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UT_UT_TIME=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UT_UT_TIME=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UT_UT_TIME" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UT_UT_TIME" >&6 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_TIME 1 -EOF +_ACEOF -fi +fi -echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:10165: checking for ut_tv in utmp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_tv in utmp" >&5 +echo $ECHO_N "checking for ut_tv in utmp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UT_UT_TV+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp ut; struct timeval tv; ut.ut_tv = tv; -; return 0; } -EOF -if { (eval echo configure:10179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UT_UT_TV=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UT_UT_TV=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UT_UT_TV=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UT_UT_TV" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UT_UT_TV" >&6 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_TV 1 -EOF +_ACEOF -fi +fi -echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:10200: checking for ut_type in utmp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_type in utmp" >&5 +echo $ECHO_N "checking for ut_type in utmp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UT_UT_TYPE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp ut; ut.ut_type = 0; -; return 0; } -EOF -if { (eval echo configure:10214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UT_UT_TYPE=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UT_UT_TYPE=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UT_UT_TYPE=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UT_UT_TYPE" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UT_UT_TYPE" >&6 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_TYPE 1 -EOF +_ACEOF -fi +fi -echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:10235: checking for ut_pid in utmp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_pid in utmp" >&5 +echo $ECHO_N "checking for ut_pid in utmp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UT_UT_PID+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp ut; ut.ut_pid = 0; -; return 0; } -EOF -if { (eval echo configure:10249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UT_UT_PID=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UT_UT_PID=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UT_UT_PID=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UT_UT_PID" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UT_UT_PID" >&6 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_PID 1 -EOF +_ACEOF -fi +fi -echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:10270: checking for ut_exit in utmp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_exit in utmp" >&5 +echo $ECHO_N "checking for ut_exit in utmp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UT_UT_EXIT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp ut; ut.ut_exit.e_exit = 0; -; return 0; } -EOF -if { (eval echo configure:10284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UT_UT_EXIT=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UT_UT_EXIT=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UT_UT_EXIT=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UT_UT_EXIT" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UT_UT_EXIT" >&6 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_EXIT 1 -EOF +_ACEOF -fi +fi -echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:10305: checking for ut_addr in utmp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_addr in utmp" >&5 +echo $ECHO_N "checking for ut_addr in utmp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UT_UT_ADDR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp ut; ut.ut_addr = 0; -; return 0; } -EOF -if { (eval echo configure:10319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UT_UT_ADDR=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UT_UT_ADDR=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UT_UT_ADDR=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UT_UT_ADDR" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UT_UT_ADDR" >&6 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_ADDR 1 -EOF +_ACEOF -fi +fi if test x$ac_cv_func_pututline = xyes ; then - echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:10341: checking whether pututline returns pointer" >&5 -if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking whether pututline returns pointer" >&5 +echo $ECHO_N "checking whether pututline returns pointer... $ECHO_C" >&6 +if test "${samba_cv_PUTUTLINE_RETURNS_UTMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); -; return 0; } -EOF -if { (eval echo configure:10355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_PUTUTLINE_RETURNS_UTMP=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_PUTUTLINE_RETURNS_UTMP=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_PUTUTLINE_RETURNS_UTMP=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_PUTUTLINE_RETURNS_UTMP" >&5 +echo "${ECHO_T}$samba_cv_PUTUTLINE_RETURNS_UTMP" >&6 if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define PUTUTLINE_RETURNS_UTMP 1 -EOF +_ACEOF fi fi -echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:10377: checking for ut_syslen in utmpx" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ut_syslen in utmpx" >&5 +echo $ECHO_N "checking for ut_syslen in utmpx... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UX_UT_SYSLEN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utmpx ux; ux.ut_syslen = 0; -; return 0; } -EOF -if { (eval echo configure:10391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UX_UT_SYSLEN=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UX_UT_SYSLEN=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UX_UT_SYSLEN=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UX_UT_SYSLEN" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UX_UT_SYSLEN" >&6 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UX_UT_SYSLEN 1 -EOF +_ACEOF -fi +fi ################################################# # check for libiconv support -echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6 -echo "configure:10415: checking whether to use libiconv" >&5 +echo "$as_me:$LINENO: checking whether to use libiconv" >&5 +echo $ECHO_N "checking whether to use libiconv... $ECHO_C" >&6 + # Check whether --with-libiconv or --without-libiconv was given. if test "${with_libiconv+set}" = set; then withval="$with_libiconv" case "$withval" in no) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; *) - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 CFLAGS="$CFLAGS -I$withval/include" LDFLAGS="$LDFLAGS -L$withval/lib" - echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 -echo "configure:10428: checking for iconv_open in -liconv" >&5 -ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking for iconv_open in -liconv" >&5 +echo $ECHO_N "checking for iconv_open in -liconv... $ECHO_C" >&6 +if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-liconv $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char iconv_open(); - -int main() { -iconv_open() -; return 0; } -EOF -if { (eval echo configure:10447: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_iconv_iconv_open=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_iconv_iconv_open=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv_open" >&5 +echo "${ECHO_T}$ac_cv_lib_iconv_iconv_open" >&6 +if test $ac_cv_lib_iconv_iconv_open = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBICONV 1 +_ACEOF LIBS="-liconv $LIBS" -else - echo "$ac_t""no" 1>&6 fi - cat >> confdefs.h <>confdefs.h <<_ACEOF #define WITH_LIBICONV "${withval}" -EOF +_ACEOF ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ############ # check for iconv in libc -echo $ac_n "checking for working iconv""... $ac_c" 1>&6 -echo "configure:10490: checking for working iconv" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for working iconv" >&5 +echo $ECHO_N "checking for working iconv... $ECHO_C" >&6 +if test "${samba_cv_HAVE_NATIVE_ICONV+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_NATIVE_ICONV=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -10505,41 +17257,50 @@ main() { return 0; } -EOF -if { (eval echo configure:10510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_NATIVE_ICONV=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_NATIVE_ICONV=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_NATIVE_ICONV=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_NATIVE_ICONV" >&5 +echo "${ECHO_T}$samba_cv_HAVE_NATIVE_ICONV" >&6 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_NATIVE_ICONV 1 -EOF +_ACEOF fi -echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:10534: checking for Linux kernel oplocks" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for Linux kernel oplocks" >&5 +echo $ECHO_N "checking for Linux kernel oplocks... $ECHO_C" >&6 +if test "${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -10552,40 +17313,49 @@ main() { return fcntl(fd, F_GETLEASE, 0) == -1; } -EOF -if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" >&5 +echo "${ECHO_T}$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" >&6 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_KERNEL_OPLOCKS_LINUX 1 -EOF +_ACEOF fi -echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10580: checking for kernel change notify support" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for kernel change notify support" >&5 +echo $ECHO_N "checking for kernel change notify support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -10598,40 +17368,49 @@ main() { exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0); } -EOF -if { (eval echo configure:10603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&5 +echo "${ECHO_T}$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&6 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_KERNEL_CHANGE_NOTIFY 1 -EOF +_ACEOF fi -echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10626: checking for kernel share modes" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for kernel share modes" >&5 +echo $ECHO_N "checking for kernel share modes... $ECHO_C" >&6 +if test "${samba_cv_HAVE_KERNEL_SHARE_MODES+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -10646,78 +17425,100 @@ main() { exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0); } -EOF -if { (eval echo configure:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_KERNEL_SHARE_MODES=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_KERNEL_SHARE_MODES=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_KERNEL_SHARE_MODES" >&5 +echo "${ECHO_T}$samba_cv_HAVE_KERNEL_SHARE_MODES" >&6 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_KERNEL_SHARE_MODES 1 -EOF +_ACEOF fi -echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10677: checking for IRIX kernel oplock type definitions" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for IRIX kernel oplock type definitions" >&5 +echo $ECHO_N "checking for IRIX kernel oplock type definitions... $ECHO_C" >&6 +if test "${samba_cv_HAVE_KERNEL_OPLOCKS_IRIX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1; -; return 0; } -EOF -if { (eval echo configure:10691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&5 +echo "${ECHO_T}$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&6 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_KERNEL_OPLOCKS_IRIX 1 -EOF +_ACEOF fi -echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10712: checking for irix specific capabilities" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for irix specific capabilities" >&5 +echo $ECHO_N "checking for irix specific capabilities... $ECHO_C" >&6 +if test "${samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -10731,26 +17532,35 @@ main() { exit(0); } -EOF -if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&5 +echo "${ECHO_T}$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&6 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1 -EOF +_ACEOF fi @@ -10759,163 +17569,215 @@ fi # This is *really* broken but some systems (DEC OSF1) do this.... JRA. # -echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10764: checking for int16 typedef included by rpc/rpc.h" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for int16 typedef included by rpc/rpc.h" >&5 +echo $ECHO_N "checking for int16 typedef included by rpc/rpc.h... $ECHO_C" >&6 +if test "${samba_cv_HAVE_INT16_FROM_RPC_RPC_H+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #if defined(HAVE_RPC_RPC_H) #include #endif -int main() { +int +main () +{ int16 testvar; -; return 0; } -EOF -if { (eval echo configure:10780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_INT16_FROM_RPC_RPC_H" >&5 +echo "${ECHO_T}$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" >&6 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_INT16_FROM_RPC_RPC_H 1 -EOF +_ACEOF fi -echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10801: checking for uint16 typedef included by rpc/rpc.h" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo $ECHO_N "checking for uint16 typedef included by rpc/rpc.h... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UINT16_FROM_RPC_RPC_H+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #if defined(HAVE_RPC_RPC_H) #include #endif -int main() { +int +main () +{ uint16 testvar; -; return 0; } -EOF -if { (eval echo configure:10817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" >&6 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UINT16_FROM_RPC_RPC_H 1 -EOF +_ACEOF fi -echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10838: checking for int32 typedef included by rpc/rpc.h" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for int32 typedef included by rpc/rpc.h" >&5 +echo $ECHO_N "checking for int32 typedef included by rpc/rpc.h... $ECHO_C" >&6 +if test "${samba_cv_HAVE_INT32_FROM_RPC_RPC_H+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #if defined(HAVE_RPC_RPC_H) #include #endif -int main() { +int +main () +{ int32 testvar; -; return 0; } -EOF -if { (eval echo configure:10854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_INT32_FROM_RPC_RPC_H" >&5 +echo "${ECHO_T}$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" >&6 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_INT32_FROM_RPC_RPC_H 1 -EOF +_ACEOF fi -echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10875: checking for uint32 typedef included by rpc/rpc.h" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo $ECHO_N "checking for uint32 typedef included by rpc/rpc.h... $ECHO_C" >&6 +if test "${samba_cv_HAVE_UINT32_FROM_RPC_RPC_H+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #if defined(HAVE_RPC_RPC_H) #include #endif -int main() { +int +main () +{ uint32 testvar; -; return 0; } -EOF -if { (eval echo configure:10891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" >&5 +echo "${ECHO_T}$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" >&6 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UINT32_FROM_RPC_RPC_H 1 -EOF +_ACEOF fi -echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10913: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo $ECHO_N "checking for conflicting AUTH_ERROR define in rpc/rpc.h... $ECHO_C" >&6 +if test "${samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #ifdef HAVE_SYS_SECURITY_H @@ -10925,172 +17787,226 @@ cat > conftest.$ac_ext < #endif -int main() { +int +main () +{ int testvar; -; return 0; } -EOF -if { (eval echo configure:10933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" >&5 +echo "${ECHO_T}$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" >&6 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_RPC_AUTH_ERROR_CONFLICT 1 -EOF +_ACEOF fi -echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10954: checking for test routines" >&5 +echo "$as_me:$LINENO: checking for test routines" >&5 +echo $ECHO_N "checking for test routines... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - echo "configure: warning: cannot run when cross-compiling" 1>&2 + { echo "$as_me:$LINENO: WARNING: cannot run when cross-compiling" >&5 +echo "$as_me: WARNING: cannot run when cross-compiling" >&2;} else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include "${srcdir-.}/tests/trivial.c" -EOF -if { (eval echo configure:10963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6 +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cant find test code. Aborting config" >&5 +echo "$as_me: error: cant find test code. Aborting config" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + +echo "$as_me:$LINENO: checking for ftruncate extend" >&5 +echo $ECHO_N "checking for ftruncate extend... $ECHO_C" >&6 +if test "${samba_cv_HAVE_FTRUNCATE_EXTEND+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; } -fi -rm -fr conftest* -fi - -echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10977: checking for ftruncate extend" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include "${srcdir-.}/tests/ftruncate.c" -EOF -if { (eval echo configure:10990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_FTRUNCATE_EXTEND=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_FTRUNCATE_EXTEND=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_FTRUNCATE_EXTEND=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_FTRUNCATE_EXTEND" >&5 +echo "${ECHO_T}$samba_cv_HAVE_FTRUNCATE_EXTEND" >&6 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_FTRUNCATE_EXTEND 1 -EOF +_ACEOF fi -echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6 -echo "configure:11013: checking for AF_LOCAL socket support" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for AF_LOCAL socket support" >&5 +echo $ECHO_N "checking for AF_LOCAL socket support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_WORKING_AF_LOCAL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_WORKING_AF_LOCAL=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include "${srcdir-.}/tests/unixsock.c" -EOF -if { (eval echo configure:11026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_WORKING_AF_LOCAL=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_WORKING_AF_LOCAL=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_WORKING_AF_LOCAL=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_WORKING_AF_LOCAL" >&5 +echo "${ECHO_T}$samba_cv_HAVE_WORKING_AF_LOCAL" >&6 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_AF_LOCAL 1 -EOF +_ACEOF fi -echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:11050: checking for broken getgroups" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for broken getgroups" >&5 +echo $ECHO_N "checking for broken getgroups... $ECHO_C" >&6 +if test "${samba_cv_HAVE_BROKEN_GETGROUPS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include "${srcdir-.}/tests/getgroups.c" -EOF -if { (eval echo configure:11063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_BROKEN_GETGROUPS=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_BROKEN_GETGROUPS=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_BROKEN_GETGROUPS=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_BROKEN_GETGROUPS" >&5 +echo "${ECHO_T}$samba_cv_HAVE_BROKEN_GETGROUPS" >&6 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_BROKEN_GETGROUPS 1 -EOF +_ACEOF fi -echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:11086: checking whether getpass should be replaced" >&5 -if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether getpass should be replaced" >&5 +echo $ECHO_N "checking whether getpass should be replaced... $ECHO_C" >&6 +if test "${samba_cv_REPLACE_GETPASS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #define REPLACE_GETPASS 1 @@ -11099,43 +18015,56 @@ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_REPLACE_GETPASS=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_REPLACE_GETPASS=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_REPLACE_GETPASS=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$SAVE_CPPFLAGS" fi - -echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_REPLACE_GETPASS" >&5 +echo "${ECHO_T}$samba_cv_REPLACE_GETPASS" >&6 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define REPLACE_GETPASS 1 -EOF +_ACEOF fi -echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:11130: checking for broken inet_ntoa" >&5 -if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for broken inet_ntoa" >&5 +echo $ECHO_N "checking for broken inet_ntoa... $ECHO_C" >&6 +if test "${samba_cv_REPLACE_INET_NTOA+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -11146,278 +18075,342 @@ else #endif main() { struct in_addr ip; ip.s_addr = 0x12345678; if (strcmp(inet_ntoa(ip),"18.52.86.120") && - strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } + strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } exit(1);} -EOF -if { (eval echo configure:11153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_REPLACE_INET_NTOA=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_REPLACE_INET_NTOA=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_REPLACE_INET_NTOA=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_REPLACE_INET_NTOA" >&5 +echo "${ECHO_T}$samba_cv_REPLACE_INET_NTOA" >&6 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define REPLACE_INET_NTOA 1 -EOF +_ACEOF fi -echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:11176: checking for secure mkstemp" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for secure mkstemp" >&5 +echo $ECHO_N "checking for secure mkstemp... $ECHO_C" >&6 +if test "${samba_cv_HAVE_SECURE_MKSTEMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include #include #include -main() { +main() { struct stat st; - char tpl[20]="/tmp/test.XXXXXX"; - int fd = mkstemp(tpl); + char tpl[20]="/tmp/test.XXXXXX"; + int fd = mkstemp(tpl); if (fd == -1) exit(1); unlink(tpl); if (fstat(fd, &st) != 0) exit(1); if ((st.st_mode & 0777) != 0600) exit(1); exit(0); } -EOF -if { (eval echo configure:11202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_SECURE_MKSTEMP=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_SECURE_MKSTEMP=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_SECURE_MKSTEMP=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_SECURE_MKSTEMP" >&5 +echo "${ECHO_T}$samba_cv_HAVE_SECURE_MKSTEMP" >&6 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SECURE_MKSTEMP 1 -EOF +_ACEOF fi -echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:11225: checking for sysconf(_SC_NGROUPS_MAX)" >&5 -if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo $ECHO_N "checking for sysconf(_SC_NGROUPS_MAX)... $ECHO_C" >&6 +if test "${samba_cv_SYSCONF_SC_NGROUPS_MAX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } -EOF -if { (eval echo configure:11239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_SYSCONF_SC_NGROUPS_MAX=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_SYSCONF_SC_NGROUPS_MAX=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_SYSCONF_SC_NGROUPS_MAX" >&5 +echo "${ECHO_T}$samba_cv_SYSCONF_SC_NGROUPS_MAX" >&6 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SYSCONF_SC_NGROUPS_MAX 1 -EOF +_ACEOF fi -echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:11262: checking for root" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for root" >&5 +echo $ECHO_N "checking for root... $ECHO_C" >&6 +if test "${samba_cv_HAVE_ROOT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" main() { exit(getuid() != 0); } -EOF -if { (eval echo configure:11275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_ROOT=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_ROOT=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_ROOT=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_ROOT" >&5 +echo "${ECHO_T}$samba_cv_HAVE_ROOT" >&6 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ROOT 1 -EOF +_ACEOF else - echo "configure: warning: running as non-root will disable some tests" 1>&2 + { echo "$as_me:$LINENO: WARNING: running as non-root will disable some tests" >&5 +echo "$as_me: WARNING: running as non-root will disable some tests" >&2;} fi ################## # look for a method of finding the list of network interfaces iface=no; -echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:11303: checking for iface AIX" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for iface AIX" >&5 +echo $ECHO_N "checking for iface AIX... $ECHO_C" >&6 +if test "${samba_cv_HAVE_IFACE_AIX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #define HAVE_IFACE_AIX 1 #define AUTOCONF_TEST 1 #include "confdefs.h" #include "${srcdir-.}/lib/interfaces.c" -EOF -if { (eval echo configure:11320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_IFACE_AIX=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_IFACE_AIX=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_IFACE_AIX=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_IFACE_AIX" >&5 +echo "${ECHO_T}$samba_cv_HAVE_IFACE_AIX" >&6 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then - iface=yes;cat >> confdefs.h <<\EOF + iface=yes;cat >>confdefs.h <<\_ACEOF #define HAVE_IFACE_AIX 1 -EOF +_ACEOF fi if test $iface = no; then -echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:11344: checking for iface ifconf" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for iface ifconf" >&5 +echo $ECHO_N "checking for iface ifconf... $ECHO_C" >&6 +if test "${samba_cv_HAVE_IFACE_IFCONF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #define HAVE_IFACE_IFCONF 1 #define AUTOCONF_TEST 1 #include "confdefs.h" #include "${srcdir-.}/lib/interfaces.c" -EOF -if { (eval echo configure:11361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_IFACE_IFCONF=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_IFACE_IFCONF=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_IFACE_IFCONF=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_IFACE_IFCONF" >&5 +echo "${ECHO_T}$samba_cv_HAVE_IFACE_IFCONF" >&6 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then - iface=yes;cat >> confdefs.h <<\EOF + iface=yes;cat >>confdefs.h <<\_ACEOF #define HAVE_IFACE_IFCONF 1 -EOF +_ACEOF fi fi if test $iface = no; then -echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:11386: checking for iface ifreq" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for iface ifreq" >&5 +echo $ECHO_N "checking for iface ifreq... $ECHO_C" >&6 +if test "${samba_cv_HAVE_IFACE_IFREQ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #define HAVE_IFACE_IFREQ 1 #define AUTOCONF_TEST 1 #include "confdefs.h" #include "${srcdir-.}/lib/interfaces.c" -EOF -if { (eval echo configure:11403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_IFACE_IFREQ=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_IFACE_IFREQ=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_IFACE_IFREQ=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_IFACE_IFREQ" >&5 +echo "${ECHO_T}$samba_cv_HAVE_IFACE_IFREQ" >&6 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then - iface=yes;cat >> confdefs.h <<\EOF + iface=yes;cat >>confdefs.h <<\_ACEOF #define HAVE_IFACE_IFREQ 1 -EOF +_ACEOF fi fi @@ -11427,332 +18420,404 @@ fi # look for a method of setting the effective uid seteuid=no; if test $seteuid = no; then -echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:11432: checking for setresuid" >&5 -if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for setresuid" >&5 +echo $ECHO_N "checking for setresuid... $ECHO_C" >&6 +if test "${samba_cv_USE_SETRESUID+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #define AUTOCONF_TEST 1 #define USE_SETRESUID 1 #include "confdefs.h" #include "${srcdir-.}/lib/util_sec.c" -EOF -if { (eval echo configure:11449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_USE_SETRESUID=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_USE_SETRESUID=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_USE_SETRESUID=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_USE_SETRESUID" >&5 +echo "${ECHO_T}$samba_cv_USE_SETRESUID" >&6 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then - seteuid=yes;cat >> confdefs.h <<\EOF + seteuid=yes;cat >>confdefs.h <<\_ACEOF #define USE_SETRESUID 1 -EOF +_ACEOF fi fi if test $seteuid = no; then -echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:11475: checking for setreuid" >&5 -if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for setreuid" >&5 +echo $ECHO_N "checking for setreuid... $ECHO_C" >&6 +if test "${samba_cv_USE_SETREUID+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #define AUTOCONF_TEST 1 #define USE_SETREUID 1 #include "confdefs.h" #include "${srcdir-.}/lib/util_sec.c" -EOF -if { (eval echo configure:11492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_USE_SETREUID=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_USE_SETREUID=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_USE_SETREUID=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_USE_SETREUID" >&5 +echo "${ECHO_T}$samba_cv_USE_SETREUID" >&6 if test x"$samba_cv_USE_SETREUID" = x"yes"; then - seteuid=yes;cat >> confdefs.h <<\EOF + seteuid=yes;cat >>confdefs.h <<\_ACEOF #define USE_SETREUID 1 -EOF +_ACEOF fi fi if test $seteuid = no; then -echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:11517: checking for seteuid" >&5 -if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for seteuid" >&5 +echo $ECHO_N "checking for seteuid... $ECHO_C" >&6 +if test "${samba_cv_USE_SETEUID+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #define AUTOCONF_TEST 1 #define USE_SETEUID 1 #include "confdefs.h" #include "${srcdir-.}/lib/util_sec.c" -EOF -if { (eval echo configure:11534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_USE_SETEUID=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_USE_SETEUID=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_USE_SETEUID=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_USE_SETEUID" >&5 +echo "${ECHO_T}$samba_cv_USE_SETEUID" >&6 if test x"$samba_cv_USE_SETEUID" = x"yes"; then - seteuid=yes;cat >> confdefs.h <<\EOF + seteuid=yes;cat >>confdefs.h <<\_ACEOF #define USE_SETEUID 1 -EOF +_ACEOF fi fi if test $seteuid = no; then -echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:11559: checking for setuidx" >&5 -if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for setuidx" >&5 +echo $ECHO_N "checking for setuidx... $ECHO_C" >&6 +if test "${samba_cv_USE_SETUIDX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #define AUTOCONF_TEST 1 #define USE_SETUIDX 1 #include "confdefs.h" #include "${srcdir-.}/lib/util_sec.c" -EOF -if { (eval echo configure:11576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_USE_SETUIDX=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_USE_SETUIDX=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_USE_SETUIDX=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_USE_SETUIDX" >&5 +echo "${ECHO_T}$samba_cv_USE_SETUIDX" >&6 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then - seteuid=yes;cat >> confdefs.h <<\EOF + seteuid=yes;cat >>confdefs.h <<\_ACEOF #define USE_SETUIDX 1 -EOF +_ACEOF fi fi -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11601: checking for working mmap" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 +if test "${samba_cv_HAVE_MMAP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include "${srcdir-.}/tests/shared_mmap.c" -EOF -if { (eval echo configure:11614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_MMAP=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_MMAP=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_MMAP=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_MMAP" >&5 +echo "${ECHO_T}$samba_cv_HAVE_MMAP" >&6 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_MMAP 1 -EOF +_ACEOF fi -echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11637: checking for ftruncate needs root" >&5 -if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for ftruncate needs root" >&5 +echo $ECHO_N "checking for ftruncate needs root... $ECHO_C" >&6 +if test "${samba_cv_FTRUNCATE_NEEDS_ROOT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include "${srcdir-.}/tests/ftruncroot.c" -EOF -if { (eval echo configure:11650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_FTRUNCATE_NEEDS_ROOT=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_FTRUNCATE_NEEDS_ROOT=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_FTRUNCATE_NEEDS_ROOT" >&5 +echo "${ECHO_T}$samba_cv_FTRUNCATE_NEEDS_ROOT" >&6 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define FTRUNCATE_NEEDS_ROOT 1 -EOF +_ACEOF fi -echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11673: checking for fcntl locking" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for fcntl locking" >&5 +echo $ECHO_N "checking for fcntl locking... $ECHO_C" >&6 +if test "${samba_cv_HAVE_FCNTL_LOCK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include "${srcdir-.}/tests/fcntl_lock.c" -EOF -if { (eval echo configure:11686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_FCNTL_LOCK=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_FCNTL_LOCK=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_FCNTL_LOCK=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_FCNTL_LOCK" >&5 +echo "${ECHO_T}$samba_cv_HAVE_FCNTL_LOCK" >&6 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_FCNTL_LOCK 1 -EOF +_ACEOF fi -echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11709: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo $ECHO_N "checking for broken (glibc2.1/x86) 64 bit fcntl locking... $ECHO_C" >&6 +if test "${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include "${srcdir-.}/tests/fcntl_lock64.c" -EOF -if { (eval echo configure:11722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" >&5 +echo "${ECHO_T}$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" >&6 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_BROKEN_FCNTL64_LOCKS 1 -EOF +_ACEOF else - echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11747: checking for 64 bit fcntl locking" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for 64 bit fcntl locking" >&5 +echo $ECHO_N "checking for 64 bit fcntl locking... $ECHO_C" >&6 +if test "${samba_cv_HAVE_STRUCT_FLOCK64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then samba_cv_HAVE_STRUCT_FLOCK64=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -11775,113 +18840,148 @@ exit(0); exit(1); #endif } -EOF -if { (eval echo configure:11780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_STRUCT_FLOCK64=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_STRUCT_FLOCK64=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_STRUCT_FLOCK64=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_STRUCT_FLOCK64" >&5 +echo "${ECHO_T}$samba_cv_HAVE_STRUCT_FLOCK64" >&6 if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_FLOCK64 1 -EOF +_ACEOF fi fi -echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11805: checking for st_blocks in struct stat" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for st_blocks in struct stat" >&5 +echo $ECHO_N "checking for st_blocks in struct stat... $ECHO_C" >&6 +if test "${samba_cv_HAVE_STAT_ST_BLOCKS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include #include -int main() { +int +main () +{ struct stat st; st.st_blocks = 0; -; return 0; } -EOF -if { (eval echo configure:11820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_STAT_ST_BLOCKS=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_STAT_ST_BLOCKS=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_STAT_ST_BLOCKS=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_STAT_ST_BLOCKS" >&5 +echo "${ECHO_T}$samba_cv_HAVE_STAT_ST_BLOCKS" >&6 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STAT_ST_BLOCKS 1 -EOF +_ACEOF -fi +fi -echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:11841: checking for st_blksize in struct stat" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for st_blksize in struct stat" >&5 +echo $ECHO_N "checking for st_blksize in struct stat... $ECHO_C" >&6 +if test "${samba_cv_HAVE_STAT_ST_BLKSIZE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include #include -int main() { +int +main () +{ struct stat st; st.st_blksize = 0; -; return 0; } -EOF -if { (eval echo configure:11856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_STAT_ST_BLKSIZE=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_STAT_ST_BLKSIZE=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_STAT_ST_BLKSIZE=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_STAT_ST_BLKSIZE" >&5 +echo "${ECHO_T}$samba_cv_HAVE_STAT_ST_BLKSIZE" >&6 if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STAT_ST_BLKSIZE 1 -EOF +_ACEOF fi case "$host_os" in *linux*) -echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11879: checking for broken RedHat 7.2 system header files" >&5 -if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for broken RedHat 7.2 system header files" >&5 +echo $ECHO_N "checking for broken RedHat 7.2 system header files... $ECHO_C" >&6 +if test "${samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #ifdef HAVE_SYS_VFS_H @@ -11891,83 +18991,111 @@ cat > conftest.$ac_ext < #endif -int main() { +int +main () +{ int i; -; return 0; } -EOF -if { (eval echo configure:11899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&5 +echo "${ECHO_T}$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&6 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1 -EOF +_ACEOF fi ;; esac -echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11922: checking for broken nisplus include files" >&5 -if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for broken nisplus include files" >&5 +echo $ECHO_N "checking for broken nisplus include files... $ECHO_C" >&6 +if test "${samba_cv_BROKEN_NISPLUS_INCLUDE_FILES+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #if defined(HAVE_RPCSVC_NIS_H) #include #endif -int main() { +int +main () +{ int i; -; return 0; } -EOF -if { (eval echo configure:11938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" >&5 +echo "${ECHO_T}$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" >&6 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_NISPLUS_INCLUDE_FILES 1 -EOF +_ACEOF fi ################################################# # check for smbwrapper support -echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11962: checking whether to use smbwrapper" >&5 +echo "$as_me:$LINENO: checking whether to use smbwrapper" >&5 +echo $ECHO_N "checking whether to use smbwrapper... $ECHO_C" >&6 + # Check whether --with-smbwrapper or --without-smbwrapper was given. if test "${with_smbwrapper+set}" = set; then withval="$with_smbwrapper" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_SMBWRAPPER 1 -EOF +_ACEOF WRAPPROG="bin/smbsh" WRAP="bin/smbwrapper.$SHLIBEXT" @@ -11986,79 +19114,88 @@ EOF WRAP="" WRAP32="" elif test x$ac_cv_func_syscall = xno; then - echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6 + echo "$as_me:$LINENO: result: No syscall() -- disabling smbwrapper and smbsh" >&5 +echo "${ECHO_T}No syscall() -- disabling smbwrapper and smbsh" >&6 WRAPPROG="" WRAP="" WRAP32="" fi ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # check for AFS clear-text auth support -echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6 -echo "configure:12009: checking whether to use AFS clear-text auth" >&5 +echo "$as_me:$LINENO: checking whether to use AFS clear-text auth" >&5 +echo $ECHO_N "checking whether to use AFS clear-text auth... $ECHO_C" >&6 + # Check whether --with-afs or --without-afs was given. if test "${with_afs+set}" = set; then withval="$with_afs" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_AFS 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # check for the DFS clear-text auth system -echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6 -echo "configure:12035: checking whether to use DFS clear-text auth" >&5 +echo "$as_me:$LINENO: checking whether to use DFS clear-text auth" >&5 +echo $ECHO_N "checking whether to use DFS clear-text auth... $ECHO_C" >&6 + # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_DFS 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # active directory support with_ads_support=yes -echo $ac_n "checking whether to use Active Directory""... $ac_c" 1>&6 -echo "configure:12062: checking whether to use Active Directory" >&5 +echo "$as_me:$LINENO: checking whether to use Active Directory" >&5 +echo $ECHO_N "checking whether to use Active Directory... $ECHO_C" >&6 + # Check whether --with-ads or --without-ads was given. if test "${with_ads+set}" = set; then @@ -12067,61 +19204,66 @@ if test "${with_ads+set}" = set; then no) with_ads_support=no ;; - esac -fi - + esac +fi; if test x"$with_ads_support" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_ADS 1 -EOF +_ACEOF fi -echo "$ac_t""$with_ads_support" 1>&6 +echo "$as_me:$LINENO: result: $with_ads_support" >&5 +echo "${ECHO_T}$with_ads_support" >&6 FOUND_KRB5=no if test x"$with_ads_support" = x"yes"; then ################################################# # check for location of Kerberos 5 install - echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6 -echo "configure:12090: checking for kerberos 5 install path" >&5 - # Check whether --with-krb5 or --without-krb5 was given. + echo "$as_me:$LINENO: checking for kerberos 5 install path" >&5 +echo $ECHO_N "checking for kerberos 5 install path... $ECHO_C" >&6 + +# Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" case "$withval" in no) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; *) - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 LIBS="$LIBS -lkrb5" CFLAGS="$CFLAGS -I$withval/include" CPPFLAGS="$CPPFLAGS -I$withval/include" LDFLAGS="$LDFLAGS -L$withval/lib" FOUND_KRB5=yes ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; if test x$FOUND_KRB5 = x"no"; then ################################################# # see if this box has the RedHat location for kerberos -echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6 -echo "configure:12118: checking for /usr/kerberos" >&5 +echo "$as_me:$LINENO: checking for /usr/kerberos" >&5 +echo $ECHO_N "checking for /usr/kerberos... $ECHO_C" >&6 if test -d /usr/kerberos; then LDFLAGS="$LDFLAGS -L/usr/kerberos/lib" CFLAGS="$CFLAGS -I/usr/kerberos/include" CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -12129,265 +19271,466 @@ fi # now check for krb5.h. Some systems have the libraries without the headers! # note that this check is done here to allow for different kerberos # include paths - for ac_hdr in krb5.h + +for ac_header in krb5.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12137: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done # now check for gssapi headers. This is also done here to allow for # different kerberos include paths - for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h + + +for ac_header in gssapi/gssapi_generic.h gssapi/gssapi.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12180: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done ################################################################## # we might need the k5crypto and com_err libraries on some systems - echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6 -echo "configure:12220: checking for _et_list in -lcom_err" >&5 -ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for _et_list in -lcom_err" >&5 +echo $ECHO_N "checking for _et_list in -lcom_err... $ECHO_C" >&6 +if test "${ac_cv_lib_com_err__et_list+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lcom_err $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char _et_list(); - -int main() { -_et_list() -; return 0; } -EOF -if { (eval echo configure:12239: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char _et_list (); +int +main () +{ +_et_list (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_com_err__et_list=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_com_err__et_list=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_com_err__et_list" >&5 +echo "${ECHO_T}$ac_cv_lib_com_err__et_list" >&6 +if test $ac_cv_lib_com_err__et_list = yes; then LIBS="$LIBS -lcom_err" -else - echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6 -echo "configure:12260: checking for krb5_encrypt_data in -lk5crypto" >&5 -ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for krb5_encrypt_data in -lk5crypto" >&5 +echo $ECHO_N "checking for krb5_encrypt_data in -lk5crypto... $ECHO_C" >&6 +if test "${ac_cv_lib_k5crypto_krb5_encrypt_data+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lk5crypto $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char krb5_encrypt_data(); - -int main() { -krb5_encrypt_data() -; return 0; } -EOF -if { (eval echo configure:12279: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char krb5_encrypt_data (); +int +main () +{ +krb5_encrypt_data (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_k5crypto_krb5_encrypt_data=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_k5crypto_krb5_encrypt_data=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_krb5_encrypt_data" >&5 +echo "${ECHO_T}$ac_cv_lib_k5crypto_krb5_encrypt_data" >&6 +if test $ac_cv_lib_k5crypto_krb5_encrypt_data = yes; then LIBS="$LIBS -lk5crypto" -else - echo "$ac_t""no" 1>&6 fi ######################################################## # now see if we can find the krb5 libs in standard paths # or as specified above - echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6 -echo "configure:12304: checking for krb5_mk_req_extended in -lkrb5" >&5 -ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for krb5_mk_req_extended in -lkrb5" >&5 +echo $ECHO_N "checking for krb5_mk_req_extended in -lkrb5... $ECHO_C" >&6 +if test "${ac_cv_lib_krb5_krb5_mk_req_extended+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lkrb5 $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char krb5_mk_req_extended(); - -int main() { -krb5_mk_req_extended() -; return 0; } -EOF -if { (eval echo configure:12323: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char krb5_mk_req_extended (); +int +main () +{ +krb5_mk_req_extended (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_krb5_krb5_mk_req_extended=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_krb5_krb5_mk_req_extended=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_mk_req_extended" >&5 +echo "${ECHO_T}$ac_cv_lib_krb5_krb5_mk_req_extended" >&6 +if test $ac_cv_lib_krb5_krb5_mk_req_extended = yes; then LIBS="$LIBS -lkrb5"; - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_KRB5 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi ######################################################## # now see if we can find the gssapi libs in standard paths - echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6 -echo "configure:12351: checking for gss_display_status in -lgssapi_krb5" >&5 -ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for gss_display_status in -lgssapi_krb5" >&5 +echo $ECHO_N "checking for gss_display_status in -lgssapi_krb5... $ECHO_C" >&6 +if test "${ac_cv_lib_gssapi_krb5_gss_display_status+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lgssapi_krb5 $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gss_display_status(); - -int main() { -gss_display_status() -; return 0; } -EOF -if { (eval echo configure:12370: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char gss_display_status (); +int +main () +{ +gss_display_status (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gssapi_krb5_gss_display_status=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_gssapi_krb5_gss_display_status=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_display_status" >&5 +echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_display_status" >&6 +if test $ac_cv_lib_gssapi_krb5_gss_display_status = yes; then LIBS="$LIBS -lgssapi_krb5"; - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GSSAPI 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi fi @@ -12396,8 +19739,9 @@ fi # Compile with LDAP support? with_ldap_support=yes -echo $ac_n "checking whether to use LDAP""... $ac_c" 1>&6 -echo "configure:12401: checking whether to use LDAP" >&5 +echo "$as_me:$LINENO: checking whether to use LDAP" >&5 +echo $ECHO_N "checking whether to use LDAP... $ECHO_C" >&6 + # Check whether --with-ldap or --without-ldap was given. if test "${with_ldap+set}" = set; then @@ -12406,229 +19750,287 @@ if test "${with_ldap+set}" = set; then no) with_ldap_support=no ;; - esac -fi - + esac +fi; -echo "$ac_t""$with_ldap_support" 1>&6 +echo "$as_me:$LINENO: result: $with_ldap_support" >&5 +echo "${ECHO_T}$with_ldap_support" >&6 if test x"$with_ldap_support" = x"yes"; then ################################################################## # we might need the lber lib on some systems. To avoid link errors # this test must be before the libldap test - echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6 -echo "configure:12422: checking for ber_scanf in -llber" >&5 -ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for ber_scanf in -llber" >&5 +echo $ECHO_N "checking for ber_scanf in -llber... $ECHO_C" >&6 +if test "${ac_cv_lib_lber_ber_scanf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-llber $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char ber_scanf(); - -int main() { -ber_scanf() -; return 0; } -EOF -if { (eval echo configure:12441: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char ber_scanf (); +int +main () +{ +ber_scanf (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_lber_ber_scanf=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_lber_ber_scanf=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_lber_ber_scanf" >&5 +echo "${ECHO_T}$ac_cv_lib_lber_ber_scanf" >&6 +if test $ac_cv_lib_lber_ber_scanf = yes; then LIBS="$LIBS -llber" -else - echo "$ac_t""no" 1>&6 fi ######################################################## # now see if we can find the ldap libs in standard paths if test x$have_ldap != xyes; then - echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6 -echo "configure:12466: checking for ldap_domain2hostlist in -lldap" >&5 -ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for ldap_domain2hostlist in -lldap" >&5 +echo $ECHO_N "checking for ldap_domain2hostlist in -lldap... $ECHO_C" >&6 +if test "${ac_cv_lib_ldap_ldap_domain2hostlist+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char ldap_domain2hostlist(); - -int main() { -ldap_domain2hostlist() -; return 0; } -EOF -if { (eval echo configure:12485: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char ldap_domain2hostlist (); +int +main () +{ +ldap_domain2hostlist (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ldap_ldap_domain2hostlist=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_ldap_ldap_domain2hostlist=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_domain2hostlist" >&5 +echo "${ECHO_T}$ac_cv_lib_ldap_ldap_domain2hostlist" >&6 +if test $ac_cv_lib_ldap_ldap_domain2hostlist = yes; then LIBS="$LIBS -lldap"; - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LDAP 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi ######################################################## # If we have LDAP, does it's rebind procedure take 2 or 3 arguments? # Check found in pam_ldap 145. - for ac_func in ldap_set_rebind_proc + +for ac_func in ldap_set_rebind_proc do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12516: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:12544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done - echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6 -echo "configure:12569: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 -if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 +echo $ECHO_N "checking whether ldap_set_rebind_proc takes 3 arguments... $ECHO_C" >&6 +if test "${pam_ldap_cv_ldap_set_rebind_proc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ ldap_set_rebind_proc(0, 0, 0); -; return 0; } -EOF -if { (eval echo configure:12584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pam_ldap_cv_ldap_set_rebind_proc=3 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - pam_ldap_cv_ldap_set_rebind_proc=2 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +pam_ldap_cv_ldap_set_rebind_proc=2 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6 - cat >> confdefs.h <&5 +echo "${ECHO_T}$pam_ldap_cv_ldap_set_rebind_proc" >&6 + cat >>confdefs.h <<_ACEOF #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc -EOF +_ACEOF fi fi ################################################# # check for automount support -echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:12607: checking whether to use AUTOMOUNT" >&5 +echo "$as_me:$LINENO: checking whether to use AUTOMOUNT" >&5 +echo $ECHO_N "checking whether to use AUTOMOUNT... $ECHO_C" >&6 + # Check whether --with-automount or --without-automount was given. if test "${with_automount+set}" = set; then withval="$with_automount" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_AUTOMOUNT 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # check for smbmount support -echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:12632: checking whether to use SMBMOUNT" >&5 +echo "$as_me:$LINENO: checking whether to use SMBMOUNT" >&5 +echo $ECHO_N "checking whether to use SMBMOUNT... $ECHO_C" >&6 + # Check whether --with-smbmount or --without-smbmount was given. if test "${with_smbmount+set}" = set; then withval="$with_smbmount" @@ -12636,240 +20038,293 @@ if test "${with_smbmount+set}" = set; then yes) case "$host_os" in *linux*) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_SMBMOUNT 1 -EOF +_ACEOF MPROGS="bin/smbmount bin/smbmnt bin/smbumount" ;; *) - { echo "configure: error: not on a linux system!" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: not on a linux system!" >&5 +echo "$as_me: error: not on a linux system!" >&2;} + { (exit 1); exit 1; }; } ;; esac ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 MPROGS= ;; - esac + esac else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 MPROGS= -fi - +fi; ################################################# # check for a PAM clear-text auth, accounts, password and session support with_pam_for_crypt=no -echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6 -echo "configure:12669: checking whether to use PAM" >&5 +echo "$as_me:$LINENO: checking whether to use PAM" >&5 +echo $ECHO_N "checking whether to use PAM... $ECHO_C" >&6 + # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_PAM 1 -EOF +_ACEOF AUTHLIBS="$AUTHLIBS -lpam" with_pam_for_crypt=yes ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; # we can't build a pam module if we don't have pam. -echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:12695: checking for pam_get_data in -lpam" >&5 -ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for pam_get_data in -lpam" >&5 +echo $ECHO_N "checking for pam_get_data in -lpam... $ECHO_C" >&6 +if test "${ac_cv_lib_pam_pam_get_data+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lpam $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pam_get_data(); - -int main() { -pam_get_data() -; return 0; } -EOF -if { (eval echo configure:12714: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + builtin and then its argument prototype would still apply. */ +char pam_get_data (); +int +main () +{ +pam_get_data (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pam_pam_get_data=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_pam_pam_get_data=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_get_data" >&5 +echo "${ECHO_T}$ac_cv_lib_pam_pam_get_data" >&6 +if test $ac_cv_lib_pam_pam_get_data = yes; then + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPAM 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi ################################################# # check for pam_smbpass support -echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:12741: checking whether to use pam_smbpass" >&5 +echo "$as_me:$LINENO: checking whether to use pam_smbpass" >&5 +echo $ECHO_N "checking whether to use pam_smbpass... $ECHO_C" >&6 + # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 # Conditions under which pam_smbpass should not be built. if test x$PICFLAG = x; then - echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6 + echo "$as_me:$LINENO: result: No support for PIC code - disabling pam_smbpass" >&5 +echo "${ECHO_T}No support for PIC code - disabling pam_smbpass" >&6 PAM_MOD="" elif test x$ac_cv_lib_pam_pam_get_data = xno; then - echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6 + echo "$as_me:$LINENO: result: No libpam found -- disabling pam_smbpass" >&5 +echo "${ECHO_T}No libpam found -- disabling pam_smbpass" >&6 PAM_MOD="" else PAM_MOD="bin/pam_smbpass.so" fi ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ############################################### # test for where we get crypt() from, but only # if not using PAM if test x"$with_pam_for_crypt" = x"no"; then + for ac_func in crypt do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12779: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:12807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done if test x"$ac_cv_func_crypt" = x"no"; then - echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:12833: checking for crypt in -lcrypt" >&5 -ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 +echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 +if test "${ac_cv_lib_crypt_crypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char crypt(); - -int main() { -crypt() -; return 0; } -EOF -if { (eval echo configure:12852: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char crypt (); +int +main () +{ +crypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_crypt_crypt=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_crypt_crypt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 +echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 +if test $ac_cv_lib_crypt_crypt = yes; then AUTHLIBS="$AUTHLIBS -lcrypt"; - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_CRYPT 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi fi @@ -12882,70 +20337,82 @@ fi ## $with_pam_for_crypt variable as above --jerry ## if test $with_pam_for_crypt = no; then -echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:12887: checking for a crypt that needs truncated salt" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for a crypt that needs truncated salt" >&5 +echo $ECHO_N "checking for a crypt that needs truncated salt... $ECHO_C" >&6 +if test "${samba_cv_HAVE_TRUNCATED_SALT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + crypt_LIBS="$LIBS" LIBS="$AUTHLIBS $LIBS" if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include "${srcdir-.}/tests/crypttest.c" -EOF -if { (eval echo configure:12902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_TRUNCATED_SALT=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_HAVE_TRUNCATED_SALT=yes + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +samba_cv_HAVE_TRUNCATED_SALT=yes fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - LIBS="$crypt_LIBS" fi - -echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_TRUNCATED_SALT" >&5 +echo "${ECHO_T}$samba_cv_HAVE_TRUNCATED_SALT" >&6 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_TRUNCATED_SALT 1 -EOF +_ACEOF fi fi # New experimental SAM system -echo $ac_n "checking whether to build the new (experimental) SAM database""... $ac_c" 1>&6 -echo "configure:12929: checking whether to build the new (experimental) SAM database" >&5 +echo "$as_me:$LINENO: checking whether to build the new (experimental) SAM database" >&5 +echo $ECHO_N "checking whether to build the new (experimental) SAM database... $ECHO_C" >&6 + # Check whether --with-sam or --without-sam was given. if test "${with_sam+set}" = set; then withval="$with_sam" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_SAM 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ######################################################################################## @@ -12956,184 +20423,204 @@ fi ################################################# # check for a LDAP password database configuration backwards compatibility -echo $ac_n "checking whether to use LDAP SAM 2.2 compatible configuration""... $ac_c" 1>&6 -echo "configure:12961: checking whether to use LDAP SAM 2.2 compatible configuration" >&5 +echo "$as_me:$LINENO: checking whether to use LDAP SAM 2.2 compatible configuration" >&5 +echo $ECHO_N "checking whether to use LDAP SAM 2.2 compatible configuration... $ECHO_C" >&6 + # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_LDAP_SAMCONFIG 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # check for a TDB password database -echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:12986: checking whether to use TDB SAM database" >&5 +echo "$as_me:$LINENO: checking whether to use TDB SAM database" >&5 +echo $ECHO_N "checking whether to use TDB SAM database... $ECHO_C" >&6 + # 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_TDB_SAM 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # check for a NISPLUS password database -echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:13011: checking whether to use NISPLUS SAM database" >&5 +echo "$as_me:$LINENO: checking whether to use NISPLUS SAM database" >&5 +echo $ECHO_N "checking whether to use NISPLUS SAM database... $ECHO_C" >&6 + # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_NISPLUS_SAM 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ######################################################################################## ## -## END OF TESTS FOR SAM BACKENDS. +## END OF TESTS FOR SAM BACKENDS. ## ######################################################################################## ################################################# -# check for a NISPLUS_HOME support -echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:13042: checking whether to use NISPLUS_HOME" >&5 +# check for a NISPLUS_HOME support +echo "$as_me:$LINENO: checking whether to use NISPLUS_HOME" >&5 +echo $ECHO_N "checking whether to use NISPLUS_HOME... $ECHO_C" >&6 + # Check whether --with-nisplus-home or --without-nisplus-home was given. if test "${with_nisplus_home+set}" = set; then withval="$with_nisplus_home" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_NISPLUS_HOME 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # check for syslog logging -echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:13067: checking whether to use syslog logging" >&5 +echo "$as_me:$LINENO: checking whether to use syslog logging" >&5 +echo $ECHO_N "checking whether to use syslog logging... $ECHO_C" >&6 + # Check whether --with-syslog or --without-syslog was given. if test "${with_syslog+set}" = set; then withval="$with_syslog" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_SYSLOG 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # check for a shared memory profiling support -echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:13092: checking whether to use profiling" >&5 +echo "$as_me:$LINENO: checking whether to use profiling" >&5 +echo $ECHO_N "checking whether to use profiling... $ECHO_C" >&6 + # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_PROFILE 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # check for experimental disk-quotas support QUOTAOBJS=smbd/noquotas.o -echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:13120: checking whether to support disk-quotas" >&5 +echo "$as_me:$LINENO: checking whether to support disk-quotas" >&5 +echo $ECHO_N "checking whether to support disk-quotas... $ECHO_C" >&6 + # Check whether --with-quotas or --without-quotas was given. if test "${with_quotas+set}" = set; then withval="$with_quotas" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 case "$host_os" in *linux*) # Check for kernel 2.4.x quota braindamage... - echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:13131: checking for linux 2.4.x quota braindamage.." >&5 -if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for linux 2.4.x quota braindamage.." >&5 +echo $ECHO_N "checking for linux 2.4.x quota braindamage..... $ECHO_C" >&6 +if test "${samba_cv_linux_2_4_quota_braindamage+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -13141,32 +20628,45 @@ else #include #include #include -int main() { +int +main () +{ struct mem_dqblk D; -; return 0; } -EOF -if { (eval echo configure:13149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_linux_2_4_quota_braindamage=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_linux_2_4_quota_braindamage=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_linux_2_4_quota_braindamage=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_linux_2_4_quota_braindamage" >&5 +echo "${ECHO_T}$samba_cv_linux_2_4_quota_braindamage" >&6 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LINUX_QUOTAS_2 1 -EOF +_ACEOF else - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LINUX_QUOTAS_1 1 -EOF +_ACEOF fi ;; @@ -13174,58 +20674,64 @@ fi ;; esac QUOTAOBJS=smbd/quotas.o - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_QUOTAS 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # check for experimental utmp accounting -echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:13198: checking whether to support utmp accounting" >&5 +echo "$as_me:$LINENO: checking whether to support utmp accounting" >&5 +echo $ECHO_N "checking whether to support utmp accounting... $ECHO_C" >&6 + # Check whether --with-utmp or --without-utmp was given. if test "${with_utmp+set}" = set; then withval="$with_utmp" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_UTMP 1 -EOF +_ACEOF ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # choose native language(s) of man pages -echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6 -echo "configure:13223: checking chosen man pages' language(s)" >&5 +echo "$as_me:$LINENO: checking chosen man pages' language(s)" >&5 +echo $ECHO_N "checking chosen man pages' language(s)... $ECHO_C" >&6 + # Check whether --with-manpages-langs or --without-manpages-langs was given. if test "${with_manpages_langs+set}" = set; then withval="$with_manpages_langs" case "$withval" in yes|no) - echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2 + { echo "$as_me:$LINENO: WARNING: --with-manpages-langs called without argument - will use default" >&5 +echo "$as_me: WARNING: --with-manpages-langs called without argument - will use default" >&2;} manlangs="en" ;; *) @@ -13233,67 +20739,72 @@ if test "${with_manpages_langs+set}" = set; then ;; esac - echo "$ac_t""$manlangs" 1>&6 + echo "$as_me:$LINENO: result: $manlangs" >&5 +echo "${ECHO_T}$manlangs" >&6 manlangs=`echo $manlangs | sed "s/,/ /"` # replacing commas with spaces to produce a list - + else manlangs="en" - echo "$ac_t""$manlangs" 1>&6 - + echo "$as_me:$LINENO: result: $manlangs" >&5 +echo "${ECHO_T}$manlangs" >&6 -fi +fi; ################################################# # should we build libsmbclient? LIBSMBCLIENT_SHARED= LIBSMBCLIENT= -echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:13254: checking whether to build the libsmbclient shared library" >&5 +echo "$as_me:$LINENO: checking whether to build the libsmbclient shared library" >&5 +echo $ECHO_N "checking whether to build the libsmbclient shared library... $ECHO_C" >&6 + # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" case "$withval" in - no) - echo "$ac_t""no" 1>&6 + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; *) if test $BLDSHARED = true; then LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT LIBSMBCLIENT=libsmbclient - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - echo "$ac_t""no shared library support" 1>&6 + echo "$as_me:$LINENO: result: no shared library support" >&5 +echo "${ECHO_T}no shared library support" >&6 fi ;; - esac + esac else - echo "$ac_t""yes" 1>&6 - -fi + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +fi; ################################################# # these tests are taken from the GNU fileutils package -echo "checking how to get filesystem space usage" 1>&6 -echo "configure:13282: checking how to get filesystem space usage" >&5 +{ echo "$as_me:$LINENO: checking how to get filesystem space usage..." >&5 +echo "$as_me: checking how to get filesystem space usage..." >&6;} space=no # Test for statvfs64. if test $space = no; then # SVR4 - echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6 -echo "configure:13289: 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 + echo "$as_me:$LINENO: checking statvfs64 function (SVR4)" >&5 +echo $ECHO_N "checking statvfs64 function (SVR4)... $ECHO_C" >&6 +if test "${fu_cv_sys_stat_statvfs64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statvfs64=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -13306,27 +20817,36 @@ else struct statvfs64 fsd; exit (statvfs64 (".", &fsd)); } -EOF -if { (eval echo configure:13311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then fu_cv_sys_stat_statvfs64=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - fu_cv_sys_stat_statvfs64=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +fu_cv_sys_stat_statvfs64=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6 +echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statvfs64" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statvfs64" >&6 if test $fu_cv_sys_stat_statvfs64 = yes; then space=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_STATVFS64 1 -EOF +_ACEOF fi fi @@ -13339,54 +20859,67 @@ fi # is what it gets when this test fails. if test $space = no; then # SVR4 - echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:13344: 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 + echo "$as_me:$LINENO: checking statvfs function (SVR4)" >&5 +echo $ECHO_N "checking statvfs function (SVR4)... $ECHO_C" >&6 +if test "${fu_cv_sys_stat_statvfs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct statvfs fsd; statvfs (0, &fsd); -; return 0; } -EOF -if { (eval echo configure:13357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then fu_cv_sys_stat_statvfs=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - fu_cv_sys_stat_statvfs=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fu_cv_sys_stat_statvfs=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6 +echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statvfs" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statvfs" >&6 if test $fu_cv_sys_stat_statvfs = yes; then space=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_STATVFS 1 -EOF +_ACEOF fi 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:13382: 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 + echo "$as_me:$LINENO: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" >&6 + if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs3_osf1=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include @@ -13398,43 +20931,53 @@ else fsd.f_fsize = 0; exit (statfs (".", &fsd, sizeof (struct statfs))); } -EOF -if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then fu_cv_sys_stat_statfs3_osf1=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - fu_cv_sys_stat_statfs3_osf1=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +fu_cv_sys_stat_statfs3_osf1=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6 + echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs3_osf1" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statfs3_osf1" >&6 if test $fu_cv_sys_stat_statfs3_osf1 = yes; then space=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_STATFS3_OSF1 1 -EOF +_ACEOF fi 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:13430: 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 + echo "$as_me:$LINENO: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" >&6 + if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs2_bsize=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #ifdef HAVE_SYS_PARAM_H @@ -13452,43 +20995,53 @@ else fsd.f_bsize = 0; exit (statfs (".", &fsd)); } -EOF -if { (eval echo configure:13457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then fu_cv_sys_stat_statfs2_bsize=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - fu_cv_sys_stat_statfs2_bsize=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +fu_cv_sys_stat_statfs2_bsize=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6 + echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_bsize" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statfs2_bsize" >&6 if test $fu_cv_sys_stat_statfs2_bsize = yes; then space=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_STATFS2_BSIZE 1 -EOF +_ACEOF fi 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:13484: 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 + echo "$as_me:$LINENO: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" >&6 + if test "${fu_cv_sys_stat_statfs4+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs4=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -13497,43 +21050,53 @@ else struct statfs fsd; exit (statfs (".", &fsd, sizeof fsd, 0)); } -EOF -if { (eval echo configure:13502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then fu_cv_sys_stat_statfs4=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - fu_cv_sys_stat_statfs4=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +fu_cv_sys_stat_statfs4=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6 + echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs4" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statfs4" >&6 if test $fu_cv_sys_stat_statfs4 = yes; then space=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_STATFS4 1 -EOF +_ACEOF fi 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:13529: 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 + echo "$as_me:$LINENO: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" >&6 + if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs2_fsize=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #ifdef HAVE_SYS_PARAM_H @@ -13548,43 +21111,53 @@ else fsd.f_fsize = 0; exit (statfs (".", &fsd)); } -EOF -if { (eval echo configure:13553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then fu_cv_sys_stat_statfs2_fsize=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - fu_cv_sys_stat_statfs2_fsize=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +fu_cv_sys_stat_statfs2_fsize=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6 + echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_fsize" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statfs2_fsize" >&6 if test $fu_cv_sys_stat_statfs2_fsize = yes; then space=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_STATFS2_FSIZE 1 -EOF +_ACEOF fi 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:13580: 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 + echo "$as_me:$LINENO: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" >&6 + if test "${fu_cv_sys_stat_fs_data+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_fs_data=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #ifdef HAVE_SYS_PARAM_H @@ -13603,27 +21176,37 @@ else 0 for not mounted, -1 for failure. */ exit (statfs (".", &fsd) != 1); } -EOF -if { (eval echo configure:13608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then fu_cv_sys_stat_fs_data=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - fu_cv_sys_stat_fs_data=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +fu_cv_sys_stat_fs_data=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6 + echo "$as_me:$LINENO: result: $fu_cv_sys_stat_fs_data" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_fs_data" >&6 if test $fu_cv_sys_stat_fs_data = yes; then space=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define STAT_STATFS2_FS_DATA 1 -EOF +_ACEOF fi fi @@ -13636,10 +21219,10 @@ fi # If we don't have all of these then disable large # file support. # -echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:13641: checking if large file support can be enabled" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking if large file support can be enabled... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8))) @@ -13648,66 +21231,80 @@ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1 -EOF +_ACEOF fi -echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&5 +echo "${ECHO_T}$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&6 + # Check whether --with-spinlocks or --without-spinlocks was given. if test "${with_spinlocks+set}" = set; then withval="$with_spinlocks" - : -fi +fi; if test "x$with_spinlocks" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_SPINLOCKS 1 -EOF +_ACEOF case "$host_cpu" in sparc) - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SPARC_SPINLOCKS 1 -EOF +_ACEOF ;; i386|i486|i586|i686) - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define INTEL_SPINLOCKS 1 -EOF +_ACEOF ;; mips) - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define MIPS_SPINLOCKS 1 -EOF +_ACEOF ;; powerpc) - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define POWERPC_SPINLOCKS 1 -EOF +_ACEOF ;; esac @@ -13716,8 +21313,9 @@ fi ################################################# # check for ACL support -echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:13721: checking whether to support ACLs" >&5 +echo "$as_me:$LINENO: checking whether to support ACLs" >&5 +echo $ECHO_N "checking whether to support ACLs... $ECHO_C" >&6 + # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -13726,162 +21324,207 @@ if test "${with_acl_support+set}" = set; then case "$host_os" in *sysv5*) - echo "$ac_t""Using UnixWare ACLs" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: Using UnixWare ACLs" >&5 +echo "${ECHO_T}Using UnixWare ACLs" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_UNIXWARE_ACLS 1 -EOF +_ACEOF ;; *solaris*) - echo "$ac_t""Using solaris ACLs" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: Using solaris ACLs" >&5 +echo "${ECHO_T}Using solaris ACLs" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_SOLARIS_ACLS 1 -EOF +_ACEOF ;; *hpux*) - echo "$ac_t""Using HPUX ACLs" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: Using HPUX ACLs" >&5 +echo "${ECHO_T}Using HPUX ACLs" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_HPUX_ACLS 1 -EOF +_ACEOF ;; *irix*) - echo "$ac_t""Using IRIX ACLs" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: Using IRIX ACLs" >&5 +echo "${ECHO_T}Using IRIX ACLs" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_IRIX_ACLS 1 -EOF +_ACEOF ;; *aix*) - echo "$ac_t""Using AIX ACLs" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: Using AIX ACLs" >&5 +echo "${ECHO_T}Using AIX ACLs" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_AIX_ACLS 1 -EOF +_ACEOF ;; *osf*) - echo "$ac_t""Using Tru64 ACLs" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: Using Tru64 ACLs" >&5 +echo "${ECHO_T}Using Tru64 ACLs" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_TRU64_ACLS 1 -EOF +_ACEOF LIBS="$LIBS -lpacl" ;; *) - echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:13774: 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 + +echo "$as_me:$LINENO: checking for acl_get_file in -lacl" >&5 +echo $ECHO_N "checking for acl_get_file in -lacl... $ECHO_C" >&6 +if test "${ac_cv_lib_acl_acl_get_file+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lacl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char acl_get_file(); - -int main() { -acl_get_file() -; return 0; } -EOF -if { (eval echo configure:13793: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_acl_acl_get_file=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_acl_acl_get_file=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_acl_acl_get_file" >&5 +echo "${ECHO_T}$ac_cv_lib_acl_acl_get_file" >&6 +if test $ac_cv_lib_acl_acl_get_file = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBACL 1 +_ACEOF LIBS="-lacl $LIBS" -else - echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:13821: 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 + echo "$as_me:$LINENO: checking for ACL support" >&5 +echo $ECHO_N "checking for ACL support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_POSIX_ACLS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +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:13835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_POSIX_ACLS=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_POSIX_ACLS=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_POSIX_ACLS=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_POSIX_ACLS" >&5 +echo "${ECHO_T}$samba_cv_HAVE_POSIX_ACLS" >&6 if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then - echo "$ac_t""Using posix ACLs" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: Using posix ACLs" >&5 +echo "${ECHO_T}Using posix ACLs" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_POSIX_ACLS 1 -EOF +_ACEOF - echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:13855: 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 + echo "$as_me:$LINENO: checking for acl_get_perm_np" >&5 +echo $ECHO_N "checking for acl_get_perm_np... $ECHO_C" >&6 +if test "${samba_cv_HAVE_ACL_GET_PERM_NP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include #include -int main() { +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:13869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_ACL_GET_PERM_NP=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_ACL_GET_PERM_NP=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_ACL_GET_PERM_NP=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_ACL_GET_PERM_NP" >&5 +echo "${ECHO_T}$samba_cv_HAVE_ACL_GET_PERM_NP" >&6 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ACL_GET_PERM_NP 1 -EOF +_ACEOF fi fi @@ -13889,198 +21532,243 @@ EOF esac ;; *) - echo "$ac_t""no" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_NO_ACLS 1 -EOF +_ACEOF ;; - esac + esac else - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_NO_ACLS 1 -EOF +_ACEOF - echo "$ac_t""no" 1>&6 - -fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; ################################################# # check for sendfile support with_sendfile_support=yes -echo $ac_n "checking whether to check to support sendfile""... $ac_c" 1>&6 -echo "configure:13915: checking whether to check to support sendfile" >&5 +echo "$as_me:$LINENO: checking whether to check to support sendfile" >&5 +echo $ECHO_N "checking whether to check to support sendfile... $ECHO_C" >&6 + # Check whether --with-sendfile-support or --without-sendfile-support was given. if test "${with_sendfile_support+set}" = set; then withval="$with_sendfile_support" case "$withval" in yes) - echo "$ac_t""yes" 1>&6; + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; case "$host_os" in *linux*) - echo $ac_n "checking for linux sendfile64 support""... $ac_c" 1>&6 -echo "configure:13927: checking for linux sendfile64 support" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for linux sendfile64 support" >&5 +echo $ECHO_N "checking for linux sendfile64 support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_SENDFILE64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ \ int tofd, fromfd; off64_t offset; size_t total; ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total); -; return 0; } -EOF -if { (eval echo configure:13945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_SENDFILE64=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_SENDFILE64=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_SENDFILE64=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $samba_cv_HAVE_SENDFILE64" >&5 +echo "${ECHO_T}$samba_cv_HAVE_SENDFILE64" >&6 -echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6 - - echo $ac_n "checking for linux sendfile support""... $ac_c" 1>&6 -echo "configure:13960: checking for linux sendfile support" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for linux sendfile support" >&5 +echo $ECHO_N "checking for linux sendfile support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_SENDFILE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ \ int tofd, fromfd; off_t offset; size_t total; ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); -; return 0; } -EOF -if { (eval echo configure:13978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_SENDFILE=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_SENDFILE=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_SENDFILE=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_SENDFILE" >&5 +echo "${ECHO_T}$samba_cv_HAVE_SENDFILE" >&6 # Try and cope with broken Linux sendfile.... - echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6 -echo "configure:13994: checking for broken linux sendfile support" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for broken linux sendfile support" >&5 +echo $ECHO_N "checking for broken linux sendfile support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_BROKEN_LINUX_SENDFILE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" \ #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) #undef _FILE_OFFSET_BITS #endif #include -int main() { +int +main () +{ \ int tofd, fromfd; off_t offset; size_t total; ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); -; return 0; } -EOF -if { (eval echo configure:14016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_BROKEN_LINUX_SENDFILE" >&5 +echo "${ECHO_T}$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" >&6 if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SENDFILE64 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LINUX_SENDFILE_API 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_SENDFILE 1 -EOF +_ACEOF elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SENDFILE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LINUX_SENDFILE_API 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_SENDFILE 1 -EOF +_ACEOF elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LINUX_BROKEN_SENDFILE_API 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_SENDFILE 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6; + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; fi ;; *freebsd*) - echo $ac_n "checking for freebsd sendfile support""... $ac_c" 1>&6 -echo "configure:14072: checking for freebsd sendfile support" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for freebsd sendfile support" >&5 +echo $ECHO_N "checking for freebsd sendfile support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_SENDFILE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" \ #include #include #include -int main() { +int +main () +{ \ int fromfd, tofd; off_t offset, nwritten; @@ -14094,54 +21782,68 @@ int main() { hdtrl.iov_len = 0; int ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0); -; return 0; } -EOF -if { (eval echo configure:14100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_SENDFILE=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_SENDFILE=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_SENDFILE=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_SENDFILE" >&5 +echo "${ECHO_T}$samba_cv_HAVE_SENDFILE" >&6 if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SENDFILE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define FREEBSD_SENDFILE_API 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_SENDFILE 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6; + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; fi ;; *hpux*) - echo $ac_n "checking for hpux sendfile64 support""... $ac_c" 1>&6 -echo "configure:14134: checking for hpux sendfile64 support" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for hpux sendfile64 support" >&5 +echo $ECHO_N "checking for hpux sendfile64 support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_SENDFILE64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" \ #include #include -int main() { +int +main () +{ \ int fromfd, tofd; size_t total=0; @@ -14154,51 +21856,65 @@ int main() { nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0); -; return 0; } -EOF -if { (eval echo configure:14160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_SENDFILE64=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_SENDFILE64=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_SENDFILE64=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_SENDFILE64" >&5 +echo "${ECHO_T}$samba_cv_HAVE_SENDFILE64" >&6 if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SENDFILE64 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HPUX_SENDFILE_API 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_SENDFILE 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6; + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; fi - echo $ac_n "checking for hpux sendfile support""... $ac_c" 1>&6 -echo "configure:14191: checking for hpux sendfile support" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for hpux sendfile support" >&5 +echo $ECHO_N "checking for hpux sendfile support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_SENDFILE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" \ #include #include -int main() { +int +main () +{ \ int fromfd, tofd; size_t total=0; @@ -14211,53 +21927,67 @@ int main() { nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0); -; return 0; } -EOF -if { (eval echo configure:14217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_SENDFILE=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_SENDFILE=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_SENDFILE=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_SENDFILE" >&5 +echo "${ECHO_T}$samba_cv_HAVE_SENDFILE" >&6 if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SENDFILE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HPUX_SENDFILE_API 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_SENDFILE 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6; + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; fi ;; *solaris*) LIBS="$LIBS -lsendfile" - echo $ac_n "checking for solaris sendfilev64 support""... $ac_c" 1>&6 -echo "configure:14251: checking for solaris sendfilev64 support" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV64'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for solaris sendfilev64 support" >&5 +echo $ECHO_N "checking for solaris sendfilev64 support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_SENDFILEV64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" \ #include -int main() { +int +main () +{ \ int sfvcnt; size_t xferred; @@ -14278,51 +22008,65 @@ int main() { vec[1].sfv_len = 0; nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred); -; return 0; } -EOF -if { (eval echo configure:14284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_SENDFILEV64=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_SENDFILEV64=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_SENDFILEV64=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_SENDFILEV64" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_SENDFILEV64" >&5 +echo "${ECHO_T}$samba_cv_HAVE_SENDFILEV64" >&6 if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SENDFILEV64 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SOLARIS_SENDFILE_API 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_SENDFILE 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6; + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; fi - echo $ac_n "checking for solaris sendfilev support""... $ac_c" 1>&6 -echo "configure:14316: checking for solaris sendfilev support" >&5 -if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for solaris sendfilev support" >&5 +echo $ECHO_N "checking for solaris sendfilev support... $ECHO_C" >&6 +if test "${samba_cv_HAVE_SENDFILEV+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" \ #include -int main() { +int +main () +{ \ int sfvcnt; size_t xferred; @@ -14343,37 +22087,49 @@ int main() { vec[1].sfv_len = 0; nwritten = sendfilev(tofd, vec, sfvcnt, &xferred); -; return 0; } -EOF -if { (eval echo configure:14349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_HAVE_SENDFILEV=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_HAVE_SENDFILEV=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_HAVE_SENDFILEV=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_HAVE_SENDFILEV" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_HAVE_SENDFILEV" >&5 +echo "${ECHO_T}$samba_cv_HAVE_SENDFILEV" >&6 if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SENDFILEV 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SOLARIS_SENDFILE_API 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_SENDFILE 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6; + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; fi ;; @@ -14382,14 +22138,15 @@ EOF esac ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; - esac + esac else - echo "$ac_t""yes" 1>&6 - -fi + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +fi; ################################################# @@ -14397,8 +22154,8 @@ fi # build and install client programs (WINBIND_TARGETS), sbin programs # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). -echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:14402: checking whether to build winbind" >&5 +echo "$as_me:$LINENO: checking whether to build winbind" >&5 +echo $ECHO_N "checking whether to build winbind... $ECHO_C" >&6 # Initially, the value of $host_os decides whether winbind is supported @@ -14423,10 +22180,11 @@ esac # Check the setting of --with-winbindd + # Check whether --with-winbind or --without-winbind was given. if test "${with_winbind+set}" = set; then withval="$with_winbind" - + case "$withval" in yes) HAVE_WINBIND=yes @@ -14435,9 +22193,8 @@ if test "${with_winbind+set}" = set; then HAVE_WINBIND=no winbind_reason="" ;; - esac -fi - + esac +fi; # We need unix domain sockets for winbind @@ -14456,10 +22213,11 @@ WINBIND_LTARGETS="" WINBIND_PAM_PROGS="" if test x"$HAVE_WINBIND" = x"yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WITH_WINBIND 1 -EOF +_ACEOF WINBIND_TARGETS="bin/wbinfo" @@ -14471,7 +22229,8 @@ EOF fi fi else - echo "$ac_t""no$winbind_no_reason" 1>&6 + echo "$as_me:$LINENO: result: no$winbind_no_reason" >&5 +echo "${ECHO_T}no$winbind_no_reason" >&6 fi @@ -14487,43 +22246,56 @@ fi # Solaris has some extra fields in struct passwd that need to be # initialised otherwise nscd crashes. Unfortunately autoconf < 2.50 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking -# this. +# this. #AC_CHECK_MEMBER(struct passwd.pw_comment, # AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]), # [#include ]) -echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6 -echo "configure:14498: checking whether struct passwd has pw_comment" >&5 -if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether struct passwd has pw_comment" >&5 +echo $ECHO_N "checking whether struct passwd has pw_comment... $ECHO_C" >&6 +if test "${samba_cv_passwd_pw_comment+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ struct passwd p; p.pw_comment; -; return 0; } -EOF -if { (eval echo configure:14511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_passwd_pw_comment=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_passwd_pw_comment=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_passwd_pw_comment=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_passwd_pw_comment" >&5 +echo "${ECHO_T}$samba_cv_passwd_pw_comment" >&6 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_PASSWD_PW_COMMENT 1 -EOF +_ACEOF fi @@ -14531,47 +22303,61 @@ fi # AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]), # [#include ]) -echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6 -echo "configure:14536: checking whether struct passwd has pw_age" >&5 -if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether struct passwd has pw_age" >&5 +echo $ECHO_N "checking whether struct passwd has pw_age... $ECHO_C" >&6 +if test "${samba_cv_passwd_pw_age+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include -int main() { +int +main () +{ struct passwd p; p.pw_age; -; return 0; } -EOF -if { (eval echo configure:14549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then samba_cv_passwd_pw_age=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - samba_cv_passwd_pw_age=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +samba_cv_passwd_pw_age=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6 +echo "$as_me:$LINENO: result: $samba_cv_passwd_pw_age" >&5 +echo "${ECHO_T}$samba_cv_passwd_pw_age" >&6 if test x"$samba_cv_passwd_pw_age" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_PASSWD_PW_AGE 1 -EOF +_ACEOF fi ################################################# -# Check to see if we should use the included popt +# Check to see if we should use the included popt + # Check whether --with-included-popt or --without-included-popt was given. if test "${with_included_popt+set}" = set; then withval="$with_included_popt" - + case "$withval" in yes) INCLUDED_POPT=yes @@ -14579,61 +22365,76 @@ if test "${with_included_popt+set}" = set; then no) INCLUDED_POPT=no ;; - esac -fi - + esac +fi; if test x"$INCLUDED_POPT" != x"yes"; then - echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:14588: checking for poptGetContext in -lpopt" >&5 -ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for poptGetContext in -lpopt" >&5 +echo $ECHO_N "checking for poptGetContext in -lpopt... $ECHO_C" >&6 +if test "${ac_cv_lib_popt_poptGetContext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lpopt $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char poptGetContext(); - -int main() { -poptGetContext() -; return 0; } -EOF -if { (eval echo configure:14607: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char poptGetContext (); +int +main () +{ +poptGetContext (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_popt_poptGetContext=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_popt_poptGetContext=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_popt_poptGetContext" >&5 +echo "${ECHO_T}$ac_cv_lib_popt_poptGetContext" >&6 +if test $ac_cv_lib_popt_poptGetContext = yes; then INCLUDED_POPT=no else - echo "$ac_t""no" 1>&6 -INCLUDED_POPT=yes + INCLUDED_POPT=yes fi fi -echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:14631: checking whether to use included popt" >&5 +echo "$as_me:$LINENO: checking whether to use included popt" >&5 +echo $ECHO_N "checking whether to use included popt... $ECHO_C" >&6 if test x"$INCLUDED_POPT" = x"yes"; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 BUILD_POPT='$(POPT_OBJS)' FLAGS1="-I$srcdir/popt" else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 LIBS="$LIBS -lpopt" fi @@ -14647,6 +22448,7 @@ fi # though they can coexist in different directories.) In the future # this might make the Python stuff be built by default. + # Check whether --with-python or --without-python was given. if test "${with_python+set}" = set; then withval="$with_python" @@ -14657,9 +22459,8 @@ if test "${with_python+set}" = set; then *) PYTHON=${withval-python} ;; - esac -fi - + esac +fi; ################################################# @@ -14672,456 +22473,1172 @@ fi ################################################# # final configure stuff -echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:14677: checking configure summary" >&5 +echo "$as_me:$LINENO: checking configure summary" >&5 +echo $ECHO_N "checking configure summary... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - echo "configure: warning: cannot run when cross-compiling" 1>&2 + { echo "$as_me:$LINENO: WARNING: cannot run when cross-compiling" >&5 +echo "$as_me: WARNING: cannot run when cross-compiling" >&2;} else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include "${srcdir-.}/tests/summary.c" -EOF -if { (eval echo configure:14686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1; -fi -rm -fr conftest* +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: summary failure. Aborting config" >&5 +echo "$as_me: error: summary failure. Aborting config" >&2;} + { (exit 1); exit 1; }; }; exit 1; +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - builddir=`pwd` # I added make files that are outside /source directory. # I know this is not a good solution, will work out a better # solution soon. --simo -trap '' 1 2 15 -cat > confcache <<\EOF + ac_config_files="$ac_config_files include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile ../examples/sam/Makefile" +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile ../examples/sam/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS </dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@configdir@%$configdir%g -s%@lockdir@%$lockdir%g -s%@piddir@%$piddir%g -s%@logfilebase@%$logfilebase%g -s%@privatedir@%$privatedir%g -s%@swatdir@%$swatdir%g -s%@RUNPROG@%$RUNPROG%g -s%@MPROGS@%$MPROGS%g -s%@LDSHFLAGS@%$LDSHFLAGS%g -s%@SONAMEFLAG@%$SONAMEFLAG%g -s%@SHLD@%$SHLD%g -s%@HOST_OS@%$HOST_OS%g -s%@PAM_MOD@%$PAM_MOD%g -s%@WRAP@%$WRAP%g -s%@WRAP32@%$WRAP32%g -s%@WRAPPROG@%$WRAPPROG%g -s%@PICFLAG@%$PICFLAG%g -s%@PICSUFFIX@%$PICSUFFIX%g -s%@POBAD_CC@%$POBAD_CC%g -s%@SHLIBEXT@%$SHLIBEXT%g -s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g -s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g -s%@PRINTLIBS@%$PRINTLIBS%g -s%@AUTHLIBS@%$AUTHLIBS%g -s%@CC@%$CC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@AWK@%$AWK%g -s%@BROKEN_CC@%$BROKEN_CC%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@CPP@%$CPP%g -s%@CUPS_CONFIG@%$CUPS_CONFIG%g -s%@LIBOBJS@%$LIBOBJS%g -s%@TERMLIBS@%$TERMLIBS%g -s%@TERMLDFLAGS@%$TERMLDFLAGS%g -s%@ROFF@%$ROFF%g -s%@DYNEXP@%$DYNEXP%g -s%@QUOTAOBJS@%$QUOTAOBJS%g -s%@manlangs@%$manlangs%g -s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g -s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g -s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g -s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g -s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g -s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g -s%@BUILD_POPT@%$BUILD_POPT%g -s%@FLAGS1@%$FLAGS1%g -s%@PYTHON@%$PYTHON%g -s%@builddir@%$builddir%g +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi -CEOF -EOF -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file + $as_unset $as_var fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + PATH_SEPARATOR=: fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + rm -f conftest.sh fi -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' else - ac_dir_suffix= ac_dots= + as_ln_s='ln -s' fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.54. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.54, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" + exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "include/stamp-h" ) CONFIG_FILES="$CONFIG_FILES include/stamp-h" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "script/findsmb" ) CONFIG_FILES="$CONFIG_FILES script/findsmb" ;; + "../examples/VFS/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../examples/VFS/Makefile" ;; + "../examples/pdb/mysql/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../examples/pdb/mysql/Makefile" ;; + "../examples/pdb/xml/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../examples/pdb/xml/Makefile" ;; + "../examples/sam/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../examples/sam/Makefile" ;; + "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/cs$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@configdir@,$configdir,;t t +s,@lockdir@,$lockdir,;t t +s,@piddir@,$piddir,;t t +s,@logfilebase@,$logfilebase,;t t +s,@privatedir@,$privatedir,;t t +s,@swatdir@,$swatdir,;t t +s,@RUNPROG@,$RUNPROG,;t t +s,@MPROGS@,$MPROGS,;t t +s,@LDSHFLAGS@,$LDSHFLAGS,;t t +s,@SONAMEFLAG@,$SONAMEFLAG,;t t +s,@SHLD@,$SHLD,;t t +s,@HOST_OS@,$HOST_OS,;t t +s,@PAM_MOD@,$PAM_MOD,;t t +s,@WRAP@,$WRAP,;t t +s,@WRAP32@,$WRAP32,;t t +s,@WRAPPROG@,$WRAPPROG,;t t +s,@PICFLAG@,$PICFLAG,;t t +s,@PICSUFFIX@,$PICSUFFIX,;t t +s,@POBAD_CC@,$POBAD_CC,;t t +s,@SHLIBEXT@,$SHLIBEXT,;t t +s,@LIBSMBCLIENT_SHARED@,$LIBSMBCLIENT_SHARED,;t t +s,@LIBSMBCLIENT@,$LIBSMBCLIENT,;t t +s,@PRINTLIBS@,$PRINTLIBS,;t t +s,@AUTHLIBS@,$AUTHLIBS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@AWK@,$AWK,;t t +s,@BROKEN_CC@,$BROKEN_CC,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@CUPS_CONFIG@,$CUPS_CONFIG,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TERMLIBS@,$TERMLIBS,;t t +s,@TERMLDFLAGS@,$TERMLDFLAGS,;t t +s,@ROFF@,$ROFF,;t t +s,@DYNEXP@,$DYNEXP,;t t +s,@QUOTAOBJS@,$QUOTAOBJS,;t t +s,@manlangs@,$manlangs,;t t +s,@WINBIND_TARGETS@,$WINBIND_TARGETS,;t t +s,@WINBIND_STARGETS@,$WINBIND_STARGETS,;t t +s,@WINBIND_LTARGETS@,$WINBIND_LTARGETS,;t t +s,@WINBIND_PAM_TARGETS@,$WINBIND_PAM_TARGETS,;t t +s,@WINBIND_NSS_EXTRA_OBJS@,$WINBIND_NSS_EXTRA_OBJS,;t t +s,@WINBIND_NSS_EXTRA_LIBS@,$WINBIND_NSS_EXTRA_LIBS,;t t +s,@BUILD_POPT@,$BUILD_POPT,;t t +s,@FLAGS1@,$FLAGS1,;t t +s,@PYTHON@,$PYTHON,;t t +s,@builddir@,$builddir,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail -while : +while grep . conftest.undefs >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file fi - rm -f $ac_file - mv conftest.h $ac_file + else + cat $tmp/config.h + rm -f $tmp/config.h fi -fi; done - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF -exit 0 -EOF +{ (exit 0); exit 0; } +_ACEOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + exec 5>/dev/null + $SHELL $CONFIG_STATUS || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi ################################################# # Print very concise instructions on building/use if test "x$enable_dmalloc" = xyes then - echo "$ac_t""Note: The dmalloc debug library will be included. To turn it on use" 1>&6 - echo "$ac_t"" \$ eval \`dmalloc samba\`." 1>&6 + echo "$as_me:$LINENO: result: Note: The dmalloc debug library will be included. To turn it on use" >&5 +echo "${ECHO_T}Note: The dmalloc debug library will be included. To turn it on use" >&6 + echo "$as_me:$LINENO: result: \$ eval \\`dmalloc samba\\`." >&5 +echo "${ECHO_T} \$ eval \\`dmalloc samba\\`." >&6 fi diff --git a/source3/configure.in b/source3/configure.in index bfbc09833d..6f50314cf1 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -969,7 +969,7 @@ case "$host_os" in ;; *next2*) AC_DEFINE(NEXT2);; *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man]);; - *sysv4*) + *sysv4*) AC_DEFINE(SYSV) case "$host" in *-univel-*) if [ test "$GCC" != yes ]; then AC_DEFINE(HAVE_MEMSET) @@ -981,12 +981,13 @@ case "$host_os" in esac ;; - *sysv5*) + *sysv5*) AC_DEFINE(SYSV) if [ test "$GCC" != yes ]; then AC_DEFINE(HAVE_MEMSET) fi LDSHFLAGS="-G" ;; + *sysv*) AC_DEFINE(SYSV);; esac AC_SUBST(DYNEXP) AC_MSG_RESULT($BLDSHARED) diff --git a/source3/include/config.h.in b/source3/include/config.h.in index 824c054991..4b707ba51f 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -1,69 +1,4 @@ -/* include/config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -#undef _ALL_SOURCE -#endif - -/* Define if type char is unsigned and you are not using gcc. */ -#ifndef __CHAR_UNSIGNED__ -#undef __CHAR_UNSIGNED__ -#endif - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define to `int' if doesn't define. */ -#undef gid_t - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if your struct stat has st_rdev. */ -#undef HAVE_ST_RDEV - -/* Define if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define as __inline if that's what the C compiler calls it. */ -#undef inline - -/* Define to `int' if doesn't define. */ -#undef mode_t - -/* Define if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Define to `long' if doesn't define. */ -#undef off_t - -/* Define to `int' if doesn't define. */ -#undef pid_t - -/* Define if you need to in order for stat and other things to work. */ -#undef _POSIX_SOURCE - -/* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE - -/* Define to `unsigned' if doesn't define. */ -#undef size_t - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define to `int' if doesn't define. */ -#undef uid_t - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN - +/* include/config.h.in. Generated from configure.in by autoheader. */ #undef HAVE_VOLATILE #undef HAVE_BROKEN_READDIR #undef HAVE_C99_VSNPRINTF @@ -93,6 +28,8 @@ #undef AIX #undef BSD #undef IRIX +#undef UNIXWARE +#undef SYSV #undef IRIX6 #undef HPUX #undef QNX @@ -300,888 +237,985 @@ #undef HAVE_SENDFILEV64 #undef SOLARIS_SENDFILE_API -/* The number of bytes in a int. */ -#undef SIZEOF_INT - -/* The number of bytes in a long. */ -#undef SIZEOF_LONG - -/* The number of bytes in a short. */ -#undef SIZEOF_SHORT - -/* Define if you have the __acl function. */ -#undef HAVE___ACL - -/* Define if you have the __chdir function. */ -#undef HAVE___CHDIR - -/* Define if you have the __close function. */ -#undef HAVE___CLOSE - -/* Define if you have the __closedir function. */ -#undef HAVE___CLOSEDIR - -/* Define if you have the __dup function. */ -#undef HAVE___DUP - -/* Define if you have the __dup2 function. */ -#undef HAVE___DUP2 - -/* Define if you have the __facl function. */ -#undef HAVE___FACL - -/* Define if you have the __fchdir function. */ -#undef HAVE___FCHDIR - -/* Define if you have the __fcntl function. */ -#undef HAVE___FCNTL - -/* Define if you have the __fork function. */ -#undef HAVE___FORK - -/* Define if you have the __fstat function. */ -#undef HAVE___FSTAT - -/* Define if you have the __fstat64 function. */ -#undef HAVE___FSTAT64 - -/* Define if you have the __fxstat function. */ -#undef HAVE___FXSTAT - -/* Define if you have the __getcwd function. */ -#undef HAVE___GETCWD - -/* Define if you have the __getdents function. */ -#undef HAVE___GETDENTS - -/* Define if you have the __llseek function. */ -#undef HAVE___LLSEEK - -/* Define if you have the __lseek function. */ -#undef HAVE___LSEEK - -/* Define if you have the __lstat function. */ -#undef HAVE___LSTAT - -/* Define if you have the __lstat64 function. */ -#undef HAVE___LSTAT64 - -/* Define if you have the __lxstat function. */ -#undef HAVE___LXSTAT - -/* Define if you have the __open function. */ -#undef HAVE___OPEN - -/* Define if you have the __open64 function. */ -#undef HAVE___OPEN64 - -/* Define if you have the __opendir function. */ -#undef HAVE___OPENDIR - -/* Define if you have the __pread function. */ -#undef HAVE___PREAD - -/* Define if you have the __pread64 function. */ -#undef HAVE___PREAD64 - -/* Define if you have the __pwrite function. */ -#undef HAVE___PWRITE - -/* Define if you have the __pwrite64 function. */ -#undef HAVE___PWRITE64 - -/* Define if you have the __read function. */ -#undef HAVE___READ - -/* Define if you have the __readdir function. */ -#undef HAVE___READDIR - -/* Define if you have the __readdir64 function. */ -#undef HAVE___READDIR64 - -/* Define if you have the __seekdir function. */ -#undef HAVE___SEEKDIR - -/* Define if you have the __stat function. */ -#undef HAVE___STAT - -/* Define if you have the __stat64 function. */ -#undef HAVE___STAT64 - -/* Define if you have the __sys_llseek function. */ -#undef HAVE___SYS_LLSEEK - -/* Define if you have the __telldir function. */ -#undef HAVE___TELLDIR - -/* Define if you have the __write function. */ -#undef HAVE___WRITE - -/* Define if you have the __xstat function. */ -#undef HAVE___XSTAT - -/* Define if you have the _acl function. */ -#undef HAVE__ACL - -/* Define if you have the _chdir function. */ -#undef HAVE__CHDIR - -/* Define if you have the _close function. */ -#undef HAVE__CLOSE - -/* Define if you have the _closedir function. */ -#undef HAVE__CLOSEDIR - -/* Define if you have the _dup function. */ -#undef HAVE__DUP - -/* Define if you have the _dup2 function. */ -#undef HAVE__DUP2 - -/* Define if you have the _facl function. */ -#undef HAVE__FACL - -/* Define if you have the _fchdir function. */ -#undef HAVE__FCHDIR - -/* Define if you have the _fcntl function. */ -#undef HAVE__FCNTL - -/* Define if you have the _fork function. */ -#undef HAVE__FORK - -/* Define if you have the _fstat function. */ -#undef HAVE__FSTAT - -/* Define if you have the _fstat64 function. */ -#undef HAVE__FSTAT64 - -/* Define if you have the _getcwd function. */ -#undef HAVE__GETCWD - -/* Define if you have the _getdents function. */ -#undef HAVE__GETDENTS - -/* Define if you have the _llseek function. */ -#undef HAVE__LLSEEK - -/* Define if you have the _lseek function. */ -#undef HAVE__LSEEK - -/* Define if you have the _lstat function. */ -#undef HAVE__LSTAT - -/* Define if you have the _lstat64 function. */ -#undef HAVE__LSTAT64 - -/* Define if you have the _open function. */ -#undef HAVE__OPEN - -/* Define if you have the _open64 function. */ -#undef HAVE__OPEN64 - -/* Define if you have the _opendir function. */ -#undef HAVE__OPENDIR - -/* Define if you have the _pread function. */ -#undef HAVE__PREAD - -/* Define if you have the _pread64 function. */ -#undef HAVE__PREAD64 - -/* Define if you have the _pwrite function. */ -#undef HAVE__PWRITE - -/* Define if you have the _pwrite64 function. */ -#undef HAVE__PWRITE64 - -/* Define if you have the _read function. */ -#undef HAVE__READ - -/* Define if you have the _readdir function. */ -#undef HAVE__READDIR - -/* Define if you have the _readdir64 function. */ -#undef HAVE__READDIR64 - -/* Define if you have the _seekdir function. */ -#undef HAVE__SEEKDIR - -/* Define if you have the _stat function. */ -#undef HAVE__STAT - -/* Define if you have the _stat64 function. */ -#undef HAVE__STAT64 +/* Define to check invariants around some common functions */ +#undef DMALLOC_FUNC_CHECK -/* Define if you have the _telldir function. */ -#undef HAVE__TELLDIR +/* Define to turn on dmalloc debugging */ +#undef ENABLE_DMALLOC -/* Define if you have the _write function. */ -#undef HAVE__WRITE +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H -/* Define if you have the asprintf function. */ +/* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF -/* Define if you have the atexit function. */ +/* Define to 1 if you have the `atexit' function. */ #undef HAVE_ATEXIT -/* Define if you have the bigcrypt function. */ +/* Define to 1 if you have the `bigcrypt' function. */ #undef HAVE_BIGCRYPT -/* Define if you have the bzero function. */ +/* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO -/* Define if you have the chmod function. */ +/* Define to 1 if you have the `chmod' function. */ #undef HAVE_CHMOD -/* Define if you have the chown function. */ +/* Define to 1 if you have the `chown' function. */ #undef HAVE_CHOWN -/* Define if you have the chroot function. */ +/* Define to 1 if you have the `chroot' function. */ #undef HAVE_CHROOT -/* Define if you have the connect function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_COMPAT_H + +/* Define to 1 if you have the `connect' function. */ #undef HAVE_CONNECT -/* Define if you have the creat64 function. */ +/* Define to 1 if you have the `creat64' function. */ #undef HAVE_CREAT64 -/* Define if you have the crypt function. */ +/* Define to 1 if you have the `crypt' function. */ #undef HAVE_CRYPT -/* Define if you have the crypt16 function. */ +/* Define to 1 if you have the `crypt16' function. */ #undef HAVE_CRYPT16 -/* Define if you have the dlclose function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_CTYPE_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the `dlclose' function. */ #undef HAVE_DLCLOSE -/* Define if you have the dlerror function. */ +/* Define to 1 if you have the `dlerror' function. */ #undef HAVE_DLERROR -/* Define if you have the dlopen function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the `dlopen' function. */ #undef HAVE_DLOPEN -/* Define if you have the dlsym function. */ +/* Define to 1 if you have the `dlsym' function. */ #undef HAVE_DLSYM -/* Define if you have the dup2 function. */ +/* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 -/* Define if you have the endnetgrent function. */ +/* Define to 1 if you have the `endnetgrent' function. */ #undef HAVE_ENDNETGRENT -/* Define if you have the execl function. */ +/* Define to 1 if you have the `execl' function. */ #undef HAVE_EXECL -/* Define if you have the fchmod function. */ +/* Define to 1 if you have the `fchmod' function. */ #undef HAVE_FCHMOD -/* Define if you have the fchown function. */ +/* Define to 1 if you have the `fchown' function. */ #undef HAVE_FCHOWN -/* Define if you have the fcvt function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `fcvt' function. */ #undef HAVE_FCVT -/* Define if you have the fcvtl function. */ +/* Define to 1 if you have the `fcvtl' function. */ #undef HAVE_FCVTL -/* Define if you have the fopen64 function. */ +/* Define to 1 if you have the `fopen64' function. */ #undef HAVE_FOPEN64 -/* Define if you have the fseek64 function. */ +/* Define to 1 if you have the `fseek64' function. */ #undef HAVE_FSEEK64 -/* Define if you have the fseeko64 function. */ +/* Define to 1 if you have the `fseeko64' function. */ #undef HAVE_FSEEKO64 -/* Define if you have the fstat function. */ +/* Define to 1 if you have the `fstat' function. */ #undef HAVE_FSTAT -/* Define if you have the fstat64 function. */ +/* Define to 1 if you have the `fstat64' function. */ #undef HAVE_FSTAT64 -/* Define if you have the fsync function. */ +/* Define to 1 if you have the `fsync' function. */ #undef HAVE_FSYNC -/* Define if you have the ftell64 function. */ +/* Define to 1 if you have the `ftell64' function. */ #undef HAVE_FTELL64 -/* Define if you have the ftello64 function. */ +/* Define to 1 if you have the `ftello64' function. */ #undef HAVE_FTELLO64 -/* Define if you have the ftruncate function. */ +/* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE -/* Define if you have the ftruncate64 function. */ +/* Define to 1 if you have the `ftruncate64' function. */ #undef HAVE_FTRUNCATE64 -/* Define if you have the getauthuid function. */ +/* Define to 1 if you have the `getauthuid' function. */ #undef HAVE_GETAUTHUID -/* Define if you have the getcwd function. */ +/* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD -/* Define if you have the getdents function. */ +/* Define to 1 if you have the `getdents' function. */ #undef HAVE_GETDENTS -/* Define if you have the getgrent function. */ +/* Define to 1 if you have the `getgrent' function. */ #undef HAVE_GETGRENT -/* Define if you have the getgrnam function. */ +/* Define to 1 if you have the `getgrnam' function. */ #undef HAVE_GETGRNAM -/* Define if you have the getgrouplist function. */ +/* Define to 1 if you have the `getgrouplist' function. */ #undef HAVE_GETGROUPLIST -/* Define if you have the getnetgrent function. */ +/* Define to 1 if you have the `getnetgrent' function. */ #undef HAVE_GETNETGRENT -/* Define if you have the getprpwnam function. */ +/* Define to 1 if you have the `getprpwnam' function. */ #undef HAVE_GETPRPWNAM -/* Define if you have the getpwanam function. */ +/* Define to 1 if you have the `getpwanam' function. */ #undef HAVE_GETPWANAM -/* Define if you have the getrlimit function. */ +/* Define to 1 if you have the `getrlimit' function. */ #undef HAVE_GETRLIMIT -/* Define if you have the getspnam function. */ +/* Define to 1 if you have the `getspnam' function. */ #undef HAVE_GETSPNAM -/* Define if you have the getutmpx function. */ +/* Define to 1 if you have the `getutmpx' function. */ #undef HAVE_GETUTMPX -/* Define if you have the glob function. */ +/* Define to 1 if you have the `glob' function. */ #undef HAVE_GLOB -/* Define if you have the grantpt function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_GLOB_H + +/* Define to 1 if you have the `grantpt' function. */ #undef HAVE_GRANTPT -/* Define if you have the initgroups function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_GRP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GSSAPI_GSSAPI_GENERIC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GSSAPI_GSSAPI_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_HISTORY_H + +/* Define to 1 if you have the `initgroups' function. */ #undef HAVE_INITGROUPS -/* Define if you have the innetgr function. */ +/* Define to 1 if you have the `innetgr' function. */ #undef HAVE_INNETGR -/* Define if you have the ldap_set_rebind_proc function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_KRB5_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LASTLOG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LBER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LDAP_H + +/* Define to 1 if you have the `ldap_set_rebind_proc' function. */ #undef HAVE_LDAP_SET_REBIND_PROC -/* Define if you have the link function. */ +/* Define to 1 if you have the `acl' library (-lacl). */ +#undef HAVE_LIBACL + +/* Define to 1 if you have the `gen' library (-lgen). */ +#undef HAVE_LIBGEN + +/* Define to 1 if you have the `iconv' library (-liconv). */ +#undef HAVE_LIBICONV + +/* Define to 1 if you have the `inet' library (-linet). */ +#undef HAVE_LIBINET + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define to 1 if you have the `nsl_s' library (-lnsl_s). */ +#undef HAVE_LIBNSL_S + +/* Define to 1 if you have the `resolv' library (-lresolv). */ +#undef HAVE_LIBRESOLV + +/* Define to 1 if you have the `sec' library (-lsec). */ +#undef HAVE_LIBSEC + +/* Define to 1 if you have the `security' library (-lsecurity). */ +#undef HAVE_LIBSECURITY + +/* Define to 1 if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the `link' function. */ #undef HAVE_LINK -/* Define if you have the llseek function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_XQM_H + +/* Define to 1 if you have the `llseek' function. */ #undef HAVE_LLSEEK -/* Define if you have the lseek64 function. */ +/* Define to 1 if you have the `lseek64' function. */ #undef HAVE_LSEEK64 -/* Define if you have the lstat64 function. */ +/* Define to 1 if you have the `lstat64' function. */ #undef HAVE_LSTAT64 -/* Define if you have the memmove function. */ +/* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE -/* Define if you have the memset function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET -/* Define if you have the mknod function. */ +/* Define to 1 if you have the `mknod' function. */ #undef HAVE_MKNOD -/* Define if you have the mknod64 function. */ +/* Define to 1 if you have the `mknod64' function. */ #undef HAVE_MKNOD64 -/* Define if you have the mktime function. */ +/* Define to 1 if you have the `mktime' function. */ #undef HAVE_MKTIME -/* Define if you have the open64 function. */ -#undef HAVE_OPEN64 +/* Define to 1 if you have the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H -/* Define if you have the pathconf function. */ -#undef HAVE_PATHCONF +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_IP_H -/* Define if you have the pipe function. */ -#undef HAVE_PIPE +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_SYSTM_H -/* Define if you have the poll function. */ -#undef HAVE_POLL +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IP_H -/* Define if you have the pread function. */ -#undef HAVE_PREAD +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_TCP_H -/* Define if you have the pread64 function. */ -#undef HAVE_PREAD64 +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_H -/* Define if you have the putprpwnam function. */ -#undef HAVE_PUTPRPWNAM +/* Do we have rl_completion_matches? */ +#undef HAVE_NEW_LIBREADLINE + +/* Define to 1 if you have the header file. */ +#undef HAVE_NSS_COMMON_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NSS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NS_API_H + +/* Define to 1 if you have the `open64' function. */ +#undef HAVE_OPEN64 + +/* Define to 1 if you have the `pathconf' function. */ +#undef HAVE_PATHCONF -/* Define if you have the pututline function. */ +/* Define to 1 if you have the `pipe' function. */ +#undef HAVE_PIPE + +/* Define to 1 if you have the `poll' function. */ +#undef HAVE_POLL + +/* Define to 1 if you have the header file. */ +#undef HAVE_POLL_H + +/* Define to 1 if you have the `pread' function. */ +#undef HAVE_PREAD + +/* Define to 1 if you have the `pread64' function. */ +#undef HAVE_PREAD64 + +/* Define to 1 if you have the `putprpwnam' function. */ +#undef HAVE_PUTPRPWNAM + +/* Define to 1 if you have the `pututline' function. */ #undef HAVE_PUTUTLINE -/* Define if you have the pututxline function. */ +/* Define to 1 if you have the `pututxline' function. */ #undef HAVE_PUTUTXLINE -/* Define if you have the pwrite function. */ +/* Define to 1 if you have the `pwrite' function. */ #undef HAVE_PWRITE -/* Define if you have the pwrite64 function. */ +/* Define to 1 if you have the `pwrite64' function. */ #undef HAVE_PWRITE64 -/* Define if you have the rand function. */ +/* Define to 1 if you have the `rand' function. */ #undef HAVE_RAND -/* Define if you have the random function. */ +/* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM -/* Define if you have the rdchk function. */ +/* Define to 1 if you have the `rdchk' function. */ #undef HAVE_RDCHK -/* Define if you have the readdir64 function. */ +/* Define to 1 if you have the `readdir64' function. */ #undef HAVE_READDIR64 -/* Define if you have the readlink function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_READLINE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_READLINE_HISTORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_READLINE_READLINE_H + +/* Define to 1 if you have the `readlink' function. */ #undef HAVE_READLINK -/* Define if you have the realpath function. */ +/* Define to 1 if you have the `realpath' function. */ #undef HAVE_REALPATH -/* Define if you have the rename function. */ +/* Define to 1 if you have the `rename' function. */ #undef HAVE_RENAME -/* Define if you have the select function. */ -#undef HAVE_SELECT +/* Define to 1 if you have the header file. */ +#undef HAVE_RPCSVC_NIS_H -/* Define if you have the set_auth_parameters function. */ -#undef HAVE_SET_AUTH_PARAMETERS +/* Define to 1 if you have the header file. */ +#undef HAVE_RPCSVC_YPCLNT_H -/* Define if you have the setbuffer function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_RPCSVC_YP_PROT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPC_RPC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SECURITY_PAM_APPL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SECURITY_PAM_MODULES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SECURITY__PAM_MACROS_H + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define to 1 if you have the `setbuffer' function. */ #undef HAVE_SETBUFFER -/* Define if you have the setenv function. */ +/* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV -/* Define if you have the setgidx function. */ +/* Define to 1 if you have the `setgidx' function. */ #undef HAVE_SETGIDX -/* Define if you have the setgroups function. */ +/* Define to 1 if you have the `setgroups' function. */ #undef HAVE_SETGROUPS -/* Define if you have the setlinebuf function. */ +/* Define to 1 if you have the `setlinebuf' function. */ #undef HAVE_SETLINEBUF -/* Define if you have the setluid function. */ +/* Define to 1 if you have the `setluid' function. */ #undef HAVE_SETLUID -/* Define if you have the setnetgrent function. */ +/* Define to 1 if you have the `setnetgrent' function. */ #undef HAVE_SETNETGRENT -/* Define if you have the setpgid function. */ +/* Define to 1 if you have the `setpgid' function. */ #undef HAVE_SETPGID -/* Define if you have the setpriv function. */ +/* Define to 1 if you have the `setpriv' function. */ #undef HAVE_SETPRIV -/* Define if you have the setsid function. */ +/* Define to 1 if you have the `setsid' function. */ #undef HAVE_SETSID -/* Define if you have the setuidx function. */ +/* Define to 1 if you have the `setuidx' function. */ #undef HAVE_SETUIDX -/* Define if you have the sigaction function. */ +/* Define to 1 if you have the `set_auth_parameters' function. */ +#undef HAVE_SET_AUTH_PARAMETERS + +/* Define to 1 if you have the header file. */ +#undef HAVE_SHADOW_H + +/* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION -/* Define if you have the sigblock function. */ +/* Define to 1 if you have the `sigblock' function. */ #undef HAVE_SIGBLOCK -/* Define if you have the sigprocmask function. */ +/* Define to 1 if you have the `sigprocmask' function. */ #undef HAVE_SIGPROCMASK -/* Define if you have the sigset function. */ +/* Define to 1 if you have the `sigset' function. */ #undef HAVE_SIGSET -/* Define if you have the snprintf function. */ +/* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF -/* Define if you have the srand function. */ +/* Define to 1 if you have the `srand' function. */ #undef HAVE_SRAND -/* Define if you have the srandom function. */ +/* Define to 1 if you have the `srandom' function. */ #undef HAVE_SRANDOM -/* Define if you have the stat64 function. */ +/* Define to 1 if you have the `stat64' function. */ #undef HAVE_STAT64 -/* Define if you have the strcasecmp function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_STDARG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP -/* Define if you have the strchr function. */ +/* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR -/* Define if you have the strdup function. */ +/* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP -/* Define if you have the strerror function. */ +/* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR -/* Define if you have the strftime function. */ +/* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME -/* Define if you have the strlcat function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strlcat' function. */ #undef HAVE_STRLCAT -/* Define if you have the strlcpy function. */ +/* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY -/* Define if you have the strndup function. */ +/* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP -/* Define if you have the strnlen function. */ +/* Define to 1 if you have the `strnlen' function. */ #undef HAVE_STRNLEN -/* Define if you have the strpbrk function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_STROPTS_H + +/* Define to 1 if you have the `strpbrk' function. */ #undef HAVE_STRPBRK -/* Define if you have the strtoul function. */ +/* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL -/* Define if you have the symlink function. */ +/* Define to 1 if `st_rdev' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_RDEV + +/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use + `HAVE_STRUCT_STAT_ST_RDEV' instead. */ +#undef HAVE_ST_RDEV + +/* Define to 1 if you have the `symlink' function. */ #undef HAVE_SYMLINK -/* Define if you have the syscall function. */ +/* Define to 1 if you have the `syscall' function. */ #undef HAVE_SYSCALL -/* Define if you have the sysconf function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_SYSCALL_H + +/* Define to 1 if you have the `sysconf' function. */ #undef HAVE_SYSCONF -/* Define if you have the syslog function. */ +/* Define to 1 if you have the `syslog' function. */ #undef HAVE_SYSLOG -/* Define if you have the updwtmp function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_SYSLOG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_ACL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CAPABILITY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CDEFS_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_DUSTAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FCNTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FILIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FILSYS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_S5PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_VX_QUOTA_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_ID_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IPC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MMAN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MODE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MOUNT_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PRIV_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SECURITY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SHM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATVFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSCALL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSLOG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TERMIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TERMIOS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TERMIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `updwtmp' function. */ #undef HAVE_UPDWTMP -/* Define if you have the updwtmpx function. */ +/* Define to 1 if you have the `updwtmpx' function. */ #undef HAVE_UPDWTMPX -/* Define if you have the usleep function. */ +/* Define to 1 if you have the `usleep' function. */ #undef HAVE_USLEEP -/* Define if you have the utime function. */ +/* Define to 1 if you have the `utime' function. */ #undef HAVE_UTIME -/* Define if you have the utimes function. */ +/* Define to 1 if you have the `utimes' function. */ #undef HAVE_UTIMES -/* Define if you have the vasprintf function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_UTIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UTMPX_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UTMP_H + +/* Define to 1 if you have the `vasprintf' function. */ #undef HAVE_VASPRINTF -/* Define if you have the vsnprintf function. */ +/* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF -/* Define if you have the vsyslog function. */ +/* Define to 1 if you have the `vsyslog' function. */ #undef HAVE_VSYSLOG -/* Define if you have the waitpid function. */ +/* Define to 1 if you have the `waitpid' function. */ #undef HAVE_WAITPID -/* Define if you have the yp_get_default_domain function. */ -#undef HAVE_YP_GET_DEFAULT_DOMAIN - -/* Define if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Define if you have the header file. */ -#undef HAVE_COMPAT_H - -/* Define if you have the header file. */ -#undef HAVE_CTYPE_H +/* Define if you have working AF_LOCAL sockets */ +#undef HAVE_WORKING_AF_LOCAL -/* Define if you have the header file. */ -#undef HAVE_DIRENT_H +/* Define to 1 if you have the `yp_get_default_domain' function. */ +#undef HAVE_YP_GET_DEFAULT_DOMAIN -/* Define if you have the header file. */ -#undef HAVE_DLFCN_H +/* Define to 1 if you have the `_acl' function. */ +#undef HAVE__ACL -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H +/* Define to 1 if you have the `_chdir' function. */ +#undef HAVE__CHDIR -/* Define if you have the header file. */ -#undef HAVE_GLOB_H +/* Define to 1 if you have the `_close' function. */ +#undef HAVE__CLOSE -/* Define if you have the header file. */ -#undef HAVE_GRP_H +/* Define to 1 if you have the `_closedir' function. */ +#undef HAVE__CLOSEDIR -/* Define if you have the header file. */ -#undef HAVE_GSSAPI_GSSAPI_H +/* Define to 1 if you have the `_dup' function. */ +#undef HAVE__DUP -/* Define if you have the header file. */ -#undef HAVE_GSSAPI_GSSAPI_GENERIC_H +/* Define to 1 if you have the `_dup2' function. */ +#undef HAVE__DUP2 -/* Define if you have the header file. */ -#undef HAVE_HISTORY_H +/* Define to 1 if you have the `_facl' function. */ +#undef HAVE__FACL -/* Define if you have the header file. */ -#undef HAVE_KRB5_H +/* Define to 1 if you have the `_fchdir' function. */ +#undef HAVE__FCHDIR -/* Define if you have the header file. */ -#undef HAVE_LASTLOG_H +/* Define to 1 if you have the `_fcntl' function. */ +#undef HAVE__FCNTL -/* Define if you have the header file. */ -#undef HAVE_LBER_H +/* Define to 1 if you have the `_fork' function. */ +#undef HAVE__FORK -/* Define if you have the header file. */ -#undef HAVE_LDAP_H +/* Define to 1 if you have the `_fstat' function. */ +#undef HAVE__FSTAT -/* Define if you have the header file. */ -#undef HAVE_LIMITS_H +/* Define to 1 if you have the `_fstat64' function. */ +#undef HAVE__FSTAT64 -/* Define if you have the header file. */ -#undef HAVE_LINUX_XQM_H +/* Define to 1 if you have the `_getcwd' function. */ +#undef HAVE__GETCWD -/* Define if you have the header file. */ -#undef HAVE_MEMORY_H +/* Define to 1 if you have the `_getdents' function. */ +#undef HAVE__GETDENTS -/* Define if you have the header file. */ -#undef HAVE_NDIR_H +/* Define to 1 if you have the `_llseek' function. */ +#undef HAVE__LLSEEK -/* Define if you have the header file. */ -#undef HAVE_NET_IF_H +/* Define to 1 if you have the `_lseek' function. */ +#undef HAVE__LSEEK -/* Define if you have the header file. */ -#undef HAVE_NETINET_IN_IP_H +/* Define to 1 if you have the `_lstat' function. */ +#undef HAVE__LSTAT -/* Define if you have the header file. */ -#undef HAVE_NETINET_IN_SYSTM_H +/* Define to 1 if you have the `_lstat64' function. */ +#undef HAVE__LSTAT64 -/* Define if you have the header file. */ -#undef HAVE_NETINET_IP_H +/* Define to 1 if you have the `_open' function. */ +#undef HAVE__OPEN -/* Define if you have the header file. */ -#undef HAVE_NETINET_TCP_H +/* Define to 1 if you have the `_open64' function. */ +#undef HAVE__OPEN64 -/* Define if you have the header file. */ -#undef HAVE_NS_API_H +/* Define to 1 if you have the `_opendir' function. */ +#undef HAVE__OPENDIR -/* Define if you have the header file. */ -#undef HAVE_NSS_H +/* Define to 1 if you have the `_pread' function. */ +#undef HAVE__PREAD -/* Define if you have the header file. */ -#undef HAVE_NSS_COMMON_H +/* Define to 1 if you have the `_pread64' function. */ +#undef HAVE__PREAD64 -/* Define if you have the header file. */ -#undef HAVE_POLL_H +/* Define to 1 if you have the `_pwrite' function. */ +#undef HAVE__PWRITE -/* Define if you have the header file. */ -#undef HAVE_READLINE_H +/* Define to 1 if you have the `_pwrite64' function. */ +#undef HAVE__PWRITE64 -/* Define if you have the header file. */ -#undef HAVE_READLINE_HISTORY_H +/* Define to 1 if you have the `_read' function. */ +#undef HAVE__READ -/* Define if you have the header file. */ -#undef HAVE_READLINE_READLINE_H +/* Define to 1 if you have the `_readdir' function. */ +#undef HAVE__READDIR -/* Define if you have the header file. */ -#undef HAVE_RPC_RPC_H +/* Define to 1 if you have the `_readdir64' function. */ +#undef HAVE__READDIR64 -/* Define if you have the header file. */ -#undef HAVE_RPCSVC_NIS_H +/* Define to 1 if you have the `_seekdir' function. */ +#undef HAVE__SEEKDIR -/* Define if you have the header file. */ -#undef HAVE_RPCSVC_YP_PROT_H +/* Define to 1 if you have the `_stat' function. */ +#undef HAVE__STAT -/* Define if you have the header file. */ -#undef HAVE_RPCSVC_YPCLNT_H +/* Define to 1 if you have the `_stat64' function. */ +#undef HAVE__STAT64 -/* Define if you have the header file. */ -#undef HAVE_SECURITY__PAM_MACROS_H +/* Define to 1 if you have the `_telldir' function. */ +#undef HAVE__TELLDIR -/* Define if you have the header file. */ -#undef HAVE_SECURITY_PAM_APPL_H +/* Define to 1 if you have the `_write' function. */ +#undef HAVE__WRITE -/* Define if you have the header file. */ -#undef HAVE_SECURITY_PAM_MODULES_H +/* Define to 1 if you have the `__acl' function. */ +#undef HAVE___ACL -/* Define if you have the header file. */ -#undef HAVE_SHADOW_H +/* Define to 1 if you have the `__chdir' function. */ +#undef HAVE___CHDIR -/* Define if you have the header file. */ -#undef HAVE_STDARG_H +/* Define to 1 if you have the `__close' function. */ +#undef HAVE___CLOSE -/* Define if you have the header file. */ -#undef HAVE_STDLIB_H +/* Define to 1 if you have the `__closedir' function. */ +#undef HAVE___CLOSEDIR -/* Define if you have the header file. */ -#undef HAVE_STRING_H +/* Define to 1 if you have the `__dup' function. */ +#undef HAVE___DUP -/* Define if you have the header file. */ -#undef HAVE_STRINGS_H +/* Define to 1 if you have the `__dup2' function. */ +#undef HAVE___DUP2 -/* Define if you have the header file. */ -#undef HAVE_STROPTS_H +/* Define to 1 if you have the `__facl' function. */ +#undef HAVE___FACL -/* Define if you have the header file. */ -#undef HAVE_SYS_ACL_H +/* Define to 1 if you have the `__fchdir' function. */ +#undef HAVE___FCHDIR -/* Define if you have the header file. */ -#undef HAVE_SYS_CAPABILITY_H +/* Define to 1 if you have the `__fcntl' function. */ +#undef HAVE___FCNTL -/* Define if you have the header file. */ -#undef HAVE_SYS_CDEFS_H +/* Define to 1 if you have the `__fork' function. */ +#undef HAVE___FORK -/* Define if you have the header file. */ -#undef HAVE_SYS_DIR_H +/* Define to 1 if you have the `__fstat' function. */ +#undef HAVE___FSTAT -/* Define if you have the header file. */ -#undef HAVE_SYS_DUSTAT_H +/* Define to 1 if you have the `__fstat64' function. */ +#undef HAVE___FSTAT64 -/* Define if you have the header file. */ -#undef HAVE_SYS_FCNTL_H +/* Define to 1 if you have the `__fxstat' function. */ +#undef HAVE___FXSTAT -/* Define if you have the header file. */ -#undef HAVE_SYS_FILIO_H +/* Define to 1 if you have the `__getcwd' function. */ +#undef HAVE___GETCWD -/* Define if you have the header file. */ -#undef HAVE_SYS_FILSYS_H +/* Define to 1 if you have the `__getdents' function. */ +#undef HAVE___GETDENTS -/* Define if you have the header file. */ -#undef HAVE_SYS_FS_S5PARAM_H +/* Define to 1 if you have the `__llseek' function. */ +#undef HAVE___LLSEEK -/* Define if you have the header file. */ -#undef HAVE_SYS_FS_VX_QUOTA_H +/* Define to 1 if you have the `__lseek' function. */ +#undef HAVE___LSEEK -/* Define if you have the header file. */ -#undef HAVE_SYS_ID_H +/* Define to 1 if you have the `__lstat' function. */ +#undef HAVE___LSTAT -/* Define if you have the header file. */ -#undef HAVE_SYS_IOCTL_H +/* Define to 1 if you have the `__lstat64' function. */ +#undef HAVE___LSTAT64 -/* Define if you have the header file. */ -#undef HAVE_SYS_IPC_H +/* Define to 1 if you have the `__lxstat' function. */ +#undef HAVE___LXSTAT -/* Define if you have the header file. */ -#undef HAVE_SYS_MMAN_H +/* Define to 1 if you have the `__open' function. */ +#undef HAVE___OPEN -/* Define if you have the header file. */ -#undef HAVE_SYS_MODE_H +/* Define to 1 if you have the `__open64' function. */ +#undef HAVE___OPEN64 -/* Define if you have the header file. */ -#undef HAVE_SYS_MOUNT_H +/* Define to 1 if you have the `__opendir' function. */ +#undef HAVE___OPENDIR -/* Define if you have the header file. */ -#undef HAVE_SYS_NDIR_H +/* Define to 1 if you have the `__pread' function. */ +#undef HAVE___PREAD -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H +/* Define to 1 if you have the `__pread64' function. */ +#undef HAVE___PREAD64 -/* Define if you have the header file. */ -#undef HAVE_SYS_PRIV_H +/* Define to 1 if you have the `__pwrite' function. */ +#undef HAVE___PWRITE -/* Define if you have the header file. */ -#undef HAVE_SYS_RESOURCE_H +/* Define to 1 if you have the `__pwrite64' function. */ +#undef HAVE___PWRITE64 -/* Define if you have the header file. */ -#undef HAVE_SYS_SECURITY_H +/* Define to 1 if you have the `__read' function. */ +#undef HAVE___READ -/* Define if you have the header file. */ -#undef HAVE_SYS_SELECT_H +/* Define to 1 if you have the `__readdir' function. */ +#undef HAVE___READDIR -/* Define if you have the header file. */ -#undef HAVE_SYS_SHM_H +/* Define to 1 if you have the `__readdir64' function. */ +#undef HAVE___READDIR64 -/* Define if you have the header file. */ -#undef HAVE_SYS_SOCKET_H +/* Define to 1 if you have the `__seekdir' function. */ +#undef HAVE___SEEKDIR -/* Define if you have the header file. */ -#undef HAVE_SYS_SOCKIO_H +/* Define to 1 if you have the `__stat' function. */ +#undef HAVE___STAT -/* Define if you have the header file. */ -#undef HAVE_SYS_STATFS_H +/* Define to 1 if you have the `__stat64' function. */ +#undef HAVE___STAT64 -/* Define if you have the header file. */ -#undef HAVE_SYS_STATVFS_H +/* Define to 1 if you have the `__sys_llseek' function. */ +#undef HAVE___SYS_LLSEEK -/* Define if you have the header file. */ -#undef HAVE_SYS_SYSCALL_H +/* Define to 1 if you have the `__telldir' function. */ +#undef HAVE___TELLDIR -/* Define if you have the header file. */ -#undef HAVE_SYS_SYSLOG_H +/* Define to 1 if you have the `__write' function. */ +#undef HAVE___WRITE -/* Define if you have the header file. */ -#undef HAVE_SYS_TERMIO_H +/* Define to 1 if you have the `__xstat' function. */ +#undef HAVE___XSTAT -/* Define if you have the header file. */ -#undef HAVE_SYS_TIME_H +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O -/* Define if you have the header file. */ -#undef HAVE_SYS_UNISTD_H +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT -/* Define if you have the header file. */ -#undef HAVE_SYS_VFS_H +/* Define to the full name of this package. */ +#undef PACKAGE_NAME -/* Define if you have the header file. */ -#undef HAVE_SYS_WAIT_H +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING -/* Define if you have the header file. */ -#undef HAVE_SYSCALL_H +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME -/* Define if you have the header file. */ -#undef HAVE_SYSLOG_H +/* Define to the version of this package. */ +#undef PACKAGE_VERSION -/* Define if you have the header file. */ -#undef HAVE_TERMIO_H +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE -/* Define if you have the header file. */ -#undef HAVE_TERMIOS_H +/* The size of a `int', as computed by sizeof. */ +#undef SIZEOF_INT -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H +/* The size of a `long', as computed by sizeof. */ +#undef SIZEOF_LONG -/* Define if you have the header file. */ -#undef HAVE_UTIME_H +/* The size of a `short', as computed by sizeof. */ +#undef SIZEOF_SHORT -/* Define if you have the header file. */ -#undef HAVE_UTMP_H +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS -/* Define if you have the header file. */ -#undef HAVE_UTMPX_H +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME -/* Define if you have the acl library (-lacl). */ -#undef HAVE_LIBACL +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN -/* Define if you have the gen library (-lgen). */ -#undef HAVE_LIBGEN +/* Define to 1 if type `char' is unsigned and you are not using gcc. */ +#ifndef __CHAR_UNSIGNED__ +# undef __CHAR_UNSIGNED__ +#endif -/* Define if you have the iconv library (-liconv). */ -#undef HAVE_LIBICONV +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const -/* Define if you have the inet library (-linet). */ -#undef HAVE_LIBINET +/* Define to `int' if doesn't define. */ +#undef gid_t -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +#undef inline -/* Define if you have the nsl_s library (-lnsl_s). */ -#undef HAVE_LIBNSL_S +/* Define to `unsigned' if does not define. */ +#undef ino_t -/* Define if you have the resolv library (-lresolv). */ -#undef HAVE_LIBRESOLV +/* Define to `off_t' if does not define. */ +#undef loff_t -/* Define if you have the sec library (-lsec). */ -#undef HAVE_LIBSEC +/* Define to `int' if does not define. */ +#undef mode_t -/* Define if you have the security library (-lsecurity). */ -#undef HAVE_LIBSECURITY +/* Define to `long' if does not define. */ +#undef off_t -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET +/* Define to `loff_t' if does not define. */ +#undef offset_t -/* Define to turn on dmalloc debugging */ -#undef ENABLE_DMALLOC +/* Define to `int' if does not define. */ +#undef pid_t -/* Define to check invariants around some common functions */ -#undef DMALLOC_FUNC_CHECK +/* Define to `unsigned' if does not define. */ +#undef size_t -/* Do we have rl_completion_matches? */ -#undef HAVE_NEW_LIBREADLINE +/* Define to `int' if does not define. */ +#undef ssize_t -/* Define if you have working AF_LOCAL sockets */ -#undef HAVE_WORKING_AF_LOCAL +/* Define to `int' if doesn't define. */ +#undef uid_t +/* Define to `unsigned short' if does not define. */ +#undef wchar_t diff --git a/source3/include/includes.h b/source3/include/includes.h index 56b8357831..01b9f14979 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -823,11 +823,6 @@ struct printjob; #define QSORT_CAST (int (*)(const void *, const void *)) #endif -/* this guess needs to be improved (tridge) */ -#if (defined(STAT_STATVFS) || defined(STAT_STATVFS64)) && !defined(SYSV) -#define SYSV 1 -#endif - #ifndef DEFAULT_PRINTING #ifdef HAVE_CUPS #define DEFAULT_PRINTING PRINT_CUPS -- cgit