diff options
author | Rechi <Rechi@users.noreply.github.com> | 2017-05-22 22:14:00 +0200 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2017-05-22 22:14:00 +0200 |
commit | 18eafc694a2d12c2664ff29e692d5e4a3a1ddbc3 (patch) | |
tree | b96f558acdbe5f6b392e10e2ac765a95cc4e7897 /tools/depends | |
parent | 1d4808aa6da8a5911cc560c1e83a437ed7348106 (diff) |
[depends] Bump samba-gplv3 to version 4.1.23
Diffstat (limited to 'tools/depends')
-rw-r--r-- | tools/depends/target/samba-gplv3/Makefile | 9 | ||||
-rw-r--r-- | tools/depends/target/samba-gplv3/autotools41.patch | 36370 | ||||
-rw-r--r-- | tools/depends/target/samba-gplv3/no_fork_and_exec.patch | 24 | ||||
-rw-r--r-- | tools/depends/target/samba-gplv3/perlArrayDefinedDeprecated.patch | 22 | ||||
-rw-r--r-- | tools/depends/target/samba-gplv3/samba_android.patch | 14 | ||||
-rw-r--r-- | tools/depends/target/samba-gplv3/samba_off64_t.patch | 147 |
6 files changed, 36454 insertions, 132 deletions
diff --git a/tools/depends/target/samba-gplv3/Makefile b/tools/depends/target/samba-gplv3/Makefile index b943518381..ea529717b0 100644 --- a/tools/depends/target/samba-gplv3/Makefile +++ b/tools/depends/target/samba-gplv3/Makefile @@ -1,9 +1,9 @@ include ../../Makefile.include -DEPS= ../../Makefile.include Makefile configureEndian.patch perlArrayDefinedDeprecated.patch samba_android.patch samba_off64_t.patch no_fork_and_exec.patch +DEPS= ../../Makefile.include Makefile autotools41.patch configureEndian.patch samba_android.patch samba_off64_t.patch no_fork_and_exec.patch # lib name, version LIBNAME=samba -VERSION=4.0.26 +VERSION=4.1.23 SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.gz @@ -21,7 +21,7 @@ CONFIGURE= cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \ --without-winbind --disable-cups --without-ads \ --disable-avahi \ --without-dnsupdate \ - --without-ad-dc --without-acl-support \ + --without-acl-support \ --with-libiconv=$(STAGING_DIR) # configuration settings @@ -49,8 +49,9 @@ $(TARBALLS_LOCATION)/$(ARCHIVE): $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) rm -rf $(PLATFORM); mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); patch -p1 -i ../autotools41.patch cd $(PLATFORM); patch -p0 -i ../configureEndian.patch - cd $(PLATFORM); patch -p1 -i ../perlArrayDefinedDeprecated.patch + cd $(PLATFORM); chmod +x source3/autogen.sh source3/script/*.sh librpc/build_idl.sh cd $(PLATFORM)/source3; ./autogen.sh ifeq ($(OS),android) cd $(PLATFORM); patch -p0 < ../samba_android.patch diff --git a/tools/depends/target/samba-gplv3/autotools41.patch b/tools/depends/target/samba-gplv3/autotools41.patch new file mode 100644 index 0000000000..02816b062a --- /dev/null +++ b/tools/depends/target/samba-gplv3/autotools41.patch @@ -0,0 +1,36370 @@ +From a5e3c1adf14742d87e794267968dd156ff1eaa32 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:19 +0200 +Subject: [PATCH 01/19] Revert "build: Build with system md5.h on OpenIndiana" + +This reverts commit fc13489c91e790ff8952aff1e7db1e6189894e30. +--- + auth/credentials/credentials_ntlm.c | 2 +- + auth/ntlmssp/ntlmssp_server.c | 2 +- + auth/ntlmssp/ntlmssp_sign.c | 2 +- + lib/crypto/hmacmd5.c | 4 ++-- + lib/crypto/hmacmd5.h | 2 +- + lib/crypto/md5.c | 6 +++--- + lib/crypto/md5test.c | 2 +- + lib/crypto/wscript_build | 2 +- + libcli/auth/credentials.c | 2 +- + libcli/auth/schannel_sign.c | 2 +- + libcli/auth/smbencrypt.c | 8 ++++---- + libcli/drsuapi/repl_decrypt.c | 4 ++-- + libcli/smb/smb_signing.c | 2 +- + source3/libsmb/ntlmssp.c | 2 +- + source3/modules/vfs_streams_xattr.c | 2 +- + source3/rpc_client/init_samr.c | 2 +- + source4/dsdb/samdb/ldb_modules/password_hash.c | 2 +- + source4/libcli/raw/smb_signing.c | 4 ++-- + source4/libnet/libnet_passwd.c | 4 ++-- + source4/ntp_signd/ntp_signd.c | 2 +- + source4/rpc_server/samr/samr_password.c | 2 +- + source4/torture/ntp/ntp_signd.c | 2 +- + source4/torture/rpc/samba3rpc.c | 2 +- + source4/torture/rpc/samlogon.c | 2 +- + source4/torture/rpc/samr.c | 8 ++++---- + 25 files changed, 37 insertions(+), 37 deletions(-) + +diff --git a/auth/credentials/credentials_ntlm.c b/auth/credentials/credentials_ntlm.c +index 8f143bf..2d6d6f6 100644 +--- a/auth/credentials/credentials_ntlm.c ++++ b/auth/credentials/credentials_ntlm.c +@@ -110,7 +110,7 @@ _PUBLIC_ NTSTATUS cli_credentials_get_ntlm_response(struct cli_credentials *cred + /* LM Key is incompatible... */ + *flags &= ~CLI_CRED_LANMAN_AUTH; + } else if (*flags & CLI_CRED_NTLM2) { +- MD5_CTX md5_session_nonce_ctx; ++ struct MD5Context md5_session_nonce_ctx; + uint8_t session_nonce[16]; + uint8_t session_nonce_hash[16]; + uint8_t user_session_key[16]; +diff --git a/auth/ntlmssp/ntlmssp_server.c b/auth/ntlmssp/ntlmssp_server.c +index 57179e1..442bd5d 100644 +--- a/auth/ntlmssp/ntlmssp_server.c ++++ b/auth/ntlmssp/ntlmssp_server.c +@@ -369,7 +369,7 @@ static NTSTATUS ntlmssp_server_preauth(struct gensec_security *gensec_security, + */ + if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_NTLM2) { + if (ntlmssp_state->nt_resp.length == 24 && ntlmssp_state->lm_resp.length == 24) { +- MD5_CTX md5_session_nonce_ctx; ++ struct MD5Context md5_session_nonce_ctx; + state->doing_ntlm2 = true; + + memcpy(state->session_nonce, ntlmssp_state->internal_chal.data, 8); +diff --git a/auth/ntlmssp/ntlmssp_sign.c b/auth/ntlmssp/ntlmssp_sign.c +index c0be914..4d07a81 100644 +--- a/auth/ntlmssp/ntlmssp_sign.c ++++ b/auth/ntlmssp/ntlmssp_sign.c +@@ -51,7 +51,7 @@ static void calc_ntlmv2_key(uint8_t subkey[16], + DATA_BLOB session_key, + const char *constant) + { +- MD5_CTX ctx3; ++ struct MD5Context ctx3; + MD5Init(&ctx3); + MD5Update(&ctx3, session_key.data, session_key.length); + MD5Update(&ctx3, (const uint8_t *)constant, strlen(constant)+1); +diff --git a/lib/crypto/hmacmd5.c b/lib/crypto/hmacmd5.c +index 882788c..cfbd428 100644 +--- a/lib/crypto/hmacmd5.c ++++ b/lib/crypto/hmacmd5.c +@@ -36,7 +36,7 @@ _PUBLIC_ void hmac_md5_init_rfc2104(const uint8_t *key, int key_len, HMACMD5Cont + /* if key is longer than 64 bytes reset it to key=MD5(key) */ + if (key_len > 64) + { +- MD5_CTX tctx; ++ struct MD5Context tctx; + + MD5Init(&tctx); + MD5Update(&tctx, key, key_len); +@@ -91,7 +91,7 @@ _PUBLIC_ void hmac_md5_update(const uint8_t *text, int text_len, HMACMD5Context + ***********************************************************************/ + _PUBLIC_ void hmac_md5_final(uint8_t *digest, HMACMD5Context *ctx) + { +- MD5_CTX ctx_o; ++ struct MD5Context ctx_o; + + MD5Final(digest, &ctx->ctx); + +diff --git a/lib/crypto/hmacmd5.h b/lib/crypto/hmacmd5.h +index aa43d24..91b8ca5 100644 +--- a/lib/crypto/hmacmd5.h ++++ b/lib/crypto/hmacmd5.h +@@ -25,7 +25,7 @@ + + typedef struct + { +- MD5_CTX ctx; ++ struct MD5Context ctx; + uint8_t k_ipad[65]; + uint8_t k_opad[65]; + +diff --git a/lib/crypto/md5.c b/lib/crypto/md5.c +index 352f80f..3af7f07 100644 +--- a/lib/crypto/md5.c ++++ b/lib/crypto/md5.c +@@ -43,7 +43,7 @@ static void byteReverse(uint8_t *buf, unsigned int longs) + * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious + * initialization constants. + */ +-_PUBLIC_ void MD5Init(MD5_CTX *ctx) ++_PUBLIC_ void MD5Init(struct MD5Context *ctx) + { + ctx->buf[0] = 0x67452301; + ctx->buf[1] = 0xefcdab89; +@@ -58,7 +58,7 @@ _PUBLIC_ void MD5Init(MD5_CTX *ctx) + * Update context to reflect the concatenation of another buffer full + * of bytes. + */ +-_PUBLIC_ void MD5Update(MD5_CTX *ctx, const uint8_t *buf, size_t len) ++_PUBLIC_ void MD5Update(struct MD5Context *ctx, const uint8_t *buf, size_t len) + { + register uint32_t t; + +@@ -106,7 +106,7 @@ _PUBLIC_ void MD5Update(MD5_CTX *ctx, const uint8_t *buf, size_t len) + * Final wrapup - pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) + */ +-_PUBLIC_ void MD5Final(uint8_t digest[16], MD5_CTX *ctx) ++_PUBLIC_ void MD5Final(uint8_t digest[16], struct MD5Context *ctx) + { + unsigned int count; + uint8_t *p; +diff --git a/lib/crypto/md5test.c b/lib/crypto/md5test.c +index f58e131..38626c3 100644 +--- a/lib/crypto/md5test.c ++++ b/lib/crypto/md5test.c +@@ -65,7 +65,7 @@ bool torture_local_crypto_md5(struct torture_context *torture) + }; + + for (i=0; i < ARRAY_SIZE(testarray); i++) { +- MD5_CTX ctx; ++ struct MD5Context ctx; + uint8_t md5[16]; + int e; + +diff --git a/lib/crypto/wscript_build b/lib/crypto/wscript_build +index a1f29ae..e056f65 100644 +--- a/lib/crypto/wscript_build ++++ b/lib/crypto/wscript_build +@@ -8,7 +8,7 @@ elif bld.CONFIG_SET('HAVE_SYS_MD5_H') and bld.CONFIG_SET('HAVE_LIBMD5'): + extra_deps += ' md5' + elif bld.CONFIG_SET('HAVE_SYS_MD5_H') and bld.CONFIG_SET('HAVE_LIBMD'): + extra_deps += ' md' +-elif not bld.CONFIG_SET('HAVE_SYS_MD5_H') and not bld.CONFIG_SET('HAVE_COMMONCRYPTO_COMMONDIGEST_H'): ++elif not bld.CONFIG_SET('HAVE_COMMONCRYPTO_COMMONDIGEST_H'): + extra_source += ' md5.c' + + bld.SAMBA_SUBSYSTEM('LIBCRYPTO', +diff --git a/libcli/auth/credentials.c b/libcli/auth/credentials.c +index fb77ede..cd098c9 100644 +--- a/libcli/auth/credentials.c ++++ b/libcli/auth/credentials.c +@@ -79,7 +79,7 @@ static void netlogon_creds_init_128bit(struct netlogon_creds_CredentialState *cr + { + unsigned char zero[4], tmp[16]; + HMACMD5Context ctx; +- MD5_CTX md5; ++ struct MD5Context md5; + + ZERO_STRUCT(creds->session_key); + +diff --git a/libcli/auth/schannel_sign.c b/libcli/auth/schannel_sign.c +index 1871da2..ebd8f1c 100644 +--- a/libcli/auth/schannel_sign.c ++++ b/libcli/auth/schannel_sign.c +@@ -193,7 +193,7 @@ static void netsec_do_sign(struct schannel_state *state, + } else { + uint8_t packet_digest[16]; + static const uint8_t zeros[4]; +- MD5_CTX ctx; ++ struct MD5Context ctx; + + MD5Init(&ctx); + MD5Update(&ctx, zeros, 4); +diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c +index ec819cd..372ef01 100644 +--- a/libcli/auth/smbencrypt.c ++++ b/libcli/auth/smbencrypt.c +@@ -99,7 +99,7 @@ bool E_md4hash(const char *passwd, uint8_t p16[16]) + + void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16]) + { +- MD5_CTX tctx; ++ struct MD5Context tctx; + MD5Init(&tctx); + MD5Update(&tctx, salt, 16); + MD5Update(&tctx, nthash, 16); +@@ -637,7 +637,7 @@ bool decode_pw_buffer(TALLOC_CTX *ctx, + + void encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532], const DATA_BLOB *psession_key) + { +- MD5_CTX tctx; ++ struct MD5Context tctx; + unsigned char key_out[16]; + + /* Confounder is last 16 bytes. */ +@@ -717,7 +717,7 @@ void encode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx, + struct wkssvc_PasswordBuffer **pwd_buf) + { + uint8_t buffer[516]; +- MD5_CTX ctx; ++ struct MD5Context ctx; + struct wkssvc_PasswordBuffer *my_pwd_buf = NULL; + DATA_BLOB confounded_session_key; + int confounder_len = 8; +@@ -755,7 +755,7 @@ WERROR decode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx, + char **pwd) + { + uint8_t buffer[516]; +- MD5_CTX ctx; ++ struct MD5Context ctx; + size_t pwd_len; + + DATA_BLOB confounded_session_key; +diff --git a/libcli/drsuapi/repl_decrypt.c b/libcli/drsuapi/repl_decrypt.c +index 00b8db8..6fff2fe 100644 +--- a/libcli/drsuapi/repl_decrypt.c ++++ b/libcli/drsuapi/repl_decrypt.c +@@ -39,7 +39,7 @@ WERROR drsuapi_decrypt_attribute_value(TALLOC_CTX *mem_ctx, + DATA_BLOB confounder; + DATA_BLOB enc_buffer; + +- MD5_CTX md5; ++ struct MD5Context md5; + uint8_t _enc_key[16]; + DATA_BLOB enc_key; + +@@ -198,7 +198,7 @@ static WERROR drsuapi_encrypt_attribute_value(TALLOC_CTX *mem_ctx, + DATA_BLOB rid_crypt_out = data_blob(NULL, 0); + DATA_BLOB confounder; + +- MD5_CTX md5; ++ struct MD5Context md5; + uint8_t _enc_key[16]; + DATA_BLOB enc_key; + +diff --git a/libcli/smb/smb_signing.c b/libcli/smb/smb_signing.c +index fa61aa8..95c9c27 100644 +--- a/libcli/smb/smb_signing.c ++++ b/libcli/smb/smb_signing.c +@@ -146,7 +146,7 @@ static void smb_signing_md5(const DATA_BLOB *mac_key, + { + const size_t offset_end_of_sig = (HDR_SS_FIELD + 8); + uint8_t sequence_buf[8]; +- MD5_CTX md5_ctx; ++ struct MD5Context md5_ctx; + + /* + * Firstly put the sequence number into the first 4 bytes. +diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c +index e661aeb..48d1bcd 100644 +--- a/source3/libsmb/ntlmssp.c ++++ b/source3/libsmb/ntlmssp.c +@@ -581,7 +581,7 @@ static NTSTATUS ntlmssp3_client_challenge(struct ntlmssp_state *ntlmssp_state, + return NT_STATUS_NO_MEMORY; + } + } else if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_NTLM2) { +- MD5_CTX md5_session_nonce_ctx; ++ struct MD5Context md5_session_nonce_ctx; + uint8_t session_nonce[16]; + uint8_t session_nonce_hash[16]; + uint8_t user_session_key[16]; +diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c +index 0409c05..512fbfa 100644 +--- a/source3/modules/vfs_streams_xattr.c ++++ b/source3/modules/vfs_streams_xattr.c +@@ -39,7 +39,7 @@ struct stream_io { + + static SMB_INO_T stream_inode(const SMB_STRUCT_STAT *sbuf, const char *sname) + { +- MD5_CTX ctx; ++ struct MD5Context ctx; + unsigned char hash[16]; + SMB_INO_T result; + char *upper_sname; +diff --git a/source3/rpc_client/init_samr.c b/source3/rpc_client/init_samr.c +index 7f1a229..e3bb301 100644 +--- a/source3/rpc_client/init_samr.c ++++ b/source3/rpc_client/init_samr.c +@@ -34,7 +34,7 @@ void init_samr_CryptPasswordEx(const char *pwd, + /* samr_CryptPasswordEx */ + + uchar pwbuf[532]; +- MD5_CTX md5_ctx; ++ struct MD5Context md5_ctx; + uint8_t confounder[16]; + DATA_BLOB confounded_session_key = data_blob(NULL, 16); + +diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c +index 78311c6..fb71ebc 100644 +--- a/source4/dsdb/samdb/ldb_modules/password_hash.c ++++ b/source4/dsdb/samdb/ldb_modules/password_hash.c +@@ -1368,7 +1368,7 @@ static int setup_primary_wdigest(struct setup_password_fields_io *io, + } + + for (i=0; i < ARRAY_SIZE(wdigest); i++) { +- MD5_CTX md5; ++ struct MD5Context md5; + MD5Init(&md5); + if (wdigest[i].nt4dom) { + MD5Update(&md5, wdigest[i].nt4dom->data, wdigest[i].nt4dom->length); +diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c +index 405efab..5d2f928 100644 +--- a/source4/libcli/raw/smb_signing.c ++++ b/source4/libcli/raw/smb_signing.c +@@ -81,7 +81,7 @@ bool signing_good(struct smb_signing_context *sign_info, + void sign_outgoing_message(struct smb_request_buffer *out, DATA_BLOB *mac_key, unsigned int seq_num) + { + uint8_t calc_md5_mac[16]; +- MD5_CTX md5_ctx; ++ struct MD5Context md5_ctx; + + /* + * Firstly put the sequence number into the first 4 bytes. +@@ -116,7 +116,7 @@ bool check_signed_incoming_message(struct smb_request_buffer *in, DATA_BLOB *mac + uint8_t calc_md5_mac[16]; + uint8_t *server_sent_mac; + uint8_t sequence_buf[8]; +- MD5_CTX md5_ctx; ++ struct MD5Context md5_ctx; + const size_t offset_end_of_sig = (HDR_SS_FIELD + 8); + int i; + const int sign_range = 0; +diff --git a/source4/libnet/libnet_passwd.c b/source4/libnet/libnet_passwd.c +index 77176bc..4b5b0f8 100644 +--- a/source4/libnet/libnet_passwd.c ++++ b/source4/libnet/libnet_passwd.c +@@ -274,7 +274,7 @@ static NTSTATUS libnet_SetPassword_samr_handle_26(struct libnet_context *ctx, TA + DATA_BLOB session_key; + DATA_BLOB confounded_session_key = data_blob_talloc(mem_ctx, NULL, 16); + uint8_t confounder[16]; +- MD5_CTX md5; ++ struct MD5Context md5; + + if (r->samr_handle.in.info21) { + return NT_STATUS_INVALID_PARAMETER_MIX; +@@ -330,7 +330,7 @@ static NTSTATUS libnet_SetPassword_samr_handle_25(struct libnet_context *ctx, TA + DATA_BLOB session_key; + DATA_BLOB confounded_session_key = data_blob_talloc(mem_ctx, NULL, 16); + uint8_t confounder[16]; +- MD5_CTX md5; ++ struct MD5Context md5; + + if (!r->samr_handle.in.info21) { + return NT_STATUS_INVALID_PARAMETER_MIX; +diff --git a/source4/ntp_signd/ntp_signd.c b/source4/ntp_signd/ntp_signd.c +index 53c34ed..d1d8483 100644 +--- a/source4/ntp_signd/ntp_signd.c ++++ b/source4/ntp_signd/ntp_signd.c +@@ -109,7 +109,7 @@ static NTSTATUS ntp_signd_process(struct ntp_signd_connection *ntp_signd_conn, + enum ndr_err_code ndr_err; + struct ldb_result *res; + const char *attrs[] = { "unicodePwd", "userAccountControl", "cn", NULL }; +- MD5_CTX ctx; ++ struct MD5Context ctx; + struct samr_Password *nt_hash; + uint32_t user_account_control; + int ret; +diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c +index 685a8e7..ac7d473 100644 +--- a/source4/rpc_server/samr/samr_password.c ++++ b/source4/rpc_server/samr/samr_password.c +@@ -434,7 +434,7 @@ NTSTATUS samr_set_password_ex(struct dcesrv_call_state *dce_call, + DATA_BLOB new_password; + DATA_BLOB co_session_key; + DATA_BLOB session_key = data_blob(NULL, 0); +- MD5_CTX ctx; ++ struct MD5Context ctx; + + nt_status = dcesrv_fetch_session_key(dce_call->conn, &session_key); + if (!NT_STATUS_IS_OK(nt_status)) { +diff --git a/source4/torture/ntp/ntp_signd.c b/source4/torture/ntp/ntp_signd.c +index 5f097fe..86a5d69 100644 +--- a/source4/torture/ntp/ntp_signd.c ++++ b/source4/torture/ntp/ntp_signd.c +@@ -78,7 +78,7 @@ static bool test_ntp_signd(struct torture_context *tctx, + char *unix_address; + int sys_errno; + +- MD5_CTX ctx; ++ struct MD5Context ctx; + uint8_t sig[16]; + enum ndr_err_code ndr_err; + bool ok; +diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c +index 6b9666b..3760050 100644 +--- a/source4/torture/rpc/samba3rpc.c ++++ b/source4/torture/rpc/samba3rpc.c +@@ -780,7 +780,7 @@ static bool join3(struct torture_context *tctx, + DATA_BLOB session_key; + DATA_BLOB confounded_session_key = data_blob_talloc( + mem_ctx, NULL, 16); +- MD5_CTX ctx; ++ struct MD5Context ctx; + uint8_t confounder[16]; + + ZERO_STRUCT(u_info); +diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c +index 4861038..bd85c22 100644 +--- a/source4/torture/rpc/samlogon.c ++++ b/source4/torture/rpc/samlogon.c +@@ -1083,7 +1083,7 @@ static bool test_ntlm2(struct samlogon_state *samlogon_state, char **error_strin + uint8_t session_nonce_hash[16]; + uint8_t client_chall[8]; + +- MD5_CTX md5_session_nonce_ctx; ++ struct MD5Context md5_session_nonce_ctx; + HMACMD5Context hmac_ctx; + + ZERO_STRUCT(user_session_key); +diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c +index e7e98a5..4e736d7 100644 +--- a/source4/torture/rpc/samr.c ++++ b/source4/torture/rpc/samr.c +@@ -781,7 +781,7 @@ static bool test_SetUserPassEx(struct dcerpc_pipe *p, struct torture_context *tc + uint8_t confounder[16]; + char *newpass; + struct dcerpc_binding_handle *b = p->binding_handle; +- MD5_CTX ctx; ++ struct MD5Context ctx; + struct samr_GetUserPwInfo pwp; + struct samr_PwInfo info; + int policy_min_pw_len = 0; +@@ -872,7 +872,7 @@ static bool test_SetUserPass_25(struct dcerpc_pipe *p, struct torture_context *t + bool ret = true; + DATA_BLOB session_key; + DATA_BLOB confounded_session_key = data_blob_talloc(tctx, NULL, 16); +- MD5_CTX ctx; ++ struct MD5Context ctx; + uint8_t confounder[16]; + char *newpass; + struct dcerpc_binding_handle *b = p->binding_handle; +@@ -1162,7 +1162,7 @@ static bool test_SetUserPass_level_ex(struct dcerpc_pipe *p, + bool ret = true; + DATA_BLOB session_key; + DATA_BLOB confounded_session_key = data_blob_talloc(tctx, NULL, 16); +- MD5_CTX ctx; ++ struct MD5Context ctx; + uint8_t confounder[16]; + char *newpass; + struct dcerpc_binding_handle *b = p->binding_handle; +@@ -2569,7 +2569,7 @@ bool test_ChangePasswordRandomBytes(struct dcerpc_pipe *p, struct torture_contex + DATA_BLOB session_key; + DATA_BLOB confounded_session_key = data_blob_talloc(tctx, NULL, 16); + uint8_t confounder[16]; +- MD5_CTX ctx; ++ struct MD5Context ctx; + + bool ret = true; + struct lsa_String server, account; + +From ef0c113004c85ae501ab6be7186050fa53487f91 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:19 +0200 +Subject: [PATCH 02/19] Revert "build: Remove unused mkbuildoptions.awk" + +This reverts commit 667651132b9136e1ad9d7dc5f44dd86c66907e70. +--- + source3/script/mkbuildoptions.awk | 275 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 275 insertions(+) + create mode 100644 source3/script/mkbuildoptions.awk + +diff --git a/source3/script/mkbuildoptions.awk b/source3/script/mkbuildoptions.awk +new file mode 100644 +index 0000000..1a32d7a +--- /dev/null ++++ b/source3/script/mkbuildoptions.awk +@@ -0,0 +1,275 @@ ++BEGIN { ++ print "/* "; ++ print " Unix SMB/CIFS implementation."; ++ print " Build Options for Samba Suite"; ++ print " Copyright (C) Vance Lankhaar <vlankhaar@linux.ca> 2003"; ++ print " Copyright (C) Andrew Bartlett <abartlet@samba.org> 2001"; ++ print " "; ++ print " This program is free software; you can redistribute it and/or modify"; ++ print " it under the terms of the GNU General Public License as published by"; ++ print " the Free Software Foundation; either version 3 of the License, or"; ++ print " (at your option) any later version."; ++ print " "; ++ print " This program is distributed in the hope that it will be useful,"; ++ print " but WITHOUT ANY WARRANTY; without even the implied warranty of"; ++ print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"; ++ print " GNU General Public License for more details."; ++ print " "; ++ print " You should have received a copy of the GNU General Public License"; ++ print " along with this program; if not, see <http://www.gnu.org/licenses/>." ++ print "*/"; ++ print ""; ++ print "#include \"includes.h\""; ++ print "#include \"build_env.h\""; ++ print "#include \"dynconfig/dynconfig.h\""; ++ print ""; ++ print "static int output(bool screen, const char *format, ...) PRINTF_ATTRIBUTE(2,3);"; ++ print "void build_options(bool screen);"; ++ print ""; ++ print ""; ++ print "/****************************************************************************"; ++ print "helper function for build_options"; ++ print "****************************************************************************/"; ++ print "static int output(bool screen, const char *format, ...)"; ++ print "{"; ++ print " char *ptr = NULL;"; ++ print " int ret = 0;"; ++ print " va_list ap;"; ++ print " "; ++ print " va_start(ap, format);"; ++ print " ret = vasprintf(&ptr,format,ap);"; ++ print " va_end(ap);"; ++ print ""; ++ print " if (screen) {"; ++ print " d_printf(\"%s\", ptr ? ptr : \"\");"; ++ print " } else {"; ++ print " DEBUG(4,(\"%s\", ptr ? ptr : \"\"));"; ++ print " }"; ++ print " "; ++ print " SAFE_FREE(ptr);"; ++ print " return ret;"; ++ print "}"; ++ print ""; ++ print "/****************************************************************************"; ++ print "options set at build time for the samba suite"; ++ print "****************************************************************************/"; ++ print "void build_options(bool screen)"; ++ print "{"; ++ print " if ((DEBUGLEVEL < 4) && (!screen)) {"; ++ print " return;"; ++ print " }"; ++ print ""; ++ print "#ifdef _BUILD_ENV_H"; ++ print " /* Output information about the build environment */"; ++ print " output(screen,\"Build environment:\\n\");"; ++ print " output(screen,\" Built by: %s@%s\\n\",BUILD_ENV_USER,BUILD_ENV_HOST);"; ++ print " output(screen,\" Built on: %s\\n\",BUILD_ENV_DATE);"; ++ print ""; ++ print " output(screen,\" Built using: %s\\n\",BUILD_ENV_COMPILER);"; ++ print " output(screen,\" Build host: %s\\n\",BUILD_ENV_UNAME);"; ++ print " output(screen,\" SRCDIR: %s\\n\",BUILD_ENV_SRCDIR);"; ++ print " output(screen,\" BUILDDIR: %s\\n\",BUILD_ENV_BUILDDIR);"; ++ print ""; ++ print " "; ++ print "#endif"; ++ print ""; ++ ++ print " /* Output various paths to files and directories */"; ++ print " output(screen,\"\\nPaths:\\n\");"; ++ ++ print " output(screen,\" SBINDIR: %s\\n\", get_dyn_SBINDIR());"; ++ print " output(screen,\" BINDIR: %s\\n\", get_dyn_BINDIR());"; ++ ++ print " output(screen,\" CONFIGFILE: %s\\n\", get_dyn_CONFIGFILE());"; ++ print " output(screen,\" LOGFILEBASE: %s\\n\", get_dyn_LOGFILEBASE());"; ++ print " output(screen,\" LMHOSTSFILE: %s\\n\",get_dyn_LMHOSTSFILE());"; ++ ++ print " output(screen,\" LIBDIR: %s\\n\",get_dyn_LIBDIR());"; ++ print " output(screen,\" MODULESDIR: %s\\n\",get_dyn_MODULESDIR());"; ++ print " output(screen,\" SHLIBEXT: %s\\n\",get_dyn_SHLIBEXT());"; ++ ++ print " output(screen,\" LOCKDIR: %s\\n\",get_dyn_LOCKDIR());"; ++ print " output(screen,\" STATEDIR: %s\\n\",get_dyn_STATEDIR());"; ++ print " output(screen,\" CACHEDIR: %s\\n\",get_dyn_CACHEDIR());"; ++ print " output(screen,\" PIDDIR: %s\\n\", get_dyn_PIDDIR());"; ++ ++ print " output(screen,\" SMB_PASSWD_FILE: %s\\n\",get_dyn_SMB_PASSWD_FILE());"; ++ print " output(screen,\" PRIVATE_DIR: %s\\n\",get_dyn_PRIVATE_DIR());"; ++ print " output(screen,\" NCALRPCDIR: %s\\n\",get_dyn_NCALRPCDIR());"; ++ print " output(screen,\" NMBDSOCKETDIR: %s\\n\",get_dyn_NMBDSOCKETDIR());"; ++ print ""; ++ ++ ++################################################## ++# predefine first element of *_ary ++# predefine *_i (num of elements in *_ary) ++ with_ary[0]=""; ++ with_i=0; ++ have_ary[0]=""; ++ have_i=0; ++ utmp_ary[0]=""; ++ utmp_i=0; ++ misc_ary[0]=""; ++ misc_i=0; ++ sys_ary[0]=""; ++ sys_i=0; ++ headers_ary[0]=""; ++ headers_i=0; ++ in_comment = 0; ++} ++ ++# capture single line comments ++/^\/\* (.*?)\*\// { ++ last_comment = $0; ++ next; ++} ++ ++# end capture multi-line comments ++/(.*?)\*\// { ++ last_comment = last_comment $0; ++ in_comment = 0; ++ next; ++} ++ ++# capture middle lines of multi-line comments ++in_comment { ++ last_comment = last_comment $0; ++ next; ++} ++ ++# begin capture multi-line comments ++/^\/\* (.*?)/ { ++ last_comment = $0; ++ in_comment = 1; ++ next ++} ++ ++################################################## ++# if we have an #undef and a last_comment, store it ++/^\#undef/ { ++ split($0,a); ++ comments_ary[a[2]] = last_comment; ++ last_comment = ""; ++} ++ ++################################################## ++# for each line, sort into appropriate section ++# then move on ++ ++/^\#undef WITH/ { ++ with_ary[with_i++] = a[2]; ++ # we want (I think) to allow --with to show up in more than one place, so no next ++} ++ ++ ++/^\#undef HAVE_UT_UT_/ || /^\#undef .*UTMP/ { ++ utmp_ary[utmp_i++] = a[2]; ++ next; ++} ++ ++/^\#undef HAVE_SYS_.*?_H$/ { ++ sys_ary[sys_i++] = a[2]; ++ next; ++} ++ ++/^\#undef HAVE_.*?_H$/ { ++ headers_ary[headers_i++] = a[2]; ++ next; ++} ++ ++/^\#undef HAVE_/ { ++ have_ary[have_i++] = a[2]; ++ next; ++} ++ ++/^\#undef/ { ++ misc_ary[misc_i++] = a[2]; ++ next; ++} ++ ++ ++################################################## ++# simple sort function ++function sort(ARRAY, ELEMENTS) { ++ for (i = 1; i <= ELEMENTS; ++i) { ++ for (j = i; (j-1) in ARRAY && (j) in ARRAY && ARRAY[j-1] > ARRAY[j]; --j) { ++ temp = ARRAY[j]; ++ ARRAY[j] = ARRAY[j-1]; ++ ARRAY[j-1] = temp; ++ } ++ } ++ return; ++} ++ ++ ++################################################## ++# output code from list of defined ++# expects: ARRAY an array of things defined ++# ELEMENTS number of elements in ARRAY ++# TITLE title for section ++# returns: nothing ++function output(ARRAY, ELEMENTS, TITLE) { ++ ++ # add section header ++ print "\n\t/* Show " TITLE " */"; ++ print "\toutput(screen, \"\\n " TITLE ":\\n\");\n"; ++ ++ ++ # sort element using bubble sort (slow, but easy) ++ sort(ARRAY, ELEMENTS); ++ ++ # loop through array of defines, outputting code ++ for (i = 0; i < ELEMENTS; i++) { ++ print "#ifdef " ARRAY[i]; ++ ++ # I don't know which one to use.... ++ ++ print "\toutput(screen, \" " ARRAY[i] "\\n\");"; ++ #printf "\toutput(screen, \" %s\\n %s\\n\\n\");\n", comments_ary[ARRAY[i]], ARRAY[i]; ++ #printf "\toutput(screen, \" %-35s %s\\n\");\n", ARRAY[i], comments_ary[ARRAY[i]]; ++ ++ print "#endif"; ++ } ++ return; ++} ++ ++END { ++ ################################################## ++ # add code to show various options ++ print "/* Output various other options (as gleaned from include/autoconf/config.h.in) */"; ++ output(sys_ary, sys_i, "System Headers"); ++ output(headers_ary, headers_i, "Headers"); ++ output(utmp_ary, utmp_i, "UTMP Options"); ++ output(have_ary, have_i, "HAVE_* Defines"); ++ output(with_ary, with_i, "--with Options"); ++ output(misc_ary, misc_i, "Build Options"); ++ ++ ################################################## ++ # add code to display the various type sizes ++ print " /* Output the sizes of the various types */"; ++ print " output(screen, \"\\nType sizes:\\n\");"; ++ print " output(screen, \" sizeof(char): %lu\\n\",(unsigned long)sizeof(char));"; ++ print " output(screen, \" sizeof(int): %lu\\n\",(unsigned long)sizeof(int));"; ++ print " output(screen, \" sizeof(long): %lu\\n\",(unsigned long)sizeof(long));"; ++ print "#if HAVE_LONGLONG" ++ print " output(screen, \" sizeof(long long): %lu\\n\",(unsigned long)sizeof(long long));"; ++ print "#endif" ++ print " output(screen, \" sizeof(uint8): %lu\\n\",(unsigned long)sizeof(uint8));"; ++ print " output(screen, \" sizeof(uint16): %lu\\n\",(unsigned long)sizeof(uint16));"; ++ print " output(screen, \" sizeof(uint32): %lu\\n\",(unsigned long)sizeof(uint32));"; ++ print " output(screen, \" sizeof(short): %lu\\n\",(unsigned long)sizeof(short));"; ++ print " output(screen, \" sizeof(void*): %lu\\n\",(unsigned long)sizeof(void*));"; ++ print " output(screen, \" sizeof(size_t): %lu\\n\",(unsigned long)sizeof(size_t));"; ++ print " output(screen, \" sizeof(off_t): %lu\\n\",(unsigned long)sizeof(off_t));"; ++ print " output(screen, \" sizeof(ino_t): %lu\\n\",(unsigned long)sizeof(ino_t));"; ++ print " output(screen, \" sizeof(dev_t): %lu\\n\",(unsigned long)sizeof(dev_t));"; ++ ++ ################################################## ++ # add code to give information about modules ++ print " output(screen, \"\\nBuiltin modules:\\n\");"; ++ print " output(screen, \" %s\\n\", STRING_STATIC_MODULES);"; ++ ++ print "}"; ++ ++} ++ + +From d121957c56aeaf77fc2956faf803be78305b7de3 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 03/19] Revert "build: Remove feature tests for variables now + always provided" + +This reverts commit 4c4520ac3794f917c831255d6598945712bcfb5c. +--- + dynconfig/dynconfig.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/dynconfig/dynconfig.c b/dynconfig/dynconfig.c +index 5f67278..9fd7108 100644 +--- a/dynconfig/dynconfig.c ++++ b/dynconfig/dynconfig.c +@@ -106,8 +106,19 @@ DEFINE_DYN_CONFIG_PARAM(DATADIR) + DEFINE_DYN_CONFIG_PARAM(SETUPDIR) + DEFINE_DYN_CONFIG_PARAM(WINBINDD_SOCKET_DIR) /* from winbind_struct_protocol.h in s3 autoconf */ + ++/* these are not used in s3 */ ++#ifdef WINBINDD_PRIVILEGED_SOCKET_DIR + DEFINE_DYN_CONFIG_PARAM(WINBINDD_PRIVILEGED_SOCKET_DIR) ++#endif ++#ifdef NTP_SIGND_SOCKET_DIR + DEFINE_DYN_CONFIG_PARAM(NTP_SIGND_SOCKET_DIR) ++#endif ++#ifdef PYTHONDIR + DEFINE_DYN_CONFIG_PARAM(PYTHONDIR) ++#endif ++#ifdef PYTHONARCHDIR + DEFINE_DYN_CONFIG_PARAM(PYTHONARCHDIR) ++#endif ++#ifdef SCRIPTSBINDIR + DEFINE_DYN_CONFIG_PARAM(SCRIPTSBINDIR) ++#endif + +From 2bbf3c204cfbbcad66b2888436bf068781991f76 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 04/19] Revert "build: Remove unused credentials_samba3.c" + +This reverts commit dc6b03ffa55968708576cb527f1b52a37d8e5317. +--- + auth/credentials/credentials_samba3.c | 49 +++++++++++++++++++++++++++++++++++ + 1 file changed, 49 insertions(+) + create mode 100644 auth/credentials/credentials_samba3.c + +diff --git a/auth/credentials/credentials_samba3.c b/auth/credentials/credentials_samba3.c +new file mode 100644 +index 0000000..d742a0a +--- /dev/null ++++ b/auth/credentials/credentials_samba3.c +@@ -0,0 +1,49 @@ ++/* ++ Unix SMB/CIFS implementation. ++ ++ Handle user credentials (shim to allow samba3 to build) ++ ++ Copyright (C) Andrew Bartlett <abartlet@samba.org> 2011 ++ ++ 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 3 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, see <http://www.gnu.org/licenses/>. ++*/ ++ ++#include "includes.h" ++#include "auth/credentials/credentials.h" ++ ++/* These dummy functions are required only to allow the rest of the ++ * code to compile when we are in the s3 autoconf build system */ ++ ++_PUBLIC_ void cli_credentials_invalidate_ccache(struct cli_credentials *cred, ++ enum credentials_obtained obtained) ++{ ++ return; ++} ++ ++_PUBLIC_ int cli_credentials_set_ccache(struct cli_credentials *cred, ++ struct loadparm_context *lp_ctx, ++ const char *name, ++ enum credentials_obtained obtained, ++ const char **error_string) ++{ ++ DEBUG(0, ("cli_credentials_set_ccache is unimplemented in the autoconf build\n")); ++ return EINVAL; ++} ++ ++_PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred, ++ struct loadparm_context *lp_ctx) ++{ ++ DEBUG(0, ("cli_credentials_set_machine_account is unimplemented in the autoconf build\n")); ++ return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; ++} + +From 6b2b6b356fcc21ae98ac4263356989c5f6e09d73 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 05/19] Revert "build: Remove autoconf build system from + examples/VFS" + +This reverts commit cbddf9e2efd856a25c6405f6893ad3a9cda1b181. +--- + examples/VFS/Makefile.in | 72 ++ + examples/VFS/autogen.sh | 63 ++ + examples/VFS/config.guess | 1561 +++++++++++++++++++++++++++++++++++++++++ + examples/VFS/config.sub | 1686 +++++++++++++++++++++++++++++++++++++++++++++ + examples/VFS/configure.in | 357 ++++++++++ + examples/VFS/install-sh | 238 +++++++ + 6 files changed, 3977 insertions(+) + create mode 100644 examples/VFS/Makefile.in + create mode 100755 examples/VFS/autogen.sh + create mode 100755 examples/VFS/config.guess + create mode 100755 examples/VFS/config.sub + create mode 100644 examples/VFS/configure.in + create mode 100644 examples/VFS/install-sh + +diff --git a/examples/VFS/Makefile.in b/examples/VFS/Makefile.in +new file mode 100644 +index 0000000..ba41923 +--- /dev/null ++++ b/examples/VFS/Makefile.in +@@ -0,0 +1,72 @@ ++CC = @CC@ ++CFLAGS = @CFLAGS@ ++CPPFLAGS = @CPPFLAGS@ ++LDFLAGS = @LDFLAGS@ ++LDSHFLAGS = @LDSHFLAGS@ ++INSTALLCMD = @INSTALL@ ++SAMBA_SOURCE = @SAMBA_SOURCE@ ++SHLIBEXT = @SHLIBEXT@ ++OBJEXT = @OBJEXT@ ++FLAGS = $(CFLAGS) $(CPPFLAGS) -fPIC \ ++ -Iinclude -I$(SAMBA_SOURCE)/include \ ++ -I$(SAMBA_SOURCE)/include/autoconf \ ++ -I$(SAMBA_SOURCE)/autoconf \ ++ -I$(SAMBA_SOURCE)/../popt \ ++ -I$(SAMBA_SOURCE)/../lib/replace \ ++ -I$(SAMBA_SOURCE)/../lib/talloc \ ++ -I$(SAMBA_SOURCE)/../lib/tevent \ ++ -I$(SAMBA_SOURCE)/../lib/tdb/include \ ++ -I$(SAMBA_SOURCE)/librpc \ ++ -I$(SAMBA_SOURCE)/../librpc \ ++ -I$(SAMBA_SOURCE)/../ \ ++ -I$(SAMBA_SOURCE) -I. ++ ++ ++prefix = @prefix@ ++libdir = @libdir@ ++ ++VFS_LIBDIR = $(libdir)/vfs ++ ++# Note, if make fails, it might be because your version of make does not ++# support what we need. Try installing GNU make and rerun make. ++# ++# Note also, that if your module requires more than one object file to be ++# linked in you will have to modify Makefile.in to accommodate your needs and ++# then rerun configure before you can build. ++ ++# Change these targets to the names of your modules if building out of tree ++MODULES = skel_opaque.@SHLIBEXT@ shadow_copy_test.@SHLIBEXT@ \ ++ skel_transparent.@SHLIBEXT@ ++ ++all: $(MODULES) ++ ++# Pattern rules ++ ++.SUFFIXES: .@SHLIBEXT@ ++ ++# You might need to create an explicit rule for your shared object if your ++# shared object is built from multiple .c files. ++ ++.c.@SHLIBEXT@: ++ @echo "Compiling $<" ++ @$(CC) $(FLAGS) -c $< -D$*_init=samba_init_module ++ @echo "Linking $@" ++ @$(CC) $(LDSHFLAGS) $(LDFLAGS) $*.@OBJEXT@ -o $*.@SHLIBEXT@ ++ ++# You might need to uncomment this if you have other .c files to compile ++#.c.@OBJEXT@: ++# @echo "Compiling $<" ++# @$(CC) $(FLAGS) -c $< -D$*_init=samba_init_module ++ ++install: default ++ $(INSTALLCMD) -d $(VFS_LIBDIR) ++ $(INSTALLCMD) -m 755 *.$(SHLIBEXT) $(VFS_LIBDIR) ++ ++# Misc targets ++clean: ++ rm -rf .libs ++ rm -f core *~ *% *.bak *.o *.$(SHLIBEXT) ++ ++distclean: clean ++ rm -f config.status config.cache Makefile ++ +diff --git a/examples/VFS/autogen.sh b/examples/VFS/autogen.sh +new file mode 100755 +index 0000000..8c6c909 +--- /dev/null ++++ b/examples/VFS/autogen.sh +@@ -0,0 +1,63 @@ ++#!/bin/sh ++ ++# Run this script to build samba from SVN. ++ ++## insert all possible names (only works with ++## autoconf 2.x ++TESTAUTOHEADER="autoheader autoheader-2.53 autoheader2.50 autoheader259 autoheader253" ++TESTAUTOCONF="autoconf autoconf-2.53 autoconf2.50 autoconf259 autoconf253" ++ ++ ++AUTOHEADERFOUND="0" ++AUTOCONFFOUND="0" ++ ++ ++## ++## Look for autoheader ++## ++for i in $TESTAUTOHEADER; do ++ if which $i > /dev/null 2>&1; then ++ if [ `$i --version | head -n 1 | cut -d. -f 2 | tr -d [:alpha:]` -ge 53 ]; then ++ AUTOHEADER=$i ++ AUTOHEADERFOUND="1" ++ break ++ fi ++ fi ++done ++ ++## ++## Look for autoconf ++## ++ ++for i in $TESTAUTOCONF; do ++ if which $i > /dev/null 2>&1; then ++ if [ `$i --version | head -n 1 | cut -d. -f 2 | tr -d [:alpha:]` -ge 53 ]; then ++ AUTOCONF=$i ++ AUTOCONFFOUND="1" ++ break ++ fi ++ fi ++done ++ ++ ++## ++## do we have it? ++## ++if [ "$AUTOCONFFOUND" = "0" -o "$AUTOHEADERFOUND" = "0" ]; then ++ echo "$0: need autoconf 2.53 or later to build samba from SVN" >&2 ++ exit 1 ++fi ++ ++rm -rf autom4te*.cache ++ ++echo "$0: running $AUTOHEADER" ++$AUTOHEADER || exit 1 ++ ++echo "$0: running $AUTOCONF" ++$AUTOCONF || exit 1 ++ ++rm -rf autom4te*.cache ++ ++echo "Now run ./configure and then make." ++exit 0 ++ +diff --git a/examples/VFS/config.guess b/examples/VFS/config.guess +new file mode 100755 +index 0000000..da83314 +--- /dev/null ++++ b/examples/VFS/config.guess +@@ -0,0 +1,1561 @@ ++#! /bin/sh ++# Attempt to guess a canonical system name. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 ++# Free Software Foundation, Inc. ++ ++timestamp='2009-04-27' ++ ++# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, USA. ++# ++# As a special exception to the GNU General Public License, if you ++# distribute this file as part of a program that contains a ++# configuration script generated by Autoconf, you may include it under ++# the same distribution terms that you use for the rest of that program. ++ ++ ++# Originally written by Per Bothner <per@bothner.com>. ++# Please send patches to <config-patches@gnu.org>. Submit a context ++# diff and a properly formatted ChangeLog entry. ++# ++# This script attempts to guess a canonical system name similar to ++# config.sub. If it succeeds, it prints the system name on stdout, and ++# exits with 0. Otherwise, it exits with 1. ++# ++# The plan is that this can be called by configure scripts if you ++# don't specify an explicit build system type. ++ ++me=`echo "$0" | sed -e 's,.*/,,'` ++ ++usage="\ ++Usage: $0 [OPTION] ++ ++Output the configuration name of the system \`$me' is run on. ++ ++Operation modes: ++ -h, --help print this help, then exit ++ -t, --time-stamp print date of last modification, then exit ++ -v, --version print version number, then exit ++ ++Report bugs and patches to <config-patches@gnu.org>." ++ ++version="\ ++GNU config.guess ($timestamp) ++ ++Originally written by Per Bothner. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, ++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++ ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ++ ++help=" ++Try \`$me --help' for more information." ++ ++# Parse command line ++while test $# -gt 0 ; do ++ case $1 in ++ --time-stamp | --time* | -t ) ++ echo "$timestamp" ; exit ;; ++ --version | -v ) ++ echo "$version" ; exit ;; ++ --help | --h* | -h ) ++ echo "$usage"; exit ;; ++ -- ) # Stop option processing ++ shift; break ;; ++ - ) # Use stdin as input. ++ break ;; ++ -* ) ++ echo "$me: invalid option $1$help" >&2 ++ exit 1 ;; ++ * ) ++ break ;; ++ esac ++done ++ ++if test $# != 0; then ++ echo "$me: too many arguments$help" >&2 ++ exit 1 ++fi ++ ++trap 'exit 1' 1 2 15 ++ ++# CC_FOR_BUILD -- compiler used by this script. Note that the use of a ++# compiler to aid in system detection is discouraged as it requires ++# temporary files to be created and, as you can see below, it is a ++# headache to deal with in a portable fashion. ++ ++# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still ++# use `HOST_CC' if defined, but it is deprecated. ++ ++# Portable tmp directory creation inspired by the Autoconf team. ++ ++set_cc_for_build=' ++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; ++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; ++: ${TMPDIR=/tmp} ; ++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || ++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || ++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; ++dummy=$tmp/dummy ; ++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; ++case $CC_FOR_BUILD,$HOST_CC,$CC in ++ ,,) echo "int x;" > $dummy.c ; ++ for c in cc gcc c89 c99 ; do ++ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then ++ CC_FOR_BUILD="$c"; break ; ++ fi ; ++ done ; ++ if test x"$CC_FOR_BUILD" = x ; then ++ CC_FOR_BUILD=no_compiler_found ; ++ fi ++ ;; ++ ,,*) CC_FOR_BUILD=$CC ;; ++ ,*,*) CC_FOR_BUILD=$HOST_CC ;; ++esac ; set_cc_for_build= ;' ++ ++# This is needed to find uname on a Pyramid OSx when run in the BSD universe. ++# (ghazi@noc.rutgers.edu 1994-08-24) ++if (test -f /.attbin/uname) >/dev/null 2>&1 ; then ++ PATH=$PATH:/.attbin ; export PATH ++fi ++ ++UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown ++UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown ++UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown ++UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown ++ ++# Note: order is significant - the case branches are not exclusive. ++ ++case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ++ *:NetBSD:*:*) ++ # NetBSD (nbsd) targets should (where applicable) match one or ++ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently ++ # switched to ELF, *-*-netbsd* would select the old ++ # object file format. This provides both forward ++ # compatibility and a consistent mechanism for selecting the ++ # object file format. ++ # ++ # Note: NetBSD doesn't particularly care about the vendor ++ # portion of the name. We always set it to "unknown". ++ sysctl="sysctl -n hw.machine_arch" ++ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ ++ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` ++ case "${UNAME_MACHINE_ARCH}" in ++ armeb) machine=armeb-unknown ;; ++ arm*) machine=arm-unknown ;; ++ sh3el) machine=shl-unknown ;; ++ sh3eb) machine=sh-unknown ;; ++ sh5el) machine=sh5le-unknown ;; ++ *) machine=${UNAME_MACHINE_ARCH}-unknown ;; ++ esac ++ # The Operating System including object format, if it has switched ++ # to ELF recently, or will in the future. ++ case "${UNAME_MACHINE_ARCH}" in ++ arm*|i386|m68k|ns32k|sh3*|sparc|vax) ++ eval $set_cc_for_build ++ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep __ELF__ >/dev/null ++ then ++ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). ++ # Return netbsd for either. FIX? ++ os=netbsd ++ else ++ os=netbsdelf ++ fi ++ ;; ++ *) ++ os=netbsd ++ ;; ++ esac ++ # The OS release ++ # Debian GNU/NetBSD machines have a different userland, and ++ # thus, need a distinct triplet. However, they do not need ++ # kernel version information, so it can be replaced with a ++ # suitable tag, in the style of linux-gnu. ++ case "${UNAME_VERSION}" in ++ Debian*) ++ release='-gnu' ++ ;; ++ *) ++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ ;; ++ esac ++ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: ++ # contains redundant information, the shorter form: ++ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. ++ echo "${machine}-${os}${release}" ++ exit ;; ++ *:OpenBSD:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} ++ exit ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit ;; ++ *:SolidBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} ++ exit ;; ++ macppc:MirBSD:*:*) ++ echo powerpc-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; ++ alpha:OSF1:*:*) ++ case $UNAME_RELEASE in ++ *4.0) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac ++ # According to Compaq, /usr/sbin/psrinfo has been available on ++ # OSF/1 and Tru64 systems produced since 1995. I hope that ++ # covers most systems running today. This code pipes the CPU ++ # types through head -n 1, so we only detect the type of CPU 0. ++ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` ++ case "$ALPHA_CPU_TYPE" in ++ "EV4 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "EV4.5 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "LCA4 (21066/21068)") ++ UNAME_MACHINE="alpha" ;; ++ "EV5 (21164)") ++ UNAME_MACHINE="alphaev5" ;; ++ "EV5.6 (21164A)") ++ UNAME_MACHINE="alphaev56" ;; ++ "EV5.6 (21164PC)") ++ UNAME_MACHINE="alphapca56" ;; ++ "EV5.7 (21164PC)") ++ UNAME_MACHINE="alphapca57" ;; ++ "EV6 (21264)") ++ UNAME_MACHINE="alphaev6" ;; ++ "EV6.7 (21264A)") ++ UNAME_MACHINE="alphaev67" ;; ++ "EV6.8CB (21264C)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8AL (21264B)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8CX (21264D)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.9A (21264/EV69A)") ++ UNAME_MACHINE="alphaev69" ;; ++ "EV7 (21364)") ++ UNAME_MACHINE="alphaev7" ;; ++ "EV7.9 (21364A)") ++ UNAME_MACHINE="alphaev79" ;; ++ esac ++ # A Pn.n version is a patched version. ++ # A Vn.n version is a released version. ++ # A Tn.n version is a released field test version. ++ # A Xn.n version is an unreleased experimental baselevel. ++ # 1.2 uses "1.2" for uname -r. ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ exit ;; ++ Alpha\ *:Windows_NT*:*) ++ # How do we know it's Interix rather than the generic POSIX subsystem? ++ # Should we change UNAME_MACHINE based on the output of uname instead ++ # of the specific Alpha model? ++ echo alpha-pc-interix ++ exit ;; ++ 21064:Windows_NT:50:3) ++ echo alpha-dec-winnt3.5 ++ exit ;; ++ Amiga*:UNIX_System_V:4.0:*) ++ echo m68k-unknown-sysv4 ++ exit ;; ++ *:[Aa]miga[Oo][Ss]:*:*) ++ echo ${UNAME_MACHINE}-unknown-amigaos ++ exit ;; ++ *:[Mm]orph[Oo][Ss]:*:*) ++ echo ${UNAME_MACHINE}-unknown-morphos ++ exit ;; ++ *:OS/390:*:*) ++ echo i370-ibm-openedition ++ exit ;; ++ *:z/VM:*:*) ++ echo s390-ibm-zvmoe ++ exit ;; ++ *:OS400:*:*) ++ echo powerpc-ibm-os400 ++ exit ;; ++ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) ++ echo arm-acorn-riscix${UNAME_RELEASE} ++ exit ;; ++ arm:riscos:*:*|arm:RISCOS:*:*) ++ echo arm-unknown-riscos ++ exit ;; ++ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) ++ echo hppa1.1-hitachi-hiuxmpp ++ exit ;; ++ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) ++ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. ++ if test "`(/bin/universe) 2>/dev/null`" = att ; then ++ echo pyramid-pyramid-sysv3 ++ else ++ echo pyramid-pyramid-bsd ++ fi ++ exit ;; ++ NILE*:*:*:dcosx) ++ echo pyramid-pyramid-svr4 ++ exit ;; ++ DRS?6000:unix:4.0:6*) ++ echo sparc-icl-nx6 ++ exit ;; ++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) ++ case `/usr/bin/uname -p` in ++ sparc) echo sparc-icl-nx7; exit ;; ++ esac ;; ++ s390x:SunOS:*:*) ++ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ sun4H:SunOS:5.*:*) ++ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) ++ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) ++ eval $set_cc_for_build ++ SUN_ARCH="i386" ++ # If there is a compiler, see if it is configured for 64-bit objects. ++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ++ # This test works for both compilers. ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ SUN_ARCH="x86_64" ++ fi ++ fi ++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ sun4*:SunOS:6*:*) ++ # According to config.sub, this is the proper way to canonicalize ++ # SunOS6. Hard to guess exactly what SunOS6 will be like, but ++ # it's likely to be more like Solaris than SunOS4. ++ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ sun4*:SunOS:*:*) ++ case "`/usr/bin/arch -k`" in ++ Series*|S4*) ++ UNAME_RELEASE=`uname -v` ++ ;; ++ esac ++ # Japanese Language versions have a version number like `4.1.3-JL'. ++ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` ++ exit ;; ++ sun3*:SunOS:*:*) ++ echo m68k-sun-sunos${UNAME_RELEASE} ++ exit ;; ++ sun*:*:4.2BSD:*) ++ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` ++ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 ++ case "`/bin/arch`" in ++ sun3) ++ echo m68k-sun-sunos${UNAME_RELEASE} ++ ;; ++ sun4) ++ echo sparc-sun-sunos${UNAME_RELEASE} ++ ;; ++ esac ++ exit ;; ++ aushp:SunOS:*:*) ++ echo sparc-auspex-sunos${UNAME_RELEASE} ++ exit ;; ++ # The situation for MiNT is a little confusing. The machine name ++ # can be virtually everything (everything which is not ++ # "atarist" or "atariste" at least should have a processor ++ # > m68000). The system name ranges from "MiNT" over "FreeMiNT" ++ # to the lowercase version "mint" (or "freemint"). Finally ++ # the system name "TOS" denotes a system which is actually not ++ # MiNT. But MiNT is downward compatible to TOS, so this should ++ # be no problem. ++ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit ;; ++ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit ;; ++ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit ;; ++ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) ++ echo m68k-milan-mint${UNAME_RELEASE} ++ exit ;; ++ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) ++ echo m68k-hades-mint${UNAME_RELEASE} ++ exit ;; ++ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) ++ echo m68k-unknown-mint${UNAME_RELEASE} ++ exit ;; ++ m68k:machten:*:*) ++ echo m68k-apple-machten${UNAME_RELEASE} ++ exit ;; ++ powerpc:machten:*:*) ++ echo powerpc-apple-machten${UNAME_RELEASE} ++ exit ;; ++ RISC*:Mach:*:*) ++ echo mips-dec-mach_bsd4.3 ++ exit ;; ++ RISC*:ULTRIX:*:*) ++ echo mips-dec-ultrix${UNAME_RELEASE} ++ exit ;; ++ VAX*:ULTRIX*:*:*) ++ echo vax-dec-ultrix${UNAME_RELEASE} ++ exit ;; ++ 2020:CLIX:*:* | 2430:CLIX:*:*) ++ echo clipper-intergraph-clix${UNAME_RELEASE} ++ exit ;; ++ mips:*:*:UMIPS | mips:*:*:RISCos) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++#ifdef __cplusplus ++#include <stdio.h> /* for printf() prototype */ ++ int main (int argc, char *argv[]) { ++#else ++ int main (argc, argv) int argc; char *argv[]; { ++#endif ++ #if defined (host_mips) && defined (MIPSEB) ++ #if defined (SYSTYPE_SYSV) ++ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); ++ #endif ++ #if defined (SYSTYPE_SVR4) ++ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); ++ #endif ++ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) ++ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); ++ #endif ++ #endif ++ exit (-1); ++ } ++EOF ++ $CC_FOR_BUILD -o $dummy $dummy.c && ++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && ++ SYSTEM_NAME=`$dummy $dummyarg` && ++ { echo "$SYSTEM_NAME"; exit; } ++ echo mips-mips-riscos${UNAME_RELEASE} ++ exit ;; ++ Motorola:PowerMAX_OS:*:*) ++ echo powerpc-motorola-powermax ++ exit ;; ++ Motorola:*:4.3:PL8-*) ++ echo powerpc-harris-powermax ++ exit ;; ++ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) ++ echo powerpc-harris-powermax ++ exit ;; ++ Night_Hawk:Power_UNIX:*:*) ++ echo powerpc-harris-powerunix ++ exit ;; ++ m88k:CX/UX:7*:*) ++ echo m88k-harris-cxux7 ++ exit ;; ++ m88k:*:4*:R4*) ++ echo m88k-motorola-sysv4 ++ exit ;; ++ m88k:*:3*:R3*) ++ echo m88k-motorola-sysv3 ++ exit ;; ++ AViiON:dgux:*:*) ++ # DG/UX returns AViiON for all architectures ++ UNAME_PROCESSOR=`/usr/bin/uname -p` ++ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] ++ then ++ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ ++ [ ${TARGET_BINARY_INTERFACE}x = x ] ++ then ++ echo m88k-dg-dgux${UNAME_RELEASE} ++ else ++ echo m88k-dg-dguxbcs${UNAME_RELEASE} ++ fi ++ else ++ echo i586-dg-dgux${UNAME_RELEASE} ++ fi ++ exit ;; ++ M88*:DolphinOS:*:*) # DolphinOS (SVR3) ++ echo m88k-dolphin-sysv3 ++ exit ;; ++ M88*:*:R3*:*) ++ # Delta 88k system running SVR3 ++ echo m88k-motorola-sysv3 ++ exit ;; ++ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) ++ echo m88k-tektronix-sysv3 ++ exit ;; ++ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) ++ echo m68k-tektronix-bsd ++ exit ;; ++ *:IRIX*:*:*) ++ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` ++ exit ;; ++ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. ++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id ++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ++ i*86:AIX:*:*) ++ echo i386-ibm-aix ++ exit ;; ++ ia64:AIX:*:*) ++ if [ -x /usr/bin/oslevel ] ; then ++ IBM_REV=`/usr/bin/oslevel` ++ else ++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} ++ fi ++ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} ++ exit ;; ++ *:AIX:2:3) ++ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #include <sys/systemcfg.h> ++ ++ main() ++ { ++ if (!__power_pc()) ++ exit(1); ++ puts("powerpc-ibm-aix3.2.5"); ++ exit(0); ++ } ++EOF ++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` ++ then ++ echo "$SYSTEM_NAME" ++ else ++ echo rs6000-ibm-aix3.2.5 ++ fi ++ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then ++ echo rs6000-ibm-aix3.2.4 ++ else ++ echo rs6000-ibm-aix3.2 ++ fi ++ exit ;; ++ *:AIX:*:[456]) ++ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` ++ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then ++ IBM_ARCH=rs6000 ++ else ++ IBM_ARCH=powerpc ++ fi ++ if [ -x /usr/bin/oslevel ] ; then ++ IBM_REV=`/usr/bin/oslevel` ++ else ++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} ++ fi ++ echo ${IBM_ARCH}-ibm-aix${IBM_REV} ++ exit ;; ++ *:AIX:*:*) ++ echo rs6000-ibm-aix ++ exit ;; ++ ibmrt:4.4BSD:*|romp-ibm:BSD:*) ++ echo romp-ibm-bsd4.4 ++ exit ;; ++ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and ++ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to ++ exit ;; # report: romp-ibm BSD 4.3 ++ *:BOSX:*:*) ++ echo rs6000-bull-bosx ++ exit ;; ++ DPX/2?00:B.O.S.:*:*) ++ echo m68k-bull-sysv3 ++ exit ;; ++ 9000/[34]??:4.3bsd:1.*:*) ++ echo m68k-hp-bsd ++ exit ;; ++ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) ++ echo m68k-hp-bsd4.4 ++ exit ;; ++ 9000/[34678]??:HP-UX:*:*) ++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` ++ case "${UNAME_MACHINE}" in ++ 9000/31? ) HP_ARCH=m68000 ;; ++ 9000/[34]?? ) HP_ARCH=m68k ;; ++ 9000/[678][0-9][0-9]) ++ if [ -x /usr/bin/getconf ]; then ++ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` ++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ++ case "${sc_cpu_version}" in ++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ++ 532) # CPU_PA_RISC2_0 ++ case "${sc_kernel_bits}" in ++ 32) HP_ARCH="hppa2.0n" ;; ++ 64) HP_ARCH="hppa2.0w" ;; ++ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 ++ esac ;; ++ esac ++ fi ++ if [ "${HP_ARCH}" = "" ]; then ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ ++ #define _HPUX_SOURCE ++ #include <stdlib.h> ++ #include <unistd.h> ++ ++ int main () ++ { ++ #if defined(_SC_KERNEL_BITS) ++ long bits = sysconf(_SC_KERNEL_BITS); ++ #endif ++ long cpu = sysconf (_SC_CPU_VERSION); ++ ++ switch (cpu) ++ { ++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; ++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; ++ case CPU_PA_RISC2_0: ++ #if defined(_SC_KERNEL_BITS) ++ switch (bits) ++ { ++ case 64: puts ("hppa2.0w"); break; ++ case 32: puts ("hppa2.0n"); break; ++ default: puts ("hppa2.0"); break; ++ } break; ++ #else /* !defined(_SC_KERNEL_BITS) */ ++ puts ("hppa2.0"); break; ++ #endif ++ default: puts ("hppa1.0"); break; ++ } ++ exit (0); ++ } ++EOF ++ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` ++ test -z "$HP_ARCH" && HP_ARCH=hppa ++ fi ;; ++ esac ++ if [ ${HP_ARCH} = "hppa2.0w" ] ++ then ++ eval $set_cc_for_build ++ ++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating ++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler ++ # generating 64-bit code. GNU and HP use different nomenclature: ++ # ++ # $ CC_FOR_BUILD=cc ./config.guess ++ # => hppa2.0w-hp-hpux11.23 ++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess ++ # => hppa64-hp-hpux11.23 ++ ++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | ++ grep __LP64__ >/dev/null ++ then ++ HP_ARCH="hppa2.0w" ++ else ++ HP_ARCH="hppa64" ++ fi ++ fi ++ echo ${HP_ARCH}-hp-hpux${HPUX_REV} ++ exit ;; ++ ia64:HP-UX:*:*) ++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` ++ echo ia64-hp-hpux${HPUX_REV} ++ exit ;; ++ 3050*:HI-UX:*:*) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #include <unistd.h> ++ int ++ main () ++ { ++ long cpu = sysconf (_SC_CPU_VERSION); ++ /* The order matters, because CPU_IS_HP_MC68K erroneously returns ++ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct ++ results, however. */ ++ if (CPU_IS_PA_RISC (cpu)) ++ { ++ switch (cpu) ++ { ++ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; ++ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; ++ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; ++ default: puts ("hppa-hitachi-hiuxwe2"); break; ++ } ++ } ++ else if (CPU_IS_HP_MC68K (cpu)) ++ puts ("m68k-hitachi-hiuxwe2"); ++ else puts ("unknown-hitachi-hiuxwe2"); ++ exit (0); ++ } ++EOF ++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } ++ echo unknown-hitachi-hiuxwe2 ++ exit ;; ++ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) ++ echo hppa1.1-hp-bsd ++ exit ;; ++ 9000/8??:4.3bsd:*:*) ++ echo hppa1.0-hp-bsd ++ exit ;; ++ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) ++ echo hppa1.0-hp-mpeix ++ exit ;; ++ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) ++ echo hppa1.1-hp-osf ++ exit ;; ++ hp8??:OSF1:*:*) ++ echo hppa1.0-hp-osf ++ exit ;; ++ i*86:OSF1:*:*) ++ if [ -x /usr/sbin/sysversion ] ; then ++ echo ${UNAME_MACHINE}-unknown-osf1mk ++ else ++ echo ${UNAME_MACHINE}-unknown-osf1 ++ fi ++ exit ;; ++ parisc*:Lites*:*:*) ++ echo hppa1.1-hp-lites ++ exit ;; ++ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) ++ echo c1-convex-bsd ++ exit ;; ++ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) ++ if getsysinfo -f scalar_acc ++ then echo c32-convex-bsd ++ else echo c2-convex-bsd ++ fi ++ exit ;; ++ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) ++ echo c34-convex-bsd ++ exit ;; ++ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) ++ echo c38-convex-bsd ++ exit ;; ++ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) ++ echo c4-convex-bsd ++ exit ;; ++ CRAY*Y-MP:*:*:*) ++ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; ++ CRAY*[A-Z]90:*:*:*) ++ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ ++ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ ++ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ ++ -e 's/\.[^.]*$/.X/' ++ exit ;; ++ CRAY*TS:*:*:*) ++ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; ++ CRAY*T3E:*:*:*) ++ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; ++ CRAY*SV1:*:*:*) ++ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; ++ *:UNICOS/mp:*:*) ++ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; ++ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) ++ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; ++ 5000:UNIX_System_V:4.*:*) ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; ++ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) ++ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} ++ exit ;; ++ sparc*:BSD/OS:*:*) ++ echo sparc-unknown-bsdi${UNAME_RELEASE} ++ exit ;; ++ *:BSD/OS:*:*) ++ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} ++ exit ;; ++ *:FreeBSD:*:*) ++ case ${UNAME_MACHINE} in ++ pc98) ++ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ amd64) ++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ *) ++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ esac ++ exit ;; ++ i*:CYGWIN*:*) ++ echo ${UNAME_MACHINE}-pc-cygwin ++ exit ;; ++ *:MINGW*:*) ++ echo ${UNAME_MACHINE}-pc-mingw32 ++ exit ;; ++ i*:windows32*:*) ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 ++ exit ;; ++ i*:PW*:*) ++ echo ${UNAME_MACHINE}-pc-pw32 ++ exit ;; ++ *:Interix*:[3456]*) ++ case ${UNAME_MACHINE} in ++ x86) ++ echo i586-pc-interix${UNAME_RELEASE} ++ exit ;; ++ EM64T | authenticamd | genuineintel) ++ echo x86_64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ IA64) ++ echo ia64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ esac ;; ++ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) ++ echo i${UNAME_MACHINE}-pc-mks ++ exit ;; ++ i*:Windows_NT*:* | Pentium*:Windows_NT*:*) ++ # How do we know it's Interix rather than the generic POSIX subsystem? ++ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we ++ # UNAME_MACHINE based on the output of uname instead of i386? ++ echo i586-pc-interix ++ exit ;; ++ i*:UWIN*:*) ++ echo ${UNAME_MACHINE}-pc-uwin ++ exit ;; ++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) ++ echo x86_64-unknown-cygwin ++ exit ;; ++ p*:CYGWIN*:*) ++ echo powerpcle-unknown-cygwin ++ exit ;; ++ prep*:SunOS:5.*:*) ++ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ *:GNU:*:*) ++ # the GNU system ++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` ++ exit ;; ++ *:GNU/*:*:*) ++ # other systems with GNU libc and userland ++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu ++ exit ;; ++ i*86:Minix:*:*) ++ echo ${UNAME_MACHINE}-pc-minix ++ exit ;; ++ arm*:Linux:*:*) ++ eval $set_cc_for_build ++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_EABI__ ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ fi ++ exit ;; ++ avr32*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ cris:Linux:*:*) ++ echo cris-axis-linux-gnu ++ exit ;; ++ crisv32:Linux:*:*) ++ echo crisv32-axis-linux-gnu ++ exit ;; ++ frv:Linux:*:*) ++ echo frv-unknown-linux-gnu ++ exit ;; ++ ia64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ m32r*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ m68*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ mips:Linux:*:*) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #undef CPU ++ #undef mips ++ #undef mipsel ++ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ++ CPU=mipsel ++ #else ++ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ++ CPU=mips ++ #else ++ CPU= ++ #endif ++ #endif ++EOF ++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ++ /^CPU/{ ++ s: ::g ++ p ++ }'`" ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ++ ;; ++ mips64:Linux:*:*) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #undef CPU ++ #undef mips64 ++ #undef mips64el ++ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ++ CPU=mips64el ++ #else ++ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ++ CPU=mips64 ++ #else ++ CPU= ++ #endif ++ #endif ++EOF ++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ++ /^CPU/{ ++ s: ::g ++ p ++ }'`" ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ++ ;; ++ or32:Linux:*:*) ++ echo or32-unknown-linux-gnu ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-gnu ++ exit ;; ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-gnu ++ exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ exit ;; ++ padre:Linux:*:*) ++ echo sparc-unknown-linux-gnu ++ exit ;; ++ parisc:Linux:*:* | hppa:Linux:*:*) ++ # Look for CPU level ++ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in ++ PA7*) echo hppa1.1-unknown-linux-gnu ;; ++ PA8*) echo hppa2.0-unknown-linux-gnu ;; ++ *) echo hppa-unknown-linux-gnu ;; ++ esac ++ exit ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-gnu ++ exit ;; ++ s390:Linux:*:* | s390x:Linux:*:*) ++ echo ${UNAME_MACHINE}-ibm-linux ++ exit ;; ++ sh64*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ sh*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ sparc:Linux:*:* | sparc64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ vax:Linux:*:*) ++ echo ${UNAME_MACHINE}-dec-linux-gnu ++ exit ;; ++ x86_64:Linux:*:*) ++ echo x86_64-unknown-linux-gnu ++ exit ;; ++ xtensa*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ i*86:Linux:*:*) ++ # The BFD linker knows what the default object file format is, so ++ # first see if it will tell us. cd to the root directory to prevent ++ # problems with other programs or directories called `ld' in the path. ++ # Set LC_ALL=C to ensure ld outputs messages in English. ++ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ ++ | sed -ne '/supported targets:/!d ++ s/[ ][ ]*/ /g ++ s/.*supported targets: *// ++ s/ .*// ++ p'` ++ case "$ld_supported_targets" in ++ elf32-i386) ++ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ++ ;; ++ a.out-i386-linux) ++ echo "${UNAME_MACHINE}-pc-linux-gnuaout" ++ exit ;; ++ "") ++ # Either a pre-BFD a.out linker (linux-gnuoldld) or ++ # one that does not give us useful --help. ++ echo "${UNAME_MACHINE}-pc-linux-gnuoldld" ++ exit ;; ++ esac ++ # Determine whether the default compiler is a.out or elf ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #include <features.h> ++ #ifdef __ELF__ ++ # ifdef __GLIBC__ ++ # if __GLIBC__ >= 2 ++ LIBC=gnu ++ # else ++ LIBC=gnulibc1 ++ # endif ++ # else ++ LIBC=gnulibc1 ++ # endif ++ #else ++ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) ++ LIBC=gnu ++ #else ++ LIBC=gnuaout ++ #endif ++ #endif ++ #ifdef __dietlibc__ ++ LIBC=dietlibc ++ #endif ++EOF ++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ++ /^LIBC/{ ++ s: ::g ++ p ++ }'`" ++ test x"${LIBC}" != x && { ++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" ++ exit ++ } ++ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ++ ;; ++ i*86:DYNIX/ptx:4*:*) ++ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. ++ # earlier versions are messed up and put the nodename in both ++ # sysname and nodename. ++ echo i386-sequent-sysv4 ++ exit ;; ++ i*86:UNIX_SV:4.2MP:2.*) ++ # Unixware is an offshoot of SVR4, but it has its own version ++ # number series starting with 2... ++ # I am not positive that other SVR4 systems won't match this, ++ # I just have to hope. -- rms. ++ # Use sysv4.2uw... so that sysv4* matches it. ++ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} ++ exit ;; ++ i*86:OS/2:*:*) ++ # If we were able to find `uname', then EMX Unix compatibility ++ # is probably installed. ++ echo ${UNAME_MACHINE}-pc-os2-emx ++ exit ;; ++ i*86:XTS-300:*:STOP) ++ echo ${UNAME_MACHINE}-unknown-stop ++ exit ;; ++ i*86:atheos:*:*) ++ echo ${UNAME_MACHINE}-unknown-atheos ++ exit ;; ++ i*86:syllable:*:*) ++ echo ${UNAME_MACHINE}-pc-syllable ++ exit ;; ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ++ echo i386-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ i*86:*DOS:*:*) ++ echo ${UNAME_MACHINE}-pc-msdosdjgpp ++ exit ;; ++ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) ++ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` ++ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then ++ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} ++ else ++ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} ++ fi ++ exit ;; ++ i*86:*:5:[678]*) ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. ++ case `/bin/uname -X | grep "^Machine"` in ++ *486*) UNAME_MACHINE=i486 ;; ++ *Pentium) UNAME_MACHINE=i586 ;; ++ *Pent*|*Celeron) UNAME_MACHINE=i686 ;; ++ esac ++ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ++ exit ;; ++ i*86:*:3.2:*) ++ if test -f /usr/options/cb.name; then ++ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` ++ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL ++ elif /bin/uname -X 2>/dev/null >/dev/null ; then ++ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` ++ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 ++ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ ++ && UNAME_MACHINE=i586 ++ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ ++ && UNAME_MACHINE=i686 ++ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ ++ && UNAME_MACHINE=i686 ++ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL ++ else ++ echo ${UNAME_MACHINE}-pc-sysv32 ++ fi ++ exit ;; ++ pc:*:*:*) ++ # Left here for compatibility: ++ # uname -m prints for DJGPP always 'pc', but it prints nothing about ++ # the processor, so we play safe by assuming i586. ++ # Note: whatever this is, it MUST be the same as what config.sub ++ # prints for the "djgpp" host, or else GDB configury will decide that ++ # this is a cross-build. ++ echo i586-pc-msdosdjgpp ++ exit ;; ++ Intel:Mach:3*:*) ++ echo i386-pc-mach3 ++ exit ;; ++ paragon:*:*:*) ++ echo i860-intel-osf1 ++ exit ;; ++ i860:*:4.*:*) # i860-SVR4 ++ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then ++ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 ++ else # Add other i860-SVR4 vendors below as they are discovered. ++ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 ++ fi ++ exit ;; ++ mini*:CTIX:SYS*5:*) ++ # "miniframe" ++ echo m68010-convergent-sysv ++ exit ;; ++ mc68k:UNIX:SYSTEM5:3.51m) ++ echo m68k-convergent-sysv ++ exit ;; ++ M680?0:D-NIX:5.3:*) ++ echo m68k-diab-dnix ++ exit ;; ++ M68*:*:R3V[5678]*:*) ++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; ++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) ++ OS_REL='' ++ test -r /etc/.relid \ ++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; ++ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4; exit; } ;; ++ NCR*:*:4.2:* | MPRAS*:*:4.2:*) ++ OS_REL='.3' ++ test -r /etc/.relid \ ++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; ++ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) ++ echo m68k-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ mc68030:UNIX_System_V:4.*:*) ++ echo m68k-atari-sysv4 ++ exit ;; ++ TSUNAMI:LynxOS:2.*:*) ++ echo sparc-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ rs6000:LynxOS:2.*:*) ++ echo rs6000-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ echo powerpc-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ SM[BE]S:UNIX_SV:*:*) ++ echo mips-dde-sysv${UNAME_RELEASE} ++ exit ;; ++ RM*:ReliantUNIX-*:*:*) ++ echo mips-sni-sysv4 ++ exit ;; ++ RM*:SINIX-*:*:*) ++ echo mips-sni-sysv4 ++ exit ;; ++ *:SINIX-*:*:*) ++ if uname -p 2>/dev/null >/dev/null ; then ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ echo ${UNAME_MACHINE}-sni-sysv4 ++ else ++ echo ns32k-sni-sysv ++ fi ++ exit ;; ++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ++ # says <Richard.M.Bartel@ccMail.Census.GOV> ++ echo i586-unisys-sysv4 ++ exit ;; ++ *:UNIX_System_V:4*:FTX*) ++ # From Gerald Hewes <hewes@openmarket.com>. ++ # How about differentiating between stratus architectures? -djm ++ echo hppa1.1-stratus-sysv4 ++ exit ;; ++ *:*:*:FTX*) ++ # From seanf@swdc.stratus.com. ++ echo i860-stratus-sysv4 ++ exit ;; ++ i*86:VOS:*:*) ++ # From Paul.Green@stratus.com. ++ echo ${UNAME_MACHINE}-stratus-vos ++ exit ;; ++ *:VOS:*:*) ++ # From Paul.Green@stratus.com. ++ echo hppa1.1-stratus-vos ++ exit ;; ++ mc68*:A/UX:*:*) ++ echo m68k-apple-aux${UNAME_RELEASE} ++ exit ;; ++ news*:NEWS-OS:6*:*) ++ echo mips-sony-newsos6 ++ exit ;; ++ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) ++ if [ -d /usr/nec ]; then ++ echo mips-nec-sysv${UNAME_RELEASE} ++ else ++ echo mips-unknown-sysv${UNAME_RELEASE} ++ fi ++ exit ;; ++ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. ++ echo powerpc-be-beos ++ exit ;; ++ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. ++ echo powerpc-apple-beos ++ exit ;; ++ BePC:BeOS:*:*) # BeOS running on Intel PC compatible. ++ echo i586-pc-beos ++ exit ;; ++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. ++ echo i586-pc-haiku ++ exit ;; ++ SX-4:SUPER-UX:*:*) ++ echo sx4-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-5:SUPER-UX:*:*) ++ echo sx5-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-6:SUPER-UX:*:*) ++ echo sx6-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-7:SUPER-UX:*:*) ++ echo sx7-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8:SUPER-UX:*:*) ++ echo sx8-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8R:SUPER-UX:*:*) ++ echo sx8r-nec-superux${UNAME_RELEASE} ++ exit ;; ++ Power*:Rhapsody:*:*) ++ echo powerpc-apple-rhapsody${UNAME_RELEASE} ++ exit ;; ++ *:Rhapsody:*:*) ++ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} ++ exit ;; ++ *:Darwin:*:*) ++ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown ++ case $UNAME_PROCESSOR in ++ unknown) UNAME_PROCESSOR=powerpc ;; ++ esac ++ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} ++ exit ;; ++ *:procnto*:*:* | *:QNX:[0123456789]*:*) ++ UNAME_PROCESSOR=`uname -p` ++ if test "$UNAME_PROCESSOR" = "x86"; then ++ UNAME_PROCESSOR=i386 ++ UNAME_MACHINE=pc ++ fi ++ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} ++ exit ;; ++ *:QNX:*:4*) ++ echo i386-pc-qnx ++ exit ;; ++ NSE-?:NONSTOP_KERNEL:*:*) ++ echo nse-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSR-?:NONSTOP_KERNEL:*:*) ++ echo nsr-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ *:NonStop-UX:*:*) ++ echo mips-compaq-nonstopux ++ exit ;; ++ BS2000:POSIX*:*:*) ++ echo bs2000-siemens-sysv ++ exit ;; ++ DS/*:UNIX_System_V:*:*) ++ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} ++ exit ;; ++ *:Plan9:*:*) ++ # "uname -m" is not consistent, so use $cputype instead. 386 ++ # is converted to i386 for consistency with other x86 ++ # operating systems. ++ if test "$cputype" = "386"; then ++ UNAME_MACHINE=i386 ++ else ++ UNAME_MACHINE="$cputype" ++ fi ++ echo ${UNAME_MACHINE}-unknown-plan9 ++ exit ;; ++ *:TOPS-10:*:*) ++ echo pdp10-unknown-tops10 ++ exit ;; ++ *:TENEX:*:*) ++ echo pdp10-unknown-tenex ++ exit ;; ++ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) ++ echo pdp10-dec-tops20 ++ exit ;; ++ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) ++ echo pdp10-xkl-tops20 ++ exit ;; ++ *:TOPS-20:*:*) ++ echo pdp10-unknown-tops20 ++ exit ;; ++ *:ITS:*:*) ++ echo pdp10-unknown-its ++ exit ;; ++ SEI:*:*:SEIUX) ++ echo mips-sei-seiux${UNAME_RELEASE} ++ exit ;; ++ *:DragonFly:*:*) ++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ++ exit ;; ++ *:*VMS:*:*) ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ case "${UNAME_MACHINE}" in ++ A*) echo alpha-dec-vms ; exit ;; ++ I*) echo ia64-dec-vms ; exit ;; ++ V*) echo vax-dec-vms ; exit ;; ++ esac ;; ++ *:XENIX:*:SysV) ++ echo i386-pc-xenix ++ exit ;; ++ i*86:skyos:*:*) ++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' ++ exit ;; ++ i*86:rdos:*:*) ++ echo ${UNAME_MACHINE}-pc-rdos ++ exit ;; ++ i*86:AROS:*:*) ++ echo ${UNAME_MACHINE}-pc-aros ++ exit ;; ++esac ++ ++#echo '(No uname command or uname output not recognized.)' 1>&2 ++#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 ++ ++eval $set_cc_for_build ++cat >$dummy.c <<EOF ++#ifdef _SEQUENT_ ++# include <sys/types.h> ++# include <sys/utsname.h> ++#endif ++main () ++{ ++#if defined (sony) ++#if defined (MIPSEB) ++ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, ++ I don't know.... */ ++ printf ("mips-sony-bsd\n"); exit (0); ++#else ++#include <sys/param.h> ++ printf ("m68k-sony-newsos%s\n", ++#ifdef NEWSOS4 ++ "4" ++#else ++ "" ++#endif ++ ); exit (0); ++#endif ++#endif ++ ++#if defined (__arm) && defined (__acorn) && defined (__unix) ++ printf ("arm-acorn-riscix\n"); exit (0); ++#endif ++ ++#if defined (hp300) && !defined (hpux) ++ printf ("m68k-hp-bsd\n"); exit (0); ++#endif ++ ++#if defined (NeXT) ++#if !defined (__ARCHITECTURE__) ++#define __ARCHITECTURE__ "m68k" ++#endif ++ int version; ++ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; ++ if (version < 4) ++ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); ++ else ++ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); ++ exit (0); ++#endif ++ ++#if defined (MULTIMAX) || defined (n16) ++#if defined (UMAXV) ++ printf ("ns32k-encore-sysv\n"); exit (0); ++#else ++#if defined (CMU) ++ printf ("ns32k-encore-mach\n"); exit (0); ++#else ++ printf ("ns32k-encore-bsd\n"); exit (0); ++#endif ++#endif ++#endif ++ ++#if defined (__386BSD__) ++ printf ("i386-pc-bsd\n"); exit (0); ++#endif ++ ++#if defined (sequent) ++#if defined (i386) ++ printf ("i386-sequent-dynix\n"); exit (0); ++#endif ++#if defined (ns32000) ++ printf ("ns32k-sequent-dynix\n"); exit (0); ++#endif ++#endif ++ ++#if defined (_SEQUENT_) ++ struct utsname un; ++ ++ uname(&un); ++ ++ if (strncmp(un.version, "V2", 2) == 0) { ++ printf ("i386-sequent-ptx2\n"); exit (0); ++ } ++ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ ++ printf ("i386-sequent-ptx1\n"); exit (0); ++ } ++ printf ("i386-sequent-ptx\n"); exit (0); ++ ++#endif ++ ++#if defined (vax) ++# if !defined (ultrix) ++# include <sys/param.h> ++# if defined (BSD) ++# if BSD == 43 ++ printf ("vax-dec-bsd4.3\n"); exit (0); ++# else ++# if BSD == 199006 ++ printf ("vax-dec-bsd4.3reno\n"); exit (0); ++# else ++ printf ("vax-dec-bsd\n"); exit (0); ++# endif ++# endif ++# else ++ printf ("vax-dec-bsd\n"); exit (0); ++# endif ++# else ++ printf ("vax-dec-ultrix\n"); exit (0); ++# endif ++#endif ++ ++#if defined (alliant) && defined (i860) ++ printf ("i860-alliant-bsd\n"); exit (0); ++#endif ++ ++ exit (1); ++} ++EOF ++ ++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } ++ ++# Apollos put the system type in the environment. ++ ++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } ++ ++# Convex versions that predate uname can use getsysinfo(1) ++ ++if [ -x /usr/convex/getsysinfo ] ++then ++ case `getsysinfo -f cpu_type` in ++ c1*) ++ echo c1-convex-bsd ++ exit ;; ++ c2*) ++ if getsysinfo -f scalar_acc ++ then echo c32-convex-bsd ++ else echo c2-convex-bsd ++ fi ++ exit ;; ++ c34*) ++ echo c34-convex-bsd ++ exit ;; ++ c38*) ++ echo c38-convex-bsd ++ exit ;; ++ c4*) ++ echo c4-convex-bsd ++ exit ;; ++ esac ++fi ++ ++cat >&2 <<EOF ++$0: unable to guess system type ++ ++This script, last modified $timestamp, has failed to recognize ++the operating system you are using. It is advised that you ++download the most up to date version of the config scripts from ++ ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD ++and ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD ++ ++If the version you run ($0) is already up to date, please ++send the following data and any information you think might be ++pertinent to <config-patches@gnu.org> in order to provide the needed ++information to handle your system. ++ ++config.guess timestamp = $timestamp ++ ++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` ++/bin/uname -X = `(/bin/uname -X) 2>/dev/null` ++ ++hostinfo = `(hostinfo) 2>/dev/null` ++/bin/universe = `(/bin/universe) 2>/dev/null` ++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` ++/bin/arch = `(/bin/arch) 2>/dev/null` ++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` ++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` ++ ++UNAME_MACHINE = ${UNAME_MACHINE} ++UNAME_RELEASE = ${UNAME_RELEASE} ++UNAME_SYSTEM = ${UNAME_SYSTEM} ++UNAME_VERSION = ${UNAME_VERSION} ++EOF ++ ++exit 1 ++ ++# Local variables: ++# eval: (add-hook 'write-file-hooks 'time-stamp) ++# time-stamp-start: "timestamp='" ++# time-stamp-format: "%:y-%02m-%02d" ++# time-stamp-end: "'" ++# End: +diff --git a/examples/VFS/config.sub b/examples/VFS/config.sub +new file mode 100755 +index 0000000..a39437d +--- /dev/null ++++ b/examples/VFS/config.sub +@@ -0,0 +1,1686 @@ ++#! /bin/sh ++# Configuration validation subroutine script. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 ++# Free Software Foundation, Inc. ++ ++timestamp='2009-04-17' ++ ++# This file is (in principle) common to ALL GNU software. ++# The presence of a machine in this file suggests that SOME GNU software ++# can handle that machine. It does not imply ALL GNU software can. ++# ++# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, USA. ++# ++# As a special exception to the GNU General Public License, if you ++# distribute this file as part of a program that contains a ++# configuration script generated by Autoconf, you may include it under ++# the same distribution terms that you use for the rest of that program. ++ ++ ++# Please send patches to <config-patches@gnu.org>. Submit a context ++# diff and a properly formatted ChangeLog entry. ++# ++# Configuration subroutine to validate and canonicalize a configuration type. ++# Supply the specified configuration type as an argument. ++# If it is invalid, we print an error message on stderr and exit with code 1. ++# Otherwise, we print the canonical config type on stdout and succeed. ++ ++# This file is supposed to be the same for all GNU packages ++# and recognize all the CPU types, system types and aliases ++# that are meaningful with *any* GNU software. ++# Each package is responsible for reporting which valid configurations ++# it does not support. The user should be able to distinguish ++# a failure to support a valid configuration from a meaningless ++# configuration. ++ ++# The goal of this file is to map all the various variations of a given ++# machine specification into a single specification in the form: ++# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM ++# or in some cases, the newer four-part form: ++# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM ++# It is wrong to echo any other type of specification. ++ ++me=`echo "$0" | sed -e 's,.*/,,'` ++ ++usage="\ ++Usage: $0 [OPTION] CPU-MFR-OPSYS ++ $0 [OPTION] ALIAS ++ ++Canonicalize a configuration name. ++ ++Operation modes: ++ -h, --help print this help, then exit ++ -t, --time-stamp print date of last modification, then exit ++ -v, --version print version number, then exit ++ ++Report bugs and patches to <config-patches@gnu.org>." ++ ++version="\ ++GNU config.sub ($timestamp) ++ ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, ++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++ ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ++ ++help=" ++Try \`$me --help' for more information." ++ ++# Parse command line ++while test $# -gt 0 ; do ++ case $1 in ++ --time-stamp | --time* | -t ) ++ echo "$timestamp" ; exit ;; ++ --version | -v ) ++ echo "$version" ; exit ;; ++ --help | --h* | -h ) ++ echo "$usage"; exit ;; ++ -- ) # Stop option processing ++ shift; break ;; ++ - ) # Use stdin as input. ++ break ;; ++ -* ) ++ echo "$me: invalid option $1$help" ++ exit 1 ;; ++ ++ *local*) ++ # First pass through any local machine types. ++ echo $1 ++ exit ;; ++ ++ * ) ++ break ;; ++ esac ++done ++ ++case $# in ++ 0) echo "$me: missing argument$help" >&2 ++ exit 1;; ++ 1) ;; ++ *) echo "$me: too many arguments$help" >&2 ++ exit 1;; ++esac ++ ++# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). ++# Here we must recognize all the valid KERNEL-OS combinations. ++maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` ++case $maybe_os in ++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ ++ kopensolaris*-gnu* | \ ++ storm-chaos* | os2-emx* | rtmk-nova*) ++ os=-$maybe_os ++ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ++ ;; ++ *) ++ basic_machine=`echo $1 | sed 's/-[^-]*$//'` ++ if [ $basic_machine != $1 ] ++ then os=`echo $1 | sed 's/.*-/-/'` ++ else os=; fi ++ ;; ++esac ++ ++### Let's recognize common machines as not being operating systems so ++### that things like config.sub decstation-3100 work. We also ++### recognize some manufacturers as not being operating systems, so we ++### can provide default operating systems below. ++case $os in ++ -sun*os*) ++ # Prevent following clause from handling this invalid input. ++ ;; ++ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ ++ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ ++ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ ++ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ ++ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ ++ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ ++ -apple | -axis | -knuth | -cray) ++ os= ++ basic_machine=$1 ++ ;; ++ -sim | -cisco | -oki | -wec | -winbond) ++ os= ++ basic_machine=$1 ++ ;; ++ -scout) ++ ;; ++ -wrs) ++ os=-vxworks ++ basic_machine=$1 ++ ;; ++ -chorusos*) ++ os=-chorusos ++ basic_machine=$1 ++ ;; ++ -chorusrdb) ++ os=-chorusrdb ++ basic_machine=$1 ++ ;; ++ -hiux*) ++ os=-hiuxwe2 ++ ;; ++ -sco6) ++ os=-sco5v6 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco5) ++ os=-sco3.2v5 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco4) ++ os=-sco3.2v4 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco3.2.[4-9]*) ++ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco3.2v[4-9]*) ++ # Don't forget version if it is 3.2v4 or newer. ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco5v6*) ++ # Don't forget version if it is 3.2v4 or newer. ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco*) ++ os=-sco3.2v2 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -udk*) ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -isc) ++ os=-isc2.2 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -clix*) ++ basic_machine=clipper-intergraph ++ ;; ++ -isc*) ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -lynx*) ++ os=-lynxos ++ ;; ++ -ptx*) ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ++ ;; ++ -windowsnt*) ++ os=`echo $os | sed -e 's/windowsnt/winnt/'` ++ ;; ++ -psos*) ++ os=-psos ++ ;; ++ -mint | -mint[0-9]*) ++ basic_machine=m68k-atari ++ os=-mint ++ ;; ++esac ++ ++# Decode aliases for certain CPU-COMPANY combinations. ++case $basic_machine in ++ # Recognize the basic CPU types without company name. ++ # Some are omitted here because they have special meanings below. ++ 1750a | 580 \ ++ | a29k \ ++ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ ++ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ ++ | am33_2.0 \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ ++ | bfin \ ++ | c4x | clipper \ ++ | d10v | d30v | dlx | dsp16xx \ ++ | fido | fr30 | frv \ ++ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ ++ | i370 | i860 | i960 | ia64 \ ++ | ip2k | iq2000 \ ++ | lm32 \ ++ | m32c | m32r | m32rle | m68000 | m68k | m88k \ ++ | maxq | mb | microblaze | mcore | mep | metag \ ++ | mips | mipsbe | mipseb | mipsel | mipsle \ ++ | mips16 \ ++ | mips64 | mips64el \ ++ | mips64octeon | mips64octeonel \ ++ | mips64orion | mips64orionel \ ++ | mips64r5900 | mips64r5900el \ ++ | mips64vr | mips64vrel \ ++ | mips64vr4100 | mips64vr4100el \ ++ | mips64vr4300 | mips64vr4300el \ ++ | mips64vr5000 | mips64vr5000el \ ++ | mips64vr5900 | mips64vr5900el \ ++ | mipsisa32 | mipsisa32el \ ++ | mipsisa32r2 | mipsisa32r2el \ ++ | mipsisa64 | mipsisa64el \ ++ | mipsisa64r2 | mipsisa64r2el \ ++ | mipsisa64sb1 | mipsisa64sb1el \ ++ | mipsisa64sr71k | mipsisa64sr71kel \ ++ | mipstx39 | mipstx39el \ ++ | mn10200 | mn10300 \ ++ | moxie \ ++ | mt \ ++ | msp430 \ ++ | nios | nios2 \ ++ | ns16k | ns32k \ ++ | or32 \ ++ | pdp10 | pdp11 | pj | pjl \ ++ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ ++ | pyramid \ ++ | score \ ++ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ ++ | sh64 | sh64le \ ++ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ ++ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ ++ | spu | strongarm \ ++ | tahoe | thumb | tic4x | tic80 | tron \ ++ | v850 | v850e \ ++ | we32k \ ++ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ ++ | z8k | z80) ++ basic_machine=$basic_machine-unknown ++ ;; ++ m6811 | m68hc11 | m6812 | m68hc12) ++ # Motorola 68HC11/12. ++ basic_machine=$basic_machine-unknown ++ os=-none ++ ;; ++ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ++ ;; ++ ms1) ++ basic_machine=mt-unknown ++ ;; ++ ++ # We use `pc' rather than `unknown' ++ # because (1) that's what they normally are, and ++ # (2) the word "unknown" tends to confuse beginning users. ++ i*86 | x86_64) ++ basic_machine=$basic_machine-pc ++ ;; ++ # Object if more than one company name word. ++ *-*-*) ++ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 ++ exit 1 ++ ;; ++ # Recognize the basic CPU types with company name. ++ 580-* \ ++ | a29k-* \ ++ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ ++ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ ++ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ ++ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ ++ | avr-* | avr32-* \ ++ | bfin-* | bs2000-* \ ++ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ ++ | clipper-* | craynv-* | cydra-* \ ++ | d10v-* | d30v-* | dlx-* \ ++ | elxsi-* \ ++ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ ++ | h8300-* | h8500-* \ ++ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ ++ | i*86-* | i860-* | i960-* | ia64-* \ ++ | ip2k-* | iq2000-* \ ++ | lm32-* \ ++ | m32c-* | m32r-* | m32rle-* \ ++ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ ++ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ ++ | mips16-* \ ++ | mips64-* | mips64el-* \ ++ | mips64octeon-* | mips64octeonel-* \ ++ | mips64orion-* | mips64orionel-* \ ++ | mips64r5900-* | mips64r5900el-* \ ++ | mips64vr-* | mips64vrel-* \ ++ | mips64vr4100-* | mips64vr4100el-* \ ++ | mips64vr4300-* | mips64vr4300el-* \ ++ | mips64vr5000-* | mips64vr5000el-* \ ++ | mips64vr5900-* | mips64vr5900el-* \ ++ | mipsisa32-* | mipsisa32el-* \ ++ | mipsisa32r2-* | mipsisa32r2el-* \ ++ | mipsisa64-* | mipsisa64el-* \ ++ | mipsisa64r2-* | mipsisa64r2el-* \ ++ | mipsisa64sb1-* | mipsisa64sb1el-* \ ++ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ ++ | mipstx39-* | mipstx39el-* \ ++ | mmix-* \ ++ | mt-* \ ++ | msp430-* \ ++ | nios-* | nios2-* \ ++ | none-* | np1-* | ns16k-* | ns32k-* \ ++ | orion-* \ ++ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ ++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ ++ | pyramid-* \ ++ | romp-* | rs6000-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ ++ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ ++ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ ++ | sparclite-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ ++ | tahoe-* | thumb-* \ ++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ ++ | tron-* \ ++ | v850-* | v850e-* | vax-* \ ++ | we32k-* \ ++ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ ++ | xstormy16-* | xtensa*-* \ ++ | ymp-* \ ++ | z8k-* | z80-*) ++ ;; ++ # Recognize the basic CPU types without company name, with glob match. ++ xtensa*) ++ basic_machine=$basic_machine-unknown ++ ;; ++ # Recognize the various machine names and aliases which stand ++ # for a CPU type and a company and sometimes even an OS. ++ 386bsd) ++ basic_machine=i386-unknown ++ os=-bsd ++ ;; ++ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) ++ basic_machine=m68000-att ++ ;; ++ 3b*) ++ basic_machine=we32k-att ++ ;; ++ a29khif) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ abacus) ++ basic_machine=abacus-unknown ++ ;; ++ adobe68k) ++ basic_machine=m68010-adobe ++ os=-scout ++ ;; ++ alliant | fx80) ++ basic_machine=fx80-alliant ++ ;; ++ altos | altos3068) ++ basic_machine=m68k-altos ++ ;; ++ am29k) ++ basic_machine=a29k-none ++ os=-bsd ++ ;; ++ amd64) ++ basic_machine=x86_64-pc ++ ;; ++ amd64-*) ++ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ amdahl) ++ basic_machine=580-amdahl ++ os=-sysv ++ ;; ++ amiga | amiga-*) ++ basic_machine=m68k-unknown ++ ;; ++ amigaos | amigados) ++ basic_machine=m68k-unknown ++ os=-amigaos ++ ;; ++ amigaunix | amix) ++ basic_machine=m68k-unknown ++ os=-sysv4 ++ ;; ++ apollo68) ++ basic_machine=m68k-apollo ++ os=-sysv ++ ;; ++ apollo68bsd) ++ basic_machine=m68k-apollo ++ os=-bsd ++ ;; ++ aros) ++ basic_machine=i386-pc ++ os=-aros ++ ;; ++ aux) ++ basic_machine=m68k-apple ++ os=-aux ++ ;; ++ balance) ++ basic_machine=ns32k-sequent ++ os=-dynix ++ ;; ++ blackfin) ++ basic_machine=bfin-unknown ++ os=-linux ++ ;; ++ blackfin-*) ++ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ c90) ++ basic_machine=c90-cray ++ os=-unicos ++ ;; ++ cegcc) ++ basic_machine=arm-unknown ++ os=-cegcc ++ ;; ++ convex-c1) ++ basic_machine=c1-convex ++ os=-bsd ++ ;; ++ convex-c2) ++ basic_machine=c2-convex ++ os=-bsd ++ ;; ++ convex-c32) ++ basic_machine=c32-convex ++ os=-bsd ++ ;; ++ convex-c34) ++ basic_machine=c34-convex ++ os=-bsd ++ ;; ++ convex-c38) ++ basic_machine=c38-convex ++ os=-bsd ++ ;; ++ cray | j90) ++ basic_machine=j90-cray ++ os=-unicos ++ ;; ++ craynv) ++ basic_machine=craynv-cray ++ os=-unicosmp ++ ;; ++ cr16) ++ basic_machine=cr16-unknown ++ os=-elf ++ ;; ++ crds | unos) ++ basic_machine=m68k-crds ++ ;; ++ crisv32 | crisv32-* | etraxfs*) ++ basic_machine=crisv32-axis ++ ;; ++ cris | cris-* | etrax*) ++ basic_machine=cris-axis ++ ;; ++ crx) ++ basic_machine=crx-unknown ++ os=-elf ++ ;; ++ da30 | da30-*) ++ basic_machine=m68k-da30 ++ ;; ++ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) ++ basic_machine=mips-dec ++ ;; ++ decsystem10* | dec10*) ++ basic_machine=pdp10-dec ++ os=-tops10 ++ ;; ++ decsystem20* | dec20*) ++ basic_machine=pdp10-dec ++ os=-tops20 ++ ;; ++ delta | 3300 | motorola-3300 | motorola-delta \ ++ | 3300-motorola | delta-motorola) ++ basic_machine=m68k-motorola ++ ;; ++ delta88) ++ basic_machine=m88k-motorola ++ os=-sysv3 ++ ;; ++ dicos) ++ basic_machine=i686-pc ++ os=-dicos ++ ;; ++ djgpp) ++ basic_machine=i586-pc ++ os=-msdosdjgpp ++ ;; ++ dpx20 | dpx20-*) ++ basic_machine=rs6000-bull ++ os=-bosx ++ ;; ++ dpx2* | dpx2*-bull) ++ basic_machine=m68k-bull ++ os=-sysv3 ++ ;; ++ ebmon29k) ++ basic_machine=a29k-amd ++ os=-ebmon ++ ;; ++ elxsi) ++ basic_machine=elxsi-elxsi ++ os=-bsd ++ ;; ++ encore | umax | mmax) ++ basic_machine=ns32k-encore ++ ;; ++ es1800 | OSE68k | ose68k | ose | OSE) ++ basic_machine=m68k-ericsson ++ os=-ose ++ ;; ++ fx2800) ++ basic_machine=i860-alliant ++ ;; ++ genix) ++ basic_machine=ns32k-ns ++ ;; ++ gmicro) ++ basic_machine=tron-gmicro ++ os=-sysv ++ ;; ++ go32) ++ basic_machine=i386-pc ++ os=-go32 ++ ;; ++ h3050r* | hiux*) ++ basic_machine=hppa1.1-hitachi ++ os=-hiuxwe2 ++ ;; ++ h8300hms) ++ basic_machine=h8300-hitachi ++ os=-hms ++ ;; ++ h8300xray) ++ basic_machine=h8300-hitachi ++ os=-xray ++ ;; ++ h8500hms) ++ basic_machine=h8500-hitachi ++ os=-hms ++ ;; ++ harris) ++ basic_machine=m88k-harris ++ os=-sysv3 ++ ;; ++ hp300-*) ++ basic_machine=m68k-hp ++ ;; ++ hp300bsd) ++ basic_machine=m68k-hp ++ os=-bsd ++ ;; ++ hp300hpux) ++ basic_machine=m68k-hp ++ os=-hpux ++ ;; ++ hp3k9[0-9][0-9] | hp9[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; ++ hp9k2[0-9][0-9] | hp9k31[0-9]) ++ basic_machine=m68000-hp ++ ;; ++ hp9k3[2-9][0-9]) ++ basic_machine=m68k-hp ++ ;; ++ hp9k6[0-9][0-9] | hp6[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; ++ hp9k7[0-79][0-9] | hp7[0-79][0-9]) ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k78[0-9] | hp78[0-9]) ++ # FIXME: really hppa2.0-hp ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) ++ # FIXME: really hppa2.0-hp ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[0-9][13679] | hp8[0-9][13679]) ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[0-9][0-9] | hp8[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; ++ hppa-next) ++ os=-nextstep3 ++ ;; ++ hppaosf) ++ basic_machine=hppa1.1-hp ++ os=-osf ++ ;; ++ hppro) ++ basic_machine=hppa1.1-hp ++ os=-proelf ++ ;; ++ i370-ibm* | ibm*) ++ basic_machine=i370-ibm ++ ;; ++# I'm not sure what "Sysv32" means. Should this be sysv3.2? ++ i*86v32) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-sysv32 ++ ;; ++ i*86v4*) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-sysv4 ++ ;; ++ i*86v) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-sysv ++ ;; ++ i*86sol2) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-solaris2 ++ ;; ++ i386mach) ++ basic_machine=i386-mach ++ os=-mach ++ ;; ++ i386-vsta | vsta) ++ basic_machine=i386-unknown ++ os=-vsta ++ ;; ++ iris | iris4d) ++ basic_machine=mips-sgi ++ case $os in ++ -irix*) ++ ;; ++ *) ++ os=-irix4 ++ ;; ++ esac ++ ;; ++ isi68 | isi) ++ basic_machine=m68k-isi ++ os=-sysv ++ ;; ++ m68knommu) ++ basic_machine=m68k-unknown ++ os=-linux ++ ;; ++ m68knommu-*) ++ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ m88k-omron*) ++ basic_machine=m88k-omron ++ ;; ++ magnum | m3230) ++ basic_machine=mips-mips ++ os=-sysv ++ ;; ++ merlin) ++ basic_machine=ns32k-utek ++ os=-sysv ++ ;; ++ mingw32) ++ basic_machine=i386-pc ++ os=-mingw32 ++ ;; ++ mingw32ce) ++ basic_machine=arm-unknown ++ os=-mingw32ce ++ ;; ++ miniframe) ++ basic_machine=m68000-convergent ++ ;; ++ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) ++ basic_machine=m68k-atari ++ os=-mint ++ ;; ++ mips3*-*) ++ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ++ ;; ++ mips3*) ++ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ++ ;; ++ monitor) ++ basic_machine=m68k-rom68k ++ os=-coff ++ ;; ++ morphos) ++ basic_machine=powerpc-unknown ++ os=-morphos ++ ;; ++ msdos) ++ basic_machine=i386-pc ++ os=-msdos ++ ;; ++ ms1-*) ++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ++ ;; ++ mvs) ++ basic_machine=i370-ibm ++ os=-mvs ++ ;; ++ ncr3000) ++ basic_machine=i486-ncr ++ os=-sysv4 ++ ;; ++ netbsd386) ++ basic_machine=i386-unknown ++ os=-netbsd ++ ;; ++ netwinder) ++ basic_machine=armv4l-rebel ++ os=-linux ++ ;; ++ news | news700 | news800 | news900) ++ basic_machine=m68k-sony ++ os=-newsos ++ ;; ++ news1000) ++ basic_machine=m68030-sony ++ os=-newsos ++ ;; ++ news-3600 | risc-news) ++ basic_machine=mips-sony ++ os=-newsos ++ ;; ++ necv70) ++ basic_machine=v70-nec ++ os=-sysv ++ ;; ++ next | m*-next ) ++ basic_machine=m68k-next ++ case $os in ++ -nextstep* ) ++ ;; ++ -ns2*) ++ os=-nextstep2 ++ ;; ++ *) ++ os=-nextstep3 ++ ;; ++ esac ++ ;; ++ nh3000) ++ basic_machine=m68k-harris ++ os=-cxux ++ ;; ++ nh[45]000) ++ basic_machine=m88k-harris ++ os=-cxux ++ ;; ++ nindy960) ++ basic_machine=i960-intel ++ os=-nindy ++ ;; ++ mon960) ++ basic_machine=i960-intel ++ os=-mon960 ++ ;; ++ nonstopux) ++ basic_machine=mips-compaq ++ os=-nonstopux ++ ;; ++ np1) ++ basic_machine=np1-gould ++ ;; ++ nsr-tandem) ++ basic_machine=nsr-tandem ++ ;; ++ op50n-* | op60c-*) ++ basic_machine=hppa1.1-oki ++ os=-proelf ++ ;; ++ openrisc | openrisc-*) ++ basic_machine=or32-unknown ++ ;; ++ os400) ++ basic_machine=powerpc-ibm ++ os=-os400 ++ ;; ++ OSE68000 | ose68000) ++ basic_machine=m68000-ericsson ++ os=-ose ++ ;; ++ os68k) ++ basic_machine=m68k-none ++ os=-os68k ++ ;; ++ pa-hitachi) ++ basic_machine=hppa1.1-hitachi ++ os=-hiuxwe2 ++ ;; ++ paragon) ++ basic_machine=i860-intel ++ os=-osf ++ ;; ++ parisc) ++ basic_machine=hppa-unknown ++ os=-linux ++ ;; ++ parisc-*) ++ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ pbd) ++ basic_machine=sparc-tti ++ ;; ++ pbb) ++ basic_machine=m68k-tti ++ ;; ++ pc532 | pc532-*) ++ basic_machine=ns32k-pc532 ++ ;; ++ pc98) ++ basic_machine=i386-pc ++ ;; ++ pc98-*) ++ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentium | p5 | k5 | k6 | nexgen | viac3) ++ basic_machine=i586-pc ++ ;; ++ pentiumpro | p6 | 6x86 | athlon | athlon_*) ++ basic_machine=i686-pc ++ ;; ++ pentiumii | pentium2 | pentiumiii | pentium3) ++ basic_machine=i686-pc ++ ;; ++ pentium4) ++ basic_machine=i786-pc ++ ;; ++ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) ++ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentiumpro-* | p6-* | 6x86-* | athlon-*) ++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) ++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentium4-*) ++ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pn) ++ basic_machine=pn-gould ++ ;; ++ power) basic_machine=power-ibm ++ ;; ++ ppc) basic_machine=powerpc-unknown ++ ;; ++ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ppcle | powerpclittle | ppc-le | powerpc-little) ++ basic_machine=powerpcle-unknown ++ ;; ++ ppcle-* | powerpclittle-*) ++ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ppc64) basic_machine=powerpc64-unknown ++ ;; ++ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ppc64le | powerpc64little | ppc64-le | powerpc64-little) ++ basic_machine=powerpc64le-unknown ++ ;; ++ ppc64le-* | powerpc64little-*) ++ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ps2) ++ basic_machine=i386-ibm ++ ;; ++ pw32) ++ basic_machine=i586-unknown ++ os=-pw32 ++ ;; ++ rdos) ++ basic_machine=i386-pc ++ os=-rdos ++ ;; ++ rom68k) ++ basic_machine=m68k-rom68k ++ os=-coff ++ ;; ++ rm[46]00) ++ basic_machine=mips-siemens ++ ;; ++ rtpc | rtpc-*) ++ basic_machine=romp-ibm ++ ;; ++ s390 | s390-*) ++ basic_machine=s390-ibm ++ ;; ++ s390x | s390x-*) ++ basic_machine=s390x-ibm ++ ;; ++ sa29200) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ sb1) ++ basic_machine=mipsisa64sb1-unknown ++ ;; ++ sb1el) ++ basic_machine=mipsisa64sb1el-unknown ++ ;; ++ sde) ++ basic_machine=mipsisa32-sde ++ os=-elf ++ ;; ++ sei) ++ basic_machine=mips-sei ++ os=-seiux ++ ;; ++ sequent) ++ basic_machine=i386-sequent ++ ;; ++ sh) ++ basic_machine=sh-hitachi ++ os=-hms ++ ;; ++ sh5el) ++ basic_machine=sh5le-unknown ++ ;; ++ sh64) ++ basic_machine=sh64-unknown ++ ;; ++ sparclite-wrs | simso-wrs) ++ basic_machine=sparclite-wrs ++ os=-vxworks ++ ;; ++ sps7) ++ basic_machine=m68k-bull ++ os=-sysv2 ++ ;; ++ spur) ++ basic_machine=spur-unknown ++ ;; ++ st2000) ++ basic_machine=m68k-tandem ++ ;; ++ stratus) ++ basic_machine=i860-stratus ++ os=-sysv4 ++ ;; ++ sun2) ++ basic_machine=m68000-sun ++ ;; ++ sun2os3) ++ basic_machine=m68000-sun ++ os=-sunos3 ++ ;; ++ sun2os4) ++ basic_machine=m68000-sun ++ os=-sunos4 ++ ;; ++ sun3os3) ++ basic_machine=m68k-sun ++ os=-sunos3 ++ ;; ++ sun3os4) ++ basic_machine=m68k-sun ++ os=-sunos4 ++ ;; ++ sun4os3) ++ basic_machine=sparc-sun ++ os=-sunos3 ++ ;; ++ sun4os4) ++ basic_machine=sparc-sun ++ os=-sunos4 ++ ;; ++ sun4sol2) ++ basic_machine=sparc-sun ++ os=-solaris2 ++ ;; ++ sun3 | sun3-*) ++ basic_machine=m68k-sun ++ ;; ++ sun4) ++ basic_machine=sparc-sun ++ ;; ++ sun386 | sun386i | roadrunner) ++ basic_machine=i386-sun ++ ;; ++ sv1) ++ basic_machine=sv1-cray ++ os=-unicos ++ ;; ++ symmetry) ++ basic_machine=i386-sequent ++ os=-dynix ++ ;; ++ t3e) ++ basic_machine=alphaev5-cray ++ os=-unicos ++ ;; ++ t90) ++ basic_machine=t90-cray ++ os=-unicos ++ ;; ++ tic54x | c54x*) ++ basic_machine=tic54x-unknown ++ os=-coff ++ ;; ++ tic55x | c55x*) ++ basic_machine=tic55x-unknown ++ os=-coff ++ ;; ++ tic6x | c6x*) ++ basic_machine=tic6x-unknown ++ os=-coff ++ ;; ++ tile*) ++ basic_machine=tile-unknown ++ os=-linux-gnu ++ ;; ++ tx39) ++ basic_machine=mipstx39-unknown ++ ;; ++ tx39el) ++ basic_machine=mipstx39el-unknown ++ ;; ++ toad1) ++ basic_machine=pdp10-xkl ++ os=-tops20 ++ ;; ++ tower | tower-32) ++ basic_machine=m68k-ncr ++ ;; ++ tpf) ++ basic_machine=s390x-ibm ++ os=-tpf ++ ;; ++ udi29k) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ ultra3) ++ basic_machine=a29k-nyu ++ os=-sym1 ++ ;; ++ v810 | necv810) ++ basic_machine=v810-nec ++ os=-none ++ ;; ++ vaxv) ++ basic_machine=vax-dec ++ os=-sysv ++ ;; ++ vms) ++ basic_machine=vax-dec ++ os=-vms ++ ;; ++ vpp*|vx|vx-*) ++ basic_machine=f301-fujitsu ++ ;; ++ vxworks960) ++ basic_machine=i960-wrs ++ os=-vxworks ++ ;; ++ vxworks68) ++ basic_machine=m68k-wrs ++ os=-vxworks ++ ;; ++ vxworks29k) ++ basic_machine=a29k-wrs ++ os=-vxworks ++ ;; ++ w65*) ++ basic_machine=w65-wdc ++ os=-none ++ ;; ++ w89k-*) ++ basic_machine=hppa1.1-winbond ++ os=-proelf ++ ;; ++ xbox) ++ basic_machine=i686-pc ++ os=-mingw32 ++ ;; ++ xps | xps100) ++ basic_machine=xps100-honeywell ++ ;; ++ ymp) ++ basic_machine=ymp-cray ++ os=-unicos ++ ;; ++ z8k-*-coff) ++ basic_machine=z8k-unknown ++ os=-sim ++ ;; ++ z80-*-coff) ++ basic_machine=z80-unknown ++ os=-sim ++ ;; ++ none) ++ basic_machine=none-none ++ os=-none ++ ;; ++ ++# Here we handle the default manufacturer of certain CPU types. It is in ++# some cases the only manufacturer, in others, it is the most popular. ++ w89k) ++ basic_machine=hppa1.1-winbond ++ ;; ++ op50n) ++ basic_machine=hppa1.1-oki ++ ;; ++ op60c) ++ basic_machine=hppa1.1-oki ++ ;; ++ romp) ++ basic_machine=romp-ibm ++ ;; ++ mmix) ++ basic_machine=mmix-knuth ++ ;; ++ rs6000) ++ basic_machine=rs6000-ibm ++ ;; ++ vax) ++ basic_machine=vax-dec ++ ;; ++ pdp10) ++ # there are many clones, so DEC is not a safe bet ++ basic_machine=pdp10-unknown ++ ;; ++ pdp11) ++ basic_machine=pdp11-dec ++ ;; ++ we32k) ++ basic_machine=we32k-att ++ ;; ++ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) ++ basic_machine=sh-unknown ++ ;; ++ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) ++ basic_machine=sparc-sun ++ ;; ++ cydra) ++ basic_machine=cydra-cydrome ++ ;; ++ orion) ++ basic_machine=orion-highlevel ++ ;; ++ orion105) ++ basic_machine=clipper-highlevel ++ ;; ++ mac | mpw | mac-mpw) ++ basic_machine=m68k-apple ++ ;; ++ pmac | pmac-mpw) ++ basic_machine=powerpc-apple ++ ;; ++ *-unknown) ++ # Make sure to match an already-canonicalized machine name. ++ ;; ++ *) ++ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 ++ exit 1 ++ ;; ++esac ++ ++# Here we canonicalize certain aliases for manufacturers. ++case $basic_machine in ++ *-digital*) ++ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ++ ;; ++ *-commodore*) ++ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ++ ;; ++ *) ++ ;; ++esac ++ ++# Decode manufacturer-specific aliases for certain operating systems. ++ ++if [ x"$os" != x"" ] ++then ++case $os in ++ # First match some system type aliases ++ # that might get confused with valid system types. ++ # -solaris* is a basic system type, with this one exception. ++ -solaris1 | -solaris1.*) ++ os=`echo $os | sed -e 's|solaris1|sunos4|'` ++ ;; ++ -solaris) ++ os=-solaris2 ++ ;; ++ -svr4*) ++ os=-sysv4 ++ ;; ++ -unixware*) ++ os=-sysv4.2uw ++ ;; ++ -gnu/linux*) ++ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ++ ;; ++ # First accept the basic system types. ++ # The portable systems comes first. ++ # Each alternative MUST END IN A *, to match a version number. ++ # -sysv* is not here because it comes later, after sysvr4. ++ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ ++ | -kopensolaris* \ ++ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ ++ | -aos* | -aros* \ ++ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ ++ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ ++ | -openbsd* | -solidbsd* \ ++ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ ++ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ ++ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ ++ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ ++ | -chorusos* | -chorusrdb* | -cegcc* \ ++ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ ++ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ ++ | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ ++ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ ++ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ++ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ ++ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ ++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) ++ # Remember, each alternative MUST END IN *, to match a version number. ++ ;; ++ -qnx*) ++ case $basic_machine in ++ x86-* | i*86-*) ++ ;; ++ *) ++ os=-nto$os ++ ;; ++ esac ++ ;; ++ -nto-qnx*) ++ ;; ++ -nto*) ++ os=`echo $os | sed -e 's|nto|nto-qnx|'` ++ ;; ++ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ ++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ ++ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ++ ;; ++ -mac*) ++ os=`echo $os | sed -e 's|mac|macos|'` ++ ;; ++ -linux-dietlibc) ++ os=-linux-dietlibc ++ ;; ++ -linux*) ++ os=`echo $os | sed -e 's|linux|linux-gnu|'` ++ ;; ++ -sunos5*) ++ os=`echo $os | sed -e 's|sunos5|solaris2|'` ++ ;; ++ -sunos6*) ++ os=`echo $os | sed -e 's|sunos6|solaris3|'` ++ ;; ++ -opened*) ++ os=-openedition ++ ;; ++ -os400*) ++ os=-os400 ++ ;; ++ -wince*) ++ os=-wince ++ ;; ++ -osfrose*) ++ os=-osfrose ++ ;; ++ -osf*) ++ os=-osf ++ ;; ++ -utek*) ++ os=-bsd ++ ;; ++ -dynix*) ++ os=-bsd ++ ;; ++ -acis*) ++ os=-aos ++ ;; ++ -atheos*) ++ os=-atheos ++ ;; ++ -syllable*) ++ os=-syllable ++ ;; ++ -386bsd) ++ os=-bsd ++ ;; ++ -ctix* | -uts*) ++ os=-sysv ++ ;; ++ -nova*) ++ os=-rtmk-nova ++ ;; ++ -ns2 ) ++ os=-nextstep2 ++ ;; ++ -nsk*) ++ os=-nsk ++ ;; ++ # Preserve the version number of sinix5. ++ -sinix5.*) ++ os=`echo $os | sed -e 's|sinix|sysv|'` ++ ;; ++ -sinix*) ++ os=-sysv4 ++ ;; ++ -tpf*) ++ os=-tpf ++ ;; ++ -triton*) ++ os=-sysv3 ++ ;; ++ -oss*) ++ os=-sysv3 ++ ;; ++ -svr4) ++ os=-sysv4 ++ ;; ++ -svr3) ++ os=-sysv3 ++ ;; ++ -sysvr4) ++ os=-sysv4 ++ ;; ++ # This must come after -sysvr4. ++ -sysv*) ++ ;; ++ -ose*) ++ os=-ose ++ ;; ++ -es1800*) ++ os=-ose ++ ;; ++ -xenix) ++ os=-xenix ++ ;; ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ++ os=-mint ++ ;; ++ -aros*) ++ os=-aros ++ ;; ++ -kaos*) ++ os=-kaos ++ ;; ++ -zvmoe) ++ os=-zvmoe ++ ;; ++ -dicos*) ++ os=-dicos ++ ;; ++ -none) ++ ;; ++ *) ++ # Get rid of the `-' at the beginning of $os. ++ os=`echo $os | sed 's/[^-]*-//'` ++ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 ++ exit 1 ++ ;; ++esac ++else ++ ++# Here we handle the default operating systems that come with various machines. ++# The value should be what the vendor currently ships out the door with their ++# machine or put another way, the most popular os provided with the machine. ++ ++# Note that if you're going to try to match "-MANUFACTURER" here (say, ++# "-sun"), then you have to tell the case statement up towards the top ++# that MANUFACTURER isn't an operating system. Otherwise, code above ++# will signal an error saying that MANUFACTURER isn't an operating ++# system, and we'll never get to this point. ++ ++case $basic_machine in ++ score-*) ++ os=-elf ++ ;; ++ spu-*) ++ os=-elf ++ ;; ++ *-acorn) ++ os=-riscix1.2 ++ ;; ++ arm*-rebel) ++ os=-linux ++ ;; ++ arm*-semi) ++ os=-aout ++ ;; ++ c4x-* | tic4x-*) ++ os=-coff ++ ;; ++ # This must come before the *-dec entry. ++ pdp10-*) ++ os=-tops20 ++ ;; ++ pdp11-*) ++ os=-none ++ ;; ++ *-dec | vax-*) ++ os=-ultrix4.2 ++ ;; ++ m68*-apollo) ++ os=-domain ++ ;; ++ i386-sun) ++ os=-sunos4.0.2 ++ ;; ++ m68000-sun) ++ os=-sunos3 ++ # This also exists in the configure program, but was not the ++ # default. ++ # os=-sunos4 ++ ;; ++ m68*-cisco) ++ os=-aout ++ ;; ++ mep-*) ++ os=-elf ++ ;; ++ mips*-cisco) ++ os=-elf ++ ;; ++ mips*-*) ++ os=-elf ++ ;; ++ or32-*) ++ os=-coff ++ ;; ++ *-tti) # must be before sparc entry or we get the wrong os. ++ os=-sysv3 ++ ;; ++ sparc-* | *-sun) ++ os=-sunos4.1.1 ++ ;; ++ *-be) ++ os=-beos ++ ;; ++ *-haiku) ++ os=-haiku ++ ;; ++ *-ibm) ++ os=-aix ++ ;; ++ *-knuth) ++ os=-mmixware ++ ;; ++ *-wec) ++ os=-proelf ++ ;; ++ *-winbond) ++ os=-proelf ++ ;; ++ *-oki) ++ os=-proelf ++ ;; ++ *-hp) ++ os=-hpux ++ ;; ++ *-hitachi) ++ os=-hiux ++ ;; ++ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) ++ os=-sysv ++ ;; ++ *-cbm) ++ os=-amigaos ++ ;; ++ *-dg) ++ os=-dgux ++ ;; ++ *-dolphin) ++ os=-sysv3 ++ ;; ++ m68k-ccur) ++ os=-rtu ++ ;; ++ m88k-omron*) ++ os=-luna ++ ;; ++ *-next ) ++ os=-nextstep ++ ;; ++ *-sequent) ++ os=-ptx ++ ;; ++ *-crds) ++ os=-unos ++ ;; ++ *-ns) ++ os=-genix ++ ;; ++ i370-*) ++ os=-mvs ++ ;; ++ *-next) ++ os=-nextstep3 ++ ;; ++ *-gould) ++ os=-sysv ++ ;; ++ *-highlevel) ++ os=-bsd ++ ;; ++ *-encore) ++ os=-bsd ++ ;; ++ *-sgi) ++ os=-irix ++ ;; ++ *-siemens) ++ os=-sysv4 ++ ;; ++ *-masscomp) ++ os=-rtu ++ ;; ++ f30[01]-fujitsu | f700-fujitsu) ++ os=-uxpv ++ ;; ++ *-rom68k) ++ os=-coff ++ ;; ++ *-*bug) ++ os=-coff ++ ;; ++ *-apple) ++ os=-macos ++ ;; ++ *-atari*) ++ os=-mint ++ ;; ++ *) ++ os=-none ++ ;; ++esac ++fi ++ ++# Here we handle the case where we know the os, and the CPU type, but not the ++# manufacturer. We pick the logical manufacturer. ++vendor=unknown ++case $basic_machine in ++ *-unknown) ++ case $os in ++ -riscix*) ++ vendor=acorn ++ ;; ++ -sunos*) ++ vendor=sun ++ ;; ++ -aix*) ++ vendor=ibm ++ ;; ++ -beos*) ++ vendor=be ++ ;; ++ -hpux*) ++ vendor=hp ++ ;; ++ -mpeix*) ++ vendor=hp ++ ;; ++ -hiux*) ++ vendor=hitachi ++ ;; ++ -unos*) ++ vendor=crds ++ ;; ++ -dgux*) ++ vendor=dg ++ ;; ++ -luna*) ++ vendor=omron ++ ;; ++ -genix*) ++ vendor=ns ++ ;; ++ -mvs* | -opened*) ++ vendor=ibm ++ ;; ++ -os400*) ++ vendor=ibm ++ ;; ++ -ptx*) ++ vendor=sequent ++ ;; ++ -tpf*) ++ vendor=ibm ++ ;; ++ -vxsim* | -vxworks* | -windiss*) ++ vendor=wrs ++ ;; ++ -aux*) ++ vendor=apple ++ ;; ++ -hms*) ++ vendor=hitachi ++ ;; ++ -mpw* | -macos*) ++ vendor=apple ++ ;; ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ++ vendor=atari ++ ;; ++ -vos*) ++ vendor=stratus ++ ;; ++ esac ++ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ++ ;; ++esac ++ ++echo $basic_machine$os ++exit ++ ++# Local variables: ++# eval: (add-hook 'write-file-hooks 'time-stamp) ++# time-stamp-start: "timestamp='" ++# time-stamp-format: "%:y-%02m-%02d" ++# time-stamp-end: "'" ++# End: +diff --git a/examples/VFS/configure.in b/examples/VFS/configure.in +new file mode 100644 +index 0000000..1c61853 +--- /dev/null ++++ b/examples/VFS/configure.in +@@ -0,0 +1,357 @@ ++dnl -*- mode: m4-mode -*- ++dnl Process this file with autoconf to produce a configure script. ++ ++dnl We must use autotools 2.53 or above ++AC_PREREQ(2.53) ++AC_INIT(Makefile.in) ++ ++AC_CONFIG_HEADER(module_config.h) ++#dnl To make sure that didn't get #define PACKAGE_* in modules_config.h ++#echo "" > confdefs.h ++ ++dnl Checks for programs. ++AC_PROG_CC ++AC_PROG_INSTALL ++AC_CANONICAL_HOST ++ ++################################################# ++# Directory handling stuff to support both the ++# legacy SAMBA directories and FHS compliant ++# ones... ++AC_PREFIX_DEFAULT(/usr/local/samba) ++ ++AC_ARG_WITH(fhs, ++[ --with-fhs Use FHS-compliant paths (default=no)], ++ libdir="\${prefix}/lib/samba", ++ libdir="\${prefix}/lib") ++ ++AC_SUBST(libdir) ++ ++SAMBA_SOURCE="../../source3" ++#################################################### ++# set the location location of the samba source tree ++AC_ARG_WITH(samba-source, ++[ --with-samba-source=DIR Where is the samba source tree (../../source3)], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-samba-source called without argument - will use default]) ++ ;; ++ * ) ++ SAMBA_SOURCE="$withval" ++ ;; ++ esac]) ++ ++AC_SUBST(SAMBA_SOURCE) ++ ++dnl Unique-to-Samba variables we'll be playing with. ++AC_SUBST(CC) ++AC_SUBST(SHELL) ++AC_SUBST(LDSHFLAGS) ++AC_SUBST(SONAMEFLAG) ++AC_SUBST(SHLD) ++AC_SUBST(HOST_OS) ++AC_SUBST(PICFLAGS) ++AC_SUBST(PICSUFFIX) ++AC_SUBST(SHLIBEXT) ++AC_SUBST(INSTALLCLIENTCMD_SH) ++AC_SUBST(INSTALLCLIENTCMD_A) ++AC_SUBST(SHLIB_PROGS) ++AC_SUBST(EXTRA_BIN_PROGS) ++AC_SUBST(EXTRA_SBIN_PROGS) ++AC_SUBST(EXTRA_ALL_TARGETS) ++ ++AC_ARG_ENABLE(debug, ++[ --enable-debug Turn on compiler debugging information (default=no)], ++ [if eval "test x$enable_debug = xyes"; then ++ CFLAGS="${CFLAGS} -g" ++ fi]) ++ ++AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)], ++ [if eval "test x$enable_developer = xyes"; then ++ developer=yes ++ CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER" ++ fi]) ++ ++# compile with optimization and without debugging by default, but ++# allow people to set their own preference. ++if test "x$CFLAGS" = x ++then ++ CFLAGS="-O ${CFLAGS}" ++fi ++ ++ ################################################# ++ # check for krb5-config from recent MIT and Heimdal kerberos 5 ++ AC_PATH_PROG(KRB5CONFIG, krb5-config) ++ AC_MSG_CHECKING(for working krb5-config) ++ if test -x "$KRB5CONFIG"; then ++ CFLAGS="$CFLAGS `$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`" ++ CPPFLAGS="$CPPFLAGS `$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`" ++ FOUND_KRB5=yes ++ AC_MSG_RESULT(yes) ++ else ++ AC_MSG_RESULT(no. Fallback to previous krb5 detection strategy) ++ fi ++ ++ if test x$FOUND_KRB5 = x"no"; then ++ ################################################# ++ # check for location of Kerberos 5 install ++ AC_MSG_CHECKING(for kerberos 5 install path) ++ AC_ARG_WITH(krb5, ++ [ --with-krb5=base-dir Locate Kerberos 5 support (default=/usr)], ++ [ case "$withval" in ++ no) ++ AC_MSG_RESULT(no) ++ ;; ++ *) ++ AC_MSG_RESULT(yes) ++ CFLAGS="$CFLAGS -I$withval/include" ++ CPPFLAGS="$CPPFLAGS -I$withval/include" ++ FOUND_KRB5=yes ++ ;; ++ esac ], ++ AC_MSG_RESULT(no) ++ ) ++ fi ++ ++if test x$FOUND_KRB5 = x"no"; then ++################################################# ++# see if this box has the SuSE location for the heimdal kerberos implementation ++AC_MSG_CHECKING(for /usr/include/heimdal) ++if test -d /usr/include/heimdal; then ++ if test -f /usr/lib/heimdal/lib/libkrb5.a; then ++ CFLAGS="$CFLAGS -I/usr/include/heimdal" ++ CPPFLAGS="$CPPFLAGS -I/usr/include/heimdal" ++ AC_MSG_RESULT(yes) ++ else ++ CFLAGS="$CFLAGS -I/usr/include/heimdal" ++ CPPFLAGS="$CPPFLAGS -I/usr/include/heimdal" ++ AC_MSG_RESULT(yes) ++ ++ fi ++else ++ AC_MSG_RESULT(no) ++fi ++fi ++ ++ ++if test x$FOUND_KRB5 = x"no"; then ++################################################# ++# see if this box has the RedHat location for kerberos ++AC_MSG_CHECKING(for /usr/kerberos) ++if test -d /usr/kerberos -a -f /usr/kerberos/lib/libkrb5.a; then ++ LDFLAGS="$LDFLAGS -L/usr/kerberos/lib" ++ CFLAGS="$CFLAGS -I/usr/kerberos/include" ++ CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" ++ AC_MSG_RESULT(yes) ++else ++ AC_MSG_RESULT(no) ++fi ++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 ++ AC_CHECK_HEADERS(krb5.h) ++ ++ # now check for gssapi headers. This is also done here to allow for ++ # different kerberos include paths ++ AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h com_err.h) ++ ++#dnl Check if we use GNU ld ++#LD=ld ++#AC_PROG_LD_GNU ++ ++builddir=`pwd` ++AC_SUBST(builddir) ++ ++# Assume non-shared by default and override below ++BLDSHARED="false" ++ ++# these are the defaults, good for lots of systems ++HOST_OS="$host_os" ++LDSHFLAGS="-shared" ++SONAMEFLAG="#" ++SHLD="\${CC}" ++PICFLAGS="" ++PICSUFFIX="po" ++SHLIBEXT="so" ++ ++# Since we are not embedded in the Samba tree, building shared modules is ++# really the only option. ++enable_shared=yes ++ ++if test "$enable_shared" = "yes"; then ++ # this bit needs to be modified for each OS that is suported by ++ # smbwrapper. You need to specify how to created a shared library and ++ # how to compile C code to produce PIC object files ++ ++ AC_MSG_CHECKING([ability to build shared libraries]) ++ ++ # and these are for particular systems ++ case "$host_os" in ++ *linux*) ++ BLDSHARED="true" ++ LDSHFLAGS="-shared" ++ DYNEXP="-Wl,--export-dynamic" ++ PICFLAGS="-fPIC" ++ SONAMEFLAG="-Wl,-soname=" ++ ;; ++ *solaris*) ++ BLDSHARED="true" ++ LDSHFLAGS="-G" ++ SONAMEFLAG="-h " ++ if test "${GCC}" = "yes"; then ++ PICFLAGS="-fPIC" ++ if test "${ac_cv_prog_gnu_ld}" = "yes"; then ++ DYNEXP="-Wl,-E" ++ fi ++ else ++ PICFLAGS="-KPIC" ++ ## ${CFLAGS} added for building 64-bit shared ++ ## libs using Sun's Compiler ++ LDSHFLAGS="-G \${CFLAGS}" ++ PICSUFFIX="po.o" ++ fi ++ ;; ++ *sunos*) ++ BLDSHARED="true" ++ LDSHFLAGS="-G" ++ SONAMEFLAG="-Wl,-h," ++ PICFLAGS="-KPIC" # Is this correct for SunOS ++ ;; ++ *netbsd* | *freebsd*) BLDSHARED="true" ++ LDSHFLAGS="-shared" ++ DYNEXP="-Wl,--export-dynamic" ++ SONAMEFLAG="-Wl,-soname," ++ PICFLAGS="-fPIC -DPIC" ++ ;; ++ *openbsd*) BLDSHARED="true" ++ LDSHFLAGS="-shared" ++ DYNEXP="-Wl,-Bdynamic" ++ SONAMEFLAG="-Wl,-soname," ++ PICFLAGS="-fPIC" ++ ;; ++ *irix*) ++ case "$host_os" in ++ *irix6*) ++ ;; ++ esac ++ ATTEMPT_WRAP32_BUILD=yes ++ BLDSHARED="true" ++ LDSHFLAGS="-set_version sgi1.0 -shared" ++ SONAMEFLAG="-soname " ++ SHLD="\${LD}" ++ if test "${GCC}" = "yes"; then ++ PICFLAGS="-fPIC" ++ else ++ PICFLAGS="-KPIC" ++ fi ++ ;; ++ *aix*) ++ BLDSHARED="true" ++ LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry,-berok" ++ DYNEXP="-Wl,-brtl,-bexpall" ++ PICFLAGS="-O2" ++ if test "${GCC}" != "yes"; then ++ ## for funky AIX compiler using strncpy() ++ CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000" ++ fi ++ ;; ++ *hpux*) ++ SHLIBEXT="sl" ++ # Use special PIC flags for the native HP-UX compiler. ++ if test $ac_cv_prog_cc_Ae = yes; then ++ BLDSHARED="true" ++ SHLD="/usr/bin/ld" ++ LDSHFLAGS="-B symbolic -b -z" ++ SONAMEFLAG="+h " ++ PICFLAGS="+z" ++ fi ++ DYNEXP="-Wl,-E" ++ ;; ++ *qnx*) ++ ;; ++ *osf*) ++ BLDSHARED="true" ++ LDSHFLAGS="-shared" ++ SONAMEFLAG="-Wl,-soname," ++ PICFLAGS="-fPIC" ++ ;; ++ *sco*) ++ ;; ++ *unixware*) ++ BLDSHARED="true" ++ LDSHFLAGS="-shared" ++ SONAMEFLAG="-Wl,-soname," ++ PICFLAGS="-KPIC" ++ ;; ++ *next2*) ++ ;; ++ *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man]) ++ ;; ++ *sysv4*) ++ case "$host" in ++ *-univel-*) ++ LDSHFLAGS="-G" ++ DYNEXP="-Bexport" ++ ;; ++ *mips-sni-sysv4*) ++ ;; ++ esac ++ ;; ++ ++ *sysv5*) ++ LDSHFLAGS="-G" ++ ;; ++ *vos*) ++ BLDSHARED="false" ++ LDSHFLAGS="" ++ ;; ++ *darwin*) ++ BLDSHARED="true" ++ LDSHFLAGS="-bundle -flat_namespace -undefined suppress" ++ SHLIBEXT="dylib" ++ ;; ++ *) ++ ;; ++ esac ++ AC_SUBST(DYNEXP) ++ AC_MSG_RESULT($BLDSHARED) ++ AC_MSG_CHECKING([linker flags for shared libraries]) ++ AC_MSG_RESULT([$LDSHFLAGS]) ++ AC_MSG_CHECKING([compiler flags for position-independent code]) ++ AC_MSG_RESULT([$PICFLAGS]) ++fi ++ ++####################################################### ++# test whether building a shared library actually works ++if test $BLDSHARED = true; then ++AC_CACHE_CHECK([whether building shared libraries actually works], ++ [ac_cv_shlib_works],[ ++ ac_cv_shlib_works=no ++ # try building a trivial shared library ++ if test "$PICSUFFIX" = "po"; then ++ $CC $CPPFLAGS $CFLAGS $PICFLAGS -c -o shlib.po ${SAMBA_SOURCE}/../tests/shlib.c && ++ $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" shlib.po && ++ ac_cv_shlib_works=yes ++ else ++ $CC $CPPFLAGS $CFLAGS $PICFLAGS -c -o shlib.$PICSUFFIX ${SAMBA_SOURCE}/../tests/shlib.c && ++ mv shlib.$PICSUFFIX shlib.po && ++ $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" shlib.po && ++ ac_cv_shlib_works=yes ++ fi ++ rm -f "shlib.$SHLIBEXT" shlib.po ++]) ++if test $ac_cv_shlib_works = no; then ++ BLDSHARED=false ++ AC_MSG_WARN([[Did you forget to specify --with-samba-source=/path/to/samba?]]) ++fi ++fi ++ ++ ++ ++ ++AC_OUTPUT(Makefile) +diff --git a/examples/VFS/install-sh b/examples/VFS/install-sh +new file mode 100644 +index 0000000..5871924 +--- /dev/null ++++ b/examples/VFS/install-sh +@@ -0,0 +1,238 @@ ++#! /bin/sh ++# ++# install - install a program, script, or datafile ++# This comes from X11R5. ++# ++# Calling this script install-sh is preferred over install.sh, to prevent ++# `make' implicit rules from creating a file called install from it ++# when there is no Makefile. ++# ++# This script is compatible with the BSD install script, but was written ++# from scratch. ++# ++ ++ ++# set DOITPROG to echo to test this script ++ ++# Don't use :- since 4.3BSD and earlier shells don't like it. ++doit="${DOITPROG-}" ++ ++ ++# put in absolute paths if you don't have them in your path; or use env. vars. ++ ++mvprog="${MVPROG-mv}" ++cpprog="${CPPROG-cp}" ++chmodprog="${CHMODPROG-chmod}" ++chownprog="${CHOWNPROG-chown}" ++chgrpprog="${CHGRPPROG-chgrp}" ++stripprog="${STRIPPROG-strip}" ++rmprog="${RMPROG-rm}" ++mkdirprog="${MKDIRPROG-mkdir}" ++ ++transformbasename="" ++transform_arg="" ++instcmd="$mvprog" ++chmodcmd="$chmodprog 0755" ++chowncmd="" ++chgrpcmd="" ++stripcmd="" ++rmcmd="$rmprog -f" ++mvcmd="$mvprog" ++src="" ++dst="" ++dir_arg="" ++ ++while [ x"$1" != x ]; do ++ case $1 in ++ -c) instcmd="$cpprog" ++ shift ++ continue;; ++ ++ -d) dir_arg=true ++ shift ++ continue;; ++ ++ -m) chmodcmd="$chmodprog $2" ++ shift ++ shift ++ continue;; ++ ++ -o) chowncmd="$chownprog $2" ++ shift ++ shift ++ continue;; ++ ++ -g) chgrpcmd="$chgrpprog $2" ++ shift ++ shift ++ continue;; ++ ++ -s) stripcmd="$stripprog" ++ shift ++ continue;; ++ ++ -t=*) transformarg=`echo $1 | sed 's/-t=//'` ++ shift ++ continue;; ++ ++ -b=*) transformbasename=`echo $1 | sed 's/-b=//'` ++ shift ++ continue;; ++ ++ *) if [ x"$src" = x ] ++ then ++ src=$1 ++ else ++ # this colon is to work around a 386BSD /bin/sh bug ++ : ++ dst=$1 ++ fi ++ shift ++ continue;; ++ esac ++done ++ ++if [ x"$src" = x ] ++then ++ echo "install: no input file specified" ++ exit 1 ++else ++ true ++fi ++ ++if [ x"$dir_arg" != x ]; then ++ dst=$src ++ src="" ++ ++ if [ -d $dst ]; then ++ instcmd=: ++ else ++ instcmd=mkdir ++ fi ++else ++ ++# Waiting for this to be detected by the "$instcmd $src $dsttmp" command ++# might cause directories to be created, which would be especially bad ++# if $src (and thus $dsttmp) contains '*'. ++ ++ if [ -f $src -o -d $src ] ++ then ++ true ++ else ++ echo "install: $src does not exist" ++ exit 1 ++ fi ++ ++ if [ x"$dst" = x ] ++ then ++ echo "install: no destination specified" ++ exit 1 ++ else ++ true ++ fi ++ ++# If destination is a directory, append the input filename; if your system ++# does not like double slashes in filenames, you may need to add some logic ++ ++ if [ -d $dst ] ++ then ++ dst="$dst"/`basename $src` ++ else ++ true ++ fi ++fi ++ ++## this sed command emulates the dirname command ++dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` ++ ++# Make sure that the destination directory exists. ++# this part is taken from Noah Friedman's mkinstalldirs script ++ ++# Skip lots of stat calls in the usual case. ++if [ ! -d "$dstdir" ]; then ++defaultIFS=' ++' ++IFS="${IFS-${defaultIFS}}" ++ ++oIFS="${IFS}" ++# Some sh's can't handle IFS=/ for some reason. ++IFS='%' ++set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` ++IFS="${oIFS}" ++ ++pathcomp='' ++ ++while [ $# -ne 0 ] ; do ++ pathcomp="${pathcomp}${1}" ++ shift ++ ++ if [ ! -d "${pathcomp}" ] ; ++ then ++ $mkdirprog "${pathcomp}" ++ else ++ true ++ fi ++ ++ pathcomp="${pathcomp}/" ++done ++fi ++ ++if [ x"$dir_arg" != x ] ++then ++ $doit $instcmd $dst && ++ ++ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && ++ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && ++ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && ++ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi ++else ++ ++# If we're going to rename the final executable, determine the name now. ++ ++ if [ x"$transformarg" = x ] ++ then ++ dstfile=`basename $dst` ++ else ++ dstfile=`basename $dst $transformbasename | ++ sed $transformarg`$transformbasename ++ fi ++ ++# don't allow the sed command to completely eliminate the filename ++ ++ if [ x"$dstfile" = x ] ++ then ++ dstfile=`basename $dst` ++ else ++ true ++ fi ++ ++# Make a temp file name in the proper directory. ++ ++ dsttmp=$dstdir/#inst.$$# ++ ++# Move or copy the file name to the temp name ++ ++ $doit $instcmd $src $dsttmp && ++ ++ trap "rm -f ${dsttmp}" 0 && ++ ++# and set any options; do chmod last to preserve setuid bits ++ ++# If any of these fail, we abort the whole thing. If we want to ++# ignore errors from any of these, just make sure not to ignore ++# errors from the above "$doit $instcmd $src $dsttmp" command. ++ ++ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && ++ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && ++ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && ++ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && ++ ++# Now rename the file to the real destination. ++ ++ $doit $rmcmd -f $dstdir/$dstfile && ++ $doit $mvcmd $dsttmp $dstdir/$dstfile ++ ++fi && ++ ++ ++exit 0 + +From a7d3ee22801bf2e9578c7c0f6409699322cb65ef Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 06/19] Revert "build: Remove unused preproc-dummy.c" + +This reverts commit 11aab8a348af6ae825756f199ff592beb51f241c. +--- + source3/tests/preproc-dummy.c | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 source3/tests/preproc-dummy.c + +diff --git a/source3/tests/preproc-dummy.c b/source3/tests/preproc-dummy.c +new file mode 100644 +index 0000000..78f2de1 +--- /dev/null ++++ b/source3/tests/preproc-dummy.c +@@ -0,0 +1 @@ ++int main(void) { return 0; } + +From cb8f1bfe2dcedb9b62556d803ee50e860ba273a5 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 07/19] Revert "build: Remove unused uninstall*.sh scripts" + +This reverts commit 26ff1f2167c8f326c3ea17bc69ee927d58b5baf8. +--- + source3/script/uninstallbin.sh.in | 41 ++++++++++++++++++++++++++++++++++++++ + source3/script/uninstalldat.sh | 1 + + source3/script/uninstallman.sh | 37 ++++++++++++++++++++++++++++++++++ + source3/script/uninstallmo.sh | 2 ++ + source3/script/uninstallmodules.sh | 39 ++++++++++++++++++++++++++++++++++++ + source3/script/uninstallmsg.sh | 1 + + source3/script/uninstallscripts.sh | 36 +++++++++++++++++++++++++++++++++ + source3/script/uninstallswat.sh | 1 + + 8 files changed, 158 insertions(+) + create mode 100755 source3/script/uninstallbin.sh.in + create mode 120000 source3/script/uninstalldat.sh + create mode 100755 source3/script/uninstallman.sh + create mode 100755 source3/script/uninstallmo.sh + create mode 100755 source3/script/uninstallmodules.sh + create mode 120000 source3/script/uninstallmsg.sh + create mode 100755 source3/script/uninstallscripts.sh + create mode 120000 source3/script/uninstallswat.sh + +diff --git a/source3/script/uninstallbin.sh.in b/source3/script/uninstallbin.sh.in +new file mode 100755 +index 0000000..8064db8d +--- /dev/null ++++ b/source3/script/uninstallbin.sh.in +@@ -0,0 +1,41 @@ ++#!/bin/sh ++#4 July 96 Dan.Shearer@UniSA.edu.au ++ ++INSTALLPERMS=$1 ++DESTDIR=$2 ++prefix=`echo $3 | sed 's/\/\//\//g'` ++BINDIR=`echo $4 | sed 's/\/\//\//g'` ++SBINDIR=@sbindir@ ++shift ++shift ++shift ++shift ++ ++if [ ! -d $DESTDIR/$BINDIR ]; then ++ echo "Directory $DESTDIR/$BINDIR does not exist! " ++ echo "Do a "make installbin" or "make install" first. " ++ exit 1 ++fi ++ ++for p in $*; do ++ p2=`basename $p` ++ if [ -f $DESTDIR/$BINDIR/$p2 ]; then ++ echo "Removing $DESTDIR/$BINDIR/$p2 " ++ rm -f $DESTDIR/$BINDIR/$p2 ++ if [ -f $DESTDIR/$BINDIR/$p2 ]; then ++ echo "Cannot remove $DESTDIR/$BINDIR/$p2 ... does $USER have privileges? " ++ fi ++ fi ++done ++ ++ ++cat << EOF ++====================================================================== ++The binaries have been uninstalled. You may restore the binaries using ++the command "make installbin" or "make install" to install binaries, ++man pages, modules and shell scripts. You can restore a previous ++version of the binaries (if there were any) using "make revert". ++====================================================================== ++EOF ++ ++exit 0 +diff --git a/source3/script/uninstalldat.sh b/source3/script/uninstalldat.sh +new file mode 120000 +index 0000000..6561427 +--- /dev/null ++++ b/source3/script/uninstalldat.sh +@@ -0,0 +1 @@ ++installdat.sh +\ No newline at end of file +diff --git a/source3/script/uninstallman.sh b/source3/script/uninstallman.sh +new file mode 100755 +index 0000000..0fea11c +--- /dev/null ++++ b/source3/script/uninstallman.sh +@@ -0,0 +1,37 @@ ++#!/bin/sh ++#4 July 96 Dan.Shearer@UniSA.edu.au ++# ++# 13 Aug 2001 Rafal Szczesniak <mimir@spin.ict.pwr.wroc.pl> ++# modified to accomodate international man pages (inspired ++# by Japanese edition's approach) ++ ++ ++MANDIR=`echo $1 | sed 's/\/\//\//g'` ++SRCDIR=$2 ++langs=$3 ++ ++for lang in $langs; do ++ echo Uninstalling \"$lang\" man pages from $MANDIR/$lang ++ ++ for sect in 1 5 7 8 ; do ++ for m in $MANDIR/$lang/man$sect ; do ++ for s in $SRCDIR/../docs/manpages/$lang/*$sect; do ++ FNAME=$m/`basename $s` ++ if test -f $FNAME; then ++ echo Deleting $FNAME ++ rm -f $FNAME ++ test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges? ++ fi ++ done ++ done ++ done ++done ++ ++cat << EOF ++====================================================================== ++The man pages have been uninstalled. You may install them again using ++the command "make installman" or make "install" to install binaries, ++man pages and shell scripts. ++====================================================================== ++EOF ++exit 0 +diff --git a/source3/script/uninstallmo.sh b/source3/script/uninstallmo.sh +new file mode 100755 +index 0000000..663c6b1 +--- /dev/null ++++ b/source3/script/uninstallmo.sh +@@ -0,0 +1,2 @@ ++#!/bin/sh ++script/installmo.sh +diff --git a/source3/script/uninstallmodules.sh b/source3/script/uninstallmodules.sh +new file mode 100755 +index 0000000..fc80565 +--- /dev/null ++++ b/source3/script/uninstallmodules.sh +@@ -0,0 +1,39 @@ ++#!/bin/sh ++#4 July 96 Dan.Shearer@UniSA.edu.au ++ ++INSTALLPERMS=$1 ++DESTDIR=$2 ++prefix=`echo $3 | sed 's/\/\//\//g'` ++LIBDIR=`echo $4 | sed 's/\/\//\//g'` ++shift ++shift ++shift ++shift ++ ++if [ ! -d $DESTDIR/$LIBDIR ]; then ++ echo "Directory $DESTDIR/$LIBDIR does not exist! " ++ echo "Do a "make installmodules" or "make install" first. " ++ exit 1 ++fi ++ ++for p in $*; do ++ p2=`basename $p` ++ if [ -f $DESTDIR/$LIBDIR/$p2 ]; then ++ echo "Removing $DESTDIR/$LIBDIR/$p2 " ++ rm -f $DESTDIR/$LIBDIR/$p2 ++ if [ -f $DESTDIR/$LIBDIR/$p2 ]; then ++ echo "Cannot remove $DESTDIR/$LIBDIR/$p2 ... does $USER have privileges? " ++ fi ++ fi ++done ++ ++ ++cat << EOF ++====================================================================== ++The modules have been uninstalled. You may restore the modules using ++the command "make installmodules" or "make install" to install ++binaries, modules, man pages and shell scripts. ++====================================================================== ++EOF ++ ++exit 0 +diff --git a/source3/script/uninstallmsg.sh b/source3/script/uninstallmsg.sh +new file mode 120000 +index 0000000..c108fa4 +--- /dev/null ++++ b/source3/script/uninstallmsg.sh +@@ -0,0 +1 @@ ++installmsg.sh +\ No newline at end of file +diff --git a/source3/script/uninstallscripts.sh b/source3/script/uninstallscripts.sh +new file mode 100755 +index 0000000..cf7fd71 +--- /dev/null ++++ b/source3/script/uninstallscripts.sh +@@ -0,0 +1,36 @@ ++#!/bin/sh ++# 5 July 96 Dan.Shearer@UniSA.Edu.Au - almost identical to uninstallbin.sh ++ ++INSTALLPERMS=$1 ++BINDIR=`echo $2 | sed 's/\/\//\//g'` ++ ++shift ++shift ++ ++if [ ! -d $BINDIR ]; then ++ echo Directory $BINDIR does not exist! ++ echo Do a "make installscripts" or "make install" first. ++ exit 1 ++fi ++ ++for p in $*; do ++ p2=`basename $p` ++ if [ -f $BINDIR/$p2 ]; then ++ echo Removing $BINDIR/$p2 ++ rm -f $BINDIR/$p2 ++ if [ -f $BINDIR/$p2 ]; then ++ echo Cannot remove $BINDIR/$p2 ... does $USER have privileges? ++ fi ++ fi ++done ++ ++cat << EOF ++====================================================================== ++The scripts have been uninstalled. You may reinstall them using ++the command "make installscripts" or "make install" to install binaries, ++man pages and shell scripts. You may recover a previous version (if any ++with "make revert". ++====================================================================== ++EOF ++ ++exit 0 +diff --git a/source3/script/uninstallswat.sh b/source3/script/uninstallswat.sh +new file mode 120000 +index 0000000..0dffe64 +--- /dev/null ++++ b/source3/script/uninstallswat.sh +@@ -0,0 +1 @@ ++installswat.sh +\ No newline at end of file + +From d368380888bd511e9e8cd20ff9c530a16205be97 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 08/19] Revert "build: Remove unused install*.sh scripts" + +This reverts commit d98f1075443b7feedab0212e75366d502b20e17a. +--- + source3/script/installbin.sh.in | 34 ++++++++++++++++ + source3/script/installdat.sh | 65 ++++++++++++++++++++++++++++++ + source3/script/installdirs.sh | 18 +++++++++ + source3/script/installman.sh | 87 ++++++++++++++++++++++++++++++++++++++++ + source3/script/installmo.sh | 87 ++++++++++++++++++++++++++++++++++++++++ + source3/script/installmodules.sh | 42 +++++++++++++++++++ + source3/script/installscripts.sh | 47 ++++++++++++++++++++++ + 7 files changed, 380 insertions(+) + create mode 100755 source3/script/installbin.sh.in + create mode 100755 source3/script/installdat.sh + create mode 100755 source3/script/installdirs.sh + create mode 100755 source3/script/installman.sh + create mode 100755 source3/script/installmo.sh + create mode 100755 source3/script/installmodules.sh + create mode 100755 source3/script/installscripts.sh + +diff --git a/source3/script/installbin.sh.in b/source3/script/installbin.sh.in +new file mode 100755 +index 0000000..c607d9e +--- /dev/null ++++ b/source3/script/installbin.sh.in +@@ -0,0 +1,34 @@ ++#!/bin/sh ++ ++INSTALLPERMS=$1 ++DESTDIR=$2 ++prefix=`echo $3 | sed 's/\/\//\//g'` ++BINDIR=`echo $4 | sed 's/\/\//\//g'` ++SBINDIR=@sbindir@ ++shift ++shift ++shift ++shift ++ ++for p in $*; do ++ p2=`basename $p` ++ echo "Installing $p as $DESTDIR/$BINDIR/$p2 " ++ if [ -f $DESTDIR/$BINDIR/$p2 ]; then ++ rm -f $DESTDIR/$BINDIR/$p2.old ++ mv $DESTDIR/$BINDIR/$p2 $DESTDIR/$BINDIR/$p2.old ++ fi ++ cp $p $DESTDIR/$BINDIR/ ++ chmod $INSTALLPERMS $DESTDIR/$BINDIR/$p2 ++done ++ ++ ++cat << EOF ++====================================================================== ++The binaries are installed. You may restore the old binaries (if there ++were any) using the command "make revert". You may uninstall the binaries ++using the command "make uninstallbin" or "make uninstall" to uninstall ++binaries, man pages and shell scripts. ++====================================================================== ++EOF ++ ++exit 0 +diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh +new file mode 100755 +index 0000000..2cc3677 +--- /dev/null ++++ b/source3/script/installdat.sh +@@ -0,0 +1,65 @@ ++#!/bin/sh ++#fist version March 2002, Herb Lewis ++ ++DESTDIR=$1 ++DATDIR=`echo $2 | sed 's/\/\//\//g'` ++SRCDIR=$3/ ++shift ++shift ++shift ++ ++case $0 in ++ *uninstall*) ++ if test ! -d "$DESTDIR/$DATDIR"; then ++ echo "Directory $DESTDIR/$DATDIR does not exist! " ++ echo "Do a "make installmsg" or "make install" first. " ++ exit 1 ++ fi ++ mode='uninstall' ++ ;; ++ *) mode='install' ;; ++esac ++ ++for f in $SRCDIR/../codepages/*.dat; do ++ FNAME="$DESTDIR/$DATDIR/`basename $f`" ++ if test "$mode" = 'install'; then ++ echo "Installing $f as $FNAME " ++ cp "$f" "$FNAME" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ chmod 0644 "$FNAME" ++ elif test "$mode" = 'uninstall'; then ++ echo "Removing $FNAME " ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ else ++ echo "Unknown mode, $mode. Script called as $0 " ++ exit 1 ++ fi ++done ++ ++if test "$mode" = 'install'; then ++ cat << EOF ++====================================================================== ++The dat files have been installed. You may uninstall the dat files ++using the command "make uninstalldat" or "make uninstall" to uninstall ++binaries, man pages, dat files, and shell scripts. ++====================================================================== ++EOF ++else ++ cat << EOF ++====================================================================== ++The dat files have been removed. You may restore these files using ++the command "make installdat" or "make install" to install binaries, ++man pages, modules, dat files, and shell scripts. ++====================================================================== ++EOF ++fi ++ ++exit 0 ++ +diff --git a/source3/script/installdirs.sh b/source3/script/installdirs.sh +new file mode 100755 +index 0000000..062b34b +--- /dev/null ++++ b/source3/script/installdirs.sh +@@ -0,0 +1,18 @@ ++#!/bin/sh ++ ++INSTALLPERMS=$1 ++DESTDIR=`echo $2 | sed 's/\/\//\//g'` ++shift ++shift ++ ++for dir in $@; do ++ DIRNAME=`echo $dir | sed 's/\/\//\//g'` ++ if [ ! -d $DESTDIR/$DIRNAME ]; then ++ mkdir -m $INSTALLPERMS -p $DESTDIR/$DIRNAME ++ fi ++ ++ if [ ! -d $DESTDIR/$DIRNAME ]; then ++ echo "Failed to make directory $DESTDIR/$DIRNAME " ++ exit 1 ++ fi ++done +diff --git a/source3/script/installman.sh b/source3/script/installman.sh +new file mode 100755 +index 0000000..b029089 +--- /dev/null ++++ b/source3/script/installman.sh +@@ -0,0 +1,87 @@ ++#!/bin/sh ++#5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values ++# ++# 13 Aug 2001 Rafal Szczesniak <mimir@spin.ict.pwr.wroc.pl> ++# modified to accomodate international man pages (inspired ++# by Japanese edition's approach) ++ ++MANDIR=`echo $1 | sed 's/\/\//\//g'` ++SRCDIR=$2/ ++langs=$3 ++ ++if [ $# -ge 4 ] ; then ++ GROFF=$4 # sh cmd line, including options ++fi ++ ++if test ! -d $SRCDIR../bin/docs/manpages; then ++ echo "No manpages present. Development version maybe?" ++ exit 0 ++fi ++ ++# Get the configured feature set ++test -f "${SRCDIR}/config.log" && \ ++ eval `grep "^[[:alnum:]]*=.*" "${SRCDIR}/config.log" | ++ grep -v ^MANDIR | grep -v ^SRCDIR` ++ ++for lang in $langs; do ++ if [ "X$lang" = XC ]; then ++ echo Installing default man pages in $MANDIR/ ++ lang=. ++ else ++ echo Installing \"$lang\" man pages in $MANDIR/lang/$lang ++ fi ++ ++ langdir=$MANDIR/$lang ++ for d in $MANDIR $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do ++ if [ ! -d $d ]; then ++ mkdir $d ++ if [ ! -d $d ]; then ++ echo Failed to make directory $d, does $USER have privileges? ++ exit 1 ++ fi ++ fi ++ done ++ ++ for sect in 1 5 7 8 ; do ++ for m in $langdir/man$sect ; do ++ for s in $SRCDIR../bin/docs/manpages/$lang/*$sect; do ++ MP_BASENAME=`basename $s` ++ ++ # Check if this man page if required by the configured feature set ++ case "${MP_BASENAME}" in ++ smbsh.1) test -z "${SMBWRAPPER}" && continue ;; ++ *) ;; ++ esac ++ ++ FNAME="$m/${MP_BASENAME}" ++ ++ # Test for writability. Involves ++ # blowing away existing files. ++ ++ if (rm -f $FNAME && touch $FNAME); then ++ if [ "x$GROFF" = x ] ; then ++ cp $s $m # Copy raw nroff ++ else ++ echo "\t$FNAME" # groff'ing can be slow, give the user ++ # a warm fuzzy. ++ $GROFF $s > $FNAME # Process nroff, because man(1) (on ++ # this system) doesn't . ++ fi ++ chmod 0644 $FNAME ++ else ++ echo Cannot create $FNAME... does $USER have privileges? ++ fi ++ done ++ done ++ done ++done ++cat << EOF ++====================================================================== ++The man pages have been installed. You may uninstall them using the command ++the command "make uninstallman" or make "uninstall" to uninstall binaries, ++man pages and shell scripts. ++====================================================================== ++EOF ++ ++exit 0 ++ +diff --git a/source3/script/installmo.sh b/source3/script/installmo.sh +new file mode 100755 +index 0000000..5ca3371 +--- /dev/null ++++ b/source3/script/installmo.sh +@@ -0,0 +1,87 @@ ++#!/bin/sh ++ ++DESTDIR=$1 ++LOCALEDIR=`echo $2 | sed 's/\/\//\//g'` ++SRCDIR=$3/ ++MSGFMT=msgfmt ++ ++case $0 in ++ *uninstall*) ++ if test ! -d "$DESTDIR/$LOCALEDIR"; then ++ echo "Directory $DESTDIR/$LOCALEDIR doesn't exist!" ++ echo "Do a \"make installmo\" or \"make install\" first." ++ exit 1 ++ fi ++ mode='uninstall' ++ ;; ++ *) ++ mode='install' ++ ;; ++esac ++ ++for dir in $SRCDIR/locale/*; do ++ MODULE=`basename $dir` ++ for f in $SRCDIR/locale/$MODULE/*.po; do ++ BASE=`basename $f` ++ LANGUAGE=`echo $BASE | sed 's/\.po//g'` ++ if test "$LANGUAGE" = '*'; then ++ echo "No .po file exists!" ++ exit 0 ++ fi ++ FNAME="$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/$MODULE.mo" ++ if test ! -d "$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/"; then ++ mkdir -p "$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/" ++ fi ++ if test "$mode" = 'install'; then ++ echo "Installing $f as $FNAME" ++ touch "$FNAME" ++ $MSGFMT -f -o "$FNAME" "$f" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges?" ++ exit 1 ++ fi ++ chmod 0644 "$FNAME" ++ elif test "$mode" = 'uninstall'; then ++ echo "removing $FNAME" ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges?" ++ exit 1 ++ fi ++ else ++ echo "Unknown mode $mode. script called as $0." ++ exit 1 ++ fi ++ done ++ if test "$mode" = 'install'; then ++ cat << EOF ++============================================================== ++MO files for $MODULE are installed. ++============================================================== ++EOF ++ else ++ cat << EOF ++============================================================== ++MO files for $MODULE are removed. ++============================================================== ++EOF ++ fi ++done ++ ++if test "$mode" = 'install'; then ++ cat << EOF ++============================================================== ++All MO files for Samba are installed. You can use "make uninstall" ++or "make uninstallmo" to remove them. ++============================================================== ++EOF ++else ++ cat << EOF ++============================================================== ++All MO files for Samba are removed. you can use "make install" ++or "make installmo" to install them. ++============================================================== ++EOF ++fi ++ ++exit 0 +diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh +new file mode 100755 +index 0000000..127091d +--- /dev/null ++++ b/source3/script/installmodules.sh +@@ -0,0 +1,42 @@ ++#!/bin/sh ++ ++INSTALLPERMS=$1 ++DESTDIR=$2 ++prefix=`echo $3 | sed 's/\/\//\//g'` ++LIBDIR=`echo $4 | sed 's/\/\//\//g'` ++shift ++shift ++shift ++shift ++ ++for d in $prefix $LIBDIR; do ++if [ ! -d $DESTDIR/$d ]; then ++mkdir $DESTDIR/$d ++if [ ! -d $DESTDIR/$d ]; then ++ echo Failed to make directory $DESTDIR/$d ++ exit 1 ++fi ++fi ++done ++ ++# We expect the last component of LIBDIR to be the module type, eg. idmap, ++# pdb. By stripping this from the installation name, you can have multiple ++# modules of the same name but different types by creating eg. idmap_foo ++# and pdb_foo. This makes the most sense for idmap and pdb module, where ++# they need to be consistent. ++mtype=`basename $LIBDIR` ++ ++for p in $*; do ++ p2=`basename $p` ++ name=`echo $p2 | sed -es/${mtype}_//` ++ echo Preserving old module as $DESTDIR/$LIBDIR/$name.old ++ if [ -f $DESTDIR/$LIBDIR/$name ]; then ++ rm -f $DESTDIR/$LIBDIR/$name.old ++ mv $DESTDIR/$LIBDIR/$name $DESTDIR/$LIBDIR/$name.old ++ fi ++ echo Installing $p as $DESTDIR/$LIBDIR/$name ++ cp -f $p $DESTDIR/$LIBDIR/$name ++ chmod $INSTALLPERMS $DESTDIR/$LIBDIR/$name ++done ++ ++exit 0 +diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh +new file mode 100755 +index 0000000..81608c3 +--- /dev/null ++++ b/source3/script/installscripts.sh +@@ -0,0 +1,47 @@ ++#!/bin/sh ++# this script courtesy of James_K._Foote.PARC@xerox.com ++# 5 July 96 Dan.Shearer@UniSA.Edu.Au Don't hardcode script names, get from Make ++ ++INSTALLPERMS=$1 ++BINDIR=`echo $2 | sed 's/\/\//\//g'` ++ ++shift ++shift ++ ++echo Installing scripts in $BINDIR ++ ++for d in $BINDIR; do ++ if [ ! -d $d ]; then ++ mkdir $d ++ if [ ! -d $d ]; then ++ echo Failed to make directory $d ++ echo Have you run installbin first? ++ exit 1 ++ fi ++ fi ++done ++ ++for p in $*; do ++ p2=`basename $p` ++ echo Installing $BINDIR/$p2 ++ if [ -f $BINDIR/$p2 ]; then ++ rm -f $BINDIR/$p2.old ++ mv $BINDIR/$p2 $BINDIR/$p2.old ++ fi ++ cp $p $BINDIR/ ++ chmod $INSTALLPERMS $BINDIR/$p2 ++ if [ ! -f $BINDIR/$p2 ]; then ++ echo Cannot copy $p2... does $USER have privileges? ++ fi ++done ++ ++cat << EOF ++====================================================================== ++The scripts have been installed. You may uninstall them using ++the command "make uninstallscripts" or "make install" to install binaries, ++man pages and shell scripts. You may recover the previous version (if any ++by "make revert". ++====================================================================== ++EOF ++ ++exit 0 + +From ea6354d5b1d39f01bbf105ce6eb1b69fb3429a14 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 09/19] Revert "build: Remove unused build_idl.sh" + +This reverts commit 167b8bddad24421a2e8fcf0e7647ef3296b1665c. +--- + source3/script/build_idl.sh | 60 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 60 insertions(+) + create mode 100755 source3/script/build_idl.sh + +diff --git a/source3/script/build_idl.sh b/source3/script/build_idl.sh +new file mode 100755 +index 0000000..97e813e +--- /dev/null ++++ b/source3/script/build_idl.sh +@@ -0,0 +1,60 @@ ++#!/bin/sh ++ ++if [ "$1" = "--full" ]; then ++ FULL=1 ++ shift 1 ++else ++ FULL=0 ++fi ++ ++ARGS="--includedir=../librpc/idl --outputdir $PIDL_OUTPUTDIR --header --ndr-parser --client --samba3-ndr-server $PIDL_ARGS --" ++IDL_FILES="$*" ++ ++oldpwd=`pwd` ++cd ${srcdir} ++ ++[ -d $PIDL_OUTPUTDIR ] || mkdir -p $PIDL_OUTPUTDIR || exit 1 ++ ++PIDL="$PIDL $ARGS" ++ ++if [ $FULL = 1 ]; then ++ echo "Rebuilding all idl files" ++ $PIDL $IDL_FILES || exit 1 ++ exit 0 ++fi ++ ++## ++## Find newer files rather than rebuild all of them ++## ++ ++list="" ++for f in ${IDL_FILES}; do ++ b=`basename $f .idl` ++ outfiles="$b.h ndr_$b.h srv_$b.c" ++ outfiles="$outfiles ndr_$b.c srv_$b.h" ++ ++ for o in $outfiles; do ++ [ -f $PIDL_OUTPUTDIR/$o ] || { ++ list="$list $f" ++ break ++ } ++ test "`find $f -newer $PIDL_OUTPUTDIR/$o`" != "" && { ++ list="$list $f" ++ break ++ } ++ done ++done ++ ++## ++## generate the ndr stubs ++## ++ ++if [ "x$list" != x ]; then ++ # echo "${PIDL} ${list}" ++ $PIDL $list || exit 1 ++fi ++ ++cd ${oldpwd} ++ ++exit 0 ++ + +From 259f0fcc84c2531bddf8af794e243007174d62f4 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 10/19] Revert "Remove lib/netapi autoconf build system, this + is now build with waf" + +This reverts commit c5bde695683be4af68cf8eb876f88a307bf2fcd3. +--- + source3/lib/netapi/examples/Makefile.in | 364 ++++++++++++++++++++++++++++++++ + source3/lib/netapi/tests/Makefile.in | 57 +++++ + 2 files changed, 421 insertions(+) + create mode 100644 source3/lib/netapi/examples/Makefile.in + create mode 100644 source3/lib/netapi/tests/Makefile.in + +diff --git a/source3/lib/netapi/examples/Makefile.in b/source3/lib/netapi/examples/Makefile.in +new file mode 100644 +index 0000000..83a6754 +--- /dev/null ++++ b/source3/lib/netapi/examples/Makefile.in +@@ -0,0 +1,364 @@ ++GTK_FLAGS=`pkg-config gtk+-2.0 --cflags` ++GTK_LIBS=`pkg-config gtk+-2.0 --libs` ++ ++KRB5LIBS=@KRB5_LIBS@ ++LDAP_LIBS=@LDAP_LIBS@ ++LIBS=@LIBS@ -lnetapi -ltdb -ltalloc ++DEVELOPER_CFLAGS=@DEVELOPER_CFLAGS@ ++CCFLAGS=-I../ -L../../../bin @CFLAGS@ $(GTK_FLAGS) ++CC=@CC@ ++PICFLAG=@PICFLAG@ ++LDFLAGS=@PIE_LDFLAGS@ @LDFLAGS@ ++DYNEXP=@DYNEXP@ ++NETAPI_LIBS=$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++CMDLINE_LIBS=$(NETAPI_LIBS) @POPTLIBS@ ++ ++# Compile a source file. ++COMPILE_CC = $(CC) -I. $(CCFLAGS) $(PICFLAG) -c $< -o $@ ++COMPILE = $(COMPILE_CC) ++ ++PROGS = bin/getdc \ ++ bin/dsgetdc \ ++ bin/netdomjoin \ ++ bin/netdomjoin-gui \ ++ bin/getjoinableous \ ++ bin/getjoininformation \ ++ bin/rename_machine \ ++ bin/user_add \ ++ bin/user_del \ ++ bin/user_enum \ ++ bin/user_dispinfo \ ++ bin/user_chgpwd \ ++ bin/user_getinfo \ ++ bin/user_setinfo \ ++ bin/user_modalsget \ ++ bin/user_modalsset \ ++ bin/user_getgroups \ ++ bin/user_setgroups \ ++ bin/user_getlocalgroups \ ++ bin/group_add \ ++ bin/group_del \ ++ bin/group_enum \ ++ bin/group_setinfo \ ++ bin/group_getinfo \ ++ bin/group_adduser \ ++ bin/group_deluser \ ++ bin/group_getusers \ ++ bin/group_setusers \ ++ bin/localgroup_add \ ++ bin/localgroup_del \ ++ bin/localgroup_getinfo \ ++ bin/localgroup_setinfo \ ++ bin/localgroup_enum \ ++ bin/localgroup_addmembers \ ++ bin/localgroup_delmembers \ ++ bin/localgroup_setmembers \ ++ bin/localgroup_getmembers \ ++ bin/remote_tod \ ++ bin/server_getinfo \ ++ bin/share_add \ ++ bin/share_del \ ++ bin/share_enum \ ++ bin/share_getinfo \ ++ bin/share_setinfo \ ++ bin/file_close \ ++ bin/file_getinfo \ ++ bin/file_enum \ ++ bin/shutdown_init \ ++ bin/shutdown_abort \ ++ bin/netlogon_control \ ++ bin/netlogon_control2 \ ++ bin/nltest ++ ++all: $(PROGS) ++ ++MAKEDIR = || exec false; \ ++ if test -d "$$dir"; then :; else \ ++ echo mkdir "$$dir"; \ ++ mkdir -p "$$dir" >/dev/null 2>&1 || \ ++ test -d "$$dir" || \ ++ mkdir "$$dir" || \ ++ exec false; fi || exec false ++ ++BINARY_PREREQS = bin/.dummy ++ ++bin/.dummy: ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \ ++ dir=bin $(MAKEDIR); fi ++ @: >> $@ || : > $@ # what a fancy emoticon! ++ ++.c.o: ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ ++ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi ++ @echo Compiling $*.c ++ @$(COMPILE) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC)" 1>&2;\ ++ $(COMPILE_CC) >/dev/null 2>&1 ++ ++CMDLINE_OBJ = common.o ++GETDC_OBJ = getdc/getdc.o $(CMDLINE_OBJ) ++DSGETDC_OBJ = dsgetdc/dsgetdc.o $(CMDLINE_OBJ) ++NETDOMJOIN_OBJ = join/netdomjoin.o $(CMDLINE_OBJ) ++NETDOMJOIN_GUI_OBJ = netdomjoin-gui/netdomjoin-gui.o ++GETJOINABLEOUS_OBJ = join/getjoinableous.o $(CMDLINE_OBJ) ++GETJOININFORMATION_OBJ = join/getjoininformation.o $(CMDLINE_OBJ) ++RENAMEMACHINE_OBJ = join/rename_machine.o $(CMDLINE_OBJ) ++USERADD_OBJ = user/user_add.o $(CMDLINE_OBJ) ++USERDEL_OBJ = user/user_del.o $(CMDLINE_OBJ) ++USERENUM_OBJ = user/user_enum.o $(CMDLINE_OBJ) ++USERDISPINFO_OBJ = user/user_dispinfo.o $(CMDLINE_OBJ) ++USERCHGPWD_OBJ = user/user_chgpwd.o $(CMDLINE_OBJ) ++USERGETINFO_OBJ = user/user_getinfo.o $(CMDLINE_OBJ) ++USERSETINFO_OBJ = user/user_setinfo.o $(CMDLINE_OBJ) ++USERMODALSGET_OBJ = user/user_modalsget.o $(CMDLINE_OBJ) ++USERMODALSSET_OBJ = user/user_modalsset.o $(CMDLINE_OBJ) ++USERGETGROUPS_OBJ = user/user_getgroups.o $(CMDLINE_OBJ) ++USERSETGROUPS_OBJ = user/user_setgroups.o $(CMDLINE_OBJ) ++USERGETLOCALGROUPS_OBJ = user/user_getlocalgroups.o $(CMDLINE_OBJ) ++GROUPADD_OBJ = group/group_add.o $(CMDLINE_OBJ) ++GROUPDEL_OBJ = group/group_del.o $(CMDLINE_OBJ) ++GROUPENUM_OBJ = group/group_enum.o $(CMDLINE_OBJ) ++GROUPSETINFO_OBJ = group/group_setinfo.o $(CMDLINE_OBJ) ++GROUPGETINFO_OBJ = group/group_getinfo.o $(CMDLINE_OBJ) ++GROUPADDUSER_OBJ = group/group_adduser.o $(CMDLINE_OBJ) ++GROUPDELUSER_OBJ = group/group_deluser.o $(CMDLINE_OBJ) ++GROUPGETUSERS_OBJ = group/group_getusers.o $(CMDLINE_OBJ) ++GROUPSETUSERS_OBJ = group/group_setusers.o $(CMDLINE_OBJ) ++LOCALGROUPADD_OBJ = localgroup/localgroup_add.o $(CMDLINE_OBJ) ++LOCALGROUPDEL_OBJ = localgroup/localgroup_del.o $(CMDLINE_OBJ) ++LOCALGROUPGETINFO_OBJ = localgroup/localgroup_getinfo.o $(CMDLINE_OBJ) ++LOCALGROUPSETINFO_OBJ = localgroup/localgroup_setinfo.o $(CMDLINE_OBJ) ++LOCALGROUPENUM_OBJ = localgroup/localgroup_enum.o $(CMDLINE_OBJ) ++LOCALGROUPADDMEMBERS_OBJ = localgroup/localgroup_addmembers.o $(CMDLINE_OBJ) ++LOCALGROUPDELMEMBERS_OBJ = localgroup/localgroup_delmembers.o $(CMDLINE_OBJ) ++LOCALGROUPSETMEMBERS_OBJ = localgroup/localgroup_setmembers.o $(CMDLINE_OBJ) ++LOCALGROUPGETMEMBERS_OBJ = localgroup/localgroup_getmembers.o $(CMDLINE_OBJ) ++REMOTETOD_OBJ = server/remote_tod.o $(CMDLINE_OBJ) ++SERVERGETINFO_OBJ = server/server_getinfo.o $(CMDLINE_OBJ) ++SHAREADD_OBJ = share/share_add.o $(CMDLINE_OBJ) ++SHAREDEL_OBJ = share/share_del.o $(CMDLINE_OBJ) ++SHAREENUM_OBJ = share/share_enum.o $(CMDLINE_OBJ) ++SHAREGETINFO_OBJ = share/share_getinfo.o $(CMDLINE_OBJ) ++SHARESETINFO_OBJ = share/share_setinfo.o $(CMDLINE_OBJ) ++FILECLOSE_OBJ = file/file_close.o $(CMDLINE_OBJ) ++FILEGETINFO_OBJ = file/file_getinfo.o $(CMDLINE_OBJ) ++FILEENUM_OBJ = file/file_enum.o $(CMDLINE_OBJ) ++SHUTDOWNINIT_OBJ = shutdown/shutdown_init.o $(CMDLINE_OBJ) ++SHUTDOWNABORT_OBJ = shutdown/shutdown_abort.o $(CMDLINE_OBJ) ++NETLOGONCONTROL_OBJ = netlogon/netlogon_control.o $(CMDLINE_OBJ) ++NETLOGONCONTROL2_OBJ = netlogon/netlogon_control2.o $(CMDLINE_OBJ) ++NLTEST_OBJ = netlogon/nltest.o $(CMDLINE_OBJ) ++ ++bin/getdc: $(BINARY_PREREQS) $(GETDC_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GETDC_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/dsgetdc: $(BINARY_PREREQS) $(DSGETDC_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(DSGETDC_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/getjoinableous: $(BINARY_PREREQS) $(GETJOINABLEOUS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GETJOINABLEOUS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/getjoininformation: $(BINARY_PREREQS) $(GETJOININFORMATION_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GETJOININFORMATION_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/rename_machine: $(BINARY_PREREQS) $(RENAMEMACHINE_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(RENAMEMACHINE_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/netdomjoin: $(BINARY_PREREQS) $(NETDOMJOIN_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(NETDOMJOIN_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/netdomjoin-gui: $(BINARY_PREREQS) $(NETDOMJOIN_GUI_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) $(GTK_FLAGS) -o $@ $(NETDOMJOIN_GUI_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(GTK_LIBS) ++ ++bin/user_add: $(BINARY_PREREQS) $(USERADD_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERADD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_del: $(BINARY_PREREQS) $(USERDEL_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERDEL_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_enum: $(BINARY_PREREQS) $(USERENUM_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_dispinfo: $(BINARY_PREREQS) $(USERDISPINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERDISPINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_chgpwd: $(BINARY_PREREQS) $(USERCHGPWD_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERCHGPWD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_getinfo: $(BINARY_PREREQS) $(USERGETINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERGETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_setinfo: $(BINARY_PREREQS) $(USERSETINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERSETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_modalsget: $(BINARY_PREREQS) $(USERMODALSGET_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERMODALSGET_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_modalsset: $(BINARY_PREREQS) $(USERMODALSSET_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERMODALSSET_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_getgroups: $(BINARY_PREREQS) $(USERGETGROUPS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERGETGROUPS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_setgroups: $(BINARY_PREREQS) $(USERSETGROUPS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERSETGROUPS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/user_getlocalgroups: $(BINARY_PREREQS) $(USERGETLOCALGROUPS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(USERGETLOCALGROUPS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/group_add: $(BINARY_PREREQS) $(GROUPADD_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GROUPADD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/group_del: $(BINARY_PREREQS) $(GROUPDEL_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GROUPDEL_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/group_enum: $(BINARY_PREREQS) $(GROUPENUM_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GROUPENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/group_setinfo: $(BINARY_PREREQS) $(GROUPSETINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GROUPSETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/group_getinfo: $(BINARY_PREREQS) $(GROUPGETINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GROUPGETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/group_adduser: $(BINARY_PREREQS) $(GROUPADDUSER_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GROUPADDUSER_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/group_deluser: $(BINARY_PREREQS) $(GROUPDELUSER_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GROUPDELUSER_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/group_getusers: $(BINARY_PREREQS) $(GROUPGETUSERS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GROUPGETUSERS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/group_setusers: $(BINARY_PREREQS) $(GROUPSETUSERS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(GROUPSETUSERS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/localgroup_add: $(BINARY_PREREQS) $(LOCALGROUPADD_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(LOCALGROUPADD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/localgroup_del: $(BINARY_PREREQS) $(LOCALGROUPDEL_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(LOCALGROUPDEL_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/localgroup_getinfo: $(BINARY_PREREQS) $(LOCALGROUPGETINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(LOCALGROUPGETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/localgroup_setinfo: $(BINARY_PREREQS) $(LOCALGROUPSETINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(LOCALGROUPSETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/localgroup_enum: $(BINARY_PREREQS) $(LOCALGROUPENUM_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(LOCALGROUPENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/localgroup_addmembers: $(BINARY_PREREQS) $(LOCALGROUPADDMEMBERS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(LOCALGROUPADDMEMBERS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/localgroup_delmembers: $(BINARY_PREREQS) $(LOCALGROUPDELMEMBERS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(LOCALGROUPDELMEMBERS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/localgroup_setmembers: $(BINARY_PREREQS) $(LOCALGROUPSETMEMBERS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(LOCALGROUPSETMEMBERS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/localgroup_getmembers: $(BINARY_PREREQS) $(LOCALGROUPGETMEMBERS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(LOCALGROUPGETMEMBERS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/remote_tod: $(BINARY_PREREQS) $(REMOTETOD_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(REMOTETOD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/server_getinfo: $(BINARY_PREREQS) $(SERVERGETINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(SERVERGETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/share_add: $(BINARY_PREREQS) $(SHAREADD_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(SHAREADD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/share_del: $(BINARY_PREREQS) $(SHAREDEL_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(SHAREDEL_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/share_enum: $(BINARY_PREREQS) $(SHAREENUM_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(SHAREENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/share_getinfo: $(BINARY_PREREQS) $(SHAREGETINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(SHAREGETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/share_setinfo: $(BINARY_PREREQS) $(SHARESETINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(SHARESETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/file_close: $(BINARY_PREREQS) $(FILECLOSE_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(FILECLOSE_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/file_getinfo: $(BINARY_PREREQS) $(FILEGETINFO_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(FILEGETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/file_enum: $(BINARY_PREREQS) $(FILEENUM_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(FILEENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/shutdown_init: $(BINARY_PREREQS) $(SHUTDOWNINIT_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(SHUTDOWNINIT_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/shutdown_abort: $(BINARY_PREREQS) $(SHUTDOWNABORT_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(SHUTDOWNABORT_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/netlogon_control: $(BINARY_PREREQS) $(NETLOGONCONTROL_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(NETLOGONCONTROL_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/netlogon_control2: $(BINARY_PREREQS) $(NETLOGONCONTROL2_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(NETLOGONCONTROL2_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++bin/nltest: $(BINARY_PREREQS) $(NLTEST_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(NLTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++clean: ++ -rm -f $(PROGS) ++ -rm -f core */*~ *~ \ ++ */*.o */*/*.o */*/*/*.o +diff --git a/source3/lib/netapi/tests/Makefile.in b/source3/lib/netapi/tests/Makefile.in +new file mode 100644 +index 0000000..298d09c +--- /dev/null ++++ b/source3/lib/netapi/tests/Makefile.in +@@ -0,0 +1,57 @@ ++KRB5LIBS=@KRB5_LIBS@ ++LDAP_LIBS=@LDAP_LIBS@ ++LIBS=@LIBS@ -lnetapi -ltdb -ltalloc ++DEVELOPER_CFLAGS=@DEVELOPER_CFLAGS@ ++CCFLAGS=-I../ -L../../../bin @CFLAGS@ $(GTK_FLAGS) ++CC=@CC@ ++PICFLAG=@PICFLAG@ ++LDFLAGS=@PIE_LDFLAGS@ @LDFLAGS@ ++DYNEXP=@DYNEXP@ ++NETAPI_LIBS=$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++CMDLINE_LIBS=$(NETAPI_LIBS) @POPTLIBS@ ++ ++# Compile a source file. ++COMPILE_CC = $(CC) -I. $(CCFLAGS) $(PICFLAG) -c $< -o $@ ++COMPILE = $(COMPILE_CC) ++ ++PROGS = bin/netapitest ++ ++all: $(PROGS) ++ ++MAKEDIR = || exec false; \ ++ if test -d "$$dir"; then :; else \ ++ echo mkdir "$$dir"; \ ++ mkdir -p "$$dir" >/dev/null 2>&1 || \ ++ test -d "$$dir" || \ ++ mkdir "$$dir" || \ ++ exec false; fi || exec false ++ ++BINARY_PREREQS = bin/.dummy ++ ++bin/.dummy: ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \ ++ dir=bin $(MAKEDIR); fi ++ @: >> $@ || : > $@ # what a fancy emoticon! ++ ++.c.o: ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ ++ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi ++ @echo Compiling $*.c ++ @$(COMPILE) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC)" 1>&2;\ ++ $(COMPILE_CC) >/dev/null 2>&1 ++ ++CMDLINE_OBJ = common.o ++NETAPIBUFFER_OBJ = netapibuffer.o ++NETAPITEST_OBJ = netapitest.o netlocalgroup.o netuser.o netgroup.o netdisplay.o netshare.o netfile.o netserver.o $(CMDLINE_OBJ) ++ ++bin/netapitest: $(BINARY_PREREQS) $(NETAPITEST_OBJ) ++ @echo Linking $@ ++ @$(CC) $(CCFLAGS) -o $@ $(NETAPITEST_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) ++ ++clean: ++ -rm -f $(PROGS) ++ -rm -f core */*~ *~ \ ++ */*.o */*/*.o */*/*/*.o ++ + +From d48ecdcd4ddd29931cf36dccc53a4120bf5c99fa Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 11/19] Revert "build: Remove unused build_idl.sh" + +This reverts commit 87049bf32fa069916800316366cc577116b9d703. +--- + librpc/build_idl.sh | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 67 insertions(+) + create mode 100755 librpc/build_idl.sh + +diff --git a/librpc/build_idl.sh b/librpc/build_idl.sh +new file mode 100755 +index 0000000..f5901db +--- /dev/null ++++ b/librpc/build_idl.sh +@@ -0,0 +1,67 @@ ++#!/bin/sh ++ ++if [ "$1" = "--full" ]; then ++ FULL=1 ++ shift 1 ++else ++ FULL=0 ++fi ++ ++ARGS="--outputdir $PIDL_OUTPUTDIR --header --ndr-parser --samba3-ndr-server --server --client --python --dcom-proxy --com-header $PIDL_ARGS --" ++IDL_FILES="$*" ++ ++oldpwd=`pwd` ++cd ${srcdir} ++ ++[ -d $PIDL_OUTPUTDIR ] || mkdir -p $PIDL_OUTPUTDIR || exit 1 ++ ++PIDL_DIR=`dirname $PIDL` ++PIDL_CMD="$PIDL $ARGS" ++ ++if [ $FULL = 1 ]; then ++ echo "Rebuilding all idl files" ++ $PIDL_CMD $IDL_FILES || exit 1 ++ exit 0 ++fi ++ ++## ++## Find newer files rather than rebuild all of them. Also handle the case ++## where the pidl compiler itself is newer. ++## ++PIDL_NEWEST=`find $PIDL_DIR -type f -print | xargs ls -rt | tail -1` ++echo "jfyi: PIDL_NEWEST is $PIDL_NEWEST" ++ ++list="" ++for f in ${IDL_FILES}; do ++ b=`basename $f .idl` ++ outfiles="$b.h ndr_${b}_c.c ndr_$b.h ndr_${b}_s.c srv_$b.c" ++ outfiles="$outfiles ndr_$b.c ndr_${b}_c.h py_$b.c srv_$b.h" ++ ++ for o in $outfiles; do ++ [ -f $PIDL_OUTPUTDIR/$o ] || { ++ list="$list $f" ++ break ++ } ++ test "`find $f -newer $PIDL_OUTPUTDIR/$o`" != "" && { ++ list="$list $f" ++ break ++ } ++ test "`find $PIDL_NEWEST -newer $PIDL_OUTPUTDIR/$o`" != "" && { ++ list="$list $f" ++ break ++ } ++ done ++done ++ ++## ++## generate the ndr stubs ++## ++ ++if [ "x$list" != x ]; then ++ # echo "${PIDL_CMD} ${list}" ++ $PIDL_CMD $list || exit 1 ++fi ++ ++cd ${oldpwd} ++ ++exit 0 + +From 9ed86b598d6672989cfeac700fbff8fdfd761602 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 12/19] Revert "Remove stub ldb_version.h and + source3/include/autoconf as no longer needed" + +This reverts commit 8bcaa145f23e606f4b850fe7147192a6fec11c2d. +--- + source3/include/autoconf/README | 5 +++++ + source3/include/autoconf/ldb_version.h | 4 ++++ + 2 files changed, 9 insertions(+) + create mode 100644 source3/include/autoconf/README + create mode 100644 source3/include/autoconf/ldb_version.h + +diff --git a/source3/include/autoconf/README b/source3/include/autoconf/README +new file mode 100644 +index 0000000..21afbc7 +--- /dev/null ++++ b/source3/include/autoconf/README +@@ -0,0 +1,5 @@ ++This directory added so that the autoconf build can generate a ++config.h in a location that the recursive waf build for smbtorture ++won't find. ++ ++Andrew Bartlett +\ No newline at end of file +diff --git a/source3/include/autoconf/ldb_version.h b/source3/include/autoconf/ldb_version.h +new file mode 100644 +index 0000000..e1c1afc +--- /dev/null ++++ b/source3/include/autoconf/ldb_version.h +@@ -0,0 +1,4 @@ ++ ++/* This define and header file is needed so we can include ldb.h ++ * without building ldb properly */ ++#define LDB_VERSION "dummy ldb version for ldb.h without ldb" + +From fd577e8ec222f7e10823c8f3b64a3de8401bae61 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 13/19] Revert "build: Remove autoconf directory no longer + needed" + +This reverts commit 8b2590c311ad24f809a5b27d2a408b6e9338db1d. +--- + source3/autoconf/lib/param/README | 3 +++ + source3/autoconf/librpc/gen_ndr/README | 7 +++++++ + source3/autoconf/source3/param/README | 3 +++ + 3 files changed, 13 insertions(+) + create mode 100644 source3/autoconf/lib/param/README + create mode 100644 source3/autoconf/librpc/gen_ndr/README + create mode 100644 source3/autoconf/source3/param/README + +diff --git a/source3/autoconf/lib/param/README b/source3/autoconf/lib/param/README +new file mode 100644 +index 0000000..2d7cf01 +--- /dev/null ++++ b/source3/autoconf/lib/param/README +@@ -0,0 +1,3 @@ ++This file denoates the output location of perl-generated files that we need for loadparm. ++ ++To ensure no conflict between waf and autoconf, we generate the files here. +\ No newline at end of file +diff --git a/source3/autoconf/librpc/gen_ndr/README b/source3/autoconf/librpc/gen_ndr/README +new file mode 100644 +index 0000000..7406284 +--- /dev/null ++++ b/source3/autoconf/librpc/gen_ndr/README +@@ -0,0 +1,7 @@ ++This is the output directory for PIDL generated files in the autoconf ++build. This is a directory that WAF does not know about, and so will ++not cause problems when we make a release that must also have ++source3/autogen.sh pre-run. ++ ++(Waf doesn't like files it expects to generate to already be in the ++build tree). +\ No newline at end of file +diff --git a/source3/autoconf/source3/param/README b/source3/autoconf/source3/param/README +new file mode 100644 +index 0000000..2d7cf01 +--- /dev/null ++++ b/source3/autoconf/source3/param/README +@@ -0,0 +1,3 @@ ++This file denoates the output location of perl-generated files that we need for loadparm. ++ ++To ensure no conflict between waf and autoconf, we generate the files here. +\ No newline at end of file + +From 9557b98f0821a6f7c0eb81368a29885aaf5f1598 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 14/19] Revert "build: Remove unused script/mkversion.sh" + +This reverts commit 0b5c23b5220faaf7d04e70773a0f74746486068b. +--- + source3/script/mkversion.sh | 150 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 150 insertions(+) + create mode 100755 source3/script/mkversion.sh + +diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh +new file mode 100755 +index 0000000..eba8f9e +--- /dev/null ++++ b/source3/script/mkversion.sh +@@ -0,0 +1,150 @@ ++#!/bin/sh ++ ++VERSION_FILE=$1 ++OUTPUT_FILE=$2 ++ ++if test -z "$VERSION_FILE";then ++ VERSION_FILE="../VERSION" ++fi ++ ++if test -z "$OUTPUT_FILE";then ++ OUTPUT_FILE="include/autoconf/version.h" ++fi ++ ++SOURCE_DIR=$3 ++ ++SAMBA_VERSION_MAJOR=`sed -n 's/^SAMBA_VERSION_MAJOR=//p' $SOURCE_DIR$VERSION_FILE` ++SAMBA_VERSION_MINOR=`sed -n 's/^SAMBA_VERSION_MINOR=//p' $SOURCE_DIR$VERSION_FILE` ++SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` ++ ++SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE` ++ ++SAMBA_VERSION_TP_RELEASE=`sed -n 's/^SAMBA_VERSION_TP_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` ++SAMBA_VERSION_BETA_RELEASE=`sed -n 's/^SAMBA_VERSION_BETA_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` ++SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` ++SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` ++ ++SAMBA_VERSION_IS_GIT_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_GIT_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE` ++ ++SAMBA_VERSION_RELEASE_NICKNAME=`sed -n 's/^SAMBA_VERSION_RELEASE_NICKNAME=//p' $SOURCE_DIR$VERSION_FILE` ++ ++SAMBA_VERSION_VENDOR_SUFFIX=`sed -n 's/^SAMBA_VERSION_VENDOR_SUFFIX=//p' $SOURCE_DIR$VERSION_FILE` ++SAMBA_VERSION_VENDOR_PATCH=`sed -n 's/^SAMBA_VERSION_VENDOR_PATCH=//p' $SOURCE_DIR$VERSION_FILE` ++ ++SAMBA_VERSION_VENDOR_FUNCTION=`sed -n 's/^SAMBA_VERSION_VENDOR_FUNCTION=//p' $SOURCE_DIR$VERSION_FILE` ++ ++echo "/* Autogenerated by script/mkversion.sh */" > $OUTPUT_FILE ++ ++echo "#define SAMBA_VERSION_MAJOR ${SAMBA_VERSION_MAJOR}" >> $OUTPUT_FILE ++echo "#define SAMBA_VERSION_MINOR ${SAMBA_VERSION_MINOR}" >> $OUTPUT_FILE ++echo "#define SAMBA_VERSION_RELEASE ${SAMBA_VERSION_RELEASE}" >> $OUTPUT_FILE ++ ++ ++## ++## start with "3.0.22" ++## ++SAMBA_VERSION_STRING="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}" ++ ++ ++## ++## maybe add "3.0.22a" or "4.0.0tp11" or "3.0.22pre1" or "3.0.22rc1" ++## We do not do pre or rc version on patch/letter releases ++## ++if test -n "${SAMBA_VERSION_REVISION}";then ++ SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}${SAMBA_VERSION_REVISION}" ++ echo "#define SAMBA_VERSION_REVISION \"${SAMBA_VERSION_REVISION}\"" >> $OUTPUT_FILE ++elif test -n "${SAMBA_VERSION_TP_RELEASE}";then ++ SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}tp${SAMBA_VERSION_TP_RELEASE}" ++ echo "#define SAMBA_VERSION_TP_RELEASE ${SAMBA_VERSION_TP_RELEASE}" >> $OUTPUT_FILE ++elif test -n "${SAMBA_VERSION_BETA_RELEASE}";then ++ SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}beta${SAMBA_VERSION_BETA_RELEASE}" ++ echo "#define SAMBA_VERSION_BETA_RELEASE ${SAMBA_VERSION_BETA_RELEASE}" >> $OUTPUT_FILE ++elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then ++ ## maybe add "3.0.22pre2" ++ SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}" ++ echo "#define SAMBA_VERSION_PRE_RELEASE ${SAMBA_VERSION_PRE_RELEASE}" >> $OUTPUT_FILE ++elif test -n "${SAMBA_VERSION_RC_RELEASE}";then ++ SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}rc${SAMBA_VERSION_RC_RELEASE}" ++ echo "#define SAMBA_VERSION_RC_RELEASE ${SAMBA_VERSION_RC_RELEASE}" >> $OUTPUT_FILE ++fi ++ ++## ++## GIT commit details ++## ++if test x"${SAMBA_VERSION_IS_GIT_SNAPSHOT}" = x"yes";then ++ _SAVE_LANG=${LANG} ++ LANG="C" ++ HAVEVER="no" ++ ++ if test x"${HAVEVER}" != x"yes" -a -d "${SOURCE_DIR}../.git";then ++ HAVEGIT=no ++ GIT_INFO=`git show --pretty=format:"%h%n%ct%n%H%n%cd" --stat HEAD 2>/dev/null` ++ GIT_COMMIT_ABBREV=`printf "%s" "${GIT_INFO}" | sed -n 1p` ++ COMMIT_TIME=`printf "%s" "${GIT_INFO}" | sed -n 2p` ++ GIT_COMMIT_FULLREV=`printf "%s" "${GIT_INFO}" | sed -n 3p` ++ COMMIT_DATE=`printf "%s" "${GIT_INFO}" | sed -n 4p` ++ if test -n "${GIT_COMMIT_ABBREV}";then ++ HAVEGIT=yes ++ HAVEVER=yes ++ fi ++ fi ++ ++ if test x"${HAVEGIT}" = x"yes";then ++ SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-GIT-${GIT_COMMIT_ABBREV}" ++ ++ echo "#define SAMBA_VERSION_GIT_COMMIT_ABBREV \"${GIT_COMMIT_ABBREV}\"" >> $OUTPUT_FILE ++ echo "#define SAMBA_VERSION_COMMIT_TIME ${COMMIT_TIME}" >> $OUTPUT_FILE ++ echo "#define SAMBA_VERSION_GIT_COMMIT_FULLREV \"${GIT_COMMIT_FULLREV}\"" >> $OUTPUT_FILE ++ echo "#define SAMBA_VERSION_COMMIT_DATE \"${COMMIT_DATE}\"" >> $OUTPUT_FILE ++ else ++ SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-GIT-UNKNOWN" ++ fi ++ LANG=${_SAVE_LANG} ++fi ++ ++echo "#define SAMBA_VERSION_OFFICIAL_STRING \"${SAMBA_VERSION_STRING}\"" >> $OUTPUT_FILE ++ ++## ++## Add the vendor string if present ++## ++if test -n "${SAMBA_VERSION_VENDOR_FUNCTION}"; then ++ echo "#define SAMBA_VERSION_VENDOR_FUNCTION ${SAMBA_VERSION_VENDOR_FUNCTION}" >> $OUTPUT_FILE ++fi ++ ++if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then ++ echo "#define SAMBA_VERSION_VENDOR_SUFFIX \"${SAMBA_VERSION_VENDOR_SUFFIX}\"" >> $OUTPUT_FILE ++ SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-${SAMBA_VERSION_VENDOR_SUFFIX}" ++ if test -n "${SAMBA_VERSION_VENDOR_PATCH}";then ++ echo "#define SAMBA_VERSION_VENDOR_PATCH ${SAMBA_VERSION_VENDOR_PATCH}" >> $OUTPUT_FILE ++ echo "#define SAMBA_VERSION_VENDOR_PATCH_STRING \"${SAMBA_VERSION_VENDOR_PATCH}\"" >> $OUTPUT_FILE ++ SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-${SAMBA_VERSION_VENDOR_PATCH}" ++ fi ++fi ++ ++## ++## Add a release nickname ++## ++if test -n "${SAMBA_VERSION_RELEASE_NICKNAME}";then ++ echo "#define SAMBA_VERSION_RELEASE_NICKNAME \"${SAMBA_VERSION_RELEASE_NICKNAME}\"" >> $OUTPUT_FILE ++ SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING} (${SAMBA_VERSION_RELEASE_NICKNAME})" ++fi ++ ++cat >>$OUTPUT_FILE<<CEOF ++#ifdef SAMBA_VERSION_VENDOR_FUNCTION ++# define SAMBA_VERSION_STRING SAMBA_VERSION_VENDOR_FUNCTION ++#else /* SAMBA_VERSION_VENDOR_FUNCTION */ ++# ifdef SAMBA_VERSION_VENDOR_SUFFIX ++# ifdef SAMBA_VERSION_VENDOR_PATCH ++# define SAMBA_VERSION_STRING SAMBA_VERSION_OFFICIAL_STRING "-" SAMBA_VERSION_VENDOR_SUFFIX "-" SAMBA_VERSION_VENDOR_PATCH_STRING ++# else /* SAMBA_VERSION_VENDOR_PATCH */ ++# define SAMBA_VERSION_STRING SAMBA_VERSION_OFFICIAL_STRING "-" SAMBA_VERSION_VENDOR_SUFFIX ++# endif /* SAMBA_VERSION_VENDOR_SUFFIX */ ++# else /* SAMBA_VERSION_VENDOR_FUNCTION */ ++# define SAMBA_VERSION_STRING SAMBA_VERSION_OFFICIAL_STRING ++# endif ++#endif ++CEOF ++ ++echo "$0: '$OUTPUT_FILE' created for Samba(\"${SAMBA_VERSION_STRING}\")" ++ ++exit 0 + +From 92f1f9b5887f433865b8694bded469d8bbd73e16 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 15/19] Revert "build: Remove unused install-sh" + +This reverts commit a768e6b0f89a1395dbce1dde73c001c2bde1fc99. +--- + source3/install-sh | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 238 insertions(+) + create mode 100755 source3/install-sh + +diff --git a/source3/install-sh b/source3/install-sh +new file mode 100755 +index 0000000..5871924 +--- /dev/null ++++ b/source3/install-sh +@@ -0,0 +1,238 @@ ++#! /bin/sh ++# ++# install - install a program, script, or datafile ++# This comes from X11R5. ++# ++# Calling this script install-sh is preferred over install.sh, to prevent ++# `make' implicit rules from creating a file called install from it ++# when there is no Makefile. ++# ++# This script is compatible with the BSD install script, but was written ++# from scratch. ++# ++ ++ ++# set DOITPROG to echo to test this script ++ ++# Don't use :- since 4.3BSD and earlier shells don't like it. ++doit="${DOITPROG-}" ++ ++ ++# put in absolute paths if you don't have them in your path; or use env. vars. ++ ++mvprog="${MVPROG-mv}" ++cpprog="${CPPROG-cp}" ++chmodprog="${CHMODPROG-chmod}" ++chownprog="${CHOWNPROG-chown}" ++chgrpprog="${CHGRPPROG-chgrp}" ++stripprog="${STRIPPROG-strip}" ++rmprog="${RMPROG-rm}" ++mkdirprog="${MKDIRPROG-mkdir}" ++ ++transformbasename="" ++transform_arg="" ++instcmd="$mvprog" ++chmodcmd="$chmodprog 0755" ++chowncmd="" ++chgrpcmd="" ++stripcmd="" ++rmcmd="$rmprog -f" ++mvcmd="$mvprog" ++src="" ++dst="" ++dir_arg="" ++ ++while [ x"$1" != x ]; do ++ case $1 in ++ -c) instcmd="$cpprog" ++ shift ++ continue;; ++ ++ -d) dir_arg=true ++ shift ++ continue;; ++ ++ -m) chmodcmd="$chmodprog $2" ++ shift ++ shift ++ continue;; ++ ++ -o) chowncmd="$chownprog $2" ++ shift ++ shift ++ continue;; ++ ++ -g) chgrpcmd="$chgrpprog $2" ++ shift ++ shift ++ continue;; ++ ++ -s) stripcmd="$stripprog" ++ shift ++ continue;; ++ ++ -t=*) transformarg=`echo $1 | sed 's/-t=//'` ++ shift ++ continue;; ++ ++ -b=*) transformbasename=`echo $1 | sed 's/-b=//'` ++ shift ++ continue;; ++ ++ *) if [ x"$src" = x ] ++ then ++ src=$1 ++ else ++ # this colon is to work around a 386BSD /bin/sh bug ++ : ++ dst=$1 ++ fi ++ shift ++ continue;; ++ esac ++done ++ ++if [ x"$src" = x ] ++then ++ echo "install: no input file specified" ++ exit 1 ++else ++ true ++fi ++ ++if [ x"$dir_arg" != x ]; then ++ dst=$src ++ src="" ++ ++ if [ -d $dst ]; then ++ instcmd=: ++ else ++ instcmd=mkdir ++ fi ++else ++ ++# Waiting for this to be detected by the "$instcmd $src $dsttmp" command ++# might cause directories to be created, which would be especially bad ++# if $src (and thus $dsttmp) contains '*'. ++ ++ if [ -f $src -o -d $src ] ++ then ++ true ++ else ++ echo "install: $src does not exist" ++ exit 1 ++ fi ++ ++ if [ x"$dst" = x ] ++ then ++ echo "install: no destination specified" ++ exit 1 ++ else ++ true ++ fi ++ ++# If destination is a directory, append the input filename; if your system ++# does not like double slashes in filenames, you may need to add some logic ++ ++ if [ -d $dst ] ++ then ++ dst="$dst"/`basename $src` ++ else ++ true ++ fi ++fi ++ ++## this sed command emulates the dirname command ++dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` ++ ++# Make sure that the destination directory exists. ++# this part is taken from Noah Friedman's mkinstalldirs script ++ ++# Skip lots of stat calls in the usual case. ++if [ ! -d "$dstdir" ]; then ++defaultIFS=' ++' ++IFS="${IFS-${defaultIFS}}" ++ ++oIFS="${IFS}" ++# Some sh's can't handle IFS=/ for some reason. ++IFS='%' ++set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` ++IFS="${oIFS}" ++ ++pathcomp='' ++ ++while [ $# -ne 0 ] ; do ++ pathcomp="${pathcomp}${1}" ++ shift ++ ++ if [ ! -d "${pathcomp}" ] ; ++ then ++ $mkdirprog "${pathcomp}" ++ else ++ true ++ fi ++ ++ pathcomp="${pathcomp}/" ++done ++fi ++ ++if [ x"$dir_arg" != x ] ++then ++ $doit $instcmd $dst && ++ ++ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && ++ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && ++ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && ++ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi ++else ++ ++# If we're going to rename the final executable, determine the name now. ++ ++ if [ x"$transformarg" = x ] ++ then ++ dstfile=`basename $dst` ++ else ++ dstfile=`basename $dst $transformbasename | ++ sed $transformarg`$transformbasename ++ fi ++ ++# don't allow the sed command to completely eliminate the filename ++ ++ if [ x"$dstfile" = x ] ++ then ++ dstfile=`basename $dst` ++ else ++ true ++ fi ++ ++# Make a temp file name in the proper directory. ++ ++ dsttmp=$dstdir/#inst.$$# ++ ++# Move or copy the file name to the temp name ++ ++ $doit $instcmd $src $dsttmp && ++ ++ trap "rm -f ${dsttmp}" 0 && ++ ++# and set any options; do chmod last to preserve setuid bits ++ ++# If any of these fail, we abort the whole thing. If we want to ++# ignore errors from any of these, just make sure not to ignore ++# errors from the above "$doit $instcmd $src $dsttmp" command. ++ ++ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && ++ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && ++ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && ++ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && ++ ++# Now rename the file to the real destination. ++ ++ $doit $rmcmd -f $dstdir/$dstfile && ++ $doit $mvcmd $dsttmp $dstdir/$dstfile ++ ++fi && ++ ++ ++exit 0 + +From 803b0468150d87ccc90441a90c25c277305ba7b7 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 16/19] Revert "build: Remove autoconf build system" + +This reverts commit cd4b413cb0574c459c1c24cf07f8d6b44f5fc077. +--- + dynconfig/config.m4 | 299 ++ + lib/ccan/libccan.m4 | 363 ++ + lib/iniparser_build/config.m4 | 45 + + lib/nss_wrapper/config.m4 | 19 + + lib/ntdb/libntdb.m4 | 41 + + lib/popt/libpopt.m4 | 43 + + lib/popt/samba.m4 | 8 + + lib/replace/crypt.m4 | 6 + + lib/replace/dlfcn.m4 | 31 + + lib/replace/libreplace.m4 | 490 +++ + lib/replace/libreplace_cc.m4 | 197 ++ + lib/replace/libreplace_ld.m4 | 337 ++ + lib/replace/libreplace_macros.m4 | 347 ++ + lib/replace/libreplace_network.m4 | 503 +++ + lib/replace/repdir.m4 | 81 + + lib/replace/strptime.m4 | 16 + + lib/replace/system/config.m4 | 145 + + lib/replace/timegm.m4 | 1 + + lib/replace/win32.m4 | 20 + + lib/socket_wrapper/config.m4 | 22 + + lib/talloc/compat/talloc_compat1.m4 | 14 + + lib/talloc/libtalloc.m4 | 38 + + lib/tdb/libtdb.m4 | 41 + + lib/tevent/libtevent.m4 | 75 + + lib/uid_wrapper/config.m4 | 19 + + lib/zlib/zlib.m4 | 29 + + m4/check_make.m4 | 33 + + m4/check_perl.m4 | 32 + + m4/check_python.m4 | 111 + + m4/pkg.m4 | 156 + + source3/Makefile-smbtorture | 24 + + source3/Makefile.in | 3405 ++++++++++++++++++ + source3/autogen.sh | 121 + + source3/config.guess | 1561 ++++++++ + source3/config.sub | 1686 +++++++++ + source3/configure.developer | 7 + + source3/configure.in | 6693 +++++++++++++++++++++++++++++++++++ + source3/m4/aclocal.m4 | 899 +++++ + source3/m4/autoconf-2.60.m4 | 236 ++ + source3/m4/check_path.m4 | 89 + + source3/m4/samba_version.m4 | 29 + + 41 files changed, 18312 insertions(+) + create mode 100644 dynconfig/config.m4 + create mode 100644 lib/ccan/libccan.m4 + create mode 100644 lib/iniparser_build/config.m4 + create mode 100644 lib/nss_wrapper/config.m4 + create mode 100644 lib/ntdb/libntdb.m4 + create mode 100644 lib/popt/libpopt.m4 + create mode 100644 lib/popt/samba.m4 + create mode 100644 lib/replace/crypt.m4 + create mode 100644 lib/replace/dlfcn.m4 + create mode 100644 lib/replace/libreplace.m4 + create mode 100644 lib/replace/libreplace_cc.m4 + create mode 100644 lib/replace/libreplace_ld.m4 + create mode 100644 lib/replace/libreplace_macros.m4 + create mode 100644 lib/replace/libreplace_network.m4 + create mode 100644 lib/replace/repdir.m4 + create mode 100644 lib/replace/strptime.m4 + create mode 100644 lib/replace/system/config.m4 + create mode 100644 lib/replace/timegm.m4 + create mode 100644 lib/replace/win32.m4 + create mode 100644 lib/socket_wrapper/config.m4 + create mode 100644 lib/talloc/compat/talloc_compat1.m4 + create mode 100644 lib/talloc/libtalloc.m4 + create mode 100644 lib/tdb/libtdb.m4 + create mode 100644 lib/tevent/libtevent.m4 + create mode 100644 lib/uid_wrapper/config.m4 + create mode 100644 lib/zlib/zlib.m4 + create mode 100644 m4/check_make.m4 + create mode 100644 m4/check_perl.m4 + create mode 100644 m4/check_python.m4 + create mode 100644 m4/pkg.m4 + create mode 100644 source3/Makefile-smbtorture + create mode 100644 source3/Makefile.in + create mode 100755 source3/autogen.sh + create mode 100755 source3/config.guess + create mode 100755 source3/config.sub + create mode 100755 source3/configure.developer + create mode 100644 source3/configure.in + create mode 100644 source3/m4/aclocal.m4 + create mode 100644 source3/m4/autoconf-2.60.m4 + create mode 100644 source3/m4/check_path.m4 + create mode 100644 source3/m4/samba_version.m4 + +diff --git a/dynconfig/config.m4 b/dynconfig/config.m4 +new file mode 100644 +index 0000000..fe69abe +--- /dev/null ++++ b/dynconfig/config.m4 +@@ -0,0 +1,299 @@ ++################################################# ++# Directory handling stuff to support both the ++# legacy SAMBA directories and FHS compliant ++# ones... ++AC_PREFIX_DEFAULT(/usr/local/samba) ++ ++BINDIR="${bindir}" ++SBINDIR="${sbindir}" ++LIBDIR="${libdir}" ++LIBEXECDIR="${libexecdir}" ++MANDIR="${mandir}" ++DATADIR="${datadir}" ++LOCALEDIR="${localedir}" ++SCRIPTSBINDIR="${sbindir}" ++#PYTHONDIR ++#PYTHONARCHDIR ++ ++AC_ARG_ENABLE(fhs, ++[AS_HELP_STRING([--enable-fhs], [Turn on FHS support (default=no)])]) ++ ++if test x$enable_fhs != xyes; then ++ if test x"$prefix" = x"/usr" -o x"$prefix" = x"/usr/local"; then ++ AC_MSG_WARN([Don't install directly under /usr or /usr/local without using the FHS option (--enable-fhs)]) ++ AC_MSG_ERROR([invalid --prefix=$prefix]) ++ fi ++ MODULESDIR="${libdir}" ++ INCLUDEDIR="${includedir}" ++ SETUPDIR="${datadir}/setup" ++ PKGCONFIGDIR="${libdir}/pkgconfig" ++ CODEPAGEDIR="${datadir}/codepages" ++ PAMMODULESDIR="${libdir}/security" ++ CONFIGDIR="\${sysconfdir}" ++ PRIVATE_DIR="\${prefix}/private" ++ LOCKDIR="\${localstatedir}/lock" ++ PIDDIR="\${localstatedir}/run" ++ STATEDIR="\${localstatedir}/locks" ++ CACHEDIR="\${localstatedir}/cache" ++ LOGFILEBASE="\${localstatedir}" ++ SOCKET_DIR="\${localstatedir}/run" ++ PRIVILEGED_SOCKET_DIR="\${localstatedir}/lib" ++else ++ AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths]) ++ ++ MODULESDIR="${libdir}/samba" ++ INCLUDEDIR="${includedir}/samba-4.0" ++ SETUPDIR="${datadir}/samba/setup" ++ PKGCONFIGDIR="${libdir}/pkgconfig" ++ CODEPAGEDIR="${datadir}/samba/codepages" ++ PAMMODULESDIR="${libdir}/security" ++ CONFIGDIR="\${sysconfdir}/samba" ++ PRIVATE_DIR="\${localstatedir}/lib/samba/private" ++ LOCKDIR="\${localstatedir}/lock/samba" ++ PIDDIR="\${localstatedir}/run/samba" ++ STATEDIR="\${localstatedir}/lib/samba" ++ CACHEDIR="\${localstatedir}/cache/samba" ++ LOGFILEBASE="\${localstatedir}/log/samba" ++ SOCKET_DIR="\${localstatedir}/run/samba" ++ PRIVILEGED_SOCKET_DIR="\${localstatedir}/lib/samba" ++fi ++ ++AC_ARG_WITH(modulesdir, ++[AS_HELP_STRING([--with-modulesdir=DIR], ++ [Which directory to use for modules ($exec_prefix/modules)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-modulesdir called without argument - will use default]) ++ ;; ++ * ) ++ MODULESDIR="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(pammodulesdir, ++[AS_HELP_STRING([--with-pammodulesdir=DIR], ++ [Which directory to use for PAM modules ($libdir/security)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-pammodulesdir called without argument - will use default]) ++ ;; ++ * ) ++ PAMMODULESDIR="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(configdir, ++[AS_HELP_STRING([--with-configdir=DIR], ++ [Where to put configuration files ($sysconfdir)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-configdir called without argument - will use default]) ++ ;; ++ * ) ++ CONFIGDIR="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(privatedir, ++[AS_HELP_STRING([--with-privatedir=DIR], ++ [Where to put passdb.tdb and other private files ($prefix/private)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-privatedir called without argument - will use default]) ++ ;; ++ * ) ++ PRIVATE_DIR="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(lockdir, ++[AS_HELP_STRING([--with-lockdir=DIR], ++ [Where to put short term disposable state files ($localstatedir/lock)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-lockdir called without argument - will use default]) ++ ;; ++ * ) ++ LOCKDIR="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(piddir, ++[AS_HELP_STRING([--with-piddir=DIR], ++ [Where to put pid files ($localstatedir/run)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-piddir called without argument - will use default]) ++ ;; ++ * ) ++ PIDDIR="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(statedir, ++[AS_HELP_STRING([--with-statedir=DIR], ++ [Where to put persistent state files ($localstatedir/locks)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-statedir called without argument - will use default]) ++ ;; ++ * ) ++ STATEDIR="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(cachedir, ++[AS_HELP_STRING([--with-cachedir=DIR], ++ [Where to put temporary cache files ($localstatedir/cache)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-cachedir called without argument - will use default]) ++ ;; ++ * ) ++ CACHEDIR="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(logfilebase, ++[AS_HELP_STRING([--with-logfilebase=DIR], ++ [Where to put log files ($localstatedir)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-logfilebase called without argument - will use default]) ++ ;; ++ * ) ++ LOGFILEBASE="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(sockets-dir, ++[AS_HELP_STRING([--with-sockets-dir=DIR], ++ [socket directory ($localstatedir/run)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-sockets-dir called without argument - will use default]) ++ ;; ++ * ) ++ SOCKET_DIR="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(privileged-socket-dir, ++[AS_HELP_STRING([--with-privileged-socket-dir=DIR], ++ [privileged socket directory ($localstatedir/lib)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-sockets-dir called without argument - will use default]) ++ ;; ++ * ) ++ PRIVILEGED_SOCKET_DIR="$withval" ++ ;; ++ esac]) ++ ++WINBINDD_SOCKET_DIR="${SOCKET_DIR}/winbindd" ++WINBINDD_PRIVILEGED_SOCKET_DIR="${PRIVILEGED_SOCKET_DIR}/winbindd_privileged" ++ ++AC_ARG_WITH(winbind-socket-dir, ++[AS_HELP_STRING([--with-winbind-socket-dir=DIR], ++ [winbnd socket directory ($localstatedir/run/winbindd)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-winbind-socket-dir called without argument - will use default]) ++ ;; ++ * ) ++ WINBINDD_SOCKET_DIR="$withval" ++ ;; ++ esac]) ++ ++AC_ARG_WITH(winbind-privileged-socket-dir, ++[AS_HELP_STRING([--with-winbind-privileged-socket-dir=DIR], ++ [winbind privileged socket directory ($localstatedir/lib/winbindd)])], ++[ case "$withval" in ++ yes|no) ++ # ++ # Just in case anybody calls it without argument ++ # ++ AC_MSG_WARN([--with-winbind-privileged-socket-dir called without argument - will use default]) ++ ;; ++ * ) ++ WINBINDD_PRIVILEGED_SOCKET_DIR="$withval" ++ ;; ++ esac]) ++ ++NMBDSOCKETDIR="${SOCKET_DIR}/nmbd" ++NTP_SIGND_SOCKET_DIR="${SOCKET_DIR}/ntp_signd" ++NCALRPCDIR="${SOCKET_DIR}/ncalrpc" ++CONFIGFILE="${CONFIGDIR}/smb.conf" ++LMHOSTSFILE="${CONFIGDIR}/lmhosts" ++SMB_PASSWD_FILE="${PRIVATE_DIR}/smbpasswd" ++ ++AC_SUBST(BINDIR) ++AC_SUBST(SBINDIR) ++AC_SUBST(LIBDIR) ++AC_SUBST(LIBEXECDIR) ++AC_SUBST(MANDIR) ++AC_SUBST(DATADIR) ++AC_SUBST(LOCALEDIR) ++AC_SUBST(SCRIPTSBINDIR) ++dnl AC_SUBST(PYTHONDIR) ++dnl AC_SUBST(PYTHONARCHDIR) ++AC_SUBST(MODULESDIR) ++AC_SUBST(INCLUDEDIR) ++AC_SUBST(SETUPDIR) ++AC_SUBST(PKGCONFIGDIR) ++AC_SUBST(CODEPAGEDIR) ++AC_SUBST(PAMMODULESDIR) ++AC_SUBST(CONFIGDIR) ++AC_SUBST(PRIVATE_DIR) ++AC_SUBST(LOCKDIR) ++AC_SUBST(PIDDIR) ++AC_SUBST(STATEDIR) ++AC_SUBST(CACHEDIR) ++AC_SUBST(LOGFILEBASE) ++AC_SUBST(SOCKET_DIR) ++AC_SUBST(PRIVILEGED_SOCKET_DIR) ++AC_SUBST(WINBINDD_SOCKET_DIR) ++AC_SUBST(WINBINDD_PRIVILEGED_SOCKET_DIR) ++AC_SUBST(NMBDSOCKETDIR) ++AC_SUBST(NTP_SIGND_SOCKET_DIR) ++AC_SUBST(NCALRPCDIR) ++AC_SUBST(CONFIGFILE) ++AC_SUBST(LMHOSTSFILE) ++AC_SUBST(SMB_PASSWD_FILE) ++ +diff --git a/lib/ccan/libccan.m4 b/lib/ccan/libccan.m4 +new file mode 100644 +index 0000000..c573215 +--- /dev/null ++++ b/lib/ccan/libccan.m4 +@@ -0,0 +1,363 @@ ++dnl find the ccan sources. ++ccandir="../lib/ccan" ++for d in $ccanpaths; do ++ if test -f "$srcdir/$d/str/str.c"; then ++ ccandir="$d" ++ AC_SUBST(ccandir) ++ break ++ fi ++done ++if test -f "$ccandir/str/str.c"; then :; else ++ AC_MSG_ERROR([cannot find ccan source in $ccandir]) ++fi ++CCAN_OBJ="$ccandir/hash/hash.o $ccandir/htable/htable.o $ccandir/ilog/ilog.o $ccandir/likely/likely.o $ccandir/str/debug.o $ccandir/str/str.o $ccandir/tally/tally.o" ++ ++AC_SUBST(CCAN_OBJ) ++ ++# Preferred method for including ccan modules is #include <ccan/module/...>. ++CCAN_CFLAGS="-I$ccandir/.. -DHAVE_CCAN" ++AC_SUBST(CCAN_CFLAGS) ++ ++# All the configuration checks. Regrettably, the __attribute__ checks will ++# give false positives on old GCCs, since they just cause warnings. But that's ++# fairly harmless. ++AC_CHECK_HEADERS(err.h) ++ ++AC_CHECK_HEADERS(byteswap.h) ++ ++AC_CACHE_CHECK([whether we can compile with __attribute__((cold))], ++ samba_cv_attribute_cold, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [ ++ static void __attribute__((cold)) ++ cleanup(void) { } ++ ])], ++ samba_cv_attribute_cold=yes) ++ ]) ++ ++if test x"$samba_cv_attribute_cold" = xyes ; then ++ AC_DEFINE(HAVE_ATTRIBUTE_COLD, 1, ++ [whether we can compile with __attribute__((cold))]) ++fi ++ ++AC_CACHE_CHECK([whether we can compile with __attribute__((const))], ++ samba_cv_attribute_const, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [ ++ static void __attribute__((const)) ++ cleanup(void) { } ++ ])], ++ samba_cv_attribute_const=yes) ++ ]) ++ ++if test x"$samba_cv_attribute_const" = xyes ; then ++ AC_DEFINE(HAVE_ATTRIBUTE_CONST, 1, ++ [whether we can compile with __attribute__((const))]) ++fi ++ ++AC_CACHE_CHECK([whether we can compile with __attribute__((noreturn))], ++ samba_cv_attribute_noreturn, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [ ++ static void __attribute__((noreturn)) ++ cleanup(void) { exit(1); } ++ ])], ++ samba_cv_attribute_noreturn=yes) ++ ]) ++ ++if test x"$samba_cv_attribute_noreturn" = xyes ; then ++ AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1, ++ [whether we can compile with __attribute__((noreturn))]) ++fi ++ ++AC_CACHE_CHECK([whether we can compile with __attribute__((printf))], ++ samba_cv_attribute_printf, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [ ++ static void __attribute__((format(__printf__, 1, 2))) ++ cleanup(const char *fmt, ...) { } ++ ])], ++ samba_cv_attribute_printf=yes) ++ ]) ++ ++if test x"$samba_cv_attribute_printf" = xyes ; then ++ AC_DEFINE(HAVE_ATTRIBUTE_PRINTF, 1, ++ [whether we can compile with __attribute__((format(printf)))]) ++fi ++ ++AC_CACHE_CHECK([whether we can compile with __attribute__((unused))], ++ samba_cv_attribute_unused, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [ ++ static void __attribute__((unused)) ++ cleanup(void) { } ++ ])], ++ samba_cv_attribute_unused=yes) ++ ]) ++ ++if test x"$samba_cv_attribute_unused" = xyes ; then ++ AC_DEFINE(HAVE_ATTRIBUTE_UNUSED, 1, ++ [whether we can compile with __attribute__((unused))]) ++fi ++ ++AC_CACHE_CHECK([whether we can compile with __attribute__((used))], ++ samba_cv_attribute_used, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [ ++ static void __attribute__((used)) ++ cleanup(void) { } ++ ])], ++ samba_cv_attribute_used=yes) ++ ]) ++ ++if test x"$samba_cv_attribute_used" = xyes ; then ++ AC_DEFINE(HAVE_ATTRIBUTE_USED, 1, ++ [whether we can compile with __attribute__((used))]) ++fi ++ ++# FIXME: We could use endian.h or sys/endian.h here, and __BYTE_ORDER for ++# cross-compiling. ++AC_CACHE_CHECK([whether we are big endian],samba_cv_big_endian,[ ++AC_TRY_RUN([int main(void) { ++union { int i; char c[sizeof(int)]; } u; ++ u.i = 0x01020304; ++ return u.c[0] == 0x01 && u.c[1] == 0x02 && u.c[2] == 0x03 && u.c[3] == 0x04 ? 0 : 1; ++}], ++samba_cv_big_endian=yes, ++samba_cv_big_endian=no)]) ++if test x"$samba_cv_big_endian" = xyes ; then ++ AC_DEFINE(HAVE_BIG_ENDIAN, 1, ++ [whether we are big endian]) ++fi ++ ++AC_CACHE_CHECK([whether we have __builtin_clz], ++ samba_cv_builtin_clz, ++ [ ++ AC_LINK_IFELSE([AC_LANG_SOURCE( ++ [int main(void) { ++ return __builtin_clz(1) == (sizeof(int)*8 - 1) ? 0 : 1; ++ }])], ++ samba_cv_builtin_clz=yes) ++ ]) ++ ++if test x"$samba_cv_builtin_clz" = xyes ; then ++ AC_DEFINE(HAVE_BUILTIN_CLZ, 1, ++ [whether we have __builtin_clz]) ++fi ++ ++AC_CACHE_CHECK([whether we have __builtin_clzl], ++ samba_cv_builtin_clzl, ++ [ ++ AC_LINK_IFELSE([AC_LANG_SOURCE( ++ [int main(void) { ++ return __builtin_clzl(1) == (sizeof(int)*8 - 1) ? 0 : 1; ++ }])], ++ samba_cv_builtin_clzl=yes) ++ ]) ++ ++if test x"$samba_cv_builtin_clzl" = xyes ; then ++ AC_DEFINE(HAVE_BUILTIN_CLZL, 1, ++ [whether we have __builtin_clzl]) ++fi ++AC_CACHE_CHECK([whether we have __builtin_clzll], ++ samba_cv_builtin_clzll, ++ [ ++ AC_LINK_IFELSE([AC_LANG_SOURCE( ++ [int main(void) { ++ return __builtin_clzll(1) == (sizeof(int)*8 - 1) ? 0 : 1; ++ }])], ++ samba_cv_builtin_clzll=yes) ++ ]) ++ ++if test x"$samba_cv_builtin_clzll" = xyes ; then ++ AC_DEFINE(HAVE_BUILTIN_CLZLL, 1, ++ [whether we have __builtin_clzll]) ++fi ++ ++AC_CACHE_CHECK([whether we have __builtin_constant_p], ++ samba_cv_builtin_constant_p, ++ [ ++ AC_LINK_IFELSE([AC_LANG_SOURCE( ++ [int main(void) { ++ return __builtin_constant_p(1) ? 0 : 1; ++ }])], ++ samba_cv_builtin_constant_p=yes) ++ ]) ++ ++if test x"$samba_cv_builtin_constant_p" = xyes ; then ++ AC_DEFINE(HAVE_BUILTIN_CONSTANT_P, 1, ++ [whether we have __builtin_constant_p]) ++fi ++ ++AC_CACHE_CHECK([whether we have __builtin_expect], ++ samba_cv_builtin_expect, ++ [ ++ AC_LINK_IFELSE([AC_LANG_SOURCE( ++ [int main(void) { ++ return __builtin_expect(main != 0, 1) ? 0 : 1; ++ }])], ++ samba_cv_builtin_expect=yes) ++ ]) ++ ++if test x"$samba_cv_builtin_expect" = xyes ; then ++ AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, ++ [whether we have __builtin_expect]) ++fi ++ ++AC_CACHE_CHECK([whether we have __builtin_popcountl], ++ samba_cv_builtin_popcountl, ++ [ ++ AC_LINK_IFELSE([AC_LANG_SOURCE( ++ [int main(void) { ++ return __builtin_popcountl(255L) == 8 ? 0 : 1; ++ }])], ++ samba_cv_builtin_popcountl=yes) ++ ]) ++ ++if test x"$samba_cv_builtin_popcountl" = xyes ; then ++ AC_DEFINE(HAVE_BUILTIN_POPCOUNTL, 1, ++ [whether we have __builtin_popcountl]) ++fi ++ ++AC_CACHE_CHECK([whether we have __builtin_types_compatible_p], ++ samba_cv_builtin_types_compatible_p, ++ [ ++ AC_LINK_IFELSE([AC_LANG_SOURCE( ++ [int main(void) { ++ return __builtin_types_compatible_p(char *, int) ? 1 : 0; ++ }])], ++ samba_cv_builtin_types_compatible_p=yes) ++ ]) ++ ++if test x"$samba_cv_builtin_types_compatible_p" = xyes ; then ++ AC_DEFINE(HAVE_BUILTIN_TYPES_COMPATIBLE_P, 1, ++ [whether we have __builtin_types_compatible_p]) ++fi ++ ++AC_CACHE_CHECK([whether we have __builtin_choose_expr], ++ samba_cv_builtin_choose_expr, ++ [ ++ AC_LINK_IFELSE([AC_LANG_SOURCE( ++ [int main(void) { ++ return __builtin_choose_expr(1, 0, "garbage"); ++ }])], ++ samba_cv_builtin_choose_expr=yes) ++ ]) ++ ++if test x"$samba_cv_builtin_choose_expr" = xyes ; then ++ AC_DEFINE(HAVE_BUILTIN_CHOOSE_EXPR, 1, ++ [whether we have __builtin_choose_expr]) ++fi ++ ++# We use @<:@ and @:>@ here for embedded [ and ]. ++AC_CACHE_CHECK([whether we have compound literals], ++ samba_cv_compound_literals, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [int main(void) { ++ int *foo = (int@<:@@:>@) { 1, 2, 3, 4 }; ++ return foo@<:@0@:>@ == 1 ? 0 : 1; ++ }])], ++ samba_cv_compound_literals=yes) ++ ]) ++ ++if test x"$samba_cv_compound_literals" = xyes ; then ++ AC_DEFINE(HAVE_COMPOUND_LITERALS, 1, ++ [whether we have compound literals]) ++fi ++ ++AC_CACHE_CHECK([whether we have flexible array members], ++ samba_cv_have_flex_arr_member, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [struct foo { unsigned int x; int arr@<:@@:>@; }; ])], ++ samba_cv_have_flex_arr_member=yes) ++ ]) ++ ++if test x"$samba_cv_have_flex_arr_member" = xyes ; then ++ AC_DEFINE(HAVE_FLEXIBLE_ARRAY_MEMBER, 1, ++ [whether we have flexible array member support]) ++fi ++ ++AC_CACHE_CHECK([whether we have isblank], ++ samba_cv_have_isblank, ++ [ ++ AC_LINK_IFELSE([AC_LANG_SOURCE( ++ [#include <ctype.h> ++ int main(void) { return isblank(' ') ? 0 : 1; } ++ ])], ++ samba_cv_have_isblank=yes) ++ ]) ++ ++if test x"$samba_cv_have_isblank" = xyes ; then ++ AC_DEFINE(HAVE_ISBLANK, 1, ++ [whether we have isblank]) ++fi ++ ++# FIXME: We could use endian.h or sys/endian.h here, and __BYTE_ORDER for ++# cross-compiling. ++AC_CACHE_CHECK([whether we are little endian],samba_cv_little_endian,[ ++AC_TRY_RUN([int main(void) { ++union { int i; char c[sizeof(int)]; } u; ++ u.i = 0x01020304; ++ return u.c[0] == 0x04 && u.c[1] == 0x03 && u.c[2] == 0x02 && u.c[3] == 0x01 ? 0 : 1; ++}], ++samba_cv_little_endian=yes, ++samba_cv_little_endian=no)]) ++if test x"$samba_cv_little_endian" = xyes ; then ++ AC_DEFINE(HAVE_LITTLE_ENDIAN, 1, ++ [whether we are little endian]) ++fi ++ ++AC_CACHE_CHECK([whether we have __typeof__], ++ samba_cv_typeof, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [int main(void) { ++ int x = 1; ++ __typeof__(x) i; ++ i = x; ++ return i == x ? 0 : 1; ++ }])], ++ samba_cv_typeof=yes) ++ ]) ++ ++if test x"$samba_cv_typeof" = xyes ; then ++ AC_DEFINE(HAVE_TYPEOF, 1, ++ [whether we have __typeof__]) ++fi ++ ++AC_CACHE_CHECK([whether we have __attribute__((warn_unused_result))], ++ samba_cv_warn_unused_result, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [int __attribute__((warn_unused_result)) func(int x) ++ { return x; }])], ++ samba_cv_warn_unused_result=yes) ++ ]) ++ ++if test x"$samba_cv_warn_unused_result" = xyes ; then ++ AC_DEFINE(HAVE_WARN_UNUSED_RESULT, 1, ++ [whether we have __attribute__((warn_unused_result))]) ++fi ++ ++AC_CACHE_CHECK([whether we have bswap_64], ++ samba_cv_have_bswap_64, ++ [ ++ AC_LINK_IFELSE([AC_LANG_SOURCE( ++ [#include <byteswap.h> ++ int main(void) { return bswap_64(1) ? 0 : 1; } ++ ])], ++ samba_cv_have_bswap_64=yes) ++ ]) ++ ++if test x"$samba_cv_have_bswap_64" = xyes ; then ++ AC_DEFINE(HAVE_BSWAP_64, 1, ++ [whether we have bswap_64]) ++fi +diff --git a/lib/iniparser_build/config.m4 b/lib/iniparser_build/config.m4 +new file mode 100644 +index 0000000..282c977 +--- /dev/null ++++ b/lib/iniparser_build/config.m4 +@@ -0,0 +1,45 @@ ++AC_ARG_WITH(included-iniparser, ++[AS_HELP_STRING([--with-included-iniparser], [use bundled iniparser library, not from system])], ++[ ++ case "$withval" in ++ yes) ++ INCLUDED_INIPARSER=yes ++ ;; ++ no) ++ INCLUDED_INIPARSER=no ++ ;; ++ esac ], ++) ++if test x"$INCLUDED_INIPARSER" != x"yes"; then ++ AC_CHECK_LIB_EXT(iniparser, LIBINIPARSER_LIBS, iniparser_load) ++ ++fi ++ ++AC_MSG_CHECKING(whether to use included iniparser) ++if test x"$ac_cv_lib_ext_iniparser" != x"yes"; then ++ ++ iniparserpaths="../iniparser ../lib/iniparser" ++ for d in $iniparserpaths; do ++ if test -f "$srcdir/$d/src/iniparser.c"; then ++ iniparserdir="$d" ++ break; ++ fi ++ done ++ if test x"$iniparserdir" = "x"; then ++ AC_MSG_ERROR([cannot find iniparser source in $iniparserpaths]) ++ fi ++ INIPARSER_CFLAGS="-I$srcdir/$iniparserdir/src" ++ AC_MSG_RESULT(yes) ++ ++ INIPARSER_OBJS="" ++ INIPARSER_OBJS="$INIPARSER_OBJS $srcdir/$iniparserdir/../iniparser_build/iniparser.o" ++ INIPARSER_OBJS="$INIPARSER_OBJS $srcdir/$iniparserdir/../iniparser_build/dictionary.o" ++ INIPARSER_OBJS="$INIPARSER_OBJS $srcdir/$iniparserdir/../iniparser_build/strlib.o" ++ ++ SMB_SUBSYSTEM(LIBINIPARSER,[$INIPARSER_OBJS],[],[$INIPARSER_CFLAGS]) ++else ++ AC_MSG_RESULT(no) ++ SMB_EXT_LIB(LIBINIPARSER,,,,${LIBINIPARSER_LIBS}) ++ SMB_ENABLE(LIBINIPARSER,YES) ++fi ++ +diff --git a/lib/nss_wrapper/config.m4 b/lib/nss_wrapper/config.m4 +new file mode 100644 +index 0000000..1e864bf +--- /dev/null ++++ b/lib/nss_wrapper/config.m4 +@@ -0,0 +1,19 @@ ++AC_ARG_ENABLE(nss-wrapper, ++AS_HELP_STRING([--enable-nss-wrapper], [Turn on nss wrapper library (default=no)])) ++ ++HAVE_NSS_WRAPPER=no ++ ++if eval "test x$developer = xyes -o x$selftest = xyes"; then ++ enable_nss_wrapper=yes ++fi ++ ++if eval "test x$enable_nss_wrapper = xyes"; then ++ AC_DEFINE(NSS_WRAPPER,1,[Use nss wrapper library]) ++ HAVE_NSS_WRAPPER=yes ++ ++ # this is only used for samba3 ++ NSS_WRAPPER_OBJS="../lib/nss_wrapper/nss_wrapper.o" ++fi ++ ++AC_SUBST(HAVE_NSS_WRAPPER) ++AC_SUBST(NSS_WRAPPER_OBJS) +diff --git a/lib/ntdb/libntdb.m4 b/lib/ntdb/libntdb.m4 +new file mode 100644 +index 0000000..847dc64 +--- /dev/null ++++ b/lib/ntdb/libntdb.m4 +@@ -0,0 +1,41 @@ ++dnl find the ntdb sources. This is meant to work both for ++dnl ntdb standalone builds, and builds of packages using ntdb ++ntdbdir="" ++ntdbpaths=". lib/ntdb ntdb ../ntdb ../lib/ntdb" ++for d in $ntdbpaths; do ++ if test -f "$srcdir/$d/ntdb.c"; then ++ ntdbdir="$d" ++ AC_SUBST(ntdbdir) ++ break; ++ fi ++done ++if test x"$ntdbdir" = "x"; then ++ AC_MSG_ERROR([cannot find ntdb source in $ntdbpaths]) ++fi ++NTDB_OBJ="check.o free.o hash.o io.o lock.o ntdb.o open.o summary.o transaction.o traverse.o" ++AC_SUBST(NTDB_OBJ) ++AC_SUBST(LIBREPLACEOBJ) ++AC_SUBST(CCAN_OBJ) ++ ++NTDB_LIBS="" ++AC_SUBST(NTDB_LIBS) ++ ++NTDB_DEPS="" ++if test x$libreplace_cv_HAVE_FDATASYNC_IN_LIBRT = xyes ; then ++ NTDB_DEPS="$NTDB_DEPS -lrt" ++fi ++AC_SUBST(NTDB_DEPS) ++ ++NTDB_CFLAGS="-I$ntdbdir" ++AC_SUBST(NTDB_CFLAGS) ++ ++AC_CHECK_FUNCS(mmap pread pwrite getpagesize utime) ++AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h) ++ ++AC_HAVE_DECL(pread, [#include <unistd.h>]) ++AC_HAVE_DECL(pwrite, [#include <unistd.h>]) ++ ++if test x"$VERSIONSCRIPT" != "x"; then ++ EXPORTSFILE=ntdb.exports ++ AC_SUBST(EXPORTSFILE) ++fi +diff --git a/lib/popt/libpopt.m4 b/lib/popt/libpopt.m4 +new file mode 100644 +index 0000000..cfa2eaa +--- /dev/null ++++ b/lib/popt/libpopt.m4 +@@ -0,0 +1,43 @@ ++dnl Check to see if we should use the included popt ++ ++INCLUDED_POPT=auto ++AC_ARG_WITH(included-popt, ++[ --with-included-popt use bundled popt library, not from system], ++[ INCLUDED_POPT=$withval ]) ++ ++AC_SUBST(POPT_LIBS) ++AC_SUBST(POPT_CFLAGS) ++ ++if test x"$INCLUDED_POPT" != x"yes"; then ++ AC_CHECK_HEADERS(popt.h) ++ AC_CHECK_LIB(popt, poptGetContext, [ POPT_LIBS="-lpopt" ]) ++ if test x"$ac_cv_header_popt_h" = x"no" -o x"$ac_cv_lib_popt_poptGetContext" = x"no"; then ++ INCLUDED_POPT=yes ++ POPT_CFLAGS="" ++ else ++ INCLUDED_POPT=no ++ fi ++fi ++ ++AC_MSG_CHECKING(whether to use included popt) ++AC_MSG_RESULT($INCLUDED_POPT) ++if test x"$INCLUDED_POPT" != x"no"; then ++ dnl find the popt sources. This is meant to work both for ++ dnl popt standalone builds, and builds of packages using popt ++ poptdir="" ++ poptpaths="$srcdir $srcdir/lib/popt $srcdir/popt $srcdir/../popt $srcdir/../lib/popt" ++ for d in $poptpaths; do ++ if test -f "$d/popt.c"; then ++ poptdir="$d" ++ POPT_CFLAGS="-I$d" ++ AC_SUBST(poptdir) ++ break ++ fi ++ done ++ if test x"$poptdir" = "x"; then ++ AC_MSG_ERROR([cannot find popt source in $poptpaths]) ++ fi ++ POPT_OBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o" ++ AC_SUBST(POPT_OBJ) ++ AC_CHECK_HEADERS([float.h alloca.h]) ++fi +diff --git a/lib/popt/samba.m4 b/lib/popt/samba.m4 +new file mode 100644 +index 0000000..627dd85 +--- /dev/null ++++ b/lib/popt/samba.m4 +@@ -0,0 +1,8 @@ ++m4_include(../lib/popt/libpopt.m4) ++ ++if test x"$POPT_OBJ" = "x"; then ++ SMB_EXT_LIB(LIBPOPT, [${POPT_LIBS}]) ++else ++ SMB_INCLUDE_MK(../lib/popt/config.mk) ++fi ++ +diff --git a/lib/replace/crypt.m4 b/lib/replace/crypt.m4 +new file mode 100644 +index 0000000..fae2a58 +--- /dev/null ++++ b/lib/replace/crypt.m4 +@@ -0,0 +1,6 @@ ++############################################### ++# test for where we get crypt() from ++AC_CHECK_HEADERS(crypt.h) ++AC_SEARCH_LIBS_EXT(crypt, [crypt], CRYPT_LIBS, ++ [ AC_DEFINE(HAVE_CRYPT,1,[Whether the system has the crypt() function]) ], ++ [ LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/crypt.o" ]) +diff --git a/lib/replace/dlfcn.m4 b/lib/replace/dlfcn.m4 +new file mode 100644 +index 0000000..722e024 +--- /dev/null ++++ b/lib/replace/dlfcn.m4 +@@ -0,0 +1,31 @@ ++dnl dummies provided by dlfcn.c if not available ++save_LIBS="$LIBS" ++LIBS="" ++ ++libreplace_cv_dlfcn=no ++AC_SEARCH_LIBS(dlopen, dl) ++ ++AC_CHECK_HEADERS(dlfcn.h) ++AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes]) ++ ++libreplace_cv_shl=no ++AC_SEARCH_LIBS(shl_load, sl) ++AC_CHECK_HEADERS(dl.h) ++AC_CHECK_FUNCS([shl_load shl_unload shl_findsym],[],[libreplace_cv_shl=yes]) ++ ++AC_VERIFY_C_PROTOTYPE([void *dlopen(const char* filename, unsigned int flags)], ++ [ ++ return 0; ++ ],[ ++ AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsigned int flags]) ++ ],[],[ ++ #include <dlfcn.h> ++ ]) ++ ++if test x"${libreplace_cv_dlfcn}" = x"yes";then ++ LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/dlfcn.o" ++fi ++ ++LIBDL="$LIBS" ++AC_SUBST(LIBDL) ++LIBS="$save_LIBS" +diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4 +new file mode 100644 +index 0000000..f4ae715 +--- /dev/null ++++ b/lib/replace/libreplace.m4 +@@ -0,0 +1,490 @@ ++AC_DEFUN_ONCE(AC_LIBREPLACE_LOCATION_CHECKS, ++[ ++echo "LIBREPLACE_LOCATION_CHECKS: START" ++ ++dnl find the libreplace sources. This is meant to work both for ++dnl libreplace standalone builds, and builds of packages using libreplace ++libreplacedir="" ++libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace" ++for d in $libreplacepaths; do ++ if test -f "$d/replace.c"; then ++ libreplacedir="$d" ++ AC_SUBST(libreplacedir) ++ break; ++ fi ++done ++if test x"$libreplacedir" = "x"; then ++ AC_MSG_ERROR([cannot find libreplace in $libreplacepaths]) ++fi ++LIBREPLACEOBJ="$libreplacedir/replace.o" ++AC_SUBST(LIBREPLACEOBJ) ++ ++AC_CANONICAL_BUILD ++AC_CANONICAL_HOST ++AC_CANONICAL_TARGET ++ ++echo "LIBREPLACE_LOCATION_CHECKS: END" ++]) dnl end AC_LIBREPLACE_LOCATION_CHECKS ++ ++ ++AC_DEFUN_ONCE(AC_LIBREPLACE_BROKEN_CHECKS, ++[ ++echo "LIBREPLACE_BROKEN_CHECKS: START" ++ ++dnl find the libreplace sources. This is meant to work both for ++dnl libreplace standalone builds, and builds of packages using libreplace ++libreplacedir="" ++libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace" ++for d in $libreplacepaths; do ++ if test -f "$d/replace.c"; then ++ libreplacedir="$d" ++ AC_SUBST(libreplacedir) ++ break; ++ fi ++done ++if test x"$libreplacedir" = "x"; then ++ AC_MSG_ERROR([cannot find libreplace in $libreplacepaths]) ++fi ++ ++LIBREPLACEOBJ="$libreplacedir/replace.o" ++AC_SUBST(LIBREPLACEOBJ) ++ ++LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/snprintf.o $libreplacedir/xattr.o" ++ ++AC_TYPE_UID_T ++AC_TYPE_MODE_T ++AC_TYPE_OFF_T ++AC_TYPE_SIZE_T ++AC_TYPE_PID_T ++AC_STRUCT_ST_RDEV ++AC_CHECK_TYPE(ino_t,unsigned) ++AC_CHECK_TYPE(loff_t,off_t) ++AC_CHECK_TYPE(offset_t,loff_t) ++AC_CHECK_TYPE(blksize_t,long) ++AC_CHECK_TYPE(blkcnt_t,long) ++ ++AC_FUNC_MEMCMP ++ ++AC_CHECK_FUNCS([pipe strftime srandom random srand rand usleep setbuffer lstat getpgrp utime utimes]) ++ ++AC_CHECK_HEADERS(stdbool.h stdint.h sys/select.h) ++AC_CHECK_HEADERS(setjmp.h utime.h sys/wait.h) ++ ++LIBREPLACE_PROVIDE_HEADER([stdint.h]) ++LIBREPLACE_PROVIDE_HEADER([stdbool.h]) ++ ++AC_DEFINE(HAVE_LIBREPLACE, 1, [We have libreplace]) ++ ++AC_CHECK_TYPE(bool, ++[AC_DEFINE(HAVE_BOOL, 1, [Whether the bool type is available])],, ++[ ++AC_INCLUDES_DEFAULT ++#ifdef HAVE_STDBOOL_H ++#include <stdbool.h> ++#endif] ++) ++ ++AC_CHECK_TYPE(_Bool, ++[AC_DEFINE(HAVE__Bool, 1, [Whether the _Bool type is available])],, ++[ ++AC_INCLUDES_DEFAULT ++#ifdef HAVE_STDBOOL_H ++#include <stdbool.h> ++#endif] ++) ++ ++AC_CHECK_HEADERS(linux/types.h) ++ ++AC_CACHE_CHECK([for working mmap],libreplace_cv_HAVE_MMAP,[ ++AC_TRY_RUN([#include "$libreplacedir/test/shared_mmap.c"], ++ libreplace_cv_HAVE_MMAP=yes,libreplace_cv_HAVE_MMAP=no,libreplace_cv_HAVE_MMAP=cross)]) ++if test x"$libreplace_cv_HAVE_MMAP" = x"yes"; then ++ AC_DEFINE(HAVE_MMAP,1,[Whether mmap works]) ++fi ++ ++AC_CACHE_CHECK([for working mremap],libreplace_cv_HAVE_MREMAP,[ ++AC_TRY_RUN([#include "$libreplacedir/test/shared_mremap.c"], ++ libreplace_cv_HAVE_MREMAP=yes,libreplace_cv_HAVE_MREMAP=no,libreplace_cv_HAVE_MREMAP=cross)]) ++if test x"$libreplace_cv_HAVE_MREMAP" = x"yes"; then ++ AC_DEFINE(HAVE_MREMAP,1,[Whether mremap works]) ++fi ++ ++AC_CACHE_CHECK([for incoherent mmap],libreplace_cv_HAVE_INCOHERENT_MMAP,[ ++AC_TRY_RUN([#include "$libreplacedir/test/incoherent_mmap.c"], ++ libreplace_cv_HAVE_INCOHERENT_MMAP=yes,libreplace_cv_HAVE_INCOHERENT_MMAP=no,libreplace_cv_HAVE_INCOHERENT_MMAP=cross)]) ++if test x"$libreplace_cv_HAVE_INCOHERENT_MMAP" = x"yes"; then ++ AC_DEFINE(HAVE_INCOHERENT_MMAP,1,[Whether mmap is incoherent against write]) ++fi ++ ++ ++AC_CHECK_HEADERS(sys/syslog.h syslog.h) ++AC_CHECK_HEADERS(sys/time.h time.h) ++AC_CHECK_HEADERS(stdarg.h vararg.h) ++AC_CHECK_HEADERS(sys/mount.h mntent.h) ++AC_CHECK_HEADERS(stropts.h) ++AC_CHECK_HEADERS(unix.h) ++AC_CHECK_HEADERS(malloc.h) ++AC_CHECK_HEADERS(syscall.h) ++AC_CHECK_HEADERS(sys/syscall.h) ++AC_CHECK_HEADERS(sys/ucontext.h) ++ ++AC_CHECK_FUNCS(syscall setuid seteuid setreuid setresuid setgid setegid setregid setresgid setgroups) ++AC_CHECK_FUNCS(chroot bzero strerror strerror_r memalign posix_memalign getpagesize) ++AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename) ++AC_CHECK_FUNCS(waitpid wait4 strlcpy strlcat initgroups memmove strdup) ++AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp dup2 dprintf vdprintf) ++AC_CHECK_FUNCS(isatty chown lchown link readlink symlink realpath) ++AC_CHECK_FUNCS(fdatasync,,[ ++ # if we didn't find it, look in librt (Solaris hides it there...) ++ AC_CHECK_LIB(rt, fdatasync, ++ [libreplace_cv_HAVE_FDATASYNC_IN_LIBRT=yes ++ AC_DEFINE(HAVE_FDATASYNC, 1, Define to 1 if there is support for fdatasync)]) ++]) ++AC_HAVE_DECL(fdatasync, [#include <unistd.h>]) ++AC_CHECK_FUNCS(clock_gettime,libreplace_cv_have_clock_gettime=yes,[ ++ AC_CHECK_LIB(rt, clock_gettime, ++ [libreplace_cv_HAVE_CLOCK_GETTIME_IN_LIBRT=yes ++ libreplace_cv_have_clock_gettime=yes ++ AC_DEFINE(HAVE_CLOCK_GETTIME, 1, Define to 1 if there is support for clock_gettime)]) ++]) ++ ++AC_CHECK_HEADERS(sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h) ++AC_CHECK_HEADERS(sys/ea.h sys/proplist.h) ++ ++LIBREPLACE_FILESYS_LIBS="" ++ ++############################################ ++# Check for EA implementations ++case "$host_os" in ++ *freebsd4* | *dragonfly* ) ++ AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work]) ++ ;; ++ *) ++ AC_SEARCH_LIBS(getxattr, [attr]) ++ AC_CHECK_FUNCS(attr_get attr_getf attr_list attr_listf attropen attr_remove) ++ AC_CHECK_FUNCS(attr_removef attr_set attr_setf extattr_delete_fd extattr_delete_file) ++ AC_CHECK_FUNCS(extattr_get_fd extattr_get_file extattr_list_fd extattr_list_file) ++ AC_CHECK_FUNCS(extattr_set_fd extattr_set_file fgetea fgetxattr flistea flistxattr) ++ AC_CHECK_FUNCS(fremoveea fremovexattr fsetea fsetxattr getea getxattr listea) ++ AC_CHECK_FUNCS(listxattr removeea removexattr setea setxattr) ++ ++ AC_CHECK_LIB_EXT(attr, LIBREPLACE_FILESYS_LIBS, flistea) ++ AC_CHECK_LIB_EXT(attr, LIBREPLACE_FILESYS_LIBS, flistxattr) ++ AC_CHECK_LIB_EXT(attr, LIBREPLACE_FILESYS_LIBS, attr_listf) ++ AC_CHECK_LIB_EXT(attr, LIBREPLACE_FILESYS_LIBS, extattr_list_fd) ++ ++ ;; ++esac ++ ++ ++######################################################## ++# Do xattr functions take additional options like on Darwin? ++if test x"$ac_cv_func_getxattr" = x"yes" ; then ++ AC_CACHE_CHECK([whether xattr interface takes additional options], smb_attr_cv_xattr_add_opt, [ ++ old_LIBS=$LIBS ++ LIBS="$LIBS $LIBREPLACE_FILESYS_LIBS" ++ AC_TRY_COMPILE([ ++ #include <sys/types.h> ++ #if HAVE_ATTR_XATTR_H ++ #include <attr/xattr.h> ++ #elif HAVE_SYS_XATTR_H ++ #include <sys/xattr.h> ++ #endif ++ ],[ ++ getxattr(0, 0, 0, 0, 0, 0); ++ ], ++ [smb_attr_cv_xattr_add_opt=yes], ++ [smb_attr_cv_xattr_add_opt=no;LIBS=$old_LIBS]) ++ ]) ++ if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then ++ AC_DEFINE(XATTR_ADDITIONAL_OPTIONS, 1, [xattr functions have additional options]) ++ fi ++fi ++ ++AC_CHECK_FUNCS(get_current_dir_name) ++AC_HAVE_DECL(setresuid, [#include <unistd.h>]) ++AC_HAVE_DECL(setresgid, [#include <unistd.h>]) ++AC_HAVE_DECL(errno, [#include <errno.h>]) ++ ++AC_CACHE_CHECK([for secure mkstemp],libreplace_cv_HAVE_SECURE_MKSTEMP,[ ++AC_TRY_RUN([#include <stdlib.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <unistd.h> ++main() { ++ struct stat st; ++ char tpl[20]="/tmp/test.XXXXXX"; ++ char tpl2[20]="/tmp/test.XXXXXX"; ++ int fd = mkstemp(tpl); ++ int fd2 = mkstemp(tpl2); ++ if (fd == -1) { ++ if (fd2 != -1) { ++ unlink(tpl2); ++ } ++ exit(1); ++ } ++ if (fd2 == -1) exit(1); ++ unlink(tpl); ++ unlink(tpl2); ++ if (fstat(fd, &st) != 0) exit(1); ++ if ((st.st_mode & 0777) != 0600) exit(1); ++ if (strcmp(tpl, "/tmp/test.XXXXXX") == 0) { ++ exit(1); ++ } ++ if (strcmp(tpl, tpl2) == 0) { ++ exit(1); ++ } ++ exit(0); ++}], ++libreplace_cv_HAVE_SECURE_MKSTEMP=yes, ++libreplace_cv_HAVE_SECURE_MKSTEMP=no, ++libreplace_cv_HAVE_SECURE_MKSTEMP=cross)]) ++if test x"$libreplace_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then ++ AC_DEFINE(HAVE_SECURE_MKSTEMP,1,[Whether mkstemp is secure]) ++fi ++ ++dnl Provided by snprintf.c: ++AC_CHECK_HEADERS(stdio.h strings.h) ++AC_CHECK_DECLS([snprintf, vsnprintf, asprintf, vasprintf]) ++AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf) ++ ++AC_CACHE_CHECK([for C99 vsnprintf],libreplace_cv_HAVE_C99_VSNPRINTF,[ ++AC_TRY_RUN([ ++#include <sys/types.h> ++#include <stdio.h> ++#include <stdarg.h> ++#include <stdlib.h> ++void foo(const char *format, ...) { ++ va_list ap; ++ int len; ++ char buf[20]; ++ long long l = 1234567890; ++ l *= 100; ++ ++ va_start(ap, format); ++ len = vsnprintf(buf, 0, format, ap); ++ va_end(ap); ++ if (len != 5) exit(1); ++ ++ va_start(ap, format); ++ len = vsnprintf(0, 0, format, ap); ++ va_end(ap); ++ if (len != 5) exit(2); ++ ++ if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(3); ++ ++ if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(4); ++ if (snprintf(buf, 20, "%zu", 123456789) != 9 || strcmp(buf, "123456789") != 0) exit(5); ++ if (snprintf(buf, 20, "%2\$d %1\$d", 3, 4) != 3 || strcmp(buf, "4 3") != 0) exit(6); ++ if (snprintf(buf, 20, "%s", 0) < 3) exit(7); ++ ++ exit(0); ++} ++main() { foo("hello"); } ++], ++libreplace_cv_HAVE_C99_VSNPRINTF=yes,libreplace_cv_HAVE_C99_VSNPRINTF=no,libreplace_cv_HAVE_C99_VSNPRINTF=cross)]) ++if test x"$libreplace_cv_HAVE_C99_VSNPRINTF" = x"yes"; then ++ AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Whether there is a C99 compliant vsnprintf]) ++fi ++ ++ ++dnl VA_COPY ++AC_CACHE_CHECK([for va_copy],libreplace_cv_HAVE_VA_COPY,[ ++AC_TRY_LINK([#include <stdarg.h> ++va_list ap1,ap2;], [va_copy(ap1,ap2);], ++libreplace_cv_HAVE_VA_COPY=yes,libreplace_cv_HAVE_VA_COPY=no)]) ++if test x"$libreplace_cv_HAVE_VA_COPY" = x"yes"; then ++ AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available]) ++fi ++ ++if test x"$libreplace_cv_HAVE_VA_COPY" != x"yes"; then ++AC_CACHE_CHECK([for __va_copy],libreplace_cv_HAVE___VA_COPY,[ ++AC_TRY_LINK([#include <stdarg.h> ++va_list ap1,ap2;], [__va_copy(ap1,ap2);], ++libreplace_cv_HAVE___VA_COPY=yes,libreplace_cv_HAVE___VA_COPY=no)]) ++if test x"$libreplace_cv_HAVE___VA_COPY" = x"yes"; then ++ AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available]) ++fi ++fi ++ ++dnl __FUNCTION__ macro ++AC_CACHE_CHECK([for __FUNCTION__ macro],libreplace_cv_HAVE_FUNCTION_MACRO,[ ++AC_TRY_COMPILE([#include <stdio.h>], [printf("%s\n", __FUNCTION__);], ++libreplace_cv_HAVE_FUNCTION_MACRO=yes,libreplace_cv_HAVE_FUNCTION_MACRO=no)]) ++if test x"$libreplace_cv_HAVE_FUNCTION_MACRO" = x"yes"; then ++ AC_DEFINE(HAVE_FUNCTION_MACRO,1,[Whether there is a __FUNCTION__ macro]) ++else ++ dnl __func__ macro ++ AC_CACHE_CHECK([for __func__ macro],libreplace_cv_HAVE_func_MACRO,[ ++ AC_TRY_COMPILE([#include <stdio.h>], [printf("%s\n", __func__);], ++ libreplace_cv_HAVE_func_MACRO=yes,libreplace_cv_HAVE_func_MACRO=no)]) ++ if test x"$libreplace_cv_HAVE_func_MACRO" = x"yes"; then ++ AC_DEFINE(HAVE_func_MACRO,1,[Whether there is a __func__ macro]) ++ fi ++fi ++ ++AC_CHECK_HEADERS([sys/param.h limits.h]) ++ ++AC_CHECK_TYPE(comparison_fn_t, ++[AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])]) ++ ++AC_HAVE_DECL(setenv, [#include <stdlib.h>]) ++AC_CHECK_FUNCS(setenv unsetenv) ++AC_HAVE_DECL(environ, [#include <unistd.h>]) ++ ++AC_CHECK_FUNCS(strnlen) ++AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq) ++ ++AC_CHECK_FUNCS(memmem) ++ ++# this test disabled as we don't actually need __VA_ARGS__ yet ++AC_TRY_CPP([ ++#define eprintf(...) fprintf(stderr, __VA_ARGS__) ++eprintf("bla", "bar"); ++], AC_DEFINE(HAVE__VA_ARGS__MACRO, 1, [Whether the __VA_ARGS__ macro is available])) ++ ++ ++AC_CACHE_CHECK([for sig_atomic_t type],libreplace_cv_sig_atomic_t, [ ++ AC_TRY_COMPILE([ ++#include <sys/types.h> ++#if STDC_HEADERS ++#include <stdlib.h> ++#include <stddef.h> ++#endif ++#include <signal.h>],[sig_atomic_t i = 0], ++ libreplace_cv_sig_atomic_t=yes,libreplace_cv_sig_atomic_t=no)]) ++if test x"$libreplace_cv_sig_atomic_t" = x"yes"; then ++ AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE,1,[Whether we have the atomic_t variable type]) ++fi ++ ++ ++dnl Check if the C compiler understands volatile (it should, being ANSI). ++AC_CACHE_CHECK([that the C compiler understands volatile],libreplace_cv_volatile, [ ++ AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0], ++ libreplace_cv_volatile=yes,libreplace_cv_volatile=no)]) ++if test x"$libreplace_cv_volatile" = x"yes"; then ++ AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile]) ++fi ++ ++m4_include(system/config.m4) ++ ++AC_CACHE_CHECK([for O_DIRECT flag to open(2)],libreplace_cv_HAVE_OPEN_O_DIRECT,[ ++AC_TRY_COMPILE([ ++#include <unistd.h> ++#ifdef HAVE_FCNTL_H ++#include <fcntl.h> ++#endif], ++[int fd = open("/dev/null", O_DIRECT);], ++libreplace_cv_HAVE_OPEN_O_DIRECT=yes,libreplace_cv_HAVE_OPEN_O_DIRECT=no)]) ++if test x"$libreplace_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then ++ AC_DEFINE(HAVE_OPEN_O_DIRECT,1,[Whether the open(2) accepts O_DIRECT]) ++fi ++ ++m4_include(dlfcn.m4) ++m4_include(strptime.m4) ++m4_include(win32.m4) ++m4_include(timegm.m4) ++m4_include(repdir.m4) ++m4_include(crypt.m4) ++ ++if test x$libreplace_cv_have_clock_gettime = xyes ; then ++ SMB_CHECK_CLOCK_ID(CLOCK_MONOTONIC) ++ SMB_CHECK_CLOCK_ID(CLOCK_PROCESS_CPUTIME_ID) ++ SMB_CHECK_CLOCK_ID(CLOCK_REALTIME) ++fi ++ ++AC_CACHE_CHECK([for struct timespec type],libreplace_cv_struct_timespec, [ ++ AC_TRY_COMPILE([ ++#include <sys/types.h> ++#if STDC_HEADERS ++#include <stdlib.h> ++#include <stddef.h> ++#endif ++#if TIME_WITH_SYS_TIME ++# include <sys/time.h> ++# include <time.h> ++#else ++# if HAVE_SYS_TIME_H ++# include <sys/time.h> ++# else ++# include <time.h> ++# endif ++#endif ++],[struct timespec ts;], ++ libreplace_cv_struct_timespec=yes,libreplace_cv_struct_timespec=no)]) ++if test x"$libreplace_cv_struct_timespec" = x"yes"; then ++ AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec]) ++fi ++ ++AC_CACHE_CHECK([for ucontext_t type],libreplace_cv_ucontext_t, [ ++ AC_TRY_COMPILE([ ++#include <signal.h> ++#if HAVE_SYS_UCONTEXT_H ++#include <sys/ucontext.h> ++# endif ++],[ucontext_t uc; sigaddset(&uc.uc_sigmask, SIGUSR1);], ++ libreplace_cv_ucontext_t=yes,libreplace_cv_ucontext_t=no)]) ++if test x"$libreplace_cv_ucontext_t" = x"yes"; then ++ AC_DEFINE(HAVE_UCONTEXT_T,1,[Whether we have ucontext_t]) ++fi ++ ++AC_CHECK_FUNCS([printf memset memcpy],,[AC_MSG_ERROR([Required function not found])]) ++ ++echo "LIBREPLACE_BROKEN_CHECKS: END" ++]) dnl end AC_LIBREPLACE_BROKEN_CHECKS ++ ++AC_DEFUN_ONCE(AC__LIBREPLACE_ALL_CHECKS_START, ++[ ++#LIBREPLACE_ALL_CHECKS: START" ++]) ++AC_DEFUN_ONCE(AC__LIBREPLACE_ALL_CHECKS_END, ++[ ++#LIBREPLACE_ALL_CHECKS: END" ++]) ++m4_define(AC_LIBREPLACE_ALL_CHECKS, ++[ ++AC__LIBREPLACE_ALL_CHECKS_START ++AC_LIBREPLACE_LOCATION_CHECKS ++AC_LIBREPLACE_CC_CHECKS ++AC_LIBREPLACE_BROKEN_CHECKS ++AC__LIBREPLACE_ALL_CHECKS_END ++CFLAGS="$CFLAGS -I$libreplacedir" ++]) ++ ++m4_include(libreplace_cc.m4) ++m4_include(libreplace_ld.m4) ++m4_include(libreplace_network.m4) ++m4_include(libreplace_macros.m4) ++ ++ ++dnl SMB_CHECK_CLOCK_ID(clockid) ++dnl Test whether the specified clock_gettime clock ID is available. If it ++dnl is, we define HAVE_clockid ++AC_DEFUN([SMB_CHECK_CLOCK_ID], ++[ ++ AC_MSG_CHECKING(for $1) ++ AC_TRY_LINK([ ++#if TIME_WITH_SYS_TIME ++# include <sys/time.h> ++# include <time.h> ++#else ++# if HAVE_SYS_TIME_H ++# include <sys/time.h> ++# else ++# include <time.h> ++# endif ++#endif ++ ], ++ [ ++clockid_t clk = $1; ++ ], ++ [ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_$1, 1, ++ [Whether the clock_gettime clock ID $1 is available]) ++ ], ++ [ ++ AC_MSG_RESULT(no) ++ ]) ++]) ++m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],[m4_include(autoconf-2.60.m4)]) +diff --git a/lib/replace/libreplace_cc.m4 b/lib/replace/libreplace_cc.m4 +new file mode 100644 +index 0000000..50cb735 +--- /dev/null ++++ b/lib/replace/libreplace_cc.m4 +@@ -0,0 +1,197 @@ ++ ++AC_DEFUN_ONCE(AC__LIBREPLACE_ONLY_CC_CHECKS_START, ++[ ++echo "LIBREPLACE_CC_CHECKS: START" ++]) ++ ++AC_DEFUN_ONCE(AC__LIBREPLACE_ONLY_CC_CHECKS_END, ++[ ++echo "LIBREPLACE_CC_CHECKS: END" ++]) ++ ++dnl ++dnl ++dnl AC_LIBREPLACE_CC_CHECKS ++dnl ++dnl Note: we need to use m4_define instead of AC_DEFUN because ++dnl of the ordering of tests ++dnl ++dnl ++m4_define(AC_LIBREPLACE_CC_CHECKS, ++[ ++AC__LIBREPLACE_ONLY_CC_CHECKS_START ++ ++dnl stop the C89 attempt by autoconf - if autoconf detects -Ae it will enable it ++dnl which conflicts with C99 on HPUX ++ac_cv_prog_cc_Ae=no ++ ++savedCFLAGS=$CFLAGS ++AC_PROG_CC ++CFLAGS=$savedCFLAGS ++ ++dnl don't try for C99 if we are using gcc, as otherwise we ++dnl lose immediate structure constants ++if test x"$GCC" != x"yes" ; then ++AC_PROG_CC_C99 ++fi ++ ++if test x"$GCC" = x"yes" ; then ++ AC_MSG_CHECKING([for version of gcc]) ++ GCC_VERSION=`$CC -dumpversion` ++ AC_MSG_RESULT(${GCC_VERSION}) ++fi ++AC_USE_SYSTEM_EXTENSIONS ++AC_C_BIGENDIAN ++AC_C_INLINE ++LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not supported])]) ++ ++AC_PROG_INSTALL ++ ++AC_ISC_POSIX ++AC_N_DEFINE(_XOPEN_SOURCE_EXTENDED) ++ ++AC_MSG_CHECKING(checking getconf LFS_CFLAGS for large file support flags) ++LFS_CFLAGS=`(getconf LFS_CFLAGS) 2>/dev/null` || LFS_CFLAGS="" ++ ++AC_MSG_RESULT(${LFS_CFLAGS}) ++if test "x$LFS_CFLAGS" != 'x-1' || test "x$LFS_CFLAGS" != "xundefined"; then ++ CFLAGS="$CFLAGS $LFS_CFLAGS" ++fi ++ ++AC_SYS_LARGEFILE ++ ++dnl Add #include for broken IRIX header files ++case "$host_os" in ++ *irix6*) AC_ADD_INCLUDE(<standards.h>) ++ AC_N_DEFINE(_XOPEN_SOURCE,600) ++ AC_N_DEFINE(_BSD_TYPES) ++ ;; ++ *hpux*) ++ # mmap on HPUX is completely broken... ++ AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken]) ++ if test "`uname -r`" = "B.11.00" -o "`uname -r`" = "B.11.11"; then ++ AC_MSG_WARN([Enabling HPUX 11.00/11.11 header bug workaround]) ++ CFLAGS="$CFLAGS -Dpread=pread64 -Dpwrite=pwrite64" ++ fi ++ if test "`uname -r`" = "B.11.23"; then ++ AC_MSG_WARN([Enabling HPUX 11.23 machine/sys/getppdp.h bug workaround]) ++ CFLAGS="$CFLAGS -D_MACHINE_SYS_GETPPDP_INCLUDED" ++ fi ++ ;; ++ *aix*) ++ AC_DEFINE(BROKEN_STRNDUP, 1, [Whether strndup is broken]) ++ AC_DEFINE(BROKEN_STRNLEN, 1, [Whether strnlen is broken]) ++ if test "${GCC}" != "yes"; then ++ ## for funky AIX compiler using strncpy() ++ CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000" ++ fi ++ ;; ++ *osf*) ++ # this brings in socklen_t ++ AC_N_DEFINE(_XOPEN_SOURCE,600) ++ AC_N_DEFINE(_OSF_SOURCE) ++ ;; ++ # ++ # VOS may need to have POSIX support and System V compatibility enabled. ++ # ++ *vos*) ++ case "$CFLAGS" in ++ *-D_POSIX_C_SOURCE*);; ++ *) ++ CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L" ++ AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Whether to enable POSIX support]) ++ ;; ++ esac ++ case "$CFLAGS" in ++ *-D_SYSV*|*-D_SVID_SOURCE*);; ++ *) ++ CFLAGS="$CFLAGS -D_SYSV" ++ AC_DEFINE(_SYSV, 1, [Whether to enable System V compatibility]) ++ ;; ++ esac ++ ;; ++esac ++ ++# Do not check for standards.h on darwin, we get nasty warnings on ++# OS/X Lion. Probably a positive-list of OS'es like IRIX and AIX ++# would be the better choice, but this seems to work fine ++ ++case "$host_os" in ++ *darwin*) ++ ;; ++ *) ++ AC_CHECK_HEADERS([standards.h]) ++ ;; ++esac ++ ++# Solaris needs HAVE_LONG_LONG defined ++AC_CHECK_TYPES(long long) ++ ++AC_CHECK_SIZEOF(int) ++AC_CHECK_SIZEOF(char) ++AC_CHECK_SIZEOF(short) ++AC_CHECK_SIZEOF(long) ++AC_CHECK_SIZEOF(long long) ++ ++AC_CHECK_TYPE(int8_t, char) ++AC_CHECK_TYPE(uint8_t, unsigned char) ++AC_CHECK_TYPE(int16_t, short) ++AC_CHECK_TYPE(uint16_t, unsigned short) ++ ++if test $ac_cv_sizeof_int -eq 4 ; then ++AC_CHECK_TYPE(int32_t, int) ++AC_CHECK_TYPE(uint32_t, unsigned int) ++elif test $ac_cv_size_long -eq 4 ; then ++AC_CHECK_TYPE(int32_t, long) ++AC_CHECK_TYPE(uint32_t, unsigned long) ++else ++AC_MSG_ERROR([LIBREPLACE no 32-bit type found]) ++fi ++ ++AC_CHECK_TYPE(int64_t, long long) ++AC_CHECK_TYPE(uint64_t, unsigned long long) ++ ++AC_CHECK_TYPE(size_t, unsigned int) ++AC_CHECK_TYPE(ssize_t, int) ++ ++AC_CHECK_SIZEOF(off_t) ++AC_CHECK_SIZEOF(size_t) ++AC_CHECK_SIZEOF(ssize_t) ++ ++AC_CHECK_TYPES([intptr_t, uintptr_t, ptrdiff_t]) ++ ++if test x"$ac_cv_type_long_long" != x"yes";then ++ AC_MSG_ERROR([LIBREPLACE needs type 'long long']) ++fi ++if test $ac_cv_sizeof_long_long -lt 8;then ++ AC_MSG_ERROR([LIBREPLACE needs sizeof(long long) >= 8]) ++fi ++ ++############################################ ++# check if the compiler can do immediate structures ++AC_SUBST(libreplace_cv_immediate_structures) ++AC_CACHE_CHECK([for immediate structures],libreplace_cv_immediate_structures,[ ++ AC_TRY_COMPILE([ ++ #include <stdio.h> ++ ],[ ++ typedef struct {unsigned x;} FOOBAR; ++ #define X_FOOBAR(x) ((FOOBAR) { x }) ++ #define FOO_ONE X_FOOBAR(1) ++ FOOBAR f = FOO_ONE; ++ static const struct { ++ FOOBAR y; ++ } f2[] = { ++ {FOO_ONE} ++ }; ++ static const FOOBAR f3[] = {FOO_ONE}; ++ ], ++ libreplace_cv_immediate_structures=yes, ++ libreplace_cv_immediate_structures=no, ++ libreplace_cv_immediate_structures=cross) ++]) ++if test x"$libreplace_cv_immediate_structures" = x"yes"; then ++ AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures]) ++fi ++ ++AC__LIBREPLACE_ONLY_CC_CHECKS_END ++]) dnl end AC_LIBREPLACE_CC_CHECKS +diff --git a/lib/replace/libreplace_ld.m4 b/lib/replace/libreplace_ld.m4 +new file mode 100644 +index 0000000..bf0df61 +--- /dev/null ++++ b/lib/replace/libreplace_ld.m4 +@@ -0,0 +1,337 @@ ++# ++# This offers a nice overview how to build shared libraries on all platforms ++# http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html ++# ++ ++AC_DEFUN([AC_LIBREPLACE_STLD], ++[ ++ AC_PATH_PROG(PROG_AR, ar) ++ ++ STLD=${PROG_AR} ++ ++ AC_SUBST(STLD) ++]) ++ ++AC_DEFUN([AC_LIBREPLACE_STLD_FLAGS], ++[ ++ STLD_FLAGS="-rcs" ++ AC_SUBST(STLD_FLAGS) ++]) ++ ++AC_DEFUN([AC_LD_EXPORT_DYNAMIC], ++[ ++saved_LDFLAGS="$LDFLAGS" ++if AC_TRY_COMMAND([${CC-cc} $CFLAGS -Wl,--version 2>&1 | grep "GNU ld" >/dev/null]); then ++ LD_EXPORT_DYNAMIC="-Wl,-export-dynamic" ++else ++ case "$host_os" in ++ hpux* ) ++ LD_EXPORT_DYNAMIC="-Wl,-E" ++ ;; ++ *) ++ LD_EXPORT_DYNAMIC="" ++ ;; ++ esac ++fi ++AC_SUBST(LD_EXPORT_DYNAMIC) ++LDFLAGS="$saved_LDFLAGS" ++]) ++ ++AC_DEFUN([AC_LD_PICFLAG], ++[ ++case "$host_os" in ++ *linux*|*gnu*) ++ PICFLAG="-fPIC" ++ ;; ++ *solaris*) ++ if test "${GCC}" = "yes"; then ++ PICFLAG="-fPIC" ++ else ++ PICFLAG="-KPIC" ++ fi ++ ;; ++ *sunos*) ++ PICFLAG="-KPIC" # Is this correct for SunOS ++ ;; ++ *netbsd* | *freebsd* | *dragonfly* ) ++ PICFLAG="-fPIC -DPIC" ++ ;; ++ *openbsd*) ++ PICFLAG="-fPIC" ++ ;; ++ *irix*) ++ if test "${GCC}" = "yes"; then ++ PICFLAG="-fPIC" ++ else ++ PICFLAG="-KPIC" ++ fi ++ ;; ++ *aix*) ++ # as AIX code is always position independent... ++ PICFLAG="-O2" ++ ;; ++ *hpux*) ++ if test "${GCC}" = "yes"; then ++ PICFLAG="-fPIC" ++ elif test "$host_cpu" = "ia64"; then ++ PICFLAG="+z" ++ elif test $ac_cv_prog_cc_Ae = yes; then ++ PICFLAG="+z +ESnolit" ++ fi ++ ;; ++ *osf*) ++ PICFLAG="-fPIC" ++ ;; ++ *unixware*) ++ PICFLAG="-KPIC" ++ ;; ++ *darwin*) ++ PICFLAG="-fno-common" ++ ;; ++esac ++AC_SUBST(PICFLAG) ++]) ++ ++AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_LINKER], ++[ ++ LD_SHLIB_LINKER="${CC}" ++ ++ case "$host_os" in ++ *irix*) ++ LD_SHLIB_LINKER="${PROG_LD}" ++ ;; ++ esac ++ ++ AC_SUBST(LD_SHLIB_LINKER) ++]) ++ ++AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_FLAGS], ++[ ++ LD_SHLIB_FLAGS="-shared" ++ ++ case "$host_os" in ++ *linux*|*gnu*) ++ LD_SHLIB_FLAGS="-shared -Wl,-Bsymbolic" ++ ;; ++ *solaris*) ++ LD_SHLIB_FLAGS="-G" ++ if test "${GCC}" = "no"; then ++ ## ${CFLAGS} added for building 64-bit shared ++ ## libs using Sun's Compiler ++ LD_SHLIB_FLAGS="-G \${CFLAGS}" ++ fi ++ ;; ++ *sunos*) ++ LD_SHLIB_FLAGS="-G" ++ ;; ++ *irix*) ++ LD_SHLIB_FLAGS="-shared" ++ ;; ++ *aix*) ++ LD_SHLIB_FLAGS="-Wl,-G,-bexpall,-bbigtoc" ++ ;; ++ *hpux*) ++ if test "${GCC}" = "yes"; then ++ LD_SHLIB_FLAGS="-shared" ++ else ++ LD_SHLIB_FLAGS="-b" ++ fi ++ ;; ++ *osf*) ++ LD_SHLIB_FLAGS="-shared" ++ ;; ++ *darwin*) ++ LD_SHLIB_FLAGS="-dynamiclib -Wl,-search_paths_first" ++ ;; ++ esac ++ ++ AC_SUBST(LD_SHLIB_FLAGS) ++]) ++ ++AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_DISALLOW_UNDEF_FLAG], ++[ ++ LD_SHLIB_DISALLOW_UNDEF_FLAG="" ++ ++ # ++ # TODO: enforce error not only warnings ++ # ++ # NOTE: -Wl,--no-allow-shlib-undefined isn't what we want... ++ # as it bails out on broken system libraries ++ # ++ case "$host_os" in ++ *osf*) ++ LD_SHLIB_DISALLOW_UNDEF_FLAG="-warning_unresolved" ++ ;; ++ *darwin*) ++ LD_SHLIB_DISALLOW_UNDEF_FLAG="-undefined error" ++ ;; ++ esac ++ ++ AC_SUBST(LD_SHLIB_DISALLOW_UNDEF_FLAG) ++]) ++ ++AC_DEFUN([AC_LIBREPLACE_SHLD], ++[ ++ AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_LINKER]) ++ SHLD="$LD_SHLIB_LINKER" ++ AC_SUBST(SHLD) ++]) ++ ++AC_DEFUN([AC_LIBREPLACE_SHLD_FLAGS], ++[ ++ AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_FLAGS]) ++ AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_DISALLOW_UNDEF_FLAG]) ++ SHLD_FLAGS="$LD_SHLIB_FLAGS $LD_SHLIB_DISALLOW_UNDEF_FLAG" ++ AC_SUBST(SHLD_FLAGS) ++]) ++ ++AC_DEFUN([AC_LD_SHLIBEXT], ++[ ++ SHLIBEXT="so" ++ case "$host_os" in ++ *hpux*) ++ if test "$host_cpu" = "ia64"; then ++ SHLIBEXT="so" ++ else ++ SHLIBEXT="sl" ++ fi ++ ;; ++ *darwin*) ++ SHLIBEXT="dylib" ++ ;; ++ esac ++ AC_SUBST(SHLIBEXT) ++]) ++ ++AC_DEFUN([AC_LD_SONAMEFLAG], ++[ ++ AC_SUBST(SONAMEFLAG) ++ SONAMEFLAG="" ++ case "$host_os" in ++ *linux*|*gnu*|*qnx*) ++ SONAMEFLAG="-Wl,-soname=" ++ ;; ++ *solaris*) ++ SONAMEFLAG="-h " ++ if test "${GCC}" = "yes"; then ++ SONAMEFLAG="-Wl,-soname=" ++ fi ++ ;; ++ *sunos*) ++ SONAMEFLAG="-Wl,-h," ++ ;; ++ *netbsd* | *freebsd* | *dragonfly* ) ++ SONAMEFLAG="-Wl,-soname," ++ ;; ++ *openbsd*) ++ SONAMEFLAG="-Wl,-soname," ++ ;; ++ *irix*) ++ SONAMEFLAG="-Wl,-soname," ++ ;; ++ *hpux*) ++ SONAMEFLAG="-Wl,+h," ++ ;; ++ *osf*) ++ SONAMEFLAG="-Wl,-soname," ++ ;; ++ *unixware*) ++ SONAMEFLAG="-Wl,-soname," ++ ;; ++ *darwin*) ++ SONAMEFLAG="#" ++ ;; ++ *aix*) ++ # Not supported ++ SONAMEFLAG="#" ++ ;; ++ esac ++]) ++ ++AC_DEFUN([AC_LD_VERSIONSCRIPT], ++[ ++ AC_SUBST(VERSIONSCRIPT) ++ VERSIONSCRIPT="" ++ case "$host_os" in ++ *linux*|*gnu*) ++ VERSIONSCRIPT="-Wl,--version-script" ++ ;; ++ *solaris*) ++ if test "${GCC}" = "yes"; then ++ VERSIONSCRIPT="-Wl,--version-script" ++ fi ++ ;; ++ esac ++]) ++ ++AC_DEFUN([AC_LIBREPLACE_MDLD], ++[ ++ AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_LINKER]) ++ MDLD="$LD_SHLIB_LINKER" ++ AC_SUBST(MDLD) ++]) ++ ++AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG], ++[ ++ LD_ALLOW_SHLIB_UNDEF_FLAG="" ++ ++ case "$host_os" in ++ *linux*|*gnu*) ++ LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,--allow-shlib-undefined" ++ ;; ++ *osf*) ++ LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,-expect_unresolved,\"*\"" ++ ;; ++ *darwin*) ++ LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined dynamic_lookup" ++ ;; ++ *aix*) ++ LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,-bnoentry" ++ ;; ++ esac ++ ++ AC_SUBST(LD_SHLIB_ALLOW_UNDEF_FLAG) ++]) ++ ++AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS], ++[ ++ AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_FLAGS]) ++ AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG]) ++ MDLD_FLAGS="$LD_SHLIB_FLAGS $LD_SHLIB_ALLOW_UNDEF_FLAG" ++ AC_SUBST(MDLD_FLAGS) ++]) ++ ++AC_DEFUN([AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR], ++[ ++ case "$host_os" in ++ *linux*|*gnu*) ++ LIB_PATH_VAR=LD_LIBRARY_PATH ++ ;; ++ *bsd*) ++ LIB_PATH_VAR=LD_LIBRARY_PATH ++ ;; ++ *solaris*) ++ LIB_PATH_VAR=LD_LIBRARY_PATH ++ ;; ++ *hpux*) ++ LIB_PATH_VAR=SHLIB_PATH ++ ;; ++ *osf*) ++ LIB_PATH_VAR=LD_LIBRARY_PATH ++ ;; ++ *aix*) ++ LIB_PATH_VAR=LIBPATH ++ ;; ++ *irix*) ++ LIB_PATH_VAR=LD_LIBRARY_PATH ++ ;; ++ *darwin*) ++ LIB_PATH_VAR=DYLD_LIBRARY_PATH ++ ;; ++ *) ++ LIB_PATH_VAR=LD_LIBRARY_PATH ++ ;; ++ esac ++ ++ AC_SUBST(LIB_PATH_VAR) ++]) +diff --git a/lib/replace/libreplace_macros.m4 b/lib/replace/libreplace_macros.m4 +new file mode 100644 +index 0000000..f3753c4 +--- /dev/null ++++ b/lib/replace/libreplace_macros.m4 +@@ -0,0 +1,347 @@ ++# ++# This is a collection of useful autoconf macros ++# ++ ++############################################ ++# Check if the compiler handles c99 struct initialization, and if not try -AC99 and -c99 flags ++# Usage: LIBREPLACE_C99_STRUCT_INIT(success-action,failure-action) ++# changes CFLAGS to add -AC99 or -c99 if needed ++AC_DEFUN([LIBREPLACE_C99_STRUCT_INIT], ++[ ++saved_CFLAGS="$CFLAGS"; ++c99_init=no ++if test x"$c99_init" = x"no"; then ++ AC_MSG_CHECKING(for C99 designated initializers) ++ CFLAGS="$saved_CFLAGS"; ++ AC_TRY_COMPILE([#include <stdio.h>], ++ [ struct foo {int x;char y;}; ++ struct foo bar = { .y = 'X', .x = 1 }; ++ ], ++ [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)]) ++fi ++if test x"$c99_init" = x"no"; then ++ AC_MSG_CHECKING(for C99 designated initializers with -AC99) ++ CFLAGS="$saved_CFLAGS -AC99"; ++ AC_TRY_COMPILE([#include <stdio.h>], ++ [ struct foo {int x;char y;}; ++ struct foo bar = { .y = 'X', .x = 1 }; ++ ], ++ [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)]) ++fi ++if test x"$c99_init" = x"no"; then ++ AC_MSG_CHECKING(for C99 designated initializers with -qlanglvl=extc99) ++ CFLAGS="$saved_CFLAGS -qlanglvl=extc99"; ++ AC_TRY_COMPILE([#include <stdio.h>], ++ [ struct foo {int x;char y;}; ++ struct foo bar = { .y = 'X', .x = 1 }; ++ ], ++ [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)]) ++fi ++if test x"$c99_init" = x"no"; then ++ AC_MSG_CHECKING(for C99 designated initializers with -qlanglvl=stdc99) ++ CFLAGS="$saved_CFLAGS -qlanglvl=stdc99"; ++ AC_TRY_COMPILE([#include <stdio.h>], ++ [ struct foo {int x;char y;}; ++ struct foo bar = { .y = 'X', .x = 1 }; ++ ], ++ [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)]) ++fi ++if test x"$c99_init" = x"no"; then ++ AC_MSG_CHECKING(for C99 designated initializers with -c99) ++ CFLAGS="$saved_CFLAGS -c99" ++ AC_TRY_COMPILE([#include <stdio.h>], ++ [ struct foo {int x;char y;}; ++ struct foo bar = { .y = 'X', .x = 1 }; ++ ], ++ [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)]) ++fi ++ ++if test "`uname`" = "HP-UX"; then ++ if test "$ac_cv_c_compiler_gnu" = no; then ++ # special override for broken HP-UX compiler - I can't find a way to test ++ # this properly (its a compiler bug) ++ CFLAGS="$CFLAGS -AC99"; ++ c99_init=yes; ++ fi ++fi ++ ++if test x"$c99_init" = x"yes"; then ++ saved_CFLAGS="" ++ $1 ++else ++ CFLAGS="$saved_CFLAGS" ++ saved_CFLAGS="" ++ $2 ++fi ++]) ++ ++dnl AC_PROG_CC_FLAG(flag) ++AC_DEFUN(AC_PROG_CC_FLAG, ++[AC_CACHE_CHECK(whether ${CC-cc} accepts -$1, ac_cv_prog_cc_$1, ++[echo 'void f(){}' > conftest.c ++if test -z "`${CC-cc} -$1 -c conftest.c 2>&1`"; then ++ ac_cv_prog_cc_$1=yes ++else ++ ac_cv_prog_cc_$1=no ++fi ++rm -f conftest* ++])]) ++ ++dnl see if a declaration exists for a function or variable ++dnl defines HAVE_function_DECL if it exists ++dnl AC_HAVE_DECL(var, includes) ++AC_DEFUN(AC_HAVE_DECL, ++[ ++ AC_CACHE_CHECK([for $1 declaration],ac_cv_have_$1_decl,[ ++ AC_TRY_COMPILE([$2],[int i = (int)$1], ++ ac_cv_have_$1_decl=yes,ac_cv_have_$1_decl=no)]) ++ if test x"$ac_cv_have_$1_decl" = x"yes"; then ++ AC_DEFINE([HAVE_]translit([$1], [a-z], [A-Z])[_DECL],1,[Whether $1() is available]) ++ fi ++]) ++ ++ ++# AC_CHECK_LIB_EXT(LIBRARY, [EXT_LIBS], [FUNCTION], ++# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], ++# [ADD-ACTION-IF-FOUND],[OTHER-LIBRARIES]) ++# ------------------------------------------------------ ++# ++# Use a cache variable name containing both the library and function name, ++# because the test really is for library $1 defining function $3, not ++# just for library $1. Separate tests with the same $1 and different $3s ++# may have different results. ++# ++# Note that using directly AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$3]) ++# is asking for trouble, since AC_CHECK_LIB($lib, fun) would give ++# ac_cv_lib_$lib_fun, which is definitely not what was meant. Hence ++# the AS_LITERAL_IF indirection. ++# ++# FIXME: This macro is extremely suspicious. It DEFINEs unconditionally, ++# whatever the FUNCTION, in addition to not being a *S macro. Note ++# that the cache does depend upon the function we are looking for. ++# ++# It is on purpose we used `ac_check_lib_ext_save_LIBS' and not just ++# `ac_save_LIBS': there are many macros which don't want to see `LIBS' ++# changed but still want to use AC_CHECK_LIB_EXT, so they save `LIBS'. ++# And ``ac_save_LIBS' is too tempting a name, so let's leave them some ++# freedom. ++AC_DEFUN([AC_CHECK_LIB_EXT], ++[ ++AH_CHECK_LIB_EXT([$1]) ++ac_check_lib_ext_save_LIBS=$LIBS ++LIBS="-l$1 $$2 $7 $LIBS" ++AS_LITERAL_IF([$1], ++ [AS_VAR_PUSHDEF([ac_Lib_ext], [ac_cv_lib_ext_$1])], ++ [AS_VAR_PUSHDEF([ac_Lib_ext], [ac_cv_lib_ext_$1''])])dnl ++ ++m4_ifval([$3], ++ [ ++ AH_CHECK_FUNC_EXT([$3]) ++ AS_LITERAL_IF([$1], ++ [AS_VAR_PUSHDEF([ac_Lib_func], [ac_cv_lib_ext_$1_$3])], ++ [AS_VAR_PUSHDEF([ac_Lib_func], [ac_cv_lib_ext_$1''_$3])])dnl ++ AC_CACHE_CHECK([for $3 in -l$1], ac_Lib_func, ++ [AC_TRY_LINK_FUNC($3, ++ [AS_VAR_SET(ac_Lib_func, yes); ++ AS_VAR_SET(ac_Lib_ext, yes)], ++ [AS_VAR_SET(ac_Lib_func, no); ++ AS_VAR_SET(ac_Lib_ext, no)]) ++ ]) ++ AS_IF([test AS_VAR_GET(ac_Lib_func) = yes], ++ [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$3))])dnl ++ AS_VAR_POPDEF([ac_Lib_func])dnl ++ ],[ ++ AC_CACHE_CHECK([for -l$1], ac_Lib_ext, ++ [AC_TRY_LINK_FUNC([main], ++ [AS_VAR_SET(ac_Lib_ext, yes)], ++ [AS_VAR_SET(ac_Lib_ext, no)]) ++ ]) ++ ]) ++LIBS=$ac_check_lib_ext_save_LIBS ++ ++AS_IF([test AS_VAR_GET(ac_Lib_ext) = yes], ++ [m4_default([$4], ++ [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1)) ++ case "$$2" in ++ *-l$1*) ++ ;; ++ *) ++ $2="-l$1 $$2" ++ ;; ++ esac]) ++ [$6] ++ ], ++ [$5])dnl ++AS_VAR_POPDEF([ac_Lib_ext])dnl ++])# AC_CHECK_LIB_EXT ++ ++# AH_CHECK_LIB_EXT(LIBNAME) ++# --------------------- ++m4_define([AH_CHECK_LIB_EXT], ++[AH_TEMPLATE(AS_TR_CPP(HAVE_LIB$1), ++ [Define to 1 if you have the `]$1[' library (-l]$1[).])]) ++ ++dnl AC_SEARCH_LIBS_EXT(FUNCTION, SEARCH-LIBS, EXT_LIBS, ++dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], ++dnl [OTHER-LIBRARIES]) ++dnl -------------------------------------------------------- ++dnl Search for a library defining FUNC, if it's not already available. ++AC_DEFUN([AC_SEARCH_LIBS_EXT], ++[AC_CACHE_CHECK([for library containing $1], [ac_cv_search_ext_$1], ++[ ++ac_func_search_ext_save_LIBS=$LIBS ++ac_cv_search_ext_$1=no ++AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], ++ [ac_cv_search_ext_$1="none required"]) ++if test "$ac_cv_search_ext_$1" = no; then ++ for ac_lib in $2; do ++ LIBS="-l$ac_lib $$3 $6 $ac_func_search_save_ext_LIBS" ++ AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], ++ [ac_cv_search_ext_$1="-l$ac_lib" ++break]) ++ done ++fi ++LIBS=$ac_func_search_ext_save_LIBS]) ++AS_IF([test "$ac_cv_search_ext_$1" != no], ++ [test "$ac_cv_search_ext_$1" = "none required" || $3="$ac_cv_search_ext_$1 $$3" ++ $4], ++ [$5])dnl ++]) ++ ++dnl check for a function in a $LIBS and $OTHER_LIBS libraries variable. ++dnl AC_CHECK_FUNC_EXT(func,OTHER_LIBS,IF-TRUE,IF-FALSE) ++AC_DEFUN([AC_CHECK_FUNC_EXT], ++[ ++ AH_CHECK_FUNC_EXT($1) ++ ac_check_func_ext_save_LIBS=$LIBS ++ LIBS="$2 $LIBS" ++ AS_VAR_PUSHDEF([ac_var], [ac_cv_func_ext_$1])dnl ++ AC_CACHE_CHECK([for $1], ac_var, ++ [AC_LINK_IFELSE([AC_LANG_FUNC_LINK_TRY([$1])], ++ [AS_VAR_SET(ac_var, yes)], ++ [AS_VAR_SET(ac_var, no)])]) ++ LIBS=$ac_check_func_ext_save_LIBS ++ AS_IF([test AS_VAR_GET(ac_var) = yes], ++ [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1])) $3], ++ [$4])dnl ++AS_VAR_POPDEF([ac_var])dnl ++])# AC_CHECK_FUNC ++ ++# AH_CHECK_FUNC_EXT(FUNCNAME) ++# --------------------- ++m4_define([AH_CHECK_FUNC_EXT], ++[AH_TEMPLATE(AS_TR_CPP(HAVE_$1), ++ [Define to 1 if you have the `]$1[' function.])]) ++ ++dnl Define an AC_DEFINE with ifndef guard. ++dnl AC_N_DEFINE(VARIABLE [, VALUE]) ++AC_DEFUN([AC_N_DEFINE], ++[ ++AH_VERBATIM([$1], [ ++#ifndef $1 ++# undef $1 ++#endif ++]) ++ ++ cat >>confdefs.h <<\EOF ++#ifndef $1 ++[#define] $1 m4_if($#, 1, 1, [$2]) ++#endif ++EOF ++]) ++ ++dnl Add an #include ++dnl AC_ADD_INCLUDE(VARIABLE) ++define(AC_ADD_INCLUDE, ++[cat >> confdefs.h <<\EOF ++[#include] $1 ++EOF ++]) ++ ++dnl remove an #include ++dnl AC_REMOVE_INCLUDE(VARIABLE) ++define(AC_REMOVE_INCLUDE, ++[ ++grep -v '[#include] $1' confdefs.h >confdefs.h.tmp ++cat confdefs.h.tmp > confdefs.h ++rm confdefs.h.tmp ++]) ++ ++dnl remove an #define ++dnl AC_REMOVE_DEFINE(VARIABLE) ++define(AC_REMOVE_DEFINE, ++[ ++grep -v '[#define] $1 ' confdefs.h |grep -v '[#define] $1[$]'>confdefs.h.tmp ++cat confdefs.h.tmp > confdefs.h ++rm confdefs.h.tmp ++]) ++ ++dnl AS_HELP_STRING is not available in autoconf 2.57, and AC_HELP_STRING is deprecated ++dnl in autoconf 2.59, so define AS_HELP_STRING to be AC_HELP_STRING unless it is already ++dnl defined. ++m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))]) ++ ++dnl check if the prototype in the header matches the given one ++dnl AC_VERIFY_C_PROTOTYPE(prototype,functionbody,[IF-TRUE].[IF-FALSE],[extraheaders]) ++AC_DEFUN(AC_VERIFY_C_PROTOTYPE, ++[AC_CACHE_CHECK([for prototype $1], AS_TR_SH([ac_cv_c_prototype_$1]), ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ++ AC_INCLUDES_DEFAULT ++ $5 ++ $1 ++ { ++ $2 ++ } ++ ])],[ ++ eval AS_TR_SH([ac_cv_c_prototype_$1])=yes ++ ],[ ++ eval AS_TR_SH([ac_cv_c_prototype_$1])=no ++ ]) ++) ++AS_IF([eval test $AS_TR_SH([ac_cv_c_prototype_$1]) = yes],[$3],[$4]) ++]) ++ ++AC_DEFUN(LIBREPLACE_PROVIDE_HEADER, ++[AC_CHECK_HEADER([$1], ++ [ AC_CONFIG_COMMANDS(rm-$1, [rm -f $libreplacedir/$1], [libreplacedir=$libreplacedir]) ], ++ [ AC_CONFIG_COMMANDS(mk-$1, [echo "#include \"replace.h\"" > $libreplacedir/$1], [libreplacedir=$libreplacedir]) ] ++ ) ++]) ++ ++dnl AC_HAVE_TYPE(TYPE,INCLUDES) ++AC_DEFUN([AC_HAVE_TYPE], [ ++AC_REQUIRE([AC_HEADER_STDC]) ++cv=`echo "$1" | sed 'y%./+- %__p__%'` ++AC_MSG_CHECKING(for $1) ++AC_CACHE_VAL([ac_cv_type_$cv], ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++AC_INCLUDES_DEFAULT ++$2]], ++[[$1 foo;]])], ++[eval "ac_cv_type_$cv=yes"], ++[eval "ac_cv_type_$cv=no"]))dnl ++ac_foo=`eval echo \\$ac_cv_type_$cv` ++AC_MSG_RESULT($ac_foo) ++if test "$ac_foo" = yes; then ++ ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` ++if false; then ++ AC_CHECK_TYPES($1) ++fi ++ AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1']) ++fi ++]) ++ ++# AC_CHECK_VALUEOF(TYPE, [INCLUDES = DEFAULT-INCLUDES]) ++# --------------------------------------------------------------- ++AC_DEFUN([AC_CHECK_VALUEOF], ++[AS_LITERAL_IF(m4_translit([[$1]], [*], [p]), [], ++ [m4_fatal([$0: requires literal arguments])])]dnl ++[ ++_AC_CACHE_CHECK_INT([value of $1], [AS_TR_SH([ac_cv_valueof_$1])], ++ [(long int) ($1)], ++ [AC_INCLUDES_DEFAULT([$2])], ++ []) ++ ++AC_DEFINE_UNQUOTED(AS_TR_CPP(valueof_$1), $AS_TR_SH([ac_cv_valueof_$1]), ++ [The value of `$1'.]) ++])# AC_CHECK_VALUEOF +diff --git a/lib/replace/libreplace_network.m4 b/lib/replace/libreplace_network.m4 +new file mode 100644 +index 0000000..bb2a843 +--- /dev/null ++++ b/lib/replace/libreplace_network.m4 +@@ -0,0 +1,503 @@ ++AC_DEFUN_ONCE(AC_LIBREPLACE_NETWORK_CHECKS, ++[ ++echo "LIBREPLACE_NETWORK_CHECKS: START" ++ ++AC_DEFINE(LIBREPLACE_NETWORK_CHECKS, 1, [LIBREPLACE_NETWORK_CHECKS were used]) ++LIBREPLACE_NETWORK_OBJS="" ++LIBREPLACE_NETWORK_LIBS="" ++ ++AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h) ++AC_CHECK_HEADERS(netinet/in_systm.h) ++AC_CHECK_HEADERS([netinet/ip.h], [], [],[ ++ #include <sys/types.h> ++ #ifdef HAVE_NETINET_IN_H ++ #include <netinet/in.h> ++ #endif ++ #ifdef HAVE_NETINET_IN_SYSTM_H ++ #include <netinet/in_systm.h> ++ #endif ++]) ++AC_CHECK_HEADERS(netinet/tcp.h netinet/in_ip.h) ++AC_CHECK_HEADERS(sys/sockio.h sys/un.h) ++AC_CHECK_HEADERS(sys/uio.h) ++ ++dnl we need to check that net/if.h really can be used, to cope with hpux ++dnl where including it always fails ++AC_CACHE_CHECK([for usable net/if.h],libreplace_cv_USABLE_NET_IF_H,[ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ++ AC_INCLUDES_DEFAULT ++ #if HAVE_SYS_SOCKET_H ++ # include <sys/socket.h> ++ #endif ++ #include <net/if.h> ++ int main(void) {return 0;}])], ++ [libreplace_cv_USABLE_NET_IF_H=yes], ++ [libreplace_cv_USABLE_NET_IF_H=no] ++ ) ++]) ++if test x"$libreplace_cv_USABLE_NET_IF_H" = x"yes";then ++ AC_DEFINE(HAVE_NET_IF_H, 1, usability of net/if.h) ++fi ++ ++AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>]) ++AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>]) ++AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>]) ++AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>]) ++AC_HAVE_TYPE([struct sockaddr_storage], [ ++#include <sys/socket.h> ++#include <sys/types.h> ++#include <netinet/in.h> ++]) ++AC_HAVE_TYPE([struct sockaddr_in6], [ ++#include <sys/socket.h> ++#include <sys/types.h> ++#include <netinet/in.h> ++]) ++ ++if test x"$ac_cv_type_struct_sockaddr_storage" = x"yes"; then ++AC_CHECK_MEMBER(struct sockaddr_storage.ss_family, ++ AC_DEFINE(HAVE_SS_FAMILY, 1, [Defined if struct sockaddr_storage has ss_family field]),, ++ [ ++#include <sys/socket.h> ++#include <sys/types.h> ++#include <netinet/in.h> ++ ]) ++ ++if test x"$ac_cv_member_struct_sockaddr_storage_ss_family" != x"yes"; then ++AC_CHECK_MEMBER(struct sockaddr_storage.__ss_family, ++ AC_DEFINE(HAVE___SS_FAMILY, 1, [Defined if struct sockaddr_storage has __ss_family field]),, ++ [ ++#include <sys/socket.h> ++#include <sys/types.h> ++#include <netinet/in.h> ++ ]) ++fi ++fi ++ ++AC_CACHE_CHECK([for sin_len in sock],libreplace_cv_HAVE_SOCK_SIN_LEN,[ ++ AC_TRY_COMPILE( ++ [ ++#include <sys/types.h> ++#include <sys/socket.h> ++#include <netinet/in.h> ++ ],[ ++struct sockaddr_in sock; sock.sin_len = sizeof(sock); ++ ],[ ++ libreplace_cv_HAVE_SOCK_SIN_LEN=yes ++ ],[ ++ libreplace_cv_HAVE_SOCK_SIN_LEN=no ++ ]) ++]) ++if test x"$libreplace_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then ++ AC_DEFINE(HAVE_SOCK_SIN_LEN,1,[Whether the sockaddr_in struct has a sin_len property]) ++fi ++ ++############################################ ++# check for unix domain sockets ++AC_CACHE_CHECK([for unix domain sockets],libreplace_cv_HAVE_UNIXSOCKET,[ ++ AC_TRY_COMPILE([ ++#include <sys/types.h> ++#include <stdlib.h> ++#include <stddef.h> ++#include <sys/socket.h> ++#include <sys/un.h> ++ ],[ ++struct sockaddr_un sunaddr; ++sunaddr.sun_family = AF_UNIX; ++ ],[ ++ libreplace_cv_HAVE_UNIXSOCKET=yes ++ ],[ ++ libreplace_cv_HAVE_UNIXSOCKET=no ++ ]) ++]) ++if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"yes"; then ++ AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixscoket support]) ++fi ++ ++dnl The following test is roughly taken from the cvs sources. ++dnl ++dnl If we can't find connect, try looking in -lsocket, -lnsl, and -linet. ++dnl The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has ++dnl libsocket.so which has a bad implementation of gethostbyname (it ++dnl only looks in /etc/hosts), so we only look for -lsocket if we need ++dnl it. ++AC_CHECK_FUNCS(connect) ++if test x"$ac_cv_func_connect" = x"no"; then ++ AC_CHECK_LIB_EXT(nsl_s, LIBREPLACE_NETWORK_LIBS, connect) ++ AC_CHECK_LIB_EXT(nsl, LIBREPLACE_NETWORK_LIBS, connect) ++ AC_CHECK_LIB_EXT(socket, LIBREPLACE_NETWORK_LIBS, connect) ++ AC_CHECK_LIB_EXT(inet, LIBREPLACE_NETWORK_LIBS, connect) ++ dnl We can't just call AC_CHECK_FUNCS(connect) here, ++ dnl because the value has been cached. ++ if test x"$ac_cv_lib_ext_nsl_s_connect" = x"yes" || ++ test x"$ac_cv_lib_ext_nsl_connect" = x"yes" || ++ test x"$ac_cv_lib_ext_socket_connect" = x"yes" || ++ test x"$ac_cv_lib_ext_inet_connect" = x"yes" ++ then ++ AC_DEFINE(HAVE_CONNECT,1,[Whether the system has connect()]) ++ fi ++fi ++ ++AC_CHECK_FUNCS(gethostbyname) ++if test x"$ac_cv_func_gethostbyname" = x"no"; then ++ AC_CHECK_LIB_EXT(nsl_s, LIBREPLACE_NETWORK_LIBS, gethostbyname) ++ AC_CHECK_LIB_EXT(nsl, LIBREPLACE_NETWORK_LIBS, gethostbyname) ++ AC_CHECK_LIB_EXT(socket, LIBREPLACE_NETWORK_LIBS, gethostbyname) ++ dnl We can't just call AC_CHECK_FUNCS(gethostbyname) here, ++ dnl because the value has been cached. ++ if test x"$ac_cv_lib_ext_nsl_s_gethostbyname" = x"yes" || ++ test x"$ac_cv_lib_ext_nsl_gethostbyname" = x"yes" || ++ test x"$ac_cv_lib_ext_socket_gethostbyname" = x"yes" ++ then ++ AC_DEFINE(HAVE_GETHOSTBYNAME,1, ++ [Whether the system has gethostbyname()]) ++ fi ++fi ++ ++dnl HP-UX has if_nametoindex in -lipv6 ++AC_CHECK_FUNCS(if_nametoindex) ++if test x"$ac_cv_func_if_nametoindex" = x"no"; then ++ AC_CHECK_LIB_EXT(ipv6, LIBREPLACE_NETWORK_LIBS, if_nametoindex) ++ dnl We can't just call AC_CHECK_FUNCS(if_nametoindex) here, ++ dnl because the value has been cached. ++ if test x"$ac_cv_lib_ext_ipv6_if_nametoindex" = x"yes" ++ then ++ AC_DEFINE(HAVE_IF_NAMETOINDEX, 1, ++ [Whether the system has if_nametoindex()]) ++ fi ++fi ++ ++# The following tests need LIBS="${LIBREPLACE_NETWORK_LIBS}" ++old_LIBS=$LIBS ++LIBS="${LIBREPLACE_NETWORK_LIBS}" ++libreplace_SAVE_CPPFLAGS="$CPPFLAGS" ++CPPFLAGS="$CPPFLAGS -I$libreplacedir" ++ ++AC_CHECK_FUNCS(socketpair,[],[LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/socketpair.o"]) ++ ++AC_CACHE_CHECK([for broken inet_ntoa],libreplace_cv_REPLACE_INET_NTOA,[ ++AC_TRY_RUN([ ++#include <stdio.h> ++#include <unistd.h> ++#include <sys/types.h> ++#include <netinet/in.h> ++#ifdef HAVE_ARPA_INET_H ++#include <arpa/inet.h> ++#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); } ++exit(1);}], ++ libreplace_cv_REPLACE_INET_NTOA=yes,libreplace_cv_REPLACE_INET_NTOA=no,libreplace_cv_REPLACE_INET_NTOA=cross)]) ++ ++AC_CHECK_FUNCS(inet_ntoa,[],[libreplace_cv_REPLACE_INET_NTOA=yes]) ++if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then ++ AC_DEFINE(REPLACE_INET_NTOA,1,[Whether inet_ntoa should be replaced]) ++ LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_ntoa.o" ++fi ++ ++AC_CHECK_FUNCS(inet_aton,[],[LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_aton.o"]) ++ ++AC_CHECK_FUNCS(inet_ntop,[],[LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_ntop.o"]) ++ ++AC_CHECK_FUNCS(inet_pton,[],[LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_pton.o"]) ++ ++dnl test for getaddrinfo/getnameinfo ++AC_CACHE_CHECK([for getaddrinfo],libreplace_cv_HAVE_GETADDRINFO,[ ++AC_TRY_LINK([ ++#include <sys/types.h> ++#if STDC_HEADERS ++#include <stdlib.h> ++#include <stddef.h> ++#endif ++#include <sys/socket.h> ++#include <netdb.h>], ++[ ++struct sockaddr sa; ++struct addrinfo *ai = NULL; ++int ret = getaddrinfo(NULL, NULL, NULL, &ai); ++if (ret != 0) { ++ const char *es = gai_strerror(ret); ++} ++freeaddrinfo(ai); ++ret = getnameinfo(&sa, sizeof(sa), ++ NULL, 0, ++ NULL, 0, 0); ++ ++], ++libreplace_cv_HAVE_GETADDRINFO=yes,libreplace_cv_HAVE_GETADDRINFO=no)]) ++ ++if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then ++ # getaddrinfo is broken on some AIX systems ++ # see bug 5910, use our replacements if we detect ++ # a broken system. ++ AC_TRY_RUN([ ++ #include <stddef.h> ++ #include <sys/types.h> ++ #include <sys/socket.h> ++ #include <netdb.h> ++ int main(int argc, const char *argv[]) ++ { ++ struct addrinfo hints = {0,}; ++ struct addrinfo *ppres; ++ const char hostname1[] = "0.0.0.0"; ++ const char hostname2[] = "127.0.0.1"; ++ const char hostname3[] = "::"; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_family = AF_UNSPEC; ++ hints.ai_flags = ++ AI_NUMERICHOST|AI_PASSIVE|AI_ADDRCONFIG; ++ /* Test for broken flag combination on AIX. */ ++ if (getaddrinfo(hostname1, NULL, &hints, &ppres) == EAI_BADFLAGS) { ++ /* This fails on an IPv6-only box, but not with ++ the EAI_BADFLAGS error. */ ++ return 1; ++ } ++ if (getaddrinfo(hostname2, NULL, &hints, &ppres) == 0) { ++ /* IPv4 lookup works - good enough. */ ++ return 0; ++ } ++ /* Uh-oh, no IPv4. Are we IPv6-only ? */ ++ return getaddrinfo(hostname3, NULL, &hints, &ppres) != 0 ? 1 : 0; ++ }], ++ libreplace_cv_HAVE_GETADDRINFO=yes, ++ libreplace_cv_HAVE_GETADDRINFO=no) ++fi ++ ++if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then ++ AC_DEFINE(HAVE_GETADDRINFO,1,[Whether the system has getaddrinfo]) ++ AC_DEFINE(HAVE_GETNAMEINFO,1,[Whether the system has getnameinfo]) ++ AC_DEFINE(HAVE_FREEADDRINFO,1,[Whether the system has freeaddrinfo]) ++ AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether the system has gai_strerror]) ++else ++ LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/getaddrinfo.o" ++fi ++ ++AC_CHECK_HEADERS([ifaddrs.h]) ++ ++dnl Used when getifaddrs is not available ++AC_CHECK_MEMBERS([struct sockaddr.sa_len], ++ [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has a sa_len member])], ++ [], ++ [#include <sys/socket.h>]) ++ ++dnl test for getifaddrs and freeifaddrs ++AC_CACHE_CHECK([for getifaddrs and freeifaddrs],libreplace_cv_HAVE_GETIFADDRS,[ ++AC_TRY_LINK([ ++#include <sys/types.h> ++#if STDC_HEADERS ++#include <stdlib.h> ++#include <stddef.h> ++#endif ++#include <sys/socket.h> ++#include <netinet/in.h> ++#include <arpa/inet.h> ++#include <ifaddrs.h> ++#include <netdb.h>], ++[ ++struct ifaddrs *ifp = NULL; ++int ret = getifaddrs (&ifp); ++freeifaddrs(ifp); ++], ++libreplace_cv_HAVE_GETIFADDRS=yes,libreplace_cv_HAVE_GETIFADDRS=no)]) ++if test x"$libreplace_cv_HAVE_GETIFADDRS" = x"yes"; then ++ AC_DEFINE(HAVE_GETIFADDRS,1,[Whether the system has getifaddrs]) ++ AC_DEFINE(HAVE_FREEIFADDRS,1,[Whether the system has freeifaddrs]) ++ AC_DEFINE(HAVE_STRUCT_IFADDRS,1,[Whether struct ifaddrs is available]) ++fi ++ ++################## ++# look for a method of finding the list of network interfaces ++iface=no; ++AC_CACHE_CHECK([for iface getifaddrs],libreplace_cv_HAVE_IFACE_GETIFADDRS,[ ++AC_TRY_RUN([ ++#define HAVE_IFACE_GETIFADDRS 1 ++#define NO_CONFIG_H 1 ++#define AUTOCONF_TEST 1 ++#define SOCKET_WRAPPER_NOT_REPLACE ++#include "$libreplacedir/replace.c" ++#include "$libreplacedir/inet_ntop.c" ++#include "$libreplacedir/snprintf.c" ++#include "$libreplacedir/getifaddrs.c" ++#define getifaddrs_test main ++#include "$libreplacedir/test/getifaddrs.c"], ++ libreplace_cv_HAVE_IFACE_GETIFADDRS=yes,libreplace_cv_HAVE_IFACE_GETIFADDRS=no,libreplace_cv_HAVE_IFACE_GETIFADDRS=cross)]) ++if test x"$libreplace_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then ++ iface=yes;AC_DEFINE(HAVE_IFACE_GETIFADDRS,1,[Whether iface getifaddrs is available]) ++else ++ LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/getifaddrs.o" ++fi ++ ++ ++if test $iface = no; then ++AC_CACHE_CHECK([for iface AIX],libreplace_cv_HAVE_IFACE_AIX,[ ++AC_TRY_RUN([ ++#define HAVE_IFACE_AIX 1 ++#define NO_CONFIG_H 1 ++#define AUTOCONF_TEST 1 ++#undef _XOPEN_SOURCE_EXTENDED ++#define SOCKET_WRAPPER_NOT_REPLACE ++#include "$libreplacedir/replace.c" ++#include "$libreplacedir/inet_ntop.c" ++#include "$libreplacedir/snprintf.c" ++#include "$libreplacedir/getifaddrs.c" ++#define getifaddrs_test main ++#include "$libreplacedir/test/getifaddrs.c"], ++ libreplace_cv_HAVE_IFACE_AIX=yes,libreplace_cv_HAVE_IFACE_AIX=no,libreplace_cv_HAVE_IFACE_AIX=cross)]) ++if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then ++ iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available]) ++fi ++fi ++ ++ ++if test $iface = no; then ++AC_CACHE_CHECK([for iface ifconf],libreplace_cv_HAVE_IFACE_IFCONF,[ ++AC_TRY_RUN([ ++#define HAVE_IFACE_IFCONF 1 ++#define NO_CONFIG_H 1 ++#define AUTOCONF_TEST 1 ++#define SOCKET_WRAPPER_NOT_REPLACE ++#include "$libreplacedir/replace.c" ++#include "$libreplacedir/inet_ntop.c" ++#include "$libreplacedir/snprintf.c" ++#include "$libreplacedir/getifaddrs.c" ++#define getifaddrs_test main ++#include "$libreplacedir/test/getifaddrs.c"], ++ libreplace_cv_HAVE_IFACE_IFCONF=yes,libreplace_cv_HAVE_IFACE_IFCONF=no,libreplace_cv_HAVE_IFACE_IFCONF=cross)]) ++if test x"$libreplace_cv_HAVE_IFACE_IFCONF" = x"yes"; then ++ iface=yes;AC_DEFINE(HAVE_IFACE_IFCONF,1,[Whether iface ifconf is available]) ++fi ++fi ++ ++if test $iface = no; then ++AC_CACHE_CHECK([for iface ifreq],libreplace_cv_HAVE_IFACE_IFREQ,[ ++AC_TRY_RUN([ ++#define HAVE_IFACE_IFREQ 1 ++#define NO_CONFIG_H 1 ++#define AUTOCONF_TEST 1 ++#define SOCKET_WRAPPER_NOT_REPLACE ++#include "$libreplacedir/replace.c" ++#include "$libreplacedir/inet_ntop.c" ++#include "$libreplacedir/snprintf.c" ++#include "$libreplacedir/getifaddrs.c" ++#define getifaddrs_test main ++#include "$libreplacedir/test/getifaddrs.c"], ++ libreplace_cv_HAVE_IFACE_IFREQ=yes,libreplace_cv_HAVE_IFACE_IFREQ=no,libreplace_cv_HAVE_IFACE_IFREQ=cross)]) ++if test x"$libreplace_cv_HAVE_IFACE_IFREQ" = x"yes"; then ++ iface=yes;AC_DEFINE(HAVE_IFACE_IFREQ,1,[Whether iface ifreq is available]) ++fi ++fi ++ ++dnl Some old Linux systems have broken header files and ++dnl miss the IPV6_V6ONLY define in netinet/in.h, ++dnl but have it in linux/in6.h. ++dnl We can't include both files so we just check if the value ++dnl if defined and do the replacement in system/network.h ++AC_CACHE_CHECK([for IPV6_V6ONLY support],libreplace_cv_HAVE_IPV6_V6ONLY,[ ++ AC_TRY_COMPILE([ ++#include <stdlib.h> /* for NULL */ ++#include <sys/socket.h> ++#include <sys/types.h> ++#include <netdb.h> ++#include <netinet/in.h> ++ ], ++ [ ++#ifndef IPV6_V6ONLY ++#error no IPV6_V6ONLY ++#endif ++ ],[ ++ libreplace_cv_HAVE_IPV6_V6ONLY=yes ++ ],[ ++ libreplace_cv_HAVE_IPV6_V6ONLY=no ++ ]) ++]) ++if test x"$libreplace_cv_HAVE_IPV6_V6ONLY" != x"yes"; then ++ dnl test for IPV6_V6ONLY ++ AC_CACHE_CHECK([for IPV6_V6ONLY in linux/in6.h],libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26,[ ++ AC_TRY_COMPILE([ ++ #include <linux/in6.h> ++ ], ++ [ ++ #if (IPV6_V6ONLY != 26) ++ #error no linux IPV6_V6ONLY ++ #endif ++ ],[ ++ libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26=yes ++ ],[ ++ libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26=no ++ ]) ++ ]) ++ if test x"$libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26" = x"yes"; then ++ AC_DEFINE(HAVE_LINUX_IPV6_V6ONLY_26,1,[Whether the system has IPV6_V6ONLY in linux/in6.h]) ++ fi ++fi ++ ++dnl test for ipv6 ++AC_CACHE_CHECK([for ipv6 support],libreplace_cv_HAVE_IPV6,[ ++ AC_TRY_LINK([ ++#include <stdlib.h> /* for NULL */ ++#include <sys/socket.h> ++#include <sys/types.h> ++#include <netdb.h> ++#include <netinet/in.h> ++ ], ++ [ ++struct sockaddr_storage sa_store; ++struct addrinfo *ai = NULL; ++struct in6_addr in6addr; ++int idx = if_nametoindex("iface1"); ++int s = socket(AF_INET6, SOCK_STREAM, 0); ++int ret = getaddrinfo(NULL, NULL, NULL, &ai); ++if (ret != 0) { ++ const char *es = gai_strerror(ret); ++} ++freeaddrinfo(ai); ++{ ++ int val = 1; ++ #ifdef HAVE_LINUX_IPV6_V6ONLY_26 ++ #define IPV6_V6ONLY 26 ++ #endif ++ ret = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, ++ (const void *)&val, sizeof(val)); ++} ++ ],[ ++ libreplace_cv_HAVE_IPV6=yes ++ ],[ ++ libreplace_cv_HAVE_IPV6=no ++ ]) ++]) ++if test x"$libreplace_cv_HAVE_IPV6" = x"yes"; then ++ AC_DEFINE(HAVE_IPV6,1,[Whether the system has IPv6 support]) ++fi ++ ++LIBS=$old_LIBS ++CPPFLAGS="$libreplace_SAVE_CPPFLAGS" ++ ++AC_CACHE_CHECK([for SO_PEERCRED],libreplace_cv_HAVE_PEERCRED,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <sys/socket.h>], ++[struct ucred cred; ++ socklen_t cred_len; ++ int ret = getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cred, &cred_len); ++], ++libreplace_cv_HAVE_PEERCRED=yes,libreplace_cv_HAVE_PEERCRED=no,libreplace_cv_HAVE_PEERCRED=cross)]) ++if test x"$libreplace_cv_HAVE_PEERCRED" = x"yes"; then ++ AC_DEFINE(HAVE_PEERCRED,1,[Whether we can use SO_PEERCRED to get socket credentials]) ++fi ++ ++AC_CACHE_CHECK([for getpeereid],libreplace_cv_HAVE_GETPEEREID,[ ++AC_TRY_LINK([#include <sys/types.h> ++#include <unistd.h>], ++[uid_t uid; gid_t gid; int ret; ++ ret = getpeereid(0, &uid, &gid); ++], ++libreplace_cv_HAVE_GETPEEREID=yes,libreplace_cv_HAVE_GETPEEREID=no)]) ++if test x"$libreplace_cv_HAVE_GETPEEREID" = xyes; then ++ AC_DEFINE(HAVE_GETPEEREID,1, ++ [Whether we have getpeereid to get socket credentials]) ++fi ++ ++LIBREPLACEOBJ="${LIBREPLACEOBJ} ${LIBREPLACE_NETWORK_OBJS}" ++ ++echo "LIBREPLACE_NETWORK_CHECKS: END" ++]) dnl end AC_LIBREPLACE_NETWORK_CHECKS +diff --git a/lib/replace/repdir.m4 b/lib/replace/repdir.m4 +new file mode 100644 +index 0000000..682ab44 +--- /dev/null ++++ b/lib/replace/repdir.m4 +@@ -0,0 +1,81 @@ ++AC_CACHE_CHECK([for broken readdir],libreplace_cv_READDIR_NEEDED,[ ++ AC_TRY_RUN([ ++#define test_readdir_os2_delete main ++#include "$libreplacedir/test/os2_delete.c"], ++ [libreplace_cv_READDIR_NEEDED=no], ++ [libreplace_cv_READDIR_NEEDED=yes], ++ [libreplace_cv_READDIR_NEEDED="assuming not"]) ++]) ++ ++AC_CHECK_FUNCS(dirfd) ++AC_HAVE_DECL(dirfd, [#include <dirent.h>]) ++ ++# ++# try to replace with getdirentries() if needed ++# ++if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then ++AC_CHECK_FUNCS(getdirentries) ++AC_VERIFY_C_PROTOTYPE([long telldir(const DIR *dir)], ++ [ ++ return 0; ++ ],[ ++ AC_DEFINE(TELLDIR_TAKES_CONST_DIR, 1, [Whether telldir takes a const pointer]) ++ ],[],[ ++ #include <dirent.h> ++ ]) ++ ++AC_VERIFY_C_PROTOTYPE([int seekdir(DIR *dir, long ofs)], ++ [ ++ return 0; ++ ],[ ++ AC_DEFINE(SEEKDIR_RETURNS_INT, 1, [Whether seekdir returns an int]) ++ ],[],[ ++ #include <dirent.h> ++ ]) ++AC_CACHE_CHECK([for replacing readdir using getdirentries()],libreplace_cv_READDIR_GETDIRENTRIES,[ ++ AC_TRY_RUN([ ++#define _LIBREPLACE_REPLACE_H ++#include "$libreplacedir/repdir_getdirentries.c" ++#define test_readdir_os2_delete main ++#include "$libreplacedir/test/os2_delete.c"], ++ [libreplace_cv_READDIR_GETDIRENTRIES=yes], ++ [libreplace_cv_READDIR_GETDIRENTRIES=no]) ++]) ++fi ++if test x"$libreplace_cv_READDIR_GETDIRENTRIES" = x"yes"; then ++ AC_DEFINE(REPLACE_READDIR,1,[replace readdir]) ++ AC_DEFINE(REPLACE_READDIR_GETDIRENTRIES,1,[replace readdir using getdirentries()]) ++ LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdirentries.o" ++ libreplace_cv_READDIR_NEEDED=no ++fi ++ ++# ++# try to replace with getdents() if needed ++# ++if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then ++AC_CHECK_FUNCS(getdents) ++AC_CACHE_CHECK([for replacing readdir using getdents()],libreplace_cv_READDIR_GETDENTS,[ ++ AC_TRY_RUN([ ++#define _LIBREPLACE_REPLACE_H ++#error _donot_use_getdents_replacement_anymore ++#include "$libreplacedir/repdir_getdents.c" ++#define test_readdir_os2_delete main ++#include "$libreplacedir/test/os2_delete.c"], ++ [libreplace_cv_READDIR_GETDENTS=yes], ++ [libreplace_cv_READDIR_GETDENTS=no]) ++]) ++fi ++if test x"$libreplace_cv_READDIR_GETDENTS" = x"yes"; then ++ AC_DEFINE(REPLACE_READDIR,1,[replace readdir]) ++ AC_DEFINE(REPLACE_READDIR_GETDENTS,1,[replace readdir using getdents()]) ++ LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdents.o" ++ libreplace_cv_READDIR_NEEDED=no ++fi ++ ++AC_MSG_CHECKING([a usable readdir()]) ++if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then ++ AC_MSG_RESULT(no) ++ AC_MSG_WARN([the provided readdir() is broken]) ++else ++ AC_MSG_RESULT(yes) ++fi +diff --git a/lib/replace/strptime.m4 b/lib/replace/strptime.m4 +new file mode 100644 +index 0000000..8ac22f6 +--- /dev/null ++++ b/lib/replace/strptime.m4 +@@ -0,0 +1,16 @@ ++AC_CHECK_FUNCS(strptime) ++AC_CHECK_DECLS(strptime, [], [], [#include <time.h>]) ++AC_CACHE_CHECK([whether strptime is available and works],libreplace_cv_STRPTIME_OK,[ ++ AC_TRY_RUN([ ++ #define LIBREPLACE_CONFIGURE_TEST_STRPTIME ++ #include "$libreplacedir/test/strptime.c" ++ ], ++ [libreplace_cv_STRPTIME_OK=yes], ++ [libreplace_cv_STRPTIME_OK=no], ++ [libreplace_cv_STRPTIME_OK="assuming not"]) ++]) ++if test x"$libreplace_cv_STRPTIME_OK" != x"yes"; then ++ LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/strptime.o" ++else ++ AC_DEFINE(HAVE_WORKING_STRPTIME,1,[Whether strptime is working correct]) ++fi +diff --git a/lib/replace/system/config.m4 b/lib/replace/system/config.m4 +new file mode 100644 +index 0000000..b7cdf14 +--- /dev/null ++++ b/lib/replace/system/config.m4 +@@ -0,0 +1,145 @@ ++# filesys ++AC_HEADER_DIRENT ++AC_CHECK_HEADERS(fcntl.h sys/fcntl.h sys/resource.h sys/ioctl.h sys/mode.h sys/filio.h sys/fs/s5param.h sys/filsys.h) ++AC_CHECK_HEADERS(sys/acl.h acl/libacl.h sys/file.h) ++ ++# select ++AC_CHECK_HEADERS(sys/select.h) ++ ++# poll ++AC_CHECK_HEADERS(poll.h) ++AC_CHECK_FUNCS(poll,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/poll.o"]) ++ ++# time ++AC_CHECK_HEADERS(sys/time.h utime.h) ++AC_HEADER_TIME ++AC_CHECK_FUNCS(utime utimes) ++ ++AC_CACHE_CHECK([if gettimeofday takes TZ argument],libreplace_cv_HAVE_GETTIMEOFDAY_TZ,[ ++AC_TRY_RUN([ ++#include <sys/time.h> ++#include <unistd.h> ++main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}], ++ libreplace_cv_HAVE_GETTIMEOFDAY_TZ=yes,libreplace_cv_HAVE_GETTIMEOFDAY_TZ=no,libreplace_cv_HAVE_GETTIMEOFDAY_TZ=yes)]) ++if test x"$libreplace_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then ++ AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday() is available]) ++fi ++ ++# wait ++AC_HEADER_SYS_WAIT ++ ++# capability ++AC_CHECK_HEADERS(sys/capability.h) ++ ++case "$host_os" in ++*linux*) ++AC_CACHE_CHECK([for broken RedHat 7.2 system header files],libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[ ++AC_TRY_COMPILE([ ++ #ifdef HAVE_SYS_VFS_H ++ #include <sys/vfs.h> ++ #endif ++ #ifdef HAVE_SYS_CAPABILITY_H ++ #include <sys/capability.h> ++ #endif ++ ],[ ++ int i; ++ ], ++ libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no, ++ libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes ++)]) ++if test x"$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then ++ AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files]) ++fi ++ ++AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[ ++AC_TRY_COMPILE([ ++ #ifdef HAVE_SYS_CAPABILITY_H ++ #include <sys/capability.h> ++ #endif ++ #include <linux/types.h> ++ ],[ ++ __s8 i; ++ ], ++ libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no, ++ libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes ++)]) ++if test x"$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then ++ AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h]) ++fi ++;; ++esac ++ ++# passwd ++AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h) ++AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r) ++AC_HAVE_DECL(getpwent_r, [ ++ #include <unistd.h> ++ #include <pwd.h> ++ ]) ++AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)], ++ [ ++ #ifndef HAVE_GETPWENT_R_DECL ++ #error missing getpwent_r prototype ++ #endif ++ return NULL; ++ ],[ ++ AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r solaris function prototype]) ++ ],[],[ ++ #include <unistd.h> ++ #include <pwd.h> ++ ]) ++AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)], ++ [ ++ #ifndef HAVE_GETPWENT_R_DECL ++ #error missing getpwent_r prototype ++ #endif ++ return NULL; ++ ],[ ++ AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r irix (similar to solaris) function prototype]) ++ ],[],[ ++ #include <unistd.h> ++ #include <pwd.h> ++ ]) ++AC_CHECK_FUNCS(getgrnam_r getgrgid_r getgrent_r) ++AC_HAVE_DECL(getgrent_r, [ ++ #include <unistd.h> ++ #include <grp.h> ++ ]) ++AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, int buflen)], ++ [ ++ #ifndef HAVE_GETGRENT_R_DECL ++ #error missing getgrent_r prototype ++ #endif ++ return NULL; ++ ],[ ++ AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r solaris function prototype]) ++ ],[],[ ++ #include <unistd.h> ++ #include <grp.h> ++ ]) ++ ++AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, size_t buflen)], ++ [ ++ #ifndef HAVE_GETGRENT_R_DECL ++ #error missing getgrent_r prototype ++ #endif ++ return NULL; ++ ],[ ++ AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r irix (similar to solaris) function prototype]) ++ ],[],[ ++ #include <unistd.h> ++ #include <grp.h> ++ ]) ++AC_CHECK_FUNCS(getgrouplist) ++ ++# locale ++AC_CHECK_HEADERS(ctype.h locale.h langinfo.h) ++ ++# glob ++AC_CHECK_HEADERS(fnmatch.h) ++ ++# shmem ++AC_CHECK_HEADERS(sys/ipc.h sys/mman.h sys/shm.h ) ++ ++# terminal ++AC_CHECK_HEADERS(termios.h termio.h sys/termio.h ) +diff --git a/lib/replace/timegm.m4 b/lib/replace/timegm.m4 +new file mode 100644 +index 0000000..9b76d0c +--- /dev/null ++++ b/lib/replace/timegm.m4 +@@ -0,0 +1 @@ ++AC_CHECK_FUNCS(timegm,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/timegm.o"]) +diff --git a/lib/replace/win32.m4 b/lib/replace/win32.m4 +new file mode 100644 +index 0000000..eb364e2 +--- /dev/null ++++ b/lib/replace/win32.m4 +@@ -0,0 +1,20 @@ ++AC_CHECK_HEADERS(direct.h windows.h winsock2.h ws2tcpip.h) ++ ++####################################### ++# Check for mkdir mode ++AC_CACHE_CHECK( [whether mkdir supports mode], libreplace_cv_mkdir_has_mode, ++ AC_TRY_COMPILE([ ++ #include <stdio.h> ++ #ifdef HAVE_DIRECT_H ++ #include <direct.h> ++ #endif],[ ++ mkdir("foo",0777); ++ return 0; ++ ], ++ libreplace_cv_mkdir_has_mode="yes", ++ libreplace_cv_mkdir_has_mode="no") ) ++ ++if test "$libreplace_cv_mkdir_has_mode" = "yes" ++then ++ AC_DEFINE(HAVE_MKDIR_MODE, 1, [Define if target mkdir supports mode option]) ++fi +diff --git a/lib/socket_wrapper/config.m4 b/lib/socket_wrapper/config.m4 +new file mode 100644 +index 0000000..ff6b67b +--- /dev/null ++++ b/lib/socket_wrapper/config.m4 +@@ -0,0 +1,22 @@ ++AC_ARG_ENABLE(socket-wrapper, ++AS_HELP_STRING([--enable-socket-wrapper], [Turn on socket wrapper library (default=no)])) ++ ++DEFAULT_TEST_OPTIONS= ++HAVE_SOCKET_WRAPPER=no ++ ++if eval "test x$developer = xyes -o x$selftest = xyes"; then ++ enable_socket_wrapper=yes ++fi ++ ++if eval "test x$enable_socket_wrapper = xyes"; then ++ AC_DEFINE(SOCKET_WRAPPER,1,[Use socket wrapper library]) ++ DEFAULT_TEST_OPTIONS=--socket-wrapper ++ HAVE_SOCKET_WRAPPER=yes ++ ++ # this is only used for samba3 ++ SOCKET_WRAPPER_OBJS="../lib/socket_wrapper/socket_wrapper.o" ++fi ++ ++AC_SUBST(DEFAULT_TEST_OPTIONS) ++AC_SUBST(HAVE_SOCKET_WRAPPER) ++AC_SUBST(SOCKET_WRAPPER_OBJS) +diff --git a/lib/talloc/compat/talloc_compat1.m4 b/lib/talloc/compat/talloc_compat1.m4 +new file mode 100644 +index 0000000..2ec530e +--- /dev/null ++++ b/lib/talloc/compat/talloc_compat1.m4 +@@ -0,0 +1,14 @@ ++TALLOC_COMPAT1_MK="" ++AC_SUBST(TALLOC_COMPAT1_MK) ++ ++AC_ARG_ENABLE(talloc-compat1, ++ [AS_HELP_STRING([--enable-talloc-compat1], ++ [Build talloc 1.x.x compat library [default=no]])], ++ [ enable_talloc_compat1=$enableval ], ++ [ enable_talloc_compat1=no ] ++) ++ ++if test "x$enable_talloc_compat1" = x"yes"; then ++ TALLOC_COMPAT1_MK='include $(tallocdir)/compat/talloc_compat1.mk' ++fi ++ +diff --git a/lib/talloc/libtalloc.m4 b/lib/talloc/libtalloc.m4 +new file mode 100644 +index 0000000..4b22c8e +--- /dev/null ++++ b/lib/talloc/libtalloc.m4 +@@ -0,0 +1,38 @@ ++dnl find the talloc sources. This is meant to work both for ++dnl talloc standalone builds, and builds of packages using talloc ++tallocdir="" ++tallocpaths=". lib/talloc talloc ../talloc ../lib/talloc" ++for d in $tallocpaths; do ++ if test -f "$srcdir/$d/talloc.c"; then ++ tallocdir="$d" ++ AC_SUBST(tallocdir) ++ break; ++ fi ++done ++if test x"$tallocdir" = "x"; then ++ AC_MSG_ERROR([cannot find talloc source in $tallocpaths]) ++fi ++TALLOC_OBJ="talloc.o" ++AC_SUBST(TALLOC_OBJ) ++ ++TALLOC_CFLAGS="-I$srcdir/$tallocdir" ++AC_SUBST(TALLOC_CFLAGS) ++ ++TALLOC_LIBS="" ++AC_SUBST(TALLOC_LIBS) ++ ++AC_CHECK_SIZEOF(size_t,cross) ++AC_CHECK_SIZEOF(void *,cross) ++ ++if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then ++ AC_WARN([size_t cannot represent the amount of used memory of a process]) ++ AC_WARN([please report this to <samba-technical@samba.org>]) ++ AC_WARN([sizeof(size_t) = $ac_cv_sizeof_size_t]) ++ AC_WARN([sizeof(void *) = $ac_cv_sizeof_void_p]) ++ AC_ERROR([sizeof(size_t) < sizeof(void *)]) ++fi ++ ++if test x"$VERSIONSCRIPT" != "x"; then ++ EXPORTSFILE=talloc.exports ++ AC_SUBST(EXPORTSFILE) ++fi +diff --git a/lib/tdb/libtdb.m4 b/lib/tdb/libtdb.m4 +new file mode 100644 +index 0000000..47f098e +--- /dev/null ++++ b/lib/tdb/libtdb.m4 +@@ -0,0 +1,41 @@ ++dnl find the tdb sources. This is meant to work both for ++dnl tdb standalone builds, and builds of packages using tdb ++tdbdir="" ++tdbpaths=". lib/tdb tdb ../tdb ../lib/tdb" ++for d in $tdbpaths; do ++ if test -f "$srcdir/$d/common/tdb.c"; then ++ tdbdir="$d" ++ AC_SUBST(tdbdir) ++ break; ++ fi ++done ++if test x"$tdbdir" = "x"; then ++ AC_MSG_ERROR([cannot find tdb source in $tdbpaths]) ++fi ++TDB_OBJ="common/tdb.o common/dump.o common/transaction.o common/error.o common/traverse.o" ++TDB_OBJ="$TDB_OBJ common/freelist.o common/freelistcheck.o common/io.o common/lock.o common/open.o common/check.o common/hash.o common/summary.o common/rescue.o" ++AC_SUBST(TDB_OBJ) ++AC_SUBST(LIBREPLACEOBJ) ++ ++TDB_LIBS="" ++AC_SUBST(TDB_LIBS) ++ ++TDB_DEPS="" ++if test x$libreplace_cv_HAVE_FDATASYNC_IN_LIBRT = xyes ; then ++ TDB_DEPS="$TDB_DEPS -lrt" ++fi ++AC_SUBST(TDB_DEPS) ++ ++TDB_CFLAGS="-I$tdbdir/include" ++AC_SUBST(TDB_CFLAGS) ++ ++AC_CHECK_FUNCS(mmap pread pwrite getpagesize utime) ++AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h) ++ ++AC_HAVE_DECL(pread, [#include <unistd.h>]) ++AC_HAVE_DECL(pwrite, [#include <unistd.h>]) ++ ++if test x"$VERSIONSCRIPT" != "x"; then ++ EXPORTSFILE=tdb.exports ++ AC_SUBST(EXPORTSFILE) ++fi +diff --git a/lib/tevent/libtevent.m4 b/lib/tevent/libtevent.m4 +new file mode 100644 +index 0000000..4d4fd2b +--- /dev/null ++++ b/lib/tevent/libtevent.m4 +@@ -0,0 +1,75 @@ ++dnl find the tevent sources. This is meant to work both for ++dnl standalone builds, and builds of packages using libtevent ++ ++AC_SUBST(teventdir) ++ ++if test x"$teventdir" = "x"; then ++ teventdir="" ++ teventpaths="$srcdir $srcdir/../lib/tevent $srcdir/tevent $srcdir/../tevent" ++ for d in $teventpaths; do ++ if test -f "$d/tevent.c"; then ++ teventdir="$d" ++ break; ++ fi ++ done ++ if test x"$teventdir" = "x"; then ++ AC_MSG_ERROR([cannot find libtevent source in $teventpaths]) ++ fi ++fi ++ ++TEVENT_OBJ="" ++TEVENT_CFLAGS="" ++TEVENT_LIBS="" ++AC_SUBST(TEVENT_OBJ) ++AC_SUBST(TEVENT_CFLAGS) ++AC_SUBST(TEVENT_LIBS) ++ ++TEVENT_CFLAGS="-I$teventdir" ++ ++TEVENT_OBJ="tevent.o tevent_debug.o tevent_util.o" ++TEVENT_OBJ="$TEVENT_OBJ tevent_fd.o tevent_timed.o tevent_immediate.o tevent_signal.o" ++TEVENT_OBJ="$TEVENT_OBJ tevent_req.o tevent_wakeup.o tevent_queue.o" ++TEVENT_OBJ="$TEVENT_OBJ tevent_standard.o tevent_select.o" ++TEVENT_OBJ="$TEVENT_OBJ tevent_poll.o" ++ ++AC_CHECK_HEADERS(sys/epoll.h) ++AC_CHECK_FUNCS(epoll_create) ++if test x"$ac_cv_header_sys_epoll_h" = x"yes" -a x"$ac_cv_func_epoll_create" = x"yes"; then ++ TEVENT_OBJ="$TEVENT_OBJ tevent_epoll.o" ++ AC_DEFINE(HAVE_EPOLL, 1, [Whether epoll available]) ++fi ++ ++tevent_num_signals_includes="$ac_includes_default ++#include <signal.h> ++" ++tevent_num_signals=64 ++AC_CHECK_VALUEOF(NSIG, [$tevent_num_signals_includes]) ++v=$ac_cv_valueof_NSIG ++test -n "$v" && test "$v" -gt "$tevent_num_signals" && { ++ tevent_num_signals=$v ++} ++AC_CHECK_VALUEOF(_NSIG, [$tevent_num_signals_includes]) ++v=$ac_cv_valueof__NSIG ++test -n "$v" && test "$v" -gt "$tevent_num_signals" && { ++ tevent_num_signals=$v ++} ++AC_CHECK_VALUEOF(SIGRTMAX, [$tevent_num_signals_includes]) ++v=$ac_cv_valueof_SIGRTMAX ++test -n "$v" && test "$v" -gt "$tevent_num_signals" && { ++ tevent_num_signals=$v ++} ++AC_CHECK_VALUEOF(SIGRTMIN, [$tevent_num_signals_includes]) ++v=$ac_cv_valueof_SIGRTMIN ++test -n "$v" && { ++ v=`expr $v + $v` ++} ++test -n "$v" && test "$v" -gt "$tevent_num_signals" && { ++ tevent_num_signals=$v ++} ++AC_DEFINE_UNQUOTED(TEVENT_NUM_SIGNALS, $tevent_num_signals, [Max signal number value]) ++ ++if test x"$VERSIONSCRIPT" != "x"; then ++ EXPORTSFILE=tevent.exports ++ AC_SUBST(EXPORTSFILE) ++fi ++ +diff --git a/lib/uid_wrapper/config.m4 b/lib/uid_wrapper/config.m4 +new file mode 100644 +index 0000000..a565233 +--- /dev/null ++++ b/lib/uid_wrapper/config.m4 +@@ -0,0 +1,19 @@ ++AC_ARG_ENABLE(uid-wrapper, ++AS_HELP_STRING([--enable-uid-wrapper], [Turn on uid wrapper library (default=no)])) ++ ++HAVE_UID_WRAPPER=no ++ ++if eval "test x$developer = xyes -o x$selftest = xyes"; then ++ enable_uid_wrapper=yes ++fi ++ ++if eval "test x$enable_uid_wrapper = xyes"; then ++ AC_DEFINE(UID_WRAPPER,1,[Use uid wrapper library]) ++ HAVE_UID_WRAPPER=yes ++ ++ # this is only used for samba3 ++ UID_WRAPPER_OBJS="../lib/uid_wrapper/uid_wrapper.o" ++fi ++ ++AC_SUBST(HAVE_UID_WRAPPER) ++AC_SUBST(UID_WRAPPER_OBJS) +diff --git a/lib/zlib/zlib.m4 b/lib/zlib/zlib.m4 +new file mode 100644 +index 0000000..32d747c +--- /dev/null ++++ b/lib/zlib/zlib.m4 +@@ -0,0 +1,29 @@ ++AC_DEFUN([AC_ZLIB],[ ++AC_CHECK_HEADERS(zlib.h) ++ ++AC_CHECK_LIB_EXT(z, ZLIB_LIBS, zlibVersion) ++ ++AC_CACHE_CHECK([for zlib >= 1.2.3], samba_cv_zlib_1_2_3, [ ++ AC_TRY_COMPILE([ ++ #include <zlib.h> ++ ],[ ++ #if (ZLIB_VERNUM >= 0x1230) ++ #else ++ #error "ZLIB_VERNUM < 0x1230" ++ #endif ++ ],[ ++ samba_cv_zlib_1_2_3=yes ++ ],[ ++ samba_cv_zlib_1_2_3=no ++ ]) ++]) ++ ++if test x"$ac_cv_header_zlib_h" = x"yes" -a \ ++ x"$ac_cv_lib_ext_z_zlibVersion" = x"yes" -a \ ++ x"$samba_cv_zlib_1_2_3" = x"yes"; then ++ $1 ++else ++ $2 ++fi ++]) ++ +diff --git a/m4/check_make.m4 b/m4/check_make.m4 +new file mode 100644 +index 0000000..343913f +--- /dev/null ++++ b/m4/check_make.m4 +@@ -0,0 +1,33 @@ ++dnl SMB Build Environment make Checks ++dnl ------------------------------------------------------- ++dnl Copyright (C) Stefan (metze) Metzmacher 2004 ++dnl Copyright (C) Jelmer Vernooij 2005 ++dnl Released under the GNU GPL ++dnl ------------------------------------------------------- ++dnl ++ ++AC_DEFUN([AC_SAMBA_GNU_MAKE], ++[ ++AC_PATH_PROGS(MAKE,gmake make) ++ ++AC_CACHE_CHECK([whether we have GNU make], samba_cv_gnu_make, [ ++if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null ++then ++ samba_cv_gnu_make=no ++else ++ samba_cv_gnu_make=yes ++fi ++]) ++if test x$samba_cv_gnu_make = xyes; then ++ $1 ++else ++ $2 ++fi ++]) ++ ++AC_DEFUN([AC_SAMBA_GNU_MAKE_VERSION], ++[ ++AC_CACHE_CHECK([GNU make version], samba_cv_gnu_make_version,[ ++ samba_cv_gnu_make_version=`$ac_cv_path_MAKE --version | head -1 | cut -d " " -f 3 2>/dev/null` ++ ]) ++]) +diff --git a/m4/check_perl.m4 b/m4/check_perl.m4 +new file mode 100644 +index 0000000..aaec9cf +--- /dev/null ++++ b/m4/check_perl.m4 +@@ -0,0 +1,32 @@ ++dnl SMB Build Environment Perl Checks ++dnl ------------------------------------------------------- ++dnl Copyright (C) Stefan (metze) Metzmacher 2004 ++dnl Released under the GNU GPL ++dnl ------------------------------------------------------- ++dnl ++ ++AC_DEFUN([AC_SAMBA_PERL], ++[ ++case "$host_os" in ++ *irix*) ++ # On IRIX, we prefer Freeware or Nekoware Perl, because the ++ # system perl is so ancient. ++ AC_PATH_PROG(PERL, perl, "", "/usr/freeware/bin:/usr/nekoware/bin:$PATH") ++ ;; ++ *) ++ AC_PATH_PROG(PERL, perl) ++ ;; ++esac ++ ++if test x"$PERL" = x""; then ++ AC_MSG_WARN([No version of perl was found!]) ++ $2 ++else ++ if test x"$debug" = x"yes";then ++ PERL="$PERL -W" ++ fi ++ export PERL ++ $1 ++fi ++]) ++ +diff --git a/m4/check_python.m4 b/m4/check_python.m4 +new file mode 100644 +index 0000000..66dadbd +--- /dev/null ++++ b/m4/check_python.m4 +@@ -0,0 +1,111 @@ ++dnl Autoconf macros for finding a Python development environment ++dnl ++dnl Copyright (C) 2007-2008 Jelmer Vernooij <jelmer@samba.org> ++dnl Published under the GNU GPL, v3 or later ++dnl ++AC_ARG_VAR([PYTHON_VER],[The installed Python ++ version to use, for example '2.3'. This string ++ will be appended to the Python interpreter ++ canonical name.]) ++ ++AC_DEFUN([TRY_LINK_PYTHON], ++[ ++ if test $working_python = no; then ++ ac_save_LIBS="$LIBS" ++ ac_save_CFLAGS="$CFLAGS" ++ LIBS="$LIBS $1" ++ CFLAGS="$CFLAGS $2" ++ ++ AC_TRY_LINK([ ++ #undef HAVE_UINTPTR_T ++ /* we have our own configure tests */ ++ #include <Python.h> ++ ],[ ++ Py_InitModule(NULL, NULL); ++ ],[ ++ PYTHON_LDFLAGS="$1" ++ PYTHON_CFLAGS="$2" ++ working_python=yes ++ ]) ++ LIBS="$ac_save_LIBS" ++ CFLAGS="$ac_save_CFLAGS" ++ fi ++]) ++ ++dnl Try to find a Python implementation including header files ++dnl AC_SAMBA_PYTHON_DEVEL(RUN-IF-FOUND, RUN-IF-NOT-FOUND) ++dnl ++dnl Will set the following variables: ++dnl $PYTHON ++dnl $PYTHON_CONFIG (if found) ++dnl $PYTHON_CFLAGS ++dnl $PYTHON_LDFLAGS ++AC_DEFUN([AC_SAMBA_PYTHON_DEVEL], ++[ ++ if test -z "$PYTHON_VER"; then ++ AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python]) ++ else ++ AC_PATH_PROG([PYTHON],[python[$PYTHON_VER]]) ++ fi ++ if test -z "$PYTHON"; then ++ working_python=no ++ AC_MSG_WARN([No python found]) ++ fi ++ ++ dnl assume no working python ++ working_python=no ++ ++ if test -z "$PYTHON_VER"; then ++ AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config]) ++ else ++ AC_PATH_PROG([PYTHON_CONFIG], [python[$PYTHON_VER]-config]) ++ fi ++ ++ if test -z "$PYTHON_CONFIG"; then ++ AC_MSG_WARN([No python-config found]) ++ else ++ TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`]) ++ TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`]) ++ if test x$working_python = xno; then ++ # It seems the library path isn't included on some systems ++ base=`$PYTHON_CONFIG --prefix` ++ TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`]) ++ TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`]) ++ fi ++ fi ++ ++ if test x$PYTHON != x ++ then ++ DISTUTILS_CFLAGS=`$PYTHON -c "from distutils import sysconfig; \ ++ print '-I%s -I%s %s' % ( \ ++ sysconfig.get_python_inc(), \ ++ sysconfig.get_python_inc(plat_specific=1), \ ++ sysconfig.get_config_var('CFLAGS'))"` ++ DISTUTILS_LDFLAGS=`$PYTHON -c "from distutils import sysconfig; \ ++ print '%s %s -lpython%s -L%s %s -L%s' % ( \ ++ sysconfig.get_config_var('LIBS'), \ ++ sysconfig.get_config_var('SYSLIBS'), \ ++ sysconfig.get_config_var('VERSION'), \ ++ sysconfig.get_config_var('LIBDIR'), \ ++ sysconfig.get_config_var('LDFLAGS'), \ ++ sysconfig.get_config_var('LIBPL'))"` ++ TRY_LINK_PYTHON($DISTUTILS_LDFLAGS, $DISTUTILS_CFLAGS) ++ ++ if `$PYTHON -c "import sys; sys.exit(sys.version_info.__getslice__(0, 2) >= (2, 5))"` ++ then ++ AC_MSG_WARN([Python ($PYTHON) is too old. At least version 2.5 is required]) ++ working_python=no ++ fi ++ fi ++ ++ AC_MSG_CHECKING(working python module support) ++ if test $working_python = yes; then ++ AC_MSG_RESULT([yes]) ++ $1 ++ else ++ AC_MSG_RESULT([no]) ++ $2 ++ fi ++]) ++ ++ +diff --git a/m4/pkg.m4 b/m4/pkg.m4 +new file mode 100644 +index 0000000..a8b3d06 +--- /dev/null ++++ b/m4/pkg.m4 +@@ -0,0 +1,156 @@ ++# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- ++# ++# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++# As a special exception to the GNU General Public License, if you ++# distribute this file as part of a program that contains a ++# configuration script generated by Autoconf, you may include it under ++# the same distribution terms that you use for the rest of that program. ++ ++# PKG_PROG_PKG_CONFIG([MIN-VERSION]) ++# ---------------------------------- ++AC_DEFUN([PKG_PROG_PKG_CONFIG], ++[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) ++m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) ++AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl ++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then ++ AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) ++fi ++if test -n "$PKG_CONFIG"; then ++ _pkg_min_version=m4_default([$1], [0.9.0]) ++ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) ++ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then ++ AC_MSG_RESULT([yes]) ++ else ++ AC_MSG_RESULT([no]) ++ PKG_CONFIG="" ++ fi ++ ++fi[]dnl ++])# PKG_PROG_PKG_CONFIG ++ ++# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) ++# ++# Check to see whether a particular set of modules exists. Similar ++# to PKG_CHECK_MODULES(), but does not set variables or print errors. ++# ++# ++# Similar to PKG_CHECK_MODULES, make sure that the first instance of ++# this or PKG_CHECK_MODULES is called, or make sure to call ++# PKG_CHECK_EXISTS manually ++# -------------------------------------------------------------- ++AC_DEFUN([PKG_CHECK_EXISTS], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl ++if test -n "$PKG_CONFIG" && \ ++ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then ++ m4_ifval([$2], [$2], [:]) ++m4_ifvaln([$3], [else ++ $3])dnl ++fi]) ++ ++ ++# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) ++# --------------------------------------------- ++m4_define([_PKG_CONFIG], ++[if test -n "$PKG_CONFIG"; then ++ if test -n "$$1"; then ++ pkg_cv_[]$1="$$1" ++ else ++ PKG_CHECK_EXISTS([$3], ++ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], ++ [pkg_failed=yes]) ++ fi ++else ++ pkg_failed=untried ++fi[]dnl ++])# _PKG_CONFIG ++ ++# _PKG_SHORT_ERRORS_SUPPORTED ++# ----------------------------- ++AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi[]dnl ++])# _PKG_SHORT_ERRORS_SUPPORTED ++ ++ ++# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], ++# [ACTION-IF-NOT-FOUND]) ++# ++# ++# Note that if there is a possibility the first call to ++# PKG_CHECK_MODULES might not happen, you should be sure to include an ++# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac ++# ++# ++# -------------------------------------------------------------- ++AC_DEFUN([PKG_CHECK_MODULES], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl ++AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl ++AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl ++ ++pkg_failed=no ++AC_MSG_CHECKING([for $1]) ++ ++_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) ++_PKG_CONFIG([$1][_LIBS], [libs], [$2]) ++ ++m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS ++and $1[]_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details.]) ++ ++if test $pkg_failed = yes; then ++ _PKG_SHORT_ERRORS_SUPPORTED ++ if test $_pkg_short_errors_supported = yes; then ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` ++ else ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ++ ++ ifelse([$4], , [AC_MSG_ERROR(dnl ++[Package requirements ($2) were not met: ++ ++$$1_PKG_ERRORS ++ ++Consider adjusting the PKG_CONFIG_PATH environment variable if you ++installed software in a non-standard prefix. ++ ++_PKG_TEXT ++])], ++ [AC_MSG_RESULT([no]) ++ $4]) ++elif test $pkg_failed = untried; then ++ ifelse([$4], , [AC_MSG_FAILURE(dnl ++[The pkg-config script could not be found or is too old. Make sure it ++is in your PATH or set the PKG_CONFIG environment variable to the full ++path to pkg-config. ++ ++_PKG_TEXT ++ ++To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], ++ [$4]) ++else ++ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS ++ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS ++ AC_MSG_RESULT([yes]) ++ ifelse([$3], , :, [$3]) ++fi[]dnl ++])# PKG_CHECK_MODULES +diff --git a/source3/Makefile-smbtorture b/source3/Makefile-smbtorture +new file mode 100644 +index 0000000..d93e8ad +--- /dev/null ++++ b/source3/Makefile-smbtorture +@@ -0,0 +1,24 @@ ++WAF_BINARY=buildtools/bin/waf ++WAF=$(WAF_BINARY) ++WAF_BUILD=WAF_MAKE=1 $(WAF_BINARY) ++SAMBA4_BINARIES="smbtorture" ++ ++samba4-configure: ++ @(cd .. && \ ++ CFLAGS='' $(WAF) reconfigure || \ ++ CFLAGS='' $(WAF) configure --enable-selftest --nonshared-binary=$(SAMBA4_BINARIES) --enable-auto-reconfigure --enable-debug) ++ ++.PHONY: samba4-configure ++ ++bin/smbtorture: $(BINARY_PREREQS) samba4-configure samba4-config-compare ++ cd .. && $(WAF_BUILD) ++ cp ../bin/smbtorture bin/smbtorture ++ ++.PHONY: bin/smbtorture ++ ++samba4-config-compare: samba4-configure ++ @echo "Comparing config.h from autoconf and waf" ++ @echo "Configure results missing from WAF are:" ++ ../buildtools/compare_config_h3.sh include/autoconf/config.h ../bin/default/include/config.h ++ @echo "Configure results additionaly found by WAF are:" ++ DIFF="comm -13" ../buildtools/compare_config_h3.sh include/autoconf/config.h ../bin/default/include/config.h +diff --git a/source3/Makefile.in b/source3/Makefile.in +new file mode 100644 +index 0000000..efe0694 +--- /dev/null ++++ b/source3/Makefile.in +@@ -0,0 +1,3405 @@ ++######################################################################### ++# Makefile.in for Samba - rewritten for autoconf support ++# Copyright Andrew Tridgell 1992-1998 ++# Copyright (C) 2001 by Martin Pool <mbp@samba.org> ++# Copyright Andrew Bartlett 2002 ++# Copyright (C) 2003 Jim McDonough <jmcd@us.ibm.com> ++# Copyright (C) 2002-2003 Jelmer Vernooij <jelmer@samba.org> ++# Copyright (C) 2006 Lars Mueller <lars@samba.org> ++# Copyright (C) 2007 James Peach <jpeach@samba.org> ++# Copyright (C) 2008 Michael Adam <obnox@samba.org> ++########################################################################### ++ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++sysconfdir=@sysconfdir@ ++localstatedir=@localstatedir@ ++datarootdir=@datarootdir@ ++ ++# the following vars come from ../dynconfig/config.m4 ++BINDIR=@BINDIR@ ++SBINDIR=@SBINDIR@ ++LIBDIR=@LIBDIR@ ++#LIBEXECDIR=@LIBEXECDIR@ ++MANDIR=@MANDIR@ ++DATADIR=@DATADIR@ ++LOCALEDIR=@LOCALEDIR@ ++#SCRIPTSBINDIR=@SCRIPTSBINDIR@ ++#PYTHONDIR=@PYTHONDIR@ ++#PYTHONARCHDIR=@PYTHONARCHDIR@ ++MODULESDIR=@MODULESDIR@ ++INCLUDEDIR=@INCLUDEDIR@ ++SETUPDIR=@SETUPDIR@ ++#PKGCONFIGDIR=@PKGCONFIGDIR@ ++CODEPAGEDIR=@CODEPAGEDIR@ ++PAMMODULESDIR=@PAMMODULESDIR@ ++CONFIGDIR=@CONFIGDIR@ ++PRIVATE_DIR=@PRIVATE_DIR@ ++LOCKDIR=@LOCKDIR@ ++PIDDIR=@PIDDIR@ ++STATEDIR=@STATEDIR@ ++CACHEDIR=@CACHEDIR@ ++LOGFILEBASE=@LOGFILEBASE@ ++SOCKET_DIR=@SOCKET_DIR@ ++PRIVILEGED_SOCKET_DIR=@PRIVILEGED_SOCKET_DIR@ ++WINBINDD_SOCKET_DIR=@WINBINDD_SOCKET_DIR@ ++WINBINDD_PRIVILEGED_SOCKET_DIR=@WINBINDD_PRIVILEGED_SOCKET_DIR@ ++NMBDSOCKETDIR=@NMBDSOCKETDIR@ ++#NTP_SIGND_SOCKET_DIR=@NTP_SIGND_SOCKET_DIR@ ++NCALRPCDIR=@NCALRPCDIR@ ++CONFIGFILE=@CONFIGFILE@ ++LMHOSTSFILE=@LMHOSTSFILE@ ++SMB_PASSWD_FILE=@SMB_PASSWD_FILE@ ++ ++selftest_prefix=@selftest_prefix@ ++ ++LIBS=@LIBS@ ++CC=@CC@ ++SHLD=@SHLD@ ++LIB_PATH_VAR=@LIB_PATH_VAR@ ++ ++## Dynamic shared libraries build settings ++DSO_EXPORTS_CMD=-Wl,--version-script,$(srcdir)/exports/`basename $@ | sed 's:\.@SHLIBEXT@[\.0-9]*$$:.@SYMSEXT@:'` ++DSO_EXPORTS=@DSO_EXPORTS@ ++SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) -o $@ ++ ++# The MODULE_EXPORTS variable contains the platform-specific linker flags ++# needed to restrict the exports for VFS, IDMAP, RPC and PASSDB modules. ++MODULE_EXPORTS=@MODULE_EXPORTS@ ++ ++# Add $(DEVELOPER_CFLAGS) to $(CFLAGS) to enable extra compiler ++# (GCC) warnings. This is done automatically for --enable-developer, ++# --enable-picky-developer and --enable-krb5developer. ++DEVELOPER_CFLAGS=@DEVELOPER_CFLAGS@ ++CFLAGS=@CFLAGS@ ++CPP=@CPP@ ++CPPFLAGS=-DHAVE_CONFIG_H @CPPFLAGS@ ++PICFLAG=@PICFLAG@ ++ ++AR=@AR@ ++LDSHFLAGS=$(PICFLAG) @LDSHFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@ -lc @LDSHFLAGS_Z_DEFS@ ++LDSHFLAGS_MODULES=$(PICFLAG) @LDSHFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@ @LDSHFLAGS_Z_NODEFS@ ++LDFLAGS=@PIE_LDFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@ ++ ++WINBIND_NSS_LDSHFLAGS=$(PICFLAG) @WINBIND_NSS_LDSHFLAGS@ @LDFLAGS@ -lc @LDSHFLAGS_Z_DEFS@ ++AWK=@AWK@ ++DYNEXP=@DYNEXP@ ++PERL=@PERL@ ++PYTHON=@PYTHON@ ++LIBDL=@LIBDL@ ++ ++PIDL_ARGS=@PIDL_ARGS@ ++ ++TERMLDFLAGS=@TERMLDFLAGS@ ++TERMLIBS=@TERMLIBS@ ++PRINT_LIBS=@PRINT_LIBS@ ++ZLIB_LIBS=@ZLIB_LIBS@ ++AUTH_LIBS=@AUTH_LIBS@ ++ACL_LIBS=@ACL_LIBS@ ++PASSDB_LIBS=@PASSDB_LIBS@ ++IDMAP_LIBS=@IDMAP_LIBS@ ++KRB5LIBS=@KRB5_LIBS@ ++LDAP_LIBS=@LDAP_LIBS@ ++NSCD_LIBS=@NSCD_LIBS@ ++LIBWBCLIENT=@LIBWBCLIENT_STATIC@ @LIBWBCLIENT_SHARED@ ++LIBWBCLIENT_LIBS=@LIBWBCLIENT_LIBS@ ++PTHREAD_LDFLAGS=@PTHREAD_LDFLAGS@ ++PTHREAD_CFLAGS=@PTHREAD_CFLAGS@ ++DNSSD_LIBS=@DNSSD_LIBS@ ++AVAHI_LIBS=@AVAHI_LIBS@ ++POPT_LIBS=@POPTLIBS@ ++LIBTALLOC=@LIBTALLOC_STATIC@ ++LIBTALLOC_LIBS=@LIBTALLOC_LIBS@ ++LIBREPLACE_LIBS=@LIBREPLACE_LIBS@ ++LIBTDB=@LIBTDB_STATIC@ ++LIBTDB_LIBS=@LIBTDB_LIBS@ ++TDB_DEPS=@TDB_DEPS@ ++LIBNTDB=@LIBNTDB_STATIC@ ++LIBNTDB_LIBS=@LIBNTDB_LIBS@ ++NTDB_DEPS=@NTDB_DEPS@ ++LIBNETAPI=@LIBNETAPI_STATIC@ @LIBNETAPI_SHARED@ ++LIBNETAPI_LIBS=@LIBNETAPI_LIBS@ ++LIBSMBCLIENT_LIBS=@LIBSMBCLIENT_LIBS@ ++LIBSMBSHAREMODES_LIBS=@LIBSMBSHAREMODES_LIBS@ ++ ++TALLOCTORT = @TALLOCTORT@ ++ ++TDBBACKUP = @TDBBACKUP@ ++TDBTOOL = @TDBTOOL@ ++TDBDUMP = @TDBDUMP@ ++TDBRESTORE = @TDBRESTORE@ ++TDBTORTURE = @TDBTORTURE@ ++NTDBBACKUP = @NTDBBACKUP@ ++NTDBTOOL = @NTDBTOOL@ ++NTDBDUMP = @NTDBDUMP@ ++NTDBRESTORE = @NTDBRESTORE@ ++NTDBTORTURE = @NTDBTORTURE@ ++PTHREADPOOLTEST = @PTHREADPOOLTEST@ ++ ++INSTALLCMD=@INSTALL@ ++INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@ ++INSTALLLIBCMD_A=@INSTALLLIBCMD_A@ ++UNINSTALLLIBCMD_SH=@UNINSTALLLIBCMD_SH@ ++UNINSTALLLIBCMD_A=@UNINSTALLLIBCMD_A@ ++ ++VPATH=@srcdir@ ++srcdir=@abs_srcdir@ ++builddir=@abs_builddir@ ++# XXX: Perhaps this should be @SHELL@ instead -- apparently autoconf ++# will search for a POSIX-compliant shell, and that might not be ++# /bin/sh on some platforms. I guess it's not a big problem -- mbp ++SHELL=/bin/sh ++DESTDIR=/ ++ ++# See the autoconf manual "Installation Directory Variables" for a ++# discussion of the subtle use of these variables. ++ ++VFSLIBDIR = $(MODULESDIR)/vfs ++PERFCOUNTLIBDIR = $(MODULESDIR)/perfcount ++PDBLIBDIR = $(MODULESDIR)/pdb ++RPCLIBDIR = $(MODULESDIR)/rpc ++IDMAPLIBDIR = $(MODULESDIR)/idmap ++NSSINFOLIBDIR = $(MODULESDIR)/nss_info ++AUTHLIBDIR = $(MODULESDIR)/auth ++CONFIGLIBDIR = $(MODULESDIR)/config ++GPEXTLIBDIR = $(MODULESDIR)/gpext ++VARDIR = @localstatedir@ ++ ++# The permissions to give the executables and other data ++INSTALLPERMS_BIN = 0755 ++INSTALLPERMS_DATA = 0644 ++ ++FLAGS = -I. \ ++ -I$(srcdir) \ ++ @FLAGS1@ \ ++ @SAMBA_CPPFLAGS@ \ ++ $(CPPFLAGS) \ ++ $(ISA) \ ++ -I$(srcdir)/lib \ ++ -I.. \ ++ -I./../lib/ldb/include \ ++ -D_SAMBA_BUILD_=3 ++ ++PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \ ++ -DPRIVATE_DIR=\"$(PRIVATE_DIR)\" \ ++ -DCONFIGFILE=\"$(CONFIGFILE)\" \ ++ -DSBINDIR=\"$(SBINDIR)\" \ ++ -DBINDIR=\"$(BINDIR)\" \ ++ -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \ ++ -DLOCKDIR=\"$(LOCKDIR)\" \ ++ -DPIDDIR=\"$(PIDDIR)\" \ ++ -DLIBDIR=\"$(LIBDIR)\" \ ++ -DMODULESDIR=\"$(MODULESDIR)\" \ ++ -DLOGFILEBASE=\"$(LOGFILEBASE)\" \ ++ -DSHLIBEXT=\"@SHLIBEXT@\" \ ++ -DNCALRPCDIR=\"$(NCALRPCDIR)\" \ ++ -DCONFIGDIR=\"$(CONFIGDIR)\" \ ++ -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" \ ++ -DCACHEDIR=\"$(CACHEDIR)\" \ ++ -DSTATEDIR=\"$(STATEDIR)\" \ ++ -DNMBDSOCKETDIR=\"$(NMBDSOCKETDIR)\" \ ++ -DWINBINDD_SOCKET_DIR=\"$(WINBINDD_SOCKET_DIR)\" \ ++ -DWINBINDD_PRIVILEGED_SOCKET_DIR=\"$(WINBINDD_PRIVILEGED_SOCKET_DIR)\" \ ++ -DLOCALEDIR=\"$(LOCALEDIR)\" \ ++ -DDATADIR=\"$(DATADIR)\" \ ++ -DSETUPDIR=\"$(SETUPDIR)\" ++ ++# You usually want both TDB and NTDB. ++LIBTDBS=$(LIBTDB) $(LIBNTDB) ++LIBTDBS_LIBS=$(LIBTDB_LIBS) $(LIBNTDB_LIBS) ++TDBS_DEPS=$(TDB_DEPS) $(NTDB_DEPS) ++ ++# Note that all executable programs now provide for an optional executable suffix. ++ ++SBIN_PROGS = bin/smbd bin/nmbd @EXTRA_SBIN_PROGS@ ++ ++BIN_PROGS1 = bin/smbclient bin/net bin/smbspool \ ++ bin/testparm bin/smbstatus bin/smbget \ ++ bin/smbta-util ++BIN_PROGS2 = bin/smbcontrol bin/smbtree $(TDBBACKUP) \ ++ bin/nmblookup bin/pdbedit $(TDBDUMP) \ ++ $(TDBRESTORE) $(TDBTOOL) bin/dbwrap_tool ++BIN_PROGS3 = bin/smbpasswd bin/rpcclient bin/smbcacls \ ++ bin/profiles bin/ntlm_auth bin/sharesec \ ++ bin/smbcquotas bin/eventlogadm ++ ++TORTURE_PROGS = bin/smbtorture3 bin/msgtest \ ++ bin/locktest2 bin/nsstest bin/vfstest \ ++ $(TALLOCTORT) bin/replacetort \ ++ $(TDBTORTURE) $(PTHREADPOOLTEST) \ ++ bin/smbconftort bin/vlp ++ ++BIN_PROGS = @EXTRA_BIN_PROGS@ \ ++ $(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) ++ ++EVERYTHING_PROGS = bin/debug2html bin/smbfilter \ ++ $(TALLOCTORT) bin/replacetort \ ++ bin/log2pcap \ ++ bin/vlp \ ++ bin/dbwrap_tool \ ++ bin/dbwrap_torture ++ ++PAM_MODULES = @PAM_MODULES@ ++ ++NSS_MODULES = @NSS_MODULES@ ++ ++SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb ++ ++VFS_MODULES = @VFS_MODULES@ ++PERFCOUNT_MODULES = @PERFCOUNT_MODULES@ ++PDB_MODULES = @PDB_MODULES@ ++IDMAP_MODULES = @IDMAP_MODULES@ ++AUTH_MODULES = @AUTH_MODULES@ ++NSS_INFO_MODULES = @NSS_INFO_MODULES@ ++GPEXT_MODULES = @GPEXT_MODULES@ ++MODULES = $(VFS_MODULES) $(PDB_MODULES) $(IDMAP_MODULES) \ ++ $(AUTH_MODULES) $(NSS_INFO_MODULES) \ ++ $(GPEXT_MODULES) $(PERFCOUNT_MODULES) ++ ++EXTRA_ALL_TARGETS = @EXTRA_ALL_TARGETS@ ++ ++###################################################################### ++# object file lists ++###################################################################### ++ ++TDB_LIB_OBJ = lib/util_tdb.o ../lib/util/util_tdb.o \ ++ ../lib/tdb_wrap/tdb_wrap.o \ ++ ../lib/dbwrap/dbwrap.o \ ++ ../lib/dbwrap/dbwrap_local_open.o \ ++ lib/dbwrap/dbwrap_open.o \ ++ ../lib/dbwrap/dbwrap_tdb.o \ ++ ../lib/util/util_ntdb.o \ ++ ../lib/dbwrap/dbwrap_ntdb.o \ ++ lib/dbwrap/dbwrap_ctdb.o \ ++ lib/g_lock.o \ ++ ../lib/dbwrap/dbwrap_cache.o \ ++ lib/dbwrap/dbwrap_watch.o \ ++ ../lib/dbwrap/dbwrap_rbt.o \ ++ ../lib/dbwrap/dbwrap_util.o ++ ++TDB_VALIDATE_OBJ = lib/tdb_validate.o ++ ++SMBLDAP_OBJ = @SMBLDAP@ ++ ++VERSION_OBJ = lib/version.o ++ ++WBCOMMON_OBJ = ../nsswitch/wb_common.o ++ ++AFS_OBJ = lib/afs.o ++ ++AFS_SETTOKEN_OBJ = lib/afs_settoken.o ++ ++AVAHI_OBJ = @AVAHI_OBJ@ ++ ++SERVER_MUTEX_OBJ = lib/server_mutex.o ++ ++PASSCHANGE_OBJ = libsmb/passchange.o ++ ++LIBNDR_DRSUAPI_OBJ = ../librpc/ndr/ndr_drsuapi.o \ ++ ../librpc/ndr/ndr_compression.o \ ++ autoconf/librpc/gen_ndr/ndr_drsuapi.o \ ++ ../librpc/ndr/ndr_drsblobs.o \ ++ autoconf/librpc/gen_ndr/ndr_drsblobs.o ++ ++ZLIB_OBJ = @ZLIB_OBJS@ ++ ++COMPRESSION_OBJ = ../lib/compression/lzxpress.o \ ++ $(ZLIB_OBJ) ++ ++DRSUAPI_OBJ = $(LIBNDR_DRSUAPI_OBJ) \ ++ $(COMPRESSION_OBJ) ++ ++LIBNDR_NTLMSSP_OBJ = autoconf/librpc/gen_ndr/ndr_ntlmssp.o \ ++ ../librpc/ndr/ndr_ntlmssp.o ++ ++LIBNDR_OBJ = ../librpc/ndr/ndr_basic.o \ ++ ../librpc/ndr/ndr.o \ ++ ../librpc/ndr/ndr_misc.o \ ++ autoconf/librpc/gen_ndr/ndr_misc.o \ ++ autoconf/librpc/gen_ndr/ndr_security.o \ ++ ../librpc/ndr/ndr_sec_helper.o \ ++ ../librpc/ndr/ndr_string.o \ ++ ../librpc/ndr/uuid.o \ ++ ../librpc/ndr/util.o \ ++ autoconf/librpc/gen_ndr/ndr_server_id.o \ ++ autoconf/librpc/gen_ndr/ndr_file_id.o \ ++ autoconf/librpc/gen_ndr/ndr_dcerpc.o ++ ++LIBNDR_GEN_OBJ0 = autoconf/librpc/gen_ndr/ndr_samr.o \ ++ autoconf/librpc/gen_ndr/ndr_lsa.o ++ ++LIBNDR_NETLOGON_OBJ = autoconf/librpc/gen_ndr/ndr_netlogon.o \ ++ ../librpc/ndr/ndr_netlogon.o ++ ++LIBNDR_SCHANNEL_OBJ = autoconf/librpc/gen_ndr/ndr_schannel.o \ ++ ../librpc/ndr/ndr_schannel.o ++ ++LIBNDR_SPOOLSS_OBJ = autoconf/librpc/gen_ndr/ndr_spoolss.o \ ++ ../librpc/ndr/ndr_spoolss_buf.o ++ ++LIBNDR_NTPRINTING_OBJ = autoconf/librpc/gen_ndr/ndr_ntprinting.o \ ++ ../librpc/ndr/ndr_ntprinting.o ++ ++LIBNDR_PREG_OBJ = autoconf/librpc/gen_ndr/ndr_preg.o \ ++ ../librpc/ndr/ndr_preg.o ++ ++LIBNDR_XATTR_OBJ = autoconf/librpc/gen_ndr/ndr_xattr.o \ ++ ../librpc/ndr/ndr_xattr.o ++ ++LIBNDR_NFS4ACL_OBJ = autoconf/librpc/gen_ndr/ndr_nfs4acl.o ++ ++LIBCLI_SPOOLSS_OBJ = autoconf/librpc/gen_ndr/ndr_spoolss_c.o \ ++ rpc_client/cli_spoolss.o \ ++ rpc_client/init_spoolss.o \ ++ rpc_client/cli_winreg_spoolss.o \ ++ printing/nt_printing_os2.o ++ ++LIBCLI_EVENTLOG_OBJ = autoconf/librpc/gen_ndr/ndr_eventlog_c.o ++ ++LIBCLI_WINREG_OBJ = autoconf/librpc/gen_ndr/ndr_winreg_c.o \ ++ rpc_client/cli_winreg.o ++ ++LIBCLI_WINREG_INT_OBJ = $(LIBCLI_WINREG_OBJ) \ ++ rpc_client/cli_winreg_int.o ++ ++LIBCLI_NTSVCS_OBJ = autoconf/librpc/gen_ndr/ndr_ntsvcs_c.o ++ ++LIBCLI_DRSUAPI_OBJ = autoconf/librpc/gen_ndr/ndr_drsuapi_c.o ++ ++LIBCLI_DFS_OBJ = autoconf/librpc/gen_ndr/ndr_dfs_c.o ++ ++LIBCLI_ECHO_OBJ = autoconf/librpc/gen_ndr/ndr_echo_c.o ++ ++LIBCLI_INITSHUTDOWN_OBJ = autoconf/librpc/gen_ndr/ndr_initshutdown_c.o ++ ++LIBCLI_DSSETUP_OBJ = autoconf/librpc/gen_ndr/ndr_dssetup_c.o ++ ++LIBCLI_SVCCTL_OBJ = autoconf/librpc/gen_ndr/ndr_svcctl_c.o ++ ++LIBCLI_WKSSVC_OBJ = autoconf/librpc/gen_ndr/ndr_wkssvc_c.o ++ ++LIBCLI_SRVSVC_OBJ = autoconf/librpc/gen_ndr/ndr_srvsvc_c.o ++ ++LIBCLI_LSA_OBJ = autoconf/librpc/gen_ndr/ndr_lsa_c.o \ ++ rpc_client/cli_lsarpc.o \ ++ rpc_client/init_lsa.o ++ ++LIBCLI_SAMR_OBJ = autoconf/librpc/gen_ndr/ndr_samr_c.o \ ++ rpc_client/cli_samr.o ++ ++LIBCLI_NETLOGON_OBJ = autoconf/librpc/gen_ndr/ndr_netlogon_c.o \ ++ rpc_client/cli_netlogon.o \ ++ rpc_client/util_netlogon.o \ ++ rpc_client/init_netlogon.o ++ ++LIBCLI_EPMAPPER_OBJ = autoconf/librpc/gen_ndr/ndr_epmapper_c.o ++ ++LIBCLI_FSRVP_OBJ = autoconf/librpc/gen_ndr/ndr_fsrvp_c.o ++ ++LIBNDR_GEN_OBJ = autoconf/librpc/gen_ndr/ndr_wkssvc.o \ ++ $(LIBNDR_GEN_OBJ0) \ ++ autoconf/librpc/gen_ndr/ndr_dfs.o \ ++ autoconf/librpc/gen_ndr/ndr_dfsblobs.o \ ++ autoconf/librpc/gen_ndr/ndr_echo.o \ ++ autoconf/librpc/gen_ndr/ndr_winreg.o \ ++ autoconf/librpc/gen_ndr/ndr_initshutdown.o \ ++ autoconf/librpc/gen_ndr/ndr_srvsvc.o \ ++ autoconf/librpc/gen_ndr/ndr_eventlog.o \ ++ $(LIBNDR_NETLOGON_OBJ) \ ++ autoconf/librpc/gen_ndr/ndr_dssetup.o \ ++ autoconf/librpc/gen_ndr/ndr_epmapper.o \ ++ autoconf/librpc/gen_ndr/ndr_ntsvcs.o \ ++ $(LIBNDR_SPOOLSS_OBJ) \ ++ autoconf/librpc/gen_ndr/ndr_fsrvp.o ++ ++# this includes only the low level parse code, not stuff ++# that requires knowledge of security contexts ++REG_PARSE_PRS_OBJ = registry/reg_parse_prs.o ++ ++LIBREPLACE_OBJ = @LIBREPLACE_OBJS@ ++ ++SOCKET_WRAPPER_OBJ = @SOCKET_WRAPPER_OBJS@ ++NSS_WRAPPER_OBJ = @NSS_WRAPPER_OBJS@ ++UID_WRAPPER_OBJ = @UID_WRAPPER_OBJS@ ++ ++LIBSAMBAUTIL_OBJ = \ ++ $(LIBREPLACE_OBJ) \ ++ $(SOCKET_WRAPPER_OBJ) \ ++ $(UID_WRAPPER_OBJ) \ ++ $(NSS_WRAPPER_OBJ) ++ ++UTIL_OBJ = ../lib/util/rbtree.o ../lib/util/signal.o ../lib/util/time.o \ ++ ../lib/util/xfile.o ../lib/util/util_strlist.o \ ++ ../lib/util/util_file.o ../lib/util/data_blob.o \ ++ ../lib/util/util.o ../lib/util/util_paths.o ../lib/util/fsusage.o \ ++ ../lib/util/params.o ../lib/util/talloc_stack.o \ ++ ../lib/util/genrand.o ../lib/util/util_net.o \ ++ ../lib/util/become_daemon.o ../lib/util/system.o \ ++ ../lib/util/tevent_unix.o ../lib/util/tevent_ntstatus.o \ ++ ../lib/util/tevent_werror.o ../lib/util/util_process.o\ ++ lib/tevent_barrier.o \ ++ ../lib/util/smb_threads.o ../lib/util/util_id.o \ ++ ../lib/util/blocking.o ../lib/util/rfc1738.o \ ++ ../lib/util/select.o ../lib/util/util_pw.o ../lib/util/server_id.o \ ++ ../lib/util/setid.o ../lib/util/pidfile.o ../lib/util/getpass.o ++ ++CRYPTO_OBJ = ../lib/crypto/crc32.o @CRYPTO_MD5_OBJ@ \ ++ ../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \ ++ ../lib/crypto/md4.o \ ++ ../lib/crypto/sha256.o ../lib/crypto/hmacsha256.o \ ++ ../lib/crypto/aes.o ../lib/crypto/rijndael-alg-fst.o \ ++ ../lib/crypto/aes_cmac_128.o ../lib/crypto/aes_ccm_128.o ++ ++LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) $(LIBTSOCKET_OBJ) \ ++ lib/messages.o autoconf/librpc/gen_ndr/ndr_messaging.o lib/messages_local.o \ ++ lib/messages_ctdbd.o lib/ctdb_packet.o lib/ctdbd_conn.o \ ++ lib/ctdb_conn.o \ ++ lib/msg_channel.o \ ++ lib/id_cache.o \ ++ ../lib/socket/interfaces.o lib/memcache.o \ ++ lib/talloc_dict.o \ ++ lib/serverid.o \ ++ lib/asys/asys.o \ ++ lib/util_transfer_file.o ../lib/async_req/async_sock.o \ ++ lib/addrchange.o \ ++ $(TDB_LIB_OBJ) \ ++ $(VERSION_OBJ) lib/charcnv.o ../lib/util/charset/convert_string.o \ ++ ../lib/util/charset/pull_push.o \ ++ lib/fstring.o ../lib/util/debug.o ../lib/util/debug_s3.o ../lib/util/fault.o \ ++ lib/interface.o lib/dumpcore.o \ ++ lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \ ++ lib/username.o \ ++ ../libds/common/flag_mapping.o \ ++ lib/access.o lib/smbrun.o \ ++ ../lib/util/bitmap.o ../lib/util/dprintf.o $(UTIL_REG_OBJ) \ ++ lib/wins_srv.o \ ++ lib/util_str.o ../lib/util/util_str_common.o \ ++ ../lib/util/util_str.o \ ++ ../lib/util/base64.o lib/util_sid.o \ ++ ../lib/util/charset/util_unistr.o \ ++ ../lib/util/charset/util_unistr_w.o ../lib/util/charset/codepoints.o ../lib/util/charset/util_str.o lib/util_file.o \ ++ lib/util.o lib/util_malloc.o lib/namearray.o lib/util_cmdline.o lib/util_names.o \ ++ lib/util_sock.o lib/sock_exec.o lib/util_sec.o \ ++ lib/substitute.o lib/substitute_generic.o ../lib/util/substitute.o \ ++ lib/ms_fnmatch.o ../lib/util/ms_fnmatch.o lib/errmap_unix.o ../libcli/util/errmap_unix.o \ ++ lib/tallocmsg.o lib/dmallocmsg.o \ ++ ../libcli/smb/smb_signing.o \ ++ ../lib/util/charset/iconv.o ../lib/util/charset/weird.o \ ++ ../lib/util/charset/charset_macosxfs.o intl/lang_tdb.o \ ++ lib/adt_tree.o lib/gencache.o \ ++ ../lib/util/modules.o lib/events.o ../lib/util/tevent_debug.o @LIBTEVENT_OBJ0@ \ ++ @CCAN_OBJ@ \ ++ lib/server_contexts.o \ ++ lib/server_prefork.o \ ++ lib/server_prefork_util.o \ ++ lib/ldap_escape.o \ ++ ../libcli/security/secdesc.o ../libcli/security/access_check.o \ ++ ../libcli/security/secace.o ../libcli/security/object_tree.o \ ++ ../libcli/security/sddl.o ../libcli/security/session.o \ ++ ../libcli/security/secacl.o @PTHREADPOOL_OBJ@ \ ++ lib/fncall.o \ ++ libads/krb5_errs.o lib/system_smbd.o lib/audit.o $(LIBNDR_OBJ) \ ++ lib/file_id.o lib/idmap_cache.o \ ++ lib/tevent_wait.o \ ++ ../libcli/security/dom_sid.o ../libcli/security/security_descriptor.o \ ++ ../libcli/security/security_token.o ../libcli/security/util_sid.o \ ++ ../libcli/smb/util.o ../lib/util/idtree.o ++ ++LIB_DUMMY_OBJ = lib/smbd_shim.o lib/dummyparam.o ++LIB_NONSMBD_OBJ = $(LIB_OBJ) $(LIB_DUMMY_OBJ) ++ ++READLINE_OBJ = ../libcli/smbreadline/smbreadline.o ++ ++# Also depends on $(SECRETS_OBJ) $(LIBSAMBA_OBJ) ++# Be sure to include them into your application ++POPT_LIB_OBJ = lib/popt_common.o ++ ++PARAM_WITHOUT_REG_OBJ = ../dynconfig/dynconfig.o param/loadparm.o param/loadparm_ctx.o ../lib/param/loadparm_server_role.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o ../lib/param/loadparm.o ../lib/param/util.o ++PARAM_REG_ADD_OBJ = $(REG_SMBCONF_OBJ) $(LIBSMBCONF_OBJ) $(PRIVILEGES_BASIC_OBJ) ++PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ) ++ ++KRBCLIENT_OBJ = libads/kerberos.o libads/ads_status.o ++ ++LIBADDNS_OBJ0 = ../lib/addns/dnsrecord.o ../lib/addns/dnsutils.o ../lib/addns/dnssock.o \ ++ ../lib/addns/dnsgss.o ../lib/addns/dnsmarshall.o ../lib/addns/error.o ++LIBADDNS_OBJ = $(LIBADDNS_OBJ0) $(SOCKET_WRAPPER_OBJ) ++ ++GPEXT_OBJ = ../libgpo/gpext/gpext.o @GPEXT_STATIC@ ++ ++LIBGPO_OBJ0 = ../libgpo/gpo_ldap.o ../libgpo/gpo_ini.o ../libgpo/gpo_util.o \ ++ ../libgpo/gpo_fetch.o libgpo/gpo_filesync.o ../libgpo/gpo_sec.o \ ++ libgpo/gpo_reg.o \ ++ $(GPEXT_OBJ) ++LIBGPO_OBJ = $(LIBGPO_OBJ0) ++ ++LIBADS_OBJ = libads/ldap.o \ ++ libads/sasl.o libads/sasl_wrapping.o \ ++ libads/krb5_setpw.o \ ++ libads/kerberos_util.o \ ++ libads/ldap_user.o \ ++ libads/ads_struct.o libads/kerberos_keytab.o \ ++ libads/disp_sec.o libads/ldap_utils.o \ ++ libads/ldap_schema.o libads/util.o libads/ndr.o ++ ++LIBADS_SERVER_OBJ = libads/authdata.o ../auth/kerberos/kerberos_pac.o \ ++ ../librpc/ndr/ndr_krb5pac.o \ ++ autoconf/librpc/gen_ndr/ndr_krb5pac.o ++ ++LIBADS_PRINTER_OBJ = libads/ldap_printer.o ++ ++SECRETS_OBJ = passdb/secrets.o passdb/machine_account_secrets.o passdb/machine_sid.o \ ++ autoconf/librpc/gen_ndr/ndr_secrets.o \ ++ passdb/secrets_lsa.o ++ ++LIBNBT_OBJ = ../libcli/nbt/nbtname.o \ ++ ../libcli/netlogon/netlogon.o \ ++ autoconf/librpc/gen_ndr/ndr_nbt.o \ ++ ../librpc/ndr/ndr_nbt.o \ ++ autoconf/librpc/gen_ndr/ndr_svcctl.o \ ++ ../librpc/ndr/ndr_svcctl.o ++ ++LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \ ++ libsmb/namequery.o ../libcli/nbt/lmhosts.o ../libcli/dns/dns_hosts_file.o libsmb/conncache.o \ ++ ../lib/addns/dnsquery.o libads/sitename_cache.o ++ ++NTERR_OBJ = ../libcli/util/nterr.o libsmb/smberr.o ++DOSERR_OBJ = ../libcli/util/doserr.o ++ERRORMAP_OBJ = ../libcli/util/errormap.o libsmb/errormap.o ++DCE_RPC_ERR_OBJ = ../librpc/rpc/dcerpc_error.o ++ ++LIBSMB_ERR_OBJ0 = $(NTERR_OBJ) $(DOSERR_OBJ) $(ERRORMAP_OBJ) $(DCE_RPC_ERR_OBJ) ++ ++LIBSMB_ERR_OBJ1 = ../libcli/auth/smbdes.o ../libcli/auth/smbencrypt.o ../libcli/auth/msrpc_parse.o ../libcli/auth/session.o ++ ++LIBSMB_ERR_OBJ = $(LIBSMB_ERR_OBJ0) $(LIBSMB_ERR_OBJ1) \ ++ $(SECRETS_OBJ) ++ ++LIBSMB_OBJ0 = \ ++ ../lib/util/asn1.o \ ++ ../libcli/auth/spnego_parse.o \ ++ ../libcli/auth/ntlm_check.o \ ++ libsmb/ntlmssp.o \ ++ libsmb/ntlmssp_wrap.o \ ++ libsmb/auth_generic.o \ ++ ../lib/krb5_wrap/krb5_samba.o \ ++ libsmb/clispnego.o \ ++ ../auth/gensec/gensec.o \ ++ ../auth/gensec/gensec_start.o \ ++ ../auth/gensec/gensec_util.o \ ++ ../auth/gensec/spnego.o \ ++ ../auth/credentials/credentials.o \ ++ ../auth/credentials/credentials_ntlm.o \ ++ ../auth/credentials/credentials_samba3.o \ ++ ../auth/ntlmssp/ntlmssp.o \ ++ ../auth/ntlmssp/ntlmssp_util.o \ ++ ../auth/ntlmssp/ntlmssp_sign.o \ ++ ../auth/ntlmssp/ntlmssp_client.o \ ++ ../auth/ntlmssp/gensec_ntlmssp.o \ ++ ../auth/ntlmssp/gensec_ntlmssp_server.o \ ++ $(LIBNDR_NTLMSSP_OBJ) \ ++ ../auth/ntlmssp/ntlmssp_ndr.o \ ++ ../auth/ntlmssp/ntlmssp_server.o ++ ++LIBSAMBA_OBJ = $(LIBSMB_OBJ0) \ ++ $(LIBSMB_ERR_OBJ) ++ ++LIBCLI_LDAP_MESSAGE_OBJ = ../libcli/ldap/ldap_message.o ++LIBCLI_LDAP_NDR_OBJ = ../libcli/ldap/ldap_ndr.o ../lib/ldb/common/ldb_parse.o ++ ++LIBTSOCKET_OBJ = ../lib/tsocket/tsocket.o \ ++ ../lib/tsocket/tsocket_helpers.o \ ++ ../lib/tsocket/tsocket_bsd.o ++ ++CLDAP_OBJ = libads/cldap.o \ ++ ../libcli/cldap/cldap.o \ ++ $(LIBCLI_LDAP_MESSAGE_OBJ) $(LIBCLI_LDAP_NDR_OBJ) ++ ++TLDAP_OBJ = lib/tldap.o lib/tldap_util.o lib/util_tsock.o ++ ++SCHANNEL_OBJ = ../libcli/auth/credentials.o \ ++ ../libcli/auth/schannel_sign.o \ ++ ../libcli/auth/schannel_state_tdb.o \ ++ $(LIBNDR_SCHANNEL_OBJ) ++ ++LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \ ++ libsmb/reparse_symlink.o \ ++ libsmb/clisymlink.o \ ++ libsmb/clirap.o libsmb/clierror.o libsmb/climessage.o \ ++ libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \ ++ libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \ ++ libsmb/clistr.o libsmb/cliquota.o libsmb/clifsinfo.o libsmb/clidfs.o \ ++ libsmb/clioplock.o libsmb/clirap2.o \ ++ libsmb/async_smb.o \ ++ ../libcli/smb/smb_seal.o \ ++ ../libcli/smb/read_smb.o \ ++ ../libcli/smb/smbXcli_base.o \ ++ ../libcli/smb/smb1cli_trans.o \ ++ ../libcli/smb/smb1cli_echo.o \ ++ ../libcli/smb/smb2cli_session.o \ ++ libsmb/smb2cli_tcon.o \ ++ ../libcli/smb/smb2cli_create.o \ ++ ../libcli/smb/smb2_create_blob.o \ ++ ../libcli/smb/smb2_signing.o \ ++ ../libcli/smb/smb2cli_close.o \ ++ ../libcli/smb/smb2cli_flush.o \ ++ ../libcli/smb/smb2cli_read.o \ ++ ../libcli/smb/smb2cli_write.o \ ++ ../libcli/smb/smb2cli_query_directory.o \ ++ ../libcli/smb/smb2cli_ioctl.o \ ++ ../libcli/smb/smb2cli_query_info.o \ ++ ../libcli/smb/smb2cli_set_info.o \ ++ ../libcli/smb/smb2cli_echo.o \ ++ libsmb/cli_np_tstream.o \ ++ libsmb/smbsock_connect.o \ ++ $(LIBSAMBA_OBJ) \ ++ $(LIBNMB_OBJ) \ ++ $(LIBNBT_OBJ) \ ++ $(CLDAP_OBJ) \ ++ $(DRSUAPI_OBJ) ++ ++LIBMSRPC_OBJ = $(SCHANNEL_OBJ) \ ++ rpc_client/cli_pipe.o \ ++ $(LIBCLI_NETLOGON_OBJ) \ ++ librpc/crypto/gse_krb5.o \ ++ librpc/crypto/gse.o \ ++ ../auth/kerberos/gssapi_pac.o \ ++ ../lib/krb5_wrap/gss_samba.o \ ++ librpc/rpc/rpc_common.o \ ++ rpc_client/rpc_transport_np.o \ ++ rpc_client/rpc_transport_sock.o \ ++ rpc_client/rpc_transport_tstream.o \ ++ ../librpc/rpc/binding.o \ ++ ../librpc/rpc/dcerpc_util.o \ ++ ../librpc/rpc/binding_handle.o \ ++ librpc/rpc/dcerpc_helpers.o \ ++ $(LIBCLI_EPMAPPER_OBJ) ++ ++LIBMSRPC_GEN_OBJ = $(LIBNDR_GEN_OBJ) ++ ++# ++# registry-related objects ++# ++UTIL_REG_OBJ = ../libcli/registry/util_reg.o ++ ++REG_INIT_BASIC_OBJ = registry/reg_init_basic.o ++REG_INIT_SMBCONF_OBJ = registry/reg_init_smbconf.o ++REG_INIT_FULL_OBJ = registry/reg_init_full.o ++ ++REGFIO_OBJ = registry/regfio.o \ ++ $(REG_PARSE_PRS_OBJ) ++ ++REG_API_REGF_OBJ = registry/reg_api_regf.o ++ ++REGOBJS_OBJ = registry/reg_objects.o ++ ++REG_BACKENDS_BASE_OBJ = registry/reg_backend_db.o ++ ++REG_BACKENDS_SMBCONF_OBJ = registry/reg_backend_smbconf.o ++ ++REG_BACKENDS_EXTRA_OBJ = registry/reg_backend_printing.o \ ++ registry/reg_backend_shares.o \ ++ registry/reg_backend_netlogon_params.o \ ++ registry/reg_backend_prod_options.o \ ++ registry/reg_backend_tcpip_params.o \ ++ registry/reg_backend_hkpt_params.o \ ++ registry/reg_backend_current_version.o \ ++ registry/reg_backend_perflib.o ++ ++REG_BASE_OBJ = registry/reg_api.o \ ++ registry/reg_dispatcher.o \ ++ registry/reg_cachehook.o \ ++ $(REGOBJS_OBJ) \ ++ registry/reg_util_internal.o \ ++ lib/util_nttoken.o \ ++ $(REG_BACKENDS_BASE_OBJ) \ ++ registry/reg_parse_internal.o \ ++ lib/cbuf.o lib/srprs.o \ ++ $(REG_INIT_BASIC_OBJ) ++ ++REG_SMBCONF_OBJ = $(REG_BASE_OBJ) \ ++ registry/reg_util_token.o \ ++ registry/reg_api_util.o \ ++ $(REG_BACKENDS_SMBCONF_OBJ) \ ++ $(REG_INIT_SMBCONF_OBJ) ++ ++REG_FULL_OBJ = $(REG_SMBCONF_OBJ) \ ++ $(REG_BACKENDS_EXTRA_OBJ) \ ++ $(REG_INIT_FULL_OBJ) \ ++ registry/reg_perfcount.o \ ++ autoconf/librpc/gen_ndr/ndr_perfcount.o ++ ++LIB_EVENTLOG_OBJ = lib/eventlog/eventlog.o ++ ++DCE_RPC_EP_OBJ = librpc/rpc/dcerpc_ep.o ++ ++RPC_LSARPC_OBJ = rpc_server/lsa/srv_lsa_nt.o \ ++ autoconf/librpc/gen_ndr/srv_lsa.o \ ++ ../libcli/lsarpc/util_lsarpc.o ++ ++RPC_NETLOGON_OBJ = rpc_server/netlogon/srv_netlog_nt.o \ ++ autoconf/librpc/gen_ndr/srv_netlogon.o ++ ++RPC_SAMR_OBJ = rpc_server/samr/srv_samr_nt.o \ ++ rpc_server/samr/srv_samr_util.o \ ++ rpc_server/samr/srv_samr_chgpasswd.o \ ++ autoconf/librpc/gen_ndr/srv_samr.o ++ ++RPC_INITSHUTDOWN_OBJ = autoconf/librpc/gen_ndr/srv_initshutdown.o rpc_server/initshutdown/srv_initshutdown_nt.o ++ ++RPC_WINREG_OBJ = rpc_server/winreg/srv_winreg_nt.o \ ++ autoconf/librpc/gen_ndr/srv_winreg.o ++ ++RPC_DSSETUP_OBJ = rpc_server/dssetup/srv_dssetup_nt.o autoconf/librpc/gen_ndr/srv_dssetup.o ++ ++RPC_SRVSVC_OBJ = rpc_server/srvsvc/srv_srvsvc_nt.o \ ++ autoconf/librpc/gen_ndr/srv_srvsvc.o ++ ++RPC_WKSSVC_OBJ = autoconf/librpc/gen_ndr/srv_wkssvc.o \ ++ rpc_server/wkssvc/srv_wkssvc_nt.o ++ ++RPC_SVCCTL_OBJ = rpc_server/svcctl/srv_svcctl_nt.o \ ++ rpc_server/svcctl/srv_svcctl_reg.o \ ++ autoconf/librpc/gen_ndr/srv_svcctl.o \ ++ services/svc_winreg_glue.o \ ++ services/svc_spoolss.o services/svc_rcinit.o \ ++ services/svc_netlogon.o services/svc_winreg.o \ ++ services/svc_wins.o ++ ++RPC_NTSVCS_OBJ = rpc_server/ntsvcs/srv_ntsvcs_nt.o \ ++ autoconf/librpc/gen_ndr/srv_ntsvcs.o ++ ++RPC_NETDFS_OBJ = autoconf/librpc/gen_ndr/srv_dfs.o \ ++ rpc_server/dfs/srv_dfs_nt.o ++ ++RPC_SPOOLSS_OBJ = rpc_server/spoolss/srv_spoolss_nt.o \ ++ rpc_server/spoolss/srv_spoolss_util.o \ ++ autoconf/librpc/gen_ndr/srv_spoolss.o ++ ++RPC_EVENTLOG_OBJ = rpc_server/eventlog/srv_eventlog_nt.o \ ++ rpc_server/eventlog/srv_eventlog_reg.o \ ++ $(LIB_EVENTLOG_OBJ) autoconf/librpc/gen_ndr/srv_eventlog.o ++ ++NPA_TSTREAM_OBJ = ../libcli/named_pipe_auth/npa_tstream.o \ ++ autoconf/librpc/gen_ndr/ndr_named_pipe_auth.o \ ++ ../auth/auth_sam_reply.o autoconf/librpc/gen_ndr/ndr_auth.o ../librpc/ndr/ndr_auth.o ++ ++RPC_NCACN_NP = rpc_server/srv_pipe_register.o rpc_server/rpc_ncacn_np.o \ ++ rpc_server/rpc_handles.o rpc_server/rpc_contexts.o \ ++ rpc_server/srv_access_check.o ++ ++RPC_CONFIG = rpc_server/rpc_config.o ++ ++RPC_SERVICE = rpc_server/rpc_server.o ++ ++RPC_CRYPTO = rpc_server/dcesrv_auth_generic.o ++ ++RPC_PIPE_OBJ = rpc_server/srv_pipe.o rpc_server/srv_pipe_hnd.o \ ++ $(RPC_CONFIG) $(RPC_NCACN_NP) $(RPC_SERVICE) $(RPC_CRYPTO) ++ ++RPC_RPCECHO_OBJ = rpc_server/echo/srv_echo_nt.o autoconf/librpc/gen_ndr/srv_echo.o ++ ++RPC_EPMAPPER_OBJ = rpc_server/epmapper/srv_epmapper.o autoconf/librpc/gen_ndr/srv_epmapper.o ++ ++RPC_SERVER_REGISTER_OBJ = rpc_server/rpc_ep_register.o $(DCE_RPC_EP_OBJ) ++ ++RPC_SERVER_OBJ = $(RPC_LSARPC_OBJ) $(RPC_WINREG_OBJ) $(RPC_INITSHUTDOWN_OBJ) \ ++ $(RPC_DSSETUP_OBJ) $(RPC_WKSSVC_OBJ) $(RPC_SVCCTL_OBJ) \ ++ $(RPC_NTSVCS_OBJ) $(RPC_NETLOGON_OBJ) $(RPC_NETDFS_OBJ) \ ++ $(RPC_SRVSVC_OBJ) $(RPC_SPOOLSS_OBJ) $(RPC_EVENTLOG_OBJ) \ ++ $(RPC_SAMR_OBJ) $(RPC_RPCECHO_OBJ) $(RPC_EPMAPPER_OBJ) \ ++ $(RPC_PIPE_OBJ) $(NPA_TSTREAM_OBJ) \ ++ $(LIBCLI_SPOOLSS_OBJ) \ ++ $(LIBCLI_WINREG_INT_OBJ) \ ++ $(LIBCLI_SRVSVC_OBJ) \ ++ $(LIBCLI_LSA_OBJ) \ ++ $(LIBCLI_SAMR_OBJ) \ ++ $(RPC_SERVER_REGISTER_OBJ) \ ++ $(RPC_CLIENT_SCHANNEL_OBJ) \ ++ rpc_server/rpc_sock_helper.o \ ++ rpc_server/rpc_service_setup.o \ ++ rpc_client/init_samr.o ++ ++RPC_CLIENT_SCHANNEL_OBJ = rpc_client/cli_pipe_schannel.o ++ ++LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o \ ++ autoconf/librpc/gen_ndr/ndr_open_files.o locking/share_mode_lock.o ++ ++PRIVILEGES_BASIC_OBJ = ../libcli/security/privileges.o ++ ++PRIVILEGES_OBJ = lib/privileges.o ++ ++PASSDB_GET_SET_OBJ = passdb/pdb_get_set.o ++ ++PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \ ++ lib/util_wellknown.o lib/util_builtin.o passdb/pdb_compat.o \ ++ lib/util_sid_passdb.o \ ++ lib/util_unixsids.o passdb/lookup_sid.o \ ++ passdb/login_cache.o @PDB_STATIC@ \ ++ passdb/account_pol.o $(PRIVILEGES_OBJ) \ ++ lib/util_nscd.o lib/winbind_util.o $(SERVER_MUTEX_OBJ) \ ++ passdb/pdb_util.o passdb/pdb_ldap_schema.o \ ++ passdb/pdb_secrets.o ++ ++DEVEL_HELP_WEIRD_OBJ = ../lib/util/charset/weird.o ++CHARSET_MACOSXFS_OBJ = ../lib/util/charset/charset_macosxfs.o ++ ++GROUPDB_OBJ = groupdb/mapping.o groupdb/mapping_tdb.o ++ ++PROFILE_OBJ = profile/profile.o ++PROFILES_OBJ = utils/profiles.o \ ++ $(LIBSMB_ERR_OBJ) \ ++ $(PARAM_OBJ) \ ++ $(LIB_OBJ) $(LIB_DUMMY_OBJ) \ ++ $(POPT_LIB_OBJ) \ ++ $(REGFIO_OBJ) ++ ++OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o ++ ++NOTIFY_OBJ = smbd/notify.o smbd/notify_inotify.o smbd/notify_internal.o \ ++ autoconf/librpc/gen_ndr/ndr_notify.o ++ ++FNAME_UTIL_OBJ = lib/filename_util.o ++ ++NFS4ACL_OBJ = modules/nfs4_acls.o modules/non_posix_acls.o ++ ++VFS_DEFAULT_OBJ = modules/vfs_default.o ++VFS_AUDIT_OBJ = modules/vfs_audit.o ++VFS_EXTD_AUDIT_OBJ = modules/vfs_extd_audit.o ++VFS_FULL_AUDIT_OBJ = modules/vfs_full_audit.o ++VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o ++VFS_FAKE_ACLS_OBJ = modules/vfs_fake_acls.o autoconf/librpc/gen_ndr/ndr_smb_acl.o ++VFS_RECYCLE_OBJ = modules/vfs_recycle.o ++VFS_NETATALK_OBJ = modules/vfs_netatalk.o ++VFS_DEFAULT_QUOTA_OBJ = modules/vfs_default_quota.o ++VFS_READONLY_OBJ = modules/vfs_readonly.o modules/getdate.o ++VFS_CAP_OBJ = modules/vfs_cap.o ++VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o ++VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o ++VFS_SHADOW_COPY2_OBJ = modules/vfs_shadow_copy2.o ++VFS_AFSACL_OBJ = modules/vfs_afsacl.o ++VFS_XATTR_TDB_OBJ = modules/vfs_xattr_tdb.o lib/xattr_tdb.o ++VFS_POSIXACL_OBJ = modules/vfs_posixacl.o ++VFS_AIXACL_OBJ = modules/vfs_aixacl.o modules/vfs_aixacl_util.o ++VFS_AIXACL2_OBJ = modules/vfs_aixacl2.o modules/vfs_aixacl_util.o $(NFS4ACL_OBJ) ++VFS_SOLARISACL_OBJ = modules/vfs_solarisacl.o ++VFS_ZFSACL_OBJ = modules/vfs_zfsacl.o $(NFS4ACL_OBJ) ++VFS_NFS4ACL_XATTR_OBJ = modules/vfs_nfs4acl_xattr.o $(LIBNDR_NFS4ACL_OBJ) $(NFS4ACL_OBJ) ++VFS_HPUXACL_OBJ = modules/vfs_hpuxacl.o ++VFS_TRU64ACL_OBJ = modules/vfs_tru64acl.o ++VFS_CATIA_OBJ = modules/vfs_catia.o ++VFS_STREAMS_XATTR_OBJ = modules/vfs_streams_xattr.o ++VFS_STREAMS_DEPOT_OBJ = modules/vfs_streams_depot.o ++VFS_CACHEPRIME_OBJ = modules/vfs_cacheprime.o ++VFS_PREALLOC_OBJ = modules/vfs_prealloc.o ++VFS_COMMIT_OBJ = modules/vfs_commit.o ++VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o $(NFS4ACL_OBJ) ++VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o ++VFS_READAHEAD_OBJ = modules/vfs_readahead.o ++VFS_TSMSM_OBJ = modules/vfs_tsmsm.o ++VFS_FILEID_OBJ = modules/vfs_fileid.o ++VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o ++VFS_AIO_PTHREAD_OBJ = modules/vfs_aio_pthread.o ++VFS_AIO_POSIX_OBJ = modules/vfs_aio_posix.o ++VFS_AIO_LINUX_OBJ = modules/vfs_aio_linux.o ++VFS_PREOPEN_OBJ = modules/vfs_preopen.o ++VFS_SYNCOPS_OBJ = modules/vfs_syncops.o ++VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o ++VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o ++VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o ++PERFCOUNT_TEST_OBJ = modules/perfcount_test.o ++VFS_DIRSORT_OBJ = modules/vfs_dirsort.o ++VFS_SCANNEDONLY_OBJ = modules/vfs_scannedonly.o ++VFS_CROSSRENAME_OBJ = modules/vfs_crossrename.o ++VFS_LINUX_XFS_SGID_OBJ = modules/vfs_linux_xfs_sgid.o ++VFS_TIME_AUDIT_OBJ = modules/vfs_time_audit.o ++VFS_MEDIA_HARMONY_OBJ = modules/vfs_media_harmony.o ++VFS_BTRFS_OBJ = modules/vfs_btrfs.o ++VFS_CEPH_OBJ = modules/vfs_ceph.o ++ ++PAM_ERRORS_OBJ = ../libcli/auth/pam_errors.o ++PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o $(PAM_ERRORS_OBJ) ++ ++SLCACHE_OBJ = libsmb/samlogon_cache.o ++ ++DCUTIL_OBJ = libsmb/namequery_dc.o libsmb/trustdom_cache.o libsmb/trusts_util.o libsmb/dsgetdcname.o ++ ++AUTH_BUILTIN_OBJ = auth/auth_builtin.o ++AUTH_DOMAIN_OBJ = auth/auth_domain.o ++AUTH_SAM_OBJ = auth/auth_sam.o auth/check_samsec.o ++AUTH_UNIX_OBJ = auth/auth_unix.o ++AUTH_WINBIND_OBJ = auth/auth_winbind.o ++AUTH_WBC_OBJ = auth/auth_wbc.o ++AUTH_SCRIPT_OBJ = auth/auth_script.o ++ ++AUTH_OBJ = auth/auth.o @AUTH_STATIC@ auth/auth_util.o auth/token_util.o \ ++ auth/server_info.o \ ++ auth/server_info_sam.o \ ++ auth/user_info.o \ ++ auth/user_util.o \ ++ auth/user_krb5.o \ ++ auth/auth_ntlmssp.o auth/auth_generic.o \ ++ $(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ) ++ ++MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_hash2.o ++ ++SMBD_OBJ_MAIN = smbd/server.o smbd/server_exit.o ++ ++BUILDOPT_OBJ = smbd/build_options.o ++ ++SMBD_OBJ_SRV = smbd/server_reload.o \ ++ smbd/files.o smbd/connection.o \ ++ smbd/utmp.o smbd/session.o \ ++ smbd/dfree.o smbd/dir.o smbd/password.o smbd/conn.o smbd/conn_idle.o smbd/conn_msg.o \ ++ smbd/share_access.o smbd/fileio.o \ ++ smbd/ipc.o smbd/lanman.o smbd/negprot.o \ ++ smbd/message.o smbd/nttrans.o smbd/pipes.o \ ++ smbd/reply.o smbd/sesssetup.o smbd/trans2.o smbd/uid.o \ ++ smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \ ++ smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \ ++ smbd/vfs.o smbd/perfcount.o smbd/statcache.o smbd/seal.o \ ++ smbd/posix_acls.o lib/sysacls.o autoconf/librpc/gen_ndr/ndr_smb_acl.o\ ++ smbd/process.o smbd/service.o param/service.o smbd/error.o \ ++ rpc_server/epmd.o \ ++ rpc_server/lsasd.o \ ++ printing/printspoolss.o printing/spoolssd.o \ ++ lib/sysquotas.o lib/sysquotas_linux.o \ ++ lib/sysquotas_xfs.o lib/sysquotas_4A.o lib/sysquotas_4B.o \ ++ lib/sysquotas_nfs.o \ ++ lib/smbd_shim.o \ ++ lib/background.o \ ++ smbd/fake_file.o \ ++ smbd/quotas.o smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \ ++ $(AFS_SETTOKEN_OBJ) smbd/aio.o smbd/statvfs.o \ ++ smbd/dmapi.o smbd/signing.o \ ++ smbd/file_access.o \ ++ smbd/dnsregister.o smbd/globals.o \ ++ smbd/smb2_server.o \ ++ smbd/smb2_glue.o \ ++ smbd/smb2_negprot.o \ ++ smbd/smb2_sesssetup.o \ ++ smbd/smb2_tcon.o \ ++ smbd/smb2_create.o \ ++ smbd/smb2_close.o \ ++ smbd/smb2_flush.o \ ++ smbd/smb2_read.o \ ++ smbd/smb2_write.o \ ++ smbd/smb2_lock.o \ ++ smbd/smb2_ioctl.o \ ++ smbd/smb2_ioctl_dfs.o \ ++ smbd/smb2_ioctl_filesys.o \ ++ smbd/smb2_ioctl_named_pipe.o \ ++ smbd/smb2_ioctl_network_fs.o \ ++ smbd/smb2_keepalive.o \ ++ smbd/smb2_find.o \ ++ smbd/smb2_notify.o \ ++ smbd/smb2_getinfo.o \ ++ smbd/smb2_setinfo.o \ ++ smbd/smb2_break.o \ ++ autoconf/librpc/gen_ndr/ndr_smbXsrv.o \ ++ smbd/smbXsrv_version.o \ ++ smbd/smbXsrv_session.o \ ++ smbd/smbXsrv_tcon.o \ ++ smbd/smbXsrv_open.o \ ++ smbd/durable.o \ ++ smbd/scavenger.o \ ++ autoconf/librpc/gen_ndr/ndr_ioctl.o \ ++ $(MANGLE_OBJ) @VFS_STATIC@ ++ ++SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \ ++ $(RPC_SERVER_OBJ) \ ++ $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) \ ++ $(LIB_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) \ ++ $(NOTIFY_OBJ) $(FNAME_UTIL_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \ ++ $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(AVAHI_OBJ) \ ++ $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(LIBADS_SERVER_OBJ) $(LIBADS_PRINTER_OBJ) \ ++ $(REG_FULL_OBJ) $(POPT_LIB_OBJ) $(BUILDOPT_OBJ) \ ++ $(SMBLDAP_OBJ) $(LIBNET_OBJ) \ ++ $(LIBSMBCONF_OBJ) \ ++ $(PRIVILEGES_BASIC_OBJ) \ ++ $(REGFIO_OBJ) \ ++ $(REG_API_REGF_OBJ) \ ++ $(LIBNDR_XATTR_OBJ) \ ++ lib/conn_tdb.o lib/sessionid_tdb.o ++ ++ ++PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \ ++ printing/print_cups.o printing/print_generic.o \ ++ printing/lpq_parse.o printing/load.o \ ++ printing/print_iprint.o printing/print_standard.o \ ++ printing/printer_list.o autoconf/librpc/gen_ndr/ndr_printcap.o ++ ++PRINTBASE_OBJ = printing/notify.o printing/printing_db.o ++PRINTBACKEND_OBJ = printing/printing.o \ ++ printing/nt_printing.o \ ++ printing/nt_printing_tdb.o \ ++ printing/nt_printing_migrate.o \ ++ printing/nt_printing_migrate_internal.o \ ++ printing/nt_printing_ads.o \ ++ autoconf/librpc/gen_ndr/ndr_ntprinting.o \ ++ ../librpc/ndr/ndr_ntprinting.o \ ++ printing/queue_process.o \ ++ $(PRINTBASE_OBJ) ++ ++SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN) ++ ++NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \ ++ nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \ ++ nmbd/nmbd_browsesync.o nmbd/nmbd_elections.o \ ++ nmbd/nmbd_incomingdgrams.o nmbd/nmbd_incomingrequests.o \ ++ nmbd/nmbd_lmhosts.o nmbd/nmbd_logonnames.o nmbd/nmbd_mynames.o \ ++ nmbd/nmbd_namelistdb.o nmbd/nmbd_namequery.o \ ++ nmbd/nmbd_nameregister.o nmbd/nmbd_namerelease.o \ ++ nmbd/nmbd_nodestatus.o nmbd/nmbd_packets.o \ ++ nmbd/nmbd_processlogon.o nmbd/nmbd_responserecordsdb.o \ ++ nmbd/nmbd_sendannounce.o nmbd/nmbd_serverlistdb.o \ ++ nmbd/nmbd_subnetdb.o nmbd/nmbd_winsproxy.o nmbd/nmbd_winsserver.o \ ++ nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o ++ ++NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \ ++ $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) ++ ++ ++STATUS_OBJ = utils/status.o utils/status_profile.o $(SMBD_OBJ_BASE) ++ ++ ++SMBCONTROL_OBJ = utils/smbcontrol.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_ERR_OBJ) $(POPT_LIB_OBJ) $(PRINTBASE_OBJ) ++ ++SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \ ++ $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) \ ++ $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \ ++ $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \ ++ $(LIBMSRPC_GEN_OBJ) \ ++ $(LIBMSRPC_OBJ) \ ++ $(LIBCLI_SRVSVC_OBJ) ++ ++TESTPARM_OBJ = utils/testparm.o \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \ ++ $(LIBSMB_ERR_OBJ) ++ ++SMBTA_UTIL_OBJ = utils/smbta-util.o $(PARAM_OBJ) $(POPT_LIB_OBJ) \ ++ $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_ERR_OBJ) $(FNAME_UTIL_OBJ) ++ ++TEST_LP_LOAD_OBJ = param/test_lp_load.o \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(POPT_LIB_OBJ) $(LIBSAMBA_OBJ) ++ ++PASSWD_UTIL_OBJ = utils/passwd_util.o ++ ++SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) $(PASSCHANGE_OBJ) \ ++ $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \ ++ $(GROUPDB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \ ++ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \ ++ $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \ ++ $(LIBCLI_SAMR_OBJ) \ ++ rpc_client/init_lsa.o ++ ++PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) \ ++ $(AFS_SETTOKEN_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) \ ++ $(LIBSMB_ERR_OBJ0) $(LIBSMB_ERR_OBJ1) $(SECRETS_OBJ) \ ++ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \ ++ ../lib/util/asn1.o $(LIBCLI_LDAP_NDR_OBJ) \ ++ $(LIBNDR_DRSUAPI_OBJ) $(LIBNDR_GEN_OBJ0) $(COMPRESSION_OBJ) ++ ++SMBGET_OBJ = utils/smbget.o $(POPT_LIB_OBJ) $(LIBSMBCLIENT_OBJ1) ++ ++DISPLAY_SEC_OBJ= ../libcli/security/display_sec.o ++ ++RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \ ++ rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \ ++ rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \ ++ rpcclient/cmd_dfs.o rpcclient/cmd_epmapper.o \ ++ rpcclient/cmd_dssetup.o rpcclient/cmd_echo.o \ ++ rpcclient/cmd_shutdown.o rpcclient/cmd_test.o \ ++ rpcclient/cmd_wkssvc.o rpcclient/cmd_ntsvcs.o \ ++ rpcclient/cmd_drsuapi.o rpcclient/cmd_eventlog.o \ ++ rpcclient/cmd_winreg.o rpcclient/cmd_fss.o \ ++ $(DISPLAY_SEC_OBJ) ++ ++RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \ ++ $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(PASSDB_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \ ++ $(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIBADS_OBJ) $(POPT_LIB_OBJ) \ ++ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \ ++ $(LIBCLI_SPOOLSS_OBJ) \ ++ $(LIBCLI_EVENTLOG_OBJ) \ ++ $(LIBCLI_NTSVCS_OBJ) \ ++ $(LIBCLI_DRSUAPI_OBJ) \ ++ $(LIBCLI_DFS_OBJ) \ ++ $(LIBCLI_ECHO_OBJ) \ ++ $(LIBCLI_DSSETUP_OBJ) \ ++ $(LIBCLI_WKSSVC_OBJ) \ ++ $(LIBCLI_SRVSVC_OBJ) \ ++ $(LIBCLI_LSA_OBJ) \ ++ $(LIBCLI_SAMR_OBJ) \ ++ $(LIBCLI_WINREG_OBJ) \ ++ $(LIBCLI_FSRVP_OBJ) \ ++ $(RPC_CLIENT_SCHANNEL_OBJ) \ ++ rpc_client/init_samr.o ++ ++PAM_WINBIND_OBJ = ../nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \ ++ $(LIBREPLACE_OBJ) @BUILD_INIPARSER@ ++ ++LIBSMBCLIENT_THREAD_OBJ = \ ++ libsmb/libsmb_thread_impl.o \ ++ libsmb/libsmb_thread_posix.o ++ ++LIBSMBCLIENT_OBJ0 = \ ++ libsmb/libsmb_cache.o \ ++ libsmb/libsmb_compat.o \ ++ libsmb/libsmb_context.o \ ++ libsmb/libsmb_dir.o \ ++ libsmb/libsmb_file.o \ ++ libsmb/libsmb_misc.o \ ++ libsmb/libsmb_path.o \ ++ libsmb/libsmb_printjob.o \ ++ libsmb/libsmb_server.o \ ++ libsmb/libsmb_stat.o \ ++ libsmb/libsmb_xattr.o \ ++ libsmb/libsmb_setget.o ++ ++LIBSMBCLIENT_OBJ1 = $(LIBSMBCLIENT_OBJ0) \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \ ++ $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \ ++ $(LIBCLI_SRVSVC_OBJ) \ ++ $(LIBCLI_LSA_OBJ) ++ ++LIBSMBCLIENT_OBJ = $(LIBSMBCLIENT_OBJ1) ++ ++CLIENT_OBJ1 = client/client.o client/clitar.o \ ++ client/dnsbrowse.o \ ++ $(LIBMSRPC_OBJ) ++ ++CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(LIBMSRPC_GEN_OBJ) \ ++ $(READLINE_OBJ) $(POPT_LIB_OBJ) \ ++ $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \ ++ $(DISPLAY_SEC_OBJ) \ ++ $(LIBCLI_SRVSVC_OBJ) ++ ++LIBSMBCONF_OBJ = ../lib/smbconf/smbconf.o \ ++ ../lib/smbconf/smbconf_util.o \ ++ ../lib/smbconf/smbconf_txt.o \ ++ lib/smbconf/smbconf_reg.o \ ++ lib/smbconf/smbconf_init.o ++ ++SMBCONFTORT_OBJ0 = lib/smbconf/testsuite.o ++ ++SMBCONFTORT_OBJ = $(SMBCONFTORT_OBJ0) \ ++ $(LIB_NONSMBD_OBJ) \ ++ $(PARAM_OBJ) \ ++ $(LIBSMB_ERR_OBJ) \ ++ $(POPT_LIB_OBJ) ++ ++PTHREADPOOLTEST_OBJ = lib/pthreadpool/pthreadpool.o \ ++ lib/pthreadpool/tests.o $(LIBREPLACE_OBJ) ++ ++LIBNET_OBJ = libnet/libnet_join.o \ ++ libnet/libnet_keytab.o \ ++ autoconf/librpc/gen_ndr/ndr_libnet_join.o ++ ++LIBNET_DSSYNC_OBJ = libnet/libnet_dssync.o \ ++ libnet/libnet_dssync_passdb.o \ ++ libnet/libnet_dssync_keytab.o \ ++ ../libcli/drsuapi/repl_decrypt.o ++ ++LIBNET_SAMSYNC_OBJ = libnet/libnet_samsync.o \ ++ libnet/libnet_samsync_ldif.o \ ++ libnet/libnet_samsync_passdb.o \ ++ libnet/libnet_samsync_display.o \ ++ libnet/libnet_samsync_keytab.o \ ++ ../libcli/samsync/decrypt.o ++ ++NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \ ++ utils/net_rap.o utils/net_rpc.o utils/net_rpc_samsync.o \ ++ utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o \ ++ utils/net_cache.o utils/net_groupmap.o utils/net_idmap.o \ ++ utils/net_idmap_check.o utils/interact.o \ ++ utils/net_status.o utils/net_rpc_printer.o utils/net_rpc_rights.o \ ++ utils/net_rpc_service.o utils/net_rpc_registry.o utils/net_usershare.o \ ++ utils/netlookup.o utils/net_sam.o utils/net_rpc_shell.o \ ++ utils/net_util.o utils/net_rpc_sh_acct.o utils/net_rpc_audit.o \ ++ $(PASSWD_UTIL_OBJ) utils/net_dns.o utils/net_ads_gpo.o \ ++ utils/net_conf.o utils/net_join.o utils/net_user.o \ ++ utils/net_group.o utils/net_file.o utils/net_registry.o utils/net_registry_check.o\ ++ utils/net_dom.o utils/net_share.o \ ++ utils/net_g_lock.o \ ++ utils/net_serverid.o \ ++ utils/net_eventlog.o \ ++ utils/net_printing.o \ ++ utils/net_rpc_trust.o \ ++ utils/net_rpc_conf.o\ ++ $(LIBNDR_PREG_OBJ) \ ++ $(LIBCLI_DRSUAPI_OBJ) \ ++ $(LIBCLI_INITSHUTDOWN_OBJ) \ ++ $(LIBCLI_DSSETUP_OBJ) \ ++ $(LIBCLI_SVCCTL_OBJ) \ ++ $(LIBCLI_WKSSVC_OBJ) \ ++ registry/reg_parse.o registry/reg_format.o \ ++ registry/reg_import.o ++ ++# these are not processed by make proto ++NET_OBJ2 = utils/net_registry_util.o utils/net_help_common.o ++ ++NET_OBJ = $(NET_OBJ1) \ ++ $(NET_OBJ2) @FAKE_KASERVER_OBJ@ \ ++ $(LIBADDNS_OBJ0) \ ++ $(READLINE_OBJ) \ ++ $(LIBGPO_OBJ) $(INIPARSER_OBJ) $(DISPLAY_SEC_OBJ) \ ++ $(LIBNET_DSSYNC_OBJ) $(LIBNET_SAMSYNC_OBJ) \ ++ $(SMBD_OBJ_BASE) ++ ++CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \ ++ $(AFS_SETTOKEN_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) ++ ++NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(LIBNMB_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(LIBSMB_ERR_OBJ) ++ ++SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/utable.o \ ++ torture/denytest.o torture/mangle_test.o \ ++ torture/nbench.o \ ++ torture/test_async_echo.o \ ++ torture/test_smbsock_any_connect.o \ ++ torture/test_nttrans_create.o \ ++ torture/test_nttrans_fsctl.o \ ++ torture/test_notify_online.o \ ++ torture/test_addrchange.o \ ++ torture/test_case_insensitive.o \ ++ torture/test_posix_append.o \ ++ torture/test_smb2.o \ ++ torture/test_chain3.o \ ++ torture/test_authinfo_structs.o \ ++ torture/test_cleanup.o \ ++ torture/test_ctdbconn.o \ ++ torture/test_msg.o \ ++ torture/test_notify.o \ ++ torture/test_dbwrap_watch.o \ ++ torture/test_idmap_tdb_common.o \ ++ torture/test_dbwrap_ctdb.o \ ++ torture/t_strappend.o ++ ++SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) $(TLDAP_OBJ) \ ++ $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LOCKING_OBJ) \ ++ @LIBWBCLIENT_STATIC@ \ ++ torture/wbc_async.o \ ++ ../nsswitch/wb_reqtrans.o \ ++ ../libcli/lsarpc/util_lsarpc.o \ ++ lib/filename_util.o \ ++ $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBCLI_ECHO_OBJ) ++ ++MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_ERR_OBJ) \ ++ $(LIB_NONSMBD_OBJ) \ ++ $(LIBNDR_GEN_OBJ0) ++ ++NSSTEST_OBJ = ../nsswitch/nsstest.o ../lib/util/setid.o $(LIBSAMBAUTIL_OBJ) ++ ++VFSTEST_OBJ = torture/cmd_vfs.o torture/vfstest.o $(SMBD_OBJ_BASE) $(READLINE_OBJ) \ ++ torture/vfstest_chain.o ++ ++LOG2PCAP_OBJ = utils/log2pcaphex.o ++ ++LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \ ++ $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(FNAME_UTIL_OBJ) ++ ++SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \ ++ $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(PASSDB_OBJ) $(GROUPDB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \ ++ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \ ++ $(LIBCLI_LSA_OBJ) ++ ++SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(PARAM_OBJ) \ ++ $(LIB_NONSMBD_OBJ) \ ++ $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(POPT_LIB_OBJ) \ ++ $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \ ++ $(LIBCLI_LSA_OBJ) ++ ++EVTLOGADM_OBJ0 = utils/eventlogadm.o ++ ++EVTLOGADM_OBJ = $(EVTLOGADM_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_ERR_OBJ) $(LIB_EVENTLOG_OBJ) \ ++ autoconf/librpc/gen_ndr/ndr_eventlog.o \ ++ autoconf/librpc/gen_ndr/ndr_lsa.o ++ ++SHARESEC_OBJ0 = utils/sharesec.o ++SHARESEC_OBJ = $(SHARESEC_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_ERR_OBJ) \ ++ $(POPT_LIB_OBJ) ++ ++TALLOCTORT_OBJ = @tallocdir@/testsuite.o @tallocdir@/testsuite_main.o \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_ERR_OBJ) ++ ++REPLACETORT_OBJ = @libreplacedir@/test/testsuite.o \ ++ @libreplacedir@/test/getifaddrs.o \ ++ @libreplacedir@/test/os2_delete.o \ ++ @libreplacedir@/test/strptime.o \ ++ @libreplacedir@/test/main.o \ ++ $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ) ++ ++DEBUG2HTML_OBJ = utils/debug2html.o utils/debugparse.o ++ ++SMBFILTER_OBJ = utils/smbfilter.o $(PARAM_OBJ) $(LIBSMB_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) ++ ++WINBIND_WINS_NSS_OBJ = ../nsswitch/wins.o $(PARAM_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(LIBSMB_ERR_OBJ) $(LIBNMB_OBJ) ++ ++PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \ ++ pam_smbpass/pam_smb_acct.o pam_smbpass/support.o ++PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ ++ $(SMBLDAP_OBJ) \ ++ $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(AFS_SETTOKEN_OBJ) \ ++ $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \ ++ $(PAM_ERRORS_OBJ) ++ ++IDMAP_RW_OBJ = winbindd/idmap_rw.o ++ ++IDMAP_TDB_COMMON_OBJ = winbindd/idmap_tdb_common.o ++ ++IDMAP_UTIL_OBJ = winbindd/idmap_util.o $(IDMAP_RW_OBJ) \ ++ $(IDMAP_TDB_COMMON_OBJ) ++ ++IDMAP_OBJ = winbindd/idmap.o $(IDMAP_UTIL_OBJ) @IDMAP_STATIC@ ++ ++NSS_INFO_OBJ = winbindd/nss_info.o @NSS_INFO_STATIC@ ++ ++IDMAP_HASH_OBJ = \ ++ winbindd/idmap_hash/idmap_hash.o \ ++ winbindd/idmap_hash/mapfile.o ++ ++WINBINDD_OBJ1 = \ ++ winbindd/winbindd.o \ ++ winbindd/winbindd_group.o \ ++ winbindd/winbindd_util.o \ ++ winbindd/winbindd_cache.o \ ++ winbindd/winbindd_pam.o \ ++ winbindd/winbindd_misc.o \ ++ winbindd/winbindd_cm.o \ ++ winbindd/winbindd_wins_byip.o \ ++ winbindd/winbindd_wins_byname.o \ ++ winbindd/winbindd_msrpc.o \ ++ winbindd/winbindd_rpc.o \ ++ winbindd/winbindd_reconnect.o \ ++ winbindd/winbindd_ads.o \ ++ winbindd/winbindd_samr.o \ ++ winbindd/winbindd_dual.o \ ++ winbindd/winbindd_dual_ndr.o \ ++ winbindd/winbindd_dual_srv.o \ ++ autoconf/librpc/gen_ndr/ndr_wbint_c.o \ ++ autoconf/librpc/gen_ndr/srv_wbint.o \ ++ autoconf/librpc/gen_ndr/ndr_wbint.o \ ++ autoconf/librpc/gen_ndr/ndr_idmap.o \ ++ winbindd/winbindd_async.o \ ++ winbindd/winbindd_creds.o \ ++ winbindd/winbindd_cred_cache.o \ ++ winbindd/winbindd_ccache_access.o \ ++ winbindd/winbindd_domain.o \ ++ winbindd/winbindd_idmap.o \ ++ winbindd/winbindd_locator.o \ ++ winbindd/winbindd_ndr.o \ ++ winbindd/wb_ping.o \ ++ winbindd/wb_lookupsid.o \ ++ winbindd/wb_lookupsids.o \ ++ winbindd/wb_lookupname.o \ ++ winbindd/wb_uid2sid.o \ ++ winbindd/wb_gid2sid.o \ ++ winbindd/wb_sids2xids.o \ ++ winbindd/wb_queryuser.o \ ++ winbindd/wb_lookupuseraliases.o \ ++ winbindd/wb_lookupusergroups.o \ ++ winbindd/wb_getpwsid.o \ ++ winbindd/wb_gettoken.o \ ++ winbindd/wb_seqnum.o \ ++ winbindd/wb_seqnums.o \ ++ winbindd/wb_group_members.o \ ++ winbindd/wb_getgrsid.o \ ++ winbindd/wb_query_user_list.o \ ++ winbindd/wb_fill_pwent.o \ ++ winbindd/wb_next_pwent.o \ ++ winbindd/wb_next_grent.o \ ++ winbindd/wb_dsgetdcname.o \ ++ winbindd/winbindd_lookupsid.o \ ++ winbindd/winbindd_lookupsids.o \ ++ winbindd/winbindd_lookupname.o \ ++ winbindd/winbindd_sid_to_uid.o \ ++ winbindd/winbindd_sid_to_gid.o \ ++ winbindd/winbindd_uid_to_sid.o \ ++ winbindd/winbindd_gid_to_sid.o \ ++ winbindd/winbindd_sids_to_xids.o \ ++ winbindd/winbindd_allocate_uid.o \ ++ winbindd/winbindd_allocate_gid.o \ ++ winbindd/winbindd_getpwsid.o \ ++ winbindd/winbindd_getpwnam.o \ ++ winbindd/winbindd_getpwuid.o \ ++ winbindd/winbindd_getsidaliases.o \ ++ winbindd/winbindd_getuserdomgroups.o \ ++ winbindd/winbindd_getgroups.o \ ++ winbindd/winbindd_show_sequence.o \ ++ winbindd/winbindd_getgrgid.o \ ++ winbindd/winbindd_getgrnam.o \ ++ winbindd/winbindd_getusersids.o \ ++ winbindd/winbindd_lookuprids.o \ ++ winbindd/winbindd_setpwent.o \ ++ winbindd/winbindd_getpwent.o \ ++ winbindd/winbindd_endpwent.o \ ++ winbindd/winbindd_setgrent.o \ ++ winbindd/winbindd_getgrent.o \ ++ winbindd/winbindd_endgrent.o \ ++ winbindd/winbindd_dsgetdcname.o \ ++ winbindd/winbindd_getdcname.o \ ++ winbindd/winbindd_list_users.o \ ++ winbindd/winbindd_list_groups.o \ ++ winbindd/winbindd_check_machine_acct.o \ ++ winbindd/winbindd_change_machine_acct.o \ ++ winbindd/winbindd_ping_dc.o \ ++ winbindd/winbindd_pam_auth.o \ ++ winbindd/winbindd_pam_auth_crap.o \ ++ winbindd/winbindd_pam_chauthtok.o \ ++ winbindd/winbindd_pam_chng_pswd_auth_crap.o \ ++ winbindd/winbindd_pam_logoff.o \ ++ auth/auth_util.o \ ++ auth/token_util.o \ ++ auth/user_util.o \ ++ auth/check_samsec.o \ ++ auth/server_info.o \ ++ auth/server_info_sam.o \ ++ auth/user_info.o \ ++ auth/pampass.o \ ++ ../nsswitch/wb_reqtrans.o ++ ++WINBINDD_OBJ = \ ++ $(WINBINDD_OBJ1) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \ ++ $(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \ ++ $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \ ++ $(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \ ++ $(RPC_CONFIG) $(RPC_NCACN_NP) \ ++ $(RPC_SAMR_OBJ) $(RPC_LSARPC_OBJ) \ ++ $(NPA_TSTREAM_OBJ) \ ++ $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \ ++ $(LIBADS_SERVER_OBJ) \ ++ $(TDB_VALIDATE_OBJ) \ ++ $(LIBCLI_DSSETUP_OBJ) \ ++ $(LIBCLI_LSA_OBJ) \ ++ $(LIBCLI_SAMR_OBJ) \ ++ rpc_client/init_samr.o \ ++ $(PAM_ERRORS_OBJ) ++ ++WBINFO_OBJ = ../nsswitch/wbinfo.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \ ++ lib/winbind_util.o $(WBCOMMON_OBJ) \ ++ $(LIBSMB_ERR_OBJ0) $(LIBSMB_ERR_OBJ1) $(SECRETS_OBJ) ++ ++WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) @WINBIND_NSS_EXTRA_OBJS@ ++ ++WINBIND_KRB5_LOCATOR_OBJ1 = ../nsswitch/winbind_krb5_locator.o ++WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(LIBREPLACE_OBJ) ++ ++POPT_OBJ=../lib/popt/findme.o ../lib/popt/popt.o ../lib/popt/poptconfig.o \ ++ ../lib/popt/popthelp.o ../lib/popt/poptparse.o ++ ++INIPARSER_OBJ = ../lib/iniparser_build/iniparser.o ../lib/iniparser_build/dictionary.o \ ++ ../lib/iniparser_build/strlib.o ++ ++TDBBACKUP_OBJ = @tdbdir@/tools/tdbbackup.o $(LIBREPLACE_OBJ) \ ++ $(SOCKET_WRAPPER_OBJ) ++ ++TDBTOOL_OBJ = @tdbdir@/tools/tdbtool.o $(LIBREPLACE_OBJ) \ ++ $(SOCKET_WRAPPER_OBJ) ++ ++TDBDUMP_OBJ = @tdbdir@/tools/tdbdump.o $(LIBREPLACE_OBJ) \ ++ $(SOCKET_WRAPPER_OBJ) ++ ++TDBRESTORE_OBJ = @tdbdir@/tools/tdbrestore.o $(LIBREPLACE_OBJ) \ ++ $(SOCKET_WRAPPER_OBJ) ++ ++TDBTORTURE_OBJ = @tdbdir@/tools/tdbtorture.o $(LIBREPLACE_OBJ) \ ++ $(SOCKET_WRAPPER_OBJ) ++ ++ ++NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o ++ ++NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} \ ++ ${LIBADS_SERVER_OBJ} \ ++ $(PASSDB_OBJ) $(GROUPDB_OBJ) \ ++ $(WBCOMMON_OBJ) \ ++ $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(AFS_SETTOKEN_OBJ) \ ++ $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \ ++ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) @BUILD_INIPARSER@ ++ ++ ++VLP_OBJ = printing/tests/vlp.o \ ++ ../lib/util/util_tdb.o \ ++ ../lib/util/signal.o \ ++ ../lib/util/debug.o \ ++ ../lib/util/util_strlist.o \ ++ ../lib/util/fault.o \ ++ ../lib/util/become_daemon.o \ ++ ../lib/util/substitute.o \ ++ lib/util_sec.o \ ++ ../lib/util/time.o \ ++ ../lib/util/charset/util_str.o \ ++ ../lib/util/charset/pull_push.o \ ++ ../lib/util/charset/util_unistr_w.o \ ++ ../lib/util/charset/codepoints.o \ ++ ../lib/util/charset/iconv.o \ ++ ../lib/util/charset/weird.o \ ++ ../lib/util/charset/convert_string.o \ ++ $(CHARSET_MACOSXFS_OBJ) \ ++ ../lib/util/talloc_stack.o \ ++ ../lib/util/smb_threads.o \ ++ ../lib/util/xfile.o \ ++ ../lib/util/util_file.o \ ++ ../lib/util/util.o \ ++ ../lib/util/util_str_common.o \ ++ ../lib/util/data_blob.o \ ++ ../dynconfig/dynconfig.o \ ++ ../lib/util/setid.o \ ++ $(LIBSAMBAUTIL_OBJ) \ ++ param/util.o ++ ++RPC_OPEN_TCP_OBJ = torture/rpc_open_tcp.o \ ++ $(LIBSMB_OBJ) \ ++ $(PARAM_OBJ) \ ++ $(PASSDB_OBJ) \ ++ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \ ++ $(LIB_NONSMBD_OBJ) \ ++ $(KRBCLIENT_OBJ) \ ++ $(LIBMSRPC_OBJ) \ ++ $(LIBMSRPC_GEN_OBJ) ++ ++DBWRAP_TOOL_OBJ = utils/dbwrap_tool.o \ ++ $(PARAM_OBJ) \ ++ $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_ERR_OBJ) \ ++ $(POPT_LIB_OBJ) ++ ++DBWRAP_TORTURE_OBJ = utils/dbwrap_torture.o \ ++ $(PARAM_OBJ) \ ++ $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_ERR_OBJ) \ ++ $(POPT_LIB_OBJ) ++ ++SPLIT_TOKENS_OBJ = utils/split_tokens.o \ ++ $(PARAM_OBJ) \ ++ $(LIB_NONSMBD_OBJ) \ ++ $(POPT_LIB_OBJ) \ ++ $(LIBSAMBA_OBJ) ++ ++###################################################################### ++# now the rules... ++###################################################################### ++all:: SHOWFLAGS basics libs $(SBIN_PROGS) $(BIN_PROGS) \ ++ $(MODULES) $(NSS_MODULES) $(PAM_MODULES) \ ++ $(EXTRA_ALL_TARGETS) ++ ++basics:: samba3-idl mkparam ++ ++nss_modules:: $(NSS_MODULES) ++ ++pam_modules:: $(PAM_MODULES) ++ ++pam_smbpass: SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@ ++ ++pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@ ++ ++gpext_modules:: $(GPEXT_MODULES) ++ ++torture:: SHOWFLAGS basics $(TORTURE_PROGS) ++ ++smbtorture3 : SHOWFLAGS bin/smbtorture3 ++ ++masktest : SHOWFLAGS bin/masktest ++ ++msgtest : SHOWFLAGS bin/msgtest ++ ++locktest : SHOWFLAGS bin/locktest ++ ++smbcacls : SHOWFLAGS bin/smbcacls ++ ++smbcquotas : SHOWFLAGS bin/smbcquotas ++ ++locktest2 : SHOWFLAGS bin/locktest2 ++ ++debug2html : SHOWFLAGS bin/debug2html ++ ++smbfilter : SHOWFLAGS bin/smbfilter ++ ++eventlogadm: SHOWFLAGS bin/eventlogadm ++ ++sharesec: SHOWFLAGS bin/sharesec ++ ++talloctort : SHOWFLAGS $(TALLOCTORT) ++ ++replacetort : SHOWFLAGS bin/replacetort ++ ++smbconftort : SHOWFLAGS bin/smbconftort ++ ++pthreadpooltest : SHOWFLAGS bin/pthreadpooltest ++ ++timelimit : SHOWFLAGS bin/timelimit ++ ++nsswitch : SHOWFLAGS bin/winbindd bin/wbinfo @WINBIND_NSS@ \ ++ @WINBIND_WINS_NSS@ @WINBIND_KRB5_LOCATOR@ \ ++ bin/pam_winbind.@SHLIBEXT@ bin/smbcontrol ++ ++wins : SHOWFLAGS @WINBIND_WINS_NSS@ ++ ++modules:: SHOWFLAGS $(MODULES) ++ ++ ++##################################################################### ++## Perl IDL Compiler ++ ++IDL_FILES = librpc/idl/messaging.idl \ ++ librpc/idl/libnetapi.idl \ ++ librpc/idl/wbint.idl \ ++ librpc/idl/perfcount.idl \ ++ librpc/idl/secrets.idl \ ++ librpc/idl/open_files.idl \ ++ librpc/idl/libnet_join.idl ++ ++samba3-idl:: ++ @PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \ ++ srcdir="$(srcdir)" ../librpc/build_idl.sh ../librpc/idl/*.idl ++ @PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \ ++ srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh $(IDL_FILES) ++ ++idl_full:: ++ @PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \ ++ srcdir="$(srcdir)" ../librpc/build_idl.sh --full ../librpc/idl/*.idl ++ @PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \ ++ srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh --full $(IDL_FILES) ++ ++mkparam: autoconf/lib/param/param_local.h autoconf/lib/param/param_global.h autoconf/source3/param/param_global.h autoconf/lib/param/param_proto.h autoconf/lib/param/s3_param.h ++ ++autoconf/lib/param/param_local.h: ++ $(PERL) ../script/mkparamdefs.pl $(srcdir)/../lib/param/param_functions.c --file autoconf/lib/param/param_local.h --generate-scope=LOCAL ++autoconf/lib/param/param_global.h: ++ $(PERL) ../script/mkparamdefs.pl $(srcdir)/../lib/param/param_functions.c $(srcdir)/../lib/param/loadparm.c --file autoconf/lib/param/param_global.h --generate-scope=GLOBAL ++autoconf/source3/param/param_global.h: ++ $(PERL) ../script/mkparamdefs.pl $(srcdir)/../lib/param/param_functions.c $(srcdir)/param/loadparm.c --file autoconf/source3/param/param_global.h --generate-scope=GLOBAL ++autoconf/lib/param/param_proto.h: ++ $(PERL) ../source4/script/mkproto.pl $(srcdir)/../lib/param/param_functions.c $(srcdir)/../lib/param/loadparm.c --public autoconf/lib/param/param_proto.h --private autoconf/lib/param/param_proto.h ++autoconf/lib/param/s3_param.h: ++ $(PERL) ../script/mks3param.pl $(srcdir)/../lib/param/param_functions.c $(srcdir)/../lib/param/loadparm.c --file autoconf/lib/param/s3_param.h ++ ++ ++##################################################################### ++ ++ ++everything:: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctort replacetort smbconftort modules torture \ ++ $(EVERYTHING_PROGS) \ ++ vfs_examples ++ ++.SUFFIXES: ++.SUFFIXES: .c .o .lo ++ ++.PHONY: showflags SHOWFLAGS ++ ++showflags: SHOWFLAGS ++ ++SHOWFLAGS:: ++ @echo "Using CFLAGS = $(CFLAGS)" ++ @echo " PICFLAG = $(PICFLAG)" ++ @echo " LIBS = $(LIBS)" ++ @echo " LDFLAGS = $(LDFLAGS)" ++ @echo " DYNEXP = $(DYNEXP)" ++ @echo " LDSHFLAGS = $(LDSHFLAGS)" ++ @echo " SHLIBEXT = @SHLIBEXT@" ++ @echo " SONAMEFLAG = @SONAMEFLAG@" ++ ++# "showcflags" target for debuggin how CFLAGS are composed: ++ ++.PHONY: showcflags SHOWCFLAGS ++ ++showcflags: SHOWCFLAGS ++ ++SHOWCFLAGS:: ++ @echo "CFLAGS = $(CFLAGS)" ++ @echo "FLAGS = $(FLAGS)" ++ @echo "" ++ @echo "FLAGS1 = @FLAGS1@" ++ @echo "SAMBA_CPPFLAGS = @SAMBA_CPPFLAGS@" ++ @echo "CPPFLAGS = $(CPPFLAGS)" ++ @echo "ISA = $(ISA)" ++ ++MAKEDIR = || exec false; \ ++ if test -d "$$dir"; then :; else \ ++ echo mkdir "$$dir"; \ ++ mkdir -p "$$dir" >/dev/null 2>&1 || \ ++ test -d "$$dir" || \ ++ mkdir "$$dir" || \ ++ exec false; fi || exec false ++ ++# Run a static checker. ++CHECK_CC = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) -c $< -o $@ ++# Compile a source file. ++COMPILE_CC = $(CC) $(CFLAGS) $(PICFLAG) -c $< -o $@ ++# Compile a source file with the installation paths defined. ++COMPILE_CC_PATH = $(CC) $(PATH_FLAGS) $(CFLAGS) $(PICFLAG) -c $< -o $@ ++ ++COMPILE = $(COMPILE_CC) ++ ++.c.o: ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ ++ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi ++ @if test -n "$(CC_CHECKER)"; then \ ++ echo "Checking $*.c with '$(CC_CHECKER)'";\ ++ $(CHECK_CC); \ ++ fi ++ @echo Compiling $*.c ++ @$(COMPILE) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(subst ",\",$(COMPILE_CC))" 1>&2;\ ++ $(COMPILE_CC) >/dev/null 2>&1 ++@BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@ ++ ++PRECOMPILED_HEADER = $(builddir)/include/includes.h.gch ++ ++# this adds support for precompiled headers. To use it, install a snapshot ++# of gcc-3.4 and run 'make pch' before you do the main build. ++pch:: ++ rm -f $(PRECOMPILED_HEADER) ++ $(MAKE) $(PRECOMPILED_HEADER) ++ ++$(PRECOMPILED_HEADER): $(srcdir)/include/includes.h ++ $(COMPILE) ++ ++BINARY_PREREQS = bin/.dummy ++ ++# These dependencies are only approximately correct: we want to make ++# sure Samba's paths are updated if ./configure is re-run. Really it ++# would be nice if "make prefix=/opt/samba all" also rebuilt things, ++# but since we also require "make install prefix=/opt/samba" *not* to ++# rebuild it's a bit hard. ++ ++../dynconfig/dynconfig.o: ../dynconfig/dynconfig.c Makefile ++ @echo Compiling $*.c ++ @$(COMPILE_CC_PATH) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC_PATH)" 1>&2;\ ++ $(COMPILE_CC_PATH) >/dev/null 2>&1 ++ ++../nsswitch/pam_winbind.o: ../nsswitch/pam_winbind.c Makefile ++ @echo Compiling $*.c ++ @$(COMPILE_CC_PATH) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC_PATH)" 1>&2;\ ++ $(COMPILE_CC_PATH) >/dev/null 2>&1 ++ ++../nsswitch/wb_common.o: ../nsswitch/wb_common.c Makefile ++ @echo Compiling $*.c ++ @$(COMPILE_CC_PATH) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC_PATH)" 1>&2;\ ++ $(COMPILE_CC_PATH) >/dev/null 2>&1 ++ ++### Start section of object files that require PTHREAD_CFLAGS ++../nsswitch/wins.o: ../nsswitch/wins.c ++ @echo Compiling $*.c ++ @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\ ++ $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1 ++ ++../nsswitch/winbind_nss_linux.o: ../nsswitch/winbind_nss_linux.c ++ @echo Compiling $*.c ++ @$(COMPILE_CC) $(PTHREAD_CFLAGS) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\ ++ $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1 ++ ++libsmb/libsmb_thread_impl.o: libsmb/libsmb_thread_impl.c ++ @echo Compiling $*.c ++ @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\ ++ $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1 ++ ++libsmb/libsmb_thread_posix.o: libsmb/libsmb_thread_posix.c ++ @echo Compiling $*.c ++ @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\ ++ $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1 ++### End section of object files that require PTHREAD_CFLAGS ++ ++lib/version.o: lib/version.c include/autoconf/version.h ++ @echo Compiling $*.c ++ @$(COMPILE_CC_PATH) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC_PATH)" 1>&2;\ ++ $(COMPILE_CC_PATH) >/dev/null 2>&1 ++ ++smbd/build_options.o: smbd/build_options.c Makefile include/autoconf/config.h include/build_env.h include/proto.h ++ @echo Compiling $*.c ++ @$(COMPILE_CC_PATH) && exit 0;\ ++ echo "The following command failed:" 1>&2;\ ++ echo "$(COMPILE_CC_PATH)" 1>&2;\ ++ $(COMPILE_CC_PATH) >/dev/null 2>&1 ++ ++smbd/build_options.c: include/autoconf/config.h.in script/mkbuildoptions.awk ++ @echo Generating $@ ++ @dir=smbd $(MAKEDIR) && $(AWK) -f $(srcdir)/script/mkbuildoptions.awk > $(builddir)/smbd/build_options.c < $(srcdir)/include/autoconf/config.h.in ++ ++bin/.dummy: ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \ ++ dir=bin $(MAKEDIR); fi ++ @: >> $@ || : > $@ # what a fancy emoticon! ++ ++bin/smbd: $(BINARY_PREREQS) $(SMBD_OBJ) $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) @BUILD_POPT@ ++ @echo Linking $@ ++ @$(CC) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \ ++ $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \ ++ $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) \ ++ $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) \ ++ $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ ++bin/nmbd: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(POPT_LIBS) \ ++ $(KRB5LIBS) $(LDAP_LIBS) $(ZLIB_LIBS) ++ ++bin/rpcclient: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LDFLAGS) $(RPCCLIENT_OBJ) \ ++ $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \ ++ $(KRB5LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) \ ++ $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) $(PASSDB_LIBS) ++ ++bin/smbclient: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \ ++ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ ++bin/net: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) $(LIBNETAPI) ++ @echo Linking $@ ++ @$(CC) -o $@ $(NET_OBJ) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \ ++ $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \ ++ $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) \ ++ $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) \ ++ $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) $(LIBNETAPI_LIBS) $(TERMLDFLAGS) $(TERMLIBS) ++ ++bin/profiles: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \ ++ $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/smbspool: $(BINARY_PREREQS) $(CUPS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \ ++ @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \ ++ $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(ZLIB_LIBS) ++ ++bin/testparm: $(BINARY_PREREQS) $(TESTPARM_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/smbta-util: $(BINARY_PREREQS) $(SMBTA_UTIL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(SMBTA_UTIL_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/smbstatus: $(BINARY_PREREQS) $(STATUS_OBJ) $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) @BUILD_POPT@ ++ @echo Linking $@ ++ @$(CC) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \ ++ $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \ ++ $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) \ ++ $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) \ ++ $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ ++bin/smbcontrol: $(BINARY_PREREQS) $(SMBCONTROL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -DUSING_SMBCONTROL -o $@ \ ++ $(SMBCONTROL_OBJ) $(DYNEXP) $(LDFLAGS) \ ++ $(LIBS) $(LDAP_LIBS) @LIBUNWIND_PTRACE@ $(POPT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/smbtree: $(BINARY_PREREQS) $(SMBTREE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ ++bin/smbpasswd: $(BINARY_PREREQS) $(SMBPASSWD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \ ++ $(DYNEXP) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ ++bin/pdbedit: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(POPT_LIBS) $(PASSDB_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) \ ++ $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ ++bin/smbget: $(BINARY_PREREQS) $(SMBGET_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ ++bin/nmblookup: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/smbtorture3: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) $(IDMAP_UTIL_OBJ) ++ @echo Linking $@ ++ @$(CC) -o $@ $(SMBTORTURE_OBJ) $(IDMAP_UTIL_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \ ++ $(LIBTDBS_LIBS) $(ZLIB_LIBS) $(LIBWBCLIENT_LIBS) ++ ++bin/talloctort: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) \ ++ $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/replacetort: $(REPLACETORT_OBJ) @BUILD_POPT@ $(LIBTALLOC) ++ @echo Linking $@ ++ @$(CC) -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \ ++ $(DYNEXP) $(LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) ++ ++bin/smbconftort: $(SMBCONFTORT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(SMBCONFTORT_OBJ) $(LDFLAGS) \ ++ $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/pthreadpooltest: $(PTHREADPOOLTEST_OBJ) ++ @echo Linking $@ ++ @$(CC) -o $@ $(PTHREADPOOLTEST_OBJ) $(LDFLAGS) $(LIBS) $(PTHREAD_LDFLAGS) ++ ++bin/masktest: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ ++ @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(ZLIB_LIBS) ++ ++bin/msgtest: $(BINARY_PREREQS) $(MSGTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(ZLIB_LIBS) ++ ++bin/smbcacls: $(BINARY_PREREQS) $(SMBCACLS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) \ ++ $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ ++bin/smbcquotas: $(BINARY_PREREQS) $(SMBCQUOTAS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) \ ++ $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ ++bin/eventlogadm: $(BINARY_PREREQS) $(EVTLOGADM_OBJ) $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(EVTLOGADM_OBJ) $(DYNEXP) $(LDFLAGS) \ ++ $(LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/sharesec: $(BINARY_PREREQS) $(SHARESEC_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(SHARESEC_OBJ) $(DYNEXP) $(LDFLAGS) \ ++ $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/locktest: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ ++ @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(ZLIB_LIBS) ++ ++bin/nsstest: $(BINARY_PREREQS) $(NSSTEST_OBJ) $(LIBTALLOC) ++ @echo Linking $@ ++ @$(CC) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(LIBTALLOC_LIBS) ++ ++bin/vfstest: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(AVAHI_LIBS) \ ++ $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) $(DNSSD_LIBS) \ ++ $(ACL_LIBS) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \ ++ @SMBD_LIBS@ $(NSCD_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) \ ++ $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ ++bin/log2pcap: $(BINARY_PREREQS) $(LOG2PCAP_OBJ) @BUILD_POPT@ $(LIBTALLOC) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ $(POPT_LIBS) $(LIBS) $(LIBTALLOC_LIBS) ++ ++bin/locktest2: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \ ++ $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(ZLIB_LIBS) ++ ++bin/debug2html: $(BINARY_PREREQS) $(DEBUG2HTML_OBJ) @BUILD_POPT@ $(LIBTALLOC) ++ @echo Linking $@ ++ @$(CC) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ $(LIBS) $(LIBTALLOC_LIBS) ++ ++bin/smbfilter: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ ++ @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(ZLIB_LIBS) ++ ++bin/versiontest: $(BINARY_PREREQS) lib/version_test.o $(VERSION_OBJ) ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(VERSION_OBJ) lib/version_test.o ++ ++ ++##################################################################### ++# ++# libraries ++# ++##################################################################### ++ ++MKSYMS_SH = $(srcdir)/script/mksyms.sh ++ ++ ++#------------------------------------------------------------------- ++# ++# libtalloc ++# ++#------------------------------------------------------------------- ++ ++ ++LIBTALLOC_OBJ0 = @LIBTALLOC_OBJ0@ ++LIBTALLOC_OBJ = $(LIBTALLOC_OBJ0) $(LIBREPLACE_OBJ) ++ ++LIBTALLOC_STATIC_TARGET=@LIBTALLOC_STATIC_TARGET@ ++ ++$(LIBTALLOC_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ0) ++ @echo Linking non-shared library $@ ++ @-$(AR) -rc $@ $(LIBTALLOC_OBJ0) ++libtalloc: $(LIBTALLOC) ++ ++cleanlibtalloc:: ++ -rm -f \ ++ $(LIBTALLOC_STATIC_TARGET) ++ ++libs:: libtalloc ++cleanlibs:: cleanlibtalloc ++ ++showlibtalloc: ++ @echo "" ++ @echo "LIBTALLOC_STATIC = @LIBTALLOC_STATIC@" ++ @echo "LIBTALLOC_STATIC_TARGET = $(LIBTALLOC_STATIC_TARGET)" ++ @echo "LIBTALLOC = $(LIBTALLOC)" ++ ++showlibs:: showlibtalloc ++ ++#------------------------------------------------------------------- ++# ++# libtdb ++# ++#------------------------------------------------------------------- ++ ++LIBTDB_OBJ0 = @LIBTDB_OBJ0@ ++LIBTDB_OBJ = $(LIBTDB_OBJ0) $(LIBREPLACE_OBJ) ++ ++LIBTDB_STATIC_TARGET=@LIBTDB_STATIC_TARGET@ ++ ++$(LIBTDB_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ0) ++ @echo Linking non-shared library $@ ++ @-$(AR) -rc $@ $(LIBTDB_OBJ0) ++ ++libtdb: $(LIBTDB) ++ ++cleanlibtdb:: ++ -rm -f \ ++ $(LIBTDB_STATIC_TARGET) ++ ++libs:: libtdb ++cleanlibs:: cleanlibtdb ++ ++showlibtdb: ++ @echo "" ++ @echo "LIBTDB_STATIC = @LIBTDB_STATIC@" ++ @echo "LIBTDB_STATIC_TARGET = $(LIBTDB_STATIC_TARGET)" ++ @echo "LIBTDB = $(LIBTDB)" ++ ++showlibs:: showlibtdb ++ ++#------------------------------------------------------------------- ++# ++# libntdb ++# ++#------------------------------------------------------------------- ++ ++LIBNTDB_OBJ0 = @LIBNTDB_OBJ0@ ++LIBNTDB_OBJ = $(LIBNTDB_OBJ0) $(LIBREPLACE_OBJ) ++ ++LIBNTDB_STATIC_TARGET=@LIBNTDB_STATIC_TARGET@ ++ ++$(LIBNTDB_STATIC_TARGET): $(BINARY_PREREQS) $(LIBNTDB_OBJ0) ++ @echo Linking non-shared library $@ ++ @-$(AR) -rc $@ $(LIBNTDB_OBJ0) ++ ++libntdb: $(LIBNTDB) ++ ++cleanlibntdb:: ++ -rm -f \ ++ $(LIBNTDB_STATIC_TARGET) ++ ++libs:: libntdb ++cleanlibs:: cleanlibntdb ++ ++showlibntdb: ++ @echo "" ++ @echo "LIBNTDB_STATIC = @LIBNTDB_STATIC@" ++ @echo "LIBNTDB_STATIC_TARGET = $(LIBNTDB_STATIC_TARGET)" ++ @echo "LIBNTDB = $(LIBNTDB)" ++ ++showlibs:: showlibntdb ++ ++#------------------------------------------------------------------- ++# ++# libwbclient ++# ++#------------------------------------------------------------------- ++ ++LIBWBCLIENT_OBJ0 = ../nsswitch/libwbclient/wbclient.o \ ++ ../nsswitch/libwbclient/wbc_util.o \ ++ ../nsswitch/libwbclient/wbc_pwd.o \ ++ ../nsswitch/libwbclient/wbc_idmap.o \ ++ ../nsswitch/libwbclient/wbc_sid.o \ ++ ../nsswitch/libwbclient/wbc_guid.o \ ++ ../nsswitch/libwbclient/wbc_pam.o ++ ++LIBWBCLIENT_OBJ = $(LIBWBCLIENT_OBJ0) \ ++ $(WBCOMMON_OBJ) \ ++ $(LIBREPLACE_OBJ) \ ++ ../lib/util/blocking.o \ ++ $(SOCKET_WRAPPER_OBJ) ++ ++LIBWBCLIENT_SHARED_TARGET=@LIBWBCLIENT_SHARED_TARGET@ ++LIBWBCLIENT_SOVER=@LIBWBCLIENT_SOVER@ ++LIBWBCLIENT_FULLVER=@LIBWBCLIENT_FULLVER@ ++LIBWBCLIENT_SHARED_TARGET_SONAME=@LIBWBCLIENT_SHARED_TARGET_SOVER@ ++LIBWBCLIENT_STATIC_TARGET=@LIBWBCLIENT_STATIC_TARGET@ ++LIBWBCLIENT_SYMS=$(srcdir)/exports/libwbclient.@SYMSEXT@ ++LIBWBCLIENT_HEADERS=$(srcdir)/../nsswitch/libwbclient/wbclient.h ++ ++$(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS) ++ @$(MKSYMS_SH) $(AWK) $@ $(LIBWBCLIENT_HEADERS) ++ ++$(LIBWBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) $(LIBWBCLIENT_SYMS) ++ @echo Linking shared library $@ ++ @$(SHLD_DSO) $(LIBWBCLIENT_OBJ) $(LIBREPLACE_LIBS) \ ++ @SONAMEFLAG@`basename $@` ++ ++$(LIBWBCLIENT_SHARED_TARGET): $(LIBWBCLIENT_SHARED_TARGET_SONAME) ++ @rm -f $@ ++ @ln -f -s `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` $@ ++ ++$(LIBWBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ) ++ @echo Linking non-shared library $@ ++ @-$(AR) -rc $@ $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ) ++ ++libwbclient: $(LIBWBCLIENT) ++ ++cleanlibwbclient:: ++ -rm -f \ ++ $(LIBWBCLIENT_SYMS) \ ++ $(LIBWBCLIENT_STATIC_TARGET) \ ++ $(LIBWBCLIENT_SHARED_TARGET) \ ++ $(LIBWBCLIENT_SHARED_TARGET_SONAME) ++ ++installlibwbclient:: installdirs libwbclient ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR) ++ -$(INSTALLLIBCMD_SH) $(LIBWBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR) ++ @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)` ++ -if test -r $(LIBWBCLIENT_SHARED_TARGET_SONAME) ; then \ ++ ln -f -s `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` \ ++ $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)` ; \ ++ fi ++ -$(INSTALLLIBCMD_A) bin/libwbclient.a $(DESTDIR)$(LIBDIR) ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include ++ -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBWBCLIENT_HEADERS) $(DESTDIR)${prefix}/include ++ ++uninstalllibwbclient:: ++ -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)` ++ -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` ++ -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_STATIC_TARGET)` ++ -rm -f $(DESTDIR)${prefix}/include/wbclient.h ++ ++libs:: libwbclient ++installlibs:: @INSTALL_LIBWBCLIENT@ ++uninstalllibs:: uninstalllibwbclient ++cleanlibs:: cleanlibwbclient ++shlibs test_shlibs: @LIBWBCLIENT_SHARED@ ++ ++showlibwbclient: ++ @echo "" ++ @echo "LIBWBCLIENT_SHARED = @LIBWBCLIENT_SHARED@" ++ @echo "LIBWBCLIENT_STATIC = @LIBWBCLIENT_STATIC@" ++ @echo "LIBWBCLIENT_LIBS = $(LIBWBCLIENT_LIBS)" ++ @echo "" ++ @echo "LIBWBCLIENT_SHARED_TARGET = $(LIBWBCLIENT_SHARED_TARGET)" ++ @echo "LIBWBCLIENT_SOVER = $(LIBWBCLIENT_SOVER)" ++ @echo "LIBWBCLIENT_FULLVER = $(LIBWBCLIENT_FULLVER)" ++ @echo "LIBWBCLIENT_SHARED TARGET_SONAME = $(LIBWBCLIENT_SHARED_TARGET_SONAME)" ++ @echo "LIBWBCLIENT_STATIC_TARGET = $(LIBWBCLIENT_STATIC_TARGET)" ++ @echo "LIBWBCLIENT = $(LIBWBCLIENT)" ++ ++showlibs:: showlibwbclient ++ ++ ++#------------------------------------------------------------------- ++# ++# libnetapi ++# ++#------------------------------------------------------------------- ++ ++LIBNETAPI_OBJ0 = lib/netapi/netapi.o \ ++ lib/netapi/cm.o \ ++ autoconf/librpc/gen_ndr/ndr_libnetapi.o \ ++ lib/netapi/libnetapi.o \ ++ lib/netapi/joindomain.o \ ++ lib/netapi/serverinfo.o \ ++ lib/netapi/getdc.o \ ++ lib/netapi/user.o \ ++ lib/netapi/group.o \ ++ lib/netapi/localgroup.o \ ++ lib/netapi/samr.o \ ++ lib/netapi/sid.o \ ++ lib/netapi/share.o \ ++ lib/netapi/file.o \ ++ lib/netapi/shutdown.o \ ++ lib/netapi/netlogon.o ++ ++LIBNETAPI_OBJ = $(LIBNETAPI_OBJ0) $(LIBNET_OBJ) \ ++ $(LIBSMBCONF_OBJ) \ ++ $(REG_SMBCONF_OBJ) \ ++ $(PARAM_WITHOUT_REG_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \ ++ $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \ ++ $(DCUTIL_OBJ) $(LIBADS_OBJ) $(PRIVILEGES_BASIC_OBJ) \ ++ auth/token_util.o \ ++ $(LIBCLI_INITSHUTDOWN_OBJ) \ ++ $(LIBCLI_WKSSVC_OBJ) \ ++ $(LIBCLI_SRVSVC_OBJ) \ ++ $(LIBCLI_LSA_OBJ) \ ++ $(LIBCLI_SAMR_OBJ) \ ++ $(RPC_CLIENT_SCHANNEL_OBJ) \ ++ rpc_client/init_samr.o ++ ++LIBNETAPI_SHARED_TARGET=@LIBNETAPI_SHARED_TARGET@ ++LIBNETAPI_SOVER=@LIBNETAPI_SOVER@ ++LIBNETAPI_FULLVER=@LIBNETAPI_FULLVER@ ++LIBNETAPI_SHARED_TARGET_SONAME=@LIBNETAPI_SHARED_TARGET_SOVER@ ++LIBNETAPI_STATIC_TARGET=@LIBNETAPI_STATIC_TARGET@ ++LIBNETAPI_SYMS=$(srcdir)/exports/libnetapi.@SYMSEXT@ ++LIBNETAPI_HEADERS=$(srcdir)/lib/netapi/netapi.h ++ ++$(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS) ++ @$(MKSYMS_SH) $(AWK) $@ $(LIBNETAPI_HEADERS) ++ ++$(LIBNETAPI_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBNETAPI_OBJ) $(LIBNETAPI_SYMS) $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking shared library $@ ++ @$(SHLD_DSO) $(LIBNETAPI_OBJ) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) $(LIBS) \ ++ $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) \ ++ @SONAMEFLAG@`basename $@` ++ ++$(LIBNETAPI_SHARED_TARGET): $(LIBNETAPI_SHARED_TARGET_SONAME) ++ @rm -f $@ ++ @ln -f -s `basename $(LIBNETAPI_SHARED_TARGET_SONAME)` $@ ++ ++$(LIBNETAPI_STATIC_TARGET): $(BINARY_PREREQS) $(LIBNETAPI_OBJ0) ++ @echo Linking non-shared library $@ ++ @-$(AR) -rc $@ $(LIBNETAPI_OBJ0) ++ ++libnetapi: $(LIBNETAPI) ++ ++cleanlibnetapi:: ++ -rm -f \ ++ $(LIBNETAPI_SYMS) \ ++ $(LIBNETAPI_STATIC_TARGET) \ ++ $(LIBNETAPI_SHARED_TARGET) \ ++ $(LIBNETAPI_SHARED_TARGET_SONAME) ++ ++installlibnetapi:: installdirs libnetapi ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR) ++ -$(INSTALLLIBCMD_SH) $(LIBNETAPI_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR) ++ @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)` ++ -if test -r $(LIBNETAPI_SHARED_TARGET_SONAME) ; then \ ++ ln -f -s `basename $(LIBNETAPI_SHARED_TARGET_SONAME)` \ ++ $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)` ; \ ++ fi ++ -$(INSTALLLIBCMD_A) $(LIBNETAPI_STATIC_TARGET) $(DESTDIR)$(LIBDIR) ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include ++ -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/lib/netapi/netapi.h $(DESTDIR)${prefix}/include ++ ++uninstalllibnetapi:: ++ -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)` ++ -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET_SONAME)` ++ -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_STATIC_TARGET)` ++ -rm -f $(DESTDIR)${prefix}/include/netapi.h ++ ++libs:: libnetapi ++installlibs:: @INSTALL_LIBNETAPI@ ++uninstalllibs:: @UNINSTALL_LIBNETAPI@ ++cleanlibs:: cleanlibnetapi ++shlibs test_shlibs: @LIBNETAPI_SHARED@ ++ ++showlibnetapi: ++ @echo "" ++ @echo "LIBNETAPI_SHARED = @LIBNETAPI_SHARED@" ++ @echo "LIBNETAPI_STATIC = @LIBNETAPI_STATIC@" ++ @echo "LIBNETAPI_LIBS = $(LIBNETAPI_LIBS)" ++ @echo "" ++ @echo "LIBNETAPI_SHARED_TARGET = $(LIBNETAPI_SHARED_TARGET)" ++ @echo "LIBNETAPI_SOVER = $(LIBNETAPI_SOVER)" ++ @echo "LIBNETAPI_FULLVER = $(LIBNETAPI_FULLVER)" ++ @echo "LIBNETAPI_SHARED TARGET_SONAME = $(LIBNETAPI_SHARED_TARGET_SONAME)" ++ @echo "LIBNETAPI_STATIC_TARGET = $(LIBNETAPI_STATIC_TARGET)" ++ @echo "LIBNETAPI = $(LIBNETAPI)" ++ ++showlibs:: showlibnetapi ++ ++#------------------------------------------------------------------- ++# ++# libsmbclient ++# ++#------------------------------------------------------------------- ++ ++LIBSMBCLIENT_SHARED_TARGET=@LIBSMBCLIENT_SHARED_TARGET@ ++LIBSMBCLIENT_SOVER=@LIBSMBCLIENT_SOVER@ ++LIBSMBCLIENT_FULLVER=@LIBSMBCLIENT_FULLVER@ ++LIBSMBCLIENT_SHARED_TARGET_SONAME=@LIBSMBCLIENT_SHARED_TARGET_SOVER@ ++LIBSMBCLIENT_STATIC_TARGET=@LIBSMBCLIENT_STATIC_TARGET@ ++LIBSMBCLIENT=@LIBSMBCLIENT_STATIC@ @LIBSMBCLIENT_SHARED@ ++LIBSMBCLIENT_SYMS=$(srcdir)/exports/libsmbclient.@SYMSEXT@ ++LIBSMBCLIENT_HEADERS=$(srcdir)/include/libsmbclient.h ++ ++$(LIBSMBCLIENT_SYMS): $(LIBSMBCLIENT_HEADERS) ++ @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBCLIENT_HEADERS) ++ ++$(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) $(LIBSMBCLIENT_SYMS) $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking shared library $@ ++ @$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) $(LIBS) \ ++ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) $(PTHREAD_LDFLAGS) \ ++ @SONAMEFLAG@`basename $@` ++ ++$(LIBSMBCLIENT_SHARED_TARGET): $(LIBSMBCLIENT_SHARED_TARGET_SONAME) ++ @rm -f $@ ++ @ln -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` $@ ++ ++$(LIBSMBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ1) ++ @echo Linking non-shared library $@ ++ @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ1) ++ ++libsmbclient: $(LIBSMBCLIENT) ++ ++cleanlibsmbclient:: ++ -rm -f \ ++ $(LIBSMBCLIENT_SHARED_TARGET) \ ++ $(LIBSMBCLIENT_SHARED_TARGET_SONAME) \ ++ $(LIBSMBCLIENT_STATIC_TARGET) ++ ++installlibsmbclient:: installdirs libsmbclient ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR) ++ -$(INSTALLLIBCMD_SH) $(LIBSMBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR) ++ @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)` ++ -if test -r $(LIBSMBCLIENT_SHARED_TARGET_SONAME) ; then \ ++ ln -f -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` \ ++ $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)` ; \ ++ fi ++ -$(INSTALLLIBCMD_A) $(LIBSMBCLIENT_STATIC_TARGET) $(DESTDIR)$(LIBDIR) ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include ++ -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBCLIENT_HEADERS) $(DESTDIR)${prefix}/include ++ ++installclientlib:: installlibsmbclient ++ ++uninstalllibsmbclient:: ++ -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)` ++ -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` ++ -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_STATIC_TARGET)` ++ -rm -f $(DESTDIR)${prefix}/include/libsmbclient.h ++ ++uninstallclientlib:: uninstalllibsmbclient ++ ++libs:: libsmbclient ++installlibs:: @INSTALL_LIBSMBCLIENT@ ++uninstalllibs:: @UNINSTALL_LIBSMBCLIENT@ ++cleanlibs:: cleanlibsmbclient ++shlibs test_shlibs: @LIBSMBCLIENT_SHARED@ ++ ++showlibsmbclient: ++ @echo "" ++ @echo "LIBSMBCLIENT_SHARED = @LIBSMBCLIENT_SHARED@" ++ @echo "LIBSMBCLIENT_STATIC = @LIBSMBCLIENT_STATIC@" ++ @echo "LIBSMBCLIENT_LIBS = $(LIBSMBCLIENT_LIBS)" ++ @echo "" ++ @echo "LIBSMBCLIENT_SHARED_TARGET = $(LIBSMBCLIENT_SHARED_TARGET)" ++ @echo "LIBSMBCLIENT_SOVER = $(LIBSMBCLIENT_SOVER)" ++ @echo "LIBSMBCLIENT_FULLVER = $(LIBSMBCLIENT_FULLVER)" ++ @echo "LIBSMBCLIENT_SHARED TARGET_SONAME = $(LIBSMBCLIENT_SHARED_TARGET_SONAME)" ++ @echo "LIBSMBCLIENT_STATIC_TARGET = $(LIBSMBCLIENT_STATIC_TARGET)" ++ @echo "LIBSMBCLIENT = $(LIBSMBCLIENT)" ++ ++showlibs:: showlibsmbclient ++ ++#------------------------------------------------------------------- ++# ++# libsmbsharemodes ++# ++#------------------------------------------------------------------- ++ ++LIBSMBSHAREMODES_OBJ0 = libsmb/smb_share_modes.o ../lib/ccan/hash/hash.o ++ ++LIBSMBSHAREMODES_OBJ = $(LIBSMBSHAREMODES_OBJ0) ++ ++LIBSMBSHAREMODES_SHARED_TARGET=@LIBSMBSHAREMODES_SHARED_TARGET@ ++LIBSMBSHAREMODES_SOVER=@LIBSMBSHAREMODES_SOVER@ ++LIBSMBSHAREMODES_FULLVER=@LIBSMBSHAREMODES_FULLVER@ ++LIBSMBSHAREMODES_SHARED_TARGET_SONAME=@LIBSMBSHAREMODES_SHARED_TARGET_SOVER@ ++LIBSMBSHAREMODES_STATIC_TARGET=@LIBSMBSHAREMODES_STATIC_TARGET@ ++LIBSMBSHAREMODES=@LIBSMBSHAREMODES_STATIC@ @LIBSMBSHAREMODES_SHARED@ ++LIBSMBSHAREMODES_SYMS=$(srcdir)/exports/libsmbsharemodes.@SYMSEXT@ ++LIBSMBSHAREMODES_HEADERS=$(srcdir)/include/smb_share_modes.h ++ ++$(LIBSMBSHAREMODES_SYMS): $(LIBSMBSHAREMODES_HEADERS) ++ @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBSHAREMODES_HEADERS) ++ ++$(LIBSMBSHAREMODES_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) $(LIBSMBSHAREMODES_SYMS) $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking shared library $@ ++ @$(SHLD_DSO) $(LIBSMBSHAREMODES_OBJ) \ ++ $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) \ ++ @SONAMEFLAG@`basename $@` ++ ++$(LIBSMBSHAREMODES_SHARED_TARGET): $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) ++ @rm -f $@ ++ @ln -f -s `basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` $@ ++ ++$(LIBSMBSHAREMODES_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ0) ++ @echo Linking non-shared library $@ ++ @-$(AR) -rc $@ $(LIBSMBSHAREMODES_OBJ0) ++ ++libsmbsharemodes: $(LIBSMBSHAREMODES) ++ ++cleanlibsmbsharemodes:: ++ -rm -f \ ++ $(LIBSMBSHAREMODES_SHARED_TARGET) \ ++ $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) \ ++ $(LIBSMBSHAREMODES_STATIC_TARGET) ++ ++installlibsmbsharemodes:: installdirs libsmbsharemodes ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR) ++ -$(INSTALLLIBCMD_SH) $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR) ++ @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)` ++ -if test -r $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) ; then \ ++ ln -f -s `basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` \ ++ $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)` ; \ ++ fi ++ -$(INSTALLLIBCMD_A) $(LIBSMBSHAREMODES_STATIC_TARGET) $(DESTDIR)$(LIBDIR) ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include ++ -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBSHAREMODES_HEADERS) $(DESTDIR)${prefix}/include ++ ++uninstalllibsmbsharemodes:: ++ -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)` ++ -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` ++ -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_STATIC_TARGET)` ++ -rm -f $(DESTDIR)${prefix}/include/smb_share_modes.h ++ ++libs:: libsmbsharemodes ++installlibs:: @INSTALL_LIBSMBSHAREMODES@ ++uninstalllibs:: @UNINSTALL_LIBSMBSHAREMODES@ ++cleanlibs:: cleanlibsmbsharemodes ++shlibs test_shlibs: @LIBSMBSHAREMODES_SHARED@ ++ ++showlibsmbsharemodes: ++ @echo "" ++ @echo "LIBSMBSHAREMODES_SHARED = @LIBSMBSHAREMODES_SHARED@" ++ @echo "LIBSMBSHAREMODES_STATIC = @LIBSMBSHAREMODES_STATIC@" ++ @echo "LIBSMBSHAREMODES_TARGET = @LIBSMBSHAREMODES_TARGET@" ++ @echo "LIBSMBSHAREMODES_LIBS = $(LIBSMBSHAREMODES_LIBS)" ++ @echo "" ++ @echo "LIBSMBSHAREMODES_SHARED_TARGET = $(LIBSMBSHAREMODES_SHARED_TARGET)" ++ @echo "LIBSMBSHAREMODES_SOVER = $(LIBSMBSHAREMODES_SOVER)" ++ @echo "LIBSMBSHAREMODES_FULLVER = $(LIBSMBSHAREMODES_FULLVER)" ++ @echo "LIBSMBSHAREMODES_SHARED TARGET_SONAME = $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)" ++ @echo "LIBSMBSHAREMODES_STATIC_TARGET = $(LIBSMBSHAREMODES_STATIC_TARGET)" ++ @echo "LIBSMBSHAREMODES = $(LIBSMBSHAREMODES)" ++ ++showlibs:: showlibsmbsharemodes ++ ++##################################################################### ++# ++# shared modules ++# ++##################################################################### ++ ++# Linker command to link our shared libraries: ++SHLD_LIBRARY = $(SHLD) $(LDSHFLAGS) $(MODULE_EXPORTS) \ ++ -o $@ @SONAMEFLAG@`basename $@` ++# Linker command to link samba internal plugin modules: ++SHLD_MODULE = $(SHLD) $(LDSHFLAGS_MODULES) $(MODULE_EXPORTS) \ ++ -o $@ @SONAMEFLAG@`basename $@` ++ ++bin/librpc_lsarpc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_LSARPC_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_LSARPC_OBJ) ++ ++bin/librpc_samr.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SAMR_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_SAMR_OBJ) ++ ++bin/librpc_srvsvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SRVSVC_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_SRVSVC_OBJ) ++ ++bin/librpc_svcctl.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SVCCTL_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_SVCCTL_OBJ) ++ ++bin/librpc_ntsvcs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NTSVCS_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_NTSVCS_OBJ) ++ ++bin/librpc_wkssvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_WKSSVC_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_WKSSVC_OBJ) ++ ++bin/librpc_NETLOGON.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NETLOGON_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_NETLOGON_OBJ) ++ ++bin/librpc_winreg.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_WINREG_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_WINREG_OBJ) ++ ++bin/librpc_initshutdown.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_INITSHUTDOWN_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_INITSHUTDOWN_OBJ) ++ ++bin/librpc_dssetup.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_DSSETUP_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_DSSETUP_OBJ) ++ ++bin/librpc_spoolss.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_SPOOLSS_OBJ) ++ ++bin/librpc_eventlog.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_EVENTLOG_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_EVENTLOG_OBJ) ++ ++bin/librpc_netdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NETDFS_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_NETDFS_OBJ) ++ ++bin/librpc_rpcecho.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_RPCECHO_OBJ) ++ @echo "Linking $@" ++ @$(SHLD_LIBRARY) $(RPC_RPCECHO_OBJ) ++ ++bin/winbindd: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo "Linking $@" ++ @$(CC) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(AUTH_LIBS) \ ++ $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) \ ++ $(ZLIB_LIBS) ++ ++bin/vlp: $(BINARY_PREREQS) $(VLP_OBJ) $(LIBTDBS) $(LIBTALLOC) ++ @echo "Linking $@" ++ @$(CC) -o $@ $(VLP_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \ ++ $(LIBTALLOC_LIBS) \ ++ $(LIBTDBS_LIBS) ++ ++@WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \ ++ $(LIBREPLACE_LIBS) $(PTHREAD_LDFLAGS) \ ++ @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@ ++ ++@WINBIND_WINS_NSS@: $(BINARY_PREREQS) $(WINBIND_WINS_NSS_OBJ) $(LIBTALLOC) $(LIBTDBS) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_OBJ) \ ++ $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(ZLIB_LIBS) \ ++ @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@ ++ ++bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT_LIBS) $(KRB5LIBS) \ ++ $(LIBREPLACE_LIBS) @SONAMEFLAG@`basename $@` ++ ++bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) $(LIBTALLOC) $(LIBWBCLIENT) ++ @echo "Linking shared library $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ \ ++ $(LIBREPLACE_LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) @SONAMEFLAG@`basename $@` ++ ++########## ++# Plugins: ++########## ++ ++bin/builtin.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_BUILTIN_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(AUTH_BUILTIN_OBJ) ++ ++bin/domain.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_DOMAIN_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(AUTH_DOMAIN_OBJ) ++ ++bin/script.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SCRIPT_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(AUTH_SCRIPT_OBJ) ++ ++bin/winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_WINBIND_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(AUTH_WINBIND_OBJ) ++ ++bin/wbc.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_WBC_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(AUTH_WBC_OBJ) ++ ++bin/unix.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_UNIX_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(AUTH_UNIX_OBJ) ++ ++bin/sam.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SAM_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(AUTH_SAM_OBJ) ++ ++bin/ldapsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_ldap.o passdb/pdb_nds.o \ ++ passdb/pdb_ipa.o passdb/pdb_ldap_util.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) passdb/pdb_ldap.o passdb/pdb_nds.o passdb/pdb_ipa.o \ ++ passdb/pdb_ldap_util.o $(LDAP_LIBS) ++ ++bin/tdbsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_tdb.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) passdb/pdb_tdb.o ++ ++bin/wbc_sam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_wbc_sam.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) passdb/pdb_wbc_sam.o ++ ++bin/smbpasswd.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_smbpasswd.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) passdb/pdb_smbpasswd.o ++ ++bin/rid.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_rid.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) winbindd/idmap_rid.o ++ ++bin/passdb.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_passdb.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) winbindd/idmap_passdb.o ++ ++bin/autorid.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_autorid.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) winbindd/idmap_autorid.o ++ ++bin/ad.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ad.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) winbindd/idmap_ad.o ++ ++bin/rfc2307.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_rfc2307.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) winbindd/idmap_rfc2307.o ++ ++bin/hash.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_HASH_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(IDMAP_HASH_OBJ) ++ ++bin/tdb2.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o $(IDMAP_RW_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) winbindd/idmap_tdb2.o $(IDMAP_RW_OBJ) ++ ++bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o $(IDMAP_RW_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) winbindd/idmap_ldap.o $(IDMAP_RW_OBJ) ++ ++# NOTE, there is no build rule for a dynamic default VFS module because ++# this one MUST MUST MUST be built statically. ++ ++bin/audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AUDIT_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_AUDIT_OBJ) ++ ++bin/extd_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXTD_AUDIT_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_EXTD_AUDIT_OBJ) ++ ++bin/full_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FULL_AUDIT_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_FULL_AUDIT_OBJ) ++ ++bin/recycle.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_RECYCLE_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_RECYCLE_OBJ) ++ ++bin/netatalk.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NETATALK_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_NETATALK_OBJ) ++ ++bin/fake_perms.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FAKE_PERMS_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_FAKE_PERMS_OBJ) ++ ++bin/fake_acls.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FAKE_ACLS_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_FAKE_ACLS_OBJ) ++ ++bin/default_quota.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_DEFAULT_QUOTA_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_DEFAULT_QUOTA_OBJ) ++ ++bin/readonly.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READONLY_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_READONLY_OBJ) ++ ++bin/shadow_copy.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_SHADOW_COPY_OBJ) ++ ++bin/shadow_copy2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY2_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_SHADOW_COPY2_OBJ) ++ ++bin/syncops.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SYNCOPS_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_SYNCOPS_OBJ) ++ ++bin/cap.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CAP_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_CAP_OBJ) ++ ++bin/expand_msdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXPAND_MSDFS_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_EXPAND_MSDFS_OBJ) ++ ++bin/afsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AFSACL_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_AFSACL_OBJ) ++ ++bin/xattr_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_XATTR_TDB_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_XATTR_TDB_OBJ) ++ ++bin/posixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_POSIXACL_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_POSIXACL_OBJ) ++ ++bin/aixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_AIXACL_OBJ) ++ ++bin/aixacl2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL2_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_AIXACL2_OBJ) ++ ++bin/solarisacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SOLARISACL_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_SOLARISACL_OBJ) ++ ++bin/zfsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ZFSACL_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_ZFSACL_OBJ) @ZFSACL_LIBS@ ++ ++bin/nfs4acl_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NFS4ACL_XATTR_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_NFS4ACL_XATTR_OBJ) ++ ++bin/hpuxacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_HPUXACL_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_HPUXACL_OBJ) ++ ++bin/tru64acl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TRU64ACL_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_TRU64ACL_OBJ) ++ ++bin/catia.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CATIA_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_CATIA_OBJ) ++ ++bin/streams_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_XATTR_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_STREAMS_XATTR_OBJ) ++ ++bin/streams_depot.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_DEPOT_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_STREAMS_DEPOT_OBJ) ++ ++bin/cacheprime.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CACHEPRIME_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_CACHEPRIME_OBJ) ++ ++bin/prealloc.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREALLOC_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_PREALLOC_OBJ) ++ ++bin/commit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_COMMIT_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_COMMIT_OBJ) ++ ++bin/gpfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_GPFS_OBJ) ++ ++bin/notify_fam.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NOTIFY_FAM_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_NOTIFY_FAM_OBJ) @SMB_FAM_LIBS@ ++ ++bin/readahead.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READAHEAD_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_READAHEAD_OBJ) ++ ++bin/tsmsm.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TSMSM_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_TSMSM_OBJ) ++ ++bin/fileid.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FILEID_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_FILEID_OBJ) ++ ++bin/aio_fork.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_FORK_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_AIO_FORK_OBJ) ++ ++bin/aio_pthread.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_PTHREAD_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_AIO_PTHREAD_OBJ) ++ ++bin/aio_posix.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_POSIX_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_AIO_POSIX_OBJ) ++ ++bin/aio_linux.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_LINUX_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_AIO_LINUX_OBJ) ++ ++bin/preopen.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREOPEN_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_PREOPEN_OBJ) ++ ++bin/acl_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_XATTR_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_ACL_XATTR_OBJ) ++ ++bin/smb_traffic_analyzer.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ) ++ ++bin/acl_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_TDB_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_ACL_TDB_OBJ) ++ ++bin/pc_test.@SHLIBEXT@: $(BINARY_PREREQS) $(PERFCOUNT_TEST_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(PERFCOUNT_TEST_OBJ) ++ ++bin/registry.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/registry.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) libgpo/gpext/registry.o ++ ++bin/scripts.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/scripts.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) libgpo/gpext/scripts.o ++ ++bin/security.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/security.o ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) libgpo/gpext/security.o ++ ++bin/dirsort.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_DIRSORT_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_DIRSORT_OBJ) ++ ++bin/scannedonly.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SCANNEDONLY_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_SCANNEDONLY_OBJ) ++ ++bin/crossrename.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CROSSRENAME_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_CROSSRENAME_OBJ) ++ ++bin/linux_xfs_sgid.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_LINUX_XFS_SGID_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_LINUX_XFS_SGID_OBJ) ++ ++bin/time_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TIME_AUDIT_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_TIME_AUDIT_OBJ) ++ ++bin/media_harmony.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_MEDIA_HARMONY_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_MEDIA_HARMONY_OBJ) ++ ++bin/btrfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_BTRFS_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_BTRFS_OBJ) ++ ++bin/ceph.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CEPH_OBJ) ++ @echo "Building plugin $@" ++ @$(SHLD_MODULE) $(VFS_CEPH_OBJ) ++ ++######################################################### ++## IdMap NSS plugins ++ ++## None here right now ++######################################################### ++ ++bin/wbinfo: $(BINARY_PREREQS) $(WBINFO_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) \ ++ $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) \ ++ $(LIBWBCLIENT_LIBS) ++ ++bin/ntlm_auth: $(BINARY_PREREQS) $(NTLM_AUTH_OBJ) $(PARAM_OBJ) \ ++ $(LIB_NONSMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) $(ZLIB_LIBS) \ ++ $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) @INIPARSERLIBS@ ++ ++bin/pam_smbpass.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_SMBPASS_OBJ) $(LIBTALLOC) $(LIBWBCLIENT) $(LIBTDBS) ++ @echo "Linking shared library $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_OBJ) -lpam $(DYNEXP) \ ++ $(LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(KRB5LIBS) $(ZLIB_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(LIBWBCLIENT_LIBS) ++ ++bin/tdbbackup: $(BINARY_PREREQS) $(TDBBACKUP_OBJ) $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LDFLAGS) $(TDBBACKUP_OBJ) $(DYNEXP) \ ++ $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/tdbtool: $(BINARY_PREREQS) $(TDBTOOL_OBJ) $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LDFLAGS) $(TDBTOOL_OBJ) $(DYNEXP) \ ++ $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/tdbdump: $(BINARY_PREREQS) $(TDBDUMP_OBJ) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LDFLAGS) $(TDBDUMP_OBJ) $(DYNEXP) $(LIBTDBS_LIBS) $(LIBREPLACE_LIBS) ++ ++bin/tdbrestore: $(BINARY_PREREQS) $(TDBRESTORE_OBJ) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LDFLAGS) $(TDBRESTORE_OBJ) $(DYNEXP) $(LIBTDBS_LIBS) $(LIBREPLACE_LIBS) ++ ++bin/tdbtorture: $(BINARY_PREREQS) $(TDBTORTURE_OBJ) $(LIBTALLOC) $(LIBTDBS) ++ @echo Linking $@ ++ @$(CC) -o $@ $(LDFLAGS) $(TDBTORTURE_OBJ) $(DYNEXP) \ ++ $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/timelimit: script/tests/timelimit.o ++ @echo Linking $@ ++ @$(CC) -o $@ $(DYNEXP) script/tests/timelimit.o $(LDFLAGS) ++ ++bin/rpc_open_tcp: $(BINARY_PREREQS) $(RPC_OPEN_TCP_OBJ) $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo "Linking $@" ++ @$(CC) -o $@ $(RPC_OPEN_TCP_OBJ) $(LDFLAGS) $(DYNEXP) \ ++ $(LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) \ ++ $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) ++ ++bin/test_lp_load: $(BINARY_PREREQS) $(TEST_LP_LOAD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo "Linking $@" ++ @$(CC) -o $@ $(TEST_LP_LOAD_OBJ) \ ++ $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(LDAP_LIBS) $(LIBWBCLIENT_LIBS) \ ++ $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++bin/dbwrap_tool: $(DBWRAP_TOOL_OBJ) $(LIBTALLOC) $(LIBTDBS) ++ @echo "Linking $@" ++ @$(CC) -o $@ $(DBWRAP_TOOL_OBJ)\ ++ $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(LDAP_LIBS) \ ++ $(POPT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++install-dbwrap_tool:: bin/dbwrap_tool ++ @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $< ++ ++bin/dbwrap_torture: $(DBWRAP_TORTURE_OBJ) $(LIBTALLOC) $(LIBTDBS) $(POPT_LIBS) ++ @echo "Linking $@" ++ @$(CC) -o $@ $(DBWRAP_TORTURE_OBJ)\ ++ $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(LDAP_LIBS) \ ++ $(POPT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++install-dbwrap_torture:: bin/dbwrap_torture ++ @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $< ++ ++bin/split_tokens: $(BINARY_PREREQS) $(SPLIT_TOKENS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) ++ @echo "Linking $@" ++ @$(CC) -o $@ $(SPLIT_TOKENS_OBJ) \ ++ $(LDFLAGS) $(DYNEXP) \ ++ $(LIBS) $(POPT_LIBS) \ ++ $(LDAP_LIBS) $(LIBWBCLIENT_LIBS) \ ++ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) ++ ++install:: installservers installbin installman \ ++ installscripts installdat installmodules \ ++ @INSTALL_PAM_MODULES@ installlibs installmo ++ ++install-everything:: install installmodules ++ ++# DESTDIR is used here to prevent packagers wasting their time ++# duplicating the Makefile. Remove it and you will have the privelege ++# of package each samba release for muliple versions of multiple ++# distributions and operating systems, or at least supplying patches ++# to all the packaging files required for this, prior to committing ++# the removal of DESTDIR. Do not remove it even though you think it ++# is not used ++ ++installdirs:: ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) \ ++ $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) \ ++ $(VARDIR) $(PRIVATE_DIR) $(PIDDIR) $(LOCKDIR) $(STATEDIR) \ ++ $(NMBDSOCKETDIR) $(WINBINDD_SOCKET_DIR) $(WINBINDD_PRIVILEGED_SOCKET_DIR) \ ++ $(CACHEDIR) $(MANDIR) $(CODEPAGEDIR) $(MODULESDIR) $(LOCALEDIR) ++ ++installservers:: all installdirs ++ @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS) ++ ++installbin:: all installdirs ++ @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS) ++ ++# Some symlinks are required for the 'probing' of modules. ++# This mechanism should go at some point.. ++installmodules:: modules installdirs ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(NSSINFOLIBDIR) $(NSS_INFO_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PERFCOUNTLIBDIR) $(PERFCOUNT_MODULES) ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam.@SHLIBEXT@ ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) rhosts.@SHLIBEXT@ hostsequiv.@SHLIBEXT@ ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) sam.@SHLIBEXT@ sam_ignoredomain.@SHLIBEXT@ ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) domain.@SHLIBEXT@ trustdomain.@SHLIBEXT@ ntdomain.@SHLIBEXT@ ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) builtin.@SHLIBEXT@ guest.@SHLIBEXT@ fixed_challenge.@SHLIBEXT@ name_to_ntstatus.@SHLIBEXT@ ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/ad.@SHLIBEXT@ rfc2307.@SHLIBEXT@ sfu.@SHLIBEXT@ sfu20.@SHLIBEXT@ ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/hash.@SHLIBEXT@ hash.@SHLIBEXT@ ++ ++installscripts:: installdirs ++ @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS) ++ ++installdat:: installdirs ++ @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir) ++ ++installpammodules:: $(PAM_MODULES) ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(PAMMODULESDIR) ++ @for module in $(PAM_MODULES); do \ ++ echo "Installing module $${module} as $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \ ++ $(INSTALLCMD) -m $(INSTALLPERMS_BIN) bin/$${module}.@SHLIBEXT@ \ ++ "$(DESTDIR)/$(PAMMODULESDIR)"; \ ++ done ++ ++# revert to the previously installed version ++revert:: ++ @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS) ++ @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(BIN_PROGS) $(SCRIPTS) ++ ++installman:: installdirs ++ @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) C "@ROFF@" ++ ++installmo:: all installdirs ++ @$(SHELL) $(srcdir)/script/installmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir) ++ ++.PHONY: showlayout ++ ++showlayout:: ++ @echo "Samba will be installed into:" ++ @echo " prefix: $(prefix)" ++ @echo " exec_prefix: $(exec_prefix)" ++ @echo " sysconfdir: $(sysconfdir)" ++ @echo " localstatedir: $(localstatedir)" ++ @echo " datarootdir: $(datarootdir)" ++ @echo " BINDIR: $(BINDIR)" ++ @echo " SBINDIR: $(SBINDIR)" ++ @echo " LIBDIR: $(LIBDIR)" ++# @echo " LIBEXECDIR: $(LIBEXECDIR)" ++ @echo " MANDIR: $(MANDIR)" ++ @echo " DATADIR: $(DATADIR)" ++ @echo " LOCALEDIR: $(LOCALEDIR)" ++# @echo " SCRIPTSBINDIR: $(SCRIPTSBINDIR)" ++# @echo " PYTHONDIR: $(PYTHONDIR)" ++# @echo " PYTHONARCHDIR: $(PYTHONARCHDIR)" ++ @echo " MODULESDIR: $(MODULESDIR)" ++ @echo " INCLUDEDIR: $(INCLUDEDIR)" ++ @echo " SETUPDIR: $(SETUPDIR)" ++# @echo " PKGCONFIGDIR: $(PKGCONFIGDIR)" ++ @echo " CODEPAGEDIR: $(CODEPAGEDIR)" ++ @echo " PAMMODULESDIR: $(PAMMODULESDIR)" ++ @echo " CONFIGDIR: $(CONFIGDIR)" ++ @echo " PRIVATE_DIR: $(PRIVATE_DIR)" ++ @echo " LOCKDIR: $(LOCKDIR)" ++ @echo " PIDDIR: $(PIDDIR)" ++ @echo " STATEDIR: $(STATEDIR)" ++ @echo " CACHEDIR: $(CACHEDIR)" ++ @echo " LOGFILEBASE: $(LOGFILEBASE)" ++ @echo " SOCKET_DIR: $(SOCKET_DIR)" ++ @echo " PRIVILEGED_SOCKET_DIR: $(PRIVILEGED_SOCKET_DIR)" ++ @echo " WINBINDD_SOCKET_DIR: $(WINBINDD_SOCKET_DIR)" ++ @echo " WINBINDD_PRIVILEGED_SOCKET_DIR: $(WINBINDD_PRIVILEGED_SOCKET_DIR)" ++ @echo " NMBDSOCKETDIR: $(NMBDSOCKETDIR)" ++# @echo " NTP_SIGND_SOCKET_DIR: $(NTP_SIGND_SOCKET_DIR)" ++ @echo " NCALRPCDIR: $(NCALRPCDIR)" ++ @echo " CONFIGFILE: $(CONFIGFILE)" ++ @echo " LMHOSTSFILE: $(LMHOSTSFILE)" ++ @echo " SMB_PASSWD_FILE: $(SMB_PASSWD_FILE)" ++ ++ ++uninstall:: uninstallmo uninstallman uninstallservers uninstallbin uninstallscripts uninstalldat uninstallmodules uninstalllibs @UNINSTALL_PAM_MODULES@ ++ ++uninstallmo:: ++ @$(SHELL) $(srcdir)/script/uninstallmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir) ++ ++uninstallman:: ++ @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C ++ ++uninstallservers:: ++ @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS) ++ ++uninstallbin:: ++ @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS) ++ ++uninstallmodules:: ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES) ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES) ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES) ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES) ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES) ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PERFCOUNTLIBDIR) $(PERFCOUNT_MODULES) ++ ++uninstallscripts:: ++ @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS) ++ ++uninstalldat:: ++ @$(SHELL) $(srcdir)/script/uninstalldat.sh $(DESTDIR) $(LIBDIR) $(srcdir) ++ ++uninstallpammodules:: ++ @for module in $(PAM_MODULES); do \ ++ echo "Removing $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \ ++ rm -f "$(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@"; \ ++ done ++ ++cleanlibs:: ++ -rm -f ../lib/*/*.o ../lib/*/*/*.o \ ++ ../lib/*/*.ho \ ++ ../libcli/*.o ../libcli/*/*.o ../libcli/*/*/*.o \ ++ ../librpc/*/*.o \ ++ ../libgpo/*.o ../libgpo/*/*.o \ ++ ../libds/*.o ../libds/*/*.o ../dynconfig/*.o ../auth/*.o ../auth/*/*.o ++ ++clean:: cleanlibs ++ -rm -f include/build_env.h ++ -rm -f smbd/build_options.c ++ -rm -f autoconf/lib/param/param_local.h ++ -rm -f autoconf/lib/param/param_global.h ++ -rm -f autoconf/lib/param/param_proto.h ++ -rm -f autoconf/lib/param/s3_param.h ++ -rm -f autoconf/source3/param/param_global.h ++ -rm -f $(PRECOMPILED_HEADER) ++ -rm -f core */*~ *~ \ ++ */*.o */*/*.o */*/*/*.o */*/*/*/*.o \ ++ ../testsuite/*/*.o \ ++ ../nsswitch/*.o ../nsswitch/*/*.o ../nsswitch/*/*/*.o ../nsswitch/*.@SHLIBEXT@ \ ++ ../client/*.o \ ++ */*.@SHLIBEXT@ */*/*.@SHLIBEXT@ */*/*/*.@SHLIBEXT@ \ ++ $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) \ ++ $(MODULES) $(TORTURE_PROGS) \ ++ $(EVERYTHING_PROGS) \ ++ bin/timelimit \ ++ .headers.stamp */src/*.o ++ -rm -rf t_dir ++ ++include/build_env.h: script/build_env.sh ++ @echo Building include/build_env.h ++ @$(SHELL) $(srcdir)/script/build_env.sh $(srcdir) $(builddir) $(CC) \ ++ > $(builddir)/include/build_env.h ++ ++proto:: ++ ++etags:: ++ rm -f TAGS ++ find $(srcdir)/.. -name "*.[ch]" | xargs -n 100 etags --append $(ETAGS_OPTIONS) ++ ++ctags:: ++ ctags $(CTAGS_OPTIONS) `find $(srcdir)/.. -name "*.[ch]" | grep -v proto\.h` ++ ++realclean:: clean ++ -rm -f config.log bin/.dummy script/findsmb script/gen-8bit-gap.sh ++ -rm -f script/installbin.sh script/uninstallbin.sh ++ ++distclean:: realclean ++ -rm -f smbadduser ++ -rm -f include/autoconf/config.h Makefile ++ -rm -f config.status config.cache so_locations ++ -rm -rf .deps TAGS ++ ++realdistclean:: distclean ++ -rm -f include/autoconf/config.h.in ++ -rm -f include/autoconf/version.h ++ -rm -f autoconf/librpc/gen_ndr/*.[ch] ++ -rm -f configure ++ ++# when configure.in is updated, reconfigure ++$(srcdir)/configure: $(srcdir)/configure.in ++ @echo "WARNING: you need to rerun ./autogen.sh" ++ ++config.status: $(srcdir)/configure ++ @echo "WARNING: you need to run ./configure" ++ ++Makefile: $(srcdir)/Makefile.in config.status ++ @echo "WARNING: you need to run ./config.status" ++ ++###################################################################### ++# Samba Testing Framework ++ ++# Check shared libs for unresolved symbols ++test_shlibs: ++ @echo "Testing $? " ++ @$(LIB_PATH_VAR)=./bin && \ ++ export $(LIB_PATH_VAR) && \ ++ for module in $?; do \ ++ ./script/tests/dlopen.sh $(LIBDL) $${module} \ ++ || exit 1; \ ++ done ++ ++# Check for NSS module problems. ++test_nss_modules:: nss_modules ++ @echo "Testing $(NSS_MODULES) " ++ @$(LIB_PATH_VAR)=./bin && \ ++ export $(LIB_PATH_VAR) && \ ++ for module in $(NSS_MODULES); do \ ++ ./script/tests/dlopen.sh $(LIBDL) $${module} \ ++ || exit 1; \ ++ done ++ ++# Check for PAM module problems. Specifically, check that every module we ++# built can actually be loaded by a minimal PAM-aware application. ++test_pam_modules:: pam_modules ++ @echo "Testing $(PAM_MODULES) " ++ @$(LIB_PATH_VAR)=./bin && \ ++ export $(LIB_PATH_VAR) && \ ++ for module in $(PAM_MODULES); do \ ++ ./script/tests/dlopen.sh -lpam $(LIBDL) bin/$${module}.@SHLIBEXT@ \ ++ || exit 1; \ ++ done ++ ++ ++## ++## Targets for 'make test' ++## ++ ++valgrindtest:: all torture timelimit bin/smbtorture ++ @echo Running Test suite with valgrind ++ @$(MAKE) test \ ++ NMBD_VALGRIND="xterm -n nmbd -e valgrind -q --db-attach=yes --num-callers=30" \ ++ WINBINDD_VALGRIND="xterm -n winbindd -e valgrind -q --db-attach=yes --num-callers=30" \ ++ SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \ ++ VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" ++ ++selftestdir = ../selftest ++ ++S3_LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)="$(builddir)/bin:$$$(LIB_PATH_VAR)" ++ ++test:: all torture timelimit bin/smbtorture ++ @LIB_PATH_VAR=$(LIB_PATH_VAR) $(S3_LD_LIBPATH_OVERRIDE) \ ++ NSS_WRAPPER_WINBIND_SO_PATH="$(srcdir)/../nsswitch/libnss_winbind.so" \ ++ SELFTESTDIR="$(selftestdir)" SELFTESTPREFIX="$(selftest_prefix)" \ ++ SOURCEDIR="$(srcdir)" \ ++ VFSLIBDIR="$(builddir)/bin" \ ++ RUN_FROM_BUILD_FARM="$(RUN_FROM_BUILD_FARM)" \ ++ SUBUNIT_FORMATTER="$(SUBUNIT_FORMATTER)" \ ++ PERL="$(PERL)" PYTHON="$(PYTHON)" PYTHONPATH="$(srcdir)/../bin/python" \ ++ $(srcdir)/selftest/s3-selftest.sh ++ ++test-%: ++ $(MAKE) test TESTS=$* ++ ++buildfarm-test: ++ $(MAKE) test RUN_FROM_BUILD_FARM=yes ++ ++subunit-test: ++ $(MAKE) test SUBUNIT_FORMATTER=cat ++ ++SELFTEST_TESTENV = s3dc ++ ++testenv: ++ $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) TESTS="--testenv" ++ ++gdbtestenv: ++ $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) \ ++ NMBD_VALGRIND="xterm -n nmbd -title nmbd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \ ++ WINBINDD_VALGRIND="xterm -n winbindd -title winbindd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \ ++ SMBD_VALGRIND="xterm -n smbd -title smbd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \ ++ TESTS="--testenv" ++ ++valgrindtestenv: ++ $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) \ ++ NMBD_VALGRIND="xterm -n nmbd -title nmbd -e valgrind -q --db-attach=yes --num-callers=30" \ ++ WINBINDD_VALGRIND="xterm -n winbindd -title winbindd -e valgrind -q --db-attach=yes --num-callers=30" \ ++ SMBD_VALGRIND="xterm -n smbd -title smbd -e valgrind -q --db-attach=yes --num-callers=30" \ ++ TESTS="--testenv" ++ ++ ++# Check for Winbind struct 32/64bit padding ++test_wbpad: ++ @echo "Testing winbind request/response structure for 32/64bit padding" ++ @./script/tests/wb_pad.sh || exit 1; ++ ++## ++## Examples: ++## ++ ++libsmbclient_examples: libsmbclient ++ $(MAKE) -C ../examples/libsmbclient -f Makefile.internal ++ ++clean_libsmbclient_examples: ++ $(MAKE) -C ../examples/libsmbclient -f Makefile.internal clean ++ ++libnetapi_examples: libnetapi ++ $(MAKE) -C lib/netapi/examples ++ ++clean_libnetapi_examples: ++ $(MAKE) -C lib/netapi/examples clean ++ ++.PHONY: bin/smbtorture ++ ++bin/smbtorture: $(BINARY_PREREQS) ++ $(MAKE) -f Makefile-smbtorture bin/smbtorture ++ ++.PHONY: vfs_examples ++ ++vfs_examples: ++ ( \ ++ cd ../examples/VFS && \ ++ ./configure && \ ++ $(MAKE) clean && \ ++ $(MAKE) \ ++ ) +diff --git a/source3/autogen.sh b/source3/autogen.sh +new file mode 100755 +index 0000000..4f39e10 +--- /dev/null ++++ b/source3/autogen.sh +@@ -0,0 +1,121 @@ ++#!/bin/sh ++ ++# Run this script to build samba from GIT. ++ ++ ++_exit() { ++ echo $@ >&2 ++ cd ${OLD_DIR} ++ exit 1 ++} ++ ++OLD_DIR=$(pwd) ++BASE_DIR=$(dirname $0) ++SCRIPT_NAME=$(basename $0) ++ ++cd ${BASE_DIR} || exit 1 ++ ++ ++while true; do ++ case $1 in ++ --version-file) ++ VERSION_FILE=$2 ++ shift 2 ++ ;; ++ *) ++ break ++ ;; ++ esac ++done ++ ++## insert all possible names (only works with ++## autoconf 2.x) ++TESTAUTOHEADER="autoheader autoheader-2.53 autoheader2.50 autoheader259 autoheader253" ++TESTAUTOCONF="autoconf autoconf-2.53 autoconf2.50 autoconf259 autoconf253" ++ ++AUTOHEADERFOUND="0" ++AUTOCONFFOUND="0" ++ ++ ++## ++## Look for autoheader ++## ++for i in $TESTAUTOHEADER; do ++ if which $i > /dev/null 2>&1; then ++ if test `$i --version | head -n 1 | cut -d. -f 2 | sed "s/[^0-9]//g"` -ge 53; then ++ AUTOHEADER=$i ++ AUTOHEADERFOUND="1" ++ break ++ fi ++ fi ++done ++ ++## ++## Look for autoconf ++## ++ ++for i in $TESTAUTOCONF; do ++ if which $i > /dev/null 2>&1; then ++ if test `$i --version | head -n 1 | cut -d. -f 2 | sed "s/[^0-9]//g"` -ge 53; then ++ AUTOCONF=$i ++ AUTOCONFFOUND="1" ++ break ++ fi ++ fi ++done ++ ++ ++## ++## do we have it? ++## ++if test "$AUTOCONFFOUND" = "0" -o "$AUTOHEADERFOUND" = "0"; then ++ _exit "$0: need autoconf 2.53 or later to build samba from GIT" ++fi ++ ++echo "$0: running script/mkversion.sh" ++./script/mkversion.sh $VERSION_FILE || exit 1 ++ ++rm -rf autom4te*.cache ++rm -f configure include/config.h* ++ ++IPATHS="-Im4 -I../m4 -I../lib/replace" ++ ++echo "$0: running $AUTOHEADER $IPATHS" ++$AUTOHEADER $IPATHS || _exit "ERROR running autoheader" ++ ++echo "$0: running $AUTOCONF $IPATHS" ++$AUTOCONF $IPATHS || _exit "ERROR running autoconf" ++ ++rm -rf autom4te*.cache ++ ++( cd ../examples/VFS || exit 1 ++ echo "$0: running $AUTOHEADER in ../examples/VFS/" ++ $AUTOHEADER || exit 1 ++ echo "$0: running $AUTOCONF in ../examples/VFS/" ++ $AUTOCONF || exit 1 ++ rm -rf autom4te*.cache ++) || _exit "ERROR running autoheader/autoconf in examples/VFS" ++ ++ ++if gcc -E tests/preproc-dummy.c -o /dev/null ; ++then ++ PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" CPP="gcc -E" PIDL=../pidl/pidl \ ++ srcdir=. ../librpc/build_idl.sh ../librpc/idl/*.idl ++ PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" CPP="gcc -E" PIDL=../pidl/pidl \ ++ srcdir=. script/build_idl.sh librpc/idl/*.idl ++else ++ echo "Warning: Could not compile idl files in autogen, " ++ echo "some autconf tests might not work properly" ++fi ++ ++perl ../script/mkparamdefs.pl ../lib/param/param_functions.c --file autoconf/lib/param/param_local.h --generate-scope=LOCAL ++perl ../script/mkparamdefs.pl ../lib/param/loadparm.c ../lib/param/param_functions.c --file autoconf/lib/param/param_global.h --generate-scope=GLOBAL ++perl ../script/mkparamdefs.pl param/loadparm.c ../lib/param/param_functions.c --file autoconf/source3/param/param_global.h --generate-scope=GLOBAL ++perl ../source4/script/mkproto.pl ../lib/param/loadparm.c ../lib/param/param_functions.c --public autoconf/lib/param/param_proto.h --private autoconf/lib/param/param_proto.h ++perl ../script/mks3param.pl ../lib/param/loadparm.c ../lib/param/param_functions.c --file autoconf/lib/param/s3_param.h ++ ++echo "Now run ./configure (or ./configure.developer) and then make." ++ ++cd ${OLD_DIR} ++exit 0 ++ +diff --git a/source3/config.guess b/source3/config.guess +new file mode 100755 +index 0000000..da83314 +--- /dev/null ++++ b/source3/config.guess +@@ -0,0 +1,1561 @@ ++#! /bin/sh ++# Attempt to guess a canonical system name. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 ++# Free Software Foundation, Inc. ++ ++timestamp='2009-04-27' ++ ++# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, USA. ++# ++# As a special exception to the GNU General Public License, if you ++# distribute this file as part of a program that contains a ++# configuration script generated by Autoconf, you may include it under ++# the same distribution terms that you use for the rest of that program. ++ ++ ++# Originally written by Per Bothner <per@bothner.com>. ++# Please send patches to <config-patches@gnu.org>. Submit a context ++# diff and a properly formatted ChangeLog entry. ++# ++# This script attempts to guess a canonical system name similar to ++# config.sub. If it succeeds, it prints the system name on stdout, and ++# exits with 0. Otherwise, it exits with 1. ++# ++# The plan is that this can be called by configure scripts if you ++# don't specify an explicit build system type. ++ ++me=`echo "$0" | sed -e 's,.*/,,'` ++ ++usage="\ ++Usage: $0 [OPTION] ++ ++Output the configuration name of the system \`$me' is run on. ++ ++Operation modes: ++ -h, --help print this help, then exit ++ -t, --time-stamp print date of last modification, then exit ++ -v, --version print version number, then exit ++ ++Report bugs and patches to <config-patches@gnu.org>." ++ ++version="\ ++GNU config.guess ($timestamp) ++ ++Originally written by Per Bothner. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, ++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++ ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ++ ++help=" ++Try \`$me --help' for more information." ++ ++# Parse command line ++while test $# -gt 0 ; do ++ case $1 in ++ --time-stamp | --time* | -t ) ++ echo "$timestamp" ; exit ;; ++ --version | -v ) ++ echo "$version" ; exit ;; ++ --help | --h* | -h ) ++ echo "$usage"; exit ;; ++ -- ) # Stop option processing ++ shift; break ;; ++ - ) # Use stdin as input. ++ break ;; ++ -* ) ++ echo "$me: invalid option $1$help" >&2 ++ exit 1 ;; ++ * ) ++ break ;; ++ esac ++done ++ ++if test $# != 0; then ++ echo "$me: too many arguments$help" >&2 ++ exit 1 ++fi ++ ++trap 'exit 1' 1 2 15 ++ ++# CC_FOR_BUILD -- compiler used by this script. Note that the use of a ++# compiler to aid in system detection is discouraged as it requires ++# temporary files to be created and, as you can see below, it is a ++# headache to deal with in a portable fashion. ++ ++# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still ++# use `HOST_CC' if defined, but it is deprecated. ++ ++# Portable tmp directory creation inspired by the Autoconf team. ++ ++set_cc_for_build=' ++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; ++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; ++: ${TMPDIR=/tmp} ; ++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || ++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || ++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; ++dummy=$tmp/dummy ; ++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; ++case $CC_FOR_BUILD,$HOST_CC,$CC in ++ ,,) echo "int x;" > $dummy.c ; ++ for c in cc gcc c89 c99 ; do ++ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then ++ CC_FOR_BUILD="$c"; break ; ++ fi ; ++ done ; ++ if test x"$CC_FOR_BUILD" = x ; then ++ CC_FOR_BUILD=no_compiler_found ; ++ fi ++ ;; ++ ,,*) CC_FOR_BUILD=$CC ;; ++ ,*,*) CC_FOR_BUILD=$HOST_CC ;; ++esac ; set_cc_for_build= ;' ++ ++# This is needed to find uname on a Pyramid OSx when run in the BSD universe. ++# (ghazi@noc.rutgers.edu 1994-08-24) ++if (test -f /.attbin/uname) >/dev/null 2>&1 ; then ++ PATH=$PATH:/.attbin ; export PATH ++fi ++ ++UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown ++UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown ++UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown ++UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown ++ ++# Note: order is significant - the case branches are not exclusive. ++ ++case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ++ *:NetBSD:*:*) ++ # NetBSD (nbsd) targets should (where applicable) match one or ++ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently ++ # switched to ELF, *-*-netbsd* would select the old ++ # object file format. This provides both forward ++ # compatibility and a consistent mechanism for selecting the ++ # object file format. ++ # ++ # Note: NetBSD doesn't particularly care about the vendor ++ # portion of the name. We always set it to "unknown". ++ sysctl="sysctl -n hw.machine_arch" ++ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ ++ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` ++ case "${UNAME_MACHINE_ARCH}" in ++ armeb) machine=armeb-unknown ;; ++ arm*) machine=arm-unknown ;; ++ sh3el) machine=shl-unknown ;; ++ sh3eb) machine=sh-unknown ;; ++ sh5el) machine=sh5le-unknown ;; ++ *) machine=${UNAME_MACHINE_ARCH}-unknown ;; ++ esac ++ # The Operating System including object format, if it has switched ++ # to ELF recently, or will in the future. ++ case "${UNAME_MACHINE_ARCH}" in ++ arm*|i386|m68k|ns32k|sh3*|sparc|vax) ++ eval $set_cc_for_build ++ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep __ELF__ >/dev/null ++ then ++ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). ++ # Return netbsd for either. FIX? ++ os=netbsd ++ else ++ os=netbsdelf ++ fi ++ ;; ++ *) ++ os=netbsd ++ ;; ++ esac ++ # The OS release ++ # Debian GNU/NetBSD machines have a different userland, and ++ # thus, need a distinct triplet. However, they do not need ++ # kernel version information, so it can be replaced with a ++ # suitable tag, in the style of linux-gnu. ++ case "${UNAME_VERSION}" in ++ Debian*) ++ release='-gnu' ++ ;; ++ *) ++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ ;; ++ esac ++ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: ++ # contains redundant information, the shorter form: ++ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. ++ echo "${machine}-${os}${release}" ++ exit ;; ++ *:OpenBSD:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} ++ exit ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit ;; ++ *:SolidBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} ++ exit ;; ++ macppc:MirBSD:*:*) ++ echo powerpc-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; ++ alpha:OSF1:*:*) ++ case $UNAME_RELEASE in ++ *4.0) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac ++ # According to Compaq, /usr/sbin/psrinfo has been available on ++ # OSF/1 and Tru64 systems produced since 1995. I hope that ++ # covers most systems running today. This code pipes the CPU ++ # types through head -n 1, so we only detect the type of CPU 0. ++ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` ++ case "$ALPHA_CPU_TYPE" in ++ "EV4 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "EV4.5 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "LCA4 (21066/21068)") ++ UNAME_MACHINE="alpha" ;; ++ "EV5 (21164)") ++ UNAME_MACHINE="alphaev5" ;; ++ "EV5.6 (21164A)") ++ UNAME_MACHINE="alphaev56" ;; ++ "EV5.6 (21164PC)") ++ UNAME_MACHINE="alphapca56" ;; ++ "EV5.7 (21164PC)") ++ UNAME_MACHINE="alphapca57" ;; ++ "EV6 (21264)") ++ UNAME_MACHINE="alphaev6" ;; ++ "EV6.7 (21264A)") ++ UNAME_MACHINE="alphaev67" ;; ++ "EV6.8CB (21264C)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8AL (21264B)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8CX (21264D)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.9A (21264/EV69A)") ++ UNAME_MACHINE="alphaev69" ;; ++ "EV7 (21364)") ++ UNAME_MACHINE="alphaev7" ;; ++ "EV7.9 (21364A)") ++ UNAME_MACHINE="alphaev79" ;; ++ esac ++ # A Pn.n version is a patched version. ++ # A Vn.n version is a released version. ++ # A Tn.n version is a released field test version. ++ # A Xn.n version is an unreleased experimental baselevel. ++ # 1.2 uses "1.2" for uname -r. ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ exit ;; ++ Alpha\ *:Windows_NT*:*) ++ # How do we know it's Interix rather than the generic POSIX subsystem? ++ # Should we change UNAME_MACHINE based on the output of uname instead ++ # of the specific Alpha model? ++ echo alpha-pc-interix ++ exit ;; ++ 21064:Windows_NT:50:3) ++ echo alpha-dec-winnt3.5 ++ exit ;; ++ Amiga*:UNIX_System_V:4.0:*) ++ echo m68k-unknown-sysv4 ++ exit ;; ++ *:[Aa]miga[Oo][Ss]:*:*) ++ echo ${UNAME_MACHINE}-unknown-amigaos ++ exit ;; ++ *:[Mm]orph[Oo][Ss]:*:*) ++ echo ${UNAME_MACHINE}-unknown-morphos ++ exit ;; ++ *:OS/390:*:*) ++ echo i370-ibm-openedition ++ exit ;; ++ *:z/VM:*:*) ++ echo s390-ibm-zvmoe ++ exit ;; ++ *:OS400:*:*) ++ echo powerpc-ibm-os400 ++ exit ;; ++ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) ++ echo arm-acorn-riscix${UNAME_RELEASE} ++ exit ;; ++ arm:riscos:*:*|arm:RISCOS:*:*) ++ echo arm-unknown-riscos ++ exit ;; ++ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) ++ echo hppa1.1-hitachi-hiuxmpp ++ exit ;; ++ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) ++ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. ++ if test "`(/bin/universe) 2>/dev/null`" = att ; then ++ echo pyramid-pyramid-sysv3 ++ else ++ echo pyramid-pyramid-bsd ++ fi ++ exit ;; ++ NILE*:*:*:dcosx) ++ echo pyramid-pyramid-svr4 ++ exit ;; ++ DRS?6000:unix:4.0:6*) ++ echo sparc-icl-nx6 ++ exit ;; ++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) ++ case `/usr/bin/uname -p` in ++ sparc) echo sparc-icl-nx7; exit ;; ++ esac ;; ++ s390x:SunOS:*:*) ++ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ sun4H:SunOS:5.*:*) ++ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) ++ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) ++ eval $set_cc_for_build ++ SUN_ARCH="i386" ++ # If there is a compiler, see if it is configured for 64-bit objects. ++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ++ # This test works for both compilers. ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ SUN_ARCH="x86_64" ++ fi ++ fi ++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ sun4*:SunOS:6*:*) ++ # According to config.sub, this is the proper way to canonicalize ++ # SunOS6. Hard to guess exactly what SunOS6 will be like, but ++ # it's likely to be more like Solaris than SunOS4. ++ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ sun4*:SunOS:*:*) ++ case "`/usr/bin/arch -k`" in ++ Series*|S4*) ++ UNAME_RELEASE=`uname -v` ++ ;; ++ esac ++ # Japanese Language versions have a version number like `4.1.3-JL'. ++ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` ++ exit ;; ++ sun3*:SunOS:*:*) ++ echo m68k-sun-sunos${UNAME_RELEASE} ++ exit ;; ++ sun*:*:4.2BSD:*) ++ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` ++ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 ++ case "`/bin/arch`" in ++ sun3) ++ echo m68k-sun-sunos${UNAME_RELEASE} ++ ;; ++ sun4) ++ echo sparc-sun-sunos${UNAME_RELEASE} ++ ;; ++ esac ++ exit ;; ++ aushp:SunOS:*:*) ++ echo sparc-auspex-sunos${UNAME_RELEASE} ++ exit ;; ++ # The situation for MiNT is a little confusing. The machine name ++ # can be virtually everything (everything which is not ++ # "atarist" or "atariste" at least should have a processor ++ # > m68000). The system name ranges from "MiNT" over "FreeMiNT" ++ # to the lowercase version "mint" (or "freemint"). Finally ++ # the system name "TOS" denotes a system which is actually not ++ # MiNT. But MiNT is downward compatible to TOS, so this should ++ # be no problem. ++ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit ;; ++ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit ;; ++ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit ;; ++ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) ++ echo m68k-milan-mint${UNAME_RELEASE} ++ exit ;; ++ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) ++ echo m68k-hades-mint${UNAME_RELEASE} ++ exit ;; ++ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) ++ echo m68k-unknown-mint${UNAME_RELEASE} ++ exit ;; ++ m68k:machten:*:*) ++ echo m68k-apple-machten${UNAME_RELEASE} ++ exit ;; ++ powerpc:machten:*:*) ++ echo powerpc-apple-machten${UNAME_RELEASE} ++ exit ;; ++ RISC*:Mach:*:*) ++ echo mips-dec-mach_bsd4.3 ++ exit ;; ++ RISC*:ULTRIX:*:*) ++ echo mips-dec-ultrix${UNAME_RELEASE} ++ exit ;; ++ VAX*:ULTRIX*:*:*) ++ echo vax-dec-ultrix${UNAME_RELEASE} ++ exit ;; ++ 2020:CLIX:*:* | 2430:CLIX:*:*) ++ echo clipper-intergraph-clix${UNAME_RELEASE} ++ exit ;; ++ mips:*:*:UMIPS | mips:*:*:RISCos) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++#ifdef __cplusplus ++#include <stdio.h> /* for printf() prototype */ ++ int main (int argc, char *argv[]) { ++#else ++ int main (argc, argv) int argc; char *argv[]; { ++#endif ++ #if defined (host_mips) && defined (MIPSEB) ++ #if defined (SYSTYPE_SYSV) ++ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); ++ #endif ++ #if defined (SYSTYPE_SVR4) ++ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); ++ #endif ++ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) ++ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); ++ #endif ++ #endif ++ exit (-1); ++ } ++EOF ++ $CC_FOR_BUILD -o $dummy $dummy.c && ++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && ++ SYSTEM_NAME=`$dummy $dummyarg` && ++ { echo "$SYSTEM_NAME"; exit; } ++ echo mips-mips-riscos${UNAME_RELEASE} ++ exit ;; ++ Motorola:PowerMAX_OS:*:*) ++ echo powerpc-motorola-powermax ++ exit ;; ++ Motorola:*:4.3:PL8-*) ++ echo powerpc-harris-powermax ++ exit ;; ++ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) ++ echo powerpc-harris-powermax ++ exit ;; ++ Night_Hawk:Power_UNIX:*:*) ++ echo powerpc-harris-powerunix ++ exit ;; ++ m88k:CX/UX:7*:*) ++ echo m88k-harris-cxux7 ++ exit ;; ++ m88k:*:4*:R4*) ++ echo m88k-motorola-sysv4 ++ exit ;; ++ m88k:*:3*:R3*) ++ echo m88k-motorola-sysv3 ++ exit ;; ++ AViiON:dgux:*:*) ++ # DG/UX returns AViiON for all architectures ++ UNAME_PROCESSOR=`/usr/bin/uname -p` ++ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] ++ then ++ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ ++ [ ${TARGET_BINARY_INTERFACE}x = x ] ++ then ++ echo m88k-dg-dgux${UNAME_RELEASE} ++ else ++ echo m88k-dg-dguxbcs${UNAME_RELEASE} ++ fi ++ else ++ echo i586-dg-dgux${UNAME_RELEASE} ++ fi ++ exit ;; ++ M88*:DolphinOS:*:*) # DolphinOS (SVR3) ++ echo m88k-dolphin-sysv3 ++ exit ;; ++ M88*:*:R3*:*) ++ # Delta 88k system running SVR3 ++ echo m88k-motorola-sysv3 ++ exit ;; ++ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) ++ echo m88k-tektronix-sysv3 ++ exit ;; ++ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) ++ echo m68k-tektronix-bsd ++ exit ;; ++ *:IRIX*:*:*) ++ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` ++ exit ;; ++ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. ++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id ++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ++ i*86:AIX:*:*) ++ echo i386-ibm-aix ++ exit ;; ++ ia64:AIX:*:*) ++ if [ -x /usr/bin/oslevel ] ; then ++ IBM_REV=`/usr/bin/oslevel` ++ else ++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} ++ fi ++ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} ++ exit ;; ++ *:AIX:2:3) ++ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #include <sys/systemcfg.h> ++ ++ main() ++ { ++ if (!__power_pc()) ++ exit(1); ++ puts("powerpc-ibm-aix3.2.5"); ++ exit(0); ++ } ++EOF ++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` ++ then ++ echo "$SYSTEM_NAME" ++ else ++ echo rs6000-ibm-aix3.2.5 ++ fi ++ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then ++ echo rs6000-ibm-aix3.2.4 ++ else ++ echo rs6000-ibm-aix3.2 ++ fi ++ exit ;; ++ *:AIX:*:[456]) ++ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` ++ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then ++ IBM_ARCH=rs6000 ++ else ++ IBM_ARCH=powerpc ++ fi ++ if [ -x /usr/bin/oslevel ] ; then ++ IBM_REV=`/usr/bin/oslevel` ++ else ++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} ++ fi ++ echo ${IBM_ARCH}-ibm-aix${IBM_REV} ++ exit ;; ++ *:AIX:*:*) ++ echo rs6000-ibm-aix ++ exit ;; ++ ibmrt:4.4BSD:*|romp-ibm:BSD:*) ++ echo romp-ibm-bsd4.4 ++ exit ;; ++ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and ++ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to ++ exit ;; # report: romp-ibm BSD 4.3 ++ *:BOSX:*:*) ++ echo rs6000-bull-bosx ++ exit ;; ++ DPX/2?00:B.O.S.:*:*) ++ echo m68k-bull-sysv3 ++ exit ;; ++ 9000/[34]??:4.3bsd:1.*:*) ++ echo m68k-hp-bsd ++ exit ;; ++ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) ++ echo m68k-hp-bsd4.4 ++ exit ;; ++ 9000/[34678]??:HP-UX:*:*) ++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` ++ case "${UNAME_MACHINE}" in ++ 9000/31? ) HP_ARCH=m68000 ;; ++ 9000/[34]?? ) HP_ARCH=m68k ;; ++ 9000/[678][0-9][0-9]) ++ if [ -x /usr/bin/getconf ]; then ++ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` ++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ++ case "${sc_cpu_version}" in ++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ++ 532) # CPU_PA_RISC2_0 ++ case "${sc_kernel_bits}" in ++ 32) HP_ARCH="hppa2.0n" ;; ++ 64) HP_ARCH="hppa2.0w" ;; ++ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 ++ esac ;; ++ esac ++ fi ++ if [ "${HP_ARCH}" = "" ]; then ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ ++ #define _HPUX_SOURCE ++ #include <stdlib.h> ++ #include <unistd.h> ++ ++ int main () ++ { ++ #if defined(_SC_KERNEL_BITS) ++ long bits = sysconf(_SC_KERNEL_BITS); ++ #endif ++ long cpu = sysconf (_SC_CPU_VERSION); ++ ++ switch (cpu) ++ { ++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; ++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; ++ case CPU_PA_RISC2_0: ++ #if defined(_SC_KERNEL_BITS) ++ switch (bits) ++ { ++ case 64: puts ("hppa2.0w"); break; ++ case 32: puts ("hppa2.0n"); break; ++ default: puts ("hppa2.0"); break; ++ } break; ++ #else /* !defined(_SC_KERNEL_BITS) */ ++ puts ("hppa2.0"); break; ++ #endif ++ default: puts ("hppa1.0"); break; ++ } ++ exit (0); ++ } ++EOF ++ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` ++ test -z "$HP_ARCH" && HP_ARCH=hppa ++ fi ;; ++ esac ++ if [ ${HP_ARCH} = "hppa2.0w" ] ++ then ++ eval $set_cc_for_build ++ ++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating ++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler ++ # generating 64-bit code. GNU and HP use different nomenclature: ++ # ++ # $ CC_FOR_BUILD=cc ./config.guess ++ # => hppa2.0w-hp-hpux11.23 ++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess ++ # => hppa64-hp-hpux11.23 ++ ++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | ++ grep __LP64__ >/dev/null ++ then ++ HP_ARCH="hppa2.0w" ++ else ++ HP_ARCH="hppa64" ++ fi ++ fi ++ echo ${HP_ARCH}-hp-hpux${HPUX_REV} ++ exit ;; ++ ia64:HP-UX:*:*) ++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` ++ echo ia64-hp-hpux${HPUX_REV} ++ exit ;; ++ 3050*:HI-UX:*:*) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #include <unistd.h> ++ int ++ main () ++ { ++ long cpu = sysconf (_SC_CPU_VERSION); ++ /* The order matters, because CPU_IS_HP_MC68K erroneously returns ++ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct ++ results, however. */ ++ if (CPU_IS_PA_RISC (cpu)) ++ { ++ switch (cpu) ++ { ++ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; ++ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; ++ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; ++ default: puts ("hppa-hitachi-hiuxwe2"); break; ++ } ++ } ++ else if (CPU_IS_HP_MC68K (cpu)) ++ puts ("m68k-hitachi-hiuxwe2"); ++ else puts ("unknown-hitachi-hiuxwe2"); ++ exit (0); ++ } ++EOF ++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } ++ echo unknown-hitachi-hiuxwe2 ++ exit ;; ++ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) ++ echo hppa1.1-hp-bsd ++ exit ;; ++ 9000/8??:4.3bsd:*:*) ++ echo hppa1.0-hp-bsd ++ exit ;; ++ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) ++ echo hppa1.0-hp-mpeix ++ exit ;; ++ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) ++ echo hppa1.1-hp-osf ++ exit ;; ++ hp8??:OSF1:*:*) ++ echo hppa1.0-hp-osf ++ exit ;; ++ i*86:OSF1:*:*) ++ if [ -x /usr/sbin/sysversion ] ; then ++ echo ${UNAME_MACHINE}-unknown-osf1mk ++ else ++ echo ${UNAME_MACHINE}-unknown-osf1 ++ fi ++ exit ;; ++ parisc*:Lites*:*:*) ++ echo hppa1.1-hp-lites ++ exit ;; ++ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) ++ echo c1-convex-bsd ++ exit ;; ++ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) ++ if getsysinfo -f scalar_acc ++ then echo c32-convex-bsd ++ else echo c2-convex-bsd ++ fi ++ exit ;; ++ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) ++ echo c34-convex-bsd ++ exit ;; ++ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) ++ echo c38-convex-bsd ++ exit ;; ++ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) ++ echo c4-convex-bsd ++ exit ;; ++ CRAY*Y-MP:*:*:*) ++ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; ++ CRAY*[A-Z]90:*:*:*) ++ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ ++ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ ++ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ ++ -e 's/\.[^.]*$/.X/' ++ exit ;; ++ CRAY*TS:*:*:*) ++ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; ++ CRAY*T3E:*:*:*) ++ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; ++ CRAY*SV1:*:*:*) ++ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; ++ *:UNICOS/mp:*:*) ++ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; ++ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) ++ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; ++ 5000:UNIX_System_V:4.*:*) ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; ++ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) ++ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} ++ exit ;; ++ sparc*:BSD/OS:*:*) ++ echo sparc-unknown-bsdi${UNAME_RELEASE} ++ exit ;; ++ *:BSD/OS:*:*) ++ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} ++ exit ;; ++ *:FreeBSD:*:*) ++ case ${UNAME_MACHINE} in ++ pc98) ++ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ amd64) ++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ *) ++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ esac ++ exit ;; ++ i*:CYGWIN*:*) ++ echo ${UNAME_MACHINE}-pc-cygwin ++ exit ;; ++ *:MINGW*:*) ++ echo ${UNAME_MACHINE}-pc-mingw32 ++ exit ;; ++ i*:windows32*:*) ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 ++ exit ;; ++ i*:PW*:*) ++ echo ${UNAME_MACHINE}-pc-pw32 ++ exit ;; ++ *:Interix*:[3456]*) ++ case ${UNAME_MACHINE} in ++ x86) ++ echo i586-pc-interix${UNAME_RELEASE} ++ exit ;; ++ EM64T | authenticamd | genuineintel) ++ echo x86_64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ IA64) ++ echo ia64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ esac ;; ++ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) ++ echo i${UNAME_MACHINE}-pc-mks ++ exit ;; ++ i*:Windows_NT*:* | Pentium*:Windows_NT*:*) ++ # How do we know it's Interix rather than the generic POSIX subsystem? ++ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we ++ # UNAME_MACHINE based on the output of uname instead of i386? ++ echo i586-pc-interix ++ exit ;; ++ i*:UWIN*:*) ++ echo ${UNAME_MACHINE}-pc-uwin ++ exit ;; ++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) ++ echo x86_64-unknown-cygwin ++ exit ;; ++ p*:CYGWIN*:*) ++ echo powerpcle-unknown-cygwin ++ exit ;; ++ prep*:SunOS:5.*:*) ++ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; ++ *:GNU:*:*) ++ # the GNU system ++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` ++ exit ;; ++ *:GNU/*:*:*) ++ # other systems with GNU libc and userland ++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu ++ exit ;; ++ i*86:Minix:*:*) ++ echo ${UNAME_MACHINE}-pc-minix ++ exit ;; ++ arm*:Linux:*:*) ++ eval $set_cc_for_build ++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_EABI__ ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ fi ++ exit ;; ++ avr32*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ cris:Linux:*:*) ++ echo cris-axis-linux-gnu ++ exit ;; ++ crisv32:Linux:*:*) ++ echo crisv32-axis-linux-gnu ++ exit ;; ++ frv:Linux:*:*) ++ echo frv-unknown-linux-gnu ++ exit ;; ++ ia64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ m32r*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ m68*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ mips:Linux:*:*) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #undef CPU ++ #undef mips ++ #undef mipsel ++ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ++ CPU=mipsel ++ #else ++ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ++ CPU=mips ++ #else ++ CPU= ++ #endif ++ #endif ++EOF ++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ++ /^CPU/{ ++ s: ::g ++ p ++ }'`" ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ++ ;; ++ mips64:Linux:*:*) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #undef CPU ++ #undef mips64 ++ #undef mips64el ++ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ++ CPU=mips64el ++ #else ++ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ++ CPU=mips64 ++ #else ++ CPU= ++ #endif ++ #endif ++EOF ++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ++ /^CPU/{ ++ s: ::g ++ p ++ }'`" ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ++ ;; ++ or32:Linux:*:*) ++ echo or32-unknown-linux-gnu ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-gnu ++ exit ;; ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-gnu ++ exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ exit ;; ++ padre:Linux:*:*) ++ echo sparc-unknown-linux-gnu ++ exit ;; ++ parisc:Linux:*:* | hppa:Linux:*:*) ++ # Look for CPU level ++ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in ++ PA7*) echo hppa1.1-unknown-linux-gnu ;; ++ PA8*) echo hppa2.0-unknown-linux-gnu ;; ++ *) echo hppa-unknown-linux-gnu ;; ++ esac ++ exit ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-gnu ++ exit ;; ++ s390:Linux:*:* | s390x:Linux:*:*) ++ echo ${UNAME_MACHINE}-ibm-linux ++ exit ;; ++ sh64*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ sh*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ sparc:Linux:*:* | sparc64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ vax:Linux:*:*) ++ echo ${UNAME_MACHINE}-dec-linux-gnu ++ exit ;; ++ x86_64:Linux:*:*) ++ echo x86_64-unknown-linux-gnu ++ exit ;; ++ xtensa*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ i*86:Linux:*:*) ++ # The BFD linker knows what the default object file format is, so ++ # first see if it will tell us. cd to the root directory to prevent ++ # problems with other programs or directories called `ld' in the path. ++ # Set LC_ALL=C to ensure ld outputs messages in English. ++ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ ++ | sed -ne '/supported targets:/!d ++ s/[ ][ ]*/ /g ++ s/.*supported targets: *// ++ s/ .*// ++ p'` ++ case "$ld_supported_targets" in ++ elf32-i386) ++ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ++ ;; ++ a.out-i386-linux) ++ echo "${UNAME_MACHINE}-pc-linux-gnuaout" ++ exit ;; ++ "") ++ # Either a pre-BFD a.out linker (linux-gnuoldld) or ++ # one that does not give us useful --help. ++ echo "${UNAME_MACHINE}-pc-linux-gnuoldld" ++ exit ;; ++ esac ++ # Determine whether the default compiler is a.out or elf ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #include <features.h> ++ #ifdef __ELF__ ++ # ifdef __GLIBC__ ++ # if __GLIBC__ >= 2 ++ LIBC=gnu ++ # else ++ LIBC=gnulibc1 ++ # endif ++ # else ++ LIBC=gnulibc1 ++ # endif ++ #else ++ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) ++ LIBC=gnu ++ #else ++ LIBC=gnuaout ++ #endif ++ #endif ++ #ifdef __dietlibc__ ++ LIBC=dietlibc ++ #endif ++EOF ++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ++ /^LIBC/{ ++ s: ::g ++ p ++ }'`" ++ test x"${LIBC}" != x && { ++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" ++ exit ++ } ++ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ++ ;; ++ i*86:DYNIX/ptx:4*:*) ++ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. ++ # earlier versions are messed up and put the nodename in both ++ # sysname and nodename. ++ echo i386-sequent-sysv4 ++ exit ;; ++ i*86:UNIX_SV:4.2MP:2.*) ++ # Unixware is an offshoot of SVR4, but it has its own version ++ # number series starting with 2... ++ # I am not positive that other SVR4 systems won't match this, ++ # I just have to hope. -- rms. ++ # Use sysv4.2uw... so that sysv4* matches it. ++ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} ++ exit ;; ++ i*86:OS/2:*:*) ++ # If we were able to find `uname', then EMX Unix compatibility ++ # is probably installed. ++ echo ${UNAME_MACHINE}-pc-os2-emx ++ exit ;; ++ i*86:XTS-300:*:STOP) ++ echo ${UNAME_MACHINE}-unknown-stop ++ exit ;; ++ i*86:atheos:*:*) ++ echo ${UNAME_MACHINE}-unknown-atheos ++ exit ;; ++ i*86:syllable:*:*) ++ echo ${UNAME_MACHINE}-pc-syllable ++ exit ;; ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ++ echo i386-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ i*86:*DOS:*:*) ++ echo ${UNAME_MACHINE}-pc-msdosdjgpp ++ exit ;; ++ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) ++ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` ++ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then ++ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} ++ else ++ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} ++ fi ++ exit ;; ++ i*86:*:5:[678]*) ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. ++ case `/bin/uname -X | grep "^Machine"` in ++ *486*) UNAME_MACHINE=i486 ;; ++ *Pentium) UNAME_MACHINE=i586 ;; ++ *Pent*|*Celeron) UNAME_MACHINE=i686 ;; ++ esac ++ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ++ exit ;; ++ i*86:*:3.2:*) ++ if test -f /usr/options/cb.name; then ++ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` ++ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL ++ elif /bin/uname -X 2>/dev/null >/dev/null ; then ++ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` ++ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 ++ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ ++ && UNAME_MACHINE=i586 ++ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ ++ && UNAME_MACHINE=i686 ++ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ ++ && UNAME_MACHINE=i686 ++ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL ++ else ++ echo ${UNAME_MACHINE}-pc-sysv32 ++ fi ++ exit ;; ++ pc:*:*:*) ++ # Left here for compatibility: ++ # uname -m prints for DJGPP always 'pc', but it prints nothing about ++ # the processor, so we play safe by assuming i586. ++ # Note: whatever this is, it MUST be the same as what config.sub ++ # prints for the "djgpp" host, or else GDB configury will decide that ++ # this is a cross-build. ++ echo i586-pc-msdosdjgpp ++ exit ;; ++ Intel:Mach:3*:*) ++ echo i386-pc-mach3 ++ exit ;; ++ paragon:*:*:*) ++ echo i860-intel-osf1 ++ exit ;; ++ i860:*:4.*:*) # i860-SVR4 ++ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then ++ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 ++ else # Add other i860-SVR4 vendors below as they are discovered. ++ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 ++ fi ++ exit ;; ++ mini*:CTIX:SYS*5:*) ++ # "miniframe" ++ echo m68010-convergent-sysv ++ exit ;; ++ mc68k:UNIX:SYSTEM5:3.51m) ++ echo m68k-convergent-sysv ++ exit ;; ++ M680?0:D-NIX:5.3:*) ++ echo m68k-diab-dnix ++ exit ;; ++ M68*:*:R3V[5678]*:*) ++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; ++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) ++ OS_REL='' ++ test -r /etc/.relid \ ++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; ++ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4; exit; } ;; ++ NCR*:*:4.2:* | MPRAS*:*:4.2:*) ++ OS_REL='.3' ++ test -r /etc/.relid \ ++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; ++ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) ++ echo m68k-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ mc68030:UNIX_System_V:4.*:*) ++ echo m68k-atari-sysv4 ++ exit ;; ++ TSUNAMI:LynxOS:2.*:*) ++ echo sparc-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ rs6000:LynxOS:2.*:*) ++ echo rs6000-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ echo powerpc-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ SM[BE]S:UNIX_SV:*:*) ++ echo mips-dde-sysv${UNAME_RELEASE} ++ exit ;; ++ RM*:ReliantUNIX-*:*:*) ++ echo mips-sni-sysv4 ++ exit ;; ++ RM*:SINIX-*:*:*) ++ echo mips-sni-sysv4 ++ exit ;; ++ *:SINIX-*:*:*) ++ if uname -p 2>/dev/null >/dev/null ; then ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ echo ${UNAME_MACHINE}-sni-sysv4 ++ else ++ echo ns32k-sni-sysv ++ fi ++ exit ;; ++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ++ # says <Richard.M.Bartel@ccMail.Census.GOV> ++ echo i586-unisys-sysv4 ++ exit ;; ++ *:UNIX_System_V:4*:FTX*) ++ # From Gerald Hewes <hewes@openmarket.com>. ++ # How about differentiating between stratus architectures? -djm ++ echo hppa1.1-stratus-sysv4 ++ exit ;; ++ *:*:*:FTX*) ++ # From seanf@swdc.stratus.com. ++ echo i860-stratus-sysv4 ++ exit ;; ++ i*86:VOS:*:*) ++ # From Paul.Green@stratus.com. ++ echo ${UNAME_MACHINE}-stratus-vos ++ exit ;; ++ *:VOS:*:*) ++ # From Paul.Green@stratus.com. ++ echo hppa1.1-stratus-vos ++ exit ;; ++ mc68*:A/UX:*:*) ++ echo m68k-apple-aux${UNAME_RELEASE} ++ exit ;; ++ news*:NEWS-OS:6*:*) ++ echo mips-sony-newsos6 ++ exit ;; ++ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) ++ if [ -d /usr/nec ]; then ++ echo mips-nec-sysv${UNAME_RELEASE} ++ else ++ echo mips-unknown-sysv${UNAME_RELEASE} ++ fi ++ exit ;; ++ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. ++ echo powerpc-be-beos ++ exit ;; ++ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. ++ echo powerpc-apple-beos ++ exit ;; ++ BePC:BeOS:*:*) # BeOS running on Intel PC compatible. ++ echo i586-pc-beos ++ exit ;; ++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. ++ echo i586-pc-haiku ++ exit ;; ++ SX-4:SUPER-UX:*:*) ++ echo sx4-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-5:SUPER-UX:*:*) ++ echo sx5-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-6:SUPER-UX:*:*) ++ echo sx6-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-7:SUPER-UX:*:*) ++ echo sx7-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8:SUPER-UX:*:*) ++ echo sx8-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8R:SUPER-UX:*:*) ++ echo sx8r-nec-superux${UNAME_RELEASE} ++ exit ;; ++ Power*:Rhapsody:*:*) ++ echo powerpc-apple-rhapsody${UNAME_RELEASE} ++ exit ;; ++ *:Rhapsody:*:*) ++ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} ++ exit ;; ++ *:Darwin:*:*) ++ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown ++ case $UNAME_PROCESSOR in ++ unknown) UNAME_PROCESSOR=powerpc ;; ++ esac ++ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} ++ exit ;; ++ *:procnto*:*:* | *:QNX:[0123456789]*:*) ++ UNAME_PROCESSOR=`uname -p` ++ if test "$UNAME_PROCESSOR" = "x86"; then ++ UNAME_PROCESSOR=i386 ++ UNAME_MACHINE=pc ++ fi ++ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} ++ exit ;; ++ *:QNX:*:4*) ++ echo i386-pc-qnx ++ exit ;; ++ NSE-?:NONSTOP_KERNEL:*:*) ++ echo nse-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSR-?:NONSTOP_KERNEL:*:*) ++ echo nsr-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ *:NonStop-UX:*:*) ++ echo mips-compaq-nonstopux ++ exit ;; ++ BS2000:POSIX*:*:*) ++ echo bs2000-siemens-sysv ++ exit ;; ++ DS/*:UNIX_System_V:*:*) ++ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} ++ exit ;; ++ *:Plan9:*:*) ++ # "uname -m" is not consistent, so use $cputype instead. 386 ++ # is converted to i386 for consistency with other x86 ++ # operating systems. ++ if test "$cputype" = "386"; then ++ UNAME_MACHINE=i386 ++ else ++ UNAME_MACHINE="$cputype" ++ fi ++ echo ${UNAME_MACHINE}-unknown-plan9 ++ exit ;; ++ *:TOPS-10:*:*) ++ echo pdp10-unknown-tops10 ++ exit ;; ++ *:TENEX:*:*) ++ echo pdp10-unknown-tenex ++ exit ;; ++ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) ++ echo pdp10-dec-tops20 ++ exit ;; ++ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) ++ echo pdp10-xkl-tops20 ++ exit ;; ++ *:TOPS-20:*:*) ++ echo pdp10-unknown-tops20 ++ exit ;; ++ *:ITS:*:*) ++ echo pdp10-unknown-its ++ exit ;; ++ SEI:*:*:SEIUX) ++ echo mips-sei-seiux${UNAME_RELEASE} ++ exit ;; ++ *:DragonFly:*:*) ++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ++ exit ;; ++ *:*VMS:*:*) ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ case "${UNAME_MACHINE}" in ++ A*) echo alpha-dec-vms ; exit ;; ++ I*) echo ia64-dec-vms ; exit ;; ++ V*) echo vax-dec-vms ; exit ;; ++ esac ;; ++ *:XENIX:*:SysV) ++ echo i386-pc-xenix ++ exit ;; ++ i*86:skyos:*:*) ++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' ++ exit ;; ++ i*86:rdos:*:*) ++ echo ${UNAME_MACHINE}-pc-rdos ++ exit ;; ++ i*86:AROS:*:*) ++ echo ${UNAME_MACHINE}-pc-aros ++ exit ;; ++esac ++ ++#echo '(No uname command or uname output not recognized.)' 1>&2 ++#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 ++ ++eval $set_cc_for_build ++cat >$dummy.c <<EOF ++#ifdef _SEQUENT_ ++# include <sys/types.h> ++# include <sys/utsname.h> ++#endif ++main () ++{ ++#if defined (sony) ++#if defined (MIPSEB) ++ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, ++ I don't know.... */ ++ printf ("mips-sony-bsd\n"); exit (0); ++#else ++#include <sys/param.h> ++ printf ("m68k-sony-newsos%s\n", ++#ifdef NEWSOS4 ++ "4" ++#else ++ "" ++#endif ++ ); exit (0); ++#endif ++#endif ++ ++#if defined (__arm) && defined (__acorn) && defined (__unix) ++ printf ("arm-acorn-riscix\n"); exit (0); ++#endif ++ ++#if defined (hp300) && !defined (hpux) ++ printf ("m68k-hp-bsd\n"); exit (0); ++#endif ++ ++#if defined (NeXT) ++#if !defined (__ARCHITECTURE__) ++#define __ARCHITECTURE__ "m68k" ++#endif ++ int version; ++ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; ++ if (version < 4) ++ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); ++ else ++ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); ++ exit (0); ++#endif ++ ++#if defined (MULTIMAX) || defined (n16) ++#if defined (UMAXV) ++ printf ("ns32k-encore-sysv\n"); exit (0); ++#else ++#if defined (CMU) ++ printf ("ns32k-encore-mach\n"); exit (0); ++#else ++ printf ("ns32k-encore-bsd\n"); exit (0); ++#endif ++#endif ++#endif ++ ++#if defined (__386BSD__) ++ printf ("i386-pc-bsd\n"); exit (0); ++#endif ++ ++#if defined (sequent) ++#if defined (i386) ++ printf ("i386-sequent-dynix\n"); exit (0); ++#endif ++#if defined (ns32000) ++ printf ("ns32k-sequent-dynix\n"); exit (0); ++#endif ++#endif ++ ++#if defined (_SEQUENT_) ++ struct utsname un; ++ ++ uname(&un); ++ ++ if (strncmp(un.version, "V2", 2) == 0) { ++ printf ("i386-sequent-ptx2\n"); exit (0); ++ } ++ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ ++ printf ("i386-sequent-ptx1\n"); exit (0); ++ } ++ printf ("i386-sequent-ptx\n"); exit (0); ++ ++#endif ++ ++#if defined (vax) ++# if !defined (ultrix) ++# include <sys/param.h> ++# if defined (BSD) ++# if BSD == 43 ++ printf ("vax-dec-bsd4.3\n"); exit (0); ++# else ++# if BSD == 199006 ++ printf ("vax-dec-bsd4.3reno\n"); exit (0); ++# else ++ printf ("vax-dec-bsd\n"); exit (0); ++# endif ++# endif ++# else ++ printf ("vax-dec-bsd\n"); exit (0); ++# endif ++# else ++ printf ("vax-dec-ultrix\n"); exit (0); ++# endif ++#endif ++ ++#if defined (alliant) && defined (i860) ++ printf ("i860-alliant-bsd\n"); exit (0); ++#endif ++ ++ exit (1); ++} ++EOF ++ ++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } ++ ++# Apollos put the system type in the environment. ++ ++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } ++ ++# Convex versions that predate uname can use getsysinfo(1) ++ ++if [ -x /usr/convex/getsysinfo ] ++then ++ case `getsysinfo -f cpu_type` in ++ c1*) ++ echo c1-convex-bsd ++ exit ;; ++ c2*) ++ if getsysinfo -f scalar_acc ++ then echo c32-convex-bsd ++ else echo c2-convex-bsd ++ fi ++ exit ;; ++ c34*) ++ echo c34-convex-bsd ++ exit ;; ++ c38*) ++ echo c38-convex-bsd ++ exit ;; ++ c4*) ++ echo c4-convex-bsd ++ exit ;; ++ esac ++fi ++ ++cat >&2 <<EOF ++$0: unable to guess system type ++ ++This script, last modified $timestamp, has failed to recognize ++the operating system you are using. It is advised that you ++download the most up to date version of the config scripts from ++ ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD ++and ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD ++ ++If the version you run ($0) is already up to date, please ++send the following data and any information you think might be ++pertinent to <config-patches@gnu.org> in order to provide the needed ++information to handle your system. ++ ++config.guess timestamp = $timestamp ++ ++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` ++/bin/uname -X = `(/bin/uname -X) 2>/dev/null` ++ ++hostinfo = `(hostinfo) 2>/dev/null` ++/bin/universe = `(/bin/universe) 2>/dev/null` ++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` ++/bin/arch = `(/bin/arch) 2>/dev/null` ++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` ++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` ++ ++UNAME_MACHINE = ${UNAME_MACHINE} ++UNAME_RELEASE = ${UNAME_RELEASE} ++UNAME_SYSTEM = ${UNAME_SYSTEM} ++UNAME_VERSION = ${UNAME_VERSION} ++EOF ++ ++exit 1 ++ ++# Local variables: ++# eval: (add-hook 'write-file-hooks 'time-stamp) ++# time-stamp-start: "timestamp='" ++# time-stamp-format: "%:y-%02m-%02d" ++# time-stamp-end: "'" ++# End: +diff --git a/source3/config.sub b/source3/config.sub +new file mode 100755 +index 0000000..a39437d +--- /dev/null ++++ b/source3/config.sub +@@ -0,0 +1,1686 @@ ++#! /bin/sh ++# Configuration validation subroutine script. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 ++# Free Software Foundation, Inc. ++ ++timestamp='2009-04-17' ++ ++# This file is (in principle) common to ALL GNU software. ++# The presence of a machine in this file suggests that SOME GNU software ++# can handle that machine. It does not imply ALL GNU software can. ++# ++# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, USA. ++# ++# As a special exception to the GNU General Public License, if you ++# distribute this file as part of a program that contains a ++# configuration script generated by Autoconf, you may include it under ++# the same distribution terms that you use for the rest of that program. ++ ++ ++# Please send patches to <config-patches@gnu.org>. Submit a context ++# diff and a properly formatted ChangeLog entry. ++# ++# Configuration subroutine to validate and canonicalize a configuration type. ++# Supply the specified configuration type as an argument. ++# If it is invalid, we print an error message on stderr and exit with code 1. ++# Otherwise, we print the canonical config type on stdout and succeed. ++ ++# This file is supposed to be the same for all GNU packages ++# and recognize all the CPU types, system types and aliases ++# that are meaningful with *any* GNU software. ++# Each package is responsible for reporting which valid configurations ++# it does not support. The user should be able to distinguish ++# a failure to support a valid configuration from a meaningless ++# configuration. ++ ++# The goal of this file is to map all the various variations of a given ++# machine specification into a single specification in the form: ++# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM ++# or in some cases, the newer four-part form: ++# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM ++# It is wrong to echo any other type of specification. ++ ++me=`echo "$0" | sed -e 's,.*/,,'` ++ ++usage="\ ++Usage: $0 [OPTION] CPU-MFR-OPSYS ++ $0 [OPTION] ALIAS ++ ++Canonicalize a configuration name. ++ ++Operation modes: ++ -h, --help print this help, then exit ++ -t, --time-stamp print date of last modification, then exit ++ -v, --version print version number, then exit ++ ++Report bugs and patches to <config-patches@gnu.org>." ++ ++version="\ ++GNU config.sub ($timestamp) ++ ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, ++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++ ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ++ ++help=" ++Try \`$me --help' for more information." ++ ++# Parse command line ++while test $# -gt 0 ; do ++ case $1 in ++ --time-stamp | --time* | -t ) ++ echo "$timestamp" ; exit ;; ++ --version | -v ) ++ echo "$version" ; exit ;; ++ --help | --h* | -h ) ++ echo "$usage"; exit ;; ++ -- ) # Stop option processing ++ shift; break ;; ++ - ) # Use stdin as input. ++ break ;; ++ -* ) ++ echo "$me: invalid option $1$help" ++ exit 1 ;; ++ ++ *local*) ++ # First pass through any local machine types. ++ echo $1 ++ exit ;; ++ ++ * ) ++ break ;; ++ esac ++done ++ ++case $# in ++ 0) echo "$me: missing argument$help" >&2 ++ exit 1;; ++ 1) ;; ++ *) echo "$me: too many arguments$help" >&2 ++ exit 1;; ++esac ++ ++# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). ++# Here we must recognize all the valid KERNEL-OS combinations. ++maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` ++case $maybe_os in ++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ ++ kopensolaris*-gnu* | \ ++ storm-chaos* | os2-emx* | rtmk-nova*) ++ os=-$maybe_os ++ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ++ ;; ++ *) ++ basic_machine=`echo $1 | sed 's/-[^-]*$//'` ++ if [ $basic_machine != $1 ] ++ then os=`echo $1 | sed 's/.*-/-/'` ++ else os=; fi ++ ;; ++esac ++ ++### Let's recognize common machines as not being operating systems so ++### that things like config.sub decstation-3100 work. We also ++### recognize some manufacturers as not being operating systems, so we ++### can provide default operating systems below. ++case $os in ++ -sun*os*) ++ # Prevent following clause from handling this invalid input. ++ ;; ++ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ ++ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ ++ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ ++ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ ++ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ ++ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ ++ -apple | -axis | -knuth | -cray) ++ os= ++ basic_machine=$1 ++ ;; ++ -sim | -cisco | -oki | -wec | -winbond) ++ os= ++ basic_machine=$1 ++ ;; ++ -scout) ++ ;; ++ -wrs) ++ os=-vxworks ++ basic_machine=$1 ++ ;; ++ -chorusos*) ++ os=-chorusos ++ basic_machine=$1 ++ ;; ++ -chorusrdb) ++ os=-chorusrdb ++ basic_machine=$1 ++ ;; ++ -hiux*) ++ os=-hiuxwe2 ++ ;; ++ -sco6) ++ os=-sco5v6 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco5) ++ os=-sco3.2v5 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco4) ++ os=-sco3.2v4 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco3.2.[4-9]*) ++ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco3.2v[4-9]*) ++ # Don't forget version if it is 3.2v4 or newer. ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco5v6*) ++ # Don't forget version if it is 3.2v4 or newer. ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco*) ++ os=-sco3.2v2 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -udk*) ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -isc) ++ os=-isc2.2 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -clix*) ++ basic_machine=clipper-intergraph ++ ;; ++ -isc*) ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -lynx*) ++ os=-lynxos ++ ;; ++ -ptx*) ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ++ ;; ++ -windowsnt*) ++ os=`echo $os | sed -e 's/windowsnt/winnt/'` ++ ;; ++ -psos*) ++ os=-psos ++ ;; ++ -mint | -mint[0-9]*) ++ basic_machine=m68k-atari ++ os=-mint ++ ;; ++esac ++ ++# Decode aliases for certain CPU-COMPANY combinations. ++case $basic_machine in ++ # Recognize the basic CPU types without company name. ++ # Some are omitted here because they have special meanings below. ++ 1750a | 580 \ ++ | a29k \ ++ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ ++ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ ++ | am33_2.0 \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ ++ | bfin \ ++ | c4x | clipper \ ++ | d10v | d30v | dlx | dsp16xx \ ++ | fido | fr30 | frv \ ++ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ ++ | i370 | i860 | i960 | ia64 \ ++ | ip2k | iq2000 \ ++ | lm32 \ ++ | m32c | m32r | m32rle | m68000 | m68k | m88k \ ++ | maxq | mb | microblaze | mcore | mep | metag \ ++ | mips | mipsbe | mipseb | mipsel | mipsle \ ++ | mips16 \ ++ | mips64 | mips64el \ ++ | mips64octeon | mips64octeonel \ ++ | mips64orion | mips64orionel \ ++ | mips64r5900 | mips64r5900el \ ++ | mips64vr | mips64vrel \ ++ | mips64vr4100 | mips64vr4100el \ ++ | mips64vr4300 | mips64vr4300el \ ++ | mips64vr5000 | mips64vr5000el \ ++ | mips64vr5900 | mips64vr5900el \ ++ | mipsisa32 | mipsisa32el \ ++ | mipsisa32r2 | mipsisa32r2el \ ++ | mipsisa64 | mipsisa64el \ ++ | mipsisa64r2 | mipsisa64r2el \ ++ | mipsisa64sb1 | mipsisa64sb1el \ ++ | mipsisa64sr71k | mipsisa64sr71kel \ ++ | mipstx39 | mipstx39el \ ++ | mn10200 | mn10300 \ ++ | moxie \ ++ | mt \ ++ | msp430 \ ++ | nios | nios2 \ ++ | ns16k | ns32k \ ++ | or32 \ ++ | pdp10 | pdp11 | pj | pjl \ ++ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ ++ | pyramid \ ++ | score \ ++ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ ++ | sh64 | sh64le \ ++ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ ++ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ ++ | spu | strongarm \ ++ | tahoe | thumb | tic4x | tic80 | tron \ ++ | v850 | v850e \ ++ | we32k \ ++ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ ++ | z8k | z80) ++ basic_machine=$basic_machine-unknown ++ ;; ++ m6811 | m68hc11 | m6812 | m68hc12) ++ # Motorola 68HC11/12. ++ basic_machine=$basic_machine-unknown ++ os=-none ++ ;; ++ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ++ ;; ++ ms1) ++ basic_machine=mt-unknown ++ ;; ++ ++ # We use `pc' rather than `unknown' ++ # because (1) that's what they normally are, and ++ # (2) the word "unknown" tends to confuse beginning users. ++ i*86 | x86_64) ++ basic_machine=$basic_machine-pc ++ ;; ++ # Object if more than one company name word. ++ *-*-*) ++ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 ++ exit 1 ++ ;; ++ # Recognize the basic CPU types with company name. ++ 580-* \ ++ | a29k-* \ ++ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ ++ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ ++ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ ++ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ ++ | avr-* | avr32-* \ ++ | bfin-* | bs2000-* \ ++ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ ++ | clipper-* | craynv-* | cydra-* \ ++ | d10v-* | d30v-* | dlx-* \ ++ | elxsi-* \ ++ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ ++ | h8300-* | h8500-* \ ++ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ ++ | i*86-* | i860-* | i960-* | ia64-* \ ++ | ip2k-* | iq2000-* \ ++ | lm32-* \ ++ | m32c-* | m32r-* | m32rle-* \ ++ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ ++ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ ++ | mips16-* \ ++ | mips64-* | mips64el-* \ ++ | mips64octeon-* | mips64octeonel-* \ ++ | mips64orion-* | mips64orionel-* \ ++ | mips64r5900-* | mips64r5900el-* \ ++ | mips64vr-* | mips64vrel-* \ ++ | mips64vr4100-* | mips64vr4100el-* \ ++ | mips64vr4300-* | mips64vr4300el-* \ ++ | mips64vr5000-* | mips64vr5000el-* \ ++ | mips64vr5900-* | mips64vr5900el-* \ ++ | mipsisa32-* | mipsisa32el-* \ ++ | mipsisa32r2-* | mipsisa32r2el-* \ ++ | mipsisa64-* | mipsisa64el-* \ ++ | mipsisa64r2-* | mipsisa64r2el-* \ ++ | mipsisa64sb1-* | mipsisa64sb1el-* \ ++ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ ++ | mipstx39-* | mipstx39el-* \ ++ | mmix-* \ ++ | mt-* \ ++ | msp430-* \ ++ | nios-* | nios2-* \ ++ | none-* | np1-* | ns16k-* | ns32k-* \ ++ | orion-* \ ++ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ ++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ ++ | pyramid-* \ ++ | romp-* | rs6000-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ ++ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ ++ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ ++ | sparclite-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ ++ | tahoe-* | thumb-* \ ++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ ++ | tron-* \ ++ | v850-* | v850e-* | vax-* \ ++ | we32k-* \ ++ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ ++ | xstormy16-* | xtensa*-* \ ++ | ymp-* \ ++ | z8k-* | z80-*) ++ ;; ++ # Recognize the basic CPU types without company name, with glob match. ++ xtensa*) ++ basic_machine=$basic_machine-unknown ++ ;; ++ # Recognize the various machine names and aliases which stand ++ # for a CPU type and a company and sometimes even an OS. ++ 386bsd) ++ basic_machine=i386-unknown ++ os=-bsd ++ ;; ++ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) ++ basic_machine=m68000-att ++ ;; ++ 3b*) ++ basic_machine=we32k-att ++ ;; ++ a29khif) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ abacus) ++ basic_machine=abacus-unknown ++ ;; ++ adobe68k) ++ basic_machine=m68010-adobe ++ os=-scout ++ ;; ++ alliant | fx80) ++ basic_machine=fx80-alliant ++ ;; ++ altos | altos3068) ++ basic_machine=m68k-altos ++ ;; ++ am29k) ++ basic_machine=a29k-none ++ os=-bsd ++ ;; ++ amd64) ++ basic_machine=x86_64-pc ++ ;; ++ amd64-*) ++ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ amdahl) ++ basic_machine=580-amdahl ++ os=-sysv ++ ;; ++ amiga | amiga-*) ++ basic_machine=m68k-unknown ++ ;; ++ amigaos | amigados) ++ basic_machine=m68k-unknown ++ os=-amigaos ++ ;; ++ amigaunix | amix) ++ basic_machine=m68k-unknown ++ os=-sysv4 ++ ;; ++ apollo68) ++ basic_machine=m68k-apollo ++ os=-sysv ++ ;; ++ apollo68bsd) ++ basic_machine=m68k-apollo ++ os=-bsd ++ ;; ++ aros) ++ basic_machine=i386-pc ++ os=-aros ++ ;; ++ aux) ++ basic_machine=m68k-apple ++ os=-aux ++ ;; ++ balance) ++ basic_machine=ns32k-sequent ++ os=-dynix ++ ;; ++ blackfin) ++ basic_machine=bfin-unknown ++ os=-linux ++ ;; ++ blackfin-*) ++ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ c90) ++ basic_machine=c90-cray ++ os=-unicos ++ ;; ++ cegcc) ++ basic_machine=arm-unknown ++ os=-cegcc ++ ;; ++ convex-c1) ++ basic_machine=c1-convex ++ os=-bsd ++ ;; ++ convex-c2) ++ basic_machine=c2-convex ++ os=-bsd ++ ;; ++ convex-c32) ++ basic_machine=c32-convex ++ os=-bsd ++ ;; ++ convex-c34) ++ basic_machine=c34-convex ++ os=-bsd ++ ;; ++ convex-c38) ++ basic_machine=c38-convex ++ os=-bsd ++ ;; ++ cray | j90) ++ basic_machine=j90-cray ++ os=-unicos ++ ;; ++ craynv) ++ basic_machine=craynv-cray ++ os=-unicosmp ++ ;; ++ cr16) ++ basic_machine=cr16-unknown ++ os=-elf ++ ;; ++ crds | unos) ++ basic_machine=m68k-crds ++ ;; ++ crisv32 | crisv32-* | etraxfs*) ++ basic_machine=crisv32-axis ++ ;; ++ cris | cris-* | etrax*) ++ basic_machine=cris-axis ++ ;; ++ crx) ++ basic_machine=crx-unknown ++ os=-elf ++ ;; ++ da30 | da30-*) ++ basic_machine=m68k-da30 ++ ;; ++ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) ++ basic_machine=mips-dec ++ ;; ++ decsystem10* | dec10*) ++ basic_machine=pdp10-dec ++ os=-tops10 ++ ;; ++ decsystem20* | dec20*) ++ basic_machine=pdp10-dec ++ os=-tops20 ++ ;; ++ delta | 3300 | motorola-3300 | motorola-delta \ ++ | 3300-motorola | delta-motorola) ++ basic_machine=m68k-motorola ++ ;; ++ delta88) ++ basic_machine=m88k-motorola ++ os=-sysv3 ++ ;; ++ dicos) ++ basic_machine=i686-pc ++ os=-dicos ++ ;; ++ djgpp) ++ basic_machine=i586-pc ++ os=-msdosdjgpp ++ ;; ++ dpx20 | dpx20-*) ++ basic_machine=rs6000-bull ++ os=-bosx ++ ;; ++ dpx2* | dpx2*-bull) ++ basic_machine=m68k-bull ++ os=-sysv3 ++ ;; ++ ebmon29k) ++ basic_machine=a29k-amd ++ os=-ebmon ++ ;; ++ elxsi) ++ basic_machine=elxsi-elxsi ++ os=-bsd ++ ;; ++ encore | umax | mmax) ++ basic_machine=ns32k-encore ++ ;; ++ es1800 | OSE68k | ose68k | ose | OSE) ++ basic_machine=m68k-ericsson ++ os=-ose ++ ;; ++ fx2800) ++ basic_machine=i860-alliant ++ ;; ++ genix) ++ basic_machine=ns32k-ns ++ ;; ++ gmicro) ++ basic_machine=tron-gmicro ++ os=-sysv ++ ;; ++ go32) ++ basic_machine=i386-pc ++ os=-go32 ++ ;; ++ h3050r* | hiux*) ++ basic_machine=hppa1.1-hitachi ++ os=-hiuxwe2 ++ ;; ++ h8300hms) ++ basic_machine=h8300-hitachi ++ os=-hms ++ ;; ++ h8300xray) ++ basic_machine=h8300-hitachi ++ os=-xray ++ ;; ++ h8500hms) ++ basic_machine=h8500-hitachi ++ os=-hms ++ ;; ++ harris) ++ basic_machine=m88k-harris ++ os=-sysv3 ++ ;; ++ hp300-*) ++ basic_machine=m68k-hp ++ ;; ++ hp300bsd) ++ basic_machine=m68k-hp ++ os=-bsd ++ ;; ++ hp300hpux) ++ basic_machine=m68k-hp ++ os=-hpux ++ ;; ++ hp3k9[0-9][0-9] | hp9[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; ++ hp9k2[0-9][0-9] | hp9k31[0-9]) ++ basic_machine=m68000-hp ++ ;; ++ hp9k3[2-9][0-9]) ++ basic_machine=m68k-hp ++ ;; ++ hp9k6[0-9][0-9] | hp6[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; ++ hp9k7[0-79][0-9] | hp7[0-79][0-9]) ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k78[0-9] | hp78[0-9]) ++ # FIXME: really hppa2.0-hp ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) ++ # FIXME: really hppa2.0-hp ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[0-9][13679] | hp8[0-9][13679]) ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[0-9][0-9] | hp8[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; ++ hppa-next) ++ os=-nextstep3 ++ ;; ++ hppaosf) ++ basic_machine=hppa1.1-hp ++ os=-osf ++ ;; ++ hppro) ++ basic_machine=hppa1.1-hp ++ os=-proelf ++ ;; ++ i370-ibm* | ibm*) ++ basic_machine=i370-ibm ++ ;; ++# I'm not sure what "Sysv32" means. Should this be sysv3.2? ++ i*86v32) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-sysv32 ++ ;; ++ i*86v4*) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-sysv4 ++ ;; ++ i*86v) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-sysv ++ ;; ++ i*86sol2) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-solaris2 ++ ;; ++ i386mach) ++ basic_machine=i386-mach ++ os=-mach ++ ;; ++ i386-vsta | vsta) ++ basic_machine=i386-unknown ++ os=-vsta ++ ;; ++ iris | iris4d) ++ basic_machine=mips-sgi ++ case $os in ++ -irix*) ++ ;; ++ *) ++ os=-irix4 ++ ;; ++ esac ++ ;; ++ isi68 | isi) ++ basic_machine=m68k-isi ++ os=-sysv ++ ;; ++ m68knommu) ++ basic_machine=m68k-unknown ++ os=-linux ++ ;; ++ m68knommu-*) ++ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ m88k-omron*) ++ basic_machine=m88k-omron ++ ;; ++ magnum | m3230) ++ basic_machine=mips-mips ++ os=-sysv ++ ;; ++ merlin) ++ basic_machine=ns32k-utek ++ os=-sysv ++ ;; ++ mingw32) ++ basic_machine=i386-pc ++ os=-mingw32 ++ ;; ++ mingw32ce) ++ basic_machine=arm-unknown ++ os=-mingw32ce ++ ;; ++ miniframe) ++ basic_machine=m68000-convergent ++ ;; ++ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) ++ basic_machine=m68k-atari ++ os=-mint ++ ;; ++ mips3*-*) ++ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ++ ;; ++ mips3*) ++ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ++ ;; ++ monitor) ++ basic_machine=m68k-rom68k ++ os=-coff ++ ;; ++ morphos) ++ basic_machine=powerpc-unknown ++ os=-morphos ++ ;; ++ msdos) ++ basic_machine=i386-pc ++ os=-msdos ++ ;; ++ ms1-*) ++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ++ ;; ++ mvs) ++ basic_machine=i370-ibm ++ os=-mvs ++ ;; ++ ncr3000) ++ basic_machine=i486-ncr ++ os=-sysv4 ++ ;; ++ netbsd386) ++ basic_machine=i386-unknown ++ os=-netbsd ++ ;; ++ netwinder) ++ basic_machine=armv4l-rebel ++ os=-linux ++ ;; ++ news | news700 | news800 | news900) ++ basic_machine=m68k-sony ++ os=-newsos ++ ;; ++ news1000) ++ basic_machine=m68030-sony ++ os=-newsos ++ ;; ++ news-3600 | risc-news) ++ basic_machine=mips-sony ++ os=-newsos ++ ;; ++ necv70) ++ basic_machine=v70-nec ++ os=-sysv ++ ;; ++ next | m*-next ) ++ basic_machine=m68k-next ++ case $os in ++ -nextstep* ) ++ ;; ++ -ns2*) ++ os=-nextstep2 ++ ;; ++ *) ++ os=-nextstep3 ++ ;; ++ esac ++ ;; ++ nh3000) ++ basic_machine=m68k-harris ++ os=-cxux ++ ;; ++ nh[45]000) ++ basic_machine=m88k-harris ++ os=-cxux ++ ;; ++ nindy960) ++ basic_machine=i960-intel ++ os=-nindy ++ ;; ++ mon960) ++ basic_machine=i960-intel ++ os=-mon960 ++ ;; ++ nonstopux) ++ basic_machine=mips-compaq ++ os=-nonstopux ++ ;; ++ np1) ++ basic_machine=np1-gould ++ ;; ++ nsr-tandem) ++ basic_machine=nsr-tandem ++ ;; ++ op50n-* | op60c-*) ++ basic_machine=hppa1.1-oki ++ os=-proelf ++ ;; ++ openrisc | openrisc-*) ++ basic_machine=or32-unknown ++ ;; ++ os400) ++ basic_machine=powerpc-ibm ++ os=-os400 ++ ;; ++ OSE68000 | ose68000) ++ basic_machine=m68000-ericsson ++ os=-ose ++ ;; ++ os68k) ++ basic_machine=m68k-none ++ os=-os68k ++ ;; ++ pa-hitachi) ++ basic_machine=hppa1.1-hitachi ++ os=-hiuxwe2 ++ ;; ++ paragon) ++ basic_machine=i860-intel ++ os=-osf ++ ;; ++ parisc) ++ basic_machine=hppa-unknown ++ os=-linux ++ ;; ++ parisc-*) ++ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ pbd) ++ basic_machine=sparc-tti ++ ;; ++ pbb) ++ basic_machine=m68k-tti ++ ;; ++ pc532 | pc532-*) ++ basic_machine=ns32k-pc532 ++ ;; ++ pc98) ++ basic_machine=i386-pc ++ ;; ++ pc98-*) ++ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentium | p5 | k5 | k6 | nexgen | viac3) ++ basic_machine=i586-pc ++ ;; ++ pentiumpro | p6 | 6x86 | athlon | athlon_*) ++ basic_machine=i686-pc ++ ;; ++ pentiumii | pentium2 | pentiumiii | pentium3) ++ basic_machine=i686-pc ++ ;; ++ pentium4) ++ basic_machine=i786-pc ++ ;; ++ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) ++ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentiumpro-* | p6-* | 6x86-* | athlon-*) ++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) ++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentium4-*) ++ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pn) ++ basic_machine=pn-gould ++ ;; ++ power) basic_machine=power-ibm ++ ;; ++ ppc) basic_machine=powerpc-unknown ++ ;; ++ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ppcle | powerpclittle | ppc-le | powerpc-little) ++ basic_machine=powerpcle-unknown ++ ;; ++ ppcle-* | powerpclittle-*) ++ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ppc64) basic_machine=powerpc64-unknown ++ ;; ++ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ppc64le | powerpc64little | ppc64-le | powerpc64-little) ++ basic_machine=powerpc64le-unknown ++ ;; ++ ppc64le-* | powerpc64little-*) ++ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ps2) ++ basic_machine=i386-ibm ++ ;; ++ pw32) ++ basic_machine=i586-unknown ++ os=-pw32 ++ ;; ++ rdos) ++ basic_machine=i386-pc ++ os=-rdos ++ ;; ++ rom68k) ++ basic_machine=m68k-rom68k ++ os=-coff ++ ;; ++ rm[46]00) ++ basic_machine=mips-siemens ++ ;; ++ rtpc | rtpc-*) ++ basic_machine=romp-ibm ++ ;; ++ s390 | s390-*) ++ basic_machine=s390-ibm ++ ;; ++ s390x | s390x-*) ++ basic_machine=s390x-ibm ++ ;; ++ sa29200) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ sb1) ++ basic_machine=mipsisa64sb1-unknown ++ ;; ++ sb1el) ++ basic_machine=mipsisa64sb1el-unknown ++ ;; ++ sde) ++ basic_machine=mipsisa32-sde ++ os=-elf ++ ;; ++ sei) ++ basic_machine=mips-sei ++ os=-seiux ++ ;; ++ sequent) ++ basic_machine=i386-sequent ++ ;; ++ sh) ++ basic_machine=sh-hitachi ++ os=-hms ++ ;; ++ sh5el) ++ basic_machine=sh5le-unknown ++ ;; ++ sh64) ++ basic_machine=sh64-unknown ++ ;; ++ sparclite-wrs | simso-wrs) ++ basic_machine=sparclite-wrs ++ os=-vxworks ++ ;; ++ sps7) ++ basic_machine=m68k-bull ++ os=-sysv2 ++ ;; ++ spur) ++ basic_machine=spur-unknown ++ ;; ++ st2000) ++ basic_machine=m68k-tandem ++ ;; ++ stratus) ++ basic_machine=i860-stratus ++ os=-sysv4 ++ ;; ++ sun2) ++ basic_machine=m68000-sun ++ ;; ++ sun2os3) ++ basic_machine=m68000-sun ++ os=-sunos3 ++ ;; ++ sun2os4) ++ basic_machine=m68000-sun ++ os=-sunos4 ++ ;; ++ sun3os3) ++ basic_machine=m68k-sun ++ os=-sunos3 ++ ;; ++ sun3os4) ++ basic_machine=m68k-sun ++ os=-sunos4 ++ ;; ++ sun4os3) ++ basic_machine=sparc-sun ++ os=-sunos3 ++ ;; ++ sun4os4) ++ basic_machine=sparc-sun ++ os=-sunos4 ++ ;; ++ sun4sol2) ++ basic_machine=sparc-sun ++ os=-solaris2 ++ ;; ++ sun3 | sun3-*) ++ basic_machine=m68k-sun ++ ;; ++ sun4) ++ basic_machine=sparc-sun ++ ;; ++ sun386 | sun386i | roadrunner) ++ basic_machine=i386-sun ++ ;; ++ sv1) ++ basic_machine=sv1-cray ++ os=-unicos ++ ;; ++ symmetry) ++ basic_machine=i386-sequent ++ os=-dynix ++ ;; ++ t3e) ++ basic_machine=alphaev5-cray ++ os=-unicos ++ ;; ++ t90) ++ basic_machine=t90-cray ++ os=-unicos ++ ;; ++ tic54x | c54x*) ++ basic_machine=tic54x-unknown ++ os=-coff ++ ;; ++ tic55x | c55x*) ++ basic_machine=tic55x-unknown ++ os=-coff ++ ;; ++ tic6x | c6x*) ++ basic_machine=tic6x-unknown ++ os=-coff ++ ;; ++ tile*) ++ basic_machine=tile-unknown ++ os=-linux-gnu ++ ;; ++ tx39) ++ basic_machine=mipstx39-unknown ++ ;; ++ tx39el) ++ basic_machine=mipstx39el-unknown ++ ;; ++ toad1) ++ basic_machine=pdp10-xkl ++ os=-tops20 ++ ;; ++ tower | tower-32) ++ basic_machine=m68k-ncr ++ ;; ++ tpf) ++ basic_machine=s390x-ibm ++ os=-tpf ++ ;; ++ udi29k) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ ultra3) ++ basic_machine=a29k-nyu ++ os=-sym1 ++ ;; ++ v810 | necv810) ++ basic_machine=v810-nec ++ os=-none ++ ;; ++ vaxv) ++ basic_machine=vax-dec ++ os=-sysv ++ ;; ++ vms) ++ basic_machine=vax-dec ++ os=-vms ++ ;; ++ vpp*|vx|vx-*) ++ basic_machine=f301-fujitsu ++ ;; ++ vxworks960) ++ basic_machine=i960-wrs ++ os=-vxworks ++ ;; ++ vxworks68) ++ basic_machine=m68k-wrs ++ os=-vxworks ++ ;; ++ vxworks29k) ++ basic_machine=a29k-wrs ++ os=-vxworks ++ ;; ++ w65*) ++ basic_machine=w65-wdc ++ os=-none ++ ;; ++ w89k-*) ++ basic_machine=hppa1.1-winbond ++ os=-proelf ++ ;; ++ xbox) ++ basic_machine=i686-pc ++ os=-mingw32 ++ ;; ++ xps | xps100) ++ basic_machine=xps100-honeywell ++ ;; ++ ymp) ++ basic_machine=ymp-cray ++ os=-unicos ++ ;; ++ z8k-*-coff) ++ basic_machine=z8k-unknown ++ os=-sim ++ ;; ++ z80-*-coff) ++ basic_machine=z80-unknown ++ os=-sim ++ ;; ++ none) ++ basic_machine=none-none ++ os=-none ++ ;; ++ ++# Here we handle the default manufacturer of certain CPU types. It is in ++# some cases the only manufacturer, in others, it is the most popular. ++ w89k) ++ basic_machine=hppa1.1-winbond ++ ;; ++ op50n) ++ basic_machine=hppa1.1-oki ++ ;; ++ op60c) ++ basic_machine=hppa1.1-oki ++ ;; ++ romp) ++ basic_machine=romp-ibm ++ ;; ++ mmix) ++ basic_machine=mmix-knuth ++ ;; ++ rs6000) ++ basic_machine=rs6000-ibm ++ ;; ++ vax) ++ basic_machine=vax-dec ++ ;; ++ pdp10) ++ # there are many clones, so DEC is not a safe bet ++ basic_machine=pdp10-unknown ++ ;; ++ pdp11) ++ basic_machine=pdp11-dec ++ ;; ++ we32k) ++ basic_machine=we32k-att ++ ;; ++ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) ++ basic_machine=sh-unknown ++ ;; ++ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) ++ basic_machine=sparc-sun ++ ;; ++ cydra) ++ basic_machine=cydra-cydrome ++ ;; ++ orion) ++ basic_machine=orion-highlevel ++ ;; ++ orion105) ++ basic_machine=clipper-highlevel ++ ;; ++ mac | mpw | mac-mpw) ++ basic_machine=m68k-apple ++ ;; ++ pmac | pmac-mpw) ++ basic_machine=powerpc-apple ++ ;; ++ *-unknown) ++ # Make sure to match an already-canonicalized machine name. ++ ;; ++ *) ++ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 ++ exit 1 ++ ;; ++esac ++ ++# Here we canonicalize certain aliases for manufacturers. ++case $basic_machine in ++ *-digital*) ++ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ++ ;; ++ *-commodore*) ++ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ++ ;; ++ *) ++ ;; ++esac ++ ++# Decode manufacturer-specific aliases for certain operating systems. ++ ++if [ x"$os" != x"" ] ++then ++case $os in ++ # First match some system type aliases ++ # that might get confused with valid system types. ++ # -solaris* is a basic system type, with this one exception. ++ -solaris1 | -solaris1.*) ++ os=`echo $os | sed -e 's|solaris1|sunos4|'` ++ ;; ++ -solaris) ++ os=-solaris2 ++ ;; ++ -svr4*) ++ os=-sysv4 ++ ;; ++ -unixware*) ++ os=-sysv4.2uw ++ ;; ++ -gnu/linux*) ++ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ++ ;; ++ # First accept the basic system types. ++ # The portable systems comes first. ++ # Each alternative MUST END IN A *, to match a version number. ++ # -sysv* is not here because it comes later, after sysvr4. ++ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ ++ | -kopensolaris* \ ++ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ ++ | -aos* | -aros* \ ++ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ ++ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ ++ | -openbsd* | -solidbsd* \ ++ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ ++ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ ++ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ ++ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ ++ | -chorusos* | -chorusrdb* | -cegcc* \ ++ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ ++ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ ++ | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ ++ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ ++ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ++ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ ++ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ ++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) ++ # Remember, each alternative MUST END IN *, to match a version number. ++ ;; ++ -qnx*) ++ case $basic_machine in ++ x86-* | i*86-*) ++ ;; ++ *) ++ os=-nto$os ++ ;; ++ esac ++ ;; ++ -nto-qnx*) ++ ;; ++ -nto*) ++ os=`echo $os | sed -e 's|nto|nto-qnx|'` ++ ;; ++ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ ++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ ++ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ++ ;; ++ -mac*) ++ os=`echo $os | sed -e 's|mac|macos|'` ++ ;; ++ -linux-dietlibc) ++ os=-linux-dietlibc ++ ;; ++ -linux*) ++ os=`echo $os | sed -e 's|linux|linux-gnu|'` ++ ;; ++ -sunos5*) ++ os=`echo $os | sed -e 's|sunos5|solaris2|'` ++ ;; ++ -sunos6*) ++ os=`echo $os | sed -e 's|sunos6|solaris3|'` ++ ;; ++ -opened*) ++ os=-openedition ++ ;; ++ -os400*) ++ os=-os400 ++ ;; ++ -wince*) ++ os=-wince ++ ;; ++ -osfrose*) ++ os=-osfrose ++ ;; ++ -osf*) ++ os=-osf ++ ;; ++ -utek*) ++ os=-bsd ++ ;; ++ -dynix*) ++ os=-bsd ++ ;; ++ -acis*) ++ os=-aos ++ ;; ++ -atheos*) ++ os=-atheos ++ ;; ++ -syllable*) ++ os=-syllable ++ ;; ++ -386bsd) ++ os=-bsd ++ ;; ++ -ctix* | -uts*) ++ os=-sysv ++ ;; ++ -nova*) ++ os=-rtmk-nova ++ ;; ++ -ns2 ) ++ os=-nextstep2 ++ ;; ++ -nsk*) ++ os=-nsk ++ ;; ++ # Preserve the version number of sinix5. ++ -sinix5.*) ++ os=`echo $os | sed -e 's|sinix|sysv|'` ++ ;; ++ -sinix*) ++ os=-sysv4 ++ ;; ++ -tpf*) ++ os=-tpf ++ ;; ++ -triton*) ++ os=-sysv3 ++ ;; ++ -oss*) ++ os=-sysv3 ++ ;; ++ -svr4) ++ os=-sysv4 ++ ;; ++ -svr3) ++ os=-sysv3 ++ ;; ++ -sysvr4) ++ os=-sysv4 ++ ;; ++ # This must come after -sysvr4. ++ -sysv*) ++ ;; ++ -ose*) ++ os=-ose ++ ;; ++ -es1800*) ++ os=-ose ++ ;; ++ -xenix) ++ os=-xenix ++ ;; ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ++ os=-mint ++ ;; ++ -aros*) ++ os=-aros ++ ;; ++ -kaos*) ++ os=-kaos ++ ;; ++ -zvmoe) ++ os=-zvmoe ++ ;; ++ -dicos*) ++ os=-dicos ++ ;; ++ -none) ++ ;; ++ *) ++ # Get rid of the `-' at the beginning of $os. ++ os=`echo $os | sed 's/[^-]*-//'` ++ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 ++ exit 1 ++ ;; ++esac ++else ++ ++# Here we handle the default operating systems that come with various machines. ++# The value should be what the vendor currently ships out the door with their ++# machine or put another way, the most popular os provided with the machine. ++ ++# Note that if you're going to try to match "-MANUFACTURER" here (say, ++# "-sun"), then you have to tell the case statement up towards the top ++# that MANUFACTURER isn't an operating system. Otherwise, code above ++# will signal an error saying that MANUFACTURER isn't an operating ++# system, and we'll never get to this point. ++ ++case $basic_machine in ++ score-*) ++ os=-elf ++ ;; ++ spu-*) ++ os=-elf ++ ;; ++ *-acorn) ++ os=-riscix1.2 ++ ;; ++ arm*-rebel) ++ os=-linux ++ ;; ++ arm*-semi) ++ os=-aout ++ ;; ++ c4x-* | tic4x-*) ++ os=-coff ++ ;; ++ # This must come before the *-dec entry. ++ pdp10-*) ++ os=-tops20 ++ ;; ++ pdp11-*) ++ os=-none ++ ;; ++ *-dec | vax-*) ++ os=-ultrix4.2 ++ ;; ++ m68*-apollo) ++ os=-domain ++ ;; ++ i386-sun) ++ os=-sunos4.0.2 ++ ;; ++ m68000-sun) ++ os=-sunos3 ++ # This also exists in the configure program, but was not the ++ # default. ++ # os=-sunos4 ++ ;; ++ m68*-cisco) ++ os=-aout ++ ;; ++ mep-*) ++ os=-elf ++ ;; ++ mips*-cisco) ++ os=-elf ++ ;; ++ mips*-*) ++ os=-elf ++ ;; ++ or32-*) ++ os=-coff ++ ;; ++ *-tti) # must be before sparc entry or we get the wrong os. ++ os=-sysv3 ++ ;; ++ sparc-* | *-sun) ++ os=-sunos4.1.1 ++ ;; ++ *-be) ++ os=-beos ++ ;; ++ *-haiku) ++ os=-haiku ++ ;; ++ *-ibm) ++ os=-aix ++ ;; ++ *-knuth) ++ os=-mmixware ++ ;; ++ *-wec) ++ os=-proelf ++ ;; ++ *-winbond) ++ os=-proelf ++ ;; ++ *-oki) ++ os=-proelf ++ ;; ++ *-hp) ++ os=-hpux ++ ;; ++ *-hitachi) ++ os=-hiux ++ ;; ++ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) ++ os=-sysv ++ ;; ++ *-cbm) ++ os=-amigaos ++ ;; ++ *-dg) ++ os=-dgux ++ ;; ++ *-dolphin) ++ os=-sysv3 ++ ;; ++ m68k-ccur) ++ os=-rtu ++ ;; ++ m88k-omron*) ++ os=-luna ++ ;; ++ *-next ) ++ os=-nextstep ++ ;; ++ *-sequent) ++ os=-ptx ++ ;; ++ *-crds) ++ os=-unos ++ ;; ++ *-ns) ++ os=-genix ++ ;; ++ i370-*) ++ os=-mvs ++ ;; ++ *-next) ++ os=-nextstep3 ++ ;; ++ *-gould) ++ os=-sysv ++ ;; ++ *-highlevel) ++ os=-bsd ++ ;; ++ *-encore) ++ os=-bsd ++ ;; ++ *-sgi) ++ os=-irix ++ ;; ++ *-siemens) ++ os=-sysv4 ++ ;; ++ *-masscomp) ++ os=-rtu ++ ;; ++ f30[01]-fujitsu | f700-fujitsu) ++ os=-uxpv ++ ;; ++ *-rom68k) ++ os=-coff ++ ;; ++ *-*bug) ++ os=-coff ++ ;; ++ *-apple) ++ os=-macos ++ ;; ++ *-atari*) ++ os=-mint ++ ;; ++ *) ++ os=-none ++ ;; ++esac ++fi ++ ++# Here we handle the case where we know the os, and the CPU type, but not the ++# manufacturer. We pick the logical manufacturer. ++vendor=unknown ++case $basic_machine in ++ *-unknown) ++ case $os in ++ -riscix*) ++ vendor=acorn ++ ;; ++ -sunos*) ++ vendor=sun ++ ;; ++ -aix*) ++ vendor=ibm ++ ;; ++ -beos*) ++ vendor=be ++ ;; ++ -hpux*) ++ vendor=hp ++ ;; ++ -mpeix*) ++ vendor=hp ++ ;; ++ -hiux*) ++ vendor=hitachi ++ ;; ++ -unos*) ++ vendor=crds ++ ;; ++ -dgux*) ++ vendor=dg ++ ;; ++ -luna*) ++ vendor=omron ++ ;; ++ -genix*) ++ vendor=ns ++ ;; ++ -mvs* | -opened*) ++ vendor=ibm ++ ;; ++ -os400*) ++ vendor=ibm ++ ;; ++ -ptx*) ++ vendor=sequent ++ ;; ++ -tpf*) ++ vendor=ibm ++ ;; ++ -vxsim* | -vxworks* | -windiss*) ++ vendor=wrs ++ ;; ++ -aux*) ++ vendor=apple ++ ;; ++ -hms*) ++ vendor=hitachi ++ ;; ++ -mpw* | -macos*) ++ vendor=apple ++ ;; ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ++ vendor=atari ++ ;; ++ -vos*) ++ vendor=stratus ++ ;; ++ esac ++ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ++ ;; ++esac ++ ++echo $basic_machine$os ++exit ++ ++# Local variables: ++# eval: (add-hook 'write-file-hooks 'time-stamp) ++# time-stamp-start: "timestamp='" ++# time-stamp-format: "%:y-%02m-%02d" ++# time-stamp-end: "'" ++# End: +diff --git a/source3/configure.developer b/source3/configure.developer +new file mode 100755 +index 0000000..ee8fa89 +--- /dev/null ++++ b/source3/configure.developer +@@ -0,0 +1,7 @@ ++#!/bin/sh ++`dirname $0`/configure -C \ ++ --enable-developer \ ++ --enable-socket-wrapper \ ++ --enable-nss-wrapper \ ++ --enable-uid-wrapper \ ++ "$@" +diff --git a/source3/configure.in b/source3/configure.in +new file mode 100644 +index 0000000..0e2f126 +--- /dev/null ++++ b/source3/configure.in +@@ -0,0 +1,6693 @@ ++dnl Process this file with autoconf to produce a configure script. ++ ++dnl We must use autotools 2.54 or above ++AC_PREREQ(2.54) ++ ++AC_INIT([Samba],[3],[samba-technical@samba.org]) ++ ++AC_CONFIG_SRCDIR([include/includes.h]) ++AC_CONFIG_HEADER(include/autoconf/config.h) ++AC_DEFINE(CONFIG_H_IS_FROM_SAMBA,1,[Marker for samba's config.h]) ++ ++case "$PATH" in ++ */usr/ucb*) ++ AC_MSG_WARN([\$PATH contains /usr/ucb - build errors may follow]) ++ ;; ++esac ++ ++builddir=`pwd` ++AC_SUBST(builddir) ++ ++m4_include(m4/samba_version.m4) ++m4_include(m4/check_path.m4) ++m4_include(pkg.m4) ++ ++AC_LIBREPLACE_CC_CHECKS ++AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR ++ ++m4_include(../lib/tevent/libtevent.m4) ++m4_include(../lib/ccan/libccan.m4) ++ ++LIBTEVENT_OBJ0="" ++for obj in ${TEVENT_OBJ}; do ++ LIBTEVENT_OBJ0="${LIBTEVENT_OBJ0} ${teventdir}/${obj}" ++done ++AC_SUBST(LIBTEVENT_OBJ0) ++LIBS="${LIBS} ${TEVENT_LIBS}" ++ ++SAMBA_CPPFLAGS="-Iinclude/autoconf -Iautoconf -Iautoconf/source3" ++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -Iinclude -I${srcdir-.}/include -I. -I${srcdir-.}" ++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace" ++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}" ++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${CCAN_CFLAGS}" ++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc" ++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.." ++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/tdb_compat" ++ ++SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/popt" ++ ++## cleanup the $(srcdir) in the Makefile if we are outside of the tree ++if test "x${srcdir-.}" != "x."; then ++ SAMBA_CPPFLAGS=`echo ${SAMBA_CPPFLAGS} | sed -e "s;${srcdir};\$\(srcdir\);g"` ++fi ++ ++dnl Unique-to-Samba variables we'll be playing with. ++AC_SUBST(SAMBA_CPPFLAGS) ++AC_SUBST(SHELL) ++AC_SUBST(LDSHFLAGS) ++AC_SUBST(SONAMEFLAG) ++AC_SUBST(SHLD) ++AC_SUBST(MODULE_EXPORTS) ++AC_SUBST(DSO_EXPORTS) ++AC_SUBST(HOST_OS) ++AC_SUBST(PICFLAG) ++AC_SUBST(PIE_CFLAGS) ++AC_SUBST(PIE_LDFLAGS) ++AC_SUBST(RELRO_LDFLAGS) ++AC_SUBST(SHLIBEXT) ++AC_SUBST(INSTALLLIBCMD_SH) ++AC_SUBST(INSTALLLIBCMD_A) ++AC_SUBST(UNINSTALLLIBCMD_SH) ++AC_SUBST(UNINSTALLLIBCMD_A) ++ ++AC_SUBST(INSTALL_LIBWBCLIENT) ++AC_SUBST(UNINSTALL_LIBWBCLIENT) ++AC_SUBST(LIBWBCLIENT_SHARED_TARGET) ++AC_SUBST(LIBWBCLIENT_SHARED_TARGET_SOVER) ++AC_SUBST(LIBWBCLIENT_SHARED_TARGET_FULLVER) ++AC_SUBST(LIBWBCLIENT_SHARED) ++AC_SUBST(LIBWBCLIENT_STATIC_TARGET) ++AC_SUBST(LIBWBCLIENT_STATIC) ++AC_SUBST(LIBWBCLIENT_SOVER) ++AC_SUBST(LIBWBCLIENT_FULLVER) ++AC_SUBST(LIBWBCLIENT) ++AC_SUBST(LIBWBCLIENT_LIBS) ++ ++AC_SUBST(LIBSAMBAUTIL_SHARED) ++ ++AC_SUBST(PRINT_LIBS) ++AC_SUBST(AUTH_LIBS) ++AC_SUBST(ACL_LIBS) ++AC_SUBST(PASSDB_LIBS) ++AC_SUBST(IDMAP_LIBS) ++AC_SUBST(KRB5_LIBS) ++AC_SUBST(LDAP_LIBS) ++AC_SUBST(GPEXT_LIBS) ++AC_SUBST(PAM_MODULES) ++AC_SUBST(INSTALL_PAM_MODULES) ++AC_SUBST(UNINSTALL_PAM_MODULES) ++AC_SUBST(NSS_MODULES) ++AC_SUBST(EXTRA_BIN_PROGS) ++AC_SUBST(CIFSMOUNT_PROGS) ++AC_SUBST(INSTALL_CIFSMOUNT) ++AC_SUBST(UNINSTALL_CIFSMOUNT) ++AC_SUBST(CIFSUMOUNT_PROGS) ++AC_SUBST(INSTALL_CIFSUMOUNT) ++AC_SUBST(UNINSTALL_CIFSUMOUNT) ++AC_SUBST(CIFSUPCALL_PROGS) ++AC_SUBST(INSTALL_CIFSUPCALL) ++AC_SUBST(UNINSTALL_CIFSUPCALL) ++AC_SUBST(EXTRA_SBIN_PROGS) ++AC_SUBST(EXTRA_ALL_TARGETS) ++AC_SUBST(CONFIG_LIBS) ++AC_SUBST(NSCD_LIBS) ++ ++# compile with optimization and without debugging by default, but ++# allow people to set their own preference. ++# do this here since AC_CACHE_CHECK apparently sets the CFLAGS to "-g -O2" ++# if it has no value. This prevent *very* large debug binaries from occurring ++# by default. ++if test "x$debug" = "xyes" ; then ++ CFLAGS="${CFLAGS} -g" ++fi ++if test "x$CFLAGS" = x; then ++ CFLAGS="-O" ++fi ++ ++m4_include(../lib/socket_wrapper/config.m4) ++m4_include(../lib/nss_wrapper/config.m4) ++m4_include(../lib/uid_wrapper/config.m4) ++ ++DEVELOPER_CFLAGS="-DDEBUG_PASSWORD -DDEVELOPER" ++ ++# Probe the gcc version for extra CFLAGS. We always stash these in ++# DEVELOPER_CFLAGS, so that you can turn them on and off with a simple ++# Makefile edit, avoiding the need to re-run configure. ++if test x"$ac_cv_prog_gcc" = x"yes" ; then ++ DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings" ++ # Add -Wdeclaration-after-statement if compiler supports it ++ AC_CACHE_CHECK( ++ [that the C compiler understands -Wdeclaration-after-statement], ++ samba_cv_HAVE_Wdeclaration_after_statement, [ ++ AC_TRY_RUN_STRICT([ ++ int main(void) ++ { ++ return 0; ++ }],[$CFLAGS -Wdeclaration-after-statement],[$CPPFLAGS],[$LDFLAGS], ++ samba_cv_HAVE_Wdeclaration_after_statement=yes, ++ samba_cv_HAVE_Wdeclaration_after_statement=no, ++ samba_cv_HAVE_Wdeclaration_after_statement=cross) ++ ]) ++ ++ if test x"$samba_cv_HAVE_Wdeclaration_after_statement" = x"yes"; then ++ DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wdeclaration-after-statement" ++ fi ++ ++ #-Werror-implicit-function-declaration ++ AC_CACHE_CHECK( ++ [that the C compiler understands -Werror-implicit-function-declaration], ++ samba_cv_HAVE_Werror_implicit_function_declaration, [ ++ AC_TRY_RUN_STRICT([ ++ int main(void) ++ { ++ return 0; ++ }],[$CFLAGS -Werror-implicit-function-declaration],[$CPPFLAGS],[$LDFLAGS], ++ samba_cv_HAVE_Werror_implicit_function_declaration=yes, ++ samba_cv_HAVE_Werror_implicit_function_declaration=no, ++ samba_cv_HAVE_Werror_implicit_function_declaration=cross) ++ ]) ++ if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then ++ DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Werror-implicit-function-declaration" ++ fi ++ ++ # krb5developer is like developer, except we don't get ++ # -Wstrict-prototypes. ++ if test x"$krb5_developer" != x"$yes" ; then ++ DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Wstrict-prototypes" ++ fi ++ ++ if test x"$picky_developer" = x"yes"; then ++ DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Werror" ++ fi ++fi ++ ++################################################# ++# check for a shared memory profiling support ++AC_MSG_CHECKING(whether to use profiling) ++AC_ARG_WITH(profiling-data, ++[AS_HELP_STRING([--with-profiling-data], [Include gathering source code profile information (default=no)])], ++[ case "$withval" in ++ yes) ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(WITH_PROFILE,1,[Whether to use profiling]) ++ samba_cv_WITH_PROFILE=yes ++ ;; ++ *) ++ AC_MSG_RESULT(no) ++ samba_cv_WITH_PROFILE=no ++ ;; ++ esac ], ++ AC_MSG_RESULT(no) ++) ++ ++AC_PROG_INSTALL ++AC_PROG_AWK ++# Check for GNU make ++m4_include(../m4/check_make.m4) ++AC_SAMBA_GNU_MAKE([true], [true]) ++ ++selftest_possible="yes" ++ ++# Check for perl ++m4_include(../m4/check_perl.m4) ++AC_SAMBA_PERL([true], [selftest_possible=no]) ++ ++# Check for python ++m4_include(../m4/check_python.m4) ++AC_SAMBA_PYTHON_DEVEL([true], [selftest_possible=no]) ++ ++AC_CHECK_TOOL(AR, ar) ++ ++dnl Check if we (actually our C compiler!) use GNU ld ++AC_PROG_LD_GNU ++ ++dnl Certain versions of GNU ld the default is not to have the ++dnl --allow-shlib-undefined flag defined. This causes a stackload of ++dnl warnings when building modules. ++if test "$ac_cv_prog_gnu_ld" = "yes"; then ++ ac_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 2> /dev/null < /dev/null | grep "GNU ld"` ++ # we need to make a 2nd (separate!) check on the output of stderr, see bug #7825: ++ if test -z "$ac_cv_gnu_ld_version" ; then ++ ac_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 2>&1 > /dev/null < /dev/null | grep "GNU ld"` ++ fi ++ AC_MSG_CHECKING(GNU ld release date) ++ changequote(,)dnl ++ ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` ++ changequote([,])dnl ++ AC_MSG_RESULT(${ac_cv_gnu_ld_date}) ++ if test -n "$ac_cv_gnu_ld_date"; then ++ if test "$ac_cv_gnu_ld_date" -lt 20030217; then ++ ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes ++ fi ++ if test "$ac_cv_gnu_ld_date" -gt 20030101; then ++ ac_cv_gnu_ld_version_script=yes ++ fi ++ else ++ AC_MSG_CHECKING(GNU ld release version) ++ changequote(,)dnl ++ ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | awk '{print $NF}' | sed -n 's,\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'` ++ ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1` ++ ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2` ++ changequote([,])dnl ++ AC_MSG_RESULT(${ac_cv_gnu_ld_vernr}) ++ AC_MSG_CHECKING(GNU ld release version major) ++ AC_MSG_RESULT(${ac_cv_gnu_ld_vernr_major}) ++ AC_MSG_CHECKING(GNU ld release version minor) ++ AC_MSG_RESULT(${ac_cv_gnu_ld_vernr_minor}) ++ if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then ++ ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes ++ fi ++ if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major" = 2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then ++ ac_cv_gnu_ld_version_script=yes ++ fi ++ fi ++fi ++ ++dnl Check if C compiler understands -c and -o at the same time ++AC_PROG_CC_C_O ++if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then ++ BROKEN_CC= ++else ++ BROKEN_CC=# ++fi ++AC_SUBST(BROKEN_CC) ++ ++dnl Check if the C compiler understands -Werror (GNU) ++AC_CACHE_CHECK([that the C compiler understands -Werror],samba_cv_HAVE_Werror, [ ++ AC_TRY_RUN_STRICT([ ++ int main(void) ++ { ++ return 0; ++ }],[$CFLAGS -Werror],[$CPPFLAGS],[$LDFLAGS], ++ samba_cv_HAVE_Werror=yes,samba_cv_HAVE_Werror=no,samba_cv_HAVE_Werror=cross)]) ++if test x"$samba_cv_HAVE_Werror" = x"yes"; then ++ Werror_FLAGS="-Werror" ++else ++dnl Check if the C compiler understands -w2 ++AC_CACHE_CHECK([that the C compiler understands -w2],samba_cv_HAVE_w2, [ ++ AC_TRY_RUN_STRICT([ ++ int main(void) ++ { ++ return 0; ++ }],[$CFLAGS -w2],[$CPPFLAGS],[$LDFLAGS], ++ samba_cv_HAVE_w2=yes,samba_cv_HAVE_w2=no,samba_cv_HAVE_w2=cross)]) ++if test x"$samba_cv_HAVE_w2" = x"yes"; then ++ Werror_FLAGS="-w2" ++else ++dnl Check if the C compiler understands -errwarn (Sun) ++AC_CACHE_CHECK([that the C compiler understands -errwarn],samba_cv_HAVE_errwarn, [ ++ AC_TRY_RUN_STRICT([ ++ int main(void) ++ { ++ return 0; ++ }],[$CFLAGS -errwarn=%all],[$CPPFLAGS],[$LDFLAGS], ++ samba_cv_HAVE_errwarn=yes,samba_cv_HAVE_errwarn=no,samba_cv_HAVE_errwarn=cross)]) ++if test x"$samba_cv_HAVE_errwarn" = x"yes"; then ++ Werror_FLAGS="-errwarn=%all" ++else ++dnl Check if the C compiler understands -qhalt (IBM) ++AC_CACHE_CHECK([that the C compiler understands -qhalt],samba_cv_HAVE_qhalt, [ ++ AC_TRY_RUN_STRICT([ ++ int main(void) ++ { ++ return 0; ++ }],[$CFLAGS -qhalt=w],[$CPPFLAGS],[$LDFLAGS], ++ samba_cv_HAVE_qhalt=yes,samba_cv_HAVE_qhalt=no,samba_cv_HAVE_qhalt=cross)]) ++if test x"$samba_cv_HAVE_qhalt" = x"yes"; then ++ Werror_FLAGS="-qhalt=w" ++fi ++fi ++fi ++fi ++ ++############################################ ++# check if the compiler can handle negative enum values ++# and don't truncate the values to INT_MAX ++# a runtime test is needed here ++AC_SUBST(PIDL_ARGS) ++AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_CC_NEGATIVE_ENUM_VALUES, [ ++ AC_TRY_RUN( ++[ ++ #include <stdio.h> ++ enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF }; ++ int main(void) { ++ enum negative_values v1 = NEGATIVE_VALUE; ++ unsigned v2 = NEGATIVE_VALUE; ++ ++ if (v1 != 0xFFFFFFFF) { ++ printf("%u != 0xFFFFFFFF\n", v1); ++ return 1; ++ } ++ if (v2 != 0xFFFFFFFF) { ++ printf("%u != 0xFFFFFFFF\n", v2); ++ return 1; ++ } ++ ++ return 0; ++ } ++], ++ samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv_CC_NEGATIVE_ENUM_VALUES=no)]) ++if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then ++ AC_MSG_WARN([using --uint-enums for pidl]) ++ PIDL_ARGS="$PIDL_ARGS --uint-enums" ++fi ++ ++dnl Figure out the flags to support named structure initializers ++ ++LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_ERROR([c99 structure initializer are not supported])]) ++ ++UNAME_S=`(uname -s) 2>/dev/null` || UNAME_S="unknown" ++AC_MSG_CHECKING(uname -s) ++AC_MSG_RESULT(${UNAME_S}) ++ ++UNAME_R=`(uname -r) 2>/dev/null` || UNAME_R="unknown" ++AC_MSG_CHECKING(uname -r) ++AC_MSG_RESULT(${UNAME_R}) ++ ++UNAME_M=`(uname -m) 2>/dev/null` || UNAME_M="unknown" ++AC_MSG_CHECKING(uname -m) ++AC_MSG_RESULT(${UNAME_M}) ++ ++UNAME_P=`(uname -p) 2>/dev/null` || UNAME_P="unknown" ++AC_MSG_CHECKING(uname -p) ++AC_MSG_RESULT(${UNAME_P}) ++ ++UNAME_I=`(uname -i) 2>/dev/null` || UNAME_I="unknown" ++AC_MSG_CHECKING(uname -i) ++AC_MSG_RESULT(${UNAME_I}) ++ ++dnl Add #include for broken IRIX header files ++ case "$host_os" in ++ *irix6*) ++ #TODO add to libreplace ++ if test x"$ac_cv_prog_gcc" != x"yes" ; then ++ dnl Fix sensible defaults for MIPSPro compilers. The ++ dnl error numbers are valid for the 7.3 compilers, ++ dnl hopefully also valid for the 7.4 series. ++ dnl ++ dnl Bugzilla 3801. Force an error on warning 1035 ++ dnl so we don't incorrectly detect stdint.h. This ++ dnl warning is emitted for #error directives. ++ CFLAGS="$CFLAGS -diag_error 1035" ++ dnl 1209: Controlling expression is constant ++ dnl 1174: Function foo declared but never referenced ++ dnl 3201: Parameter foo was never referenced ++ CFLAGS="$CFLAGS -woff 1209,1174,3201" ++ fi ++ ;; ++esac ++ ++DYNEXP= ++AC_SUBST(DYNEXP) ++LDSHFLAGS_Z_DEFS= ++AC_SUBST(LDSHFLAGS_Z_DEFS) ++LDSHFLAGS_Z_NODEFS= ++AC_SUBST(LDSHFLAGS_Z_NODEFS) ++ ++dnl Add modules that have to be built by default here ++dnl These have to be built static: ++default_static_modules="" ++default_static_modules="$default_static_modules pdb_smbpasswd" ++default_static_modules="$default_static_modules pdb_tdbsam" ++default_static_modules="$default_static_modules pdb_wbc_sam" ++default_static_modules="$default_static_modules rpc_lsarpc" ++default_static_modules="$default_static_modules rpc_samr" ++default_static_modules="$default_static_modules rpc_winreg" ++default_static_modules="$default_static_modules rpc_initshutdown" ++default_static_modules="$default_static_modules rpc_dssetup" ++default_static_modules="$default_static_modules rpc_wkssvc" ++default_static_modules="$default_static_modules rpc_svcctl" ++default_static_modules="$default_static_modules rpc_ntsvcs" ++default_static_modules="$default_static_modules rpc_netlogon" ++default_static_modules="$default_static_modules rpc_netdfs" ++default_static_modules="$default_static_modules rpc_srvsvc" ++default_static_modules="$default_static_modules rpc_spoolss" ++default_static_modules="$default_static_modules rpc_eventlog" ++default_static_modules="$default_static_modules auth_sam" ++default_static_modules="$default_static_modules auth_unix" ++default_static_modules="$default_static_modules auth_winbind" ++default_static_modules="$default_static_modules auth_wbc" ++default_static_modules="$default_static_modules auth_domain" ++default_static_modules="$default_static_modules auth_builtin" ++default_static_modules="$default_static_modules vfs_default" ++default_static_modules="$default_static_modules nss_info_template" ++ ++dnl These are preferably build shared, and static if dlopen() is not available ++default_shared_modules="" ++default_shared_modules="$default_shared_modules vfs_recycle" ++default_shared_modules="$default_shared_modules vfs_audit" ++default_shared_modules="$default_shared_modules vfs_extd_audit" ++default_shared_modules="$default_shared_modules vfs_full_audit" ++default_shared_modules="$default_shared_modules vfs_netatalk" ++default_shared_modules="$default_shared_modules vfs_fake_perms" ++default_shared_modules="$default_shared_modules vfs_default_quota" ++default_shared_modules="$default_shared_modules vfs_readonly" ++default_shared_modules="$default_shared_modules vfs_cap" ++default_shared_modules="$default_shared_modules vfs_expand_msdfs" ++default_shared_modules="$default_shared_modules vfs_shadow_copy" ++default_shared_modules="$default_shared_modules vfs_shadow_copy2" ++default_shared_modules="$default_shared_modules auth_script" ++default_shared_modules="$default_shared_modules vfs_readahead" ++default_shared_modules="$default_shared_modules vfs_xattr_tdb" ++default_shared_modules="$default_shared_modules vfs_streams_xattr" ++default_shared_modules="$default_shared_modules vfs_streams_depot" ++default_shared_modules="$default_shared_modules vfs_acl_xattr" ++default_shared_modules="$default_shared_modules vfs_acl_tdb" ++default_shared_modules="$default_shared_modules vfs_smb_traffic_analyzer" ++default_shared_modules="$default_shared_modules vfs_preopen" ++default_shared_modules="$default_shared_modules vfs_catia" ++default_shared_modules="$default_shared_modules vfs_scannedonly" ++default_shared_modules="$default_shared_modules vfs_crossrename" ++default_shared_modules="$default_shared_modules vfs_linux_xfs_sgid" ++default_shared_modules="$default_shared_modules vfs_time_audit" ++default_shared_modules="$default_shared_modules vfs_media_harmony" ++default_shared_modules="$default_shared_modules vfs_commit" ++default_shared_modules="$default_shared_modules idmap_autorid" ++default_shared_modules="$default_shared_modules idmap_tdb2" ++default_shared_modules="$default_shared_modules idmap_rid" ++default_shared_modules="$default_shared_modules idmap_hash" ++ ++if test "x$developer" = xyes; then ++ default_shared_modules="$default_shared_modules perfcount_test" ++fi ++ ++if test x"$selftest" = x"yes" -o "x$developer" = xyes; then ++ default_shared_modules="$default_shared_modules vfs_fake_acls vfs_nfs4acl_xattr" ++fi ++ ++# ++# Config CPPFLAG settings for strange OS's that must be set ++# before other tests. Do NOT invoke AC_CHECK_HEADERS within this ++# case statement; its first reference must be unconditional. ++# ++case "$host_os" in ++ *hpux*) ++# ++# Defines needed for HPUX support. ++# HPUX has bigcrypt but (sometimes?) doesn't use it for ++# password hashing - hence the USE_BOTH_CRYPT_CALLS define. ++# ++ case `uname -r` in ++ *9*|*10*|*11) ++ AC_DEFINE(USE_BOTH_CRYPT_CALLS, 1, [Whether to use both of HPUX' crypt calls]) ++ ;; ++ esac ++ ;; ++ ++# ++# 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*) ++ AC_MSG_RESULT([enabling large file support]) ++ CPPFLAGS="$CPPFLAGS -D_LARGE_FILES" ++ AC_DEFINE(_LARGE_FILES, 1, [Whether to enable large file support]) ++ ;; ++# ++# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit ++# to the existance of large files.. ++# ++# Solaris uses SYSV printing. Make sure to set that here. --jerry ++# ++ *solaris*) ++ AC_DEFINE(SYSV, 1, [Whether to enable System V compatibility]) ++ LDFLAGS="$LDFLAGS -lthread" ++ CPPFLAGS="$CPPFLAGS -D_REENTRANT" ++ ;; ++# ++# IRIX uses SYSV printing. Make sure to set that here ++# ++ *irix*) ++ AC_DEFINE(SYSV, 1, [Whether to enable System V compatibility]) ++ ;; ++ *freebsd*|*dragonfly*) ++ AC_DEFINE(FREEBSD, 1, [Whether the host os is FreeBSD]) ++ ;; ++# ++# VOS may need to have POSIX support and System V compatibility enabled. ++# ++ *vos*) ++ case "$CPPFLAGS" in ++ *-D_POSIX_C_SOURCE*) ++ ;; ++ *) ++ CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" ++ AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Whether to enable POSIX support]) ++ ;; ++ esac ++ case "$CPPFLAGS" in ++ *-D_SYSV*|*-D_SVID_SOURCE*) ++ ;; ++ *) ++ CPPFLAGS="$CPPFLAGS -D_SYSV" ++ AC_DEFINE(_SYSV, 1, [Whether to enable System V compatibility]) ++ esac ++ ;; ++# GNU systems ++# ++ *linux* | *hurd* | gnu* | k*bsd*-gnu | kopensolaris*-gnu) ++ CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" ++ AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions]) ++ ;; ++ ++# ++# MacOS X is the *only* system that uses compose character in utf8. This ++# is so horribly broken.... ++# ++ *darwin*) ++ AC_DEFINE(BROKEN_UNICODE_COMPOSE_CHARACTERS, 1, [Does this system use unicode compose characters]) ++ ++# Add a system specific charset module. ++ default_shared_modules="$default_shared_modules" ++ ++ ;; ++ *qnx*) ++ ;; ++ ++esac ++ ++SAVE_CPPFLAGS="${CPPFLAGS}" ++CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}" ++ ++AC_LIBREPLACE_BROKEN_CHECKS ++AC_CHECK_FUNCS([syslog],[],[AC_MSG_ERROR([Required function not found])]) ++AC_LIBREPLACE_NETWORK_CHECKS ++ ++CPPFLAGS="${SAVE_CPPFLAGS}" ++ ++LIBREPLACE_DIR=`echo ${libreplacedir} | sed -e "s;${srcdir};;" -e "s;^/;;"` ++ ++LIBREPLACE_OBJS="${LIBREPLACEOBJ}" ++AC_SUBST(LIBREPLACE_OBJS) ++ ++LIBREPLACE_LIBS="${LIBREPLACE_NETWORK_LIBS} ${LIBREPLACE_FILESYS_LIBS}" ++AC_SUBST(LIBREPLACE_LIBS) ++ ++ ++# add -ldl to the global LIBS ++LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}" ++AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}" ++ ++ ++AC_CHECK_HEADERS(aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h) ++AC_CHECK_HEADERS(unistd.h grp.h sys/id.h memory.h alloca.h) ++AC_CHECK_HEADERS(limits.h float.h libintl.h) ++AC_CHECK_HEADERS(rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h) ++AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h sys/sysctl.h) ++AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h) ++AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h) ++AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h) ++AC_CHECK_HEADERS(sys/sysmacros.h) ++AC_CHECK_HEADERS(sys/syslog.h syslog.h) ++AC_CHECK_HEADERS(langinfo.h locale.h) ++AC_CHECK_HEADERS(xfs/libxfs.h) ++AC_CHECK_HEADERS(netgroup.h) ++AC_CHECK_HEADERS(linux/falloc.h) ++AC_CHECK_HEADERS(CommonCrypto/CommonDigest.h) ++AC_CHECK_HEADERS(linux/ioctl.h) ++ ++dnl check for OS implementation of md5 conformant to rfc1321 ++samba_cv_md5lib=none ++ ++AC_CHECK_LIB(c, MD5Update, [samba_cv_md5lib=""]) ++ ++if test x"$samba_cv_md5lib" = x"none" ; then ++ AC_CHECK_LIB(md, MD5Update, [samba_cv_md5lib=md]) ++fi ++ ++if test x"$samba_cv_md5lib" = x"none" ; then ++ AC_CHECK_LIB(md5, MD5Update, [samba_cv_md5lib=md5]) ++fi ++ ++if test x"$samba_cv_md5lib" != x"none" ; then ++ AC_CHECK_HEADERS(sys/md5.h) ++fi ++ ++CRYPTO_MD5_OBJ="../lib/crypto/md5.o" ++if test x"$ac_cv_header_sys_md5_h" = x"yes" -a \ ++ x"$samba_cv_md5lib" != x"none" ; then ++ if test x"$samba_cv_md5lib" != x ; then ++ LIBS="${LIBS} -l${samba_cv_md5lib}" ++ AC_DEFINE(HAVE_LIBMD5, 1, ++ [Whether libmd5 conformant to rfc1321 is available.]) ++ fi ++ CRYPTO_MD5_OBJ= ++fi ++ ++if test "x$ac_cv_header_CommonCrypto_CommonDigest_h" == "xyes"; then ++ CRYPTO_MD5_OBJ= ++fi ++ ++AC_SUBST(CRYPTO_MD5_OBJ) ++ ++AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[ ++#if HAVE_RPC_RPC_H ++#include <rpc/rpc.h> ++#endif ++]]) ++## These fail to compile on IRIX so just check for their presence ++AC_CHECK_HEADERS(sys/mode.h,,,) ++ ++# Look for Darwin headers ++old_CPPFLAGS="$CPPFLAGS" ++CPPFLAGS="-Iinclude $CPPFLAGS" ++AC_CHECK_HEADERS([CoreFoundation/CFStringEncodingConverter.h], [], [AC_CHECK_HEADERS([CFStringEncodingConverter.h])]) ++CPPFLAGS="$old_CPPFLAGS" ++ ++# To link lib/util/charset/charset_macosxfs.c, we need to tell the linker ++# about CoreFoundation, at least on os X 10.4..10.7 resp. darwin8..12 ++case "$host_os" in ++ *darwin*) ++ LDFLAGS="$LDFLAGS -framework CoreFoundation" ++ ;; ++esac ++ ++# In valgrind 1.0.x, it's just valgrind.h. In 1.9.x+ there's a ++# subdirectory of headers. ++AC_CHECK_HEADERS(valgrind.h valgrind/valgrind.h valgrind/memcheck.h) ++ ++if test x"$enable_developer" = x"yes" ; then ++ if test x"$ac_cv_header_valgrind_h" = xyes -o \ ++ x"$ac_cv_header_valgrind_valgrind_h" = xyes ; then ++ AC_DEFINE(VALGRIND,1,[Whether we have valgrind headers]) ++ fi ++fi ++ ++# ++# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT. ++# This causes configure to fail to detect it. Check for shadow separately on HPUX. ++# ++case "$host_os" in ++ *hpux*) ++ AC_TRY_COMPILE([#include <shadow.h>],[struct spwd testme], ++ ac_cv_header_shadow_h=yes,ac_cv_header_shadow_h=no) ++ if test x"$ac_cv_header_shadow_h" = x"yes"; then ++ AC_DEFINE(HAVE_SHADOW_H,1,[Whether we have shadow.h]) ++ fi ++ ;; ++esac ++AC_CHECK_HEADERS(shadow.h) ++AC_CHECK_HEADERS(nss.h nss_common.h nsswitch.h ns_api.h sys/security.h) ++AC_CHECK_HEADERS(syscall.h sys/syscall.h) ++ ++AC_CHECK_HEADERS(sys/cdefs.h glob.h) ++ ++# For experimental utmp support (lastlog on some BSD-like systems) ++AC_CHECK_HEADERS(utmp.h utmpx.h lastlog.h) ++ ++AC_CHECK_SIZEOF(int,cross) ++AC_CHECK_SIZEOF(long,cross) ++AC_CHECK_SIZEOF(long long,cross) ++AC_CHECK_SIZEOF(short,cross) ++ ++AC_C_CONST ++AC_C_INLINE ++AC_C_BIGENDIAN ++AC_C_CHAR_UNSIGNED ++ ++AC_TYPE_SIGNAL ++AC_TYPE_UID_T ++AC_TYPE_MODE_T ++AC_TYPE_OFF_T ++AC_TYPE_SIZE_T ++AC_TYPE_PID_T ++AC_STRUCT_ST_RDEV ++AC_DIRENT_D_OFF ++AC_CHECK_TYPE(ssize_t, int) ++AC_CHECK_TYPE(wchar_t, unsigned short) ++ ++############################################ ++# for cups support we need libcups, and a handful of header files ++ ++AC_ARG_ENABLE(cups, ++[AS_HELP_STRING([--enable-cups], [Turn on CUPS support (default=auto)])]) ++ ++if test x$enable_cups != xno; then ++ AC_PATH_PROG(CUPS_CONFIG, cups-config) ++ ++ if test "x$CUPS_CONFIG" != x; then ++ ++ ac_save_LDFLAGS=$LDFLAGS ++ ac_save_PRINT_LIBS=$PRINT_LIBS ++ AC_CHECK_HEADERS(cups/cups.h cups/language.h) ++ ++ if test x"$ac_cv_header_cups_cups_h" = xyes -a \ ++ x"$ac_cv_header_cups_language_h" = xyes; then ++ # try linking with -lcups alone first. That should work unless libcups is ++ # underlinked. With cups-config --libs we pull in unwanted and unneeded ++ # dendencies including thread libraries - use cups-config only if really ++ # required. ++ AC_CHECK_LIB_EXT(cups, ac_save_PRINT_LIBS , httpConnect, ++ [PRINT_LIBS="$ac_save_PRINT_LIBS -lcups"], ++ [AC_MSG_WARN([your cups library doesn't link with -lcups alone, it might be underlinked.]) ; ++ PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG --libs`"]) ++ ++ AC_DEFINE(HAVE_CUPS,1,[Whether we have CUPS]) ++ samba_cv_HAVE_CUPS=yes ++ AC_CHECK_LIB_EXT(cups, PRINT_LIBS, httpConnectEncrypt) ++ else ++ AC_MSG_WARN([cups-config around but cups-devel not installed]) ++ CFLAGS=$ac_save_CFLAGS ++ LDFLAGS=$ac_save_LDFLAGS ++ PRINT_LIBS=$ac_save_PRINT_LIBS ++ fi ++ ++ elif test x"$enable_cups" = x"yes"; then ++ AC_MSG_ERROR(Cups support required but cups-config not located. Make sure cups-devel related files are installed.) ++ fi ++fi ++ ++AC_ARG_ENABLE(iprint, ++[AS_HELP_STRING([--enable-iprint], [Turn on iPrint support (default=yes if cups is yes)])]) ++ ++if test x$enable_iprint != xno; then ++ if test x"$samba_cv_HAVE_CUPS" = xyes; then ++ AC_DEFINE(HAVE_IPRINT,1,[Whether we have iPrint]) ++ elif test x"$enable_iprint" = x"yes"; then ++ AC_MSG_ERROR(iPrint support required but cups not enabled. Make sure cups-devel related files are installed and that cups is enabled.) ++ fi ++fi ++ ++############################################ ++# check if the compiler will optimize out function calls ++AC_CACHE_CHECK([if the compiler will optimize out function calls],samba_cv_optimize_out_funcation_calls, [ ++ AC_TRY_LINK([ ++#include <stdio.h>], ++[ ++ if (0) { ++ this_function_does_not_exist(); ++ } else { ++ return 1; ++ } ++ ++], ++ samba_cv_optimize_out_funcation_calls=yes,samba_cv_optimize_out_funcation_calls=no)]) ++if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then ++ AC_DEFINE(HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS,1,[Whether the compiler will optimize out function calls]) ++fi ++ ++############################################# ++# check for fd passing struct via msg_control ++AC_CACHE_CHECK([for fd passing via msg_control],samba_cv_msghdr_msg_control, [ ++ AC_TRY_COMPILE([ ++#include <sys/types.h> ++#include <stdlib.h> ++#include <stddef.h> ++#include <sys/socket.h> ++#include <sys/un.h>], ++[ ++ struct msghdr msg; ++ union { ++ struct cmsghdr cm; ++ char control[CMSG_SPACE(sizeof(int))]; ++ } control_un; ++ msg.msg_control = control_un.control; ++ msg.msg_controllen = sizeof(control_un.control); ++], ++ samba_cv_msghdr_msg_control=yes,samba_cv_msghdr_msg_control=no)]) ++if test x"$samba_cv_msghdr_msg_control" = x"yes"; then ++ AC_DEFINE(HAVE_MSGHDR_MSG_CONTROL,1, ++ [If we can use msg_control for passing file descriptors]) ++fi ++ ++############################################# ++# check for fd passing struct via msg_acctrights ++AC_CACHE_CHECK([for fd passing via msg_acctrights], ++ samba_cv_msghdr_msg_acctrights, [ ++ AC_TRY_COMPILE([ ++#include <sys/types.h> ++#include <stdlib.h> ++#include <stddef.h> ++#include <sys/socket.h> ++#include <sys/un.h>], ++[ ++ struct msghdr msg; ++ int fd; ++ msg.msg_acctrights = (caddr_t) &fd; ++ msg.msg_acctrightslen = sizeof(fd); ++], ++ samba_cv_msghdr_msg_acctrights=yes,samba_cv_msghdr_msg_acctrights=no)]) ++if test x"$samba_cv_msghdr_msg_acctrights" = x"yes"; then ++ AC_DEFINE(HAVE_MSGHDR_MSG_ACCTRIGHTS,1, ++ [If we can use msg_acctrights for passing file descriptors]) ++fi ++ ++AC_CHECK_FUNCS(dirfd) ++if test x"$ac_cv_func_dirfd" = x"yes"; then ++ default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort" ++fi ++ ++AC_CACHE_CHECK([for struct sigevent type],samba_cv_struct_sigevent, [ ++ AC_TRY_COMPILE([ ++#include <sys/types.h> ++#if STDC_HEADERS ++#include <stdlib.h> ++#include <stddef.h> ++#endif ++#include <signal.h>],[struct sigevent s;], ++ samba_cv_struct_sigevent=yes,samba_cv_struct_sigevent=no)]) ++if test x"$samba_cv_struct_sigevent" = x"yes"; then ++ AC_DEFINE(HAVE_STRUCT_SIGEVENT,1,[Whether we have the struct sigevent]) ++ AC_CHECK_MEMBERS([struct sigevent.sigev_value.sival_ptr,struct sigevent.sigev_value.sigval_ptr], , , ++ [#include <signal.h>]) ++fi ++ ++# and glibc has setresuid under linux but the function does ++# nothing until kernel 2.1.44! very dumb. ++AC_CACHE_CHECK([for real setresuid],samba_cv_have_setresuid,[ ++ AC_TRY_RUN([#include <errno.h> ++main() { setresuid(1,1,1); setresuid(2,2,2); return(errno==EPERM?0:1);}], ++ samba_cv_have_setresuid=yes,samba_cv_have_setresuid=no,samba_cv_have_setresuid=cross)]) ++if test x"$samba_cv_have_setresuid" = x"yes"; then ++ AC_DEFINE(HAVE_SETRESUID,1,[Whether the system has setresuid]) ++fi ++ ++# Do the same check for setresguid... ++# ++AC_CACHE_CHECK([for real setresgid],samba_cv_have_setresgid,[ ++ AC_TRY_RUN([#include <unistd.h> ++#include <errno.h> ++main() { errno = 0; setresgid(1,1,1); return(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}], ++ samba_cv_have_setresgid=yes,samba_cv_have_setresgid=no,samba_cv_have_setresgid=cross)]) ++if test x"$samba_cv_have_setresgid" = x"yes"; then ++ AC_DEFINE(HAVE_SETRESGID,1,[Whether the system has setresgid]) ++fi ++ ++AC_FUNC_MEMCMP ++ ++############################################### ++# Readline included by default unless explicitly asked not to ++test "${with_readline+set}" != "set" && with_readline=yes ++ ++# test for where we get readline() from ++AC_MSG_CHECKING(whether to use readline) ++AC_ARG_WITH(readline, ++[AS_HELP_STRING([--with-readline[=DIR]], [Look for readline include/libs in DIR (default=auto)])], ++[ case "$with_readline" in ++ yes) ++ AC_MSG_RESULT(yes) ++ ++ AC_CHECK_HEADERS(readline.h history.h readline/readline.h) ++ AC_CHECK_HEADERS(readline/history.h) ++ ++ AC_CHECK_HEADERS(readline.h readline/readline.h,[ ++ for termlib in ncurses curses termcap terminfo termlib tinfo; do ++ AC_CHECK_LIB(${termlib}, tgetent, [TERMLIBS="-l${termlib}"; break]) ++ done ++ AC_CHECK_LIB(readline, rl_callback_handler_install, ++ [TERMLIBS="-lreadline $TERMLIBS" ++ AC_DEFINE(HAVE_LIBREADLINE,1,[Whether the system has readline]) ++ break], [TERMLIBS=], $TERMLIBS)]) ++ ;; ++ no) ++ AC_MSG_RESULT(no) ++ ;; ++ *) ++ AC_MSG_RESULT(yes) ++ ++ # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at ++ # alternate readline path ++ _ldflags=${LDFLAGS} ++ _cppflags=${CPPFLAGS} ++ ++ # Add additional search path ++ LDFLAGS="-L$with_readline/lib $LDFLAGS" ++ CPPFLAGS="-I$with_readline/include $CPPFLAGS" ++ ++ AC_CHECK_HEADERS(readline.h history.h readline/readline.h) ++ AC_CHECK_HEADERS(readline/history.h) ++ ++ AC_CHECK_HEADERS(readline.h readline/readline.h,[ ++ for termlib in ncurses curses termcap terminfo termlib; do ++ AC_CHECK_LIB(${termlib}, tgetent, [TERMLIBS="-l${termlib}"; break]) ++ done ++ AC_CHECK_LIB(readline, rl_callback_handler_install, ++ [TERMLDFLAGS="-L$with_readline/lib" ++ TERMCPPFLAGS="-I$with_readline/include" ++ CPPFLAGS="-I$with_readline/include $CPPFLAGS" ++ TERMLIBS="-lreadline $TERMLIBS" ++ AC_DEFINE(HAVE_LIBREADLINE,1,[Whether the system has readline]) ++ break], [TERMLIBS= CPPFLAGS=$_cppflags], $TERMLIBS)]) ++ ++ LDFLAGS=$_ldflags ++ ;; ++ esac], ++ AC_MSG_RESULT(no) ++) ++AC_SUBST(TERMLIBS) ++AC_SUBST(TERMLDFLAGS) ++ ++# 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. ++AC_CHECK_LIB(readline, rl_completion_matches, ++ [AC_DEFINE(HAVE_NEW_LIBREADLINE, 1, ++ [Do we have rl_completion_matches?])], ++ [], ++ [$TERMLIBS]) ++ ++# not all readline libs have rl_event_hook or history_list ++AC_CHECK_DECLS(rl_event_hook, [], [], [#include <readline/readline.h>]) ++AC_CHECK_LIB(readline, history_list, ++ [AC_DEFINE(HAVE_HISTORY_LIST, 1, [Do we have history_list?])], ++ [], ++ [$TERMLIBS]) ++ ++############################################### ++# test for where we get yp_get_default_domain() from ++AC_SEARCH_LIBS(yp_get_default_domain, [nsl]) ++AC_CHECK_FUNCS(yp_get_default_domain) ++ ++# Check if we have execl, if not we need to compile smbrun. ++AC_CHECK_FUNCS(execl) ++if test x"$ac_cv_func_execl" = x"no"; then ++ EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun" ++fi ++ ++AC_CHECK_FUNCS(getcwd fchown chmod fchmod mknod mknod64) ++AC_CHECK_FUNCS(strtol) ++AC_CHECK_FUNCS(strchr chflags) ++AC_CHECK_FUNCS(getrlimit fsync setpgid) ++AC_CHECK_FUNCS(fdatasync,,[AC_CHECK_LIB_EXT(rt, LIBS, fdatasync)]) ++AC_CHECK_FUNCS(setsid glob strpbrk crypt16 getauthuid) ++AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) ++AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf) ++AC_CHECK_FUNCS(getgrset) ++AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups syscall sysconf) ++AC_CHECK_FUNCS(atexit grantpt posix_openpt posix_fallocate) ++AC_CHECK_FUNCS(fallocate) ++AC_CHECK_FUNCS(fseeko setluid getpwanam) ++AC_CHECK_FUNCS(fdopendir) ++AC_CHECK_FUNCS(getpwent_r) ++AC_CHECK_FUNCS(setenv strcasecmp fcvt fcvtl) ++AC_CHECK_FUNCS(syslog vsyslog timegm) ++AC_CHECK_FUNCS(setlocale) ++AC_CHECK_FUNCS(nanosleep,,[AC_CHECK_LIB_EXT(rt, LIBS, nanosleep)]) ++AC_CHECK_FUNCS(lutimes futimes utimensat futimens) ++AC_CHECK_FUNCS(mlock munlock mlockall munlockall) ++AC_CHECK_FUNCS(memalign posix_memalign hstrerror) ++AC_CHECK_HEADERS(sys/mman.h) ++# setbuffer, shmget, shm_open are needed for smbtorture ++AC_CHECK_FUNCS(shmget shm_open) ++AC_CHECK_FUNCS(gettext dgettext) ++AC_CHECK_FUNCS(bindtextdomain textdomain bind_textdomain_codeset) ++AC_CHECK_FUNCS(strupr) ++ ++# Find a method of generating a stack trace ++AC_CHECK_HEADERS(execinfo.h libexc.h libunwind.h) ++# libexecinfo provides backtrace_symbols on FreeBSD ++AC_SEARCH_LIBS(backtrace_symbols, [execinfo]) ++AC_CHECK_FUNCS(backtrace_symbols) ++AC_CHECK_LIB(exc, trace_back_stack) ++ ++# check for sysctlbyname and sysctl for BSD systems ++AC_CHECK_FUNCS(sysctlbyname) ++AC_CHECK_FUNCS(sysctl) ++ ++################################################# ++# Check to see if core dump directory is defined in linux ++# with /proc/sys/kernel/core_pattern ++ ++AC_CHECK_FILE([/proc/sys/kernel/core_pattern], ++ AC_DEFINE(HAVE_SYS_KERNEL_PROC_CORE_PATTERN, 1, ++ [Whether Linux kernel uses core_pattern for core files]), ++ []) ++ ++############################# ++# check if building with gpfs ++AC_CHECK_HEADERS(gpfs_gpl.h) ++if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then ++ AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL headers are available]) ++ default_shared_modules="$default_shared_modules vfs_gpfs" ++fi ++ ++############################# ++# check if building with libcephfs ++# fail if --with-libcephfs specified but no headers found ++printf "%s" "checking for CephFS... " ++AC_CHECK_HEADERS(cephfs/libcephfs.h) ++ ++save_LIBS="$LIBS" ++LIBS="$LIBS -lcephfs" ++AC_TRY_LINK([#include <cephfs/libcephfs.h>], ++ [ceph_version(0, 0, 0)], ++ samba_cv_HAVE_CEPHFS=yes, ++ samba_cv_HAVE_CEPHFS=no ++ ) ++ ++if test x"$ac_cv_header_cephfs_libcephfs_h" = x"yes" && test x"$samba_cv_HAVE_CEPHFS" = x"yes"; then ++ AC_DEFINE(HAVE_CEPH, 1, [Whether CEPH headers are available]) ++ default_shared_modules="$default_shared_modules vfs_ceph" ++ save_CFLAGS="$CFLAGS" ++ save_LDFLAGS="$LDFLAGS" ++ save_LIBS="$save_LIBS -lcephfs" ++else ++ if test x"$CEPHFS_PATH_SPEC" = x"yes"; then ++ AC_MSG_ERROR([No valid libcephfs found in ${CEPHFS_PATH}]) ++ fi ++fi ++ ++CFLAGS="$save_CFLAGS" ++LDFLAGS="$save_LDFLAGS" ++LIBS="$save_LIBS" ++ ++# Note that all the libunwind symbols in the API are defined to internal ++# platform-specific version, so we must include libunwind.h before checking ++# any of them. ++AC_MSG_CHECKING([for libunwind]) ++save_LIBS=$LIBS ++ ++UNWIND_ARCH="unknown" ++if test x"$UNAME_I" != x"unknown"; then ++ UNWIND_ARCH="$UNAME_I" ++elif test x"$UNAME_M" != x"unknown"; then ++ UNWIND_ARCH="$UNAME_M" ++elif test x"$UNAME_P" != x"unknown"; then ++ UNWIND_ARCH="$UNAME_P" ++fi ++ ++case "$UNWIND_ARCH" in ++ unknown) ++ # This probably won't link without ++ # the platform-specific libunwind. ++ LIBS="$LIBS -lunwind" ++ ;; ++ i386|i586|i686) ++ # Add the platform-specific libunwind module. ++ LIBS="$LIBS -lunwind -lunwind-x86" ++ ;; ++ *) ++ # Add the platform-specific libunwind module. ++ # based on uname -i, uname -m or uname -p ++ LIBS="$LIBS -lunwind -lunwind-$UNWIND_ARCH" ++ ;; ++esac ++ ++AC_TRY_LINK( ++ [ ++#ifdef HAVE_LIBUNWIND_H ++#include <libunwind.h> ++#endif ++ ], ++ [ ++ unw_context_t ctx; unw_cursor_t cur; ++ char buf[256]; unw_word_t off; ++ unw_getcontext(&ctx); unw_init_local(&cur, &ctx); ++ unw_get_proc_name(&cur, buf, sizeof(buf), &off); ++ ], ++ [ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_LIBUNWIND, 1, [Whether libunwind is available]) ++ ++ # If we have libunwind, test whether we also have libunwind-ptrace ++ # which would let us unwind arbitrary processes. ++ save_LIBS=$LIBS ++ AC_CHECK_HEADERS(libunwind-ptrace.h) ++ AC_CHECK_LIB(unwind-ptrace, _UPT_create, ++ [ ++ LIBUNWIND_PTRACE="-lunwind-ptrace"; ++ AC_DEFINE(HAVE_LIBUNWIND_PTRACE, 1, ++ [Whether libunwind-ptrace.a is available.]) ++ ], ++ [ LIBUNWIND_PTRACE="" ]) ++ ++ LIBS=$save_LIBS ++ ], ++ [ ++ AC_MSG_RESULT(no) ++ LIBS=$save_LIBS ++ ]) ++ ++# To use libunwind-ptrace, we also need to make some ptrace system calls. ++if test x"$LIBUNWIND_PTRACE" != x"" ; then ++ AC_CHECK_HEADERS(sys/ptrace.h) ++ AC_MSG_CHECKING([for the Linux ptrace(2) interface]) ++ AC_TRY_LINK( ++ [ ++#if HAVE_SYS_TYPES_H ++#include <sys/types.h> ++#endif ++#if HAVE_SYS_PTRACE_H ++#include <sys/ptrace.h> ++#endif ++ ], ++ [ ++ pid_t me = (pid_t)-1; ++ ptrace(PTRACE_ATTACH, me, 0, 0); ++ ptrace(PTRACE_DETACH, me, 0, 0); ++ return 0; ++ ], ++ [ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_LINUX_PTRACE, 1, ++ [Whether the Linux ptrace(2) interface is available.]) ++ ], ++ [ ++ AC_MSG_RESULT(no) ++ LIBUNWIND_PTRACE="" ++ ]) ++fi ++ ++AC_SUBST(LIBUNWIND_PTRACE) ++ ++AC_CHECK_FUNCS(_dup _dup2 _opendir _readdir _seekdir _telldir _closedir) ++AC_CHECK_FUNCS(__dup __dup2 __opendir __readdir __seekdir __telldir __closedir) ++AC_CHECK_FUNCS(__getcwd _getcwd) ++AC_CHECK_FUNCS(__xstat __fxstat __lxstat) ++AC_CHECK_FUNCS(_stat _lstat _fstat __stat __lstat __fstat) ++AC_CHECK_FUNCS(_acl __acl _facl __facl _open __open _chdir __chdir) ++AC_CHECK_FUNCS(_close __close _fchdir __fchdir _fcntl __fcntl) ++AC_CHECK_FUNCS(getdents __getdents _lseek __lseek _read __read) ++AC_CHECK_FUNCS(getdirentries _write __write _fork __fork) ++AC_CHECK_FUNCS(__sys_llseek llseek _llseek __llseek) ++AC_CHECK_FUNCS(pread _pread __pread) ++AC_CHECK_FUNCS(pwrite _pwrite __pwrite) ++AC_CHECK_FUNCS(prctl) ++ ++AC_TRY_COMPILE([ ++#ifdef HAVE_SYS_PRCTL_H ++#include <sys/prctl.h> ++#endif ++], ++[int i; i = prtcl(0); ], ++AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[]) ++ ++# ++# ++# ++case "$host_os" in ++ *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu) ++ # glibc <= 2.3.2 has a broken getgrouplist ++ AC_CACHE_CHECK([for good getgrouplist],samba_cv_linux_getgrouplist_ok,[AC_TRY_RUN([ ++#include <unistd.h> ++#include <sys/utsname.h> ++main() { ++ /* glibc up to 2.3 has a broken getgrouplist */ ++#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) ++ int libc_major = __GLIBC__; ++ int libc_minor = __GLIBC_MINOR__; ++ ++ if (libc_major < 2) ++ return(1); ++ if ((libc_major == 2) && (libc_minor <= 3)) ++ return(1); ++#endif ++ return(0); ++} ++], [samba_cv_linux_getgrouplist_ok=yes], ++ [samba_cv_linux_getgrouplist_ok=no], ++ [samba_cv_linux_getgrouplist_ok=cross])]) ++ if test x"$samba_cv_linux_getgrouplist_ok" = x"yes"; then ++ AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist]) ++ fi ++ ;; ++ *) ++ AC_CHECK_FUNCS(getgrouplist) ++ ;; ++esac ++ ++################################################# ++# Check whether struct stat has timestamps with sub-second resolution. ++# ++ ++samba_cv_stat_hires=no ++AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec], # Linux, Solaris ++ [samba_cv_stat_hires=yes]) ++AC_CHECK_MEMBERS([struct stat.st_mtimensec], # BSD, if defined _POSIX_SOURCE ++ [samba_cv_stat_hires=yes]) ++AC_CHECK_MEMBERS([struct stat.st_mtimespec.tv_nsec], # BSD, if not defined _POSIX_SOURCE ++ [samba_cv_stat_hires=yes]) ++AC_CHECK_MEMBERS([struct stat.st_mtime_n], # AIX ++ [samba_cv_stat_hires=yes]) ++AC_CHECK_MEMBERS([struct stat.st_umtime], # Tru64 ++ [samba_cv_stat_hires=yes]) ++ ++if test x"$samba_cv_stat_hires" = x"yes" ; then ++ AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1, ++ [whether struct stat has sub-second timestamps]) ++fi ++ ++# recent FreeBSD, NetBSD have creation timestamps called birthtime: ++AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec]) ++AC_CHECK_MEMBERS([struct stat.st_birthtime], AC_CHECK_MEMBERS([struct stat.st_birthtimensec])) ++ ++ ++AC_CACHE_CHECK([whether there is DOS flags support in the stat struct], samba_cv_stat_dos_flags, ++ [ ++ AC_TRY_COMPILE( ++ [#include <sys/stat.h>], ++ [ ++ int a = UF_DOS_ARCHIVE; ++ int h = UF_DOS_HIDDEN; ++ int r = UF_DOS_RO; ++ int s = UF_DOS_SYSTEM; ++ int i = UF_DOS_NOINDEX; ++ int f = UF_DOS_FLAGS; ++ ], ++ samba_cv_stat_dos_flags=yes, samba_cv_stat_dos_flags=no) ++ ]) ++ ++if test x"$samba_cv_stat_dos_flags" = x"yes" ; then ++ AC_DEFINE(HAVE_STAT_DOS_FLAGS, 1, [whether there is DOS flags support in the stat struct]) ++fi ++ ++AC_CACHE_CHECK([whether we can compile with __attribute__((destructor))], ++ samba_cv_function_attribute_destructor, ++ [ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE( ++ [ ++ __attribute__((destructor)) ++ static void cleanup(void) { } ++ ])], ++ samba_cv_function_attribute_destructor=yes) ++ ]) ++ ++if test x"$samba_cv_function_attribute_destructor" = xyes ; then ++ AC_DEFINE(HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR, 1, ++ [whether we can compile with __attribute__((destructor))]) ++fi ++ ++##################################### ++# needed for SRV lookups ++AC_CHECK_LIB(resolv, dn_expand) ++AC_CHECK_LIB(resolv, _dn_expand) ++AC_CHECK_LIB(resolv, __dn_expand) ++AC_CHECK_LIB(inet, dn_expand) ++ ++# ++# Check for the functions putprpwnam, set_auth_parameters, ++# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity ++# Needed for OSF1 and HPUX. ++# ++ ++AC_LIBTESTFUNC(security, putprpwnam) ++AC_LIBTESTFUNC(sec, putprpwnam) ++ ++AC_LIBTESTFUNC(security, set_auth_parameters) ++AC_LIBTESTFUNC(sec, set_auth_parameters) ++ ++# UnixWare 7.x has its getspnam in -lgen ++AC_LIBTESTFUNC(gen, getspnam) ++ ++AC_LIBTESTFUNC(security, getspnam) ++AC_LIBTESTFUNC(sec, getspnam) ++ ++AC_LIBTESTFUNC(security, bigcrypt) ++AC_LIBTESTFUNC(sec, bigcrypt) ++ ++AC_LIBTESTFUNC(security, getprpwnam) ++AC_LIBTESTFUNC(sec, getprpwnam) ++ ++AC_CHECK_FUNCS(strsignal) ++ ++AC_DISABLE_STATIC ++AC_ENABLE_SHARED ++ ++# Set defaults ++PIE_CFLAGS="" ++PIE_LDFLAGS="" ++AC_ARG_ENABLE(pie, [AS_HELP_STRING([--enable-pie], [Turn on pie support if available (default=yes)])]) ++ ++if test "x$enable_pie" != xno ++then ++ AC_CACHE_CHECK(for -pie and -fPIE, samba_cv_fpie, ++ [ ++ cat > conftest.c <<EOF ++int foo; ++int main () { return 0;} ++EOF ++ if AC_TRY_COMMAND_NO_STDERR([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fPIE -o conftest conftest.c]) ++ then ++ samba_cv_fpie=yes ++ else ++ samba_cv_fpie=no ++ fi ++ rm -f conftest* ++ ]) ++ if test x"${samba_cv_fpie}" = x"yes" ++ then ++ PIE_CFLAGS="-fPIE" ++ PIE_LDFLAGS="-pie" ++ fi ++fi ++ ++# Set defaults ++RELRO_LDFLAGS="" ++AC_ARG_ENABLE(relro, [AS_HELP_STRING([--enable-relro], [Turn on Relocations Read-Only (relro) support if available (default=yes)])]) ++ ++if test "x$enable_relro" != xno ++then ++ AC_CACHE_CHECK([for -Wl,-z,relro], samba_cv_relro, ++ [ ++ cat > conftest.c <<EOF ++int foo; ++main () { return 0;} ++EOF ++ if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Wl,-z,relro -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]) ++ then ++ samba_cv_relro=yes ++ else ++ samba_cv_relro=no ++ fi ++ rm -f conftest* ++ ]) ++ if test x"${samba_cv_relro}" = x"yes" ++ then ++ RELRO_LDFLAGS="-Wl,-z,relro" ++ fi ++fi ++ ++# Set defaults ++SYMSEXT="syms" ++AC_SUBST(SYMSEXT) ++ ++# Assume non-shared by default and override below ++BLDSHARED="false" ++ ++# these are the defaults, good for lots of systems ++HOST_OS="$host_os" ++LDSHFLAGS="-shared" ++MODULE_EXPORTS="" ++SONAMEFLAG="#" ++SHLD="\${CC} \${CFLAGS}" ++PICFLAG="${PIE_CFLAGS}" ++SHLIBEXT="so" ++DSO_EXPORTS="" ++ ++# this bit needs to be modified for each OS that supports share libs ++# You need to specify how to create a shared library and ++ # how to compile C code to produce PIC object files ++ ++ AC_MSG_CHECKING([ability to build shared libraries]) ++ ++ # and these are for particular systems ++ case "$host_os" in ++ *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu | *qnx*) ++ case "$host_os" in ++ *linux*) AC_DEFINE(LINUX,1,[Whether the host os is linux]) ;; ++ *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx]) ;; ++ esac ++ BLDSHARED="true" ++ LDSHFLAGS="-shared -Wl,-Bsymbolic" ++ if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then ++ LDSHFLAGS_Z_NODEFS="-Wl,--allow-shlib-undefined" ++ fi ++ DYNEXP="-Wl,--export-dynamic" ++ PICFLAG="-fPIC" ++ SONAMEFLAG="-Wl,-soname=" ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ ;; ++ *solaris*) AC_DEFINE(SUNOS5,1,[Whether the host os is solaris]) ++ BLDSHARED="true" ++ if test "${GCC}" = "yes"; then ++ PICFLAG="-fPIC" ++ SONAMEFLAG="-Wl,-soname=" ++ if test "${ac_cv_prog_gnu_ld}" = "yes"; then ++ DYNEXP="-Wl,-E" ++ fi ++ LDSHFLAGS="-shared" ++ else ++ PICFLAG="-KPIC" ++ LDSHFLAGS="-G" ++ fi ++ if test "$ac_cv_prog_gnu_ld" = "yes"; then ++ SONAMEFLAG="-Wl,-soname=" ++ else ++ SONAMEFLAG="-Wl,-h," ++ fi ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block]) ++ ;; ++ *sunos*) AC_DEFINE(SUNOS4,1,[Whether the host os is sunos4]) ++ BLDSHARED="true" ++ LDSHFLAGS="-G" ++ SONAMEFLAG="-Wl,-h," ++ PICFLAG="-KPIC" # Is this correct for SunOS ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ ;; ++ *netbsd* | *freebsd* | *dragonfly* ) ++ BLDSHARED="true" ++ LDSHFLAGS="-shared" ++ DYNEXP="-Wl,--export-dynamic" ++ SONAMEFLAG="-Wl,-soname," ++ PICFLAG="-fPIC -DPIC" ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block]) ++ ;; ++ *openbsd*) BLDSHARED="true" ++ LDSHFLAGS="-shared" ++ DYNEXP="-Wl,-Bdynamic" ++ SONAMEFLAG="-Wl,-soname," ++ PICFLAG="-fPIC" ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block]) ++ ;; ++ *irix*) BLDSHARED="true" ++ LDSHFLAGS="-Wl,-set_version,sgi1.0 -shared" ++ SONAMEFLAG="-Wl,-soname," ++ if test "${GCC}" = "yes"; then ++ PICFLAG="-fPIC" ++ else ++ PICFLAG="-KPIC" ++ fi ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block]) ++ ;; ++ *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix]) ++ BLDSHARED="true" ++ # use expfull to export underscored symbols ++ # add rtl to remove /lib/crt0.o warning ++ LDSHFLAGS="-Wl,-G,-bexpfull,-bbigtoc,-brtl" ++ DYNEXP="-Wl,-brtl,-bexpfull,-bbigtoc" ++ PICFLAG="-O2" ++ # as AIX code is always position independent... ++ # .po will just create compile warnings, use po.o: ++ if test "${GCC}" != "yes"; then ++ ## for funky AIX compiler using strncpy() ++ CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 -qhalt=e" ++ fi ++ ++ AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE,[The size of a block]) ++ AC_DEFINE(BROKEN_STRNLEN,1,[Does strnlen work correctly]) ++ AC_DEFINE(BROKEN_STRNDUP,1,[Does strndup work correctly]) ++ ;; ++ *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX]) ++ # ia64: 64bit build using gcc with CFLAGS="-mpl64" ++ # 64bit build using HP's cc with CFLAGS="+DD64" ++ # hppa: 64bit build unsupported by gcc ++ # 64bit build using HP's cc with CFLAGS="+DA2.0w" ++ # HP-UX 11.00 ld needs PHSS_33034 ++ BLDSHARED="true" ++ if test "${GCC}" = "yes"; then ++ PICFLAG="-fPIC" ++ LDSHFLAGS="-shared" ++ else ++ PICFLAG="+z" ++ LDSHFLAGS="-b" ++ # "Uses depth-first symbol resolution" ++ LDSHFLAGS="$LDSHFLAGS -Wl,-B,symbolic,-b" ++ if test "$host_cpu" != "ia64"; then ++ # "don't store literals in read-only memory" (?): ++ PICFLAG="$PICFLAG +ESnolit" ++ fi ++ fi ++ if test "$host_cpu" = "ia64"; then ++ SHLIBEXT="so" ++ # TODO: does the linker find the right 32/64 bit version of the libs? : ++ DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32:/usr/local/lib/hpux64:/usr/lib/hpux64" ++ else ++ SHLIBEXT="sl" ++ DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib" ++ fi ++ if test "$ac_cv_prog_gnu_ld" = "yes"; then ++ SONAMEFLAG="-Wl,-soname=" ++ else ++ SONAMEFLAG="-Wl,+h," ++ fi ++ # PIE/PIC flags at link time are required on HP-UX because ++ # linking requires a temporary source file, which is being ++ # compiled with the indicated flags - which need to contain ++ # PIC flags when we don't support PIE flags: ++ if test "$PIE_LDFLAGS" = "" ; then ++ PIE_LDFLAGS=\${PICFLAG} ++ fi ++ AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block]) ++ AC_DEFINE(POSIX_ACL_NEEDS_MASK,1,[Does a POSIX ACL need a mask element]) ++ ;; ++ *osf*) AC_DEFINE(OSF1,1,[Whether the host os is osf1]) ++ BLDSHARED="true" ++ LDSHFLAGS="-shared" ++ SONAMEFLAG="-Wl,-soname," ++ if test "${GCC}" = "yes"; then ++ PICFLAG="-fPIC" ++ fi ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ for flags in "-expect_unresolved '*'" "-Wl,-expect_unresolved,'*'" ; do ++ saved_ldflags="$LDFLAGS" ++ AC_MSG_CHECKING([if $flags works]) ++ LDFLAGS="$flags $saved_ldflags" ++ AC_TRY_LINK([],[], ++ [AC_MSG_RESULT([yes]) ++ LDSHFLAGS_Z_NODEFS=$flags], ++ AC_MSG_RESULT([no])) ++ LDFLAGS="$saved_ldflags" ++ test x"$LDSHFLAGS_Z_NODEFS" != x && break ++ done ++ ;; ++ *sco*) AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ ;; ++ *unixware*) BLDSHARED="true" ++ LDSHFLAGS="-shared" ++ SONAMEFLAG="-Wl,-soname," ++ PICFLAG="-KPIC" ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ ;; ++ *next2*) AC_DEFINE(NEXT2,1,[Whether the host os is NeXT v2]) ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ ;; ++ *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man]) ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ ;; ++ *sysv4*) AC_DEFINE(SYSV,1,[Whether this is a system V system]) ++ case "$host" in ++ *-univel-*) if [ test "$GCC" != yes ]; then ++ AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available]) ++ fi ++ LDSHFLAGS="-G" ++ DYNEXP="-Bexport" ++ ;; ++ *mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX,1,[Whether the host os is reliantunix]);; ++ esac ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ ;; ++ ++ *sysv5*) AC_DEFINE(SYSV,1,[Whether this is a system V system]) ++ if [ test "$GCC" != yes ]; then ++ AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available]) ++ fi ++ LDSHFLAGS="-G" ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ ;; ++ *vos*) AC_DEFINE(STAT_ST_BLOCKSIZE,4096) ++ BLDSHARED="false" ++ LDSHFLAGS="" ++ ;; ++ ++ *darwin*) AC_DEFINE(DARWINOS,1,[Whether the host os is Darwin/MacOSX]) ++ BLDSHARED="true" ++ LDSHFLAGS="-dynamiclib -flat_namespace -undefined suppress" ++ CFLAGS="$CFLAGS -fno-common" ++ SHLD="\${CC}" ++ SHLIBEXT="dylib" ++ MODULE_EXPORTS="-exported_symbols_list \$(srcdir)/exports/modules-darwin.syms" ++ SHLIBEXT="dylib" ++ # Since gcc doesn't fail on unrecognised options, the ++ # PIE test incorrectly succeeds. Darwin gcc does not ++ # actually support the PIE stuff. ++ PIE_LDFLAGS= ++ PIE_CFLAGS= ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ ;; ++ ++ *) ++ AC_DEFINE(STAT_ST_BLOCKSIZE,512) ++ ;; ++ esac ++ ++if test "$enable_shared" != "yes"; then ++ BLDSHARED=false ++fi ++ ++if test "$enable_shared" = yes -a "${ac_cv_gnu_ld_version_script}" = yes; then ++ DSO_EXPORTS=\$\(DSO_EXPORTS_CMD\) ++fi ++ ++if test x"$BLDSHARED" = x"true" ; then ++ LDFLAGS="$LDFLAGS -L./bin" ++fi ++ ++AC_MSG_RESULT($BLDSHARED) ++ ++if test x"$enable_developer" = x"yes" ; then ++ default_as_needed=auto ++else ++ default_as_needed=no ++fi ++AC_ARG_ENABLE(as-needed, ++ AS_HELP_STRING([--enable-as-needed], ++ [Turn on as-needed support if available (default=no)]), ++ [enable_as_needed=$enableval], ++ [enable_as_needed=$default_as_needed]) ++if test "x$enable_as_needed" != xno; then ++ saved_before_as_needed_ldflags="$LDFLAGS" ++ for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do ++ saved_ldflags="$LDFLAGS" ++ AC_MSG_CHECKING([if $flags works]) ++ LDFLAGS="$flags $saved_ldflags" ++ AC_TRY_LINK([],[], ++ [AC_MSG_RESULT([yes]) ++ LD_AS_NEEDED_FLAG=$flags ++ ld_as_needed_flag_found=yes], ++ AC_MSG_RESULT([no])) ++ LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags" ++ test x"$ld_as_needed_flag_found" = xyes && break ++ done ++fi ++ ++if test x$ld_as_needed_flag_found = xyes -a x$enable_as_needed = xauto ; then ++# check if ld has bug described in https://bugzilla.samba.org/show_bug.cgi?id=7209#c17 ++ AC_MSG_CHECKING([if $LD_AS_NEEDED_FLAG has explicit external libs bug]) ++cat > conftest_shb.c <<END ++void b() {} ++END ++cat > conftest_sha.c <<END ++extern void b(); ++void a() { ++ b(); ++} ++END ++cat > conftest.c <<END ++extern void a(); ++int main() { ++ a(); ++ return 0; ++} ++END ++ ++ rm -fr conftest ++ AC_TRY_COMMAND([$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o conftest_sha.o conftest_sha.c 1>&AS_MESSAGE_LOG_FD 2>&1]) ++ AC_TRY_COMMAND([$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o conftest_shb.o conftest_shb.c 1>&AS_MESSAGE_LOG_FD 2>&1]) ++ TESTCMD="`eval echo \"$SHLD $LDSHFLAGS $PICFLAG\"`" ++ AC_TRY_COMMAND([$TESTCMD -o libconftest_shb.$SHLIBEXT conftest_shb.o 1>&AS_MESSAGE_LOG_FD 2>&1]) ++ AC_TRY_COMMAND([$TESTCMD -o libconftest_sha.$SHLIBEXT conftest_sha.o 1>&AS_MESSAGE_LOG_FD 2>&1]) ++ AC_TRY_COMMAND([$CC -o conftest conftest.c $LDFLAGS -L. -lconftest_sha -lconftest_shb 1>&AS_MESSAGE_LOG_FD 2>&1]) ++ if AC_TRY_COMMAND([eval "$LIB_PATH_VAR=. ./conftest 1>&AS_MESSAGE_LOG_FD 2>&1"]) ++ then ++ AC_MSG_RESULT([no]) ++ else ++ ld_as_needed_flag_found=no ++ LDFLAGS="$saved_before_as_needed_ldflags" ++ AC_MSG_RESULT([yes]) ++ fi ++ rm conftest* libconftest* ++fi ++ ++# check if we have to disable LD_AS_NEEDED_FLAG: ++# On some systems for a veriety of reasons linking with ++# -Wl,--as-needed -lreadline -lncurses fails ++# we have to retest, if these combination is detected before. ++# Bugzilla #7209 ++ ++if test x$ac_cv_lib_readline_rl_callback_handler_install = xyes ; then ++ if test x$ld_as_needed_flag_found = xyes ; then ++ AC_MSG_CHECKING([if $LD_AS_NEEDED_FLAG works with readline]) ++ # try if check no fails ++ save_LIBS=$LIBS ++ LIBS="$LIBS $TERMLIBS" ++ AC_TRY_LINK([], [rl_callback_handler_install();], [AC_MSG_RESULT([yes])],[ AC_MSG_RESULT([no]); LDFLAGS="$saved_before_as_needed_ldflags"]) ++ LIBS="$save_LIBS" ++ fi ++fi ++ ++ ++ ++# for historical reasons almost all linkers don't complain about unresolved ++# symbols in shared libs. Except for the internal samba modules we want to get ++# errors when we produce a shared lib with unresolved symbols. On some ++# platforms unresolved symbols might be intended, so we might have to add ++# platform specific exceptions here. ++ ++for flags in "-Wl,-z,defs" "-error_unresolved" "-Wl,-error_unresolved" ; do ++ saved_ldflags="$LDFLAGS" ++ AC_MSG_CHECKING([if $flags works]) ++ LDFLAGS="$flags $saved_ldflags" ++ AC_TRY_LINK([],[], ++ [AC_MSG_RESULT([yes]) ++ LDSHFLAGS_Z_DEFS=$flags ++ ldshflags_z_defs_found=yes], ++ AC_MSG_RESULT([no])) ++ LDFLAGS=$saved_ldflags ++ test x"$ldshflags_z_defs_found" = xyes && break ++done ++ ++AC_MSG_CHECKING([LDSHFLAGS_Z_DEFS]) ++AC_MSG_RESULT([$LDSHFLAGS_Z_DEFS]) ++AC_MSG_CHECKING([LDFLAGS]) ++AC_MSG_RESULT([$LDFLAGS]) ++AC_MSG_CHECKING([DYNEXP]) ++AC_MSG_RESULT([$DYNEXP]) ++ ++####################################################### ++# test whether building a shared library actually works ++if test $BLDSHARED = true; then ++ ++AC_MSG_CHECKING([SHLD]) ++AC_MSG_RESULT([$SHLD]) ++AC_MSG_CHECKING([LDSHFLAGS]) ++AC_MSG_RESULT([$LDSHFLAGS]) ++ ++AC_MSG_CHECKING([SHLIBEXT]) ++AC_MSG_RESULT([$SHLIBEXT]) ++AC_MSG_CHECKING([SONAMEFLAG]) ++AC_MSG_RESULT([$SONAMEFLAG]) ++ ++AC_MSG_CHECKING([PICFLAG]) ++AC_MSG_RESULT([$PICFLAG]) ++ ++AC_MSG_CHECKING([NSSSONAMEVERSIONSUFFIX]) ++AC_MSG_RESULT([$NSSSONAMEVERSIONSUFFIX]) ++ ++AC_CACHE_CHECK([whether building shared libraries actually works], ++ [ac_cv_shlib_works],[ ++ # try building a trivial shared library ++ ac_cv_shlib_works=no ++ # The $SHLD and $LDSHFLAGS variables may contain references to other ++ # variables so they need to be eval'ed. ++ if AC_TRY_COMMAND([$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.o ${srcdir-.}/../tests/shlib.c 1>&AS_MESSAGE_LOG_FD]) ++ then ++ TESTCMD="`eval echo \"$SHLD $LDSHFLAGS $PICFLAG\"`" ++ TESTCMD="$TESTCMD -o \"shlib.$SHLIBEXT\" shlib.o" ++ if AC_TRY_COMMAND([eval $TESTCMD 1>&AS_MESSAGE_LOG_FD 2>&1]) ++ then ++ ac_cv_shlib_works=yes ++ fi ++ fi ++ rm -f "shlib.$SHLIBEXT" shlib.o ++ ++]) ++if test $ac_cv_shlib_works = no; then ++ BLDSHARED=false ++fi ++fi ++ ++if test x"$BLDSHARED" != x"true"; then ++ LDSHFLAGS="shared-libraries-disabled" ++ SONAMEFLAG="shared-libraries-disabled" ++ NSSSONAMEVERSIONSUFFIX="shared-libraries-disabled" ++ SHLD="shared-libraries-disabled" ++ PICFLAG="${PIE_CFLAGS}" ++ SHLIBEXT="shared_libraries_disabled" ++ smbtorture_possible=no ++fi ++ ++AC_MSG_CHECKING([used PICFLAG]) ++AC_MSG_RESULT([$PICFLAG]) ++ ++AC_DEFINE_UNQUOTED(SHLIBEXT, "$SHLIBEXT", [Shared library extension]) ++ ++ ++ ++########################################################### ++# ++# Configuration of subsystems / libraries ++# ++########################################################### ++ ++INSTALLLIBCMD_SH=: ++INSTALLLIBCMD_A=: ++UNINSTALLLIBCMD_SH=: ++UNINSTALLLIBCMD_A=: ++ ++if test $BLDSHARED = true; then ++ INSTALLLIBCMD_SH="\$(INSTALLCMD)" ++ UNINSTALLLIBCMD_SH="rm -f" ++fi ++if test $enable_static = yes; then ++ INSTALLLIBCMD_A="\$(INSTALLCMD)" ++ UNINSTALLLIBCMD_A="rm -f" ++fi ++ ++################################################# ++# --disable-shared-libs ++# can be used to disable the internal use of shared libs altogether ++# (this only has an effect when building shared libs is enabled) ++# ++USESHARED=false ++AC_SUBST(USESHARED) ++ ++AC_MSG_CHECKING(whether to use shared libraries internally) ++AC_ARG_ENABLE([shared-libs], ++ AS_HELP_STRING([--enable-shared-libs], ++ [Use shared libraries internally (default=yes)]), ++ [enable_shared_libs=$enableval], ++ [enable_shared_libs=yes]) ++ ++if test x"$enable_shared_libs" != x"no" ; then ++ USESHARED=$BLDSHARED ++fi ++ ++AC_MSG_RESULT([$USESHARED]) ++ ++if test x"$enable_shared_libs" = x"yes" -a x"$BLDSHARED" != x"true" ; then ++ AC_MSG_WARN([--enable-shared-libs: no support for shared libraries]) ++fi ++ ++################################################# ++# --with-static-libs=LIBS: ++# link (internal) libs dynamically or statically? ++# ++# If a subsystem is built as a library then this controls whether they are ++# linked into Samba targets statically or dynamically: ++# ++# * If we build the shared library at all, we link dynamically by default. ++# ++# * We only link statically if we don't build shared or if the library ++# appears in the --with-static-libs configure option. ++# ++# Example: ++# --with-static-libs=libtalloc makes use of libtalloc.a instead ++# of linking the dynamic variant with -ltalloc. ++# ++# NOTE: This option only affects libraries that we do not only build ++# but that samba also links against as libraries (as opposed to linking ++# the plain object files. - This has to be configured in Makefile.in. ++# So in particular it does not harm to give invalid or unknown names here. ++# ++ ++AC_ARG_WITH([static-libs], ++ [AS_HELP_STRING([--with-static-libs=LIBS], ++ [Comma-separated list of names of (internal) libraries to link statically (instead of dynamically)])], ++ [AS_IF([test $withval], ++ [for lib in `echo $withval | sed -e 's/,/ /g'` ; do ++ [lib=`echo $lib | tr '[a-z]' '[A-Z]'`] ++ eval LINK_$lib=STATIC ++ done], [])], ++ []) ++ ++# ++# WORKAROUND: ++# until we have organized other internal subsystems (as util, registry ++# and smbconf) into shared libraries, we CAN NOT link libnetapi ++# dynamically to samba programs. ++# ++LINK_LIBNETAPI=STATIC ++ ++LINK_LIBSMBCLIENT=STATIC ++ ++# ++# The library versions are hardcoded here ++# and filled into the LIBFOO_SOVER variable. ++# ++# TODO: for talloc and tdb (at least), these should ++# be extracted from their respective source directories ++# ++AC_ARG_ENABLE(external_libtalloc, ++ [AS_HELP_STRING([--enable-external-libtalloc], ++ [Enable external talloc [default=auto]])], ++ [ enable_external_libtalloc=$enableval ], ++ [ enable_external_libtalloc=auto ]) ++ ++if test "x$enable_external_libtalloc" != xno ++then ++ PKG_CHECK_MODULES(LIBTALLOC, talloc >= 2.0.1, ++ [ enable_external_libtalloc=yes ], ++ [ if test x$enable_external_libtalloc = xyes; then ++ AC_MSG_ERROR([Unable to find libtalloc]) ++ else ++ enable_external_libtalloc=no ++ fi ++ ]) ++fi ++ ++if test "x$enable_external_libtalloc" = xno ++then ++ m4_include(../lib/talloc/libtalloc.m4) ++ LINK_LIBTALLOC=STATIC ++ LIBTALLOCVERSION=`grep ^VERSION ${tallocdir}/wscript | sed -e "s/'//g" -e 's/.* //'` ++ SMB_LIBRARY(talloc, 2, ${LIBTALLOCVERSION}) ++ LIBTALLOC_OBJ0="" ++ for obj in ${TALLOC_OBJ}; do ++ LIBTALLOC_OBJ0="${LIBTALLOC_OBJ0} ${tallocdir}/${obj}" ++ done ++ SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}" ++ SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CONFIGURE_CPPFLAGS} ${TALLOC_CFLAGS}" ++ AC_SUBST(LIBTALLOC_OBJ0) ++ ++ TALLOCTORT="bin/talloctort" ++ AC_SUBST(TALLOCTORT) ++fi ++ ++ ++AC_ARG_ENABLE(external_libtdb, ++ [AS_HELP_STRING([--enable-external-libtdb], ++ [Enable external tdb [default=auto]])], ++ [ enable_external_libtdb=$enableval ], ++ [ enable_external_libtdb=auto ]) ++ ++if test "x$enable_external_libtdb" != xno ++then ++ PKG_CHECK_MODULES(LIBTDB, tdb >= 1.2.6, ++ [ enable_external_libtdb=yes ], ++ [ ++ if test x$enable_external_libtdb = xyes; then ++ AC_MSG_ERROR([Unable to find libtdb]) ++ else ++ enable_external_libtdb=no ++ fi ++ ]) ++fi ++ ++AC_SUBST(LIBTDB_OBJ0) ++if test "x$enable_external_libtdb" = xno ++then ++ m4_include(../lib/tdb/libtdb.m4) ++ LINK_LIBTDB=STATIC ++ LIBTDBVERSION=`grep ^VERSION ${tdbdir}/wscript | sed -e "s/'//g" -e 's/.* //'` ++ SMB_LIBRARY(tdb, 1, ${LIBTDBVERSION}) ++ LIBTDB_OBJ0="" ++ LIBTDB_LIBS="$LIBTDB_LIBS $TDB_DEPS" ++ for obj in ${TDB_OBJ}; do ++ LIBTDB_OBJ0="${LIBTDB_OBJ0} ${tdbdir}/${obj}" ++ done ++ AC_SUBST(LIBTDB_OBJ0) ++ SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}" ++ SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CONFIGURE_CPPFLAGS} ${TDB_CFLAGS}" ++ ++ TDBBACKUP="bin/tdbbackup" ++ AC_SUBST(TDBBACKUP) ++ TDBDUMP="bin/tdbdump" ++ AC_SUBST(TDBDUMP) ++ TDBRESTORE="bin/tdbrestore" ++ AC_SUBST(TDBRESTORE) ++ TDBTOOL="bin/tdbtool" ++ AC_SUBST(TDBTOOL) ++ TDBTORTURE="bin/tdbtorture" ++ AC_SUBST(TDBTORTURE) ++fi ++ ++AC_ARG_ENABLE(external_libntdb, ++ [AS_HELP_STRING([--enable-external-libntdb], ++ [Enable external ntdb [default=auto]])], ++ [ enable_external_libntdb=$enableval ], ++ [ enable_external_libntdb=auto ]) ++ ++if test "x$enable_external_libntdb" != xno ++then ++ PKG_CHECK_MODULES(LIBNTDB, ntdb >= 1.0, ++ [ enable_external_libntdb=yes ], ++ [ ++ if test x$enable_external_libntdb = xyes; then ++ AC_MSG_ERROR([Unable to find libntdb]) ++ else ++ enable_external_libntdb=no ++ fi ++ ]) ++fi ++ ++AC_SUBST(LIBNTDB_OBJ0) ++if test "x$enable_external_libntdb" = xno ++then ++ m4_include(../lib/ntdb/libntdb.m4) ++ LINK_LIBNTDB=STATIC ++ LIBNTDBVERSION=`grep ^VERSION ${ntdbdir}/wscript | sed -e "s/'//g" -e 's/.* //'` ++ SMB_LIBRARY(ntdb, 1, ${LIBNTDBVERSION}) ++ LIBNTDB_OBJ0="" ++ LIBNTDB_LIBS="$LIBNTDB_LIBS $NTDB_DEPS" ++ for obj in ${NTDB_OBJ}; do ++ LIBNTDB_OBJ0="${LIBNTDB_OBJ0} ${ntdbdir}/${obj}" ++ done ++ AC_SUBST(LIBNTDB_OBJ0) ++ SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${NTDB_CFLAGS}" ++ SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CONFIGURE_CPPFLAGS} ${NTDB_CFLAGS}" ++ ++ NTDBBACKUP="bin/ntdbbackup" ++ AC_SUBST(NTDBBACKUP) ++ NTDBDUMP="bin/ntdbdump" ++ AC_SUBST(NTDBDUMP) ++ NTDBRESTORE="bin/ntdbrestore" ++ AC_SUBST(NTDBRESTORE) ++ NTDBTOOL="bin/ntdbtool" ++ AC_SUBST(NTDBTOOL) ++ NTDBTORTURE="bin/ntdbtorture" ++ AC_SUBST(NTDBTORTURE) ++fi ++ ++SMB_LIBRARY(netapi, 0) ++SMB_LIBRARY(smbclient, 0) ++SMB_LIBRARY(smbsharemodes, 0) ++ ++ ++################ ++ ++AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[ ++AC_TRY_RUN([#include <stdio.h> ++main() { long long x = 1000000; x *= x; return(((x/1000000) == 1000000)? 0: 1); }], ++samba_cv_have_longlong=yes,samba_cv_have_longlong=no,samba_cv_have_longlong=cross)]) ++if test x"$samba_cv_have_longlong" = x"yes"; then ++ AC_DEFINE(HAVE_LONGLONG,1,[Whether the host supports long long's]) ++ AC_CHECK_TYPE(intptr_t, unsigned long long) ++else ++ AC_CHECK_TYPE(intptr_t, unsigned long) ++fi ++ ++# ++# Check if the compiler supports the LL prefix on long long integers. ++# AIX needs this. ++ ++AC_CACHE_CHECK([for LL suffix on long long integers],samba_cv_compiler_supports_ll, [ ++ AC_TRY_COMPILE([#include <stdio.h>],[long long i = 0x8000000000LL], ++ samba_cv_compiler_supports_ll=yes,samba_cv_compiler_supports_ll=no)]) ++if test x"$samba_cv_compiler_supports_ll" = x"yes"; then ++ AC_DEFINE(COMPILER_SUPPORTS_LL,1,[Whether the compiler supports the LL prefix on long long integers]) ++fi ++ ++ ++AC_CACHE_CHECK([for 64 bit time_t],samba_cv_SIZEOF_TIME_T,[ ++AC_TRY_RUN([#include <time.h> ++main() { return((sizeof(time_t) == 8) ? 0 : 1); }], ++samba_cv_SIZEOF_TIME_T=yes,samba_cv_SIZEOF_TIME_T=no,samba_cv_SIZEOF_TIME_T=cross)]) ++if test x"$samba_cv_SIZEOF_TIME_T" = x"yes"; then ++ AC_DEFINE(SIZEOF_TIME_T,8,[The size of the 'time_t' type]) ++fi ++ ++AC_CACHE_CHECK([for TIME_T_MAX],samba_cv_TIME_T_MAX,[ ++AC_TRY_RUN([#include <time.h> ++main() { ++ struct tm *tm; ++ if (sizeof(time_t) == 8) { ++ time_t max_time = 0x7fffffffffffffffll; ++ tm = gmtime(&max_time); ++ /* This should fail with 32-bit tm_year. */ ++ if (tm == NULL) { ++ /* Max time_t that works with 32-bit int tm_year in struct tm. */ ++ max_time = 67768036191676799ll; ++ tm = gmtime(&max_time); ++ if (tm) { ++ return(0); ++ } ++ } ++ } ++ return(1); ++}], ++samba_cv_TIME_T_MAX=yes,samba_cv_TIME_T_MAX=no,samba_cv_TIME_T_MAX=cross)]) ++if test x"$samba_cv_TIME_T_MAX" = x"yes"; then ++ AC_DEFINE(TIME_T_MAX,67768036191676799ll,[The maximum value of the 'time_t' type]) ++fi ++ ++ ++# ++# As a gating factor for large file support, in order to ++# use >4GB files we must have the following minimal support ++# available: a 64 bit off_t ++# If we don't have all of these then fail the build ++# ++ ++AC_MSG_CHECKING([if large file support can be enabled]) ++AC_CACHE_CHECK([for 64 bit off_t],samba_cv_SIZEOF_OFF_T,[ ++AC_TRY_RUN([#include <stdio.h> ++#include <sys/stat.h> ++main() { return((sizeof(off_t) == 8) ? 0 : 1); }], ++samba_cv_SIZEOF_OFF_T=yes,samba_cv_SIZEOF_OFF_T=no,samba_cv_SIZEOF_OFF_T=cross)]) ++if test x"$samba_cv_SIZEOF_OFF_T" = x"no"; then ++ AC_MSG_ERROR(["large file support support not available: sizeof(off_t) != 8"]) ++fi ++ ++AC_CACHE_CHECK([for 64 bit ino_t],samba_cv_SIZEOF_INO_T,[ ++AC_TRY_RUN([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <stdio.h> ++#include <sys/stat.h> ++main() { return((sizeof(ino_t) == 8) ? 0 : 1); }], ++samba_cv_SIZEOF_INO_T=yes,samba_cv_SIZEOF_INO_T=no,samba_cv_SIZEOF_INO_T=cross)]) ++if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then ++ AC_DEFINE(SIZEOF_INO_T,8,[The size of the 'ino_t' type]) ++fi ++ ++AC_CACHE_CHECK([for 64 bit dev_t],samba_cv_SIZEOF_DEV_T,[ ++AC_TRY_RUN([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <stdio.h> ++#include <sys/stat.h> ++main() { return((sizeof(dev_t) == 8) ? 0 : 1); }], ++samba_cv_SIZEOF_DEV_T=yes,samba_cv_SIZEOF_DEV_T=no,samba_cv_SIZEOF_DEV_T=cross)]) ++if test x"$samba_cv_SIZEOF_DEV_T" = x"yes"; then ++ AC_DEFINE(SIZEOF_DEV_T,8,[The size of the 'dev_t' type]) ++fi ++ ++AC_CACHE_CHECK([for major macro],samba_cv_HAVE_DEVICE_MAJOR_FN,[ ++AC_TRY_RUN([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <sys/types.h> ++main() { dev_t dev; int i = major(dev); return 0; }], ++samba_cv_HAVE_DEVICE_MAJOR_FN=yes,samba_cv_HAVE_DEVICE_MAJOR_FN=no,samba_cv_HAVE_DEVICE_MAJOR_FN=cross)]) ++if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then ++ AC_DEFINE(HAVE_DEVICE_MAJOR_FN,1,[Whether the major macro for dev_t is available]) ++fi ++ ++AC_CACHE_CHECK([for minor macro],samba_cv_HAVE_DEVICE_MINOR_FN,[ ++AC_TRY_RUN([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <sys/types.h> ++main() { dev_t dev; int i = minor(dev); return 0; }], ++samba_cv_HAVE_DEVICE_MINOR_FN=yes,samba_cv_HAVE_DEVICE_MINOR_FN=no,samba_cv_HAVE_DEVICE_MINOR_FN=cross)]) ++if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then ++ AC_DEFINE(HAVE_DEVICE_MINOR_FN,1,[Whether the minor macro for dev_t is available]) ++fi ++ ++AC_CACHE_CHECK([for makedev macro],samba_cv_HAVE_MAKEDEV,[ ++AC_TRY_RUN([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <sys/types.h> ++main() { dev_t dev = makedev(1,2); return 0; }], ++samba_cv_HAVE_MAKEDEV=yes,samba_cv_HAVE_MAKEDEV=no,samba_cv_HAVE_MAKEDEV=cross)]) ++if test x"$samba_cv_HAVE_MAKEDEV" = x"yes"; then ++ AC_DEFINE(HAVE_MAKEDEV,1,[Whether the macro for makedev is available]) ++fi ++ ++AC_CACHE_CHECK([whether seekdir returns void],samba_cv_SEEKDIR_RETURNS_VOID,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <dirent.h> ++void seekdir(DIR *d, long loc) { return; }],[return 0;], ++samba_cv_SEEKDIR_RETURNS_VOID=yes,samba_cv_SEEKDIR_RETURNS_VOID=no)]) ++if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then ++ AC_DEFINE(SEEKDIR_RETURNS_VOID,1,[Whether seekdir returns void]) ++fi ++ ++AC_CACHE_CHECK([for __FUNCTION__ macro],samba_cv_HAVE_FUNCTION_MACRO,[ ++AC_TRY_COMPILE([#include <stdio.h>], [printf("%s\n", __FUNCTION__);], ++samba_cv_HAVE_FUNCTION_MACRO=yes,samba_cv_HAVE_FUNCTION_MACRO=no)]) ++if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then ++ AC_DEFINE(HAVE_FUNCTION_MACRO,1,[Whether there is a __FUNCTION__ macro]) ++fi ++ ++if test x"$libreplace_cv_HAVE_CLOCK_GETTIME_IN_LIBRT" = xyes ; then ++ LIBS="$LIBS -lrt" ++fi ++ ++AC_CACHE_CHECK([for broken readdir name],samba_cv_HAVE_BROKEN_READDIR_NAME,[ ++AC_TRY_RUN([#include <sys/types.h> ++#include <dirent.h> ++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) return(0); return(1);} ], ++samba_cv_HAVE_BROKEN_READDIR_NAME=yes,samba_cv_HAVE_BROKEN_READDIR_NAME=no,samba_cv_HAVE_BROKEN_READDIR_NAME=cross)]) ++if test x"$samba_cv_HAVE_BROKEN_READDIR_NAME" = x"yes"; then ++ AC_DEFINE(HAVE_BROKEN_READDIR_NAME,1,[Whether readdir() returns the wrong name offset]) ++fi ++ ++AC_CACHE_CHECK([for utimbuf],samba_cv_HAVE_UTIMBUF,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utime.h>], ++[struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; return(utime("foo.c",&tbuf));], ++samba_cv_HAVE_UTIMBUF=yes,samba_cv_HAVE_UTIMBUF=no,samba_cv_HAVE_UTIMBUF=cross)]) ++if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then ++ AC_DEFINE(HAVE_UTIMBUF,1,[Whether struct utimbuf is available]) ++fi ++ ++############## ++# Check utmp details, but only if our OS offers utmp.h ++if test x"$ac_cv_header_utmp_h" = x"yes"; then ++dnl utmp and utmpx come in many flavours ++dnl We need to check for many of them ++dnl But we don't need to do each and every one, because our code uses ++dnl mostly just the utmp (not utmpx) fields. ++ ++AC_CHECK_FUNCS(pututline pututxline updwtmp updwtmpx getutmpx getutxent) ++ ++AC_CACHE_CHECK([for ut_name in utmp],samba_cv_HAVE_UT_UT_NAME,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmp.h>], ++[struct utmp ut; ut.ut_name[0] = 'a';], ++samba_cv_HAVE_UT_UT_NAME=yes,samba_cv_HAVE_UT_UT_NAME=no,samba_cv_HAVE_UT_UT_NAME=cross)]) ++if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then ++ AC_DEFINE(HAVE_UT_UT_NAME,1,[Whether the utmp struct has a property ut_name]) ++fi ++ ++AC_CACHE_CHECK([for ut_user in utmp],samba_cv_HAVE_UT_UT_USER,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmp.h>], ++[struct utmp ut; ut.ut_user[0] = 'a';], ++samba_cv_HAVE_UT_UT_USER=yes,samba_cv_HAVE_UT_UT_USER=no,samba_cv_HAVE_UT_UT_USER=cross)]) ++if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then ++ AC_DEFINE(HAVE_UT_UT_USER,1,[Whether the utmp struct has a property ut_user]) ++fi ++ ++AC_CACHE_CHECK([for ut_id in utmp],samba_cv_HAVE_UT_UT_ID,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmp.h>], ++[struct utmp ut; ut.ut_id[0] = 'a';], ++samba_cv_HAVE_UT_UT_ID=yes,samba_cv_HAVE_UT_UT_ID=no,samba_cv_HAVE_UT_UT_ID=cross)]) ++if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then ++ AC_DEFINE(HAVE_UT_UT_ID,1,[Whether the utmp struct has a property ut_id]) ++fi ++ ++AC_CACHE_CHECK([for ut_host in utmp],samba_cv_HAVE_UT_UT_HOST,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmp.h>], ++[struct utmp ut; ut.ut_host[0] = 'a';], ++samba_cv_HAVE_UT_UT_HOST=yes,samba_cv_HAVE_UT_UT_HOST=no,samba_cv_HAVE_UT_UT_HOST=cross)]) ++if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then ++ AC_DEFINE(HAVE_UT_UT_HOST,1,[Whether the utmp struct has a property ut_host]) ++fi ++ ++AC_CACHE_CHECK([for ut_time in utmp],samba_cv_HAVE_UT_UT_TIME,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmp.h>], ++[struct utmp ut; time_t t; ut.ut_time = t;], ++samba_cv_HAVE_UT_UT_TIME=yes,samba_cv_HAVE_UT_UT_TIME=no,samba_cv_HAVE_UT_UT_TIME=cross)]) ++if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then ++ AC_DEFINE(HAVE_UT_UT_TIME,1,[Whether the utmp struct has a property ut_time]) ++fi ++ ++AC_CACHE_CHECK([for ut_tv in utmp],samba_cv_HAVE_UT_UT_TV,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmp.h>], ++[struct utmp ut; struct timeval tv; ut.ut_tv = tv;], ++samba_cv_HAVE_UT_UT_TV=yes,samba_cv_HAVE_UT_UT_TV=no,samba_cv_HAVE_UT_UT_TV=cross)]) ++if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then ++ AC_DEFINE(HAVE_UT_UT_TV,1,[Whether the utmp struct has a property ut_tv]) ++fi ++ ++AC_CACHE_CHECK([for ut_type in utmp],samba_cv_HAVE_UT_UT_TYPE,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmp.h>], ++[struct utmp ut; ut.ut_type = 0;], ++samba_cv_HAVE_UT_UT_TYPE=yes,samba_cv_HAVE_UT_UT_TYPE=no,samba_cv_HAVE_UT_UT_TYPE=cross)]) ++if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then ++ AC_DEFINE(HAVE_UT_UT_TYPE,1,[Whether the utmp struct has a property ut_type]) ++fi ++ ++AC_CACHE_CHECK([for ut_pid in utmp],samba_cv_HAVE_UT_UT_PID,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmp.h>], ++[struct utmp ut; ut.ut_pid = 0;], ++samba_cv_HAVE_UT_UT_PID=yes,samba_cv_HAVE_UT_UT_PID=no,samba_cv_HAVE_UT_UT_PID=cross)]) ++if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then ++ AC_DEFINE(HAVE_UT_UT_PID,1,[Whether the utmp struct has a property ut_pid]) ++fi ++ ++AC_CACHE_CHECK([for ut_exit in utmp],samba_cv_HAVE_UT_UT_EXIT,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmp.h>], ++[struct utmp ut; ut.ut_exit.e_exit = 0;], ++samba_cv_HAVE_UT_UT_EXIT=yes,samba_cv_HAVE_UT_UT_EXIT=no,samba_cv_HAVE_UT_UT_EXIT=cross)]) ++if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then ++ AC_DEFINE(HAVE_UT_UT_EXIT,1,[Whether the utmp struct has a property ut_exit]) ++fi ++ ++if test x$ac_cv_func_pututline = xyes ; then ++ AC_CACHE_CHECK([whether pututline returns pointer],samba_cv_PUTUTLINE_RETURNS_UTMP,[ ++ AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmp.h>], ++ [struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);], ++ samba_cv_PUTUTLINE_RETURNS_UTMP=yes,samba_cv_PUTUTLINE_RETURNS_UTMP=no)]) ++ if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then ++ AC_DEFINE(PUTUTLINE_RETURNS_UTMP,1,[Whether pututline returns pointer]) ++ fi ++fi ++ ++AC_CACHE_CHECK([for ut_syslen in utmpx],samba_cv_HAVE_UX_UT_SYSLEN,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmpx.h>], ++[struct utmpx ux; ux.ut_syslen = 0;], ++samba_cv_HAVE_UX_UT_SYSLEN=yes,samba_cv_HAVE_UX_UT_SYSLEN=no,samba_cv_HAVE_UX_UT_SYSLEN=cross)]) ++if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then ++ AC_DEFINE(HAVE_UX_UT_SYSLEN,1,[Whether the utmpx struct has a property ut_syslen]) ++fi ++ ++AC_CACHE_CHECK([whether sizeof ut_line in utmp is ok],samba_cv_HAVE_UX_UT_LINE,[ ++AC_TRY_RUN([#include <stdio.h> ++#include <sys/types.h> ++#include <utmp.h> ++int main(void) { ++ if (sizeof(((struct utmp *)NULL)->ut_line) < 15) { ++ return 1; ++ } ++ return 0; ++} ++], ++samba_cv_HAVE_UX_UT_LINE=yes,samba_cv_HAVE_UX_UT_LINE=no,samba_cv_HAVE_UX_UT_LINE=cross)]) ++ ++fi ++# end utmp details ++ ++AC_CACHE_CHECK([for linux fallocate],samba_cv_HAVE_LINUX_FALLOCATE,[ ++AC_TRY_COMPILE([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <sys/types.h> ++#define _GNU_SOURCE ++#include <fcntl.h> ++#if defined(HAVE_LINUX_FALLOC_H) ++#include <linux/falloc.h> ++#endif], ++[int ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 10);], ++samba_cv_HAVE_LINUX_FALLOCATE=yes,samba_cv_HAVE_LINUX_FALLOCATE=no)]) ++if test x"$samba_cv_HAVE_LINUX_FALLOCATE" = x"yes" && test x"$ac_cv_func_fallocate" = x"yes"; then ++ AC_DEFINE(HAVE_LINUX_FALLOCATE,1,[Whether the Linux 'fallocate' function is available]) ++fi ++ ++AC_CACHE_CHECK([for getcwd takes NULL],samba_cv_GETCWD_TAKES_NULL,[ ++AC_TRY_RUN([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++main() { char *s = getcwd(NULL,0); if (s) return(0); return(1); }], ++samba_cv_GETCWD_TAKES_NULL=yes,samba_cv_GETCWD_TAKES_NULL=no,samba_cv_GETCWD_TAKES_NULL=cross)]) ++if test x"$samba_cv_GETCWD_TAKES_NULL" = x"yes"; then ++ AC_DEFINE(GETCWD_TAKES_NULL,1,[Whether the getcwd function takes NULL as an argument]) ++fi ++ ++ICONV_LOOK_DIRS="/usr /usr/local /sw /opt" ++AC_ARG_WITH(libiconv, ++[AS_HELP_STRING([--with-libiconv=BASEDIR], [Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto)])], ++[ ++ if test "$withval" = "no" ; then ++ AC_MSG_ERROR([argument to --with-libiconv must be a directory]) ++ else ++ if test "$withval" != "yes" ; then ++ ICONV_PATH_SPEC=yes ++ ICONV_LOOK_DIRS="$withval" ++ fi ++ fi ++]) ++ ++for i in $ICONV_LOOK_DIRS ; do ++ ++ save_LIBS="$LIBS" ++ save_LDFLAGS="$LDFLAGS" ++ save_CPPFLAGS="$CPPFLAGS" ++ ++ iconv_current_LIBS="" ++ iconv_current_LDFLAGS="" ++ iconv_current_CPPFLAGS="" ++ ++ ICONV_FOUND="no" ++ unset libext ++ ++ # This is here to handle -withval stuff for --with-libiconv ++ # Perhaps we should always add a -L ++ CPPFLAGS="$save_CPPFLAGS -I$i/include" ++ ++ # Check lib and lib32 library variants to cater for IRIX ABI-specific ++ # installation paths. This gets a little tricky since we might have iconv ++ # in both libiconv and in libc. In this case the jm_ICONV test will always ++ # succeed when the header is found. To counter this, make sure the ++ # library directory is there and check the ABI directory first (which ++ # should be harmless on other systems, but causes tons of linker warnings on ++ # 64bit Ubuntu systems). ++ # As the build farm doesn't seem to have any IRIX machines with iconv.h ++ # installed, I've decided to fix the linker warnings. ++ # -- Kai ++ # For IA64 HPUX systems, the libs are located in lib/hpux32 instead of lib. ++ for l in "lib" "lib32" "lib/hpux32"; do ++ if test -d "$i/$l" ; then ++ LDFLAGS="$save_LDFLAGS -L$i/$l" ++ LIBS= ++ export LDFLAGS LIBS CPPFLAGS ++ # Try to find iconv(3) ++ jm_ICONV($i/$l) ++ if test x"$ICONV_FOUND" = "xyes" ; then ++ libext="$l" ++ break ++ fi ++ fi ++ done ++ ++ if test x"$ICONV_FOUND" = "xyes" ; then ++ iconv_current_LDFLAGS="-L$i/$libext" ++ iconv_current_CPPFLAGS="-I$i/include" ++ ++ if test x"$jm_cv_lib_iconv" != x; then ++ iconv_current_LIBS="$LIBS -l$jm_cv_lib_iconv" ++ else ++ # We found iconv in libc. ++ iconv_current_LIBS="" ++ fi ++ ++ fi ++ ++ if test x"$ICONV_FOUND" = "xyes" ; then ++ ++ LDFLAGS="$save_LDFLAGS $iconv_current_LDFLAGS" ++ CPPFLAGS="$save_CPPFLAGS $iconv_current_CPPFLAGS" ++ LIBS="$save_LIBS $iconv_current_LIBS" ++ export LDFLAGS LIBS CPPFLAGS ++ ++ default_dos_charset=no ++ default_unix_charset=no ++ ++ # check for default dos charset name ++ for j in CP850 IBM850 ; do ++ rjs_CHARSET($j) ++ default_dos_charset="$ICONV_CHARSET" ++ if test x"$default_dos_charset" = x"$j"; then ++ break ++ fi ++ done ++ ++ # check for default unix charset name ++ for j in UTF-8 UTF8 ; do ++ rjs_CHARSET($j) ++ default_unix_charset="$ICONV_CHARSET" ++ if test x"$default_unix_charset" = x"$j"; then ++ break ++ fi ++ done ++ ++ if test "$default_dos_charset" != "no" -a \ ++ "$default_dos_charset" != "cross" -a \ ++ "$default_unix_charset" != "no" -a \ ++ "$default_unix_charset" != "cross" ++ then ++ samba_cv_HAVE_NATIVE_ICONV=yes ++ else ++ if test "$default_dos_charset" = "cross" -o \ ++ "$default_unix_charset" = "cross" ++ then ++ samba_cv_HAVE_NATIVE_ICONV=cross ++ else ++ samba_cv_HAVE_NATIVE_ICONV=no ++ fi ++ fi ++ ++ # At this point, we have a libiconv candidate. We know that ++ # we have the right headers and libraries, but we don't know ++ # whether it does the conversions we want. We can't test this ++ # because we are cross-compiling. This is not necessarily a big ++ # deal, since we can't guarantee that the results we get now will ++ # match the results we get at runtime anyway. ++ if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"cross" ; then ++ default_dos_charset="CP850" ++ default_unix_charset="UTF-8" ++ samba_cv_HAVE_NATIVE_ICONV=yes ++ AC_MSG_WARN(assuming the libiconv in $iconv_current_LDFLAGS can convert) ++ AC_MSG_WARN([$default_dos_charset and $default_unix_charset to UCS-16LE]) ++ fi ++ ++ if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes" ; then ++ ++ CPPFLAGS=$save_CPPFLAGS ++ LDFLAGS=$save_LDFLAGS ++ LIBS=$save_LIBS ++ ++ if test x"$iconv_current_LIBS" != x; then ++ LIBS="$LIBS $iconv_current_LIBS" ++ fi ++ ++ # Add the flags we need to CPPFLAGS and LDFLAGS ++ CPPFLAGS="$CPPFLAGS $iconv_current_CPPFLAGS" ++ LDFLAGS="$LDFLAGS $iconv_current_LDFLAGS" ++ ++ # Turn the #defines into string literals ++ default_dos_charset="\"$default_dos_charset\"" ++ default_unix_charset="\"$default_unix_charset\"" ++ ++ AC_DEFINE(HAVE_NATIVE_ICONV,1,[Whether to use native iconv]) ++ AC_DEFINE_UNQUOTED(DEFAULT_DOS_CHARSET,$default_dos_charset,[Default dos charset name]) ++ AC_DEFINE_UNQUOTED(DEFAULT_UNIX_CHARSET,$default_unix_charset,[Default unix charset name]) ++ ++ break ++ fi ++ ++ # We didn't find a working iconv, so keep going ++ fi ++ ++ # We only need to clean these up here for the next pass through the loop ++ CPPFLAGS=$save_CPPFLAGS ++ LDFLAGS=$save_LDFLAGS ++ LIBS=$save_LIBS ++ export LDFLAGS LIBS CPPFLAGS ++done ++unset libext ++ ++ ++if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; then ++ AC_MSG_WARN([Sufficient support for iconv function was not found. ++ Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!]) ++ AC_DEFINE_UNQUOTED(DEFAULT_DOS_CHARSET,"ASCII",[Default dos charset name]) ++ AC_DEFINE_UNQUOTED(DEFAULT_UNIX_CHARSET,"UTF8",[Default unix charset name]) ++fi ++ ++ ++AC_CACHE_CHECK([for Linux kernel oplocks],samba_cv_HAVE_KERNEL_OPLOCKS_LINUX,[ ++AC_TRY_RUN([ ++#include <sys/types.h> ++#include <fcntl.h> ++#ifndef F_GETLEASE ++#define F_GETLEASE 1025 ++#endif ++main() { ++ int fd = open("/dev/null", O_RDONLY); ++ return fcntl(fd, F_GETLEASE, 0) == -1; ++} ++], ++samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes,samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no,samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross)]) ++if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then ++ AC_DEFINE(HAVE_KERNEL_OPLOCKS_LINUX,1,[Whether to use linux kernel oplocks]) ++fi ++ ++AC_CACHE_CHECK([for kernel change notify support],samba_cv_HAVE_KERNEL_CHANGE_NOTIFY,[ ++AC_TRY_RUN([ ++#include <sys/types.h> ++#include <fcntl.h> ++#include <signal.h> ++#ifndef F_NOTIFY ++#define F_NOTIFY 1026 ++#endif ++main() { ++ return(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0); ++} ++], ++samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes,samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no,samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross)]) ++if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then ++ AC_DEFINE(HAVE_KERNEL_CHANGE_NOTIFY,1,[Whether kernel notifies changes]) ++fi ++ ++AC_CHECK_HEADER(sys/inotify.h) ++ ++if test x"$ac_cv_header_sys_inotify_h" = x"yes"; then ++ AC_DEFINE(HAVE_INOTIFY,1,[For inotify support]) ++fi ++ ++################################################# ++# Check if FAM notifications are available. For FAM info, see ++# http://oss.sgi.com/projects/fam/ ++# http://savannah.nongnu.org/projects/fam/ ++AC_ARG_ENABLE(fam, ++[AS_HELP_STRING([--enable-fam], [Turn on FAM support (default=auto)])]) ++ ++if test x$enable_fam != xno; then ++ AC_CHECK_HEADERS(fam.h, [samba_cv_HAVE_FAM_H=yes], [samba_cv_HAVE_FAM_H=no]) ++ if test x"$samba_cv_HAVE_FAM_H" = x"yes"; then ++ # On IRIX, libfam requires libC, but other FAM implementations ++ # might not need it. ++ AC_CHECK_LIB(fam, FAMOpen2, ++ [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam"; ++ AC_DEFINE(HAVE_FAMOPEN2, 1, Define to 1 if there is support for FAMOpen2)], ++ [samba_cv_HAVE_LIBFAM=no]) ++ ++ if test x"$samba_cv_HAVE_LIBFAM" = x"no" ; then ++ samba_fam_xtra=-lC ++ AC_CHECK_LIB_EXT(fam, samba_fam_xtra, FAMOpen2, ++ [samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam -lC"; ++ AC_DEFINE(HAVE_FAMOPEN2, 1, Define to 1 if there is support for FAMOpen2)], ++ [samba_cv_HAVE_LIBFAM=no]) ++ unset samba_fam_xtra ++ fi ++ fi ++ if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then ++ default_shared_modules="$default_shared_modules vfs_notify_fam" ++ AC_TRY_COMPILE([#include <fam.h>], ++ [enum FAMCodes code = FAMChanged;], ++ AC_DEFINE(HAVE_FAM_H_FAMCODES_TYPEDEF, 1, ++ [Whether fam.h contains a typedef for enum FAMCodes]), ++ []) ++ fi ++ ++ if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then ++ AC_CHECK_LIB(fam, FAMNoExists, ++ [AC_DEFINE(HAVE_FAMNOEXISTS, 1, Define to 1 if there is support for FAMNoExists)]) ++ fi ++ ++ if test x$enable_fam = xyes && test x"$samba_cv_HAVE_LIBFAM" != xyes ; then ++ AC_MSG_ERROR(FAM support requested but FAM library not available ) ++ fi ++fi ++ ++AC_SUBST(SMB_FAM_LIBS) ++ ++################################################# ++# Check for DMAPI interfaces in libdm/libjfsdm/libxsdm ++ ++ ++with_dmapi_support=auto ++AC_MSG_CHECKING(whether to use DMAPI support) ++AC_ARG_WITH(dmapi, ++[AS_HELP_STRING([--with-dmapi], [Include DMAPI/XDSM support (default=auto)])], ++[ case "$withval" in ++ yes|no) ++ with_dmapi_support=$withval ++ ;; ++ esac ] ++) ++AC_MSG_RESULT([$with_dmapi_support]) ++ ++if test x"$with_dmapi_support" != xno ; then ++ SMB_CHECK_DMAPI([], [ ++ AC_MSG_NOTICE(DMAPI support not present) ++ if test x"$with_dmapi_support" = xyes ; then ++ AC_MSG_ERROR(no DMAPI support found but requested!) ++ fi ++ ] ++ ) ++fi ++ ++# Add TSM SM VFS module only if there are both GPFS and DMAPI support ++# Theoretically it should work with AIX JFS2 too but this needs testing ++if test x"$ac_cv_header_gpfs_gpl_h" = x"yes" && test x"$samba_dmapi_libs" != x"" ; then ++ default_shared_modules="$default_shared_modules vfs_tsmsm" ++fi ++ ++AC_CACHE_CHECK([for kernel share modes],samba_cv_HAVE_KERNEL_SHARE_MODES,[ ++AC_TRY_RUN([ ++#include <sys/types.h> ++#include <fcntl.h> ++#include <signal.h> ++#include <sys/file.h> ++#ifndef LOCK_MAND ++#define LOCK_MAND 32 ++#define LOCK_READ 64 ++#endif ++main() { ++ return(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0); ++} ++], ++samba_cv_HAVE_KERNEL_SHARE_MODES=yes,samba_cv_HAVE_KERNEL_SHARE_MODES=no,samba_cv_HAVE_KERNEL_SHARE_MODES=cross)]) ++if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then ++ AC_DEFINE(HAVE_KERNEL_SHARE_MODES,1,[Whether the kernel supports share modes]) ++fi ++ ++ ++AC_CACHE_CHECK([for IRIX kernel oplock type definitions],samba_cv_HAVE_KERNEL_OPLOCKS_IRIX,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <fcntl.h>], ++[oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;], ++samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes,samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no)]) ++if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then ++ AC_DEFINE(HAVE_KERNEL_OPLOCKS_IRIX,1,[Whether IRIX kernel oplock type definitions are available]) ++fi ++ ++################################################# ++# Check for POSIX capability support ++ ++AC_CHECK_HEADER(sys/capability.h, [samba_cv_HAVE_SYS_CAPABILITY_H=yes; ++ AC_DEFINE(HAVE_SYS_CAPABILITY_H, 1, Whether sys/capability.h is present)], ++ [], []) ++ ++if test x"$samba_cv_HAVE_SYS_CAPABILITY_H" = x"yes"; then ++ ++ ac_save_LIBS=$LIBS ++ AC_LIBTESTFUNC(cap, cap_get_proc) ++ ++ AC_CACHE_CHECK([for POSIX capabilities], ++ samba_cv_HAVE_POSIX_CAPABILITIES, ++ [ ++ AC_TRY_RUN([ ++#include <sys/types.h> ++#include <sys/capability.h> ++main() { ++ cap_t cap; ++ cap_value_t vals[1]; ++ if (!(cap = cap_get_proc())) ++ return(1); ++ vals[0] = CAP_CHOWN; ++ cap_set_flag(cap, CAP_INHERITABLE, 1, vals, CAP_CLEAR); ++ cap_set_proc(cap); ++ return(0); ++}], ++ samba_cv_HAVE_POSIX_CAPABILITIES=yes, ++ samba_cv_HAVE_POSIX_CAPABILITIES=no, ++ samba_cv_HAVE_POSIX_CAPABILITIES=cross) ++ ]) ++ ++if test x"$samba_cv_HAVE_POSIX_CAPABILITIES" = x"yes"; then ++ AC_DEFINE(HAVE_POSIX_CAPABILITIES, 1, ++ [Whether POSIX capabilities are available]) ++else ++ LIBS=$ac_save_LIBS ++fi ++ ++fi ++ ++# ++# Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h ++# This is *really* broken but some systems (DEC OSF1) do this.... JRA. ++# ++ ++AC_CACHE_CHECK([for int16 typedef included by rpc/rpc.h],samba_cv_HAVE_INT16_FROM_RPC_RPC_H,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#if defined(HAVE_RPC_RPC_H) ++#include <rpc/rpc.h> ++#endif], ++[int16 testvar;], ++samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes,samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no)]) ++if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then ++ AC_DEFINE(HAVE_INT16_FROM_RPC_RPC_H,1,[Whether int16 typedef is included by rpc/rpc.h]) ++fi ++ ++AC_CACHE_CHECK([for uint16 typedef included by rpc/rpc.h],samba_cv_HAVE_UINT16_FROM_RPC_RPC_H,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#if defined(HAVE_RPC_RPC_H) ++#include <rpc/rpc.h> ++#endif], ++[uint16 testvar;], ++samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes,samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no)]) ++if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then ++ AC_DEFINE(HAVE_UINT16_FROM_RPC_RPC_H,1,[Whether uint16 typedef is included by rpc/rpc.h]) ++fi ++ ++AC_CACHE_CHECK([for int32 typedef included by rpc/rpc.h],samba_cv_HAVE_INT32_FROM_RPC_RPC_H,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#if defined(HAVE_RPC_RPC_H) ++#include <rpc/rpc.h> ++#endif], ++[int32 testvar;], ++samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes,samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no)]) ++if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then ++ AC_DEFINE(HAVE_INT32_FROM_RPC_RPC_H,1,[Whether int32 typedef is included by rpc/rpc.h]) ++fi ++ ++AC_CACHE_CHECK([for uint32 typedef included by rpc/rpc.h],samba_cv_HAVE_UINT32_FROM_RPC_RPC_H,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#if defined(HAVE_RPC_RPC_H) ++#include <rpc/rpc.h> ++#endif], ++[uint32 testvar;], ++samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes,samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no)]) ++if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then ++ AC_DEFINE(HAVE_UINT32_FROM_RPC_RPC_H,1,[Whether uint32 typedef is included by rpc/rpc.h]) ++fi ++ ++dnl ++dnl Some systems (SCO) have a problem including ++dnl <prot.h> and <rpc/rpc.h> due to AUTH_ERROR being defined ++dnl as a #define in <prot.h> and as part of an enum ++dnl in <rpc/rpc.h>. ++dnl ++ ++AC_CACHE_CHECK([for conflicting AUTH_ERROR define in rpc/rpc.h],samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#ifdef HAVE_SYS_SECURITY_H ++#include <sys/security.h> ++#include <prot.h> ++#endif /* HAVE_SYS_SECURITY_H */ ++#if defined(HAVE_RPC_RPC_H) ++#include <rpc/rpc.h> ++#endif], ++[int testvar;], ++samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no,samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes)]) ++if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then ++ AC_DEFINE(HAVE_RPC_AUTH_ERROR_CONFLICT,1,[Whether there is a conflicting AUTH_ERROR define in rpc/rpc.h]) ++fi ++ ++AC_MSG_CHECKING([for test routines]) ++AC_TRY_RUN([#include "${srcdir-.}/../tests/trivial.c"], ++ AC_MSG_RESULT(yes), ++ AC_MSG_ERROR([cant find test code. Aborting config]), ++ AC_MSG_WARN([cannot run when cross-compiling])) ++ ++AC_CACHE_CHECK([for ftruncate extend],samba_cv_HAVE_FTRUNCATE_EXTEND,[ ++AC_TRY_RUN([#include "${srcdir-.}/../tests/ftruncate.c"], ++ samba_cv_HAVE_FTRUNCATE_EXTEND=yes,samba_cv_HAVE_FTRUNCATE_EXTEND=no,samba_cv_HAVE_FTRUNCATE_EXTEND=cross)]) ++if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then ++ AC_DEFINE(HAVE_FTRUNCATE_EXTEND,1,[Truncate extend]) ++fi ++ ++AC_CACHE_CHECK([for broken getgroups],samba_cv_HAVE_BROKEN_GETGROUPS,[ ++AC_TRY_RUN([#include "${srcdir-.}/../tests/getgroups.c"], ++ samba_cv_HAVE_BROKEN_GETGROUPS=yes,samba_cv_HAVE_BROKEN_GETGROUPS=no,samba_cv_HAVE_BROKEN_GETGROUPS=cross)]) ++if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then ++ AC_DEFINE(HAVE_BROKEN_GETGROUPS,1,[Whether getgroups is broken]) ++fi ++ ++SMB_CHECK_SYSCONF(_SC_NGROUPS_MAX) ++SMB_CHECK_SYSCONF(_SC_NPROC_ONLN) ++SMB_CHECK_SYSCONF(_SC_NPROCESSORS_ONLN) ++SMB_CHECK_SYSCONF(_SC_PAGESIZE) ++AC_CHECK_FUNCS(getpagesize) ++ ++################################################ ++# look for a method of setting the effective uid ++seteuid=no; ++ ++################################################ ++# Start by checking for 32-bit system call definitions on Linux. ++ ++case "$host_os" in ++*linux*) ++AC_CACHE_CHECK([for Linux 32-bit system calls],samba_cv_USE_LINUX_32BIT_SYSCALLS,[ ++AC_TRY_COMPILE([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <stdlib.h> ++#include <stdio.h> ++#include <sys/types.h> ++#include <errno.h> ++ ++#ifdef HAVE_SYS_PRIV_H ++#include <sys/priv.h> ++#endif ++#ifdef HAVE_SYS_ID_H ++#include <sys/id.h> ++#endif ++ ++#if defined(HAVE_SYSCALL_H) ++#include <syscall.h> ++#endif ++ ++#if defined(HAVE_SYS_SYSCALL_H) ++#include <sys/syscall.h> ++#endif ++], ++[ ++syscall(SYS_setresuid32, -1, -1, -1); ++syscall(SYS_setresgid32, -1, -1, -1); ++syscall(SYS_setreuid32, -1, -1); ++syscall(SYS_setregid32, -1, -1); ++syscall(SYS_setuid32, -1); ++syscall(SYS_setgid32, -1); ++syscall(SYS_setgroups32, 0, NULL); ++], samba_cv_USE_LINUX_32BIT_SYSCALLS=yes,samba_cv_USE_LINUX_32BIT_SYSCALLS=no,samba_cv_USE_LINUX_32BIT_SYSCALLS=cross)]) ++ ++if test x"$samba_cv_USE_LINUX_32BIT_SYSCALLS" = x"yes"; then ++ AC_DEFINE(USE_LINUX_32BIT_SYSCALLS,1,[Use Linux 32-bit system calls]) ++ AC_CACHE_CHECK([for Linux thread-specific credentials with 32-bit system calls],samba_cv_USE_LINUX_THREAD_CREDENTIALS,[ ++ AC_TRY_RUN([ ++#define AUTOCONF_TEST 1 ++#define USE_LINUX_THREAD_CREDENTIALS 1 ++#define USE_LINUX_32BIT_SYSCALLS 1 ++#include "${srcdir-.}/../lib/util/setid.c" ++#include "${srcdir-.}/lib/util_sec.c"], ++ samba_cv_USE_LINUX_THREAD_CREDENTIALS=yes,samba_cv_USE_LINUX_THREAD_CREDENTIALS=no,samba_cv_USE_LINUX_THREAD_CREDENTIALS=cross)]) ++if test x"$samba_cv_USE_LINUX_THREAD_CREDENTIALS" = x"yes"; then ++ seteuid=yes; ++ AC_DEFINE(USE_LINUX_THREAD_CREDENTIALS,1,[Whether we can use Linux thread-specific credentials with 32-bit system calls]) ++fi ++fi ++ ++if test $seteuid = no; then ++AC_CACHE_CHECK([for Linux thread-specific credentials],samba_cv_USE_LINUX_THREAD_CREDENTIALS,[ ++AC_TRY_RUN([ ++#define AUTOCONF_TEST 1 ++#define USE_LINUX_THREAD_CREDENTIALS 1 ++#include "${srcdir-.}/../lib/util/setid.c" ++#include "${srcdir-.}/lib/util_sec.c"], ++ samba_cv_USE_LINUX_THREAD_CREDENTIALS=yes,samba_cv_USE_LINUX_THREAD_CREDENTIALS=no,samba_cv_USE_LINUX_THREAD_CREDENTIALS=cross)]) ++if test x"$samba_cv_USE_LINUX_THREAD_CREDENTIALS" = x"yes"; then ++ seteuid=yes;AC_DEFINE(USE_LINUX_THREAD_CREDENTIALS,1,[Whether we can use Linux thread-specific credentials]) ++fi ++fi ++ ++;; ++esac ++ ++if test $seteuid = no; then ++AC_CACHE_CHECK([for setreuid],samba_cv_USE_SETREUID,[ ++AC_TRY_RUN([ ++#define AUTOCONF_TEST 1 ++#define USE_SETREUID 1 ++#include "confdefs.h" ++#include "${srcdir-.}/../lib/util/setid.c" ++#include "${srcdir-.}/lib/util_sec.c"], ++ samba_cv_USE_SETREUID=yes,samba_cv_USE_SETREUID=no,samba_cv_USE_SETREUID=cross)]) ++if test x"$samba_cv_USE_SETREUID" = x"yes"; then ++ seteuid=yes;AC_DEFINE(USE_SETREUID,1,[Whether setreuid() is available]) ++fi ++fi ++ ++# we check for setresuid second as it conflicts with AIO on Linux. ++# see http://samba.org/~tridge/junkcode/aio_uid.c ++if test $seteuid = no; then ++AC_CACHE_CHECK([for setresuid],samba_cv_USE_SETRESUID,[ ++AC_TRY_RUN([ ++#define AUTOCONF_TEST 1 ++#define USE_SETRESUID 1 ++#include "confdefs.h" ++#include "${srcdir-.}/../lib/util/setid.c" ++#include "${srcdir-.}/lib/util_sec.c"], ++ samba_cv_USE_SETRESUID=yes,samba_cv_USE_SETRESUID=no,samba_cv_USE_SETRESUID=cross)]) ++if test x"$samba_cv_USE_SETRESUID" = x"yes"; then ++ seteuid=yes;AC_DEFINE(USE_SETRESUID,1,[Whether setresuid() is available]) ++fi ++fi ++ ++if test $seteuid = no; then ++AC_CACHE_CHECK([for seteuid],samba_cv_USE_SETEUID,[ ++AC_TRY_RUN([ ++#define AUTOCONF_TEST 1 ++#define USE_SETEUID 1 ++#include "confdefs.h" ++#include "${srcdir-.}/../lib/util/setid.c" ++#include "${srcdir-.}/lib/util_sec.c"], ++ samba_cv_USE_SETEUID=yes,samba_cv_USE_SETEUID=no,samba_cv_USE_SETEUID=cross)]) ++if test x"$samba_cv_USE_SETEUID" = x"yes"; then ++ seteuid=yes;AC_DEFINE(USE_SETEUID,1,[Whether seteuid() is available]) ++fi ++fi ++ ++if test $seteuid = no; then ++AC_CACHE_CHECK([for setuidx],samba_cv_USE_SETUIDX,[ ++AC_TRY_RUN([ ++#define AUTOCONF_TEST 1 ++#define USE_SETUIDX 1 ++#include "confdefs.h" ++#include "${srcdir-.}/../lib/util/setid.c" ++#include "${srcdir-.}/lib/util_sec.c"], ++ samba_cv_USE_SETUIDX=yes,samba_cv_USE_SETUIDX=no,samba_cv_USE_SETUIDX=cross)]) ++if test x"$samba_cv_USE_SETUIDX" = x"yes"; then ++ seteuid=yes;AC_DEFINE(USE_SETUIDX,1,[Whether setuidx() is available]) ++fi ++fi ++ ++AC_CACHE_CHECK([for the Darwin initgroups system call], ++ samba_cv_DARWIN_INITGROUPS, ++ AC_TRY_LINK([ ++#include <sys/syscall.h> ++#include <unistd.h> ++ ], ++ [ syscall(SYS_initgroups, 16, NULL, NULL, 0); ], ++ samba_cv_DARWIN_INITGROUPS=yes, ++ samba_cv_DARWIN_INITGROUPS=no) ++) ++ ++if test x"$samba_cv_DARWIN_INITGROUPS" = x"yes" ; then ++ AC_DEFINE(HAVE_DARWIN_INITGROUPS, 1, ++ [Whether to use the Darwin-specific initgroups system call]) ++fi ++ ++AC_CACHE_CHECK([for fcntl locking],samba_cv_HAVE_FCNTL_LOCK,[ ++AC_TRY_RUN([#include "${srcdir-.}/../tests/fcntl_lock.c"], ++ samba_cv_HAVE_FCNTL_LOCK=yes,samba_cv_HAVE_FCNTL_LOCK=no,samba_cv_HAVE_FCNTL_LOCK=cross)]) ++if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then ++ AC_DEFINE(HAVE_FCNTL_LOCK,1,[Whether fcntl locking is available]) ++fi ++ ++# glibc up to 2.3.6 had dangerously broken posix_fallocate(). DON'T USE IT. ++AC_CACHE_CHECK([for broken posix_fallocate],samba_cv_HAVE_BROKEN_POSIX_FALLOCATE,[ ++AC_TRY_COMPILE([ ++ #define _XOPEN_SOURCE 600 ++ #include <stdlib.h> ++ #if defined(__GLIBC__) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 4)) ++ #error probably broken posix_fallocate ++ #endif ++], [ ++], ++samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=no,samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=yes)]) ++if test x"$samba_cv_HAVE_BROKEN_POSIX_FALLOCATE" = xyes; then ++ AC_DEFINE(HAVE_BROKEN_POSIX_FALLOCATE, 1, Whether we have a broken posix_fallocate) ++fi ++ ++ ++AC_CACHE_CHECK([for st_blocks in struct stat],samba_cv_HAVE_STAT_ST_BLOCKS,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <sys/stat.h> ++#include <unistd.h>], ++[struct stat st; st.st_blocks = 0;], ++samba_cv_HAVE_STAT_ST_BLOCKS=yes,samba_cv_HAVE_STAT_ST_BLOCKS=no,samba_cv_HAVE_STAT_ST_BLOCKS=cross)]) ++if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then ++ AC_DEFINE(HAVE_STAT_ST_BLOCKS,1,[Whether the stat struct has a st_block property]) ++fi ++ ++AC_CACHE_CHECK([for 32 bit blkcnt_t],samba_cv_SIZEOF_BLKCNT_T_4,[ ++AC_TRY_RUN([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <stdio.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++main() { return((sizeof(blkcnt_t) == 4) ? 0 : 1); }], ++samba_cv_SIZEOF_BLKCNT_T_4=yes,samba_cv_SIZEOF_BLKCNT_T_4=no,samba_cv_SIZEOF_BLKCNT_T_4=cross)]) ++if test x"$samba_cv_SIZEOF_BLKCNT_T_4" = x"yes"; then ++ AC_DEFINE(SIZEOF_BLKCNT_T_4,1,[The size of the 'blkcnt_t' type]) ++fi ++ ++AC_CACHE_CHECK([for 64 bit blkcnt_t],samba_cv_SIZEOF_BLKCNT_T_8,[ ++AC_TRY_RUN([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <stdio.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++main() { return((sizeof(blkcnt_t) == 8) ? 0 : 1); }], ++samba_cv_SIZEOF_BLKCNT_T_8=yes,samba_cv_SIZEOF_BLKCNT_T_8=no,samba_cv_SIZEOF_BLKCNT_T_8=cross)]) ++if test x"$samba_cv_SIZEOF_BLKCNT_T_8" = x"yes"; then ++ AC_DEFINE(SIZEOF_BLKCNT_T_8,1,[The size of the 'blkcnt_t' type]) ++fi ++ ++AC_CACHE_CHECK([for st_blksize in struct stat],samba_cv_HAVE_STAT_ST_BLKSIZE,[ ++AC_TRY_COMPILE([#include <sys/types.h> ++#include <sys/stat.h> ++#include <unistd.h>], ++[struct stat st; st.st_blksize = 0;], ++samba_cv_HAVE_STAT_ST_BLKSIZE=yes,samba_cv_HAVE_STAT_ST_BLKSIZE=no,samba_cv_HAVE_STAT_ST_BLKSIZE=cross)]) ++if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then ++ AC_DEFINE(HAVE_STAT_ST_BLKSIZE,1,[Whether the stat struct has a st_blksize property]) ++fi ++ ++AC_CACHE_CHECK([for st_flags in struct stat], ++ samba_cv_HAVE_STAT_ST_FLAGS, ++ [ ++ AC_TRY_COMPILE([#include <sys/types.h> ++#include <sys/stat.h> ++#include <unistd.h>], ++ [struct stat st; st.st_flags = 0;], ++ samba_cv_HAVE_STAT_ST_FLAGS=yes, ++ samba_cv_HAVE_STAT_ST_FLAGS=no, ++ samba_cv_HAVE_STAT_ST_FLAGS=cross) ++ ]) ++ ++if test x"$samba_cv_HAVE_STAT_ST_FLAGS" = x"yes"; then ++ AC_DEFINE(HAVE_STAT_ST_FLAGS, 1, ++ [Whether the stat struct has a st_flags member]) ++fi ++ ++AC_CACHE_CHECK([for broken nisplus include files],samba_cv_BROKEN_NISPLUS_INCLUDE_FILES,[ ++AC_TRY_COMPILE([ ++#include <sys/types.h> ++#include <sys/acl.h> ++#if defined(HAVE_RPCSVC_NIS_H) ++#include <rpcsvc/nis.h> ++#endif], ++[int i;], ++samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no,samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes)]) ++if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then ++ AC_DEFINE(BROKEN_NISPLUS_INCLUDE_FILES,1,[Whether the nisplus include files are broken]) ++fi ++ ++AC_CACHE_CHECK([if the realpath function allows a NULL argument],samba_cv_REALPATH_TAKES_NULL,[ ++AC_TRY_RUN([ ++#include <stdio.h> ++#include <limits.h> ++#include <signal.h> ++ ++void exit_on_core(int ignored) { ++ exit(1); ++} ++ ++main() { ++ char *newpath; ++ signal(SIGSEGV, exit_on_core); ++ newpath = realpath("/tmp", NULL); ++ return((newpath != NULL) ? 0 : 1); ++} ++], ++samba_cv_REALPATH_TAKES_NULL=yes,samba_cv_REALPATH_TAKES_NULL=no,samba_cv_REALPATH_TAKES_NULL=cross)]) ++if test x"$samba_cv_REALPATH_TAKES_NULL" = x"yes"; then ++ AC_DEFINE(REALPATH_TAKES_NULL,1,[Whether the realpath function allows NULL]) ++fi ++ ++################################################# ++# check for AFS clear-text auth support ++samba_cv_WITH_AFS=no ++AC_MSG_CHECKING(whether to use AFS clear-text auth) ++AC_ARG_WITH(afs, ++[AS_HELP_STRING([--with-afs], [Include AFS clear-text auth support (default=no)])], ++[ case "$withval" in ++ yes|auto) ++ AC_MSG_RESULT($withval) ++ samba_cv_WITH_AFS=$withval ++ ;; ++ *) ++ AC_MSG_RESULT(no) ++ ;; ++ esac ], ++ AC_MSG_RESULT(no) ++) ++ ++#################################################### ++# check for Linux-specific AFS fake-kaserver support ++samba_cv_WITH_FAKE_KASERVER=no ++AC_MSG_CHECKING(whether to use AFS fake-kaserver) ++AC_ARG_WITH(fake-kaserver, ++[AS_HELP_STRING([--with-fake-kaserver], [Include AFS fake-kaserver support (default=no)])], ++[ case "$withval" in ++ yes|auto) ++ AC_MSG_RESULT($withval) ++ samba_cv_WITH_FAKE_KASERVER=$withval ++ ;; ++ *) ++ AC_MSG_RESULT(no) ++ ;; ++ esac ], ++ AC_MSG_RESULT(no) ++) ++ ++################################################# ++# decide whether we can support WITH_AFS and / or WITH_FAKE_KASERVER ++if test x"$samba_cv_WITH_AFS" != x"no" || ++ test x"$samba_cv_WITH_FAKE_KASERVER" != x"no"; then ++ ++ # see if this box has the OpenSSL DES libraries ++ AC_CHECK_LIB( crypto, DES_pcbc_encrypt, LIBS="$LIBS -lcrypto" , [AC_ERROR(OpenSSL library: libcrypto ot found!)] ) ++ ++ # see if this box has the afs-headers in /usr/include/afs ++ AC_MSG_CHECKING(for /usr/include/afs) ++ if test -d /usr/include/afs; then ++ AC_MSG_RESULT(yes) ++ else ++ AC_MSG_RESULT(no) ++ fi ++ ++ # check for afs.h ++ have_afs_headers=no ++ AC_CHECK_HEADERS(afs.h afs/afs.h) ++ if test x"$ac_cv_header_afs_h" = x"no" && test x"$ac_cv_header_afs_afs_h" = x"no"; then ++ if test x"$samba_cv_WITH_FAKE_KASERVER" = x"auto" || ++ test x"$samba_cv_WITH_AFS" = x"auto"; then ++ AC_MSG_WARN([AFS cannot be supported without afs.h]) ++ else ++ AC_MSG_ERROR([AFS cannot be supported without afs.h]) ++ fi ++ else ++ have_afs_headers=yes ++ fi ++fi ++ ++FAKE_KASERVER_OBJ="" ++if test x"$samba_cv_WITH_FAKE_KASERVER" != x"no" && test x"$have_afs_headers" = x"yes"; then ++ AC_DEFINE(WITH_FAKE_KASERVER,1,[Whether to include AFS fake-kaserver support]) ++ FAKE_KASERVER_OBJ="utils/net_afs.o" ++fi ++AC_SUBST(FAKE_KASERVER_OBJ) ++ ++################################################# ++# check whether to compile AFS/NT ACL mapping module ++samba_cv_WITH_VFS_AFSACL=no ++AC_MSG_CHECKING(whether to use AFS ACL mapping module) ++AC_ARG_WITH(vfs-afsacl, ++[AS_HELP_STRING([--with-vfs-afsacl], [Include AFS to NT ACL mapping module (default=no)])], ++[ case "$withval" in ++ yes|auto) ++ AC_MSG_RESULT($withval) ++ samba_cv_WITH_VFS_AFSACL=yes ++ ;; ++ *) ++ AC_MSG_RESULT(no) ++ ;; ++ esac ], ++ AC_MSG_RESULT(no) ++) ++ ++if test x"$samba_cv_WITH_VFS_AFSACL" = x"yes"; then ++ default_shared_modules="$default_shared_modules vfs_afsacl" ++fi ++ ++if test x"$samba_cv_WITH_AFS" != x"no" && test x"$have_afs_headers" = x"yes"; then ++ AC_DEFINE(WITH_AFS,1,[Whether to include AFS clear-text auth support]) ++fi ++ ++################################################# ++# check for the DFS clear-text auth system ++AC_MSG_CHECKING(whether to use DFS clear-text auth) ++AC_ARG_WITH(dfs, ++[AS_HELP_STRING([--with-dce-dfs], [Include DCE/DFS clear-text auth support (default=no)])], ++[ case "$withval" in ++ yes) ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(WITH_DFS,1,[Whether to include DFS support]) ++ ;; ++ *) ++ AC_MSG_RESULT(no) ++ ;; ++ esac ], ++ AC_MSG_RESULT(no) ++) ++ ++######################################################## ++# Compile with LDAP support? ++ ++with_ldap_support=auto ++AC_MSG_CHECKING([for LDAP support]) ++ ++AC_ARG_WITH(ldap, ++[AS_HELP_STRING([--with-ldap], [LDAP support (default=auto)])], ++[ case "$withval" in ++ yes|no) ++ with_ldap_support=$withval ++ ;; ++ esac ]) ++ ++AC_MSG_RESULT($with_ldap_support) ++ ++SMBLDAP="" ++AC_SUBST(SMBLDAP) ++ ++if test x"$with_ldap_support" != x"no"; then ++ ++ ################################################################## ++ # first test for ldap.h and lber.h ++ # (ldap.h is required for this test) ++ AC_CHECK_HEADERS(ldap.h lber.h) ++ ++ if test x"$ac_cv_header_ldap_h" != x"yes"; then ++ if test x"$with_ldap_support" = x"yes"; then ++ AC_MSG_ERROR(ldap.h is needed for LDAP support) ++ else ++ AC_MSG_WARN(ldap.h is needed for LDAP support) ++ fi ++ ++ with_ldap_support=no ++ fi ++ ++ ################################################################## ++ # HP/UX does not have ber_tag_t in lber.h - it must be configured as ++ # unsigned int in include/includes.h ++ case $host_os in ++ *hpux*) ++ AC_MSG_WARN(ber_tag_t is needed for LDAP support) ++ AC_MSG_WARN(ber_tag_t must be configured in includes.h for hpux) ++ with_ldap_support=yes ++ ;; ++ *) ++ AC_CHECK_TYPE(ber_tag_t,,,[#include <lber.h>]) ++ if test x"$ac_cv_type_ber_tag_t" != x"yes"; then ++ if test x"$with_ldap_support" = x"yes"; then ++ AC_MSG_ERROR(ber_tag_t is needed for LDAP support) ++ else ++ AC_MSG_WARN(ber_tag_t is needed for LDAP support) ++ fi ++ with_ldap_support=no ++ fi ++ ;; ++ esac ++fi ++ ++if test x"$with_ldap_support" != x"no"; then ++ ac_save_LIBS=$LIBS ++ ++ ################################################################## ++ # we might need the lber lib on some systems. To avoid link errors ++ # this test must be before the libldap test ++ AC_CHECK_LIB_EXT(lber, LDAP_LIBS, ber_scanf) ++ ++ ######################################################## ++ # If ber_sockbuf_add_io() is available we can add ++ # SASL wrapping hooks ++ AC_CHECK_FUNC_EXT(ber_sockbuf_add_io,$LDAP_LIBS) ++ ++ AC_CACHE_CHECK([for LDAP_OPT_SOCKBUF],samba_cv_HAVE_LDAP_OPT_SOCKBUF,[ ++ AC_TRY_COMPILE([#include <ldap.h>], ++ [int val = LDAP_OPT_SOCKBUF;], ++ samba_cv_HAVE_LDAP_OPT_SOCKBUF=yes, ++ samba_cv_HAVE_LDAP_OPT_SOCKBUF=no)]) ++ ++ if test x"$ac_cv_func_ext_ber_sockbuf_add_io" = x"yes" -a \ ++ x"$samba_cv_HAVE_LDAP_OPT_SOCKBUF" = x"yes"; then ++ AC_DEFINE(HAVE_LDAP_SASL_WRAPPING, 1, [Support for SASL wrapping]) ++ fi ++ ++ ####################################################### ++ # if we have LBER_OPT_LOG_PRINT_FN, we can intercept ++ # ldap logging and print it out in the samba logs ++ AC_CACHE_CHECK([for LBER_OPT_LOG_PRINT_FN], ++ samba_cv_HAVE_LBER_OPT_LOG_PRINT_FN, ++ [AC_TRY_COMPILE([#include <lber.h>], ++ [int val = LBER_OPT_LOG_PRINT_FN;], ++ samba_cv_HAVE_LBER_OPT_LOG_PRINT_FN=yes, ++ samba_cv_HAVE_LBER_OPT_LOG_PRINT_FN=no)]) ++ ++ if test x"$samba_cv_HAVE_LBER_OPT_LOG_PRINT_FN" = x"yes"; then ++ AC_DEFINE(HAVE_LBER_LOG_PRINT_FN, 1, ++ [Support for LDAP/LBER logging interception]) ++ fi ++ ++ ######################################################## ++ # now see if we can find the ldap libs in standard paths ++ AC_CHECK_LIB_EXT(ldap, LDAP_LIBS, ldap_init) ++ ++ ######################################################## ++ # If we have LDAP, does it's rebind procedure take 2 or 3 arguments? ++ # Check found in pam_ldap 145. ++ AC_CHECK_FUNC_EXT(ldap_set_rebind_proc,$LDAP_LIBS) ++ ++ LIBS="$LIBS $LDAP_LIBS" ++ AC_CACHE_CHECK(whether ldap_set_rebind_proc takes 3 arguments, smb_ldap_cv_ldap_set_rebind_proc, [ ++ AC_TRY_COMPILE([ ++ #include <lber.h> ++ #include <ldap.h>], ++ [ldap_set_rebind_proc(0, 0, 0);], ++ [smb_ldap_cv_ldap_set_rebind_proc=3], ++ [smb_ldap_cv_ldap_set_rebind_proc=2] ++ ) ++ ]) ++ ++ AC_DEFINE_UNQUOTED(LDAP_SET_REBIND_PROC_ARGS, $smb_ldap_cv_ldap_set_rebind_proc, [Number of arguments to ldap_set_rebind_proc]) ++ ++ AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS) ++ ++ if test x"$ac_cv_lib_ext_ldap_ldap_init" = x"yes"; then ++ AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available]) ++ CPPFLAGS="$CPPFLAGS -DLDAP_DEPRECATED" ++ default_static_modules="$default_static_modules pdb_ldapsam idmap_ldap"; ++ default_shared_modules="$default_shared_modules"; ++ SMBLDAP="lib/smbldap.o" ++ with_ldap_support=yes ++ AC_MSG_CHECKING(whether LDAP support is used) ++ AC_MSG_RESULT(yes) ++ else ++ if test x"$with_ldap_support" = x"yes"; then ++ AC_MSG_ERROR(libldap is needed for LDAP support) ++ else ++ AC_MSG_WARN(libldap is needed for LDAP support) ++ fi ++ ++ LDAP_LIBS="" ++ with_ldap_support=no ++ fi ++ LIBS=$ac_save_LIBS ++fi ++ ++ ++################################################# ++# active directory support ++ ++with_ads_support=auto ++AC_MSG_CHECKING([for Active Directory and krb5 support]) ++ ++AC_ARG_WITH(ads, ++[AS_HELP_STRING([--with-ads], [Active Directory support (default=auto)])], ++[ case "$withval" in ++ yes|no) ++ with_ads_support="$withval" ++ ;; ++ esac ]) ++ ++AC_MSG_RESULT($with_ads_support) ++ ++FOUND_KRB5=no ++KRB5_LIBS="" ++ ++if test x"$with_ldap_support" != x"yes"; then ++ ++ if test x"$with_ads_support" = x"yes"; then ++ AC_MSG_ERROR(Active Directory Support requires LDAP support) ++ elif test x"$with_ads_support" = x"auto"; then ++ AC_MSG_WARN(Disabling Active Directory support (requires LDAP support)) ++ with_ads_support=no ++ fi ++ ++else ++ ++ # Check to see whether there is enough LDAP functionality to be able ++ # to build AD support. ++ ++# HPUX and Solaris only has ldap_init; ok, we take care of this in smbldap.c ++case "$host_os" in ++ *hpux* | *solaris*) ++ AC_CHECK_FUNC_EXT(ldap_init,$LDAP_LIBS) ++ ++ if test x"$ac_cv_func_ext_ldap_init" != x"yes"; then ++ if test x"$with_ads_support" = x"yes"; then ++ AC_MSG_ERROR(Active Directory support on HPUX or Solaris requires ldap_init) ++ elif test x"$with_ads_support" = x"auto"; then ++ AC_MSG_WARN(Disabling Active Directory support (requires ldap_init on HPUX or Solaris)) ++ with_ads_support=no ++ fi ++ fi ++ ;; ++ *) ++ AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS) ++ ++ if test x"$ac_cv_func_ext_ldap_initialize" != x"yes"; then ++ if test x"$with_ads_support" = x"yes"; then ++ AC_MSG_ERROR(Active Directory support requires ldap_initialize) ++ elif test x"$with_ads_support" = x"auto"; then ++ AC_MSG_WARN(Disabling Active Directory support (requires ldap_initialize)) ++ with_ads_support=no ++ fi ++ fi ++ ;; ++esac ++ ++ ++ AC_CHECK_FUNC_EXT(ldap_add_result_entry,$LDAP_LIBS) ++ ++ if test x"$ac_cv_func_ext_ldap_add_result_entry" != x"yes"; then ++ if test x"$with_ads_support" = x"yes"; then ++ AC_MSG_ERROR(Active Directory support requires ldap_add_result_entry) ++ elif test x"$with_ads_support" = x"auto"; then ++ AC_MSG_WARN(Disabling Active Directory support (requires ldap_add_result_entry)) ++ with_ads_support=no ++ fi ++ fi ++ ++fi ++ ++if test x"$with_ads_support" != x"no"; then ++ ++ # Do no harm to the values of CFLAGS and LIBS while testing for ++ # Kerberos support. ++ ++ if test x$FOUND_KRB5 = x"no"; then ++ ################################################# ++ # check for location of Kerberos 5 install ++ AC_MSG_CHECKING(for kerberos 5 install path) ++ AC_ARG_WITH(krb5, ++ [AS_HELP_STRING([--with-krb5=base-dir], [Locate Kerberos 5 support (default=/usr)])], ++ [ case "$withval" in ++ no) ++ AC_MSG_RESULT(no krb5-path given) ++ ;; ++ yes) ++ AC_MSG_RESULT(/usr) ++ ;; ++ *) ++ AC_MSG_RESULT($withval) ++ KRB5_CFLAGS="-I$withval/include" ++ KRB5_CPPFLAGS="-I$withval/include" ++ KRB5_LDFLAGS="-L$withval/lib" ++ FOUND_KRB5=yes ++ if test -x "$withval/bin/krb5-config"; then ++ KRB5CONFIG=$withval/bin/krb5-config ++ fi ++ ;; ++ esac ], ++ AC_MSG_RESULT(no krb5-path given) ++ ) ++ fi ++ ++ ################################################# ++ # check for krb5-config from recent MIT and Heimdal kerberos 5 ++ AC_PATH_PROG(KRB5CONFIG, krb5-config) ++ AC_MSG_CHECKING(for working krb5-config) ++ if test -x "$KRB5CONFIG" && $KRB5CONFIG --libs gssapi > /dev/null ; then ++ ac_save_CFLAGS=$CFLAGS ++ CFLAGS="";export CFLAGS ++ ac_save_LDFLAGS=$LDFLAGS ++ LDFLAGS="";export LDFLAGS ++ KRB5_LIBS="`$KRB5CONFIG --libs gssapi`" ++ KRB5_LDFLAGS="`$KRB5CONFIG --libs gssapi | sed s/-lgss.*//`" ++ KRB5_CFLAGS="`$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`" ++ KRB5_CPPFLAGS="`$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`" ++ CFLAGS=$ac_save_CFLAGS;export CFLAGS ++ LDFLAGS=$ac_save_LDFLAGS;export LDFLAGS ++ FOUND_KRB5=yes ++ AC_MSG_RESULT(yes) ++ else ++ AC_MSG_RESULT(no. Fallback to previous krb5 detection strategy) ++ fi ++ ++ if test x$FOUND_KRB5 = x"no"; then ++ ################################################# ++ # see if this box has the SuSE location for the heimdal krb implementation ++ AC_MSG_CHECKING(for /usr/include/heimdal) ++ if test -d /usr/include/heimdal; then ++ if test -f /usr/lib/heimdal/lib/libkrb5.a; then ++ KRB5_CFLAGS="-I/usr/include/heimdal" ++ KRB5_CPPFLAGS="-I/usr/include/heimdal" ++ KRB5_LDFLAGS="-L/usr/lib/heimdal/lib" ++ FOUND_KRB5=yes ++ AC_MSG_RESULT(yes) ++ else ++ KRB5_CFLAGS="-I/usr/include/heimdal" ++ KRB5_CPPFLAGS="-I/usr/include/heimdal" ++ FOUND_KRB5=yes ++ AC_MSG_RESULT(yes) ++ fi ++ else ++ AC_MSG_RESULT(no) ++ fi ++ fi ++ ++ if test x$FOUND_KRB5 = x"no"; then ++ ################################################# ++ # see if this box has the RedHat location for kerberos ++ AC_MSG_CHECKING(for /usr/kerberos) ++ if test -d /usr/kerberos -a -f /usr/kerberos/lib/libkrb5.a; then ++ KRB5_LDFLAGS="-L/usr/kerberos/lib" ++ KRB5_CFLAGS="-I/usr/kerberos/include" ++ KRB5_CPPFLAGS="-I/usr/kerberos/include" ++ FOUND_KRB5=yes ++ AC_MSG_RESULT(yes) ++ else ++ AC_MSG_RESULT(no) ++ fi ++ fi ++ ++ if test x$FOUND_KRB5 = x"no"; then ++ ################################################# ++ # see if this box has the OpenBSD location for heimdal krb5 ++ AC_MSG_CHECKING(for /usr/include/kerberosV) ++ if test -d /usr/include/kerberosV; then ++ KRB5_CPPFLAGS="-I/usr/include/kerberosV" ++ KRB5_LIBS="-lcrypto" ++ FOUND_KRB5=yes ++ AC_MSG_RESULT(yes) ++ else ++ AC_MSG_RESULT(no) ++ fi ++ fi ++ ++ if test x$FOUND_KRB5 = x"no"; then ++ ################################################# ++ # see if this box has Solaris MIT kerberos implementation ++ AC_MSG_CHECKING(for Solaris MIT kerberos) ++ if test -x "$KRB5CONFIG" && $KRB5CONFIG --version | grep -s Solaris | grep -s MIT > /dev/null ; then ++ FOUND_KRB5=yes ++ KRB5_LIBS="-lgss -lkrb5" ++ KRB5_CFLAGS="`$KRB5CONFIG --cflags`" ++ KRB5_CPPFLAGS="`$KRB5CONFIG --cflags`" ++ AC_MSG_RESULT(yes) ++ else ++ AC_MSG_RESULT(no) ++ fi ++ fi ++ ++ ac_save_CFLAGS=$CFLAGS ++ ac_save_CPPFLAGS=$CPPFLAGS ++ ac_save_LDFLAGS=$LDFLAGS ++ ++ # remove needless evil rpath stuff as early as possible: ++ LIB_REMOVE_USR_LIB(KRB5_LIBS) ++ LIB_REMOVE_USR_LIB(KRB5_LDFLAGS) ++ CFLAGS="$KRB5_CFLAGS $CFLAGS" ++ CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" ++ LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" ++ ++ KRB5_LIBS="$KRB5_LDFLAGS $KRB5_LIBS" ++ ++ # 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 ++ AC_CHECK_HEADERS(krb5.h) ++ ++ if test x"$ac_cv_header_krb5_h" = x"no"; then ++ ++ # Give a warning if AD support was not explicitly requested, ++ # i.e with_ads_support = auto, otherwise die with an error. ++ ++ if test x"$with_ads_support" = x"yes"; then ++ AC_MSG_ERROR([Active Directory cannot be supported without krb5.h]) ++ else ++ AC_MSG_WARN([Active Directory cannot be supported without krb5.h]) ++ fi ++ ++ # Turn off AD support and restore CFLAGS and LIBS variables ++ ++ with_ads_support="no" ++ ++ CFLAGS=$ac_save_CFLAGS ++ CPPFLAGS=$ac_save_CPPFLAGS ++ LDFLAGS=$ac_save_LDFLAGS ++ fi ++ ++ # check for new heimdal KRB5_DEPRECATED handling ++ ++ AC_CACHE_CHECK([for KRB5_DEPRECATED define taking an identifier], ++ samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER,[ ++ AC_TRY_COMPILE( ++ [#define KRB5_DEPRECATED 1 ++ #include <krb5.h>], ++ [], ++ samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=yes, ++ samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER, 1, ++ [Whether to use deprecated krb5 interfaces]) ++ fi ++fi ++ ++# Now we have determined whether we really want ADS support ++use_ads=no ++if test x"$with_ads_support" != x"no"; then ++ use_ads=yes ++ have_gssapi=no ++ ac_save_LIBS=$LIBS ++ ++ # now check for gssapi headers. This is also done here to allow for ++ # different kerberos include paths ++ AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h gssapi/gssapi_ext.h gssapi/gssapi_krb5.h com_err.h) ++ ++ ################################################################## ++ # we might need the k5crypto and com_err libraries on some systems ++ AC_CHECK_LIB_EXT(com_err, KRB5_LIBS, _et_list) ++ AC_CHECK_LIB_EXT(k5crypto, KRB5_LIBS, krb5_encrypt_data) ++ ++ # Heimdal checks. ++ AC_CHECK_LIB_EXT(crypto, KRB5_LIBS, des_set_key) ++ AC_CHECK_LIB_EXT(asn1, KRB5_LIBS, copy_Authenticator) ++ AC_CHECK_LIB_EXT(roken, KRB5_LIBS, roken_getaddrinfo_hostspec) ++ ++ # Heimdal checks. On static Heimdal gssapi must be linked before krb5. ++ AC_CHECK_LIB_EXT(gssapi, KRB5_LIBS, gss_display_status,[],[],have_gssapi=yes) ++ ++ ######################################################## ++ # now see if we can find the krb5 libs in standard paths ++ # or as specified above ++ AC_CHECK_LIB_EXT(krb5, KRB5_LIBS, krb5_mk_req_extended) ++ AC_CHECK_LIB_EXT(krb5, KRB5_LIBS, krb5_kt_compare) ++ ++ ######################################################## ++ # now see if we can find the gssapi libs in standard paths ++ if test x"$have_gssapi" != x"yes"; then ++ AC_CHECK_LIB_EXT(gssapi_krb5, KRB5_LIBS,gss_display_status,[],[],have_gssapi=yes) ++ AC_CHECK_LIB_EXT(gss, KRB5_LIBS,gss_display_status,[],[],have_gssapi=yes) ++ fi ++ ################################################################ ++ # test for AD / GSSAPI support being enabled ++ if test x"$have_gssapi" != xyes ; then ++ AC_MSG_WARN([Samba cannot be supported without GSSAPI]) ++ use_ads=no ++ else ++ AC_DEFINE(HAVE_GSSAPI, , [Whether the platform has GSSAPI support]) ++ fi ++ ++ # This is for FreeBSD (and possibly others). gss_mech_krb5 is a ++ # #define to GSS_KRB5_MECHANISM, which is defined in -lgssapi_krb5 ++ # Also, gsskrb5_extract_authz_data_from_sec_context is in -lgssapi_krb5 ++ AC_CHECK_LIB_EXT(gssapi_krb5, KRB5_LIBS, GSS_KRB5_MECHANISM, ++ [KRB5_LIBS="$KRB5_LIBS -lgssapi_krb5"]) ++ ++ AC_CHECK_FUNC_EXT(krb5_set_real_time, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_set_default_in_tkt_etypes, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_set_default_tgs_enctypes, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_set_default_tgs_ktypes, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_principal2salt, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_c_string_to_key, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_pw_salt, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_string_to_key_salt, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_auth_con_setkey, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_auth_con_setuseruserkey, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_permitted_enctypes, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_default_in_tkt_etypes, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_free_data_contents, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_principal_get_comp_string, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_free_unparsed_name, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_free_keytab_entry_contents, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_kt_free_entry, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_krbhst_init, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_krbhst_get_addrinfo, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_crypto_init, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_crypto_destroy, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_c_verify_checksum, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_principal_compare_any_realm, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_parse_name_norealm, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_princ_size, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_make_principal, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_principal_get_num_comp, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_init_creds_opt_set_pac_request, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_renewed_creds, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_free_error_contents, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(initialize_krb5_error_table, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_init_creds_opt_alloc, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_init_creds_opt_free, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_init_creds_opt_get_error, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_enctype_to_string, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_fwd_tgt_creds, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_auth_con_set_req_cksumtype, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_creds_opt_alloc, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_creds_opt_set_impersonate, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_creds, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_credentials_for_user, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_host_realm, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_free_host_realm, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_get_init_creds_keytab, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_build_principal_alloc_va, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_cc_get_lifetime, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_cc_retrieve_cred, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_free_checksum_contents, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_create_checksum, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(krb5_c_make_checksum, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(gss_krb5_import_cred, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(gss_get_name_attribute, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(gsskrb5_extract_authz_data_from_sec_context, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(gss_mech_krb5, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(gss_oid_equal, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(gss_inquire_sec_context_by_oid, $KRB5_LIBS) ++ AC_CHECK_FUNC_EXT(gss_wrap_iov, $KRB5_LIBS) ++ ++ # MIT krb5 1.8 does not expose this call (yet) ++ AC_CHECK_DECLS(krb5_get_credentials_for_user, [], [], [#include <krb5.h>]) ++ ++ # MIT krb5 1.7beta3 (in Ubuntu Karmic) does not have this declaration ++ # but does have the symbol ++ AC_CHECK_DECLS(krb5_auth_con_set_req_cksumtype, [], [], [#include <krb5.h>]) ++ ++ LIBS="$KRB5_LIBS $LIBS" ++ ++ AC_CACHE_CHECK(whether krb5_get_init_creds_opt_free takes a context argument, ++ smb_krb5_cv_creds_opt_free_context, ++ [ ++ AC_TRY_COMPILE([ ++ #include <krb5.h>], ++ [ ++ krb5_context ctx; ++ krb5_get_init_creds_opt *opt = NULL; ++ krb5_get_init_creds_opt_free(ctx, opt); ++ ], ++ [smb_krb5_cv_creds_opt_free_context=yes], ++ [smb_krb5_cv_creds_opt_free_context=no] ++ ) ++ ]) ++ ++ if test x"$smb_krb5_cv_creds_opt_free_context" = x"yes" ; then ++ AC_DEFINE(KRB5_CREDS_OPT_FREE_REQUIRES_CONTEXT, 1, ++ [Whether krb5_get_init_creds_opt_free takes a context argument]) ++ fi ++ ++ AC_CACHE_CHECK([for checksum in krb5_checksum], ++ samba_cv_HAVE_CHECKSUM_IN_KRB5_CHECKSUM,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_checksum cksum; cksum.checksum.length = 0;], ++ samba_cv_HAVE_CHECKSUM_IN_KRB5_CHECKSUM=yes, ++ samba_cv_HAVE_CHECKSUM_IN_KRB5_CHECKSUM=no)]) ++ ++ if test x"$samba_cv_HAVE_CHECKSUM_IN_KRB5_CHECKSUM" = x"yes"; then ++ AC_DEFINE(HAVE_CHECKSUM_IN_KRB5_CHECKSUM,1, ++ [Whether the krb5_checksum struct has a checksum property]) ++ fi ++ ++ AC_CACHE_CHECK([for etype in EncryptedData], ++ samba_cv_HAVE_ETYPE_IN_ENCRYPTEDDATA,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [EncryptedData edata; edata.etype = 0;], ++ samba_cv_HAVE_ETYPE_IN_ENCRYPTEDDATA=yes, ++ samba_cv_HAVE_ETYPE_IN_ENCRYPTEDDATA=no)]) ++ ++ if test x"$samba_cv_HAVE_ETYPE_IN_ENCRYPTEDDATA" = x"yes"; then ++ AC_DEFINE(HAVE_ETYPE_IN_ENCRYPTEDDATA,1, ++ [Whether the EncryptedData struct has a etype property]) ++ fi ++ ++ AC_CACHE_CHECK([for ticket pointer in krb5_ap_req], ++ samba_cv_HAVE_TICKET_POINTER_IN_KRB5_AP_REQ,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_ap_req *ap_req; ap_req->ticket = NULL;], ++ samba_cv_HAVE_TICKET_POINTER_IN_KRB5_AP_REQ=yes, ++ samba_cv_HAVE_TICKET_POINTER_IN_KRB5_AP_REQ=no)]) ++ ++ if test x"$samba_cv_HAVE_TICKET_POINTER_IN_KRB5_AP_REQ" = x"yes"; then ++ AC_DEFINE(HAVE_TICKET_POINTER_IN_KRB5_AP_REQ,1, ++ [Whether the krb5_ap_req struct has a ticket pointer]) ++ fi ++ ++ AC_CACHE_CHECK([for e_data pointer in krb5_error], ++ samba_cv_HAVE_E_DATA_POINTER_IN_KRB5_ERROR,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_error err; err.e_data = NULL;], ++ samba_cv_HAVE_E_DATA_POINTER_IN_KRB5_ERROR=yes, ++ samba_cv_HAVE_E_DATA_POINTER_IN_KRB5_ERROR=no)]) ++ ++ if test x"$samba_cv_HAVE_E_DATA_POINTER_IN_KRB5_ERROR" = x"yes"; then ++ AC_DEFINE(HAVE_E_DATA_POINTER_IN_KRB5_ERROR,1, ++ [Whether the krb5_error struct has a e_data pointer]) ++ fi ++ ++ AC_CACHE_CHECK([for krb5_crypto type], ++ samba_cv_HAVE_KRB5_CRYPTO,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_crypto crypto;], ++ samba_cv_HAVE_KRB5_CRYPTO=yes, ++ samba_cv_HAVE_KRB5_CRYPTO=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_CRYPTO" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_CRYPTO,1, ++ [Whether the type krb5_crypto exists]) ++ fi ++ ++ AC_CACHE_CHECK([for addrtype in krb5_address], ++ samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_address kaddr; kaddr.addrtype = ADDRTYPE_INET;], ++ samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS=yes, ++ samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS=no)]) ++ ++ if test x"$samba_cv_HAVE_ADDRTYPE_IN_KRB5_ADDRESS" = x"yes"; then ++ AC_DEFINE(HAVE_ADDRTYPE_IN_KRB5_ADDRESS,1, ++ [Whether the krb5_address struct has a addrtype property]) ++ fi ++ ++ AC_CACHE_CHECK([for addr_type in krb5_address], ++ samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_address kaddr; kaddr.addr_type = KRB5_ADDRESS_INET;], ++ samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS=yes, ++ samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS=no)]) ++ ++ if test x"$samba_cv_HAVE_ADDR_TYPE_IN_KRB5_ADDRESS" = x"yes"; then ++ AC_DEFINE(HAVE_ADDR_TYPE_IN_KRB5_ADDRESS,1, ++ [Whether the krb5_address struct has a addr_type property]) ++ fi ++ ++ AC_CACHE_CHECK([for keyvalue in krb5_keyblock], ++ samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_keyblock key; key.keyvalue.data = NULL;], ++ samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE=yes, ++ samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_KEYBLOCK_KEYVALUE,1, ++ [Whether the krb5_keyblock struct has a keyvalue property]) ++ fi ++ ++ found_arcfour_hmac=no ++ AC_CACHE_CHECK([for ENCTYPE_ARCFOUR_HMAC_MD5], ++ samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_enctype enctype; enctype = ENCTYPE_ARCFOUR_HMAC_MD5;], ++ samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5=yes, ++ samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5=no)]) ++ AC_CACHE_CHECK([for KEYTYPE_ARCFOUR_56], ++ samba_cv_HAVE_KEYTYPE_ARCFOUR_56,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_keytype keytype; keytype = KEYTYPE_ARCFOUR_56;], ++ samba_cv_HAVE_KEYTYPE_ARCFOUR_56=yes, ++ samba_cv_HAVE_KEYTYPE_ARCFOUR_56=no)]) ++# Heimdals with KEYTYPE_ARCFOUR but not KEYTYPE_ARCFOUR_56 are broken ++# w.r.t. arcfour and windows, so we must not enable it here ++ if test x"$samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5" = x"yes" -a\ ++ x"$samba_cv_HAVE_KEYTYPE_ARCFOUR_56" = x"yes"; then ++ AC_DEFINE(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,1, ++ [Whether the ENCTYPE_ARCFOUR_HMAC_MD5 key type definition is available]) ++ found_arcfour_hmac=yes ++ fi ++ AC_CACHE_CHECK([for ENCTYPE_ARCFOUR_HMAC], ++ samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_enctype enctype; enctype = ENCTYPE_ARCFOUR_HMAC;], ++ samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC=yes, ++ samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC=no)]) ++ if test x"$samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC" = x"yes"; then ++ AC_DEFINE(HAVE_ENCTYPE_ARCFOUR_HMAC,1, ++ [Whether the ENCTYPE_ARCFOUR_HMAC key type definition is available]) ++ found_arcfour_hmac=yes ++ fi ++ ++ AC_CACHE_CHECK([for ENCTYPE_AES128_CTS_HMAC_SHA1_96], ++ samba_cv_HAVE_ENCTYPE_AES128_CTS_HMAC_SHA1_96,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_enctype enctype; enctype = ENCTYPE_AES128_CTS_HMAC_SHA1_96;], ++ samba_cv_HAVE_ENCTYPE_AES128_CTS_HMAC_SHA1_96=yes, ++ samba_cv_HAVE_ENCTYPE_AES128_CTS_HMAC_SHA1_96=no)]) ++ if test x"$samba_cv_HAVE_ENCTYPE_AES128_CTS_HMAC_SHA1_96" = x"yes"; then ++ AC_DEFINE(HAVE_ENCTYPE_AES128_CTS_HMAC_SHA1_96,1, ++ [Whether the ENCTYPE_AES128_CTS_HMAC_SHA1_96 key type definition is available]) ++ fi ++ AC_CACHE_CHECK([for ENCTYPE_AES256_CTS_HMAC_SHA1_96], ++ samba_cv_HAVE_ENCTYPE_AES256_CTS_HMAC_SHA1_96,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_enctype enctype; enctype = ENCTYPE_AES256_CTS_HMAC_SHA1_96;], ++ samba_cv_HAVE_ENCTYPE_AES256_CTS_HMAC_SHA1_96=yes, ++ samba_cv_HAVE_ENCTYPE_AES256_CTS_HMAC_SHA1_96=no)]) ++ if test x"$samba_cv_HAVE_ENCTYPE_AES256_CTS_HMAC_SHA1_96" = x"yes"; then ++ AC_DEFINE(HAVE_ENCTYPE_AES256_CTS_HMAC_SHA1_96,1, ++ [Whether the ENCTYPE_AES256_CTS_HMAC_SHA1_96 key type definition is available]) ++ fi ++ ++ AC_CACHE_CHECK([for AP_OPTS_USE_SUBKEY], ++ samba_cv_HAVE_AP_OPTS_USE_SUBKEY,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_flags ap_options; ap_options = AP_OPTS_USE_SUBKEY;], ++ samba_cv_HAVE_AP_OPTS_USE_SUBKEY=yes, ++ samba_cv_HAVE_AP_OPTS_USE_SUBKEY=no)]) ++ ++ if test x"$samba_cv_HAVE_AP_OPTS_USE_SUBKEY" = x"yes"; then ++ AC_DEFINE(HAVE_AP_OPTS_USE_SUBKEY,1, ++ [Whether the AP_OPTS_USE_SUBKEY ap option is available]) ++ fi ++ ++ AC_CACHE_CHECK([for KV5M_KEYTAB], ++ samba_cv_HAVE_KV5M_KEYTAB,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_keytab_entry entry; entry.magic = KV5M_KEYTAB;], ++ samba_cv_HAVE_KV5M_KEYTAB=yes, ++ samba_cv_HAVE_KV5M_KEYTAB=no)]) ++ ++ if test x"$samba_cv_HAVE_KV5M_KEYTAB" = x"yes"; then ++ AC_DEFINE(HAVE_KV5M_KEYTAB,1, ++ [Whether the KV5M_KEYTAB option is available]) ++ fi ++ ++ AC_CACHE_CHECK([for KRB5_KU_OTHER_CKSUM], ++ samba_cv_HAVE_KRB5_KU_OTHER_CKSUM,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_keyusage usage = KRB5_KU_OTHER_CKSUM;], ++ samba_cv_HAVE_KRB5_KU_OTHER_CKSUM=yes, ++ samba_cv_HAVE_KRB5_KU_OTHER_CKSUM=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_KU_OTHER_CKSUM" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_KU_OTHER_CKSUM,1, ++ [Whether KRB5_KU_OTHER_CKSUM is available]) ++ fi ++ ++ AC_CACHE_CHECK([for KRB5_KEYUSAGE_APP_DATA_CKSUM], ++ samba_cv_HAVE_KRB5_KEYUSAGE_APP_DATA_CKSUM,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_keyusage usage = KRB5_KEYUSAGE_APP_DATA_CKSUM;], ++ samba_cv_HAVE_KRB5_KEYUSAGE_APP_DATA_CKSUM=yes, ++ samba_cv_HAVE_KRB5_KEYUSAGE_APP_DATA_CKSUM=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_KEYUSAGE_APP_DATA_CKSUM" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_KEYUSAGE_APP_DATA_CKSUM,1, ++ [Whether KRB5_KEYUSAGE_APP_DATA_CKSUM is available]) ++ fi ++ ++ AC_CACHE_CHECK([for the krb5_princ_component macro], ++ samba_cv_HAVE_KRB5_PRINC_COMPONENT,[ ++ AC_TRY_LINK([#include <krb5.h>], ++ [const krb5_data *pkdata; krb5_context context; krb5_principal principal; pkdata = krb5_princ_component(context, principal, 0);], ++ samba_cv_HAVE_KRB5_PRINC_COMPONENT=yes, ++ samba_cv_HAVE_KRB5_PRINC_COMPONENT=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_PRINC_COMPONENT" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_PRINC_COMPONENT,1, ++ [Whether krb5_princ_component is available]) ++ fi ++ ++ AC_CACHE_CHECK([for key in krb5_keytab_entry], ++ samba_cv_HAVE_KRB5_KEYTAB_ENTRY_KEY,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_keytab_entry entry; krb5_keyblock e; entry.key = e;], ++ samba_cv_HAVE_KRB5_KEYTAB_ENTRY_KEY=yes, ++ samba_cv_HAVE_KRB5_KEYTAB_ENTRY_KEY=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_KEYTAB_ENTRY_KEY" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_KEYTAB_ENTRY_KEY,1, ++ [Whether krb5_keytab_entry has key member]) ++ fi ++ ++ AC_CACHE_CHECK([for keyblock in krb5_keytab_entry], ++ samba_cv_HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_keytab_entry entry; entry.keyblock.keytype = 0;], ++ samba_cv_HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK=yes, ++ samba_cv_HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK,1, ++ [Whether krb5_keytab_entry has keyblock member]) ++ fi ++ ++ AC_CACHE_CHECK([for magic in krb5_address], ++ samba_cv_HAVE_MAGIC_IN_KRB5_ADDRESS,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_address addr; addr.magic = 0;], ++ samba_cv_HAVE_MAGIC_IN_KRB5_ADDRESS=yes, ++ samba_cv_HAVE_MAGIC_IN_KRB5_ADDRESS=no)]) ++ ++ if test x"$samba_cv_HAVE_MAGIC_IN_KRB5_ADDRESS" = x"yes"; then ++ AC_DEFINE(HAVE_MAGIC_IN_KRB5_ADDRESS,1, ++ [Whether the krb5_address struct has a magic property]) ++ fi ++ ++ AC_CACHE_CHECK([for WRFILE: keytab support], ++ samba_cv_HAVE_WRFILE_KEYTAB,[ ++ AC_TRY_RUN([ ++#include<krb5.h> ++ main() ++ { ++ krb5_context context; ++ krb5_keytab keytab; ++ ++ krb5_init_context(&context); ++ return krb5_kt_resolve(context, "WRFILE:api", &keytab); ++ }], ++ samba_cv_HAVE_WRFILE_KEYTAB=yes, ++ samba_cv_HAVE_WRFILE_KEYTAB=no)]) ++ ++ if test x"$samba_cv_HAVE_WRFILE_KEYTAB" = x"yes"; then ++ AC_DEFINE(HAVE_WRFILE_KEYTAB,1, ++ [Whether the WRFILE:-keytab is supported]) ++ fi ++ ++ AC_CACHE_CHECK([for krb5_realm type], ++ samba_cv_HAVE_KRB5_REALM_TYPE,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_realm realm;], ++ samba_cv_HAVE_KRB5_REALM_TYPE=yes, ++ samba_cv_HAVE_KRB5_REALM_TYPE=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_REALM_TYPE" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_REALM_TYPE,1, ++ [Whether the type krb5_realm exists]) ++ fi ++ ++ AC_CACHE_CHECK([for krb5_princ_realm returns krb5_realm or krb5_data], ++ samba_cv_KRB5_PRINC_REALM_RETURNS_REALM,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [ ++ krb5_context context; ++ krb5_principal principal; ++ krb5_realm realm; realm = *krb5_princ_realm(context, principal);], ++ samba_cv_KRB5_PRINC_REALM_RETURNS_REALM=yes, ++ samba_cv_KRB5_PRINC_REALM_RETURNS_REALM=no)]) ++ ++ if test x"$samba_cv_KRB5_PRINC_REALM_RETURNS_REALM" = x"yes"; then ++ AC_DEFINE(KRB5_PRINC_REALM_RETURNS_REALM,1, ++ [Whether krb5_princ_realm returns krb5_realm or krb5_data]) ++ fi ++ ++ AC_CACHE_CHECK([for krb5_addresses type], ++ samba_cv_HAVE_KRB5_ADDRESSES,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_addresses addr;], ++ samba_cv_HAVE_KRB5_ADDRESSES=yes, ++ samba_cv_HAVE_KRB5_ADDRESSES=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_ADDRESSES" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_ADDRESSES,1, ++ [Whether the type krb5_addresses type exists]) ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_enctype_to_string" = x"yes"; then ++ AC_CACHE_CHECK([for krb5_error_code krb5_enctype_to_string(krb5_context context, krb5_enctype enctype, char **str)], ++ smb_krb5_cv_enctype_to_string_takes_krb5_context_arg,[ ++ AC_TRY_RUN_STRICT([ ++ #include <stdlib.h> ++ #include <krb5.h> ++ int main(void) { ++ krb5_context context = NULL; ++ char *str = NULL; ++ krb5_enctype_to_string(context, 1, &str); ++ if (str) free (str); ++ return 0; ++ } ++ ],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], ++ smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=yes, ++ smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=no)]) ++ ++ if test x"$smb_krb5_cv_enctype_to_string_takes_krb5_context_arg" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG,1, ++ [whether krb5_enctype_to_string takes krb5_context argument]) ++ fi ++ ++ AC_CACHE_CHECK([for krb5_error_code krb5_enctype_to_string(krb5_enctype enctype, char *str, size_t len)], ++ smb_krb5_cv_enctype_to_string_takes_size_t_arg,[ ++ AC_TRY_RUN_STRICT([ ++ #include <krb5.h> ++ int main(void) { ++ char buf[256]; ++ krb5_enctype_to_string(1, buf, 256); ++ return 0; ++ } ++ ],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], ++ smb_krb5_cv_enctype_to_string_takes_size_t_arg=yes, ++ smb_krb5_cv_enctype_to_string_takes_size_t_arg=no)]) ++ ++ if test x"$smb_krb5_cv_enctype_to_string_takes_size_t_arg" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_ENCTYPE_TO_STRING_WITH_SIZE_T_ARG,1, ++ [whether krb5_enctype_to_string takes size_t argument]) ++ fi ++ fi ++ ++ AC_CACHE_CHECK([for krb5_principal_get_realm], ++ samba_cv_HAVE_KRB5_PRINCIPAL_GET_REALM,[ ++ AC_TRY_LINK([#include <krb5.h>], ++ [krb5_context ctx = NULL; krb5_principal princ = NULL; const char *str = krb5_principal_get_realm(ctx, princ);], ++ samba_cv_HAVE_KRB5_PRINCIPAL_GET_REALM=yes, ++ samba_cv_HAVE_KRB5_PRINCIPAL_GET_REALM=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_PRINCIPAL_GET_REALM" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_PRINCIPAL_GET_REALM,1, ++ [Whether the function krb5_principal_get_realm is defined]) ++ fi ++ ++ AC_CACHE_CHECK([for krb5_princ_realm], ++ samba_cv_HAVE_KRB5_PRINC_REALM,[ ++ AC_TRY_LINK([#include <krb5.h>], ++ [krb5_context ctx = NULL; krb5_principal princ = NULL; const char *str = krb5_princ_realm(ctx, princ)->data;], ++ samba_cv_HAVE_KRB5_PRINC_REALM=yes, ++ samba_cv_HAVE_KRB5_PRINC_REALM=no)]) ++ ++ if test x"$samba_cv_HAVE_KRB5_PRINC_REALM" = x"yes"; then ++ AC_DEFINE(HAVE_KRB5_PRINC_REALM,1, ++ [Whether the macro krb5_princ_realm is defined]) ++ fi ++ ++ AC_HAVE_DECL(KRB5_PDU_NONE,[#include <krb5.h>]) ++ ++ AC_CACHE_CHECK([for flags in krb5_creds], ++ samba_cv_HAVE_FLAGS_IN_KRB5_CREDS,[ ++ AC_TRY_COMPILE([#include <krb5.h>], ++ [krb5_creds creds; creds.flags.b.initial = 0;], ++ samba_cv_HAVE_FLAGS_IN_KRB5_CREDS=yes, ++ samba_cv_HAVE_FLAGS_IN_KRB5_CREDS=no)]) ++ ++ if test x"$samba_cv_HAVE_FLAGS_IN_KRB5_CREDS" = x"yes"; then ++ AC_DEFINE(HAVE_FLAGS_IN_KRB5_CREDS,1, ++ [Whether the krb5_creds struct has a flags property]) ++ fi ++ # ++ # ++ # Now the decisions whether we can support krb5 ++ # ++ # NOTE: all tests should be done before this block! ++ # ++ # ++ if test x"$found_arcfour_hmac" != x"yes"; then ++ AC_MSG_WARN(arcfour-hmac-md5 encryption type not found in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_set_real_time" != x"yes"; then ++ AC_MSG_WARN(krb5_set_real_time encryption type not found in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_lib_ext_krb5_krb5_mk_req_extended" != x"yes"; then ++ AC_MSG_WARN(krb5_mk_req_extended not found in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_get_host_realm" != x"yes" ++ then ++ AC_MSG_WARN(krb5_get_host_realm not found in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_free_host_realm" != x"yes" ++ then ++ AC_MSG_WARN(krb5_free_host_realm not found in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_fwd_tgt_creds" != x"yes" ++ then ++ AC_MSG_WARN(krb5_fwd_tgt_creds not found in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_get_init_creds_opt_alloc" != x"yes" ++ then ++ AC_MSG_WARN(krb5_get_init_creds_opt_alloc found in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$smb_krb5_cv_creds_opt_free_context" != x"yes" ++ then ++ AC_MSG_WARN(krb5_get_init_creds_opt_free not found or was too old in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_get_renewed_creds" != x"yes" ++ then ++ AC_MSG_WARN(krb5_get_renewed_creds not found in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_principal_compare_any_realm" != x"yes" ++ then ++ AC_MSG_WARN(krb5_principal_compare_any_realm not found in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_principal2salt" != x"yes" -o \ ++ x"$ac_cv_func_ext_krb5_c_string_to_key" != x"yes" ++ then ++ if test x"$ac_cv_func_ext_krb5_get_pw_salt" != x"yes" -o \ ++ x"$ac_cv_func_ext_krb5_string_to_key_salt" != x"yes" ++ then ++ AC_MSG_WARN(no CREATE_KEY_FUNCTIONS detected) ++ use_ads=no ++ fi ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_get_permitted_enctypes" != x"yes" -a \ ++ x"$ac_cv_func_ext_krb5_get_default_in_tkt_etypes" != x"yes" ++ then ++ AC_MSG_WARN(no GET_ENCTYPES_FUNCTIONS detected) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_kt_free_entry" != x"yes" -a \ ++ x"$ac_cv_func_ext_krb5_free_keytab_entry_contents" != x"yes" ++ then ++ AC_MSG_WARN(no KT_FREE_FUNCTION detected) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_krb5_c_verify_checksum" != x"yes" ++ then ++ AC_MSG_WARN(krb5_c_verify_checksum not found in -lkrb5) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_gss_wrap_iov" != x"yes" ; then ++ AC_MSG_WARN(gss_wrap_iov not found in -lgssapi) ++ use_ads=no ++ fi ++ ++ if test x"$ac_cv_func_ext_gss_get_name_attribute" != x"yes" ; then ++ if test x"$ac_cv_func_ext_gsskrb5_extract_authz_data_from_sec_context" != x"yes" -o \ ++ x"$ac_cv_func_ext_gss_inquire_sec_context_by_oid" != x"yes" ++ then ++ AC_MSG_WARN(need either gss_get_name_attribute or gsskrb5_extract_authz_data_from_sec_context and gss_inquire_sec_context_by_oid in -lgssapi for PAC support) ++ use_ads=no ++ fi ++ fi ++ ++ if test x"$use_ads" = x"yes"; then ++ AC_DEFINE(WITH_ADS,1,[Whether to include Active Directory support]) ++ AC_DEFINE(HAVE_KRB5,1,[Whether to have KRB5 support]) ++ else ++ if test x"$with_ads_support" = x"yes"; then ++ AC_MSG_ERROR(krb5 libs don't have all features required for Active Directory support) ++ else ++ AC_MSG_WARN(krb5 libs don't have all features required for Active Directory support) ++ fi ++ AC_REMOVE_DEFINE(HAVE_KRB5_H) ++ AC_REMOVE_DEFINE(HAVE_GSSAPI_H) ++ AC_REMOVE_DEFINE(HAVE_GSSAPI_GSSAPI_GENERIC_H) ++ AC_REMOVE_DEFINE(HAVE_GSSAPI_GSSAPI_H) ++ AC_REMOVE_DEFINE(HAVE_GSSAPI) ++ KRB5_LIBS="" ++ with_ads_support=no ++ fi ++ AC_MSG_CHECKING(whether Active Directory and krb5 support is used) ++ AC_MSG_RESULT([$use_ads]) ++ ++LIBS="$ac_save_LIBS" ++fi ++ ++AC_CHECK_LIB_EXT(nscd, NSCD_LIBS, nscd_flush_cache) ++PASSDB_LIBS="$PASSDB_LIBS $NSCD_LIBS" ++ ++ ++######################################################## ++# Compile with DNS Updates support? ++ ++with_dnsupdate_support=auto ++AC_MSG_CHECKING([whether to enable DNS Updates support]) ++ ++AC_ARG_WITH(dnsupdate, ++[AS_HELP_STRING([--with-dnsupdate], [Enable DNS Updates support (default=auto)])], ++[ case "$withval" in ++ yes|no) ++ with_dnsupdate_support=$withval ++ ;; ++ esac ]) ++ ++AC_MSG_RESULT($with_dnsupdate_support) ++ ++if test x"$with_dnsupdate_support" != x"no"; then ++ ++ ################################################################ ++ # first test for AD / GSSAPI support being enabled ++ if test x"$have_gssapi" != xyes -o x"$use_ads" != xyes ; then ++ if test x"$with_dnsupdate_support" = x"yes" ; then ++ AC_MSG_ERROR(DNS Updates support only possible with AD and GSSAPI support) ++ else ++ AC_MSG_NOTICE(DNS Updates support only possible with AD and GSSAPI support) ++ with_dnsupdate_support=no ++ fi ++ fi ++fi ++ ++if test x"$with_dnsupdate_support" != x"no"; then ++ AC_DEFINE(WITH_DNS_UPDATES,1,[Whether to enable DNS Update support]) ++fi ++ ++ # finally print out the result: ++AC_MSG_CHECKING(whether DNS Updates support is used) ++AC_MSG_RESULT([$with_dnsupdate_support]) ++ ++ ++################################################# ++# check for automount support ++AC_MSG_CHECKING(whether to use automount) ++AC_ARG_WITH(automount, ++[AS_HELP_STRING([--with-automount], [Include automount support (default=no)])], ++[ case "$withval" in ++ yes) ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(WITH_AUTOMOUNT,1,[Whether to include automount support]) ++ ;; ++ *) ++ AC_MSG_RESULT(no) ++ ;; ++ esac ], ++ AC_MSG_RESULT(no) ++) ++ ++################################################# ++# Check for a PAM clear-text auth, accounts, password ++# and session support. Most PAM implementations keep their ++# headers in /usr/include/security. Darwin keeps its in ++# /usr/include/pam. ++ ++with_pam_for_crypt=no ++try_pam=auto ++AC_MSG_CHECKING(whether to try PAM support) ++AC_ARG_WITH(pam, ++[AS_HELP_STRING([--with-pam], [Include PAM support (default=auto)])], ++[ case "$withval" in ++ yes|no|auto) ++ try_pam=$withval ++ ;; ++ esac ++]) ++AC_MSG_RESULT([$try_pam]) ++ ++use_pam=no ++create_pam_modules=no ++if test x"${try_pam}" != x"no";then ++ use_pam=yes ++ create_pam_modules=yes ++ ++ # Most systems have PAM headers in /usr/include/security, but Darwin ++ # has them in /usr/include/pam. ++ AC_CHECK_HEADERS(security/pam_appl.h pam/pam_appl.h) ++ if test x"$ac_cv_header_security_pam_appl_h" != x"yes" -a \ ++ x"$ac_cv_header_pam_pam_appl_h" != x"yes"; then ++ if test x"${try_pam}" = x"yes";then ++ AC_MSG_ERROR([--with-pam=yes but pam_appl.h not found]) ++ fi ++ use_pam=no ++ create_pam_modules=no ++ fi ++ ++ AC_CHECK_LIB_EXT(pam, PAM_LIBS, pam_get_data) ++ if test x"$ac_cv_lib_ext_pam_pam_get_data" != x"yes"; then ++ if test x"${try_pam}" = x"yes";then ++ AC_MSG_ERROR([--with-pam=yes but libpam not found]) ++ fi ++ use_pam=no ++ create_pam_modules=no ++ fi ++ ++ AC_CHECK_HEADERS(security/pam_modules.h pam/pam_modules.h,,,[[ ++ #if HAVE_SECURITY_PAM_APPL_H ++ #include <security/pam_appl.h> ++ #endif ++ #if HAVE_PAM_PAM_APPL_H ++ #include <pam/pam_appl.h> ++ #endif ++ ]]) ++ if test x"$ac_cv_header_security_pam_modules_h" = x"no" -a \ ++ x"$ac_cv_header_pam_pam_modules_h" = x"no" ; then ++ if test x"${try_pam}" = x"yes";then ++ AC_MSG_ERROR([--with-pam=yes but pam_modules.h not found]) ++ fi ++ create_pam_modules=no ++ fi ++ ++ if test x"$use_pam" = x"yes"; then ++ AC_DEFINE(WITH_PAM,1,[Whether to include PAM support]) ++ AC_DEFINE(HAVE_LIBPAM,1,[Whether libpam is available]) ++ AUTH_LIBS="$AUTH_LIBS $PAM_LIBS" ++ with_pam_for_crypt=yes ++ ++ if test x"$create_pam_modules" = x"yes"; then ++ AC_DEFINE(WITH_PAM_MODULES,1,[Whether to include PAM MODULES support]) ++ # this checks are optional, ++ # we don't care about the results here ++ AC_CHECK_HEADERS(security/pam_ext.h security/_pam_macros.h) ++ AC_CHECK_HEADERS(pam/pam_ext.h pam/_pam_macros.h) ++ AC_CHECK_FUNC_EXT(pam_vsyslog,$PAM_LIBS) ++ else ++ AC_MSG_WARN([PAM support detected but PAM MODULES support is missing]) ++ fi ++ fi ++ AC_MSG_CHECKING(whether to use PAM support) ++ AC_MSG_RESULT([$use_pam]) ++ ++ AC_MSG_CHECKING(whether to have PAM MODULES support) ++ AC_MSG_RESULT([$create_pam_modules]) ++ ++ AC_TRY_COMPILE([ ++ #if defined(HAVE_SECURITY_PAM_APPL_H) ++ #include <security/pam_appl.h> ++ #elif defined(HAVE_PAM_PAM_APPL_H) ++ #include <pam/pam_appl.h> ++ #endif],[ ++ pam_set_item(0, PAM_RHOST, 0); ++ ], ++ AC_DEFINE(HAVE_PAM_RHOST, 1, ++ [Define to 1 if PAM_RHOST is available]),[]) ++ ++ AC_TRY_COMPILE([ ++ #if defined(HAVE_SECURITY_PAM_APPL_H) ++ #include <security/pam_appl.h> ++ #elif defined(HAVE_PAM_PAM_APPL_H) ++ #include <pam/pam_appl.h> ++ #endif],[ ++ pam_set_item(0, PAM_TTY, 0); ++ ], ++ AC_DEFINE(HAVE_PAM_TTY, 1, ++ [Define to 1 if PAM_TTY is available]),[]) ++ ++fi # try_pam != no ++ ++################################################# ++# check for PAM_RADIO_TYPE ++AC_TRY_COMPILE([ ++#if (!defined(LINUX)) ++ ++#define PAM_EXTERN extern ++#if defined(HAVE_SECURITY_PAM_APPL_H) ++#include <security/pam_appl.h> ++#elif defined(HAVE_PAM_PAM_APPL_H) ++#include <pam/pam_appl.h> ++#endif ++ ++#endif ++ ++#if defined(HAVE_SECURITY_PAM_MODULES_H) ++#include <security/pam_modules.h> ++#elif defined(HAVE_PAM_PAM_MODULES_H) ++#include <pam/pam_modules.h> ++#endif ++ ++#if defined(HAVE_SECURITY__PAM_MACROS_H) ++#include <security/_pam_macros.h> ++#elif defined(HAVE_PAM__PAM_MACROS_H) ++#include <pam/_pam_macros.h> ++#endif ++ ++#ifdef HAVE_SECURITY_PAM_EXT_H ++#include <security/pam_ext.h> ++#endif ++], ++[int i; i = PAM_RADIO_TYPE; ], ++AC_DEFINE(HAVE_PAM_RADIO_TYPE, 1, [Define to 1 if PAM_RADIO_TYPE is available]),[]) ++ ++################################################# ++# check for pam_smbpass support ++PAM_MODULES="" ++INSTALL_PAM_MODULES="" ++UNINSTALL_PAM_MODULES="" ++ ++try_pam_smbpass=auto ++AC_MSG_CHECKING(whether to use pam_smbpass) ++AC_ARG_WITH(pam_smbpass, ++[AS_HELP_STRING([--with-pam_smbpass], [Build PAM module for authenticating against passdb backends (default=auto)])], ++[ case "$withval" in ++ yes|no|auto) ++ try_pam_smbpass=$withval ++ ;; ++ *) ++ AC_MSG_ERROR([valid options are yes,no,auto]) ++ ;; ++ esac ++]) ++ ++if test x"${try_pam_smbpass}" = xno ; then ++ use_pam_smbpass=no ++else ++ use_pam_smbpass=yes ++ # Conditions under which pam_smbpass can't be built. ++ if test x"$BLDSHARED" != xtrue ; then ++ if test x"${try_pam_smbpass}" = xyes ; then ++ AC_MSG_ERROR([No support for shared modules]) ++ fi ++ use_pam_smbpass=no ++ elif test x"$create_pam_modules" != xyes ; then ++ if test x"${try_pam_smbpass}" = xyes ; then ++ AC_MSG_ERROR([No support for PAM MODULES]) ++ fi ++ use_pam_smbpass=no ++ fi ++ ++ if test x"${use_pam_smbpass}" = xyes ; then ++ PAM_MODULES="pam_smbpass" ++ INSTALL_PAM_MODULES="installpammodules" ++ UNINSTALL_PAM_MODULES="uninstallpammodules" ++ fi ++fi ++AC_MSG_RESULT([$use_pam_smbpass]) ++ ++ ++## ++## moved after the check for -lcrypt in order to ++## ensure that the necessary libraries are included ++## check checking for truncated salt. Wrapped by the ++## $with_pam_for_crypt variable as above --jerry ++## ++if test $with_pam_for_crypt = no; then ++AC_CACHE_CHECK([for a crypt that needs truncated salt],samba_cv_HAVE_TRUNCATED_SALT,[ ++crypt_LIBS="$LIBS" ++LIBS="$AUTH_LIBS $LIBS" ++AC_TRY_RUN([#include "${srcdir-.}/../tests/crypttest.c"], ++ samba_cv_HAVE_TRUNCATED_SALT=no,samba_cv_HAVE_TRUNCATED_SALT=yes,samba_cv_HAVE_TRUNCATED_SALT=cross) ++LIBS="$crypt_LIBS"]) ++if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then ++ AC_DEFINE(HAVE_TRUNCATED_SALT,1,[Whether crypt needs truncated salt]) ++fi ++fi ++ ++################################################# ++# check for a NISPLUS_HOME support ++AC_MSG_CHECKING(whether to use NISPLUS_HOME) ++AC_ARG_WITH(nisplus-home, ++[AS_HELP_STRING([--with-nisplus-home], [Include NISPLUS_HOME support (default=no)])], ++[ case "$withval" in ++ yes) ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(WITH_NISPLUS_HOME,1,[Whether to include nisplus_home support]) ++ ;; ++ *) ++ AC_MSG_RESULT(no) ++ ;; ++ esac ], ++ AC_MSG_RESULT(no) ++) ++ ++################################################# ++# check for syslog logging ++AC_MSG_CHECKING(whether to use syslog logging) ++AC_ARG_WITH(syslog, ++[AS_HELP_STRING([--with-syslog], [Include experimental SYSLOG support (default=no)])], ++[ case "$withval" in ++ yes) ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(WITH_SYSLOG,1,[Whether to include experimental syslog support]) ++ ;; ++ *) ++ AC_MSG_RESULT(no) ++ ;; ++ esac ], ++ AC_MSG_RESULT(no) ++) ++ ++################################################# ++# check for custom syslog facility ++AC_MSG_CHECKING(whether to use a custom syslog facility) ++AC_ARG_WITH(syslog-facility, ++[AS_HELP_STRING([--with-syslog-facility], [Use a custom syslog facility (default=none)])], ++[ ++ if test "$withval" = "no" ; then ++ AC_MSG_ERROR([argument to --with-syslog-facility must be a string]) ++ else ++ AC_MSG_RESULT([$withval]) ++ if test "$withval" != "yes" ; then ++ syslog_facility="$withval" ++ AC_DEFINE_UNQUOTED(SYSLOG_FACILITY,$syslog_facility, [syslog facility to log to]) ++ fi ++ fi ++], ++AC_MSG_RESULT(no) ++) ++ ++################################################# ++# check for experimental disk-quotas support ++ ++samba_cv_WITH_QUOTAS=auto ++samba_cv_SYSQUOTA_FOUND=no ++ ++AC_MSG_CHECKING(whether to try disk-quotas support) ++AC_ARG_WITH(quotas, ++[AS_HELP_STRING([--with-quotas], [Include disk-quota support (default=no)])], ++[ case "$withval" in ++ yes) ++ AC_MSG_RESULT(yes) ++ samba_cv_WITH_QUOTAS=yes ++ ;; ++ auto) ++ AC_MSG_RESULT(auto) ++ samba_cv_WITH_QUOTAS=auto ++ ;; ++ no) ++ AC_MSG_RESULT(no) ++ samba_cv_WITH_QUOTAS=no ++ ;; ++ *) ++ AC_MSG_RESULT(${samba_cv_WITH_QUOTAS}) ++ ;; ++ esac ], ++ AC_MSG_RESULT(${samba_cv_WITH_QUOTAS}) ++) ++ ++############################################# ++# only check for quota stuff if --with-quotas ++if test x"$samba_cv_WITH_QUOTAS" != x"no"; then ++ ++case "$host_os" in ++ # on linux we didn't need to test we have builtin support ++ *linux*) ++ samba_cv_SYSQUOTA_FOUND=yes ++ AC_DEFINE(HAVE_QUOTACTL_LINUX,1,[Whether Linux quota support is available]) ++ AC_MSG_CHECKING(whether to use the lib/sysquotas_linux.c builtin support) ++ AC_MSG_RESULT(yes) ++ ++ AC_MSG_CHECKING(whether to use the lib/sysquotas_xfs.c builtin support) ++ AC_MSG_RESULT(yes) ++ ;; ++ *solaris*) ++ # need to set this define when using static linking (BUG 1473) ++ CPPFLAGS="$CPPFLAGS -DSUNOS5" ++ ;; ++ *) ++ ;; ++esac ++ ++# some broken header files need this ++AC_CHECK_HEADER(asm/types.h,[ ++ AC_DEFINE(HAVE_ASM_TYPES_H,1,[check for <asm/types.h>]) ++ AC_ADD_INCLUDE(<asm/types.h>) ++ ]) ++ ++# For quotas on Veritas VxFS filesystems ++AC_CHECK_HEADERS(sys/fs/vx_quota.h) ++ ++# For quotas on XFS filesystems, Linux style ++AC_CHECK_HEADERS(xfs/xqm.h,[ ++ AC_DEFINE(HAVE_XFS_QUOTAS,1,[Whether xfs quota support is available]) ++ ]) ++ ++# For sys/quota.h and linux/quota.h ++AC_CHECK_HEADERS(sys/quota.h) ++ ++# For quotas on BSD systems ++AC_CHECK_HEADERS(ufs/ufs/quota.h) ++ ++ ++if test x"$ac_cv_header_xfs_xqm_h" != x"yes"; then ++# if we have xfs quota support <sys/quota.h> (IRIX) we should use it ++AC_CACHE_CHECK([for XFS QUOTA in <sys/quota.h>],samba_cv_HAVE_SYS_QUOTA_XFS, [ ++AC_TRY_COMPILE([ ++#include "confdefs.h" ++#ifdef HAVE_SYS_TYPES_H ++#include <sys/types.h> ++#endif ++#ifdef HAVE_ASM_TYPES_H ++#include <asm/types.h> ++#endif ++#include <sys/quota.h> ++],[int i = Q_XGETQUOTA;], ++samba_cv_HAVE_SYS_QUOTA_XFS=yes,samba_cv_HAVE_SYS_QUOTA_XFS=no)]) ++if test "$samba_cv_HAVE_SYS_QUOTA_XFS"x = "yes"x; then ++ AC_DEFINE(HAVE_XFS_QUOTAS,1,[Whether xfs quota support is available]) ++fi ++fi ++ ++# if we have struct dqblk .dqb_fsoftlimit instead of .dqb_isoftlimit on IRIX ++AC_CACHE_CHECK([if struct dqblk has .dqb_fsoftlimit],samba_cv_HAVE_DQB_FSOFTLIMIT, [ ++AC_TRY_COMPILE([ ++#include "confdefs.h" ++#ifdef HAVE_SYS_QUOTA_H ++#include <sys/quota.h> ++#endif ++],[ ++struct dqblk D; ++D.dqb_fsoftlimit = 0;], ++samba_cv_HAVE_DQB_FSOFTLIMIT=yes,samba_cv_HAVE_DQB_FSOFTLIMIT=no)]) ++if test "$samba_cv_HAVE_DQB_FSOFTLIMIT"x = "yes"x; then ++ AC_DEFINE(HAVE_DQB_FSOFTLIMIT,1,[struct dqblk .dqb_fsoftlimit]) ++fi ++ ++################## ++# look for a working quota system ++ ++if test x"$samba_cv_SYSQUOTA_FOUND" != x"yes"; then ++AC_CACHE_CHECK([for long quotactl(int cmd, char *special, qid_t id, caddr_t addr)],samba_cv_HAVE_QUOTACTL_4A,[ ++AC_TRY_RUN_STRICT([ ++#define HAVE_QUOTACTL_4A 1 ++#define AUTOCONF_TEST 1 ++#include "confdefs.h" ++#include "${srcdir-.}/../../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], ++ samba_cv_HAVE_QUOTACTL_4A=yes,samba_cv_HAVE_QUOTACTL_4A=no,samba_cv_HAVE_QUOTACTL_4A=cross)]) ++if test x"$samba_cv_HAVE_QUOTACTL_4A" = x"yes"; then ++ samba_cv_SYSQUOTA_FOUND=yes; ++ AC_DEFINE(HAVE_QUOTACTL_4A,1,[Whether long quotactl(int cmd, char *special, qid_t id, caddr_t addr) is available]) ++fi ++fi ++ ++if test x"$samba_cv_SYSQUOTA_FOUND" != x"yes"; then ++AC_CACHE_CHECK([for int quotactl(const char *path, int cmd, int id, char *addr)],samba_cv_HAVE_QUOTACTL_4B,[ ++AC_TRY_RUN_STRICT([ ++#define HAVE_QUOTACTL_4B 1 ++#define AUTOCONF_TEST 1 ++#include "confdefs.h" ++#include "${srcdir-.}/../../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], ++ samba_cv_HAVE_QUOTACTL_4B=yes,samba_cv_HAVE_QUOTACTL_4B=no,samba_cv_HAVE_QUOTACTL_4B=cross)]) ++if test x"$samba_cv_HAVE_QUOTACTL_4B" = x"yes"; then ++ samba_cv_SYSQUOTA_FOUND=yes; ++ AC_DEFINE(HAVE_QUOTACTL_4B,1,[Whether int quotactl(const char *path, int cmd, int id, char *addr) is available]) ++ AC_CHECK_MEMBERS([struct dqblk.dqb_curbytes], # Darwin bytecount style ++ [ AC_DEFINE([HAVE_STRUCT_DQBLK_DQB_CURBYTES],[1],[darwin style quota bytecount])],, ++ [#include <sys/types.h> ++ #include <sys/quota.h>]) ++ ++fi ++fi ++ ++AC_CACHE_CHECK([for NFS QUOTAS],samba_cv_HAVE_NFS_QUOTAS,[ ++AC_TRY_COMPILE([ ++#include <rpc/rpc.h> ++#include <rpc/types.h> ++#include <rpcsvc/rquota.h> ++#ifdef HAVE_RPC_NETTYPE_H ++#include <rpc/nettype.h> ++#endif ++#include <rpc/xdr.h> ++],[clnt_create("", RQUOTAPROG, RQUOTAVERS, "udp");], ++ samba_cv_HAVE_NFS_QUOTAS=yes, samba_cv_HAVE_NFS_QUOTAS=no)]) ++ ++if test x"$samba_cv_HAVE_NFS_QUOTAS" = x"yes"; then ++ AC_DEFINE(HAVE_NFS_QUOTAS,1,[NFS quota support is available]) ++ AC_CHECK_MEMBER(struct getquota_rslt.getquota_rslt_u, ++ AC_DEFINE(HAVE_GETQUOTA_RSLT_GETQUOTA_RSLT_U, 1, [Defined if struct getquota_rslt has getquota_rslt_u]),, ++ [#include <rpcsvc/rquota.h>]) ++fi ++ ++################################################# ++# check for mntent.h and struct mntent ++AC_CHECK_HEADERS(mntent.h) ++################################################# ++# check for setmntent,getmntent,endmntent ++AC_CHECK_FUNCS(setmntent getmntent endmntent) ++ ++################################################# ++# check for devnm.h and struct mntent ++AC_CHECK_HEADERS(devnm.h) ++################################################# ++# check for devnm ++AC_CHECK_FUNCS(devnm) ++ ++AC_MSG_CHECKING(whether to use the new lib/sysquotas.c interface) ++if test x"$samba_cv_SYSQUOTA_FOUND" = x"yes"; then ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(WITH_QUOTAS,1,[Whether to use disk quota support]) ++ AC_DEFINE(HAVE_SYS_QUOTAS,1,[Whether the new lib/sysquotas.c interface can be used]) ++else ++ AC_MSG_RESULT(no) ++ AC_MSG_CHECKING(whether to use the old quota support) ++ if test x"$samba_cv_WITH_QUOTAS" = x"yes"; then ++ AC_DEFINE(WITH_QUOTAS,1,[Whether to use old quota support]) ++ AC_MSG_RESULT(yes) ++ else ++ AC_MSG_RESULT(no) ++ fi ++fi ++ ++#################### ++# End of quota check samba_cv_WITH_QUOTAS ++fi ++ ++################################################# ++# check for experimental utmp accounting ++ ++AC_MSG_CHECKING(whether to support utmp accounting) ++WITH_UTMP=yes ++AC_ARG_WITH(utmp, ++[AS_HELP_STRING([--with-utmp], [Include utmp accounting (default, if supported by OS)])], ++[ case "$withval" in ++ no) ++ WITH_UTMP=no ++ ;; ++ *) ++ WITH_UTMP=yes ++ ;; ++ esac ], ++) ++ ++# utmp requires utmp.h ++# Note similar check earlier, when checking utmp details. ++ ++if test x"$WITH_UTMP" = x"yes" -a x"$ac_cv_header_utmp_h" = x"no"; then ++ utmp_no_reason=", no utmp.h on $host_os" ++ WITH_UTMP=no ++fi ++ ++if test x"$WITH_UTMP" = x"yes" -a x"$samba_cv_HAVE_UX_UT_LINE" != x"yes"; then ++ utmp_no_reason=", sizeof ut_line not ok" ++ WITH_UTMP=no ++fi ++ ++# Display test results ++ ++if test x"$WITH_UTMP" = x"yes"; then ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(WITH_UTMP,1,[Whether to include experimental utmp accounting]) ++else ++ AC_MSG_RESULT(no$utmp_no_reason) ++fi ++ ++ ++################################################# ++# these tests are taken from the GNU fileutils package ++AC_CHECKING(how to get filesystem space usage) ++space=no ++ ++# Perform only the link test since it seems there are no variants of the ++# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) ++# because that got a false positive on SCO OSR5. Adding the declaration ++# of a `struct statvfs' causes this test to fail (as it should) on such ++# systems. That system is reported to work fine with STAT_STATFS4 which ++# is what it gets when this test fails. ++if test $space = no; then ++ # SVR4 ++ AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs, ++ [AC_TRY_LINK([#include <sys/types.h> ++#include <sys/statvfs.h>], ++ [struct statvfs fsd; statvfs (0, &fsd);], ++ fu_cv_sys_stat_statvfs=yes, ++ fu_cv_sys_stat_statvfs=no)]) ++ if test $fu_cv_sys_stat_statvfs = yes; then ++ space=yes ++ AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available]) ++ fi ++fi ++ ++# smbd/statvfs.c assumes that statvfs.f_fsid is an integer. ++# This is not the case on ancient Linux systems. ++ ++AC_CACHE_CHECK([that statvfs.f_fsid is an integer],samba_cv_fsid_int, [ ++ AC_TRY_COMPILE([#include <sys/types.h> ++#include <sys/statvfs.h>],[struct statvfs buf; buf.f_fsid = 0], ++ samba_cv_fsid_int=yes,samba_cv_fsid_int=no)]) ++if test x"$samba_cv_fsid_int" = x"yes"; then ++ AC_DEFINE(HAVE_FSID_INT, 1, [Whether statvfs.f_fsid is an integer]) ++fi ++ ++# fsusage.c assumes that statvfs has an f_frsize entry. Some weird ++# systems use f_bsize. ++AC_CACHE_CHECK([that statvfs.f_frsize works],samba_cv_frsize, [ ++ AC_TRY_COMPILE([#include <sys/types.h> ++#include <sys/statvfs.h>],[struct statvfs buf; buf.f_frsize = 0], ++ samba_cv_frsize=yes,samba_cv_frsize=no)]) ++if test x"$samba_cv_frsize" = x"yes"; then ++ AC_DEFINE(HAVE_FRSIZE, 1, [Whether statvfs.f_frsize exists]) ++fi ++ ++# Some systems use f_flag in struct statvfs while others use f_flags ++AC_CACHE_CHECK([that statvfs.statvfs_f_flag works],samba_cv_statvfs_f_flag, [ ++ AC_TRY_COMPILE([#include <sys/types.h> ++#include <sys/statvfs.h>],[struct statvfs buf; buf.f_flag = 0], ++ samba_cv_statvfs_f_flag=yes,samba_cv_statvfs_f_flag=no)]) ++if test x"$samba_cv_statvfs_f_flag" = x"yes"; then ++ AC_DEFINE(HAVE_STATVFS_F_FLAG, 1, [Whether statvfs.f_flag exists]) ++fi ++ ++AC_CACHE_CHECK([that statvfs.statvfs_f_flags works],samba_cv_statvfs_f_flags, [ ++ AC_TRY_COMPILE([#include <sys/types.h> ++#include <sys/statvfs.h>],[struct statvfs buf; buf.f_flags = 0], ++ samba_cv_statvfs_f_flags=yes,samba_cv_statvfs_f_flags=no)]) ++if test x"$samba_cv_statvfs_f_flags" = x"yes"; then ++ AC_DEFINE(HAVE_STATVFS_F_FLAGS, 1, [Whether statvfs.f_flags exists]) ++fi ++ ++if test $space = no; then ++ # DEC Alpha running OSF/1 ++ AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) ++ AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1, ++ [AC_TRY_RUN([ ++#include <sys/param.h> ++#include <sys/types.h> ++#include <sys/mount.h> ++ main () ++ { ++ struct statfs fsd; ++ fsd.f_fsize = 0; ++ return (statfs (".", &fsd, sizeof (struct statfs))); ++ }], ++ fu_cv_sys_stat_statfs3_osf1=yes, ++ fu_cv_sys_stat_statfs3_osf1=no, ++ fu_cv_sys_stat_statfs3_osf1=no)]) ++ AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) ++ if test $fu_cv_sys_stat_statfs3_osf1 = yes; then ++ space=yes ++ AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments]) ++ fi ++fi ++ ++if test $space = no; then ++# AIX ++ AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl ++member (AIX, 4.3BSD)]) ++ AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize, ++ [AC_TRY_RUN([ ++#ifdef HAVE_SYS_PARAM_H ++#include <sys/param.h> ++#endif ++#ifdef HAVE_SYS_MOUNT_H ++#include <sys/mount.h> ++#endif ++#ifdef HAVE_SYS_VFS_H ++#include <sys/vfs.h> ++#endif ++ main () ++ { ++ struct statfs fsd; ++ fsd.f_bsize = 0; ++ return (statfs (".", &fsd)); ++ }], ++ fu_cv_sys_stat_statfs2_bsize=yes, ++ fu_cv_sys_stat_statfs2_bsize=no, ++ fu_cv_sys_stat_statfs2_bsize=no)]) ++ AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) ++ if test $fu_cv_sys_stat_statfs2_bsize = yes; then ++ space=yes ++ AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property]) ++ fi ++fi ++ ++if test $space = no; then ++# SVR3 ++ AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) ++ AC_CACHE_VAL(fu_cv_sys_stat_statfs4, ++ [AC_TRY_RUN([#include <sys/types.h> ++#include <sys/statfs.h> ++ main () ++ { ++ struct statfs fsd; ++ return (statfs (".", &fsd, sizeof fsd, 0)); ++ }], ++ fu_cv_sys_stat_statfs4=yes, ++ fu_cv_sys_stat_statfs4=no, ++ fu_cv_sys_stat_statfs4=no)]) ++ AC_MSG_RESULT($fu_cv_sys_stat_statfs4) ++ if test $fu_cv_sys_stat_statfs4 = yes; then ++ space=yes ++ AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments]) ++ fi ++fi ++ ++if test $space = no; then ++# 4.4BSD and NetBSD ++ AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl ++member (4.4BSD and NetBSD)]) ++ AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize, ++ [AC_TRY_RUN([#include <sys/types.h> ++#ifdef HAVE_SYS_PARAM_H ++#include <sys/param.h> ++#endif ++#ifdef HAVE_SYS_MOUNT_H ++#include <sys/mount.h> ++#endif ++ main () ++ { ++ struct statfs fsd; ++ fsd.f_fsize = 0; ++ return (statfs (".", &fsd)); ++ }], ++ fu_cv_sys_stat_statfs2_fsize=yes, ++ fu_cv_sys_stat_statfs2_fsize=no, ++ fu_cv_sys_stat_statfs2_fsize=no)]) ++ AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) ++ if test $fu_cv_sys_stat_statfs2_fsize = yes; then ++ space=yes ++ AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize]) ++ fi ++fi ++ ++if test $space = no; then ++ # Ultrix ++ AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) ++ AC_CACHE_VAL(fu_cv_sys_stat_fs_data, ++ [AC_TRY_RUN([#include <sys/types.h> ++#ifdef HAVE_SYS_PARAM_H ++#include <sys/param.h> ++#endif ++#ifdef HAVE_SYS_MOUNT_H ++#include <sys/mount.h> ++#endif ++#ifdef HAVE_SYS_FS_TYPES_H ++#include <sys/fs_types.h> ++#endif ++ main () ++ { ++ struct fs_data fsd; ++ /* Ultrix's statfs returns 1 for success, ++ 0 for not mounted, -1 for failure. */ ++ return (statfs (".", &fsd) != 1); ++ }], ++ fu_cv_sys_stat_fs_data=yes, ++ fu_cv_sys_stat_fs_data=no, ++ fu_cv_sys_stat_fs_data=no)]) ++ AC_MSG_RESULT($fu_cv_sys_stat_fs_data) ++ if test $fu_cv_sys_stat_fs_data = yes; then ++ space=yes ++ AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available]) ++ fi ++fi ++ ++################################################# ++# check for cluster extensions ++ ++AC_MSG_CHECKING(cluster support) ++AC_ARG_WITH(cluster-support, ++[AS_HELP_STRING([--with-cluster-support], [Enable cluster extensions (default=auto)])]) ++ ++if test x"$with_cluster_support" = x ; then ++ with_cluster_support="auto" ++fi ++ ++AC_MSG_RESULT($with_cluster_support) ++ ++AC_ARG_WITH(ctdb, ++[AS_HELP_STRING([--with-ctdb=DIR], [Where to find ctdb sources])], ++[ case "$withval" in ++ yes|no) ++ AC_MSG_WARN([--with-ctdb called without argument]) ++ ;; ++ *) ++ CTDB_CPPFLAGS="-I$withval/include" ++ ;; ++ esac]) ++ ++AC_ARG_ENABLE(old-ctdb, ++ [AS_HELP_STRING([--enable-old-ctdb], ++ [Enable build against (too) old ctdb version (default=no)])],, ++ [enable_old_ctdb=no]) ++ ++ ++if test "$with_cluster_support" != "no" ; then ++ ++AC_MSG_NOTICE(checking whether cluster support is available) ++ ++have_cluster_support="yes" ++ctdb_broken="no" ++ ++SAVED_CPPFLAGS="$CPPFLAGS" ++CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS} $CTDB_CPPFLAGS" ++ ++AC_CHECK_HEADERS(ctdb.h ctdb_private.h ctdb_protocol.h ,,,[ ++#include "confdefs.h" ++#define NO_CONFIG_H ++#include "replace.h" ++#include "system/wait.h" ++#include "system/network.h" ++#define private #error __USED_RESERVED_WORD_private__ ++#include <talloc.h> ++#include <tdb.h> ++#include <ctdb.h> ++]) ++ ++if test "x$have_cluster_support" = "xyes" -a \ ++ "x$ac_cv_header_ctdb_h" != "xyes" ++then ++ have_cluster_support=no ++ ctdb_broken="ctdb.h is required for cluster support" ++fi ++ ++if test "x$have_cluster_support" = "xyes" -a \ ++ "x$ac_cv_header_ctdb_private_h" != "xyes" ++then ++ have_cluster_support=no ++ ctdb_broken="ctdb_private.h is required for cluster support" ++fi ++ ++ ++if test "x$have_cluster_support" = "xyes" ; then ++ AC_HAVE_DECL(CTDB_CONTROL_TRANS3_COMMIT,[ ++ #include "confdefs.h" ++ #define NO_CONFIG_H ++ #include "replace.h" ++ #include "system/wait.h" ++ #include "system/network.h" ++ #include <talloc.h> ++ #include <tdb.h> ++ #include <ctdb.h> ++ #include <ctdb_private.h> ++ ]) ++ if test x"$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" != x"yes"; then ++ ctdb_broken="ctdb transaction support missing or too old" ++ have_cluster_support=no ++ fi ++fi ++ ++if test "x$have_cluster_support" = "xyes" ; then ++ AC_HAVE_DECL(CTDB_CONTROL_SCHEDULE_FOR_DELETION,[ ++ #include "confdefs.h" ++ #define NO_CONFIG_H ++ #include "replace.h" ++ #include "system/wait.h" ++ #include "system/network.h" ++ #include <talloc.h> ++ #include <tdb.h> ++ #include <ctdb.h> ++ #include <ctdb_private.h> ++ ]) ++ if test x"$ac_cv_have_CTDB_CONTROL_SCHEDULE_FOR_DELETION_decl" != x"yes" ++ then ++ if test "x$enable_old_ctdb" = "xyes" ; then ++ AC_MSG_WARN([ignoring missing SCHEDULE_FOR_DELETION (--enable-old-ctdb)]) ++ else ++ ctdb_broken="support for SCHEDULE_FOR_DELETION control missing" ++ have_cluster_support=no ++ fi ++ fi ++fi ++ ++if test "x$have_cluster_support" = "xyes" ; then ++ AC_HAVE_DECL(CTDB_CONTROL_CHECK_SRVIDS,[ ++ #include "confdefs.h" ++ #define NO_CONFIG_H ++ #include "replace.h" ++ #include "system/wait.h" ++ #include "system/network.h" ++ #include <talloc.h> ++ #include <tdb.h> ++ #include <ctdb.h> ++ #include <ctdb_private.h> ++ ]) ++ if test x"$ac_cv_have_CTDB_CONTROL_CHECK_SRVIDS_decl" != x"yes" ++ then ++ if test "x$enable_old_ctdb" = "xyes" ; then ++ AC_MSG_WARN([ignoring missing CHECK_SRVIDS (--enable-old-ctdb)]) ++ else ++ ctdb_broken="support for CHECK_SRVIDS control missing" ++ have_cluster_support=no ++ fi ++ fi ++fi ++ ++AC_ARG_ENABLE([ctdb-readonly-records], ++ AS_HELP_STRING([--enable-ctdb-readonly-records], ++ [Turn on CTDB readonly records support (default=yes)]), ++ [want_ctdb_readonly=$enableval], ++ [want_ctdb_readonly=yes]) ++ ++if test "x$have_cluster_support" = "xyes" -a "x$want_ctdb_readonly" = "xyes" ; then ++ AC_HAVE_DECL(CTDB_WANT_READONLY,[ ++ #include "confdefs.h" ++ #define NO_CONFIG_H ++ #include "replace.h" ++ #include "system/wait.h" ++ #include "system/network.h" ++ #include <talloc.h> ++ #include <tdb.h> ++ #include <ctdb.h> ++ ]) ++ ++ if test "x$ac_cv_have_CTDB_WANT_READONLY_decl" != "xyes" ; then ++ if test "x$enable_old_ctdb" = "xyes" ; then ++ AC_MSG_WARN([ignoring missing READONLY support (--enable-old-ctdb)]) ++ else ++ ctdb_broken="support for CTDB readonly records missing" ++ have_cluster_support=no ++ fi ++ fi ++fi ++ ++if test "x$have_cluster_support" = "xyes" ; then ++ # In ctdb 1.0.57, ctdb_control_tcp was temporarily renamed ++ # to ctdb_tcp_client. ++ AC_CHECK_TYPE(struct ctdb_tcp_client,[ ++ AC_DEFINE([ctdb_control_tcp],[ctdb_tcp_client],[ctdb ipv4 support]) ++ ],,[ ++ #include "confdefs.h" ++ #define NO_CONFIG_H ++ #include "replace.h" ++ #include "system/wait.h" ++ #include "system/network.h" ++ #include <talloc.h> ++ #include <tdb.h> ++ #include <ctdb.h> ++ #include <ctdb_private.h> ++ ]) ++fi ++ ++if test "x$have_cluster_support" = "xyes" ; then ++ AC_CHECK_TYPE(struct ctdb_control_tcp,[ ++ AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP],[1],[ctdb ipv4 support]) ++ ],[ ++ ctdb_broken="missing struct ctdb_control_tcp" ++ have_cluster_support=no ++ ],[ ++ #include "confdefs.h" ++ #define NO_CONFIG_H ++ #include "replace.h" ++ #include "system/wait.h" ++ #include "system/network.h" ++ #include <talloc.h> ++ #include <tdb.h> ++ #include <ctdb.h> ++ #include <ctdb_private.h> ++ ]) ++fi ++ ++# test for optional ipv6 support in ctdb: ++if test "x$have_cluster_support" = "xyes" ; then ++ AC_CHECK_TYPE(struct ctdb_control_tcp_addr,[ ++ AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR],[1],[ctdb ipv6 support]) ++ ],,[ ++ #include "confdefs.h" ++ #define NO_CONFIG_H ++ #include "replace.h" ++ #include "system/wait.h" ++ #include "system/network.h" ++ #include <talloc.h> ++ #include <tdb.h> ++ #include <ctdb.h> ++ #include <ctdb_private.h> ++ ]) ++fi ++ ++CPPFLAGS="$SAVED_CPPFLAGS" ++ ++fi # (if test "$with_cluster_support" != "no") ++ ++if test x"$have_cluster_support" = "xno" ; then ++ case "$with_cluster_support" in ++ yes) ++ AC_MSG_ERROR(["cluster support not available: $ctdb_broken"]) ++ ;; ++ auto) ++ AC_MSG_WARN(["cluster support not available: $ctdb_broken"]) ++ ;; ++ esac ++ with_cluster_support=no ++fi ++ ++if test "x$with_cluster_support" != "xno"; then ++ AC_DEFINE(CLUSTER_SUPPORT,1,[Whether to enable cluster extensions]) ++ SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${CTDB_CPPFLAGS}" ++ AC_MSG_NOTICE(Building with cluster support) ++else ++ AC_MSG_NOTICE(Building without cluster support) ++fi ++ ++ ++################################################# ++# check for rtnetlink ++ ++AC_CHECK_HEADERS([linux/netlink.h], ++ AC_CHECK_HEADERS([linux/rtnetlink.h],[],[], ++ [#include <bits/sockaddr.h> ++ #include <linux/netlink.h>]), ++ [],[#include <bits/sockaddr.h>]) ++ ++################################################# ++# check for ACL support ++ ++AC_MSG_CHECKING(whether to support ACLs) ++AC_ARG_WITH(acl-support, ++[AS_HELP_STRING([--with-acl-support], [Include ACL support (default=auto)])], ++[ case "$withval" in ++ yes|no) ++ with_acl_support="$withval" ++ ;; ++ esac ]) ++ ++if test x"$with_acl_support" = x ; then ++ with_acl_support="auto" ++fi ++ ++AC_MSG_RESULT($with_acl_support) ++ ++if test x"$with_acl_support" = x"no"; then ++ AC_MSG_RESULT(Disabling ACL support) ++else ++ AC_MSG_NOTICE(checking whether ACL support is available:) ++ case "$host_os" in ++ *sysv5*) ++ AC_MSG_NOTICE(Using UnixWare ACLs) ++ AC_DEFINE(HAVE_UNIXWARE_ACLS,1,[Whether UnixWare ACLs are available]) ++ default_static_modules="$default_static_modules vfs_solarisacl" ++ ;; ++ *solaris*) ++ AC_MSG_NOTICE(Using solaris ACLs) ++ AC_DEFINE(HAVE_SOLARIS_ACLS,1,[Whether solaris ACLs are available]) ++ ACL_LIBS="$ACL_LIBS -lsec" ++ default_static_modules="$default_static_modules vfs_solarisacl" ++ ;; ++ *hpux*) ++ AC_MSG_NOTICE(Using HPUX ACLs) ++ AC_DEFINE(HAVE_HPUX_ACLS,1,[Whether HPUX ACLs are available]) ++ default_static_modules="$default_static_modules vfs_hpuxacl" ++ ;; ++ *aix*) ++ AC_MSG_NOTICE(Using AIX ACLs) ++ AC_DEFINE(HAVE_AIX_ACLS,1,[Whether AIX ACLs are available]) ++ default_static_modules="$default_static_modules vfs_aixacl" ++ ;; ++ *osf*) ++ AC_MSG_NOTICE(Using Tru64 ACLs) ++ AC_DEFINE(HAVE_TRU64_ACLS,1,[Whether Tru64 ACLs are available]) ++ ACL_LIBS="$ACL_LIBS -lpacl" ++ default_static_modules="$default_static_modules vfs_tru64acl" ++ ;; ++ *darwin*) ++ AC_MSG_NOTICE(ACLs on Darwin currently not supported) ++ ;; ++ *) ++ AC_CHECK_LIB(acl,acl_get_file,[ACL_LIBS="$ACL_LIBS -lacl"]) ++ case "$host_os" in ++ *linux*) ++ AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"]) ++ ;; ++ esac ++ AC_CACHE_CHECK([for POSIX ACL support],samba_cv_HAVE_POSIX_ACLS,[ ++ acl_LIBS=$LIBS ++ LIBS="$LIBS $ACL_LIBS" ++ AC_TRY_LINK([ ++ #include <sys/types.h> ++ #include <sys/acl.h> ++ ],[ ++ acl_t acl; ++ int entry_id; ++ acl_entry_t *entry_p; ++ return acl_get_entry(acl, entry_id, entry_p); ++ ], ++ [samba_cv_HAVE_POSIX_ACLS=yes], ++ [samba_cv_HAVE_POSIX_ACLS=no]) ++ LIBS=$acl_LIBS ++ ]) ++ if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then ++ AC_MSG_NOTICE(Using posix ACLs) ++ AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether POSIX ACLs are available]) ++ AC_CACHE_CHECK([for acl_get_perm_np],samba_cv_HAVE_ACL_GET_PERM_NP,[ ++ acl_LIBS=$LIBS ++ LIBS="$LIBS $ACL_LIBS" ++ AC_TRY_LINK([ ++ #include <sys/types.h> ++ #include <sys/acl.h> ++ ],[ ++ acl_permset_t permset_d; ++ acl_perm_t perm; ++ return acl_get_perm_np(permset_d, perm); ++ ], ++ [samba_cv_HAVE_ACL_GET_PERM_NP=yes], ++ [samba_cv_HAVE_ACL_GET_PERM_NP=no]) ++ LIBS=$acl_LIBS ++ ]) ++ if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then ++ AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available]) ++ fi ++ default_static_modules="$default_static_modules vfs_posixacl" ++ else ++ AC_MSG_NOTICE(ACL support is not avaliable) ++ fi ++ ;; ++ esac ++fi # with_acl_support ++ ++################################################# ++# check if we have FreeBSD sunacl ++case "$host_os" in ++*freebsd*) ++ AC_CHECK_HEADER(sunacl.h) ++ if test x"$ac_cv_header_sunacl_h" = xyes ; then ++ AC_DEFINE(HAVE_FREEBSD_SUNACL_H,1,[Whether we have FreeBSD sunacl around]) ++ ZFSACL_LIBS=-lsunacl ++ AC_SUBST(ZFSACL_LIBS) ++ default_shared_modules="$default_shared_modules vfs_zfsacl" ++ fi ++ ;; ++esac ++ ++################################################# ++# check for AIO support ++ ++with_aio=auto ++AC_MSG_CHECKING(whether to support asynchronous io) ++AC_ARG_WITH(aio-support, ++[AS_HELP_STRING([--with-aio-support], [Include asynchronous io support (default=auto)])], ++[ case "$withval" in ++ yes|no) ++ with_aio=$withval ++ ;; ++ esac ]) ++ ++AC_MSG_RESULT($with_aio) ++ ++if test x"$with_aio" = x"no"; then ++ AC_DEFINE(HAVE_NO_AIO,1,[Whether no asynchronous io support should be built in]) ++else ++ AIO_LIBS=$LIBS ++ no_rt_LIBS=$LIBS ++ AC_CHECK_LIB(rt,aio_read,[AIO_LIBS="$LIBS -lrt"]) ++ LIBS=$no_rt_LIBS ++ AC_CHECK_LIB(aio,aio_read,[AIO_LIBS="$LIBS -laio"]) ++ AC_CACHE_CHECK([for asynchronous io support],samba_cv_HAVE_AIO,[ ++ aio_LIBS=$LIBS ++ LIBS=$AIO_LIBS ++ AC_TRY_LINK([#include <sys/types.h> ++#include <aio.h>], ++[ struct aiocb a; return aio_read(&a);], ++samba_cv_HAVE_AIO=yes,samba_cv_HAVE_AIO=no) ++ LIBS=$aio_LIBS]) ++ if test x"$samba_cv_HAVE_AIO" = x"yes"; then ++ AC_DEFINE(HAVE_AIO, 1, [Using asynchronous io]) ++ LIBS=$AIO_LIBS ++ AC_MSG_CHECKING(for aio_read) ++ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h> ++int main() { struct aiocb a; return aio_read(&a); }])], ++[AC_DEFINE(HAVE_AIO_READ, 1, [Have aio_read]) AC_MSG_RESULT(yes)], ++[AC_MSG_RESULT(no)]) ++ ++ AC_MSG_CHECKING(for aio_write) ++ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h> ++int main() { struct aiocb a; return aio_write(&a); }])], ++[AC_DEFINE(HAVE_AIO_WRITE, 1, [Have aio_write]) AC_MSG_RESULT(yes)], ++[AC_MSG_RESULT(no)]) ++ ++ AC_MSG_CHECKING(for aio_fsync) ++ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h> ++int main() { struct aiocb a; return aio_fsync(1, &a); }])], ++[AC_DEFINE(HAVE_AIO_FSYNC, 1, [Have aio_fsync]) AC_MSG_RESULT(yes)], ++[AC_MSG_RESULT(no)]) ++ ++ AC_MSG_CHECKING(for aio_return) ++ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h> ++int main() { struct aiocb a; return aio_return(&a); }])], ++[AC_DEFINE(HAVE_AIO_RETURN, 1, [Have aio_return]) AC_MSG_RESULT(yes)], ++[AC_MSG_RESULT(no)]) ++ ++ AC_MSG_CHECKING(for aio_error) ++ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h> ++int main() { struct aiocb a; return aio_error(&a); }])], ++[AC_DEFINE(HAVE_AIO_ERROR, 1, [Have aio_error]) AC_MSG_RESULT(yes)], ++[AC_MSG_RESULT(no)]) ++ ++ AC_MSG_CHECKING(for aio_cancel) ++ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h> ++int main() { struct aiocb a; return aio_cancel(1, &a); }])], ++[AC_DEFINE(HAVE_AIO_CANCEL, 1, [Have aio_cancel]) AC_MSG_RESULT(yes)], ++[AC_MSG_RESULT(no)]) ++ ++ AC_MSG_CHECKING(for aio_suspend) ++ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h> ++int main() { const struct aiocb * const [a[1]]; struct timespec t; return aio_suspend(a, 1, &t); }])], ++[AC_DEFINE(HAVE_AIO_SUSPEND, 1, [Have aio_suspend]) AC_MSG_RESULT(yes)], ++[AC_MSG_RESULT(no)]) ++ else ++ AC_DEFINE(HAVE_NO_AIO,1,[Whether no asynchronous io support is available]) ++ AC_MSG_RESULT(no) ++ fi ++fi ++ ++if test x"$samba_cv_msghdr_msg_control" = x"yes" -o \ ++ x"$samba_cv_msghdr_msg_acctright" = x"yes"; then ++ default_shared_modules="$default_shared_modules vfs_aio_fork" ++fi ++ ++# Check for Linux kernel aio support. ++case "$host_os" in ++*linux*) ++ AC_CHECK_LIB(aio,io_submit,[AIO_LIBS="$LIBS -laio"]) ++ AC_CACHE_CHECK([for Linux kernel asynchronous io support],samba_cv_HAVE_LINUX_KERNEL_AIO,[ ++ aio_LIBS=$LIBS ++ LIBS=$AIO_LIBS ++ AC_TRY_LINK([#include <unistd.h> ++#include <stdlib.h> ++#include <sys/types.h> ++#include <fcntl.h> ++#include <sys/eventfd.h> ++#include <libaio.h>], ++[ struct io_event ioev; ++struct iocb *ioc; ++io_context_t ctx; ++struct timespec ts; ++int fd; ++char *buf; ++fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); ++io_queue_init(128,&ctx); ++io_prep_pwrite(ioc, 1, buf, 1, 0); ++io_prep_pread(ioc, 1, buf, 1, 0); ++io_set_eventfd(ioc, fd); ++io_set_callback(ioc, (io_callback_t)(0)); ++io_submit(ctx, 1, &ioc); ++io_getevents(ctx, 1, 1, &ioev, &ts);], ++samba_cv_HAVE_LINUX_KERNEL_AIO=yes,samba_cv_HAVE_LINUX_KERNEL_AIO=no) ++ LIBS=$aio_LIBS]) ++ if test x"$samba_cv_HAVE_LINUX_KERNEL_AIO" = x"yes"; then ++ default_shared_modules="$default_shared_modules vfs_aio_linux" ++ fi ++ ;; ++esac ++ ++if test x"$samba_cv_HAVE_AIO" = x"yes"; then ++ default_shared_modules="$default_shared_modules vfs_aio_posix" ++fi ++ ++################################################# ++# check for sendfile support ++ ++AC_MSG_CHECKING(whether sendfile support should be built in) ++AC_ARG_WITH(sendfile-support, ++[AS_HELP_STRING([--with-sendfile-support], [Whether sendfile support should be built in (default=auto)])], ++[ case "$withval" in ++ yes|no) ++ AC_MSG_RESULT($withval); ++ with_sendfile_support=$withval ++ ;; ++ *) ++ AC_MSG_RESULT(yes) ++ with_sendfile_support=auto ++ ;; ++ esac ], ++) ++ ++if test x$with_sendfile_support != xno ; then ++ case "$host_os" in ++ *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu) ++ AC_CACHE_CHECK([for linux sendfile support],samba_cv_HAVE_SENDFILE,[ ++ AC_TRY_LINK([#include <sys/sendfile.h>], ++[\ ++int tofd, fromfd; ++off_t offset; ++size_t total; ++ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); ++], ++samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) ++ ++ if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then ++ AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available]) ++ AC_DEFINE(LINUX_SENDFILE_API,1,[Whether linux sendfile() API is available]) ++ AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() should be used]) ++ else ++ AC_MSG_RESULT(no); ++ fi ++ ++ ;; ++ *freebsd* | *dragonfly* ) ++ AC_CACHE_CHECK([for freebsd sendfile support],samba_cv_HAVE_SENDFILE,[ ++ AC_TRY_LINK([\ ++#include <sys/types.h> ++#include <unistd.h> ++#include <sys/socket.h> ++#include <sys/uio.h>], ++[\ ++ int fromfd, tofd, ret, total=0; ++ off_t offset, nwritten; ++ struct sf_hdtr hdr; ++ struct iovec hdtrl; ++ hdr.headers = &hdtrl; ++ hdr.hdr_cnt = 1; ++ hdr.trailers = NULL; ++ hdr.trl_cnt = 0; ++ hdtrl.iov_base = NULL; ++ hdtrl.iov_len = 0; ++ ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0); ++], ++samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) ++ ++ if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then ++ AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() support is available]) ++ AC_DEFINE(FREEBSD_SENDFILE_API,1,[Whether the FreeBSD sendfile() API is available]) ++ AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() support should be included]) ++ else ++ AC_MSG_RESULT(no); ++ fi ++ ;; ++ *darwin*) ++ AC_CACHE_CHECK([for Darwin sendfile support], ++ samba_cv_HAVE_SENDFILE, ++ [ ++ AC_TRY_LINK([ ++#include <sys/types.h> ++#include <sys/socket.h> ++#include <sys/uio.h> ++ ], ++ [ ++ int fromfd, tofd, ret; ++ off_t offset, nwritten; ++ struct sf_hdtr hdr; ++ struct iovec hdtrl; ++ hdr.headers = &hdtrl; ++ hdr.hdr_cnt = 1; ++ hdr.trailers = (void *)0; ++ hdr.trl_cnt = 0; ++ hdtrl.iov_base = (void *)0; ++ hdtrl.iov_len = 0; ++ ret = sendfile(fromfd, tofd, offset, &nwritten, &hdr, 0); ++ ], ++ samba_cv_HAVE_SENDFILE=yes, ++ samba_cv_HAVE_SENDFILE=no)]) ++ ++ if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then ++ AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() support is available]) ++ AC_DEFINE(DARWIN_SENDFILE_API,1,[Whether the Darwin sendfile() API is available]) ++ AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() support should be included]) ++ else ++ AC_MSG_RESULT(no); ++ fi ++ ;; ++ *hpux*|*osf*) ++ AC_CACHE_CHECK([for osf/hpux sendfile support],samba_cv_HAVE_SENDFILE,[ ++ AC_TRY_LINK([\ ++#include <sys/socket.h> ++#include <sys/uio.h>], ++[\ ++ int fromfd, tofd; ++ size_t total=0; ++ struct iovec hdtrl[2]; ++ ssize_t nwritten; ++ off_t offset; ++ ++ hdtrl[0].iov_base = 0; ++ hdtrl[0].iov_len = 0; ++ ++ nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0); ++], ++samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) ++ if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then ++ AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available]) ++ AC_DEFINE(HPUX_SENDFILE_API,1,[Whether the osf/hpux sendfile() API is available]) ++ AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() support should be included]) ++ else ++ AC_MSG_RESULT(no); ++ fi ++ ;; ++ ++ *solaris*) ++ AC_CHECK_LIB(sendfile,sendfilev) ++ AC_CACHE_CHECK([for solaris sendfilev support],samba_cv_HAVE_SENDFILEV,[ ++ AC_TRY_LINK([\ ++#include <sys/sendfile.h>], ++[\ ++ int sfvcnt; ++ size_t xferred; ++ struct sendfilevec vec[2]; ++ ssize_t nwritten; ++ int tofd; ++ ++ sfvcnt = 2; ++ ++ vec[0].sfv_fd = SFV_FD_SELF; ++ vec[0].sfv_flag = 0; ++ vec[0].sfv_off = 0; ++ vec[0].sfv_len = 0; ++ ++ vec[1].sfv_fd = 0; ++ vec[1].sfv_flag = 0; ++ vec[1].sfv_off = 0; ++ vec[1].sfv_len = 0; ++ nwritten = sendfilev(tofd, vec, sfvcnt, &xferred); ++], ++samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)]) ++ ++ if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then ++ AC_DEFINE(HAVE_SENDFILEV,1,[Whether sendfilev() is available]) ++ AC_DEFINE(SOLARIS_SENDFILE_API,1,[Whether the solaris sendfile() API is available]) ++ AC_DEFINE(WITH_SENDFILE,1,[Whether to include sendfile() support]) ++ else ++ AC_MSG_RESULT(no); ++ fi ++ ;; ++ *aix*) ++ AC_CACHE_CHECK([for AIX send_file support],samba_cv_HAVE_SENDFILE,[ ++ AC_TRY_LINK([\ ++#include <sys/socket.h>], ++[\ ++ int fromfd, tofd; ++ size_t total=0; ++ struct sf_parms hdtrl; ++ ssize_t nwritten; ++ ++ hdtrl.header_data = 0; ++ hdtrl.header_length = 0; ++ hdtrl.file_descriptor = fromfd; ++ hdtrl.file_offset = 0; ++ hdtrl.file_bytes = 0; ++ hdtrl.trailer_data = 0; ++ hdtrl.trailer_length = 0; ++ ++ nwritten = send_file(&tofd, &hdtrl, 0); ++], ++samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) ++ if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then ++ AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available]) ++ AC_DEFINE(AIX_SENDFILE_API,1,[Whether the AIX send_file() API is available]) ++ AC_DEFINE(WITH_SENDFILE,1,[Whether to include sendfile() support]) ++ else ++ AC_MSG_RESULT(no); ++ fi ++ ;; ++ *) ++ ;; ++ esac ++fi ++ ++if test x$with_sendfile_support = xyes -a x"$samba_cv_HAVE_SENDFILE" != xyes ; then ++ AC_MSG_ERROR(sendfile support requested but sendfile not available ) ++fi ++ ++############################################ ++# See if we have the Linux readahead syscall. ++ ++AC_CACHE_CHECK([for Linux readahead], ++ samba_cv_HAVE_LINUX_READAHEAD,[ ++ AC_TRY_LINK([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <fcntl.h>], ++ [ssize_t err = readahead(0,0,0x80000);], ++ samba_cv_HAVE_LINUX_READAHEAD=yes, ++ samba_cv_HAVE_LINUX_READAHEAD=no)]) ++ ++if test x"$samba_cv_HAVE_LINUX_READAHEAD" = x"yes"; then ++ AC_DEFINE(HAVE_LINUX_READAHEAD,1, ++ [Whether Linux readahead is available]) ++fi ++ ++AC_HAVE_DECL(readahead, [#include <fcntl.h>]) ++ ++############################################ ++# See if we have the posix_fadvise syscall. ++ ++AC_CACHE_CHECK([for posix_fadvise], ++ samba_cv_HAVE_POSIX_FADVISE,[ ++ AC_TRY_LINK([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <fcntl.h>], ++ [ssize_t err = posix_fadvise(0,0,0x80000,POSIX_FADV_WILLNEED);], ++ samba_cv_HAVE_POSIX_FADVISE=yes, ++ samba_cv_HAVE_POSIX_FADVISE=no)]) ++ ++if test x"$samba_cv_HAVE_POSIX_FADVISE" = x"yes"; then ++ AC_DEFINE(HAVE_POSIX_FADVISE,1, ++ [Whether posix_fadvise is available]) ++fi ++ ++############################################ ++# See if we have the openat syscall. ++ ++AC_CACHE_CHECK([for openat], ++ samba_cv_HAVE_OPENAT,[ ++ AC_TRY_LINK([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <fcntl.h>], ++ [int fd = openat(AT_FDCWD, ".", O_RDONLY);], ++ samba_cv_HAVE_OPENAT=yes, ++ samba_cv_HAVE_OPENAT=no)]) ++ ++if test x"$samba_cv_HAVE_OPENAT" = x"yes"; then ++ AC_DEFINE(HAVE_OPENAT,1, [Whether openat is available]) ++fi ++ ++############################################ ++# See if we have the Linux splice syscall. ++ ++case "$host_os" in ++*linux*) ++AC_CACHE_CHECK([for Linux splice], ++ samba_cv_HAVE_LINUX_SPLICE,[ ++ AC_TRY_LINK([ ++#if defined(HAVE_UNISTD_H) ++#include <unistd.h> ++#endif ++#include <fcntl.h>], ++ [long ret = splice(0,0,1,0,400,SPLICE_F_MOVE);], ++ samba_cv_HAVE_LINUX_SPLICE=yes, ++ samba_cv_HAVE_LINUX_SPLICE=no)]) ++;; ++*) ++samba_cv_HAVE_LINUX_SPLICE=no ++;; ++esac ++ ++if test x"$samba_cv_HAVE_LINUX_SPLICE" = x"yes"; then ++ AC_DEFINE(HAVE_LINUX_SPLICE,1, ++ [Whether Linux splice is available]) ++fi ++ ++AC_HAVE_DECL(splice, [#include <fcntl.h>]) ++ ++############################################ ++# See if we have the a broken readlink syscall. ++ ++AC_CACHE_CHECK([for a broken readlink syscall],samba_cv_HAVE_BROKEN_READLINK,[ ++AC_TRY_RUN([#include "${srcdir-.}/../tests/readlink.c"], ++ samba_cv_HAVE_BROKEN_READLINK=no,samba_cv_HAVE_BROKEN_READLINK=yes,samba_cv_HAVE_BROKEN_READLINK=cross) ++]) ++if test x"$samba_cv_HAVE_BROKEN_READLINK" = x"yes"; then ++ AC_DEFINE(HAVE_BROKEN_READLINK,1,[Whether the readlink syscall is broken]) ++fi ++ ++################################################# ++# Check whether winbind is supported on this platform. If so we need to ++# build and install client programs, sbin programs and shared libraries ++ ++AC_MSG_CHECKING(whether to build winbind) ++ ++# Initially, the value of $host_os decides whether winbind is supported ++ ++HAVE_WINBIND=yes ++HAVE_WBCLIENT=no ++ ++# Define external wbclient library to link against. This disables winbind. ++# We define this here so --with-winbind can override it. ++AC_ARG_WITH(wbclient, ++[AS_HELP_STRING([--with-wbclient], [Use external wbclient (optional)])], ++[ ++ case "$withval" in ++ no) ++ HAVE_WBCLIENT=no ++ ;; ++ yes) ++ HAVE_WBCLIENT=yes ++ HAVE_WINBIND=no ++ ;; ++ *) ++ HAVE_WBCLIENT=yes ++ HAVE_WINBIND=no ++ WBCLIENT_INCLUDES="-I$withval/include" ++ WBCLIENT_LDFLAGS="-L$withval/lib" ++ ;; ++ esac ], ++) ++ ++AC_SUBST(WBCLIENT_INCLUDES) ++AC_SUBST(WBCLIENT_LDFLAGS) ++AC_SUBST(WBCLIENT_LIBS) ++ ++ ++# Define the winbind shared library name and any specific linker flags ++# it needs to be built with. ++ ++WINBIND_NSS="../nsswitch/libnss_winbind.$SHLIBEXT" ++WINBIND_WINS_NSS="../nsswitch/libnss_wins.$SHLIBEXT" ++WINBIND_NSS_LDSHFLAGS=$LDSHFLAGS ++NSSSONAMEVERSIONSUFFIX="" ++ ++case "$host_os" in ++ *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu) ++ NSSSONAMEVERSIONSUFFIX=".2" ++ WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_linux.o" ++ ;; ++ *freebsd[[5-9]]* | *freebsd1[[0-9]]*) ++ # FreeBSD winbind client is implemented as a wrapper around ++ # the Linux version. ++ NSSSONAMEVERSIONSUFFIX=".1" ++ WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_freebsd.o \ ++ ../nsswitch/winbind_nss_linux.o" ++ WINBIND_NSS="../nsswitch/nss_winbind.$SHLIBEXT" ++ WINBIND_WINS_NSS="../nsswitch/nss_wins.$SHLIBEXT" ++ ;; ++ ++ *netbsd*[[3-9]]* | *netbsd1[[0-9]]*) ++ # NetBSD winbind client is implemented as a wrapper ++ # around the Linux version. It needs getpwent_r() to ++ # indicate libc's use of the correct nsdispatch API. ++ # ++ if test x"$ac_cv_func_getpwent_r" = x"yes"; then ++ WINBIND_NSS_EXTRA_OBJS="\ ++ ../nsswitch/winbind_nss_netbsd.o \ ++ ../nsswitch/winbind_nss_linux.o" ++ WINBIND_NSS="../nsswitch/nss_winbind.$SHLIBEXT" ++ WINBIND_WINS_NSS="../nsswitch/nss_wins.$SHLIBEXT" ++ else ++ HAVE_WINBIND=no ++ winbind_no_reason=", getpwent_r is missing on $host_os so winbind is unsupported" ++ fi ++ ;; ++ *irix*) ++ # IRIX has differently named shared libraries ++ WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_irix.o" ++ WINBIND_NSS="../nsswitch/libns_winbind.$SHLIBEXT" ++ WINBIND_WINS_NSS="../nsswitch/libns_wins.$SHLIBEXT" ++ ;; ++ *solaris*) ++ # Solaris winbind client is implemented as a wrapper around ++ # the Linux version. ++ NSSSONAMEVERSIONSUFFIX=".1" ++ WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_solaris.o \ ++ ../nsswitch/winbind_nss_linux.o" ++ ;; ++ *hpux11*) ++ WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_solaris.o" ++ ;; ++ *aix*) ++ # AIX has even differently named shared libraries. No ++ # WINS support has been implemented yet. ++ WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_aix.o" ++ WINBIND_NSS_LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-ewb_aix_init" ++ WINBIND_NSS="../nsswitch/WINBIND" ++ WINBIND_WINS_NSS="" ++ ;; ++ *darwin*) ++ ;; ++ *) ++ HAVE_WINBIND=no ++ winbind_no_reason=", unsupported on $host_os" ++ ;; ++esac ++ ++# Check the setting of --with-winbind ++ ++AC_ARG_WITH(winbind, ++[AS_HELP_STRING([--with-winbind], [Build winbind (default, if supported by OS)])], ++[ ++ case "$withval" in ++ yes) ++ HAVE_WINBIND=yes ++ HAVE_WBCLIENT=no ++ ;; ++ no) ++ HAVE_WINBIND=no ++ winbind_reason="" ++ ;; ++ esac ], ++) ++ ++# We need unix domain sockets for winbind ++ ++if test x"$HAVE_WINBIND" = x"yes"; then ++ if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"no"; then ++ winbind_no_reason=", no unix domain socket support on $host_os" ++ HAVE_WINBIND=no ++ fi ++fi ++ ++# Display test results ++ ++if test x"$HAVE_WINBIND" = x"no"; then ++ WINBIND_NSS="" ++ WINBIND_WINS_NSS="" ++fi ++if test x"$HAVE_WBCLIENT" = x"yes"; then ++ AC_CHECK_LIB(wbclient, wbcInterfaceDetails, ++ [LIBWBCLIENT_LIBS="-lwbclient"], AC_MSG_ERROR([Could not find wbclient]), [$WBCLIENT_LDFLAGS]) ++ LIBWBCLIENT_LIBS="$LIBWBCLIENT_LIBS $WBCLIENT_LDFLAGS" ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(WITH_WINBIND,1,[Whether to link to wbclient]) ++ EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo" ++else ++ if test x"$enable_developer" = x"yes" -a x"$LINK_LIBWBCLIENT" = x"STATIC" ; then ++ BUILD_LIBWBCLIENT_SHARED=no ++ else ++ BUILD_LIBWBCLIENT_SHARED=yes ++ fi ++ ++ LIBWBCLIENT_SHARED_TARGET=bin/libwbclient.$SHLIBEXT ++ LIBWBCLIENT_STATIC_TARGET=bin/libwbclient.a ++ LIBWBCLIENT_SOVER=0 ++ LIBWBCLIENT_FULLVER=0 ++ LIBWBCLIENT_SHARED_TARGET_SOVER=$LIBWBCLIENT_SHARED_TARGET.$LIBWBCLIENT_SOVER ++ LIBWBCLIENT_SHARED_TARGET_FULLVER=$LIBWBCLIENT_SHARED_TARGET.$LIBWBCLIENT_FULLVER ++ if test $BLDSHARED = true -a x"$HAVE_WINBIND" = x"yes" -a x"$BUILD_LIBWBCLIENT_SHARED" = x"yes"; then ++ NSS_MODULES="${WINBIND_NSS} ${WINBIND_WINS_NSS}" ++ ## Only worry about libwbclient if we have shared ++ # library support ++ LIBWBCLIENT_SHARED=$LIBWBCLIENT_SHARED_TARGET ++ LIBWBCLIENT=libwbclient ++ INSTALL_LIBWBCLIENT=installlibwbclient ++ UNINSTALL_LIBWBCLIENT=uninstalllibwbclient ++ LIBWBCLIENT_LIBS="-lwbclient" ++ else ++ LIBWBCLIENT_STATIC=$LIBWBCLIENT_STATIC_TARGET ++ LIBWBCLIENT_LIBS=$LIBWBCLIENT_STATIC_TARGET ++ fi ++fi ++ ++if test x"$HAVE_WINBIND" = x"yes"; then ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(WITH_WINBIND,1,[Whether to build winbind]) ++ ++ EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo" ++ EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd" ++ if test $BLDSHARED = true -a x"$create_pam_modules" = x"yes"; then ++ PAM_MODULES="$PAM_MODULES pam_winbind" ++ INSTALL_PAM_MODULES="installpammodules" ++ UNINSTALL_PAM_MODULES="uninstallpammodules" ++ fi ++ ++ # we use winbind, check for krb5 locate_plugin support: ++ AC_CHECK_HEADERS([krb5/locate_plugin.h], [], [], ++ [[#ifdef HAVE_KRB5_H ++ #include <krb5.h> ++ #endif ++ ]]) ++ if test x"$ac_cv_header_krb5_locate_plugin_h" = x"yes"; then ++ WINBIND_KRB5_LOCATOR="bin/winbind_krb5_locator.$SHLIBEXT" ++ if test x"$BLDSHARED" = x"true" ; then ++ EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WINBIND_KRB5_LOCATOR" ++ fi ++ fi ++ # end of krb5 locate_plugin check ++else ++ AC_MSG_RESULT(no$winbind_no_reason) ++fi ++ ++AC_SUBST(WINBIND_NSS) ++AC_SUBST(WINBIND_WINS_NSS) ++AC_SUBST(WINBIND_NSS_LDSHFLAGS) ++AC_SUBST(WINBIND_NSS_EXTRA_OBJS) ++AC_SUBST(NSSSONAMEVERSIONSUFFIX) ++ ++AC_SUBST(WINBIND_KRB5_LOCATOR) ++ ++# Solaris 10 does have new member in nss_XbyY_key ++AC_CHECK_MEMBER(union nss_XbyY_key.ipnode.af_family, ++ AC_DEFINE(HAVE_NSS_XBYY_KEY_IPNODE, 1, [Defined if union nss_XbyY_key has ipnode field]),, ++ [#include <nss_dbdefs.h>]) ++ ++# Solaris has some extra fields in struct passwd that need to be ++# initialised otherwise nscd crashes. ++ ++AC_CHECK_MEMBER(struct passwd.pw_comment, ++ AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),, ++ [#include <pwd.h>]) ++ ++AC_CHECK_MEMBER(struct passwd.pw_age, ++ AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),, ++ [#include <pwd.h>]) ++ ++# AIX 4.3.x and 5.1 do not have as many members in ++# struct secmethod_table as AIX 5.2 ++AC_CHECK_MEMBERS([struct secmethod_table.method_attrlist], , , ++ [#include <usersec.h>]) ++AC_CHECK_MEMBERS([struct secmethod_table.method_version], , , ++ [#include <usersec.h>]) ++ ++################################################# ++# Check to see if we should use the included popt ++ ++AC_ARG_WITH(included-popt, ++[AS_HELP_STRING([--with-included-popt], [use bundled popt library, not from system])], ++[ ++ case "$withval" in ++ yes) ++ INCLUDED_POPT=yes ++ ;; ++ no) ++ INCLUDED_POPT=no ++ ;; ++ esac ], ++) ++if test x"$INCLUDED_POPT" != x"yes"; then ++ AC_CHECK_LIB(popt, poptGetContext, ++ INCLUDED_POPT=no, INCLUDED_POPT=yes) ++fi ++ ++AC_MSG_CHECKING(whether to use included popt) ++if test x"$INCLUDED_POPT" = x"yes"; then ++ AC_MSG_RESULT(yes) ++ BUILD_POPT='$(POPT_OBJ)' ++ POPTLIBS='$(POPT_OBJ)' ++ FLAGS1="-I\$(srcdir)/../lib/popt" ++else ++ AC_MSG_RESULT(no) ++ BUILD_POPT="" ++ POPTLIBS="-lpopt" ++fi ++AC_SUBST(BUILD_POPT) ++AC_SUBST(POPTLIBS) ++AC_SUBST(FLAGS1) ++ ++################################################# ++# Check if user wants DNS service discovery support ++ ++AC_ARG_ENABLE(dnssd, ++[AS_HELP_STRING([--enable-dnssd], [Enable DNS service discovery support (default=no)])]) ++ ++AC_SUBST(DNSSD_LIBS) ++if test x"$enable_dnssd" = x"yes"; then ++ have_dnssd_support=yes ++ ++ AC_CHECK_HEADERS(dns_sd.h) ++ if test x"$ac_cv_header_dns_sd_h" != x"yes"; then ++ have_dnssd_support=no ++ fi ++ ++ # On Darwin the DNSSD API is in libc, but on other platforms it's ++ # probably in -ldns_sd ++ AC_CHECK_FUNCS(DNSServiceRegister) ++ AC_CHECK_LIB_EXT(dns_sd, DNSSD_LIBS, DNSServiceRegister) ++ if test x"$ac_cv_func_DNSServiceRegister" != x"yes" -a \ ++ x"$ac_cv_lib_ext_dns_sd_DNSServiceRegister" != x"yes"; then ++ have_dnssd_support=no ++ fi ++ ++ if test x"$have_dnssd_support" = x"yes"; then ++ AC_DEFINE(WITH_DNSSD_SUPPORT, 1, ++ [Whether to enable DNS service discovery support]) ++ else ++ if test x"$enable_dnssd" = x"yes"; then ++ AC_MSG_ERROR(DNS service discovery support not available) ++ fi ++ fi ++ ++fi ++ ++################################################# ++# Check if user wants avahi support ++ ++AC_ARG_ENABLE(avahi, ++[AS_HELP_STRING([--enable-avahi], [Enable Avahi support (default=auto)])]) ++ ++if test x"$enable_avahi" != x"no"; then ++ have_avahi_support=yes ++ ++ AC_CHECK_HEADERS(avahi-common/watch.h) ++ if test x"$ac_cv_header_avahi_common_watch_h" != x"yes"; then ++ have_avahi_support=no ++ fi ++ ++ AC_CHECK_HEADERS(avahi-client/client.h) ++ if test x"$ac_cv_header_avahi_common_watch_h" != x"yes"; then ++ have_avahi_support=no ++ fi ++ ++ save_LIBS="$LIBS" ++ AC_CHECK_LIB(avahi-client, avahi_client_new,[have_avahi_client_new=yes]) ++ AC_CHECK_LIB(avahi-common, avahi_strerror,[have_avahi_strerror=yes]) ++ LIBS="$save_LIBS" ++ ++ if test x"$have_avahi_client_new" != x"yes" -o \ ++ x"$have_avahi_strerror" != x"yes" ; then ++ have_avahi_support=no ++ fi ++ ++ if test x"$have_avahi_support" = x"yes"; then ++ AC_SUBST(AVAHI_LIBS, "-lavahi-client -lavahi-common") ++ AC_DEFINE(WITH_AVAHI_SUPPORT, 1, ++ [Whether to enable avahi support]) ++ AC_SUBST(AVAHI_OBJ, "lib/avahi.o smbd/avahi_register.o") ++ else ++ if test x"$enable_avahi" = x"yes"; then ++ AC_MSG_ERROR(avahi support not available) ++ fi ++ fi ++fi ++ ++ ++################################################# ++# Set pthread stuff ++ ++PTHREAD_CFLAGS=error ++PTHREAD_LDFLAGS=error ++ ++# If it's error, then the user didn't ++# define it. ++if test "x$PTHREAD_LDFLAGS" = xerror; then ++ AC_CHECK_LIB(pthread, pthread_attr_init, [ ++ PTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" ++ PTHREAD_LDFLAGS="-lpthread" ]) ++fi ++ ++if test "x$PTHREAD_LDFLAGS" = xerror; then ++ AC_CHECK_LIB(pthreads, pthread_attr_init, [ ++ PTHREAD_CFLAGS="-D_THREAD_SAFE" ++ PTHREAD_LDFLAGS="-lpthreads" ]) ++fi ++ ++if test "x$PTHREAD_LDFLAGS" = xerror; then ++ AC_CHECK_LIB(c_r, pthread_attr_init, [ ++ PTHREAD_CFLAGS="-D_THREAD_SAFE -pthread" ++ PTHREAD_LDFLAGS="-pthread" ]) ++fi ++ ++if test "x$PTHREAD_LDFLAGS" = xerror; then ++ AC_CHECK_FUNC(pthread_attr_init, [ ++ PTHREAD_CFLAGS="-D_REENTRANT" ++ PTHREAD_LDFLAGS="-lpthread" ]) ++fi ++ ++# especially for HP-UX, where the AC_CHECK_FUNC macro fails to test for ++# pthread_attr_init. On pthread_mutex_lock it works there... ++if test "x$PTHREAD_LDFLAGS" = xerror; then ++ AC_CHECK_LIB(pthread, pthread_mutex_lock, [ ++ PTHREAD_CFLAGS="-D_REENTRANT" ++ PTHREAD_LDFLAGS="-lpthread" ]) ++fi ++ ++AC_SUBST(PTHREAD_CFLAGS) ++AC_SUBST(PTHREAD_LDFLAGS) ++ ++samba_cv_HAVE_PTHREAD=no ++if test x"$PTHREAD_CFLAGS" != xerror -a x"$PTHREAD_LDFLAGS" != xerror; then ++ samba_cv_HAVE_PTHREAD=yes ++ # now check for pthread.h with pthread-correct CFLAGS and LDFLAGS: ++ ac_save_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS" ++ ac_save_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS" ++ AC_CHECK_HEADERS(pthread.h) ++ CFLAGS=$ac_save_CFLAGS ++ LDFLAGS=$ac_save_LDFLAGS ++ AC_DEFINE(HAVE_PTHREAD, 1, [Do we have pthreads around?]) ++fi ++ ++################################################# ++# Check if user wants pthreadpool support ++ ++AC_ARG_ENABLE(pthreadpool, ++[AS_HELP_STRING([--enable-pthreadpool], [Enable pthreads pool helper support (default=yes)])]) ++ ++if test x"$enable_pthreadpool" = xyes -a x"$samba_cv_HAVE_PTHREAD" != x"yes"; then ++ AC_MSG_ERROR([pthreadpool support cannot be enabled when pthread support was not found]) ++fi ++ ++if test x"$enable_pthreadpool" != x"no" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; then ++ LIBS="$LIBS $PTHREAD_LDFLAGS" ++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS" ++ AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool/pthreadpool.o") ++ default_shared_modules="$default_shared_modules vfs_aio_pthread" ++else ++ AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool/pthreadpool_sync.o") ++fi ++ ++PTHREADPOOLTEST="bin/pthreadpooltest" ++AC_SUBST(PTHREADPOOLTEST) ++ ++ ++################################################# ++# Check to see if we should use the included iniparser ++ ++AC_ARG_WITH(included-iniparser, ++[AS_HELP_STRING([--with-included-iniparser], [use bundled iniparser library, not from system])], ++[ ++ case "$withval" in ++ yes) ++ INCLUDED_INIPARSER=yes ++ ;; ++ no) ++ INCLUDED_INIPARSER=no ++ ;; ++ esac ], ++) ++if test x"$INCLUDED_INIPARSER" != x"yes"; then ++ AC_CHECK_LIB(iniparser, iniparser_load, ++ INCLUDED_INIPARSER=no, INCLUDED_INIPARSER=yes) ++fi ++ ++AC_MSG_CHECKING(whether to use included iniparser) ++if test x"$INCLUDED_INIPARSER" = x"yes"; then ++ AC_MSG_RESULT(yes) ++ BUILD_INIPARSER='$(INIPARSER_OBJ)' ++ INIPARSERLIBS="" ++ FLAGS1="$FLAGS1 -I\$(srcdir)/../lib/iniparser/src" ++else ++ AC_MSG_RESULT(no) ++ BUILD_INIPARSER="" ++ INIPARSERLIBS="-liniparser" ++fi ++AC_SUBST(BUILD_INIPARSER) ++AC_SUBST(INIPARSERLIBS) ++AC_SUBST(FLAGS1) ++ ++AC_ARG_ENABLE(fault-handler,[AS_HELP_STRING([--disable-fault-handler], [Disable the default handler])]) ++ ++if test x"$enable_fault_handler" = x"no"; then ++ AC_DEFINE(HAVE_DISABLE_FAULT_HANDLER, 1, [Disable the default signal handler]) ++fi ++ ++################################################### ++# Check for different/missing (set|get|end)netgrent prototypes ++CFLAGS_SAVE=$CFLAGS ++if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then ++ CFLAGS="$CFLAGS -Werror-implicit-function-declaration" ++fi ++AC_CACHE_CHECK([for setnetgrent prototype],samba_cv_setnetgrent_prototype, [ ++ AC_TRY_COMPILE([#include<netdb.h> ++ #ifdef HAVE_NETGROUP_H ++ #include<netgroup.h> ++ #endif],[setnetgrent("foo")], ++ samba_cv_setnetgrent_prototype=yes, samba_cv_setnetgrent_prototype=no)]) ++if test x"$samba_cv_setnetgrent_prototype" = x"yes"; then ++ AC_DEFINE(HAVE_SETNETGRENT_PROTOTYPE, 1, [If setnetgrent prototype is defined]) ++fi ++AC_CACHE_CHECK([for getnetgrent prototype],samba_cv_getnetgrent_prototype, [ ++ AC_TRY_COMPILE([#include<netdb.h> ++ #ifdef HAVE_NETGROUP_H ++ #include<netgroup.h> ++ #endif],[char *dom, *user,*host; getnetgrent(&dom,&user,&host)], ++ samba_cv_getnetgrent_prototype=yes, samba_cv_getnetgrent_prototype=no)]) ++if test x"$samba_cv_getnetgrent_prototype" = x"yes"; then ++ AC_DEFINE(HAVE_GETNETGRENT_PROTOTYPE, 1, [If getnetgrent prototype is defined]) ++fi ++AC_CACHE_CHECK([for endnetgrent prototype],samba_cv_endnetgrent_prototype, [ ++ AC_TRY_COMPILE([#include<netdb.h> ++ #ifdef HAVE_NETGROUP_H ++ #include<netgroup.h> ++ #endif],[endnetgrent()], ++ samba_cv_endnetgrent_prototype=yes, samba_cv_endnetgrent_prototype=no)]) ++if test x"$samba_cv_endnetgrent_prototype" = x"yes"; then ++ AC_DEFINE(HAVE_ENDNETGRENT_PROTOTYPE, 1, [If endnetgrent prototype is defined]) ++fi ++ ++CFLAGS=$CFLAGS_SAVE ++ ++# Checks for POSIX ignorant BSD style statvfs() function ++# Start ++AC_CHECK_HEADERS(sys/param.h sys/mount.h) ++ ++AC_MSG_CHECKING([checking for posix ignorant *bsd style statfs struct]) ++AC_CACHE_VAL(bsdstatvfs_cv_statfs,[ ++ AC_TRY_RUN([ ++ #ifdef HAVE_SYS_PARAM_H ++ #include <sys/param.h> ++ #endif ++ #ifdef HAVE_SYS_MOUNT_H ++ #include <sys/mount.h> ++ #endif ++ int main (void) ++ { ++ struct statfs fsd; ++ fsd.f_bsize = 0; ++ fsd.f_iosize = 0; ++ return (statfs (".", &fsd)); ++ }], ++ bsdstatvfs_cv_statfs=yes, ++ bsdstatvfs_cv_statfs=no, ++ bsdstatvfs_cv_statfs=no)]) ++AC_MSG_RESULT($bsdstatvfs_cv_statfs) ++ ++if test $bsdstatvfs_cv_statfs = yes; then ++ AC_DEFINE(BSD_STYLE_STATVFS,1,[Whether statfs struct is *bsd style]) ++fi ++# End of checks POSIX ignorant BSD style statvfs() function ++ ++# Checks for the vfs_fileid module ++# Start ++AC_CHECK_FUNC(getmntent) ++ ++AC_CHECK_HEADERS(sys/statfs.h) ++ ++AC_MSG_CHECKING([vfs_fileid: checking for statfs() and struct statfs.f_fsid]) ++AC_CACHE_VAL(vfsfileid_cv_statfs,[ ++ AC_TRY_RUN([ ++ #include <sys/types.h> ++ #include <sys/statfs.h> ++ int main(void) ++ { ++ struct statfs fsd; ++ fsid_t fsid = fsd.f_fsid; ++ return statfs (".", &fsd); ++ }], ++ vfsfileid_cv_statfs=yes, ++ vfsfileid_cv_statfs=no, ++ vfsfileid_cv_statfs=cross) ++]) ++AC_MSG_RESULT($vfsfileid_cv_statfs) ++ ++if test x"$ac_cv_func_getmntent" = x"yes" -a \ ++ x"$vfsfileid_cv_statfs" = x"yes"; then ++ default_shared_modules="$default_shared_modules vfs_fileid" ++fi ++# End ++# Checks for the vfs_fileid module ++ ++# btrfs features are dependent on Linux ioctl headers ++if test x"$ac_cv_header_sys_ioctl_h" = xyes -a \ ++ x"$ac_cv_header_linux_ioctl_h" = xyes; then ++ default_shared_modules="$default_shared_modules vfs_btrfs" ++fi ++# End btrfs ++ ++for i in `echo $default_static_modules | sed -e 's/,/ /g'` ++do ++ eval MODULE_DEFAULT_$i=STATIC ++done ++ ++for i in `echo $default_shared_modules | sed -e 's/,/ /g'` ++do ++ dnl Fall back to static if we cannot build shared libraries ++ eval MODULE_DEFAULT_$i=STATIC ++ ++ if test $BLDSHARED = true; then ++ eval MODULE_DEFAULT_$i=SHARED ++ fi ++done ++ ++dnl Always build these modules static ++MODULE_rpc_spoolss=STATIC ++MODULE_rpc_srvsvc=STATIC ++MODULE_idmap_tdb=STATIC ++MODULE_idmap_passdb=STATIC ++MODULE_idmap_nss=STATIC ++ ++MODULE_nss_info_template=STATIC ++ ++AC_ARG_WITH(static-modules, ++[AS_HELP_STRING([--with-static-modules=MODULES], [Comma-separated list of names of modules to statically link in])], ++[ if test $withval; then ++ for i in `echo $withval | sed -e 's/,/ /g'` ++ do ++ eval MODULE_$i=STATIC ++ done ++fi ]) ++ ++AC_ARG_WITH(shared-modules, ++[AS_HELP_STRING([--with-shared-modules=MODULES], [Comma-separated list of names of modules to build shared])], ++[ if test $withval; then ++ for i in `echo $withval | sed -e 's/,/ /g'` ++ do ++ eval MODULE_$i=SHARED ++ done ++fi ]) ++ ++# additionally, support pdb_ldap -> pdb_ldapsam replacement ++if test x"$MODULE_pdb_ldap" != x ; then ++ MODULE_pdb_ldapsam="$MODULE_pdb_ldap" ++fi ++ ++if test x"$MODULE_DEFAULT_vfs_notify_fam" = xSTATIC -o \ ++ x"$MODULE_vfs_notify_fam" = xSTATIC ; then ++ SMBD_FAM_LIBS="$SMB_FAM_LIBS" ++ AC_SUBST(SMBD_FAM_LIBS) ++fi ++ ++SMB_MODULE(pdb_ldapsam, passdb/pdb_ldap.o passdb/pdb_nds.o passdb/pdb_ipa.o passdb/pdb_ldap_util.o, ++ "bin/ldapsam.$SHLIBEXT", PDB, ++ [ PASSDB_LIBS="$PASSDB_LIBS $LDAP_LIBS" ] ) ++SMB_MODULE(pdb_smbpasswd, passdb/pdb_smbpasswd.o, "bin/smbpasswd.$SHLIBEXT", PDB) ++SMB_MODULE(pdb_tdbsam, passdb/pdb_tdb.o, "bin/tdbsam.$SHLIBEXT", PDB) ++SMB_MODULE(pdb_wbc_sam, passdb/pdb_wbc_sam.o, "bin/wbc_sam.$SHLIBEXT", PDB) ++SMB_SUBSYSTEM(PDB,passdb/pdb_interface.o) ++ ++SMB_MODULE(idmap_ldap, winbindd/idmap_ldap.o, "bin/ldap.$SHLIBEXT", IDMAP) ++SMB_MODULE(idmap_tdb, winbindd/idmap_tdb.o, "bin/tdb.$SHLIBEXT", IDMAP) ++SMB_MODULE(idmap_tdb2, winbindd/idmap_tdb2.o, "bin/tdb2.$SHLIBEXT", IDMAP) ++SMB_MODULE(idmap_passdb, winbindd/idmap_passdb.o, "bin/passdb.$SHLIBEXT", IDMAP) ++SMB_MODULE(idmap_nss, winbindd/idmap_nss.o, "bin/nss.$SHLIBEXT", IDMAP) ++SMB_MODULE(idmap_rid, winbindd/idmap_rid.o, "bin/rid.$SHLIBEXT", IDMAP) ++SMB_MODULE(idmap_autorid, winbindd/idmap_autorid.o, "bin/autorid.$SHLIBEXT", IDMAP) ++SMB_MODULE(idmap_ad, winbindd/idmap_ad.o, "bin/ad.$SHLIBEXT", IDMAP) ++SMB_MODULE(idmap_rfc2307, winbindd/idmap_rfc2307.o, "bin/rfc2307.$SHLIBEXT", IDMAP) ++SMB_MODULE(idmap_hash, \$(IDMAP_HASH_OBJ), "bin/hash.$SHLIBEXT", IDMAP) ++SMB_SUBSYSTEM(IDMAP, winbindd/idmap.o) ++ ++SMB_MODULE(nss_info_template, winbindd/nss_info_template.o, "bin/template.$SHLIBEXT", NSS_INFO) ++SMB_SUBSYSTEM(NSS_INFO, winbindd/nss_info.o) ++ ++SMB_MODULE(auth_sam, \$(AUTH_SAM_OBJ), "bin/sam.$SHLIBEXT", AUTH) ++SMB_MODULE(auth_unix, \$(AUTH_UNIX_OBJ), "bin/unix.$SHLIBEXT", AUTH) ++SMB_MODULE(auth_winbind, \$(AUTH_WINBIND_OBJ), "bin/winbind.$SHLIBEXT", AUTH) ++SMB_MODULE(auth_wbc, \$(AUTH_WBC_OBJ), "bin/wbc.$SHLIBEXT", AUTH) ++SMB_MODULE(auth_domain, \$(AUTH_DOMAIN_OBJ), "bin/domain.$SHLIBEXT", AUTH) ++SMB_MODULE(auth_builtin, \$(AUTH_BUILTIN_OBJ), "bin/builtin.$SHLIBEXT", AUTH) ++SMB_MODULE(auth_script, \$(AUTH_SCRIPT_OBJ), "bin/script.$SHLIBEXT", AUTH) ++SMB_SUBSYSTEM(AUTH,auth/auth.o) ++ ++SMB_MODULE(vfs_default, \$(VFS_DEFAULT_OBJ), "bin/default.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_recycle, \$(VFS_RECYCLE_OBJ), "bin/recycle.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_audit, \$(VFS_AUDIT_OBJ), "bin/audit.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_extd_audit, \$(VFS_EXTD_AUDIT_OBJ), "bin/extd_audit.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_full_audit, \$(VFS_FULL_AUDIT_OBJ), "bin/full_audit.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_netatalk, \$(VFS_NETATALK_OBJ), "bin/netatalk.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_fake_perms, \$(VFS_FAKE_PERMS_OBJ), "bin/fake_perms.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_fake_acls, \$(VFS_FAKE_ACLS_OBJ), "bin/fake_acls.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_default_quota, \$(VFS_DEFAULT_QUOTA_OBJ), "bin/default_quota.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_readonly, \$(VFS_READONLY_OBJ), "bin/readonly.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_cap, \$(VFS_CAP_OBJ), "bin/cap.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_expand_msdfs, \$(VFS_EXPAND_MSDFS_OBJ), "bin/expand_msdfs.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_shadow_copy, \$(VFS_SHADOW_COPY_OBJ), "bin/shadow_copy.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_shadow_copy2, \$(VFS_SHADOW_COPY2_OBJ), "bin/shadow_copy2.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_afsacl, \$(VFS_AFSACL_OBJ), "bin/afsacl.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_xattr_tdb, \$(VFS_XATTR_TDB_OBJ), "bin/xattr_tdb.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_nfs4acl_xattr, \$(VFS_XATTR_TDB_OBJ), "bin/nfs4acl_xattr.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_posixacl, \$(VFS_POSIXACL_OBJ), "bin/posixacl.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_aixacl, \$(VFS_AIXACL_OBJ), "bin/aixacl.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_aixacl2, \$(VFS_AIXACL2_OBJ), "bin/aixacl2.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_solarisacl, \$(VFS_SOLARISACL_OBJ), "bin/solarisacl.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_hpuxacl, \$(VFS_HPUXACL_OBJ), "bin/hpuxacl.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_tru64acl, \$(VFS_TRU64ACL_OBJ), "bin/tru64acl.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_catia, \$(VFS_CATIA_OBJ), "bin/catia.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_streams_xattr, \$(VFS_STREAMS_XATTR_OBJ), "bin/streams_xattr.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_streams_depot, \$(VFS_STREAMS_DEPOT_OBJ), "bin/streams_depot.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_cacheprime, \$(VFS_CACHEPRIME_OBJ), "bin/cacheprime.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_prealloc, \$(VFS_PREALLOC_OBJ), "bin/prealloc.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_commit, \$(VFS_COMMIT_OBJ), "bin/commit.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_gpfs, \$(VFS_GPFS_OBJ), "bin/gpfs.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), "bin/readahead.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_tsmsm, \$(VFS_TSMSM_OBJ), "bin/tsmsm.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_fileid, \$(VFS_FILEID_OBJ), "bin/fileid.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_aio_fork, \$(VFS_AIO_FORK_OBJ), "bin/aio_fork.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_aio_pthread, \$(VFS_AIO_PTHREAD_OBJ), "bin/aio_pthread.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_aio_posix, \$(VFS_AIO_POSIX_OBJ), "bin/aio_posix.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_aio_linux, \$(VFS_AIO_LINUX_OBJ), "bin/aio_linux.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_preopen, \$(VFS_PREOPEN_OBJ), "bin/preopen.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_syncops, \$(VFS_SYNCOPS_OBJ), "bin/syncops.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_zfsacl, \$(VFS_ZFSACL_OBJ), "bin/zfsacl.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_notify_fam, \$(VFS_NOTIFY_FAM_OBJ), "bin/notify_fam.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_acl_xattr, \$(VFS_ACL_XATTR_OBJ), "bin/acl_xattr.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_acl_tdb, \$(VFS_ACL_TDB_OBJ), "bin/acl_tdb.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_smb_traffic_analyzer, \$(VFS_SMB_TRAFFIC_ANALYZER_OBJ), "bin/smb_traffic_analyzer.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_dirsort, \$(VFS_DIRSORT_OBJ), "bin/dirsort.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_scannedonly, \$(VFS_SCANNEDONLY_OBJ), "bin/scannedonly.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_crossrename, \$(VFS_CROSSRENAME_OBJ), "bin/crossrename.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_linux_xfs_sgid, \$(VFS_LINUX_XFS_SGID_OBJ), "bin/linux_xfs_sgid.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_time_audit, \$(VFS_TIME_AUDIT_OBJ), "bin/time_audit.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_media_harmony, \$(VFS_MEDIA_HARMONY_OBJ), "bin/media_harmony.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_btrfs, \$(VFS_BTRFS_OBJ), "bin/btrfs.$SHLIBEXT", VFS) ++SMB_MODULE(vfs_ceph, \$(VFS_CEPH_OBJ), "bin/ceph.$SHLIBEXT", VFS) ++ ++SMB_SUBSYSTEM(VFS,smbd/vfs.o) ++ ++SMB_MODULE(perfcount_test, \$(PERFCOUNT_TEST), "bin/pc_test.$SHLIBEXT", PERFCOUNT) ++SMB_SUBSYSTEM(PERFCOUNT,smbd/perfcount.o) ++ ++SMB_MODULE(gpext_registry, libgpo/gpext/registry.o, "bin/registry.$SHLIBEXT", GPEXT) ++SMB_MODULE(gpext_scripts, libgpo/gpext/scripts.o, "bin/scripts.$SHLIBEXT", GPEXT) ++SMB_MODULE(gpext_security, libgpo/gpext/security.o, "bin/security.$SHLIBEXT", GPEXT) ++SMB_SUBSYSTEM(GPEXT, libgpo/gpext/gpext.o) ++ ++AC_DEFINE_UNQUOTED(STRING_STATIC_MODULES, "$string_static_modules", [String list of builtin modules]) ++ ++################################################# ++# do extra things if we are running insure ++ ++if test "${ac_cv_prog_CC}" = "insure"; then ++ CPPFLAGS="$CPPFLAGS -D__INSURE__" ++fi ++ ++################################################# ++# If run from the build farm, enable NASTY hacks ++################################################# ++AC_MSG_CHECKING(whether to enable features for selftest) ++if test x"$selftest" = x"yes"; then ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(ENABLE_SELFTEST, 1, [Support features needed for selftest]) ++ if test x"$selftest_possible" != xyes; then ++ AC_MSG_ERROR(selftest support only possible with python, including development headers, and perl installed) ++ fi ++else ++ AC_MSG_RESULT(no) ++fi ++ ++################################################# ++# check for bad librt/libpthread interactions ++ ++if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes" -o \ ++ x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes" -o \ ++ x"$samba_cv_HAVE_AIO64" = x"yes" -o \ ++ x"$samba_cv_HAVE_AIO" = x"yes" ; then ++ ++SMB_IF_RTSIGNAL_BUG( ++ [ ++ # Have RT_SIGNAL bug, need to check whether the problem will ++ # affect anything we have configured. ++ ++ rt_do_error=no ++ if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then ++ if test x"$rt_signal_lease_ok" = x"no" ; then ++ rt_do_error=yes ++ fi ++ fi ++ ++ if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then ++ if test x"$rt_signal_notify_ok" = x"no" ; then ++ rt_do_error=yes ++ fi ++ fi ++ ++ if test x"$samba_cv_HAVE_AIO64" = x"yes" -o \ ++ x"$samba_cv_HAVE_AIO" = x"yes" ; then ++ if test x"$rt_signal_aio_ok" = x"no" ; then ++ rt_do_error=yes ++ fi ++ fi ++ ++ if test x"$rt_do_error" = x"yes" ; then ++ SMB_IS_LIBPTHREAD_LINKED( ++ [ ++ cat<<MSG ++ ++*** On this platforms, linking Samba against pthreads causes problems ++*** with the oplock and change notification mechanisms. You may be ++*** using pthreads as a side-effect of using the --with-aio-support ++*** or --with-profiling-data options. Please remove these and try again. ++ ++MSG ++ ], ++ [ ++ cat<<MSG ++ ++*** On this platform, the oplock and change notification mechanisms do not ++*** appear to work. Please report this problem to samba-technical@samba.org ++*** and attach the config.log file from this directory. ++ ++MSG ++ ]) ++ AC_MSG_ERROR(unable to use realtime signals on this platform) ++ fi ++ ], ++ [ ++ # no RT_SIGNAL bug, we are golden ++ SMB_IS_LIBPTHREAD_LINKED( ++ [ ++ AC_MSG_WARN(using libpthreads - this may degrade performance) ++ ]) ++ ++ ], ++ [ ++ # cross compiling, I hope you know what you are doing ++ true ++ ]) ++ ++fi ++ ++m4_include(../lib/zlib/zlib.m4) ++ ++AC_SUBST(ZLIB_LIBS) ++AC_SUBST(ZLIB_OBJS) ++AC_ZLIB([ZLIB_OBJS=""], [ ++ ZLIB_LIBS="" ++ for o in adler32.o compress.o crc32.o gzio.o uncompr.o \ ++ deflate.o trees.o zutil.o inflate.o infback.o \ ++ inftrees.o inffast.o ++ do ++ ZLIB_OBJS="$ZLIB_OBJS ../lib/zlib/$o" ++ done ++ CFLAGS="-I../lib/zlib $CFLAGS" ++]) ++ ++AC_DEFINE(STATIC_gensec_MODULES, [gensec_spnego_init,gensec_ntlmssp_init,NULL],[gensec modules]) ++AC_DEFINE(STATIC_gensec_MODULES_PROTO, [_MODULE_PROTO(gensec_spnego_init)_MODULE_PROTO(gensec_ntlmssp_init)],[gensec protos]) ++ ++AC_ARG_ENABLE(dmalloc, [AS_HELP_STRING([--enable-dmalloc], [Enable heap debugging [default=no]])]) ++ ++if test "x$enable_dmalloc" = xyes ++then ++ AC_DEFINE(ENABLE_DMALLOC, 1, [Define to turn on dmalloc debugging]) ++ AC_DEFINE(DMALLOC_FUNC_CHECK, 1, ++ [Define to check invariants around some common functions]) ++ LIBS="$LIBS -ldmalloc" ++fi ++ ++dnl Remove -L/usr/lib/? from LDFLAGS and LIBS ++LIB_REMOVE_USR_LIB(LDFLAGS) ++LIB_REMOVE_USR_LIB(LIBS) ++ ++dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS ++CFLAGS_REMOVE_USR_INCLUDE(CFLAGS) ++CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS) ++ ++################################################# ++# Display summary of libraries detected ++ ++AC_MSG_RESULT([Using libraries:]) ++AC_MSG_RESULT([ LIBS = $LIBS]) ++if test x"$with_ads_support" != x"no"; then ++ AC_MSG_RESULT([ KRB5_LIBS = $KRB5_LIBS]) ++fi ++if test x"$with_ldap_support" != x"no"; then ++ AC_MSG_RESULT([ LDAP_LIBS = $LDAP_LIBS]) ++fi ++if test x"$have_dnssd_support" != x"no"; then ++ AC_MSG_RESULT([ DNSSD_LIBS = $DNSSD_LIBS]) ++fi ++AC_MSG_RESULT([ AUTH_LIBS = $AUTH_LIBS]) ++ ++################################################# ++# final configure stuff ++ ++AC_MSG_CHECKING([configure summary]) ++AC_TRY_RUN([#include "${srcdir-.}/../tests/summary.c"], ++ AC_MSG_RESULT(yes), ++ AC_MSG_ERROR([summary failure. Aborting config]); exit 1;, ++ AC_MSG_WARN([cannot run when cross-compiling])) ++ ++dnl Merge in developer cflags from now on ++AC_SUBST(DEVELOPER_CFLAGS) ++if test x"$krb5_developer" = x"yes" -o x"$developer" = x"yes" -o x"$picky_developer" = x"yes"; then ++ CFLAGS="${CFLAGS} \$(DEVELOPER_CFLAGS) ${CFLAGS_APPEND}" ++fi ++ ++# Stuff the smbd-only libraries at the end of the smbd link ++# path (if we have them). ++SMBD_LIBS="$samba_dmapi_libs" ++AC_SUBST(SMBD_LIBS) ++ ++CFLAGS="${CFLAGS} \$(FLAGS)" ++CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3" ++ ++# If we had to expand the includes, make tsure the output file is moved back ++AC_OUTPUT_COMMANDS([ ++if test -f Makefile-noincludes -a ! -f Makefile -a ! -h Makefile ; then ++ ln -s Makefile-noincludes Makefile ++fi ++]) ++ ++AC_OUTPUT(Makefile ++ script/findsmb smbadduser script/installbin.sh script/uninstallbin.sh ++ lib/netapi/examples/Makefile ++ lib/netapi/tests/Makefile ++ pkgconfig/smbclient.pc ++ pkgconfig/wbclient.pc ++ pkgconfig/netapi.pc ++ pkgconfig/smbsharemodes.pc ++ ../examples/libsmbclient/Makefile.internal ++ ) ++ ++################################################# ++# Print very concise instructions on building/use ++if test "x$enable_dmalloc" = xyes ++then ++ AC_MSG_RESULT([Note: The dmalloc debug library will be included. To turn it on use]) ++ AC_MSG_RESULT([ \$ eval \`dmalloc samba\`.]) ++fi +diff --git a/source3/m4/aclocal.m4 b/source3/m4/aclocal.m4 +new file mode 100644 +index 0000000..5d9ce30 +--- /dev/null ++++ b/source3/m4/aclocal.m4 +@@ -0,0 +1,899 @@ ++dnl test whether dirent has a d_off member ++AC_DEFUN(AC_DIRENT_D_OFF, ++[AC_CACHE_CHECK([for d_off in dirent], ac_cv_dirent_d_off, ++[AC_TRY_COMPILE([ ++#include <unistd.h> ++#include <sys/types.h> ++#include <dirent.h>], [struct dirent d; d.d_off;], ++ac_cv_dirent_d_off=yes, ac_cv_dirent_d_off=no)]) ++if test $ac_cv_dirent_d_off = yes; then ++ AC_DEFINE(HAVE_DIRENT_D_OFF,1,[Whether dirent has a d_off member]) ++fi ++]) ++ ++dnl Mark specified module as shared ++dnl SMB_MODULE(name,static_files,shared_files,subsystem,whatif-static,whatif-shared) ++AC_DEFUN(SMB_MODULE, ++[ ++ AC_MSG_CHECKING([how to build $1]) ++ if test "$[MODULE_][$1]"; then ++ DEST=$[MODULE_][$1] ++ elif test "$[MODULE_]translit([$4], [A-Z], [a-z])" -a "$[MODULE_DEFAULT_][$1]"; then ++ DEST=$[MODULE_]translit([$4], [A-Z], [a-z]) ++ else ++ DEST=$[MODULE_DEFAULT_][$1] ++ fi ++ ++ if test x"$DEST" = xSHARED; then ++ AC_DEFINE([$1][_init], [samba_init_module], [Whether to build $1 as shared module]) ++ $4_MODULES="$$4_MODULES $3" ++ AC_MSG_RESULT([shared]) ++ [$6] ++ string_shared_modules="$string_shared_modules $1" ++ elif test x"$DEST" = xSTATIC; then ++ [init_static_modules_]translit([$4], [A-Z], [a-z])="$[init_static_modules_]translit([$4], [A-Z], [a-z]) $1_init();" ++ [decl_static_modules_]translit([$4], [A-Z], [a-z])="$[decl_static_modules_]translit([$4], [A-Z], [a-z]) extern NTSTATUS $1_init(void);" ++ string_static_modules="$string_static_modules $1" ++ $4_STATIC="$$4_STATIC $2" ++ AC_SUBST($4_STATIC) ++ [$5] ++ AC_MSG_RESULT([static]) ++ else ++ string_ignored_modules="$string_ignored_modules $1" ++ AC_MSG_RESULT([not]) ++ fi ++]) ++ ++AC_DEFUN(SMB_SUBSYSTEM, ++[ ++ AC_SUBST($1_STATIC) ++ AC_SUBST($1_MODULES) ++ AC_DEFINE_UNQUOTED([static_init_]translit([$1], [A-Z], [a-z]), [{$init_static_modules_]translit([$1], [A-Z], [a-z])[}], [Static init functions]) ++ AC_DEFINE_UNQUOTED([static_decl_]translit([$1], [A-Z], [a-z]), [$decl_static_modules_]translit([$1], [A-Z], [a-z]), [Decl of Static init functions]) ++ ifelse([$2], , :, [rm -f $2]) ++]) ++ ++ ++dnl SMB_LIBRARY(name, soversion, fullversion, default, reason) ++dnl ++dnl configure build and use of an (internal) shared library ++dnl ++AC_DEFUN([SMB_LIBRARY], ++[ ++m4_pushdef([LIBNAME], [lib$1]) ++m4_pushdef([LIBUC], [m4_toupper(LIBNAME)]) ++m4_pushdef([LIBLIBS], [-l$1]) ++ ++LIBUC[_SHARED_TARGET]=bin/LIBNAME.$SHLIBEXT ++LIBUC[_STATIC_TARGET]=bin/LIBNAME.a ++LIBUC[_SHARED]= ++LIBUC[_STATIC]= ++LIBUC[_LIBS]=LIBLIBS ++LIBUC[_TARGET]= ++[INSTALL_]LIBUC= ++[UNINSTALL_]LIBUC= ++ ++m4_if([$2], [], [LIBUC[_SOVER]=0], [LIBUC[_SOVER]=$2]) ++m4_if([$3], [], [LIBUC[_FULLVER]=$LIBUC[_SOVER]], [LIBUC[_FULLVER]=$3]) ++ ++LIBUC[_SHARED_TARGET_SOVER]=$LIBUC[_SHARED_TARGET].$LIBUC[_SOVER] ++LIBUC[_SHARED_TARGET_FULLVER]=$LIBUC[_SHARED_TARGET].$LIBUC[_FULLVER] ++ ++AC_SUBST(LIBUC[_SHARED_TARGET]) ++AC_SUBST(LIBUC[_STATIC_TARGET]) ++AC_SUBST(LIBUC[_SHARED]) ++AC_SUBST(LIBUC[_STATIC]) ++AC_SUBST(LIBUC[_LIBS]) ++AC_SUBST(LIBUC[_TARGET]) ++AC_SUBST([INSTALL_]LIBUC) ++AC_SUBST([UNINSTALL_]LIBUC) ++AC_SUBST(LIBUC[_SOVER]) ++AC_SUBST(LIBUC[_FULLVER]) ++AC_SUBST(LIBUC[_SHARED_TARGET_SOVER]) ++AC_SUBST(LIBUC[_SHARED_TARGET_FULLVER]) ++ ++AC_MSG_CHECKING([whether to build the LIBNAME shared library]) ++m4_if([$4], [no], [ ++dnl set the default to not build the shared lib ++AC_ARG_WITH(LIBNAME, ++AS_HELP_STRING([--with-]LIBNAME, ++ m4_if([$5], [], ++ [Build the LIBNAME shared library (default=no)], ++ [Build the LIBNAME shared library (default=no ($5))])), ++[ ++case "$withval" in ++ yes) ++ build_lib=yes ++ ;; ++ *) ++ AC_MSG_RESULT(no) ++ build_lib=no ++ ;; ++esac ++], ++[ ++# if unspecified, default is not to build ++AC_MSG_RESULT(no) ++build_lib=no ++] ++) ++],[ ++dnl by default, try to build the shared lib ++AC_ARG_WITH(LIBNAME, ++AS_HELP_STRING([--with-]LIBNAME, ++ [Build the LIBNAME shared library (default=yes if shared libs supported)]), ++[ ++case "$withval" in ++ no) ++ AC_MSG_RESULT(no) ++ build_lib=no ++ ;; ++ *) ++ build_lib=yes ++ ;; ++esac ++], ++[ ++# if unspecified, default is to build it if possible. ++build_lib=yes ++] ++) ++]) ++ ++if eval test x"$build_lib" = "xyes" ; then ++ # only set the install targets if the user chose the library ++ [INSTALL_]LIBUC=[install]LIBNAME ++ [UNINSTALL_]LIBUC=[uninstall]LIBNAME ++ if eval $BLDSHARED = true; then ++ LIBUC[_SHARED]=$LIBUC[_SHARED_TARGET] ++ LIBUC[_TARGET]=$LIBUC[_SHARED_TARGET] ++ ++ AC_MSG_RESULT(yes) ++ if test x"$USESHARED" != x"true" -o x"$[LINK_]LIBUC" = "xSTATIC" ; then ++ enable_static=yes ++ LIBUC[_TARGET]=$LIBUC[_STATIC_TARGET] ++ LIBUC[_LIBS]=$LIBUC[_STATIC_TARGET] ++ else ++ LIBUC[_LIBS]=LIBLIBS ++ fi ++ else ++ enable_static=yes ++ LIBUC[_TARGET]=$LIBUC[_STATIC_TARGET] ++ LIBUC[_LIBS]=$LIBUC[_STATIC_TARGET] ++ AC_MSG_RESULT(no shared library support -- will supply static library) ++ fi ++else ++ enable_static=yes ++ AC_MSG_RESULT(shared library not selected, but will supply static library) ++fi ++if test $enable_static = yes; then ++ LIBUC[_STATIC]=$LIBUC[_STATIC_TARGET] ++fi ++ ++m4_popdef([LIBNAME]) ++m4_popdef([LIBUC]) ++m4_popdef([LIBLIBS]) ++ ++]) ++ ++ ++dnl AC_LIBTESTFUNC(lib, function, [actions if found], [actions if not found]) ++dnl Check for a function in a library, but don't keep adding the same library ++dnl to the LIBS variable. Check whether the function is available in the ++dnl current LIBS before adding the library which prevents us spuriously ++dnl adding libraries for symbols that are in libc. ++dnl ++dnl On success, the default actions ensure that HAVE_FOO is defined. The lib ++dnl is always added to $LIBS if it was found to be necessary. The caller ++dnl can use SMB_REMOVE_LIB to strp this if necessary. ++AC_DEFUN([AC_LIBTESTFUNC], ++[ ++ AC_CHECK_FUNCS($2, ++ [ ++ # $2 was found in libc or existing $LIBS ++ m4_ifval([$3], ++ [ ++ $3 ++ ], ++ [ ++ AC_DEFINE(translit([HAVE_$2], [a-z], [A-Z]), 1, ++ [Whether $2 is available]) ++ ]) ++ ], ++ [ ++ # $2 was not found, try adding lib$1 ++ case " $LIBS " in ++ *\ -l$1\ *) ++ m4_ifval([$4], ++ [ ++ $4 ++ ], ++ [ ++ # $2 was not found and we already had lib$1 ++ # nothing to do here by default ++ true ++ ]) ++ ;; ++ *) ++ # $2 was not found, try adding lib$1 ++ AC_CHECK_LIB($1, $2, ++ [ ++ LIBS="-l$1 $LIBS" ++ m4_ifval([$3], ++ [ ++ $3 ++ ], ++ [ ++ AC_DEFINE(translit([HAVE_$2], [a-z], [A-Z]), 1, ++ [Whether $2 is available]) ++ ]) ++ ], ++ [ ++ m4_ifval([$4], ++ [ ++ $4 ++ ], ++ [ ++ # $2 was not found in lib$1 ++ # nothing to do here by default ++ true ++ ]) ++ ]) ++ ;; ++ esac ++ ]) ++]) ++ ++# AC_CHECK_LIB_EXT(LIBRARY, [EXT_LIBS], [FUNCTION], ++# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], ++# [ADD-ACTION-IF-FOUND],[OTHER-LIBRARIES]) ++# ------------------------------------------------------ ++# ++# Use a cache variable name containing both the library and function name, ++# because the test really is for library $1 defining function $3, not ++# just for library $1. Separate tests with the same $1 and different $3s ++# may have different results. ++# ++# Note that using directly AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$3]) ++# is asking for trouble, since AC_CHECK_LIB($lib, fun) would give ++# ac_cv_lib_$lib_fun, which is definitely not what was meant. Hence ++# the AS_LITERAL_IF indirection. ++# ++# FIXME: This macro is extremely suspicious. It DEFINEs unconditionally, ++# whatever the FUNCTION, in addition to not being a *S macro. Note ++# that the cache does depend upon the function we are looking for. ++# ++# It is on purpose we used `ac_check_lib_ext_save_LIBS' and not just ++# `ac_save_LIBS': there are many macros which don't want to see `LIBS' ++# changed but still want to use AC_CHECK_LIB_EXT, so they save `LIBS'. ++# And ``ac_save_LIBS' is too tempting a name, so let's leave them some ++# freedom. ++AC_DEFUN([AC_CHECK_LIB_EXT], ++[ ++AH_CHECK_LIB_EXT([$1]) ++ac_check_lib_ext_save_LIBS=$LIBS ++LIBS="-l$1 $$2 $7 $LIBS" ++AS_LITERAL_IF([$1], ++ [AS_VAR_PUSHDEF([ac_Lib_ext], [ac_cv_lib_ext_$1])], ++ [AS_VAR_PUSHDEF([ac_Lib_ext], [ac_cv_lib_ext_$1''])])dnl ++ ++m4_ifval([$3], ++ [ ++ AH_CHECK_FUNC_EXT([$3]) ++ AS_LITERAL_IF([$1], ++ [AS_VAR_PUSHDEF([ac_Lib_func], [ac_cv_lib_ext_$1_$3])], ++ [AS_VAR_PUSHDEF([ac_Lib_func], [ac_cv_lib_ext_$1''_$3])])dnl ++ AC_CACHE_CHECK([for $3 in -l$1], ac_Lib_func, ++ [AC_TRY_LINK_FUNC($3, ++ [AS_VAR_SET(ac_Lib_func, yes); ++ AS_VAR_SET(ac_Lib_ext, yes)], ++ [AS_VAR_SET(ac_Lib_func, no); ++ AS_VAR_SET(ac_Lib_ext, no)]) ++ ]) ++ AS_IF([test AS_VAR_GET(ac_Lib_func) = yes], ++ [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$3))])dnl ++ AS_VAR_POPDEF([ac_Lib_func])dnl ++ ],[ ++ AC_CACHE_CHECK([for -l$1], ac_Lib_ext, ++ [AC_TRY_LINK_FUNC([main], ++ [AS_VAR_SET(ac_Lib_ext, yes)], ++ [AS_VAR_SET(ac_Lib_ext, no)]) ++ ]) ++ ]) ++LIBS=$ac_check_lib_ext_save_LIBS ++ ++AS_IF([test AS_VAR_GET(ac_Lib_ext) = yes], ++ [m4_default([$4], ++ [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1)) ++ case "$$2" in ++ *-l$1*) ++ ;; ++ *) ++ $2="-l$1 $$2" ++ ;; ++ esac]) ++ [$6] ++ ], ++ [$5])dnl ++AS_VAR_POPDEF([ac_Lib_ext])dnl ++])# AC_CHECK_LIB_EXT ++ ++# AH_CHECK_LIB_EXT(LIBNAME) ++# --------------------- ++m4_define([AH_CHECK_LIB_EXT], ++[AH_TEMPLATE(AS_TR_CPP(HAVE_LIB$1), ++ [Define to 1 if you have the `]$1[' library (-l]$1[).])]) ++ ++# AC_CHECK_FUNCS_EXT(FUNCTION, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) ++# ----------------------------------------------------------------- ++dnl check for a function in a $LIBS and $OTHER_LIBS libraries variable. ++dnl AC_CHECK_FUNC_EXT(func,OTHER_LIBS,IF-TRUE,IF-FALSE) ++AC_DEFUN([AC_CHECK_FUNC_EXT], ++[ ++ AH_CHECK_FUNC_EXT($1) ++ ac_check_func_ext_save_LIBS=$LIBS ++ LIBS="$2 $LIBS" ++ AS_VAR_PUSHDEF([ac_var], [ac_cv_func_ext_$1])dnl ++ AC_CACHE_CHECK([for $1], ac_var, ++ [AC_LINK_IFELSE([AC_LANG_FUNC_LINK_TRY([$1])], ++ [AS_VAR_SET(ac_var, yes)], ++ [AS_VAR_SET(ac_var, no)])]) ++ LIBS=$ac_check_func_ext_save_LIBS ++ AS_IF([test AS_VAR_GET(ac_var) = yes], ++ [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1])) $3], ++ [$4])dnl ++AS_VAR_POPDEF([ac_var])dnl ++])# AC_CHECK_FUNC_EXT ++ ++# AH_CHECK_FUNC_EXT(FUNCNAME) ++# --------------------- ++m4_define([AH_CHECK_FUNC_EXT], ++[AH_TEMPLATE(AS_TR_CPP(HAVE_$1), ++ [Define to 1 if you have the `]$1[' function.])]) ++ ++dnl Define an AC_DEFINE with ifndef guard. ++dnl AC_N_DEFINE(VARIABLE [, VALUE]) ++define(AC_N_DEFINE, ++[cat >> confdefs.h <<\EOF ++[#ifndef] $1 ++[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1) ++[#endif] ++EOF ++]) ++ ++dnl Add an #include ++dnl AC_ADD_INCLUDE(VARIABLE) ++define(AC_ADD_INCLUDE, ++[cat >> confdefs.h <<\EOF ++[#include] $1 ++EOF ++]) ++ ++dnl Copied from libtool.m4 ++AC_DEFUN(AC_PROG_LD_GNU, ++[AC_CACHE_CHECK([if the linker used by compiler is GNU ld], ac_cv_prog_gnu_ld, ++[# I'd rather use --version here, but apparently some GNU ld's only accept -v. ++if $CC -Wl,-v /dev/null 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then ++ ac_cv_prog_gnu_ld=yes ++else ++ ac_cv_prog_gnu_ld=no ++fi]) ++]) ++ ++dnl Removes -I/usr/include/? from given variable ++AC_DEFUN(CFLAGS_REMOVE_USR_INCLUDE,[ ++ ac_new_flags="" ++ for i in [$]$1; do ++ case [$]i in ++ -I/usr/include|-I/usr/include/) ;; ++ *) ac_new_flags="[$]ac_new_flags [$]i" ;; ++ esac ++ done ++ $1=[$]ac_new_flags ++]) ++ ++dnl Removes '-L/usr/lib[/]', '-Wl,-rpath,/usr/lib[/]' ++dnl and '-Wl,-rpath -Wl,/usr/lib[/]' from given variable ++AC_DEFUN(LIB_REMOVE_USR_LIB,[ ++ ac_new_flags="" ++ l="" ++ for i in [$]$1; do ++ case [$]l[$]i in ++ -L/usr/lib) ;; ++ -L/usr/lib/) ;; ++ -L/usr/lib64) ;; ++ -L/usr/lib64/) ;; ++ -Wl,-rpath,/usr/lib) l="";; ++ -Wl,-rpath,/usr/lib/) l="";; ++ -Wl,-rpath,/usr/lib64) l="";; ++ -Wl,-rpath,/usr/lib64/) l="";; ++ -Wl,-rpath) l=[$]i;; ++ -Wl,-rpath-Wl,/usr/lib) l="";; ++ -Wl,-rpath-Wl,/usr/lib/) l="";; ++ -Wl,-rpath-Wl,/usr/lib64) l="";; ++ -Wl,-rpath-Wl,/usr/lib64/) l="";; ++ -rpath=/usr/lib:*) l="-rpath=${i#-rpath=*:}";; ++ *) ++ s=" " ++ if test x"[$]ac_new_flags" = x""; then ++ s=""; ++ fi ++ if test x"[$]l" = x""; then ++ ac_new_flags="[$]ac_new_flags[$]s[$]i"; ++ else ++ ac_new_flags="[$]ac_new_flags[$]s[$]l [$]i"; ++ fi ++ l="" ++ ;; ++ esac ++ done ++ $1=[$]ac_new_flags ++]) ++ ++dnl From Bruno Haible. ++ ++AC_DEFUN(jm_ICONV, ++[ ++ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and ++ dnl those with the standalone portable libiconv installed). ++ AC_MSG_CHECKING(for iconv in $1) ++ jm_cv_func_iconv="no" ++ jm_cv_lib_iconv="" ++ jm_cv_giconv=no ++ jm_save_LIBS="$LIBS" ++ ++ dnl Check for include in giconv.h but no lib needed ++ if test "$jm_cv_func_iconv" != yes; then ++ AC_TRY_LINK([#include <stdlib.h> ++#include <giconv.h>], ++ [iconv_t cd = iconv_open("",""); ++ iconv(cd,NULL,NULL,NULL,NULL); ++ iconv_close(cd);], ++ jm_cv_func_iconv=yes ++ jm_cv_include="giconv.h" ++ jm_cv_giconv="yes" ++ jm_cv_lib_iconv="") ++ ++ dnl Standard iconv.h include, lib in glibc or libc ... ++ if test "$jm_cv_func_iconv" != yes; then ++ AC_TRY_LINK([#include <stdlib.h> ++#include <iconv.h>], ++ [iconv_t cd = iconv_open("",""); ++ iconv(cd,NULL,NULL,NULL,NULL); ++ iconv_close(cd);], ++ jm_cv_include="iconv.h" ++ jm_cv_func_iconv=yes ++ jm_cv_lib_iconv="") ++ ++ dnl Include in giconv.h, libgiconv needed to link ++ if test "$jm_cv_func_iconv" != yes; then ++ jm_save_LIBS="$LIBS" ++ LIBS="$LIBS -lgiconv" ++ AC_TRY_LINK([#include <stdlib.h> ++#include <giconv.h>], ++ [iconv_t cd = iconv_open("",""); ++ iconv(cd,NULL,NULL,NULL,NULL); ++ iconv_close(cd);], ++ jm_cv_lib_iconv=yes ++ jm_cv_func_iconv=yes ++ jm_cv_include="giconv.h" ++ jm_cv_giconv=yes ++ jm_cv_lib_iconv="giconv") ++ ++ LIBS="$jm_save_LIBS" ++ ++ dnl Include in iconv.h, libiconv needed to link ++ if test "$jm_cv_func_iconv" != yes; then ++ jm_save_LIBS="$LIBS" ++ LIBS="$LIBS -liconv" ++ AC_TRY_LINK([#include <stdlib.h> ++#include <iconv.h>], ++ [iconv_t cd = iconv_open("",""); ++ iconv(cd,NULL,NULL,NULL,NULL); ++ iconv_close(cd);], ++ jm_cv_include="iconv.h" ++ jm_cv_func_iconv=yes ++ jm_cv_lib_iconv="iconv") ++ LIBS="$jm_save_LIBS" ++ ++ dnl Include in biconv.h, libbiconv needed to link ++ if test "$jm_cv_func_iconv" != yes; then ++ jm_save_LIBS="$LIBS" ++ LIBS="$LIBS -lbiconv" ++ AC_TRY_LINK([#include <stdlib.h> ++#include <biconv.h>], ++ [iconv_t cd = iconv_open("",""); ++ iconv(cd,NULL,NULL,NULL,NULL); ++ iconv_close(cd);], ++ jm_cv_lib_iconv=yes ++ jm_cv_func_iconv=yes ++ jm_cv_include="biconv.h" ++ jm_cv_biconv=yes ++ jm_cv_lib_iconv="biconv") ++ ++ LIBS="$jm_save_LIBS" ++ fi ++ fi ++ fi ++ fi ++ fi ++ if test "$jm_cv_func_iconv" = yes; then ++ if test "$jm_cv_giconv" = yes; then ++ AC_DEFINE(HAVE_GICONV, 1, [What header to include for iconv() function: giconv.h]) ++ AC_MSG_RESULT(yes) ++ ICONV_FOUND=yes ++ else ++ if test "$jm_cv_biconv" = yes; then ++ AC_DEFINE(HAVE_BICONV, 1, [What header to include for iconv() function: biconv.h]) ++ AC_MSG_RESULT(yes) ++ ICONV_FOUND=yes ++ else ++ AC_DEFINE(HAVE_ICONV, 1, [What header to include for iconv() function: iconv.h]) ++ AC_MSG_RESULT(yes) ++ ICONV_FOUND=yes ++ fi ++ fi ++ else ++ AC_MSG_RESULT(no) ++ fi ++]) ++ ++AC_DEFUN(rjs_CHARSET,[ ++ dnl Find out if we can convert from $1 to UCS2-LE ++ AC_MSG_CHECKING([can we convert from $1 to UCS2-LE?]) ++ AC_TRY_RUN([ ++#include <$jm_cv_include> ++main(){ ++ iconv_t cd = iconv_open("$1", "UCS-2LE"); ++ if (cd == 0 || cd == (iconv_t)-1) { ++ return -1; ++ } ++ return 0; ++} ++ ],ICONV_CHARSET=$1,ICONV_CHARSET=no,ICONV_CHARSET=cross) ++ AC_MSG_RESULT($ICONV_CHARSET) ++]) ++ ++dnl AC_ENABLE_SHARED - implement the --enable-shared flag ++dnl Usage: AC_ENABLE_SHARED[(DEFAULT)] ++dnl Where DEFAULT is either `yes' or `no'. If omitted, it defaults to ++dnl `yes'. ++AC_DEFUN([AC_ENABLE_SHARED], ++[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl ++AC_ARG_ENABLE(shared, ++changequote(<<, >>)dnl ++<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], ++changequote([, ])dnl ++[p=${PACKAGE-default} ++case $enableval in ++yes) enable_shared=yes ;; ++no) enable_shared=no ;; ++*) ++ enable_shared=no ++ # Look at the argument we got. We use all the common list separators. ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," ++ for pkg in $enableval; do ++ if test "X$pkg" = "X$p"; then ++ enable_shared=yes ++ fi ++ ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac], ++enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ++]) ++ ++dnl AC_ENABLE_STATIC - implement the --enable-static flag ++dnl Usage: AC_ENABLE_STATIC[(DEFAULT)] ++dnl Where DEFAULT is either `yes' or `no'. If omitted, it defaults to ++dnl `yes'. ++AC_DEFUN([AC_ENABLE_STATIC], ++[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl ++AC_ARG_ENABLE(static, ++changequote(<<, >>)dnl ++<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], ++changequote([, ])dnl ++[p=${PACKAGE-default} ++case $enableval in ++yes) enable_static=yes ;; ++no) enable_static=no ;; ++*) ++ enable_static=no ++ # Look at the argument we got. We use all the common list separators. ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," ++ for pkg in $enableval; do ++ if test "X$pkg" = "X$p"; then ++ enable_static=yes ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac], ++enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ++]) ++ ++dnl AC_DISABLE_STATIC - set the default static flag to --disable-static ++AC_DEFUN([AC_DISABLE_STATIC], ++[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ++AC_ENABLE_STATIC(no)]) ++ ++dnl AC_TRY_COMMAND_NO_STDERR - also fail if there is output on stderr ++AC_DEFUN( [AC_TRY_COMMAND_NO_STDERR], ++[ ++ { OUT=`($1) 3>&AS_MESSAGE_LOG_FD 2>&1 1>&3` ++ RC=$? ++ echo "\$?=$RC" >&AS_MESSAGE_LOG_FD ++ if test x"$OUT" != x ; then ++ echo "stderr:" >&AS_MESSAGE_LOG_FD ++ echo "$OUT" >&AS_MESSAGE_LOG_FD ++ fi ++ test $RC -eq 0 -a x"$OUT" = x ; } ++]) ++ ++dnl AC_TRY_RUN_STRICT(PROGRAM,CFLAGS,CPPFLAGS,LDFLAGS, ++dnl [ACTION-IF-TRUE],[ACTION-IF-FALSE], ++dnl [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR]) ++AC_DEFUN( [AC_TRY_RUN_STRICT], ++[ ++ old_CFLAGS="$CFLAGS"; ++ CFLAGS="$2"; ++ export CFLAGS; ++ old_CPPFLAGS="$CPPFLAGS"; ++ CPPFLAGS="$3"; ++ export CPPFLAGS; ++ old_LDFLAGS="$LDFLAGS"; ++ LDFLAGS="$4"; ++ export LDFLAGS; ++ AC_TRY_RUN([$1],[$5],[$6],[$7]) ++ CFLAGS="$old_CFLAGS"; ++ old_CFLAGS=""; ++ export CFLAGS; ++ CPPFLAGS="$old_CPPFLAGS"; ++ old_CPPFLAGS=""; ++ export CPPFLAGS; ++ LDFLAGS="$old_LDFLAGS"; ++ old_LDFLAGS=""; ++ export LDFLAGS; ++]) ++ ++dnl SMB_CHECK_SYSCONF(varname) ++dnl Tests whether the sysconf(3) variable "varname" is available. ++AC_DEFUN([SMB_CHECK_SYSCONF], ++[ ++ AC_CACHE_CHECK([for sysconf($1)], ++ samba_cv_SYSCONF$1, ++ [ ++ AC_TRY_LINK([#include <unistd.h>], ++ [ return sysconf($1) == -1 ? 1 : 0; ], ++ [ samba_cv_SYSCONF$1=yes ], ++ [ samba_cv_SYSCONF$1=no ]) ++ ]) ++ ++ if test x"$samba_cv_SYSCONF$1" = x"yes" ; then ++ AC_DEFINE(SYSCONF$1, 1, [Whether sysconf($1) is available]) ++ fi ++]) ++ ++dnl SMB_IS_LIBPTHREAD_LINKED([actions if true], [actions if false]) ++dnl Test whether the current LIBS results in libpthread being present. ++dnl Execute the corresponding user action list. ++AC_DEFUN([SMB_IS_LIBPTHREAD_LINKED], ++[ ++ AC_MSG_CHECKING(if libpthread is linked) ++ AC_TRY_LINK([], ++ [return pthread_create(0, 0, 0, 0);], ++ [ ++ AC_MSG_RESULT(yes) ++ $1 ++ ], ++ [ ++ AC_MSG_RESULT(no) ++ $2 ++ ]) ++]) ++ ++dnl SMB_REMOVE_LIB(lib) ++dnl Remove the given library from $LIBS ++AC_DEFUN([SMB_REMOVE_LIB], ++[ ++ LIBS=`echo $LIBS | sed '-es/-l$1//g'` ++]) ++ ++dnl SMB_CHECK_DMAPI([actions if true], [actions if false]) ++dnl Check whether DMAPI is available and is a version that we know ++dnl how to deal with. The default truth action is to set samba_dmapi_libs ++dnl to the list of necessary libraries, and to define USE_DMAPI. ++AC_DEFUN([SMB_CHECK_DMAPI], ++[ ++ samba_dmapi_libs="" ++ ++ if test x"$samba_dmapi_libs" = x"" ; then ++ AC_CHECK_LIB(dm, dm_get_eventlist, ++ [ samba_dmapi_libs="-ldm"], []) ++ fi ++ ++ if test x"$samba_dmapi_libs" = x"" ; then ++ AC_CHECK_LIB(jfsdm, dm_get_eventlist, ++ [samba_dmapi_libs="-ljfsdm"], []) ++ fi ++ ++ if test x"$samba_dmapi_libs" = x"" ; then ++ AC_CHECK_LIB(dmapi, dm_get_eventlist, ++ [samba_dmapi_libs="-ldmapi"], []) ++ fi ++ ++ if test x"$samba_dmapi_libs" = x"" ; then ++ AC_CHECK_LIB(xdsm, dm_get_eventlist, ++ [samba_dmapi_libs="-lxdsm"], []) ++ fi ++ ++ ++ # Only bother to test ehaders if we have a candidate DMAPI library ++ if test x"$samba_dmapi_libs" != x"" ; then ++ AC_CHECK_HEADERS(sys/dmi.h xfs/dmapi.h sys/jfsdmapi.h sys/dmapi.h dmapi.h) ++ fi ++ ++ if test x"$samba_dmapi_libs" != x"" ; then ++ samba_dmapi_save_LIBS="$LIBS" ++ LIBS="$LIBS $samba_dmapi_libs" ++ AC_TRY_LINK( ++ [ ++#include <time.h> /* needed by Tru64 */ ++#include <sys/types.h> /* needed by AIX */ ++#ifdef HAVE_XFS_DMAPI_H ++#include <xfs/dmapi.h> ++#elif defined(HAVE_SYS_DMI_H) ++#include <sys/dmi.h> ++#elif defined(HAVE_SYS_JFSDMAPI_H) ++#include <sys/jfsdmapi.h> ++#elif defined(HAVE_SYS_DMAPI_H) ++#include <sys/dmapi.h> ++#elif defined(HAVE_DMAPI_H) ++#include <dmapi.h> ++#endif ++ ], ++ [ ++/* This link test is designed to fail on IRI 6.4, but should ++ * succeed on Linux, IRIX 6.5 and AIX. ++ */ ++ char * version; ++ dm_eventset_t events; ++ /* This doesn't take an argument on IRIX 6.4. */ ++ dm_init_service(&version); ++ /* IRIX 6.4 expects events to be a pointer. */ ++ DMEV_ISSET(DM_EVENT_READ, events); ++ ], ++ [ ++ true # DMAPI link test succeeded ++ ], ++ [ ++ # DMAPI link failure ++ samba_dmapi_libs= ++ ]) ++ LIBS="$samba_dmapi_save_LIBS" ++ fi ++ ++ if test x"$samba_dmapi_libs" = x"" ; then ++ # DMAPI detection failure actions begin ++ ifelse($2, [], ++ [ ++ AC_ERROR(Failed to detect a supported DMAPI implementation) ++ ], ++ [ ++ $2 ++ ]) ++ # DMAPI detection failure actions end ++ else ++ # DMAPI detection success actions start ++ ifelse($1, [], ++ [ ++ AC_DEFINE(USE_DMAPI, 1, ++ [Whether we should build DMAPI integration components]) ++ AC_MSG_NOTICE(Found DMAPI support in $samba_dmapi_libs) ++ ], ++ [ ++ $1 ++ ]) ++ # DMAPI detection success actions end ++ fi ++ ++]) ++ ++dnl SMB_IF_RTSIGNAL_BUG([actions if true], ++dnl [actions if false], ++dnl [actions if cross compiling]) ++dnl Test whether we can call sigaction with RT_SIGNAL_NOTIFY and ++dnl RT_SIGNAL_LEASE (also RT_SIGNAL_AIO for good measure, though ++dnl I don't believe that triggers any bug. ++dnl ++dnl See the samba-technical thread titled "Failed to setup ++dnl RT_SIGNAL_NOTIFY handler" for details on the bug in question. ++AC_DEFUN([SMB_IF_RTSIGNAL_BUG], ++[ ++ rt_signal_notify_works=yes ++ rt_signal_lease_works=yes ++ rt_signal_aio_works=yes ++ ++ AC_MSG_CHECKING(if sigaction works with realtime signals) ++ AC_TRY_RUN( ++ [ ++#include <sys/types.h> ++#include <fcntl.h> ++#include <signal.h> ++ ++#ifndef SIGRTMIN ++#define SIGRTMIN NSIG ++#endif ++/* from smbd/notify_kernel.c */ ++#ifndef RT_SIGNAL_NOTIFY ++#define RT_SIGNAL_NOTIFY (SIGRTMIN+2) ++#endif ++ ++/* from smbd/aio.c */ ++#ifndef RT_SIGNAL_AIO ++#define RT_SIGNAL_AIO (SIGRTMIN+3) ++#endif ++ ++/* from smbd/oplock_linux.c */ ++#ifndef RT_SIGNAL_LEASE ++#define RT_SIGNAL_LEASE (SIGRTMIN+1) ++#endif ++ ++static void signal_handler(int sig, siginfo_t *info, void *unused) ++{ ++ int do_nothing = 0; ++} ++ ++int main(void) ++{ ++ int result = 0; ++ struct sigaction act = {0}; ++ ++ act.sa_sigaction = signal_handler; ++ act.sa_flags = SA_SIGINFO; ++ sigemptyset( &act.sa_mask ); ++ ++ if (sigaction(RT_SIGNAL_LEASE, &act, 0) != 0) { ++ /* Failed to setup RT_SIGNAL_LEASE handler */ ++ result += 1; ++ } ++ ++ if (sigaction(RT_SIGNAL_NOTIFY, &act, 0) != 0) { ++ /* Failed to setup RT_SIGNAL_NOTIFY handler */ ++ result += 10; ++ } ++ ++ if (sigaction(RT_SIGNAL_AIO, &act, 0) != 0) { ++ /* Failed to setup RT_SIGNAL_AIO handler */ ++ result += 100; ++ } ++ ++ /* zero on success */ ++ return result; ++} ++ ], ++ [ ++ AC_MSG_RESULT(yes) ++ $2 ++ ], ++ [ ++ AC_MSG_RESULT(no) ++ case "$ac_status" in ++ 1|11|101|111) rt_signal_lease_ok=no ;; ++ esac ++ case "$ac_status" in ++ 10|11|110|111) rt_signal_notify_ok=no ;; ++ esac ++ case "$ac_status" in ++ 100|110|101|111) rt_signal_aio_ok=no ;; ++ esac ++ $2 ++ ], ++ [ ++ AC_MSG_RESULT(cross) ++ $3 ++ ]) ++]) ++ ++m4_include(../lib/replace/libreplace.m4) +diff --git a/source3/m4/autoconf-2.60.m4 b/source3/m4/autoconf-2.60.m4 +new file mode 100644 +index 0000000..b2694fd +--- /dev/null ++++ b/source3/m4/autoconf-2.60.m4 +@@ -0,0 +1,236 @@ ++# AC_GNU_SOURCE ++# -------------- ++AC_DEFUN([AC_GNU_SOURCE], ++[AH_VERBATIM([_GNU_SOURCE], ++[/* Enable GNU extensions on systems that have them. */ ++#ifndef _GNU_SOURCE ++# undef _GNU_SOURCE ++#endif])dnl ++AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl ++AC_BEFORE([$0], [AC_RUN_IFELSE])dnl ++AC_DEFINE([_GNU_SOURCE]) ++]) ++ ++# _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, ++# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) ++# -------------------------------------------------------------- ++# Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99') ++# by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails, ++# try again with each compiler option in the space-separated OPTION-LIST; if one ++# helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE, ++# else ACTION-IF-UNAVAILABLE. ++AC_DEFUN([_AC_C_STD_TRY], ++[AC_MSG_CHECKING([for $CC option to accept ISO ]m4_translit($1, [c], [C])) ++AC_CACHE_VAL(ac_cv_prog_cc_$1, ++[ac_cv_prog_cc_$1=no ++ac_save_CC=$CC ++AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])]) ++for ac_arg in '' $4 ++do ++ CC="$ac_save_CC $ac_arg" ++ _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_$1=$ac_arg]) ++ test "x$ac_cv_prog_cc_$1" != "xno" && break ++done ++rm -f conftest.$ac_ext ++CC=$ac_save_CC ++])# AC_CACHE_VAL ++case "x$ac_cv_prog_cc_$1" in ++ x) ++ AC_MSG_RESULT([none needed]) ;; ++ xno) ++ AC_MSG_RESULT([unsupported]) ;; ++ *) ++ CC="$CC $ac_cv_prog_cc_$1" ++ AC_MSG_RESULT([$ac_cv_prog_cc_$1]) ;; ++esac ++AS_IF([test "x$ac_cv_prog_cc_$1" != xno], [$5], [$6]) ++])# _AC_C_STD_TRY ++ ++# _AC_PROG_CC_C99 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) ++# ---------------------------------------------------------------- ++# If the C compiler is not in ISO C99 mode by default, try to add an ++# option to output variable CC to make it so. This macro tries ++# various options that select ISO C99 on some system or another. It ++# considers the compiler to be in ISO C99 mode if it handles mixed ++# code and declarations, _Bool, inline and restrict. ++AC_DEFUN([_AC_PROG_CC_C99], ++[_AC_C_STD_TRY([c99], ++[[#include <stdarg.h> ++#include <stdbool.h> ++#include <stdlib.h> ++#include <wchar.h> ++#include <stdio.h> ++ ++struct incomplete_array ++{ ++ int datasize; ++ double data[]; ++}; ++ ++struct named_init { ++ int number; ++ const wchar_t *name; ++ double average; ++}; ++ ++typedef const char *ccp; ++ ++static inline int ++test_restrict(ccp restrict text) ++{ ++ // See if C++-style comments work. ++ // Iterate through items via the restricted pointer. ++ // Also check for declarations in for loops. ++ for (unsigned int i = 0; *(text+i) != '\0'; ++i) ++ continue; ++ return 0; ++} ++ ++// Check varargs and va_copy work. ++static void ++test_varargs(const char *format, ...) ++{ ++ va_list args; ++ va_start(args, format); ++ va_list args_copy; ++ va_copy(args_copy, args); ++ ++ const char *str; ++ int number; ++ float fnumber; ++ ++ while (*format) ++ { ++ switch (*format++) ++ { ++ case 's': // string ++ str = va_arg(args_copy, const char *); ++ break; ++ case 'd': // int ++ number = va_arg(args_copy, int); ++ break; ++ case 'f': // float ++ fnumber = (float) va_arg(args_copy, double); ++ break; ++ default: ++ break; ++ } ++ } ++ va_end(args_copy); ++ va_end(args); ++} ++]], ++[[ ++ // Check bool and long long datatypes. ++ _Bool success = false; ++ long long int bignum = -1234567890LL; ++ unsigned long long int ubignum = 1234567890uLL; ++ ++ // Check restrict. ++ if (test_restrict("String literal") != 0) ++ success = true; ++ char *restrict newvar = "Another string"; ++ ++ // Check varargs. ++ test_varargs("s, d' f .", "string", 65, 34.234); ++ ++ // Check incomplete arrays work. ++ struct incomplete_array *ia = ++ malloc(sizeof(struct incomplete_array) + (sizeof(double) * 10)); ++ ia->datasize = 10; ++ for (int i = 0; i < ia->datasize; ++i) ++ ia->data[i] = (double) i * 1.234; ++ ++ // Check named initialisers. ++ struct named_init ni = { ++ .number = 34, ++ .name = L"Test wide string", ++ .average = 543.34343, ++ }; ++ ++ ni.number = 58; ++ ++ int dynamic_array[ni.number]; ++ dynamic_array[43] = 543; ++ ++ // work around unused variable warnings ++ return bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'; ++]], ++dnl Try ++dnl GCC -std=gnu99 (unused restrictive modes: -std=c99 -std=iso9899:1999) ++dnl AIX -qlanglvl=extc99 (unused restrictive mode: -qlanglvl=stdc99) ++dnl Intel ICC -c99 ++dnl IRIX -c99 ++dnl Solaris (unused because it causes the compiler to assume C99 semantics for ++dnl library functions, and this is invalid before Solaris 10: -xc99) ++dnl Tru64 -c99 ++dnl with extended modes being tried first. ++[[-std=gnu99 -c99 -qlanglvl=extc99]], [$1], [$2])[]dnl ++])# _AC_PROG_CC_C99 ++ ++# AC_PROG_CC_C99 ++# -------------- ++AC_DEFUN([AC_PROG_CC_C99], ++[ AC_REQUIRE([AC_PROG_CC])dnl ++ _AC_PROG_CC_C99 ++]) ++ ++# AC_USE_SYSTEM_EXTENSIONS ++# ------------------------ ++# Enable extensions on systems that normally disable them, ++# typically due to standards-conformance issues. ++m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],[ ++AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], ++[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl ++AC_BEFORE([$0], [AC_RUN_IFELSE])dnl ++ ++ AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) ++ if test "$MINIX" = yes; then ++ AC_DEFINE([_POSIX_SOURCE], [1], ++ [Define to 1 if you need to in order for `stat' and other ++ things to work.]) ++ AC_DEFINE([_POSIX_1_SOURCE], [2], ++ [Define to 2 if the system does not provide POSIX.1 features ++ except with this defined.]) ++ AC_DEFINE([_MINIX], [1], ++ [Define to 1 if on MINIX.]) ++ fi ++ ++ AH_VERBATIM([__EXTENSIONS__], ++[/* Enable extensions on AIX 3, Interix. */ ++#ifndef _ALL_SOURCE ++# undef _ALL_SOURCE ++#endif ++/* Enable GNU extensions on systems that have them. */ ++#ifndef _GNU_SOURCE ++# undef _GNU_SOURCE ++#endif ++/* Enable threading extensions on Solaris. */ ++#ifndef _POSIX_PTHREAD_SEMANTICS ++# undef _POSIX_PTHREAD_SEMANTICS ++#endif ++/* Enable extensions on HP NonStop. */ ++#ifndef _TANDEM_SOURCE ++# undef _TANDEM_SOURCE ++#endif ++/* Enable general extensions on Solaris. */ ++#ifndef __EXTENSIONS__ ++# undef __EXTENSIONS__ ++#endif ++]) ++ AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], ++ [ac_cv_safe_to_define___extensions__], ++ [AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM([[ ++# define __EXTENSIONS__ 1 ++ ]AC_INCLUDES_DEFAULT])], ++ [ac_cv_safe_to_define___extensions__=yes], ++ [ac_cv_safe_to_define___extensions__=no])]) ++ test $ac_cv_safe_to_define___extensions__ = yes && ++ AC_DEFINE([__EXTENSIONS__]) ++ AC_DEFINE([_ALL_SOURCE]) ++ AC_DEFINE([_GNU_SOURCE]) ++ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) ++ AC_DEFINE([_TANDEM_SOURCE]) ++])# AC_USE_SYSTEM_EXTENSIONS ++]) +diff --git a/source3/m4/check_path.m4 b/source3/m4/check_path.m4 +new file mode 100644 +index 0000000..94c36bc +--- /dev/null ++++ b/source3/m4/check_path.m4 +@@ -0,0 +1,89 @@ ++dnl ++dnl Samba3 build environment path checks ++dnl ++dnl Copyright (C) Michael Adam 2008 ++dnl ++dnl Released under the GNU General Public License ++dnl http://www.gnu.org/licenses/ ++dnl ++ ++AC_LIBREPLACE_LOCATION_CHECKS ++ ++m4_include(../dynconfig/config.m4) ++ ++################################################# ++# set prefix for 'make test' ++selftest_prefix="./st" ++AC_SUBST(selftest_prefix) ++AC_ARG_WITH(selftest-prefix, ++[AS_HELP_STRING([--with-selftest-prefix=DIR], [The prefix where make test will be run ($selftest_prefix)])], ++[ case "$withval" in ++ yes|no) ++ AC_MSG_WARN([--with-selftest-prefix called without argument - will use default]) ++ ;; ++ * ) ++ selftest_prefix="$withval" ++ ;; ++ esac ++]) ++ ++## check for --enable-debug first before checking CFLAGS before ++## so that we don't mix -O and -g ++debug=no ++AC_ARG_ENABLE(debug, ++[AS_HELP_STRING([--enable-debug], [Turn on compiler debugging information (default=no)])], ++ [if eval "test x$enable_debug = xyes"; then ++ debug=yes ++ fi]) ++ ++AC_SUBST(developer) ++developer=no ++AC_ARG_ENABLE(developer, [AS_HELP_STRING([--enable-developer], [Turn on developer warnings and debugging (default=no)])], ++ [if eval "test x$enable_developer = xyes"; then ++ debug=yes ++ developer=yes ++ selftest=yes ++ fi]) ++ ++AC_SUBST(selftest) ++selftest=no ++AC_ARG_ENABLE(selftest, [AS_HELP_STRING([--enable-selftest], [Turn on selftest capability (default=no)])], ++ [if eval "test x$enable_selftest = xyes"; then ++ debug=yes ++ selftest=yes ++ fi]) ++ ++krb5developer=no ++AC_ARG_ENABLE(krb5developer, [AS_HELP_STRING([--enable-krb5developer], [Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)])], ++ [if eval "test x$enable_krb5developer = xyes"; then ++ debug=yes ++ developer=yes ++ krb5_developer=yes ++ fi]) ++ ++picky_developer=no ++AC_ARG_ENABLE(picky-developer, [AS_HELP_STRING([--enable-picky-developer], [Halt compilation on warnings])], ++ [if eval "test x$enable_picky_developer = xyes"; then ++ debug=yes ++ developer=yes ++ picky_developer=yes ++ fi]) ++ ++AC_ARG_WITH(cfenc, ++[AS_HELP_STRING([--with-cfenc=HEADERDIR], [Use internal CoreFoundation encoding API for optimization (Mac OS X/Darwin only)])], ++[ ++# May be in source $withval/CoreFoundation/StringEncodings.subproj. ++# Should have been in framework $withval/CoreFoundation.framework/Headers. ++for d in \ ++ $withval/CoreFoundation/StringEncodings.subproj \ ++ $withval/StringEncodings.subproj \ ++ $withval/CoreFoundation.framework/Headers \ ++ $withval/Headers \ ++ $withval ++do ++ if test -r $d/CFStringEncodingConverter.h; then ++ ln -sfh $d include/CoreFoundation ++ fi ++done ++]) ++ +diff --git a/source3/m4/samba_version.m4 b/source3/m4/samba_version.m4 +new file mode 100644 +index 0000000..f0e3b8a +--- /dev/null ++++ b/source3/m4/samba_version.m4 +@@ -0,0 +1,29 @@ ++dnl ++dnl Samba3 build environment - Samba version variables ++dnl ++dnl Copyright (C) Michael Adam 2008 ++dnl ++dnl Released under the GNU General Public License ++dnl http://www.gnu.org/licenses/ ++dnl ++dnl ++ ++SMB_VERSION_STRING=`cat $srcdir/include/autoconf/version.h | grep '#define SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2` ++echo "SAMBA VERSION: ${SMB_VERSION_STRING}" ++ ++SAMBA_VERSION_GIT_COMMIT_FULLREV=`cat $srcdir/include/autoconf/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_FULLREV' | cut -d ' ' -f3- | cut -d '"' -f2` ++if test -n "${SAMBA_VERSION_GIT_COMMIT_FULLREV}";then ++ echo "BUILD COMMIT REVISION: ${SAMBA_VERSION_GIT_COMMIT_FULLREV}" ++fi ++SAMBA_VERSION_COMMIT_DATE=`cat $srcdir/include/autoconf/version.h | grep 'SAMBA_VERSION_COMMIT_DATE' | cut -d ' ' -f3-` ++if test -n "${SAMBA_VERSION_COMMIT_DATE}";then ++ echo "BUILD COMMIT DATE: ${SAMBA_VERSION_COMMIT_DATE}" ++fi ++SAMBA_VERSION_COMMIT_TIME=`cat $srcdir/include/autoconf/version.h | grep 'SAMBA_VERSION_COMMIT_TIME' | cut -d ' ' -f3-` ++if test -n "${SAMBA_VERSION_COMMIT_TIME}";then ++ echo "BUILD COMMIT TIME: ${SAMBA_VERSION_COMMIT_TIME}" ++ ++ # just to keep the build-farm gui happy for now... ++ echo "BUILD REVISION: ${SAMBA_VERSION_COMMIT_TIME}" ++fi ++ + +From 9d86e15813409f163a2445624014140626e98183 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 17/19] Revert "build: Update md5.h detection in waf and + autoconf to use sys/md5.h and -lmd" + +This reverts commit 30a224367595f9e2506e41053fc9c7cb96a90928. +--- + lib/crypto/md5.h | 16 +++++++--------- + lib/crypto/wscript_build | 4 ---- + lib/crypto/wscript_configure | 8 ++------ + source3/configure.in | 4 ++-- + 4 files changed, 11 insertions(+), 21 deletions(-) + +diff --git a/lib/crypto/md5.h b/lib/crypto/md5.h +index edae27f..388cdf8 100644 +--- a/lib/crypto/md5.h ++++ b/lib/crypto/md5.h +@@ -6,16 +6,12 @@ + #define HEADER_MD5_H + #endif + +-#if defined(HAVE_BSD_MD5_H) +-/* Try to avoid clashes with BSD MD5 implementation (on linux) */ ++#ifdef HAVE_BSD_MD5_H ++/* Try to avoid clashes with BSD MD5 implementation */ + #include <bsd/md5.h> +- +-#elif defined(HAVE_SYS_MD5_H) +-/* Try to avoid clashes with BSD MD5 implementation (on BSD) */ +-#include <sys/md5.h> +- ++#else + /* Try to use CommonCrypto on Mac as otherwise we can get MD5Final twice */ +-#elif defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) ++#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + #include <CommonCrypto/CommonDigest.h> + + #define MD5Init(c) CC_MD5_Init(c) +@@ -36,6 +32,8 @@ void MD5Init(MD5_CTX *context); + void MD5Update(MD5_CTX *context, const uint8_t *buf, + size_t len); + void MD5Final(uint8_t digest[MD5_DIGEST_LENGTH], MD5_CTX *context); +-#endif /* HAVE_*MD5_H */ ++#endif /* HAVE_COMMONCRYPTO_COMMONDIGEST_H */ ++ ++#endif /* HAVE_BSD_MD5_H */ + + #endif /* !MD5_H */ +diff --git a/lib/crypto/wscript_build b/lib/crypto/wscript_build +index e056f65..cd7a466 100644 +--- a/lib/crypto/wscript_build ++++ b/lib/crypto/wscript_build +@@ -4,10 +4,6 @@ extra_source = '' + extra_deps = '' + if bld.CONFIG_SET('HAVE_BSD_MD5_H'): + extra_deps += ' bsd' +-elif bld.CONFIG_SET('HAVE_SYS_MD5_H') and bld.CONFIG_SET('HAVE_LIBMD5'): +- extra_deps += ' md5' +-elif bld.CONFIG_SET('HAVE_SYS_MD5_H') and bld.CONFIG_SET('HAVE_LIBMD'): +- extra_deps += ' md' + elif not bld.CONFIG_SET('HAVE_COMMONCRYPTO_COMMONDIGEST_H'): + extra_source += ' md5.c' + +diff --git a/lib/crypto/wscript_configure b/lib/crypto/wscript_configure +index 21ec566..5fc00fb 100644 +--- a/lib/crypto/wscript_configure ++++ b/lib/crypto/wscript_configure +@@ -1,8 +1,4 @@ +-if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h', +- checklibc=True): +- conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h', +- checklibc=True) +- conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h', +- checklibc=True) ++conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h', ++ checklibc=True) + conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h', + checklibc=True) +diff --git a/source3/configure.in b/source3/configure.in +index 0e2f126..822c5f4 100644 +--- a/source3/configure.in ++++ b/source3/configure.in +@@ -620,11 +620,11 @@ if test x"$samba_cv_md5lib" = x"none" ; then + fi + + if test x"$samba_cv_md5lib" != x"none" ; then +- AC_CHECK_HEADERS(sys/md5.h) ++ AC_CHECK_HEADERS(md5.h) + fi + + CRYPTO_MD5_OBJ="../lib/crypto/md5.o" +-if test x"$ac_cv_header_sys_md5_h" = x"yes" -a \ ++if test x"$ac_cv_header_md5_h" = x"yes" -a \ + x"$samba_cv_md5lib" != x"none" ; then + if test x"$samba_cv_md5lib" != x ; then + LIBS="${LIBS} -l${samba_cv_md5lib}" + +From c55d5d209c58ce49fe0f3beca21aba6fbe2b3ab6 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 18/19] Revert "swat: Remove swat." + +This reverts commit 61a2ad3c020424cead067cbdc89ea6f25708fde4. +--- + buildtools/wafsamba/samba_patterns.py | 1 + + dynconfig/config.m4 | 3 + + dynconfig/dynconfig.c | 1 + + dynconfig/dynconfig.h | 1 + + dynconfig/wscript | 4 + + examples/misc/swat.pl | 122 ++ + source3/Makefile.in | 33 +- + source3/configure.in | 2 + + source3/lib/popt_common.c | 10 + + source3/m4/swat.m4 | 27 + + source3/param/loadparm.c | 2 +- + source3/po/de.msg | 616 ++++++++++ + source3/po/en.msg | 592 ++++++++++ + source3/po/fi.msg | 610 ++++++++++ + source3/po/fr.msg | 592 ++++++++++ + source3/po/genmsg | 40 + + source3/po/it.msg | 592 ++++++++++ + source3/po/ja.msg | 594 ++++++++++ + source3/po/nl.msg | 592 ++++++++++ + source3/po/pl.msg | 592 ++++++++++ + source3/po/ru.msg | 606 ++++++++++ + source3/po/tr.msg | 593 ++++++++++ + source3/script/installmsg.sh | 65 ++ + source3/script/installswat.sh | 296 +++++ + source3/script/mkbuildoptions.awk | 1 + + source3/web/cgi.c | 798 +++++++++++++ + source3/web/diagnose.c | 80 ++ + source3/web/neg_lang.c | 120 ++ + source3/web/startstop.c | 130 +++ + source3/web/statuspage.c | 467 ++++++++ + source3/web/swat.c | 1683 ++++++++++++++++++++++++++- + source3/web/swat_proto.h | 76 ++ + source3/wscript | 4 + + source3/wscript_build | 33 + + source4/smbd/server.c | 1 + + swat/help/welcome-no-samba-doc.html | 3 + + swat/help/welcome.html | 63 + + swat/include/footer.html | 3 + + swat/include/header.html | 11 + + swat/lang/ja/help/welcome.html | 66 ++ + swat/lang/ru/help/welcome-no-samba-doc.html | 6 + + swat/lang/ru/help/welcome.html | 65 ++ + swat/lang/ru/include/header.html | 14 + + swat/lang/tr/help/welcome.html | 66 ++ + 44 files changed, 10235 insertions(+), 41 deletions(-) + create mode 100644 examples/misc/swat.pl + create mode 100644 source3/m4/swat.m4 + create mode 100644 source3/po/de.msg + create mode 100644 source3/po/en.msg + create mode 100644 source3/po/fi.msg + create mode 100644 source3/po/fr.msg + create mode 100755 source3/po/genmsg + create mode 100644 source3/po/it.msg + create mode 100644 source3/po/ja.msg + create mode 100644 source3/po/nl.msg + create mode 100644 source3/po/pl.msg + create mode 100644 source3/po/ru.msg + create mode 100644 source3/po/tr.msg + create mode 100644 source3/script/installmsg.sh + create mode 100755 source3/script/installswat.sh + create mode 100644 source3/web/cgi.c + create mode 100644 source3/web/diagnose.c + create mode 100644 source3/web/neg_lang.c + create mode 100644 source3/web/startstop.c + create mode 100644 source3/web/statuspage.c + create mode 100644 source3/web/swat_proto.h + create mode 100644 swat/help/welcome-no-samba-doc.html + create mode 100644 swat/help/welcome.html + create mode 100644 swat/include/footer.html + create mode 100644 swat/include/header.html + create mode 100644 swat/lang/ja/help/welcome.html + create mode 100644 swat/lang/ru/help/welcome-no-samba-doc.html + create mode 100644 swat/lang/ru/help/welcome.html + create mode 100644 swat/lang/ru/include/header.html + create mode 100644 swat/lang/tr/help/welcome.html + +diff --git a/buildtools/wafsamba/samba_patterns.py b/buildtools/wafsamba/samba_patterns.py +index 62d988e..2504381 100644 +--- a/buildtools/wafsamba/samba_patterns.py ++++ b/buildtools/wafsamba/samba_patterns.py +@@ -114,6 +114,7 @@ def write_build_options_header(fp): + fp.write(" output(screen,\"\\nPaths:\\n\");\n") + fp.write(" output(screen,\" SBINDIR: %s\\n\", get_dyn_SBINDIR());\n") + fp.write(" output(screen,\" BINDIR: %s\\n\", get_dyn_BINDIR());\n") ++ fp.write(" output(screen,\" SWATDIR: %s\\n\", get_dyn_SWATDIR());\n") + fp.write(" output(screen,\" CONFIGFILE: %s\\n\", get_dyn_CONFIGFILE());\n") + fp.write(" output(screen,\" LOGFILEBASE: %s\\n\", get_dyn_LOGFILEBASE());\n") + fp.write(" output(screen,\" LMHOSTSFILE: %s\\n\",get_dyn_LMHOSTSFILE());\n") +diff --git a/dynconfig/config.m4 b/dynconfig/config.m4 +index fe69abe..6b5dfdb 100644 +--- a/dynconfig/config.m4 ++++ b/dynconfig/config.m4 +@@ -27,6 +27,7 @@ if test x$enable_fhs != xyes; then + INCLUDEDIR="${includedir}" + SETUPDIR="${datadir}/setup" + PKGCONFIGDIR="${libdir}/pkgconfig" ++ SWATDIR="${datadir}/swat" + CODEPAGEDIR="${datadir}/codepages" + PAMMODULESDIR="${libdir}/security" + CONFIGDIR="\${sysconfdir}" +@@ -45,6 +46,7 @@ else + INCLUDEDIR="${includedir}/samba-4.0" + SETUPDIR="${datadir}/samba/setup" + PKGCONFIGDIR="${libdir}/pkgconfig" ++ SWATDIR="${datadir}/samba/swat" + CODEPAGEDIR="${datadir}/samba/codepages" + PAMMODULESDIR="${libdir}/security" + CONFIGDIR="\${sysconfdir}/samba" +@@ -277,6 +279,7 @@ AC_SUBST(MODULESDIR) + AC_SUBST(INCLUDEDIR) + AC_SUBST(SETUPDIR) + AC_SUBST(PKGCONFIGDIR) ++AC_SUBST(SWATDIR) + AC_SUBST(CODEPAGEDIR) + AC_SUBST(PAMMODULESDIR) + AC_SUBST(CONFIGDIR) +diff --git a/dynconfig/dynconfig.c b/dynconfig/dynconfig.c +index 9fd7108..79332a2 100644 +--- a/dynconfig/dynconfig.c ++++ b/dynconfig/dynconfig.c +@@ -86,6 +86,7 @@ const char *set_dyn_##name(const char *newpath) \ + /* these are in common with s3 */ + DEFINE_DYN_CONFIG_PARAM(SBINDIR) + DEFINE_DYN_CONFIG_PARAM(BINDIR) ++DEFINE_DYN_CONFIG_PARAM(SWATDIR) + DEFINE_DYN_CONFIG_PARAM(CONFIGFILE) /**< Location of smb.conf file. **/ + DEFINE_DYN_CONFIG_PARAM(LOGFILEBASE) /** Log file directory. **/ + DEFINE_DYN_CONFIG_PARAM(LMHOSTSFILE) /** Statically configured LanMan hosts. **/ +diff --git a/dynconfig/dynconfig.h b/dynconfig/dynconfig.h +index 4d24001..e53cd8f 100644 +--- a/dynconfig/dynconfig.h ++++ b/dynconfig/dynconfig.h +@@ -33,6 +33,7 @@ bool is_default_dyn_##name(void); + /* these are in common with s3 */ + DEFINE_DYN_CONFIG_PROTO(SBINDIR) + DEFINE_DYN_CONFIG_PROTO(BINDIR) ++DEFINE_DYN_CONFIG_PROTO(SWATDIR) + DEFINE_DYN_CONFIG_PROTO(CONFIGFILE) /**< Location of smb.conf file. **/ + DEFINE_DYN_CONFIG_PROTO(LOGFILEBASE) /** Log file directory. **/ + DEFINE_DYN_CONFIG_PROTO(LMHOSTSFILE) /** Statically configured LanMan hosts. **/ +diff --git a/dynconfig/wscript b/dynconfig/wscript +index 6410c38..dc4075a 100755 +--- a/dynconfig/wscript ++++ b/dynconfig/wscript +@@ -138,6 +138,10 @@ dynconfig = { + 'STD-PATH': '${LIBDIR}/pkgconfig', + 'FHS-PATH': '${LIBDIR}/pkgconfig', + }, ++ 'SWATDIR' : { ++ 'STD-PATH': '${DATADIR}/swat', ++ 'FHS-PATH': '${DATADIR}/samba/swat', ++ }, + 'CODEPAGEDIR' : { + 'STD-PATH': '${DATADIR}/codepages', + 'FHS-PATH': '${DATADIR}/samba/codepages', +diff --git a/examples/misc/swat.pl b/examples/misc/swat.pl +new file mode 100644 +index 0000000..f6414b6 +--- /dev/null ++++ b/examples/misc/swat.pl +@@ -0,0 +1,122 @@ ++#! /usr/bin/perl5 ++## ++## This is a simple script written by Herb Lewis @ SGI <herb@samba.org> ++## for reporting which parameters are supported by loadparm.c but ++## not by SWAT I just thought it looked fun and might be of interest to others ++## --jerry@samba.org ++## ++## Here is a little info on the usage and output format so you don't have ++## to dig through the code to understand what is printed. ++## ++## Useage: swat.pl [path_to_loadparm.c] ++## ++## The output consists of 4 columns of information ++## Option Name, Global Page, Share Page, Printer Page ++## The section separaters will also be printed (preceded by 16 *) to show ++## which options are grouped in the various sections. ++## ++## If the option name is preceded by an * it means this is a deprecated option. ++## If the option name is preceded by 5 spaces it means this is an alias for the ++## previous option. ++## ++## Under the Global Page, Share Page, and Printer Page columns there will be ++## one of 3 entries, BASIC, ADVANCED, or no. "BASIC" indicates this option will ++## show in the Basic View of that page in SWAT. "ADVANCED" indicates this ++## option will show in the Advanced View of that page in SWAT. "No" indicates ++## that this option is not available on that page in SWAT. ++## ++## Under the Global Page column, if an entry begins with an * it indicates that ++## this is actually specified in Samba as a "service parameter" not a "global ++## parameter" but you can set a default value for this on the Global Page in ++## SWAT. ++## ++## --herb@samba.org ++ ++$lastone = "nothing"; ++ ++if (@ARGV[0]) { ++ $filename = @ARGV[0]; ++} else { ++ $filename = "/usr3/samba20/samba/source/param/loadparm.c"; ++} ++ ++open (INFILE,$filename) || die "unable to open $filename\n"; ++while (not eof(INFILE)) ++{ ++ $_ = <INFILE>; ++ last if ( /^static struct parm_struct parm_table/) ; ++} ++print "Option Name Global Page Share Page Printer Page\n"; ++print "---------------------------------------------------------------------"; ++while (not eof(INFILE)) ++{ ++ $_ = <INFILE>; ++ last if (/};/); ++ @fields = split(/,/,$_); ++ next if not ($fields[0] =~ /^.*{"/); ++ $fields[0] =~ s/.*{"//; ++ $fields[0] =~ s/"//; ++ if ($fields[3] eq $lastone) { ++ print " $fields[0]\n"; ++ next; ++ } ++ $lastone = $fields[3]; ++ $fields[2] =~ s/^\s+//; ++ $fields[2] =~ s/\s+$//; ++ $fields[2] =~ s/}.*$//; ++ $fields[6] =~ s/^\s+//; ++ $fields[6] =~ s/\s+$//; ++ $fields[6] =~ s/}.*$//; ++ if ($fields[2] =~ /P_SEPARATOR/) { ++ print "\n****************$fields[0]\n"; ++ next; ++ } ++ else { ++ if ($fields[6] =~ /FLAG_DEPRECATED/) { ++ print "*$fields[0]".' 'x(31-length($fields[0])); ++ } ++ else { ++ print "$fields[0]".' 'x(32-length($fields[0])); ++ } ++ } ++ if (($fields[2] =~ /P_GLOBAL/) || ($fields[6] =~ /FLAG_GLOBAL/)) { ++ if ($fields[6] =~ /FLAG_GLOBAL/) { ++ print "*"; ++ } ++ else { ++ print " "; ++ } ++ if ($fields[6] =~ /FLAG_BASIC/) { ++ print "BASIC "; ++ } ++ else { ++ print "ADVANCED "; ++ } ++ } ++ else { ++ print " no "; ++ } ++ if ($fields[6] =~ /FLAG_SHARE/) { ++ if ($fields[6] =~ /FLAG_BASIC/) { ++ print "BASIC "; ++ } ++ else { ++ print "ADVANCED "; ++ } ++ } ++ else { ++ print "no "; ++ } ++ if ($fields[6] =~ /FLAG_PRINT/) { ++ if ($fields[6] =~ /FLAG_BASIC/) { ++ print "BASIC"; ++ } ++ else { ++ print "ADVANCED"; ++ } ++ } ++ else { ++ print "no"; ++ } ++ print "\n"; ++} +diff --git a/source3/Makefile.in b/source3/Makefile.in +index efe0694..d55a9cd 100644 +--- a/source3/Makefile.in ++++ b/source3/Makefile.in +@@ -31,6 +31,7 @@ MODULESDIR=@MODULESDIR@ + INCLUDEDIR=@INCLUDEDIR@ + SETUPDIR=@SETUPDIR@ + #PKGCONFIGDIR=@PKGCONFIGDIR@ ++SWATDIR=@SWATDIR@ + CODEPAGEDIR=@CODEPAGEDIR@ + PAMMODULESDIR=@PAMMODULESDIR@ + CONFIGDIR=@CONFIGDIR@ +@@ -186,6 +187,7 @@ PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \ + -DSBINDIR=\"$(SBINDIR)\" \ + -DBINDIR=\"$(BINDIR)\" \ + -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \ ++ -DSWATDIR=\"$(SWATDIR)\" \ + -DLOCKDIR=\"$(LOCKDIR)\" \ + -DPIDDIR=\"$(PIDDIR)\" \ + -DLIBDIR=\"$(LIBDIR)\" \ +@@ -211,7 +213,7 @@ TDBS_DEPS=$(TDB_DEPS) $(NTDB_DEPS) + + # Note that all executable programs now provide for an optional executable suffix. + +-SBIN_PROGS = bin/smbd bin/nmbd @EXTRA_SBIN_PROGS@ ++SBIN_PROGS = bin/smbd bin/nmbd @SWAT_SBIN_TARGETS@ @EXTRA_SBIN_PROGS@ + + BIN_PROGS1 = bin/smbclient bin/net bin/smbspool \ + bin/testparm bin/smbstatus bin/smbget \ +@@ -1059,6 +1061,10 @@ NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ + $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \ + $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) + ++SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \ ++ web/swat.o web/neg_lang.o ++ ++SWAT_OBJ = $(SWAT_OBJ1) $(SMBD_OBJ_BASE) $(PASSCHANGE_OBJ) + + STATUS_OBJ = utils/status.o utils/status_profile.o $(SMBD_OBJ_BASE) + +@@ -1875,6 +1881,14 @@ bin/nmbd: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(L + $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) $(POPT_LIBS) \ + $(KRB5LIBS) $(LDAP_LIBS) $(ZLIB_LIBS) + ++bin/swat: $(BINARY_PREREQS) $(SWAT_OBJ) $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) @BUILD_POPT@ ++ @echo Linking $@ ++ @$(CC) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \ ++ $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \ ++ $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) \ ++ $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) \ ++ $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ + bin/rpcclient: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDBS) $(LIBWBCLIENT) + @echo Linking $@ + @$(CC) -o $@ $(LDFLAGS) $(RPCCLIENT_OBJ) \ +@@ -3060,7 +3074,7 @@ bin/split_tokens: $(BINARY_PREREQS) $(SPLIT_TOKENS_OBJ) @BUILD_POPT@ $(LIBTALLOC + $(LIBTALLOC_LIBS) $(LIBTDBS_LIBS) + + install:: installservers installbin installman \ +- installscripts installdat installmodules \ ++ installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ \ + @INSTALL_PAM_MODULES@ installlibs installmo + + install-everything:: install installmodules +@@ -3110,6 +3124,12 @@ installscripts:: installdirs + installdat:: installdirs + @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir) + ++installmsg:: installdirs ++ @$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir) ++ ++installswat:: installdirs installmsg ++ @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR) $(SWATDIR) $(srcdir) ++ + installpammodules:: $(PAM_MODULES) + @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(PAMMODULESDIR) + @for module in $(PAM_MODULES); do \ +@@ -3152,6 +3172,7 @@ showlayout:: + @echo " INCLUDEDIR: $(INCLUDEDIR)" + @echo " SETUPDIR: $(SETUPDIR)" + # @echo " PKGCONFIGDIR: $(PKGCONFIGDIR)" ++ @echo " SWATDIR: $(SWATDIR)" + @echo " CODEPAGEDIR: $(CODEPAGEDIR)" + @echo " PAMMODULESDIR: $(PAMMODULESDIR)" + @echo " CONFIGDIR: $(CONFIGDIR)" +@@ -3173,7 +3194,7 @@ showlayout:: + @echo " SMB_PASSWD_FILE: $(SMB_PASSWD_FILE)" + + +-uninstall:: uninstallmo uninstallman uninstallservers uninstallbin uninstallscripts uninstalldat uninstallmodules uninstalllibs @UNINSTALL_PAM_MODULES@ ++uninstall:: uninstallmo uninstallman uninstallservers uninstallbin uninstallscripts uninstalldat uninstallswat uninstallmodules uninstalllibs @UNINSTALL_PAM_MODULES@ + + uninstallmo:: + @$(SHELL) $(srcdir)/script/uninstallmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir) +@@ -3201,6 +3222,12 @@ uninstallscripts:: + uninstalldat:: + @$(SHELL) $(srcdir)/script/uninstalldat.sh $(DESTDIR) $(LIBDIR) $(srcdir) + ++uninstallmsg:: ++ @$(SHELL) $(srcdir)/script/uninstallmsg.sh $(DESTDIR) $(LIBDIR) $(srcdir) ++ ++uninstallswat:: uninstallmsg ++ @$(SHELL) $(srcdir)/script/uninstallswat.sh $(DESTDIR) $(SWATDIR) $(srcdir) ++ + uninstallpammodules:: + @for module in $(PAM_MODULES); do \ + echo "Removing $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \ +diff --git a/source3/configure.in b/source3/configure.in +index 822c5f4..8fef7b1 100644 +--- a/source3/configure.in ++++ b/source3/configure.in +@@ -128,6 +128,8 @@ m4_include(../lib/socket_wrapper/config.m4) + m4_include(../lib/nss_wrapper/config.m4) + m4_include(../lib/uid_wrapper/config.m4) + ++m4_include(m4/swat.m4) ++ + DEVELOPER_CFLAGS="-DDEBUG_PASSWORD -DDEVELOPER" + + # Probe the gcc version for extra CFLAGS. We always stash these in +diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c +index e8eca57..bd5ca85 100644 +--- a/source3/lib/popt_common.c ++++ b/source3/lib/popt_common.c +@@ -203,6 +203,7 @@ struct poptOption popt_common_option[] = { + /* Handle command line options: + * --sbindir + * --bindir ++ * --swatdir + * --lmhostsfile + * --libdir + * --modulesdir +@@ -218,6 +219,7 @@ struct poptOption popt_common_option[] = { + enum dyn_item{ + DYN_SBINDIR = 1, + DYN_BINDIR, ++ DYN_SWATDIR, + DYN_LMHOSTSFILE, + DYN_LIBDIR, + DYN_MODULESDIR, +@@ -250,6 +252,12 @@ static void popt_dynconfig_callback(poptContext con, + } + break; + ++ case DYN_SWATDIR: ++ if (arg) { ++ set_dyn_SWATDIR(arg); ++ } ++ break; ++ + case DYN_LMHOSTSFILE: + if (arg) { + set_dyn_LMHOSTSFILE(arg); +@@ -321,6 +329,8 @@ const struct poptOption popt_common_dynconfig[] = { + "Path to sbin directory", "SBINDIR" }, + { "bindir", '\0' , POPT_ARG_STRING, NULL, DYN_BINDIR, + "Path to bin directory", "BINDIR" }, ++ { "swatdir", '\0' , POPT_ARG_STRING, NULL, DYN_SWATDIR, ++ "Path to SWAT installation directory", "SWATDIR" }, + { "lmhostsfile", '\0' , POPT_ARG_STRING, NULL, DYN_LMHOSTSFILE, + "Path to lmhosts file", "LMHOSTSFILE" }, + { "libdir", '\0' , POPT_ARG_STRING, NULL, DYN_LIBDIR, +diff --git a/source3/m4/swat.m4 b/source3/m4/swat.m4 +new file mode 100644 +index 0000000..cfff8fb +--- /dev/null ++++ b/source3/m4/swat.m4 +@@ -0,0 +1,27 @@ ++dnl ++dnl Samba3 build environment SWAT configuration ++dnl ++dnl Copyright (C) Michael Adam 2008 ++dnl ++dnl Released under the GNU General Public License ++dnl http://www.gnu.org/licenses/ ++dnl ++ ++ ++SWAT_SBIN_TARGETS='bin/swat' ++SWAT_INSTALL_TARGETS=installswat ++ ++AC_ARG_ENABLE(swat, ++[AS_HELP_STRING([--enable-swat], [Build the SWAT tool (default=yes)])], ++[ ++ case "$enable_swat" in ++ no) ++ SWAT_SBIN_TARGETS='' ++ SWAT_INSTALL_TARGETS='' ++ ;; ++ esac ++]) ++ ++AC_SUBST(SWAT_SBIN_TARGETS) ++AC_SUBST(SWAT_INSTALL_TARGETS) ++ +diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c +index bed39a4..ac36413 100644 +--- a/source3/param/loadparm.c ++++ b/source3/param/loadparm.c +@@ -4009,7 +4009,7 @@ void lp_killservice(int iServiceIn) + + /*************************************************************************** + Save the curent values of all global and sDefault parameters into the +- defaults union. This allows testparm to show only the ++ defaults union. This allows swat and testparm to show only the + changed (ie. non-default) parameters. + ***************************************************************************/ + +diff --git a/source3/po/de.msg b/source3/po/de.msg +new file mode 100644 +index 0000000..31baaf7 +--- /dev/null ++++ b/source3/po/de.msg +@@ -0,0 +1,616 @@ ++# German messages for international release of SWAT. ++# Copyright (C) 2001 Andreas Moroder ++# Copyright (C) 2007 Helge Kreutzmann, <debian@helgefjell.de> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: swat\n" ++"Report-Msgid-Bugs-To: \n" ++"POT-Creation-Date: 2007-06-04 18:15+0200\n" ++"PO-Revision-Date: 2007-06-10 11:52+0200\n" ++"Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n" ++"Language-Team: German <debian-l10n-german@lists.debian.org>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=utf-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++ ++#: ../web/swat.c:139 ++#, c-format ++msgid "ERROR: Can't open %s" ++msgstr "FEHLER: Kann %s nicht öffnen" ++ ++#: ../web/swat.c:223 ++msgid "Help" ++msgstr "Hilfe" ++ ++#: ../web/swat.c:229 ../web/swat.c:254 ../web/swat.c:275 ../web/swat.c:285 ++#: ../web/swat.c:294 ../web/swat.c:303 ../web/swat.c:309 ../web/swat.c:315 ++#: ../web/swat.c:328 ++msgid "Set Default" ++msgstr "Standardwert setzen" ++ ++#: ../web/swat.c:450 ++#, c-format ++msgid "failed to open %s for writing" ++msgstr "konnte %s nicht zum Schreiben öffnen" ++ ++#: ../web/swat.c:473 ++#, c-format ++msgid "Can't reload %s" ++msgstr "Kann %s nicht erneut laden" ++ ++#: ../web/swat.c:543 ++#, c-format ++msgid "Logged in as <b>%s</b>" ++msgstr "Verbunden als <b>%s</b>" ++ ++#: ../web/swat.c:547 ++msgid "Home" ++msgstr "Home" ++ ++#: ../web/swat.c:549 ++msgid "Globals" ++msgstr "Globals" ++ ++#: ../web/swat.c:550 ++msgid "Shares" ++msgstr "Freigaben" ++ ++#: ../web/swat.c:551 ++msgid "Printers" ++msgstr "Drucker" ++ ++#: ../web/swat.c:552 ++msgid "Wizard" ++msgstr "Assistent" ++ ++#: ../web/swat.c:556 ++msgid "Status" ++msgstr "Status" ++ ++#: ../web/swat.c:557 ++msgid "View Config" ++msgstr "Zeige Konfiguration" ++ ++#: ../web/swat.c:559 ++msgid "Password Management" ++msgstr "Passwortverwaltung" ++ ++#: ../web/swat.c:569 ++msgid "Current View Is" ++msgstr "Aktuelle Ansicht lautet" ++ ++#: ../web/swat.c:570 ../web/swat.c:573 ++msgid "Basic" ++msgstr "Einfache Ansicht" ++ ++#: ../web/swat.c:571 ../web/swat.c:574 ++msgid "Advanced" ++msgstr "Erweiterte Ansicht" ++ ++#: ../web/swat.c:572 ++msgid "Change View To" ++msgstr "Ansicht ändern in" ++ ++#: ../web/swat.c:601 ++msgid "Current Config" ++msgstr "Aktuelle Konfiguration" ++ ++#: ../web/swat.c:605 ++msgid "Normal View" ++msgstr "Normale Ansicht" ++ ++#: ../web/swat.c:607 ++msgid "Full View" ++msgstr "Komplette Ansicht" ++ ++#. Here we first set and commit all the parameters that were selected ++#. in the previous screen. ++#: ../web/swat.c:626 ++msgid "Wizard Parameter Edit Page" ++msgstr "Bearbeitungsseite der Assistenten-Parameter" ++ ++#: ../web/swat.c:655 ++msgid "Note: smb.conf file has been read and rewritten" ++msgstr "Hinweis: smb.conf wurde gelesen und überschrieben" ++ ++#. Here we go ... ++#: ../web/swat.c:763 ++msgid "Samba Configuration Wizard" ++msgstr "Samba-Konfigurationsassistent" ++ ++#: ../web/swat.c:767 ++msgid "" ++"The \"Rewrite smb.conf file\" button will clear the smb.conf file of all " ++"default values and of comments." ++msgstr "" ++"Der Knopf »Schreibe smb.conf neu« wird alle Kommentare und Standardwerte " ++"aus der smb.conf löschen." ++ ++#: ../web/swat.c:768 ++msgid "The same will happen if you press the commit button." ++msgstr "Das gleiche passiert beim Knopf »übernehmen«." ++ ++#: ../web/swat.c:771 ++msgid "Rewrite smb.conf file" ++msgstr "Schreibe smb.conf neu" ++ ++#: ../web/swat.c:772 ++msgid "Commit" ++msgstr "Übernehmen" ++ ++#: ../web/swat.c:773 ++msgid "Edit Parameter Values" ++msgstr "Bearbeite Parameterwerte" ++ ++#: ../web/swat.c:779 ++msgid "Server Type" ++msgstr "Server-Typ" ++ ++#: ../web/swat.c:780 ++msgid "Stand Alone" ++msgstr "Einzelserver" ++ ++#: ../web/swat.c:781 ++msgid "Domain Member" ++msgstr "Domänenmitglied" ++ ++#: ../web/swat.c:782 ++msgid "Domain Controller" ++msgstr "Domänencontroller" ++ ++#: ../web/swat.c:785 ++msgid "Unusual Type in smb.conf - Please Select New Mode" ++msgstr "" ++"Ungewöhnlicher Typ in der smb.conf - Bitte wählen Sie einen neuen Modus" ++ ++#: ../web/swat.c:787 ++msgid "Configure WINS As" ++msgstr "Konfiguriere WINS als" ++ ++#: ../web/swat.c:788 ++msgid "Not Used" ++msgstr "Nicht benutzt" ++ ++#: ../web/swat.c:789 ++msgid "Server for client use" ++msgstr "Server für Client-Verwendung" ++ ++#: ../web/swat.c:790 ++msgid "Client of another WINS server" ++msgstr "Client eines anderen WINS-Servers" ++ ++#: ../web/swat.c:792 ++msgid "Remote WINS Server" ++msgstr "Entfernter WINS-Server:" ++ ++#: ../web/swat.c:803 ++msgid "Error: WINS Server Mode and WINS Support both set in smb.conf" ++msgstr "" ++"Fehler: Sowohl WINS-Server-Modus als auch WINS-Unterstützung in smb.conf " ++"aktiviert" ++ ++#: ../web/swat.c:804 ++msgid "Please Select desired WINS mode above." ++msgstr "Bitte wählen Sie den gewünschten WINS-Modus oben aus." ++ ++#: ../web/swat.c:806 ++msgid "Expose Home Directories" ++msgstr "Home-Verzeichnisse freigeben" ++ ++#: ../web/swat.c:821 ++msgid "" ++"The above configuration options will set multiple parameters and will " ++"generally assist with rapid Samba deployment." ++msgstr "" ++"Die obigen Konfigurationsoptionen bearbeiten mehrere Parameter und dienen als " ++"Hilfe zur schnellen Samba-Einrichtung." ++ ++#: ../web/swat.c:834 ++msgid "Global Parameters" ++msgstr "Globale Parameter" ++ ++#: ../web/swat.c:862 ../web/swat.c:966 ../web/swat.c:1318 ++msgid "Commit Changes" ++msgstr "Änderungen speichern" ++ ++#: ../web/swat.c:866 ../web/swat.c:969 ../web/swat.c:1320 ++msgid "Reset Values" ++msgstr "Werte zurücksetzen" ++ ++#: ../web/swat.c:891 ++msgid "Share Parameters" ++msgstr "Parameter der Freigabe" ++ ++#: ../web/swat.c:934 ++msgid "Choose Share" ++msgstr "Wähle Freigabe" ++ ++#: ../web/swat.c:951 ++msgid "Delete Share" ++msgstr "Lösche Freigabe" ++ ++#: ../web/swat.c:958 ++msgid "Create Share" ++msgstr "Erstelle Freigabe" ++ ++#: ../web/swat.c:994 ++msgid "password change in demo mode rejected" ++msgstr "Änderung des Passworts im Demo-Modus nicht möglich" ++ ++#: ../web/swat.c:1007 ++msgid "Can't setup password database vectors." ++msgstr "Kann Passwort-Datenbankvektoren nicht einrichten" ++ ++#: ../web/swat.c:1033 ++msgid " Must specify \"User Name\" " ++msgstr " »Benutzername« muss angegeben werden " ++ ++#: ../web/swat.c:1049 ++msgid " Must specify \"Old Password\" " ++msgstr " »Altes Passwort« muss angegeben werden " ++ ++#: ../web/swat.c:1055 ++msgid " Must specify \"Remote Machine\" " ++msgstr " »Entfernter Server« muss angegeben werden " ++ ++#: ../web/swat.c:1062 ++msgid " Must specify \"New, and Re-typed Passwords\" " ++msgstr " »Neues/wiederholtes Passwort« muss angegeben werden " ++ ++#: ../web/swat.c:1068 ++msgid " Re-typed password didn't match new password " ++msgstr " Das wiederholte Passwort stimmt nicht mit dem neuen Passwort überein" ++ ++#: ../web/swat.c:1101 ++#, c-format ++msgid " The passwd for '%s' has been changed." ++msgstr " Das Passwort für '%s' wurde geändert." ++ ++#: ../web/swat.c:1104 ++#, c-format ++msgid " The passwd for '%s' has NOT been changed." ++msgstr " Das Passwort für '%s' wurde NICHT geändert." ++ ++#: ../web/swat.c:1129 ++msgid "Server Password Management" ++msgstr "Verwaltung des Server-Passwortes" ++ ++#. ++#. * Create all the dialog boxes for data collection ++#. ++#: ../web/swat.c:1138 ../web/swat.c:1185 ++msgid "User Name" ++msgstr "Benutzername" ++ ++#: ../web/swat.c:1141 ../web/swat.c:1187 ++msgid "Old Password" ++msgstr "Altes Passwort" ++ ++#: ../web/swat.c:1144 ../web/swat.c:1189 ++msgid "New Password" ++msgstr "Neues Passwort" ++ ++#: ../web/swat.c:1146 ../web/swat.c:1191 ++msgid "Re-type New Password" ++msgstr "Wiederhole neues Passwort" ++ ++#: ../web/swat.c:1154 ../web/swat.c:1202 ++msgid "Change Password" ++msgstr "Ändere Passwort" ++ ++#: ../web/swat.c:1157 ++msgid "Add New User" ++msgstr "Füge neuen Benutzer hinzu" ++ ++#: ../web/swat.c:1159 ++msgid "Delete User" ++msgstr "Lösche Benutzer" ++ ++#: ../web/swat.c:1161 ++msgid "Disable User" ++msgstr "Deaktiviere Benutzer" ++ ++#: ../web/swat.c:1163 ++msgid "Enable User" ++msgstr "Aktiviere Benutzer" ++ ++#: ../web/swat.c:1176 ++msgid "Client/Server Password Management" ++msgstr "Client/Server Passwort-Verwaltung" ++ ++#: ../web/swat.c:1193 ++msgid "Remote Machine" ++msgstr "Entfernte Maschine" ++ ++#: ../web/swat.c:1232 ++msgid "Printer Parameters" ++msgstr "Drucker-Parameter" ++ ++#: ../web/swat.c:1234 ++msgid "Important Note:" ++msgstr "Wichtiger Hinweis:" ++ ++#: ../web/swat.c:1235 ++#, c-format ++msgid "Printer names marked with [*] in the Choose Printer drop-down box " ++msgstr "Mit [*] gekennzeichnete Drucker in der »Wähle Drucker«-Auswahlliste " ++ ++#: ../web/swat.c:1236 ++#, c-format ++msgid "are autoloaded printers from " ++msgstr "sind automatisch geladene Drucker aus " ++ ++#: ../web/swat.c:1237 ++msgid "Printcap Name" ++msgstr "Printcap-Name" ++ ++#: ../web/swat.c:1238 ++msgid "Attempting to delete these printers from SWAT will have no effect." ++msgstr "" ++"Der Versuch, diese Drucker von SWAT aus zu löschen, wird keine Auswirkung " ++"haben." ++ ++#: ../web/swat.c:1284 ++msgid "Choose Printer" ++msgstr "Wähle Drucker" ++ ++#: ../web/swat.c:1303 ++msgid "Delete Printer" ++msgstr "Lösche Drucker" ++ ++#: ../web/swat.c:1310 ++msgid "Create Printer" ++msgstr "Erstelle Drucker" ++ ++#: ../web/statuspage.c:139 ++msgid "RDWR " ++msgstr "LESE/SCHREIBE " ++ ++#: ../web/statuspage.c:141 ++msgid "WRONLY " ++msgstr "NUR SCHREIBE " ++ ++#: ../web/statuspage.c:143 ++msgid "RDONLY " ++msgstr "NUR LESE " ++ ++#: ../web/statuspage.c:330 ++msgid "Server Status" ++msgstr "Server-Status" ++ ++#: ../web/statuspage.c:335 ++msgid "Auto Refresh" ++msgstr "Automatische Aktualisierung" ++ ++#: ../web/statuspage.c:336 ../web/statuspage.c:341 ++msgid "Refresh Interval: " ++msgstr "Aktualisierungsintervall: " ++ ++#: ../web/statuspage.c:340 ++msgid "Stop Refreshing" ++msgstr "Stoppe Aktualisierung" ++ ++#: ../web/statuspage.c:355 ++msgid "version:" ++msgstr "Version:" ++ ++#: ../web/statuspage.c:358 ++msgid "smbd:" ++msgstr "smbd:" ++ ++#: ../web/statuspage.c:358 ../web/statuspage.c:371 ../web/statuspage.c:385 ++msgid "running" ++msgstr "aktiv" ++ ++#: ../web/statuspage.c:358 ../web/statuspage.c:371 ../web/statuspage.c:385 ++msgid "not running" ++msgstr "inaktiv" ++ ++#: ../web/statuspage.c:362 ++msgid "Stop smbd" ++msgstr "Stoppe smbd" ++ ++#: ../web/statuspage.c:364 ++msgid "Start smbd" ++msgstr "Starte smbd" ++ ++#: ../web/statuspage.c:366 ++msgid "Restart smbd" ++msgstr "Starte smbd neu" ++ ++#: ../web/statuspage.c:371 ++msgid "nmbd:" ++msgstr "nmbd:" ++ ++#: ../web/statuspage.c:375 ++msgid "Stop nmbd" ++msgstr "Stoppe nmbd" ++ ++#: ../web/statuspage.c:377 ++msgid "Start nmbd" ++msgstr "Starte nmbd" ++ ++#: ../web/statuspage.c:379 ++msgid "Restart nmbd" ++msgstr "Starte nmbd neu" ++ ++#: ../web/statuspage.c:385 ++msgid "winbindd:" ++msgstr "winbindd:" ++ ++#: ../web/statuspage.c:389 ++msgid "Stop winbindd" ++msgstr "Stoppe winbindd" ++ ++#: ../web/statuspage.c:391 ++msgid "Start winbindd" ++msgstr "Starte winbindd" ++ ++#: ../web/statuspage.c:393 ++msgid "Restart winbindd" ++msgstr "Starte winbindd neu" ++ ++#. stop, restart all ++#: ../web/statuspage.c:402 ++msgid "Stop All" ++msgstr "Alle Stoppen" ++ ++#: ../web/statuspage.c:403 ++msgid "Restart All" ++msgstr "Alle neu starten" ++ ++#. start all ++#: ../web/statuspage.c:407 ++msgid "Start All" ++msgstr "Alle starten" ++ ++#: ../web/statuspage.c:414 ++msgid "Active Connections" ++msgstr "Aktive Verbindungen" ++ ++#: ../web/statuspage.c:416 ../web/statuspage.c:429 ../web/statuspage.c:437 ++msgid "PID" ++msgstr "PID" ++ ++#: ../web/statuspage.c:416 ../web/statuspage.c:429 ++msgid "Client" ++msgstr "Client" ++ ++#: ../web/statuspage.c:416 ++msgid "IP address" ++msgstr "IP-Adresse" ++ ++#: ../web/statuspage.c:416 ../web/statuspage.c:429 ../web/statuspage.c:437 ++msgid "Date" ++msgstr "Datum" ++ ++#: ../web/statuspage.c:418 ++msgid "Kill" ++msgstr "Töten" ++ ++#: ../web/statuspage.c:426 ++msgid "Active Shares" ++msgstr "Aktive Freigaben" ++ ++#: ../web/statuspage.c:429 ++msgid "Share" ++msgstr "Freigabe" ++ ++#: ../web/statuspage.c:429 ++msgid "User" ++msgstr "Benutzer" ++ ++#: ../web/statuspage.c:429 ++msgid "Group" ++msgstr "Gruppe" ++ ++#: ../web/statuspage.c:435 ++msgid "Open Files" ++msgstr "Offene Dateien" ++ ++#: ../web/statuspage.c:437 ++msgid "Sharing" ++msgstr "Freigeben" ++ ++#: ../web/statuspage.c:437 ++msgid "R/W" ++msgstr "Lese/Schreibe" ++ ++#: ../web/statuspage.c:437 ++msgid "Oplock" ++msgstr "Opportunistische Sperre (Lock)" ++ ++#: ../web/statuspage.c:437 ++msgid "File" ++msgstr "Datei" ++ ++#: ../web/statuspage.c:446 ++msgid "Show Client in col 1" ++msgstr "Zeige Client in Spalte 1" ++ ++#: ../web/statuspage.c:447 ++msgid "Show PID in col 1" ++msgstr "Zeige PID in Spalte 1" ++ ++#: ../param/loadparm.c:836 ++msgid "Base Options" ++msgstr "Basisoptionen" ++ ++#: ../param/loadparm.c:855 ++msgid "Security Options" ++msgstr "Sicherheitsoptionen" ++ ++#: ../param/loadparm.c:945 ++msgid "Logging Options" ++msgstr "Protokollier-Optionen" ++ ++#: ../param/loadparm.c:962 ++msgid "Protocol Options" ++msgstr "Protokoll-Optionen" ++ ++#: ../param/loadparm.c:1008 ++msgid "Tuning Options" ++msgstr "Optimierungsoptionen" ++ ++#: ../param/loadparm.c:1037 ++msgid "Printing Options" ++msgstr "Druckoptionen" ++ ++#: ../param/loadparm.c:1075 ++msgid "Filename Handling" ++msgstr "Dateinamen-Verwaltung" ++ ++#: ../param/loadparm.c:1105 ++msgid "Domain Options" ++msgstr "Domänen-Optionen" ++ ++#: ../param/loadparm.c:1109 ++msgid "Logon Options" ++msgstr "Anmelde-Optionen" ++ ++#: ../param/loadparm.c:1130 ++msgid "Browse Options" ++msgstr "Browsing-Optionen" ++ ++#: ../param/loadparm.c:1144 ++msgid "WINS Options" ++msgstr "WINS-Optionen" ++ ++#: ../param/loadparm.c:1153 ++msgid "Locking Options" ++msgstr "Locking-(Sperr-)Optionen" ++ ++#: ../param/loadparm.c:1170 ++msgid "Ldap Options" ++msgstr "LDAP-Optionen" ++ ++#: ../param/loadparm.c:1186 ++msgid "Miscellaneous Options" ++msgstr "Sonstige Optionen" ++ ++#: ../param/loadparm.c:1191 ++#| msgid "Logon Options" ++msgid "EventLog Options" ++msgstr "EventLog-Optionen" ++ ++#: ../param/loadparm.c:1258 ++msgid "VFS module options" ++msgstr "VFS-Modul-Optionen" ++ ++#: ../param/loadparm.c:1268 ++msgid "Winbind options" ++msgstr "Winbind-Optionen" +diff --git a/source3/po/en.msg b/source3/po/en.msg +new file mode 100644 +index 0000000..01e6b69 +--- /dev/null ++++ b/source3/po/en.msg +@@ -0,0 +1,592 @@ ++# English messages for international release of SWAT. ++# Copyright (C) 2003 TAKAHASHI Motonobu <monyo@samba.org> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: i18n_swat \n" ++"POT-Creation-Date: 2003-10-06 05:30+0900\n" ++"PO-Revision-Date: 2000-02-08 12:48+09:00\n" ++"Last-Translator: TAKAHASHI Motonobu <monyo@samba.org>\n" ++"Language-Team: (Samba Team) <samba-technical@samba.org>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=utf-8\n" ++"Content-Transfer-Encoding: \n" ++ ++#: ../web/swat.c:117 ++#, c-format ++msgid "ERROR: Can't open %s" ++msgstr "" ++ ++#: ../web/swat.c:200 ++msgid "Help" ++msgstr "" ++ ++#: ../web/swat.c:206 ../web/swat.c:220 ../web/swat.c:235 ../web/swat.c:243 ../web/swat.c:252 ../web/swat.c:261 ../web/swat.c:267 ../web/swat.c:273 ../web/swat.c:286 ++msgid "Set Default" ++msgstr "" ++ ++#: ../web/swat.c:408 ++#, c-format ++msgid "failed to open %s for writing" ++msgstr "" ++ ++#: ../web/swat.c:431 ++#, c-format ++msgid "Can't reload %s" ++msgstr "" ++ ++#: ../web/swat.c:501 ++#, c-format ++msgid "Logged in as <b>%s</b>" ++msgstr "" ++ ++#: ../web/swat.c:505 ++msgid "Home" ++msgstr "" ++ ++#: ../web/swat.c:507 ++msgid "Globals" ++msgstr "" ++ ++#: ../web/swat.c:508 ++msgid "Shares" ++msgstr "" ++ ++#: ../web/swat.c:509 ++msgid "Printers" ++msgstr "" ++ ++#: ../web/swat.c:510 ++msgid "Wizard" ++msgstr "" ++ ++#: ../web/swat.c:513 ++msgid "Status" ++msgstr "" ++ ++#: ../web/swat.c:514 ++msgid "View Config" ++msgstr "" ++ ++#: ../web/swat.c:516 ++msgid "Password Management" ++msgstr "" ++ ++#: ../web/swat.c:526 ++msgid "Current View Is" ++msgstr "" ++ ++#: ../web/swat.c:527 ../web/swat.c:530 ++msgid "Basic" ++msgstr "" ++ ++#: ../web/swat.c:528 ../web/swat.c:531 ++msgid "Advanced" ++msgstr "" ++ ++#: ../web/swat.c:529 ++msgid "Change View To" ++msgstr "" ++ ++#: ../web/swat.c:554 ++msgid "Current Config" ++msgstr "" ++ ++#: ../web/swat.c:558 ++msgid "Normal View" ++msgstr "" ++ ++#: ../web/swat.c:560 ++msgid "Full View" ++msgstr "" ++ ++#. Here we first set and commit all the parameters that were selected ++#. in the previous screen. ++#: ../web/swat.c:579 ++msgid "Wizard Parameter Edit Page" ++msgstr "" ++ ++#: ../web/swat.c:608 ++msgid "Note: smb.conf file has been read and rewritten" ++msgstr "" ++ ++#. Here we go ... ++#: ../web/swat.c:716 ++msgid "Samba Configuration Wizard" ++msgstr "" ++ ++#: ../web/swat.c:720 ++msgid "The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments." ++msgstr "" ++ ++#: ../web/swat.c:721 ++msgid "The same will happen if you press the commit button." ++msgstr "" ++ ++#: ../web/swat.c:724 ++msgid "Rewrite smb.conf file" ++msgstr "" ++ ++#: ../web/swat.c:725 ++msgid "Commit" ++msgstr "" ++ ++#: ../web/swat.c:726 ++msgid "Edit Parameter Values" ++msgstr "" ++ ++#: ../web/swat.c:732 ++msgid "Server Type" ++msgstr "" ++ ++#: ../web/swat.c:733 ++msgid "Stand Alone" ++msgstr "" ++ ++#: ../web/swat.c:734 ++msgid "Domain Member" ++msgstr "" ++ ++#: ../web/swat.c:735 ++msgid "Domain Controller" ++msgstr "" ++ ++#: ../web/swat.c:738 ++msgid "Unusual Type in smb.conf - Please Select New Mode" ++msgstr "" ++ ++#: ../web/swat.c:740 ++msgid "Configure WINS As" ++msgstr "" ++ ++#: ../web/swat.c:741 ++msgid "Not Used" ++msgstr "" ++ ++#: ../web/swat.c:742 ++msgid "Server for client use" ++msgstr "" ++ ++#: ../web/swat.c:743 ++msgid "Client of another WINS server" ++msgstr "" ++ ++#: ../web/swat.c:745 ++msgid "Remote WINS Server" ++msgstr "" ++ ++#: ../web/swat.c:756 ++msgid "Error: WINS Server Mode and WINS Support both set in smb.conf" ++msgstr "" ++ ++#: ../web/swat.c:757 ++msgid "Please Select desired WINS mode above." ++msgstr "" ++ ++#: ../web/swat.c:759 ++msgid "Expose Home Directories" ++msgstr "" ++ ++#: ../web/swat.c:774 ++msgid "The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment." ++msgstr "" ++ ++#: ../web/swat.c:787 ++msgid "Global Parameters" ++msgstr "" ++ ++#: ../web/swat.c:815 ../web/swat.c:916 ../web/swat.c:1265 ++msgid "Commit Changes" ++msgstr "" ++ ++#: ../web/swat.c:819 ../web/swat.c:919 ../web/swat.c:1267 ++msgid "Reset Values" ++msgstr "" ++ ++#: ../web/swat.c:844 ++msgid "Share Parameters" ++msgstr "" ++ ++#: ../web/swat.c:887 ++msgid "Choose Share" ++msgstr "" ++ ++#: ../web/swat.c:901 ++msgid "Delete Share" ++msgstr "" ++ ++#: ../web/swat.c:908 ++msgid "Create Share" ++msgstr "" ++ ++#: ../web/swat.c:944 ++msgid "password change in demo mode rejected" ++msgstr "" ++ ++#: ../web/swat.c:957 ++msgid "Can't setup password database vectors." ++msgstr "" ++ ++#: ../web/swat.c:983 ++msgid " Must specify \"User Name\" " ++msgstr "" ++ ++#: ../web/swat.c:999 ++msgid " Must specify \"Old Password\" " ++msgstr "" ++ ++#: ../web/swat.c:1005 ++msgid " Must specify \"Remote Machine\" " ++msgstr "" ++ ++#: ../web/swat.c:1012 ++msgid " Must specify \"New, and Re-typed Passwords\" " ++msgstr "" ++ ++#: ../web/swat.c:1018 ++msgid " Re-typed password didn't match new password " ++msgstr "" ++ ++#: ../web/swat.c:1048 ++#, c-format ++msgid " The passwd for '%s' has been changed." ++msgstr "" ++ ++#: ../web/swat.c:1051 ++#, c-format ++msgid " The passwd for '%s' has NOT been changed." ++msgstr "" ++ ++#: ../web/swat.c:1076 ++msgid "Server Password Management" ++msgstr "" ++ ++#. ++#. * Create all the dialog boxes for data collection ++#. ++#: ../web/swat.c:1085 ../web/swat.c:1132 ++msgid "User Name" ++msgstr "" ++ ++#: ../web/swat.c:1088 ../web/swat.c:1134 ++msgid "Old Password" ++msgstr "" ++ ++#: ../web/swat.c:1091 ../web/swat.c:1136 ++msgid "New Password" ++msgstr "" ++ ++#: ../web/swat.c:1093 ../web/swat.c:1138 ++msgid "Re-type New Password" ++msgstr "" ++ ++#: ../web/swat.c:1101 ../web/swat.c:1149 ++msgid "Change Password" ++msgstr "" ++ ++#: ../web/swat.c:1104 ++msgid "Add New User" ++msgstr "" ++ ++#: ../web/swat.c:1106 ++msgid "Delete User" ++msgstr "" ++ ++#: ../web/swat.c:1108 ++msgid "Disable User" ++msgstr "" ++ ++#: ../web/swat.c:1110 ++msgid "Enable User" ++msgstr "" ++ ++#: ../web/swat.c:1123 ++msgid "Client/Server Password Management" ++msgstr "" ++ ++#: ../web/swat.c:1140 ++msgid "Remote Machine" ++msgstr "" ++ ++#: ../web/swat.c:1179 ++msgid "Printer Parameters" ++msgstr "" ++ ++#: ../web/swat.c:1181 ++msgid "Important Note:" ++msgstr "" ++ ++#: ../web/swat.c:1182 ++msgid "Printer names marked with [*] in the Choose Printer drop-down box " ++msgstr "" ++ ++#: ../web/swat.c:1183 ++msgid "are autoloaded printers from " ++msgstr "" ++ ++#: ../web/swat.c:1184 ++msgid "Printcap Name" ++msgstr "" ++ ++#: ../web/swat.c:1185 ++msgid "Attempting to delete these printers from SWAT will have no effect." ++msgstr "" ++ ++#: ../web/swat.c:1231 ++msgid "Choose Printer" ++msgstr "" ++ ++#: ../web/swat.c:1250 ++msgid "Delete Printer" ++msgstr "" ++ ++#: ../web/swat.c:1257 ++msgid "Create Printer" ++msgstr "" ++ ++#: ../web/statuspage.c:123 ++msgid "RDONLY " ++msgstr "" ++ ++#: ../web/statuspage.c:124 ++msgid "WRONLY " ++msgstr "" ++ ++#: ../web/statuspage.c:125 ++msgid "RDWR " ++msgstr "" ++ ++#: ../web/statuspage.c:309 ++msgid "Server Status" ++msgstr "" ++ ++#: ../web/statuspage.c:314 ++msgid "Auto Refresh" ++msgstr "" ++ ++#: ../web/statuspage.c:315 ../web/statuspage.c:320 ++msgid "Refresh Interval: " ++msgstr "" ++ ++#: ../web/statuspage.c:319 ++msgid "Stop Refreshing" ++msgstr "" ++ ++#: ../web/statuspage.c:334 ++msgid "version:" ++msgstr "" ++ ++#: ../web/statuspage.c:337 ++msgid "smbd:" ++msgstr "" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "running" ++msgstr "" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "not running" ++msgstr "" ++ ++#: ../web/statuspage.c:341 ++msgid "Stop smbd" ++msgstr "" ++ ++#: ../web/statuspage.c:343 ++msgid "Start smbd" ++msgstr "" ++ ++#: ../web/statuspage.c:345 ++msgid "Restart smbd" ++msgstr "" ++ ++#: ../web/statuspage.c:350 ++msgid "nmbd:" ++msgstr "" ++ ++#: ../web/statuspage.c:354 ++msgid "Stop nmbd" ++msgstr "" ++ ++#: ../web/statuspage.c:356 ++msgid "Start nmbd" ++msgstr "" ++ ++#: ../web/statuspage.c:358 ++msgid "Restart nmbd" ++msgstr "" ++ ++#: ../web/statuspage.c:364 ++msgid "winbindd:" ++msgstr "" ++ ++#: ../web/statuspage.c:368 ++msgid "Stop winbindd" ++msgstr "" ++ ++#: ../web/statuspage.c:370 ++msgid "Start winbindd" ++msgstr "" ++ ++#: ../web/statuspage.c:372 ++msgid "Restart winbindd" ++msgstr "" ++ ++#. stop, restart all ++#: ../web/statuspage.c:381 ++msgid "Stop All" ++msgstr "" ++ ++#: ../web/statuspage.c:382 ++msgid "Restart All" ++msgstr "" ++ ++#. start all ++#: ../web/statuspage.c:386 ++msgid "Start All" ++msgstr "" ++ ++#: ../web/statuspage.c:393 ++msgid "Active Connections" ++msgstr "" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "PID" ++msgstr "" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ++msgid "Client" ++msgstr "" ++ ++#: ../web/statuspage.c:395 ++msgid "IP address" ++msgstr "" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "Date" ++msgstr "" ++ ++#: ../web/statuspage.c:397 ++msgid "Kill" ++msgstr "" ++ ++#: ../web/statuspage.c:405 ++msgid "Active Shares" ++msgstr "" ++ ++#: ../web/statuspage.c:408 ++msgid "Share" ++msgstr "" ++ ++#: ../web/statuspage.c:408 ++msgid "User" ++msgstr "" ++ ++#: ../web/statuspage.c:408 ++msgid "Group" ++msgstr "" ++ ++#: ../web/statuspage.c:414 ++msgid "Open Files" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "Sharing" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "R/W" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "Oplock" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "File" ++msgstr "" ++ ++#: ../web/statuspage.c:425 ++msgid "Show Client in col 1" ++msgstr "" ++ ++#: ../web/statuspage.c:426 ++msgid "Show PID in col 1" ++msgstr "" ++ ++#: ../param/loadparm.c:755 ++msgid "Base Options" ++msgstr "" ++ ++#: ../param/loadparm.c:775 ++msgid "Security Options" ++msgstr "" ++ ++#: ../param/loadparm.c:859 ++msgid "Logging Options" ++msgstr "" ++ ++#: ../param/loadparm.c:874 ++msgid "Protocol Options" ++msgstr "" ++ ++#: ../param/loadparm.c:911 ++msgid "Tuning Options" ++msgstr "" ++ ++#: ../param/loadparm.c:940 ++msgid "Printing Options" ++msgstr "" ++ ++#: ../param/loadparm.c:970 ++msgid "Filename Handling" ++msgstr "" ++ ++#: ../param/loadparm.c:996 ++msgid "Domain Options" ++msgstr "" ++ ++#: ../param/loadparm.c:1000 ++msgid "Logon Options" ++msgstr "" ++ ++#: ../param/loadparm.c:1019 ++msgid "Browse Options" ++msgstr "" ++ ++#: ../param/loadparm.c:1033 ++msgid "WINS Options" ++msgstr "" ++ ++#: ../param/loadparm.c:1043 ++msgid "Locking Options" ++msgstr "" ++ ++#: ../param/loadparm.c:1061 ++msgid "Ldap Options" ++msgstr "" ++ ++#: ../param/loadparm.c:1078 ++msgid "Miscellaneous Options" ++msgstr "" ++ ++#: ../param/loadparm.c:1138 ++msgid "VFS module options" ++msgstr "" ++ ++#: ../param/loadparm.c:1148 ++msgid "Winbind options" ++msgstr "" +diff --git a/source3/po/fi.msg b/source3/po/fi.msg +new file mode 100644 +index 0000000..e039311 +--- /dev/null ++++ b/source3/po/fi.msg +@@ -0,0 +1,610 @@ ++# Finnish messages for international release of SWAT. ++# Copyright (C) 2007 Lauri Nurmi <lanurmi@iki.fi> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: i18n_swat \n" ++"Report-Msgid-Bugs-To: \n" ++"POT-Creation-Date: 2007-01-02 01:56+0200\n" ++"PO-Revision-Date: 2007-01-12 18:56+0200\n" ++"Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n" ++"Language-Team: Finnish <laatu@lokalisointi.org>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=utf-8\n" ++"Content-Transfer-Encoding: \n" ++ ++#: ../web/swat.c:139 ++#, c-format ++msgid "ERROR: Can't open %s" ++msgstr "VIRHE: Avaaminen ei onnistu — %s" ++ ++#: ../web/swat.c:223 ++msgid "Help" ++msgstr "Ohje" ++ ++#: ../web/swat.c:229 ../web/swat.c:254 ../web/swat.c:275 ../web/swat.c:285 ../web/swat.c:294 ../web/swat.c:303 ../web/swat.c:309 ../web/swat.c:315 ../web/swat.c:328 ++msgid "Set Default" ++msgstr "Oletusarvo" ++ ++#: ../web/swat.c:450 ++#, c-format ++msgid "failed to open %s for writing" ++msgstr "avaaminen kirjoitustilassa ei onnistu — %s" ++ ++#: ../web/swat.c:473 ++#, c-format ++msgid "Can't reload %s" ++msgstr "Uudelleen lataaminen ei onnistu — %s" ++ ++#: ../web/swat.c:543 ++#, c-format ++msgid "Logged in as <b>%s</b>" ++msgstr "Sisäänkirjautuminen käyttäjänä <b>%s</b>" ++ ++#: ../web/swat.c:547 ++msgid "Home" ++msgstr "Koti" ++ ++#: ../web/swat.c:549 ++msgid "Globals" ++msgstr "Yleiset" ++ ++#: ../web/swat.c:550 ++msgid "Shares" ++msgstr "Jaot" ++ ++#: ../web/swat.c:551 ++msgid "Printers" ++msgstr "Tulostimet" ++ ++#: ../web/swat.c:552 ++msgid "Wizard" ++msgstr "Ohjatut asetukset" ++ ++#: ../web/swat.c:556 ++msgid "Status" ++msgstr "Tila" ++ ++#: ../web/swat.c:557 ++msgid "View Config" ++msgstr "Näytä asetukset" ++ ++#: ../web/swat.c:559 ++msgid "Password Management" ++msgstr "Salasanojen hallinta" ++ ++#: ../web/swat.c:569 ++msgid "Current View Is" ++msgstr "Näkymä nyt" ++ ++#: ../web/swat.c:570 ../web/swat.c:573 ++msgid "Basic" ++msgstr "Tavallinen" ++ ++#: ../web/swat.c:571 ../web/swat.c:574 ++msgid "Advanced" ++msgstr "Laajennettu" ++ ++#: ../web/swat.c:572 ++msgid "Change View To" ++msgstr "Vaihda näkymäksi" ++ ++#: ../web/swat.c:601 ++msgid "Current Config" ++msgstr "Nykyiset asetukset" ++ ++#: ../web/swat.c:605 ++msgid "Normal View" ++msgstr "Normaali näkymä" ++ ++#: ../web/swat.c:607 ++msgid "Full View" ++msgstr "Täysi näkymä" ++ ++#. Here we first set and commit all the parameters that were selected ++#. in the previous screen. ++#: ../web/swat.c:626 ++msgid "Wizard Parameter Edit Page" ++msgstr "Ohjattujen asetusten muokkaussivu" ++ ++#: ../web/swat.c:655 ++msgid "Note: smb.conf file has been read and rewritten" ++msgstr "Huom: smb.conf-tiedosto on luettu ja kirjoitettu uudelleen" ++ ++#. Here we go ... ++#: ../web/swat.c:763 ++msgid "Samba Configuration Wizard" ++msgstr "Samban ohjatut asetukset" ++ ++#: ../web/swat.c:767 ++msgid "The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments." ++msgstr "”Kirjoita uudelleen smb.conf-tiedosto”-painike tyhjentää oletusarvot ja kommentit smb.conf-tiedostosta." ++ ++#: ../web/swat.c:768 ++msgid "The same will happen if you press the commit button." ++msgstr "Samoin tapahtuu ”Tallenna”-painiketta painettaessa." ++ ++#: ../web/swat.c:771 ++msgid "Rewrite smb.conf file" ++msgstr "Kirjoita uudelleen smb.conf-tiedosto" ++ ++#: ../web/swat.c:772 ++msgid "Commit" ++msgstr "Tallenna" ++ ++#: ../web/swat.c:773 ++msgid "Edit Parameter Values" ++msgstr "Muokkaa asetusten arvoja" ++ ++#: ../web/swat.c:779 ++msgid "Server Type" ++msgstr "Palvelimen tyyppi" ++ ++#: ../web/swat.c:780 ++msgid "Stand Alone" ++msgstr "Itsenäinen" ++ ++# lähde: Microsoftin käännökset ++#: ../web/swat.c:781 ++msgid "Domain Member" ++msgstr "Toimialuejäsen" ++ ++# lähde: Microsoftin käännökset ++#: ../web/swat.c:782 ++msgid "Domain Controller" ++msgstr "Toimialueen ohjauskone" ++ ++#: ../web/swat.c:785 ++msgid "Unusual Type in smb.conf - Please Select New Mode" ++msgstr "Epätavallinen tyyppi smb.confissa — Valitse uusi tila" ++ ++#: ../web/swat.c:787 ++msgid "Configure WINS As" ++msgstr "WINS" ++ ++#: ../web/swat.c:788 ++msgid "Not Used" ++msgstr "Ei käytössä" ++ ++#: ../web/swat.c:789 ++msgid "Server for client use" ++msgstr "Palvelimena" ++ ++#: ../web/swat.c:790 ++msgid "Client of another WINS server" ++msgstr "Käyttää WINS-etäpalvelinta" ++ ++#: ../web/swat.c:792 ++msgid "Remote WINS Server" ++msgstr "WINS-etäpalvelin" ++ ++#: ../web/swat.c:803 ++msgid "Error: WINS Server Mode and WINS Support both set in smb.conf" ++msgstr "Virhe: Sekä WINS-palvelintila että WINS-tuki asetettu smb.confissa" ++ ++#: ../web/swat.c:804 ++msgid "Please Select desired WINS mode above." ++msgstr "Valitse haluttu WINSin tila yltä." ++ ++#: ../web/swat.c:806 ++msgid "Expose Home Directories" ++msgstr "Jaa kotihakemistot" ++ ++#: ../web/swat.c:821 ++msgid "The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment." ++msgstr "Yllä olevat valinnat asettavat useita asetuksia, ja auttavat Samban nopeassa käyttöönotossa." ++ ++#: ../web/swat.c:834 ++msgid "Global Parameters" ++msgstr "Yleisasetukset" ++ ++#: ../web/swat.c:862 ../web/swat.c:966 ../web/swat.c:1318 ++msgid "Commit Changes" ++msgstr "Tallenna muutokset" ++ ++#: ../web/swat.c:866 ../web/swat.c:969 ../web/swat.c:1320 ++msgid "Reset Values" ++msgstr "Kumoa muutokset" ++ ++#: ../web/swat.c:891 ++msgid "Share Parameters" ++msgstr "Jakoasetukset" ++ ++#: ../web/swat.c:934 ++msgid "Choose Share" ++msgstr "Valitse jako" ++ ++#: ../web/swat.c:951 ++msgid "Delete Share" ++msgstr "Poista jako" ++ ++#: ../web/swat.c:958 ++msgid "Create Share" ++msgstr "Luo jako" ++ ++#: ../web/swat.c:994 ++msgid "password change in demo mode rejected" ++msgstr "salasanan muutos estetty esittelytilassa" ++ ++#: ../web/swat.c:1007 ++msgid "Can't setup password database vectors." ++msgstr "Salasanatietokannan alustus epäonnistui." ++ ++#: ../web/swat.c:1033 ++msgid " Must specify \"User Name\" " ++msgstr " Käyttäjätunnus on annettava " ++ ++#: ../web/swat.c:1049 ++msgid " Must specify \"Old Password\" " ++msgstr " Vanha salasana on annettava " ++ ++#: ../web/swat.c:1055 ++msgid " Must specify \"Remote Machine\" " ++msgstr " Etäkone on annettava " ++ ++#: ../web/swat.c:1062 ++msgid " Must specify \"New, and Re-typed Passwords\" " ++msgstr " Uusi salasana on kirjoitettava kahdesti " ++ ++#: ../web/swat.c:1068 ++msgid " Re-typed password didn't match new password " ++msgstr " Salasanat eivät täsmää " ++ ++#: ../web/swat.c:1101 ++#, c-format ++msgid " The passwd for '%s' has been changed." ++msgstr " Käyttäjän ”%s” salasana vaihdettu." ++ ++#: ../web/swat.c:1104 ++#, c-format ++msgid " The passwd for '%s' has NOT been changed." ++msgstr " Käyttäjän ”%s” salasanaa EI vaihdettu." ++ ++#: ../web/swat.c:1129 ++msgid "Server Password Management" ++msgstr "Palvelimen salasanojen hallinta" ++ ++#. ++#. * Create all the dialog boxes for data collection ++#. ++#: ../web/swat.c:1138 ../web/swat.c:1185 ++msgid "User Name" ++msgstr "Käyttäjätunnus" ++ ++#: ../web/swat.c:1141 ../web/swat.c:1187 ++msgid "Old Password" ++msgstr "Vanha salasana" ++ ++#: ../web/swat.c:1144 ../web/swat.c:1189 ++msgid "New Password" ++msgstr "Uusi salasana" ++ ++#: ../web/swat.c:1146 ../web/swat.c:1191 ++msgid "Re-type New Password" ++msgstr "Uusi salasana uudelleen" ++ ++#: ../web/swat.c:1154 ../web/swat.c:1202 ++msgid "Change Password" ++msgstr "Vaihda salasana" ++ ++#: ../web/swat.c:1157 ++msgid "Add New User" ++msgstr "Lisää uusi käyttäjä" ++ ++#: ../web/swat.c:1159 ++msgid "Delete User" ++msgstr "Poista käyttäjä" ++ ++# Joku suomenkielisempi olisi ehkä parempi. ++#: ../web/swat.c:1161 ++msgid "Disable User" ++msgstr "Passivoi käyttäjä" ++ ++# Joku suomenkielisempi olisi ehkä parempi. ++#: ../web/swat.c:1163 ++msgid "Enable User" ++msgstr "Aktivoi käyttäjä" ++ ++# hmm... ++#: ../web/swat.c:1176 ++msgid "Client/Server Password Management" ++msgstr "Asiakas-palvelin-salasanojen hallinta" ++ ++#: ../web/swat.c:1193 ++msgid "Remote Machine" ++msgstr "Etäkone" ++ ++#: ../web/swat.c:1232 ++msgid "Printer Parameters" ++msgstr "Tulostinasetukset" ++ ++#: ../web/swat.c:1234 ++msgid "Important Note:" ++msgstr "Tärkeä huomautus:" ++ ++#: ../web/swat.c:1235 ++#, c-format ++msgid "Printer names marked with [*] in the Choose Printer drop-down box " ++msgstr "Tähdellä [*] merkityt tulostimien nimet pudotusvalikossa ovat " ++ ++#: ../web/swat.c:1236 ++#, c-format ++msgid "are autoloaded printers from " ++msgstr "automaattisesti ladattuja tulostimia " ++ ++#: ../web/swat.c:1237 ++msgid "Printcap Name" ++msgstr "Printcap Name -asetuksen osoittamasta paikasta" ++ ++#: ../web/swat.c:1238 ++msgid "Attempting to delete these printers from SWAT will have no effect." ++msgstr "Näiden tulostimien poistaminen ei onnistu SWATin kautta." ++ ++#: ../web/swat.c:1284 ++msgid "Choose Printer" ++msgstr "Valitse tulostin" ++ ++#: ../web/swat.c:1303 ++msgid "Delete Printer" ++msgstr "Poista tulostin" ++ ++#: ../web/swat.c:1310 ++msgid "Create Printer" ++msgstr "Luo tulostin" ++ ++#: ../web/statuspage.c:139 ++msgid "RDWR " ++msgstr "Luku+kirj. " ++ ++#: ../web/statuspage.c:141 ++msgid "WRONLY " ++msgstr "Vain kirj. " ++ ++#: ../web/statuspage.c:143 ++msgid "RDONLY " ++msgstr "Vain luku " ++ ++#: ../web/statuspage.c:330 ++msgid "Server Status" ++msgstr "Palvelimen tila" ++ ++#: ../web/statuspage.c:335 ++msgid "Auto Refresh" ++msgstr "Automaattinen päivitys" ++ ++#: ../web/statuspage.c:336 ../web/statuspage.c:341 ++msgid "Refresh Interval: " ++msgstr "Päivitysväli: " ++ ++#: ../web/statuspage.c:340 ++msgid "Stop Refreshing" ++msgstr "Lopeta päivitys" ++ ++#: ../web/statuspage.c:355 ++msgid "version:" ++msgstr "versio:" ++ ++#: ../web/statuspage.c:358 ++msgid "smbd:" ++msgstr "smbd:" ++ ++#: ../web/statuspage.c:358 ../web/statuspage.c:371 ../web/statuspage.c:385 ++msgid "running" ++msgstr "käynnissä" ++ ++#: ../web/statuspage.c:358 ../web/statuspage.c:371 ../web/statuspage.c:385 ++msgid "not running" ++msgstr "pysäytetty" ++ ++#: ../web/statuspage.c:362 ++msgid "Stop smbd" ++msgstr "Pysäytä smbd" ++ ++#: ../web/statuspage.c:364 ++msgid "Start smbd" ++msgstr "Käynnistä smbd" ++ ++#: ../web/statuspage.c:366 ++msgid "Restart smbd" ++msgstr "Käynnistä smbd uudelleen" ++ ++#: ../web/statuspage.c:371 ++msgid "nmbd:" ++msgstr "nmbd:" ++ ++#: ../web/statuspage.c:375 ++msgid "Stop nmbd" ++msgstr "Pysäytä nmbd" ++ ++#: ../web/statuspage.c:377 ++msgid "Start nmbd" ++msgstr "Käynnistä nmbd" ++ ++#: ../web/statuspage.c:379 ++msgid "Restart nmbd" ++msgstr "Käynnistä nmbd uudelleen" ++ ++#: ../web/statuspage.c:385 ++msgid "winbindd:" ++msgstr "winbindd:" ++ ++#: ../web/statuspage.c:389 ++msgid "Stop winbindd" ++msgstr "Pysäytä winbindd" ++ ++#: ../web/statuspage.c:391 ++msgid "Start winbindd" ++msgstr "Käynnistä winbindd" ++ ++#: ../web/statuspage.c:393 ++msgid "Restart winbindd" ++msgstr "Käynnistä winbindd uudelleen" ++ ++#. stop, restart all ++#: ../web/statuspage.c:402 ++msgid "Stop All" ++msgstr "Pysäytä kaikki" ++ ++#: ../web/statuspage.c:403 ++msgid "Restart All" ++msgstr "Käynnistä kaikki uudelleen" ++ ++#. start all ++#: ../web/statuspage.c:407 ++msgid "Start All" ++msgstr "Käynnistä kaikki" ++ ++#: ../web/statuspage.c:414 ++msgid "Active Connections" ++msgstr "Aktiiviset yhteydet" ++ ++#: ../web/statuspage.c:416 ../web/statuspage.c:429 ../web/statuspage.c:437 ++msgid "PID" ++msgstr "PID" ++ ++#: ../web/statuspage.c:416 ../web/statuspage.c:429 ++msgid "Client" ++msgstr "Asiakas" ++ ++#: ../web/statuspage.c:416 ++msgid "IP address" ++msgstr "IP-osoite" ++ ++#: ../web/statuspage.c:416 ../web/statuspage.c:429 ../web/statuspage.c:437 ++msgid "Date" ++msgstr "Aika" ++ ++#: ../web/statuspage.c:418 ++msgid "Kill" ++msgstr "Sulje" ++ ++#: ../web/statuspage.c:426 ++msgid "Active Shares" ++msgstr "Aktiiviset jaot" ++ ++#: ../web/statuspage.c:429 ++msgid "Share" ++msgstr "Jako" ++ ++#: ../web/statuspage.c:429 ++msgid "User" ++msgstr "Käyttäjä" ++ ++#: ../web/statuspage.c:429 ++msgid "Group" ++msgstr "Ryhmä" ++ ++#: ../web/statuspage.c:435 ++msgid "Open Files" ++msgstr "Avoimet tiedostot" ++ ++# Tämä on ilmeisesti palvelimen puolella vallitseva UID. ++#: ../web/statuspage.c:437 ++msgid "Sharing" ++msgstr "Jakaja" ++ ++#: ../web/statuspage.c:437 ++msgid "R/W" ++msgstr "Luku/kirj." ++ ++# Selitys: ++# "Oplocks is a unique Windows file locking feature. It is not really file ++# locking, but is included in most discussions of Windows file locking, so ++# is considered a de facto locking feature." ++# Suomennos: ??? ++#: ../web/statuspage.c:437 ++msgid "Oplock" ++msgstr "Oplock" ++ ++#: ../web/statuspage.c:437 ++msgid "File" ++msgstr "Tiedosto" ++ ++#: ../web/statuspage.c:446 ++msgid "Show Client in col 1" ++msgstr "Näytä asiakas 1. sarakkeessa" ++ ++#: ../web/statuspage.c:447 ++msgid "Show PID in col 1" ++msgstr "Näytä PID 1. sarakkeessa" ++ ++#: ../param/loadparm.c:834 ++msgid "Base Options" ++msgstr "Perusasetukset" ++ ++#: ../param/loadparm.c:853 ++msgid "Security Options" ++msgstr "Turvallisuusasetukset" ++ ++#: ../param/loadparm.c:943 ++msgid "Logging Options" ++msgstr "Lokiasetukset" ++ ++#: ../param/loadparm.c:959 ++msgid "Protocol Options" ++msgstr "Protokolla-asetukset" ++ ++#: ../param/loadparm.c:1005 ++msgid "Tuning Options" ++msgstr "Hienosäätöasetukset" ++ ++#: ../param/loadparm.c:1035 ++msgid "Printing Options" ++msgstr "Tulostusasetukset" ++ ++#: ../param/loadparm.c:1072 ++msgid "Filename Handling" ++msgstr "Tiedostonimien käsittely" ++ ++#: ../param/loadparm.c:1102 ++msgid "Domain Options" ++msgstr "Toimialueasetukset" ++ ++#: ../param/loadparm.c:1106 ++msgid "Logon Options" ++msgstr "Kirjautumisasetukset" ++ ++#: ../param/loadparm.c:1127 ++msgid "Browse Options" ++msgstr "Selausasetukset" ++ ++#: ../param/loadparm.c:1141 ++msgid "WINS Options" ++msgstr "WINS-asetukset" ++ ++#: ../param/loadparm.c:1150 ++msgid "Locking Options" ++msgstr "Lukitusasetukset" ++ ++#: ../param/loadparm.c:1168 ++msgid "Ldap Options" ++msgstr "LDAP-asetukset" ++ ++#: ../param/loadparm.c:1184 ++msgid "Miscellaneous Options" ++msgstr "Sekalaiset asetukset" ++ ++#: ../param/loadparm.c:1189 ++msgid "EventLog Options" ++msgstr "Tapahtumalokiasetukset" ++ ++#: ../param/loadparm.c:1257 ++msgid "VFS module options" ++msgstr "VFS-moduulin asetukset" ++ ++#: ../param/loadparm.c:1267 ++msgid "Winbind options" ++msgstr "Winbind-asetukset" +diff --git a/source3/po/fr.msg b/source3/po/fr.msg +new file mode 100644 +index 0000000..aac9002 +--- /dev/null ++++ b/source3/po/fr.msg +@@ -0,0 +1,592 @@ ++# French messages for international release of SWAT. ++# Copyright (C) 2001 François Le Lay <fanch@tuxfamily.org> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: i18n_swat \n" ++"POT-Creation-Date: 2003-10-06 05:30+0900\n" ++"PO-Revision-Date: 2000-02-08 14:45+0100\n" ++"Last-Translator: François Le Lay <fanch@tuxfamily.org>\n" ++"Language-Team: (Samba Team) <samba-technical@samba.org>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=utf-8\n" ++"Content-Transfer-Encoding: \n" ++ ++#: ../web/swat.c:117 ++#, c-format ++msgid "ERROR: Can't open %s" ++msgstr "" ++ ++#: ../web/swat.c:200 ++msgid "Help" ++msgstr "Aide" ++ ++#: ../web/swat.c:206 ../web/swat.c:220 ../web/swat.c:235 ../web/swat.c:243 ../web/swat.c:252 ../web/swat.c:261 ../web/swat.c:267 ../web/swat.c:273 ../web/swat.c:286 ++msgid "Set Default" ++msgstr "Définir par défaut" ++ ++#: ../web/swat.c:408 ++#, c-format ++msgid "failed to open %s for writing" ++msgstr "" ++ ++#: ../web/swat.c:431 ++#, c-format ++msgid "Can't reload %s" ++msgstr "" ++ ++#: ../web/swat.c:501 ++#, c-format ++msgid "Logged in as <b>%s</b>" ++msgstr "Connecté en tant que <b>%s</b>" ++ ++#: ../web/swat.c:505 ++msgid "Home" ++msgstr "Home" ++ ++#: ../web/swat.c:507 ++msgid "Globals" ++msgstr "Paramètres Généraux" ++ ++#: ../web/swat.c:508 ++msgid "Shares" ++msgstr "Partages" ++ ++#: ../web/swat.c:509 ++msgid "Printers" ++msgstr "Imprimantes" ++ ++#: ../web/swat.c:510 ++msgid "Wizard" ++msgstr "" ++ ++#: ../web/swat.c:513 ++msgid "Status" ++msgstr "Statut" ++ ++#: ../web/swat.c:514 ++msgid "View Config" ++msgstr "Voir Configuration" ++ ++#: ../web/swat.c:516 ++msgid "Password Management" ++msgstr "Gestion des mots de passe" ++ ++#: ../web/swat.c:526 ++msgid "Current View Is" ++msgstr "Configuration Actuelle" ++ ++#: ../web/swat.c:527 ../web/swat.c:530 ++msgid "Basic" ++msgstr "Vue Basique" ++ ++#: ../web/swat.c:528 ../web/swat.c:531 ++msgid "Advanced" ++msgstr "Vue Détaillée" ++ ++#: ../web/swat.c:529 ++msgid "Change View To" ++msgstr "Modifier le mot de passe" ++ ++#: ../web/swat.c:554 ++msgid "Current Config" ++msgstr "Configuration Actuelle" ++ ++#: ../web/swat.c:558 ++msgid "Normal View" ++msgstr "Vue Normale" ++ ++#: ../web/swat.c:560 ++msgid "Full View" ++msgstr "Vue Complète" ++ ++#. Here we first set and commit all the parameters that were selected ++#. in the previous screen. ++#: ../web/swat.c:579 ++msgid "Wizard Parameter Edit Page" ++msgstr "" ++ ++#: ../web/swat.c:608 ++msgid "Note: smb.conf file has been read and rewritten" ++msgstr "" ++ ++#. Here we go ... ++#: ../web/swat.c:716 ++msgid "Samba Configuration Wizard" ++msgstr "" ++ ++#: ../web/swat.c:720 ++msgid "The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments." ++msgstr "" ++ ++#: ../web/swat.c:721 ++msgid "The same will happen if you press the commit button." ++msgstr "" ++ ++#: ../web/swat.c:724 ++msgid "Rewrite smb.conf file" ++msgstr "" ++ ++#: ../web/swat.c:725 ++msgid "Commit" ++msgstr "commentaire" ++ ++#: ../web/swat.c:726 ++msgid "Edit Parameter Values" ++msgstr "Paramètres Imprimantes" ++ ++#: ../web/swat.c:732 ++msgid "Server Type" ++msgstr "" ++ ++#: ../web/swat.c:733 ++msgid "Stand Alone" ++msgstr "" ++ ++#: ../web/swat.c:734 ++msgid "Domain Member" ++msgstr "master de domaine" ++ ++#: ../web/swat.c:735 ++msgid "Domain Controller" ++msgstr "master de domaine" ++ ++#: ../web/swat.c:738 ++msgid "Unusual Type in smb.conf - Please Select New Mode" ++msgstr "" ++ ++#: ../web/swat.c:740 ++msgid "Configure WINS As" ++msgstr "" ++ ++#: ../web/swat.c:741 ++msgid "Not Used" ++msgstr "ne pas descendre" ++ ++#: ../web/swat.c:742 ++msgid "Server for client use" ++msgstr "" ++ ++#: ../web/swat.c:743 ++msgid "Client of another WINS server" ++msgstr "" ++ ++#: ../web/swat.c:745 ++msgid "Remote WINS Server" ++msgstr "" ++ ++#: ../web/swat.c:756 ++msgid "Error: WINS Server Mode and WINS Support both set in smb.conf" ++msgstr "" ++ ++#: ../web/swat.c:757 ++msgid "Please Select desired WINS mode above." ++msgstr "" ++ ++#: ../web/swat.c:759 ++msgid "Expose Home Directories" ++msgstr "" ++ ++#: ../web/swat.c:774 ++msgid "The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment." ++msgstr "" ++ ++#: ../web/swat.c:787 ++msgid "Global Parameters" ++msgstr "Variables Globales" ++ ++#: ../web/swat.c:815 ../web/swat.c:916 ../web/swat.c:1265 ++msgid "Commit Changes" ++msgstr "Sauver les modifications" ++ ++#: ../web/swat.c:819 ../web/swat.c:919 ../web/swat.c:1267 ++msgid "Reset Values" ++msgstr "Réinitialiser Valeurs" ++ ++#: ../web/swat.c:844 ++msgid "Share Parameters" ++msgstr "Paramètres de partage" ++ ++#: ../web/swat.c:887 ++msgid "Choose Share" ++msgstr "Choisir un partage" ++ ++#: ../web/swat.c:901 ++msgid "Delete Share" ++msgstr "Supprimer un partage" ++ ++#: ../web/swat.c:908 ++msgid "Create Share" ++msgstr "Créer un partage" ++ ++#: ../web/swat.c:944 ++msgid "password change in demo mode rejected" ++msgstr "changement de mot de passe en mode démo rejeté" ++ ++#: ../web/swat.c:957 ++msgid "Can't setup password database vectors." ++msgstr "" ++ ++#: ../web/swat.c:983 ++msgid " Must specify \"User Name\" " ++msgstr " Le champ \"Nom d'utilisateur\" doit être spécifié" ++ ++#: ../web/swat.c:999 ++msgid " Must specify \"Old Password\" " ++msgstr " Le champ \"Ancien mot de passe\" doît être spécifié" ++ ++#: ../web/swat.c:1005 ++msgid " Must specify \"Remote Machine\" " ++msgstr " Le champ \"Machine Distante\" doît être spécifié" ++ ++#: ../web/swat.c:1012 ++msgid " Must specify \"New, and Re-typed Passwords\" " ++msgstr "Les champs \"Nouveau mot de passe\" et \"Confirmation du nouveau mot de passe\" doivent être spécifiés \n" ++ ++#: ../web/swat.c:1018 ++msgid " Re-typed password didn't match new password " ++msgstr " Echec de la confirmation du nouveau mot de passe" ++ ++#: ../web/swat.c:1048 ++#, c-format ++msgid " The passwd for '%s' has been changed." ++msgstr " Le mot de passe de '%s' a été modifié. " ++ ++#: ../web/swat.c:1051 ++#, c-format ++msgid " The passwd for '%s' has NOT been changed." ++msgstr " Le mot de passe de '%s' n'a PAS été modifié. \n" ++ ++#: ../web/swat.c:1076 ++msgid "Server Password Management" ++msgstr "Gestion des mots de passe serveur" ++ ++#. ++#. * Create all the dialog boxes for data collection ++#. ++#: ../web/swat.c:1085 ../web/swat.c:1132 ++msgid "User Name" ++msgstr " Nom d'utilisateur : " ++ ++#: ../web/swat.c:1088 ../web/swat.c:1134 ++msgid "Old Password" ++msgstr " Ancien mot de passe : " ++ ++#: ../web/swat.c:1091 ../web/swat.c:1136 ++msgid "New Password" ++msgstr " Nouveau mot de passe : " ++ ++#: ../web/swat.c:1093 ../web/swat.c:1138 ++msgid "Re-type New Password" ++msgstr " Confirmation du nouveau mot de passe : " ++ ++#: ../web/swat.c:1101 ../web/swat.c:1149 ++msgid "Change Password" ++msgstr "Modifier le mot de passe" ++ ++#: ../web/swat.c:1104 ++msgid "Add New User" ++msgstr "Nouvel Utilisateur" ++ ++#: ../web/swat.c:1106 ++msgid "Delete User" ++msgstr "Supprimer Utilisateur" ++ ++#: ../web/swat.c:1108 ++msgid "Disable User" ++msgstr "Désactiver Utilisateur" ++ ++#: ../web/swat.c:1110 ++msgid "Enable User" ++msgstr "Activer Utilisateur" ++ ++#: ../web/swat.c:1123 ++msgid "Client/Server Password Management" ++msgstr "Gestion des mots de passe Client/Serveur" ++ ++#: ../web/swat.c:1140 ++msgid "Remote Machine" ++msgstr " Machine distante : " ++ ++#: ../web/swat.c:1179 ++msgid "Printer Parameters" ++msgstr "Paramètres Imprimantes" ++ ++#: ../web/swat.c:1181 ++msgid "Important Note:" ++msgstr "Note Importante:" ++ ++#: ../web/swat.c:1182 ++msgid "Printer names marked with [*] in the Choose Printer drop-down box " ++msgstr "Les Noms d'imprimantes marqués du signe [*] dans le menu déroulant Choisir Imprimante" ++ ++#: ../web/swat.c:1183 ++msgid "are autoloaded printers from " ++msgstr "désignent des imprimantes automatiquement chargées depuis le " ++ ++#: ../web/swat.c:1184 ++msgid "Printcap Name" ++msgstr "Nom Printcap" ++ ++#: ../web/swat.c:1185 ++msgid "Attempting to delete these printers from SWAT will have no effect." ++msgstr "Essayer de supprimer ces imprimantes depuis SWAT n'aura aucun effet." ++ ++#: ../web/swat.c:1231 ++msgid "Choose Printer" ++msgstr "Choisir Imprimante" ++ ++#: ../web/swat.c:1250 ++msgid "Delete Printer" ++msgstr "Supprimer Imprimante" ++ ++#: ../web/swat.c:1257 ++msgid "Create Printer" ++msgstr "Créer Imprimante" ++ ++#: ../web/statuspage.c:123 ++msgid "RDONLY " ++msgstr "" ++ ++#: ../web/statuspage.c:124 ++msgid "WRONLY " ++msgstr "" ++ ++#: ../web/statuspage.c:125 ++msgid "RDWR " ++msgstr "" ++ ++#: ../web/statuspage.c:309 ++msgid "Server Status" ++msgstr "Statut du Serveur" ++ ++#: ../web/statuspage.c:314 ++msgid "Auto Refresh" ++msgstr "Rafraîchissement Automatique" ++ ++#: ../web/statuspage.c:315 ../web/statuspage.c:320 ++msgid "Refresh Interval: " ++msgstr "Intervalle de rafraîchissement: " ++ ++#: ../web/statuspage.c:319 ++msgid "Stop Refreshing" ++msgstr "Stopper Rafraîchissement" ++ ++#: ../web/statuspage.c:334 ++msgid "version:" ++msgstr "version:" ++ ++#: ../web/statuspage.c:337 ++msgid "smbd:" ++msgstr "" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "running" ++msgstr "actif" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "not running" ++msgstr "non actif" ++ ++#: ../web/statuspage.c:341 ++msgid "Stop smbd" ++msgstr "Stopper smbd" ++ ++#: ../web/statuspage.c:343 ++msgid "Start smbd" ++msgstr "Lancer smbd" ++ ++#: ../web/statuspage.c:345 ++msgid "Restart smbd" ++msgstr "Relancer smbd" ++ ++#: ../web/statuspage.c:350 ++msgid "nmbd:" ++msgstr "" ++ ++#: ../web/statuspage.c:354 ++msgid "Stop nmbd" ++msgstr "Stopper nmbd" ++ ++#: ../web/statuspage.c:356 ++msgid "Start nmbd" ++msgstr "Lancer nmbd" ++ ++#: ../web/statuspage.c:358 ++msgid "Restart nmbd" ++msgstr "Relancer nmbd" ++ ++#: ../web/statuspage.c:364 ++msgid "winbindd:" ++msgstr "" ++ ++#: ../web/statuspage.c:368 ++msgid "Stop winbindd" ++msgstr "Stopper nmbd" ++ ++#: ../web/statuspage.c:370 ++msgid "Start winbindd" ++msgstr "Lancer nmbd" ++ ++#: ../web/statuspage.c:372 ++msgid "Restart winbindd" ++msgstr "Relancer nmbd" ++ ++#. stop, restart all ++#: ../web/statuspage.c:381 ++msgid "Stop All" ++msgstr "" ++ ++#: ../web/statuspage.c:382 ++msgid "Restart All" ++msgstr "Relancer nmbd" ++ ++#. start all ++#: ../web/statuspage.c:386 ++msgid "Start All" ++msgstr "Lancer nmbd" ++ ++#: ../web/statuspage.c:393 ++msgid "Active Connections" ++msgstr "Connections Actives" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "PID" ++msgstr "" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ++msgid "Client" ++msgstr "" ++ ++#: ../web/statuspage.c:395 ++msgid "IP address" ++msgstr "adresse IP" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "Date" ++msgstr "Date" ++ ++#: ../web/statuspage.c:397 ++msgid "Kill" ++msgstr "Terminer" ++ ++#: ../web/statuspage.c:405 ++msgid "Active Shares" ++msgstr "Partages Actifs" ++ ++#: ../web/statuspage.c:408 ++msgid "Share" ++msgstr "Partager" ++ ++#: ../web/statuspage.c:408 ++msgid "User" ++msgstr "Utilisateur" ++ ++#: ../web/statuspage.c:408 ++msgid "Group" ++msgstr "Groupe" ++ ++#: ../web/statuspage.c:414 ++msgid "Open Files" ++msgstr "Fichiers Ouverts" ++ ++#: ../web/statuspage.c:416 ++msgid "Sharing" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "R/W" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "Oplock" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "File" ++msgstr "Fichier" ++ ++#: ../web/statuspage.c:425 ++msgid "Show Client in col 1" ++msgstr "" ++ ++#: ../web/statuspage.c:426 ++msgid "Show PID in col 1" ++msgstr "" ++ ++#: ../param/loadparm.c:755 ++msgid "Base Options" ++msgstr "Options de base" ++ ++#: ../param/loadparm.c:775 ++msgid "Security Options" ++msgstr "Options de Sécurité" ++ ++#: ../param/loadparm.c:859 ++msgid "Logging Options" ++msgstr "Options de Logging" ++ ++#: ../param/loadparm.c:874 ++msgid "Protocol Options" ++msgstr "Options de Protocole" ++ ++#: ../param/loadparm.c:911 ++msgid "Tuning Options" ++msgstr "Options de réglage" ++ ++#: ../param/loadparm.c:940 ++msgid "Printing Options" ++msgstr "Options d'impression" ++ ++#: ../param/loadparm.c:970 ++msgid "Filename Handling" ++msgstr "Gestion des noms de fichier" ++ ++#: ../param/loadparm.c:996 ++msgid "Domain Options" ++msgstr "Options de Domaine" ++ ++#: ../param/loadparm.c:1000 ++msgid "Logon Options" ++msgstr "Options de Logon" ++ ++#: ../param/loadparm.c:1019 ++msgid "Browse Options" ++msgstr "Options de Navigation" ++ ++#: ../param/loadparm.c:1033 ++msgid "WINS Options" ++msgstr "Options WINS" ++ ++#: ../param/loadparm.c:1043 ++msgid "Locking Options" ++msgstr "Options de Verrouillage" ++ ++#: ../param/loadparm.c:1061 ++msgid "Ldap Options" ++msgstr "Options Ldap" ++ ++#: ../param/loadparm.c:1078 ++msgid "Miscellaneous Options" ++msgstr "Options Diverses" ++ ++#: ../param/loadparm.c:1138 ++msgid "VFS module options" ++msgstr "Options VFS" ++ ++#: ../param/loadparm.c:1148 ++msgid "Winbind options" ++msgstr "Options Winbind" +diff --git a/source3/po/genmsg b/source3/po/genmsg +new file mode 100755 +index 0000000..9e9b53b +--- /dev/null ++++ b/source3/po/genmsg +@@ -0,0 +1,40 @@ ++#!/bin/sh ++# Copyright (C) 2003 TAKAHASHI Motonobu <monyo@samba.org> ++# Copyright (C) 2009 Kai Blin <kai@samba.org> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++ ++FILES='../web/swat.c ../web/statuspage.c ../param/loadparm.c' ++LANGS='en ja tr pl fr de it ru' ++ ++XGETTEXT=xgettext ++MSGMERGE=msgmerge ++ ++WIDTH=256 ++ ++$XGETTEXT --default-domain="i18n_swat" \ ++ --add-comments \ ++ --keyword=_ --keyword=N_ \ ++ --width=${WIDTH} \ ++ $FILES ++ ++for lang in $LANGS; do ++ printf "%s" "$lang" ++ mv ${lang}.msg ${lang}.msg.old ++ $MSGMERGE --width=${WIDTH} ${lang}.msg.old i18n_swat.po -o ${lang}.msg ++done ++ ++rm i18n_swat.po ++ +diff --git a/source3/po/it.msg b/source3/po/it.msg +new file mode 100644 +index 0000000..90c3ed5 +--- /dev/null ++++ b/source3/po/it.msg +@@ -0,0 +1,592 @@ ++# Italian messages for international release of SWAT. ++# Copyright (C) 2001 Simo Sorce <idra@samba.org> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: i18n_swat \n" ++"POT-Creation-Date: 2003-10-06 05:30+0900\n" ++"PO-Revision-Date: 2000-02-08 14:45+0100\n" ++"Last-Translator: Simo Sorce <idra@samba.org>\n" ++"Language-Team: (Samba Team) <samba-technical@samba.org>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=utf-8\n" ++"Content-Transfer-Encoding: \n" ++ ++#: ../web/swat.c:117 ++#, c-format ++msgid "ERROR: Can't open %s" ++msgstr "" ++ ++#: ../web/swat.c:200 ++msgid "Help" ++msgstr "Aiuto" ++ ++#: ../web/swat.c:206 ../web/swat.c:220 ../web/swat.c:235 ../web/swat.c:243 ../web/swat.c:252 ../web/swat.c:261 ../web/swat.c:267 ../web/swat.c:273 ../web/swat.c:286 ++msgid "Set Default" ++msgstr "Imposta Default" ++ ++#: ../web/swat.c:408 ++#, c-format ++msgid "failed to open %s for writing" ++msgstr "" ++ ++#: ../web/swat.c:431 ++#, c-format ++msgid "Can't reload %s" ++msgstr "" ++ ++#: ../web/swat.c:501 ++#, c-format ++msgid "Logged in as <b>%s</b>" ++msgstr "Connesso come <b>%s</b><p>\n" ++ ++#: ../web/swat.c:505 ++msgid "Home" ++msgstr "Home" ++ ++#: ../web/swat.c:507 ++msgid "Globals" ++msgstr "Globali" ++ ++#: ../web/swat.c:508 ++msgid "Shares" ++msgstr "Condivisioni" ++ ++#: ../web/swat.c:509 ++msgid "Printers" ++msgstr "Stampanti" ++ ++#: ../web/swat.c:510 ++msgid "Wizard" ++msgstr "" ++ ++#: ../web/swat.c:513 ++msgid "Status" ++msgstr "Stato" ++ ++#: ../web/swat.c:514 ++msgid "View Config" ++msgstr "Visualizza Configurazione" ++ ++#: ../web/swat.c:516 ++msgid "Password Management" ++msgstr "Gestione Password" ++ ++#: ../web/swat.c:526 ++msgid "Current View Is" ++msgstr "Configurazione Attuale" ++ ++#: ../web/swat.c:527 ../web/swat.c:530 ++msgid "Basic" ++msgstr "Vista Semplice" ++ ++#: ../web/swat.c:528 ../web/swat.c:531 ++msgid "Advanced" ++msgstr "Vista Avanzata" ++ ++#: ../web/swat.c:529 ++msgid "Change View To" ++msgstr "Cambia Password" ++ ++#: ../web/swat.c:554 ++msgid "Current Config" ++msgstr "Configurazione Attuale" ++ ++#: ../web/swat.c:558 ++msgid "Normal View" ++msgstr "Vista Normale" ++ ++#: ../web/swat.c:560 ++msgid "Full View" ++msgstr "Vista Completa" ++ ++#. Here we first set and commit all the parameters that were selected ++#. in the previous screen. ++#: ../web/swat.c:579 ++msgid "Wizard Parameter Edit Page" ++msgstr "" ++ ++#: ../web/swat.c:608 ++msgid "Note: smb.conf file has been read and rewritten" ++msgstr "" ++ ++#. Here we go ... ++#: ../web/swat.c:716 ++msgid "Samba Configuration Wizard" ++msgstr "" ++ ++#: ../web/swat.c:720 ++msgid "The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments." ++msgstr "" ++ ++#: ../web/swat.c:721 ++msgid "The same will happen if you press the commit button." ++msgstr "" ++ ++#: ../web/swat.c:724 ++msgid "Rewrite smb.conf file" ++msgstr "" ++ ++#: ../web/swat.c:725 ++msgid "Commit" ++msgstr "commento" ++ ++#: ../web/swat.c:726 ++msgid "Edit Parameter Values" ++msgstr "Parametri Stampante" ++ ++#: ../web/swat.c:732 ++msgid "Server Type" ++msgstr "" ++ ++#: ../web/swat.c:733 ++msgid "Stand Alone" ++msgstr "" ++ ++#: ../web/swat.c:734 ++msgid "Domain Member" ++msgstr "master dominio" ++ ++#: ../web/swat.c:735 ++msgid "Domain Controller" ++msgstr "master dominio" ++ ++#: ../web/swat.c:738 ++msgid "Unusual Type in smb.conf - Please Select New Mode" ++msgstr "" ++ ++#: ../web/swat.c:740 ++msgid "Configure WINS As" ++msgstr "" ++ ++#: ../web/swat.c:741 ++msgid "Not Used" ++msgstr "non discendere" ++ ++#: ../web/swat.c:742 ++msgid "Server for client use" ++msgstr "" ++ ++#: ../web/swat.c:743 ++msgid "Client of another WINS server" ++msgstr "" ++ ++#: ../web/swat.c:745 ++msgid "Remote WINS Server" ++msgstr "" ++ ++#: ../web/swat.c:756 ++msgid "Error: WINS Server Mode and WINS Support both set in smb.conf" ++msgstr "" ++ ++#: ../web/swat.c:757 ++msgid "Please Select desired WINS mode above." ++msgstr "" ++ ++#: ../web/swat.c:759 ++msgid "Expose Home Directories" ++msgstr "" ++ ++#: ../web/swat.c:774 ++msgid "The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment." ++msgstr "" ++ ++#: ../web/swat.c:787 ++msgid "Global Parameters" ++msgstr "Variabili Globali" ++ ++#: ../web/swat.c:815 ../web/swat.c:916 ../web/swat.c:1265 ++msgid "Commit Changes" ++msgstr "Salva Modifiche" ++ ++#: ../web/swat.c:819 ../web/swat.c:919 ../web/swat.c:1267 ++msgid "Reset Values" ++msgstr "Resetta Valori" ++ ++#: ../web/swat.c:844 ++msgid "Share Parameters" ++msgstr "Parametri Condivisioni" ++ ++#: ../web/swat.c:887 ++msgid "Choose Share" ++msgstr "Scegli Condivisione" ++ ++#: ../web/swat.c:901 ++msgid "Delete Share" ++msgstr "Cancella Condivisione" ++ ++#: ../web/swat.c:908 ++msgid "Create Share" ++msgstr "Crea Condivisione" ++ ++#: ../web/swat.c:944 ++msgid "password change in demo mode rejected" ++msgstr "cambio password in modalita' demo rigettata" ++ ++#: ../web/swat.c:957 ++msgid "Can't setup password database vectors." ++msgstr "" ++ ++#: ../web/swat.c:983 ++msgid " Must specify \"User Name\" " ++msgstr " \"Nome Utente\" deve essere specificato " ++ ++#: ../web/swat.c:999 ++msgid " Must specify \"Old Password\" " ++msgstr " \"Vecchia Password\" deve essere specificato " ++ ++#: ../web/swat.c:1005 ++msgid " Must specify \"Remote Machine\" " ++msgstr " \"Macchina Remota\" deve essere specificato " ++ ++#: ../web/swat.c:1012 ++msgid " Must specify \"New, and Re-typed Passwords\" " ++msgstr " \"Nuova/Conferma Password\" devono essere specificati " ++ ++#: ../web/swat.c:1018 ++msgid " Re-typed password didn't match new password " ++msgstr " la password di conferma non e' uguale alla nuova password " ++ ++#: ../web/swat.c:1048 ++#, c-format ++msgid " The passwd for '%s' has been changed." ++msgstr " La password per '%s' e' stata cambiata." ++ ++#: ../web/swat.c:1051 ++#, c-format ++msgid " The passwd for '%s' has NOT been changed." ++msgstr " La password per '%s' non e' stata cambianta." ++ ++#: ../web/swat.c:1076 ++msgid "Server Password Management" ++msgstr "Gestione Password del Server" ++ ++#. ++#. * Create all the dialog boxes for data collection ++#. ++#: ../web/swat.c:1085 ../web/swat.c:1132 ++msgid "User Name" ++msgstr " Nome Utente" ++ ++#: ../web/swat.c:1088 ../web/swat.c:1134 ++msgid "Old Password" ++msgstr " Vecchia Password" ++ ++#: ../web/swat.c:1091 ../web/swat.c:1136 ++msgid "New Password" ++msgstr " Nuova Password" ++ ++#: ../web/swat.c:1093 ../web/swat.c:1138 ++msgid "Re-type New Password" ++msgstr " Conferma nuova Password" ++ ++#: ../web/swat.c:1101 ../web/swat.c:1149 ++msgid "Change Password" ++msgstr "Cambia Password" ++ ++#: ../web/swat.c:1104 ++msgid "Add New User" ++msgstr "Aggiungi Nuovo Utente" ++ ++#: ../web/swat.c:1106 ++msgid "Delete User" ++msgstr "Cancella Utente" ++ ++#: ../web/swat.c:1108 ++msgid "Disable User" ++msgstr "Disabilita Utente" ++ ++#: ../web/swat.c:1110 ++msgid "Enable User" ++msgstr "Abilita Utente" ++ ++#: ../web/swat.c:1123 ++msgid "Client/Server Password Management" ++msgstr "Gestione Password Client/Server" ++ ++#: ../web/swat.c:1140 ++msgid "Remote Machine" ++msgstr " Macchina Remota" ++ ++#: ../web/swat.c:1179 ++msgid "Printer Parameters" ++msgstr "Parametri Stampante" ++ ++#: ../web/swat.c:1181 ++msgid "Important Note:" ++msgstr "Nota Importante:" ++ ++#: ../web/swat.c:1182 ++msgid "Printer names marked with [*] in the Choose Printer drop-down box " ++msgstr "nomi di stampante marcati con [*] nel riquadro a scomparsa Scegli Stampante" ++ ++#: ../web/swat.c:1183 ++msgid "are autoloaded printers from " ++msgstr "sono stampanti caricate automaticamente da " ++ ++#: ../web/swat.c:1184 ++msgid "Printcap Name" ++msgstr "Nome Printcap" ++ ++#: ../web/swat.c:1185 ++msgid "Attempting to delete these printers from SWAT will have no effect." ++msgstr "Il tentativo di cancellare queste stampanti da sWAT non avara' effetto.\n" ++ ++#: ../web/swat.c:1231 ++msgid "Choose Printer" ++msgstr "Scegli Stampante" ++ ++#: ../web/swat.c:1250 ++msgid "Delete Printer" ++msgstr "Cancella Stampante" ++ ++#: ../web/swat.c:1257 ++msgid "Create Printer" ++msgstr "Crea Stampante" ++ ++#: ../web/statuspage.c:123 ++msgid "RDONLY " ++msgstr "" ++ ++#: ../web/statuspage.c:124 ++msgid "WRONLY " ++msgstr "" ++ ++#: ../web/statuspage.c:125 ++msgid "RDWR " ++msgstr "" ++ ++#: ../web/statuspage.c:309 ++msgid "Server Status" ++msgstr "Stato del Server" ++ ++#: ../web/statuspage.c:314 ++msgid "Auto Refresh" ++msgstr "Rinfresco Automatico" ++ ++#: ../web/statuspage.c:315 ../web/statuspage.c:320 ++msgid "Refresh Interval: " ++msgstr "Intervallo Rinfresco: " ++ ++#: ../web/statuspage.c:319 ++msgid "Stop Refreshing" ++msgstr "Ferma Rinfresco" ++ ++#: ../web/statuspage.c:334 ++msgid "version:" ++msgstr "versione:" ++ ++#: ../web/statuspage.c:337 ++msgid "smbd:" ++msgstr "" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "running" ++msgstr "attivo" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "not running" ++msgstr "non attivo" ++ ++#: ../web/statuspage.c:341 ++msgid "Stop smbd" ++msgstr "Ferma smbd" ++ ++#: ../web/statuspage.c:343 ++msgid "Start smbd" ++msgstr "Lancia smbd" ++ ++#: ../web/statuspage.c:345 ++msgid "Restart smbd" ++msgstr "Rilancia smbd" ++ ++#: ../web/statuspage.c:350 ++msgid "nmbd:" ++msgstr "" ++ ++#: ../web/statuspage.c:354 ++msgid "Stop nmbd" ++msgstr "Ferma nmbd" ++ ++#: ../web/statuspage.c:356 ++msgid "Start nmbd" ++msgstr "Lancia nmbd" ++ ++#: ../web/statuspage.c:358 ++msgid "Restart nmbd" ++msgstr "Rilancia nmbd" ++ ++#: ../web/statuspage.c:364 ++msgid "winbindd:" ++msgstr "" ++ ++#: ../web/statuspage.c:368 ++msgid "Stop winbindd" ++msgstr "Ferma nmbd" ++ ++#: ../web/statuspage.c:370 ++msgid "Start winbindd" ++msgstr "Lancia nmbd" ++ ++#: ../web/statuspage.c:372 ++msgid "Restart winbindd" ++msgstr "Rilancia nmbd" ++ ++#. stop, restart all ++#: ../web/statuspage.c:381 ++msgid "Stop All" ++msgstr "" ++ ++#: ../web/statuspage.c:382 ++msgid "Restart All" ++msgstr "Rilancia nmbd" ++ ++#. start all ++#: ../web/statuspage.c:386 ++msgid "Start All" ++msgstr "Lancia nmbd" ++ ++#: ../web/statuspage.c:393 ++msgid "Active Connections" ++msgstr "Connessioni Attive" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "PID" ++msgstr "" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ++msgid "Client" ++msgstr "" ++ ++#: ../web/statuspage.c:395 ++msgid "IP address" ++msgstr "indirizzo IP" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "Date" ++msgstr "Data" ++ ++#: ../web/statuspage.c:397 ++msgid "Kill" ++msgstr "Termina" ++ ++#: ../web/statuspage.c:405 ++msgid "Active Shares" ++msgstr "Condivisioni Attive" ++ ++#: ../web/statuspage.c:408 ++msgid "Share" ++msgstr "Condivisione" ++ ++#: ../web/statuspage.c:408 ++msgid "User" ++msgstr "Utente" ++ ++#: ../web/statuspage.c:408 ++msgid "Group" ++msgstr "Gruppo" ++ ++#: ../web/statuspage.c:414 ++msgid "Open Files" ++msgstr "File Aperti" ++ ++#: ../web/statuspage.c:416 ++msgid "Sharing" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "R/W" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "Oplock" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "File" ++msgstr "" ++ ++#: ../web/statuspage.c:425 ++msgid "Show Client in col 1" ++msgstr "" ++ ++#: ../web/statuspage.c:426 ++msgid "Show PID in col 1" ++msgstr "" ++ ++#: ../param/loadparm.c:755 ++msgid "Base Options" ++msgstr "Opzioni Basilari" ++ ++#: ../param/loadparm.c:775 ++msgid "Security Options" ++msgstr "Opzioni di Sicurezza" ++ ++#: ../param/loadparm.c:859 ++msgid "Logging Options" ++msgstr "Opzioni di Log" ++ ++#: ../param/loadparm.c:874 ++msgid "Protocol Options" ++msgstr "Opzioni Protocollo" ++ ++#: ../param/loadparm.c:911 ++msgid "Tuning Options" ++msgstr "Opzioni Tuning" ++ ++#: ../param/loadparm.c:940 ++msgid "Printing Options" ++msgstr "Opzioni di Stampa" ++ ++#: ../param/loadparm.c:970 ++msgid "Filename Handling" ++msgstr "Gestione Nomi File" ++ ++#: ../param/loadparm.c:996 ++msgid "Domain Options" ++msgstr "Opzioni Dominio" ++ ++#: ../param/loadparm.c:1000 ++msgid "Logon Options" ++msgstr "Opzioni di Logon" ++ ++#: ../param/loadparm.c:1019 ++msgid "Browse Options" ++msgstr "Opzioni Browsing" ++ ++#: ../param/loadparm.c:1033 ++msgid "WINS Options" ++msgstr "opzioni WINS" ++ ++#: ../param/loadparm.c:1043 ++msgid "Locking Options" ++msgstr "Opzioni Locking" ++ ++#: ../param/loadparm.c:1061 ++msgid "Ldap Options" ++msgstr "Opzioni Ldap" ++ ++#: ../param/loadparm.c:1078 ++msgid "Miscellaneous Options" ++msgstr "Opzioni Generiche" ++ ++#: ../param/loadparm.c:1138 ++msgid "VFS module options" ++msgstr "Opzioni VFS" ++ ++#: ../param/loadparm.c:1148 ++msgid "Winbind options" ++msgstr "Opzioni Winbind" +diff --git a/source3/po/ja.msg b/source3/po/ja.msg +new file mode 100644 +index 0000000..52ec571 +--- /dev/null ++++ b/source3/po/ja.msg +@@ -0,0 +1,594 @@ ++# Japanese messages for international release of SWAT. ++# Copyright (C) 2003 TAKAHASHI Motonobu <monyo@samba.org> ++# Copyright (C) 2000 Ryo Kawahara <rkawa@lbe.co.jp> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: i18n-swat\n" ++"POT-Creation-Date: 2003-10-06 05:30+0900\n" ++"PO-Revision-Date: 2003-09-23 04:38+900\n" ++"Last-Translator: TAKAHASHI Motonobu <monyo@samba.org>\n" ++"Language-Team: Samba Users Group Japan <sugj-tech@samba.gr.jp>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++ ++#: ../web/swat.c:117 ++#, c-format ++msgid "ERROR: Can't open %s" ++msgstr "%s をオープンできません" ++ ++#: ../web/swat.c:200 ++msgid "Help" ++msgstr "ヘルプ" ++ ++#: ../web/swat.c:206 ../web/swat.c:220 ../web/swat.c:235 ../web/swat.c:243 ../web/swat.c:252 ../web/swat.c:261 ../web/swat.c:267 ../web/swat.c:273 ../web/swat.c:286 ++msgid "Set Default" ++msgstr "デフォルト値" ++ ++#: ../web/swat.c:408 ++#, c-format ++msgid "failed to open %s for writing" ++msgstr "%s を書き込み用にオープンできません" ++ ++#: ../web/swat.c:431 ++#, c-format ++msgid "Can't reload %s" ++msgstr "%s を再読み込みできません\n" ++ ++# msgid "Logged in as <b>%s</b><p>\n" ++#: ../web/swat.c:501 ++#, c-format ++msgid "Logged in as <b>%s</b>" ++msgstr "<b>%s</b>としてログイン" ++ ++#: ../web/swat.c:505 ++msgid "Home" ++msgstr "ホーム" ++ ++#: ../web/swat.c:507 ++msgid "Globals" ++msgstr "グローバル" ++ ++#: ../web/swat.c:508 ++msgid "Shares" ++msgstr "ファイル共有" ++ ++#: ../web/swat.c:509 ++msgid "Printers" ++msgstr "印刷共有" ++ ++#: ../web/swat.c:510 ++msgid "Wizard" ++msgstr "ウィザード" ++ ++#: ../web/swat.c:513 ++msgid "Status" ++msgstr "サーバの状態" ++ ++#: ../web/swat.c:514 ++msgid "View Config" ++msgstr "現在の設定" ++ ++#: ../web/swat.c:516 ++msgid "Password Management" ++msgstr "パスワード管理" ++ ++#: ../web/swat.c:526 ++msgid "Current View Is" ++msgstr "現在の表示モード" ++ ++#: ../web/swat.c:527 ../web/swat.c:530 ++msgid "Basic" ++msgstr "標準表示" ++ ++#: ../web/swat.c:528 ../web/swat.c:531 ++msgid "Advanced" ++msgstr "詳細表示" ++ ++#: ../web/swat.c:529 ++msgid "Change View To" ++msgstr "表示モードの変更" ++ ++#: ../web/swat.c:554 ++msgid "Current Config" ++msgstr "現在の設定" ++ ++#: ../web/swat.c:558 ++msgid "Normal View" ++msgstr "標準表示" ++ ++#: ../web/swat.c:560 ++msgid "Full View" ++msgstr "完全表示" ++ ++#. Here we first set and commit all the parameters that were selected ++#. in the previous screen. ++#: ../web/swat.c:579 ++msgid "Wizard Parameter Edit Page" ++msgstr "ウィザードによるパラメータ編集ページ" ++ ++#: ../web/swat.c:608 ++msgid "Note: smb.conf file has been read and rewritten" ++msgstr "smb.conf ファイルが書き換えられました。" ++ ++#. Here we go ... ++#: ../web/swat.c:716 ++msgid "Samba Configuration Wizard" ++msgstr "Samba 設定ウィザード" ++ ++#: ../web/swat.c:720 ++msgid "The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments." ++msgstr "「smb.conf の書換」ボタンを押すと smb.conf ファイル中のすべてのデフォルト値やコメントは削除されます。" ++ ++#: ../web/swat.c:721 ++msgid "The same will happen if you press the commit button." ++msgstr "「commit」ボタンを押した場合にも同様の変更が行なわれます。" ++ ++#: ../web/swat.c:724 ++msgid "Rewrite smb.conf file" ++msgstr "smb.conf の書換" ++ ++#: ../web/swat.c:725 ++msgid "Commit" ++msgstr "設定を反映" ++ ++#: ../web/swat.c:726 ++msgid "Edit Parameter Values" ++msgstr "各パラメータの編集" ++ ++#: ../web/swat.c:732 ++msgid "Server Type" ++msgstr "サーバタイプ" ++ ++#: ../web/swat.c:733 ++msgid "Stand Alone" ++msgstr "スタンドアロン" ++ ++#: ../web/swat.c:734 ++msgid "Domain Member" ++msgstr "ドメインメンバ" ++ ++#: ../web/swat.c:735 ++msgid "Domain Controller" ++msgstr "ドメインコントローラ" ++ ++#: ../web/swat.c:738 ++msgid "Unusual Type in smb.conf - Please Select New Mode" ++msgstr "通常の形式ではない - 新しいモードを選択のこと" ++ ++#: ../web/swat.c:740 ++msgid "Configure WINS As" ++msgstr "WINS" ++ ++#: ../web/swat.c:741 ++msgid "Not Used" ++msgstr "使わない" ++ ++#: ../web/swat.c:742 ++msgid "Server for client use" ++msgstr "サーバとして構成" ++ ++#: ../web/swat.c:743 ++msgid "Client of another WINS server" ++msgstr "別の WINS サーバのクライアントとして構成" ++ ++#: ../web/swat.c:745 ++msgid "Remote WINS Server" ++msgstr "別の WINS サーバ" ++ ++#: ../web/swat.c:756 ++msgid "Error: WINS Server Mode and WINS Support both set in smb.conf" ++msgstr "エラー: wins server と wins support の両パラメータが smb.conf で指定されています" ++ ++#: ../web/swat.c:757 ++msgid "Please Select desired WINS mode above." ++msgstr "いずれかの WINS モードを選択してください。" ++ ++#: ../web/swat.c:759 ++msgid "Expose Home Directories" ++msgstr "ホームディレクトリの公開" ++ ++#: ../web/swat.c:774 ++msgid "The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment." ++msgstr "上記の設定オプションにより、複数のパラメータが同期して設定されるため、 Samba の運用を迅速に開始する上での助けとなるでしょう。" ++ ++#: ../web/swat.c:787 ++msgid "Global Parameters" ++msgstr "Global パラメータ" ++ ++#: ../web/swat.c:815 ../web/swat.c:916 ../web/swat.c:1265 ++msgid "Commit Changes" ++msgstr "変更を反映" ++ ++#: ../web/swat.c:819 ../web/swat.c:919 ../web/swat.c:1267 ++msgid "Reset Values" ++msgstr "変更を取消" ++ ++#: ../web/swat.c:844 ++msgid "Share Parameters" ++msgstr "ファイル共有 パラメータ" ++ ++#: ../web/swat.c:887 ++msgid "Choose Share" ++msgstr "ファイル共有の選択" ++ ++#: ../web/swat.c:901 ++msgid "Delete Share" ++msgstr "ファイル共有の削除" ++ ++#: ../web/swat.c:908 ++msgid "Create Share" ++msgstr "ファイル共有の作成" ++ ++#: ../web/swat.c:944 ++msgid "password change in demo mode rejected" ++msgstr "デモ・モードでのパスワード変更はできません" ++ ++#: ../web/swat.c:957 ++msgid "Can't setup password database vectors." ++msgstr "パスワード・データベースが見つけられません" ++ ++#: ../web/swat.c:983 ++msgid " Must specify \"User Name\" " ++msgstr "「ユーザ名」欄に入力してください" ++ ++#: ../web/swat.c:999 ++msgid " Must specify \"Old Password\" " ++msgstr "「旧パスワード」欄に入力してください" ++ ++#: ../web/swat.c:1005 ++msgid " Must specify \"Remote Machine\" " ++msgstr "「リモートマシン」欄に入力してください" ++ ++#: ../web/swat.c:1012 ++msgid " Must specify \"New, and Re-typed Passwords\" " ++msgstr "「新パスワード」欄と「新パスワードの再入力」欄に入力してください" ++ ++#: ../web/swat.c:1018 ++msgid " Re-typed password didn't match new password " ++msgstr "「新パスワードの再入力」欄の入力内容が「新パスワード」欄の入力と一致していません。" ++ ++#: ../web/swat.c:1048 ++#, c-format ++msgid " The passwd for '%s' has been changed." ++msgstr " %s のパスワードは変更されました。" ++ ++#: ../web/swat.c:1051 ++#, c-format ++msgid " The passwd for '%s' has NOT been changed." ++msgstr " '%s' のパスワードは変更されませんでした。" ++ ++#: ../web/swat.c:1076 ++msgid "Server Password Management" ++msgstr "ローカルマシンのパスワード管理" ++ ++#. ++#. * Create all the dialog boxes for data collection ++#. ++#: ../web/swat.c:1085 ../web/swat.c:1132 ++msgid "User Name" ++msgstr "ユーザ名" ++ ++#: ../web/swat.c:1088 ../web/swat.c:1134 ++msgid "Old Password" ++msgstr "旧パスワード" ++ ++#: ../web/swat.c:1091 ../web/swat.c:1136 ++msgid "New Password" ++msgstr "新パスワード" ++ ++#: ../web/swat.c:1093 ../web/swat.c:1138 ++msgid "Re-type New Password" ++msgstr "新パスワードの再入力" ++ ++#: ../web/swat.c:1101 ../web/swat.c:1149 ++msgid "Change Password" ++msgstr "パスワード変更" ++ ++#: ../web/swat.c:1104 ++msgid "Add New User" ++msgstr "新規ユーザ追加" ++ ++#: ../web/swat.c:1106 ++msgid "Delete User" ++msgstr "ユーザの削除" ++ ++#: ../web/swat.c:1108 ++msgid "Disable User" ++msgstr "ユーザの無効化" ++ ++#: ../web/swat.c:1110 ++msgid "Enable User" ++msgstr "ユーザの有効化" ++ ++#: ../web/swat.c:1123 ++msgid "Client/Server Password Management" ++msgstr "リモートマシンのパスワード管理" ++ ++#: ../web/swat.c:1140 ++msgid "Remote Machine" ++msgstr "リモートマシン" ++ ++#: ../web/swat.c:1179 ++msgid "Printer Parameters" ++msgstr "印刷共有 パラメータ" ++ ++#: ../web/swat.c:1181 ++msgid "Important Note:" ++msgstr "*注" ++ ++#: ../web/swat.c:1182 ++msgid "Printer names marked with [*] in the Choose Printer drop-down box " ++msgstr "名前の先頭に [*] がついたプリンタ" ++ ++#: ../web/swat.c:1183 ++msgid "are autoloaded printers from " ++msgstr "は" ++ ++#: ../web/swat.c:1184 ++msgid "Printcap Name" ++msgstr "printcap name パラメータ" ++ ++#: ../web/swat.c:1185 ++msgid "Attempting to delete these printers from SWAT will have no effect." ++msgstr "から自動設定されたものですから、削除することはできません。" ++ ++#: ../web/swat.c:1231 ++msgid "Choose Printer" ++msgstr "印刷共有の選択" ++ ++#: ../web/swat.c:1250 ++msgid "Delete Printer" ++msgstr "印刷共有の削除" ++ ++#: ../web/swat.c:1257 ++msgid "Create Printer" ++msgstr "印刷共有の作成" ++ ++#: ../web/statuspage.c:123 ++msgid "RDONLY " ++msgstr "参照のみ " ++ ++#: ../web/statuspage.c:124 ++msgid "WRONLY " ++msgstr "更新のみ " ++ ++#: ../web/statuspage.c:125 ++msgid "RDWR " ++msgstr "参照/更新 " ++ ++#: ../web/statuspage.c:309 ++msgid "Server Status" ++msgstr "サーバの状態" ++ ++#: ../web/statuspage.c:314 ++msgid "Auto Refresh" ++msgstr "自動更新の開始" ++ ++#: ../web/statuspage.c:315 ../web/statuspage.c:320 ++msgid "Refresh Interval: " ++msgstr "更新間隔: " ++ ++#: ../web/statuspage.c:319 ++msgid "Stop Refreshing" ++msgstr "自動更新の停止" ++ ++#: ../web/statuspage.c:334 ++msgid "version:" ++msgstr "バージョン" ++ ++#: ../web/statuspage.c:337 ++msgid "smbd:" ++msgstr "" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "running" ++msgstr "実行中" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "not running" ++msgstr "停止中" ++ ++#: ../web/statuspage.c:341 ++msgid "Stop smbd" ++msgstr "smbd の停止" ++ ++#: ../web/statuspage.c:343 ++msgid "Start smbd" ++msgstr "smbd の起動" ++ ++#: ../web/statuspage.c:345 ++msgid "Restart smbd" ++msgstr "smbd の再起動" ++ ++#: ../web/statuspage.c:350 ++msgid "nmbd:" ++msgstr "" ++ ++#: ../web/statuspage.c:354 ++msgid "Stop nmbd" ++msgstr "nmbd の停止" ++ ++#: ../web/statuspage.c:356 ++msgid "Start nmbd" ++msgstr "nmbd の起動" ++ ++#: ../web/statuspage.c:358 ++msgid "Restart nmbd" ++msgstr "nmbd の再起動" ++ ++#: ../web/statuspage.c:364 ++msgid "winbindd:" ++msgstr "" ++ ++#: ../web/statuspage.c:368 ++msgid "Stop winbindd" ++msgstr "winbindd の停止" ++ ++#: ../web/statuspage.c:370 ++msgid "Start winbindd" ++msgstr "winbindd の起動" ++ ++#: ../web/statuspage.c:372 ++msgid "Restart winbindd" ++msgstr "winbindd の再起動" ++ ++#. stop, restart all ++#: ../web/statuspage.c:381 ++msgid "Stop All" ++msgstr "すべて停止" ++ ++#: ../web/statuspage.c:382 ++msgid "Restart All" ++msgstr "すべて再起動" ++ ++#. start all ++#: ../web/statuspage.c:386 ++msgid "Start All" ++msgstr "すべて起動" ++ ++#: ../web/statuspage.c:393 ++msgid "Active Connections" ++msgstr "接続中のクライアント" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "PID" ++msgstr "" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ++msgid "Client" ++msgstr "クライアント" ++ ++#: ../web/statuspage.c:395 ++msgid "IP address" ++msgstr "IPアドレス" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "Date" ++msgstr "日付" ++ ++#: ../web/statuspage.c:397 ++msgid "Kill" ++msgstr "切断" ++ ++#: ../web/statuspage.c:405 ++msgid "Active Shares" ++msgstr "接続中の共有" ++ ++#: ../web/statuspage.c:408 ++msgid "Share" ++msgstr "共有名" ++ ++#: ../web/statuspage.c:408 ++msgid "User" ++msgstr "ユーザ" ++ ++#: ../web/statuspage.c:408 ++msgid "Group" ++msgstr "グループ" ++ ++#: ../web/statuspage.c:414 ++msgid "Open Files" ++msgstr "使用中のファイル" ++ ++#: ../web/statuspage.c:416 ++msgid "Sharing" ++msgstr "排他モード" ++ ++#: ../web/statuspage.c:416 ++msgid "R/W" ++msgstr "参照/更新" ++ ++#: ../web/statuspage.c:416 ++msgid "Oplock" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "File" ++msgstr "ファイル名" ++ ++#: ../web/statuspage.c:425 ++msgid "Show Client in col 1" ++msgstr "クライアント名を先頭に表示" ++ ++#: ../web/statuspage.c:426 ++msgid "Show PID in col 1" ++msgstr "PIDを先頭に表示" ++ ++#: ../param/loadparm.c:755 ++msgid "Base Options" ++msgstr "基本 オプション" ++ ++#: ../param/loadparm.c:775 ++msgid "Security Options" ++msgstr "セキュリティ オプション" ++ ++#: ../param/loadparm.c:859 ++msgid "Logging Options" ++msgstr "ロギング オプション" ++ ++#: ../param/loadparm.c:874 ++msgid "Protocol Options" ++msgstr "プロトコル オプション" ++ ++#: ../param/loadparm.c:911 ++msgid "Tuning Options" ++msgstr "チューニング オプション" ++ ++#: ../param/loadparm.c:940 ++msgid "Printing Options" ++msgstr "印刷 オプション" ++ ++#: ../param/loadparm.c:970 ++msgid "Filename Handling" ++msgstr "ファイル名の取扱" ++ ++#: ../param/loadparm.c:996 ++msgid "Domain Options" ++msgstr "ドメイン オプション" ++ ++#: ../param/loadparm.c:1000 ++msgid "Logon Options" ++msgstr "ログオン オプション" ++ ++#: ../param/loadparm.c:1019 ++msgid "Browse Options" ++msgstr "ブラウジング オプション" ++ ++#: ../param/loadparm.c:1033 ++msgid "WINS Options" ++msgstr "WINS オプション" ++ ++#: ../param/loadparm.c:1043 ++msgid "Locking Options" ++msgstr "ロッキング オプション" ++ ++#: ../param/loadparm.c:1061 ++msgid "Ldap Options" ++msgstr "LDAP オプション" ++ ++#: ../param/loadparm.c:1078 ++msgid "Miscellaneous Options" ++msgstr "その他のオプション" ++ ++#: ../param/loadparm.c:1138 ++msgid "VFS module options" ++msgstr "VFS オプション" ++ ++#: ../param/loadparm.c:1148 ++msgid "Winbind options" ++msgstr "Winbind オプション" +diff --git a/source3/po/nl.msg b/source3/po/nl.msg +new file mode 100644 +index 0000000..c0aae12 +--- /dev/null ++++ b/source3/po/nl.msg +@@ -0,0 +1,592 @@ ++# Dutch messages for international release of SWAT. ++# Copyright (C) 2003 Jelmer Vernooij <jelmer@samba.org> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: i18n_swat \n" ++"POT-Creation-Date: 2003-10-06 05:30+0900\n" ++"PO-Revision-Date: 2000-02-08 12:48+09:00\n" ++"Last-Translator: Jelmer Vernooij <jelmer@samba.org>\n" ++"Language-Team: (Samba Team) <samba-technical@samba.org>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: \n" ++ ++#: ../web/swat.c:117 ++#, c-format ++msgid "ERROR: Can't open %s" ++msgstr "FOUT: Kan %s niet openen" ++ ++#: ../web/swat.c:200 ++msgid "Help" ++msgstr "Help" ++ ++#: ../web/swat.c:206 ../web/swat.c:220 ../web/swat.c:235 ../web/swat.c:243 ../web/swat.c:252 ../web/swat.c:261 ../web/swat.c:267 ../web/swat.c:273 ../web/swat.c:286 ++msgid "Set Default" ++msgstr "Stel Standaard In" ++ ++#: ../web/swat.c:408 ++#, c-format ++msgid "failed to open %s for writing" ++msgstr "kon %s niet openen voor schrijven" ++ ++#: ../web/swat.c:431 ++#, c-format ++msgid "Can't reload %s" ++msgstr "Kan %s niet herladen" ++ ++#: ../web/swat.c:501 ++#, c-format ++msgid "Logged in as <b>%s</b>" ++msgstr "Ingelogd als <b>%s</b>" ++ ++#: ../web/swat.c:505 ++msgid "Home" ++msgstr "Home" ++ ++#: ../web/swat.c:507 ++msgid "Globals" ++msgstr "Algemene Instellingen" ++ ++#: ../web/swat.c:508 ++msgid "Shares" ++msgstr "Gedeelde Bronnen" ++ ++#: ../web/swat.c:509 ++msgid "Printers" ++msgstr "Printers" ++ ++#: ../web/swat.c:510 ++msgid "Wizard" ++msgstr "Wizard" ++ ++#: ../web/swat.c:513 ++msgid "Status" ++msgstr "Status" ++ ++#: ../web/swat.c:514 ++msgid "View Config" ++msgstr "Bekijk Configuratie" ++ ++#: ../web/swat.c:516 ++msgid "Password Management" ++msgstr "Wachtwoord Beheer" ++ ++#: ../web/swat.c:526 ++msgid "Current View Is" ++msgstr "Huidige weergave is" ++ ++#: ../web/swat.c:527 ../web/swat.c:530 ++msgid "Basic" ++msgstr "Basis" ++ ++#: ../web/swat.c:528 ../web/swat.c:531 ++msgid "Advanced" ++msgstr "Geadvanceerd" ++ ++#: ../web/swat.c:529 ++msgid "Change View To" ++msgstr "Verander Weergave In" ++ ++#: ../web/swat.c:554 ++msgid "Current Config" ++msgstr "Huidige Configuratie" ++ ++#: ../web/swat.c:558 ++msgid "Normal View" ++msgstr "Normale Weergave" ++ ++#: ../web/swat.c:560 ++msgid "Full View" ++msgstr "Volledige Weergave" ++ ++#. Here we first set and commit all the parameters that were selected ++#. in the previous screen. ++#: ../web/swat.c:579 ++msgid "Wizard Parameter Edit Page" ++msgstr "Wizard Instellingen Veranderen Pagina" ++ ++#: ../web/swat.c:608 ++msgid "Note: smb.conf file has been read and rewritten" ++msgstr "N.B.: het smb.conf bestand is gelezen en herschreven" ++ ++#. Here we go ... ++#: ../web/swat.c:716 ++msgid "Samba Configuration Wizard" ++msgstr "Samba Configuratie Wizard" ++ ++#: ../web/swat.c:720 ++msgid "The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments." ++msgstr "De \"Herschrijf smb.conf bestand\" knop zal alle standaardwaardes en alle commentaar verwijderen." ++ ++#: ../web/swat.c:721 ++msgid "The same will happen if you press the commit button." ++msgstr "Hetzelfde zal gebeuren als u de \"toepassen\" knop gebruikt." ++ ++#: ../web/swat.c:724 ++msgid "Rewrite smb.conf file" ++msgstr "Herschrijf smb.conf bestand" ++ ++#: ../web/swat.c:725 ++msgid "Commit" ++msgstr "Toepassen" ++ ++#: ../web/swat.c:726 ++msgid "Edit Parameter Values" ++msgstr "Bewerk Configuratie Waardes" ++ ++#: ../web/swat.c:732 ++msgid "Server Type" ++msgstr "Server Type" ++ ++#: ../web/swat.c:733 ++msgid "Stand Alone" ++msgstr "Stand Alone" ++ ++#: ../web/swat.c:734 ++msgid "Domain Member" ++msgstr "Domein Lid" ++ ++#: ../web/swat.c:735 ++msgid "Domain Controller" ++msgstr "Domein Controller" ++ ++#: ../web/swat.c:738 ++msgid "Unusual Type in smb.conf - Please Select New Mode" ++msgstr "Ongebruikelijk Type in smb.conf - Selecteer een nieuwe modus" ++ ++#: ../web/swat.c:740 ++msgid "Configure WINS As" ++msgstr "Configureer WINS Als" ++ ++#: ../web/swat.c:741 ++msgid "Not Used" ++msgstr "Niet gebruikt" ++ ++#: ../web/swat.c:742 ++msgid "Server for client use" ++msgstr "Server voor client gebruik" ++ ++#: ../web/swat.c:743 ++msgid "Client of another WINS server" ++msgstr "Client van een andere WINS server" ++ ++#: ../web/swat.c:745 ++msgid "Remote WINS Server" ++msgstr "Naam of IP-adres WINS Server" ++ ++#: ../web/swat.c:756 ++msgid "Error: WINS Server Mode and WINS Support both set in smb.conf" ++msgstr "Fout: WINS Server Modus en WINS Ondersteuning beiden ingesteld in smb.conf" ++ ++#: ../web/swat.c:757 ++msgid "Please Select desired WINS mode above." ++msgstr "Selecteer hierboven de gewenste WINS modus." ++ ++#: ../web/swat.c:759 ++msgid "Expose Home Directories" ++msgstr "Stel Home Directories Open" ++ ++#: ../web/swat.c:774 ++msgid "The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment." ++msgstr "The configuratie hierboven zal meerdere variabelen veranderen en zal over het algemeen zorgen voor snelle installatie van Samba." ++ ++#: ../web/swat.c:787 ++msgid "Global Parameters" ++msgstr "Algemene Instellingen" ++ ++#: ../web/swat.c:815 ../web/swat.c:916 ../web/swat.c:1265 ++msgid "Commit Changes" ++msgstr "Pas Veranderingen Toe" ++ ++#: ../web/swat.c:819 ../web/swat.c:919 ../web/swat.c:1267 ++msgid "Reset Values" ++msgstr "Beginwaarden" ++ ++#: ../web/swat.c:844 ++msgid "Share Parameters" ++msgstr "Instellingen Gedeelde Bronnen" ++ ++#: ../web/swat.c:887 ++msgid "Choose Share" ++msgstr "Kies Bron" ++ ++#: ../web/swat.c:901 ++msgid "Delete Share" ++msgstr "Verwijder Bron" ++ ++#: ../web/swat.c:908 ++msgid "Create Share" ++msgstr "Maak Bron" ++ ++#: ../web/swat.c:944 ++msgid "password change in demo mode rejected" ++msgstr "wachtwoord veranderen in demo modus geweigerd" ++ ++#: ../web/swat.c:957 ++msgid "Can't setup password database vectors." ++msgstr "Kan wachtwoord database vectors niet opzetten." ++ ++#: ../web/swat.c:983 ++msgid " Must specify \"User Name\" " ++msgstr " \"Gebruikersnaam\" moet opgegeven worden " ++ ++#: ../web/swat.c:999 ++msgid " Must specify \"Old Password\" " ++msgstr " \"Oude wachtwoord\" moet opgegeven worden " ++ ++#: ../web/swat.c:1005 ++msgid " Must specify \"Remote Machine\" " ++msgstr " \"Server Naam of IP\" moet opgegeven worden " ++ ++#: ../web/swat.c:1012 ++msgid " Must specify \"New, and Re-typed Passwords\" " ++msgstr " \"Nieuw, en bevestiging Wachtwoorden\" moeten opgegeven worden " ++ ++#: ../web/swat.c:1018 ++msgid " Re-typed password didn't match new password " ++msgstr " Bevestigingswachtwoord was anders dan nieuwe wachtwoord " ++ ++#: ../web/swat.c:1048 ++#, c-format ++msgid " The passwd for '%s' has been changed." ++msgstr " Het wachtwoord voor '%s' is veranderd." ++ ++#: ../web/swat.c:1051 ++#, c-format ++msgid " The passwd for '%s' has NOT been changed." ++msgstr " Het wachtwoord voor '%s' is niet veranderd." ++ ++#: ../web/swat.c:1076 ++msgid "Server Password Management" ++msgstr "Server Wachtwoord Beheer" ++ ++#. ++#. * Create all the dialog boxes for data collection ++#. ++#: ../web/swat.c:1085 ../web/swat.c:1132 ++msgid "User Name" ++msgstr "Gebuikersnaam" ++ ++#: ../web/swat.c:1088 ../web/swat.c:1134 ++msgid "Old Password" ++msgstr "Oud Wachtwoord" ++ ++#: ../web/swat.c:1091 ../web/swat.c:1136 ++msgid "New Password" ++msgstr "Nieuw Wachtwoord" ++ ++#: ../web/swat.c:1093 ../web/swat.c:1138 ++msgid "Re-type New Password" ++msgstr "Bevestiging Nieuw Wachtwoord" ++ ++#: ../web/swat.c:1101 ../web/swat.c:1149 ++msgid "Change Password" ++msgstr "Verander Wachtwoord" ++ ++#: ../web/swat.c:1104 ++msgid "Add New User" ++msgstr "Voeg Gebruiker Toe" ++ ++#: ../web/swat.c:1106 ++msgid "Delete User" ++msgstr "Verwijder Gebruiker" ++ ++#: ../web/swat.c:1108 ++msgid "Disable User" ++msgstr "Maak gebruiker inactief" ++ ++#: ../web/swat.c:1110 ++msgid "Enable User" ++msgstr "Maak gebruiker actief" ++ ++#: ../web/swat.c:1123 ++msgid "Client/Server Password Management" ++msgstr "Client/Server Wachtwoord Beheer" ++ ++#: ../web/swat.c:1140 ++msgid "Remote Machine" ++msgstr "Naam of IP Server" ++ ++#: ../web/swat.c:1179 ++msgid "Printer Parameters" ++msgstr "Printer Instellingen" ++ ++#: ../web/swat.c:1181 ++msgid "Important Note:" ++msgstr "Belangrijk:" ++ ++#: ../web/swat.c:1182 ++msgid "Printer names marked with [*] in the Choose Printer drop-down box " ++msgstr "Printer namen gemarkeerd met [*] in het Kies Printer veld " ++ ++#: ../web/swat.c:1183 ++msgid "are autoloaded printers from " ++msgstr "zijn automatisch geladen uit " ++ ++#: ../web/swat.c:1184 ++msgid "Printcap Name" ++msgstr "Printcap Naam" ++ ++#: ../web/swat.c:1185 ++msgid "Attempting to delete these printers from SWAT will have no effect." ++msgstr "Proberen deze printers te verwijderen vanuit SWAT zal geen effect hebben." ++ ++#: ../web/swat.c:1231 ++msgid "Choose Printer" ++msgstr "Kies Printer" ++ ++#: ../web/swat.c:1250 ++msgid "Delete Printer" ++msgstr "Verwijder Printer" ++ ++#: ../web/swat.c:1257 ++msgid "Create Printer" ++msgstr "Maak Printer" ++ ++#: ../web/statuspage.c:123 ++msgid "RDONLY " ++msgstr "RDONLY" ++ ++#: ../web/statuspage.c:124 ++msgid "WRONLY " ++msgstr "WRONLY" ++ ++#: ../web/statuspage.c:125 ++msgid "RDWR " ++msgstr "RDWR" ++ ++#: ../web/statuspage.c:309 ++msgid "Server Status" ++msgstr "Server Status" ++ ++#: ../web/statuspage.c:314 ++msgid "Auto Refresh" ++msgstr "Automatisch Verversen" ++ ++#: ../web/statuspage.c:315 ../web/statuspage.c:320 ++msgid "Refresh Interval: " ++msgstr "Ververs Interval:" ++ ++#: ../web/statuspage.c:319 ++msgid "Stop Refreshing" ++msgstr "Stop met Verversen" ++ ++#: ../web/statuspage.c:334 ++msgid "version:" ++msgstr "versie:" ++ ++#: ../web/statuspage.c:337 ++msgid "smbd:" ++msgstr "smbd:" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "running" ++msgstr "draaiend" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "not running" ++msgstr "niet draaiend" ++ ++#: ../web/statuspage.c:341 ++msgid "Stop smbd" ++msgstr "Stop smbd" ++ ++#: ../web/statuspage.c:343 ++msgid "Start smbd" ++msgstr "Start smbd" ++ ++#: ../web/statuspage.c:345 ++msgid "Restart smbd" ++msgstr "Herstart smbd" ++ ++#: ../web/statuspage.c:350 ++msgid "nmbd:" ++msgstr "nmbd:" ++ ++#: ../web/statuspage.c:354 ++msgid "Stop nmbd" ++msgstr "Stop nmbd" ++ ++#: ../web/statuspage.c:356 ++msgid "Start nmbd" ++msgstr "Start nmbd" ++ ++#: ../web/statuspage.c:358 ++msgid "Restart nmbd" ++msgstr "Herstart nmbd" ++ ++#: ../web/statuspage.c:364 ++msgid "winbindd:" ++msgstr "winbindd:" ++ ++#: ../web/statuspage.c:368 ++msgid "Stop winbindd" ++msgstr "Stop winbindd" ++ ++#: ../web/statuspage.c:370 ++msgid "Start winbindd" ++msgstr "Start winbindd" ++ ++#: ../web/statuspage.c:372 ++msgid "Restart winbindd" ++msgstr "Herstart winbindd" ++ ++#. stop, restart all ++#: ../web/statuspage.c:381 ++msgid "Stop All" ++msgstr "Stop Alles" ++ ++#: ../web/statuspage.c:382 ++msgid "Restart All" ++msgstr "Herstart Alles" ++ ++#. start all ++#: ../web/statuspage.c:386 ++msgid "Start All" ++msgstr "Start Alles" ++ ++#: ../web/statuspage.c:393 ++msgid "Active Connections" ++msgstr "Actieve Verbindingen" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "PID" ++msgstr "PID" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ++msgid "Client" ++msgstr "Client" ++ ++#: ../web/statuspage.c:395 ++msgid "IP address" ++msgstr "IP adres" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "Date" ++msgstr "Datum" ++ ++#: ../web/statuspage.c:397 ++msgid "Kill" ++msgstr "Kill" ++ ++#: ../web/statuspage.c:405 ++msgid "Active Shares" ++msgstr "Actieve Bronnen" ++ ++#: ../web/statuspage.c:408 ++msgid "Share" ++msgstr "Bron" ++ ++#: ../web/statuspage.c:408 ++msgid "User" ++msgstr "Gebruiker" ++ ++#: ../web/statuspage.c:408 ++msgid "Group" ++msgstr "Groep" ++ ++#: ../web/statuspage.c:414 ++msgid "Open Files" ++msgstr "Geopende Bestanden" ++ ++#: ../web/statuspage.c:416 ++msgid "Sharing" ++msgstr "Gedeeld" ++ ++#: ../web/statuspage.c:416 ++msgid "R/W" ++msgstr "Lees/Schrijf" ++ ++#: ../web/statuspage.c:416 ++msgid "Oplock" ++msgstr "Oplock" ++ ++#: ../web/statuspage.c:416 ++msgid "File" ++msgstr "Bestand" ++ ++#: ../web/statuspage.c:425 ++msgid "Show Client in col 1" ++msgstr "Toon Client in kolom 1" ++ ++#: ../web/statuspage.c:426 ++msgid "Show PID in col 1" ++msgstr "Toon PID in kolom 1" ++ ++#: ../param/loadparm.c:755 ++msgid "Base Options" ++msgstr "Basis Opties" ++ ++#: ../param/loadparm.c:775 ++msgid "Security Options" ++msgstr "Veiligheidsopties" ++ ++#: ../param/loadparm.c:859 ++msgid "Logging Options" ++msgstr "Log Opties" ++ ++#: ../param/loadparm.c:874 ++msgid "Protocol Options" ++msgstr "Protocol Opties" ++ ++#: ../param/loadparm.c:911 ++msgid "Tuning Options" ++msgstr "Fijntune Opties" ++ ++#: ../param/loadparm.c:940 ++msgid "Printing Options" ++msgstr "Printer Opties" ++ ++#: ../param/loadparm.c:970 ++msgid "Filename Handling" ++msgstr "Bestandsnaam Afhandeling" ++ ++#: ../param/loadparm.c:996 ++msgid "Domain Options" ++msgstr "Domein Opties" ++ ++#: ../param/loadparm.c:1000 ++msgid "Logon Options" ++msgstr "Logon Opties" ++ ++#: ../param/loadparm.c:1019 ++msgid "Browse Options" ++msgstr "Verken Opties" ++ ++#: ../param/loadparm.c:1033 ++msgid "WINS Options" ++msgstr "WINS Opties" ++ ++#: ../param/loadparm.c:1043 ++msgid "Locking Options" ++msgstr "Locking Opties" ++ ++#: ../param/loadparm.c:1061 ++msgid "Ldap Options" ++msgstr "LDAP Opties" ++ ++#: ../param/loadparm.c:1078 ++msgid "Miscellaneous Options" ++msgstr "Verscheidene Opties" ++ ++#: ../param/loadparm.c:1138 ++msgid "VFS module options" ++msgstr "VFS module opties" ++ ++#: ../param/loadparm.c:1148 ++msgid "Winbind options" ++msgstr "Winbind opties" +diff --git a/source3/po/pl.msg b/source3/po/pl.msg +new file mode 100644 +index 0000000..aca5de6 +--- /dev/null ++++ b/source3/po/pl.msg +@@ -0,0 +1,592 @@ ++# Polish messages for international release of SWAT. ++# Copyright (C) 2001 Rafal Szczesniak <mimir@spin.ict.pwr.wroc.pl> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: i18n_swat \n" ++"POT-Creation-Date: 2003-10-06 05:30+0900\n" ++"PO-Revision-Date: 2001-08-15 22:45+02:00\n" ++"Last-Translator: Rafal Szczesniak <mimir@spin.ict.pwr.wroc.pl>\n" ++"Language-Team: pl\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: \n" ++ ++#: ../web/swat.c:117 ++#, c-format ++msgid "ERROR: Can't open %s" ++msgstr "" ++ ++#: ../web/swat.c:200 ++msgid "Help" ++msgstr "Pomoc" ++ ++#: ../web/swat.c:206 ../web/swat.c:220 ../web/swat.c:235 ../web/swat.c:243 ../web/swat.c:252 ../web/swat.c:261 ../web/swat.c:267 ../web/swat.c:273 ../web/swat.c:286 ++msgid "Set Default" ++msgstr "Ustaw domyślnie" ++ ++#: ../web/swat.c:408 ++#, c-format ++msgid "failed to open %s for writing" ++msgstr "" ++ ++#: ../web/swat.c:431 ++#, c-format ++msgid "Can't reload %s" ++msgstr "" ++ ++#: ../web/swat.c:501 ++#, c-format ++msgid "Logged in as <b>%s</b>" ++msgstr "Zalogowany jako <b>%s</b><p>\n" ++ ++#: ../web/swat.c:505 ++msgid "Home" ++msgstr "Strona domowa" ++ ++#: ../web/swat.c:507 ++msgid "Globals" ++msgstr "Ustawienia globalne" ++ ++#: ../web/swat.c:508 ++msgid "Shares" ++msgstr "Współudziały" ++ ++#: ../web/swat.c:509 ++msgid "Printers" ++msgstr "Drukarki" ++ ++#: ../web/swat.c:510 ++msgid "Wizard" ++msgstr "" ++ ++#: ../web/swat.c:513 ++msgid "Status" ++msgstr "Status" ++ ++#: ../web/swat.c:514 ++msgid "View Config" ++msgstr "Przejrzyj Konfigurację" ++ ++#: ../web/swat.c:516 ++msgid "Password Management" ++msgstr "Zarządzanie Hasłami" ++ ++#: ../web/swat.c:526 ++msgid "Current View Is" ++msgstr "Bieżąca Konfiguracja" ++ ++#: ../web/swat.c:527 ../web/swat.c:530 ++msgid "Basic" ++msgstr "Widok Podstawowy" ++ ++#: ../web/swat.c:528 ../web/swat.c:531 ++msgid "Advanced" ++msgstr "Widok Zaawansowany" ++ ++#: ../web/swat.c:529 ++msgid "Change View To" ++msgstr "Zmień Hasło" ++ ++#: ../web/swat.c:554 ++msgid "Current Config" ++msgstr "Bieżąca Konfiguracja" ++ ++#: ../web/swat.c:558 ++msgid "Normal View" ++msgstr "Normalny Widok" ++ ++#: ../web/swat.c:560 ++msgid "Full View" ++msgstr "Pełny Widok" ++ ++#. Here we first set and commit all the parameters that were selected ++#. in the previous screen. ++#: ../web/swat.c:579 ++msgid "Wizard Parameter Edit Page" ++msgstr "" ++ ++#: ../web/swat.c:608 ++msgid "Note: smb.conf file has been read and rewritten" ++msgstr "" ++ ++#. Here we go ... ++#: ../web/swat.c:716 ++msgid "Samba Configuration Wizard" ++msgstr "" ++ ++#: ../web/swat.c:720 ++msgid "The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments." ++msgstr "" ++ ++#: ../web/swat.c:721 ++msgid "The same will happen if you press the commit button." ++msgstr "" ++ ++#: ../web/swat.c:724 ++msgid "Rewrite smb.conf file" ++msgstr "" ++ ++#: ../web/swat.c:725 ++msgid "Commit" ++msgstr "Potwierdź Zmiany" ++ ++#: ../web/swat.c:726 ++msgid "Edit Parameter Values" ++msgstr "Parametry Drukarki" ++ ++#: ../web/swat.c:732 ++msgid "Server Type" ++msgstr "" ++ ++#: ../web/swat.c:733 ++msgid "Stand Alone" ++msgstr "Uruchom nmbd" ++ ++#: ../web/swat.c:734 ++msgid "Domain Member" ++msgstr "" ++ ++#: ../web/swat.c:735 ++msgid "Domain Controller" ++msgstr "" ++ ++#: ../web/swat.c:738 ++msgid "Unusual Type in smb.conf - Please Select New Mode" ++msgstr "" ++ ++#: ../web/swat.c:740 ++msgid "Configure WINS As" ++msgstr "" ++ ++#: ../web/swat.c:741 ++msgid "Not Used" ++msgstr "" ++ ++#: ../web/swat.c:742 ++msgid "Server for client use" ++msgstr "" ++ ++#: ../web/swat.c:743 ++msgid "Client of another WINS server" ++msgstr "" ++ ++#: ../web/swat.c:745 ++msgid "Remote WINS Server" ++msgstr "" ++ ++#: ../web/swat.c:756 ++msgid "Error: WINS Server Mode and WINS Support both set in smb.conf" ++msgstr "" ++ ++#: ../web/swat.c:757 ++msgid "Please Select desired WINS mode above." ++msgstr "" ++ ++#: ../web/swat.c:759 ++msgid "Expose Home Directories" ++msgstr "" ++ ++#: ../web/swat.c:774 ++msgid "The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment." ++msgstr "" ++ ++#: ../web/swat.c:787 ++msgid "Global Parameters" ++msgstr "Zmienne Globalne" ++ ++#: ../web/swat.c:815 ../web/swat.c:916 ../web/swat.c:1265 ++msgid "Commit Changes" ++msgstr "Potwierdź Zmiany" ++ ++#: ../web/swat.c:819 ../web/swat.c:919 ../web/swat.c:1267 ++msgid "Reset Values" ++msgstr "Zresetuj Wartości" ++ ++#: ../web/swat.c:844 ++msgid "Share Parameters" ++msgstr "Parametry Współudziału" ++ ++#: ../web/swat.c:887 ++msgid "Choose Share" ++msgstr "Wybierz Współudział" ++ ++#: ../web/swat.c:901 ++msgid "Delete Share" ++msgstr "Usuń Współudział" ++ ++#: ../web/swat.c:908 ++msgid "Create Share" ++msgstr "Utwórz Współudział" ++ ++#: ../web/swat.c:944 ++msgid "password change in demo mode rejected" ++msgstr "zmiana hasła w trybie demo odrzucona\n" ++ ++#: ../web/swat.c:957 ++msgid "Can't setup password database vectors." ++msgstr "" ++ ++#: ../web/swat.c:983 ++msgid " Must specify \"User Name\" " ++msgstr " Musisz podać \"Nazwę Użytkownika\" \n" ++ ++#: ../web/swat.c:999 ++msgid " Must specify \"Old Password\" " ++msgstr " Musisz podać \"Stare Hasło\" \n" ++ ++#: ../web/swat.c:1005 ++msgid " Must specify \"Remote Machine\" " ++msgstr " Musisz podać \"Zdalną Maszynę\" \n" ++ ++#: ../web/swat.c:1012 ++msgid " Must specify \"New, and Re-typed Passwords\" " ++msgstr " Musisz podać \"Nowe Hasło, i ponownie wpisane Nowe Hasło\" \n" ++ ++#: ../web/swat.c:1018 ++msgid " Re-typed password didn't match new password " ++msgstr " Ponownie wpisane hasło nie pasuje do nowego hasła\n" ++ ++#: ../web/swat.c:1048 ++#, c-format ++msgid " The passwd for '%s' has been changed." ++msgstr " Hasło dla '%s' zostało zmienione. \n" ++ ++#: ../web/swat.c:1051 ++#, c-format ++msgid " The passwd for '%s' has NOT been changed." ++msgstr " Hasło dla '%s' NIE zostało zmienione. \n" ++ ++#: ../web/swat.c:1076 ++msgid "Server Password Management" ++msgstr "Zarządzanie Hasłami na Serwerze" ++ ++#. ++#. * Create all the dialog boxes for data collection ++#. ++#: ../web/swat.c:1085 ../web/swat.c:1132 ++msgid "User Name" ++msgstr " Nazwa Użytkownika" ++ ++#: ../web/swat.c:1088 ../web/swat.c:1134 ++msgid "Old Password" ++msgstr " Stare Hasło" ++ ++#: ../web/swat.c:1091 ../web/swat.c:1136 ++msgid "New Password" ++msgstr " Nowe Hasło" ++ ++#: ../web/swat.c:1093 ../web/swat.c:1138 ++msgid "Re-type New Password" ++msgstr " Ponownie wpisz Nowe Hasło" ++ ++#: ../web/swat.c:1101 ../web/swat.c:1149 ++msgid "Change Password" ++msgstr "Zmień Hasło" ++ ++#: ../web/swat.c:1104 ++msgid "Add New User" ++msgstr "Dodaj Nowego Użytkownika" ++ ++#: ../web/swat.c:1106 ++msgid "Delete User" ++msgstr "Usuń Użytkownika" ++ ++#: ../web/swat.c:1108 ++msgid "Disable User" ++msgstr "Zablokuj Użytkownika" ++ ++#: ../web/swat.c:1110 ++msgid "Enable User" ++msgstr "Odblokuj Użytkownika" ++ ++#: ../web/swat.c:1123 ++msgid "Client/Server Password Management" ++msgstr "Zarządzanie Hasłami Klient/Serwer" ++ ++#: ../web/swat.c:1140 ++msgid "Remote Machine" ++msgstr " Zdalna Maszyna" ++ ++#: ../web/swat.c:1179 ++msgid "Printer Parameters" ++msgstr "Parametry Drukarki" ++ ++#: ../web/swat.c:1181 ++msgid "Important Note:" ++msgstr "Ważna Informacja:" ++ ++#: ../web/swat.c:1182 ++msgid "Printer names marked with [*] in the Choose Printer drop-down box " ++msgstr "Nazwy Drukarek zaznaczone [*] w rozwijanym polu Wybierz Drukarkę " ++ ++#: ../web/swat.c:1183 ++msgid "are autoloaded printers from " ++msgstr "są drukarkami automatycznie ładowanymi z " ++ ++#: ../web/swat.c:1184 ++msgid "Printcap Name" ++msgstr "Nazwa Printcap" ++ ++#: ../web/swat.c:1185 ++msgid "Attempting to delete these printers from SWAT will have no effect." ++msgstr "Próby usunięcia tych drukarek ze SWAT nie przyniosą efektu.\n" ++ ++#: ../web/swat.c:1231 ++msgid "Choose Printer" ++msgstr "Wybierz Drukarkę" ++ ++#: ../web/swat.c:1250 ++msgid "Delete Printer" ++msgstr "Usuń Drukarkę" ++ ++#: ../web/swat.c:1257 ++msgid "Create Printer" ++msgstr "Utwórz Drukarkę" ++ ++#: ../web/statuspage.c:123 ++msgid "RDONLY " ++msgstr "" ++ ++#: ../web/statuspage.c:124 ++msgid "WRONLY " ++msgstr "" ++ ++#: ../web/statuspage.c:125 ++msgid "RDWR " ++msgstr "" ++ ++#: ../web/statuspage.c:309 ++msgid "Server Status" ++msgstr "Status Serwera" ++ ++#: ../web/statuspage.c:314 ++msgid "Auto Refresh" ++msgstr "Automatyczne Odświeżanie" ++ ++#: ../web/statuspage.c:315 ../web/statuspage.c:320 ++msgid "Refresh Interval: " ++msgstr "Interwał Odświeżania: " ++ ++#: ../web/statuspage.c:319 ++msgid "Stop Refreshing" ++msgstr "Zatrzymaj Odświeżanie" ++ ++#: ../web/statuspage.c:334 ++msgid "version:" ++msgstr "wersja:" ++ ++#: ../web/statuspage.c:337 ++msgid "smbd:" ++msgstr "" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "running" ++msgstr "działa" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "not running" ++msgstr "nie działa" ++ ++#: ../web/statuspage.c:341 ++msgid "Stop smbd" ++msgstr "Zatrzymaj smbd" ++ ++#: ../web/statuspage.c:343 ++msgid "Start smbd" ++msgstr "Uruchom smbd" ++ ++#: ../web/statuspage.c:345 ++msgid "Restart smbd" ++msgstr "Zrestartuj smbd" ++ ++#: ../web/statuspage.c:350 ++msgid "nmbd:" ++msgstr "" ++ ++#: ../web/statuspage.c:354 ++msgid "Stop nmbd" ++msgstr "Zatrzymaj nmbd" ++ ++#: ../web/statuspage.c:356 ++msgid "Start nmbd" ++msgstr "Uruchom nmbd" ++ ++#: ../web/statuspage.c:358 ++msgid "Restart nmbd" ++msgstr "Zrestartuj nmbd" ++ ++#: ../web/statuspage.c:364 ++msgid "winbindd:" ++msgstr "" ++ ++#: ../web/statuspage.c:368 ++msgid "Stop winbindd" ++msgstr "Zatrzymaj nmbd" ++ ++#: ../web/statuspage.c:370 ++msgid "Start winbindd" ++msgstr "Uruchom nmbd" ++ ++#: ../web/statuspage.c:372 ++msgid "Restart winbindd" ++msgstr "Zrestartuj nmbd" ++ ++#. stop, restart all ++#: ../web/statuspage.c:381 ++msgid "Stop All" ++msgstr "" ++ ++#: ../web/statuspage.c:382 ++msgid "Restart All" ++msgstr "Zrestartuj nmbd" ++ ++#. start all ++#: ../web/statuspage.c:386 ++msgid "Start All" ++msgstr "Uruchom nmbd" ++ ++#: ../web/statuspage.c:393 ++msgid "Active Connections" ++msgstr "Aktywne Połączenia" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "PID" ++msgstr "" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ++msgid "Client" ++msgstr "Klient" ++ ++#: ../web/statuspage.c:395 ++msgid "IP address" ++msgstr "adres IP" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "Date" ++msgstr "Data" ++ ++#: ../web/statuspage.c:397 ++msgid "Kill" ++msgstr "Zatrzymaj" ++ ++#: ../web/statuspage.c:405 ++msgid "Active Shares" ++msgstr "Aktywne Współudziały" ++ ++#: ../web/statuspage.c:408 ++msgid "Share" ++msgstr "Współudział" ++ ++#: ../web/statuspage.c:408 ++msgid "User" ++msgstr "Użytkownik" ++ ++#: ../web/statuspage.c:408 ++msgid "Group" ++msgstr "Grupa" ++ ++#: ../web/statuspage.c:414 ++msgid "Open Files" ++msgstr "Otwarte Pliki" ++ ++#: ../web/statuspage.c:416 ++msgid "Sharing" ++msgstr "Współdzielenie" ++ ++#: ../web/statuspage.c:416 ++msgid "R/W" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "Oplock" ++msgstr "" ++ ++#: ../web/statuspage.c:416 ++msgid "File" ++msgstr "Plik" ++ ++#: ../web/statuspage.c:425 ++msgid "Show Client in col 1" ++msgstr "" ++ ++#: ../web/statuspage.c:426 ++msgid "Show PID in col 1" ++msgstr "" ++ ++#: ../param/loadparm.c:755 ++msgid "Base Options" ++msgstr "Bazowe Opcje" ++ ++#: ../param/loadparm.c:775 ++msgid "Security Options" ++msgstr "Opcje Zabezpieczeń" ++ ++#: ../param/loadparm.c:859 ++msgid "Logging Options" ++msgstr "Opcje Blokowania" ++ ++#: ../param/loadparm.c:874 ++msgid "Protocol Options" ++msgstr "Opcje Protokołu" ++ ++#: ../param/loadparm.c:911 ++msgid "Tuning Options" ++msgstr "Opcje Dostrajające" ++ ++#: ../param/loadparm.c:940 ++msgid "Printing Options" ++msgstr "Opcje Drukowania" ++ ++#: ../param/loadparm.c:970 ++msgid "Filename Handling" ++msgstr "Obsługa Nazw Plików" ++ ++#: ../param/loadparm.c:996 ++msgid "Domain Options" ++msgstr "Opcje Domeny" ++ ++#: ../param/loadparm.c:1000 ++msgid "Logon Options" ++msgstr "Opcje Logowania" ++ ++#: ../param/loadparm.c:1019 ++msgid "Browse Options" ++msgstr "Opcje Przeglądania" ++ ++#: ../param/loadparm.c:1033 ++msgid "WINS Options" ++msgstr "Opcje WINS" ++ ++#: ../param/loadparm.c:1043 ++msgid "Locking Options" ++msgstr "Opcje Blokowania" ++ ++#: ../param/loadparm.c:1061 ++msgid "Ldap Options" ++msgstr "Opcje Ldap" ++ ++#: ../param/loadparm.c:1078 ++msgid "Miscellaneous Options" ++msgstr "Pozostałe Opcje" ++ ++#: ../param/loadparm.c:1138 ++msgid "VFS module options" ++msgstr "Opcje WINS" ++ ++#: ../param/loadparm.c:1148 ++msgid "Winbind options" ++msgstr "Opcje Drukowania" +diff --git a/source3/po/ru.msg b/source3/po/ru.msg +new file mode 100644 +index 0000000..d859406 +--- /dev/null ++++ b/source3/po/ru.msg +@@ -0,0 +1,606 @@ ++# Russian messages for international release of SWAT. ++# Copyright (C) 2007 Yuri Kozlov <kozlov.y@gmail.com> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: swat\n" ++"Report-Msgid-Bugs-To: \n" ++"POT-Creation-Date: 2007-06-04 18:15+0200\n" ++"PO-Revision-Date: 2007-06-27 22:00+0400\n" ++"Last-Translator: Yuri Kozlov <kozlov.y@gmail.com>\n" ++"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"X-Generator: KBabel 1.11.4\n" ++"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" ++ ++#: ../web/swat.c:139 ++#, c-format ++msgid "ERROR: Can't open %s" ++msgstr "ОШИБКА: Не удалось открыть %s" ++ ++#: ../web/swat.c:223 ++msgid "Help" ++msgstr "Справка" ++ ++#: ../web/swat.c:229 ../web/swat.c:254 ../web/swat.c:275 ../web/swat.c:285 ../web/swat.c:294 ../web/swat.c:303 ../web/swat.c:309 ../web/swat.c:315 ../web/swat.c:328 ++msgid "Set Default" ++msgstr "Установить по умолчанию" ++ ++#: ../web/swat.c:450 ++#, c-format ++msgid "failed to open %s for writing" ++msgstr "не удалось открыть %s для записи" ++ ++#: ../web/swat.c:473 ++#, c-format ++msgid "Can't reload %s" ++msgstr "Невозможно перезагрузить %s" ++ ++#: ../web/swat.c:543 ++#, c-format ++msgid "Logged in as <b>%s</b>" ++msgstr "Осуществлён вход под именем <b>%s</b>" ++ ++#: ../web/swat.c:547 ++msgid "Home" ++msgstr "Главная" ++ ++#: ../web/swat.c:549 ++msgid "Globals" ++msgstr "Глобальные" ++ ++#: ../web/swat.c:550 ++msgid "Shares" ++msgstr "Ресурсы" ++ ++#: ../web/swat.c:551 ++msgid "Printers" ++msgstr "Принтеры" ++ ++#: ../web/swat.c:552 ++msgid "Wizard" ++msgstr "Помощник" ++ ++#: ../web/swat.c:556 ++msgid "Status" ++msgstr "Состояние" ++ ++#: ../web/swat.c:557 ++msgid "View Config" ++msgstr "Настройки" ++ ++#: ../web/swat.c:559 ++msgid "Password Management" ++msgstr "Пароли" ++ ++#: ../web/swat.c:569 ++msgid "Current View Is" ++msgstr "Текущий вид" ++ ++#: ../web/swat.c:570 ../web/swat.c:573 ++msgid "Basic" ++msgstr "Простой" ++ ++#: ../web/swat.c:571 ../web/swat.c:574 ++msgid "Advanced" ++msgstr "Сложный" ++ ++#: ../web/swat.c:572 ++msgid "Change View To" ++msgstr "Сменить вид на" ++ ++#: ../web/swat.c:601 ++msgid "Current Config" ++msgstr "Текущий файл конфигурации" ++ ++#: ../web/swat.c:605 ++msgid "Normal View" ++msgstr "Обычный вид" ++ ++#: ../web/swat.c:607 ++msgid "Full View" ++msgstr "Полный вид" ++ ++#. Here we first set and commit all the parameters that were selected ++#. in the previous screen. ++#: ../web/swat.c:626 ++msgid "Wizard Parameter Edit Page" ++msgstr "Страница редактирования параметров помощника" ++ ++#: ../web/swat.c:655 ++msgid "Note: smb.conf file has been read and rewritten" ++msgstr "Замечание: файл smb.conf был прочитан и перезаписан" ++ ++#. Here we go ... ++#: ../web/swat.c:763 ++msgid "Samba Configuration Wizard" ++msgstr "Помощник настройки Samba" ++ ++#: ../web/swat.c:767 ++msgid "The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments." ++msgstr "" ++"По кнопке \"Перезаписать файл smb.conf\" в файл smb.conf записываются все " ++"значения по умолчанию с комментариями." ++ ++#: ../web/swat.c:768 ++msgid "The same will happen if you press the commit button." ++msgstr "То же самое произойдёт при нажатии кнопки сохранения." ++ ++#: ../web/swat.c:771 ++msgid "Rewrite smb.conf file" ++msgstr "Перезаписать файл smb.conf" ++ ++#: ../web/swat.c:772 ++msgid "Commit" ++msgstr "Сохранить" ++ ++#: ../web/swat.c:773 ++msgid "Edit Parameter Values" ++msgstr "Редактировать значения параметров" ++ ++#: ../web/swat.c:779 ++msgid "Server Type" ++msgstr "Тип сервера" ++ ++#: ../web/swat.c:780 ++msgid "Stand Alone" ++msgstr "Независимый" ++ ++#: ../web/swat.c:781 ++msgid "Domain Member" ++msgstr "Член домена" ++ ++#: ../web/swat.c:782 ++msgid "Domain Controller" ++msgstr "Контроллер домена" ++ ++#: ../web/swat.c:785 ++msgid "Unusual Type in smb.conf - Please Select New Mode" ++msgstr "Необычный тип в smb.conf - Выберите новый режим" ++ ++#: ../web/swat.c:787 ++msgid "Configure WINS As" ++msgstr "Настроить WINS как" ++ ++#: ../web/swat.c:788 ++msgid "Not Used" ++msgstr "Не использовать" ++ ++#: ../web/swat.c:789 ++msgid "Server for client use" ++msgstr "Сервер для клиентов" ++ ++#: ../web/swat.c:790 ++msgid "Client of another WINS server" ++msgstr "Клиент другого сервера WINS" ++ ++#: ../web/swat.c:792 ++msgid "Remote WINS Server" ++msgstr "Удалённый сервер WINS" ++ ++#: ../web/swat.c:803 ++msgid "Error: WINS Server Mode and WINS Support both set in smb.conf" ++msgstr "Ошибка: в smb.conf установлены одновременно режим сервера WINS и поддержка WINS" ++ ++#: ../web/swat.c:804 ++msgid "Please Select desired WINS mode above." ++msgstr "Выберите желаемый режим WINS." ++ ++#: ../web/swat.c:806 ++msgid "Expose Home Directories" ++msgstr "Сделать доступными домашние каталоги" ++ ++#: ../web/swat.c:821 ++msgid "The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment." ++msgstr "" ++"Выбор параметров выше приводит к автоматической настройке большего числа " ++"параметров, и помогает в сокращении времени развёртывания Samba." ++ ++#: ../web/swat.c:834 ++msgid "Global Parameters" ++msgstr "Глобальные параметры" ++ ++#: ../web/swat.c:862 ../web/swat.c:966 ../web/swat.c:1318 ++msgid "Commit Changes" ++msgstr "Сохранить изменения" ++ ++#: ../web/swat.c:866 ../web/swat.c:969 ../web/swat.c:1320 ++msgid "Reset Values" ++msgstr "Реинициализировать значения" ++ ++#: ../web/swat.c:891 ++msgid "Share Parameters" ++msgstr "Параметры общих ресурсов" ++ ++#: ../web/swat.c:934 ++msgid "Choose Share" ++msgstr "Выбрать ресурс" ++ ++#: ../web/swat.c:951 ++msgid "Delete Share" ++msgstr "Удалить ресурс" ++ ++#: ../web/swat.c:958 ++msgid "Create Share" ++msgstr "Создать ресурс" ++ ++#: ../web/swat.c:994 ++msgid "password change in demo mode rejected" ++msgstr "смена пароля в демо-режиме не работает" ++ ++#: ../web/swat.c:1007 ++msgid "Can't setup password database vectors." ++msgstr "Не удалось настроить векторы базы данных паролей." ++ ++#: ../web/swat.c:1033 ++msgid " Must specify \"User Name\" " ++msgstr " Должно быть указано \"Имя пользователя\" " ++ ++#: ../web/swat.c:1049 ++msgid " Must specify \"Old Password\" " ++msgstr " Должен быть указан \"Старый пароль\" " ++ ++#: ../web/swat.c:1055 ++msgid " Must specify \"Remote Machine\" " ++msgstr " Должна быть указана \"Удалённая машина\" " ++ ++#: ../web/swat.c:1062 ++msgid " Must specify \"New, and Re-typed Passwords\" " ++msgstr " Должен быть указан \"Новый пароль, введённый дважды\" " ++ ++#: ../web/swat.c:1068 ++msgid " Re-typed password didn't match new password " ++msgstr " Повторно набранный новый пароль не совпадает с новым паролем " ++ ++#: ../web/swat.c:1101 ++#, c-format ++msgid " The passwd for '%s' has been changed." ++msgstr " Был изменён пароль для '%s'." ++ ++#: ../web/swat.c:1104 ++#, c-format ++msgid " The passwd for '%s' has NOT been changed." ++msgstr " Пароль для '%s' НЕ был изменён." ++ ++#: ../web/swat.c:1129 ++msgid "Server Password Management" ++msgstr "Управление паролями сервера" ++ ++#. ++#. * Create all the dialog boxes for data collection ++#. ++#: ../web/swat.c:1138 ../web/swat.c:1185 ++msgid "User Name" ++msgstr "Имя пользователя" ++ ++#: ../web/swat.c:1141 ../web/swat.c:1187 ++msgid "Old Password" ++msgstr "Старый пароль" ++ ++#: ../web/swat.c:1144 ../web/swat.c:1189 ++msgid "New Password" ++msgstr "Новый пароль" ++ ++#: ../web/swat.c:1146 ../web/swat.c:1191 ++msgid "Re-type New Password" ++msgstr "Новый пароль ещё раз" ++ ++#: ../web/swat.c:1154 ../web/swat.c:1202 ++msgid "Change Password" ++msgstr "Сменить пароль" ++ ++#: ../web/swat.c:1157 ++msgid "Add New User" ++msgstr "Добавить нового пользователя" ++ ++#: ../web/swat.c:1159 ++msgid "Delete User" ++msgstr "Удалить пользователя" ++ ++#: ../web/swat.c:1161 ++msgid "Disable User" ++msgstr "Заблокировать пользователя" ++ ++#: ../web/swat.c:1163 ++msgid "Enable User" ++msgstr "Разблокировать пользователя" ++ ++#: ../web/swat.c:1176 ++msgid "Client/Server Password Management" ++msgstr "Управление паролями в режиме клиент/сервер" ++ ++#: ../web/swat.c:1193 ++msgid "Remote Machine" ++msgstr "Удалённая машина" ++ ++#: ../web/swat.c:1232 ++msgid "Printer Parameters" ++msgstr "Параметры принтера" ++ ++#: ../web/swat.c:1234 ++msgid "Important Note:" ++msgstr "Важное замечание:" ++ ++#: ../web/swat.c:1235 ++#, c-format ++msgid "Printer names marked with [*] in the Choose Printer drop-down box " ++msgstr "Имена принтеров, помеченные [*] в выпадающем списке принтеров, " ++ ++#: ../web/swat.c:1236 ++#, c-format ++msgid "are autoloaded printers from " ++msgstr "были автоматически загружены согласно параметру " ++ ++#: ../web/swat.c:1237 ++msgid "Printcap Name" ++msgstr "Printcap Name" ++ ++#: ../web/swat.c:1238 ++msgid "Attempting to delete these printers from SWAT will have no effect." ++msgstr ". Попытка удалить эти принтеры из SWAT ни к чему не приведёт." ++ ++#: ../web/swat.c:1284 ++msgid "Choose Printer" ++msgstr "Выбрать принтер" ++ ++#: ../web/swat.c:1303 ++msgid "Delete Printer" ++msgstr "Удалить принтер" ++ ++#: ../web/swat.c:1310 ++msgid "Create Printer" ++msgstr "Создать принтер" ++ ++#: ../web/statuspage.c:139 ++msgid "RDWR " ++msgstr "RDWR " ++ ++#: ../web/statuspage.c:141 ++msgid "WRONLY " ++msgstr "WRONLY " ++ ++#: ../web/statuspage.c:143 ++msgid "RDONLY " ++msgstr "RDONLY " ++ ++#: ../web/statuspage.c:330 ++msgid "Server Status" ++msgstr "Состояние сервера" ++ ++#: ../web/statuspage.c:335 ++msgid "Auto Refresh" ++msgstr "Включить автообновление" ++ ++#: ../web/statuspage.c:336 ../web/statuspage.c:341 ++msgid "Refresh Interval: " ++msgstr "Интервал автообновления: " ++ ++#: ../web/statuspage.c:340 ++msgid "Stop Refreshing" ++msgstr "Выключить автообновление" ++ ++#: ../web/statuspage.c:355 ++msgid "version:" ++msgstr "версия:" ++ ++#: ../web/statuspage.c:358 ++msgid "smbd:" ++msgstr "smbd:" ++ ++#: ../web/statuspage.c:358 ../web/statuspage.c:371 ../web/statuspage.c:385 ++msgid "running" ++msgstr "работает" ++ ++#: ../web/statuspage.c:358 ../web/statuspage.c:371 ../web/statuspage.c:385 ++msgid "not running" ++msgstr "не работает" ++ ++#: ../web/statuspage.c:362 ++msgid "Stop smbd" ++msgstr "Остановить smbd" ++ ++#: ../web/statuspage.c:364 ++msgid "Start smbd" ++msgstr "Запустить smbd" ++ ++#: ../web/statuspage.c:366 ++msgid "Restart smbd" ++msgstr "Перезапустить smbd" ++ ++#: ../web/statuspage.c:371 ++msgid "nmbd:" ++msgstr "nmbd:" ++ ++#: ../web/statuspage.c:375 ++msgid "Stop nmbd" ++msgstr "Остановить nmbd" ++ ++#: ../web/statuspage.c:377 ++msgid "Start nmbd" ++msgstr "Запустить nmbd" ++ ++#: ../web/statuspage.c:379 ++msgid "Restart nmbd" ++msgstr "Перезапустить nmbd" ++ ++#: ../web/statuspage.c:385 ++msgid "winbindd:" ++msgstr "winbindd:" ++ ++#: ../web/statuspage.c:389 ++msgid "Stop winbindd" ++msgstr "Остановить winbindd" ++ ++#: ../web/statuspage.c:391 ++msgid "Start winbindd" ++msgstr "Запустить winbindd" ++ ++#: ../web/statuspage.c:393 ++msgid "Restart winbindd" ++msgstr "Перезапустить winbindd" ++ ++#. stop, restart all ++#: ../web/statuspage.c:402 ++msgid "Stop All" ++msgstr "Остановить всё" ++ ++#: ../web/statuspage.c:403 ++msgid "Restart All" ++msgstr "Перезапустить всё" ++ ++#. start all ++#: ../web/statuspage.c:407 ++msgid "Start All" ++msgstr "Запустить всё" ++ ++#: ../web/statuspage.c:414 ++msgid "Active Connections" ++msgstr "Активные подключения" ++ ++#: ../web/statuspage.c:416 ../web/statuspage.c:429 ../web/statuspage.c:437 ++msgid "PID" ++msgstr "PID" ++ ++#: ../web/statuspage.c:416 ../web/statuspage.c:429 ++msgid "Client" ++msgstr "Клиент" ++ ++#: ../web/statuspage.c:416 ++msgid "IP address" ++msgstr "IP-адрес" ++ ++#: ../web/statuspage.c:416 ../web/statuspage.c:429 ../web/statuspage.c:437 ++msgid "Date" ++msgstr "Дата" ++ ++#: ../web/statuspage.c:418 ++msgid "Kill" ++msgstr "Отключить" ++ ++#: ../web/statuspage.c:426 ++msgid "Active Shares" ++msgstr "Активные ресурсы" ++ ++#: ../web/statuspage.c:429 ++msgid "Share" ++msgstr "Ресурс" ++ ++#: ../web/statuspage.c:429 ++msgid "User" ++msgstr "Пользователь" ++ ++#: ../web/statuspage.c:429 ++msgid "Group" ++msgstr "Группа" ++ ++#: ../web/statuspage.c:435 ++msgid "Open Files" ++msgstr "Открытые файлы" ++ ++#: ../web/statuspage.c:437 ++msgid "Sharing" ++msgstr "Ресурс" ++ ++#: ../web/statuspage.c:437 ++msgid "R/W" ++msgstr "R/W" ++ ++#: ../web/statuspage.c:437 ++msgid "Oplock" ++msgstr "Oplock" ++ ++#: ../web/statuspage.c:437 ++msgid "File" ++msgstr "Файл" ++ ++#: ../web/statuspage.c:446 ++msgid "Show Client in col 1" ++msgstr "Показать клиента в колонке 1" ++ ++#: ../web/statuspage.c:447 ++msgid "Show PID in col 1" ++msgstr "Показать PID в колонке 1" ++ ++#: ../param/loadparm.c:836 ++msgid "Base Options" ++msgstr "Основные параметры" ++ ++#: ../param/loadparm.c:855 ++msgid "Security Options" ++msgstr "Параметры безопасности" ++ ++#: ../param/loadparm.c:945 ++msgid "Logging Options" ++msgstr "Параметры журнала" ++ ++#: ../param/loadparm.c:962 ++msgid "Protocol Options" ++msgstr "Параметры протокола" ++ ++#: ../param/loadparm.c:1008 ++msgid "Tuning Options" ++msgstr "Параметры детальной настройки" ++ ++#: ../param/loadparm.c:1037 ++msgid "Printing Options" ++msgstr "Параметры печати" ++ ++#: ../param/loadparm.c:1075 ++msgid "Filename Handling" ++msgstr "Обработка имён файлов" ++ ++#: ../param/loadparm.c:1105 ++msgid "Domain Options" ++msgstr "Параметры домена" ++ ++#: ../param/loadparm.c:1109 ++msgid "Logon Options" ++msgstr "Параметры входа" ++ ++#: ../param/loadparm.c:1130 ++msgid "Browse Options" ++msgstr "Параметры обзора" ++ ++#: ../param/loadparm.c:1144 ++msgid "WINS Options" ++msgstr "Параметры WINS" ++ ++#: ../param/loadparm.c:1153 ++msgid "Locking Options" ++msgstr "Параметры блокировки" ++ ++#: ../param/loadparm.c:1170 ++msgid "Ldap Options" ++msgstr "Параметры Ldap" ++ ++#: ../param/loadparm.c:1186 ++msgid "Miscellaneous Options" ++msgstr "Различные параметры" ++ ++#: ../param/loadparm.c:1191 ++msgid "EventLog Options" ++msgstr "Параметры EventLog" ++ ++#: ../param/loadparm.c:1258 ++msgid "VFS module options" ++msgstr "Параметры модуля VFS" ++ ++#: ../param/loadparm.c:1268 ++msgid "Winbind options" ++msgstr "Параметры Winbind" ++ +diff --git a/source3/po/tr.msg b/source3/po/tr.msg +new file mode 100644 +index 0000000..03b489d +--- /dev/null ++++ b/source3/po/tr.msg +@@ -0,0 +1,593 @@ ++# Turkish messages for international release of SWAT. ++# Copyright (C) 2001 Deniz Akkus Kanca <deniz@arayan.com> ++# ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: i18n_swat \n" ++"POT-Creation-Date: 2003-10-06 05:30+0900\n" ++"PO-Revision-Date: 2001-09-20 22:51EEST\n" ++"Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n" ++"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"X-Generator: KBabel 0.9.1\n" ++ ++#: ../web/swat.c:117 ++#, c-format ++msgid "ERROR: Can't open %s" ++msgstr "" ++ ++#: ../web/swat.c:200 ++msgid "Help" ++msgstr "Yardım" ++ ++#: ../web/swat.c:206 ../web/swat.c:220 ../web/swat.c:235 ../web/swat.c:243 ../web/swat.c:252 ../web/swat.c:261 ../web/swat.c:267 ../web/swat.c:273 ../web/swat.c:286 ++msgid "Set Default" ++msgstr "Öntanımlıya Ayarla" ++ ++#: ../web/swat.c:408 ++#, c-format ++msgid "failed to open %s for writing" ++msgstr "" ++ ++#: ../web/swat.c:431 ++#, c-format ++msgid "Can't reload %s" ++msgstr "" ++ ++#: ../web/swat.c:501 ++#, c-format ++msgid "Logged in as <b>%s</b>" ++msgstr "<b>%s</b> kimliği ile oturum açılmış" ++ ++#: ../web/swat.c:505 ++msgid "Home" ++msgstr "Ev" ++ ++#: ../web/swat.c:507 ++msgid "Globals" ++msgstr "Evrenseller" ++ ++#: ../web/swat.c:508 ++msgid "Shares" ++msgstr "Paylaşımlar" ++ ++#: ../web/swat.c:509 ++msgid "Printers" ++msgstr "Yazıcılar" ++ ++#: ../web/swat.c:510 ++msgid "Wizard" ++msgstr "" ++ ++#: ../web/swat.c:513 ++msgid "Status" ++msgstr "Durum" ++ ++#: ../web/swat.c:514 ++msgid "View Config" ++msgstr "Ayarlara Gözat" ++ ++#: ../web/swat.c:516 ++msgid "Password Management" ++msgstr "Şifre Yönetimi" ++ ++#: ../web/swat.c:526 ++msgid "Current View Is" ++msgstr "Şimdiki Ayarlar" ++ ++#: ../web/swat.c:527 ../web/swat.c:530 ++msgid "Basic" ++msgstr "Temel Görünüm" ++ ++#: ../web/swat.c:528 ../web/swat.c:531 ++msgid "Advanced" ++msgstr "Gelişmiş Görünüm" ++ ++#: ../web/swat.c:529 ++msgid "Change View To" ++msgstr "Şifre Değiştir" ++ ++#: ../web/swat.c:554 ++msgid "Current Config" ++msgstr "Şimdiki Ayarlar" ++ ++#: ../web/swat.c:558 ++msgid "Normal View" ++msgstr "Normal Görünüm" ++ ++#: ../web/swat.c:560 ++msgid "Full View" ++msgstr "Tam Görünüm" ++ ++#. Here we first set and commit all the parameters that were selected ++#. in the previous screen. ++#: ../web/swat.c:579 ++msgid "Wizard Parameter Edit Page" ++msgstr "" ++ ++#: ../web/swat.c:608 ++msgid "Note: smb.conf file has been read and rewritten" ++msgstr "" ++ ++#. Here we go ... ++#: ../web/swat.c:716 ++msgid "Samba Configuration Wizard" ++msgstr "" ++ ++#: ../web/swat.c:720 ++msgid "The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments." ++msgstr "" ++ ++#: ../web/swat.c:721 ++msgid "The same will happen if you press the commit button." ++msgstr "" ++ ++#: ../web/swat.c:724 ++msgid "Rewrite smb.conf file" ++msgstr "" ++ ++#: ../web/swat.c:725 ++msgid "Commit" ++msgstr "açıklama" ++ ++#: ../web/swat.c:726 ++msgid "Edit Parameter Values" ++msgstr "Yazıcı Bilgileri" ++ ++#: ../web/swat.c:732 ++msgid "Server Type" ++msgstr "" ++ ++#: ../web/swat.c:733 ++msgid "Stand Alone" ++msgstr "Nmbd'yi çalıştır" ++ ++#: ../web/swat.c:734 ++msgid "Domain Member" ++msgstr "alan sunucusu" ++ ++#: ../web/swat.c:735 ++msgid "Domain Controller" ++msgstr "alan sunucusu" ++ ++#: ../web/swat.c:738 ++msgid "Unusual Type in smb.conf - Please Select New Mode" ++msgstr "" ++ ++#: ../web/swat.c:740 ++msgid "Configure WINS As" ++msgstr "" ++ ++#: ../web/swat.c:741 ++msgid "Not Used" ++msgstr "dont descend" ++ ++#: ../web/swat.c:742 ++msgid "Server for client use" ++msgstr "" ++ ++#: ../web/swat.c:743 ++msgid "Client of another WINS server" ++msgstr "" ++ ++#: ../web/swat.c:745 ++msgid "Remote WINS Server" ++msgstr "" ++ ++#: ../web/swat.c:756 ++msgid "Error: WINS Server Mode and WINS Support both set in smb.conf" ++msgstr "" ++ ++#: ../web/swat.c:757 ++msgid "Please Select desired WINS mode above." ++msgstr "" ++ ++#: ../web/swat.c:759 ++msgid "Expose Home Directories" ++msgstr "" ++ ++#: ../web/swat.c:774 ++msgid "The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment." ++msgstr "" ++ ++#: ../web/swat.c:787 ++msgid "Global Parameters" ++msgstr "Genel Değişkenler" ++ ++#: ../web/swat.c:815 ../web/swat.c:916 ../web/swat.c:1265 ++msgid "Commit Changes" ++msgstr "Değişiklikleri Kaydet" ++ ++#: ../web/swat.c:819 ../web/swat.c:919 ../web/swat.c:1267 ++msgid "Reset Values" ++msgstr "Değerleri İlk Haline Getir" ++ ++#: ../web/swat.c:844 ++msgid "Share Parameters" ++msgstr "Paylaşım Parametreleri" ++ ++#: ../web/swat.c:887 ++msgid "Choose Share" ++msgstr "Paylaşım Seçin" ++ ++#: ../web/swat.c:901 ++msgid "Delete Share" ++msgstr "Paylaşım Kaldır" ++ ++#: ../web/swat.c:908 ++msgid "Create Share" ++msgstr "Paylaşım Oluştur" ++ ++#: ../web/swat.c:944 ++msgid "password change in demo mode rejected" ++msgstr "demo kipinde şifre değişikliği kabul edilmedi\n" ++ ++#: ../web/swat.c:957 ++msgid "Can't setup password database vectors." ++msgstr "" ++ ++#: ../web/swat.c:983 ++msgid " Must specify \"User Name\" " ++msgstr " \"Kullanıcı Adı\" belirtilmeli \n" ++ ++#: ../web/swat.c:999 ++msgid " Must specify \"Old Password\" " ++msgstr " \"Eski Şifre\" belirtilmeli \n" ++ ++#: ../web/swat.c:1005 ++msgid " Must specify \"Remote Machine\" " ++msgstr " \"Uzak Makina\" belirtilmeli \n" ++ ++#: ../web/swat.c:1012 ++msgid " Must specify \"New, and Re-typed Passwords\" " ++msgstr " \"Yeni ve Tekrar Girilmiş Şifreler\" belirtilmeli \n" ++ ++#: ../web/swat.c:1018 ++msgid " Re-typed password didn't match new password " ++msgstr " Tekrar girilen şifre yeni şifre ile eşleşmedi\n" ++ ++#: ../web/swat.c:1048 ++#, c-format ++msgid " The passwd for '%s' has been changed." ++msgstr " '%s' için şifre değiştirildi." ++ ++#: ../web/swat.c:1051 ++#, c-format ++msgid " The passwd for '%s' has NOT been changed." ++msgstr " '%s' için şifre DEĞİŞTİRİLMEDİ." ++ ++#: ../web/swat.c:1076 ++msgid "Server Password Management" ++msgstr "Sunucu Şifre Yönetimi" ++ ++#. ++#. * Create all the dialog boxes for data collection ++#. ++#: ../web/swat.c:1085 ../web/swat.c:1132 ++msgid "User Name" ++msgstr " Kullanıcı Adı" ++ ++#: ../web/swat.c:1088 ../web/swat.c:1134 ++msgid "Old Password" ++msgstr " Eski Şifre" ++ ++#: ../web/swat.c:1091 ../web/swat.c:1136 ++msgid "New Password" ++msgstr " Yeni Şifre" ++ ++#: ../web/swat.c:1093 ../web/swat.c:1138 ++msgid "Re-type New Password" ++msgstr " Yeni Şifre Tekrarı" ++ ++#: ../web/swat.c:1101 ../web/swat.c:1149 ++msgid "Change Password" ++msgstr "Şifre Değiştir" ++ ++#: ../web/swat.c:1104 ++msgid "Add New User" ++msgstr "Kull. Ekle" ++ ++#: ../web/swat.c:1106 ++msgid "Delete User" ++msgstr "Kull. Sil" ++ ++#: ../web/swat.c:1108 ++msgid "Disable User" ++msgstr "Kull. Etkisizleştir" ++ ++#: ../web/swat.c:1110 ++msgid "Enable User" ++msgstr "Kull. Etkinleştir" ++ ++#: ../web/swat.c:1123 ++msgid "Client/Server Password Management" ++msgstr "İstemci/Sunucu Şifre Yönetimi" ++ ++#: ../web/swat.c:1140 ++msgid "Remote Machine" ++msgstr " Uzak Makina" ++ ++#: ../web/swat.c:1179 ++msgid "Printer Parameters" ++msgstr "Yazıcı Bilgileri" ++ ++#: ../web/swat.c:1181 ++msgid "Important Note:" ++msgstr "Önemli Not:" ++ ++#: ../web/swat.c:1182 ++msgid "Printer names marked with [*] in the Choose Printer drop-down box " ++msgstr "Yazıcı Seç kutusunda [*] ile işaretlenmiş yazıcı isimleri " ++ ++#: ../web/swat.c:1183 ++msgid "are autoloaded printers from " ++msgstr "otomatik yüklenen yazıcılar " ++ ++#: ../web/swat.c:1184 ++msgid "Printcap Name" ++msgstr "Printcap Adı" ++ ++#: ../web/swat.c:1185 ++msgid "Attempting to delete these printers from SWAT will have no effect." ++msgstr "Bu yazıcıları SWAT'dan silmek etkisiz olacaktır.\n" ++ ++#: ../web/swat.c:1231 ++msgid "Choose Printer" ++msgstr "Yazıcı Seç" ++ ++#: ../web/swat.c:1250 ++msgid "Delete Printer" ++msgstr "Yazıcı Sil" ++ ++#: ../web/swat.c:1257 ++msgid "Create Printer" ++msgstr "Yazıcı Oluştur" ++ ++#: ../web/statuspage.c:123 ++msgid "RDONLY " ++msgstr "SALTOKUNUR " ++ ++#: ../web/statuspage.c:124 ++msgid "WRONLY " ++msgstr "SALTYAZILIR " ++ ++#: ../web/statuspage.c:125 ++msgid "RDWR " ++msgstr "O/Y " ++ ++#: ../web/statuspage.c:309 ++msgid "Server Status" ++msgstr "Sunucu Durumu" ++ ++#: ../web/statuspage.c:314 ++msgid "Auto Refresh" ++msgstr "Oto Tazele" ++ ++#: ../web/statuspage.c:315 ../web/statuspage.c:320 ++msgid "Refresh Interval: " ++msgstr "Tazeleme Aralığı: " ++ ++#: ../web/statuspage.c:319 ++msgid "Stop Refreshing" ++msgstr "Tazelemeyi Durdur" ++ ++#: ../web/statuspage.c:334 ++msgid "version:" ++msgstr "sürüm:" ++ ++#: ../web/statuspage.c:337 ++msgid "smbd:" ++msgstr "smbd:" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "running" ++msgstr "çalışıyor" ++ ++#: ../web/statuspage.c:337 ../web/statuspage.c:350 ../web/statuspage.c:364 ++msgid "not running" ++msgstr "çalışmıyor" ++ ++#: ../web/statuspage.c:341 ++msgid "Stop smbd" ++msgstr "Smbd'yi durdur" ++ ++#: ../web/statuspage.c:343 ++msgid "Start smbd" ++msgstr "Smbd'yi çalıştır" ++ ++#: ../web/statuspage.c:345 ++msgid "Restart smbd" ++msgstr "Smbd'yi yeniden çalıştır" ++ ++#: ../web/statuspage.c:350 ++msgid "nmbd:" ++msgstr "nmbd:" ++ ++#: ../web/statuspage.c:354 ++msgid "Stop nmbd" ++msgstr "Nmbd'yi durdur" ++ ++#: ../web/statuspage.c:356 ++msgid "Start nmbd" ++msgstr "Nmbd'yi çalıştır" ++ ++#: ../web/statuspage.c:358 ++msgid "Restart nmbd" ++msgstr "Nmbd'yi yeniden çalıştır" ++ ++#: ../web/statuspage.c:364 ++msgid "winbindd:" ++msgstr "winbind uid" ++ ++#: ../web/statuspage.c:368 ++msgid "Stop winbindd" ++msgstr "Nmbd'yi durdur" ++ ++#: ../web/statuspage.c:370 ++msgid "Start winbindd" ++msgstr "Nmbd'yi çalıştır" ++ ++#: ../web/statuspage.c:372 ++msgid "Restart winbindd" ++msgstr "Nmbd'yi yeniden çalıştır" ++ ++#. stop, restart all ++#: ../web/statuspage.c:381 ++msgid "Stop All" ++msgstr "" ++ ++#: ../web/statuspage.c:382 ++msgid "Restart All" ++msgstr "Nmbd'yi yeniden çalıştır" ++ ++#. start all ++#: ../web/statuspage.c:386 ++msgid "Start All" ++msgstr "Nmbd'yi çalıştır" ++ ++#: ../web/statuspage.c:393 ++msgid "Active Connections" ++msgstr "Aktif Bağlantılar" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "PID" ++msgstr "PID" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ++msgid "Client" ++msgstr "İstemci" ++ ++#: ../web/statuspage.c:395 ++msgid "IP address" ++msgstr "IP numarası" ++ ++#: ../web/statuspage.c:395 ../web/statuspage.c:408 ../web/statuspage.c:416 ++msgid "Date" ++msgstr "Tarih" ++ ++#: ../web/statuspage.c:397 ++msgid "Kill" ++msgstr "Kapat" ++ ++#: ../web/statuspage.c:405 ++msgid "Active Shares" ++msgstr "Aktif Paylaşımlar" ++ ++#: ../web/statuspage.c:408 ++msgid "Share" ++msgstr "Paylaşım" ++ ++#: ../web/statuspage.c:408 ++msgid "User" ++msgstr "Kullanıcı" ++ ++#: ../web/statuspage.c:408 ++msgid "Group" ++msgstr "Grup" ++ ++#: ../web/statuspage.c:414 ++msgid "Open Files" ++msgstr "Açık Dosyalar" ++ ++#: ../web/statuspage.c:416 ++msgid "Sharing" ++msgstr "Paylaşılıyor" ++ ++#: ../web/statuspage.c:416 ++msgid "R/W" ++msgstr "O/Y" ++ ++#: ../web/statuspage.c:416 ++msgid "Oplock" ++msgstr "Oplock" ++ ++#: ../web/statuspage.c:416 ++msgid "File" ++msgstr "Dosya" ++ ++#: ../web/statuspage.c:425 ++msgid "Show Client in col 1" ++msgstr "" ++ ++#: ../web/statuspage.c:426 ++msgid "Show PID in col 1" ++msgstr "" ++ ++#: ../param/loadparm.c:755 ++msgid "Base Options" ++msgstr "Temel Seçenekler" ++ ++#: ../param/loadparm.c:775 ++msgid "Security Options" ++msgstr "Güvenlik Seçenekleri" ++ ++#: ../param/loadparm.c:859 ++msgid "Logging Options" ++msgstr "Günlük Kaydı Seçenekleri" ++ ++#: ../param/loadparm.c:874 ++msgid "Protocol Options" ++msgstr "Protokol Seçenekleri" ++ ++#: ../param/loadparm.c:911 ++msgid "Tuning Options" ++msgstr "Ayar Seçenekleri" ++ ++#: ../param/loadparm.c:940 ++msgid "Printing Options" ++msgstr "Yazdırma Seçenekleri" ++ ++#: ../param/loadparm.c:970 ++msgid "Filename Handling" ++msgstr "Dosyaadı İşlenmesi" ++ ++#: ../param/loadparm.c:996 ++msgid "Domain Options" ++msgstr "Alan Seçenekleri" ++ ++#: ../param/loadparm.c:1000 ++msgid "Logon Options" ++msgstr "Sistem Giriş Seçenekleri" ++ ++#: ../param/loadparm.c:1019 ++msgid "Browse Options" ++msgstr "Gözatma Seçenekleri" ++ ++#: ../param/loadparm.c:1033 ++msgid "WINS Options" ++msgstr "WINS Seçenekleri" ++ ++#: ../param/loadparm.c:1043 ++msgid "Locking Options" ++msgstr "Kilitleme Seçenekleri" ++ ++#: ../param/loadparm.c:1061 ++msgid "Ldap Options" ++msgstr "Ldap Seçenekleri" ++ ++#: ../param/loadparm.c:1078 ++msgid "Miscellaneous Options" ++msgstr "Diğer Seçenekler" ++ ++#: ../param/loadparm.c:1138 ++msgid "VFS module options" ++msgstr "VFS Seçenekleri" ++ ++#: ../param/loadparm.c:1148 ++msgid "Winbind options" ++msgstr "Winbind seçenekleri" +diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh +new file mode 100644 +index 0000000..859e4c1 +--- /dev/null ++++ b/source3/script/installmsg.sh +@@ -0,0 +1,65 @@ ++#!/bin/sh ++# first version (Sept 2003) written by Shiro Yamada <shiro@miraclelinux.com> ++# based on the first verion (March 2002) of installdat.sh written by Herb Lewis ++ ++DESTDIR=$1 ++MSGDIR=`echo $2 | sed 's/\/\//\//g'` ++SRCDIR=$3/ ++shift ++shift ++shift ++ ++case $0 in ++ *uninstall*) ++ if test ! -d "$DESTDIR/$MSGDIR"; then ++ echo "Directory $DESTDIR/$MSGDIR does not exist! " ++ echo "Do a "make installmsg" or "make install" first. " ++ exit 1 ++ fi ++ mode='uninstall' ++ ;; ++ *) mode='install' ;; ++esac ++ ++for f in $SRCDIR/po/*.msg; do ++ FNAME="$DESTDIR/$MSGDIR/`basename $f`" ++ if test "$mode" = 'install'; then ++ echo "Installing $f as $FNAME " ++ cp "$f" "$FNAME" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ chmod 0644 "$FNAME" ++ elif test "$mode" = 'uninstall'; then ++ echo "Removing $FNAME " ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ else ++ echo "Unknown mode, $mode. Script called as $0 " ++ exit 1 ++ fi ++done ++ ++if test "$mode" = 'install'; then ++ cat << EOF ++============================================================================== ++The SWAT msg files have been installed. You may uninstall the msg files using ++the command "make uninstallmsg" or "make uninstall" to uninstall binaries, man ++pages, msg files, and shell scripts. ++============================================================================== ++EOF ++else ++ cat << EOF ++============================================================================= ++The SWAT msg files have been removed. You may restore these files using the ++command "make installmsg" or "make install" to install binaries, man pages, ++modules, msg files, and shell scripts. ++====================================================================== ++EOF ++fi ++ ++exit 0 +diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh +new file mode 100755 +index 0000000..40596f3 +--- /dev/null ++++ b/source3/script/installswat.sh +@@ -0,0 +1,296 @@ ++#!/bin/sh ++#first version March 1998, Andrew Tridgell ++ ++DESTDIR=$1 ++SWATDIR=`echo $2 | sed 's/\/\//\//g'` ++SRCDIR=$3/ ++BOOKDIR="$DESTDIR/$SWATDIR/using_samba" ++ ++case $0 in ++ *uninstall*) ++ echo "Removing SWAT from $DESTDIR/$SWATDIR " ++ echo "Removing the Samba Web Administration Tool " ++ printf "%s" "Removed " ++ mode='uninstall' ++ ;; ++ *) ++ echo "Installing SWAT in $DESTDIR/$SWATDIR " ++ echo "Installing the Samba Web Administration Tool " ++ printf "%s" "Installing " ++ mode='install' ++ ;; ++esac ++ ++LANGS=". `cd $SRCDIR../swat/; /bin/echo lang/??`" ++echo "langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` " ++ ++if test "$mode" = 'install'; then ++ for ln in $LANGS; do ++ SWATLANGDIR="$DESTDIR/$SWATDIR/$ln" ++ for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \ ++ $SWATLANGDIR/include $SWATLANGDIR/js; do ++ if [ ! -d $d ]; then ++ mkdir -p $d ++ if [ ! -d $d ]; then ++ echo "Failed to make directory $d, does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ done ++ done ++fi ++ ++for ln in $LANGS; do ++ ++ # images ++ for f in $SRCDIR../swat/$ln/images/*.gif; do ++ if [ ! -f $f ] ; then ++ continue ++ fi ++ FNAME="$DESTDIR/$SWATDIR/$ln/images/`basename $f`" ++ echo $FNAME ++ if test "$mode" = 'install'; then ++ cp "$f" "$FNAME" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ chmod 0644 "$FNAME" ++ elif test "$mode" = 'uninstall'; then ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ else ++ echo "Unknown mode, $mode. Script called as $0 " ++ exit 1 ++ fi ++ done ++ ++ # html help ++ for f in $SRCDIR../swat/$ln/help/*.html; do ++ if [ ! -f $f ] ; then ++ continue ++ fi ++ FNAME="$DESTDIR/$SWATDIR/$ln/help/`basename $f`" ++ echo $FNAME ++ if test "$mode" = 'install'; then ++ if [ "x$BOOKDIR" = "x" ]; then ++ cat $f | sed 's/@BOOKDIR@.*$//' > $FNAME.tmp ++ else ++ cat $f | sed 's/@BOOKDIR@//' > $FNAME.tmp ++ fi ++ if test ! -f "$FNAME.tmp"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ f=$FNAME.tmp ++ cp "$f" "$FNAME" ++ rm -f "$f" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ chmod 0644 "$FNAME" ++ elif test "$mode" = 'uninstall'; then ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ done ++ ++ # "server-side" includes ++ for f in $SRCDIR../swat/$ln/include/*; do ++ if [ ! -f $f ] ; then ++ continue ++ fi ++ FNAME="$DESTDIR/$SWATDIR/$ln/include/`basename $f`" ++ echo $FNAME ++ if test "$mode" = 'install'; then ++ cp "$f" "$FNAME" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ chmod 0644 $FNAME ++ elif test "$mode" = 'uninstall'; then ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ done ++ ++done ++ ++# Install/ remove html documentation (if html documentation tree is here) ++ ++if [ -d $SRCDIR../docs/htmldocs/ ]; then ++ ++ for dir in htmldocs/manpages htmldocs/Samba3-ByExample htmldocs/Samba3-Developers-Guide htmldocs/Samba3-HOWTO ++ do ++ ++ if [ ! -d $SRCDIR../docs/$dir ]; then ++ continue ++ fi ++ ++ INSTALLDIR="$DESTDIR/$SWATDIR/help/`echo $dir | sed 's/htmldocs\///g'`" ++ if test ! -d "$INSTALLDIR" -a "$mode" = 'install'; then ++ mkdir "$INSTALLDIR" ++ if test ! -d "$INSTALLDIR"; then ++ echo "Failed to make directory $INSTALLDIR, does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ ++ for f in $SRCDIR../docs/$dir/*.html; do ++ FNAME=$INSTALLDIR/`basename $f` ++ echo $FNAME ++ if test "$mode" = 'install'; then ++ cp "$f" "$FNAME" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ chmod 0644 $FNAME ++ elif test "$mode" = 'uninstall'; then ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ done ++ ++ if test -d "$SRCDIR../docs/$dir/images/"; then ++ if test ! -d "$INSTALLDIR/images/" -a "$mode" = 'install'; then ++ mkdir "$INSTALLDIR/images" ++ if test ! -d "$INSTALLDIR/images/"; then ++ echo "Failed to make directory $INSTALLDIR/images, does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ for f in $SRCDIR../docs/$dir/images/*.png; do ++ FNAME=$INSTALLDIR/images/`basename $f` ++ echo $FNAME ++ if test "$mode" = 'install'; then ++ cp "$f" "$FNAME" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ chmod 0644 $FNAME ++ elif test "$mode" = 'uninstall'; then ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ done ++ fi ++ done ++fi ++ ++# Install/ remove Using Samba book (but only if it is there) ++ ++if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; then ++ ++ # Create directories ++ ++ for d in $BOOKDIR $BOOKDIR/figs ; do ++ if test ! -d "$d" -a "$mode" = 'install'; then ++ mkdir $d ++ if test ! -d "$d"; then ++ echo "Failed to make directory $d, does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ done ++ ++ # HTML files ++ ++ for f in $SRCDIR../docs/htmldocs/using_samba/*.html; do ++ FNAME=$BOOKDIR/`basename $f` ++ echo $FNAME ++ if test "$mode" = 'install'; then ++ cp "$f" "$FNAME" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ chmod 0644 $FNAME ++ elif test "$mode" = 'uninstall'; then ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ done ++ ++ for f in $SRCDIR../docs/htmldocs/using_samba/*.gif; do ++ FNAME=$BOOKDIR/`basename $f` ++ echo $FNAME ++ if test "$mode" = 'install'; then ++ cp "$f" "$FNAME" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ chmod 0644 $FNAME ++ elif test "$mode" = 'uninstall'; then ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ done ++ ++ # Figures ++ ++ for f in $SRCDIR../docs/htmldocs/using_samba/figs/*.gif; do ++ FNAME=$BOOKDIR/figs/`basename $f` ++ echo $FNAME ++ if test "$mode" = 'install'; then ++ cp "$f" "$FNAME" ++ if test ! -f "$FNAME"; then ++ echo "Cannot install $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ chmod 0644 $FNAME ++ elif test "$mode" = 'uninstall'; then ++ rm -f "$FNAME" ++ if test -f "$FNAME"; then ++ echo "Cannot remove $FNAME. Does $USER have privileges? " ++ exit 1 ++ fi ++ fi ++ done ++ ++fi ++ ++if test "$mode" = 'install'; then ++ cat << EOF ++====================================================================== ++The SWAT files have been installed. Remember to read the documentation ++for information on enabling and using SWAT ++====================================================================== ++EOF ++else ++ cat << EOF ++====================================================================== ++The SWAT files have been removed. You may restore these files using ++the command "make installswat" or "make install" to install binaries, ++man pages, modules, SWAT, and shell scripts. ++====================================================================== ++EOF ++fi ++ ++exit 0 ++ +diff --git a/source3/script/mkbuildoptions.awk b/source3/script/mkbuildoptions.awk +index 1a32d7a..122489e 100644 +--- a/source3/script/mkbuildoptions.awk ++++ b/source3/script/mkbuildoptions.awk +@@ -79,6 +79,7 @@ BEGIN { + + print " output(screen,\" SBINDIR: %s\\n\", get_dyn_SBINDIR());"; + print " output(screen,\" BINDIR: %s\\n\", get_dyn_BINDIR());"; ++ print " output(screen,\" SWATDIR: %s\\n\", get_dyn_SWATDIR());"; + + print " output(screen,\" CONFIGFILE: %s\\n\", get_dyn_CONFIGFILE());"; + print " output(screen,\" LOGFILEBASE: %s\\n\", get_dyn_LOGFILEBASE());"; +diff --git a/source3/web/cgi.c b/source3/web/cgi.c +new file mode 100644 +index 0000000..b97ed25 +--- /dev/null ++++ b/source3/web/cgi.c +@@ -0,0 +1,798 @@ ++/* ++ some simple CGI helper routines ++ Copyright (C) Andrew Tridgell 1997-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 3 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, see <http://www.gnu.org/licenses/>. ++*/ ++ ++ ++#include "includes.h" ++#include "system/passwd.h" ++#include "system/filesys.h" ++#include "web/swat_proto.h" ++#include "intl/lang_tdb.h" ++#include "auth.h" ++#include "secrets.h" ++#include "../lib/util/setid.h" ++ ++#define MAX_VARIABLES 10000 ++ ++/* set the expiry on fixed pages */ ++#define EXPIRY_TIME (60*60*24*7) ++ ++#ifdef DEBUG_COMMENTS ++extern void print_title(char *fmt, ...); ++#endif ++ ++struct cgi_var { ++ char *name; ++ char *value; ++}; ++ ++static struct cgi_var variables[MAX_VARIABLES]; ++static int num_variables; ++static int content_length; ++static int request_post; ++static char *query_string; ++static const char *baseurl; ++static char *pathinfo; ++static char *C_user; ++static char *C_pass; ++static bool inetd_server; ++static bool got_request; ++ ++static char *grab_line(FILE *f, int *cl) ++{ ++ char *ret = NULL; ++ int i = 0; ++ int len = 0; ++ ++ while ((*cl)) { ++ int c; ++ ++ if (i == len) { ++ char *ret2; ++ if (len == 0) len = 1024; ++ else len *= 2; ++ ret2 = (char *)SMB_REALLOC_KEEP_OLD_ON_ERROR(ret, len); ++ if (!ret2) return ret; ++ ret = ret2; ++ } ++ ++ c = fgetc(f); ++ (*cl)--; ++ ++ if (c == EOF) { ++ (*cl) = 0; ++ break; ++ } ++ ++ if (c == '\r') continue; ++ ++ if (strchr_m("\n&", c)) break; ++ ++ ret[i++] = c; ++ ++ } ++ ++ if (ret) { ++ ret[i] = 0; ++ } ++ return ret; ++} ++ ++/** ++ URL encoded strings can have a '+', which should be replaced with a space ++ ++ (This was in rfc1738_unescape(), but that broke the squid helper) ++**/ ++ ++static void plus_to_space_unescape(char *buf) ++{ ++ char *p=buf; ++ ++ while ((p=strchr_m(p,'+'))) ++ *p = ' '; ++} ++ ++/*************************************************************************** ++ load all the variables passed to the CGI program. May have multiple variables ++ with the same name and the same or different values. Takes a file parameter ++ for simulating CGI invocation eg loading saved preferences. ++ ***************************************************************************/ ++void cgi_load_variables(void) ++{ ++ static char *line; ++ char *p, *s, *tok; ++ int len, i; ++ FILE *f = stdin; ++ ++#ifdef DEBUG_COMMENTS ++ char dummy[100]=""; ++ print_title(dummy); ++ printf("<!== Start dump in cgi_load_variables() %s ==>\n",__FILE__); ++#endif ++ ++ if (!content_length) { ++ p = getenv("CONTENT_LENGTH"); ++ len = p?atoi(p):0; ++ } else { ++ len = content_length; ++ } ++ ++ ++ if (len > 0 && ++ (request_post || ++ ((s=getenv("REQUEST_METHOD")) && ++ strequal(s,"POST")))) { ++ while (len && (line=grab_line(f, &len))) { ++ p = strchr_m(line,'='); ++ if (!p) continue; ++ ++ *p = 0; ++ ++ variables[num_variables].name = SMB_STRDUP(line); ++ variables[num_variables].value = SMB_STRDUP(p+1); ++ ++ SAFE_FREE(line); ++ ++ if (!variables[num_variables].name || ++ !variables[num_variables].value) ++ continue; ++ ++ plus_to_space_unescape(variables[num_variables].value); ++ rfc1738_unescape(variables[num_variables].value); ++ plus_to_space_unescape(variables[num_variables].name); ++ rfc1738_unescape(variables[num_variables].name); ++ ++#ifdef DEBUG_COMMENTS ++ printf("<!== POST var %s has value \"%s\" ==>\n", ++ variables[num_variables].name, ++ variables[num_variables].value); ++#endif ++ ++ num_variables++; ++ if (num_variables == MAX_VARIABLES) break; ++ } ++ } ++ ++ fclose(stdin); ++ open("/dev/null", O_RDWR); ++ ++ if ((s=query_string) || (s=getenv("QUERY_STRING"))) { ++ char *saveptr; ++ for (tok=strtok_r(s, "&;", &saveptr); tok; ++ tok=strtok_r(NULL, "&;", &saveptr)) { ++ p = strchr_m(tok,'='); ++ if (!p) continue; ++ ++ *p = 0; ++ ++ variables[num_variables].name = SMB_STRDUP(tok); ++ variables[num_variables].value = SMB_STRDUP(p+1); ++ ++ if (!variables[num_variables].name || ++ !variables[num_variables].value) ++ continue; ++ ++ plus_to_space_unescape(variables[num_variables].value); ++ rfc1738_unescape(variables[num_variables].value); ++ plus_to_space_unescape(variables[num_variables].name); ++ rfc1738_unescape(variables[num_variables].name); ++ ++#ifdef DEBUG_COMMENTS ++ printf("<!== Commandline var %s has value \"%s\" ==>\n", ++ variables[num_variables].name, ++ variables[num_variables].value); ++#endif ++ num_variables++; ++ if (num_variables == MAX_VARIABLES) break; ++ } ++ ++ } ++#ifdef DEBUG_COMMENTS ++ printf("<!== End dump in cgi_load_variables() ==>\n"); ++#endif ++ ++ /* variables from the client are in UTF-8 - convert them ++ to our internal unix charset before use */ ++ for (i=0;i<num_variables;i++) { ++ TALLOC_CTX *frame = talloc_stackframe(); ++ char *dest = NULL; ++ size_t dest_len; ++ ++ convert_string_talloc(frame, CH_UTF8, CH_UNIX, ++ variables[i].name, strlen(variables[i].name), ++ &dest, &dest_len); ++ SAFE_FREE(variables[i].name); ++ variables[i].name = SMB_STRDUP(dest ? dest : ""); ++ ++ dest = NULL; ++ convert_string_talloc(frame, CH_UTF8, CH_UNIX, ++ variables[i].value, strlen(variables[i].value), ++ &dest, &dest_len); ++ SAFE_FREE(variables[i].value); ++ variables[i].value = SMB_STRDUP(dest ? dest : ""); ++ TALLOC_FREE(frame); ++ } ++} ++ ++ ++/*************************************************************************** ++ find a variable passed via CGI ++ Doesn't quite do what you think in the case of POST text variables, because ++ if they exist they might have a value of "" or even " ", depending on the ++ browser. Also doesn't allow for variables[] containing multiple variables ++ with the same name and the same or different values. ++ ***************************************************************************/ ++ ++const char *cgi_variable(const char *name) ++{ ++ int i; ++ ++ for (i=0;i<num_variables;i++) ++ if (strcmp(variables[i].name, name) == 0) ++ return variables[i].value; ++ return NULL; ++} ++ ++/*************************************************************************** ++ Version of the above that can't return a NULL pointer. ++***************************************************************************/ ++ ++const char *cgi_variable_nonull(const char *name) ++{ ++ const char *var = cgi_variable(name); ++ if (var) { ++ return var; ++ } else { ++ return ""; ++ } ++} ++ ++/*************************************************************************** ++tell a browser about a fatal error in the http processing ++ ***************************************************************************/ ++static void cgi_setup_error(const char *err, const char *header, const char *info) ++{ ++ if (!got_request) { ++ /* damn browsers don't like getting cut off before they give a request */ ++ char line[1024]; ++ while (fgets(line, sizeof(line)-1, stdin)) { ++ if (strnequal(line,"GET ", 4) || ++ strnequal(line,"POST ", 5) || ++ strnequal(line,"PUT ", 4)) { ++ break; ++ } ++ } ++ } ++ ++ printf("HTTP/1.0 %s\r\n%sConnection: close\r\nContent-Type: text/html\r\n\r\n<HTML><HEAD><TITLE>%s</TITLE></HEAD><BODY><H1>%s</H1>%s<p></BODY></HTML>\r\n\r\n", err, header, err, err, info); ++ fclose(stdin); ++ fclose(stdout); ++ exit(0); ++} ++ ++ ++/*************************************************************************** ++tell a browser about a fatal authentication error ++ ***************************************************************************/ ++static void cgi_auth_error(void) ++{ ++ if (inetd_server) { ++ cgi_setup_error("401 Authorization Required", ++ "WWW-Authenticate: Basic realm=\"SWAT\"\r\n", ++ "You must be authenticated to use this service"); ++ } else { ++ printf("Content-Type: text/html\r\n"); ++ ++ printf("\r\n<HTML><HEAD><TITLE>SWAT</TITLE></HEAD>\n"); ++ printf("<BODY><H1>Installation Error</H1>\n"); ++ printf("SWAT must be installed via inetd. It cannot be run as a CGI script<p>\n"); ++ printf("</BODY></HTML>\r\n"); ++ } ++ exit(0); ++} ++ ++/*************************************************************************** ++authenticate when we are running as a CGI ++ ***************************************************************************/ ++static void cgi_web_auth(void) ++{ ++ const char *user = getenv("REMOTE_USER"); ++ struct passwd *pwd; ++ const char *head = "Content-Type: text/html\r\n\r\n<HTML><BODY><H1>SWAT installation Error</H1>\n"; ++ const char *tail = "</BODY></HTML>\r\n"; ++ ++ if (!user) { ++ printf("%sREMOTE_USER not set. Not authenticated by web server.<br>%s\n", ++ head, tail); ++ exit(0); ++ } ++ ++ pwd = Get_Pwnam_alloc(talloc_tos(), user); ++ if (!pwd) { ++ printf("%sCannot find user %s<br>%s\n", head, user, tail); ++ exit(0); ++ } ++ ++ C_user = SMB_STRDUP(user); ++ ++ if (!samba_setuid(0)) { ++ C_pass = secrets_fetch_generic("root", "SWAT"); ++ if (C_pass == NULL) { ++ char *tmp_pass = NULL; ++ tmp_pass = generate_random_password(talloc_tos(), ++ 16, 16); ++ if (tmp_pass == NULL) { ++ printf("%sFailed to create random nonce for " ++ "SWAT session\n<br>%s\n", head, tail); ++ exit(0); ++ } ++ secrets_store_generic("root", "SWAT", tmp_pass); ++ C_pass = SMB_STRDUP(tmp_pass); ++ TALLOC_FREE(tmp_pass); ++ } ++ } ++ samba_setuid(pwd->pw_uid); ++ if (geteuid() != pwd->pw_uid || getuid() != pwd->pw_uid) { ++ printf("%sFailed to become user %s - uid=%d/%d<br>%s\n", ++ head, user, (int)geteuid(), (int)getuid(), tail); ++ exit(0); ++ } ++ TALLOC_FREE(pwd); ++} ++ ++ ++/*************************************************************************** ++handle a http authentication line ++ ***************************************************************************/ ++static bool cgi_handle_authorization(char *line) ++{ ++ char *p; ++ fstring user, user_pass; ++ struct passwd *pass = NULL; ++ const char *rhost; ++ char addr[INET6_ADDRSTRLEN]; ++ size_t size = 0; ++ ++ if (!strnequal(line,"Basic ", 6)) { ++ goto err; ++ } ++ line += 6; ++ while (line[0] == ' ') line++; ++ base64_decode_inplace(line); ++ if (!(p=strchr_m(line,':'))) { ++ /* ++ * Always give the same error so a cracker ++ * cannot tell why we fail. ++ */ ++ goto err; ++ } ++ *p = 0; ++ ++ if (!convert_string(CH_UTF8, CH_UNIX, ++ line, -1, ++ user, sizeof(user), &size)) { ++ goto err; ++ } ++ ++ if (!convert_string(CH_UTF8, CH_UNIX, ++ p+1, -1, ++ user_pass, sizeof(user_pass), &size)) { ++ goto err; ++ } ++ ++ /* ++ * Try and get the user from the UNIX password file. ++ */ ++ ++ pass = Get_Pwnam_alloc(talloc_tos(), user); ++ ++ rhost = client_name(1); ++ if (strequal(rhost,"UNKNOWN")) ++ rhost = client_addr(1, addr, sizeof(addr)); ++ ++ /* ++ * Validate the password they have given. ++ */ ++ ++ if NT_STATUS_IS_OK(pass_check(pass, user, rhost, user_pass, false)) { ++ if (pass) { ++ /* ++ * Password was ok. ++ */ ++ ++ if ( initgroups(pass->pw_name, pass->pw_gid) != 0 ) ++ goto err; ++ ++ become_user_permanently(pass->pw_uid, pass->pw_gid); ++ ++ /* Save the users name */ ++ C_user = SMB_STRDUP(user); ++ C_pass = SMB_STRDUP(user_pass); ++ TALLOC_FREE(pass); ++ return True; ++ } ++ } ++ ++err: ++ cgi_setup_error("401 Bad Authorization", ++ "WWW-Authenticate: Basic realm=\"SWAT\"\r\n", ++ "username or password incorrect"); ++ ++ TALLOC_FREE(pass); ++ return False; ++} ++ ++/*************************************************************************** ++is this root? ++ ***************************************************************************/ ++bool am_root(void) ++{ ++ if (geteuid() == 0) { ++ return( True); ++ } else { ++ return( False); ++ } ++} ++ ++/*************************************************************************** ++return a ptr to the users name ++ ***************************************************************************/ ++char *cgi_user_name(void) ++{ ++ return(C_user); ++} ++ ++/*************************************************************************** ++return a ptr to the users password ++ ***************************************************************************/ ++char *cgi_user_pass(void) ++{ ++ return(C_pass); ++} ++ ++/*************************************************************************** ++handle a file download ++ ***************************************************************************/ ++static void cgi_download(char *file) ++{ ++ SMB_STRUCT_STAT st; ++ char buf[1024]; ++ int fd, l, i; ++ char *p; ++ char *lang; ++ ++ /* sanitise the filename */ ++ for (i=0;file[i];i++) { ++ if (!isalnum((int)file[i]) && !strchr_m("/.-_", file[i])) { ++ cgi_setup_error("404 File Not Found","", ++ "Illegal character in filename"); ++ } ++ } ++ ++ if (sys_stat(file, &st, false) != 0) { ++ cgi_setup_error("404 File Not Found","", ++ "The requested file was not found"); ++ } ++ ++ if (S_ISDIR(st.st_ex_mode)) ++ { ++ snprintf(buf, sizeof(buf), "%s/index.html", file); ++ if (!file_exist_stat(buf, &st, false) ++ || !S_ISREG(st.st_ex_mode)) ++ { ++ cgi_setup_error("404 File Not Found","", ++ "The requested file was not found"); ++ } ++ } ++ else if (S_ISREG(st.st_ex_mode)) ++ { ++ snprintf(buf, sizeof(buf), "%s", file); ++ } ++ else ++ { ++ cgi_setup_error("404 File Not Found","", ++ "The requested file was not found"); ++ } ++ ++ fd = web_open(buf,O_RDONLY,0); ++ if (fd == -1) { ++ cgi_setup_error("404 File Not Found","", ++ "The requested file was not found"); ++ } ++ printf("HTTP/1.0 200 OK\r\n"); ++ if ((p=strrchr_m(buf, '.'))) { ++ if (strcmp(p,".gif")==0) { ++ printf("Content-Type: image/gif\r\n"); ++ } else if (strcmp(p,".jpg")==0) { ++ printf("Content-Type: image/jpeg\r\n"); ++ } else if (strcmp(p,".png")==0) { ++ printf("Content-Type: image/png\r\n"); ++ } else if (strcmp(p,".css")==0) { ++ printf("Content-Type: text/css\r\n"); ++ } else if (strcmp(p,".txt")==0) { ++ printf("Content-Type: text/plain\r\n"); ++ } else { ++ printf("Content-Type: text/html\r\n"); ++ } ++ } ++ printf("Expires: %s\r\n", ++ http_timestring(talloc_tos(), time(NULL)+EXPIRY_TIME)); ++ ++ lang = lang_tdb_current(); ++ if (lang) { ++ printf("Content-Language: %s\r\n", lang); ++ } ++ ++ printf("Content-Length: %d\r\n\r\n", (int)st.st_ex_size); ++ while ((l=read(fd,buf,sizeof(buf)))>0) { ++ if (fwrite(buf, 1, l, stdout) != l) { ++ break; ++ } ++ } ++ close(fd); ++ exit(0); ++} ++ ++ ++ ++/* return true if the char* contains ip addrs only. Used to avoid ++name lookup calls */ ++ ++static bool only_ipaddrs_in_list(const char **list) ++{ ++ bool only_ip = true; ++ ++ if (!list) { ++ return true; ++ } ++ ++ for (; *list ; list++) { ++ /* factor out the special strings */ ++ if (strequal(*list, "ALL") || strequal(*list, "FAIL") || ++ strequal(*list, "EXCEPT")) { ++ continue; ++ } ++ ++ if (!is_ipaddress(*list)) { ++ /* ++ * If we failed, make sure that it was not because ++ * the token was a network/netmask pair. Only ++ * network/netmask pairs have a '/' in them. ++ */ ++ if ((strchr_m(*list, '/')) == NULL) { ++ only_ip = false; ++ DEBUG(3,("only_ipaddrs_in_list: list has " ++ "non-ip address (%s)\n", ++ *list)); ++ break; ++ } ++ } ++ } ++ ++ return only_ip; ++} ++ ++/* return true if access should be allowed to a service for a socket */ ++static bool check_access(int sock, const char **allow_list, ++ const char **deny_list) ++{ ++ bool ret = false; ++ bool only_ip = false; ++ char addr[INET6_ADDRSTRLEN]; ++ ++ if ((!deny_list || *deny_list==0) && (!allow_list || *allow_list==0)) { ++ return true; ++ } ++ ++ /* Bypass name resolution calls if the lists ++ * only contain IP addrs */ ++ if (only_ipaddrs_in_list(allow_list) && ++ only_ipaddrs_in_list(deny_list)) { ++ only_ip = true; ++ DEBUG (3, ("check_access: no hostnames " ++ "in host allow/deny list.\n")); ++ ret = allow_access(deny_list, ++ allow_list, ++ "", ++ get_peer_addr(sock,addr,sizeof(addr))); ++ } else { ++ DEBUG (3, ("check_access: hostnames in " ++ "host allow/deny list.\n")); ++ ret = allow_access(deny_list, ++ allow_list, ++ get_peer_name(sock,true), ++ get_peer_addr(sock,addr,sizeof(addr))); ++ } ++ ++ if (ret) { ++ DEBUG(2,("Allowed connection from %s (%s)\n", ++ only_ip ? "" : get_peer_name(sock,true), ++ get_peer_addr(sock,addr,sizeof(addr)))); ++ } else { ++ DEBUG(0,("Denied connection from %s (%s)\n", ++ only_ip ? "" : get_peer_name(sock,true), ++ get_peer_addr(sock,addr,sizeof(addr)))); ++ } ++ ++ return(ret); ++} ++ ++/** ++ * @brief Setup the CGI framework. ++ * ++ * Setup the cgi framework, handling the possibility that this program ++ * is either run as a true CGI program with a gateway to a web server, or ++ * is itself a mini web server. ++ **/ ++void cgi_setup(const char *rootdir, int auth_required) ++{ ++ bool authenticated = False; ++ char line[1024]; ++ char *url=NULL; ++ char *p; ++ char *lang; ++ ++ if (chdir(rootdir)) { ++ cgi_setup_error("500 Server Error", "", ++ "chdir failed - the server is not configured correctly"); ++ } ++ ++ /* Handle the possibility we might be running as non-root */ ++ sec_init(); ++ ++ if ((lang=getenv("HTTP_ACCEPT_LANGUAGE"))) { ++ /* if running as a cgi program */ ++ web_set_lang(lang); ++ } ++ ++ /* maybe we are running under a web server */ ++ if (getenv("CONTENT_LENGTH") || getenv("REQUEST_METHOD")) { ++ if (auth_required) { ++ cgi_web_auth(); ++ } ++ return; ++ } ++ ++ inetd_server = True; ++ ++ if (!check_access(1, lp_hostsallow(-1), lp_hostsdeny(-1))) { ++ cgi_setup_error("403 Forbidden", "", ++ "Samba is configured to deny access from this client\n<br>Check your \"hosts allow\" and \"hosts deny\" options in smb.conf "); ++ } ++ ++ /* we are a mini-web server. We need to read the request from stdin ++ and handle authentication etc */ ++ while (fgets(line, sizeof(line)-1, stdin)) { ++ if (line[0] == '\r' || line[0] == '\n') break; ++ if (strnequal(line,"GET ", 4)) { ++ got_request = True; ++ url = SMB_STRDUP(&line[4]); ++ } else if (strnequal(line,"POST ", 5)) { ++ got_request = True; ++ request_post = 1; ++ url = SMB_STRDUP(&line[5]); ++ } else if (strnequal(line,"PUT ", 4)) { ++ got_request = True; ++ cgi_setup_error("400 Bad Request", "", ++ "This server does not accept PUT requests"); ++ } else if (strnequal(line,"Authorization: ", 15)) { ++ authenticated = cgi_handle_authorization(&line[15]); ++ } else if (strnequal(line,"Content-Length: ", 16)) { ++ content_length = atoi(&line[16]); ++ } else if (strnequal(line,"Accept-Language: ", 17)) { ++ web_set_lang(&line[17]); ++ } ++ /* ignore all other requests! */ ++ } ++ ++ if (auth_required && !authenticated) { ++ cgi_auth_error(); ++ } ++ ++ if (!url) { ++ cgi_setup_error("400 Bad Request", "", ++ "You must specify a GET or POST request"); ++ } ++ ++ /* trim the URL */ ++ if ((p = strchr_m(url,' ')) || (p=strchr_m(url,'\t'))) { ++ *p = 0; ++ } ++ while (*url && strchr_m("\r\n",url[strlen(url)-1])) { ++ url[strlen(url)-1] = 0; ++ } ++ ++ /* anything following a ? in the URL is part of the query string */ ++ if ((p=strchr_m(url,'?'))) { ++ query_string = p+1; ++ *p = 0; ++ } ++ ++ string_sub(url, "/swat/", "", 0); ++ ++ if (url[0] != '/' && strstr(url,"..")==0) { ++ cgi_download(url); ++ } ++ ++ printf("HTTP/1.0 200 OK\r\nConnection: close\r\n"); ++ printf("Date: %s\r\n", http_timestring(talloc_tos(), time(NULL))); ++ baseurl = ""; ++ pathinfo = url+1; ++} ++ ++ ++/*************************************************************************** ++return the current pages URL ++ ***************************************************************************/ ++const char *cgi_baseurl(void) ++{ ++ if (inetd_server) { ++ return baseurl; ++ } ++ return getenv("SCRIPT_NAME"); ++} ++ ++/*************************************************************************** ++return the current pages path info ++ ***************************************************************************/ ++const char *cgi_pathinfo(void) ++{ ++ char *r; ++ if (inetd_server) { ++ return pathinfo; ++ } ++ r = getenv("PATH_INFO"); ++ if (!r) return ""; ++ if (*r == '/') r++; ++ return r; ++} ++ ++/*************************************************************************** ++return the hostname of the client ++ ***************************************************************************/ ++const char *cgi_remote_host(void) ++{ ++ if (inetd_server) { ++ return get_peer_name(1,False); ++ } ++ return getenv("REMOTE_HOST"); ++} ++ ++/*************************************************************************** ++return the hostname of the client ++ ***************************************************************************/ ++const char *cgi_remote_addr(void) ++{ ++ if (inetd_server) { ++ char addr[INET6_ADDRSTRLEN]; ++ get_peer_addr(1,addr,sizeof(addr)); ++ return talloc_strdup(talloc_tos(), addr); ++ } ++ return getenv("REMOTE_ADDR"); ++} ++ ++ ++/*************************************************************************** ++return True if the request was a POST ++ ***************************************************************************/ ++bool cgi_waspost(void) ++{ ++ if (inetd_server) { ++ return request_post; ++ } ++ return strequal(getenv("REQUEST_METHOD"), "POST"); ++} +diff --git a/source3/web/diagnose.c b/source3/web/diagnose.c +new file mode 100644 +index 0000000..955ff89 +--- /dev/null ++++ b/source3/web/diagnose.c +@@ -0,0 +1,80 @@ ++/* ++ Unix SMB/CIFS implementation. ++ diagnosis tools for web admin ++ Copyright (C) Andrew Tridgell 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 3 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, see <http://www.gnu.org/licenses/>. ++*/ ++ ++#include "includes.h" ++#include "web/swat_proto.h" ++#include "lib/winbind_util.h" ++#include "libsmb/libsmb.h" ++ ++#ifdef WITH_WINBIND ++ ++/* check to see if winbind is running by pinging it */ ++ ++bool winbindd_running(void) ++{ ++ return winbind_ping(); ++} ++#endif ++ ++/* check to see if nmbd is running on localhost by looking for a __SAMBA__ ++ response */ ++bool nmbd_running(void) ++{ ++ struct in_addr loopback_ip; ++ int count; ++ struct sockaddr_storage *ss_list; ++ struct sockaddr_storage ss; ++ NTSTATUS status; ++ ++ loopback_ip.s_addr = htonl(INADDR_LOOPBACK); ++ in_addr_to_sockaddr_storage(&ss, loopback_ip); ++ ++ status = name_query("__SAMBA__", 0, ++ True, True, &ss, ++ talloc_tos(), &ss_list, &count, ++ NULL); ++ if (NT_STATUS_IS_OK(status)) { ++ TALLOC_FREE(ss_list); ++ return True; ++ } ++ ++ return False; ++} ++ ++ ++/* check to see if smbd is running on localhost by trying to open a connection ++ then closing it */ ++bool smbd_running(void) ++{ ++ struct in_addr loopback_ip; ++ NTSTATUS status; ++ struct cli_state *cli; ++ struct sockaddr_storage ss; ++ ++ loopback_ip.s_addr = htonl(INADDR_LOOPBACK); ++ in_addr_to_sockaddr_storage(&ss, loopback_ip); ++ ++ status = cli_connect_nb("localhost", &ss, 0, 0x20, lp_netbios_name(), ++ SMB_SIGNING_DEFAULT, 0, &cli); ++ if (!NT_STATUS_IS_OK(status)) { ++ return false; ++ } ++ cli_shutdown(cli); ++ return True; ++} +diff --git a/source3/web/neg_lang.c b/source3/web/neg_lang.c +new file mode 100644 +index 0000000..c415449 +--- /dev/null ++++ b/source3/web/neg_lang.c +@@ -0,0 +1,120 @@ ++/* ++ Unix SMB/CIFS implementation. ++ SWAT language handling ++ ++ 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 3 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, see <http://www.gnu.org/licenses/>. ++ ++ Created by Ryo Kawahara <rkawa@lbe.co.jp> ++*/ ++ ++#include "includes.h" ++#include "web/swat_proto.h" ++#include "intl/lang_tdb.h" ++#include "system/filesys.h" ++ ++/* ++ during a file download we first check to see if there is a language ++ specific file available. If there is then use that, otherwise ++ just open the specified file ++*/ ++int web_open(const char *fname, int flags, mode_t mode) ++{ ++ char *p = NULL; ++ char *lang = lang_tdb_current(); ++ int fd; ++ if (lang) { ++ if (asprintf(&p, "lang/%s/%s", lang, fname) != -1) { ++ fd = open(p, flags, mode); ++ free(p); ++ if (fd != -1) { ++ return fd; ++ } ++ } ++ } ++ ++ /* fall through to default name */ ++ return open(fname, flags, mode); ++} ++ ++ ++struct pri_list { ++ float pri; ++ char *string; ++}; ++ ++static int qsort_cmp_list(struct pri_list *a, struct pri_list *b) ++{ ++ if (a->pri > b->pri) return -1; ++ if (a->pri < b->pri) return 1; ++ return 0; ++} ++ ++/* ++ choose from a list of languages. The list can be comma or space ++ separated ++ Keep choosing until we get a hit ++ Changed to habdle priority -- Simo ++*/ ++ ++void web_set_lang(const char *lang_string) ++{ ++ char **lang_list, **count; ++ struct pri_list *pl; ++ int lang_num, i; ++ ++ /* build the lang list */ ++ lang_list = str_list_make_v3(talloc_tos(), lang_string, ", \t\r\n"); ++ if (!lang_list) return; ++ ++ /* sort the list by priority */ ++ lang_num = 0; ++ count = lang_list; ++ while (*count && **count) { ++ count++; ++ lang_num++; ++ } ++ pl = SMB_MALLOC_ARRAY(struct pri_list, lang_num); ++ if (!pl) { ++ return; ++ } ++ ++ for (i = 0; i < lang_num; i++) { ++ char *pri_code; ++ if ((pri_code=strstr(lang_list[i], ";q="))) { ++ *pri_code = '\0'; ++ pri_code += 3; ++ sscanf(pri_code, "%f", &(pl[i].pri)); ++ } else { ++ pl[i].pri = 1; ++ } ++ pl[i].string = SMB_STRDUP(lang_list[i]); ++ } ++ TALLOC_FREE(lang_list); ++ ++ TYPESAFE_QSORT(pl, lang_num, qsort_cmp_list); ++ ++ /* it's not an error to not initialise - we just fall back to ++ the default */ ++ ++ for (i = 0; i < lang_num; i++) { ++ if (lang_tdb_init(pl[i].string)) break; ++ } ++ ++ for (i = 0; i < lang_num; i++) { ++ SAFE_FREE(pl[i].string); ++ } ++ SAFE_FREE(pl); ++ ++ return; ++} +diff --git a/source3/web/startstop.c b/source3/web/startstop.c +new file mode 100644 +index 0000000..ec8f802 +--- /dev/null ++++ b/source3/web/startstop.c +@@ -0,0 +1,130 @@ ++/* ++ Unix SMB/CIFS implementation. ++ start/stop nmbd and smbd ++ Copyright (C) Andrew Tridgell 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 3 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, see <http://www.gnu.org/licenses/>. ++*/ ++ ++#include "includes.h" ++#include "web/swat_proto.h" ++#include "dynconfig/dynconfig.h" ++#include "../lib/util/pidfile.h" ++ ++/** Startup smbd from web interface. */ ++void start_smbd(void) ++{ ++ char *binfile = NULL; ++ ++ if (geteuid() != 0) { ++ return; ++ } ++ ++ if (fork()) { ++ return; ++ } ++ ++ if (asprintf(&binfile, "%s/smbd", get_dyn_SBINDIR()) > 0) { ++ become_daemon(true, false, false); ++ execl(binfile, binfile, "-D", NULL); ++ } ++ exit(0); ++} ++ ++/* startup nmbd */ ++void start_nmbd(void) ++{ ++ char *binfile = NULL; ++ ++ if (geteuid() != 0) { ++ return; ++ } ++ ++ if (fork()) { ++ return; ++ } ++ ++ if (asprintf(&binfile, "%s/nmbd", get_dyn_SBINDIR()) > 0) { ++ become_daemon(true, false, false); ++ execl(binfile, binfile, "-D", NULL); ++ } ++ exit(0); ++} ++ ++/** Startup winbindd from web interface. */ ++void start_winbindd(void) ++{ ++ char *binfile = NULL; ++ ++ if (geteuid() != 0) { ++ return; ++ } ++ ++ if (fork()) { ++ return; ++ } ++ ++ if (asprintf(&binfile, "%s/winbindd", get_dyn_SBINDIR()) > 0) { ++ become_daemon(true, false, false); ++ execl(binfile, binfile, NULL); ++ } ++ exit(0); ++} ++ ++ ++/* stop smbd */ ++void stop_smbd(void) ++{ ++ pid_t pid = pidfile_pid(lp_piddir(), "smbd"); ++ ++ if (geteuid() != 0) return; ++ ++ if (pid <= 0) return; ++ ++ kill(pid, SIGTERM); ++} ++ ++/* stop nmbd */ ++void stop_nmbd(void) ++{ ++ pid_t pid = pidfile_pid(lp_piddir(), "nmbd"); ++ ++ if (geteuid() != 0) return; ++ ++ if (pid <= 0) return; ++ ++ kill(pid, SIGTERM); ++} ++#ifdef WITH_WINBIND ++/* stop winbindd */ ++void stop_winbindd(void) ++{ ++ pid_t pid = pidfile_pid(lp_piddir(), "winbindd"); ++ ++ if (geteuid() != 0) return; ++ ++ if (pid <= 0) return; ++ ++ kill(pid, SIGTERM); ++} ++#endif ++/* kill a specified process */ ++void kill_pid(struct server_id pid) ++{ ++ if (geteuid() != 0) return; ++ ++ if (procid_to_pid(&pid) <= 0) return; ++ ++ kill(procid_to_pid(&pid), SIGTERM); ++} +diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c +new file mode 100644 +index 0000000..d257970 +--- /dev/null ++++ b/source3/web/statuspage.c +@@ -0,0 +1,467 @@ ++/* ++ Unix SMB/CIFS implementation. ++ web status page ++ Copyright (C) Andrew Tridgell 1997-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 3 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, see <http://www.gnu.org/licenses/>. ++*/ ++ ++#include "includes.h" ++#include "web/swat_proto.h" ++#include "libcli/security/security.h" ++#include "locking/proto.h" ++#include "librpc/gen_ndr/open_files.h" ++#include "lib/conn_tdb.h" ++#include "../lib/util/pidfile.h" ++ ++#define _(x) lang_msg_rotate(talloc_tos(),x) ++ ++#define PIDMAP struct PidMap ++ ++/* how long to wait for start/stops to take effect */ ++#define SLEEP_TIME 3 ++ ++PIDMAP { ++ PIDMAP *next, *prev; ++ struct server_id pid; ++ char *machine; ++}; ++ ++static PIDMAP *pidmap; ++static int PID_or_Machine; /* 0 = show PID, else show Machine name */ ++ ++static struct server_id smbd_pid; ++ ++/* from 2nd call on, remove old list */ ++static void initPid2Machine (void) ++{ ++ /* show machine name rather PID on table "Open Files"? */ ++ if (PID_or_Machine) { ++ PIDMAP *p, *next; ++ ++ for (p = pidmap; p != NULL; p = next) { ++ next = p->next; ++ DLIST_REMOVE(pidmap, p); ++ SAFE_FREE(p->machine); ++ SAFE_FREE(p); ++ } ++ ++ pidmap = NULL; ++ } ++} ++ ++/* add new PID <-> Machine name mapping */ ++static void addPid2Machine (struct server_id pid, const char *machine) ++{ ++ /* show machine name rather PID on table "Open Files"? */ ++ if (PID_or_Machine) { ++ PIDMAP *newmap; ++ ++ if ((newmap = SMB_MALLOC_P(PIDMAP)) == NULL) { ++ /* XXX need error message for this? ++ if malloc fails, PID is always shown */ ++ return; ++ } ++ ++ newmap->pid = pid; ++ newmap->machine = SMB_STRDUP(machine); ++ ++ DLIST_ADD(pidmap, newmap); ++ } ++} ++ ++/* lookup PID <-> Machine name mapping */ ++static char *mapPid2Machine (struct server_id pid) ++{ ++ static char pidbuf [64]; ++ PIDMAP *map; ++ ++ /* show machine name rather PID on table "Open Files"? */ ++ if (PID_or_Machine) { ++ for (map = pidmap; map != NULL; map = map->next) { ++ if (serverid_equal(&pid, &map->pid)) { ++ if (map->machine == NULL) /* no machine name */ ++ break; /* show PID */ ++ ++ return map->machine; ++ } ++ } ++ } ++ ++ /* PID not in list or machine name NULL? return pid as string */ ++ snprintf (pidbuf, sizeof (pidbuf) - 1, "%s", ++ procid_str_static(&pid)); ++ return pidbuf; ++} ++ ++static const char *tstring(TALLOC_CTX *ctx, time_t t) ++{ ++ char *buf; ++ buf = talloc_strdup(ctx, time_to_asc(t)); ++ if (!buf) { ++ return ""; ++ } ++ buf = talloc_all_string_sub(ctx, ++ buf, ++ " ", ++ " "); ++ if (!buf) { ++ return ""; ++ } ++ return buf; ++} ++ ++static void print_share_mode(const struct share_mode_entry *e, ++ const char *sharepath, ++ const char *fname, ++ void *dummy) ++{ ++ char *utf8_fname; ++ char *utf8_sharepath; ++ int deny_mode; ++ size_t converted_size; ++ ++ if (!is_valid_share_mode_entry(e)) { ++ return; ++ } ++ ++ deny_mode = map_share_mode_to_deny_mode(e->share_access, ++ e->private_options); ++ ++ printf("<tr><td>%s</td>",_(mapPid2Machine(e->pid))); ++ printf("<td>%u</td>",(unsigned int)e->uid); ++ printf("<td>"); ++ switch ((deny_mode>>4)&0xF) { ++ case DENY_NONE: printf("DENY_NONE"); break; ++ case DENY_ALL: printf("DENY_ALL "); break; ++ case DENY_DOS: printf("DENY_DOS "); break; ++ case DENY_FCB: printf("DENY_FCB "); break; ++ case DENY_READ: printf("DENY_READ "); break; ++ case DENY_WRITE:printf("DENY_WRITE "); break; ++ } ++ printf("</td>"); ++ ++ printf("<td>"); ++ if (e->access_mask & (FILE_READ_DATA|FILE_WRITE_DATA)) { ++ printf("%s", _("RDWR ")); ++ } else if (e->access_mask & FILE_WRITE_DATA) { ++ printf("%s", _("WRONLY ")); ++ } else { ++ printf("%s", _("RDONLY ")); ++ } ++ printf("</td>"); ++ ++ printf("<td>"); ++ if((e->op_type & ++ (EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) == ++ (EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) ++ printf("EXCLUSIVE+BATCH "); ++ else if (e->op_type & EXCLUSIVE_OPLOCK) ++ printf("EXCLUSIVE "); ++ else if (e->op_type & BATCH_OPLOCK) ++ printf("BATCH "); ++ else if (e->op_type & LEVEL_II_OPLOCK) ++ printf("LEVEL_II "); ++ else ++ printf("NONE "); ++ printf("</td>"); ++ ++ push_utf8_talloc(talloc_tos(), &utf8_fname, fname, &converted_size); ++ push_utf8_talloc(talloc_tos(), &utf8_sharepath, sharepath, ++ &converted_size); ++ printf("<td>%s</td><td>%s</td><td>%s</td></tr>\n", ++ utf8_sharepath,utf8_fname,tstring(talloc_tos(),e->time.tv_sec)); ++ TALLOC_FREE(utf8_fname); ++} ++ ++ ++/* kill off any connections chosen by the user */ ++static int traverse_fn1(const struct connections_key *key, ++ const struct connections_data *crec, ++ void *private_data) ++{ ++ if (crec->cnum == TID_FIELD_INVALID && process_exists(crec->pid)) { ++ char buf[30]; ++ slprintf(buf,sizeof(buf)-1,"kill_%s", procid_str_static(&crec->pid)); ++ if (cgi_variable(buf)) { ++ kill_pid(crec->pid); ++ sleep(SLEEP_TIME); ++ } ++ } ++ return 0; ++} ++ ++/* traversal fn for showing machine connections */ ++static int traverse_fn2(const struct connections_key *key, ++ const struct connections_data *crec, ++ void *private_data) ++{ ++ if (crec->cnum == TID_FIELD_INVALID || !process_exists(crec->pid) || ++ serverid_equal(&crec->pid, &smbd_pid)) ++ return 0; ++ ++ addPid2Machine (crec->pid, crec->machine); ++ ++ printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td>\n", ++ procid_str_static(&crec->pid), ++ crec->machine, crec->addr, ++ tstring(talloc_tos(),crec->start)); ++ if (geteuid() == 0) { ++ printf("<td><input type=submit value=\"X\" name=\"kill_%s\"></td>\n", ++ procid_str_static(&crec->pid)); ++ } ++ printf("</tr>\n"); ++ ++ return 0; ++} ++ ++/* traversal fn for showing share connections */ ++static int traverse_fn3(const struct connections_key *key, ++ const struct connections_data *crec, ++ void *private_data) ++{ ++ if (crec->cnum == TID_FIELD_INVALID || !process_exists(crec->pid)) ++ return 0; ++ ++ printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", ++ crec->servicename, uidtoname(crec->uid), ++ gidtoname(crec->gid),procid_str_static(&crec->pid), ++ crec->machine, ++ tstring(talloc_tos(),crec->start)); ++ return 0; ++} ++ ++ ++/* show the current server status */ ++void status_page(void) ++{ ++ const char *v; ++ int autorefresh=0; ++ int refresh_interval=30; ++ int nr_running=0; ++ bool waitup = False; ++ TALLOC_CTX *ctx = talloc_stackframe(); ++ const char form_name[] = "status"; ++ ++ smbd_pid = pid_to_procid(pidfile_pid(lp_piddir(), "smbd")); ++ ++ if (!verify_xsrf_token(form_name)) { ++ goto output_page; ++ } ++ ++ if (cgi_variable("smbd_restart") || cgi_variable("all_restart")) { ++ stop_smbd(); ++ start_smbd(); ++ waitup=True; ++ } ++ ++ if (cgi_variable("smbd_start") || cgi_variable("all_start")) { ++ start_smbd(); ++ waitup=True; ++ } ++ ++ if (cgi_variable("smbd_stop") || cgi_variable("all_stop")) { ++ stop_smbd(); ++ waitup=True; ++ } ++ ++ if (cgi_variable("nmbd_restart") || cgi_variable("all_restart")) { ++ stop_nmbd(); ++ start_nmbd(); ++ waitup=True; ++ } ++ if (cgi_variable("nmbd_start") || cgi_variable("all_start")) { ++ start_nmbd(); ++ waitup=True; ++ } ++ ++ if (cgi_variable("nmbd_stop")|| cgi_variable("all_stop")) { ++ stop_nmbd(); ++ waitup=True; ++ } ++ ++#ifdef WITH_WINBIND ++ if (cgi_variable("winbindd_restart") || cgi_variable("all_restart")) { ++ stop_winbindd(); ++ start_winbindd(); ++ waitup=True; ++ } ++ ++ if (cgi_variable("winbindd_start") || cgi_variable("all_start")) { ++ start_winbindd(); ++ waitup=True; ++ } ++ ++ if (cgi_variable("winbindd_stop") || cgi_variable("all_stop")) { ++ stop_winbindd(); ++ waitup=True; ++ } ++#endif ++ /* wait for daemons to start/stop */ ++ if (waitup) ++ sleep(SLEEP_TIME); ++ ++ if (cgi_variable("autorefresh")) { ++ autorefresh = 1; ++ } else if (cgi_variable("norefresh")) { ++ autorefresh = 0; ++ } else if (cgi_variable("refresh")) { ++ autorefresh = 1; ++ } ++ ++ if ((v=cgi_variable("refresh_interval"))) { ++ refresh_interval = atoi(v); ++ } ++ ++ if (cgi_variable("show_client_in_col_1")) { ++ PID_or_Machine = 1; ++ } ++ ++ if (cgi_variable("show_pid_in_col_1")) { ++ PID_or_Machine = 0; ++ } ++ ++ connections_forall_read(traverse_fn1, NULL); ++ ++ initPid2Machine (); ++ ++output_page: ++ printf("<H2>%s</H2>\n", _("Server Status")); ++ ++ printf("<FORM method=post>\n"); ++ print_xsrf_token(cgi_user_name(), cgi_user_pass(), form_name); ++ ++ if (!autorefresh) { ++ printf("<input type=submit value=\"%s\" name=\"autorefresh\">\n", _("Auto Refresh")); ++ printf("<br>%s", _("Refresh Interval: ")); ++ printf("<input type=text size=2 name=\"refresh_interval\" value=\"%d\">\n", ++ refresh_interval); ++ } else { ++ printf("<input type=submit value=\"%s\" name=\"norefresh\">\n", _("Stop Refreshing")); ++ printf("<br>%s%d\n", _("Refresh Interval: "), refresh_interval); ++ printf("<input type=hidden name=\"refresh\" value=\"1\">\n"); ++ } ++ ++ printf("<p>\n"); ++ ++ printf("<table>\n"); ++ ++ printf("<tr><td>%s</td><td>%s</td></tr>", _("version:"), samba_version_string()); ++ ++ fflush(stdout); ++ printf("<tr><td>%s</td><td>%s</td>\n", _("smbd:"), smbd_running()?_("running"):_("not running")); ++ if (geteuid() == 0) { ++ if (smbd_running()) { ++ nr_running++; ++ printf("<td><input type=submit name=\"smbd_stop\" value=\"%s\"></td>\n", _("Stop smbd")); ++ } else { ++ printf("<td><input type=submit name=\"smbd_start\" value=\"%s\"></td>\n", _("Start smbd")); ++ } ++ printf("<td><input type=submit name=\"smbd_restart\" value=\"%s\"></td>\n", _("Restart smbd")); ++ } ++ printf("</tr>\n"); ++ ++ fflush(stdout); ++ printf("<tr><td>%s</td><td>%s</td>\n", _("nmbd:"), nmbd_running()?_("running"):_("not running")); ++ if (geteuid() == 0) { ++ if (nmbd_running()) { ++ nr_running++; ++ printf("<td><input type=submit name=\"nmbd_stop\" value=\"%s\"></td>\n", _("Stop nmbd")); ++ } else { ++ printf("<td><input type=submit name=\"nmbd_start\" value=\"%s\"></td>\n", _("Start nmbd")); ++ } ++ printf("<td><input type=submit name=\"nmbd_restart\" value=\"%s\"></td>\n", _("Restart nmbd")); ++ } ++ printf("</tr>\n"); ++ ++#ifdef WITH_WINBIND ++ fflush(stdout); ++ printf("<tr><td>%s</td><td>%s</td>\n", _("winbindd:"), winbindd_running()?_("running"):_("not running")); ++ if (geteuid() == 0) { ++ if (winbindd_running()) { ++ nr_running++; ++ printf("<td><input type=submit name=\"winbindd_stop\" value=\"%s\"></td>\n", _("Stop winbindd")); ++ } else { ++ printf("<td><input type=submit name=\"winbindd_start\" value=\"%s\"></td>\n", _("Start winbindd")); ++ } ++ printf("<td><input type=submit name=\"winbindd_restart\" value=\"%s\"></td>\n", _("Restart winbindd")); ++ } ++ printf("</tr>\n"); ++#endif ++ ++ if (geteuid() == 0) { ++ printf("<tr><td></td><td></td>\n"); ++ if (nr_running >= 1) { ++ /* stop, restart all */ ++ printf("<td><input type=submit name=\"all_stop\" value=\"%s\"></td>\n", _("Stop All")); ++ printf("<td><input type=submit name=\"all_restart\" value=\"%s\"></td>\n", _("Restart All")); ++ } ++ else if (nr_running == 0) { ++ /* start all */ ++ printf("<td><input type=submit name=\"all_start\" value=\"%s\"></td>\n", _("Start All")); ++ } ++ printf("</tr>\n"); ++ } ++ printf("</table>\n"); ++ fflush(stdout); ++ ++ printf("<p><h3>%s</h3>\n", _("Active Connections")); ++ printf("<table border=1>\n"); ++ printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th>\n", _("PID"), _("Client"), _("IP address"), _("Date")); ++ if (geteuid() == 0) { ++ printf("<th>%s</th>\n", _("Kill")); ++ } ++ printf("</tr>\n"); ++ ++ connections_forall_read(traverse_fn2, NULL); ++ ++ printf("</table><p>\n"); ++ ++ printf("<p><h3>%s</h3>\n", _("Active Shares")); ++ printf("<table border=1>\n"); ++ printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n\n", ++ _("Share"), _("User"), _("Group"), _("PID"), _("Client"), _("Date")); ++ ++ connections_forall_read(traverse_fn3, NULL); ++ ++ printf("</table><p>\n"); ++ ++ printf("<h3>%s</h3>\n", _("Open Files")); ++ printf("<table border=1>\n"); ++ printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n", ++ _("PID"), _("UID"), _("Sharing"), _("R/W"), _("Oplock"), _("Share"), _("File"), _("Date")); ++ ++ locking_init_readonly(); ++ share_mode_forall(print_share_mode, NULL); ++ locking_end(); ++ printf("</table>\n"); ++ ++ printf("<br><input type=submit name=\"show_client_in_col_1\" value=\"%s\">\n", _("Show Client in col 1")); ++ printf("<input type=submit name=\"show_pid_in_col_1\" value=\"%s\">\n", _("Show PID in col 1")); ++ ++ printf("</FORM>\n"); ++ ++ if (autorefresh) { ++ /* this little JavaScript allows for automatic refresh ++ of the page. There are other methods but this seems ++ to be the best alternative */ ++ printf("<script language=\"JavaScript\">\n"); ++ printf("<!--\nsetTimeout('window.location.replace(\"%s/status?refresh_interval=%d&refresh=1\")', %d)\n", ++ cgi_baseurl(), ++ refresh_interval, ++ refresh_interval*1000); ++ printf("//-->\n</script>\n"); ++ } ++ TALLOC_FREE(ctx); ++} +diff --git a/source3/web/swat.c b/source3/web/swat.c +index bbacdd1..90e4af9 100644 +--- a/source3/web/swat.c ++++ b/source3/web/swat.c +@@ -1,4 +1,4 @@ +-/* ++/* + Unix SMB/CIFS implementation. + Samba Web Administration Tool + Version 3.0.0 +@@ -18,41 +18,1650 @@ + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + */ ++ ++/** ++ * @defgroup swat SWAT - Samba Web Administration Tool ++ * @{ ++ * @file swat.c ++ * ++ * @brief Samba Web Administration Tool. ++ **/ ++ ++#include "includes.h" ++#include "system/filesys.h" ++#include "popt_common.h" ++#include "web/swat_proto.h" ++#include "printing/pcap.h" ++#include "printing/load.h" ++#include "passdb.h" ++#include "intl/lang_tdb.h" ++#include "../lib/crypto/md5.h" ++#include "lib/param/loadparm.h" ++#include "messages.h" ++ ++static int demo_mode = False; ++static int passwd_only = False; ++static bool have_write_access = False; ++static bool have_read_access = False; ++static int iNumNonAutoPrintServices = 0; ++ + /* +- * 1997 - 2013 SWAT +- * R.I.P. :, +- * Finally swatted, you will bug us no more. @,@ +- * +#`@ +- * @`:@ +- * ,' :@ #' +- * + @ @: @. +- * @ + ,@ .@ +- * ;` ; @; #+ +- * @@` @ @ ;@ @` +- * # :@ ' # @, ## +- * @ +. # ` ## .@ +- * # # ' ;@ @; +- *, ' # + ,@` @@ +- *' ` + : .@, #@ +- *# `@@#. : ;@: '@ +- *+. #` ,#@@@@@@@@@@@@@ #@` @@ +- * .@@. @ `#@+,` `##@+ + .@@ `@# +- * +@. @ ;@;. `:;# '`:+@ `@@, +@: +- * :@,#, +`:;;;#.@@.:' :@@: '@# +- * + ,: '+@@@@@@@@@+ ;@@+ '@@ +- * .: :@@;. @: ;;+@@; ;@@' +- * # ,#@', @# .`;#@ @ +- * # .@ '' ; @ +- * @ ,:@@@+;++..+,. @ +- * @ @+;+@+@, . ;` @' +- * @ : . @,'@ ' +- * .@@+#+''''++#@@@+;., +- * .@ @'. : :++@@# . +- * + @:#@;'+@@@@@#; +- * ` :@; .@ '# +- * ,: ,# +- * , +. +- * , : +- * ` +- * + ++ * Password Management Globals + */ ++#define SWAT_USER "username" ++#define OLD_PSWD "old_passwd" ++#define NEW_PSWD "new_passwd" ++#define NEW2_PSWD "new2_passwd" ++#define CHG_S_PASSWD_FLAG "chg_s_passwd_flag" ++#define CHG_R_PASSWD_FLAG "chg_r_passwd_flag" ++#define ADD_USER_FLAG "add_user_flag" ++#define DELETE_USER_FLAG "delete_user_flag" ++#define DISABLE_USER_FLAG "disable_user_flag" ++#define ENABLE_USER_FLAG "enable_user_flag" ++#define RHOST "remote_host" ++#define XSRF_TOKEN "xsrf" ++#define XSRF_TIME "xsrf_time" ++#define XSRF_TIMEOUT 300 ++ ++#define _(x) lang_msg_rotate(talloc_tos(),x) ++ ++/**************************************************************************** ++****************************************************************************/ ++static int enum_index(int value, const struct enum_list *enumlist) ++{ ++ int i; ++ for (i=0;enumlist[i].name;i++) ++ if (value == enumlist[i].value) break; ++ return(i); ++} ++ ++static char *fix_backslash(const char *str) ++{ ++ static char newstring[1024]; ++ char *p = newstring; ++ ++ while (*str) { ++ if (*str == '\\') {*p++ = '\\';*p++ = '\\';} ++ else *p++ = *str; ++ ++str; ++ } ++ *p = '\0'; ++ return newstring; ++} ++ ++static const char *fix_quotes(TALLOC_CTX *ctx, char *str) ++{ ++ char *newstring = NULL; ++ char *p = NULL; ++ size_t newstring_len; ++ int quote_len = strlen("""); ++ ++ /* Count the number of quotes. */ ++ newstring_len = 1; ++ p = (char *) str; ++ while (*p) { ++ if ( *p == '\"') { ++ newstring_len += quote_len; ++ } else { ++ newstring_len++; ++ } ++ ++p; ++ } ++ newstring = talloc_array(ctx, char, newstring_len); ++ if (!newstring) { ++ return ""; ++ } ++ for (p = newstring; *str; str++) { ++ if ( *str == '\"') { ++ strncpy( p, """, quote_len); ++ p += quote_len; ++ } else { ++ *p++ = *str; ++ } ++ } ++ *p = '\0'; ++ return newstring; ++} ++ ++static char *stripspaceupper(const char *str) ++{ ++ static char newstring[1024]; ++ char *p = newstring; ++ ++ while (*str) { ++ if (*str != ' ') *p++ = toupper_m(*str); ++ ++str; ++ } ++ *p = '\0'; ++ return newstring; ++} ++ ++static char *make_parm_name(const char *label) ++{ ++ static char parmname[1024]; ++ char *p = parmname; ++ ++ while (*label) { ++ if (*label == ' ') *p++ = '_'; ++ else *p++ = *label; ++ ++label; ++ } ++ *p = '\0'; ++ return parmname; ++} ++ ++void get_xsrf_token(const char *username, const char *pass, ++ const char *formname, time_t xsrf_time, char token_str[33]) ++{ ++ struct MD5Context md5_ctx; ++ uint8_t token[16]; ++ int i; ++ ++ token_str[0] = '\0'; ++ ZERO_STRUCT(md5_ctx); ++ MD5Init(&md5_ctx); ++ ++ MD5Update(&md5_ctx, (uint8_t *)formname, strlen(formname)); ++ MD5Update(&md5_ctx, (uint8_t *)&xsrf_time, sizeof(time_t)); ++ if (username != NULL) { ++ MD5Update(&md5_ctx, (uint8_t *)username, strlen(username)); ++ } ++ if (pass != NULL) { ++ MD5Update(&md5_ctx, (uint8_t *)pass, strlen(pass)); ++ } ++ ++ MD5Final(token, &md5_ctx); ++ ++ for(i = 0; i < sizeof(token); i++) { ++ char tmp[3]; ++ ++ snprintf(tmp, sizeof(tmp), "%02x", token[i]); ++ /* FIXME ! Truncate check. JRA. */ ++ (void)strlcat(token_str, tmp, sizeof(tmp)); ++ } ++} ++ ++void print_xsrf_token(const char *username, const char *pass, ++ const char *formname) ++{ ++ char token[33]; ++ time_t xsrf_time = time(NULL); ++ ++ get_xsrf_token(username, pass, formname, xsrf_time, token); ++ printf("<input type=\"hidden\" name=\"%s\" value=\"%s\">\n", ++ XSRF_TOKEN, token); ++ printf("<input type=\"hidden\" name=\"%s\" value=\"%lld\">\n", ++ XSRF_TIME, (long long int)xsrf_time); ++} ++ ++bool verify_xsrf_token(const char *formname) ++{ ++ char expected[33]; ++ const char *username = cgi_user_name(); ++ const char *pass = cgi_user_pass(); ++ const char *token = cgi_variable_nonull(XSRF_TOKEN); ++ const char *time_str = cgi_variable_nonull(XSRF_TIME); ++ char *p = NULL; ++ long long xsrf_time_ll = 0; ++ time_t xsrf_time = 0; ++ time_t now = time(NULL); ++ ++ errno = 0; ++ xsrf_time_ll = strtoll(time_str, &p, 10); ++ if (errno != 0) { ++ return false; ++ } ++ if (p == NULL) { ++ return false; ++ } ++ if (PTR_DIFF(p, time_str) > strlen(time_str)) { ++ return false; ++ } ++ if (xsrf_time_ll > _TYPE_MAXIMUM(time_t)) { ++ return false; ++ } ++ if (xsrf_time_ll < _TYPE_MINIMUM(time_t)) { ++ return false; ++ } ++ xsrf_time = xsrf_time_ll; ++ ++ if (abs(now - xsrf_time) > XSRF_TIMEOUT) { ++ return false; ++ } ++ ++ get_xsrf_token(username, pass, formname, xsrf_time, expected); ++ return (strncmp(expected, token, sizeof(expected)) == 0); ++} ++ ++ ++/**************************************************************************** ++ include a lump of html in a page ++****************************************************************************/ ++static int include_html(const char *fname) ++{ ++ int fd; ++ char buf[1024]; ++ int ret; ++ ++ fd = web_open(fname, O_RDONLY, 0); ++ ++ if (fd == -1) { ++ printf(_("ERROR: Can't open %s"), fname); ++ printf("\n"); ++ return 0; ++ } ++ ++ while ((ret = read(fd, buf, sizeof(buf))) > 0) { ++ if (write(1, buf, ret) == -1) { ++ break; ++ } ++ } ++ ++ close(fd); ++ return 1; ++} ++ ++/**************************************************************************** ++ start the page with standard stuff ++****************************************************************************/ ++static void print_header(void) ++{ ++ if (!cgi_waspost()) { ++ printf("Expires: 0\r\n"); ++ } ++ printf("Content-type: text/html\r\n\r\n"); ++ ++ if (!include_html("include/header.html")) { ++ printf("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n"); ++ printf("<HTML>\n<HEAD>\n<TITLE>Samba Web Administration Tool</TITLE>\n</HEAD>\n<BODY background=\"/swat/images/background.jpg\">\n\n"); ++ } ++} ++ ++/* ******************************************************************* ++ show parameter label with translated name in the following form ++ because showing original and translated label in one line looks ++ too long, and showing translated label only is unusable for ++ heavy users. ++ ------------------------------- ++ HELP security [combo box][button] ++ SECURITY ++ ------------------------------- ++ (capital words are translated by gettext.) ++ if no translation is available, then same form as original is ++ used. ++ "i18n_translated_parm" class is used to change the color of the ++ translated parameter with CSS. ++ **************************************************************** */ ++static const char *get_parm_translated(TALLOC_CTX *ctx, ++ const char* pAnchor, const char* pHelp, const char* pLabel) ++{ ++ const char *pTranslated = _(pLabel); ++ char *output; ++ if(strcmp(pLabel, pTranslated) != 0) { ++ output = talloc_asprintf(ctx, ++ "<A HREF=\"/swat/help/manpages/smb.conf.5.html#%s\" target=\"docs\"> %s</A> %s <br><span class=\"i18n_translated_parm\">%s</span>", ++ pAnchor, pHelp, pLabel, pTranslated); ++ return output; ++ } ++ output = talloc_asprintf(ctx, ++ "<A HREF=\"/swat/help/manpages/smb.conf.5.html#%s\" target=\"docs\"> %s</A> %s", ++ pAnchor, pHelp, pLabel); ++ return output; ++} ++/**************************************************************************** ++ finish off the page ++****************************************************************************/ ++static void print_footer(void) ++{ ++ if (!include_html("include/footer.html")) { ++ printf("\n</BODY>\n</HTML>\n"); ++ } ++} ++ ++/**************************************************************************** ++ display one editable parameter in a form ++****************************************************************************/ ++static void show_parameter(int snum, struct parm_struct *parm) ++{ ++ int i; ++ void *ptr; ++ char *utf8_s1, *utf8_s2; ++ size_t converted_size; ++ TALLOC_CTX *ctx = talloc_stackframe(); ++ ++ if (parm->p_class == P_LOCAL && snum >= 0) { ++ ptr = lp_local_ptr_by_snum(snum, parm); ++ } else { ++ ptr = lp_parm_ptr(NULL, parm); ++ } ++ ++ printf("<tr><td>%s</td><td>", get_parm_translated(ctx, ++ stripspaceupper(parm->label), _("Help"), parm->label)); ++ switch (parm->type) { ++ case P_CHAR: ++ printf("<input type=text size=2 name=\"parm_%s\" value=\"%c\">", ++ make_parm_name(parm->label), *(char *)ptr); ++ printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%c\'\">", ++ _("Set Default"), make_parm_name(parm->label),(char)(parm->def.cvalue)); ++ break; ++ ++ case P_LIST: ++ printf("<input type=text size=40 name=\"parm_%s\" value=\"", ++ make_parm_name(parm->label)); ++ if ((char ***)ptr && *(char ***)ptr && **(char ***)ptr) { ++ char **list = *(char ***)ptr; ++ for (;*list;list++) { ++ /* enclose in HTML encoded quotes if the string contains a space */ ++ if ( strchr_m(*list, ' ') ) { ++ push_utf8_talloc(talloc_tos(), &utf8_s1, *list, &converted_size); ++ push_utf8_talloc(talloc_tos(), &utf8_s2, ((*(list+1))?", ":""), &converted_size); ++ printf(""%s"%s", utf8_s1, utf8_s2); ++ } else { ++ push_utf8_talloc(talloc_tos(), &utf8_s1, *list, &converted_size); ++ push_utf8_talloc(talloc_tos(), &utf8_s2, ((*(list+1))?", ":""), &converted_size); ++ printf("%s%s", utf8_s1, utf8_s2); ++ } ++ TALLOC_FREE(utf8_s1); ++ TALLOC_FREE(utf8_s2); ++ } ++ } ++ printf("\">"); ++ printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'", ++ _("Set Default"), make_parm_name(parm->label)); ++ if (parm->def.lvalue) { ++ char **list = (char **)(parm->def.lvalue); ++ for (; *list; list++) { ++ /* enclose in HTML encoded quotes if the string contains a space */ ++ if ( strchr_m(*list, ' ') ) ++ printf(""%s"%s", *list, ((*(list+1))?", ":"")); ++ else ++ printf("%s%s", *list, ((*(list+1))?", ":"")); ++ } ++ } ++ printf("\'\">"); ++ break; ++ ++ case P_STRING: ++ case P_USTRING: ++ push_utf8_talloc(talloc_tos(), &utf8_s1, *(char **)ptr, &converted_size); ++ printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">", ++ make_parm_name(parm->label), fix_quotes(ctx, utf8_s1)); ++ TALLOC_FREE(utf8_s1); ++ printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%s\'\">", ++ _("Set Default"), make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue))); ++ break; ++ ++ case P_BOOL: ++ printf("<select name=\"parm_%s\">",make_parm_name(parm->label)); ++ printf("<option %s>Yes", (*(bool *)ptr)?"selected":""); ++ printf("<option %s>No", (*(bool *)ptr)?"":"selected"); ++ printf("</select>"); ++ printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">", ++ _("Set Default"), make_parm_name(parm->label),(bool)(parm->def.bvalue)?0:1); ++ break; ++ ++ case P_BOOLREV: ++ printf("<select name=\"parm_%s\">",make_parm_name(parm->label)); ++ printf("<option %s>Yes", (*(bool *)ptr)?"":"selected"); ++ printf("<option %s>No", (*(bool *)ptr)?"selected":""); ++ printf("</select>"); ++ printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">", ++ _("Set Default"), make_parm_name(parm->label),(bool)(parm->def.bvalue)?1:0); ++ break; ++ ++ case P_INTEGER: ++ case P_BYTES: ++ printf("<input type=text size=8 name=\"parm_%s\" value=\"%d\">", make_parm_name(parm->label), *(int *)ptr); ++ printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%d\'\">", ++ _("Set Default"), make_parm_name(parm->label),(int)(parm->def.ivalue)); ++ break; ++ ++ case P_OCTAL: { ++ char *o; ++ o = octal_string(*(int *)ptr); ++ printf("<input type=text size=8 name=\"parm_%s\" value=%s>", ++ make_parm_name(parm->label), o); ++ TALLOC_FREE(o); ++ o = octal_string((int)(parm->def.ivalue)); ++ printf("<input type=button value=\"%s\" " ++ "onClick=\"swatform.parm_%s.value=\'%s\'\">", ++ _("Set Default"), make_parm_name(parm->label), o); ++ TALLOC_FREE(o); ++ break; ++ } ++ ++ case P_ENUM: ++ printf("<select name=\"parm_%s\">",make_parm_name(parm->label)); ++ for (i=0;parm->enum_list[i].name;i++) { ++ if (i == 0 || parm->enum_list[i].value != parm->enum_list[i-1].value) { ++ printf("<option %s>%s",(*(int *)ptr)==parm->enum_list[i].value?"selected":"",parm->enum_list[i].name); ++ } ++ } ++ printf("</select>"); ++ printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">", ++ _("Set Default"), make_parm_name(parm->label),enum_index((int)(parm->def.ivalue),parm->enum_list)); ++ break; ++ case P_SEP: ++ break; ++ } ++ printf("</td></tr>\n"); ++ TALLOC_FREE(ctx); ++} ++ ++/**************************************************************************** ++ display a set of parameters for a service ++****************************************************************************/ ++static void show_parameters(int snum, int allparameters, unsigned int parm_filter, int printers) ++{ ++ int i = 0; ++ struct parm_struct *parm; ++ const char *heading = NULL; ++ const char *last_heading = NULL; ++ ++ while ((parm = lp_next_parameter(snum, &i, allparameters))) { ++ if (snum < 0 && parm->p_class == P_LOCAL && !(parm->flags & FLAG_GLOBAL)) ++ continue; ++ if (parm->p_class == P_SEPARATOR) { ++ heading = parm->label; ++ continue; ++ } ++ if (parm->flags & FLAG_HIDE) continue; ++ if (snum >= 0) { ++ if (printers & !(parm->flags & FLAG_PRINT)) continue; ++ if (!printers & !(parm->flags & FLAG_SHARE)) continue; ++ } ++ ++ if (!( parm_filter & FLAG_ADVANCED )) { ++ if (!(parm->flags & FLAG_BASIC)) { ++ void *ptr; ++ if (parm->p_class == P_LOCAL && snum >= 0) { ++ ptr = lp_local_ptr_by_snum(snum, parm); ++ } else { ++ ptr = lp_parm_ptr(NULL, parm); ++ } ++ ++ switch (parm->type) { ++ case P_CHAR: ++ if (*(char *)ptr == (char)(parm->def.cvalue)) continue; ++ break; ++ ++ case P_LIST: ++ if (!str_list_equal(*(const char ***)ptr, ++ (const char **)(parm->def.lvalue))) continue; ++ break; ++ ++ case P_STRING: ++ case P_USTRING: ++ if (!strcmp(*(char **)ptr,(char *)(parm->def.svalue))) continue; ++ break; ++ ++ case P_BOOL: ++ case P_BOOLREV: ++ if (*(bool *)ptr == (bool)(parm->def.bvalue)) continue; ++ break; ++ ++ case P_INTEGER: ++ case P_BYTES: ++ case P_OCTAL: ++ if (*(int *)ptr == (int)(parm->def.ivalue)) continue; ++ break; ++ ++ ++ case P_ENUM: ++ if (*(int *)ptr == (int)(parm->def.ivalue)) continue; ++ break; ++ case P_SEP: ++ continue; ++ } ++ } ++ if (printers && !(parm->flags & FLAG_PRINT)) continue; ++ } ++ ++ if ((parm_filter & FLAG_WIZARD) && !(parm->flags & FLAG_WIZARD)) continue; ++ ++ if ((parm_filter & FLAG_ADVANCED) && !(parm->flags & FLAG_ADVANCED)) continue; ++ ++ if (heading && heading != last_heading) { ++ printf("<tr><td></td></tr><tr><td><b><u>%s</u></b></td></tr>\n", _(heading)); ++ last_heading = heading; ++ } ++ show_parameter(snum, parm); ++ } ++} ++ ++/**************************************************************************** ++ load the smb.conf file into loadparm. ++****************************************************************************/ ++static bool load_config(bool save_def) ++{ ++ return lp_load(get_dyn_CONFIGFILE(),False,save_def,False,True); ++} ++ ++/**************************************************************************** ++ write a config file ++****************************************************************************/ ++static void write_config(FILE *f, bool show_defaults) ++{ ++ TALLOC_CTX *ctx = talloc_stackframe(); ++ ++ fprintf(f, "# Samba config file created using SWAT\n"); ++ fprintf(f, "# from %s (%s)\n", cgi_remote_host(), cgi_remote_addr()); ++ fprintf(f, "# Date: %s\n\n", current_timestring(ctx, False)); ++ ++ lp_dump(f, show_defaults, iNumNonAutoPrintServices); ++ ++ TALLOC_FREE(ctx); ++} ++ ++/**************************************************************************** ++ save and reload the smb.conf config file ++****************************************************************************/ ++static int save_reload(int snum) ++{ ++ FILE *f; ++ struct stat st; ++ ++ f = fopen(get_dyn_CONFIGFILE(),"w"); ++ if (!f) { ++ printf(_("failed to open %s for writing"), get_dyn_CONFIGFILE()); ++ printf("\n"); ++ return 0; ++ } ++ ++ /* just in case they have used the buggy xinetd to create the file */ ++ if (fstat(fileno(f), &st) == 0 && ++ (st.st_mode & S_IWOTH)) { ++#if defined HAVE_FCHMOD ++ fchmod(fileno(f), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); ++#else ++ chmod(get_dyn_CONFIGFILE(), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); ++#endif ++ } ++ ++ write_config(f, False); ++ if (snum >= 0) ++ lp_dump_one(f, False, snum); ++ fclose(f); ++ ++ lp_kill_all_services(); ++ ++ if (!load_config(False)) { ++ printf(_("Can't reload %s"), get_dyn_CONFIGFILE()); ++ printf("\n"); ++ return 0; ++ } ++ iNumNonAutoPrintServices = lp_numservices(); ++ if (pcap_cache_loaded()) { ++ struct tevent_context *ev_ctx; ++ struct messaging_context *msg_ctx; ++ ++ ev_ctx = s3_tevent_context_init(NULL); ++ if (ev_ctx == NULL) { ++ printf("s3_tevent_context_init() failed\n"); ++ return 0; ++ } ++ msg_ctx = messaging_init(ev_ctx, ev_ctx); ++ if (msg_ctx == NULL) { ++ printf("messaging_init() failed\n"); ++ return 0; ++ } ++ ++ load_printers(ev_ctx, msg_ctx); ++ ++ talloc_free(ev_ctx); ++ } ++ ++ return 1; ++} ++ ++/**************************************************************************** ++ commit one parameter ++****************************************************************************/ ++static void commit_parameter(int snum, struct parm_struct *parm, const char *v) ++{ ++ int i; ++ char *s; ++ ++ if (snum < 0 && parm->p_class == P_LOCAL) { ++ /* this handles the case where we are changing a local ++ variable globally. We need to change the parameter in ++ all shares where it is currently set to the default */ ++ for (i=0;i<lp_numservices();i++) { ++ s = lp_servicename(talloc_tos(), i); ++ if (s && (*s) && lp_is_default(i, parm)) { ++ lp_do_parameter(i, parm->label, v); ++ } ++ } ++ } ++ ++ lp_do_parameter(snum, parm->label, v); ++} ++ ++/**************************************************************************** ++ commit a set of parameters for a service ++****************************************************************************/ ++static void commit_parameters(int snum) ++{ ++ int i = 0; ++ struct parm_struct *parm; ++ char *label; ++ const char *v; ++ ++ while ((parm = lp_next_parameter(snum, &i, 1))) { ++ if (asprintf(&label, "parm_%s", make_parm_name(parm->label)) > 0) { ++ if ((v = cgi_variable(label)) != NULL) { ++ if (parm->flags & FLAG_HIDE) ++ continue; ++ commit_parameter(snum, parm, v); ++ } ++ SAFE_FREE(label); ++ } ++ } ++} ++ ++/**************************************************************************** ++ spit out the html for a link with an image ++****************************************************************************/ ++static void image_link(const char *name, const char *hlink, const char *src) ++{ ++ printf("<A HREF=\"%s/%s\"><img border=\"0\" src=\"/swat/%s\" alt=\"%s\"></A>\n", ++ cgi_baseurl(), hlink, src, name); ++} ++ ++/**************************************************************************** ++ display the main navigation controls at the top of each page along ++ with a title ++****************************************************************************/ ++static void show_main_buttons(void) ++{ ++ char *p; ++ ++ if ((p = cgi_user_name()) && strcmp(p, "root")) { ++ printf(_("Logged in as <b>%s</b>"), p); ++ printf("<p>\n"); ++ } ++ ++ image_link(_("Home"), "", "images/home.gif"); ++ if (have_write_access) { ++ image_link(_("Globals"), "globals", "images/globals.gif"); ++ image_link(_("Shares"), "shares", "images/shares.gif"); ++ image_link(_("Printers"), "printers", "images/printers.gif"); ++ image_link(_("Wizard"), "wizard", "images/wizard.gif"); ++ } ++ /* root always gets all buttons, otherwise look for -P */ ++ if ( have_write_access || (!passwd_only && have_read_access) ) { ++ image_link(_("Status"), "status", "images/status.gif"); ++ image_link(_("View Config"), "viewconfig", "images/viewconfig.gif"); ++ } ++ image_link(_("Password Management"), "passwd", "images/passwd.gif"); ++ ++ printf("<HR>\n"); ++} ++ ++/**************************************************************************** ++ * Handle Display/Edit Mode CGI ++ ****************************************************************************/ ++static void ViewModeBoxes(int mode) ++{ ++ printf("<p>%s: \n", _("Current View Is")); ++ printf("<input type=radio name=\"ViewMode\" value=0 %s>%s\n", ((mode == 0) ? "checked" : ""), _("Basic")); ++ printf("<input type=radio name=\"ViewMode\" value=1 %s>%s\n", ((mode == 1) ? "checked" : ""), _("Advanced")); ++ printf("<br>%s: \n", _("Change View To")); ++ printf("<input type=submit name=\"BasicMode\" value=\"%s\">\n", _("Basic")); ++ printf("<input type=submit name=\"AdvMode\" value=\"%s\">\n", _("Advanced")); ++ printf("</p><br>\n"); ++} ++ ++/**************************************************************************** ++ display a welcome page ++****************************************************************************/ ++static void welcome_page(void) ++{ ++ if (file_exist("help/welcome.html")) { ++ include_html("help/welcome.html"); ++ } else { ++ include_html("help/welcome-no-samba-doc.html"); ++ } ++} ++ ++/**************************************************************************** ++ display the current smb.conf ++****************************************************************************/ ++static void viewconfig_page(void) ++{ ++ int full_view=0; ++ const char form_name[] = "viewconfig"; ++ ++ if (!verify_xsrf_token(form_name)) { ++ goto output_page; ++ } ++ ++ if (cgi_variable("full_view")) { ++ full_view = 1; ++ } ++ ++output_page: ++ printf("<H2>%s</H2>\n", _("Current Config")); ++ printf("<form method=post>\n"); ++ print_xsrf_token(cgi_user_name(), cgi_user_pass(), form_name); ++ ++ if (full_view) { ++ printf("<input type=submit name=\"normal_view\" value=\"%s\">\n", _("Normal View")); ++ } else { ++ printf("<input type=submit name=\"full_view\" value=\"%s\">\n", _("Full View")); ++ } ++ ++ printf("<p><pre>"); ++ write_config(stdout, full_view); ++ printf("</pre>"); ++ printf("</form>\n"); ++} ++ ++/**************************************************************************** ++ second screen of the wizard ... Fetch Configuration Parameters ++****************************************************************************/ ++static void wizard_params_page(void) ++{ ++ unsigned int parm_filter = FLAG_WIZARD; ++ const char form_name[] = "wizard_params"; ++ ++ /* Here we first set and commit all the parameters that were selected ++ in the previous screen. */ ++ ++ printf("<H2>%s</H2>\n", _("Wizard Parameter Edit Page")); ++ ++ if (!verify_xsrf_token(form_name)) { ++ goto output_page; ++ } ++ ++ if (cgi_variable("Commit")) { ++ commit_parameters(GLOBAL_SECTION_SNUM); ++ save_reload(-1); ++ } ++ ++output_page: ++ printf("<form name=\"swatform\" method=post action=wizard_params>\n"); ++ print_xsrf_token(cgi_user_name(), cgi_user_pass(), form_name); ++ ++ if (have_write_access) { ++ printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n"); ++ } ++ ++ printf("<input type=reset name=\"Reset Values\" value=\"Reset\">\n"); ++ printf("<p>\n"); ++ ++ printf("<table>\n"); ++ show_parameters(GLOBAL_SECTION_SNUM, 1, parm_filter, 0); ++ printf("</table>\n"); ++ printf("</form>\n"); ++} ++ ++/**************************************************************************** ++ Utility to just rewrite the smb.conf file - effectively just cleans it up ++****************************************************************************/ ++static void rewritecfg_file(void) ++{ ++ commit_parameters(GLOBAL_SECTION_SNUM); ++ save_reload(-1); ++ printf("<H2>%s</H2>\n", _("Note: smb.conf file has been read and rewritten")); ++} ++ ++/**************************************************************************** ++ wizard to create/modify the smb.conf file ++****************************************************************************/ ++static void wizard_page(void) ++{ ++ /* Set some variables to collect data from smb.conf */ ++ int role = 0; ++ int winstype = 0; ++ int have_home = -1; ++ int HomeExpo = 0; ++ int SerType = 0; ++ const char form_name[] = "wizard"; ++ ++ if (!verify_xsrf_token(form_name)) { ++ goto output_page; ++ } ++ ++ if (cgi_variable("Rewrite")) { ++ (void) rewritecfg_file(); ++ return; ++ } ++ ++ if (cgi_variable("GetWizardParams")){ ++ (void) wizard_params_page(); ++ return; ++ } ++ ++ if (cgi_variable("Commit")){ ++ SerType = atoi(cgi_variable_nonull("ServerType")); ++ winstype = atoi(cgi_variable_nonull("WINSType")); ++ have_home = lp_servicenumber(HOMES_NAME); ++ HomeExpo = atoi(cgi_variable_nonull("HomeExpo")); ++ ++ /* Plain text passwords are too badly broken - use encrypted passwords only */ ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "encrypt passwords", "Yes"); ++ ++ switch ( SerType ){ ++ case 0: ++ /* Stand-alone Server */ ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "security", "USER" ); ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "domain logons", "No" ); ++ break; ++ case 1: ++ /* Domain Member */ ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "security", "DOMAIN" ); ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "domain logons", "No" ); ++ break; ++ case 2: ++ /* Domain Controller */ ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "security", "USER" ); ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "domain logons", "Yes" ); ++ break; ++ } ++ switch ( winstype ) { ++ case 0: ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins support", "No" ); ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins server", "" ); ++ break; ++ case 1: ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins support", "Yes" ); ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins server", "" ); ++ break; ++ case 2: ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins support", "No" ); ++ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins server", cgi_variable_nonull("WINSAddr")); ++ break; ++ } ++ ++ /* Have to create Homes share? */ ++ if ((HomeExpo == 1) && (have_home == -1)) { ++ const char *unix_share = HOMES_NAME; ++ ++ load_config(False); ++ lp_copy_service(GLOBAL_SECTION_SNUM, unix_share); ++ have_home = lp_servicenumber(HOMES_NAME); ++ lp_do_parameter( have_home, "read only", "No"); ++ lp_do_parameter( have_home, "valid users", "%S"); ++ lp_do_parameter( have_home, "browseable", "No"); ++ commit_parameters(have_home); ++ save_reload(have_home); ++ } ++ ++ /* Need to Delete Homes share? */ ++ if ((HomeExpo == 0) && (have_home != -1)) { ++ lp_remove_service(have_home); ++ have_home = -1; ++ } ++ ++ commit_parameters(GLOBAL_SECTION_SNUM); ++ save_reload(-1); ++ } ++ else ++ { ++ /* Now determine smb.conf WINS settings */ ++ if (lp_we_are_a_wins_server()) ++ winstype = 1; ++ if (lp_wins_server_list() && strlen(*lp_wins_server_list())) ++ winstype = 2; ++ ++ /* Do we have a homes share? */ ++ have_home = lp_servicenumber(HOMES_NAME); ++ } ++ if ((winstype == 2) && lp_we_are_a_wins_server()) ++ winstype = 3; ++ ++ role = lp_server_role(); ++ ++output_page: ++ /* Here we go ... */ ++ printf("<H2>%s</H2>\n", _("Samba Configuration Wizard")); ++ printf("<form method=post action=wizard>\n"); ++ print_xsrf_token(cgi_user_name(), cgi_user_pass(), form_name); ++ ++ if (have_write_access) { ++ printf("%s\n", _("The \"Rewrite smb.conf file\" button will clear the smb.conf file of all default values and of comments.")); ++ printf("%s", _("The same will happen if you press the commit button.")); ++ printf("<br><br>\n"); ++ printf("<center>"); ++ printf("<input type=submit name=\"Rewrite\" value=\"%s\"> ",_("Rewrite smb.conf file")); ++ printf("<input type=submit name=\"Commit\" value=\"%s\"> ",_("Commit")); ++ printf("<input type=submit name=\"GetWizardParams\" value=\"%s\">", _("Edit Parameter Values")); ++ printf("</center>\n"); ++ } ++ ++ printf("<hr>"); ++ printf("<center><table border=0>"); ++ printf("<tr><td><b>%s: </b></td>\n", _("Server Type")); ++ printf("<td><input type=radio name=\"ServerType\" value=\"0\" %s> %s </td>", ((role == ROLE_STANDALONE) ? "checked" : ""), _("Stand Alone")); ++ printf("<td><input type=radio name=\"ServerType\" value=\"1\" %s> %s </td>", ((role == ROLE_DOMAIN_MEMBER) ? "checked" : ""), _("Domain Member")); ++ printf("<td><input type=radio name=\"ServerType\" value=\"2\" %s> %s </td>", ((role == ROLE_DOMAIN_PDC) ? "checked" : ""), _("Domain Controller")); ++ printf("</tr>\n"); ++ if (role == ROLE_DOMAIN_BDC) { ++ printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">%s</font></td></tr>\n", _("Unusual Type in smb.conf - Please Select New Mode")); ++ } ++ printf("<tr><td><b>%s: </b></td>\n", _("Configure WINS As")); ++ printf("<td><input type=radio name=\"WINSType\" value=\"0\" %s> %s </td>", ((winstype == 0) ? "checked" : ""), _("Not Used")); ++ printf("<td><input type=radio name=\"WINSType\" value=\"1\" %s> %s </td>", ((winstype == 1) ? "checked" : ""), _("Server for client use")); ++ printf("<td><input type=radio name=\"WINSType\" value=\"2\" %s> %s </td>", ((winstype == 2) ? "checked" : ""), _("Client of another WINS server")); ++ printf("</tr>\n"); ++ printf("<tr><td></td><td></td><td></td><td>%s <input type=text size=\"16\" name=\"WINSAddr\" value=\"", _("Remote WINS Server")); ++ ++ /* Print out the list of wins servers */ ++ if(lp_wins_server_list()) { ++ int i; ++ const char **wins_servers = lp_wins_server_list(); ++ for(i = 0; wins_servers[i]; i++) printf("%s ", wins_servers[i]); ++ } ++ ++ printf("\"></td></tr>\n"); ++ if (winstype == 3) { ++ printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">%s</font></td></tr>\n", _("Error: WINS Server Mode and WINS Support both set in smb.conf")); ++ printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">%s</font></td></tr>\n", _("Please Select desired WINS mode above.")); ++ } ++ printf("<tr><td><b>%s: </b></td>\n", _("Expose Home Directories")); ++ printf("<td><input type=radio name=\"HomeExpo\" value=\"1\" %s> Yes</td>", (have_home == -1) ? "" : "checked "); ++ printf("<td><input type=radio name=\"HomeExpo\" value=\"0\" %s> No</td>", (have_home == -1 ) ? "checked" : ""); ++ printf("<td></td></tr>\n"); ++ ++ /* Enable this when we are ready .... ++ * printf("<tr><td><b>%s: </b></td>\n", _("Is Print Server")); ++ * printf("<td><input type=radio name=\"PtrSvr\" value=\"1\" %s> Yes</td>"); ++ * printf("<td><input type=radio name=\"PtrSvr\" value=\"0\" %s> No</td>"); ++ * printf("<td></td></tr>\n"); ++ */ ++ ++ printf("</table></center>"); ++ printf("<hr>"); ++ ++ printf("%s\n", _("The above configuration options will set multiple parameters and will generally assist with rapid Samba deployment.")); ++ printf("</form>\n"); ++} ++ ++ ++/**************************************************************************** ++ display a globals editing page ++****************************************************************************/ ++static void globals_page(void) ++{ ++ unsigned int parm_filter = FLAG_BASIC; ++ int mode = 0; ++ const char form_name[] = "globals"; ++ ++ printf("<H2>%s</H2>\n", _("Global Parameters")); ++ ++ if (!verify_xsrf_token(form_name)) { ++ goto output_page; ++ } ++ ++ if (cgi_variable("Commit")) { ++ commit_parameters(GLOBAL_SECTION_SNUM); ++ save_reload(-1); ++ } ++ ++ if ( cgi_variable("ViewMode") ) ++ mode = atoi(cgi_variable_nonull("ViewMode")); ++ if ( cgi_variable("BasicMode")) ++ mode = 0; ++ if ( cgi_variable("AdvMode")) ++ mode = 1; ++ ++output_page: ++ printf("<form name=\"swatform\" method=post action=globals>\n"); ++ print_xsrf_token(cgi_user_name(), cgi_user_pass(), form_name); ++ ++ ViewModeBoxes( mode ); ++ switch ( mode ) { ++ case 0: ++ parm_filter = FLAG_BASIC; ++ break; ++ case 1: ++ parm_filter = FLAG_ADVANCED; ++ break; ++ } ++ printf("<br>\n"); ++ if (have_write_access) { ++ printf("<input type=submit name=\"Commit\" value=\"%s\">\n", ++ _("Commit Changes")); ++ } ++ ++ printf("<input type=reset name=\"Reset Values\" value=\"%s\">\n", ++ _("Reset Values")); ++ ++ printf("<p>\n"); ++ printf("<table>\n"); ++ show_parameters(GLOBAL_SECTION_SNUM, 1, parm_filter, 0); ++ printf("</table>\n"); ++ printf("</form>\n"); ++} ++ ++/**************************************************************************** ++ display a shares editing page. share is in unix codepage, ++****************************************************************************/ ++static void shares_page(void) ++{ ++ const char *share = cgi_variable("share"); ++ char *s; ++ char *utf8_s; ++ int snum = -1; ++ int i; ++ int mode = 0; ++ unsigned int parm_filter = FLAG_BASIC; ++ size_t converted_size; ++ const char form_name[] = "shares"; ++ ++ printf("<H2>%s</H2>\n", _("Share Parameters")); ++ ++ if (!verify_xsrf_token(form_name)) { ++ goto output_page; ++ } ++ ++ if (share) ++ snum = lp_servicenumber(share); ++ ++ ++ if (cgi_variable("Commit") && snum >= 0) { ++ commit_parameters(snum); ++ save_reload(-1); ++ snum = lp_servicenumber(share); ++ } ++ ++ if (cgi_variable("Delete") && snum >= 0) { ++ lp_remove_service(snum); ++ save_reload(-1); ++ share = NULL; ++ snum = -1; ++ } ++ ++ if (cgi_variable("createshare") && (share=cgi_variable("newshare"))) { ++ snum = lp_servicenumber(share); ++ if (snum < 0) { ++ load_config(False); ++ lp_copy_service(GLOBAL_SECTION_SNUM, share); ++ snum = lp_servicenumber(share); ++ save_reload(snum); ++ snum = lp_servicenumber(share); ++ } ++ } ++ ++ if ( cgi_variable("ViewMode") ) ++ mode = atoi(cgi_variable_nonull("ViewMode")); ++ if ( cgi_variable("BasicMode")) ++ mode = 0; ++ if ( cgi_variable("AdvMode")) ++ mode = 1; ++ ++output_page: ++ printf("<FORM name=\"swatform\" method=post>\n"); ++ print_xsrf_token(cgi_user_name(), cgi_user_pass(), form_name); ++ ++ printf("<table>\n"); ++ ++ ViewModeBoxes( mode ); ++ switch ( mode ) { ++ case 0: ++ parm_filter = FLAG_BASIC; ++ break; ++ case 1: ++ parm_filter = FLAG_ADVANCED; ++ break; ++ } ++ printf("<br><tr>\n"); ++ printf("<td><input type=submit name=selectshare value=\"%s\"></td>\n", _("Choose Share")); ++ printf("<td><select name=share>\n"); ++ if (snum < 0) ++ printf("<option value=\" \"> \n"); ++ for (i=0;i<lp_numservices();i++) { ++ s = lp_servicename(talloc_tos(), i); ++ if (s && (*s) && strcmp(s,"IPC$") && !lp_print_ok(i)) { ++ push_utf8_talloc(talloc_tos(), &utf8_s, s, &converted_size); ++ printf("<option %s value=\"%s\">%s\n", ++ (share && strcmp(share,s)==0)?"SELECTED":"", ++ utf8_s, utf8_s); ++ TALLOC_FREE(utf8_s); ++ } ++ } ++ printf("</select></td>\n"); ++ if (have_write_access) { ++ printf("<td><input type=submit name=\"Delete\" value=\"%s\"></td>\n", _("Delete Share")); ++ } ++ printf("</tr>\n"); ++ printf("</table>"); ++ printf("<table>"); ++ if (have_write_access) { ++ printf("<tr>\n"); ++ printf("<td><input type=submit name=createshare value=\"%s\"></td>\n", _("Create Share")); ++ printf("<td><input type=text size=30 name=newshare></td></tr>\n"); ++ } ++ printf("</table>"); ++ ++ ++ if (snum >= 0) { ++ if (have_write_access) { ++ printf("<input type=submit name=\"Commit\" value=\"%s\">\n", _("Commit Changes")); ++ } ++ ++ printf("<input type=reset name=\"Reset Values\" value=\"%s\">\n", _("Reset Values")); ++ printf("<p>\n"); ++ } ++ ++ if (snum >= 0) { ++ printf("<table>\n"); ++ show_parameters(snum, 1, parm_filter, 0); ++ printf("</table>\n"); ++ } ++ ++ printf("</FORM>\n"); ++} ++ ++/************************************************************* ++change a password either locally or remotely ++*************************************************************/ ++static bool change_password(const char *remote_machine, const char *user_name, ++ const char *old_passwd, const char *new_passwd, ++ int local_flags) ++{ ++ NTSTATUS ret; ++ char *err_str = NULL; ++ char *msg_str = NULL; ++ ++ if (demo_mode) { ++ printf("%s\n<p>", _("password change in demo mode rejected")); ++ return False; ++ } ++ ++ if (remote_machine != NULL) { ++ ret = remote_password_change(remote_machine, user_name, ++ old_passwd, new_passwd, &err_str); ++ if (err_str != NULL) ++ printf("%s\n<p>", err_str); ++ SAFE_FREE(err_str); ++ return NT_STATUS_IS_OK(ret); ++ } ++ ++ if(!initialize_password_db(True, NULL)) { ++ printf("%s\n<p>", _("Can't setup password database vectors.")); ++ return False; ++ } ++ ++ ret = local_password_change(user_name, local_flags, new_passwd, ++ &err_str, &msg_str); ++ ++ if(msg_str) ++ printf("%s\n<p>", msg_str); ++ if(err_str) ++ printf("%s\n<p>", err_str); ++ ++ SAFE_FREE(msg_str); ++ SAFE_FREE(err_str); ++ return NT_STATUS_IS_OK(ret); ++} ++ ++/**************************************************************************** ++ do the stuff required to add or change a password ++****************************************************************************/ ++static void chg_passwd(void) ++{ ++ const char *host; ++ bool rslt; ++ int local_flags = 0; ++ ++ /* Make sure users name has been specified */ ++ if (strlen(cgi_variable_nonull(SWAT_USER)) == 0) { ++ printf("<p>%s\n", _(" Must specify \"User Name\" ")); ++ return; ++ } ++ ++ /* ++ * smbpasswd doesn't require anything but the users name to delete, disable or enable the user, ++ * so if that's what we're doing, skip the rest of the checks ++ */ ++ if (!cgi_variable(DISABLE_USER_FLAG) && !cgi_variable(ENABLE_USER_FLAG) && !cgi_variable(DELETE_USER_FLAG)) { ++ ++ /* ++ * If current user is not root, make sure old password has been specified ++ * If REMOTE change, even root must provide old password ++ */ ++ if (((!am_root()) && (strlen( cgi_variable_nonull(OLD_PSWD)) <= 0)) || ++ ((cgi_variable(CHG_R_PASSWD_FLAG)) && (strlen( cgi_variable_nonull(OLD_PSWD)) <= 0))) { ++ printf("<p>%s\n", _(" Must specify \"Old Password\" ")); ++ return; ++ } ++ ++ /* If changing a users password on a remote hosts we have to know what host */ ++ if ((cgi_variable(CHG_R_PASSWD_FLAG)) && (strlen( cgi_variable_nonull(RHOST)) <= 0)) { ++ printf("<p>%s\n", _(" Must specify \"Remote Machine\" ")); ++ return; ++ } ++ ++ /* Make sure new passwords have been specified */ ++ if ((strlen( cgi_variable_nonull(NEW_PSWD)) <= 0) || ++ (strlen( cgi_variable_nonull(NEW2_PSWD)) <= 0)) { ++ printf("<p>%s\n", _(" Must specify \"New, and Re-typed Passwords\" ")); ++ return; ++ } ++ ++ /* Make sure new passwords was typed correctly twice */ ++ if (strcmp(cgi_variable_nonull(NEW_PSWD), cgi_variable_nonull(NEW2_PSWD)) != 0) { ++ printf("<p>%s\n", _(" Re-typed password didn't match new password ")); ++ return; ++ } ++ } ++ ++ if (cgi_variable(CHG_R_PASSWD_FLAG)) { ++ host = cgi_variable(RHOST); ++ } else if (am_root()) { ++ host = NULL; ++ } else { ++ host = "127.0.0.1"; ++ } ++ ++ /* ++ * Set up the local flags. ++ */ ++ ++ local_flags |= (cgi_variable(ADD_USER_FLAG) ? LOCAL_ADD_USER : 0); ++ local_flags |= (cgi_variable(ADD_USER_FLAG) ? LOCAL_SET_PASSWORD : 0); ++ local_flags |= (cgi_variable(CHG_S_PASSWD_FLAG) ? LOCAL_SET_PASSWORD : 0); ++ local_flags |= (cgi_variable(DELETE_USER_FLAG) ? LOCAL_DELETE_USER : 0); ++ local_flags |= (cgi_variable(ENABLE_USER_FLAG) ? LOCAL_ENABLE_USER : 0); ++ local_flags |= (cgi_variable(DISABLE_USER_FLAG) ? LOCAL_DISABLE_USER : 0); ++ ++ rslt = change_password(host, ++ cgi_variable_nonull(SWAT_USER), ++ cgi_variable_nonull(OLD_PSWD), cgi_variable_nonull(NEW_PSWD), ++ local_flags); ++ ++ if(cgi_variable(CHG_S_PASSWD_FLAG)) { ++ printf("<p>"); ++ if (rslt == True) { ++ printf("%s\n", _(" The passwd has been changed.")); ++ } else { ++ printf("%s\n", _(" The passwd has NOT been changed.")); ++ } ++ } ++ ++ return; ++} ++ ++/**************************************************************************** ++ display a password editing page ++****************************************************************************/ ++static void passwd_page(void) ++{ ++ const char *new_name = cgi_user_name(); ++ const char passwd_form[] = "passwd"; ++ const char rpasswd_form[] = "rpasswd"; ++ ++ if (!new_name) new_name = ""; ++ ++ printf("<H2>%s</H2>\n", _("Server Password Management")); ++ ++ printf("<FORM name=\"swatform\" method=post>\n"); ++ print_xsrf_token(cgi_user_name(), cgi_user_pass(), passwd_form); ++ ++ printf("<table>\n"); ++ ++ /* ++ * Create all the dialog boxes for data collection ++ */ ++ printf("<tr><td> %s : </td>\n", _("User Name")); ++ printf("<td><input type=text size=30 name=%s value=%s></td></tr> \n", SWAT_USER, new_name); ++ if (!am_root()) { ++ printf("<tr><td> %s : </td>\n", _("Old Password")); ++ printf("<td><input type=password size=30 name=%s></td></tr> \n",OLD_PSWD); ++ } ++ printf("<tr><td> %s : </td>\n", _("New Password")); ++ printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW_PSWD); ++ printf("<tr><td> %s : </td>\n", _("Re-type New Password")); ++ printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW2_PSWD); ++ printf("</table>\n"); ++ ++ /* ++ * Create all the control buttons for requesting action ++ */ ++ printf("<input type=submit name=%s value=\"%s\">\n", ++ CHG_S_PASSWD_FLAG, _("Change Password")); ++ if (demo_mode || am_root()) { ++ printf("<input type=submit name=%s value=\"%s\">\n", ++ ADD_USER_FLAG, _("Add New User")); ++ printf("<input type=submit name=%s value=\"%s\">\n", ++ DELETE_USER_FLAG, _("Delete User")); ++ printf("<input type=submit name=%s value=\"%s\">\n", ++ DISABLE_USER_FLAG, _("Disable User")); ++ printf("<input type=submit name=%s value=\"%s\">\n", ++ ENABLE_USER_FLAG, _("Enable User")); ++ } ++ printf("<p></FORM>\n"); ++ ++ /* ++ * Do some work if change, add, disable or enable was ++ * requested. It could be this is the first time through this ++ * code, so there isn't anything to do. */ ++ if (verify_xsrf_token(passwd_form) && ++ ((cgi_variable(CHG_S_PASSWD_FLAG)) || (cgi_variable(ADD_USER_FLAG)) || (cgi_variable(DELETE_USER_FLAG)) || ++ (cgi_variable(DISABLE_USER_FLAG)) || (cgi_variable(ENABLE_USER_FLAG)))) { ++ chg_passwd(); ++ } ++ ++ printf("<H2>%s</H2>\n", _("Client/Server Password Management")); ++ ++ printf("<FORM name=\"swatform\" method=post>\n"); ++ print_xsrf_token(cgi_user_name(), cgi_user_pass(), rpasswd_form); ++ ++ printf("<table>\n"); ++ ++ /* ++ * Create all the dialog boxes for data collection ++ */ ++ printf("<tr><td> %s : </td>\n", _("User Name")); ++ printf("<td><input type=text size=30 name=%s value=%s></td></tr>\n",SWAT_USER, new_name); ++ printf("<tr><td> %s : </td>\n", _("Old Password")); ++ printf("<td><input type=password size=30 name=%s></td></tr>\n",OLD_PSWD); ++ printf("<tr><td> %s : </td>\n", _("New Password")); ++ printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW_PSWD); ++ printf("<tr><td> %s : </td>\n", _("Re-type New Password")); ++ printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW2_PSWD); ++ printf("<tr><td> %s : </td>\n", _("Remote Machine")); ++ printf("<td><input type=text size=30 name=%s></td></tr>\n",RHOST); ++ ++ printf("</table>"); ++ ++ /* ++ * Create all the control buttons for requesting action ++ */ ++ printf("<input type=submit name=%s value=\"%s\">", ++ CHG_R_PASSWD_FLAG, _("Change Password")); ++ ++ printf("<p></FORM>\n"); ++ ++ /* ++ * Do some work if a request has been made to change the ++ * password somewhere other than the server. It could be this ++ * is the first time through this code, so there isn't ++ * anything to do. */ ++ if (verify_xsrf_token(passwd_form) && cgi_variable(CHG_R_PASSWD_FLAG)) { ++ chg_passwd(); ++ } ++ ++} ++ ++/**************************************************************************** ++ display a printers editing page ++****************************************************************************/ ++static void printers_page(void) ++{ ++ const char *share = cgi_variable("share"); ++ char *s; ++ int snum=-1; ++ int i; ++ int mode = 0; ++ unsigned int parm_filter = FLAG_BASIC; ++ const char form_name[] = "printers"; ++ ++ if (!verify_xsrf_token(form_name)) { ++ goto output_page; ++ } ++ ++ if (share) ++ snum = lp_servicenumber(share); ++ ++ if (cgi_variable("Commit") && snum >= 0) { ++ commit_parameters(snum); ++ if (snum >= iNumNonAutoPrintServices) ++ save_reload(snum); ++ else ++ save_reload(-1); ++ snum = lp_servicenumber(share); ++ } ++ ++ if (cgi_variable("Delete") && snum >= 0) { ++ lp_remove_service(snum); ++ save_reload(-1); ++ share = NULL; ++ snum = -1; ++ } ++ ++ if (cgi_variable("createshare") && (share=cgi_variable("newshare"))) { ++ snum = lp_servicenumber(share); ++ if (snum < 0 || snum >= iNumNonAutoPrintServices) { ++ load_config(False); ++ lp_copy_service(GLOBAL_SECTION_SNUM, share); ++ snum = lp_servicenumber(share); ++ lp_do_parameter(snum, "print ok", "Yes"); ++ save_reload(snum); ++ snum = lp_servicenumber(share); ++ } ++ } ++ ++ if ( cgi_variable("ViewMode") ) ++ mode = atoi(cgi_variable_nonull("ViewMode")); ++ if ( cgi_variable("BasicMode")) ++ mode = 0; ++ if ( cgi_variable("AdvMode")) ++ mode = 1; ++ ++output_page: ++ printf("<H2>%s</H2>\n", _("Printer Parameters")); ++ ++ printf("<H3>%s</H3>\n", _("Important Note:")); ++ printf("%s",_("Printer names marked with [*] in the Choose Printer drop-down box ")); ++ printf("%s",_("are autoloaded printers from ")); ++ printf("<A HREF=\"/swat/help/smb.conf.5.html#printcapname\" target=\"docs\">%s</A>\n", _("Printcap Name")); ++ printf("%s\n", _("Attempting to delete these printers from SWAT will have no effect.")); ++ ++ ++ printf("<FORM name=\"swatform\" method=post>\n"); ++ print_xsrf_token(cgi_user_name(), cgi_user_pass(), form_name); ++ ++ ViewModeBoxes( mode ); ++ switch ( mode ) { ++ case 0: ++ parm_filter = FLAG_BASIC; ++ break; ++ case 1: ++ parm_filter = FLAG_ADVANCED; ++ break; ++ } ++ printf("<table>\n"); ++ printf("<tr><td><input type=submit name=\"selectshare\" value=\"%s\"></td>\n", _("Choose Printer")); ++ printf("<td><select name=\"share\">\n"); ++ if (snum < 0 || !lp_print_ok(snum)) ++ printf("<option value=\" \"> \n"); ++ for (i=0;i<lp_numservices();i++) { ++ s = lp_servicename(talloc_tos(), i); ++ if (s && (*s) && strcmp(s,"IPC$") && lp_print_ok(i)) { ++ if (i >= iNumNonAutoPrintServices) ++ printf("<option %s value=\"%s\">[*]%s\n", ++ (share && strcmp(share,s)==0)?"SELECTED":"", ++ s, s); ++ else ++ printf("<option %s value=\"%s\">%s\n", ++ (share && strcmp(share,s)==0)?"SELECTED":"", ++ s, s); ++ } ++ } ++ printf("</select></td>"); ++ if (have_write_access) { ++ printf("<td><input type=submit name=\"Delete\" value=\"%s\"></td>\n", _("Delete Printer")); ++ } ++ printf("</tr>"); ++ printf("</table>\n"); ++ ++ if (have_write_access) { ++ printf("<table>\n"); ++ printf("<tr><td><input type=submit name=\"createshare\" value=\"%s\"></td>\n", _("Create Printer")); ++ printf("<td><input type=text size=30 name=\"newshare\"></td></tr>\n"); ++ printf("</table>"); ++ } ++ ++ ++ if (snum >= 0) { ++ if (have_write_access) { ++ printf("<input type=submit name=\"Commit\" value=\"%s\">\n", _("Commit Changes")); ++ } ++ printf("<input type=reset name=\"Reset Values\" value=\"%s\">\n", _("Reset Values")); ++ printf("<p>\n"); ++ } ++ ++ if (snum >= 0) { ++ printf("<table>\n"); ++ show_parameters(snum, 1, parm_filter, 1); ++ printf("</table>\n"); ++ } ++ printf("</FORM>\n"); ++} ++ ++/* ++ when the _() translation macro is used there is no obvious place to free ++ the resulting string and there is no easy way to give a static pointer. ++ All we can do is rotate between some static buffers and hope a single d_printf() ++ doesn't have more calls to _() than the number of buffers ++*/ ++ ++const char *lang_msg_rotate(TALLOC_CTX *ctx, const char *msgid) ++{ ++ const char *msgstr; ++ const char *ret; ++ ++ msgstr = lang_msg(msgid); ++ if (!msgstr) { ++ return msgid; ++ } ++ ++ ret = talloc_strdup(ctx, msgstr); ++ ++ lang_msg_free(msgstr); ++ if (!ret) { ++ return msgid; ++ } ++ ++ return ret; ++} ++ ++/** ++ * main function for SWAT. ++ **/ ++ int main(int argc, char *argv[]) ++{ ++ const char *page; ++ poptContext pc; ++ struct poptOption long_options[] = { ++ POPT_AUTOHELP ++ { "disable-authentication", 'a', POPT_ARG_VAL, &demo_mode, True, "Disable authentication (demo mode)" }, ++ { "password-menu-only", 'P', POPT_ARG_VAL, &passwd_only, True, "Show only change password menu" }, ++ POPT_COMMON_SAMBA ++ POPT_TABLEEND ++ }; ++ TALLOC_CTX *frame = talloc_stackframe(); ++ ++ fault_setup(); ++ umask(S_IWGRP | S_IWOTH); ++ ++#if defined(HAVE_SET_AUTH_PARAMETERS) ++ set_auth_parameters(argc, argv); ++#endif /* HAVE_SET_AUTH_PARAMETERS */ ++ ++ /* just in case it goes wild ... */ ++ alarm(300); ++ ++ setlinebuf(stdout); ++ ++ /* we don't want any SIGPIPE messages */ ++ BlockSignals(True,SIGPIPE); ++ ++ debug_set_logfile("/dev/null"); ++ ++ /* we don't want stderr screwing us up */ ++ close(2); ++ open("/dev/null", O_WRONLY); ++ setup_logging("swat", DEBUG_FILE); ++ ++ load_case_tables(); ++ ++ pc = poptGetContext("swat", argc, (const char **) argv, long_options, 0); ++ ++ /* Parse command line options */ ++ ++ while(poptGetNextOpt(pc) != -1) { } ++ ++ poptFreeContext(pc); ++ ++ /* This should set a more apporiate log file */ ++ load_config(True); ++ reopen_logs(); ++ load_interfaces(); ++ iNumNonAutoPrintServices = lp_numservices(); ++ if (pcap_cache_loaded()) { ++ struct tevent_context *ev_ctx; ++ struct messaging_context *msg_ctx; ++ ++ ev_ctx = s3_tevent_context_init(NULL); ++ if (ev_ctx == NULL) { ++ printf("s3_tevent_context_init() failed\n"); ++ return 0; ++ } ++ msg_ctx = messaging_init(ev_ctx, ev_ctx); ++ if (msg_ctx == NULL) { ++ printf("messaging_init() failed\n"); ++ return 0; ++ } ++ ++ load_printers(ev_ctx, msg_ctx); ++ ++ talloc_free(ev_ctx); ++ } ++ ++ cgi_setup(get_dyn_SWATDIR(), !demo_mode); ++ ++ print_header(); ++ ++ cgi_load_variables(); ++ ++ if (!file_exist(get_dyn_CONFIGFILE())) { ++ have_read_access = True; ++ have_write_access = True; ++ } else { ++ /* check if the authenticated user has write access - if not then ++ don't show write options */ ++ have_write_access = (access(get_dyn_CONFIGFILE(),W_OK) == 0); ++ ++ /* if the user doesn't have read access to smb.conf then ++ don't let them view it */ ++ have_read_access = (access(get_dyn_CONFIGFILE(),R_OK) == 0); ++ } ++ ++ show_main_buttons(); ++ ++ page = cgi_pathinfo(); ++ ++ /* Root gets full functionality */ ++ if (have_read_access && strcmp(page, "globals")==0) { ++ globals_page(); ++ } else if (have_read_access && strcmp(page,"shares")==0) { ++ shares_page(); ++ } else if (have_read_access && strcmp(page,"printers")==0) { ++ printers_page(); ++ } else if (have_read_access && strcmp(page,"status")==0) { ++ status_page(); ++ } else if (have_read_access && strcmp(page,"viewconfig")==0) { ++ viewconfig_page(); ++ } else if (strcmp(page,"passwd")==0) { ++ passwd_page(); ++ } else if (have_read_access && strcmp(page,"wizard")==0) { ++ wizard_page(); ++ } else if (have_read_access && strcmp(page,"wizard_params")==0) { ++ wizard_params_page(); ++ } else if (have_read_access && strcmp(page,"rewritecfg")==0) { ++ rewritecfg_file(); ++ } else { ++ welcome_page(); ++ } ++ ++ print_footer(); ++ ++ TALLOC_FREE(frame); ++ return 0; ++} ++ ++/** @} **/ +diff --git a/source3/web/swat_proto.h b/source3/web/swat_proto.h +new file mode 100644 +index 0000000..424a3af +--- /dev/null ++++ b/source3/web/swat_proto.h +@@ -0,0 +1,76 @@ ++/* ++ * Unix SMB/CIFS implementation. ++ * collected prototypes header ++ * ++ * frozen from "make proto" in May 2008 ++ * ++ * Copyright (C) Michael Adam 2008 ++ * ++ * 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 3 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, see <http://www.gnu.org/licenses/>. ++ */ ++ ++#ifndef _SWAT_PROTO_H_ ++#define _SWAT_PROTO_H_ ++ ++ ++/* The following definitions come from web/cgi.c */ ++ ++void cgi_load_variables(void); ++const char *cgi_variable(const char *name); ++const char *cgi_variable_nonull(const char *name); ++bool am_root(void); ++char *cgi_user_name(void); ++char *cgi_user_pass(void); ++void cgi_setup(const char *rootdir, int auth_required); ++const char *cgi_baseurl(void); ++const char *cgi_pathinfo(void); ++const char *cgi_remote_host(void); ++const char *cgi_remote_addr(void); ++bool cgi_waspost(void); ++ ++/* The following definitions come from web/diagnose.c */ ++ ++bool winbindd_running(void); ++bool nmbd_running(void); ++bool smbd_running(void); ++ ++/* The following definitions come from web/neg_lang.c */ ++ ++int web_open(const char *fname, int flags, mode_t mode); ++void web_set_lang(const char *lang_string); ++ ++/* The following definitions come from web/startstop.c */ ++ ++void start_smbd(void); ++void start_nmbd(void); ++void start_winbindd(void); ++void stop_smbd(void); ++void stop_nmbd(void); ++void stop_winbindd(void); ++void kill_pid(struct server_id pid); ++ ++/* The following definitions come from web/statuspage.c */ ++ ++void status_page(void); ++ ++/* The following definitions come from web/swat.c */ ++ ++const char *lang_msg_rotate(TALLOC_CTX *ctx, const char *msgid); ++void get_xsrf_token(const char *username, const char *pass, ++ const char *formname, time_t xsrf_time, char token_str[33]); ++void print_xsrf_token(const char *username, const char *pass, ++ const char *formname); ++bool verify_xsrf_token(const char *formname); ++ ++#endif /* _SWAT_PROTO_H_ */ +diff --git a/source3/wscript b/source3/wscript +index 10aa232..773bef0 100644 +--- a/source3/wscript ++++ b/source3/wscript +@@ -23,6 +23,7 @@ def set_options(opt): + action="store", dest='shared_modules', default=None) + + opt.SAMBA3_ADD_OPTION('winbind') ++ opt.SAMBA3_ADD_OPTION('swat') + opt.SAMBA3_ADD_OPTION('ads', default=None) # None means autodetection + opt.SAMBA3_ADD_OPTION('ldap') + opt.SAMBA3_ADD_OPTION('cups', with_name="enable", without_name="disable") +@@ -72,6 +73,9 @@ def configure(conf): + conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD') + conf.env.developer = True + ++ if Options.options.with_swat: ++ conf.env['build_swat'] = True ++ + if sys.platform != 'openbsd5': + conf.ADD_LDFLAGS("-Wl,--export-dynamic", testflags=True) + +diff --git a/source3/wscript_build b/source3/wscript_build +index 061cc0d..b3a8336 100755 +--- a/source3/wscript_build ++++ b/source3/wscript_build +@@ -424,6 +424,11 @@ NMBD_SRC1 = '''nmbd/asyncdns.c nmbd/nmbd.c nmbd/nmbd_become_dmb.c + + NMBD_SRC = '${NMBD_SRC1}' + ++SWAT_SRC1 = '''web/cgi.c web/diagnose.c web/startstop.c web/statuspage.c ++ web/swat.c web/neg_lang.c''' ++ ++SWAT_SRC = '''${SWAT_SRC1}''' ++ + STATUS_SRC = '''utils/status.c utils/status_profile.c smbd/notify_internal.c''' + + SMBCONTROL_SRC = '''utils/smbcontrol.c''' +@@ -1216,6 +1221,27 @@ bld.SAMBA3_BINARY('winbindd/winbindd', + install_path='${SBINDIR}', + vars=locals()) + ++bld.SAMBA3_BINARY('web/swat', ++ source=SWAT_SRC, ++ deps=''' ++ talloc ++ tevent ++ samba3core ++ libsmb ++ param ++ pdb ++ popt_samba3 ++ smbd_base ++ LOCKING ++ PLAINTEXT_AUTH ++ PASSCHANGE ++ PRINTBASE ++ PRINTING ++ ''', ++ enabled=bld.env.build_swat, ++ install_path='${SBINDIR}', ++ vars=locals()) ++ + bld.SAMBA3_BINARY('rpcclient/rpcclient', + source=RPCCLIENT_SRC, + deps=''' +@@ -1624,6 +1650,13 @@ bld.SAMBA3_BINARY('samba-regedit', + enabled=bld.env.build_regedit, + vars=locals()) + ++swat_dir = os.path.join(bld.curdir, '../swat') ++swat_files = recursive_dirlist(swat_dir, swat_dir, '*') ++swat_msg_dir = os.path.join(bld.curdir, 'po') ++swat_msg_files = recursive_dirlist(swat_msg_dir, swat_msg_dir, '*.msg') ++bld.INSTALL_FILES('${SWATDIR}', swat_files, base_name='../swat') ++bld.INSTALL_FILES('${CODEPAGEDIR}', swat_msg_files, base_name='po') ++ + ########################## INCLUDES ################################# + + bld.RECURSE('auth') +diff --git a/source4/smbd/server.c b/source4/smbd/server.c +index d5d9d9c..28bfb2b 100644 +--- a/source4/smbd/server.c ++++ b/source4/smbd/server.c +@@ -261,6 +261,7 @@ static void show_build(void) + CONFIG_OPTION(CACHEDIR), + CONFIG_OPTION(PIDDIR), + CONFIG_OPTION(PRIVATE_DIR), ++ CONFIG_OPTION(SWATDIR), + CONFIG_OPTION(CODEPAGEDIR), + CONFIG_OPTION(SETUPDIR), + CONFIG_OPTION(WINBINDD_SOCKET_DIR), +diff --git a/swat/help/welcome-no-samba-doc.html b/swat/help/welcome-no-samba-doc.html +new file mode 100644 +index 0000000..67d7bb3a +--- /dev/null ++++ b/swat/help/welcome-no-samba-doc.html +@@ -0,0 +1,3 @@ ++<h3>Welcome to SWAT!</h3> ++ ++More documentation is available at this point if you install the <b>samba-doc</b> package. +diff --git a/swat/help/welcome.html b/swat/help/welcome.html +new file mode 100644 +index 0000000..5f73793 +--- /dev/null ++++ b/swat/help/welcome.html +@@ -0,0 +1,63 @@ ++<h3>Welcome to SWAT!</h3> ++ ++Please choose a configuration action using one of the above buttons ++ ++<h3><a href="/swat/help/manpages/samba.7.html" target="docs">Samba</a> Documentation</h3> ++ ++<ul> ++ <li><b>Daemons</b> ++ <ul> ++ <li><a href="/swat/help/manpages/smbd.8.html" target="docs">smbd</a> - the SMB daemon ++ <li><a href="/swat/help/manpages/nmbd.8.html" target="docs">nmbd</a> - the NetBIOS nameserver ++ <li><a href="/swat/help/manpages/winbindd.8.html" target="docs">winbindd</a> - the winbind daemon ++ </ul> ++ <li><b>Configuration Files</b> ++ <ul> ++ <li><a href="/swat/help/manpages/smb.conf.5.html" target="docs">smb.conf</a> - the main Samba configuration file ++ <li><a href="/swat/help/manpages/lmhosts.5.html" target="docs">lmhosts</a> - NetBIOS hosts file ++ <li><a href="/swat/help/manpages/smbpasswd.5.html" target="docs">smbpasswd</a> - SMB password file ++ </ul> ++ <li><b>Administrative Utilities</b> ++ <ul> ++ <li><a href="/swat/help/manpages/smbcontrol.1.html" target="docs">smbcontrol</a> - send control messages to Samba daemons ++ <li><a href="/swat/help/manpages/smbpasswd.8.html" target="docs">smbpasswd</a> - managing SMB passwords ++ <li><a href="/swat/help/manpages/swat.8.html" target="docs">SWAT</a> - web configuration tool ++ <li><a href="/swat/help/manpages/net.8.html" target="docs">net</a> - tool for administration of Samba and remote CIFS servers ++ <li><a href="/swat/help/manpages/pdbedit.8.html" target="docs">pdbedit</a> - Samba user account management tool ++ <li><a href="/swat/help/manpages/tdbbackup.8.html" target="docs">tdbbackup</a> - Tool for backing up TDB databases ++ </ul> ++ <li><b>Client Tools</b> ++ <ul> ++ <li><a href="/swat/help/manpages/rpcclient.1.html" target="docs">rpcclient</a> - command line MS-RPC client ++ <li><a href="/swat/help/manpages/smbtar.1.html" target="docs">smbtar</a> - SMB backup tool ++ <li><a href="/swat/help/manpages/smbclient.1.html" target="docs">smbclient</a> - command line SMB client ++ <li><a href="/swat/help/manpages/ntlm_auth.1.html" target="docs">ntlm_auth</a> - allow external programs to use NTLM authentication ++ <li><a href="/swat/help/manpages/smbcquotas.1.html" target="docs">smbcquotas</a> - get or set quotas on NTFS 5 shares ++ <li><a href="/swat/help/manpages/smbspool.8.html" target="docs">smbspool</a> - Send a print job to an SMB printer ++ <li><a href="/swat/help/manpages/smbtree.1.html" target="docs">smbtree</a> - Text-based SMB network browsing ++ </ul> ++ <li><b>Diagnostic Utilities</b> ++ <ul> ++ <li><a href="/swat/help/manpages/smbstatus.1.html" target="docs">smbstatus</a> - monitoring Samba ++ <li><a href="/swat/help/manpages/testparm.1.html" target="docs">testparm</a> - validating your config file ++ <li><a href="/swat/help/manpages/nmblookup.1.html" target="docs">nmblookup</a> - NetBIOS name query tool ++ <li><a href="/swat/help/manpages/wbinfo.1.html" target="docs">wbinfo</a> - Tool for getting winbind information ++ </ul> ++ <li><b>Misc. Utilities</b> ++ <ul> ++ <li><a href="/swat/help/manpages/profiles.1.html" target="docs">profiles</a> - migrating profiles from one domain to another ++ <li><a href="/swat/help/manpages/log2pcap.1.html" target="docs">log2pcap</a> - generate pcap files from samba log files ++ </ul> ++ <li><b>Books</b> ++ <ul> ++ <li><a href="/swat/help/using_samba/toc.html" target="docs">Using Samba, 2ed.</a> - by Jay Ts, Robert Eckstein, and David Collier-Brown ++ <li><a href="/swat/help/Samba3-HOWTO/" target="docs">The Official Samba HOWTO and Reference Guide</a> ++ <li><a href="/swat/help/Samba3-ByExample/" target="docs">Samba 3 by Example</a> ++ <li><a href="/swat/help/Samba3-Developers-Guide/" target="docs">The Samba Developer Guide</a> ++ </ul> ++</ul> ++ ++ <h3>Feedback</h3> ++ ++ Please join the <A HREF="http://lists.samba.org/">samba</A> mailing ++ list if you want to discuss issues with this release of SWAT. +diff --git a/swat/include/footer.html b/swat/include/footer.html +new file mode 100644 +index 0000000..7c3b483 +--- /dev/null ++++ b/swat/include/footer.html +@@ -0,0 +1,3 @@ ++</TD></TR></TABLE></CENTER> ++</BODY> ++</HTML> +diff --git a/swat/include/header.html b/swat/include/header.html +new file mode 100644 +index 0000000..c482aed +--- /dev/null ++++ b/swat/include/header.html +@@ -0,0 +1,11 @@ ++<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> ++<HTML> ++<HEAD> ++<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> ++<TITLE>Samba Web Administration Tool</TITLE> ++</HEAD> ++<BODY bgcolor="white"> ++<CENTER> ++<IMG SRC="/swat/images/samba.gif" ALT="[ Samba ]" border=0><BR> ++<TABLE WIDTH="98%" CELLSPACING=1 CELLPADDING=4 BORDER=1> ++<TR><TD BGCOLOR="#ddddd0"> +diff --git a/swat/lang/ja/help/welcome.html b/swat/lang/ja/help/welcome.html +new file mode 100644 +index 0000000..01d3f78 +--- /dev/null ++++ b/swat/lang/ja/help/welcome.html +@@ -0,0 +1,66 @@ ++<h3>SWAT へようこそ!</h3>
++
++上のボタンをクリックして設定を行ってください。
++
++<h3><a href="/swat/help/samba.7.html" target="docs">Samba</a> ドキュメント</h3>
++
++<ul>
++ <li><b>デーモン</b>
++ <ul>
++ <li><a href="/swat/help/smbd.8.html" target="docs">smbd</a> - SMB デーモン
++ <li><a href="/swat/help/nmbd.8.html" target="docs">nmbd</a> - NetBIOS ネームサーバ
++ <li><a href="/swat/help/winbindd.8.html" target="docs">winbindd</a> - winbind デーモン
++ </ul>
++ <li><b>設定ファイル</b>
++ <ul>
++ <li><a href="/swat/help/smb.conf.5.html" target="docs">smb.conf</a> - Samba 設定ファイル
++ <li><a href="/swat/help/lmhosts.5.html" target="docs">lmhosts</a> - NetBIOS の hosts ファイル
++ <li><a href="/swat/help/smbpasswd.5.html" target="docs">smbpasswd</a> - SMB パスワードファイル
++ </ul>
++ <li><b>管理ユーティリティ</b>
++ <ul>
++ <li><a href="/swat/help/smbcontrol.1.html" target="docs">smbcontrol</a> - Samba デーモンへのコントロールメッセージの送出
++ <li><a href="/swat/help/smbpasswd.8.html" target="docs">smbpasswd</a> - SMB パスワードの管理
++ <li><a href="/swat/help/swat.8.html" target="docs">SWAT</a> - Web 設定ツール
++ <li><a href="/swat/help/net.8.html" target="docs">net</a> - Samba およびリモートの CIFS サーバの管理ツール
++ <li><a href="/swat/help/pdbedit.8.html" target="docs">pdbedit</a> - Samba のユーザアカウント管理ツール
++ <li><a href="/swat/help/tdbbackup.8.html" target="docs">tdbbackup</a> - TDB データベースのバックアップツール
++ </ul>
++ <li><b>クライアントツール</b>
++ <ul>
++ <li><a href="/swat/help/rpcclient.1.html" target="docs">rpcclient</a> - コマンドラインの MS-RPC クライアント
++ <li><a href="/swat/help/smbtar.1.html" target="docs">smbtar</a> - SMB バックアップツール
++ <li><a href="/swat/help/smbclient.1.html" target="docs">smbclient</a> - コマンドラインの SMB クライアント
++ <li><a href="/swat/help/smbspool.8.html" target="docs">smbspool</a> - コマンドラインの SMB 印刷クライアント
++ <li><a href="/swat/help/ntlm_auth.1.html" target="docs">ntlm_auth</a> - 別プログラムからの NTLM 認証の使用を実現
++ <li><a href="/swat/help/smbcquotas.1.html" target="docs">smbcquotas</a> - NTFS 5 共有のクォータ情報の設定と取得
++ <li><a href="/swat/help/smbsh.1.html" target="docs">smbsh</a> - UNIX シェルを用いたリモート SMB 共有へのアクセスを実現
++ <li><a href="/swat/help/smbtree.1.html" target="docs">smbtree</a> - テキストベースの SMB ネットワークブラウジング
++ <li><a href="/swat/help/smbspool.8.html" target="docs">smbspool</a> - 印刷ジョブを SMB プリンタに送信
++ </ul>
++ <li><b>診断ユーティリティ</b>
++ <ul>
++ <li><a href="/swat/help/smbstatus.1.html" target="docs">smbstatus</a> - Samba の監視
++ <li><a href="/swat/help/testparm.1.html" target="docs">testparm</a> - 設定ファイルの整合性の検査
++ <li><a href="/swat/help/testprns.1.html" target="docs">testprns</a> - プリンタ設定の検査
++ <li><a href="/swat/help/nmblookup.1.html" target="docs">nmblookup</a> - NetBIOS 名の検索ツール
++ <li><a href="/swat/help/wbinfo.1.html" target="docs">wbinfo</a> - winbind 情報の取得ツール
++ </ul>
++ <li><b>その他のユーティリティ</b>
++ <ul>
++ <li><a href="/swat/help/profiles.1.html" target="docs">profiles</a> - 別ドメインへのプロファイルの移行
++ <li><a href="/swat/help/editreg.1.html" target="docs">editreg</a> - Windows レジストリファイルの編集
++ <li><a href="/swat/help/log2pcap.1.html" target="docs">log2pcap</a> - Samba のログファイルから pcap ファイルの生成
++ </ul>
++ <li><b>書籍</b>
++ <ul>
++ <li><a href="/swat/using_samba/toc.html" target="docs">Using Samba 第二版</a> - 著者: Jay Ts, Robert Eckstein, David Collier-Brown
++ <li><a href="/swat/help/Samba-HOWTO-Collection.html">Samba HOWTO コレクション</a>
++ </ul>
++</ul>
++
++ <h3>フィードバック</h3>
++
++ このバージョンの SWAT に関する問題についての議論を行ないたい方は、
++ <A HREF="http://lists.samba.org/">samba</A> メーリングリストへの参加をお願いします。
++<small>(もしくは <A HREF="http://www.samba.gr.jp/ml/">sugj-tech</A> メーリングリストに日本語でお願いします)</small>
+diff --git a/swat/lang/ru/help/welcome-no-samba-doc.html b/swat/lang/ru/help/welcome-no-samba-doc.html +new file mode 100644 +index 0000000..335560f +--- /dev/null ++++ b/swat/lang/ru/help/welcome-no-samba-doc.html +@@ -0,0 +1,6 @@ ++<h3>Добро пожаловать в SWAT!</h3> ++<!-- ++samba-3.0.25a-2 ++--!> ++ ++Здесь будут ссылки на документацию, если вы установите пакет <b>samba-doc</b>. +diff --git a/swat/lang/ru/help/welcome.html b/swat/lang/ru/help/welcome.html +new file mode 100644 +index 0000000..0e4b2c1 +--- /dev/null ++++ b/swat/lang/ru/help/welcome.html +@@ -0,0 +1,65 @@ ++<h3>Добро пожаловать в SWAT!</h3> ++<!-- ++samba-3.0.25a-2 ++--!> ++ ++С помощью кнопок, расположенных выше, перейдите к желаемому действию ++ ++<h3><a href="/swat/help/manpages/samba.7.html" target="docs">Samba</a> Документация</h3> ++ ++<ul> ++ <li><b>Демоны</b> ++ <ul> ++ <li><a href="/swat/help/manpages/smbd.8.html" target="docs">smbd</a> - демон SMB ++ <li><a href="/swat/help/manpages/nmbd.8.html" target="docs">nmbd</a> - сервер имён NetBIOS ++ <li><a href="/swat/help/manpages/winbindd.8.html" target="docs">winbindd</a> - демон winbind ++ </ul> ++ <li><b>Файлы конфигурации</b> ++ <ul> ++ <li><a href="/swat/help/manpages/smb.conf.5.html" target="docs">smb.conf</a> - главный файл конфигурации Samba ++ <li><a href="/swat/help/manpages/lmhosts.5.html" target="docs">lmhosts</a> - файл хостов NetBIOS ++ <li><a href="/swat/help/manpages/smbpasswd.5.html" target="docs">smbpasswd</a> - файл паролей SMB ++ </ul> ++ <li><b>Утилиты администрирования</b> ++ <ul> ++ <li><a href="/swat/help/manpages/smbcontrol.1.html" target="docs">smbcontrol</a> - отправка управляющих сообщение демонам Samba ++ <li><a href="/swat/help/manpages/smbpasswd.8.html" target="docs">smbpasswd</a> - управление паролями SMB ++ <li><a href="/swat/help/manpages/swat.8.html" target="docs">SWAT</a> - инструмент настройки через веб ++ <li><a href="/swat/help/manpages/net.8.html" target="docs">net</a> - инструмент администрирования Samba и удалённых серверов CIFS ++ <li><a href="/swat/help/manpages/pdbedit.8.html" target="docs">pdbedit</a> - инструмент управления учётными записями Samba ++ <li><a href="/swat/help/manpages/tdbbackup.8.html" target="docs">tdbbackup</a> - инструмент резервного копирования баз данных TDB ++ </ul> ++ <li><b>Клиентские утилиты</b> ++ <ul> ++ <li><a href="/swat/help/manpages/rpcclient.1.html" target="docs">rpcclient</a> - клиент MS-RPC с интерфейсом командной строки ++ <li><a href="/swat/help/manpages/smbtar.1.html" target="docs">smbtar</a> - инструмент резервного копирования SMB ++ <li><a href="/swat/help/manpages/smbclient.1.html" target="docs">smbclient</a> - клиент SMB с интерфейсом командной строки ++ <li><a href="/swat/help/manpages/ntlm_auth.1.html" target="docs">ntlm_auth</a> - позволяет внешним программам использовать аутентификацию NTLM ++ <li><a href="/swat/help/manpages/smbcquotas.1.html" target="docs">smbcquotas</a> - запрашивает или устанавливает квоты ресурсов на NTFS 5 ++ <li><a href="/swat/help/manpages/smbspool.8.html" target="docs">smbspool</a> - отправляет задание на печать через SMB-принтер ++ <li><a href="/swat/help/manpages/smbtree.1.html" target="docs">smbtree</a> - отображение сети SMB в текстовом виде ++ </ul> ++ <li><b>Утилиты диагностики</b> ++ <ul> ++ <li><a href="/swat/help/manpages/smbstatus.1.html" target="docs">smbstatus</a> - мониторинг Samba ++ <li><a href="/swat/help/manpages/testparm.1.html" target="docs">testparm</a> - проверка правильности конфигурационного файла ++ <li><a href="/swat/help/manpages/nmblookup.1.html" target="docs">nmblookup</a> - инструмент для поиска имён NetBIOS ++ <li><a href="/swat/help/manpages/wbinfo.1.html" target="docs">wbinfo</a> - инструмент для получения информации о winbind ++ </ul> ++ <li><b>Различные утилиты</b> ++ <ul> ++ <li><a href="/swat/help/manpages/profiles.1.html" target="docs">profiles</a> - перевод профилей из одного домена в другой ++ <li><a href="/swat/help/manpages/log2pcap.1.html" target="docs">log2pcap</a> - создание файлов pcap из журнальных файлов samba ++ </ul> ++ <li><b>Книги</b> ++ <ul> ++ <li><a href="/swat/help/using_samba/toc.html" target="docs">Использование Samba, 2-я редакция</a> - Джей Тс (Jay Ts), Роберт Экштейн (Robert Eckstein) и Дэвид Колье-Браун (David Collier-Brown) ++ <li><a href="/swat/help/Samba3-HOWTO/" target="docs">Официальный Samba HOWTO и справочное руководство</a> ++ <li><a href="/swat/help/Samba3-ByExample/" target="docs">Samba 3 на примерах</a> ++ <li><a href="/swat/help/Samba3-Developers-Guide/" target="docs">Руководство разработчика Samba</a> ++ </ul> ++</ul> ++ ++ <h3>Обратная связь</h3> ++ ++ Если у вас возникли проблемы с этой версией SWAT, обращайтесь в список рассылки <A HREF="http://lists.samba.org/">samba</A>. +diff --git a/swat/lang/ru/include/header.html b/swat/lang/ru/include/header.html +new file mode 100644 +index 0000000..cfe53cb +--- /dev/null ++++ b/swat/lang/ru/include/header.html +@@ -0,0 +1,14 @@ ++<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> ++<HTML> ++<!-- ++samba-3.0.25a-2 ++--!> ++<HEAD> ++<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> ++<TITLE>Утилита администрирования Samba</TITLE> ++</HEAD> ++<BODY bgcolor="white"> ++<CENTER> ++<IMG SRC="/swat/images/samba.gif" ALT="[ Samba ]" border=0><BR> ++<TABLE WIDTH="98%" CELLSPACING=1 CELLPADDING=4 BORDER=1> ++<TR><TD BGCOLOR="#ddddd0"> +diff --git a/swat/lang/tr/help/welcome.html b/swat/lang/tr/help/welcome.html +new file mode 100644 +index 0000000..bc0d584 +--- /dev/null ++++ b/swat/lang/tr/help/welcome.html +@@ -0,0 +1,66 @@ ++<h3>Swat'a Hoşgeldiniz!</h3> ++ ++Yukarıdaki düğmelerden birini kullanarak bir ayar eylemi seçin. ++ ++<h3><a href="/swat/help/samba.7.html" target="docs">Samba</a> Dökümantasyon</h3> ++ ++<ul> ++ <li><b>Sunucular</b> ++ <ul> ++ <li><a href="/swat/help/smbd.8.html" target="docs">smbd</a> - SMB sunucusu ++ <li><a href="/swat/help/nmbd.8.html" target="docs">nmbd</a> - NetBIOS isim sunucusu ++ <li><a href="/swat/help/winbindd.8.html" target="docs">winbindd</a> - winbind sunucusu ++ </ul> ++ <li><b>Ayar dosyaları</b> ++ <ul> ++ <li><a href="/swat/help/smb.conf.5.html" target="docs">smb.conf</a> - ana Samba ayar dosyası ++ <li><a href="/swat/help/lmhosts.5.html" target="docs">lmhosts</a> - NetBIOS hosts dosyası ++ <li><a href="/swat/help/smbpasswd.5.html" target="docs">smbpasswd</a> - SMB şifre dosyası ++ </ul> ++ <li><b>Yönetim Araçları</b> ++ <ul> ++ <li><a href="/swat/help/smbcontrol.1.html" target="docs">smbcontrol</a> - Samba sunucularına kontrol iletileri gönderir ++ <li><a href="/swat/help/smbpasswd.8.html" target="docs">smbpasswd</a> - SMB şifrelerini düzenler ++ <li><a href="/swat/help/swat.8.html" target="docs">SWAT</a> - web arayüzlü ayar aracı ++ <li><a href="/swat/help/make_smbcodepage.1.html" target="docs">make_smbcodepage</a> - kod sayfası oluşturur ++ <li><a href="/swat/help/make_unicodemap.1.html" target="docs">make_unicodemap</a> - unicode eşleşme dosyası oluşturur ++ <li><a href="/swat/help/smbrun.1.html" target="docs">smbrun</a> - içsel smbd aracı ++ </ul> ++ <li><b>İstemci Araçları</b> ++ <ul> ++ <li><a href="/swat/help/rpcclient.1.html" target="docs">rpcclient</a> - komut satırı MS-RPC istemcisi ++ <li><a href="/swat/help/smbtar.1.html" target="docs">smbtar</a> - SMB yedekleme aracı ++ <li><a href="/swat/help/smbclient.1.html" target="docs">smbclient</a> - komut satırı SMB istemcisi ++ <li><a href="/swat/help/smbspool.8.html" target="docs">smbspool</a> - komut satırı SMB yazıcı istemcisi ++ </ul> ++ <li><b>Teşhis Araçları</b> ++ <ul> ++ <li><a href="/swat/help/smbstatus.1.html" target="docs">smbstatus</a> - Samba gözlemcisi ++ <li><a href="/swat/help/testparm.1.html" target="docs">testparm</a> - ayar dosyasını kontrol eder ++ <li><a href="/swat/help/testprns.1.html" target="docs">testprns</a> - yazıcı ayarlarını kontrol eder ++ <li><a href="/swat/help/nmblookup.1.html" target="docs">nmblookup</a> - NetBIOS isim sorgulama aracı ++ </ul> ++ <li><b>Kitaplar</b> ++ <ul> ++ <li><a href="/swat/using_samba/index.html" target="docs">Samba'yı Kullanmak</a> - Yazan: Robert Eckstein, David Collier-Brown ve Peter Kelly ++ </ul> ++ <li><b>Samba HOWTO (Nasıl Yapılır?) Koleksiyonu</b></li> ++ <ul> ++ <li><a href="/swat/help/Samba-HOWTO-Collection.html">Bütün koleksiyon (tek dosya)</a> ++ <li><a href="/swat/help/DOMAIN_MEMBER.html">Samba 2.x'de security = domain </a> ++ <li><a href="/swat/help/winbind.html">Winbind Kullanarak Windows NT ve UNIX Arasında Birleşik Sistem Girişi</a> ++ <li><a href="/swat/help/msdfs_setup.html">Samba'yı bir MS-DFS Sunucusu Olarak Ayarlamak</a> ++ <li><a href="/swat/help/NT_Security.html">UNIX İzin Bitleri ve Samba 2.x</a> ++ <li><a href="/swat/help/OS2-Client-HOWTO.html">OS/2 İstemcileri ve Samba</a> ++ <li><a href="/swat/help/printer_driver2.html">Samba 2.2.x Altında Yazıcı Kullanımı</a> ++ <li><a href="/swat/help/UNIX_INSTALL.html">Samba Nasıl Kurulur ve Kontrol Edilir?</a> ++ <li><a href="/swat/help/Integrating-with-Windows.html">İsim Çözünme ve Yetkilendirme İşlemlerini Birleştirmek</a> ++ <li><a href="/swat/help/CVS-Access.html">Samba yazılımlarına CVS Erişimi</a> ++ </ul> ++</ul> ++ ++ <h3>İletişim</h3> ++ ++ Eğer SWAT'ın bu sürümü ile ilgili konuları tartışmak istiyorsanız, lütfen ++<A HREF="http://lists.samba.org/">samba</A> eposta listesine üye olun. ++ +\ No newline at end of file + +From 8f5ff504e3e8c4f6a577e08652822216706483f7 Mon Sep 17 00:00:00 2001 +From: Rechi <Rechi@users.noreply.github.com> +Date: Wed, 17 May 2017 16:04:20 +0200 +Subject: [PATCH 19/19] [libsmbclient] additional build fixes + +--- + lib/param/loadparm.c | 2 ++ + source3/Makefile.in | 4 +++- + source3/configure.in | 2 ++ + source3/include/safe_string.h | 2 ++ + 4 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c +index 455c5e6..46eaa5f 100644 +--- a/lib/param/loadparm.c ++++ b/lib/param/loadparm.c +@@ -2186,11 +2186,13 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx) + lpcfg_do_global_parameter(lp_ctx, "winbind sealed pipes", "True"); + lpcfg_do_global_parameter(lp_ctx, "winbindd socket directory", dyn_WINBINDD_SOCKET_DIR); + lpcfg_do_global_parameter(lp_ctx, "winbindd privileged socket directory", dyn_WINBINDD_PRIVILEGED_SOCKET_DIR); ++ #if 0 + lpcfg_do_global_parameter(lp_ctx, "ntp signd socket directory", dyn_NTP_SIGND_SOCKET_DIR); + lpcfg_do_global_parameter_var(lp_ctx, "dns update command", "%s/samba_dnsupdate", dyn_SCRIPTSBINDIR); + lpcfg_do_global_parameter_var(lp_ctx, "spn update command", "%s/samba_spnupdate", dyn_SCRIPTSBINDIR); + lpcfg_do_global_parameter_var(lp_ctx, "samba kcc command", + "%s/samba_kcc", dyn_SCRIPTSBINDIR); ++ #endif + lpcfg_do_global_parameter(lp_ctx, "template shell", "/bin/false"); + lpcfg_do_global_parameter(lp_ctx, "template homedir", "/home/%WORKGROUP%/%ACCOUNTNAME%"); + +diff --git a/source3/Makefile.in b/source3/Makefile.in +index d55a9cd..af1aaa8 100644 +--- a/source3/Makefile.in ++++ b/source3/Makefile.in +@@ -458,7 +458,8 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) $(LIBTSOCKET_OBJ) \ + lib/ctdb_conn.o \ + lib/msg_channel.o \ + lib/id_cache.o \ +- ../lib/socket/interfaces.o lib/memcache.o \ ++ lib/util_ea.o \ ++ ../lib/socket/interfaces.o ../lib/util/memcache.o \ + lib/talloc_dict.o \ + lib/serverid.o \ + lib/asys/asys.o \ +@@ -585,6 +586,7 @@ LIBSMB_OBJ0 = \ + libsmb/auth_generic.o \ + ../lib/krb5_wrap/krb5_samba.o \ + libsmb/clispnego.o \ ++ libsmb/cli_smb2_fnum.o \ + ../auth/gensec/gensec.o \ + ../auth/gensec/gensec_start.o \ + ../auth/gensec/gensec_util.o \ +diff --git a/source3/configure.in b/source3/configure.in +index 8fef7b1..90cb190 100644 +--- a/source3/configure.in ++++ b/source3/configure.in +@@ -1047,6 +1047,8 @@ else + if test x"$CEPHFS_PATH_SPEC" = x"yes"; then + AC_MSG_ERROR([No valid libcephfs found in ${CEPHFS_PATH}]) + fi ++ save_CFLAGS="$CFLAGS" ++ save_LDFLAGS="$LDFLAGS" + fi + + CFLAGS="$save_CFLAGS" +diff --git a/source3/include/safe_string.h b/source3/include/safe_string.h +index 03878b4..832e592 100644 +--- a/source3/include/safe_string.h ++++ b/source3/include/safe_string.h +@@ -55,10 +55,12 @@ + #endif + #define strcasecmp __ERROR__XX__NEVER_USE_STRCASECMP__; + ++#if 0 + #ifdef strncasecmp + #undef strncasecmp + #endif + #define strncasecmp __ERROR__XX__NEVER_USE_STRNCASECMP__; ++#endif + + #endif /* !_SPLINT_ */ + diff --git a/tools/depends/target/samba-gplv3/no_fork_and_exec.patch b/tools/depends/target/samba-gplv3/no_fork_and_exec.patch index e7f2febcab..4c5a1aebac 100644 --- a/tools/depends/target/samba-gplv3/no_fork_and_exec.patch +++ b/tools/depends/target/samba-gplv3/no_fork_and_exec.patch @@ -1,14 +1,14 @@ --- lib/util/become_daemon.c +++ lib/util/become_daemon.c -@@ -76,7 +76,7 @@ - _PUBLIC_ void become_daemon(bool do_fork, bool no_process_group, bool log_stdout) +@@ -80,7 +80,7 @@ { + pid_t newpid; if (do_fork) { -- if (fork()) { -+ if (-1) { - _exit(0); - } - } +- newpid = fork(); ++ newpid = -1; + if (newpid) { + #if HAVE_SYSTEMD + sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=%lu", (unsigned long) newpid); --- lib/util/fault.c +++ lib/util/fault.c @@ -131,7 +131,7 @@ @@ -62,7 +62,7 @@ "'%s': %s\n", command, strerror(errno))); --- source3/lib/util.c.orig 2015-12-12 18:01:38.000000000 +0100 +++ source3/lib/util.c 2015-12-12 18:01:58.000000000 +0100 -@@ -820,7 +820,7 @@ +@@ -795,7 +795,7 @@ cmd = lp_panic_action(talloc_tos()); if (cmd && *cmd) { DEBUG(0, ("smb_panic(): calling panic action [%s]\n", cmd)); @@ -93,7 +93,7 @@ return fd[0]; --- source3/lib/smbrun.c.orig 2015-12-12 18:00:04.000000000 +0100 +++ source3/lib/smbrun.c 2015-12-12 18:00:57.000000000 +0100 -@@ -93,7 +93,7 @@ +@@ -97,7 +97,7 @@ saved_handler = CatchChildLeaveStatus(); @@ -102,7 +102,7 @@ DEBUG(0,("smbrun: fork failed with error %s\n", strerror(errno) )); (void)CatchSignal(SIGCLD, saved_handler); if (outfd) { -@@ -193,8 +193,8 @@ +@@ -197,8 +197,8 @@ exit(82); } @@ -113,7 +113,7 @@ SAFE_FREE(newcmd); } -@@ -257,7 +257,7 @@ +@@ -261,7 +261,7 @@ saved_handler = CatchChildLeaveStatus(); @@ -122,7 +122,7 @@ DEBUG(0, ("smbrunsecret: fork failed with error %s\n", strerror(errno))); (void)CatchSignal(SIGCLD, saved_handler); return errno; -@@ -345,7 +345,7 @@ +@@ -349,7 +349,7 @@ } #endif diff --git a/tools/depends/target/samba-gplv3/perlArrayDefinedDeprecated.patch b/tools/depends/target/samba-gplv3/perlArrayDefinedDeprecated.patch deleted file mode 100644 index cbff5249e2..0000000000 --- a/tools/depends/target/samba-gplv3/perlArrayDefinedDeprecated.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/pidl/lib/Parse/Pidl/ODL.pm -+++ b/pidl/lib/Parse/Pidl/ODL.pm -@@ -70,7 +70,7 @@ - next; - } - my $podl = Parse::Pidl::IDL::parse_file($idl_path, $opt_incdirs); -- if (defined(@$podl)) { -+ if (@$podl) { - require Parse::Pidl::Typelist; - my $basename = basename($idl_path, ".idl"); - ---- a/pidl/pidl -+++ b/pidl/pidl -@@ -604,7 +604,7 @@ - require Parse::Pidl::IDL; - - $pidl = Parse::Pidl::IDL::parse_file($idl_file, \@opt_incdirs); -- defined @$pidl || die "Failed to parse $idl_file"; -+ @$pidl || die "Failed to parse $idl_file"; - } - - require Parse::Pidl::Typelist; diff --git a/tools/depends/target/samba-gplv3/samba_android.patch b/tools/depends/target/samba-gplv3/samba_android.patch index 0ec26e3177..2f4858cfe2 100644 --- a/tools/depends/target/samba-gplv3/samba_android.patch +++ b/tools/depends/target/samba-gplv3/samba_android.patch @@ -90,7 +90,7 @@ diff -ru nsswitch/libwbclient/wbc_sid.c nsswitch/libwbclient/wbc_sid.c diff -ru source3/configure source3/configure --- source3/configure 2013-01-29 10:21:59.000000000 +0100 +++ source3/configure 2015-03-28 08:43:34.903227582 +0100 -@@ -22645,7 +22645,7 @@ +@@ -22424,7 +22424,7 @@ LIBSMBCLIENT_SOVER=0 LIBSMBCLIENT_FULLVER=$LIBSMBCLIENT_SOVER @@ -99,7 +99,7 @@ diff -ru source3/configure source3/configure LIBSMBCLIENT_SHARED_TARGET_FULLVER=$LIBSMBCLIENT_SHARED_TARGET.$LIBSMBCLIENT_FULLVER -@@ -37803,19 +37803,19 @@ +@@ -37580,19 +37580,19 @@ if test "x$ac_cv_lib_pthread_pthread_attr_init" = xyes; then : PTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" @@ -123,7 +123,7 @@ diff -ru source3/configure source3/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -37848,7 +37848,7 @@ +@@ -37625,7 +37625,7 @@ if test "x$ac_cv_lib_pthreads_pthread_attr_init" = xyes; then : PTHREAD_CFLAGS="-D_THREAD_SAFE" @@ -167,7 +167,7 @@ diff -ru lib/addns/dnsquery.c lib/addns/dnsquery.c diff -ru source3/passdb/passdb.c source3/passdb/passdb.c --- source3/Makefile.in +++ source3/Makefile.in -@@ -2410,8 +2410,6 @@ +@@ -2426,8 +2426,6 @@ @SONAMEFLAG@`basename $@` $(LIBSMBCLIENT_SHARED_TARGET): $(LIBSMBCLIENT_SHARED_TARGET_SONAME) @@ -176,7 +176,7 @@ diff -ru source3/passdb/passdb.c source3/passdb/passdb.c $(LIBSMBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ1) @echo Linking non-shared library $@ -@@ -2428,11 +2426,6 @@ +@@ -2444,11 +2442,6 @@ installlibsmbclient:: installdirs libsmbclient @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR) -$(INSTALLLIBCMD_SH) $(LIBSMBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR) @@ -216,7 +216,7 @@ diff -ru source3/passdb/passdb.c source3/passdb/passdb.c diff -ru source3/passdb/pdb_interface.c source3/passdb/pdb_interface.c --- source3/passdb/pdb_interface.c 2013-01-29 09:49:31.000000000 +0100 +++ source3/passdb/pdb_interface.c 2015-03-28 08:30:54.547217284 +0100 -@@ -1563,6 +1563,7 @@ +@@ -1570,6 +1570,7 @@ } /* Primary group members */ @@ -224,7 +224,7 @@ diff -ru source3/passdb/pdb_interface.c source3/passdb/pdb_interface.c setpwent(); while ((pwd = getpwent()) != NULL) { if (pwd->pw_gid == gid) { -@@ -1573,6 +1574,7 @@ +@@ -1580,6 +1581,7 @@ } } endpwent(); diff --git a/tools/depends/target/samba-gplv3/samba_off64_t.patch b/tools/depends/target/samba-gplv3/samba_off64_t.patch index 513de2ac45..6dca7a22f3 100644 --- a/tools/depends/target/samba-gplv3/samba_off64_t.patch +++ b/tools/depends/target/samba-gplv3/samba_off64_t.patch @@ -1,7 +1,7 @@ diff -pur samba-3.6.12/lib/util/util.c arm-linux-androideabi-21/lib/util/util.c --- samba-3.6.12/lib/util/util.c 2013-01-29 09:49:31.000000000 +0100 +++ arm-linux-androideabi-21/lib/util/util.c 2016-07-27 20:01:54.128052081 +0200 -@@ -341,7 +341,7 @@ _PUBLIC_ bool process_exists_by_pid(pid_ +@@ -383,7 +383,7 @@ _PUBLIC_ bool process_exists_by_pid(pid_ is dealt with in posix.c **/ @@ -12,7 +12,7 @@ diff -pur samba-3.6.12/lib/util/util.c arm-linux-androideabi-21/lib/util/util.c int ret; --- a/lib/util/samba_util.h +++ b/lib/util/samba_util.h -@@ -674,7 +674,7 @@ _PUBLIC_ bool process_exists_by_pid(pid_ +@@ -680,7 +680,7 @@ _PUBLIC_ bool process_exists_by_pid(pid_ Simple routine to do POSIX file locking. Cruft in NFS and 64->32 bit mapping is dealt with in posix.c **/ @@ -24,7 +24,7 @@ diff -pur samba-3.6.12/lib/util/util.c arm-linux-androideabi-21/lib/util/util.c diff -pur samba-3.6.12/source3/include/libsmb_internal.h arm-linux-androideabi-21/source3/include/libsmb_internal.h --- samba-3.6.12/source3/include/libsmb_internal.h 2013-01-29 09:49:31.000000000 +0100 +++ arm-linux-androideabi-21/source3/include/libsmb_internal.h 2016-07-27 20:07:42.306136381 +0200 -@@ -304,14 +304,14 @@ int +@@ -311,14 +311,14 @@ int SMBC_rmdir_ctx(SMBCCTX *context, const char *fname); @@ -41,7 +41,7 @@ diff -pur samba-3.6.12/source3/include/libsmb_internal.h arm-linux-androideabi-2 int SMBC_fstatdir_ctx(SMBCCTX *context, -@@ -387,16 +387,16 @@ SMBC_setatr(SMBCCTX * context, SMBCSRV * +@@ -394,16 +394,16 @@ SMBC_setatr(SMBCCTX * context, SMBCSRV * time_t change_time, uint16 mode); @@ -64,7 +64,7 @@ diff -pur samba-3.6.12/source3/include/libsmb_internal.h arm-linux-androideabi-2 diff -pur samba-3.6.12/source3/include/libsmbclient.h arm-linux-androideabi-21/source3/include/libsmbclient.h --- samba-3.6.12/source3/include/libsmbclient.h 2013-01-29 09:49:31.000000000 +0100 +++ arm-linux-androideabi-21/source3/include/libsmbclient.h 2016-07-28 10:21:20.267305706 +0200 -@@ -870,9 +870,9 @@ typedef int (*smbc_rename_fn)(SMBCCTX *o +@@ -884,9 +884,9 @@ typedef int (*smbc_rename_fn)(SMBCCTX *o smbc_rename_fn smbc_getFunctionRename(SMBCCTX *c); void smbc_setFunctionRename(SMBCCTX *c, smbc_rename_fn fn); @@ -76,7 +76,7 @@ diff -pur samba-3.6.12/source3/include/libsmbclient.h arm-linux-androideabi-21/s int whence); smbc_lseek_fn smbc_getFunctionLseek(SMBCCTX *c); void smbc_setFunctionLseek(SMBCCTX *c, smbc_lseek_fn fn); -@@ -903,7 +903,7 @@ void smbc_setFunctionFstatVFS(SMBCCTX *c +@@ -917,7 +917,7 @@ void smbc_setFunctionFstatVFS(SMBCCTX *c typedef int (*smbc_ftruncate_fn)(SMBCCTX *c, SMBCFILE *f, @@ -85,7 +85,7 @@ diff -pur samba-3.6.12/source3/include/libsmbclient.h arm-linux-androideabi-21/s smbc_ftruncate_fn smbc_getFunctionFtruncate(SMBCCTX *c); void smbc_setFunctionFtruncate(SMBCCTX *c, smbc_ftruncate_fn fn); -@@ -953,14 +953,14 @@ typedef int (*smbc_rmdir_fn)(SMBCCTX *c, +@@ -967,14 +967,14 @@ typedef int (*smbc_rmdir_fn)(SMBCCTX *c, smbc_rmdir_fn smbc_getFunctionRmdir(SMBCCTX *c); void smbc_setFunctionRmdir(SMBCCTX *c, smbc_rmdir_fn fn); @@ -102,17 +102,17 @@ diff -pur samba-3.6.12/source3/include/libsmbclient.h arm-linux-androideabi-21/s smbc_lseekdir_fn smbc_getFunctionLseekdir(SMBCCTX *c); void smbc_setFunctionLseekdir(SMBCCTX *c, smbc_lseekdir_fn fn); -@@ -1332,7 +1332,7 @@ ssize_t smbc_write(int fd, const void *b - * @return Upon successful completion, lseek returns the - * resulting offset location as measured in bytes +@@ -1346,7 +1346,7 @@ ssize_t smbc_write(int fd, const void *b + * @return Upon successful completion, lseek returns the + * resulting offset location as measured in bytes * from the beginning of the file. Otherwise, a value -- * of (off_t)-1 is returned and errno is set to +- * of (off_t)-1 is returned and errno is set to + * of (off64_t)-1 is returned and errno is set to * indicate the error: * - EBADF Fildes is not an open file descriptor. * - EINVAL Whence is not a proper value or smbc_init -@@ -1342,7 +1342,7 @@ ssize_t smbc_write(int fd, const void *b - * +@@ -1356,7 +1356,7 @@ ssize_t smbc_write(int fd, const void *b + * * @todo Are errno values complete and correct? */ -off_t smbc_lseek(int fd, off_t offset, int whence); @@ -120,7 +120,7 @@ diff -pur samba-3.6.12/source3/include/libsmbclient.h arm-linux-androideabi-21/s /**@ingroup file -@@ -1526,7 +1526,7 @@ struct smbc_dirent* smbc_readdir(unsigne +@@ -1540,7 +1540,7 @@ struct smbc_dirent* smbc_readdir(unsigne * @see smbc_readdir() * */ @@ -129,7 +129,7 @@ diff -pur samba-3.6.12/source3/include/libsmbclient.h arm-linux-androideabi-21/s /**@ingroup directory -@@ -1551,7 +1551,7 @@ off_t smbc_telldir(int dh); +@@ -1565,7 +1565,7 @@ off_t smbc_telldir(int dh); * * @todo In what does the reture and errno values mean? */ @@ -138,7 +138,7 @@ diff -pur samba-3.6.12/source3/include/libsmbclient.h arm-linux-androideabi-21/s /**@ingroup directory * Create a directory. -@@ -1708,7 +1708,7 @@ smbc_fstatvfs(int fd, +@@ -1722,7 +1722,7 @@ smbc_fstatvfs(int fd, * @see , Unix ftruncate() * */ @@ -149,7 +149,7 @@ diff -pur samba-3.6.12/source3/include/libsmbclient.h arm-linux-androideabi-21/s /**@ingroup attribute --- a/source3/include/proto.h +++ b/source3/include/proto.h -@@ -418,7 +418,7 @@ +@@ -417,7 +417,7 @@ bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensitive); void set_namearray(name_compare_entry **ppname_array, const char *namelist); void free_namearray(name_compare_entry *name_array); @@ -163,7 +163,7 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so +++ arm-linux-androideabi-21/source3/libsmb/clireadwrite.c 2016-07-27 20:08:06.134279334 +0200 @@ -125,7 +125,7 @@ static void cli_read_andx_done(struct te struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct cli_state *cli, uint16_t fnum, - off_t offset, size_t size, + off64_t offset, size_t size, @@ -172,50 +172,32 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so struct tevent_req *req, *subreq; @@ -176,7 +176,7 @@ struct tevent_req *cli_read_andx_create( struct tevent_req *cli_read_andx_send(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct cli_state *cli, uint16_t fnum, - off_t offset, size_t size) + off64_t offset, size_t size) { struct tevent_req *req, *subreq; NTSTATUS status; -@@ -273,7 +273,7 @@ struct cli_readall_state { +@@ -275,7 +275,7 @@ struct cli_pull_state { struct tevent_context *ev; struct cli_state *cli; uint16_t fnum; - off_t start_offset; + off64_t start_offset; - size_t size; - size_t received; - uint8_t *buf; -@@ -285,7 +285,7 @@ static struct tevent_req *cli_readall_se - struct event_context *ev, - struct cli_state *cli, - uint16_t fnum, -- off_t offset, size_t size) -+ off64_t offset, size_t size) - { - struct tevent_req *req, *subreq; - struct cli_readall_state *state; -@@ -408,7 +408,7 @@ struct cli_pull_state { - struct event_context *ev; - struct cli_state *cli; - uint16_t fnum; -- off_t start_offset; -+ off64_t start_offset; off_t size; NTSTATUS (*sink)(char *buf, size_t n, void *priv); -@@ -468,7 +468,7 @@ static void cli_pull_read_done(struct te +@@ -330,7 +330,7 @@ static void cli_pull_read_done(struct te struct tevent_req *cli_pull_send(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct cli_state *cli, - uint16_t fnum, off_t start_offset, + uint16_t fnum, off64_t start_offset, off_t size, size_t window_size, NTSTATUS (*sink)(char *buf, size_t n, void *priv), -@@ -672,7 +672,7 @@ NTSTATUS cli_pull_recv(struct tevent_req +@@ -660,7 +660,7 @@ NTSTATUS cli_pull_recv(struct tevent_req } NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum, @@ -224,7 +206,7 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so NTSTATUS (*sink)(char *buf, size_t n, void *priv), void *priv, off_t *received) { -@@ -722,7 +722,7 @@ static NTSTATUS cli_read_sink(char *buf, +@@ -710,7 +710,7 @@ static NTSTATUS cli_read_sink(char *buf, } NTSTATUS cli_read(struct cli_state *cli, uint16_t fnum, @@ -233,7 +215,7 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so size_t *nread) { NTSTATUS status; -@@ -746,7 +746,7 @@ ssize_t cli_read(struct cli_state *cli, +@@ -734,7 +734,7 @@ ssize_t cli_read(struct cli_state *cli, ****************************************************************************/ NTSTATUS cli_smbwrite(struct cli_state *cli, uint16_t fnum, char *buf, @@ -242,8 +224,8 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so { uint8_t *bytes; ssize_t total = 0; -@@ -827,7 +827,7 @@ struct tevent_req *cli_write_andx_create - struct event_context *ev, +@@ -815,7 +815,7 @@ struct tevent_req *cli_write_andx_create + struct tevent_context *ev, struct cli_state *cli, uint16_t fnum, uint16_t mode, const uint8_t *buf, - off_t offset, size_t size, @@ -251,8 +233,8 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so struct tevent_req **reqs_before, int num_reqs_before, struct tevent_req **psmbreq) -@@ -890,7 +890,7 @@ struct tevent_req *cli_write_andx_send(T - struct event_context *ev, +@@ -878,7 +878,7 @@ struct tevent_req *cli_write_andx_send(T + struct tevent_context *ev, struct cli_state *cli, uint16_t fnum, uint16_t mode, const uint8_t *buf, - off_t offset, size_t size) @@ -260,7 +242,7 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so { struct tevent_req *req, *subreq; NTSTATUS status; -@@ -962,7 +962,7 @@ struct cli_writeall_state { +@@ -950,7 +950,7 @@ struct cli_writeall_state { uint16_t fnum; uint16_t mode; const uint8_t *buf; @@ -269,7 +251,7 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so size_t size; size_t written; }; -@@ -975,7 +975,7 @@ static struct tevent_req *cli_writeall_s +@@ -963,7 +963,7 @@ static struct tevent_req *cli_writeall_s uint16_t fnum, uint16_t mode, const uint8_t *buf, @@ -278,7 +260,7 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so { struct tevent_req *req, *subreq; struct cli_writeall_state *state; -@@ -1059,7 +1059,7 @@ static NTSTATUS cli_writeall_recv(struct +@@ -1047,7 +1047,7 @@ static NTSTATUS cli_writeall_recv(struct } NTSTATUS cli_writeall(struct cli_state *cli, uint16_t fnum, uint16_t mode, @@ -287,25 +269,16 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so size_t *pwritten) { TALLOC_CTX *frame = talloc_stackframe(); -@@ -1095,7 +1095,7 @@ NTSTATUS cli_writeall(struct cli_state * - struct cli_push_write_state { - struct tevent_req *req;/* This is the main request! Not the subreq */ - uint32_t idx; -- off_t ofs; -+ off64_t ofs; - uint8_t *buf; - size_t size; - }; -@@ -1105,7 +1105,7 @@ struct cli_push_state { +@@ -1097,7 +1097,7 @@ struct cli_push_state { struct cli_state *cli; uint16_t fnum; uint16_t mode; - off_t start_offset; + off64_t start_offset; - size_t window_size; size_t (*source)(uint8_t *buf, size_t n, void *priv); -@@ -1114,7 +1114,7 @@ struct cli_push_state { + void *priv; +@@ -1105,7 +1105,7 @@ struct cli_push_state { bool eof; size_t chunk_size; @@ -314,8 +287,8 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so /* * Outstanding requests -@@ -1178,7 +1178,7 @@ static bool cli_push_write_setup(struct - struct tevent_req *cli_push_send(TALLOC_CTX *mem_ctx, struct event_context *ev, +@@ -1139,7 +1139,7 @@ static bool cli_push_write_setup(struct + struct tevent_req *cli_push_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct cli_state *cli, uint16_t fnum, uint16_t mode, - off_t start_offset, size_t window_size, @@ -323,7 +296,7 @@ diff -pur samba-3.6.12/source3/libsmb/clireadwrite.c arm-linux-androideabi-21/so size_t (*source)(uint8_t *buf, size_t n, void *priv), void *priv) -@@ -1287,7 +1287,7 @@ NTSTATUS cli_push_recv(struct tevent_req +@@ -1405,7 +1405,7 @@ NTSTATUS cli_push_recv(struct tevent_req } NTSTATUS cli_push(struct cli_state *cli, uint16_t fnum, uint16_t mode, @@ -377,7 +350,7 @@ diff -pur samba-3.6.12/source3/libsmb/libsmb_compat.c arm-linux-androideabi-21/s diff -pur samba-3.6.12/source3/libsmb/libsmb_dir.c arm-linux-androideabi-21/source3/libsmb/libsmb_dir.c --- samba-3.6.12/source3/libsmb/libsmb_dir.c 2013-01-29 09:49:31.000000000 +0100 +++ arm-linux-androideabi-21/source3/libsmb/libsmb_dir.c 2016-07-27 20:08:51.646552457 +0200 -@@ -1386,7 +1386,7 @@ SMBC_rmdir_ctx(SMBCCTX *context, +@@ -1392,7 +1392,7 @@ SMBC_rmdir_ctx(SMBCCTX *context, * Routine to return the current directory position */ @@ -386,7 +359,7 @@ diff -pur samba-3.6.12/source3/libsmb/libsmb_dir.c arm-linux-androideabi-21/sour SMBC_telldir_ctx(SMBCCTX *context, SMBCFILE *dir) { -@@ -1427,7 +1427,7 @@ SMBC_telldir_ctx(SMBCCTX *context, +@@ -1433,7 +1433,7 @@ SMBC_telldir_ctx(SMBCCTX *context, * We return the pointer here as the offset */ TALLOC_FREE(frame); @@ -395,7 +368,7 @@ diff -pur samba-3.6.12/source3/libsmb/libsmb_dir.c arm-linux-androideabi-21/sour } /* -@@ -1468,7 +1468,7 @@ check_dir_ent(struct smbc_dir_list *list +@@ -1474,7 +1474,7 @@ check_dir_ent(struct smbc_dir_list *list int SMBC_lseekdir_ctx(SMBCCTX *context, SMBCFILE *dir, @@ -407,7 +380,7 @@ diff -pur samba-3.6.12/source3/libsmb/libsmb_dir.c arm-linux-androideabi-21/sour diff -pur samba-3.6.12/source3/libsmb/libsmb_file.c arm-linux-androideabi-21/source3/libsmb/libsmb_file.c --- samba-3.6.12/source3/libsmb/libsmb_file.c 2013-01-29 09:49:31.000000000 +0100 +++ arm-linux-androideabi-21/source3/libsmb/libsmb_file.c 2016-07-27 20:09:06.190639760 +0200 -@@ -237,12 +237,12 @@ SMBC_read_ctx(SMBCCTX *context, +@@ -243,12 +243,12 @@ SMBC_read_ctx(SMBCCTX *context, * offset: * * Compiler bug (possibly) -- gcc (GCC) 3.3.5 (Debian 1:3.3.5-2) -- @@ -423,16 +396,16 @@ diff -pur samba-3.6.12/source3/libsmb/libsmb_file.c arm-linux-androideabi-21/sou if (!context || !context->internal->initialized) { errno = EINVAL; -@@ -322,7 +322,7 @@ SMBC_write_ctx(SMBCCTX *context, +@@ -300,7 +300,7 @@ SMBC_write_ctx(SMBCCTX *context, const void *buf, size_t count) { - off_t offset; + off64_t offset; - char *server = NULL, *share = NULL, *user = NULL, *password = NULL; - char *path = NULL; - char *targetpath = NULL; -@@ -673,10 +673,10 @@ SMBC_setatr(SMBCCTX * context, SMBCSRV * + TALLOC_CTX *frame = talloc_stackframe(); + NTSTATUS status; + +@@ -605,10 +605,10 @@ SMBC_setatr(SMBCCTX * context, SMBCSRV * * A routine to lseek() a file */ @@ -445,7 +418,7 @@ diff -pur samba-3.6.12/source3/libsmb/libsmb_file.c arm-linux-androideabi-21/sou int whence) { off_t size; -@@ -773,7 +767,7 @@ SMBC_lseek_ctx(SMBCCTX *context, +@@ -672,7 +672,7 @@ SMBC_lseek_ctx(SMBCCTX *context, int SMBC_ftruncate_ctx(SMBCCTX *context, SMBCFILE *file, @@ -453,26 +426,26 @@ diff -pur samba-3.6.12/source3/libsmb/libsmb_file.c arm-linux-androideabi-21/sou + off64_t length) { off_t size = length; - char *server = NULL; + TALLOC_CTX *frame = talloc_stackframe(); diff -pur samba-3.6.12/source3/libsmb/proto.h arm-linux-androideabi-21/source3/libsmb/proto.h --- samba-3.6.12/source3/libsmb/proto.h 2013-01-29 09:49:31.000000000 +0100 +++ arm-linux-androideabi-21/source3/libsmb/proto.h 2016-07-27 20:08:33.766445144 +0200 -@@ -732,37 +732,37 @@ NTSTATUS cli_set_fs_quota_info(struct cl +@@ -758,37 +758,37 @@ NTSTATUS cli_set_fs_quota_info(struct cl struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct cli_state *cli, uint16_t fnum, - off_t offset, size_t size, + off64_t offset, size_t size, struct tevent_req **psmbreq); struct tevent_req *cli_read_andx_send(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct cli_state *cli, uint16_t fnum, - off_t offset, size_t size); + off64_t offset, size_t size); NTSTATUS cli_read_andx_recv(struct tevent_req *req, ssize_t *received, uint8_t **rcvbuf); struct tevent_req *cli_pull_send(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct cli_state *cli, - uint16_t fnum, off_t start_offset, + uint16_t fnum, off64_t start_offset, @@ -494,7 +467,7 @@ diff -pur samba-3.6.12/source3/libsmb/proto.h arm-linux-androideabi-21/source3/l - off_t offset, size_t size1, size_t *ptotal); + off64_t offset, size_t size1, size_t *ptotal); struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct cli_state *cli, uint16_t fnum, uint16_t mode, const uint8_t *buf, - off_t offset, size_t size, @@ -502,8 +475,8 @@ diff -pur samba-3.6.12/source3/libsmb/proto.h arm-linux-androideabi-21/source3/l struct tevent_req **reqs_before, int num_reqs_before, struct tevent_req **psmbreq); -@@ -770,23 +770,23 @@ struct tevent_req *cli_write_andx_send(T - struct event_context *ev, +@@ -796,23 +796,23 @@ struct tevent_req *cli_write_andx_send(T + struct tevent_context *ev, struct cli_state *cli, uint16_t fnum, uint16_t mode, const uint8_t *buf, - off_t offset, size_t size); @@ -515,7 +488,7 @@ diff -pur samba-3.6.12/source3/libsmb/proto.h arm-linux-androideabi-21/source3/l + const uint8_t *buf, off64_t offset, size_t size, size_t *pwritten); - struct tevent_req *cli_push_send(TALLOC_CTX *mem_ctx, struct event_context *ev, + struct tevent_req *cli_push_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct cli_state *cli, uint16_t fnum, uint16_t mode, - off_t start_offset, size_t window_size, @@ -574,7 +547,7 @@ diff -pur samba-3.6.12/source3/utils/smbget.c arm-linux-androideabi-21/source3/u { if (s > 1024 * 1024 * 1024) { snprintf(buffer, l, "%.2fGB", 1.0 * s / (1024 * 1024 * 1024)); -@@ -239,7 +239,7 @@ static char *print_time(long t) +@@ -238,7 +238,7 @@ static char *print_time(long t) return buffer; } @@ -583,7 +556,7 @@ diff -pur samba-3.6.12/source3/utils/smbget.c arm-linux-androideabi-21/source3/u { double avg = 0.0; long eta = -1; -@@ -287,7 +287,7 @@ static int smb_download_file(const char +@@ -286,7 +286,7 @@ static int smb_download_file(const char char path[SMB_MAXPATHLEN]; char checkbuf[2][RESUME_CHECK_SIZE]; char *readbuf = NULL; @@ -592,7 +565,7 @@ diff -pur samba-3.6.12/source3/utils/smbget.c arm-linux-androideabi-21/source3/u struct stat localstat, remotestat; snprintf(path, SMB_MAXPATHLEN-1, "%s%s%s", base, (*base && *name && name[0] != '/' && base[strlen(base)-1] != '/')?"/":"", name); -@@ -395,7 +395,7 @@ static int smb_download_file(const char +@@ -394,7 +394,7 @@ static int smb_download_file(const char } if(offset_check) { |