Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 28062 Details for
Bug 45254
Add DLZ (Dynamically Loadable Zones) to Bind 9.2.2
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
DLZ 0.6.0 actual patch file from the projects release tarball
dlz.patch (text/plain), 1.12 MB, created by
Brian Friday
on 2004-03-26 07:41:45 UTC
(
hide
)
Description:
DLZ 0.6.0 actual patch file from the projects release tarball
Filename:
MIME Type:
Creator:
Brian Friday
Created:
2004-03-26 07:41:45 UTC
Size:
1.12 MB
patch
obsolete
>diff -Naur bind-9.2.2-orig/bin/Makefile.in bind-9.2.2/bin/Makefile.in >--- bind-9.2.2-orig/bin/Makefile.in Tue Jan 9 16:39:06 2001 >+++ bind-9.2.2/bin/Makefile.in Thu May 1 18:06:48 2003 >@@ -19,7 +19,7 @@ > VPATH = @srcdir@ > top_srcdir = @top_srcdir@ > >-SUBDIRS = named rndc dig dnssec tests nsupdate check >+SUBDIRS = @DLZ_BDB_UTIL@ named rndc dig dnssec tests nsupdate check > TARGETS = > > @BIND9_MAKE_RULES@ >diff -Naur bind-9.2.2-orig/bin/dlzbdb/Makefile.in bind-9.2.2/bin/dlzbdb/Makefile.in >--- bind-9.2.2-orig/bin/dlzbdb/Makefile.in Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/dlzbdb/Makefile.in Sun Apr 27 17:34:35 2003 >@@ -0,0 +1,73 @@ >+# Copyright (C) 1998-2001 Internet Software Consortium. >+# >+# Permission to use, copy, modify, and distribute this software for any >+# purpose with or without fee is hereby granted, provided that the above >+# copyright notice and this permission notice appear in all copies. >+# >+# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ >+# $Id: Makefile.in,v 1.74 2001/06/01 00:45:00 bwelling Exp $ >+ >+srcdir = @srcdir@ >+VPATH = @srcdir@ >+top_srcdir = @top_srcdir@ >+ >+@BIND9_VERSION@ >+ >+@BIND9_INCLUDES@ >+ >+DLZINCLUDES = @DLZ_BDB_INC@ >+ >+CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include \ >+ ${ISC_INCLUDES} ${DLZINCLUDES} >+ >+CDEFINES = @USE_DLZ_BDB@ >+CWARNINGS = >+ >+DLZLIBS = @DLZ_BDB_LIBS@ >+ISCLIBS = ../../lib/isc/libisc.@A@ >+ >+DEPLIBS = ${ISCDEPLIBS} >+ >+LIBS = ${ISCLIBS} ${DLZLIBS} @LIBS@ >+ >+TARGETS = dlzbdb >+ >+SRCS = dlzbdb.c >+ >+#MANPAGES = >+ >+#HTMLPAGES = >+ >+#MANOBJS = ${MANPAGES} ${HTMLPAGES} >+ >+@BIND9_MAKE_RULES@ >+ >+dlzbdb.@O@: dlzbdb.c >+ ${LIBTOOL} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \ >+ -c ${srcdir}/dlzbdb.c >+ >+dlzbdb: dlzbdb.@O@ ${DEPLIBS} >+ ${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ dlzbdb.@O@ ${LIBS} >+ >+doc man:: ${MANOBJS} >+ >+#docclean manclean maintainer-clean:: >+# rm -f ${MANOBJS} >+ >+clean distclean maintainer-clean:: >+ rm -f ${TARGETS} >+ >+installdirs: >+ $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} >+# $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 >+ >+install:: dlzbdb installdirs >+ ${LIBTOOL} ${INSTALL_PROGRAM} dlzbdb ${DESTDIR}${sbindir} >\ No newline at end of file >diff -Naur bind-9.2.2-orig/bin/dlzbdb/dlzbdb.c bind-9.2.2/bin/dlzbdb/dlzbdb.c >--- bind-9.2.2-orig/bin/dlzbdb/dlzbdb.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/dlzbdb/dlzbdb.c Sun Apr 27 17:34:35 2003 >@@ -0,0 +1,1120 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifdef DLZ_BDB >+ >+// exit codes >+// 0 everything ok >+// 1 error parsing command line >+// 2 Missing, too many or invalid combination of command line parameters >+// 3 Unable to open BDB database. >+// 4 Unable to allocate memory for, or create lexer. >+// 5 unable to perform BDB cursor operation >+ >+#include <config.h> >+#include <stdio.h> >+#include <string.h> >+#include <stdlib.h> >+ >+#include <isc/buffer.h> >+#include <isc/commandline.h> >+#include <isc/formatcheck.h> >+#include <isc/lex.h> >+#include <isc/mem.h> >+#include <isc/result.h> >+#include <isc/string.h> >+#include <isc/util.h> >+ >+#include <db.h> >+ >+/* shut up compiler warnings about no previous prototype */ >+ >+static void >+show_usage(void); >+ >+int >+getzone(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey); >+ >+int >+gethost(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey); >+ >+void >+bdb_cleanup(void); >+ >+isc_result_t >+bdb_opendb(DBTYPE db_type, DB **db_out, const char *db_name, int flags); >+ >+void >+put_data(isc_boolean_t dns_data, char *input_key, char *input_data); >+ >+void >+insert_data(void); >+ >+isc_result_t >+openBDB(void); >+ >+isc_result_t >+open_lexer(void); >+ >+void >+close_lexer(void); >+ >+void >+operation_add(void); >+ >+void >+operation_bulk(void); >+ >+void >+operation_listOrDelete(isc_boolean_t dlt); >+ >+ >+ /* Maximum length of a single data line that >+ * may be inserted into database by this program. >+ * If you need to insert a line of data that is more >+ * than 10,000 characters change this definition. >+ */ >+ >+#define max_data_len 10000 >+ >+ /* BDB database names. If you want to use different >+ * database names change them here. >+ */ >+ >+#define dlz_data "dns_data" >+#define dlz_zone "dns_zone" >+#define dlz_host "dns_host" >+#define dlz_client "dns_client" >+ >+ >+ /* Error code returned by BDB secondary index callback functions. >+ * This error is returned if the callback function could not create >+ * the secondary index for any reason. >+ */ >+ >+#define BDBparseErr 1 >+ >+ /* A struct to hold all the relevant info about the database */ >+ >+typedef struct bdb_instance { >+ DB_ENV *dbenv; // BDB environment >+ DB *data; // dns_data database handle >+ DBC *cursor; // database cursor >+ DBC *cursor2;// second cursor used during list operation. >+ DBC *cursor3;// third cursor used during list operation >+ DBC *cursor4;// fourth cursor used during list operation >+ DB *zone; // zone database handle >+ DB *host; // host database handle >+ DB *client; // client database handle >+}bdb_instance_t; >+ >+ /* Possible operations */ >+ >+#define list 1 // list data >+#define dele 2 // delete data >+#define add 3 // add a single piece of data >+#define bulk 4 // bulk load data >+ >+ >+ /* quit macro is used instead of exit. quit always trys to close the lexer >+ * and the BDB database before exiting. >+ */ >+ >+#define quit(i) close_lexer(); bdb_cleanup(); exit(i); >+ >+ /* checkOp is used to verify that only one operation (list, del, add, bulk) >+ * is specified on the command line. This prevents a user from specifying >+ * two operations on the command line, which would make no sense anyway. >+ */ >+ >+#define checkOp(x) if(x != 0){fprintf(stderr, "\nonly one operation "\ >+ "(l d a f) may be specified\n"); quit(2);} >+ >+ /* checkParam is used to only allow a parameter to be specified once. >+ * I.E. the parameter key can only be used on the command line once. >+ * any attempt to use it twice causes an error. >+ */ >+ >+#define checkParam(x, y) if(x != NULL){fprintf(stderr, "\n%s may only "\ >+ "be specified once\n", y); quit(2);} >+ >+ /* checkInvalidParam is used to only allow paramters which make sense for >+ * the operation selected. I.E. passing the key parameter makes no sense >+ * for the add operation, and thus it isn't allowed. >+ */ >+ >+#define checkInvalidParam(x, y, z) if(x != NULL){fprintf(stderr, "\n%s "\ >+ "may not be specified %s\n", y, z); quit(2);} >+ >+ /* Global Variables */ >+ >+int operation = 0; // operation to perform. >+// allow new lock files or DB to be created. >+isc_boolean_t create_allowed = isc_boolean_false; >+char *key = NULL; // key to use in list & del operations >+unsigned int key_val;// key as unsigned int used in list & del operations >+char *zone = NULL; // zone to use in list operations >+char *host = NULL; // host to use in list operations >+char *c_zone = NULL; // client zone to use in list operations >+char *c_ip = NULL; // client IP to use in list operations >+char *a_data = NULL; // data in add operation >+char *bulk_file = NULL; // bulk data file to load >+char *db_envdir = NULL; // BDB environment location >+char *db_file = NULL; // BDB database file location. >+bdb_instance_t db; // BDB instance we are operating on >+isc_lex_t *lexer = NULL; // lexer for use to use in parsing input >+isc_mem_t *lex_mctx = NULL; // memory context for lexer >+char lex_data_buf[max_data_len];// data array to use for lex_buffer below >+isc_buffer_t lex_buffer; // buffer for lexer during add operation >+ >+ >+ /* Displays usage message */ >+ >+static void >+show_usage(void) { >+ fprintf(stderr, "\n\n\ >+---Usage:---------------------------------------------------------------------\ >+\n\n\ >+ List data:\n\ >+ dlzbdb -l [-k key] [-z zone] [-h host] [-c client_zone] [-i client_ip]\n\ >+ BDB_environment BDB_database\n\n\ >+ Delete data:\n\ >+ dlzbdb -d [-k key] [-c client_zone] [-i client_ip]\n\ >+ BDB_environment BDB_database\n\n\ >+ Bulk load data:\n\ >+ dlzbdb -f file_to_load BDB_environment BDB_database\n\n\ >+ Add data:\n\ >+ dlzbdb -a \"dns data to be added\" BDB_environment BDB_database\n\n\ >+ Normally operations can only be performed on an existing database files.\n\ >+ Use the -n flag with any operation to allow files to be created.\n\ >+ Existing files will NOT be truncated by using the -n flag.\n\ >+ The -n flag will allow a new database to be created, or allow new\n\ >+ environment files to be created for an existing database.\n\n\ >+---Format for -f & -a options:------------------------------------------------\ >+\n\n\ >+db_type zone host dns_type ttl ip\n\ >+db_type zone host dns_type ttl mx_priority mail_host\n\ >+db_type zone host dns_type ttl nm_svr resp_psn serial refresh retry expire min\ >+\n\ >+db_type zone client_ip\n\n\ >+---Examples:------------------------------------------------------------------\ >+\n\n\ >+d mynm.com www A 10 127.0.0.1\n\ >+d mynm.com @ MX 10 5 mail\n\ >+d mynm.com @ SOA 10 ns1.mynm.com. root.mynm.com. 2 28800 7200 604800 86400\n\ >+c mynm.com 127.0.0.1\n\ >+c mynm.com 192.168.0.10\n\ >+"); >+quit(1); >+} >+ >+ >+ /* BDB callback to create zone secondary index */ >+ >+int >+getzone(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey){ >+ char *tmp; >+ char *left; >+ char *right; >+ int result=0; >+ >+ UNUSED(dbp); >+ UNUSED(pkey); >+ >+ // Allocate memory to use in parsing the string >+ tmp = right = malloc(pdata->size + 1); >+ >+ // verify memory was allocated >+ if(right == NULL){ >+ result = BDBparseErr; >+ goto getzone_cleanup; >+ } >+ >+ // copy data string into newly allocated memory >+ strncpy(right, pdata->data, pdata->size); >+ right[pdata->size] = '\0'; >+ >+ // split string at the first space >+ left = isc_string_separate(&right, " "); >+ >+ // copy string for "zone" secondary index >+ skey->data = strdup(left); >+ if(skey->data == NULL){ >+ result = BDBparseErr; >+ goto getzone_cleanup; >+ } >+ // set required values for BDB >+ skey->size = strlen(skey->data); >+ skey->flags = DB_DBT_APPMALLOC; >+ >+getzone_cleanup: >+ >+ // cleanup memory >+ if(tmp != NULL) >+ free(tmp); >+ >+ return result; >+} >+ >+ /* BDB callback to create host secondary index */ >+ >+int >+gethost(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey){ >+ char *tmp; >+ char *left; >+ char *right; >+ int result=0; >+ >+ UNUSED(dbp); >+ UNUSED(pkey); >+ >+ // allocate memory to use in parsing the string >+ tmp = right = malloc(pdata->size + 1); >+ >+ // verify memory was allocated >+ if(tmp == NULL){ >+ result = BDBparseErr; >+ goto gethost_cleanup; >+ } >+ >+ // copy data string into newly allocated memory >+ strncpy(right, pdata->data, pdata->size); >+ right[pdata->size] = '\0'; >+ >+ // we don't care about left string. >+ // memory of left string will be freed when tmp is freed. >+ isc_string_separate(&right, " "); >+ >+ // verify right still has some characters left >+ if(right == NULL){ >+ result = BDBparseErr; >+ goto gethost_cleanup; >+ } >+ >+ // get "host" from data string >+ left = isc_string_separate(&right, " "); >+ // copy string for "host" secondary index >+ skey->data = strdup(left); >+ if(skey->data == NULL){ >+ result = BDBparseErr; >+ goto gethost_cleanup; >+ } >+ // set required values for BDB >+ skey->size = strlen(skey->data); >+ skey->flags = DB_DBT_APPMALLOC; >+ >+gethost_cleanup: >+ >+ // cleanup memory >+ if(tmp != NULL) >+ free(tmp); >+ >+ return result; >+} >+ >+ /* Performs BDB cleanup. Close each database that we opened. >+ * Close environment. Set each var to NULL so we know they >+ * were closed and don't accidentally try to close them twice. >+ */ >+ >+void >+bdb_cleanup(void){ >+ >+ /* close cursors */ >+ if(db.cursor4 != NULL){ >+ db.cursor4->c_close(db.cursor4); >+ db.cursor4 = NULL; >+ } >+ >+ if(db.cursor3 != NULL){ >+ db.cursor3->c_close(db.cursor3); >+ db.cursor3 = NULL; >+ } >+ >+ if(db.cursor2 != NULL){ >+ db.cursor2->c_close(db.cursor2); >+ db.cursor2 = NULL; >+ } >+ >+ if(db.cursor != NULL){ >+ db.cursor->c_close(db.cursor); >+ db.cursor = NULL; >+ } >+ >+ /* close databases */ >+ if(db.data != NULL){ >+ db.data->close(db.data, 0); >+ db.data = NULL; >+ } >+ if(db.host != NULL){ >+ db.host->close(db.host, 0); >+ db.host = NULL; >+ } >+ if(db.zone != NULL){ >+ db.zone->close(db.zone, 0); >+ db.zone = NULL; >+ } >+ if(db.client != NULL){ >+ db.client->close(db.client, 0); >+ db.client = NULL; >+ } >+ >+ /* close environment */ >+ if(db.dbenv != NULL){ >+ db.dbenv->close(db.dbenv, 0); >+ db.dbenv = NULL; >+ } >+} >+ >+ /* Initializes, sets flags and then opens Berkeley databases. */ >+ >+isc_result_t >+bdb_opendb(DBTYPE db_type, DB **db_out, const char *db_name, int flags){ >+ >+ int result; >+ int createFlag = 0; >+ >+ /* Initialize the database. */ >+ if ((result = db_create(db_out, db.dbenv, 0)) != 0) { >+ fprintf(stderr, "BDB could not initialize %s database. BDB error: %s", >+ db_name, db_strerror(result)); >+ return ISC_R_FAILURE; >+ } >+ >+ /* set database flags. */ >+ if ((result = (*db_out)->set_flags(*db_out, flags)) != 0) { >+ fprintf(stderr, "BDB could not set flags for %s database. BDB error: %s", >+ db_name, db_strerror(result)); >+ return ISC_R_FAILURE; >+ } >+ >+ if(create_allowed == isc_boolean_true){ >+ createFlag = DB_CREATE; >+ } >+ /* open the database. */ >+ if ((result = (*db_out)->open(*db_out, NULL, db_file, db_name, db_type, >+ createFlag, 0)) != 0) { >+ fprintf(stderr, "BDB could not open %s database in %s. BDB error: %s", >+ db_name, db_file, db_strerror(result)); >+ return ISC_R_FAILURE; >+ } >+ >+ return ISC_R_SUCCESS; >+} >+ >+ /* parses input and adds it to the BDB database >+ * Lexer should be instantiated, and either a file or buffer opened for it. >+ * The insert_data function is used by both the add, and bulk insert >+ * operations >+ */ >+ >+void >+put_data(isc_boolean_t dns_data, char *input_key, char *input_data){ >+ >+ int bdbres; >+ DBT key, data; >+ >+ // make sure key & data are completely empty >+ memset(&key, 0, sizeof(key)); >+ memset(&data, 0, sizeof(data)); >+ >+ // if client data, setup key for insertion >+ if(!dns_data && input_key != NULL){ >+ key.data = input_key; >+ key.size = strlen(input_key); >+ key.flags = 0; >+ } >+ // always setup data for insertion >+ data.data = input_data; >+ data.size = strlen(input_data); >+ data.flags = 0; >+ >+ // execute insert against appropriate database. >+ if(dns_data){ >+ bdbres = db.data->put(db.data, NULL, &key, &data, DB_APPEND); >+ } else { >+ bdbres = db.client->put(db.client, NULL, &key, &data, 0); >+ } >+ >+ // if something went wrong, log error and quit >+ if(bdbres != 0){ >+ fprintf(stderr, "BDB could not insert data. Error: %s", >+ db_strerror(bdbres)); >+ quit(5); >+ } >+} >+ >+ >+void >+insert_data(void){ >+ unsigned int opt = ISC_LEXOPT_EOL | /* Want end-of-line token. */ >+ ISC_LEXOPT_EOF | /* Want end-of-file token. */ >+ ISC_LEXOPT_QSTRING |/* Recognize qstrings. */ >+ ISC_LEXOPT_QSTRINGMULTILINE; /* Allow multiline "" strings */ >+ >+ isc_result_t result; >+ isc_token_t token; // token from lexer >+ isc_boolean_t loop = isc_boolean_true; >+ isc_boolean_t have_czone = isc_boolean_false; >+ char data_arr[max_data_len]; >+ isc_buffer_t buf; >+ char data_arr2[max_data_len]; >+ isc_buffer_t buf2; >+ char data_type = 'u'; // u =unknown, b =bad token, d/D =DNS, c/C =client IP >+ >+ // Initialize buffers >+ isc_buffer_init(&buf, &data_arr, max_data_len); >+ isc_buffer_init(&buf2, &data_arr2, max_data_len); >+ >+ while(loop){ >+ result = isc_lex_gettoken(lexer, opt, &token); >+ if (result != ISC_R_SUCCESS) >+ goto data_cleanup; >+ >+ switch(token.type){ >+ case isc_tokentype_string: >+ if(data_type == 'u'){ >+ // store data_type >+ strncpy(&data_type, token.value.as_pointer, 1); >+ // verify data_type was specified correctly on input >+ if(strlen(token.value.as_pointer) > 1 || ( >+ data_type != 'd' && data_type != 'D' && >+ data_type != 'c' && data_type != 'C') ){ >+ // if not, set to 'b' so this line is ignored. >+ data_type = 'b'; >+ } >+ } else if(data_type == 'c' || data_type == 'C'){ >+ if(have_czone == isc_boolean_true){ >+ isc_buffer_putstr(&buf2, token.value.as_pointer); >+ // add string terminator to buffer >+ isc_buffer_putmem(&buf2, "\0", 1); >+ } else { >+ isc_buffer_putstr(&buf, token.value.as_pointer); >+ // add string terminator to buffer >+ isc_buffer_putmem(&buf, "\0", 1); >+ have_czone = isc_boolean_true; >+ } >+ } else { >+ isc_buffer_putstr(&buf, token.value.as_pointer); >+ isc_buffer_putstr(&buf, " "); >+ } >+ break; >+ case isc_tokentype_qstring: >+ isc_buffer_putstr(&buf, "\""); >+ isc_buffer_putstr(&buf, token.value.as_pointer); >+ isc_buffer_putstr(&buf, "\" "); >+ break; >+ case isc_tokentype_eol: >+ case isc_tokentype_eof: >+ >+ if((data_type != 'u' && isc_buffer_usedlength(&buf) > 0) || data_type == 'b'){ >+ // perform insert operation >+ if(data_type == 'd' || data_type == 'D'){ >+ // add string terminator to buffer >+ isc_buffer_putmem(&buf, "\0", 1); >+ put_data(isc_boolean_true, NULL, (char *) &data_arr); >+ } else if (data_type == 'c' || data_type == 'C'){ >+ put_data(isc_boolean_false, (char *) &data_arr, >+ (char *) &data_arr2); >+ } else if (data_type == 'b'){ >+ fprintf(stderr, "Bad / unknown token encountered on line %lu."\ >+ " Skipping line.", isc_lex_getsourceline(lexer) - 1); >+ } else { >+ fprintf(stderr, "Bad / unknown db data type encountered on " \ >+ "line %lu. Skipping line\n", isc_lex_getsourceline(lexer) - 1); >+ } >+ } >+ >+ if(token.type == isc_tokentype_eof){ >+ loop = isc_boolean_false; >+ } >+ >+ // reset buffer for next insert >+ isc_buffer_clear(&buf); >+ isc_buffer_clear(&buf2); >+ have_czone = isc_boolean_false; >+ data_type ='u'; >+ break; >+ default: >+ data_type = 'b'; >+ break; >+ } >+ } >+ >+ return; >+ >+data_cleanup: >+ // let user know we had problems >+ fprintf(stderr, "Unknown error processing tokens during \"add\" or " \ >+ "\"bulk\" operation.\nStoped processing on line %lu.", >+ isc_lex_getsourceline(lexer)); >+} >+ >+ >+isc_result_t >+openBDB(void){ >+ >+ int bdbres; >+ isc_result_t result; >+ >+ // create BDB environment >+ // Basically BDB allocates and assigns memory to db->dbenv >+ bdbres = db_env_create(&db.dbenv, 0); >+ if(bdbres != 0){ >+ fprintf(stderr, "BDB environment could not be created. BDB error: %s", >+ db_strerror(bdbres)); >+ result = ISC_R_FAILURE; >+ goto openBDB_cleanup; >+ } >+ >+ // open BDB environment >+ if(create_allowed == isc_boolean_true){ >+ // allowed to create new files >+ bdbres = db.dbenv->open(db.dbenv, db_envdir, >+ DB_INIT_CDB | DB_INIT_MPOOL | DB_CREATE, 0); >+ } else { // not allowed to create new files. >+ bdbres = db.dbenv->open(db.dbenv, db_envdir, >+ DB_INIT_CDB | DB_INIT_MPOOL, 0); >+ } >+ if(bdbres != 0){ >+ fprintf(stderr, "BDB environment at '%s' could not be opened. BDB " \ >+ "error: %s", db_envdir, db_strerror(bdbres)); >+ result = ISC_R_FAILURE; >+ goto openBDB_cleanup; >+ } >+ >+ // open dlz_data database. >+ result = bdb_opendb(DB_RECNO, &db.data, dlz_data, 0); >+ if(result != ISC_R_SUCCESS) >+ goto openBDB_cleanup; >+ >+ // open dlz_host database. >+ result = bdb_opendb(DB_BTREE, &db.host, dlz_host, DB_DUP | DB_DUPSORT); >+ if(result != ISC_R_SUCCESS) >+ goto openBDB_cleanup; >+ >+ // open dlz_zone database. >+ result = bdb_opendb(DB_BTREE, &db.zone, dlz_zone, DB_DUP | DB_DUPSORT); >+ if(result != ISC_R_SUCCESS) >+ goto openBDB_cleanup; >+ >+ // open dlz_client database. >+ result = bdb_opendb(DB_BTREE, &db.client, dlz_client, DB_DUP | DB_DUPSORT); >+ if(result != ISC_R_SUCCESS) >+ goto openBDB_cleanup; >+ >+ // associate the host secondary database with the primary database >+ bdbres = db.data->associate(db.data, NULL, db.host, gethost, 0); >+ if(bdbres != 0){ >+ fprintf(stderr, "BDB could not associate %s database with %s. BDB "\ >+ "error: %s", dlz_host, dlz_data, db_strerror(bdbres)); >+ result = ISC_R_FAILURE; >+ goto openBDB_cleanup; >+ } >+ >+ // associate the zone secondary database with the primary database >+ bdbres = db.data->associate(db.data, NULL, db.zone, getzone, 0); >+ if(bdbres != 0){ >+ fprintf(stderr, "BDB could not associate %s database with %s. BDB "\ >+ "error: %s", dlz_zone, dlz_data, db_strerror(bdbres)); >+ result = ISC_R_FAILURE; >+ goto openBDB_cleanup; >+ } >+ >+ return result; >+ >+openBDB_cleanup: >+ >+ bdb_cleanup(); >+ return result; >+} >+ >+ /* Create & open lexer to parse input data */ >+ >+isc_result_t >+open_lexer(void){ >+ isc_result_t result; >+ >+ // check if we already opened the lexer, if we did, return success >+ if(lexer != NULL) >+ return ISC_R_SUCCESS; >+ >+ // allocate memory for lexer, and verify it was allocated >+ result = isc_mem_create(0, 0, &lex_mctx); >+ if(result != ISC_R_SUCCESS){ >+ fprintf(stderr, "unexpected error creating lexer\n"); >+ return result; >+ } >+ >+ // create lexer >+ result = isc_lex_create(lex_mctx, 1500, &lexer); >+ if(result != ISC_R_SUCCESS) >+ fprintf(stderr, "unexpected error creating lexer\n"); >+ >+ // set allowed commenting style >+ isc_lex_setcomments(lexer, ISC_LEXCOMMENT_C | /* Allow C comments */ >+ ISC_LEXCOMMENT_CPLUSPLUS | /* Allow C++ comments */ >+ ISC_LEXCOMMENT_SHELL); /* Allow shellcomments */ >+ >+ isc_buffer_init(&lex_buffer, &lex_data_buf, max_data_len); >+ >+ return result; >+} >+ >+ /* Close the lexer, and cleanup memory */ >+ >+void >+close_lexer(void){ >+ >+ // If lexer is still open, close it & destroy it. >+ if (lexer != NULL) { >+ isc_lex_close(lexer); >+ isc_lex_destroy(&lexer); >+ } >+ >+ // if lexer memory is still allocated, destroy it. >+ if(lex_mctx != NULL) >+ isc_mem_destroy(&lex_mctx); >+} >+ >+ /* Perform add operation */ >+ >+void >+operation_add(void){ >+ // check for any parameters that are not allowed during add >+ checkInvalidParam(key, "k", "for add operation"); >+ checkInvalidParam(zone, "z", "for add operation"); >+ checkInvalidParam(host, "h", "for add operation"); >+ checkInvalidParam(c_zone, "c", "for add operation"); >+ checkInvalidParam(c_ip, "i", "for add operation"); >+ >+ // if open lexer fails it alread prints error messages. >+ if(open_lexer() != ISC_R_SUCCESS){ >+ quit(4); >+ } >+ >+ // copy input data to buffer >+ isc_buffer_putstr(&lex_buffer, a_data); >+ >+ // tell lexer to use buffer as input >+ if(isc_lex_openbuffer(lexer, &lex_buffer) != ISC_R_SUCCESS) { >+ fprintf(stderr, "unexpected error opening lexer buffer"); >+ quit(4); >+ } >+ >+ //common logic for "add" & "bulk" operations are handled by insert_data >+ insert_data(); >+} >+ >+ /* Perform bulk insert operation */ >+ >+void >+operation_bulk(void){ >+ // check for any parameters that are not allowed during bulk >+ checkInvalidParam(key, "k", "for bulk load operation"); >+ checkInvalidParam(zone, "z", "for bulk load operation"); >+ checkInvalidParam(host, "h", "for bulk load operation"); >+ checkInvalidParam(c_zone, "c", "for bulk load operation"); >+ checkInvalidParam(c_ip, "i", "for bulk load operation"); >+ >+ // if open lexer fails it already prints error messages. >+ if(open_lexer() != ISC_R_SUCCESS){ >+ quit(4); >+ } >+ >+ if(isc_lex_openfile(lexer, bulk_file) != ISC_R_SUCCESS) { >+ fprintf(stderr, "unexpected error opening %s by lexer.", bulk_file); >+ quit(4); >+ } >+ >+ // common logic for "add" & "bulk" operations are handled by insert_data >+ insert_data(); >+} >+ >+ /* Perform listOrDelete operation >+ * if dlt == true, delete data >+ * else list data >+ */ >+ >+void >+operation_listOrDelete(isc_boolean_t dlt){ >+ >+ int bdbres = 0; >+ DBC *curList[3]; >+ DBT bdbkey, bdbdata; >+ db_recno_t recno; >+ int curIndex = 0; >+ >+ // verify that only allowed parameters were passed. >+ if(dlt == isc_boolean_true){ >+ checkInvalidParam(zone, "z", "for delete operation"); >+ checkInvalidParam(host, "h", "for delete operation"); >+ } else if(key != NULL || zone != NULL || host != NULL){ >+ checkInvalidParam(c_zone, "c", "for list when k, z or h are specified"); >+ checkInvalidParam(c_ip, "i", "for list when k, z, or h are specified"); >+ } >+ >+ memset(&bdbkey, 0, sizeof(bdbkey)); >+ memset(&bdbdata, 0, sizeof(bdbdata)); >+ >+ // set NULL the 2nd and 3rd positions in curList. >+ // that way later when add cursors to the join list >+ // it is already null terminated. >+ curList[1] = curList[2] = NULL; >+ >+ if(key != NULL){ >+ // make sure other parameters weren't >+ checkInvalidParam(zone, "z", "when k is specified"); >+ checkInvalidParam(host, "h", "when k is specified"); >+ >+ recno = key_val; >+ bdbkey.data = &recno; >+ bdbkey.size = sizeof(recno); >+ >+ if(dlt == isc_boolean_true){ >+ bdbres = db.data->del(db.data, NULL, &bdbkey, 0); >+ } else { >+ bdbdata.flags = DB_DBT_REALLOC; >+ bdbres = db.data->get(db.data, NULL, &bdbkey, &bdbdata, 0); >+ >+ if(bdbres == 0){ >+ printf("KEY | DATA\n"); >+ printf("%lu | %.*s\n", *(u_long *) bdbkey.data, >+ (int)bdbdata.size, (char *)bdbdata.data); >+ } >+ } // closes else of if(dlt == isc_boolean_true) >+ if(bdbres == DB_NOTFOUND){ >+ printf("Key not found in database"); >+ } >+ } // closes if(key != NULL) >+ >+ // if zone is passed >+ if(zone != NULL){ >+ // create a cursor and make sure it worked >+ bdbres = db.zone->cursor(db.zone, NULL, &db.cursor2, 0); >+ if(bdbres != 0){ >+ fprintf(stderr, "Unexpected error. BDB Error: %s\n", >+ db_strerror(bdbres)); >+ return; >+ } >+ >+ bdbkey.data = zone; >+ bdbkey.size = strlen(zone); >+ bdbres = db.cursor2->c_get(db.cursor2, &bdbkey, &bdbdata, DB_SET); >+ if(bdbres != 0){ >+ if(bdbres != DB_NOTFOUND){ >+ fprintf(stderr, "Unexpected error. BDB Error: %s\n", >+ db_strerror(bdbres)); >+ } else { >+ printf("Zone not found in database"); >+ } >+ return; >+ } >+ >+ // add cursor to cursor list for later use in join >+ curList[curIndex++] = db.cursor2; >+ } >+ >+ // if host is passed >+ if(host != NULL){ >+ >+ // create a cursor and make sure it worked. >+ bdbres = db.host->cursor(db.host, NULL, &db.cursor3, 0); >+ if(bdbres != 0){ >+ fprintf(stderr, "Unexpected error. BDB Error: %s\n", >+ db_strerror(bdbres)); >+ return; >+ } >+ bdbkey.data = host; >+ bdbkey.size = strlen(host); >+ bdbres = db.cursor3->c_get(db.cursor3, &bdbkey, &bdbdata, DB_SET); >+ if(bdbres != 0){ >+ if(bdbres != DB_NOTFOUND){ >+ fprintf(stderr, "Unexpected error. BDB Error: %s\n", >+ db_strerror(bdbres)); >+ } else { >+ printf("Host not found in database"); >+ } >+ return; >+ } >+ >+ // add cursor to cursor list for later use in join >+ curList[curIndex++] = db.cursor3; >+ } >+ >+ >+ if(zone != NULL || host != NULL){ >+ >+ // join any cursors >+ bdbres = db.data->join(db.data, curList, &db.cursor4, 0); >+ if(bdbres != 0){ >+ fprintf(stderr, "Unexpected error. BDB Error: %s\n", >+ db_strerror(bdbres)); >+ return; >+ } >+ >+ memset(&bdbkey, 0, sizeof(bdbkey)); >+ bdbkey.flags = DB_DBT_REALLOC; >+ memset(&bdbdata, 0, sizeof(bdbdata)); >+ bdbdata.flags = DB_DBT_REALLOC; >+ >+ // print a header to explain the output >+ printf("KEY | DATA\n"); >+ // loop and list all results. >+ while(bdbres == 0){ >+ // get data >+ bdbres = db.cursor4->c_get(db.cursor4, &bdbkey, &bdbdata, 0); >+ // verify call had no errors >+ if(bdbres != 0){ >+ break; >+ } >+ printf("%lu | %.*s\n", *(u_long *) bdbkey.data, >+ (int)bdbdata.size, (char *)bdbdata.data); >+ } // closes while loop >+ } >+ >+ if(c_ip != NULL && c_zone == NULL){ >+ fprintf(stderr, "i may only be specified when c is also specified\n"); >+ quit(2); >+ } >+ // if client_zone was passed >+ if(c_zone != NULL){ >+ >+ // create a cursor and make sure it worked. >+ if(dlt == isc_boolean_true){ >+ // open read-write cursor >+ bdbres = db.client->cursor(db.client, NULL, &db.cursor, >+ DB_WRITECURSOR); >+ } else { >+ // open read only cursor >+ bdbres = db.client->cursor(db.client, NULL, &db.cursor, 0); >+ // print a header to explain the output >+ printf("CLIENT_ZONE | CLIENT_IP\n"); >+ } >+ >+ bdbkey.data = c_zone; >+ bdbkey.size = strlen(c_zone); >+ >+ if(c_ip != NULL){ >+ bdbdata.data = c_ip; >+ bdbdata.size = strlen(c_ip); >+ bdbres = db.cursor->c_get(db.cursor, &bdbkey, &bdbdata, DB_GET_BOTH); >+ if(bdbres == DB_NOTFOUND){ >+ printf("Client zone & IP not found in database"); >+ } >+ } else { >+ bdbdata.flags = DB_DBT_REALLOC; >+ bdbres = db.cursor->c_get(db.cursor, &bdbkey, &bdbdata, DB_SET); >+ if(bdbres == DB_NOTFOUND){ >+ printf("Client zone not found in database"); >+ } >+ } >+ >+ while(bdbres == 0){ >+ if(dlt == isc_boolean_false){ >+ printf("%.*s | %.*s\n", (int)bdbkey.size, (char *) bdbkey.data, >+ (int)bdbdata.size, (char *) bdbdata.data); >+ } else { >+ // delete record. >+ bdbres = db.cursor->c_del(db.cursor, 0); >+ if(bdbres != 0){ >+ fprintf(stderr, "Unexpected error. BDB Error: %s\n", >+ db_strerror(bdbres)); >+ break; >+ } >+ } >+ if(c_ip != NULL){ >+ break; >+ } >+ bdbres = db.cursor->c_get(db.cursor, &bdbkey, &bdbdata, DB_NEXT_DUP); >+ if(bdbres != 0){ >+ break; >+ } >+ } // end while loop >+ } >+ >+ >+ if(bdbres != 0 && bdbres != DB_NOTFOUND){ >+ fprintf(stderr, "Unexpected error during list operation " \ >+ "BDB error: %s", db_strerror(bdbres)); >+ } >+ >+ if(bdbkey.flags == DB_DBT_REALLOC && bdbkey.data != NULL){ >+ free(bdbkey.data); >+ } >+ if(bdbdata.flags == DB_DBT_REALLOC && bdbdata.data != NULL){ >+ free(bdbdata.data); >+ } >+} >+ >+ >+int >+main(int argc, char **argv){ >+ >+ int ch; >+ char *endp; >+ >+ // there has to be at least 2 args, some operations require more >+ if(argc < 2) >+ show_usage(); >+ >+ // use the ISC commandline parser to get all the program arguments >+ while((ch = isc_commandline_parse(argc, argv, "ldna:f:k:z:h:c:i:")) != -1){ >+ switch (ch) { >+ case 'n': >+ create_allowed = isc_boolean_true; >+ break; >+ case 'l': >+ checkOp(operation) >+ operation = list; >+ break; >+ case 'd': >+ checkOp(operation); >+ operation = dele; >+ break; >+ case 'a': >+ checkOp(operation); >+ operation = add; >+ a_data = isc_commandline_argument; >+ break; >+ case 'f': >+ checkOp(operation); >+ operation = bulk; >+ bulk_file = isc_commandline_argument; >+ break; >+ case 'k': >+ checkParam(key, "k"); >+ key = isc_commandline_argument; >+ key_val = strtoul(key, &endp, 10); >+ if (*endp != '\0' || key_val < 1){ >+ fprintf(stderr, "Error converting key to integer"); >+ } >+ break; >+ case 'z': >+ checkParam(zone, "z"); >+ zone = isc_commandline_argument; >+ break; >+ case 'h': >+ checkParam(host, "h"); >+ host = isc_commandline_argument; >+ break; >+ case 'c': >+ checkParam(c_zone, "c"); >+ c_zone = isc_commandline_argument; >+ break; >+ case 'i': >+ checkParam(c_ip, "i"); >+ c_ip = isc_commandline_argument; >+ break; >+ case '?': >+ show_usage(); >+ break; >+ default: >+ // should never reach this point >+ fprintf(stderr, "unexpected error parsing command arguments\n"); >+ quit(1); >+ break; >+ } >+ } >+ >+ argc -= isc_commandline_index; >+ argv += isc_commandline_index; >+ >+ // argc & argv have been modified, so now only "extra" parameters are >+ // left in argc & argv. "Extra" parameters are any parameters that were >+ // not passed using a command line flag. Exactly 2 args should be left. >+ // The first should be the BDB environment path, the second should be the >+ // BDB database. The BDB database path can be either relative to the >+ // BDB environment path, or absolute. >+ if (argc < 2){ >+ fprintf(stderr, "Both a Berkeley DB environment and file "\ >+ "must be specified"); >+ quit(2); >+ } else if (argc > 2){ >+ fprintf(stderr, "Too many parameters. Check command line for errors."); >+ quit(2); >+ } >+ >+ // get db_file to operate on >+ db_envdir = argv[0]; >+ db_file = argv[1]; >+ >+ if(openBDB() != ISC_R_SUCCESS){ >+ // openBDB already prints error messages, don't do it here. >+ bdb_cleanup(); >+ quit(3); >+ } >+ >+ switch(operation){ >+ case list: >+ operation_listOrDelete(isc_boolean_false); >+ break; >+ case dele: >+ operation_listOrDelete(isc_boolean_true); >+ break; >+ case add: >+ operation_add(); >+ break; >+ case bulk: >+ operation_bulk(); >+ break; >+ default: >+ fprintf(stderr, "\nNo operation was selected. "\ >+ "Select an operation (l d a f)"); >+ quit(2); >+ break; >+ } >+ >+ quit(0); >+} >+#endif >+ >diff -Naur bind-9.2.2-orig/bin/named/Makefile.in bind-9.2.2/bin/named/Makefile.in >--- bind-9.2.2-orig/bin/named/Makefile.in Thu May 31 21:45:00 2001 >+++ bind-9.2.2/bin/named/Makefile.in Tue Oct 28 21:14:43 2003 >@@ -31,14 +31,24 @@ > DBDRIVER_INCLUDES = > DBDRIVER_LIBS = > >+DLZINCLUDES = @DLZ_BDB_INC@ @DLZ_POSTGRES_INC@ @DLZ_ODBC_INC@ \ >+ @DLZ_MYSQL_INC@ @DLZ_LDAP_INC@ >+ >+ > CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include \ > ${LWRES_INCLUDES} ${DNS_INCLUDES} \ > ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \ >- ${DBDRIVER_INCLUDES} >+ ${DLZINCLUDES} ${DBDRIVER_INCLUDES} > >-CDEFINES = >+CDEFINES = @USE_DLZ_POSTGRES@ @USE_DLZ_MYSQL@ @USE_DLZ_FILESYSTEM@ \ >+ @USE_DLZ_BDB@ @USE_DLZ_ODBC@ @USE_DLZ_LDAP@ @USE_DLZ_STUB@ \ >+ @USE_DLZ@ >+ > CWARNINGS = > >+DLZLIBS = @DLZ_BDB_LIBS@ @DLZ_POSTGRES_LIBS@ @DLZ_ODBC_LIBS@ \ >+ @DLZ_MYSQL_LIBS@ @DLZ_LDAP_LIBS@ >+ > DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@ > ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ > ISCCCLIBS = ../../lib/isccc/libisccc.@A@ >@@ -55,20 +65,22 @@ > ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${ISCDEPLIBS} > > LIBS = ${LWRESLIBS} ${DNSLIBS} \ >- ${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DBDRIVER_LIBS} @LIBS@ >+ ${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DLZLIBS} \ >+ ${DBDRIVER_LIBS} @LIBS@ > > SUBDIRS = unix > > TARGETS = named lwresd > >-OBJS = aclconf.@O@ client.@O@ config.@O@ control.@O@ controlconf.@O@ interfacemgr.@O@ \ >- listenlist.@O@ log.@O@ logconf.@O@ main.@O@ notify.@O@ \ >- query.@O@ server.@O@ sortlist.@O@ \ >- tkeyconf.@O@ tsigconf.@O@ update.@O@ xfrout.@O@ \ >- zoneconf.@O@ \ >- lwaddr.@O@ lwresd.@O@ lwdclient.@O@ lwderror.@O@ lwdgabn.@O@ \ >- lwdgnba.@O@ lwdgrbn.@O@ lwdnoop.@O@ lwsearch.@O@ \ >- $(DBDRIVER_OBJS) >+OBJS = aclconf.@O@ client.@O@ config.@O@ control.@O@ controlconf.@O@ \ >+ interfacemgr.@O@ listenlist.@O@ log.@O@ logconf.@O@ main.@O@ \ >+ notify.@O@ query.@O@ server.@O@ sortlist.@O@ tkeyconf.@O@ \ >+ tsigconf.@O@ update.@O@ xfrout.@O@ zoneconf.@O@ lwaddr.@O@ \ >+ lwresd.@O@ lwdclient.@O@ lwderror.@O@ lwdgabn.@O@ lwdgnba.@O@ \ >+ lwdgrbn.@O@ lwdnoop.@O@ lwsearch.@O@ dlz_postgres_driver.@O@ \ >+ dlz_stub_driver.@O@ sdlz_helper.@O@ dlz_filesystem_driver.@O@ \ >+ dlz_mysql_driver.@O@ dlz_odbc_driver.@O@ dlz_bdb_driver.@O@ \ >+ dlz_ldap_driver.@O@ $(DBDRIVER_OBJS) > > UOBJS = unix/os.@O@ > >@@ -79,7 +91,9 @@ > zoneconf.c \ > lwaddr.c lwresd.c lwdclient.c lwderror.c lwdgabn.c \ > lwdgnba.c lwdgrbn.c lwdnoop.c lwsearch.c \ >- $(DBDRIVER_SRCS) >+ dlz_postgres_driver.c dlz_stub_driver.c sdlz_helper.c \ >+ dlz_filesystem_driver.c dlz_mysql_driver.c dlz_odbc_driver.c \ >+ dlz_bdb_driver.c dlz_ldap_driver.c $(DBDRIVER_SRCS) > > MANPAGES = named.8 lwresd.8 > >diff -Naur bind-9.2.2-orig/bin/named/dlz_bdb_driver.c bind-9.2.2/bin/named/dlz_bdb_driver.c >--- bind-9.2.2-orig/bin/named/dlz_bdb_driver.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/dlz_bdb_driver.c Fri Oct 17 18:26:48 2003 >@@ -0,0 +1,793 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifdef DLZ_BDB >+ >+#include <config.h> >+#include <stdio.h> >+#include <string.h> >+#include <stdlib.h> >+ >+#include <dns/log.h> >+#include <dns/sdlz.h> >+#include <dns/result.h> >+ >+#include <isc/mem.h> >+#include <isc/print.h> >+#include <isc/result.h> >+#include <isc/util.h> >+ >+#include <named/globals.h> >+#include <named/dlz_bdb_driver.h> >+ >+#include <db.h> >+ >+dns_sdlzimplementation_t *dlz_bdb = NULL; >+ >+// BDB database names >+#define dlz_data "dns_data" >+#define dlz_zone "dns_zone" >+#define dlz_host "dns_host" >+#define dlz_client "dns_client" >+ >+ /* This structure contains all the Berkeley DB handles >+ * for this instance of the BDB driver. >+ */ >+ >+typedef struct bdb_instance { >+ DB_ENV *dbenv; // BDB environment >+ DB *data; // dns_data database handle >+ DB *zone; // zone database handle >+ DB *host; // host database handle >+ DB *client; // client database handle >+ isc_mem_t *mctx; // memory context >+ >+}bdb_instance_t; >+ >+typedef struct parsed_data { >+ char *zone; >+ char *host; >+ char *type; >+ int ttl; >+ char *data; >+}parsed_data_t; >+ >+ >+ /* shut up compiler warnings about no previous prototype */ >+ >+void >+bdb_cleanup(bdb_instance_t *db); >+ >+isc_result_t >+bdb_opendb(DB_ENV *db_env, DBTYPE db_type, DB **db, const char *db_name, >+ char *db_file, int flags); >+ >+isc_result_t >+bdb_findzone(void *driverarg, void *dbdata, const char *name); >+ >+isc_result_t >+bdb_parse_data(char *in, parsed_data_t *pd); >+ >+isc_result_t >+bdb_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client); >+ >+isc_result_t >+bdb_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes); >+ >+isc_result_t >+bdb_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+bdb_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata); >+ >+void >+bdb_destroy(void *driverarg, void *dbdata); >+ >+ /* Parses the DBT from the Berkeley DB into a parsed_data record >+ * The parsed_data record should be allocated before and passed into the >+ * bdb_parse_data function. The char (type & data) fields should not >+ * be "free"d as that memory is part of the DBT data field. It will be >+ * "free"d when the DBT is freed. >+ */ >+ >+isc_result_t >+bdb_parse_data(char *in, parsed_data_t *pd){ >+ >+ char *endp, *ttlStr; >+ char *tmp = in; >+ char *lastchar = (char *) &tmp[strlen(tmp) + 1]; >+ >+ // String should be formated as: >+ // zone(a space)host(a space)ttl(a space)type(a space)remaining data >+ // examples: >+ // example.com www 10 A 127.0.0.1 >+ // example.com mail 10 A 127.0.0.2 >+ // example.com @ 10 MX 20 mail.example.com >+ >+ // save pointer to zone >+ pd->zone = tmp; >+ >+ /* find space after zone and change it to a '\0' */ >+ tmp = strchr(tmp, ' '); >+ // verify we found a space >+ if(tmp == NULL) >+ return ISC_R_FAILURE; >+ // change the space to a null (string terminator) >+ tmp[0] = '\0'; >+ // make sure it is safe to increment pointer >+ if(++tmp > lastchar) >+ return ISC_R_FAILURE; >+ >+ // save pointer to host >+ pd->host = tmp; >+ >+ /* find space after type and change it to a '\0' */ >+ tmp = strchr(tmp, ' '); >+ // verify we found a space >+ if(tmp == NULL) >+ return ISC_R_FAILURE; >+ // change the space to a null (string terminator) >+ tmp[0] = '\0'; >+ // make sure it is safe to increment pointer >+ if(++tmp > lastchar) >+ return ISC_R_FAILURE; >+ >+ // save pointer to dns type >+ pd->type = tmp; >+ >+ /* find space after type and change it to a '\0' */ >+ tmp = strchr(tmp, ' '); >+ // verify we found a space >+ if(tmp == NULL) >+ return ISC_R_FAILURE; >+ // change the space to a null (string terminator) >+ tmp[0] = '\0'; >+ // make sure it is safe to increment pointer >+ if(++tmp > lastchar) >+ return ISC_R_FAILURE; >+ >+ // save pointer to dns ttl >+ ttlStr = tmp; >+ >+ /* find space after ttl and change it to a '\0' */ >+ tmp = strchr(tmp, ' '); >+ // verify we found a space >+ if(tmp == NULL) >+ return ISC_R_FAILURE; >+ // change the space to a null (string terminator) >+ tmp[0] = '\0'; >+ // make sure it is safe to increment pointer >+ if(++tmp > lastchar) >+ return ISC_R_FAILURE; >+ >+ // save pointer to remainder of DNS data >+ pd->data = tmp; >+ >+ // convert ttl string to integer >+ pd->ttl = strtol(ttlStr, &endp, 10); >+ if (*endp != '\0' || pd->ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "BDB driver ttl must be a postive number"); >+ return ISC_R_FAILURE; >+ } >+ >+ // if we get this far everything should have worked. >+ return ISC_R_SUCCESS; >+} >+ >+/*** >+ *** DLZ methods >+ ***/ >+ >+isc_result_t >+bdb_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client) >+{ >+ isc_result_t result; >+ bdb_instance_t *db = (bdb_instance_t *) dbdata; >+ DBC *client_cursor = NULL; >+ DBT key, data; >+ >+ // check to see if we are authoritative for the zone first. >+ result = bdb_findzone(driverarg, dbdata, name); >+ if(result != ISC_R_SUCCESS) >+ return (ISC_R_NOTFOUND); >+ >+ memset(&key, 0, sizeof(DBT)); >+ key.flags = DB_DBT_MALLOC; >+ key.data = strdup(name); >+ if(key.data == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto xfr_cleanup; >+ } >+ key.size = strlen(key.data); >+ >+ memset(&data, 0, sizeof(DBT)); >+ data.flags = DB_DBT_MALLOC; >+ data.data = strdup(client); >+ if(data.data == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto xfr_cleanup; >+ } >+ data.size = strlen(data.data); >+ >+ // get a cursor to loop through zone data >+ if(db->client->cursor(db->client, NULL, &client_cursor, 0) != 0){ >+ result = ISC_R_FAILURE; >+ goto xfr_cleanup; >+ } >+ >+ switch(client_cursor->c_get(client_cursor, &key, &data, DB_FIRST | DB_GET_BOTH)){ >+ case DB_NOTFOUND: >+ case DB_SECONDARY_BAD: >+ result = ISC_R_NOTFOUND; >+ break; >+ case 0: >+ result = ISC_R_SUCCESS; >+ break; >+ default: >+ result = ISC_R_FAILURE; >+ } >+ >+xfr_cleanup: >+ >+ // free any memory duplicate string in the key field >+ if(key.data != NULL) >+ free(key.data); >+ >+ // free any memory allocated to the data field. >+ if(data.data != NULL) >+ free(data.data); >+ >+ // get rid of zone_cursor >+ if(client_cursor != NULL) >+ client_cursor->c_close(client_cursor); >+ >+ return result; >+ >+} >+ >+isc_result_t >+bdb_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes) >+{ >+ >+ isc_result_t result = ISC_R_NOTFOUND; >+ bdb_instance_t *db = (bdb_instance_t *) dbdata; >+ DBC *zone_cursor = NULL; >+ DBT key, data; >+ int flags; >+ int bdbres; >+ parsed_data_t pd; >+ char *tmp = NULL, *tmp_zone; >+ >+ UNUSED(driverarg); >+ >+ memset(&key, 0, sizeof(DBT)); >+ memset(&data, 0, sizeof(DBT)); >+ >+ key.data = tmp_zone = strdup(zone); >+ >+ if(key.data == NULL) >+ return (ISC_R_NOMEMORY); >+ >+ key.size = strlen(key.data); >+ >+ // get a cursor to loop through zone data >+ if(db->zone->cursor(db->zone, NULL, &zone_cursor, 0) != 0){ >+ result = ISC_R_FAILURE; >+ goto allnodes_cleanup; >+ } >+ >+ flags = DB_FIRST | DB_SET; >+ >+ while((bdbres = zone_cursor->c_get(zone_cursor, &key, &data, flags)) == 0){ >+ >+ flags = DB_NEXT_DUP; >+ >+ tmp = realloc(tmp, data.size + 1); >+ if(tmp == NULL) >+ goto allnodes_cleanup; >+ >+ strncpy(tmp, data.data, data.size); >+ tmp[data.size] = '\0'; >+ >+ if(bdb_parse_data(tmp, &pd) != ISC_R_SUCCESS) >+ goto allnodes_cleanup; >+ >+ result = dns_sdlz_putnamedrr(allnodes, pd.host, pd.type, pd.ttl, pd.data); >+ if(result != ISC_R_SUCCESS) >+ goto allnodes_cleanup; >+ >+ } // end while loop >+ >+allnodes_cleanup: >+ >+ if(tmp != NULL) >+ free(tmp); >+ >+ // free any memory duplicate string in the key field >+ if(tmp_zone != NULL) >+ free(tmp_zone); >+ >+ // get rid of zone_cursor >+ if(zone_cursor != NULL) >+ zone_cursor->c_close(zone_cursor); >+ >+ return result; >+ >+} >+ >+ /* Performs BDB cleanup. >+ * Used by bdb_create if there is an error starting up. >+ * Used by bdb_destroy when the driver is shutting down. >+ */ >+ >+void >+bdb_cleanup(bdb_instance_t *db){ >+ >+ isc_mem_t *mctx; >+ >+ /* close databases */ >+ if(db->data != NULL) >+ db->data->close(db->data, 0); >+ if(db->host != NULL) >+ db->host->close(db->host, 0); >+ if(db->zone != NULL) >+ db->zone->close(db->zone, 0); >+ if(db->client != NULL) >+ db->client->close(db->client, 0); >+ >+ /* close environment */ >+ if(db->dbenv != NULL) >+ db->dbenv->close(db->dbenv, 0); >+ >+ /* cleanup memory */ >+ if(db->mctx != NULL){ >+ /* save mctx for later */ >+ mctx = db->mctx; >+ /* return, and detach the memory */ >+ isc_mem_put(mctx, db, sizeof(bdb_instance_t)); >+ isc_mem_detach(&mctx); >+ } >+} >+ >+isc_result_t >+bdb_findzone(void *driverarg, void *dbdata, const char *name) >+{ >+ >+ isc_result_t result; >+ bdb_instance_t *db = (bdb_instance_t *) dbdata; >+ DBC *zone_cursor = NULL; >+ DBT key, data; >+ char *tmp; >+ >+ UNUSED(driverarg); >+ >+ memset(&key, 0, sizeof(DBT)); >+ memset(&data, 0, sizeof(DBT)); >+ data.flags = DB_DBT_MALLOC; >+ >+ key.data = tmp = strdup(name); >+ >+ if(key.data == NULL) >+ return (ISC_R_NOMEMORY); >+ >+ key.size = strlen(key.data); >+ >+ // get a cursor to loop through zone data >+ if(db->zone->cursor(db->zone, NULL, &zone_cursor, 0) != 0){ >+ result = ISC_R_FAILURE; >+ goto findzone_cleanup; >+ } >+ >+ switch(zone_cursor->c_get(zone_cursor, &key, &data, DB_FIRST | DB_SET)){ >+ case DB_NOTFOUND: >+ case DB_SECONDARY_BAD: >+ result = ISC_R_NOTFOUND; >+ break; >+ case 0: >+ result = ISC_R_SUCCESS; >+ break; >+ default: >+ result = ISC_R_FAILURE; >+ } >+ >+findzone_cleanup: >+ >+ // free any memory duplicate string in the key field >+ if(key.data != NULL) >+ free(key.data); >+ >+ // free any memory allocated to the data field. >+ if(data.data != NULL) >+ free(data.data); >+ >+ // get rid of zone_cursor >+ if(zone_cursor != NULL) >+ zone_cursor->c_close(zone_cursor); >+ >+ return result; >+} >+ >+isc_result_t >+bdb_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup) >+{ >+ >+ isc_result_t result = ISC_R_NOTFOUND; >+ bdb_instance_t *db = (bdb_instance_t *) dbdata; >+ DBC *zone_cursor = NULL; >+ DBC *host_cursor = NULL; >+ DBC *join_cursor = NULL; >+ DBT key, data; >+ DBC *cur_arr[3]; >+ int bdbres; >+ parsed_data_t pd; >+ char *tmp_zone, *tmp_host = NULL; >+ char *tmp = NULL; >+ >+ UNUSED(driverarg); >+ >+ memset(&key, 0, sizeof(DBT)); >+ memset(&data, 0, sizeof(DBT)); >+ >+ // set zone key >+ key.data = tmp_zone = strdup(zone); >+ if(key.data == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto lookup_cleanup; >+ } >+ key.size = strlen(key.data); >+ >+ // get a cursor to loop through zone data >+ if(db->zone->cursor(db->zone, NULL, &zone_cursor, 0) != 0){ >+ result = ISC_R_FAILURE; >+ goto lookup_cleanup; >+ } >+ >+ // initialize zone_cursor with zone_key >+ if(zone_cursor->c_get(zone_cursor, &key, &data, DB_SET) != 0){ >+ result = ISC_R_FAILURE; >+ goto lookup_cleanup; >+ } >+ >+ // set host key >+ key.data = tmp_host = strdup(name); >+ if(key.data == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto lookup_cleanup; >+ } >+ key.size = strlen(key.data); >+ >+ // get a cursor to loop through host data >+ if(db->host->cursor(db->host, NULL, &host_cursor, 0) != 0){ >+ result = ISC_R_FAILURE; >+ goto lookup_cleanup; >+ } >+ >+ // initialize host_cursor with host_key >+ if(host_cursor->c_get(host_cursor, &key, &data, DB_SET) != 0){ >+ result = ISC_R_FAILURE; >+ goto lookup_cleanup; >+ } >+ >+ cur_arr[0] = zone_cursor; >+ cur_arr[1] = host_cursor; >+ cur_arr[2] = NULL; >+ >+ db->data->join(db->data, cur_arr, &join_cursor, 0); >+ >+ while((bdbres = join_cursor->c_get(join_cursor, &key, &data, 0)) == 0){ >+ >+ tmp = realloc(tmp, data.size + 1); >+ if(tmp == NULL) >+ goto lookup_cleanup; >+ >+ strncpy(tmp, data.data, data.size); >+ tmp[data.size] = '\0'; >+ >+ if(bdb_parse_data(tmp, &pd) != ISC_R_SUCCESS) >+ goto lookup_cleanup; >+ >+ result = dns_sdlz_putrr(lookup, pd.type, pd.ttl, pd.data); >+ >+ if(result != ISC_R_SUCCESS) >+ goto lookup_cleanup; >+ } // end while loop >+ >+lookup_cleanup: >+ >+ if(tmp != NULL) >+ free(tmp); >+ if(tmp_zone != NULL) >+ free(tmp_zone); >+ if(tmp_host != NULL) >+ free(tmp_host); >+ >+ // get rid of the joined cusor >+ if(join_cursor != NULL) >+ join_cursor->c_close(join_cursor); >+ >+ // get rid of zone_cursor >+ if(zone_cursor != NULL) >+ zone_cursor->c_close(zone_cursor); >+ >+ // get rid of host_cursor >+ if(host_cursor != NULL) >+ host_cursor->c_close(host_cursor); >+ >+ return result; >+ >+return ISC_R_NOTFOUND; >+} >+ >+ >+ /* Initializes, sets flags and then opens Berkeley databases. */ >+ >+isc_result_t >+bdb_opendb(DB_ENV *db_env, DBTYPE db_type, DB **db, const char *db_name, >+ char *db_file, int flags){ >+ >+ int result; >+ >+ /* Initialize the database. */ >+ if ((result = db_create(db, db_env, 0)) != 0) { >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "BDB could not initialize %s database. BDB error: %s", >+ db_name, db_strerror(result)); >+ return ISC_R_FAILURE; >+ } >+ >+ /* set database flags. */ >+ if ((result = (*db)->set_flags(*db, flags)) != 0) { >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "BDB could not set flags for %s database. BDB error: %s", >+ db_name, db_strerror(result)); >+ return ISC_R_FAILURE; >+ } >+ >+ /* open the database. */ >+ if ((result = (*db)->open(*db, NULL, db_file, db_name, db_type, >+ DB_RDONLY | DB_THREAD, 0)) != 0) { >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "BDB could not open %s database in %s. BDB error: %s", >+ db_name, db_file, db_strerror(result)); >+ return ISC_R_FAILURE; >+ } >+ >+ return ISC_R_SUCCESS; >+} >+ >+isc_result_t >+bdb_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata) >+{ >+ isc_result_t result; >+ int bdbres; >+ bdb_instance_t *db = NULL; >+ >+ UNUSED(dlzname); >+ UNUSED(driverarg); >+ >+ /* verify we have 3 arg's passed to the driver */ >+ if(argc != 3){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Berkeley DB driver requires at least 2 command line args."); >+ return (ISC_R_FAILURE); >+ } >+ >+ /* allocate and zero memory for driver structure */ >+ db = isc_mem_get(ns_g_mctx, sizeof(bdb_instance_t)); >+ if (db == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Could not allocate memory for database instance object."); >+ return (ISC_R_NOMEMORY); >+ } >+ memset(db, 0, sizeof(bdb_instance_t)); >+ >+ /* attach to the memory context */ >+ isc_mem_attach(ns_g_mctx, &db->mctx); >+ >+ /* create BDB environment >+ * Basically BDB allocates and assigns memory to db->dbenv >+ */ >+ bdbres = db_env_create(&db->dbenv, 0); >+ if(bdbres != 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "BDB environment could not be created. BDB error: %s", >+ db_strerror(bdbres)); >+ result = ISC_R_FAILURE; >+ goto init_cleanup; >+ } >+ >+ /* open BDB environment */ >+ bdbres = db->dbenv->open(db->dbenv, argv[1], >+ DB_INIT_CDB | DB_INIT_MPOOL | DB_THREAD | DB_CREATE, 0); >+ if(bdbres != 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "BDB environment at '%s' could not be opened. BDB error: %s", >+ argv[1], db_strerror(bdbres)); >+ result = ISC_R_FAILURE; >+ goto init_cleanup; >+ } >+ >+ /* open dlz_data database. */ >+ result = bdb_opendb(db->dbenv, DB_UNKNOWN, &db->data, dlz_data, argv[2], 0); >+ if(result != ISC_R_SUCCESS) >+ goto init_cleanup; >+ >+ /* open dlz_host database. */ >+ result = bdb_opendb(db->dbenv, DB_UNKNOWN, &db->host, dlz_host, argv[2], >+ DB_DUP | DB_DUPSORT); >+ if(result != ISC_R_SUCCESS) >+ goto init_cleanup; >+ >+ /* open dlz_zone database. */ >+ result = bdb_opendb(db->dbenv, DB_UNKNOWN, &db->zone, dlz_zone, argv[2], >+ DB_DUP | DB_DUPSORT); >+ if(result != ISC_R_SUCCESS) >+ goto init_cleanup; >+ >+ /* open dlz_client database. */ >+ result = bdb_opendb(db->dbenv, DB_UNKNOWN, &db->client, >+ dlz_client, argv[2], DB_DUP | DB_DUPSORT); >+ if(result != ISC_R_SUCCESS) >+ goto init_cleanup; >+ >+ /* associate the host secondary database with the primary database */ >+ bdbres = db->data->associate(db->data, NULL, db->host, NULL, 0); >+ if(bdbres != 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "BDB could not associate %s database with %s. BDB error: %s", >+ dlz_host, dlz_data, db_strerror(bdbres)); >+ result = ISC_R_FAILURE; >+ goto init_cleanup; >+ } >+ >+ /* associate the zone secondary database with the primary database */ >+ bdbres = db->data->associate(db->data, NULL, db->zone, NULL, 0); >+ if(bdbres != 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "BDB could not associate %s database with %s. BDB error: %s", >+ dlz_zone, dlz_data, db_strerror(bdbres)); >+ result = ISC_R_FAILURE; >+ goto init_cleanup; >+ } >+ >+ *dbdata = db; >+ >+ return(ISC_R_SUCCESS); >+ >+init_cleanup: >+ >+ bdb_cleanup(db); >+ return result; >+} >+ >+void >+bdb_destroy(void *driverarg, void *dbdata) >+{ >+ UNUSED(driverarg); >+ >+ bdb_cleanup((bdb_instance_t *) dbdata); >+} >+ >+static dns_sdlzmethods_t dlz_bdb_methods = { >+ bdb_create, >+ bdb_destroy, >+ bdb_findzone, >+ bdb_lookup, >+ NULL, // bdb_authority not needed as authority data is returned by lookup >+ bdb_allnodes, >+ bdb_allowzonexfr}; >+ >+/* >+ * Wrapper around dns_sdlzregister(). >+ */ >+isc_result_t >+dlz_bdb_init(void) { >+ isc_result_t result; >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Registering DLZ bdb driver."); >+ >+ result = dns_sdlzregister("bdb", &dlz_bdb_methods, NULL, >+ DNS_SDLZFLAG_RELATIVEOWNER | DNS_SDLZFLAG_RELATIVERDATA >+ | DNS_SDLZFLAG_THREADSAFE, ns_g_mctx, &dlz_bdb); >+ if(result != ISC_R_SUCCESS){ >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "dns_sdlzregister() failed: %s", >+ isc_result_totext(result)); >+ result = ISC_R_UNEXPECTED; >+ } >+ >+ >+ return result; >+} >+ >+/* >+ * Wrapper around dns_sdlzunregister(). >+ */ >+void >+dlz_bdb_clear(void) { >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unregistering DLZ bdb driver."); >+ >+ if (dlz_bdb != NULL) >+ dns_sdlzunregister(&dlz_bdb); >+} >+ >+#endif >diff -Naur bind-9.2.2-orig/bin/named/dlz_filesystem_driver.c bind-9.2.2/bin/named/dlz_filesystem_driver.c >--- bind-9.2.2-orig/bin/named/dlz_filesystem_driver.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/dlz_filesystem_driver.c Fri Oct 17 18:26:32 2003 >@@ -0,0 +1,994 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifdef DLZ_FILESYSTEM >+ >+#include <config.h> >+#include <stdio.h> >+#include <string.h> >+#include <stdlib.h> >+ >+ >+#include <sys/stat.h> >+ >+ >+#include <dns/log.h> >+#include <dns/sdlz.h> >+#include <dns/result.h> >+ >+ >+#include <isc/dir.h> >+#include <isc/mem.h> >+#include <isc/platform.h> >+#include <isc/print.h> >+#include <isc/result.h> >+#include <isc/util.h> >+ >+#include <named/globals.h> >+#include <named/dlz_filesystem_driver.h> >+ >+dns_sdlzimplementation_t *dlz_fs = NULL; >+ >+typedef struct config_data { >+ char *basedir; >+ int basedirsize; >+ char *datadir; >+ int datadirsize; >+ char *xfrdir; >+ int xfrdirsize; >+ int splitcnt; >+ char separator; >+ char pathsep; >+ isc_mem_t *mctx; >+}config_data_t; >+ >+typedef struct dir_entry dir_entry_t; >+ >+struct dir_entry { >+ char dirpath[ISC_DIR_PATHMAX]; >+ ISC_LINK(dir_entry_t) link; >+}; >+ >+typedef ISC_LIST(dir_entry_t) dlist_t; >+ >+/*** >+ *** method prototypes >+ *** Declared here to shut up compiler warnings >+ *** about "no previous prototype" >+ ***/ >+ >+isc_boolean_t is_safe(const char *input); >+ >+isc_result_t create_path_helper(char *out, const char *in, config_data_t *cd); >+ >+isc_result_t create_path(const char *zone, const char *host, >+ const char *client, config_data_t *cd, char **path); >+ >+isc_result_t process_dir(isc_dir_t dir, void *passback, config_data_t *cd, >+ dlist_t *dir_list, unsigned int basedirlen); >+ >+isc_result_t fs_allowzonexfr(void *driverarg, void *dbdata, >+ const char *name, const char *client); >+ >+isc_result_t fs_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes); >+ >+isc_result_t fs_findzone(void *driverarg, void *dbdata, const char *name); >+ >+isc_result_t fs_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup); >+ >+isc_result_t fs_create(const char *dlzname, unsigned int argc, >+ char *argv[], void *driverarg, void **dbdata); >+ >+void fs_destroy(void *driverarg, void *dbdata); >+ >+isc_result_t dlz_fs_init(void); >+ >+void dlz_fs_clear(void); >+ >+/*** >+ *** Private methods >+ ***/ >+ >+isc_boolean_t >+is_safe(const char *input) >+{ >+ unsigned int i; >+ unsigned int len = strlen(input); >+ >+ // check that only allowed characters are in the domain name >+ for (i=0; i < len; i++) { >+ // '.' is allowed, but has special requirements >+ if(input[i] == '.'){ >+ // '.' is not allowed as first char >+ if(i == 0) >+ return ISC_FALSE; >+ // '..', two dots together is not allowed. >+ else if (input[i-1] == '.') >+ return ISC_FALSE; >+ // '.' is not allowed as last char >+ if(i == len) >+ return ISC_FALSE; >+ // only 1 dot in ok location, continue at next char >+ continue; >+ } >+ // '-' is allowed, continue at next char >+ if(input[i] == '-') >+ continue; >+ // 0-9 is allowed, continue at next char >+ if(input[i] >= '0' && input[i] <= '9') >+ continue; >+ // A-Z uppercase is allowed, continue at next char >+ if(input[i] >= 'A' && input[i] <= 'Z') >+ continue; >+ // a-z lowercase is allowed, continue at next char >+ if(input[i] >= 'a' && input[i] <= 'z') >+ continue; >+ >+ // colon needs to be allowed for IPV6 client addresses. >+ // Not dangerous in domain names, as not a special char. >+ if(input[i] == ':') >+ continue; >+ >+ // '@' needs to be allowed for in zone data. >+ // Not dangerous in domain names, as not a special char. >+ if(input[i] == '@') >+ continue; >+ >+ // if we reach this point we have encountered a disallowed char! >+ return ISC_FALSE; >+ } >+ // everything ok. >+ return ISC_TRUE; >+} >+ >+isc_result_t >+create_path_helper(char *out, const char *in, config_data_t *cd) >+{ >+ >+ char *tmpString; >+ char *tmpPtr; >+ int i; >+ >+ tmpString = isc_mem_strdup(ns_g_mctx, in); >+ if(tmpString == NULL) >+ return (ISC_R_NOMEMORY); >+ >+ // don't forget is_safe guarantees '.' will NOT be the first/last char >+ while( (tmpPtr = strrchr(tmpString, '.')) != NULL){ >+ i = 0; >+ while(tmpPtr[i+1] != '\0'){ >+ if(cd->splitcnt < 1) >+ strcat(out, (char *) &tmpPtr[i+1]); >+ else >+ strncat(out, (char *) &tmpPtr[i+1], cd->splitcnt); >+ strncat(out, (char *) &cd->pathsep, 1); >+ if(cd->splitcnt == 0) >+ break; >+ if(strlen( (char *) &tmpPtr[i+1]) <= (unsigned int) cd->splitcnt) >+ break; >+ i += cd->splitcnt; >+ } >+ tmpPtr[0] = '\0'; >+ } >+ >+ // handle the "first" label properly >+ i=0; >+ tmpPtr = tmpString; >+ while(tmpPtr[i] != '\0'){ >+ if(cd->splitcnt < 1) >+ strcat(out, (char *) &tmpPtr[i]); >+ else >+ strncat(out, (char *) &tmpPtr[i], cd->splitcnt); >+ strncat(out, (char *) &cd->pathsep, 1); >+ if(cd->splitcnt == 0) >+ break; >+ if(strlen( (char *) &tmpPtr[i]) <= (unsigned int) cd->splitcnt) >+ break; >+ i += cd->splitcnt; >+ } >+ >+ isc_mem_free(ns_g_mctx, tmpString); >+ return (ISC_R_SUCCESS); >+} >+ >+ /* >+ * Checks to make sure zone and host are safe. If safe, then >+ * hashes zone and host strings to build a path. If zone / host >+ * are not safe an error is returned. >+ */ >+ >+isc_result_t >+create_path(const char *zone, const char *host, const char *client, >+ config_data_t *cd, char **path) >+{ >+ >+ char *tmpPath; >+ int pathsize; >+ int len; >+ isc_result_t result; >+ >+ // we require a zone & cd parameter >+ REQUIRE(zone != NULL); >+ REQUIRE(cd != NULL); >+ // require path to be a pointer to NULL >+ REQUIRE(path != NULL && *path == NULL); >+ // client and host may both be NULL, but they can't both be NON-NULL >+ REQUIRE( (host == NULL && client == NULL) || >+ (host != NULL && client == NULL) || >+ (host == NULL && client != NULL) ); >+ >+ // if the requested zone is "unsafe", return error >+ if(is_safe(zone) != ISC_TRUE) >+ return (ISC_R_FAILURE); >+ >+ // if host was passed, verify that it is safe >+ if( (host != NULL) && (is_safe(host) != ISC_TRUE) ) >+ return (ISC_R_FAILURE); >+ >+ // if host was passed, verify that it is safe >+ if( (client != NULL) && (is_safe(client) != ISC_TRUE) ) >+ return (ISC_R_FAILURE); >+ >+ // Determine how much memory the split up string will require >+ if(host != NULL) >+ len = strlen(zone) + strlen(host); >+ else if(client != NULL) >+ len = strlen(zone) + strlen(client); >+ else >+ len = strlen(zone); >+ >+ // even though datadir and xfrdir will never be in the same string >+ // we only waste a few bytes by allocating for both, and then we are >+ // safe from buffer overruns. >+ pathsize = len + cd->basedirsize + cd->datadirsize + cd->xfrdirsize + 4; >+ >+ // if we are splitting names, we will need extra space. >+ if(cd->splitcnt > 0) >+ pathsize += len/cd->splitcnt; >+ >+ tmpPath = isc_mem_allocate(ns_g_mctx , pathsize * sizeof(char)); >+ if(tmpPath == NULL){ >+ // write error message >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Filesystem driver unable to allocate memory in create_path()."); >+ result = ISC_R_NOMEMORY; >+ goto cleanup_mem; >+ } >+ >+ // build path string >+ // start out with base directory. >+ strcpy(tmpPath, cd->basedir); >+ >+ // add zone name - parsed properly >+ if((result = create_path_helper(tmpPath, zone, cd)) != ISC_R_SUCCESS) >+ goto cleanup_mem; >+ >+ /* >+ * When neither client or host is passed we are building a path >+ * to see if a zone is supported. We require that a zone path >+ * have the "data dir" directory contained within it so that we >+ * know this zone is really supported. Otherwise, this zone may not >+ * really be supported because we are supporting a delagated sub zone. >+ * Example: >+ * We are supporting long.domain.com and using a splitcnt of 0. >+ * the base dir is "/base-dir/" and the data dir is "/.datadir" >+ * We want to see if we are authoritative for domain.com. >+ * Path /base-dir/com/domain/.datadir >+ * since /base-dir/com/domain/.datadir does not exist, we are not >+ * authoritative for the domain "domain.com". However we are >+ * authoritative for the domain "long.domain.com" because the path >+ * /base-dir/com/domain/long/.datadir does exist! >+ */ >+ >+ // if client is passed append xfr dir, otherwise append data dir >+ if(client != NULL){ >+ strcat(tmpPath, cd->xfrdir); >+ strncat(tmpPath, (char *) &cd->pathsep, 1); >+ strcat(tmpPath, client); >+ }else{ >+ strcat(tmpPath, cd->datadir); >+ } >+ >+ // if host not null, add it. >+ if(host != NULL){ >+ strncat(tmpPath, (char *) &cd->pathsep, 1); >+ if((result = create_path_helper(tmpPath, host, cd)) != ISC_R_SUCCESS) >+ goto cleanup_mem; >+ } >+ >+ //return the path we built. >+ *path = tmpPath; >+ >+ // return success >+ result = ISC_R_SUCCESS; >+ >+cleanup_mem: // cleanup memory >+ >+ // free tmpPath memory >+ if(tmpPath != NULL && result != ISC_R_SUCCESS) >+ isc_mem_free(ns_g_mctx, tmpPath); >+ >+ // free tmpPath memory >+ return result; >+} >+ >+isc_result_t >+process_dir(isc_dir_t dir, void *passback, config_data_t *cd, >+ dlist_t *dir_list, unsigned int basedirlen) >+{ >+ >+ char tmp[ISC_DIR_PATHMAX + ISC_DIR_NAMEMAX]; >+ int astPos; >+ struct stat sb; >+ isc_result_t result = ISC_R_FAILURE; >+ char *endp; >+ char *type; >+ char *ttlStr; >+ char *data; >+ char host[ISC_DIR_NAMEMAX]; >+ char *tmpString; >+ char *tmpPtr; >+ int ttl; >+ int i; >+ int len; >+ dir_entry_t *direntry; >+ isc_boolean_t foundHost; >+ >+ tmp[0] = '\0'; // set 1st byte to '\0' so strcpy works right. >+ host[0] = '\0'; >+ foundHost = ISC_FALSE; >+ >+ // copy base directory name to tmp. >+ strcpy(tmp, dir.dirname); >+ >+ // dir.dirname will always have '*' as the last char. >+ astPos = strlen(dir.dirname) - 1; >+ >+ // if dir_list != NULL, were are performing a zone xfr >+ if(dir_list != NULL){ >+ // if splitcnt == 0, determine host from path. >+ if(cd->splitcnt == 0){ >+ if(strlen(tmp) - 3 > basedirlen){ >+ tmp[astPos-1] = '\0'; >+ tmpString = (char *) &tmp[basedirlen+1]; >+ // handle filesystem's special wildcard "-" >+ if(strcmp(tmpString, "-") == 0){ >+ strcpy(host, "*"); >+ }else{ // not special wildcard -- normal name >+ while( (tmpPtr = strrchr(tmpString, cd->pathsep)) != NULL){ >+ strcat(host, tmpPtr + 1); >+ strcat(host, "."); >+ tmpPtr[0] = '\0'; >+ } >+ strcat(host, tmpString); >+ } >+ >+ foundHost = ISC_TRUE; >+ // set tmp again for use later >+ strcpy(tmp, dir.dirname); >+ } >+ }else{ // if splitcnt != 0 >+ // determine host from ".host" directory entry >+ while (isc_dir_read(&dir) == ISC_R_SUCCESS){ >+ if(strncasecmp(".host", dir.entry.name, 5) == 0){ >+ // handle filesystem's special wildcard "-" >+ if(strcmp( (char *) &dir.entry.name[6], "-") == 0) >+ strcpy(host, "*"); >+ else >+ strcpy(host, (char *) &dir.entry.name[6]); >+ foundHost = ISC_TRUE; >+ break; >+ } >+ } >+ // reset dir list for use later >+ isc_dir_reset(&dir); >+ } // end of else >+ } >+ >+ while (isc_dir_read(&dir) == ISC_R_SUCCESS) { >+ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "Filesystem driver Dir name: '%s' Dir entry: '%s'\n", >+ dir.dirname, dir.entry.name); >+ >+ // skip any entries starting with "." >+ if(dir.entry.name[0] == '.') >+ continue; >+ >+ // get rid of '*', set to NULL. Effectively trims string from >+ // previous loop to base directory only while still leaving >+ // memory for concat to be performed next. >+ >+ tmp[astPos] = '\0'; >+ >+ // add name to base directory name. >+ strcat(tmp, dir.entry.name); >+ >+ // make sure we can stat entry >+ if (stat(tmp, &sb) == 0 ){ >+ // if entry is a directory >+ if((sb.st_mode & S_IFDIR) != 0){ >+ // if dir list is NOT NULL, add dir to dir list >+ if(dir_list != NULL){ >+ direntry = isc_mem_get(ns_g_mctx, sizeof(dir_entry_t)); >+ if(direntry == NULL) >+ return (ISC_R_NOMEMORY); >+ strcpy(direntry->dirpath, tmp); >+ ISC_LINK_INIT(direntry, link); >+ ISC_LIST_APPEND(*dir_list, direntry, link); >+ result = ISC_R_SUCCESS; >+ } >+ continue; >+ // if entry is a file be sure we do not add entry >+ // to DNS results if we are performing a zone xfr >+ // and we could not find a host entry. >+ } else if(dir_list != NULL && foundHost == ISC_FALSE){ >+ continue; >+ } >+ }else // if we cannot stat entry, skip it. >+ continue; >+ >+ type = dir.entry.name; >+ ttlStr = strchr(type, cd->separator); >+ if(ttlStr == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Filesystem driver: %s could not be parsed properly", tmp); >+ return ISC_R_FAILURE; >+ } >+ >+ // replace separator char with NULL to split string >+ ttlStr[0] = '\0'; >+ // start string after NULL of previous string >+ ttlStr = (char *) &ttlStr[1]; >+ >+ data = strchr(ttlStr, cd->separator); >+ if(data == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Filesystem driver: %s could not be parsed properly", tmp); >+ return ISC_R_FAILURE; >+ } >+ >+ // replace separator char with NULL to split string >+ data[0] = '\0'; >+ >+ // start string after NULL of previous string >+ data = (char *) &data[1]; >+ >+ // replace all cd->separator chars with a space. >+ len = strlen(data); >+ >+ for(i=0; i < len; i++){ >+ if(data[i] == cd->separator) >+ data[i] = ' '; >+ } >+ >+ // convert text to int, make sure it worked right >+ ttl = strtol(ttlStr, &endp, 10); >+ if (*endp != '\0' || ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Filesystem driver ttl must be a postive number"); >+ } >+ >+ // pass data back to Bind >+ if(dir_list == NULL) >+ result = dns_sdlz_putrr( (dns_sdlzlookup_t *) passback, type, >+ ttl, data); >+ else >+ result = dns_sdlz_putnamedrr( (dns_sdlzallnodes_t *) passback, >+ (char *) host, type, ttl, data); >+ >+ // if error, return error right away >+ if(result != ISC_R_SUCCESS) >+ return result; >+ } // end of while loop >+ >+ return result; >+} >+ >+/*** >+ *** SDLZ interface methods >+ ***/ >+ >+isc_result_t >+fs_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client) >+{ >+ >+ isc_result_t result; >+ char *path; >+ struct stat sb; >+ config_data_t *cd; >+ path = NULL; >+ >+ UNUSED(driverarg); >+ >+ cd = (config_data_t *) dbdata; >+ >+ if(create_path(name, NULL, client, cd, &path) != ISC_R_SUCCESS){ >+ return (ISC_R_NOTFOUND); >+ } >+ >+ if (stat(path, &sb) != 0) { >+ result = ISC_R_NOTFOUND; >+ goto complete_AXFR; >+ } >+ >+ if( (sb.st_mode & S_IFREG) != 0){ >+ result = ISC_R_SUCCESS; >+ goto complete_AXFR; >+ } >+ >+ result = ISC_R_NOTFOUND; >+ >+complete_AXFR: >+ isc_mem_free(ns_g_mctx, path); >+ return result; >+} >+ >+isc_result_t >+fs_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes) >+{ >+ >+ isc_result_t result; >+ dlist_t *dir_list; >+ config_data_t *cd; >+ char *basepath; >+ unsigned int basepathlen; >+ struct stat sb; >+ isc_dir_t dir; >+ dir_entry_t *dir_entry; >+ dir_entry_t *next_de; >+ >+ basepath = NULL; >+ dir_list = NULL; >+ >+ UNUSED(driverarg); >+ UNUSED(allnodes); >+ >+ cd = (config_data_t *) dbdata; >+ >+ /* allocate memory for list */ >+ dir_list = isc_mem_get(ns_g_mctx, sizeof(dlist_t)); >+ if (dir_list == NULL){ >+ result = ISC_R_NOTFOUND; >+ goto complete_allnds; >+ } >+ >+ /* initialize list */ >+ ISC_LIST_INIT(*dir_list); >+ >+ if(create_path(zone, NULL, NULL, cd, &basepath) != ISC_R_SUCCESS){ >+ return (ISC_R_NOTFOUND); >+ } >+ >+ // remove path separator at end of path so stat works properly >+ basepathlen = strlen(basepath); >+ >+ if (stat(basepath, &sb) != 0) { >+ result = ISC_R_NOTFOUND; >+ goto complete_allnds; >+ } >+ >+ if( (sb.st_mode & S_IFDIR) == 0){ >+ result = ISC_R_NOTFOUND; >+ goto complete_allnds; >+ } >+ >+ // initialize and open directory >+ isc_dir_init(&dir); >+ result = isc_dir_open(&dir, basepath); >+ >+ // if directory open failed, return error. >+ if (result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Unable to open %s directory to read entries.", basepath); >+ result = ISC_R_FAILURE; >+ goto complete_allnds; >+ } >+ >+ // process the directory >+ result = process_dir(dir, allnodes, cd, dir_list, basepathlen); >+ >+ // close the directory >+ isc_dir_close(&dir); >+ >+ if(result != ISC_R_SUCCESS) >+ goto complete_allnds; >+ >+ // get first dir entry from list. >+ dir_entry = ISC_LIST_HEAD(*dir_list); >+ while (dir_entry != NULL){ >+ >+ result = isc_dir_open(&dir, dir_entry->dirpath); >+ // if directory open failed, return error. >+ if (result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Unable to open %s directory to read entries.", basepath); >+ result = ISC_R_FAILURE; >+ goto complete_allnds; >+ } >+ >+ // process the directory >+ result = process_dir(dir, allnodes, cd, dir_list, basepathlen); >+ >+ // close the directory >+ isc_dir_close(&dir); >+ >+ if(result != ISC_R_SUCCESS) >+ goto complete_allnds; >+ >+ dir_entry = ISC_LIST_NEXT(dir_entry, link); >+ } // end while >+ >+complete_allnds: >+ if(dir_list != NULL){ >+ // clean up entries from list. >+ dir_entry = ISC_LIST_HEAD(*dir_list); >+ while (dir_entry != NULL){ >+ next_de = ISC_LIST_NEXT(dir_entry, link); >+ isc_mem_put(ns_g_mctx, dir_entry, sizeof(dir_entry_t)); >+ dir_entry = next_de; >+ } // end while >+ isc_mem_put(ns_g_mctx, dir_list, sizeof(dlist_t)); >+ } >+ >+ if(basepath != NULL) >+ isc_mem_free(ns_g_mctx, basepath); >+ >+ return result; >+} >+ >+isc_result_t >+fs_findzone(void *driverarg, void *dbdata, const char *name) >+{ >+ >+ isc_result_t result; >+ char *path; >+ struct stat sb; >+ path = NULL; >+ >+ UNUSED(driverarg); >+ >+ if(create_path(name, NULL, NULL, (config_data_t *) dbdata, &path) != ISC_R_SUCCESS){ >+ return (ISC_R_NOTFOUND); >+ } >+ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "Filesystem driver Findzone() Checking for path: '%s'\n", path); >+ >+ if (stat(path, &sb) != 0) { >+ result = ISC_R_NOTFOUND; >+ goto complete_FZ; >+ } >+ >+ if( (sb.st_mode & S_IFDIR) != 0){ >+ result = ISC_R_SUCCESS; >+ goto complete_FZ; >+ } >+ >+ result = ISC_R_NOTFOUND; >+ >+complete_FZ: >+ >+ isc_mem_free(ns_g_mctx, path); >+ return result; >+} >+ >+isc_result_t >+fs_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup) >+{ >+ isc_result_t result; >+ char *path; >+ struct stat sb; >+ isc_dir_t dir; >+ path = NULL; >+ >+ UNUSED(driverarg); >+ UNUSED(lookup); >+ >+ if(strcmp(name, "*") == 0) // handle filesystem's special wildcard "-" >+ result = create_path(zone, "-", NULL, (config_data_t *) dbdata, &path); >+ else >+ result = create_path(zone, name, NULL, (config_data_t *) dbdata, &path); >+ >+ if( result != ISC_R_SUCCESS){ >+ return (ISC_R_NOTFOUND); >+ } >+ >+ // remove path separator at end of path so stat works properly >+ path[strlen(path)-1] = '\0'; >+ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "Filesystem driver lookup() Checking for path: '%s'\n", path); >+ >+ >+ if (stat(path, &sb) != 0) { >+ result = ISC_R_NOTFOUND; >+ goto complete_lkup; >+ } >+ >+ if( (sb.st_mode & S_IFDIR) == 0){ >+ result = ISC_R_NOTFOUND; >+ goto complete_lkup; >+ } >+ >+ // initialize and open directory >+ isc_dir_init(&dir); >+ result = isc_dir_open(&dir, path); >+ >+ // if directory open failed, return error. >+ if (result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Unable to open %s directory to read entries.", path); >+ result = ISC_R_FAILURE; >+ goto complete_lkup; >+ } >+ >+ // process any records in the directory >+ result = process_dir(dir, lookup, (config_data_t *) dbdata, NULL, 0); >+ >+ // close the directory >+ isc_dir_close(&dir); >+ >+complete_lkup: >+ >+ isc_mem_free(ns_g_mctx, path); >+ return result; >+} >+ >+isc_result_t >+fs_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata) >+{ >+ config_data_t *cd; >+ char *endp; >+ int len; >+ char pathsep; >+ >+ UNUSED(driverarg); >+ UNUSED(dlzname); >+ >+ // we require 5 command line args. >+ if(argc != 6){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Filesystem driver requires 6 command line args."); >+ return (ISC_R_FAILURE); >+ } >+ >+ if(strlen(argv[5]) > 1){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Filesystem driver can only accept a single character for separator."); >+ return (ISC_R_FAILURE); >+ } >+ >+ // verify base dir ends with '/' or '\' >+ len = strlen(argv[1]); >+ if(argv[1][len-1] != '\\' && argv[1][len-1] != '/'){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Base dir parameter for filesystem driver should end with %s", >+ "either '/' or '\\' "); >+ return (ISC_R_FAILURE); >+ } >+ >+ // determine and save path separator for later >+ if(argv[1][len-1] == '\\') >+ pathsep = '\\'; >+ else >+ pathsep = '/'; >+ >+ // allocate memory for our config data >+ cd = isc_mem_get(ns_g_mctx, sizeof(config_data_t)); >+ if(cd == NULL) >+ goto no_mem; >+ >+ // zero the memory >+ memset(cd, 0, sizeof(config_data_t)); >+ >+ cd->pathsep = pathsep; >+ >+ // get and store our base directory >+ cd->basedir = isc_mem_strdup(ns_g_mctx, argv[1]); >+ if(cd->basedir == NULL) >+ goto no_mem; >+ cd->basedirsize = strlen(cd->basedir); >+ >+ // get and store our data sub-dir >+ cd->datadir = isc_mem_strdup(ns_g_mctx, argv[2]); >+ if(cd->datadir == NULL) >+ goto no_mem; >+ cd->datadirsize = strlen(cd->datadir); >+ >+ // get and store our zone xfr sub-dir >+ cd->xfrdir = isc_mem_strdup(ns_g_mctx, argv[3]); >+ if(cd->xfrdir == NULL) >+ goto no_mem; >+ cd->xfrdirsize = strlen(cd->xfrdir); >+ >+ // get and store our directory split count >+ cd->splitcnt = strtol(argv[4], &endp, 10); >+ if (*endp != '\0' || cd->splitcnt < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Directory split count must be zero (0) or a postive number"); >+ } >+ >+ // get and store our separator character >+ cd->separator = *argv[5]; >+ >+ // attach config data to memory context >+ isc_mem_attach(ns_g_mctx, &cd->mctx); >+ >+ // pass back config data >+ *dbdata = cd; >+ >+ // return success >+ return(ISC_R_SUCCESS); >+ >+ // handle no memory error >+no_mem: >+ >+ // if we allocated a config data object clean it up >+ if(cd != NULL) >+ fs_destroy(NULL, cd); >+ >+ // write error message >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Filesystem driver unable to allocate memory for config data."); >+ >+ // return error >+ return (ISC_R_NOMEMORY); >+} >+ >+void >+fs_destroy(void *driverarg, void *dbdata) >+{ >+ isc_mem_t *mctx; >+ config_data_t *cd; >+ >+ UNUSED(driverarg); >+ >+ cd = (config_data_t *) dbdata; >+ >+ // free memory for each section of config data that was allocated >+ if(cd->basedir != NULL) >+ isc_mem_free(ns_g_mctx, cd->basedir); >+ >+ if(cd->datadir != NULL) >+ isc_mem_free(ns_g_mctx, cd->datadir); >+ >+ if(cd->xfrdir != NULL) >+ isc_mem_free(ns_g_mctx, cd->xfrdir); >+ >+ // hold memory context to use later >+ mctx = cd->mctx; >+ >+ // free config data memory >+ isc_mem_put(mctx, cd, sizeof(config_data_t)); >+ >+ // detach memory from context >+ isc_mem_detach(&mctx); >+} >+ >+static dns_sdlzmethods_t dlz_fs_methods = { >+ fs_create, >+ fs_destroy, >+ fs_findzone, >+ fs_lookup, >+ NULL, >+ fs_allnodes, >+ fs_allowzonexfr}; >+ >+/* >+ * Wrapper around dns_sdlzregister(). >+ */ >+isc_result_t >+dlz_fs_init(void) >+{ >+ isc_result_t result; >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Registering DLZ filesystem driver."); >+ >+ result = dns_sdlzregister("filesystem", &dlz_fs_methods, NULL, >+ DNS_SDLZFLAG_RELATIVEOWNER | DNS_SDLZFLAG_RELATIVERDATA, >+ ns_g_mctx, &dlz_fs); >+ if(result != ISC_R_SUCCESS){ >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "dns_sdlzregister() failed: %s", >+ isc_result_totext(result)); >+ result = ISC_R_UNEXPECTED; >+ } >+ >+ return result; >+} >+ >+/* >+ * Wrapper around dns_sdlzunregister(). >+ */ >+void >+dlz_fs_clear(void) { >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unregistering DLZ filesystem driver."); >+ >+ if (dlz_fs != NULL) >+ dns_sdlzunregister(&dlz_fs); >+} >+ >+#endif >+ >diff -Naur bind-9.2.2-orig/bin/named/dlz_ldap_driver.c bind-9.2.2/bin/named/dlz_ldap_driver.c >--- bind-9.2.2-orig/bin/named/dlz_ldap_driver.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/dlz_ldap_driver.c Sat Nov 1 14:18:28 2003 >@@ -0,0 +1,1270 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifdef DLZ_LDAP >+ >+#include <config.h> >+#include <stdio.h> >+#include <string.h> >+#include <stdlib.h> >+ >+#include <dns/log.h> >+#include <dns/sdlz.h> >+#include <dns/result.h> >+ >+#include <isc/mem.h> >+#include <isc/platform.h> >+#include <isc/print.h> >+#include <isc/result.h> >+#include <isc/string.h> >+#include <isc/util.h> >+ >+#include <named/globals.h> >+#include <named/dlz_ldap_driver.h> >+#include <named/sdlz_helper.h> >+ >+#include <ldap.h> >+ >+#define SIMPLE "simple" >+#define KRB41 "krb41" >+#define KRB42 "krb42" >+#define V2 "v2" >+#define V3 "v3" >+ >+ >+dns_sdlzimplementation_t *dlz_ldap = NULL; >+ >+#define dbc_search_limit 30 >+#define ALLNODES 1 >+#define ALLOWXFR 2 >+#define AUTHORITY 3 >+#define FINDZONE 4 >+#define LOOKUP 5 >+ >+/*** >+ *** Structure to hold everthing needed by this "instance" of the LDAP driver >+ *** remember, the driver code is only loaded once, but may have many separate >+ *** instances >+ ***/ >+ >+typedef struct { >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ db_list_t *db; // handle to a list of DB >+ >+#else >+ >+ dbinstance_t *db; // handle to db >+ >+#endif >+ >+ int method; // security authentication method >+ char *user; // who is authenticating >+ char *cred; // password for simple authentication method >+ int protocol; // LDAP communication protocol version >+ char *hosts; // LDAP server hosts >+ >+} ldap_instance_t; >+ >+isc_result_t >+dlz_ldap_connect(ldap_instance_t *dbi, dbinstance_t *dbc); >+ >+void >+ldap_destroy_dblist(db_list_t *dblist); >+ >+dbinstance_t * >+ldap_find_avail_conn(db_list_t *dblist); >+ >+isc_result_t >+ldap_get_results(const char *zone, const char *record, >+ const char *client, unsigned int query, >+ void *dbdata, void *ptr); >+ >+isc_result_t >+ldap_process_results(LDAP *dbc, LDAPMessage *msg, char ** attrs, >+ void *ptr, isc_boolean_t allnodes); >+ >+isc_result_t >+dlz_ldap_checkURL(char *URL, int attrCnt, const char *msg); >+ >+/*** >+ *** DLZ method prototypes >+ ***/ >+ >+isc_result_t >+dlz_ldap_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client); >+ >+isc_result_t >+dlz_ldap_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes); >+ >+isc_result_t >+dlz_ldap_authority(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+dlz_ldap_findzone(void *driverarg, void *dbdata, const char *name); >+ >+isc_result_t >+dlz_ldap_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+dlz_ldap_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata); >+ >+void >+dlz_ldap_destroy(void *driverarg, void *dbdata); >+ >+ >+/*** >+ *** Private methods >+ ***/ >+ >+ /* checks that the LDAP URL parameters make sense */ >+ >+isc_result_t >+dlz_ldap_checkURL(char *URL, int attrCnt, const char *msg){ >+ >+ isc_result_t result = ISC_R_SUCCESS; >+ int ldap_result; >+ LDAPURLDesc *ldap_url = NULL; >+ >+ if(!ldap_is_ldap_url(URL)){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "%s query is not a valid LDAP URL", msg); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ ldap_result = ldap_url_parse(URL, &ldap_url); >+ if(ldap_result != LDAP_SUCCESS || ldap_url == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "parsing %s query failed", msg); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ if(ldap_count_values(ldap_url->lud_attrs) < attrCnt){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "%s query must specify at least %d attributes to return", >+ msg, attrCnt); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ if(ldap_url->lud_host != NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "%s query must not specify a host", msg); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ if(ldap_url->lud_port != 389){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "%s query must not specify a port", msg); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ if(ldap_url->lud_dn == NULL || strlen (ldap_url->lud_dn) < 1){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "%s query must specify a search base", msg); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ if(ldap_url->lud_exts != NULL || ldap_url->lud_crit_exts != 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "%s uses extensions. The driver does not support LDAP extensions.", >+ msg); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+cleanup: >+ >+ if(ldap_url != NULL) >+ ldap_free_urldesc(ldap_url); >+ >+ return result; >+} >+ /* Connects / reconnects to LDAP server */ >+ >+isc_result_t >+dlz_ldap_connect(ldap_instance_t *dbi, dbinstance_t *dbc){ >+ >+ isc_result_t result; >+ int ldap_result; >+ >+ // if we have a connection, get ride of it. >+ if(dbc->dbconn != NULL){ >+ ldap_unbind_s((LDAP *) dbc->dbconn); >+ dbc->dbconn = NULL; >+ } >+ >+ // now connect / reconnect. >+ >+ // initialize. >+ dbc->dbconn = ldap_init(dbi->hosts, LDAP_PORT); >+ if(dbc->dbconn == NULL) >+ return ISC_R_NOMEMORY; >+ >+ // set protocol version. >+ ldap_result = ldap_set_option((LDAP *) dbc->dbconn, >+ LDAP_OPT_PROTOCOL_VERSION, &(dbi->protocol)); >+ if(ldap_result != LDAP_SUCCESS){ >+ result = ISC_R_NOPERM; >+ goto cleanup; >+ } >+ >+ // "bind" to server. i.e. send username / pass >+ ldap_result = ldap_bind_s((LDAP *) dbc->dbconn, dbi->user, >+ dbi->cred, dbi->method); >+ if(ldap_result != LDAP_SUCCESS){ >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ return ISC_R_SUCCESS; >+ >+cleanup: >+ >+ // cleanup if failure. >+ if(dbc->dbconn != NULL){ >+ ldap_unbind_s((LDAP *) dbc->dbconn); >+ dbc->dbconn = NULL; >+ } >+ >+ return result; >+} >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ >+ /* Properly cleans up a list of database instances. >+ * This function is only used when the driver is compiled for >+ * multithreaded operation. >+ */ >+void >+ldap_destroy_dblist(db_list_t *dblist) >+{ >+ >+ dbinstance_t *ndbi = NULL; >+ dbinstance_t *dbi = NULL; >+ >+ // get the first DBI in the list >+ ndbi = ISC_LIST_HEAD(*dblist); >+ >+ // loop through the list >+ while(ndbi != NULL){ >+ dbi = ndbi; >+ // get the next DBI in the list >+ ndbi = ISC_LIST_NEXT(dbi, link); >+ // release DB connection >+ if(dbi->dbconn != NULL) >+ ldap_unbind_s((LDAP *) dbi->dbconn); >+ // release all memory that comprised a DBI >+ destroy_sqldbinstance(dbi); >+ } >+ // release memory for the list structure >+ isc_mem_put(ns_g_mctx, dblist, sizeof(db_list_t)); >+} >+ >+ /* Loops through the list of DB instances, attempting to lock >+ * on the mutex. If successful, the DBI is reserved for use >+ * and the thread can perform queries against the database. >+ * If the lock fails, the next one in the list is tried. >+ * looping continues until a lock is obtained, or until >+ * the list has been searched dbc_search_limit times. >+ * This function is only used when the driver is compiled for >+ * multithreaded operation. >+ */ >+ >+dbinstance_t * >+ldap_find_avail_conn(db_list_t *dblist) >+{ >+ dbinstance_t *dbi = NULL; >+ dbinstance_t *head; >+ int count = 0; >+ >+ // get top of list >+ head = dbi = ISC_LIST_HEAD(*dblist); >+ >+ // loop through list >+ while(count < dbc_search_limit){ >+ // try to lock on the mutex >+ if(isc_mutex_trylock(&dbi->instance_lock) == ISC_R_SUCCESS) >+ return dbi; // success, return the DBI for use. >+ >+ // not successful, keep trying >+ dbi = ISC_LIST_NEXT(dbi, link); >+ >+ // check to see if we have gone to the top of the list. >+ if(dbi == NULL){ >+ count++; >+ dbi = head; >+ } >+ } >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_INFO, >+ "LDAP driver unable to find available connection after searching %d times", >+ count); >+ return NULL; >+} >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+isc_result_t >+ldap_process_results(LDAP *dbc, LDAPMessage *msg, char ** attrs, >+ void *ptr, isc_boolean_t allnodes) >+{ >+ isc_result_t result = ISC_R_SUCCESS; >+ int i = 0; >+ int j; >+ int len; >+ char *attribute = NULL; >+ LDAPMessage *entry; >+ char *endp = NULL; >+ char *host = NULL; >+ char *type = NULL; >+ char *data = NULL; >+ char **vals = NULL; >+ int ttl; >+ >+ // make sure there are at least some attributes to process. >+ REQUIRE(attrs != NULL || attrs[0] != NULL); >+ >+ // get the first entry to process >+ entry = ldap_first_entry(dbc, msg); >+ if(entry == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_INFO, >+ "LDAP no entries to process."); >+ return ISC_R_FAILURE; >+ } >+ >+ // loop through all entries returned >+ while(entry != NULL){ >+ >+ // reset for this loop >+ ttl = 0; >+ len = 0; >+ i = 0; >+ attribute = attrs[i]; >+ >+ // determine how much space we need for data string >+ for(j=0; attrs[j] != NULL; j++){ >+ // get the list of values for this attribute. >+ vals = ldap_get_values(dbc, entry, attrs[j]); >+ // skip empty attributes. >+ if(vals == NULL || ldap_count_values(vals) < 1) >+ continue; >+ // we only use the first value >+ // this driver does not support multi-valued attributes. >+ len = len + strlen(vals[0]) + 1; >+ // free vals for next loop >+ ldap_value_free(vals); >+ } // end for(j=0; attrs[j] != NULL, j++) loop >+ >+ // allocate memory for data string >+ data = isc_mem_allocate(ns_g_mctx, len + 1); >+ if(data == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver unable to allocate memory while processing results"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ // Make sure data is null termed at the beginning so we >+ // can check if any data was stored to it later. >+ data[0] = '\0'; >+ >+ // reset j to re-use below >+ j = 0; >+ >+ // loop through the attributes in the order specified. >+ while(attribute != NULL){ >+ >+ // get the list of values for this attribute. >+ vals = ldap_get_values(dbc, entry, attribute); >+ >+ // skip empty attributes. >+ if(vals == NULL || vals[0] == NULL){ >+ // increment attibute pointer >+ attribute = attrs[++i]; >+ // start loop over >+ continue; >+ } >+ >+ // j initially = 0. Increment j each time we set a field >+ // that way next loop will set next field. >+ switch(j){ >+ case 0: >+ j++; >+ // convert text to int, make sure it worked right >+ ttl = strtol(vals[0], &endp, 10); >+ if (*endp != '\0' || ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver ttl must be a postive number"); >+ goto cleanup; >+ } >+ break; >+ case 1: >+ j++; >+ type = isc_mem_strdup(ns_g_mctx, vals[0]); >+ break; >+ case 2: >+ j++; >+ if(allnodes == isc_boolean_true){ >+ host = isc_mem_strdup(ns_g_mctx, vals[0]); >+ } else { >+ strcpy(data, vals[0]); >+ } >+ break; >+ case 3: >+ j++; >+ if(allnodes == isc_boolean_true){ >+ strcpy(data, vals[0]); >+ } else { >+ strcat(data, " "); >+ strcat(data, vals[0]); >+ } >+ break; >+ default: >+ strcat(data, " "); >+ strcat(data, vals[0]); >+ break; >+ } // end switch(j) >+ >+ // free values >+ ldap_value_free(vals); >+ vals = NULL; >+ >+ // increment attibute pointer >+ attribute = attrs[++i]; >+ } // end while(attribute != NULL) >+ >+ if(type == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver unable to retrieve dns type"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ if(strlen(data) < 1){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver unable to retrieve dns data"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ if(allnodes == isc_boolean_true){ >+ if(strcasecmp(host, "~") == 0) >+ result = dns_sdlz_putnamedrr((dns_sdlzallnodes_t *) ptr, >+ "*", type, ttl, data); >+ else >+ result = dns_sdlz_putnamedrr((dns_sdlzallnodes_t *) ptr, >+ host, type, ttl, data); >+ } >+ else >+ result = dns_sdlz_putrr((dns_sdlzlookup_t *) ptr, type, ttl, data); >+ >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver failed while sending data to Bind."); >+ goto cleanup; >+ } >+ >+ // free memory for type, data and host for next loop >+ isc_mem_free(ns_g_mctx, type); >+ isc_mem_free(ns_g_mctx, data); >+ if(host != NULL) >+ isc_mem_free(ns_g_mctx, host); >+ >+ // get the next entry to process >+ entry = ldap_next_entry(dbc, entry); >+ } // end while(entry != NULL) >+ >+cleanup: >+ >+ // de-allocate memory >+ if(vals != NULL) >+ ldap_value_free(vals); >+ if(host != NULL) >+ isc_mem_free(ns_g_mctx, host); >+ if(type != NULL) >+ isc_mem_free(ns_g_mctx, type); >+ if(data != NULL) >+ isc_mem_free(ns_g_mctx, data); >+ >+ return result; >+} >+ >+ /* This function is the real core of the driver. Zone, record >+ * and client strings are passed in (or NULL is passed if the >+ * string is not available). The type of query we want to run >+ * is indicated by the query flag, and the dbdata object is passed >+ * passed in to. dbdata really holds either: >+ * 1) a list of database instances (in multithreaded mode) OR >+ * 2) a single database instance (in single threaded mode) >+ * The function will construct the query and obtain an available >+ * database instance (DBI). It will then run the query and hopefully >+ * obtain a result set. >+ */ >+isc_result_t >+ldap_get_results(const char *zone, const char *record, >+ const char *client, unsigned int query, >+ void *dbdata, void *ptr) >+{ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ char *querystring = NULL; >+ LDAPURLDesc *ldap_url = NULL; >+ int ldap_result = 0; >+ LDAPMessage *ldap_msg = NULL; >+ int i; >+ int entries; >+ >+ // get db instance / connection >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // find an available DBI from the list >+ dbi = ldap_find_avail_conn((db_list_t *) ((ldap_instance_t *)dbdata)->db); >+ >+#else /* ISC_PLATFORM_USETHREADS */ >+ >+ // only 1 DBI - no need to lock instance lock either >+ // only 1 thread in the whole process, no possible contention. >+ dbi = (dbinstance_t *) ((ldap_instance_t *)dbdata)->db; >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ // if DBI is null, can't do anything else >+ if(dbi == NULL) >+ return ISC_R_FAILURE; >+ >+ // set fields >+ if(zone != NULL){ >+ dbi->zone = isc_mem_strdup(ns_g_mctx, zone); >+ if(dbi->zone == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { >+ dbi->zone = NULL; >+ } >+ if(record != NULL){ >+ dbi->record = isc_mem_strdup(ns_g_mctx, record); >+ if(dbi->record == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { >+ dbi->record = NULL; >+ } >+ if(client != NULL){ >+ dbi->client = isc_mem_strdup(ns_g_mctx, client); >+ if(dbi->client == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { >+ dbi->client = NULL; >+ } >+ >+ // what type of query are we going to run? >+ switch(query){ >+ case ALLNODES: >+ // if the query was not passed in from the config file >+ // then we can't run it. return not_implemented, >+ // so it's like the code for that operation >+ // was never built into the driver.... AHHH flexibility!!! >+ if(dbi->allnodes_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } else { >+ querystring = build_querystring(ns_g_mctx, dbi->allnodes_q); >+ } >+ break; >+ case ALLOWXFR: >+ // same as comments as ALLNODES >+ if(dbi->allowxfr_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } else { >+ querystring = build_querystring(ns_g_mctx, dbi->allowxfr_q); >+ } >+ break; >+ case AUTHORITY: >+ // same as comments as ALLNODES >+ if(dbi->authority_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } else { >+ querystring = build_querystring(ns_g_mctx, dbi->authority_q); >+ } >+ break; >+ case FINDZONE: >+ // this is required. It's the whole point of DLZ! >+ if(dbi->findzone_q == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "No query specified for findzone. Findzone requires a query"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } else { >+ querystring = build_querystring(ns_g_mctx, dbi->findzone_q); >+ } >+ break; >+ case LOOKUP: >+ // this is required. It's also a major point of DLZ! >+ if(dbi->lookup_q == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "No query specified for lookup. Lookup requires a query"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } else { >+ querystring = build_querystring(ns_g_mctx, dbi->lookup_q); >+ } >+ break; >+ default: >+ // this should never happen. If it does, the code is screwed up! >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "Incorrect query flag passed to postgres_get_resultset"); >+ result = ISC_R_UNEXPECTED; >+ goto cleanup; >+ } >+ >+ // if the querystring is null, Bummer, outta RAM. UPGRADE TIME!!! >+ if(querystring == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ >+ // output the full query string during debug so we can see >+ // what lame error the query has. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "\nQuery String: %s\n", querystring); >+ >+ // break URL down into it's component parts, if error cleanup >+ ldap_result = ldap_url_parse(querystring, &ldap_url); >+ if(ldap_result != LDAP_SUCCESS || ldap_url == NULL){ >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ for(i=0; i < 3; i++){ >+ >+ // dbi->dbconn may be null if trying to reconnect on a previous >+ // query failed. >+ if(dbi->dbconn == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_INFO, >+ "LDAP driver attempting to re-connect"); >+ >+ result = dlz_ldap_connect((ldap_instance_t *) dbdata, dbi); >+ if(result != ISC_R_SUCCESS){ >+ result = ISC_R_FAILURE; >+ continue; >+ } >+ } >+ >+ // perform ldap search syncronously >+ ldap_result = ldap_search_s((LDAP *) dbi->dbconn, ldap_url->lud_dn, >+ ldap_url->lud_scope, ldap_url->lud_filter, >+ ldap_url->lud_attrs, 0, &ldap_msg); >+ >+ // check return code. >+ //No such object is ok, just didn't find what we wanted >+ switch(ldap_result){ >+ case LDAP_NO_SUCH_OBJECT: >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "No object found matching query requirements"); >+ result = ISC_R_NOTFOUND; >+ goto cleanup; >+ break; >+ case LDAP_SUCCESS: // on success do nothing >+ result = ISC_R_SUCCESS; >+ i = 3; >+ break; >+ case LDAP_SERVER_DOWN: >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_INFO, >+ "LDAP driver attempting to re-connect"); >+ result = dlz_ldap_connect((ldap_instance_t *) dbdata, dbi); >+ if(result != ISC_R_SUCCESS) >+ result = ISC_R_FAILURE; >+ break; >+ default: >+ // other errors not ok. Log error message and get out >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP error: %s", ldap_err2string(ldap_result)); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ break; >+ } // close switch(ldap_result) >+ } // end for(int i=0 i < 3; i++) >+ >+ if(result != ISC_R_SUCCESS) >+ goto cleanup; >+ >+ switch(query){ >+ case ALLNODES: >+ result = ldap_process_results((LDAP *) dbi->dbconn, ldap_msg, >+ ldap_url->lud_attrs, ptr, isc_boolean_true); >+ break; >+ case AUTHORITY: >+ case LOOKUP: >+ result = ldap_process_results((LDAP *) dbi->dbconn, ldap_msg, >+ ldap_url->lud_attrs, ptr, isc_boolean_false); >+ break; >+ case ALLOWXFR: >+ entries = ldap_count_entries((LDAP *) dbi->dbconn, ldap_msg); >+ if (entries == 0) >+ result = ISC_R_NOPERM; >+ else if (entries > 0) >+ result = ISC_R_SUCCESS; >+ else >+ result = ISC_R_FAILURE; >+ break; >+ case FINDZONE: >+ entries = ldap_count_entries((LDAP *) dbi->dbconn, ldap_msg); >+ if (entries == 0) >+ result = ISC_R_NOTFOUND; >+ else if (entries > 0) >+ result = ISC_R_SUCCESS; >+ else >+ result = ISC_R_FAILURE; >+ break; >+ default: >+ // this should never happen. If it does, the code is screwed up! >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "Incorrect query flag passed to postgres_get_resultset"); >+ result = ISC_R_UNEXPECTED; >+ } >+ >+ >+cleanup: // it's always good to cleanup after yourself >+ >+ // if we retrieved results, free them >+ if(ldap_msg != NULL) >+ ldap_msgfree(ldap_msg); >+ >+ if(ldap_url != NULL) >+ ldap_free_urldesc(ldap_url); >+ >+ // cleanup >+ if(dbi->zone != NULL) >+ isc_mem_free(ns_g_mctx, dbi->zone); >+ if(dbi->record != NULL) >+ isc_mem_free(ns_g_mctx, dbi->record); >+ if(dbi->client != NULL) >+ isc_mem_free(ns_g_mctx, dbi->client); >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // release the lock so another thread can use this dbi >+ isc_mutex_unlock(&dbi->instance_lock); >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ // release query string >+ if(querystring != NULL) >+ isc_mem_free(ns_g_mctx, querystring ); >+ >+ // return result >+ return result; >+} >+ >+/*** >+ *** DLZ methods >+ ***/ >+ >+isc_result_t >+dlz_ldap_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client) >+{ >+ isc_result_t result; >+ >+ UNUSED(driverarg); >+ >+ // check to see if we are authoritative for the zone first >+ result = dlz_ldap_findzone(driverarg, dbdata, name); >+ if(result != ISC_R_SUCCESS){ >+ return result; >+ } >+ >+ // get all the zone data >+ return ldap_get_results(name, NULL, client, ALLOWXFR, dbdata, NULL); >+} >+ >+isc_result_t >+dlz_ldap_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes) >+{ >+ UNUSED(driverarg); >+ return ldap_get_results(zone, NULL, NULL, ALLNODES, dbdata, allnodes); >+} >+ >+isc_result_t >+dlz_ldap_authority(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup) >+{ >+ UNUSED(driverarg); >+ return ldap_get_results(zone, NULL, NULL, AUTHORITY, dbdata, lookup); >+} >+ >+isc_result_t >+dlz_ldap_findzone(void *driverarg, void *dbdata, const char *name) >+{ >+ UNUSED(driverarg); >+ return ldap_get_results(name, NULL, NULL, FINDZONE, dbdata, NULL); >+} >+ >+isc_result_t >+dlz_ldap_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup) >+{ >+ UNUSED(driverarg); >+ if(strcmp(name, "*") == 0) >+ return ldap_get_results(zone, "~", NULL, LOOKUP, dbdata, lookup); >+ else >+ return ldap_get_results(zone, name, NULL, LOOKUP, dbdata, lookup); >+} >+ >+ >+isc_result_t >+dlz_ldap_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata) >+{ >+ >+ isc_result_t result; >+ ldap_instance_t *ldap_inst = NULL; >+ dbinstance_t *dbi = NULL; >+ int protocol; >+ int method; >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ // if multi-threaded, we need a few extra variables. >+ int dbcount; >+ char *endp; >+ db_list_t *dblist = NULL; >+ int i; >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ UNUSED(dlzname); >+ UNUSED(driverarg); >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ // if debugging, let user know we are multithreaded. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "LDAP driver running multithreaded"); >+#else /* ISC_PLATFORM_USETHREADS */ >+ // if debugging, let user know we are single threaded. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "LDAP driver running single threaded"); >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ if(argc < 9){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver requires at least 8 command line args."); >+ return (ISC_R_FAILURE); >+ } >+ >+ /* no more than 13 arg's should be passed to the driver */ >+ if(argc > 12){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver cannot accept more than 11 command line args."); >+ return (ISC_R_FAILURE); >+ } >+ >+ // determine protocol version. >+ if(strncasecmp(argv[2], V2, strlen(V2)) == 0){ >+ protocol = 2; >+ } else if(strncasecmp(argv[2], V3, strlen(V3)) == 0){ >+ protocol = 3; >+ } else { >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver protocol must be either %s or %s", V2, V3); >+ return (ISC_R_FAILURE); >+ } >+ >+ // determine connection method. >+ if(strncasecmp(argv[3], SIMPLE, strlen(SIMPLE)) == 0){ >+ method = LDAP_AUTH_SIMPLE; >+ } else if(strncasecmp(argv[3], KRB41, strlen(KRB41)) == 0){ >+ method = LDAP_AUTH_KRBV41; >+ } else if(strncasecmp(argv[3], KRB42, strlen(KRB42)) == 0){ >+ method = LDAP_AUTH_KRBV42; >+ } else { >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver authentication method must be one of %s, %s or %s", >+ SIMPLE, KRB41, KRB42); >+ return (ISC_R_FAILURE); >+ } >+ >+ // multithreaded build can have multiple DB connections >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ /* check how many db connections we should create */ >+ dbcount = strtol(argv[1], &endp, 10); >+ if (*endp != '\0' || dbcount < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver database connection count must be positive."); >+ return (ISC_R_FAILURE); >+ } >+#endif >+ >+ // check that LDAP URL parameters make sense >+ switch(argc){ >+ case 12: >+ result = dlz_ldap_checkURL(argv[11], 0, "allow zone transfer"); >+ if(result != ISC_R_SUCCESS) >+ return result; >+ case 11: >+ result = dlz_ldap_checkURL(argv[10], 3, "all nodes"); >+ if(result != ISC_R_SUCCESS) >+ return result; >+ case 10: >+ if(strlen(argv[9]) > 0){ >+ result = dlz_ldap_checkURL(argv[9], 3, "authority"); >+ if(result != ISC_R_SUCCESS) >+ return result; >+ } >+ case 9: >+ result = dlz_ldap_checkURL(argv[8], 3, "lookup"); >+ if(result != ISC_R_SUCCESS) >+ return result; >+ result = dlz_ldap_checkURL(argv[7], 0, "find zone"); >+ if(result != ISC_R_SUCCESS) >+ return result; >+ break; >+ default: >+ result = ISC_R_FAILURE; // not really needed, should shut up compiler. >+ } >+ >+ /* allocate memory for LDAP instance */ >+ ldap_inst = isc_mem_get(ns_g_mctx, sizeof(ldap_instance_t)); >+ if(ldap_inst == NULL) >+ return (ISC_R_NOMEMORY); >+ memset(ldap_inst, 0, sizeof(ldap_instance_t)); >+ >+ // store info needed to automatically re-connect. >+ ldap_inst->protocol = protocol; >+ ldap_inst->method = method; >+ ldap_inst->hosts = isc_mem_strdup(ns_g_mctx, argv[6]); >+ if(ldap_inst->hosts == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ ldap_inst->user = isc_mem_strdup(ns_g_mctx, argv[4]); >+ if(ldap_inst->user == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ ldap_inst->cred = isc_mem_strdup(ns_g_mctx, argv[5]); >+ if(ldap_inst->cred == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ /* allocate memory for database connection list */ >+ ldap_inst->db = isc_mem_get(ns_g_mctx, sizeof(db_list_t)); >+ if (ldap_inst->db == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ >+ /* initialize DB connection list */ >+ ISC_LIST_INIT(*(ldap_inst->db)); >+ >+ // create the appropriate number of database instances (DBI) >+ // append each new DBI to the end of the list >+ for(i=0; i < dbcount; i++){ >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ // how many queries were passed in from config file? >+ switch(argc){ >+ case 9: >+ result = build_sqldbinstance(ns_g_mctx, NULL, NULL, NULL, >+ argv[7], argv[8], NULL, &dbi); >+ break; >+ case 10: >+ result = build_sqldbinstance(ns_g_mctx, NULL, NULL, argv[9], >+ argv[7], argv[8], NULL, &dbi); >+ break; >+ case 11: >+ result = build_sqldbinstance(ns_g_mctx, argv[10], NULL, argv[9], >+ argv[7], argv[8], NULL, &dbi); >+ break; >+ case 12: >+ result = build_sqldbinstance(ns_g_mctx, argv[10], argv[11], argv[9], >+ argv[7], argv[8], NULL, &dbi); >+ break; >+ default: >+ result = ISC_R_FAILURE; // not really needed, should shut up compiler. >+ } >+ >+ if(result == ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "LDAP driver created database instance object."); >+ } else { // unsuccessful?, log err msg and cleanup. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver could not create database instance object."); >+ goto cleanup; >+ } >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ // when multithreaded, build a list of DBI's >+ ISC_LINK_INIT(dbi, link); >+ ISC_LIST_APPEND(*(ldap_inst->db), dbi, link); >+#else >+ // when single threaded, hold onto the one connection instance. >+ ldap_inst->db = dbi; >+ >+#endif >+ // attempt to connect >+ result = dlz_ldap_connect(ldap_inst, dbi); >+ >+ // if db connection cannot be created, log err msg and cleanup. >+ switch(result){ >+ // success, do nothing >+ case ISC_R_SUCCESS: >+ break; >+ // no memory means ldap_init could not allocate memory >+ case ISC_R_NOMEMORY: >+#ifdef ISC_PLATFORM_USETHREADS >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver could not allocate memory for connection number %u", >+ i+1); >+#else >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver could not allocate memory for connection"); >+#endif >+ goto cleanup; >+ break; >+ // no perm means ldap_set_option could not set protocol version >+ case ISC_R_NOPERM: >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver could not set protocol version."); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ break; >+ // failure means couldn't connect to ldap server >+ case ISC_R_FAILURE: >+#ifdef ISC_PLATFORM_USETHREADS >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver could not bind connection number %u to server."); >+#else >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "LDAP driver could not bind connection to server."); >+#endif >+ goto cleanup; >+ break; >+ // default should never happen. If it does, major errors. >+ default: >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "dlz_ldap_create() failed: %s", isc_result_totext(result)); >+ result = ISC_R_UNEXPECTED; >+ goto cleanup; >+ break; >+ } // end switch(result) >+ >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // set DBI = null for next loop through. >+ dbi = NULL; >+ } // end for loop >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ >+ // set dbdata to the ldap_instance we created. >+ *dbdata = ldap_inst; >+ >+ // hey, we got through all of that ok, return success. >+ return(ISC_R_SUCCESS); >+ >+cleanup: >+ >+ dlz_ldap_destroy(NULL, ldap_inst); >+ >+ return(ISC_R_FAILURE); >+} >+ >+void >+dlz_ldap_destroy(void *driverarg, void *dbdata) >+{ >+ >+ UNUSED(driverarg); >+ >+ if(dbdata != NULL){ >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // cleanup the list of DBI's >+ ldap_destroy_dblist((db_list_t *) ((ldap_instance_t *)dbdata)->db); >+ >+#else /* ISC_PLATFORM_USETHREADS */ >+ >+ // release connection >+ if(((ldap_instance_t *)dbdata)->db->dbconn != NULL) >+ ldap_unbind_s((LDAP *) ((ldap_instance_t *)dbdata)->db->dbconn); >+ >+ // destroy single DB instance >+ destroy_sqldbinstance(((ldap_instance_t *)dbdata)->db); >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ if(((ldap_instance_t *)dbdata)->hosts != NULL) >+ isc_mem_free(ns_g_mctx, ((ldap_instance_t *)dbdata)->hosts); >+ >+ if(((ldap_instance_t *)dbdata)->user != NULL) >+ isc_mem_free(ns_g_mctx, ((ldap_instance_t *)dbdata)->user); >+ >+ if(((ldap_instance_t *)dbdata)->cred != NULL) >+ isc_mem_free(ns_g_mctx, ((ldap_instance_t *)dbdata)->cred); >+ >+ isc_mem_put(ns_g_mctx, dbdata, sizeof(ldap_instance_t)); >+ } >+} >+ >+static dns_sdlzmethods_t dlz_ldap_methods = { >+ dlz_ldap_create, >+ dlz_ldap_destroy, >+ dlz_ldap_findzone, >+ dlz_ldap_lookup, >+ dlz_ldap_authority, >+ dlz_ldap_allnodes, >+ dlz_ldap_allowzonexfr}; >+ >+/* >+ * Wrapper around dns_sdlzregister(). >+ */ >+isc_result_t >+dlz_ldap_init(void) { >+ isc_result_t result; >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Registering DLZ ldap driver."); >+ >+ result = dns_sdlzregister("ldap", &dlz_ldap_methods, NULL, >+ DNS_SDLZFLAG_RELATIVEOWNER | DNS_SDLZFLAG_RELATIVERDATA, >+ ns_g_mctx, &dlz_ldap); >+ if(result != ISC_R_SUCCESS){ >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "dns_sdlzregister() failed: %s", >+ isc_result_totext(result)); >+ result = ISC_R_UNEXPECTED; >+ } >+ >+ >+ return result; >+} >+ >+/* >+ * Wrapper around dns_sdlzunregister(). >+ */ >+void >+dlz_ldap_clear(void) { >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unregistering DLZ ldap driver."); >+ >+ if (dlz_ldap != NULL) >+ dns_sdlzunregister(&dlz_ldap); >+} >+ >+#endif >diff -Naur bind-9.2.2-orig/bin/named/dlz_mysql_driver.c bind-9.2.2/bin/named/dlz_mysql_driver.c >--- bind-9.2.2-orig/bin/named/dlz_mysql_driver.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/dlz_mysql_driver.c Fri Oct 17 18:30:18 2003 >@@ -0,0 +1,993 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifdef DLZ_MYSQL >+ >+#include <config.h> >+#include <stdio.h> >+#include <string.h> >+#include <stdlib.h> >+ >+#include <dns/log.h> >+#include <dns/sdlz.h> >+#include <dns/result.h> >+ >+#include <isc/mem.h> >+#include <isc/platform.h> >+#include <isc/print.h> >+#include <isc/result.h> >+#include <isc/string.h> >+#include <isc/util.h> >+ >+#include <named/globals.h> >+#include <named/dlz_mysql_driver.h> >+#include <named/sdlz_helper.h> >+ >+#include <mysql.h> >+ >+dns_sdlzimplementation_t *dlz_mysql = NULL; >+ >+#define dbc_search_limit 30 >+#define ALLNODES 1 >+#define ALLOWXFR 2 >+#define AUTHORITY 3 >+#define FINDZONE 4 >+#define COUNTZONE 5 >+#define LOOKUP 6 >+ >+#define safeGet(in) in == NULL ? "" : in >+ >+/*** >+ *** method prototypes >+ *** Declared here to shut up compiler warnings >+ *** about "no previous prototype" >+ ***/ >+ >+char * >+mysqldrv_escape_string(MYSQL *mysql, const char *instr); >+ >+isc_result_t >+mysql_get_resultset(const char *zone, const char *record, >+ const char *client, unsigned int query, >+ void *dbdata, MYSQL_RES **rs); >+ >+isc_result_t >+mysql_process_rs(dns_sdlzlookup_t *lookup, MYSQL_RES *rs); >+ >+isc_result_t >+mysql_findzone(void *driverarg, void *dbdata, const char *name); >+ >+isc_result_t >+mysql_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client); >+ >+isc_result_t >+mysql_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes); >+ >+isc_result_t >+mysql_authority(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+mysql_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+mysql_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata); >+ >+void >+mysql_destroy(void *driverarg, void *dbdata); >+ >+/*** >+ *** Private methods >+ ***/ >+ >+ /* Allocates memory for a new string, and then constructs the new >+ * string by "escaping" the input string. The new string is >+ * safe to be used in queries. This is necessary because we cannot >+ * be sure of what types of strings are passed to us, and we don't >+ * want special characters in the string causing problems. >+ */ >+ >+char * >+mysqldrv_escape_string(MYSQL *mysql, const char *instr){ >+ >+ char *outstr; >+ unsigned int len; >+ >+ if(instr == NULL) >+ return NULL; >+ >+ len = strlen(instr); >+ >+ outstr = isc_mem_allocate(ns_g_mctx ,(2 * len * sizeof(char)) + 1); >+ if(outstr == NULL) >+ return NULL; >+ >+ mysql_real_escape_string(mysql, outstr, instr, len); >+ >+ return outstr; >+} >+ >+ /* This function is the real core of the driver. Zone, record >+ * and client strings are passed in (or NULL is passed if the >+ * string is not available). The type of query we want to run >+ * is indicated by the query flag, and the dbdata object is passed >+ * passed in to. dbdata really holds a single database instance. >+ * The function will construct and run the query, hopefully getting >+ * a result set. >+ */ >+ >+isc_result_t >+mysql_get_resultset(const char *zone, const char *record, >+ const char *client, unsigned int query, >+ void *dbdata, MYSQL_RES **rs) >+{ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ char *querystring = NULL; >+ unsigned int i = 0; >+ unsigned int j = 0; >+ int qres = 0; >+ >+ if(query != COUNTZONE) >+ REQUIRE(*rs == NULL); >+ else >+ REQUIRE(rs == NULL); >+ >+ // get db instance / connection >+ dbi = (dbinstance_t *) dbdata; >+ >+ // if DBI is null, can't do anything else >+ if(dbi == NULL){ >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ // what type of query are we going to run? >+ switch(query){ >+ case ALLNODES: >+ // if the query was not passed in from the config file >+ // then we can't run it. return not_implemented, >+ // so it's like the code for that operation >+ // was never built into the driver.... AHHH flexibility!!! >+ if(dbi->allnodes_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } >+ break; >+ case ALLOWXFR: >+ // same as comments as ALLNODES >+ if(dbi->allowxfr_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } >+ break; >+ case AUTHORITY: >+ // same as comments as ALLNODES >+ if(dbi->authority_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } >+ break; >+ case FINDZONE: >+ // this is required. It's the whole point of DLZ! >+ if(dbi->findzone_q == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "No query specified for findzone. Findzone requires a query"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ break; >+ case COUNTZONE: >+ // same as comments as ALLNODES >+ if(dbi->countzone_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } >+ break; >+ case LOOKUP: >+ // this is required. It's also a major point of DLZ! >+ if(dbi->lookup_q == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "No query specified for lookup. Lookup requires a query"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ break; >+ default: >+ // this should never happen. If it does, the code is screwed up! >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "Incorrect query flag passed to mysql_get_resultset"); >+ result = ISC_R_UNEXPECTED; >+ goto cleanup; >+ } >+ >+ >+ // was a zone string passed? If so, make it safe for use in queries. >+ if(zone != NULL){ >+ dbi->zone = mysqldrv_escape_string((MYSQL *) dbi->dbconn, zone); >+ if(dbi->zone == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { // no string passed, set the string pointer to NULL >+ dbi->zone = NULL; >+ } >+ >+ // was a record string passed? If so, make it safe for use in queries. >+ if(record != NULL){ >+ dbi->record = mysqldrv_escape_string((MYSQL *) dbi->dbconn, record); >+ if(dbi->record == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { // no string passed, set the string pointer to NULL >+ dbi->record = NULL; >+ } >+ >+ // was a client string passed? If so, make it safe for use in queries. >+ if(client != NULL){ >+ dbi->client = mysqldrv_escape_string((MYSQL *) dbi->dbconn, client); >+ if(dbi->client == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { // no string passed, set the string pointer to NULL >+ dbi->client = NULL; >+ } >+ >+ // what type of query are we going to run? >+ // this time we build the actual query to run. >+ switch(query){ >+ case ALLNODES: >+ querystring = build_querystring(ns_g_mctx, dbi->allnodes_q); >+ break; >+ case ALLOWXFR: >+ querystring = build_querystring(ns_g_mctx, dbi->allowxfr_q); >+ break; >+ case AUTHORITY: >+ querystring = build_querystring(ns_g_mctx, dbi->authority_q); >+ break; >+ case FINDZONE: >+ querystring = build_querystring(ns_g_mctx, dbi->findzone_q); >+ break; >+ case COUNTZONE: >+ querystring = build_querystring(ns_g_mctx, dbi->countzone_q); >+ break; >+ case LOOKUP: >+ querystring = build_querystring(ns_g_mctx, dbi->lookup_q); >+ break; >+ default: >+ // this should never happen. If it does, the code is screwed up! >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "Incorrect query flag passed to mysql_get_resultset"); >+ result = ISC_R_UNEXPECTED; >+ goto cleanup; >+ } >+ >+ // if the querystring is null, Bummer, outta RAM. UPGRADE TIME!!! >+ if(querystring == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ >+ // output the full query string during debug so we can see >+ // what lame error the query has. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "\nQuery String: %s\n", querystring); >+ >+ // attempt query up to 3 times. >+ for(i=0; i < 3; i++){ >+ qres = mysql_query((MYSQL *) dbi->dbconn, querystring); >+ if(qres == 0) >+ break; >+ for(j=0; mysql_ping((MYSQL *) dbi->dbconn) != 0 && j < 4; j++); >+ } >+ >+ if(qres == 0){ >+ result = ISC_R_SUCCESS; >+ if(query != COUNTZONE){ >+ *rs = mysql_store_result((MYSQL *) dbi->dbconn); >+ if(*rs == NULL) >+ result = ISC_R_FAILURE; >+ } >+ } else { >+ result = ISC_R_FAILURE; >+ } >+ >+ >+cleanup: // it's always good to cleanup after yourself >+ >+ // if we couldn't even get DBI, just return NULL >+ if(dbi == NULL) >+ return ISC_R_FAILURE; >+ >+ // free dbi->zone string >+ if(dbi->zone != NULL) >+ isc_mem_free(ns_g_mctx, dbi->zone); >+ >+ // free dbi->record string >+ if(dbi->record != NULL) >+ isc_mem_free(ns_g_mctx, dbi->record); >+ >+ // free dbi->client string >+ if(dbi->client != NULL) >+ isc_mem_free(ns_g_mctx, dbi->client); >+ >+ // release query string >+ if(querystring != NULL) >+ isc_mem_free(ns_g_mctx, querystring); >+ >+ // return result >+ return result; >+} >+ >+ /* The processing of result sets for lookup and authority are >+ * exactly the same. So that functionality has been moved >+ * into this function to minimize code. >+ */ >+ >+isc_result_t >+mysql_process_rs(dns_sdlzlookup_t *lookup, MYSQL_RES *rs) >+{ >+ isc_result_t result = ISC_R_NOTFOUND; >+ MYSQL_ROW row; >+ unsigned int fields; >+ unsigned int j; >+ unsigned int len; >+ char *tmpString; >+ char *endp; >+ int ttl; >+ >+ row = mysql_fetch_row(rs); // get a row from the result set >+ fields = mysql_num_fields(rs); // how many columns in result set >+ while(row != NULL){ >+ switch(fields){ >+ case 1: // one column in rs, it's the data field >+ // use default type of A record, and default TTL of 86400 >+ result = dns_sdlz_putrr(lookup, "a", 86400, safeGet(row[0])); >+ break; >+ case 2: // two columns, data field, and data type. >+ // use default TTL of 86400 >+ result = dns_sdlz_putrr(lookup, safeGet(row[0]), 86400, safeGet(row[1])); >+ break; >+ case 3: // three columns, all data no defaults >+ // convert text to int, make sure it worked right >+ ttl = strtol(safeGet(row[0]), &endp, 10); >+ if (*endp != '\0' || ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver ttl must be a postive number"); >+ } >+ result = dns_sdlz_putrr(lookup, safeGet(row[1]), ttl, safeGet(row[2])); >+ break; >+ default: // more than 3 fields, concatonate the last ones together. >+ // figure out how long to make string >+ for(j=2, len=0; j < fields; j++){ >+ len += strlen(safeGet(row[j])) + 1; >+ } >+ // allocate string memory, allow for NULL to term string >+ tmpString = isc_mem_allocate(ns_g_mctx, len + 1); >+ if(tmpString == NULL){ // major bummer, need more ram >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver unable to allocate memory for temporary string"); >+ mysql_free_result(rs); // can't use it now, get rid of it. >+ return (ISC_R_FAILURE); // Yeah, I'd say! >+ } >+ // copy field to tmpString >+ strcpy(tmpString, safeGet(row[2])); >+ >+ >+ // concat the rest of fields together, space between each one. >+ for(j=3; j < fields; j++){ >+ strcat(tmpString, " "); >+ strcat(tmpString, safeGet(row[j])); >+ } >+ // convert text to int, make sure it worked right >+ ttl = strtol(safeGet(row[0]), &endp, 10); >+ if (*endp != '\0' || ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver ttl must be a postive number"); >+ } >+ // ok, now tell Bind about it. >+ result = dns_sdlz_putrr(lookup, safeGet(row[1]), ttl, tmpString); >+ // done, get rid of this thing. >+ isc_mem_free(ns_g_mctx, tmpString); >+ } >+ // I sure hope we were successful >+ if(result != ISC_R_SUCCESS){ >+ mysql_free_result(rs); // nope, get rid of the Result set, and log a msg >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "dns_sdlz_putrr returned error. Error code was: %s", >+ isc_result_totext(result)); >+ return (ISC_R_FAILURE); >+ } >+ row = mysql_fetch_row(rs); // get next row >+ } >+ >+ // free result set memory >+ mysql_free_result(rs); >+ >+ // return result code >+ return result; >+} >+ >+/*** >+ *** SDLZ interface methods >+ ***/ >+ >+ /* determine if the zone is supported by (in) the database */ >+ >+isc_result_t >+mysql_findzone(void *driverarg, void *dbdata, const char *name) >+{ >+ isc_result_t result; >+ MYSQL_RES *rs = NULL; >+ my_ulonglong rows; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = mysql_get_resultset(name, NULL, NULL, FINDZONE, dbdata, &rs); >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS || rs == NULL){ >+ if(rs != NULL) >+ mysql_free_result(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver unable to return result set for findzone query"); >+ return (ISC_R_FAILURE); >+ } >+ // count how many rows in result set >+ rows = mysql_num_rows(rs); >+ // get rid of result set, we are done with it. >+ mysql_free_result(rs); >+ >+ // if we returned any rows, zone is supported. >+ if(rows > 0){ >+ mysql_get_resultset(name, NULL, NULL, COUNTZONE, dbdata, NULL); >+ return (ISC_R_SUCCESS); >+ } >+ >+ // no rows returned, zone is not supported. >+ return (ISC_R_NOTFOUND); >+} >+ >+ /* Determine if the client is allowed to perform a zone transfer */ >+isc_result_t >+mysql_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client) >+{ >+ isc_result_t result; >+ MYSQL_RES *rs = NULL; >+ my_ulonglong rows; >+ >+ UNUSED(driverarg); >+ >+ // first check if the zone is supported by the database. >+ result = mysql_findzone(driverarg, dbdata, name); >+ if(result != ISC_R_SUCCESS) >+ return (ISC_R_NOTFOUND); >+ >+ // if we get to this point we know the zone is supported by the database >+ // the only questions now are is the zone transfer is allowed for this client >+ // and did the config file have an allow zone xfr query >+ >+ // Run our query, and get a result set from the database. >+ result = mysql_get_resultset(name, NULL, client, ALLOWXFR, dbdata, &rs); >+ // if we get "not implemented", send it along. >+ if(result == ISC_R_NOTIMPLEMENTED) >+ return result; >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS || rs == NULL){ >+ if(rs != NULL) >+ mysql_free_result(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver unable to return result set for allow xfr query"); >+ return (ISC_R_FAILURE); >+ } >+ // count how many rows in result set >+ rows = mysql_num_rows(rs); >+ // get rid of result set, we are done with it. >+ mysql_free_result(rs); >+ >+ // if we returned any rows, zone xfr is allowed. >+ if(rows > 0) >+ return (ISC_R_SUCCESS); >+ >+ // no rows returned, zone xfr not allowed >+ return (ISC_R_NOPERM); >+} >+ >+ /* If the client is allowed to perform a zone transfer, the next order of >+ * business is to get all the nodes in the zone, so bind can respond to the >+ * query. >+ */ >+isc_result_t >+mysql_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes) >+{ >+ isc_result_t result; >+ MYSQL_RES *rs = NULL; >+ MYSQL_ROW row; >+ unsigned int fields; >+ unsigned int j; >+ unsigned int len; >+ char *tmpString; >+ char *endp; >+ int ttl; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = mysql_get_resultset(zone, NULL, NULL, ALLNODES, dbdata, &rs); >+ // if we get "not implemented", send it along >+ if(result == ISC_R_NOTIMPLEMENTED) >+ return result; >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ if(rs != NULL) >+ mysql_free_result(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver unable to return result set for all nodes query"); >+ return (ISC_R_FAILURE); >+ } >+ >+ result = ISC_R_NOTFOUND; >+ >+ row = mysql_fetch_row(rs); // get a row from the result set >+ fields = mysql_num_fields(rs); // how many columns in result set >+ while(row != NULL){ >+ if(fields < 4){ // gotta have at least 4 columns >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver too few fields returned by all nodes query"); >+ } >+ // convert text to int, make sure it worked right >+ ttl = strtol(safeGet(row[0]), &endp, 10); >+ if (*endp != '\0' || ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver ttl must be a postive number"); >+ } >+ if(fields == 4){ >+ // tell Bind about it. >+ result = dns_sdlz_putnamedrr(allnodes, safeGet(row[0]), >+ safeGet(row[1]), ttl, safeGet(row[3])); >+ } else { // more than 4 fields, concatonat the last ones together. >+ // figure out how long to make string >+ for(j=3, len=0; j < fields; j++){ >+ len += strlen(safeGet(row[j])) + 1; >+ } >+ // allocate memory, allow for NULL to term string >+ tmpString = isc_mem_allocate(ns_g_mctx, len + 1); >+ if(tmpString == NULL){ // we need more ram. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver unable to allocate memory for temporary string"); >+ mysql_free_result(rs); >+ return (ISC_R_FAILURE); >+ } >+ // copy this field to tmpString >+ strcpy(tmpString, safeGet(row[3])); >+ // concatonate the rest, with spaces between >+ for(j=4; j < fields; j++){ >+ strcat(tmpString, " "); >+ strcat(tmpString, safeGet(row[j])); >+ } >+ // tell Bind about it. >+ result = dns_sdlz_putnamedrr(allnodes, safeGet(row[2]), safeGet(row[1]), ttl, tmpString); >+ isc_mem_free(ns_g_mctx, tmpString); >+ } >+ // if we weren't successful, log err msg >+ if(result != ISC_R_SUCCESS){ >+ mysql_free_result(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "dns_sdlz_putnamedrr returned error. Error code was: %s", >+ isc_result_totext(result)); >+ result = ISC_R_FAILURE; >+ break; >+ } >+ row = mysql_fetch_row(rs); // get next row from the result set >+ } >+ >+ // free result set memory >+ mysql_free_result(rs); >+ >+ return result; >+} >+ >+ /* if the lookup function does not return SOA or NS records for the zone, >+ * use this function to get that information for Bind. >+ */ >+ >+isc_result_t >+mysql_authority(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup) >+{ >+ isc_result_t result; >+ MYSQL_RES *rs = NULL; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = mysql_get_resultset(zone, NULL, NULL, AUTHORITY, dbdata, &rs); >+ // if we get "not implemented", send it along >+ if(result == ISC_R_NOTIMPLEMENTED) >+ return result; >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ if(rs != NULL) >+ mysql_free_result(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver unable to return result set for authority query"); >+ return (ISC_R_FAILURE); >+ } >+ // lookup and authority result sets are processed in the same manner >+ // mysql_process_rs does the job for both functions. >+ return mysql_process_rs(lookup, rs); >+} >+ >+ /* if zone is supported, lookup up a (or multiple) record(s) in it */ >+isc_result_t >+mysql_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup) >+{ >+ isc_result_t result; >+ MYSQL_RES *rs = NULL; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = mysql_get_resultset(zone, name, NULL, LOOKUP, dbdata, &rs); >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ if(rs != NULL) >+ mysql_free_result(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver unable to return result set for lookup query"); >+ return (ISC_R_FAILURE); >+ } >+ // lookup and authority result sets are processed in the same manner >+ // mysql_process_rs does the job for both functions. >+ return mysql_process_rs(lookup, rs); >+} >+ >+ /* create an instance of the driver. Remember, only 1 copy of the driver's >+ * code is ever loaded, the driver has to remember which context it's >+ * operating in. This is done via use of the dbdata arguement which is >+ * passed into all query functions. >+ */ >+isc_result_t >+mysql_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata) >+{ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ char *tmp = NULL; >+ char *dbname = NULL; >+ char *host = NULL; >+ char *user = NULL; >+ char *pass = NULL; >+ char *socket = NULL; >+ int port; >+ MYSQL *dbc; >+ char *endp; >+ int j; >+ unsigned int flags = 0; >+ >+ UNUSED(driverarg); >+ UNUSED(dlzname); >+ >+ /* verify we have at least 4 arg's passed to the driver */ >+ if(argc < 4){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver requires at least 4 command line args."); >+ return (ISC_R_FAILURE); >+ } >+ >+ /* no more than 8 arg's should be passed to the driver */ >+ if(argc > 8){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver cannot accept more than 7 command line args."); >+ return (ISC_R_FAILURE); >+ } >+ >+ /* parse connection string and get paramters. */ >+ >+ // get db name - required >+ dbname = getParameterValue(argv[1], "dbname="); >+ if(dbname == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver requires a dbname parameter."); >+ result = ISC_R_FAILURE; >+ goto full_cleanup; >+ } >+ >+ // get db port. Not required, but must be > 0 if specified >+ tmp = getParameterValue(argv[1], "port="); >+ if(tmp == NULL){ >+ port = 0; >+ } else { >+ port = strtol(tmp, &endp, 10); >+ if (*endp != '\0' || port < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Mysql driver port must be a positive number."); >+ isc_mem_free(ns_g_mctx, tmp); >+ result = ISC_R_FAILURE; >+ goto full_cleanup; >+ } >+ isc_mem_free(ns_g_mctx, tmp); >+ } >+ >+ // how many queries were passed in from config file? >+ switch(argc){ >+ case 4: >+ result = build_sqldbinstance(ns_g_mctx, NULL, NULL, NULL, >+ argv[2], argv[3], NULL, &dbi); >+ break; >+ case 5: >+ result = build_sqldbinstance(ns_g_mctx, NULL, NULL, argv[4], >+ argv[2], argv[3], NULL, &dbi); >+ break; >+ case 6: >+ result = build_sqldbinstance(ns_g_mctx, argv[5], NULL, argv[4], >+ argv[2], argv[3], NULL, &dbi); >+ break; >+ case 7: >+ result = build_sqldbinstance(ns_g_mctx, argv[5], argv[6], argv[4], >+ argv[2], argv[3], NULL, &dbi); >+ break; >+ case 8: >+ result = build_sqldbinstance(ns_g_mctx, argv[5], argv[6], argv[4], >+ argv[2], argv[3], argv[7], &dbi); >+ break; >+ default: >+ result = ISC_R_FAILURE; // not really needed, should shut up compiler. >+ } >+ >+ // unsuccessful?, log err msg and cleanup. >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver could not create database instance object."); >+ result = ISC_R_FAILURE; >+ goto full_cleanup; >+ } >+ >+ // create and set db connection >+ dbi->dbconn = mysql_init(NULL); >+ >+ // if db connection cannot be created, log err msg and cleanup. >+ if(dbi->dbconn == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver could not allocate memory for database connection"); >+ result = ISC_R_FAILURE; >+ goto full_cleanup; >+ } >+ >+ tmp = getParameterValue(argv[1], "compress="); >+ if(tmp != NULL){ >+ if(strcasecmp(tmp, "true") == 0) >+ flags = CLIENT_COMPRESS; >+ isc_mem_free(ns_g_mctx, tmp); >+ } >+ >+ tmp = getParameterValue(argv[1], "ssl="); >+ if(tmp != NULL){ >+ if(strcasecmp(tmp, "true") == 0) >+ flags = flags | CLIENT_SSL; >+ isc_mem_free(ns_g_mctx, tmp); >+ } >+ >+ tmp = getParameterValue(argv[1], "space="); >+ if(tmp != NULL){ >+ if(strcasecmp(tmp, "ignore") == 0) >+ flags = flags | CLIENT_IGNORE_SPACE; >+ isc_mem_free(ns_g_mctx, tmp); >+ } >+ >+ dbc = NULL; >+ host = getParameterValue(argv[1], "host="); >+ user = getParameterValue(argv[1], "user="); >+ pass = getParameterValue(argv[1], "pass="); >+ socket = getParameterValue(argv[1], "socket="); >+ >+ for(j=0; dbc == NULL && j < 4; j++) >+ dbc = mysql_real_connect((MYSQL *) dbi->dbconn, host, user, pass, >+ dbname, port, socket, flags); >+ >+ // let user know if we couldn't connect. >+ if(dbc == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "mysql driver failed to create database connection after 4 attempts"); >+ result = ISC_R_FAILURE; >+ goto full_cleanup; >+ } >+ >+ // return db connection via dbdata >+ *dbdata = dbi; >+ >+ result = ISC_R_SUCCESS; >+ goto cleanup; >+ >+full_cleanup: >+ >+ destroy_sqldbinstance(dbi); >+ >+cleanup: >+ >+ if(dbname != NULL) >+ isc_mem_free(ns_g_mctx, dbname); >+ if(host != NULL) >+ isc_mem_free(ns_g_mctx, host); >+ if(user != NULL) >+ isc_mem_free(ns_g_mctx, user); >+ if(pass != NULL) >+ isc_mem_free(ns_g_mctx, pass); >+ if(socket != NULL) >+ isc_mem_free(ns_g_mctx, socket); >+ >+ >+ return result; >+} >+ >+ /* destroy the driver. Remember, only 1 copy of the driver's >+ * code is ever loaded, the driver has to remember which context it's >+ * operating in. This is done via use of the dbdata arguement. >+ * so we really only need to clean it up since we are not using driverarg. >+ */ >+ >+void >+mysql_destroy(void *driverarg, void *dbdata) >+{ >+ dbinstance_t *dbi; >+ >+ UNUSED(driverarg); >+ >+ dbi = (dbinstance_t *) dbdata; >+ >+ // release DB connection >+ if(dbi->dbconn != NULL) >+ mysql_close((MYSQL *) dbi->dbconn); >+ >+ // destroy DB instance >+ destroy_sqldbinstance(dbi); >+} >+ >+ // pointers to all our runtime methods. >+ // this is used during driver registration >+ // i.e. in dlz_mysql_init below. >+static dns_sdlzmethods_t dlz_mysql_methods = { >+ mysql_create, >+ mysql_destroy, >+ mysql_findzone, >+ mysql_lookup, >+ mysql_authority, >+ mysql_allnodes, >+ mysql_allowzonexfr}; >+ >+/* >+ * Wrapper around dns_sdlzregister(). >+ */ >+isc_result_t >+dlz_mysql_init(void) { >+ isc_result_t result; >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Registering DLZ mysql driver."); >+ >+ /* Driver is always threadsafe. Because of the way MySQL handles >+ * threads the MySQL driver can only be used when bind is run single >+ * threaded. Using MySQL with Bind running multi-threaded is not >+ * allowed. When using the MySQL driver "-n1" should always be >+ * passed to Bind to guarantee single threaded operation. >+ */ >+ result = dns_sdlzregister("mysql", &dlz_mysql_methods, NULL, >+ DNS_SDLZFLAG_RELATIVEOWNER | DNS_SDLZFLAG_RELATIVERDATA >+ | DNS_SDLZFLAG_THREADSAFE, ns_g_mctx, &dlz_mysql); >+ // if we can't register the driver, there are big problems. >+ if(result != ISC_R_SUCCESS){ >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "dns_sdlzregister() failed: %s", >+ isc_result_totext(result)); >+ result = ISC_R_UNEXPECTED; >+ } >+ >+ >+ return result; >+} >+ >+/* >+ * Wrapper around dns_sdlzunregister(). >+ */ >+void >+dlz_mysql_clear(void) { >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unregistering DLZ mysql driver."); >+ >+ // unregister the driver. >+ if (dlz_mysql != NULL) >+ dns_sdlzunregister(&dlz_mysql); >+} >+ >+#endif >+ >diff -Naur bind-9.2.2-orig/bin/named/dlz_odbc_driver.c bind-9.2.2/bin/named/dlz_odbc_driver.c >--- bind-9.2.2-orig/bin/named/dlz_odbc_driver.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/dlz_odbc_driver.c Fri Oct 17 18:27:47 2003 >@@ -0,0 +1,1509 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifdef DLZ_ODBC >+ >+#include <config.h> >+#include <stdio.h> >+#include <string.h> >+#include <stdlib.h> >+ >+#include <dns/log.h> >+#include <dns/sdlz.h> >+#include <dns/result.h> >+ >+#include <isc/mem.h> >+#include <isc/platform.h> >+#include <isc/print.h> >+#include <isc/result.h> >+#include <isc/string.h> >+#include <isc/util.h> >+ >+#include <named/globals.h> >+#include <named/dlz_odbc_driver.h> >+#include <named/sdlz_helper.h> >+ >+#include <sql.h> >+#include <sqlext.h> >+#include <sqltypes.h> >+ >+dns_sdlzimplementation_t *dlz_odbc = NULL; >+ >+#define dbc_search_limit 30 >+#define ALLNODES 1 >+#define ALLOWXFR 2 >+#define AUTHORITY 3 >+#define FINDZONE 4 >+#define LOOKUP 5 >+ >+#define sqlOK(a) ((a == SQL_SUCCESS || a == SQL_SUCCESS_WITH_INFO) ? -1 : 0) >+ >+/*** >+ *** Private Structures >+ ***/ >+ >+/*** >+ *** structure to hold ODBC connection & statement >+ ***/ >+ >+typedef struct{ >+ SQLHDBC dbc; >+ SQLHSTMT stmnt; >+} odbc_db_t; >+ >+/*** >+ *** Structure to hold everthing needed by this "instance" of the odbc driver >+ *** remember, the driver code is only loaded once, but may have many separate >+ *** instances >+ ***/ >+ >+typedef struct { >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ db_list_t *db; // handle to a list of DB >+ >+#else >+ >+ dbinstance_t *db; // handle to db >+ >+#endif >+ >+ SQLHENV sql_env; // handle to SQL environment >+ SQLCHAR *dsn; >+ SQLCHAR *user; >+ SQLCHAR *pass; >+} odbc_instance_t; >+ >+/*** >+ *** method prototypes >+ *** Declared here to shut up compiler warnings >+ *** about "no previous prototype" >+ ***/ >+ >+void >+destroy_odbc_instance(odbc_instance_t *odbc_inst); >+ >+dbinstance_t * >+odbc_find_avail_conn(db_list_t *dblist); >+ >+char * >+odbc_escape_string(const char *instr); >+ >+size_t >+odbc_makesafe(char *to, const char *from, size_t length); >+ >+isc_result_t >+odbc_connect(odbc_instance_t *dbi, odbc_db_t **dbc); >+ >+isc_result_t >+odbc_get_resultset(const char *zone, const char *record, >+ const char *client, unsigned int query, >+ void *dbdata, dbinstance_t **r_dbi); >+ >+isc_result_t >+odbc_getField(SQLHSTMT *stmnt, SQLSMALLINT field, char **data); >+ >+isc_result_t >+odbc_getManyFields(SQLHSTMT *stmnt, SQLSMALLINT startField, >+ SQLSMALLINT endField, char **retData); >+ >+isc_result_t >+odbc_process_rs(dns_sdlzlookup_t *lookup, dbinstance_t *r_dbi); >+ >+isc_result_t >+odbc_findzone(void *driverarg, void *dbdata, const char *name); >+ >+isc_result_t >+odbc_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client); >+ >+isc_result_t >+odbc_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes); >+ >+isc_result_t >+odbc_authority(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+odbc_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+odbc_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata); >+ >+void >+odbc_destroy(void *driverarg, void *dbdata); >+ >+SQLSMALLINT >+safeLen(void *a); >+ >+/*** >+ *** Private methods >+ ***/ >+ >+SQLSMALLINT >+safeLen(void *a){ >+ if(a == NULL) >+ return 0; >+ return strlen((char *) a); >+} >+ >+ /* propertly cleans up an odbc_instance_t */ >+ >+void >+destroy_odbc_instance(odbc_instance_t *odbc_inst){ >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ dbinstance_t *ndbi = NULL; >+ dbinstance_t *dbi = NULL; >+ >+ // get the first DBI in the list >+ ndbi = ISC_LIST_HEAD(*odbc_inst->db); >+ >+ // loop through the list >+ while(ndbi != NULL){ >+ dbi = ndbi; >+ // get the next DBI in the list >+ ndbi = ISC_LIST_NEXT(dbi, link); >+ >+ // if we have a connection / statement object in memory >+ if(dbi->dbconn != NULL){ >+ // free statement handle >+ if(((odbc_db_t *) (dbi->dbconn))->stmnt != NULL){ >+ SQLFreeHandle(SQL_HANDLE_STMT,((odbc_db_t *)(dbi->dbconn))->stmnt); >+ ((odbc_db_t *) (dbi->dbconn))->stmnt = NULL; >+ } >+ >+ // disconnect from database & free connection handle >+ if(((odbc_db_t *) (dbi->dbconn))->dbc != NULL){ >+ SQLDisconnect(((odbc_db_t *) dbi->dbconn)->dbc); >+ SQLFreeHandle(SQL_HANDLE_DBC, ((odbc_db_t *) (dbi->dbconn))->dbc); >+ ((odbc_db_t *) (dbi->dbconn))->dbc = NULL; >+ } >+ >+ // free memory that held connection & statement. >+ isc_mem_free(ns_g_mctx, dbi->dbconn); >+ } >+ // release all memory that comprised a DBI >+ destroy_sqldbinstance(dbi); >+ } >+ // release memory for the list structure >+ isc_mem_put(ns_g_mctx, odbc_inst->db, sizeof(db_list_t)); >+ >+#else /* ISC_PLATFORM_USETHREADS */ >+ >+ // free statement handle >+ if(((odbc_db_t *) (odbc_inst->db->dbconn))->stmnt != NULL){ >+ SQLFreeHandle(SQL_HANDLE_STMT, ((odbc_db_t *) (odbc_inst->db->dbconn))->stmnt); >+ ((odbc_db_t *) (odbc_inst->db->dbconn))->stmnt = NULL; >+ } >+ >+ // disconnect from database, free connection handle >+ if(((odbc_db_t *) (odbc_inst->db->dbconn))->dbc != NULL){ >+ SQLDisconnect(((odbc_db_t *) (odbc_inst->db->dbconn))->dbc); >+ SQLFreeHandle(SQL_HANDLE_DBC, ((odbc_db_t *) (odbc_inst->db->dbconn))->dbc); >+ ((odbc_db_t *) (odbc_inst->db->dbconn))->dbc = NULL; >+ } >+ // free mem for the odbc_db_t structure held in db >+ if(((odbc_db_t *) odbc_inst->db->dbconn) != NULL){ >+ isc_mem_free(ns_g_mctx, odbc_inst->db->dbconn); >+ odbc_inst->db->dbconn = NULL; >+ } >+ >+ if(odbc_inst->db != NULL) >+ destroy_sqldbinstance(odbc_inst->db); >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ >+ // free sql environment >+ if(odbc_inst->sql_env != NULL) >+ SQLFreeHandle(SQL_HANDLE_ENV, odbc_inst->sql_env); >+ >+ // free ODBC instance strings >+ if(odbc_inst->dsn != NULL) >+ isc_mem_free(ns_g_mctx, odbc_inst->dsn); >+ if(odbc_inst->pass != NULL) >+ isc_mem_free(ns_g_mctx, odbc_inst->pass); >+ if(odbc_inst->user != NULL) >+ isc_mem_free(ns_g_mctx, odbc_inst->user); >+ >+ // free memory for odbc_inst >+ if(odbc_inst != NULL) >+ isc_mem_put(ns_g_mctx, odbc_inst, sizeof(odbc_instance_t)); >+ >+} >+ >+ /* Connects to database, and creates ODBC statements */ >+ >+isc_result_t >+odbc_connect(odbc_instance_t *dbi, odbc_db_t **dbc){ >+ >+ odbc_db_t *ndb = *dbc; >+ SQLRETURN sqlRes; >+ isc_result_t result = ISC_R_SUCCESS; >+ >+ if(ndb != NULL){ // if db != null, we have to do some cleanup >+ // if statement handle != null free it >+ if(ndb->stmnt != NULL){ >+ SQLFreeHandle(SQL_HANDLE_STMT, ndb->stmnt); >+ ndb->stmnt = NULL; >+ } >+ >+ // if connection handle != null free it >+ if(ndb->dbc != NULL){ >+ SQLFreeHandle(SQL_HANDLE_DBC, ndb->dbc); >+ ndb->dbc = NULL; >+ } >+ } else { >+ ndb = isc_mem_allocate(ns_g_mctx, sizeof(odbc_db_t)); >+ if(ndb == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver unable to allocate memory"); >+ return ISC_R_NOMEMORY; >+ } >+ memset(ndb, 0, sizeof(odbc_db_t)); >+ } >+ >+ sqlRes = SQLAllocHandle(SQL_HANDLE_DBC, dbi->sql_env, &(ndb->dbc)); >+ if(!sqlOK(sqlRes)){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver unable to allocate memory"); >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ >+ sqlRes = SQLConnect(ndb->dbc, dbi->dsn, safeLen(dbi->dsn), dbi->user, >+ safeLen(dbi->user), dbi->pass, safeLen(dbi->pass)); >+ if(!sqlOK(sqlRes)){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver unable to connect"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ sqlRes = SQLAllocHandle(SQL_HANDLE_STMT, ndb->dbc, &(ndb->stmnt)); >+ if(!sqlOK(sqlRes)){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver unable to allocate memory"); >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ >+ *dbc = ndb; >+ >+ return ISC_R_SUCCESS; >+ >+cleanup: >+ >+ if(ndb != NULL){ >+ >+ // if statement handle != null free it >+ if(ndb->stmnt != NULL){ >+ SQLFreeHandle(SQL_HANDLE_STMT, ndb->stmnt); >+ ndb->stmnt = NULL; >+ } >+ >+ // if connection handle != null free it >+ if(ndb->dbc != NULL){ >+ SQLDisconnect(ndb->dbc); >+ SQLFreeHandle(SQL_HANDLE_DBC, ndb->dbc); >+ ndb->dbc = NULL; >+ } >+ // free memory holding ndb >+ isc_mem_free(ns_g_mctx, ndb); >+ } >+ >+ return result; >+} >+ >+ /* Loops through the list of DB instances, attempting to lock >+ * on the mutex. If successful, the DBI is reserved for use >+ * and the thread can perform queries against the database. >+ * If the lock fails, the next one in the list is tried. >+ * looping continues until a lock is obtained, or until >+ * the list has been searched dbc_search_limit times. >+ * This function is only used when the driver is compiled for >+ * multithreaded operation. >+ */ >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+dbinstance_t * >+odbc_find_avail_conn(db_list_t *dblist) >+{ >+ dbinstance_t *dbi = NULL; >+ dbinstance_t *head; >+ int count = 0; >+ >+ // get top of list >+ head = dbi = ISC_LIST_HEAD(*dblist); >+ >+ // loop through list >+ while(count < dbc_search_limit){ >+ // try to lock on the mutex >+ if(isc_mutex_trylock(&dbi->instance_lock) == ISC_R_SUCCESS) >+ return dbi; // success, return the DBI for use. >+ >+ // not successful, keep trying >+ dbi = ISC_LIST_NEXT(dbi, link); >+ >+ // check to see if we have gone to the top of the list. >+ if(dbi == NULL){ >+ count++; >+ dbi = head; >+ } >+ } >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_INFO, >+ "Odbc driver unable to find available connection after searching %d times", >+ count); >+ return NULL; >+} >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ /* Allocates memory for a new string, and then constructs the new >+ * string by "escaping" the input string. The new string is >+ * safe to be used in queries. This is necessary because we cannot >+ * be sure of what types of strings are passed to us, and we don't >+ * want special characters in the string causing problems. >+ */ >+ >+char * >+odbc_escape_string(const char *instr){ >+ >+ char *outstr; >+ unsigned int len; >+ >+ if(instr == NULL) >+ return NULL; >+ >+ len = strlen(instr); >+ >+ outstr = isc_mem_allocate(ns_g_mctx ,(2 * len * sizeof(char)) + 1); >+ if(outstr == NULL) >+ return NULL; >+ >+ odbc_makesafe(outstr, instr, len); >+ >+ return outstr; >+} >+ >+/* --------------- >+ * Escaping arbitrary strings to get valid SQL strings/identifiers. >+ * >+ * Replaces "\\" with "\\\\" and "'" with "''". >+ * length is the length of the buffer pointed to by >+ * from. The buffer at to must be at least 2*length + 1 characters >+ * long. A terminating NUL character is written. >+ * >+ * NOTICE!!! >+ * This function was borrowed directly from PostgreSQL's libpq. >+ * >+ * The copyright statements from the original file containing this >+ * function are included below: >+ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group >+ * Portions Copyright (c) 1994, Regents of the University of California >+ * --------------- >+ */ >+ >+size_t >+odbc_makesafe(char *to, const char *from, size_t length) >+{ >+ const char *source = from; >+ char *target = to; >+ unsigned int remaining = length; >+ >+ while (remaining > 0) >+ { >+ switch (*source) >+ { >+ case '\\': >+ *target = '\\'; >+ target++; >+ *target = '\\'; >+ /* target and remaining are updated below. */ >+ break; >+ >+ case '\'': >+ *target = '\''; >+ target++; >+ *target = '\''; >+ /* target and remaining are updated below. */ >+ break; >+ >+ default: >+ *target = *source; >+ /* target and remaining are updated below. */ >+ } >+ source++; >+ target++; >+ remaining--; >+ } >+ >+ /* Write the terminating NUL character. */ >+ *target = '\0'; >+ >+ return target - to; >+} >+ >+ /* This function is the real core of the driver. Zone, record >+ * and client strings are passed in (or NULL is passed if the >+ * string is not available). The type of query we want to run >+ * is indicated by the query flag, and the dbdata object is passed >+ * passed in to. dbdata really holds either: >+ * 1) a list of database instances (in multithreaded mode) OR >+ * 2) a single database instance (in single threaded mode) >+ * The function will construct the query and obtain an available >+ * database instance (DBI). It will then run the query and hopefully >+ * obtain a result set. The data base instance that is used is returned >+ * to the caller so they can get the data from the result set from it. >+ * If successfull, it will be the responsibility of the caller to close >+ * the cursor, and unlock the mutex of the DBI when they are done with it. >+ * If not successfull, this function will perform all the cleanup. >+ */ >+ >+ >+isc_result_t >+odbc_get_resultset(const char *zone, const char *record, >+ const char *client, unsigned int query, >+ void *dbdata, dbinstance_t **r_dbi) >+{ >+ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ char *querystring = NULL; >+ unsigned int j = 0; >+ SQLRETURN sqlRes; >+ >+ REQUIRE(*r_dbi == NULL); >+ >+ // get db instance / connection >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // find an available DBI from the list >+ dbi = odbc_find_avail_conn(((odbc_instance_t *) dbdata)->db); >+ >+#else /* ISC_PLATFORM_USETHREADS */ >+ >+ // only 1 DBI - no need to lock instance lock either >+ // only 1 thread in the whole process, no possible contention. >+ dbi = (dbinstance_t *) ((odbc_instance_t *) dbdata)->db; >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ // if DBI is null, can't do anything else >+ if(dbi == NULL){ >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ // what type of query are we going to run? >+ switch(query){ >+ case ALLNODES: >+ // if the query was not passed in from the config file >+ // then we can't run it. return not_implemented, >+ // so it's like the code for that operation >+ // was never built into the driver.... AHHH flexibility!!! >+ if(dbi->allnodes_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } >+ break; >+ case ALLOWXFR: >+ // same as comments as ALLNODES >+ if(dbi->allowxfr_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } >+ break; >+ case AUTHORITY: >+ // same as comments as ALLNODES >+ if(dbi->authority_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } >+ break; >+ case FINDZONE: >+ // this is required. It's the whole point of DLZ! >+ if(dbi->findzone_q == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "No query specified for findzone. Findzone requires a query"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ break; >+ case LOOKUP: >+ // this is required. It's also a major point of DLZ! >+ if(dbi->lookup_q == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "No query specified for lookup. Lookup requires a query"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ break; >+ default: >+ // this should never happen. If it does, the code is screwed up! >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "Incorrect query flag passed to odbc_get_resultset"); >+ result = ISC_R_UNEXPECTED; >+ goto cleanup; >+ } >+ >+ >+ // was a zone string passed? If so, make it safe for use in queries. >+ if(zone != NULL){ >+ dbi->zone = odbc_escape_string(zone); >+ if(dbi->zone == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { // no string passed, set the string pointer to NULL >+ dbi->zone = NULL; >+ } >+ >+ // was a record string passed? If so, make it safe for use in queries. >+ if(record != NULL){ >+ dbi->record = odbc_escape_string(record); >+ if(dbi->record == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { // no string passed, set the string pointer to NULL >+ dbi->record = NULL; >+ } >+ >+ // was a client string passed? If so, make it safe for use in queries. >+ if(client != NULL){ >+ dbi->client = odbc_escape_string(client); >+ if(dbi->client == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { // no string passed, set the string pointer to NULL >+ dbi->client = NULL; >+ } >+ >+ // what type of query are we going to run? >+ // this time we build the actual query to run. >+ switch(query){ >+ case ALLNODES: >+ querystring = build_querystring(ns_g_mctx, dbi->allnodes_q); >+ break; >+ case ALLOWXFR: >+ querystring = build_querystring(ns_g_mctx, dbi->allowxfr_q); >+ break; >+ case AUTHORITY: >+ querystring = build_querystring(ns_g_mctx, dbi->authority_q); >+ break; >+ case FINDZONE: >+ querystring = build_querystring(ns_g_mctx, dbi->findzone_q); >+ break; >+ case LOOKUP: >+ querystring = build_querystring(ns_g_mctx, dbi->lookup_q); >+ break; >+ default: >+ // this should never happen. If it does, the code is screwed up! >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "Incorrect query flag passed to odbc_get_resultset"); >+ result = ISC_R_UNEXPECTED; >+ goto cleanup; >+ } >+ >+ // if the querystring is null, Bummer, outta RAM. UPGRADE TIME!!! >+ if(querystring == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ >+ // output the full query string during debug so we can see >+ // what lame error the query has. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "\nQuery String: %s\n", querystring); >+ >+ // attempt query up to 3 times. >+ for(j=0; j < 3; j++){ >+ // try to get result set >+ sqlRes = SQLExecDirect(((odbc_db_t *) dbi->dbconn)->stmnt, >+ (SQLCHAR *) querystring, (SQLINTEGER) strlen(querystring)); >+ >+ // if error, reset DB connection >+ if(!sqlOK(sqlRes)){ >+ // close cursor >+ SQLCloseCursor(((odbc_db_t *) dbi->dbconn)->stmnt); >+ // attempt to reconnect >+ result = odbc_connect((odbc_instance_t *) dbdata, (odbc_db_t **) &(dbi->dbconn)); >+ // check if we reconnected >+ if(result != ISC_R_SUCCESS) >+ break; >+ // incase this is the last time through the loop >+ result = ISC_R_FAILURE; >+ } else { >+ result = ISC_R_SUCCESS; >+ // return dbi >+ *r_dbi = dbi; >+ // result set ok, break loop >+ break; >+ } >+ } // end for loop >+ >+cleanup: // it's always good to cleanup after yourself >+ >+ // if we couldn't even allocate DBI, just return NULL >+ if(dbi == NULL) >+ return ISC_R_FAILURE; >+ >+ // free dbi->zone string >+ if(dbi->zone != NULL) >+ isc_mem_free(ns_g_mctx, dbi->zone); >+ >+ // free dbi->record string >+ if(dbi->record != NULL) >+ isc_mem_free(ns_g_mctx, dbi->record); >+ >+ // free dbi->client string >+ if(dbi->client != NULL) >+ isc_mem_free(ns_g_mctx, dbi->client); >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // if we are done using this dbi, release the lock >+ if(result != ISC_R_SUCCESS) >+ isc_mutex_unlock(&dbi->instance_lock); >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ // release query string >+ if(querystring != NULL) >+ isc_mem_free(ns_g_mctx, querystring ); >+ >+ // return result >+ return result; >+ >+} >+ >+ /* Gets a single field from the ODBC statement. The memory for the >+ * returned data is dynamically allocated. If this method is successful >+ * it is the reponsibility of the caller to free the memory using >+ * isc_mem_free(ns_g_mctx, *ptr); >+ */ >+ >+isc_result_t >+odbc_getField(SQLHSTMT *stmnt, SQLSMALLINT field, char **data){ >+ >+ SQLINTEGER size; >+ >+ REQUIRE(data != NULL && *data == NULL); >+ >+ if(sqlOK(SQLColAttribute(stmnt, field, SQL_DESC_DISPLAY_SIZE, >+ NULL, 0, NULL, &size)) && size > 0){ >+ *data = isc_mem_allocate(ns_g_mctx, size + 1); >+ if(data != NULL){ >+ if(sqlOK(SQLGetData(stmnt, field, SQL_C_CHAR, *data, size + 1,&size))) >+ return ISC_R_SUCCESS; >+ isc_mem_free(ns_g_mctx, *data); >+ } >+ } >+ return ISC_R_FAILURE; >+} >+ >+ /* Gets multiple fields from the ODBC statement. The memory for the >+ * returned data is dynamically allocated. If this method is successful >+ * it is the reponsibility of the caller to free the memory using >+ * isc_mem_free(ns_g_mctx, *ptr); >+ */ >+ >+isc_result_t >+odbc_getManyFields(SQLHSTMT *stmnt, SQLSMALLINT startField, >+ SQLSMALLINT endField, char **retData){ >+ >+ isc_result_t result; >+ SQLINTEGER size; >+ int totSize = 0; >+ SQLSMALLINT i; >+ int j = 0; >+ char *data; >+ >+ REQUIRE(retData != NULL && *retData == NULL); >+ REQUIRE(startField > 0 && startField <= endField); >+ >+ // determine how large the data is >+ for(i=startField; i <= endField; i++) >+ if(sqlOK(SQLColAttribute(stmnt, i, SQL_DESC_DISPLAY_SIZE, >+ NULL, 0, NULL, &size)) && size > 0){ >+ totSize += (size + 1); // always allow for a " " (space) character >+ // after the data item >+ } >+ >+ if(totSize < 1) >+ return ISC_R_FAILURE; >+ >+ // allow for a "\n" at the end of the string/ >+ data = isc_mem_allocate(ns_g_mctx, ++totSize); >+ if(data == NULL) >+ return ISC_R_NOMEMORY; >+ >+ result = ISC_R_FAILURE; >+ >+ // get the data and concat all fields into a large string >+ for(i=startField; i <= endField; i++){ >+ if(sqlOK(SQLGetData(stmnt, i, SQL_C_CHAR, &(data[j]), totSize - j, &size))){ >+ if(size > 0){ >+ j += size; >+ data[j++] = ' '; >+ data[j] = '\0'; >+ result = ISC_R_SUCCESS; >+ } >+ } else { >+ isc_mem_free(ns_g_mctx, data); >+ return ISC_R_FAILURE; >+ } >+ } >+ >+ if(result != ISC_R_SUCCESS){ >+ isc_mem_free(ns_g_mctx, data); >+ return result; >+ } >+ >+ *retData = data; >+ return ISC_R_SUCCESS; >+ >+} >+ >+ /* The processing of result sets for lookup and authority are >+ * exactly the same. So that functionality has been moved >+ * into this function to minimize code. >+ */ >+ >+isc_result_t >+odbc_process_rs(dns_sdlzlookup_t *lookup, dbinstance_t *dbi) >+{ >+ >+ >+ isc_result_t result; >+ SQLSMALLINT fields; >+ SQLHSTMT *stmnt; >+ char *ttl_s; >+ char *type; >+ char *data; >+ char *endp; >+ int ttl; >+ >+ REQUIRE(dbi != NULL); >+ >+ stmnt = ((odbc_db_t *) (dbi->dbconn))->stmnt; >+ >+ // get number of columns >+ if(!sqlOK(SQLNumResultCols(stmnt, &fields))){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver unable to process result set"); >+ result = ISC_R_FAILURE; >+ goto process_rs_cleanup; >+ } >+ >+ // get things ready for processing >+ result = ISC_R_FAILURE; >+ >+ while(sqlOK(SQLFetch(stmnt))){ >+ >+ // set to null for next pass through >+ data = type = ttl_s = NULL; >+ >+ switch(fields){ >+ case 1: // one column in rs, it's the data field >+ // use default type of A record, and default TTL of 86400 >+ >+ // attempt to get data, & tell bind about it >+ if((result = odbc_getField(stmnt, 1, &data)) == ISC_R_SUCCESS){ >+ result = dns_sdlz_putrr(lookup, "a", 86400, data); >+ } >+ break; >+ case 2: // two columns, data field, and data type. >+ // use default TTL of 86400 >+ // attempt to get DNS type & data, then tell bind about it >+ if((result = odbc_getField(stmnt, 1, &type)) == ISC_R_SUCCESS && >+ (result = odbc_getField(stmnt, 2, &data)) == ISC_R_SUCCESS){ >+ result = dns_sdlz_putrr(lookup, type, 86400, data); >+ } >+ break; >+ default: // 3 fields or more, concatonate the last ones together. >+ // attempt to get DNS ttl, type, data then tell Bind about them >+ if((result = odbc_getField(stmnt, 1, &ttl_s)) == ISC_R_SUCCESS && >+ (result = odbc_getField(stmnt, 2, &type)) == ISC_R_SUCCESS && >+ (result = odbc_getManyFields(stmnt, 3, fields, &data)) >+ == ISC_R_SUCCESS){ >+ // try to convert ttl string to int >+ ttl = strtol(ttl_s, &endp, 10); >+ // failure converting ttl. >+ if (*endp != '\0' || ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver ttl must be a postive number"); >+ result = ISC_R_FAILURE; >+ } else { >+ // successful converting TTL, tell Bind everything >+ result = dns_sdlz_putrr(lookup, type, ttl, data); >+ } >+ } // closes bid if() >+ } // closes switch(fields) >+ >+ // clean up mem >+ if(ttl_s != NULL) >+ isc_mem_free(ns_g_mctx, ttl_s); >+ if(type != NULL) >+ isc_mem_free(ns_g_mctx, type); >+ if(data != NULL) >+ isc_mem_free(ns_g_mctx, data); >+ >+ // I sure hope we were successful >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "dns_sdlz_putrr returned error. Error code was: %s", >+ isc_result_totext(result)); >+ result = ISC_R_FAILURE; >+ goto process_rs_cleanup; >+ } >+ } // closes while loop >+ >+process_rs_cleanup: >+ >+ // close cursor >+ SQLCloseCursor(((odbc_db_t *) (dbi->dbconn))->stmnt); >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // free lock on dbi so someone else can use it. >+ isc_mutex_unlock(&dbi->instance_lock); >+ >+#endif >+ >+ return result; >+} >+ >+/*** >+ *** SDLZ interface methods >+ ***/ >+ >+ /* determine if the zone is supported by (in) the database */ >+ >+isc_result_t >+odbc_findzone(void *driverarg, void *dbdata, const char *name) >+{ >+ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ // if result != ISC_R_SUCCESS cursor and mutex already cleaned up. >+ // so we don't have to do it here. >+ result = odbc_get_resultset(name, NULL, NULL, FINDZONE, dbdata, &dbi); >+ >+ // Check that we got a result set with data >+ if(result == ISC_R_SUCCESS && >+ !sqlOK(SQLFetch(((odbc_db_t *) (dbi->dbconn))->stmnt))){ >+ result = ISC_R_NOTFOUND; >+ } >+ >+ if(dbi != NULL){ >+ // get rid of result set, we are done with it. >+ SQLCloseCursor(((odbc_db_t *) (dbi->dbconn))->stmnt); >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // free lock on dbi so someone else can use it. >+ isc_mutex_unlock(&dbi->instance_lock); >+#endif >+ } >+ >+ return result; >+} >+ >+ /* Determine if the client is allowed to perform a zone transfer */ >+isc_result_t >+odbc_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client) >+{ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ >+ UNUSED(driverarg); >+ >+ // first check if the zone is supported by the database. >+ result = odbc_findzone(driverarg, dbdata, name); >+ if(result != ISC_R_SUCCESS) >+ return (ISC_R_NOTFOUND); >+ >+ // if we get to this point we know the zone is supported by the database >+ // the only questions now are is the zone transfer is allowed for this client >+ // and did the config file have an allow zone xfr query >+ >+ // Run our query, and get a result set from the database. >+ // if result != ISC_R_SUCCESS cursor and mutex already cleaned up. >+ // so we don't have to do it here. >+ result = odbc_get_resultset(name, NULL, client, ALLOWXFR, dbdata, &dbi); >+ >+ // if we get "not implemented", send it along. >+ if(result == ISC_R_NOTIMPLEMENTED) >+ return result; >+ >+ // Check that we got a result set with data >+ if(result == ISC_R_SUCCESS && >+ !sqlOK(SQLFetch(((odbc_db_t *) (dbi->dbconn))->stmnt))){ >+ result = ISC_R_NOPERM; >+ } >+ >+ if(dbi != NULL){ >+ // get rid of result set, we are done with it. >+ SQLCloseCursor(((odbc_db_t *) (dbi->dbconn))->stmnt); >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // free lock on dbi so someone else can use it. >+ isc_mutex_unlock(&dbi->instance_lock); >+#endif >+ >+ } >+ >+ return result; >+} >+ >+ /* If the client is allowed to perform a zone transfer, the next order of >+ * business is to get all the nodes in the zone, so bind can respond to the >+ * query. >+ */ >+ >+isc_result_t >+odbc_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes) >+{ >+ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ SQLHSTMT *stmnt; >+ SQLSMALLINT fields; >+ char *data; >+ char *type; >+ char *ttl_s; >+ int ttl; >+ char *host; >+ char *endp; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = odbc_get_resultset(zone, NULL, NULL, ALLNODES, dbdata, &dbi); >+ >+ // if we get "not implemented", send it along >+ if(result == ISC_R_NOTIMPLEMENTED) >+ return result; >+ >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver unable to return result set for all nodes query"); >+ return (ISC_R_FAILURE); >+ } >+ >+ stmnt = ((odbc_db_t *) (dbi->dbconn))->stmnt; >+ >+ // get number of columns >+ if(!sqlOK(SQLNumResultCols(stmnt, &fields))){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver unable to process result set"); >+ result = ISC_R_FAILURE; >+ goto allnodes_cleanup; >+ } >+ >+ if(fields < 4){ // gotta have at least 4 columns >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver too few fields returned by all nodes query"); >+ result = ISC_R_FAILURE; >+ goto allnodes_cleanup; >+ } >+ >+ // get things ready for processing >+ result = ISC_R_FAILURE; >+ >+ while(sqlOK(SQLFetch(stmnt))){ >+ >+ // set to null for next pass through >+ data = host = type = ttl_s = NULL; >+ >+ // attempt to get DNS ttl, type, host, data then tell Bind about them >+ if((result = odbc_getField(stmnt, 1, &ttl_s)) == ISC_R_SUCCESS && >+ (result = odbc_getField(stmnt, 2, &type)) == ISC_R_SUCCESS && >+ (result = odbc_getField(stmnt, 3, &host)) == ISC_R_SUCCESS && >+ (result = odbc_getManyFields(stmnt, 4, fields,&data))==ISC_R_SUCCESS){ >+ // convert ttl string to int >+ ttl = strtol(ttl_s, &endp, 10); >+ // failure converting ttl. >+ if (*endp != '\0' || ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver ttl must be a postive number"); >+ result = ISC_R_FAILURE; >+ } else { >+ // successful converting TTL, tell Bind >+ result = dns_sdlz_putnamedrr(allnodes, host, type, ttl, data); >+ } >+ } // closes big if() >+ >+ // clean up mem >+ if(ttl_s != NULL) >+ isc_mem_free(ns_g_mctx, ttl_s); >+ if(type != NULL) >+ isc_mem_free(ns_g_mctx, type); >+ if(host != NULL) >+ isc_mem_free(ns_g_mctx, host); >+ if(data != NULL) >+ isc_mem_free(ns_g_mctx, data); >+ >+ // if we weren't successful, log err msg >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "dns_sdlz_putnamedrr returned error. Error code was: %s", >+ isc_result_totext(result)); >+ result = ISC_R_FAILURE; >+ goto allnodes_cleanup; >+ } >+ } // closes while loop >+ >+allnodes_cleanup: >+ >+ // close cursor >+ SQLCloseCursor(((odbc_db_t *) (dbi->dbconn))->stmnt); >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // free lock on dbi so someone else can use it. >+ isc_mutex_unlock(&dbi->instance_lock); >+ >+#endif >+ >+ return result; >+} >+ >+ /* if the lookup function does not return SOA or NS records for the zone, >+ * use this function to get that information for Bind. >+ */ >+ >+isc_result_t >+odbc_authority(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup) >+{ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = odbc_get_resultset(zone, NULL, NULL, AUTHORITY, dbdata, &dbi); >+ // if we get "not implemented", send it along >+ if(result == ISC_R_NOTIMPLEMENTED) >+ return result; >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver unable to return result set for authority query"); >+ return (ISC_R_FAILURE); >+ } >+ // lookup and authority result sets are processed in the same manner >+ // odbc_process_rs does the job for both functions. >+ return odbc_process_rs(lookup, dbi); >+} >+ >+ /* if zone is supported, lookup up a (or multiple) record(s) in it */ >+ >+isc_result_t >+odbc_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup) >+{ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = odbc_get_resultset(zone, name, NULL, LOOKUP, dbdata, &dbi); >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver unable to return result set for lookup query"); >+ return (ISC_R_FAILURE); >+ } >+ // lookup and authority result sets are processed in the same manner >+ // odbc_process_rs does the job for both functions. >+ return odbc_process_rs(lookup, dbi); >+} >+ >+ /* create an instance of the driver. Remember, only 1 copy of the driver's >+ * code is ever loaded, the driver has to remember which context it's >+ * operating in. This is done via use of the dbdata arguement which is >+ * passed into all query functions. >+ */ >+isc_result_t >+odbc_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata) >+{ >+ isc_result_t result; >+ odbc_instance_t *odbc_inst = NULL; >+ dbinstance_t *db = NULL; >+ SQLRETURN sqlRes; >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ // if multi-threaded, we need a few extra variables. >+ int dbcount; >+ int i; >+ char *endp; >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ UNUSED(dlzname); >+ UNUSED(driverarg); >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ // if debugging, let user know we are multithreaded. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "Odbc driver running multithreaded"); >+#else /* ISC_PLATFORM_USETHREADS */ >+ // if debugging, let user know we are single threaded. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "Odbc driver running single threaded"); >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ /* verify we have at least 5 arg's passed to the driver */ >+ if(argc < 5){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver requires at least 4 command line args."); >+ return (ISC_R_FAILURE); >+ } >+ >+ /* no more than 8 arg's should be passed to the driver */ >+ if(argc > 8){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver cannot accept more than 7 command line args."); >+ return (ISC_R_FAILURE); >+ } >+ >+ // multithreaded build can have multiple DB connections >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ /* check how many db connections we should create */ >+ dbcount = strtol(argv[1], &endp, 10); >+ if (*endp != '\0' || dbcount < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver database connection count must be positive."); >+ return (ISC_R_FAILURE); >+ } >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ /* allocate memory for odbc instance */ >+ odbc_inst = isc_mem_get(ns_g_mctx, sizeof(odbc_instance_t)); >+ if(odbc_inst == NULL) >+ return (ISC_R_NOMEMORY); >+ memset(odbc_inst, 0, sizeof(odbc_instance_t)); >+ >+ /* parse connection string and get paramters. */ >+ >+ // get odbc database dsn - required >+ odbc_inst->dsn = (SQLCHAR *) getParameterValue(argv[2], "dsn="); >+ if(odbc_inst->dsn == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "odbc driver requires a dns parameter."); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ // get odbc database username >+ // if no username was passed, set odbc_inst.user = NULL; >+ odbc_inst->user = (SQLCHAR *) getParameterValue(argv[2], "user="); >+ >+ // get odbc database password >+ // if no password was passed, set odbc_inst.pass = NULL; >+ odbc_inst->pass = (SQLCHAR *) getParameterValue(argv[2], "pass="); >+ >+ // create odbc environment & set environment to ODBC V3 >+ if(odbc_inst->sql_env == NULL){ >+ // create environment handle >+ sqlRes = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, >+ &(odbc_inst->sql_env)); >+ if(!sqlOK(sqlRes)){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_INFO, >+ "Odbc driver unable to allocate memory"); >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ //set ODBC version = 3 >+ sqlRes = SQLSetEnvAttr(odbc_inst->sql_env, SQL_ATTR_ODBC_VERSION, >+ (void *) SQL_OV_ODBC3, 0); >+ if(!sqlOK(sqlRes)){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_INFO, >+ "Unable to configure ODBC environment"); >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ /* allocate memory for database connection list */ >+ odbc_inst->db = isc_mem_get(ns_g_mctx, sizeof(db_list_t)); >+ if (odbc_inst->db == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ >+ >+ /* initialize DB connection list */ >+ ISC_LIST_INIT(*odbc_inst->db); >+ >+ // create the appropriate number of database instances (DBI) >+ // append each new DBI to the end of the list >+ for(i=0; i < dbcount; i++){ >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ // how many queries were passed in from config file? >+ switch(argc){ >+ case 5: >+ result = build_sqldbinstance(ns_g_mctx, NULL, NULL, NULL, >+ argv[3], argv[4], NULL, &db); >+ break; >+ case 6: >+ result = build_sqldbinstance(ns_g_mctx, NULL, NULL, argv[5], >+ argv[3], argv[4], NULL, &db); >+ break; >+ case 7: >+ result = build_sqldbinstance(ns_g_mctx, argv[6], NULL, argv[5], >+ argv[3], argv[4], NULL, &db); >+ break; >+ case 8: >+ result = build_sqldbinstance(ns_g_mctx, argv[6], argv[7], argv[5], >+ argv[3], argv[4], NULL, &db); >+ break; >+ default: >+ result = ISC_R_FAILURE; // not really needed, should shut up compiler. >+ } >+ >+ // unsuccessful?, log err msg and cleanup. >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver could not create database instance object."); >+ goto cleanup; >+ } >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // when multithreaded, build a list of DBI's >+ ISC_LINK_INIT(db, link); >+ ISC_LIST_APPEND(*odbc_inst->db, db, link); >+ >+#endif >+ >+ result = odbc_connect(odbc_inst, (odbc_db_t **) &(db->dbconn)); >+ >+ if(result != ISC_R_SUCCESS){ >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // if multi threaded, let user know which connection failed. >+ // user could be attempting to create 10 db connections >+ // and for some reason the db backend only allows 9 >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver failed to create database connection number %u after 3 attempts", i+1); >+#else >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Odbc driver failed to create database connection after 3 attempts"); >+#endif >+ goto cleanup; >+ } >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // set DB = null for next loop through. >+ db = NULL; >+ >+ } // end for loop >+ >+#else >+ // tell odbc_inst about the db connection we just created. >+ odbc_inst->db = db; >+ >+#endif >+ >+ // set dbdata to the odbc_instance we created. >+ *dbdata = odbc_inst; >+ >+ // hey, we got through all of that ok, return success. >+ return(ISC_R_SUCCESS); >+ >+cleanup: >+ >+ destroy_odbc_instance(odbc_inst); >+ >+ return result; >+} >+ >+ /* destroy an instance of the driver. Remember, only 1 copy of the driver's >+ * code is ever loaded, the driver has to remember which context it's >+ * operating in. This is done via use of the dbdata arguement. >+ * so we really only need to clean it up since we are not using driverarg. >+ */ >+ >+void >+odbc_destroy(void *driverarg, void *dbdata) >+{ >+ UNUSED(driverarg); >+ >+ destroy_odbc_instance((odbc_instance_t *) dbdata); >+} >+ >+ >+ // pointers to all our runtime methods. >+ // this is used during driver registration >+ // i.e. in dlz_odbc_init below. >+static dns_sdlzmethods_t dlz_odbc_methods = { >+ odbc_create, >+ odbc_destroy, >+ odbc_findzone, >+ odbc_lookup, >+ odbc_authority, >+ odbc_allnodes, >+ odbc_allowzonexfr}; >+ >+/* >+ * Wrapper around dns_sdlzregister(). >+ */ >+isc_result_t >+dlz_odbc_init(void) { >+ isc_result_t result; >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Registering DLZ odbc driver."); >+ >+ /* Driver is always threadsafe. When multithreaded all functions use >+ * multithreaded code. When not multithreaded, all functions can only >+ * be entered once, but only 1 thread of operation is available in Bind. >+ * So everything is still threadsafe. >+ */ >+ result = dns_sdlzregister("odbc", &dlz_odbc_methods, NULL, >+ DNS_SDLZFLAG_RELATIVEOWNER | DNS_SDLZFLAG_RELATIVERDATA >+ | DNS_SDLZFLAG_THREADSAFE, ns_g_mctx, &dlz_odbc); >+ // if we can't register the driver, there are big problems. >+ if(result != ISC_R_SUCCESS){ >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "dns_sdlzregister() failed: %s", >+ isc_result_totext(result)); >+ result = ISC_R_UNEXPECTED; >+ } >+ >+ >+ return result; >+} >+ >+/* >+ * Wrapper around dns_sdlzunregister(). >+ */ >+void >+dlz_odbc_clear(void) { >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unregistering DLZ odbc driver."); >+ >+ // unregister the driver. >+ if (dlz_odbc != NULL) >+ dns_sdlzunregister(&dlz_odbc); >+} >+ >+#endif >+ >diff -Naur bind-9.2.2-orig/bin/named/dlz_postgres_driver.c bind-9.2.2/bin/named/dlz_postgres_driver.c >--- bind-9.2.2-orig/bin/named/dlz_postgres_driver.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/dlz_postgres_driver.c Fri Oct 17 18:30:50 2003 >@@ -0,0 +1,1171 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifdef DLZ_POSTGRES >+ >+#include <config.h> >+#include <stdio.h> >+#include <string.h> >+#include <stdlib.h> >+ >+#include <dns/log.h> >+#include <dns/sdlz.h> >+#include <dns/result.h> >+ >+#include <isc/mem.h> >+#include <isc/platform.h> >+#include <isc/print.h> >+#include <isc/result.h> >+#include <isc/string.h> >+#include <isc/util.h> >+ >+#include <named/globals.h> >+#include <named/dlz_postgres_driver.h> >+#include <named/sdlz_helper.h> >+ >+#include <libpq-fe.h> >+ >+dns_sdlzimplementation_t *dlz_postgres = NULL; >+ >+#define dbc_search_limit 30 >+#define ALLNODES 1 >+#define ALLOWXFR 2 >+#define AUTHORITY 3 >+#define FINDZONE 4 >+#define LOOKUP 5 >+ >+/*** >+ *** method prototypes >+ *** Declared here to shut up compiler warnings >+ *** about "no previous prototype" >+ ***/ >+ >+size_t >+postgres_makesafe(char *to, const char *from, size_t length); >+ >+void >+postgres_destroy_dblist(db_list_t *dblist); >+ >+dbinstance_t * >+postgres_find_avail_conn(db_list_t *dblist); >+ >+char * >+postgres_escape_string(const char *instr); >+ >+isc_result_t >+postgres_get_resultset(const char *zone, const char *record, >+ const char *client, unsigned int query, >+ void *dbdata, PGresult **rs); >+ >+isc_result_t >+postgres_process_rs(dns_sdlzlookup_t *lookup, PGresult *rs); >+ >+isc_result_t >+postgres_findzone(void *driverarg, void *dbdata, const char *name); >+ >+isc_result_t >+postgres_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client); >+ >+isc_result_t >+postgres_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes); >+ >+isc_result_t >+postgres_authority(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+postgres_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+postgres_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata); >+ >+void >+postgres_destroy(void *driverarg, void *dbdata); >+ >+/*** >+ *** Private methods >+ ***/ >+ >+/* --------------- >+ * Escaping arbitrary strings to get valid SQL strings/identifiers. >+ * >+ * Replaces "\\" with "\\\\" and "'" with "''". >+ * length is the length of the buffer pointed to by >+ * from. The buffer at to must be at least 2*length + 1 characters >+ * long. A terminating NUL character is written. >+ * >+ * NOTICE!!! >+ * This function was borrowed directly from PostgreSQL's libpq. >+ * The function was originally called PQescapeString and renamed >+ * to postgres_makesafe to avoid a naming collision. >+ * PQescapeString is a new function made available in Postgres 7.2. >+ * For some reason the function is not properly exported on Win32 >+ * builds making the function unavailable on Windows. Also, since >+ * this function is new it would require building this driver with >+ * the libpq 7.2. By borrowing this function the Windows problem >+ * is solved, and the dependence on libpq 7.2 is removed. Libpq is >+ * still required of course, but an older version should work now too. >+ * >+ * The copyright statements from the original file containing this >+ * function are included below: >+ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group >+ * Portions Copyright (c) 1994, Regents of the University of California >+ * --------------- >+ */ >+ >+size_t >+postgres_makesafe(char *to, const char *from, size_t length) >+{ >+ const char *source = from; >+ char *target = to; >+ unsigned int remaining = length; >+ >+ while (remaining > 0) >+ { >+ switch (*source) >+ { >+ case '\\': >+ *target = '\\'; >+ target++; >+ *target = '\\'; >+ /* target and remaining are updated below. */ >+ break; >+ >+ case '\'': >+ *target = '\''; >+ target++; >+ *target = '\''; >+ /* target and remaining are updated below. */ >+ break; >+ >+ default: >+ *target = *source; >+ /* target and remaining are updated below. */ >+ } >+ source++; >+ target++; >+ remaining--; >+ } >+ >+ /* Write the terminating NUL character. */ >+ *target = '\0'; >+ >+ return target - to; >+} >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ /* Properly cleans up a list of database instances. >+ * This function is only used when the driver is compiled for >+ * multithreaded operation. >+ */ >+void >+postgres_destroy_dblist(db_list_t *dblist) >+{ >+ >+ dbinstance_t *ndbi = NULL; >+ dbinstance_t *dbi = NULL; >+ >+ // get the first DBI in the list >+ ndbi = ISC_LIST_HEAD(*dblist); >+ >+ // loop through the list >+ while(ndbi != NULL){ >+ dbi = ndbi; >+ // get the next DBI in the list >+ ndbi = ISC_LIST_NEXT(dbi, link); >+ // release DB connection >+ if(dbi->dbconn != NULL) >+ PQfinish((PGconn *) dbi->dbconn); >+ // release all memory that comprised a DBI >+ destroy_sqldbinstance(dbi); >+ } >+ // release memory for the list structure >+ isc_mem_put(ns_g_mctx, dblist, sizeof(db_list_t)); >+} >+ >+ /* Loops through the list of DB instances, attempting to lock >+ * on the mutex. If successful, the DBI is reserved for use >+ * and the thread can perform queries against the database. >+ * If the lock fails, the next one in the list is tried. >+ * looping continues until a lock is obtained, or until >+ * the list has been searched dbc_search_limit times. >+ * This function is only used when the driver is compiled for >+ * multithreaded operation. >+ */ >+ >+dbinstance_t * >+postgres_find_avail_conn(db_list_t *dblist) >+{ >+ dbinstance_t *dbi = NULL; >+ dbinstance_t *head; >+ int count = 0; >+ >+ // get top of list >+ head = dbi = ISC_LIST_HEAD(*dblist); >+ >+ // loop through list >+ while(count < dbc_search_limit){ >+ // try to lock on the mutex >+ if(isc_mutex_trylock(&dbi->instance_lock) == ISC_R_SUCCESS) >+ return dbi; // success, return the DBI for use. >+ >+ // not successful, keep trying >+ dbi = ISC_LIST_NEXT(dbi, link); >+ >+ // check to see if we have gone to the top of the list. >+ if(dbi == NULL){ >+ count++; >+ dbi = head; >+ } >+ } >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_INFO, >+ "Postgres driver unable to find available connection after searching %d times", >+ count); >+ return NULL; >+} >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ /* Allocates memory for a new string, and then constructs the new >+ * string by "escaping" the input string. The new string is >+ * safe to be used in queries. This is necessary because we cannot >+ * be sure of what types of strings are passed to us, and we don't >+ * want special characters in the string causing problems. >+ */ >+ >+char * >+postgres_escape_string(const char *instr){ >+ >+ char *outstr; >+ unsigned int len; >+ >+ if(instr == NULL) >+ return NULL; >+ >+ len = strlen(instr); >+ >+ outstr = isc_mem_allocate(ns_g_mctx ,(2 * len * sizeof(char)) + 1); >+ if(outstr == NULL) >+ return NULL; >+ >+ postgres_makesafe(outstr, instr, len); >+// PQescapeString(outstr, instr, len); >+ >+ return outstr; >+} >+ >+ /* This function is the real core of the driver. Zone, record >+ * and client strings are passed in (or NULL is passed if the >+ * string is not available). The type of query we want to run >+ * is indicated by the query flag, and the dbdata object is passed >+ * passed in to. dbdata really holds either: >+ * 1) a list of database instances (in multithreaded mode) OR >+ * 2) a single database instance (in single threaded mode) >+ * The function will construct the query and obtain an available >+ * database instance (DBI). It will then run the query and hopefully >+ * obtain a result set. Postgres is nice, in that once the result >+ * set is returned, we can make the db connection available for another >+ * thread to use, while this thread continues on. So, the DBI is made >+ * available ASAP by unlocking the instance_lock after we have cleaned >+ * it up properly. >+ */ >+isc_result_t >+postgres_get_resultset(const char *zone, const char *record, >+ const char *client, unsigned int query, >+ void *dbdata, PGresult **rs) >+{ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ char *querystring = NULL; >+ unsigned int i = 0; >+ unsigned int j = 0; >+ >+ REQUIRE(*rs == NULL); >+ >+ // get db instance / connection >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // find an available DBI from the list >+ dbi = postgres_find_avail_conn((db_list_t *) dbdata); >+ >+#else /* ISC_PLATFORM_USETHREADS */ >+ >+ // only 1 DBI - no need to lock instance lock either >+ // only 1 thread in the whole process, no possible contention. >+ dbi = (dbinstance_t *) dbdata; >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ // if DBI is null, can't do anything else >+ if(dbi == NULL){ >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ >+ // what type of query are we going to run? >+ switch(query){ >+ case ALLNODES: >+ // if the query was not passed in from the config file >+ // then we can't run it. return not_implemented, >+ // so it's like the code for that operation >+ // was never built into the driver.... AHHH flexibility!!! >+ if(dbi->allnodes_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } >+ break; >+ case ALLOWXFR: >+ // same as comments as ALLNODES >+ if(dbi->allowxfr_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } >+ break; >+ case AUTHORITY: >+ // same as comments as ALLNODES >+ if(dbi->authority_q == NULL){ >+ result = ISC_R_NOTIMPLEMENTED; >+ goto cleanup; >+ } >+ break; >+ case FINDZONE: >+ // this is required. It's the whole point of DLZ! >+ if(dbi->findzone_q == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "No query specified for findzone. Findzone requires a query"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ break; >+ case LOOKUP: >+ // this is required. It's also a major point of DLZ! >+ if(dbi->lookup_q == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "No query specified for lookup. Lookup requires a query"); >+ result = ISC_R_FAILURE; >+ goto cleanup; >+ } >+ break; >+ default: >+ // this should never happen. If it does, the code is screwed up! >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "Incorrect query flag passed to postgres_get_resultset"); >+ result = ISC_R_UNEXPECTED; >+ goto cleanup; >+ } >+ >+ >+ // was a zone string passed? If so, make it safe for use in queries. >+ if(zone != NULL){ >+ dbi->zone = postgres_escape_string(zone); >+ if(dbi->zone == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { // no string passed, set the string pointer to NULL >+ dbi->zone = NULL; >+ } >+ >+ // was a record string passed? If so, make it safe for use in queries. >+ if(record != NULL){ >+ dbi->record = postgres_escape_string(record); >+ if(dbi->record == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { // no string passed, set the string pointer to NULL >+ dbi->record = NULL; >+ } >+ >+ // was a client string passed? If so, make it safe for use in queries. >+ if(client != NULL){ >+ dbi->client = postgres_escape_string(client); >+ if(dbi->client == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ } else { // no string passed, set the string pointer to NULL >+ dbi->client = NULL; >+ } >+ >+ // what type of query are we going to run? >+ // this time we build the actual query to run. >+ switch(query){ >+ case ALLNODES: >+ querystring = build_querystring(ns_g_mctx, dbi->allnodes_q); >+ break; >+ case ALLOWXFR: >+ querystring = build_querystring(ns_g_mctx, dbi->allowxfr_q); >+ break; >+ case AUTHORITY: >+ querystring = build_querystring(ns_g_mctx, dbi->authority_q); >+ break; >+ case FINDZONE: >+ querystring = build_querystring(ns_g_mctx, dbi->findzone_q); >+ break; >+ case LOOKUP: >+ querystring = build_querystring(ns_g_mctx, dbi->lookup_q); >+ break; >+ default: >+ // this should never happen. If it does, the code is screwed up! >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "Incorrect query flag passed to postgres_get_resultset"); >+ result = ISC_R_UNEXPECTED; >+ goto cleanup; >+ } >+ >+ // if the querystring is null, Bummer, outta RAM. UPGRADE TIME!!! >+ if(querystring == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ >+ // output the full query string during debug so we can see >+ // what lame error the query has. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "\nQuery String: %s\n", querystring); >+ >+ // attempt query up to 3 times. >+ for(j=0; j < 3; j++){ >+ // try to get result set >+ *rs = PQexec((PGconn *)dbi->dbconn, querystring ); >+ result = ISC_R_SUCCESS; >+ // if result set is null, reset DB connection, max 3 attempts. >+ for(i=0; *rs == NULL && i < 3; i++){ >+ result = ISC_R_FAILURE; >+ PQreset((PGconn *) dbi->dbconn); >+ // connection ok, break inner loop >+ if(PQstatus((PGconn *) dbi->dbconn) == CONNECTION_OK) >+ break; >+ } >+ // result set ok, break outter loop >+ if(PQresultStatus(*rs) == PGRES_TUPLES_OK) >+ break; >+ else{ // we got a result set object, but it's not right. >+ PQclear(*rs); // get rid of it >+ result = ISC_R_FAILURE; // incase this was the last attempt >+ } >+ } >+ >+cleanup: // it's always good to cleanup after yourself >+ >+ // if we couldn't even allocate DBI, just return NULL >+ if(dbi == NULL) >+ return ISC_R_FAILURE; >+ >+ // free dbi->zone string >+ if(dbi->zone != NULL) >+ isc_mem_free(ns_g_mctx, dbi->zone); >+ >+ // free dbi->record string >+ if(dbi->record != NULL) >+ isc_mem_free(ns_g_mctx, dbi->record); >+ >+ // free dbi->client string >+ if(dbi->client != NULL) >+ isc_mem_free(ns_g_mctx, dbi->client); >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // release the lock so another thread can use this dbi >+ isc_mutex_unlock(&dbi->instance_lock); >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ // release query string >+ if(querystring != NULL) >+ isc_mem_free(ns_g_mctx, querystring ); >+ >+ // return result >+ return result; >+} >+ >+ /* The processing of result sets for lookup and authority are >+ * exactly the same. So that functionality has been moved >+ * into this function to minimize code. >+ */ >+ >+isc_result_t >+postgres_process_rs(dns_sdlzlookup_t *lookup, PGresult *rs) >+{ >+ isc_result_t result; >+ unsigned int i; >+ unsigned int rows; >+ unsigned int fields; >+ unsigned int j; >+ unsigned int len; >+ char *tmpString; >+ char *endp; >+ int ttl; >+ >+ rows = PQntuples(rs); // how many rows in result set >+ fields = PQnfields(rs); // how many columns in result set >+ for(i=0; i < rows; i++){ >+ switch(fields){ >+ case 1: // one column in rs, it's the data field >+ // use default type of A record, and default TTL of 86400 >+ result = dns_sdlz_putrr(lookup, "a", 86400, PQgetvalue(rs, i, 0)); >+ break; >+ case 2: // two columns, data field, and data type. >+ // use default TTL of 86400 >+ result = dns_sdlz_putrr(lookup, PQgetvalue(rs, i, 0), >+ 86400, PQgetvalue(rs, i, 1)); >+ break; >+ case 3: // three columns, all data no defaults >+ // convert text to int, make sure it worked right >+ ttl = strtol(PQgetvalue(rs, i, 0), &endp, 10); >+ if (*endp != '\0' || ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver ttl must be a postive number"); >+ } >+ result = dns_sdlz_putrr(lookup, PQgetvalue(rs, i, 1), >+ ttl, PQgetvalue(rs, i, 2)); >+ break; >+ default: // more than 3 fields, concatonate the last ones together. >+ // figure out how long to make string >+ for(j=2, len=0; j < fields; j++){ >+ len += strlen(PQgetvalue(rs, i, j)) + 1; >+ } >+ // allocate string memory, allow for NULL to term string >+ tmpString = isc_mem_allocate(ns_g_mctx, len + 1); >+ if(tmpString == NULL){ // major bummer, need more ram >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver unable to allocate memory for temporary string"); >+ PQclear(rs); // can't use it now, get rid of it. >+ return (ISC_R_FAILURE); // Yeah, I'd say! >+ } >+ // copy field to tmpString >+ strcpy(tmpString, PQgetvalue(rs, i, 2)); >+ // concat the rest of fields together, space between each one. >+ for(j=3; j < fields; j++){ >+ strcat(tmpString, " "); >+ strcat(tmpString, PQgetvalue(rs, i, j)); >+ } >+ // convert text to int, make sure it worked right >+ ttl = strtol(PQgetvalue(rs, i, 0), &endp, 10); >+ if (*endp != '\0' || ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver ttl must be a postive number"); >+ } >+ // ok, now tell Bind about it. >+ result = dns_sdlz_putrr(lookup, PQgetvalue(rs, i, 1), >+ ttl, tmpString); >+ // done, get rid of this thing. >+ isc_mem_free(ns_g_mctx, tmpString); >+ } >+ // I sure hope we were successful >+ if(result != ISC_R_SUCCESS){ >+ PQclear(rs); // nope, get rid of the Result set, and log a msg >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "dns_sdlz_putrr returned error. Error code was: %s", >+ isc_result_totext(result)); >+ return (ISC_R_FAILURE); >+ } >+ } >+ >+ // free result set memory >+ PQclear(rs); >+ >+ // if we did return results, we are successful >+ if(rows > 0) >+ return (ISC_R_SUCCESS); >+ >+ // empty result set, no data found >+ return (ISC_R_NOTFOUND); >+} >+ >+/*** >+ *** SDLZ interface methods >+ ***/ >+ >+ /* determine if the zone is supported by (in) the database */ >+ >+isc_result_t >+postgres_findzone(void *driverarg, void *dbdata, const char *name) >+{ >+ isc_result_t result; >+ PGresult *rs = NULL; >+ unsigned int rows; >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = postgres_get_resultset(name, NULL, NULL, FINDZONE, dbdata, &rs); >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ if(rs != NULL) >+ PQclear(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver unable to return result set for findzone query"); >+ return (ISC_R_FAILURE); >+ } >+ // count how many rows in result set >+ rows = PQntuples(rs); >+ // get rid of result set, we are done with it. >+ PQclear(rs); >+ >+ // if we returned any rows, zone is supported. >+ if(rows > 0) >+ return (ISC_R_SUCCESS); >+ >+ // no rows returned, zone is not supported. >+ return (ISC_R_NOTFOUND); >+} >+ >+ /* Determine if the client is allowed to perform a zone transfer */ >+isc_result_t >+postgres_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client) >+{ >+ isc_result_t result; >+ PGresult *rs = NULL; >+ unsigned int rows; >+ UNUSED(driverarg); >+ >+ // first check if the zone is supported by the database. >+ result = postgres_findzone(driverarg, dbdata, name); >+ if(result != ISC_R_SUCCESS) >+ return (ISC_R_NOTFOUND); >+ >+ // if we get to this point we know the zone is supported by the database >+ // the only questions now are is the zone transfer is allowed for this client >+ // and did the config file have an allow zone xfr query >+ >+ // Run our query, and get a result set from the database. >+ result = postgres_get_resultset(name, NULL, client, ALLOWXFR, dbdata, &rs); >+ // if we get "not implemented", send it along. >+ if(result == ISC_R_NOTIMPLEMENTED) >+ return result; >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ if(rs != NULL) >+ PQclear(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver unable to return result set for allow xfr query"); >+ return (ISC_R_FAILURE); >+ } >+ // count how many rows in result set >+ rows = PQntuples(rs); >+ // get rid of result set, we are done with it. >+ PQclear(rs); >+ >+ // if we returned any rows, zone xfr is allowed. >+ if(rows > 0) >+ return (ISC_R_SUCCESS); >+ >+ // no rows returned, zone xfr not allowed >+ return (ISC_R_NOPERM); >+} >+ >+ /* If the client is allowed to perform a zone transfer, the next order of >+ * business is to get all the nodes in the zone, so bind can respond to the >+ * query. >+ */ >+isc_result_t >+postgres_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes) >+{ >+ isc_result_t result; >+ PGresult *rs = NULL; >+ unsigned int i; >+ unsigned int rows; >+ unsigned int fields; >+ unsigned int j; >+ unsigned int len; >+ char *tmpString; >+ char *endp; >+ int ttl; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = postgres_get_resultset(zone, NULL, NULL, ALLNODES, dbdata, &rs); >+ // if we get "not implemented", send it along >+ if(result == ISC_R_NOTIMPLEMENTED) >+ return result; >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ if(rs != NULL) >+ PQclear(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver unable to return result set for all nodes query"); >+ return (ISC_R_FAILURE); >+ } >+ >+ rows = PQntuples(rs); // how many rows in result set >+ fields = PQnfields(rs); // how many columns in result set >+ for(i=0; i < rows; i++){ >+ if(fields < 4){ // gotta have at least 4 columns >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver too few fields returned by all nodes query"); >+ } >+ // convert text to int, make sure it worked right >+ ttl = strtol(PQgetvalue(rs, i, 0), &endp, 10); >+ if (*endp != '\0' || ttl < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver ttl must be a postive number"); >+ } >+ if(fields == 4){ >+ // tell Bind about it. >+ result = dns_sdlz_putnamedrr(allnodes, PQgetvalue(rs, i, 2), >+ PQgetvalue(rs, i, 1), ttl, PQgetvalue(rs, i, 3)); >+ } else { // more than 4 fields, concatonat the last ones together. >+ // figure out how long to make string >+ for(j=3, len=0; j < fields; j++){ >+ len += strlen(PQgetvalue(rs, i, j)) + 1; >+ } >+ // allocate memory, allow for NULL to term string >+ tmpString = isc_mem_allocate(ns_g_mctx, len + 1); >+ if(tmpString == NULL){ // we need more ram. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver unable to allocate memory for temporary string"); >+ PQclear(rs); >+ return (ISC_R_FAILURE); >+ } >+ // copy this field to tmpString >+ strcpy(tmpString, PQgetvalue(rs, i, 3)); >+ // concatonate the rest, with spaces between >+ for(j=4; j < fields; j++){ >+ strcat(tmpString, " "); >+ strcat(tmpString, PQgetvalue(rs, i, j)); >+ } >+ // tell Bind about it. >+ result = dns_sdlz_putnamedrr(allnodes, PQgetvalue(rs, i, 2), >+ PQgetvalue(rs, i, 1), ttl, tmpString); >+ isc_mem_free(ns_g_mctx, tmpString); >+ } >+ // if we weren't successful, log err msg >+ if(result != ISC_R_SUCCESS){ >+ PQclear(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "dns_sdlz_putnamedrr returned error. Error code was: %s", >+ isc_result_totext(result)); >+ return (ISC_R_FAILURE); >+ } >+ } >+ >+ // free result set memory >+ PQclear(rs); >+ >+ // if we did return results, we are successful >+ if(rows > 0) >+ return (ISC_R_SUCCESS); >+ >+ // empty result set, no data found >+ return (ISC_R_NOTFOUND); >+} >+ >+ /* if the lookup function does not return SOA or NS records for the zone, >+ * use this function to get that information for Bind. >+ */ >+ >+isc_result_t >+postgres_authority(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup) >+{ >+ isc_result_t result; >+ PGresult *rs = NULL; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = postgres_get_resultset(zone, NULL, NULL, AUTHORITY, dbdata, &rs); >+ // if we get "not implemented", send it along >+ if(result == ISC_R_NOTIMPLEMENTED) >+ return result; >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ if(rs != NULL) >+ PQclear(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver unable to return result set for authority query"); >+ return (ISC_R_FAILURE); >+ } >+ // lookup and authority result sets are processed in the same manner >+ // postgres_process_rs does the job for both functions. >+ return postgres_process_rs(lookup, rs); >+} >+ >+ /* if zone is supported, lookup up a (or multiple) record(s) in it */ >+isc_result_t >+postgres_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup) >+{ >+ isc_result_t result; >+ PGresult *rs = NULL; >+ >+ UNUSED(driverarg); >+ >+ // run the query and get the result set from the database. >+ result = postgres_get_resultset(zone, name, NULL, LOOKUP, dbdata, &rs); >+ // if we didn't get a result set, log an err msg. >+ if(result != ISC_R_SUCCESS){ >+ if(rs != NULL) >+ PQclear(rs); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver unable to return result set for lookup query"); >+ return (ISC_R_FAILURE); >+ } >+ // lookup and authority result sets are processed in the same manner >+ // postgres_process_rs does the job for both functions. >+ return postgres_process_rs(lookup, rs); >+} >+ >+ /* create an instance of the driver. Remember, only 1 copy of the driver's >+ * code is ever loaded, the driver has to remember which context it's >+ * operating in. This is done via use of the dbdata arguement which is >+ * passed into all query functions. >+ */ >+isc_result_t >+postgres_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata) >+{ >+ isc_result_t result; >+ dbinstance_t *dbi = NULL; >+ unsigned int j; >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ // if multi-threaded, we need a few extra variables. >+ int dbcount; >+ db_list_t *dblist = NULL; >+ int i; >+ char *endp; >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ UNUSED(driverarg); >+ UNUSED(dlzname); >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ // if debugging, let user know we are multithreaded. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "Postgres driver running multithreaded"); >+#else /* ISC_PLATFORM_USETHREADS */ >+ // if debugging, let user know we are single threaded. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "Postgres driver running single threaded"); >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ /* verify we have at least 5 arg's passed to the driver */ >+ if(argc < 5){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver requires at least 4 command line args."); >+ return (ISC_R_FAILURE); >+ } >+ >+ /* no more than 8 arg's should be passed to the driver */ >+ if(argc > 8){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver cannot accept more than 7 command line args."); >+ return (ISC_R_FAILURE); >+ } >+ >+ // multithreaded build can have multiple DB connections >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ /* check how many db connections we should create */ >+ dbcount = strtol(argv[1], &endp, 10); >+ if (*endp != '\0' || dbcount < 0){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver database connection count must be positive."); >+ return (ISC_R_FAILURE); >+ } >+ >+ /* allocate memory for database connection list */ >+ dblist = isc_mem_get(ns_g_mctx, sizeof(db_list_t)); >+ if (dblist == NULL) >+ return (ISC_R_NOMEMORY); >+ >+ /* initialize DB connection list */ >+ ISC_LIST_INIT(*dblist); >+ >+ // create the appropriate number of database instances (DBI) >+ // append each new DBI to the end of the list >+ for(i=0; i < dbcount; i++){ >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ // how many queries were passed in from config file? >+ switch(argc){ >+ case 5: >+ result = build_sqldbinstance(ns_g_mctx, NULL, NULL, NULL, >+ argv[3], argv[4], NULL, &dbi); >+ break; >+ case 6: >+ result = build_sqldbinstance(ns_g_mctx, NULL, NULL, argv[5], >+ argv[3], argv[4], NULL, &dbi); >+ break; >+ case 7: >+ result = build_sqldbinstance(ns_g_mctx, argv[6], NULL, argv[5], >+ argv[3], argv[4], NULL, &dbi); >+ break; >+ case 8: >+ result = build_sqldbinstance(ns_g_mctx, argv[6], argv[7], argv[5], >+ argv[3], argv[4], NULL, &dbi); >+ break; >+ default: >+ result = ISC_R_FAILURE; // not really needed, should shut up compiler. >+ } >+ >+ >+ if(result == ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Postgres driver created database instance object."); >+ } else { // unsuccessful?, log err msg and cleanup. >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver could not create database instance object."); >+ goto cleanup; >+ } >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // when multithreaded, build a list of DBI's >+ ISC_LINK_INIT(dbi, link); >+ ISC_LIST_APPEND(*dblist, dbi, link); >+ >+#endif >+ >+ // create and set db connection >+ dbi->dbconn = PQconnectdb(argv[2]); >+ // if db connection cannot be created, log err msg and cleanup. >+ if(dbi->dbconn == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver could not allocate memory for database connection"); >+ goto cleanup; >+ } >+ >+ // if we cannot connect the first time, try 3 more times. >+ for(j=0; PQstatus((PGconn *) dbi->dbconn) != CONNECTION_OK && j < 3; j++) >+ PQreset((PGconn *) dbi->dbconn); >+ >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ // if multi threaded, let user know which connection failed. >+ // user could be attempting to create 10 db connections >+ // and for some reason the db backend only allows 9 >+ if(PQstatus((PGconn *) dbi->dbconn) != CONNECTION_OK){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver failed to create database connection number %u after 4 attempts", i+1); >+ goto cleanup; >+ } >+ >+ // set DBI = null for next loop through. >+ dbi = NULL; >+ } // end for loop >+ >+ // set dbdata to the list we created. >+ *dbdata = dblist; >+ >+#else /* ISC_PLATFORM_USETHREADS */ >+ // if single threaded, just let user know we couldn't connect. >+ if(PQstatus((PGconn *) dbi->dbconn) != CONNECTION_OK){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Postgres driver failed to create database connection after 4 attempts"); >+ goto cleanup; >+ } >+ >+ // single threaded build can only use 1 db connection, return it via dbdata >+ *dbdata = dbi; >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ >+ // hey, we got through all of that ok, return success. >+ return(ISC_R_SUCCESS); >+ >+cleanup: >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ // if multithreaded, we could fail because only 1 connection >+ // couldn't be made. We should cleanup the other successful >+ // connections properly. >+ postgres_destroy_dblist(dblist); >+ >+#else /* ISC_PLATFORM_USETHREADS */ >+ if(dbi != NULL) >+ destroy_sqldbinstance(dbi); >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+ return(ISC_R_FAILURE); >+} >+ >+ >+ /* destroy an instance of the driver. Remember, only 1 copy of the driver's >+ * code is ever loaded, the driver has to remember which context it's >+ * operating in. This is done via use of the dbdata arguement. >+ * so we really only need to clean it up since we are not using driverarg. >+ */ >+void >+postgres_destroy(void *driverarg, void *dbdata) >+{ >+ >+#ifdef ISC_PLATFORM_USETHREADS >+ >+ UNUSED(driverarg); >+ // cleanup the list of DBI's >+ postgres_destroy_dblist((db_list_t *) dbdata); >+ >+#else /* ISC_PLATFORM_USETHREADS */ >+ >+ dbinstance_t *dbi; >+ >+ UNUSED(driverarg); >+ >+ dbi = (dbinstance_t *) dbdata; >+ >+ // release DB connection >+ if(dbi->dbconn != NULL) >+ PQfinish((PGconn *) dbi->dbconn); >+ >+ // destroy single DB instance >+ destroy_sqldbinstance(dbi); >+ >+#endif /* ISC_PLATFORM_USETHREADS */ >+} >+ >+ // pointers to all our runtime methods. >+ // this is used during driver registration >+ // i.e. in dlz_postgres_init below. >+static dns_sdlzmethods_t dlz_postgres_methods = { >+ postgres_create, >+ postgres_destroy, >+ postgres_findzone, >+ postgres_lookup, >+ postgres_authority, >+ postgres_allnodes, >+ postgres_allowzonexfr}; >+ >+/* >+ * Wrapper around dns_sdlzregister(). >+ */ >+isc_result_t >+dlz_postgres_init(void) { >+ isc_result_t result; >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Registering DLZ postgres driver."); >+ >+ /* Driver is always threadsafe. When multithreaded all functions use >+ * multithreaded code. When not multithreaded, all functions can only >+ * be entered once, but only 1 thread of operation is available in Bind. >+ * So everything is still threadsafe. >+ */ >+ result = dns_sdlzregister("postgres", &dlz_postgres_methods, NULL, >+ DNS_SDLZFLAG_RELATIVEOWNER | DNS_SDLZFLAG_RELATIVERDATA >+ | DNS_SDLZFLAG_THREADSAFE, ns_g_mctx, &dlz_postgres); >+ // if we can't register the driver, there are big problems. >+ if(result != ISC_R_SUCCESS){ >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "dns_sdlzregister() failed: %s", >+ isc_result_totext(result)); >+ result = ISC_R_UNEXPECTED; >+ } >+ >+ >+ return result; >+} >+ >+/* >+ * Wrapper around dns_sdlzunregister(). >+ */ >+void >+dlz_postgres_clear(void) { >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unregistering DLZ postgres driver."); >+ >+ // unregister the driver. >+ if (dlz_postgres != NULL) >+ dns_sdlzunregister(&dlz_postgres); >+} >+ >+#endif >+ >diff -Naur bind-9.2.2-orig/bin/named/dlz_stub_driver.c bind-9.2.2/bin/named/dlz_stub_driver.c >--- bind-9.2.2-orig/bin/named/dlz_stub_driver.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/dlz_stub_driver.c Fri Oct 17 18:28:38 2003 >@@ -0,0 +1,356 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifdef DLZ_STUB >+ >+#include <config.h> >+#include <stdio.h> >+#include <string.h> >+#include <stdlib.h> >+ >+#include <dns/log.h> >+#include <dns/sdlz.h> >+#include <dns/result.h> >+ >+#include <isc/mem.h> >+#include <isc/print.h> >+#include <isc/result.h> >+#include <isc/util.h> >+ >+#include <named/globals.h> >+#include <named/dlz_stub_driver.h> >+ >+dns_sdlzimplementation_t *dlz_stub = NULL; >+ >+typedef struct config_data { >+ char *myzone; >+ char *myname; >+ char *myip; >+ isc_mem_t *mctx; >+}config_data_t; >+ >+/*** >+ *** method prototypes >+ *** Declared here to shut up compiler warnings >+ *** about "no previous prototype" >+ ***/ >+ >+isc_result_t >+stub_dlz_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes); >+ >+isc_result_t >+stub_dlz_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client); >+ >+isc_result_t >+stub_dlz_authority(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+stub_dlz_findzonedb(void *driverarg, void *dbdata, const char *name); >+ >+isc_result_t >+stub_dlz_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup); >+ >+isc_result_t >+stub_dlz_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata); >+ >+void >+stub_dlz_destroy(void *driverarg, void *dbdata); >+ >+/*** >+ *** SDLZ methods >+ ***/ >+isc_result_t >+stub_dlz_allnodes(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes) >+{ >+ config_data_t *cd; >+ isc_result_t result; >+ >+ UNUSED(zone); >+ UNUSED(driverarg); >+ >+ cd = (config_data_t *) dbdata; >+ >+ result = dns_sdlz_putnamedrr(allnodes, cd->myname, "soa", 86400, "web root.localhost. 0 28800 7200 604800 86400"); >+ if (result != ISC_R_SUCCESS) >+ return (ISC_R_FAILURE); >+ result = dns_sdlz_putnamedrr(allnodes, "ns", "ns", 86400, cd->myname); >+ if (result != ISC_R_SUCCESS) >+ return (ISC_R_FAILURE); >+ result = dns_sdlz_putnamedrr(allnodes, cd->myname, "a", 1, cd->myip); >+ if (result != ISC_R_SUCCESS) >+ return (ISC_R_FAILURE); >+ return (ISC_R_SUCCESS); >+} >+ >+isc_result_t >+stub_dlz_allowzonexfr(void *driverarg, void *dbdata, const char *name, >+ const char *client) >+{ >+ UNUSED(driverarg); >+ UNUSED(dbdata); >+ UNUSED(name); >+ UNUSED(client); >+ return ISC_R_SUCCESS; >+} >+ >+isc_result_t >+stub_dlz_authority(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup) >+{ >+ isc_result_t result; >+ config_data_t *cd; >+ >+ UNUSED(driverarg); >+ >+ cd = (config_data_t *) dbdata; >+ >+ if (strcmp(zone, cd->myzone) == 0) { >+ result = dns_sdlz_putsoa(lookup, cd->myname, "root.localhost.", 0); >+ if (result != ISC_R_SUCCESS) >+ return (ISC_R_FAILURE); >+ >+ result = dns_sdlz_putrr(lookup, "ns", 86400, cd->myname); >+ if (result != ISC_R_SUCCESS) >+ return (ISC_R_FAILURE); >+ >+ return (ISC_R_SUCCESS); >+ } >+ return (ISC_R_NOTFOUND); >+} >+ >+isc_result_t >+stub_dlz_findzonedb(void *driverarg, void *dbdata, const char *name) >+{ >+ >+ config_data_t *cd; >+ >+ UNUSED(driverarg); >+ >+ cd = (config_data_t *) dbdata; >+ >+ // Write info message to log >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "dlz_stub findzone looking for '%s'", name); >+ >+ if(strcmp(cd->myzone, name) == 0) >+ return (ISC_R_SUCCESS); >+ else >+ return (ISC_R_SUCCESS); >+} >+ >+ >+isc_result_t >+stub_dlz_lookup(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup) >+{ >+ isc_result_t result; >+ config_data_t *cd; >+ >+ UNUSED(zone); >+ UNUSED(driverarg); >+ >+ cd = (config_data_t *) dbdata; >+ >+ if (strcmp(name, cd->myname) == 0) { >+ result = dns_sdlz_putrr(lookup, "a", 1, cd->myip); >+ if (result != ISC_R_SUCCESS) >+ return (ISC_R_FAILURE); >+ >+ return (ISC_R_SUCCESS); >+ } >+ return (ISC_R_FAILURE); >+ >+} >+ >+ >+isc_result_t >+stub_dlz_create(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata) >+{ >+ >+ config_data_t *cd; >+ >+ UNUSED(driverarg); >+ >+ if(argc < 4) >+ return (ISC_R_FAILURE); >+ /* >+ * Write info message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_INFO, >+ "Loading '%s' using DLZ_stub driver. Zone: %s, Name: %s IP: %s", >+ dlzname, argv[1], argv[2], argv[3]); >+ >+ cd = isc_mem_get(ns_g_mctx, sizeof(config_data_t)); >+ if((cd) == NULL){ >+ return (ISC_R_NOMEMORY); >+ } >+ >+ memset(cd, 0, sizeof(config_data_t)); >+ >+ cd->myzone = isc_mem_strdup(ns_g_mctx, argv[1]); >+ if(cd->myzone == NULL){ >+ isc_mem_put(ns_g_mctx, cd, sizeof(config_data_t)); >+ return (ISC_R_NOMEMORY); >+ } >+ >+ cd->myname = isc_mem_strdup(ns_g_mctx, argv[2]); >+ if(cd->myname == NULL){ >+ isc_mem_put(ns_g_mctx, cd, sizeof(config_data_t)); >+ isc_mem_free(ns_g_mctx, cd->myzone); >+ return (ISC_R_NOMEMORY); >+ } >+ >+ cd->myip = isc_mem_strdup(ns_g_mctx, argv[3]); >+ if(cd->myip == NULL){ >+ isc_mem_put(ns_g_mctx, cd, sizeof(config_data_t)); >+ isc_mem_free(ns_g_mctx, cd->myname); >+ isc_mem_free(ns_g_mctx, cd->myzone); >+ return (ISC_R_NOMEMORY); >+ } >+ >+ isc_mem_attach(ns_g_mctx, &cd->mctx); >+ >+ *dbdata = cd; >+ >+ return(ISC_R_SUCCESS); >+} >+ >+void >+stub_dlz_destroy(void *driverarg, void *dbdata) >+{ >+ config_data_t *cd; >+ isc_mem_t *mctx; >+ >+ UNUSED(driverarg); >+ >+ cd = (config_data_t *) dbdata; >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unloading DLZ_stub driver."); >+ >+ isc_mem_free(ns_g_mctx, cd->myzone); >+ isc_mem_free(ns_g_mctx, cd->myname); >+ isc_mem_free(ns_g_mctx, cd->myip); >+ mctx = cd->mctx; >+ isc_mem_put(mctx, cd, sizeof(config_data_t)); >+ isc_mem_detach(&mctx); >+} >+ >+static dns_sdlzmethods_t dlz_stub_methods = { >+ stub_dlz_create, >+ stub_dlz_destroy, >+ stub_dlz_findzonedb, >+ stub_dlz_lookup, >+ stub_dlz_authority, >+ stub_dlz_allnodes, >+ stub_dlz_allowzonexfr}; >+ >+/* >+ * Wrapper around dns_sdlzregister(). >+ */ >+isc_result_t >+dlz_stub_init(void) { >+ isc_result_t result; >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Registering DLZ_stub driver."); >+ >+ result = dns_sdlzregister("dlz_stub", &dlz_stub_methods, NULL, >+ DNS_SDLZFLAG_RELATIVEOWNER | DNS_SDLZFLAG_RELATIVERDATA, >+ ns_g_mctx, &dlz_stub); >+ if(result != ISC_R_SUCCESS){ >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "dns_sdlzregister() failed: %s", >+ isc_result_totext(result)); >+ result = ISC_R_UNEXPECTED; >+ } >+ >+ >+ return result; >+} >+ >+/* >+ * Wrapper around dns_sdlzunregister(). >+ */ >+void >+dlz_stub_clear(void) { >+ >+ /* >+ * Write debugging message to log >+ */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unregistering DLZ_stub driver."); >+ >+ if (dlz_stub != NULL) >+ dns_sdlzunregister(&dlz_stub); >+} >+ >+#endif >+ >diff -Naur bind-9.2.2-orig/bin/named/include/named/dlz_bdb_driver.h bind-9.2.2/bin/named/include/named/dlz_bdb_driver.h >--- bind-9.2.2-orig/bin/named/include/named/dlz_bdb_driver.h Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/include/named/dlz_bdb_driver.h Tue Apr 22 19:25:37 2003 >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+isc_result_t >+dlz_bdb_init(void); >+ >+void >+dlz_bdb_clear(void); >+ >diff -Naur bind-9.2.2-orig/bin/named/include/named/dlz_filesystem_driver.h bind-9.2.2/bin/named/include/named/dlz_filesystem_driver.h >--- bind-9.2.2-orig/bin/named/include/named/dlz_filesystem_driver.h Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/include/named/dlz_filesystem_driver.h Tue Apr 22 19:25:37 2003 >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+isc_result_t >+dlz_fs_init(void); >+ >+void >+dlz_fs_clear(void); >+ >diff -Naur bind-9.2.2-orig/bin/named/include/named/dlz_ldap_driver.h bind-9.2.2/bin/named/include/named/dlz_ldap_driver.h >--- bind-9.2.2-orig/bin/named/include/named/dlz_ldap_driver.h Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/include/named/dlz_ldap_driver.h Sat Sep 20 17:57:17 2003 >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+isc_result_t >+dlz_ldap_init(void); >+ >+void >+dlz_ldap_clear(void); >+ >diff -Naur bind-9.2.2-orig/bin/named/include/named/dlz_mysql_driver.h bind-9.2.2/bin/named/include/named/dlz_mysql_driver.h >--- bind-9.2.2-orig/bin/named/include/named/dlz_mysql_driver.h Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/include/named/dlz_mysql_driver.h Tue Apr 22 19:25:37 2003 >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+isc_result_t >+dlz_mysql_init(void); >+ >+void >+dlz_mysql_clear(void); >+ >diff -Naur bind-9.2.2-orig/bin/named/include/named/dlz_odbc_driver.h bind-9.2.2/bin/named/include/named/dlz_odbc_driver.h >--- bind-9.2.2-orig/bin/named/include/named/dlz_odbc_driver.h Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/include/named/dlz_odbc_driver.h Mon Mar 31 14:33:24 2003 >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+isc_result_t >+dlz_odbc_init(void); >+ >+void >+dlz_odbc_clear(void); >+ >diff -Naur bind-9.2.2-orig/bin/named/include/named/dlz_postgres_driver.h bind-9.2.2/bin/named/include/named/dlz_postgres_driver.h >--- bind-9.2.2-orig/bin/named/include/named/dlz_postgres_driver.h Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/include/named/dlz_postgres_driver.h Tue Apr 22 19:25:37 2003 >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+isc_result_t >+dlz_postgres_init(void); >+ >+void >+dlz_postgres_clear(void); >+ >diff -Naur bind-9.2.2-orig/bin/named/include/named/dlz_stub_driver.h bind-9.2.2/bin/named/include/named/dlz_stub_driver.h >--- bind-9.2.2-orig/bin/named/include/named/dlz_stub_driver.h Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/include/named/dlz_stub_driver.h Tue Apr 22 19:25:37 2003 >@@ -0,0 +1,40 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+isc_result_t >+dlz_stub_init(void); >+ >+void >+dlz_stub_clear(void); >diff -Naur bind-9.2.2-orig/bin/named/include/named/sdlz_helper.h bind-9.2.2/bin/named/include/named/sdlz_helper.h >--- bind-9.2.2-orig/bin/named/include/named/sdlz_helper.h Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/include/named/sdlz_helper.h Sun Oct 26 17:33:00 2003 >@@ -0,0 +1,109 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifndef SDLZHELPER_H >+#define SDLZHELPER_H 1 >+ >+/*** >+ *** Types >+ ***/ >+#define SDLZH_REQUIRE_CLIENT 0x01 >+#define SDLZH_REQUIRE_QUERY 0x02 >+#define SDLZH_REQUIRE_RECORD 0x04 >+#define SDLZH_REQUIRE_ZONE 0x08 >+ >+typedef struct query_segment query_segment_t; >+typedef ISC_LIST(query_segment_t) query_list_t; >+typedef struct dbinstance dbinstance_t; >+typedef ISC_LIST(dbinstance_t) db_list_t; >+typedef struct driverinstance driverinstance_t; >+ >+ /* a query segment is all the text between our special tokens >+ * special tokens are %zone%, %record%, %client% >+ */ >+struct query_segment { >+ void *sql; >+ unsigned int strlen; >+ isc_boolean_t direct; >+ ISC_LINK(query_segment_t) link; >+}; >+ >+ /* a database instance contains everything we need for running >+ * a query against the database. Using it each separate thread >+ * can dynamically construct a query and execute it against the >+ * database. The "instance_lock" and locking code in the driver's >+ * make sure no two threads try to use the same DBI at a time. >+ */ >+struct dbinstance { >+ void *dbconn; >+ query_list_t *allnodes_q; >+ query_list_t *allowxfr_q; >+ query_list_t *authority_q; >+ query_list_t *findzone_q; >+ query_list_t *lookup_q; >+ query_list_t *countzone_q; >+ char *query_buf; >+ char *zone; >+ char *record; >+ char *client; >+ isc_mem_t *mctx; >+ isc_mutex_t instance_lock; >+ ISC_LINK(dbinstance_t) link; >+ >+}; >+ >+/*** >+ *** Method declarations >+ ***/ >+ >+ /* see the code in sdlz_helper.c for more information on these methods */ >+ >+char * >+build_querystring(isc_mem_t *mctx, query_list_t *querylist); >+ >+isc_result_t >+build_sqldbinstance(isc_mem_t *mctx, const char *allnodes_str, >+ const char *allowxfr_str, const char *authority_str, >+ const char *findzone_str, const char *lookup_str, >+ const char *countzone_str, dbinstance_t **dbi); >+ >+void >+destroy_sqldbinstance(dbinstance_t *dbi); >+ >+char * >+getParameterValue(const char *input, const char* key); >+ >+#endif /* SDLZHELPER_H */ >+ >diff -Naur bind-9.2.2-orig/bin/named/main.c bind-9.2.2/bin/named/main.c >--- bind-9.2.2-orig/bin/named/main.c Mon Aug 5 03:57:02 2002 >+++ bind-9.2.2/bin/named/main.c Sun Apr 27 17:34:07 2003 >@@ -63,6 +63,34 @@ > */ > /* #include "xxdb.h" */ > >+#ifdef DLZ_STUB >+#include <named/dlz_stub_driver.h> >+#endif >+ >+#ifdef DLZ_POSTGRES >+#include <named/dlz_postgres_driver.h> >+#endif >+ >+#ifdef DLZ_MYSQL >+#include <named/dlz_mysql_driver.h> >+#endif >+ >+#ifdef DLZ_FILESYSTEM >+#include <named/dlz_filesystem_driver.h> >+#endif >+ >+#ifdef DLZ_BDB >+#include <named/dlz_bdb_driver.h> >+#endif >+ >+#ifdef DLZ_LDAP >+#include <named/dlz_ldap_driver.h> >+#endif >+ >+#ifdef DLZ_ODBC >+#include <named/dlz_odbc_driver.h> >+#endif >+ > static isc_boolean_t want_stats = ISC_FALSE; > static char program_name[ISC_DIR_NAMEMAX] = "named"; > static char absolute_conffile[ISC_DIR_PATHMAX]; >@@ -528,6 +556,34 @@ > */ > /* xxdb_init(); */ > >+#ifdef DLZ_STUB >+ dlz_stub_init(); >+#endif >+ >+#ifdef DLZ_POSTGRES >+ dlz_postgres_init(); >+#endif >+ >+#ifdef DLZ_MYSQL >+ dlz_mysql_init(); >+#endif >+ >+#ifdef DLZ_FILESYSTEM >+ dlz_fs_init(); >+#endif >+ >+#ifdef DLZ_BDB >+ dlz_bdb_init(); >+#endif >+ >+#ifdef DLZ_LDAP >+ dlz_ldap_init(); >+#endif >+ >+#ifdef DLZ_ODBC >+ dlz_odbc_init(); >+#endif >+ > ns_server_create(ns_g_mctx, &ns_g_server); > } > >@@ -542,13 +598,42 @@ > */ > /* xxdb_clear(); */ > >+#ifdef DLZ_STUB >+ dlz_stub_clear(); >+#endif >+ >+#ifdef DLZ_POSTGRES >+ dlz_postgres_clear(); >+#endif >+ >+#ifdef DLZ_MYSQL >+ dlz_mysql_clear(); >+#endif >+ >+#ifdef DLZ_FILESYSTEM >+ dlz_fs_clear(); >+#endif >+ >+#ifdef DLZ_BDB >+ dlz_bdb_clear(); >+#endif >+ >+#ifdef DLZ_LDAP >+ dlz_ldap_clear(); >+#endif >+ >+#ifdef DLZ_ODBC >+ dlz_odbc_clear(); >+#endif >+ >+ > isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, > ISC_LOG_NOTICE, "exiting"); > ns_log_shutdown(); > } > > int >-main(int argc, char *argv[]) { >+main(int argc, char **argv) { > isc_result_t result; > > result = isc_file_progname(*argv, program_name, sizeof(program_name)); >diff -Naur bind-9.2.2-orig/bin/named/query.c bind-9.2.2/bin/named/query.c >--- bind-9.2.2-orig/bin/named/query.c Mon Feb 17 02:05:04 2003 >+++ bind-9.2.2/bin/named/query.c Sun Apr 27 17:34:07 2003 >@@ -27,6 +27,9 @@ > #include <dns/adb.h> > #include <dns/byaddr.h> > #include <dns/db.h> >+#ifdef DLZ >+#include <dns/dlz.h> >+#endif > #include <dns/events.h> > #include <dns/message.h> > #include <dns/rdata.h> >@@ -817,9 +820,67 @@ > { > isc_result_t result; > >+#ifdef DLZ >+ >+ isc_result_t tresult; >+ unsigned int namelabels; >+ unsigned int zonelabels; >+ dns_zone_t *zone = NULL; >+ dns_db_t *tdbp; >+ >+ REQUIRE(zonep != NULL && *zonep == NULL); >+ >+ tdbp = NULL; >+ >+ /* Calculate how many labels are in name. */ >+ namelabels = dns_name_countlabels(name); >+ zonelabels = 0; >+ >+ /* Try to find name in bind's standard database. */ >+ result = query_getzonedb(client, name, options, &zone, dbp, versionp); >+ >+ /* See how many labels are in the zone's name. */ >+ if (result == ISC_R_SUCCESS && zone != NULL) >+ zonelabels = dns_name_countlabels(dns_zone_getorigin(zone)); >+ /* >+ * If # zone labels < # name labels, try to find an even better match >+ * Only try if a DLZ driver is loaded for this view >+ */ >+ if(zonelabels < namelabels && client->view->dlzdatabase != NULL){ >+ tresult = dns_dlzfindzone(client->view, name, zonelabels, &tdbp); >+ /* If we successful, we found a better match. */ >+ if(tresult == ISC_R_SUCCESS){ >+ /* If the previous search returned a zone, detach it. */ >+ if(zone != NULL) >+ dns_zone_detach(&zone); >+ /* If the previous search returned a database, detach it. */ >+ if(*dbp != NULL) >+ dns_db_detach(dbp); >+ /* incase the previous search returned a version, clear it */ >+ *versionp = NULL; >+ /* get our database version */ >+ dns_db_currentversion(tdbp, versionp); >+ /* be sure to return our database */ >+ *dbp = tdbp; >+ /* We return a null zone, No stats for DLZ zones */ >+ zone = NULL; >+ result = tresult; >+ } >+ } >+ >+#else >+ > result = query_getzonedb(client, name, options, zonep, dbp, versionp); >- if (result == ISC_R_SUCCESS) { >+ >+#endif >+ >+ /* If successfull, Transfer ownership of zone. */ >+ if(result == ISC_R_SUCCESS){ > *is_zonep = ISC_TRUE; >+#ifdef DLZ >+ *zonep = zone; >+#endif >+ /* If neither attempt above succeeded, return the cache instead */ > } else if (result == ISC_R_NOTFOUND) { > result = query_getcachedb(client, dbp, options); > *is_zonep = ISC_FALSE; >@@ -2476,7 +2537,14 @@ > > if (event == NULL && client->query.restarts == 0) { > if (is_zone) { >- dns_zone_attach(zone, &client->query.authzone); >+#ifdef DLZ >+ if(zone != NULL){ // if is_zone = true, zone = NULL then this is >+ // a DLZ zone. Don't attempt to attach zone >+#endif >+ dns_zone_attach(zone, &client->query.authzone); >+#ifdef DLZ >+ } >+#endif > dns_db_attach(db, &client->query.authdb); > } > client->query.authdbset = ISC_TRUE; >diff -Naur bind-9.2.2-orig/bin/named/sdlz_helper.c bind-9.2.2/bin/named/sdlz_helper.c >--- bind-9.2.2-orig/bin/named/sdlz_helper.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/bin/named/sdlz_helper.c Sun Apr 27 17:34:07 2003 >@@ -0,0 +1,507 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifdef DLZ >+ >+#include <config.h> >+ >+#include <dns/log.h> >+#include <dns/result.h> >+ >+#include <isc/mem.h> >+#include <isc/result.h> >+#include <isc/string.h> >+#include <isc/util.h> >+ >+#include <named/globals.h> >+#include <named/sdlz_helper.h> >+ >+/*** >+ *** method prototypes >+ *** Declared here to shut up compiler warnings >+ *** about "no previous prototype" >+ ***/ >+ >+void >+destroy_querylist(isc_mem_t *mctx, query_list_t **querylist); >+ >+isc_result_t >+build_querylist(isc_mem_t *mctx, const char *query_str, char **zone, >+ char **record, char **client, query_list_t **querylist, >+ unsigned int flags); >+ >+/*** >+ *** sdlz helper methods >+ ***/ >+ >+ /* properly destroys a querylist by de-allocating the >+ * memory for each query segment, and then the list itself >+ */ >+void >+destroy_querylist(isc_mem_t *mctx, query_list_t **querylist) >+{ >+ query_segment_t *tseg = NULL; >+ query_segment_t *nseg = NULL; >+ >+ REQUIRE(mctx != NULL); >+ >+ // if query list is null, nothing to do >+ if(*querylist == NULL) >+ return; >+ >+ // start at the top of the list >+ nseg = ISC_LIST_HEAD(**querylist); >+ while(nseg != NULL){ // loop, until end of list >+ tseg = nseg; >+ // free the query segment's text string >+ // but only if it was really a query segment, and not >+ // a pointer to %zone%, or %record%, or %client% >+ if (tseg->sql != NULL && tseg->direct == isc_boolean_true) >+ isc_mem_free(mctx, tseg->sql); >+ // get the next query segment, before we destroy this one. >+ nseg = ISC_LIST_NEXT(nseg, link); >+ // deallocate this query segment. >+ isc_mem_put(mctx, tseg, sizeof(query_segment_t)); >+ } >+ // deallocate the query segment list >+ isc_mem_put(mctx, *querylist, sizeof(query_list_t)); >+} >+ >+ /* constructs a query list by parsing a string into query segments */ >+isc_result_t >+build_querylist(isc_mem_t *mctx, const char *query_str, char **zone, >+ char **record, char **client, query_list_t **querylist, >+ unsigned int flags) >+{ >+ isc_result_t result; >+ isc_boolean_t foundzone = isc_boolean_false; >+ isc_boolean_t foundrecord = isc_boolean_false; >+ isc_boolean_t foundclient = isc_boolean_false; >+ char *temp_str = NULL; >+ char *right_str = NULL; >+ query_list_t *tql; >+ query_segment_t *tseg = NULL; >+ >+ REQUIRE(querylist != NULL && *querylist == NULL); >+ REQUIRE(mctx != NULL); >+ >+ // if query string is null, or zero length >+ if(query_str == NULL || strlen(query_str) < 1){ >+ if((flags & SDLZH_REQUIRE_QUERY) == 0) // we don't need it were ok. >+ return (ISC_R_SUCCESS); >+ else // we did need it, PROBLEM!!! >+ return (ISC_R_FAILURE); >+ } >+ >+ /* allocate memory for query list */ >+ tql = isc_mem_get(mctx, sizeof(query_list_t)); >+ // couldn't allocate memory. Problem!! >+ if (tql == NULL) >+ return (ISC_R_NOMEMORY); >+ >+ // initialize the query segment list >+ ISC_LIST_INIT(*tql); >+ >+ // make a copy of query_str so we can chop it up >+ temp_str = right_str = isc_mem_strdup(mctx, query_str); >+ // couldn't make a copy, problem!! >+ if (right_str == NULL){ >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ >+ // loop through the string and chop it up >+ while(right_str != NULL){ >+ // allocate memory for tseg >+ tseg = isc_mem_get(mctx, sizeof(query_segment_t)); >+ if (tseg == NULL) { // no memory, clean everything up. >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ tseg->sql = NULL; >+ tseg->direct = isc_boolean_false; >+ // initialize the query segment link >+ ISC_LINK_INIT(tseg, link); >+ // append the query segment to the list >+ ISC_LIST_APPEND(*tql, tseg, link); >+ >+ //split string at the first "%". set query segment to left portion >+ tseg->sql = isc_mem_strdup(mctx, isc_string_separate(&right_str, "%")); >+ if (tseg->sql == NULL) { // no memory, clean everything up. >+ result = ISC_R_NOMEMORY; >+ goto cleanup; >+ } >+ // tseg->sql points directly to a string. >+ tseg->direct = isc_boolean_true; >+ tseg->strlen = strlen(tseg->sql); >+ >+ // check if we encountered "%zone%" token >+ if(strcasecmp(tseg->sql, "zone") == 0){ >+ // we don't really need, or want the "zone" text, so get rid of it. >+ isc_mem_free(mctx, tseg->sql); >+ tseg->sql = (char**) zone; // set tseg->sql to in-direct zone string >+ tseg->strlen = 0; >+ // tseg->sql points in-directly to a string >+ tseg->direct = isc_boolean_false; >+ foundzone = isc_boolean_true; >+ // check if we encountered "%record%" token >+ } else if(strcasecmp(tseg->sql, "record") == 0){ >+ // we don't really need, or want the "record" text, so get rid of it. >+ isc_mem_free(mctx, tseg->sql); >+ // set tseg->sql to in-direct record string >+ tseg->sql = (char**) record; >+ tseg->strlen = 0; >+ // tseg->sql points in-directly poinsts to a string >+ tseg->direct = isc_boolean_false; >+ foundrecord = isc_boolean_true; >+ // check if we encountered "%client%" token >+ } else if(strcasecmp(tseg->sql, "client") == 0){ >+ // we don't really need, or want the "client" text, so get rid of it. >+ isc_mem_free(mctx, tseg->sql); >+ // set tseg->sql to in-direct record string >+ tseg->sql = (char**) client; >+ tseg->strlen = 0; >+ // tseg->sql points in-directly poinsts to a string >+ tseg->direct = isc_boolean_false; >+ foundclient = isc_boolean_true; >+ } >+ } >+ >+ // we don't need temp_str any more >+ isc_mem_free(mctx, temp_str); >+ // add checks later to verify zone and record are found if necessary. >+ >+ // if this query requires %client%, make sure we found it >+ if( ((flags & SDLZH_REQUIRE_CLIENT) != 0) && (!foundclient) ){ >+ /* Write error message to log */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Required token %%client%% not found."); >+ result = ISC_R_FAILURE; >+ goto flag_fail; >+ } >+ >+ // if this query requires %record%, make sure we found it >+ if( ((flags & SDLZH_REQUIRE_RECORD) != 0) && (!foundrecord) ){ >+ /* Write error message to log */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Required token %%record%% not found."); >+ result = ISC_R_FAILURE; >+ goto flag_fail; >+ } >+ >+ // if this query requires %zone%, make sure we found it >+ if( ((flags & SDLZH_REQUIRE_ZONE) != 0) && (!foundzone) ){ >+ /* Write error message to log */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Required token %%zone%% not found."); >+ result = ISC_R_FAILURE; >+ goto flag_fail; >+ } >+ >+ // pass back the query list >+ *querylist = (query_list_t *) tql; >+ >+ // return success >+ return (ISC_R_SUCCESS); >+ >+cleanup: >+ // get rid of temp_str >+ if(temp_str != NULL) >+ isc_mem_free(mctx, temp_str); >+ >+flag_fail: >+ // get rid of what was build of the query list >+ if(tql != NULL) >+ destroy_querylist(mctx, &tql); >+ return result; >+} >+ >+ /* build a query string from query segments, and dynamic segments >+ * dynamic segments replace where the tokens %zone%, %record%, %client% >+ * used to be in our queries from named.conf >+ */ >+char * >+build_querystring(isc_mem_t *mctx, query_list_t *querylist) >+{ >+ query_segment_t *tseg = NULL; >+ unsigned int length = 0; >+ char *qs = NULL; >+ >+ REQUIRE(mctx != NULL); >+ REQUIRE(querylist != NULL); >+ >+ // start at the top of the list >+ tseg = ISC_LIST_HEAD(*querylist); >+ while(tseg != NULL){ // loop to the end of the list >+ // if this is a query segment, use the >+ // precalculated string length >+ if (tseg->direct == isc_boolean_true) >+ length += tseg->strlen; >+ else // calculate string length for dynamic segments. >+ length += strlen(* (char**) tseg->sql); >+ tseg = ISC_LIST_NEXT(tseg, link); // get the next segment >+ } >+ >+ // allocate memory for the string >+ qs = isc_mem_allocate(mctx, length + 1); >+ // couldn't allocate memory, We need more ram! >+ if(qs == NULL) >+ return NULL; >+ >+ // start at the top of the list again >+ tseg = ISC_LIST_HEAD(*querylist); >+ // copy the first item in the list to the query string >+ if(tseg->direct == isc_boolean_true) // query segment >+ strcpy(qs, tseg->sql); >+ else >+ strcpy(qs, * (char**) tseg->sql); // dynamic segment >+ >+ // concatonate the rest of the segments >+ while((tseg = ISC_LIST_NEXT(tseg, link)) != NULL){ >+ if(tseg->direct == isc_boolean_true) // query segments >+ strcat(qs, tseg->sql); >+ else >+ strcat(qs, * (char**) tseg->sql); // dynamic segments >+ } >+ >+ return qs; >+} >+ >+ /* constructs a sql dbinstance (DBI) */ >+isc_result_t >+build_sqldbinstance(isc_mem_t *mctx, const char *allnodes_str, >+ const char *allowxfr_str, const char *authority_str, >+ const char *findzone_str, const char *lookup_str, >+ const char *countzone_str, dbinstance_t **dbi) >+{ >+ >+ isc_result_t result; >+ dbinstance_t *db = NULL; >+ >+ REQUIRE(dbi != NULL && *dbi == NULL); >+ REQUIRE(mctx != NULL); >+ >+ /* allocate and zero memory for driver structure */ >+ db = isc_mem_get(mctx, sizeof(dbinstance_t)); >+ if (db == NULL){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Could not allocate memory for database instance object."); >+ return (ISC_R_NOMEMORY); >+ } >+ memset(db, 0, sizeof(dbinstance_t)); >+ db->dbconn = NULL; >+ db->client = NULL; >+ db->record = NULL; >+ db->zone = NULL; >+ db->mctx = NULL; >+ db->query_buf = NULL; >+ db->allnodes_q = NULL; >+ db->allowxfr_q = NULL; >+ db->authority_q = NULL; >+ db->findzone_q = NULL; >+ db->countzone_q = NULL; >+ db->lookup_q = NULL; >+ >+ /* attach to the memory context */ >+ isc_mem_attach(mctx, &db->mctx); >+ >+ /* initialize the reference count mutex */ >+ result = isc_mutex_init(&db->instance_lock); >+ if (result != ISC_R_SUCCESS){ >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "isc_mutex_init() failed: %s", >+ isc_result_totext(result)); >+ goto cleanup; >+ } >+ >+ // build the all nodes query list >+ result = build_querylist(mctx, allnodes_str, &db->zone, &db->record, &db->client, >+ &db->allnodes_q, SDLZH_REQUIRE_ZONE); >+ // if unsuccessful, log err msg and cleanup >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Could not build all nodes query list"); >+ goto cleanup; >+ } >+ >+ // build the allow zone transfer query list >+ result = build_querylist(mctx, allowxfr_str, &db->zone, &db->record, &db->client, >+ &db->allowxfr_q, SDLZH_REQUIRE_ZONE | SDLZH_REQUIRE_CLIENT); >+ // if unsuccessful, log err msg and cleanup >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Could not build allow xfr query list"); >+ goto cleanup; >+ } >+ >+ // build the authority query, query list >+ result = build_querylist(mctx, authority_str, &db->zone, &db->record, &db->client, >+ &db->authority_q, SDLZH_REQUIRE_ZONE); >+ // if unsuccessful, log err msg and cleanup >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Could not build authority query list"); >+ goto cleanup; >+ } >+ >+ // build findzone query, query list >+ result = build_querylist(mctx, findzone_str, &db->zone, &db->record, &db->client, >+ &db->findzone_q, SDLZH_REQUIRE_ZONE); >+ // if unsuccessful, log err msg and cleanup >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Could not build find zone query list"); >+ goto cleanup; >+ } >+ >+ // build countzone query, query list >+ result = build_querylist(mctx, countzone_str, &db->zone, &db->record, &db->client, >+ &db->countzone_q, SDLZH_REQUIRE_ZONE); >+ // if unsuccessful, log err msg and cleanup >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Could not build count zone query list"); >+ goto cleanup; >+ } >+ >+ // build lookup query, query list >+ result = build_querylist(mctx, lookup_str, &db->zone, &db->record, &db->client, >+ &db->lookup_q, SDLZH_REQUIRE_RECORD); >+ // if unsuccessful, log err msg and cleanup >+ if(result != ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "Could not build lookup query list"); >+ goto cleanup; >+ } >+ >+ /* pass back the db instance */ >+ *dbi = (dbinstance_t *) db; >+ >+ // return success >+ return (ISC_R_SUCCESS); >+ >+cleanup: >+ // destroy whatever was build of the db instance >+ destroy_sqldbinstance(db); >+ // return failure >+ return (ISC_R_FAILURE); >+} >+ >+void >+destroy_sqldbinstance(dbinstance_t *dbi) >+{ >+ isc_mem_t *mctx; >+ >+ /* save mctx for later */ >+ mctx = dbi->mctx; >+ >+ /* destroy any query lists we created */ >+ destroy_querylist(mctx, &dbi->allnodes_q); >+ destroy_querylist(mctx, &dbi->allowxfr_q); >+ destroy_querylist(mctx, &dbi->authority_q); >+ destroy_querylist(mctx, &dbi->findzone_q); >+ destroy_querylist(mctx, &dbi->countzone_q); >+ destroy_querylist(mctx, &dbi->lookup_q); >+ >+ /* get rid of the mutex */ >+ isc_mutex_destroy(&dbi->instance_lock); >+ >+ /* return, and detach the memory */ >+ isc_mem_put(mctx, dbi, sizeof(dbinstance_t)); >+ isc_mem_detach(&mctx); >+} >+ >+char * >+getParameterValue(const char *input, const char* key) >+{ >+ int keylen; >+ char *keystart; >+ char value[255]; >+ int i; >+ >+ if(key == NULL || input == NULL || strlen(input) < 1) >+ return NULL; >+ >+ keylen = strlen(key); >+ >+ if(keylen < 1) >+ return NULL; >+ >+ keystart = strstr(input, key); >+ >+ if(keystart == NULL) >+ return NULL; >+ >+ for(i=0; i < 255; i++){ >+ value[i] = keystart[keylen + i]; >+ if(value[i] == ' ' || value[i] == '\0'){ >+ value[i] = '\0'; >+ break; >+ } >+ } >+ >+ return isc_mem_strdup(ns_g_mctx, value); >+ >+} >+ >+#endif >+ >diff -Naur bind-9.2.2-orig/bin/named/server.c bind-9.2.2/bin/named/server.c >--- bind-9.2.2-orig/bin/named/server.c Mon Feb 17 22:27:58 2003 >+++ bind-9.2.2/bin/named/server.c Thu May 1 18:14:09 2003 >@@ -41,6 +41,9 @@ > #include <dns/cache.h> > #include <dns/db.h> > #include <dns/dispatch.h> >+#ifdef DLZ >+#include <dns/dlz.h> >+#endif > #include <dns/forward.h> > #include <dns/journal.h> > #include <dns/keytable.h> >@@ -496,6 +499,11 @@ > cfg_obj_t *forwardtype; > cfg_obj_t *forwarders; > cfg_obj_t *zonelist; >+#ifdef DLZ >+ cfg_obj_t *dlz; >+ unsigned int dlzargc; >+ char **dlzargv; >+#endif > cfg_obj_t *obj; > cfg_listelt_t *element; > in_port_t port; >@@ -559,6 +567,34 @@ > CHECK(configure_zone(config, zconfig, vconfig, mctx, view, > actx)); > } >+ >+#ifdef DLZ >+ /* >+ * Create Dynamically Loadable Zone driver. >+ */ >+ dlz = NULL; >+ if (voptions != NULL) >+ (void)cfg_map_get(voptions, "dlz", &dlz); >+ else >+ (void)cfg_map_get(config, "dlz", &dlz); >+ >+ obj = NULL; >+ if (dlz != NULL){ >+ (void)cfg_map_get(cfg_tuple_get(dlz, "options"), "database", &obj); >+ if(obj != NULL){ >+ dns_dlzstrtoargv(mctx, cfg_obj_asstring(obj), &dlzargc, &dlzargv); >+ result = dns_dlzcreate(mctx, cfg_obj_asstring( >+ cfg_tuple_get(dlz, "name")), dlzargv[0], dlzargc, dlzargv, >+ &view->dlzdatabase); >+ if(result == ISC_R_SUCCESS){ >+ isc_mem_put(mctx, dlzargv, dlzargc * sizeof(*dlzargv)); >+ } else { >+ goto cleanup; >+ } >+ } >+ } >+ >+#endif > > /* > * Configure the view's cache. Try to reuse an existing >diff -Naur bind-9.2.2-orig/bin/named/xfrout.c bind-9.2.2/bin/named/xfrout.c >--- bind-9.2.2-orig/bin/named/xfrout.c Mon Oct 29 20:28:30 2001 >+++ bind-9.2.2/bin/named/xfrout.c Sun Apr 27 17:34:07 2003 >@@ -27,6 +27,9 @@ > > #include <dns/db.h> > #include <dns/dbiterator.h> >+#ifdef DLZ >+#include <dns/dlz.h> >+#endif > #include <dns/fixedname.h> > #include <dns/journal.h> > #include <dns/message.h> >@@ -890,6 +893,9 @@ > char msg[DNS_RDATACLASS_FORMATSIZE + DNS_NAME_FORMATSIZE > + sizeof("zone transfer '/'")]; > isc_boolean_t is_poll = ISC_FALSE; >+#ifdef DLZ >+ isc_boolean_t is_dlz = ISC_FALSE; >+#endif > > switch (reqtype) { > case dns_rdatatype_axfr: >@@ -940,19 +946,46 @@ > > result = dns_zt_find(client->view->zonetable, question_name, 0, NULL, > &zone); >+ > if (result != ISC_R_SUCCESS) >- FAILQ(DNS_R_NOTAUTH, "non-authoritative zone", >- question_name, question_class); >- switch(dns_zone_gettype(zone)) { >- case dns_zone_master: >- case dns_zone_slave: >- break; /* Master and slave zones are OK for transfer. */ >- default: >- FAILQ(DNS_R_NOTAUTH, "non-authoritative zone", >- question_name, question_class); >+#ifdef DLZ >+ { >+ /* Normal zone table does not have a match. Try the DLZ database */ >+ if(client->view->dlzdatabase != NULL) >+ { >+ result = dns_dlzallowzonexfr(client->view, question_name, &client->peeraddr, &db); >+ if(result == ISC_R_NOPERM){ >+ result = DNS_R_REFUSED; >+ goto failure; >+ } >+ if(result != ISC_R_SUCCESS) >+#endif >+ FAILQ(DNS_R_NOTAUTH, "non-authoritative zone", >+ question_name, question_class); >+#ifdef DLZ >+ is_dlz = ISC_TRUE; >+ /* DLZ only support full zone transfer, not incremental */ >+ if(reqtype != dns_rdatatype_axfr){ >+ mnemonic = "AXFR-style IXFR"; >+ reqtype = dns_rdatatype_axfr; >+ } >+ } else { /* not DLZ and not in normal zone table, we are not authoritative */ >+ FAILQ(DNS_R_NOTAUTH, "non-authoritative zone", question_name, question_class); >+ } >+ } else { /* zone table does have a match */ >+#endif >+ switch(dns_zone_gettype(zone)) { >+ case dns_zone_master: >+ case dns_zone_slave: >+ break; /* Master and slave zones are OK for transfer. */ >+ default: >+ FAILQ(DNS_R_NOTAUTH, "non-authoritative zone", question_name, question_class); >+ } >+ CHECK(dns_zone_getdb(zone, &db)); >+ dns_db_currentversion(db, &ver); >+#ifdef DLZ > } >- CHECK(dns_zone_getdb(zone, &db)); >- dns_db_currentversion(db, &ver); >+#endif > > xfrout_log1(client, question_name, question_class, ISC_LOG_DEBUG(6), > "%s question section OK", mnemonic); >@@ -1005,14 +1038,20 @@ > xfrout_log1(client, question_name, question_class, ISC_LOG_DEBUG(6), > "%s authority section OK", mnemonic); > >+#ifdef DLZ > /* >- * Decide whether to allow this transfer. >+ * if not a DLZ zone decide whether to allow this transfer. > */ >- ns_client_aclmsg("zone transfer", question_name, >- client->view->rdclass, msg, sizeof(msg)); >- CHECK(ns_client_checkacl(client, msg, >- dns_zone_getxfracl(zone), ISC_TRUE, >- ISC_LOG_ERROR)); >+ if( !is_dlz ){ >+#endif >+ ns_client_aclmsg("zone transfer", question_name, >+ client->view->rdclass, msg, sizeof(msg)); >+ CHECK(ns_client_checkacl(client, msg, >+ dns_zone_getxfracl(zone), ISC_TRUE, >+ ISC_LOG_ERROR)); >+#ifdef DLZ >+ } >+#endif > > /* > * AXFR over UDP is not possible. >@@ -1118,15 +1157,29 @@ > * Create the xfrout context object. This transfers the ownership > * of "stream", "db", "ver", and "quota" to the xfrout context object. > */ >- CHECK(xfrout_ctx_create(mctx, client, request->id, question_name, >- reqtype, question_class, db, ver, quota, >- stream, dns_message_gettsigkey(request), >- tsigbuf, >- dns_zone_getmaxxfrout(zone), >- dns_zone_getidleout(zone), >- (format == dns_many_answers) ? >+#ifdef DLZ >+ if(is_dlz) >+ CHECK(xfrout_ctx_create(mctx, client, request->id, question_name, >+ reqtype, question_class, db, ver, quota, >+ stream, dns_message_gettsigkey(request), >+ tsigbuf, >+ 3600, >+ 3600, >+ (format == dns_many_answers) ? > ISC_TRUE : ISC_FALSE, >- &xfr)); >+ &xfr)); >+ else >+#endif >+ CHECK(xfrout_ctx_create(mctx, client, request->id, question_name, >+ reqtype, question_class, db, ver, quota, >+ stream, dns_message_gettsigkey(request), >+ tsigbuf, >+ dns_zone_getmaxxfrout(zone), >+ dns_zone_getidleout(zone), >+ (format == dns_many_answers) ? >+ ISC_TRUE : ISC_FALSE, >+ &xfr)); >+ > stream = NULL; > db = NULL; > ver = NULL; >diff -Naur bind-9.2.2-orig/configure bind-9.2.2/configure >--- bind-9.2.2-orig/configure Mon Feb 17 23:16:24 2003 >+++ bind-9.2.2/configure Tue Oct 28 20:32:06 2003 >@@ -1,14673 +1,10846 @@ >-#! /bin/sh >-# From configure.in Revision: 1.294.2.16.4.2 . >-# Guess values for system-dependent variables and create Makefiles. >-# Generated by GNU Autoconf 2.53. >-# >-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 >-# Free Software Foundation, Inc. >-# This configure script is free software; the Free Software Foundation >-# gives unlimited permission to copy, distribute and modify it. >- >-# Find the correct PATH separator. Usually this is `:', but >-# DJGPP uses `;' like DOS. >-if test "X${PATH_SEPARATOR+set}" != Xset; then >- UNAME=${UNAME-`uname 2>/dev/null`} >- case X$UNAME in >- *-DOS) lt_cv_sys_path_separator=';' ;; >- *) lt_cv_sys_path_separator=':' ;; >- esac >-fi >- >- >-# Check that we are running under the correct shell. >-SHELL=${CONFIG_SHELL-/bin/sh} >- >-case X$ECHO in >-X*--fallback-echo) >- # Remove one level of quotation (which was required for Make). >- ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` >- ;; >-esac >- >-echo=${ECHO-echo} >-if test "X$1" = X--no-reexec; then >- # Discard the --no-reexec flag, and continue. >- shift >-elif test "X$1" = X--fallback-echo; then >- # Avoid inline document here, it may be left over >- : >-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then >- # Yippee, $echo works! >- : >-else >- # Restart under the correct shell. >- exec $SHELL "$0" --no-reexec ${1+"$@"} >-fi >- >-if test "X$1" = X--fallback-echo; then >- # used as fallback echo >- shift >- cat <<EOF >- >-EOF >- exit 0 >-fi >- >-# The HP-UX ksh and POSIX shell print the target directory to stdout >-# if CDPATH is set. >-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi >- >-if test -z "$ECHO"; then >-if test "X${echo_test_string+set}" != Xset; then >-# find a string as large as possible, as long as the shell can cope with it >- for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do >- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... >- if (echo_test_string="`eval $cmd`") 2>/dev/null && >- echo_test_string="`eval $cmd`" && >- (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null >- then >- break >- fi >- done >-fi >- >-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && >- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && >- test "X$echo_testing_string" = "X$echo_test_string"; then >- : >-else >- # The Solaris, AIX, and Digital Unix default echo programs unquote >- # backslashes. This makes it impossible to quote backslashes using >- # echo "$something" | sed 's/\\/\\\\/g' >- # >- # So, first we look for a working echo in the user's PATH. >- >- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" >- for dir in $PATH /usr/ucb; do >- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && >- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && >- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && >- test "X$echo_testing_string" = "X$echo_test_string"; then >- echo="$dir/echo" >- break >- fi >- done >- IFS="$save_ifs" >- >- if test "X$echo" = Xecho; then >- # We didn't find a better echo, so look for alternatives. >- if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && >- echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && >- test "X$echo_testing_string" = "X$echo_test_string"; then >- # This shell has a builtin print -r that does the trick. >- echo='print -r' >- elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && >- test "X$CONFIG_SHELL" != X/bin/ksh; then >- # If we have ksh, try running configure again with it. >- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} >- export ORIGINAL_CONFIG_SHELL >- CONFIG_SHELL=/bin/ksh >- export CONFIG_SHELL >- exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} >- else >- # Try using printf. >- echo='printf %s\n' >- if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && >- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && >- test "X$echo_testing_string" = "X$echo_test_string"; then >- # Cool, printf works >- : >- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && >- test "X$echo_testing_string" = 'X\t' && >- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && >- test "X$echo_testing_string" = "X$echo_test_string"; then >- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL >- export CONFIG_SHELL >- SHELL="$CONFIG_SHELL" >- export SHELL >- echo="$CONFIG_SHELL $0 --fallback-echo" >- elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && >- test "X$echo_testing_string" = 'X\t' && >- echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && >- test "X$echo_testing_string" = "X$echo_test_string"; then >- echo="$CONFIG_SHELL $0 --fallback-echo" >- else >- # maybe with a smaller string... >- prev=: >- >- for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do >- if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null >- then >- break >- fi >- prev="$cmd" >- done >- >- if test "$prev" != 'sed 50q "$0"'; then >- echo_test_string=`eval $prev` >- export echo_test_string >- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} >- else >- # Oops. We lost completely, so just stick with echo. >- echo=echo >- fi >- fi >- fi >- fi >-fi >-fi >- >-# Copy echo and quote the copy suitably for passing to libtool from >-# the Makefile, instead of quoting the original, which is used later. >-ECHO=$echo >-if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then >- ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" >-fi >- >- >- >-if expr a : '\(a\)' >/dev/null 2>&1; then >- as_expr=expr >-else >- as_expr=false >-fi >- >- >-## --------------------- ## >-## M4sh Initialization. ## >-## --------------------- ## >- >-# Be Bourne compatible >-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then >- emulate sh >- NULLCMD=: >-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then >- set -o posix >-fi >- >-# NLS nuisances. >-# Support unset when possible. >-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then >- as_unset=unset >-else >- as_unset=false >-fi >- >-(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && >- { $as_unset LANG || test "${LANG+set}" != set; } || >- { LANG=C; export LANG; } >-(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && >- { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || >- { LC_ALL=C; export LC_ALL; } >-(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && >- { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || >- { LC_TIME=C; export LC_TIME; } >-(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && >- { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || >- { LC_CTYPE=C; export LC_CTYPE; } >-(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && >- { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || >- { LANGUAGE=C; export LANGUAGE; } >-(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && >- { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || >- { LC_COLLATE=C; export LC_COLLATE; } >-(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && >- { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || >- { LC_NUMERIC=C; export LC_NUMERIC; } >-(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && >- { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || >- { LC_MESSAGES=C; export LC_MESSAGES; } >- >- >-# Name of the executable. >-as_me=`(basename "$0") 2>/dev/null || >-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ >- X"$0" : 'X\(//\)$' \| \ >- X"$0" : 'X\(/\)$' \| \ >- . : '\(.\)' 2>/dev/null || >-echo X/"$0" | >- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } >- /^X\/\(\/\/\)$/{ s//\1/; q; } >- /^X\/\(\/\).*/{ s//\1/; q; } >- s/.*/./; q'` >- >-# PATH needs CR, and LINENO needs CR and PATH. >-# Avoid depending upon Character Ranges. >-as_cr_letters='abcdefghijklmnopqrstuvwxyz' >-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' >-as_cr_Letters=$as_cr_letters$as_cr_LETTERS >-as_cr_digits='0123456789' >-as_cr_alnum=$as_cr_Letters$as_cr_digits >- >-# The user is always right. >-if test "${PATH_SEPARATOR+set}" != set; then >- echo "#! /bin/sh" >conftest.sh >- echo "exit 0" >>conftest.sh >- chmod +x conftest.sh >- if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then >- PATH_SEPARATOR=';' >- else >- PATH_SEPARATOR=: >- fi >- rm -f conftest.sh >-fi >- >- >- as_lineno_1=$LINENO >- as_lineno_2=$LINENO >- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` >- test "x$as_lineno_1" != "x$as_lineno_2" && >- test "x$as_lineno_3" = "x$as_lineno_2" || { >- # Find who we are. Look in the path if we contain no path at all >- # relative or not. >- case $0 in >- *[\\/]* ) as_myself=$0 ;; >- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break >-done >- >- ;; >- esac >- # We did not find ourselves, most probably we were run as `sh COMMAND' >- # in which case we are not to be found in the path. >- if test "x$as_myself" = x; then >- as_myself=$0 >- fi >- if test ! -f "$as_myself"; then >- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 >- { (exit 1); exit 1; }; } >- fi >- case $CONFIG_SHELL in >- '') >- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for as_base in sh bash ksh sh5; do >- case $as_dir in >- /*) >- if ("$as_dir/$as_base" -c ' >- as_lineno_1=$LINENO >- as_lineno_2=$LINENO >- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` >- test "x$as_lineno_1" != "x$as_lineno_2" && >- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then >- CONFIG_SHELL=$as_dir/$as_base >- export CONFIG_SHELL >- exec "$CONFIG_SHELL" "$0" ${1+"$@"} >- fi;; >- esac >- done >-done >-;; >- esac >- >- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO >- # uniformly replaced by the line number. The first 'sed' inserts a >- # line-number line before each line; the second 'sed' does the real >- # work. The second script uses 'N' to pair each line-number line >- # with the numbered line, and appends trailing '-' during >- # substitution so that $LINENO is not a special case at line end. >- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the >- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) >- sed '=' <$as_myself | >- sed ' >- N >- s,$,-, >- : loop >- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, >- t loop >- s,-$,, >- s,^['$as_cr_digits']*\n,, >- ' >$as_me.lineno && >- chmod +x $as_me.lineno || >- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 >- { (exit 1); exit 1; }; } >- >- # Don't try to exec as it changes $[0], causing all sort of problems >- # (the dirname of $[0] is not the place where we might find the >- # original and so on. Autoconf is especially sensible to this). >- . ./$as_me.lineno >- # Exit status is that of the last command. >- exit >-} >- >- >-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in >- *c*,-n*) ECHO_N= ECHO_C=' >-' ECHO_T=' ' ;; >- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; >- *) ECHO_N= ECHO_C='\c' ECHO_T= ;; >-esac >- >-if expr a : '\(a\)' >/dev/null 2>&1; then >- as_expr=expr >-else >- as_expr=false >-fi >- >-rm -f conf$$ conf$$.exe conf$$.file >-echo >conf$$.file >-if ln -s conf$$.file conf$$ 2>/dev/null; then >- # We could just check for DJGPP; but this test a) works b) is more generic >- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). >- if test -f conf$$.exe; then >- # Don't use ln at all; we don't have any links >- as_ln_s='cp -p' >- else >- as_ln_s='ln -s' >- fi >-elif ln conf$$.file conf$$ 2>/dev/null; then >- as_ln_s=ln >-else >- as_ln_s='cp -p' >-fi >-rm -f conf$$ conf$$.exe conf$$.file >- >-as_executable_p="test -f" >- >-# Sed expression to map a string onto a valid CPP name. >-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" >- >-# Sed expression to map a string onto a valid variable name. >-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" >- >- >-# IFS >-# We need space, tab and new line, in precisely that order. >-as_nl=' >-' >-IFS=" $as_nl" >- >-# CDPATH. >-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } >- >- >-# Name of the host. >-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, >-# so uname gets run too. >-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` >- >-exec 6>&1 >- >-# >-# Initializations. >-# >-ac_default_prefix=/usr/local >-cross_compiling=no >-subdirs= >-MFLAGS= >-MAKEFLAGS= >-SHELL=${CONFIG_SHELL-/bin/sh} >- >-# Maximum number of lines to put in a shell here document. >-# This variable seems obsolete. It should probably be removed, and >-# only ac_max_sed_lines should be used. >-: ${ac_max_here_lines=38} >- >-# Identity of this package. >-PACKAGE_NAME= >-PACKAGE_TARNAME= >-PACKAGE_VERSION= >-PACKAGE_STRING= >-PACKAGE_BUGREPORT= >- >-ac_unique_file="lib/dns/name.c" >-ac_subdirs_all="$ac_subdirs_all lib/bind" >-# Factoring default headers for most tests. >-ac_includes_default="\ >-#include <stdio.h> >-#if HAVE_SYS_TYPES_H >-# include <sys/types.h> >-#endif >-#if HAVE_SYS_STAT_H >-# include <sys/stat.h> >-#endif >-#if STDC_HEADERS >-# include <stdlib.h> >-# include <stddef.h> >-#else >-# if HAVE_STDLIB_H >-# include <stdlib.h> >-# endif >-#endif >-#if HAVE_STRING_H >-# if !STDC_HEADERS && HAVE_MEMORY_H >-# include <memory.h> >-# endif >-# include <string.h> >-#endif >-#if HAVE_STRINGS_H >-# include <strings.h> >-#endif >-#if HAVE_INTTYPES_H >-# include <inttypes.h> >-#else >-# if HAVE_STDINT_H >-# include <stdint.h> >-# endif >-#endif >-#if HAVE_UNISTD_H >-# include <unistd.h> >-#endif" >- >- >-# Initialize some variables set by options. >-ac_init_help= >-ac_init_version=false >-# The variables have the same names as the options, with >-# dashes changed to underlines. >-cache_file=/dev/null >-exec_prefix=NONE >-no_create= >-no_recursion= >-prefix=NONE >-program_prefix=NONE >-program_suffix=NONE >-program_transform_name=s,x,x, >-silent= >-site= >-srcdir= >-verbose= >-x_includes=NONE >-x_libraries=NONE >- >-# Installation directory options. >-# These are left unexpanded so users can "make install exec_prefix=/foo" >-# and all the variables that are supposed to be based on exec_prefix >-# by default will actually change. >-# Use braces instead of parens because sh, perl, etc. also accept them. >-bindir='${exec_prefix}/bin' >-sbindir='${exec_prefix}/sbin' >-libexecdir='${exec_prefix}/libexec' >-datadir='${prefix}/share' >-sysconfdir='${prefix}/etc' >-sharedstatedir='${prefix}/com' >-localstatedir='${prefix}/var' >-libdir='${exec_prefix}/lib' >-includedir='${prefix}/include' >-oldincludedir='/usr/include' >-infodir='${prefix}/info' >-mandir='${prefix}/man' >- >-ac_prev= >-for ac_option >-do >- # If the previous option needs an argument, assign it. >- if test -n "$ac_prev"; then >- eval "$ac_prev=\$ac_option" >- ac_prev= >- continue >- fi >- >- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` >- >- # Accept the important Cygnus configure options, so we can diagnose typos. >- >- case $ac_option in >- >- -bindir | --bindir | --bindi | --bind | --bin | --bi) >- ac_prev=bindir ;; >- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) >- bindir=$ac_optarg ;; >- >- -build | --build | --buil | --bui | --bu) >- ac_prev=build_alias ;; >- -build=* | --build=* | --buil=* | --bui=* | --bu=*) >- build_alias=$ac_optarg ;; >- >- -cache-file | --cache-file | --cache-fil | --cache-fi \ >- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) >- ac_prev=cache_file ;; >- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ >- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) >- cache_file=$ac_optarg ;; >- >- --config-cache | -C) >- cache_file=config.cache ;; >- >- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) >- ac_prev=datadir ;; >- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ >- | --da=*) >- datadir=$ac_optarg ;; >- >- -disable-* | --disable-*) >- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` >- # Reject names that are not valid shell variable names. >- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && >- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 >- { (exit 1); exit 1; }; } >- ac_feature=`echo $ac_feature | sed 's/-/_/g'` >- eval "enable_$ac_feature=no" ;; >- >- -enable-* | --enable-*) >- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` >- # Reject names that are not valid shell variable names. >- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && >- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 >- { (exit 1); exit 1; }; } >- ac_feature=`echo $ac_feature | sed 's/-/_/g'` >- case $ac_option in >- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; >- *) ac_optarg=yes ;; >- esac >- eval "enable_$ac_feature='$ac_optarg'" ;; >- >- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ >- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ >- | --exec | --exe | --ex) >- ac_prev=exec_prefix ;; >- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ >- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ >- | --exec=* | --exe=* | --ex=*) >- exec_prefix=$ac_optarg ;; >- >- -gas | --gas | --ga | --g) >- # Obsolete; use --with-gas. >- with_gas=yes ;; >- >- -help | --help | --hel | --he | -h) >- ac_init_help=long ;; >- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) >- ac_init_help=recursive ;; >- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) >- ac_init_help=short ;; >- >- -host | --host | --hos | --ho) >- ac_prev=host_alias ;; >- -host=* | --host=* | --hos=* | --ho=*) >- host_alias=$ac_optarg ;; >- >- -includedir | --includedir | --includedi | --included | --include \ >- | --includ | --inclu | --incl | --inc) >- ac_prev=includedir ;; >- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ >- | --includ=* | --inclu=* | --incl=* | --inc=*) >- includedir=$ac_optarg ;; >- >- -infodir | --infodir | --infodi | --infod | --info | --inf) >- ac_prev=infodir ;; >- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) >- infodir=$ac_optarg ;; >- >- -libdir | --libdir | --libdi | --libd) >- ac_prev=libdir ;; >- -libdir=* | --libdir=* | --libdi=* | --libd=*) >- libdir=$ac_optarg ;; >- >- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ >- | --libexe | --libex | --libe) >- ac_prev=libexecdir ;; >- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ >- | --libexe=* | --libex=* | --libe=*) >- libexecdir=$ac_optarg ;; >- >- -localstatedir | --localstatedir | --localstatedi | --localstated \ >- | --localstate | --localstat | --localsta | --localst \ >- | --locals | --local | --loca | --loc | --lo) >- ac_prev=localstatedir ;; >- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ >- | --localstate=* | --localstat=* | --localsta=* | --localst=* \ >- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) >- localstatedir=$ac_optarg ;; >- >- -mandir | --mandir | --mandi | --mand | --man | --ma | --m) >- ac_prev=mandir ;; >- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) >- mandir=$ac_optarg ;; >- >- -nfp | --nfp | --nf) >- # Obsolete; use --without-fp. >- with_fp=no ;; >- >- -no-create | --no-create | --no-creat | --no-crea | --no-cre \ >- | --no-cr | --no-c | -n) >- no_create=yes ;; >- >- -no-recursion | --no-recursion | --no-recursio | --no-recursi \ >- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) >- no_recursion=yes ;; >- >- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ >- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ >- | --oldin | --oldi | --old | --ol | --o) >- ac_prev=oldincludedir ;; >- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ >- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ >- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) >- oldincludedir=$ac_optarg ;; >- >- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) >- ac_prev=prefix ;; >- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) >- prefix=$ac_optarg ;; >- >- -program-prefix | --program-prefix | --program-prefi | --program-pref \ >- | --program-pre | --program-pr | --program-p) >- ac_prev=program_prefix ;; >- -program-prefix=* | --program-prefix=* | --program-prefi=* \ >- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) >- program_prefix=$ac_optarg ;; >- >- -program-suffix | --program-suffix | --program-suffi | --program-suff \ >- | --program-suf | --program-su | --program-s) >- ac_prev=program_suffix ;; >- -program-suffix=* | --program-suffix=* | --program-suffi=* \ >- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) >- program_suffix=$ac_optarg ;; >- >- -program-transform-name | --program-transform-name \ >- | --program-transform-nam | --program-transform-na \ >- | --program-transform-n | --program-transform- \ >- | --program-transform | --program-transfor \ >- | --program-transfo | --program-transf \ >- | --program-trans | --program-tran \ >- | --progr-tra | --program-tr | --program-t) >- ac_prev=program_transform_name ;; >- -program-transform-name=* | --program-transform-name=* \ >- | --program-transform-nam=* | --program-transform-na=* \ >- | --program-transform-n=* | --program-transform-=* \ >- | --program-transform=* | --program-transfor=* \ >- | --program-transfo=* | --program-transf=* \ >- | --program-trans=* | --program-tran=* \ >- | --progr-tra=* | --program-tr=* | --program-t=*) >- program_transform_name=$ac_optarg ;; >- >- -q | -quiet | --quiet | --quie | --qui | --qu | --q \ >- | -silent | --silent | --silen | --sile | --sil) >- silent=yes ;; >- >- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) >- ac_prev=sbindir ;; >- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ >- | --sbi=* | --sb=*) >- sbindir=$ac_optarg ;; >- >- -sharedstatedir | --sharedstatedir | --sharedstatedi \ >- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ >- | --sharedst | --shareds | --shared | --share | --shar \ >- | --sha | --sh) >- ac_prev=sharedstatedir ;; >- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ >- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ >- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ >- | --sha=* | --sh=*) >- sharedstatedir=$ac_optarg ;; >- >- -site | --site | --sit) >- ac_prev=site ;; >- -site=* | --site=* | --sit=*) >- site=$ac_optarg ;; >- >- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) >- ac_prev=srcdir ;; >- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) >- srcdir=$ac_optarg ;; >- >- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ >- | --syscon | --sysco | --sysc | --sys | --sy) >- ac_prev=sysconfdir ;; >- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ >- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) >- sysconfdir=$ac_optarg ;; >- >- -target | --target | --targe | --targ | --tar | --ta | --t) >- ac_prev=target_alias ;; >- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) >- target_alias=$ac_optarg ;; >- >- -v | -verbose | --verbose | --verbos | --verbo | --verb) >- verbose=yes ;; >- >- -version | --version | --versio | --versi | --vers | -V) >- ac_init_version=: ;; >- >- -with-* | --with-*) >- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` >- # Reject names that are not valid shell variable names. >- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && >- { echo "$as_me: error: invalid package name: $ac_package" >&2 >- { (exit 1); exit 1; }; } >- ac_package=`echo $ac_package| sed 's/-/_/g'` >- case $ac_option in >- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; >- *) ac_optarg=yes ;; >- esac >- eval "with_$ac_package='$ac_optarg'" ;; >- >- -without-* | --without-*) >- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` >- # Reject names that are not valid shell variable names. >- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && >- { echo "$as_me: error: invalid package name: $ac_package" >&2 >- { (exit 1); exit 1; }; } >- ac_package=`echo $ac_package | sed 's/-/_/g'` >- eval "with_$ac_package=no" ;; >- >- --x) >- # Obsolete; use --with-x. >- with_x=yes ;; >- >- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ >- | --x-incl | --x-inc | --x-in | --x-i) >- ac_prev=x_includes ;; >- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ >- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) >- x_includes=$ac_optarg ;; >- >- -x-libraries | --x-libraries | --x-librarie | --x-librari \ >- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) >- ac_prev=x_libraries ;; >- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ >- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) >- x_libraries=$ac_optarg ;; >- >- -*) { echo "$as_me: error: unrecognized option: $ac_option >-Try \`$0 --help' for more information." >&2 >- { (exit 1); exit 1; }; } >- ;; >- >- *=*) >- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` >- # Reject names that are not valid shell variable names. >- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && >- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 >- { (exit 1); exit 1; }; } >- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` >- eval "$ac_envvar='$ac_optarg'" >- export $ac_envvar ;; >- >- *) >- # FIXME: should be removed in autoconf 3.0. >- echo "$as_me: WARNING: you should use --build, --host, --target" >&2 >- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && >- echo "$as_me: WARNING: invalid host type: $ac_option" >&2 >- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} >- ;; >- >- esac >-done >- >-if test -n "$ac_prev"; then >- ac_option=--`echo $ac_prev | sed 's/_/-/g'` >- { echo "$as_me: error: missing argument to $ac_option" >&2 >- { (exit 1); exit 1; }; } >-fi >- >-# Be sure to have absolute paths. >-for ac_var in exec_prefix prefix >-do >- eval ac_val=$`echo $ac_var` >- case $ac_val in >- [\\/$]* | ?:[\\/]* | NONE | '' ) ;; >- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 >- { (exit 1); exit 1; }; };; >- esac >-done >- >-# Be sure to have absolute paths. >-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ >- localstatedir libdir includedir oldincludedir infodir mandir >-do >- eval ac_val=$`echo $ac_var` >- case $ac_val in >- [\\/$]* | ?:[\\/]* ) ;; >- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 >- { (exit 1); exit 1; }; };; >- esac >-done >- >-# There might be people who depend on the old broken behavior: `$host' >-# used to hold the argument of --host etc. >-# FIXME: To remove some day. >-build=$build_alias >-host=$host_alias >-target=$target_alias >- >-# FIXME: To remove some day. >-if test "x$host_alias" != x; then >- if test "x$build_alias" = x; then >- cross_compiling=maybe >- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. >- If a cross compiler is detected then cross compile mode will be used." >&2 >- elif test "x$build_alias" != "x$host_alias"; then >- cross_compiling=yes >- fi >-fi >- >-ac_tool_prefix= >-test -n "$host_alias" && ac_tool_prefix=$host_alias- >- >-test "$silent" = yes && exec 6>/dev/null >- >- >-# Find the source files, if location was not specified. >-if test -z "$srcdir"; then >- ac_srcdir_defaulted=yes >- # Try the directory containing this script, then its parent. >- ac_confdir=`(dirname "$0") 2>/dev/null || >-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ >- X"$0" : 'X\(//\)[^/]' \| \ >- X"$0" : 'X\(//\)$' \| \ >- X"$0" : 'X\(/\)' \| \ >- . : '\(.\)' 2>/dev/null || >-echo X"$0" | >- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } >- /^X\(\/\/\)[^/].*/{ s//\1/; q; } >- /^X\(\/\/\)$/{ s//\1/; q; } >- /^X\(\/\).*/{ s//\1/; q; } >- s/.*/./; q'` >- srcdir=$ac_confdir >- if test ! -r $srcdir/$ac_unique_file; then >- srcdir=.. >- fi >-else >- ac_srcdir_defaulted=no >-fi >-if test ! -r $srcdir/$ac_unique_file; then >- if test "$ac_srcdir_defaulted" = yes; then >- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 >- { (exit 1); exit 1; }; } >- else >- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 >- { (exit 1); exit 1; }; } >- fi >-fi >-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` >-ac_env_build_alias_set=${build_alias+set} >-ac_env_build_alias_value=$build_alias >-ac_cv_env_build_alias_set=${build_alias+set} >-ac_cv_env_build_alias_value=$build_alias >-ac_env_host_alias_set=${host_alias+set} >-ac_env_host_alias_value=$host_alias >-ac_cv_env_host_alias_set=${host_alias+set} >-ac_cv_env_host_alias_value=$host_alias >-ac_env_target_alias_set=${target_alias+set} >-ac_env_target_alias_value=$target_alias >-ac_cv_env_target_alias_set=${target_alias+set} >-ac_cv_env_target_alias_value=$target_alias >-ac_env_CC_set=${CC+set} >-ac_env_CC_value=$CC >-ac_cv_env_CC_set=${CC+set} >-ac_cv_env_CC_value=$CC >-ac_env_CFLAGS_set=${CFLAGS+set} >-ac_env_CFLAGS_value=$CFLAGS >-ac_cv_env_CFLAGS_set=${CFLAGS+set} >-ac_cv_env_CFLAGS_value=$CFLAGS >-ac_env_LDFLAGS_set=${LDFLAGS+set} >-ac_env_LDFLAGS_value=$LDFLAGS >-ac_cv_env_LDFLAGS_set=${LDFLAGS+set} >-ac_cv_env_LDFLAGS_value=$LDFLAGS >-ac_env_CPPFLAGS_set=${CPPFLAGS+set} >-ac_env_CPPFLAGS_value=$CPPFLAGS >-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} >-ac_cv_env_CPPFLAGS_value=$CPPFLAGS >-ac_env_CPP_set=${CPP+set} >-ac_env_CPP_value=$CPP >-ac_cv_env_CPP_set=${CPP+set} >-ac_cv_env_CPP_value=$CPP >- >-# >-# Report the --help message. >-# >-if test "$ac_init_help" = "long"; then >- # Omit some internal or obsolete options to make the list less imposing. >- # This message is too long to be a string in the A/UX 3.1 sh. >- cat <<_ACEOF >-\`configure' configures this package to adapt to many kinds of systems. >- >-Usage: $0 [OPTION]... [VAR=VALUE]... >- >-To assign environment variables (e.g., CC, CFLAGS...), specify them as >-VAR=VALUE. See below for descriptions of some of the useful variables. >- >-Defaults for the options are specified in brackets. >- >-Configuration: >- -h, --help display this help and exit >- --help=short display options specific to this package >- --help=recursive display the short help of all the included packages >- -V, --version display version information and exit >- -q, --quiet, --silent do not print \`checking...' messages >- --cache-file=FILE cache test results in FILE [disabled] >- -C, --config-cache alias for \`--cache-file=config.cache' >- -n, --no-create do not create output files >- --srcdir=DIR find the sources in DIR [configure dir or \`..'] >- >-_ACEOF >- >- cat <<_ACEOF >-Installation directories: >- --prefix=PREFIX install architecture-independent files in PREFIX >- [$ac_default_prefix] >- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX >- [PREFIX] >- >-By default, \`make install' will install all the files in >-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify >-an installation prefix other than \`$ac_default_prefix' using \`--prefix', >-for instance \`--prefix=\$HOME'. >- >-For better control, use the options below. >- >-Fine tuning of the installation directories: >- --bindir=DIR user executables [EPREFIX/bin] >- --sbindir=DIR system admin executables [EPREFIX/sbin] >- --libexecdir=DIR program executables [EPREFIX/libexec] >- --datadir=DIR read-only architecture-independent data [PREFIX/share] >- --sysconfdir=DIR read-only single-machine data [PREFIX/etc] >- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] >- --localstatedir=DIR modifiable single-machine data [PREFIX/var] >- --libdir=DIR object code libraries [EPREFIX/lib] >- --includedir=DIR C header files [PREFIX/include] >- --oldincludedir=DIR C header files for non-gcc [/usr/include] >- --infodir=DIR info documentation [PREFIX/info] >- --mandir=DIR man documentation [PREFIX/man] >-_ACEOF >- >- cat <<\_ACEOF >- >-System types: >- --build=BUILD configure for building on BUILD [guessed] >- --host=HOST cross-compile to build programs to run on HOST [BUILD] >-_ACEOF >-fi >- >-if test -n "$ac_init_help"; then >- >- cat <<\_ACEOF >- >-Optional Features: >- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) >- --enable-FEATURE[=ARG] include FEATURE [ARG=yes] >- --enable-threads enable multithreading >- --enable-shared=PKGS build shared libraries default=yes >- --enable-static=PKGS build static libraries default=yes >- --enable-fast-install=PKGS optimize for fast installation default=yes >- --disable-libtool-lock avoid locking (might break parallel builds) >- --enable-libbind build libbind default=no >- --enable-ipv6 use IPv6 default=autodetect >- --disable-linux-caps disable linux capabilities >- >-Optional Packages: >- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] >- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) >- --with-openssl=PATH Build with OpenSSL yes|no|path. >- (Required for DNSSEC) >- --with-randomdev=PATH Specify path for random device >- --with-ptl2 on NetBSD, use the ptl2 thread library (experimental) >- --with-purify=PATH use Rational purify >- --with-libtool use GNU libtool (following indented options supported) >- --with-gnu-ld assume the C compiler uses GNU ld default=no >- --with-pic try to use only PIC/non-PIC objects default=use both >- --with-kame=PATH use Kame IPv6 default path /usr/local/v6 >- >-Some influential environment variables: >- CC C compiler command >- CFLAGS C compiler flags >- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a >- nonstandard directory <lib dir> >- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have >- headers in a nonstandard directory <include dir> >- CPP C preprocessor >- >-Use these variables to override the choices made by `configure' or to help >-it to find libraries and programs with nonstandard names/locations. >- >-_ACEOF >-fi >- >-if test "$ac_init_help" = "recursive"; then >- # If there are subdirs, report their specific --help. >- ac_popdir=`pwd` >- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue >- test -d $ac_dir || continue >- ac_builddir=. >- >-if test "$ac_dir" != .; then >- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` >- # A "../" for each directory in $ac_dir_suffix. >- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` >-else >- ac_dir_suffix= ac_top_builddir= >-fi >- >-case $srcdir in >- .) # No --srcdir option. We are building in place. >- ac_srcdir=. >- if test -z "$ac_top_builddir"; then >- ac_top_srcdir=. >- else >- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` >- fi ;; >- [\\/]* | ?:[\\/]* ) # Absolute path. >- ac_srcdir=$srcdir$ac_dir_suffix; >- ac_top_srcdir=$srcdir ;; >- *) # Relative path. >- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix >- ac_top_srcdir=$ac_top_builddir$srcdir ;; >-esac >-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be >-# absolute. >-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` >-ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` >-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` >-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` >- >- cd $ac_dir >- # Check for guested configure; otherwise get Cygnus style configure. >- if test -f $ac_srcdir/configure.gnu; then >- echo >- $SHELL $ac_srcdir/configure.gnu --help=recursive >- elif test -f $ac_srcdir/configure; then >- echo >- $SHELL $ac_srcdir/configure --help=recursive >- elif test -f $ac_srcdir/configure.ac || >- test -f $ac_srcdir/configure.in; then >- echo >- $ac_configure --help >- else >- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 >- fi >- cd $ac_popdir >- done >-fi >- >-test -n "$ac_init_help" && exit 0 >-if $ac_init_version; then >- cat <<\_ACEOF >- >-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 >-Free Software Foundation, Inc. >-This configure script is free software; the Free Software Foundation >-gives unlimited permission to copy, distribute and modify it. >-_ACEOF >- exit 0 >-fi >-exec 5>config.log >-cat >&5 <<_ACEOF >-This file contains any messages produced by compilers while >-running configure, to aid debugging if configure makes a mistake. >- >-It was created by $as_me, which was >-generated by GNU Autoconf 2.53. Invocation command line was >- >- $ $0 $@ >- >-_ACEOF >-{ >-cat <<_ASUNAME >-## --------- ## >-## Platform. ## >-## --------- ## >- >-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` >-uname -m = `(uname -m) 2>/dev/null || echo unknown` >-uname -r = `(uname -r) 2>/dev/null || echo unknown` >-uname -s = `(uname -s) 2>/dev/null || echo unknown` >-uname -v = `(uname -v) 2>/dev/null || echo unknown` >- >-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` >-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` >- >-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` >-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` >-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` >-hostinfo = `(hostinfo) 2>/dev/null || echo unknown` >-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` >-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` >-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` >- >-_ASUNAME >- >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- echo "PATH: $as_dir" >-done >- >-} >&5 >- >-cat >&5 <<_ACEOF >- >- >-## ----------- ## >-## Core tests. ## >-## ----------- ## >- >-_ACEOF >- >- >-# Keep a trace of the command line. >-# Strip out --no-create and --no-recursion so they do not pile up. >-# Also quote any args containing shell meta-characters. >-ac_configure_args= >-ac_sep= >-for ac_arg >-do >- case $ac_arg in >- -no-create | --no-create | --no-creat | --no-crea | --no-cre \ >- | --no-cr | --no-c | -n ) continue ;; >- -no-recursion | --no-recursion | --no-recursio | --no-recursi \ >- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) >- continue ;; >- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) >- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; >- esac >- case " $ac_configure_args " in >- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. >- *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" >- ac_sep=" " ;; >- esac >- # Get rid of the leading space. >-done >- >-# When interrupted or exit'd, cleanup temporary files, and complete >-# config.log. We remove comments because anyway the quotes in there >-# would cause problems or look ugly. >-# WARNING: Be sure not to use single quotes in there, as some shells, >-# such as our DU 5.0 friend, will then `close' the trap. >-trap 'exit_status=$? >- # Save into config.log some information that might help in debugging. >- { >- echo >- cat <<\_ASBOX >-## ---------------- ## >-## Cache variables. ## >-## ---------------- ## >-_ASBOX >- echo >- # The following way of writing the cache mishandles newlines in values, >-{ >- (set) 2>&1 | >- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in >- *ac_space=\ *) >- sed -n \ >- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; >- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" >- ;; >- *) >- sed -n \ >- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" >- ;; >- esac; >-} >- echo >- if test -s confdefs.h; then >- cat <<\_ASBOX >-## ----------- ## >-## confdefs.h. ## >-## ----------- ## >-_ASBOX >- echo >- sed "/^$/d" confdefs.h >- echo >- fi >- test "$ac_signal" != 0 && >- echo "$as_me: caught signal $ac_signal" >- echo "$as_me: exit $exit_status" >- } >&5 >- rm -f core core.* *.core && >- rm -rf conftest* confdefs* conf$$* $ac_clean_files && >- exit $exit_status >- ' 0 >-for ac_signal in 1 2 13 15; do >- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal >-done >-ac_signal=0 >- >-# confdefs.h avoids OS command line length limits that DEFS can exceed. >-rm -rf conftest* confdefs.h >-# AIX cpp loses on an empty file, so make sure it contains at least a newline. >-echo >confdefs.h >- >-# Predefined preprocessor variables. >- >-cat >>confdefs.h <<_ACEOF >-#define PACKAGE_NAME "$PACKAGE_NAME" >-_ACEOF >- >- >-cat >>confdefs.h <<_ACEOF >-#define PACKAGE_TARNAME "$PACKAGE_TARNAME" >-_ACEOF >- >- >-cat >>confdefs.h <<_ACEOF >-#define PACKAGE_VERSION "$PACKAGE_VERSION" >-_ACEOF >- >- >-cat >>confdefs.h <<_ACEOF >-#define PACKAGE_STRING "$PACKAGE_STRING" >-_ACEOF >- >- >-cat >>confdefs.h <<_ACEOF >-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" >-_ACEOF >- >- >-# Let the site file select an alternate cache file if it wants to. >-# Prefer explicitly selected file to automatically selected ones. >-if test -z "$CONFIG_SITE"; then >- if test "x$prefix" != xNONE; then >- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" >- else >- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" >- fi >-fi >-for ac_site_file in $CONFIG_SITE; do >- if test -r "$ac_site_file"; then >- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 >-echo "$as_me: loading site script $ac_site_file" >&6;} >- sed 's/^/| /' "$ac_site_file" >&5 >- . "$ac_site_file" >- fi >-done >- >-if test -r "$cache_file"; then >- # Some versions of bash will fail to source /dev/null (special >- # files actually), so we avoid doing that. >- if test -f "$cache_file"; then >- { echo "$as_me:$LINENO: loading cache $cache_file" >&5 >-echo "$as_me: loading cache $cache_file" >&6;} >- case $cache_file in >- [\\/]* | ?:[\\/]* ) . $cache_file;; >- *) . ./$cache_file;; >- esac >- fi >-else >- { echo "$as_me:$LINENO: creating cache $cache_file" >&5 >-echo "$as_me: creating cache $cache_file" >&6;} >- >$cache_file >-fi >- >-# Check that the precious variables saved in the cache have kept the same >-# value. >-ac_cache_corrupted=false >-for ac_var in `(set) 2>&1 | >- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do >- eval ac_old_set=\$ac_cv_env_${ac_var}_set >- eval ac_new_set=\$ac_env_${ac_var}_set >- eval ac_old_val="\$ac_cv_env_${ac_var}_value" >- eval ac_new_val="\$ac_env_${ac_var}_value" >- case $ac_old_set,$ac_new_set in >- set,) >- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 >-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} >- ac_cache_corrupted=: ;; >- ,set) >- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 >-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} >- ac_cache_corrupted=: ;; >- ,);; >- *) >- if test "x$ac_old_val" != "x$ac_new_val"; then >- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 >-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} >- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 >-echo "$as_me: former value: $ac_old_val" >&2;} >- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 >-echo "$as_me: current value: $ac_new_val" >&2;} >- ac_cache_corrupted=: >- fi;; >- esac >- # Pass precious variables to config.status. >- if test "$ac_new_set" = set; then >- case $ac_new_val in >- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) >- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; >- *) ac_arg=$ac_var=$ac_new_val ;; >- esac >- case " $ac_configure_args " in >- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. >- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; >- esac >- fi >-done >-if $ac_cache_corrupted; then >- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 >-echo "$as_me: error: changes in the environment can compromise the build" >&2;} >- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 >-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} >- { (exit 1); exit 1; }; } >-fi >- >-ac_ext=c >-ac_cpp='$CPP $CPPFLAGS' >-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' >-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >-ac_compiler_gnu=$ac_cv_c_compiler_gnu >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >-ac_config_headers="$ac_config_headers config.h" >- >-ac_aux_dir= >-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do >- if test -f $ac_dir/install-sh; then >- ac_aux_dir=$ac_dir >- ac_install_sh="$ac_aux_dir/install-sh -c" >- break >- elif test -f $ac_dir/install.sh; then >- ac_aux_dir=$ac_dir >- ac_install_sh="$ac_aux_dir/install.sh -c" >- break >- elif test -f $ac_dir/shtool; then >- ac_aux_dir=$ac_dir >- ac_install_sh="$ac_aux_dir/shtool install -c" >- break >- fi >-done >-if test -z "$ac_aux_dir"; then >- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 >-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} >- { (exit 1); exit 1; }; } >-fi >-ac_config_guess="$SHELL $ac_aux_dir/config.guess" >-ac_config_sub="$SHELL $ac_aux_dir/config.sub" >-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. >- >- >- >-subdirs="$subdirs lib/bind" >- >- >-# Make sure we can run config.sub. >-$ac_config_sub sun4 >/dev/null 2>&1 || >- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 >-echo "$as_me: error: cannot run $ac_config_sub" >&2;} >- { (exit 1); exit 1; }; } >- >-echo "$as_me:$LINENO: checking build system type" >&5 >-echo $ECHO_N "checking build system type... $ECHO_C" >&6 >-if test "${ac_cv_build+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_cv_build_alias=$build_alias >-test -z "$ac_cv_build_alias" && >- ac_cv_build_alias=`$ac_config_guess` >-test -z "$ac_cv_build_alias" && >- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 >-echo "$as_me: error: cannot guess build type; you must specify one" >&2;} >- { (exit 1); exit 1; }; } >-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || >- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 >-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} >- { (exit 1); exit 1; }; } >- >-fi >-echo "$as_me:$LINENO: result: $ac_cv_build" >&5 >-echo "${ECHO_T}$ac_cv_build" >&6 >-build=$ac_cv_build >-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` >-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` >-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` >- >- >-echo "$as_me:$LINENO: checking host system type" >&5 >-echo $ECHO_N "checking host system type... $ECHO_C" >&6 >-if test "${ac_cv_host+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_cv_host_alias=$host_alias >-test -z "$ac_cv_host_alias" && >- ac_cv_host_alias=$ac_cv_build_alias >-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || >- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 >-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} >- { (exit 1); exit 1; }; } >- >-fi >-echo "$as_me:$LINENO: result: $ac_cv_host" >&5 >-echo "${ECHO_T}$ac_cv_host" >&6 >-host=$ac_cv_host >-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` >-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` >-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` >- >- >- >-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5 >-echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 >-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` >-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.make <<\_ACEOF >-all: >- @echo 'ac_maketemp="${MAKE}"' >-_ACEOF >-# GNU make sometimes prints "make[1]: Entering...", which would confuse us. >-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` >-if test -n "$ac_maketemp"; then >- eval ac_cv_prog_make_${ac_make}_set=yes >-else >- eval ac_cv_prog_make_${ac_make}_set=no >-fi >-rm -f conftest.make >-fi >-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- SET_MAKE= >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- SET_MAKE="MAKE=${MAKE-make}" >-fi >- >-if test -n "$ac_tool_prefix"; then >- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. >-set dummy ${ac_tool_prefix}ranlib; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_RANLIB+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$RANLIB"; then >- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >-fi >-fi >-RANLIB=$ac_cv_prog_RANLIB >-if test -n "$RANLIB"; then >- echo "$as_me:$LINENO: result: $RANLIB" >&5 >-echo "${ECHO_T}$RANLIB" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >-fi >-if test -z "$ac_cv_prog_RANLIB"; then >- ac_ct_RANLIB=$RANLIB >- # Extract the first word of "ranlib", so it can be a program name with args. >-set dummy ranlib; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$ac_ct_RANLIB"; then >- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_ac_ct_RANLIB="ranlib" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" >-fi >-fi >-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB >-if test -n "$ac_ct_RANLIB"; then >- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 >-echo "${ECHO_T}$ac_ct_RANLIB" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- RANLIB=$ac_ct_RANLIB >-else >- RANLIB="$ac_cv_prog_RANLIB" >-fi >- >-# Find a good install program. We prefer a C program (faster), >-# so one script is as good as another. But avoid the broken or >-# incompatible versions: >-# SysV /etc/install, /usr/sbin/install >-# SunOS /usr/etc/install >-# IRIX /sbin/install >-# AIX /bin/install >-# AmigaOS /C/install, which installs bootblocks on floppy discs >-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag >-# AFS /usr/afsws/bin/install, which mishandles nonexistent args >-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" >-# ./install, which can be erroneously created by make from ./install.sh. >-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 >-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 >-if test -z "$INSTALL"; then >-if test "${ac_cv_path_install+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- # Account for people who put trailing slashes in PATH elements. >-case $as_dir/ in >- ./ | .// | /cC/* | \ >- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ >- /usr/ucb/* ) ;; >- *) >- # OSF1 and SCO ODT 3.0 have their own names for install. >- # Don't use installbsd from OSF since it installs stuff as root >- # by default. >- for ac_prog in ginstall scoinst install; do >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then >- if test $ac_prog = install && >- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then >- # AIX install. It has an incompatible calling convention. >- : >- elif test $ac_prog = install && >- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then >- # program-specific install script used by HP pwplus--don't use. >- : >- else >- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" >- break 3 >- fi >- fi >- done >- done >- ;; >-esac >-done >- >- >-fi >- if test "${ac_cv_path_install+set}" = set; then >- INSTALL=$ac_cv_path_install >- else >- # As a last resort, use the slow shell script. We don't cache a >- # path for INSTALL within a source directory, because that will >- # break other packages using the cache if that directory is >- # removed, or if the path is relative. >- INSTALL=$ac_install_sh >- fi >-fi >-echo "$as_me:$LINENO: result: $INSTALL" >&5 >-echo "${ECHO_T}$INSTALL" >&6 >- >-# Use test -z because SunOS4 sh mishandles braces in ${var-val}. >-# It thinks the first close brace ends the variable substitution. >-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' >- >-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' >- >-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' >- >- >- >- >- >- >- >-# Extract the first word of "ar", so it can be a program name with args. >-set dummy ar; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_path_AR+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- case $AR in >- [\\/]* | ?:[\\/]*) >- ac_cv_path_AR="$AR" # Let the user override the test with a path. >- ;; >- *) >- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >- ;; >-esac >-fi >-AR=$ac_cv_path_AR >- >-if test -n "$AR"; then >- echo "$as_me:$LINENO: result: $AR" >&5 >-echo "${ECHO_T}$AR" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >-ARFLAGS="cruv" >- >- >- >-# The POSIX ln(1) program. Non-POSIX systems may substitute >-# "copy" or something. >-LN=ln >- >- >-case "$AR" in >- "") >- { { echo "$as_me:$LINENO: error: >-ar program not found. Please fix your PATH to include the directory in >-which ar resides, or set AR in the environment with the full path to ar. >-" >&5 >-echo "$as_me: error: >-ar program not found. Please fix your PATH to include the directory in >-which ar resides, or set AR in the environment with the full path to ar. >-" >&2;} >- { (exit 1); exit 1; }; } >- >- ;; >-esac >- >-# >-# Etags. >-# >-for ac_prog in etags emacs-etags >-do >- # Extract the first word of "$ac_prog", so it can be a program name with args. >-set dummy $ac_prog; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_path_ETAGS+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- case $ETAGS in >- [\\/]* | ?:[\\/]*) >- ac_cv_path_ETAGS="$ETAGS" # Let the user override the test with a path. >- ;; >- *) >- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_path_ETAGS="$as_dir/$ac_word$ac_exec_ext" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >- ;; >-esac >-fi >-ETAGS=$ac_cv_path_ETAGS >- >-if test -n "$ETAGS"; then >- echo "$as_me:$LINENO: result: $ETAGS" >&5 >-echo "${ECHO_T}$ETAGS" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- test -n "$ETAGS" && break >-done >- >- >-# >-# Some systems, e.g. RH7, have the Exuberant Ctags etags instead of >-# GNU emacs etags, and it requires the -L flag. >-# >-if test "X$ETAGS" != "X"; then >- echo "$as_me:$LINENO: checking for Exuberant Ctags etags" >&5 >-echo $ECHO_N "checking for Exuberant Ctags etags... $ECHO_C" >&6 >- if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ETAGS="$ETAGS -L" >- else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- fi >-fi >- >- >-# >-# Perl is optional; it is used only by some of the system test scripts. >-# >-for ac_prog in perl5 perl >-do >- # Extract the first word of "$ac_prog", so it can be a program name with args. >-set dummy $ac_prog; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_path_PERL+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- case $PERL in >- [\\/]* | ?:[\\/]*) >- ac_cv_path_PERL="$PERL" # Let the user override the test with a path. >- ;; >- *) >- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >- ;; >-esac >-fi >-PERL=$ac_cv_path_PERL >- >-if test -n "$PERL"; then >- echo "$as_me:$LINENO: result: $PERL" >&5 >-echo "${ECHO_T}$PERL" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- test -n "$PERL" && break >-done >- >- >- >-# >-# Special processing of paths depending on whether --prefix, >-# --sysconfdir or --localstatedir arguments were given. What's >-# desired is some compatibility with the way previous versions >-# of BIND built; they defaulted to /usr/local for most parts of >-# the installation, but named.boot/named.conf was in /etc >-# and named.pid was in /var/run. >-# >-# So ... if none of --prefix, --sysconfdir or --localstatedir are >-# specified, set things up that way. If --prefix is given, use >-# it for sysconfdir and localstatedir the way configure normally >-# would. To change the prefix for everything but leave named.conf >-# in /etc or named.pid in /var/run, then do this the usual configure way: >-# ./configure --prefix=/somewhere --sysconfdir=/etc >-# ./configure --prefix=/somewhere --localstatedir=/var >-# >-# To put named.conf and named.pid in /usr/local with everything else, >-# set the prefix explicitly to /usr/local even though that's the default: >-# ./configure --prefix=/usr/local >-# >-case "$prefix" in >- NONE) >- case "$sysconfdir" in >- '${prefix}/etc') >- sysconfdir=/etc >- ;; >- esac >- case "$localstatedir" in >- '${prefix}/var') >- localstatedir=/var >- ;; >- esac >- ;; >-esac >- >-# >-# Make sure INSTALL uses an absolute path, else it will be wrong in all >-# Makefiles, since they use make/rules.in and INSTALL will be adjusted by >-# configure based on the location of the file where it is substituted. >-# Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate >-# subdirectory of install-sh, This relative path will be wrong for all >-# directories more than one level down from install-sh. >-# >-case "$INSTALL" in >- /*) >- ;; >- *) >- # >- # Not all systems have dirname. >- # >- >- ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`" >- >- >- ac_prog="`echo $INSTALL | sed 's%.*/%%'`" >- test "$ac_dir" = "$ac_prog" && ac_dir=. >- test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`" >- INSTALL="$ac_dir/$ac_prog" >- ;; >-esac >- >-# >-# On these hosts, we really want to use cc, not gcc, even if it is >-# found. The gcc that these systems have will not correctly handle >-# pthreads. >-# >-# However, if the user sets $CC to be something, let that override >-# our change. >-# >-if test "X$CC" = "X" ; then >- case "$host" in >- *-dec-osf*) >- CC="cc" >- ;; >- *-solaris*) >- # Use Sun's cc if it is available, but watch >- # out for /usr/ucb/cc; it will never be the right >- # compiler to use. >- # >- # If setting CC here fails, the AC_PROG_CC done >- # below might still find gcc. >- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >- for ac_dir in $PATH; do >- test -z "$ac_dir" && ac_dir=. >- case "$ac_dir" in >- /usr/ucb) >- # exclude >- ;; >- *) >- if test -f "$ac_dir/cc"; then >- CC="$ac_dir/cc" >- break >- fi >- ;; >- esac >- done >- IFS="$ac_save_ifs" >- ;; >- *-hp-hpux*) >- CC="cc" >- ;; >- mips-sgi-irix*) >- CC="cc" >- ;; >- esac >-fi >- >-ac_ext=c >-ac_cpp='$CPP $CPPFLAGS' >-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' >-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >-ac_compiler_gnu=$ac_cv_c_compiler_gnu >-if test -n "$ac_tool_prefix"; then >- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. >-set dummy ${ac_tool_prefix}gcc; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_CC+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$CC"; then >- ac_cv_prog_CC="$CC" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_CC="${ac_tool_prefix}gcc" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >-fi >-fi >-CC=$ac_cv_prog_CC >-if test -n "$CC"; then >- echo "$as_me:$LINENO: result: $CC" >&5 >-echo "${ECHO_T}$CC" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >-fi >-if test -z "$ac_cv_prog_CC"; then >- ac_ct_CC=$CC >- # Extract the first word of "gcc", so it can be a program name with args. >-set dummy gcc; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$ac_ct_CC"; then >- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_ac_ct_CC="gcc" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >-fi >-fi >-ac_ct_CC=$ac_cv_prog_ac_ct_CC >-if test -n "$ac_ct_CC"; then >- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 >-echo "${ECHO_T}$ac_ct_CC" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- CC=$ac_ct_CC >-else >- CC="$ac_cv_prog_CC" >-fi >- >-if test -z "$CC"; then >- if test -n "$ac_tool_prefix"; then >- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. >-set dummy ${ac_tool_prefix}cc; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_CC+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$CC"; then >- ac_cv_prog_CC="$CC" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_CC="${ac_tool_prefix}cc" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >-fi >-fi >-CC=$ac_cv_prog_CC >-if test -n "$CC"; then >- echo "$as_me:$LINENO: result: $CC" >&5 >-echo "${ECHO_T}$CC" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >-fi >-if test -z "$ac_cv_prog_CC"; then >- ac_ct_CC=$CC >- # Extract the first word of "cc", so it can be a program name with args. >-set dummy cc; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$ac_ct_CC"; then >- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_ac_ct_CC="cc" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >-fi >-fi >-ac_ct_CC=$ac_cv_prog_ac_ct_CC >-if test -n "$ac_ct_CC"; then >- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 >-echo "${ECHO_T}$ac_ct_CC" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- CC=$ac_ct_CC >-else >- CC="$ac_cv_prog_CC" >-fi >- >-fi >-if test -z "$CC"; then >- # Extract the first word of "cc", so it can be a program name with args. >-set dummy cc; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_CC+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$CC"; then >- ac_cv_prog_CC="$CC" # Let the user override the test. >-else >- ac_prog_rejected=no >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then >- ac_prog_rejected=yes >- continue >- fi >- ac_cv_prog_CC="cc" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >-if test $ac_prog_rejected = yes; then >- # We found a bogon in the path, so make sure we never use it. >- set dummy $ac_cv_prog_CC >- shift >- if test $# != 0; then >- # We chose a different compiler from the bogus one. >- # However, it has the same basename, so the bogon will be chosen >- # first if we set CC to just the basename; use the full file name. >- shift >- set dummy "$as_dir/$ac_word" ${1+"$@"} >- shift >- ac_cv_prog_CC="$@" >- fi >-fi >-fi >-fi >-CC=$ac_cv_prog_CC >-if test -n "$CC"; then >- echo "$as_me:$LINENO: result: $CC" >&5 >-echo "${ECHO_T}$CC" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >-fi >-if test -z "$CC"; then >- if test -n "$ac_tool_prefix"; then >- for ac_prog in cl >- do >- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. >-set dummy $ac_tool_prefix$ac_prog; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_CC+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$CC"; then >- ac_cv_prog_CC="$CC" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_CC="$ac_tool_prefix$ac_prog" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >-fi >-fi >-CC=$ac_cv_prog_CC >-if test -n "$CC"; then >- echo "$as_me:$LINENO: result: $CC" >&5 >-echo "${ECHO_T}$CC" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- test -n "$CC" && break >- done >-fi >-if test -z "$CC"; then >- ac_ct_CC=$CC >- for ac_prog in cl >-do >- # Extract the first word of "$ac_prog", so it can be a program name with args. >-set dummy $ac_prog; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$ac_ct_CC"; then >- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_ac_ct_CC="$ac_prog" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >-fi >-fi >-ac_ct_CC=$ac_cv_prog_ac_ct_CC >-if test -n "$ac_ct_CC"; then >- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 >-echo "${ECHO_T}$ac_ct_CC" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- test -n "$ac_ct_CC" && break >-done >- >- CC=$ac_ct_CC >-fi >- >-fi >- >- >-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 >-echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} >- { (exit 1); exit 1; }; } >- >-# Provide some information about the compiler. >-echo "$as_me:$LINENO:" \ >- "checking for C compiler version" >&5 >-ac_compiler=`set X $ac_compile; echo $2` >-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 >- (eval $ac_compiler --version </dev/null >&5) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 >- (eval $ac_compiler -v </dev/null >&5) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 >- (eval $ac_compiler -V </dev/null >&5) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >- >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- >- ; >- return 0; >-} >-_ACEOF >-ac_clean_files_save=$ac_clean_files >-ac_clean_files="$ac_clean_files a.out a.exe" >-# Try to create an executable without -o first, disregard a.out. >-# It will help us diagnose broken compilers, and finding out an intuition >-# of exeext. >-echo "$as_me:$LINENO: checking for C compiler default output" >&5 >-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 >-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` >-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 >- (eval $ac_link_default) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; then >- # Find the output, starting from the most likely. This scheme is >-# not robust to junk in `.', hence go to wildcards (a.*) only as a last >-# resort. >- >-# Be careful to initialize this variable, since it used to be cached. >-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. >-ac_cv_exeext= >-for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; >- ls a.out conftest 2>/dev/null; >- ls a.* conftest.* 2>/dev/null`; do >- case $ac_file in >- *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; >- a.out ) # We found the default executable, but exeext='' is most >- # certainly right. >- break;; >- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` >- # FIXME: I believe we export ac_cv_exeext for Libtool --akim. >- export ac_cv_exeext >- break;; >- * ) break;; >- esac >-done >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5 >-echo "$as_me: error: C compiler cannot create executables" >&2;} >- { (exit 77); exit 77; }; } >-fi >- >-ac_exeext=$ac_cv_exeext >-echo "$as_me:$LINENO: result: $ac_file" >&5 >-echo "${ECHO_T}$ac_file" >&6 >- >-# Check the compiler produces executables we can run. If not, either >-# the compiler is broken, or we cross compile. >-echo "$as_me:$LINENO: checking whether the C compiler works" >&5 >-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 >-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 >-# If not cross compiling, check that we can run a simple program. >-if test "$cross_compiling" != yes; then >- if { ac_try='./$ac_file' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- cross_compiling=no >- else >- if test "$cross_compiling" = maybe; then >- cross_compiling=yes >- else >- { { echo "$as_me:$LINENO: error: cannot run C compiled programs. >-If you meant to cross compile, use \`--host'." >&5 >-echo "$as_me: error: cannot run C compiled programs. >-If you meant to cross compile, use \`--host'." >&2;} >- { (exit 1); exit 1; }; } >- fi >- fi >-fi >-echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- >-rm -f a.out a.exe conftest$ac_cv_exeext >-ac_clean_files=$ac_clean_files_save >-# Check the compiler produces executables we can run. If not, either >-# the compiler is broken, or we cross compile. >-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 >-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 >-echo "$as_me:$LINENO: result: $cross_compiling" >&5 >-echo "${ECHO_T}$cross_compiling" >&6 >- >-echo "$as_me:$LINENO: checking for suffix of executables" >&5 >-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; then >- # If both `conftest.exe' and `conftest' are `present' (well, observable) >-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will >-# work properly (i.e., refer to `conftest.exe'), while it won't with >-# `rm'. >-for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do >- case $ac_file in >- *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; >- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` >- export ac_cv_exeext >- break;; >- * ) break;; >- esac >-done >-else >- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 >-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} >- { (exit 1); exit 1; }; } >-fi >- >-rm -f conftest$ac_cv_exeext >-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 >-echo "${ECHO_T}$ac_cv_exeext" >&6 >- >-rm -f conftest.$ac_ext >-EXEEXT=$ac_cv_exeext >-ac_exeext=$EXEEXT >-echo "$as_me:$LINENO: checking for suffix of object files" >&5 >-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 >-if test "${ac_cv_objext+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.o conftest.obj >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; then >- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do >- case $ac_file in >- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; >- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` >- break;; >- esac >-done >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 >-echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} >- { (exit 1); exit 1; }; } >-fi >- >-rm -f conftest.$ac_cv_objext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 >-echo "${ECHO_T}$ac_cv_objext" >&6 >-OBJEXT=$ac_cv_objext >-ac_objext=$OBJEXT >-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 >-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 >-if test "${ac_cv_c_compiler_gnu+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-#ifndef __GNUC__ >- choke me >-#endif >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_compiler_gnu=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_compiler_gnu=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-ac_cv_c_compiler_gnu=$ac_compiler_gnu >- >-fi >-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 >-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 >-GCC=`test $ac_compiler_gnu = yes && echo yes` >-ac_test_CFLAGS=${CFLAGS+set} >-ac_save_CFLAGS=$CFLAGS >-CFLAGS="-g" >-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 >-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 >-if test "${ac_cv_prog_cc_g+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_prog_cc_g=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_prog_cc_g=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 >-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 >-if test "$ac_test_CFLAGS" = set; then >- CFLAGS=$ac_save_CFLAGS >-elif test $ac_cv_prog_cc_g = yes; then >- if test "$GCC" = yes; then >- CFLAGS="-g -O2" >- else >- CFLAGS="-g" >- fi >-else >- if test "$GCC" = yes; then >- CFLAGS="-O2" >- else >- CFLAGS= >- fi >-fi >-# Some people use a C++ compiler to compile C. Since we use `exit', >-# in C++ we need to declare it. In case someone uses the same compiler >-# for both compiling C and C++ we need to have the C++ compiler decide >-# the declaration of exit, since it's the most demanding environment. >-cat >conftest.$ac_ext <<_ACEOF >-#ifndef __cplusplus >- choke me >-#endif >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- for ac_declaration in \ >- ''\ >- '#include <stdlib.h>' \ >- 'extern "C" void std::exit (int) throw (); using std::exit;' \ >- 'extern "C" void std::exit (int); using std::exit;' \ >- 'extern "C" void exit (int) throw ();' \ >- 'extern "C" void exit (int);' \ >- 'void exit (int);' >-do >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <stdlib.h> >-$ac_declaration >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-exit (42); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- : >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-continue >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-$ac_declaration >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-exit (42); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- break >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-done >-rm -f conftest* >-if test -n "$ac_declaration"; then >- echo '#ifdef __cplusplus' >>confdefs.h >- echo $ac_declaration >>confdefs.h >- echo '#endif' >>confdefs.h >-fi >- >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-ac_ext=c >-ac_cpp='$CPP $CPPFLAGS' >-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' >-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >-ac_compiler_gnu=$ac_cv_c_compiler_gnu >- >- >- >-ac_ext=c >-ac_cpp='$CPP $CPPFLAGS' >-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' >-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >-ac_compiler_gnu=$ac_cv_c_compiler_gnu >-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 >-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 >-# On Suns, sometimes $CPP names a directory. >-if test -n "$CPP" && test -d "$CPP"; then >- CPP= >-fi >-if test -z "$CPP"; then >- if test "${ac_cv_prog_CPP+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- # Double quotes because CPP needs to be expanded >- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" >- do >- ac_preproc_ok=false >-for ac_c_preproc_warn_flag in '' yes >-do >- # Use a header file that comes with gcc, so configuring glibc >- # with a fresh cross-compiler works. >- # On the NeXT, cc -E runs the code through the compiler's parser, >- # not just through cpp. "Syntax error" is here to catch this case. >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <assert.h> >- Syntax error >-_ACEOF >-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 >- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 >- ac_status=$? >- egrep -v '^ *\+' conftest.er1 >conftest.err >- rm -f conftest.er1 >- cat conftest.err >&5 >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >/dev/null; then >- if test -s conftest.err; then >- ac_cpp_err=$ac_c_preproc_warn_flag >- else >- ac_cpp_err= >- fi >-else >- ac_cpp_err=yes >-fi >-if test -z "$ac_cpp_err"; then >- : >-else >- echo "$as_me: failed program was:" >&5 >- cat conftest.$ac_ext >&5 >- # Broken: fails on valid input. >-continue >-fi >-rm -f conftest.err conftest.$ac_ext >- >- # OK, works on sane cases. Now check whether non-existent headers >- # can be detected and how. >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <ac_nonexistent.h> >-_ACEOF >-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 >- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 >- ac_status=$? >- egrep -v '^ *\+' conftest.er1 >conftest.err >- rm -f conftest.er1 >- cat conftest.err >&5 >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >/dev/null; then >- if test -s conftest.err; then >- ac_cpp_err=$ac_c_preproc_warn_flag >- else >- ac_cpp_err= >- fi >-else >- ac_cpp_err=yes >-fi >-if test -z "$ac_cpp_err"; then >- # Broken: success on invalid input. >-continue >-else >- echo "$as_me: failed program was:" >&5 >- cat conftest.$ac_ext >&5 >- # Passes both tests. >-ac_preproc_ok=: >-break >-fi >-rm -f conftest.err conftest.$ac_ext >- >-done >-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. >-rm -f conftest.err conftest.$ac_ext >-if $ac_preproc_ok; then >- break >-fi >- >- done >- ac_cv_prog_CPP=$CPP >- >-fi >- CPP=$ac_cv_prog_CPP >-else >- ac_cv_prog_CPP=$CPP >-fi >-echo "$as_me:$LINENO: result: $CPP" >&5 >-echo "${ECHO_T}$CPP" >&6 >-ac_preproc_ok=false >-for ac_c_preproc_warn_flag in '' yes >-do >- # Use a header file that comes with gcc, so configuring glibc >- # with a fresh cross-compiler works. >- # On the NeXT, cc -E runs the code through the compiler's parser, >- # not just through cpp. "Syntax error" is here to catch this case. >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <assert.h> >- Syntax error >-_ACEOF >-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 >- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 >- ac_status=$? >- egrep -v '^ *\+' conftest.er1 >conftest.err >- rm -f conftest.er1 >- cat conftest.err >&5 >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >/dev/null; then >- if test -s conftest.err; then >- ac_cpp_err=$ac_c_preproc_warn_flag >- else >- ac_cpp_err= >- fi >-else >- ac_cpp_err=yes >-fi >-if test -z "$ac_cpp_err"; then >- : >-else >- echo "$as_me: failed program was:" >&5 >- cat conftest.$ac_ext >&5 >- # Broken: fails on valid input. >-continue >-fi >-rm -f conftest.err conftest.$ac_ext >- >- # OK, works on sane cases. Now check whether non-existent headers >- # can be detected and how. >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <ac_nonexistent.h> >-_ACEOF >-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 >- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 >- ac_status=$? >- egrep -v '^ *\+' conftest.er1 >conftest.err >- rm -f conftest.er1 >- cat conftest.err >&5 >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >/dev/null; then >- if test -s conftest.err; then >- ac_cpp_err=$ac_c_preproc_warn_flag >- else >- ac_cpp_err= >- fi >-else >- ac_cpp_err=yes >-fi >-if test -z "$ac_cpp_err"; then >- # Broken: success on invalid input. >-continue >-else >- echo "$as_me: failed program was:" >&5 >- cat conftest.$ac_ext >&5 >- # Passes both tests. >-ac_preproc_ok=: >-break >-fi >-rm -f conftest.err conftest.$ac_ext >- >-done >-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. >-rm -f conftest.err conftest.$ac_ext >-if $ac_preproc_ok; then >- : >-else >- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 >-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} >- { (exit 1); exit 1; }; } >-fi >- >-ac_ext=c >-ac_cpp='$CPP $CPPFLAGS' >-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' >-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >-ac_compiler_gnu=$ac_cv_c_compiler_gnu >- >- >-echo "$as_me:$LINENO: checking for ANSI C header files" >&5 >-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 >-if test "${ac_cv_header_stdc+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <stdlib.h> >-#include <stdarg.h> >-#include <string.h> >-#include <float.h> >- >-_ACEOF >-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 >- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 >- ac_status=$? >- egrep -v '^ *\+' conftest.er1 >conftest.err >- rm -f conftest.er1 >- cat conftest.err >&5 >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >/dev/null; then >- if test -s conftest.err; then >- ac_cpp_err=$ac_c_preproc_warn_flag >- else >- ac_cpp_err= >- fi >-else >- ac_cpp_err=yes >-fi >-if test -z "$ac_cpp_err"; then >- ac_cv_header_stdc=yes >-else >- echo "$as_me: failed program was:" >&5 >- cat conftest.$ac_ext >&5 >- ac_cv_header_stdc=no >-fi >-rm -f conftest.err conftest.$ac_ext >- >-if test $ac_cv_header_stdc = yes; then >- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <string.h> >- >-_ACEOF >-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | >- egrep "memchr" >/dev/null 2>&1; then >- : >-else >- ac_cv_header_stdc=no >-fi >-rm -f conftest* >- >-fi >- >-if test $ac_cv_header_stdc = yes; then >- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <stdlib.h> >- >-_ACEOF >-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | >- egrep "free" >/dev/null 2>&1; then >- : >-else >- ac_cv_header_stdc=no >-fi >-rm -f conftest* >- >-fi >- >-if test $ac_cv_header_stdc = yes; then >- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. >- if test "$cross_compiling" = yes; then >- : >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <ctype.h> >-#if ((' ' & 0x0FF) == 0x020) >-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') >-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) >-#else >-# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ >- || ('j' <= (c) && (c) <= 'r') \ >- || ('s' <= (c) && (c) <= 'z')) >-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) >-#endif >- >-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) >-int >-main () >-{ >- int i; >- for (i = 0; i < 256; i++) >- if (XOR (islower (i), ISLOWER (i)) >- || toupper (i) != TOUPPER (i)) >- exit(2); >- exit (0); >-} >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- : >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >-ac_cv_header_stdc=no >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >-fi >-fi >-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 >-echo "${ECHO_T}$ac_cv_header_stdc" >&6 >-if test $ac_cv_header_stdc = yes; then >- >-cat >>confdefs.h <<\_ACEOF >-#define STDC_HEADERS 1 >-_ACEOF >- >-fi >- >- >-# On IRIX 5.3, sys/types and inttypes.h are conflicting. >- >- >- >- >- >- >- >- >- >-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ >- inttypes.h stdint.h unistd.h >-do >-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` >-echo "$as_me:$LINENO: checking for $ac_header" >&5 >-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-$ac_includes_default >- >-#include <$ac_header> >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- eval "$as_ac_Header=yes" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-eval "$as_ac_Header=no" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 >-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 >-if test `eval echo '${'$as_ac_Header'}'` = yes; then >- cat >>confdefs.h <<_ACEOF >-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 >-_ACEOF >- >-fi >- >-done >- >- >- >- >- >- >- >- >-for ac_header in fcntl.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/sysctl.h >-do >-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo "$as_me:$LINENO: checking for $ac_header" >&5 >-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-fi >-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 >-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 >-else >- # Is the header compilable? >-echo "$as_me:$LINENO: checking $ac_header usability" >&5 >-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-$ac_includes_default >-#include <$ac_header> >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_header_compiler=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_header_compiler=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 >-echo "${ECHO_T}$ac_header_compiler" >&6 >- >-# Is the header present? >-echo "$as_me:$LINENO: checking $ac_header presence" >&5 >-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <$ac_header> >-_ACEOF >-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 >- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 >- ac_status=$? >- egrep -v '^ *\+' conftest.er1 >conftest.err >- rm -f conftest.er1 >- cat conftest.err >&5 >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >/dev/null; then >- if test -s conftest.err; then >- ac_cpp_err=$ac_c_preproc_warn_flag >- else >- ac_cpp_err= >- fi >-else >- ac_cpp_err=yes >-fi >-if test -z "$ac_cpp_err"; then >- ac_header_preproc=yes >-else >- echo "$as_me: failed program was:" >&5 >- cat conftest.$ac_ext >&5 >- ac_header_preproc=no >-fi >-rm -f conftest.err conftest.$ac_ext >-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 >-echo "${ECHO_T}$ac_header_preproc" >&6 >- >-# So? What about this header? >-case $ac_header_compiler:$ac_header_preproc in >- yes:no ) >- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 >-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 >-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; >- no:yes ) >- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 >-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 >-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 >-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; >-esac >-echo "$as_me:$LINENO: checking for $ac_header" >&5 >-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- eval "$as_ac_Header=$ac_header_preproc" >-fi >-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 >-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 >- >-fi >-if test `eval echo '${'$as_ac_Header'}'` = yes; then >- cat >>confdefs.h <<_ACEOF >-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 >-_ACEOF >- >-fi >- >-done >- >- >-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 >-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 >-if test "${ac_cv_prog_cc_stdc+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_cv_prog_cc_stdc=no >-ac_save_CC=$CC >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <stdarg.h> >-#include <stdio.h> >-#include <sys/types.h> >-#include <sys/stat.h> >-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ >-struct buf { int x; }; >-FILE * (*rcsopen) (struct buf *, struct stat *, int); >-static char *e (p, i) >- char **p; >- int i; >-{ >- return p[i]; >-} >-static char *f (char * (*g) (char **, int), char **p, ...) >-{ >- char *s; >- va_list v; >- va_start (v,p); >- s = g (p, va_arg (v,int)); >- va_end (v); >- return s; >-} >-int test (int i, double x); >-struct s1 {int (*f) (int a);}; >-struct s2 {int (*f) (double a);}; >-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); >-int argc; >-char **argv; >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; >- ; >- return 0; >-} >-_ACEOF >-# Don't try gcc -ansi; that turns off useful extensions and >-# breaks some systems' header files. >-# AIX -qlanglvl=ansi >-# Ultrix and OSF/1 -std1 >-# HP-UX 10.20 and later -Ae >-# HP-UX older versions -Aa -D_HPUX_SOURCE >-# SVR4 -Xc -D__EXTENSIONS__ >-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" >-do >- CC="$ac_save_CC $ac_arg" >- rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_prog_cc_stdc=$ac_arg >-break >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-fi >-rm -f conftest.$ac_objext >-done >-rm -f conftest.$ac_ext conftest.$ac_objext >-CC=$ac_save_CC >- >-fi >- >-case "x$ac_cv_prog_cc_stdc" in >- x|xno) >- echo "$as_me:$LINENO: result: none needed" >&5 >-echo "${ECHO_T}none needed" >&6 ;; >- *) >- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 >-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 >- CC="$CC $ac_cv_prog_cc_stdc" ;; >-esac >- >-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 >-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 >-if test "${ac_cv_c_const+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-/* FIXME: Include the comments suggested by Paul. */ >-#ifndef __cplusplus >- /* Ultrix mips cc rejects this. */ >- typedef int charset[2]; >- const charset x; >- /* SunOS 4.1.1 cc rejects this. */ >- char const *const *ccp; >- char **p; >- /* NEC SVR4.0.2 mips cc rejects this. */ >- struct point {int x, y;}; >- static struct point const zero = {0,0}; >- /* AIX XL C 1.02.0.0 rejects this. >- It does not let you subtract one const X* pointer from another in >- an arm of an if-expression whose if-part is not a constant >- expression */ >- const char *g = "string"; >- ccp = &g + (g ? g-g : 0); >- /* HPUX 7.0 cc rejects these. */ >- ++ccp; >- p = (char**) ccp; >- ccp = (char const *const *) p; >- { /* SCO 3.2v4 cc rejects this. */ >- char *t; >- char const *s = 0 ? (char *) 0 : (char const *) 0; >- >- *t++ = 0; >- } >- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ >- int x[] = {25, 17}; >- const int *foo = &x[0]; >- ++foo; >- } >- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ >- typedef const int *iptr; >- iptr p = 0; >- ++p; >- } >- { /* AIX XL C 1.02.0.0 rejects this saying >- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ >- struct s { int j; const int *ap[3]; }; >- struct s *b; b->j = 5; >- } >- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ >- const int foo = 10; >- } >-#endif >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_c_const=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_c_const=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 >-echo "${ECHO_T}$ac_cv_c_const" >&6 >-if test $ac_cv_c_const = no; then >- >-cat >>confdefs.h <<\_ACEOF >-#define const >-_ACEOF >- >-fi >- >-echo "$as_me:$LINENO: checking for inline" >&5 >-echo $ECHO_N "checking for inline... $ECHO_C" >&6 >-if test "${ac_cv_c_inline+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_cv_c_inline=no >-for ac_kw in inline __inline__ __inline; do >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#ifndef __cplusplus >-static $ac_kw int static_foo () {return 0; } >-$ac_kw int foo () {return 0; } >-#endif >- >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_c_inline=$ac_kw; break >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-done >- >-fi >-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 >-echo "${ECHO_T}$ac_cv_c_inline" >&6 >-case $ac_cv_c_inline in >- inline | yes) ;; >- no) >-cat >>confdefs.h <<\_ACEOF >-#define inline >-_ACEOF >- ;; >- *) cat >>confdefs.h <<_ACEOF >-#define inline $ac_cv_c_inline >-_ACEOF >- ;; >-esac >- >-echo "$as_me:$LINENO: checking for sysctlbyname" >&5 >-echo $ECHO_N "checking for sysctlbyname... $ECHO_C" >&6 >-if test "${ac_cv_func_sysctlbyname+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define sysctlbyname to an innocuous variant, in case <limits.h> declares sysctlbyname. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define sysctlbyname innocuous_sysctlbyname >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char sysctlbyname (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef sysctlbyname >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char sysctlbyname (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_sysctlbyname) || defined (__stub___sysctlbyname) >-choke me >-#else >-char (*f) () = sysctlbyname; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != sysctlbyname; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_sysctlbyname=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_sysctlbyname=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_sysctlbyname" >&5 >-echo "${ECHO_T}$ac_cv_func_sysctlbyname" >&6 >-if test $ac_cv_func_sysctlbyname = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_SYSCTLBYNAME 1 >-_ACEOF >- >-fi >- >- >-# >-# UnixWare 7.1.1 with the feature supplement to the UDK compiler >-# is reported to not support "static inline" (RT #1212). >-# >-echo "$as_me:$LINENO: checking for static inline breakage" >&5 >-echo $ECHO_N "checking for static inline breakage... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- >- foo1(); >- } >- >- static inline int foo1() { >- return 0; >- } >- >- static inline int foo2() { >- return foo1(); >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- cat >>confdefs.h <<\_ACEOF >-#define inline >-_ACEOF >- >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >-echo "$as_me:$LINENO: checking for size_t" >&5 >-echo $ECHO_N "checking for size_t... $ECHO_C" >&6 >-if test "${ac_cv_type_size_t+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-$ac_includes_default >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-if ((size_t *) 0) >- return 0; >-if (sizeof (size_t)) >- return 0; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_type_size_t=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_type_size_t=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 >-echo "${ECHO_T}$ac_cv_type_size_t" >&6 >-if test $ac_cv_type_size_t = yes; then >- : >-else >- >-cat >>confdefs.h <<_ACEOF >-#define size_t unsigned >-_ACEOF >- >-fi >- >-echo "$as_me:$LINENO: checking for ssize_t" >&5 >-echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 >-if test "${ac_cv_type_ssize_t+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-$ac_includes_default >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-if ((ssize_t *) 0) >- return 0; >-if (sizeof (ssize_t)) >- return 0; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_type_ssize_t=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_type_ssize_t=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 >-echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 >-if test $ac_cv_type_ssize_t = yes; then >- : >-else >- >-cat >>confdefs.h <<_ACEOF >-#define ssize_t int >-_ACEOF >- >-fi >- >-echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 >-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 >-if test "${ac_cv_header_time+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <sys/types.h> >-#include <sys/time.h> >-#include <time.h> >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-if ((struct tm *) 0) >-return 0; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_header_time=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_header_time=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 >-echo "${ECHO_T}$ac_cv_header_time" >&6 >-if test $ac_cv_header_time = yes; then >- >-cat >>confdefs.h <<\_ACEOF >-#define TIME_WITH_SYS_TIME 1 >-_ACEOF >- >-fi >- >-echo "$as_me:$LINENO: checking for long long" >&5 >-echo $ECHO_N "checking for long long... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-long long i = 0; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-# >-# check if we need to #include sys/select.h explicitly >-# >-case $ac_cv_header_unistd_h in >-yes) >-echo "$as_me:$LINENO: checking if unistd.h or sys/types.h defines fd_set" >&5 >-echo $ECHO_N "checking if unistd.h or sys/types.h defines fd_set... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> /* Ultrix */ >-#include <unistd.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-fd_set read_set; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH" >- LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- case $ac_cv_header_sys_select_h in >- yes) >- ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1" >- LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1" >- ;; >- no) >- { { echo "$as_me:$LINENO: error: need either working unistd.h or sys/select.h" >&5 >-echo "$as_me: error: need either working unistd.h or sys/select.h" >&2;} >- { (exit 1); exit 1; }; } >- ;; >- esac >- >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- ;; >-no) >- case $ac_cv_header_sys_select_h in >- yes) >- ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1" >- LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1" >- ;; >- no) >- { { echo "$as_me:$LINENO: error: need either unistd.h or sys/select.h" >&5 >-echo "$as_me: error: need either unistd.h or sys/select.h" >&2;} >- { (exit 1); exit 1; }; } >- ;; >- esac >- ;; >-esac >- >- >- >-# >-# Find the machine's endian flavor. >-# >-echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 >-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 >-if test "${ac_cv_c_bigendian+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- # See if sys/param.h defines the BYTE_ORDER macro. >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <sys/types.h> >-#include <sys/param.h> >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN >- bogus endian macros >-#endif >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- # It does; now see whether it defined to BIG_ENDIAN or not. >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <sys/types.h> >-#include <sys/param.h> >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-#if BYTE_ORDER != BIG_ENDIAN >- not big endian >-#endif >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_c_bigendian=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_c_bigendian=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-# It does not; compile a test program. >-if test "$cross_compiling" = yes; then >- # try to guess the endianess by grep'ing values into an object file >- ac_cv_c_bigendian=unknown >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; >-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; >-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } >-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; >-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; >-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- _ascii (); _ebcdic (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then >- ac_cv_c_bigendian=yes >-fi >-if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then >- if test "$ac_cv_c_bigendian" = unknown; then >- ac_cv_c_bigendian=no >- else >- # finding both strings is unlikely to happen, but who knows? >- ac_cv_c_bigendian=unknown >- fi >-fi >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-int >-main () >-{ >- /* Are we little or big endian? From Harbison&Steele. */ >- union >- { >- long l; >- char c[sizeof (long)]; >- } u; >- u.l = 1; >- exit (u.c[sizeof (long) - 1] == 1); >-} >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_c_bigendian=no >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >-ac_cv_c_bigendian=yes >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 >-echo "${ECHO_T}$ac_cv_c_bigendian" >&6 >-case $ac_cv_c_bigendian in >- yes) >- >-cat >>confdefs.h <<\_ACEOF >-#define WORDS_BIGENDIAN 1 >-_ACEOF >- ;; >- no) >- ;; >- *) >- { { echo "$as_me:$LINENO: error: unknown endianess >-presetting ac_cv_c_bigendian=no (or yes) will help" >&5 >-echo "$as_me: error: unknown endianess >-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} >- { (exit 1); exit 1; }; } ;; >-esac >- >- >-# >-# was --with-openssl specified? >-# >-echo "$as_me:$LINENO: checking for OpenSSL library" >&5 >-echo $ECHO_N "checking for OpenSSL library... $ECHO_C" >&6 >- >-# Check whether --with-openssl or --without-openssl was given. >-if test "${with_openssl+set}" = set; then >- withval="$with_openssl" >- use_openssl="$withval" >-else >- use_openssl="no" >-fi; >- >-case "$use_openssl" in >- no) >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- DST_OPENSSL_INC="" >- USE_OPENSSL="" >- ;; >- *) >- if test "$use_openssl" = "yes" >- then >- # User did not specify a path - guess it >- openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg" >- for d in $openssldirs >- do >- if test -f $d/include/openssl/opensslv.h >- then >- use_openssl=$d >- break >- fi >- done >- if test "$use_openssl" = "yes" >- then >- echo "$as_me:$LINENO: result: not found" >&5 >-echo "${ECHO_T}not found" >&6 >- { { echo "$as_me:$LINENO: error: OpenSSL was not found in any of $openssldirs; use --with-openssl=/path" >&5 >-echo "$as_me: error: OpenSSL was not found in any of $openssldirs; use --with-openssl=/path" >&2;} >- { (exit 1); exit 1; }; } >- fi >- fi >- USE_OPENSSL='-DOPENSSL' >- DST_OPENSSL_INC="-I$use_openssl/include" >- DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto" >- echo "$as_me:$LINENO: result: using openssl from $use_openssl/lib and $use_openssl/include" >&5 >-echo "${ECHO_T}using openssl from $use_openssl/lib and $use_openssl/include" >&6 >- >- saved_cflags="$CFLAGS" >- saved_libs="$LIBS" >- CFLAGS="$CFLAGS $DST_OPENSSL_INC" >- LIBS="$LIBS $DNS_OPENSSL_LIBS" >- echo "$as_me:$LINENO: checking whether linking with OpenSSL works" >&5 >-echo $ECHO_N "checking whether linking with OpenSSL works... $ECHO_C" >&6 >- if test "$cross_compiling" = yes; then >- echo "$as_me:$LINENO: result: assuming it does work on target platform" >&5 >-echo "${ECHO_T}assuming it does work on target platform" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <openssl/err.h> >-int main() { >- ERR_clear_error(); >- return (0); >-} >- >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- { { echo "$as_me:$LINENO: error: Could not run test program using OpenSSL from >-$use_openssl/lib and $use_openssl/include. >-Please check the argument to --with-openssl and your >-shared library configuration (e.g., LD_LIBRARY_PATH)." >&5 >-echo "$as_me: error: Could not run test program using OpenSSL from >-$use_openssl/lib and $use_openssl/include. >-Please check the argument to --with-openssl and your >-shared library configuration (e.g., LD_LIBRARY_PATH)." >&2;} >- { (exit 1); exit 1; }; } >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >- >- echo "$as_me:$LINENO: checking whether linking with OpenSSL requires -ldl" >&5 >-echo $ECHO_N "checking whether linking with OpenSSL requires -ldl... $ECHO_C" >&6 >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <openssl/err.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- DSO_METHOD_dlfcn(); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-LIBS="$LIBS -ldl" >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <openssl/err.h> >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- DSO_METHOD_dlfcn(); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- DNS_OPENSSL_LIBS="$DNS_OPENSSL_LIBS -ldl" >- >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: unknown" >&5 >-echo "${ECHO_T}unknown" >&6 >- { { echo "$as_me:$LINENO: error: OpenSSL has unsupported dynamic loading" >&5 >-echo "$as_me: error: OpenSSL has unsupported dynamic loading" >&2;} >- { (exit 1); exit 1; }; } >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >- >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >- >-# >-# OpenSSLDie is new with CERT CS-2002-23. If we see it we have may >-# have a patched library otherwise check that we are greater than >-# the fixed versions >-# >- echo "$as_me:$LINENO: checking for OpenSSLDie" >&5 >-echo $ECHO_N "checking for OpenSSLDie... $ECHO_C" >&6 >-if test "${ac_cv_func_OpenSSLDie+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define OpenSSLDie to an innocuous variant, in case <limits.h> declares OpenSSLDie. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define OpenSSLDie innocuous_OpenSSLDie >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char OpenSSLDie (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef OpenSSLDie >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char OpenSSLDie (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_OpenSSLDie) || defined (__stub___OpenSSLDie) >-choke me >-#else >-char (*f) () = OpenSSLDie; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != OpenSSLDie; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_OpenSSLDie=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_OpenSSLDie=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_OpenSSLDie" >&5 >-echo "${ECHO_T}$ac_cv_func_OpenSSLDie" >&6 >-if test $ac_cv_func_OpenSSLDie = yes; then >- echo "$as_me:$LINENO: checking OpenSSL library version" >&5 >-echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6 >- if test "$cross_compiling" = yes; then >- echo "$as_me:$LINENO: result: assuming target platform has compatible version" >&5 >-echo "${ECHO_T}assuming target platform has compatible version" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <stdio.h> >-#include <openssl/opensslv.h> >-int main() { >- if (OPENSSL_VERSION_NUMBER >= 0x0090581fL) >- return (0); >- printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n", >- OPENSSL_VERSION_NUMBER); >- printf("Require OPENSSL_VERSION_NUMBER 0x0090581f or greater\n\n"); >- return (1); >-} >- >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: ok" >&5 >-echo "${ECHO_T}ok" >&6 >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >-echo "$as_me:$LINENO: result: not compatible" >&5 >-echo "${ECHO_T}not compatible" >&6 >- { { echo "$as_me:$LINENO: error: you need OpenSSL 0.9.5a or newer" >&5 >-echo "$as_me: error: you need OpenSSL 0.9.5a or newer" >&2;} >- { (exit 1); exit 1; }; } >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >- >-else >- echo "$as_me:$LINENO: result: did not find fixes for CERT CA-2002-23" >&5 >-echo "${ECHO_T}did not find fixes for CERT CA-2002-23" >&6 >- echo "$as_me:$LINENO: checking OpenSSL library version" >&5 >-echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6 >- if test "$cross_compiling" = yes; then >- echo "$as_me:$LINENO: result: assuming target platform has compatible version" >&5 >-echo "${ECHO_T}assuming target platform has compatible version" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <stdio.h> >-#include <openssl/opensslv.h> >-int main() { >- if ((OPENSSL_VERSION_NUMBER >= 0x0090605fL && >- OPENSSL_VERSION_NUMBER < 0x009070000L) || >- OPENSSL_VERSION_NUMBER >= 0x00907003L) >- return (0); >- printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n", >- OPENSSL_VERSION_NUMBER); >- printf("Require OPENSSL_VERSION_NUMBER 0x0090605f or greater (0.9.6e)\n" >- "Require OPENSSL_VERSION_NUMBER 0x00907003 or greater (0.9.7-beta2)\n\n"); >- return (1); >-} >- >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: ok" >&5 >-echo "${ECHO_T}ok" >&6 >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >-echo "$as_me:$LINENO: result: not compatible" >&5 >-echo "${ECHO_T}not compatible" >&6 >- { { echo "$as_me:$LINENO: error: you need OpenSSL 0.9.6e/0.9.7-beta2 (or newer): CERT CA-2002-23" >&5 >-echo "$as_me: error: you need OpenSSL 0.9.6e/0.9.7-beta2 (or newer): CERT CA-2002-23" >&2;} >- { (exit 1); exit 1; }; } >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >-fi >- >- CFLAGS="$saved_cflags" >- LIBS="$saved_libs" >- ;; >-esac >- >-# >-# This would include the system openssl path (and linker options to use >-# it as needed) if it is found. >-# >- >- >- >- >- >-# >-# was --with-gssapi specified? >-# >-#AC_MSG_CHECKING(for GSSAPI library) >-#AC_ARG_WITH(gssapi, >-#[ --with-gssapi=PATH Specify path for system-supplied GSSAPI], >-# use_gssapi="$withval", use_gssapi="no") >-# >-#case "$use_gssapi" in >-# no) >-# USE_GSSAPI='' >-# DST_GSSAPI_INC='' >-# DNS_GSSAPI_LIBS='' >-# AC_MSG_RESULT(not specified) >-# ;; >-# yes) >-# AC_MSG_ERROR([--with-gssapi must specify a path]) >-# ;; >-# *) >-# USE_GSSAPI='-DGSSAPI' >-# DST_GSSAPI_INC="-I$use_gssapi/include" >-# DNS_GSSAPI_LIBS="-L$use_gssapi/lib -lgssapi_krb5" >-# AC_MSG_RESULT(using gssapi from $use_gssapi/lib and $use_gssapi/include) >-# ;; >-#esac >- >-USE_GSSAPI='' >-DST_GSSAPI_INC='' >-DNS_GSSAPI_LIBS='' >- >- >- >- >- >-# >-# was --with-randomdev specified? >-# >-echo "$as_me:$LINENO: checking for random device" >&5 >-echo $ECHO_N "checking for random device... $ECHO_C" >&6 >- >-# Check whether --with-randomdev or --without-randomdev was given. >-if test "${with_randomdev+set}" = set; then >- withval="$with_randomdev" >- use_randomdev="$withval" >-else >- use_randomdev="unspec" >-fi; >- >-case "$use_randomdev" in >- unspec) >- case "$host" in >- *-openbsd*) >- devrandom=/dev/srandom >- ;; >- *) >- devrandom=/dev/random >- ;; >- esac >- echo "$as_me:$LINENO: result: $devrandom" >&5 >-echo "${ECHO_T}$devrandom" >&6 >- as_ac_File=`echo "ac_cv_file_$devrandom" | $as_tr_sh` >-echo "$as_me:$LINENO: checking for $devrandom" >&5 >-echo $ECHO_N "checking for $devrandom... $ECHO_C" >&6 >-if eval "test \"\${$as_ac_File+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- test "$cross_compiling" = yes && >- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 >-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} >- { (exit 1); exit 1; }; } >-if test -r "$devrandom"; then >- eval "$as_ac_File=yes" >-else >- eval "$as_ac_File=no" >-fi >-fi >-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 >-echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 >-if test `eval echo '${'$as_ac_File'}'` = yes; then >- cat >>confdefs.h <<_ACEOF >-#define PATH_RANDOMDEV "$devrandom" >-_ACEOF >- >-fi >- >- ;; >- yes) >- { { echo "$as_me:$LINENO: error: --with-randomdev must specify a path" >&5 >-echo "$as_me: error: --with-randomdev must specify a path" >&2;} >- { (exit 1); exit 1; }; } >- ;; >- no) >- echo "$as_me:$LINENO: result: disabled" >&5 >-echo "${ECHO_T}disabled" >&6 >- ;; >- *) >- cat >>confdefs.h <<_ACEOF >-#define PATH_RANDOMDEV "$use_randomdev" >-_ACEOF >- >- echo "$as_me:$LINENO: result: using \"$use_randomdev\"" >&5 >-echo "${ECHO_T}using \"$use_randomdev\"" >&6 >- ;; >-esac >- >-# >-# Begin pthreads checking. >-# >-# First, decide whether to use multithreading or not. >-# >-# Enable multithreading by default on systems where it is known >-# to work well, and where debugging of multithreaded programs >-# is supported. >-# >- >-echo "$as_me:$LINENO: checking whether to build with thread support" >&5 >-echo $ECHO_N "checking whether to build with thread support... $ECHO_C" >&6 >- >-case $host in >-*-dec-osf*) >- use_threads=true ;; >-*-solaris2.[0-6]) >- # Thread signals are broken on Solaris 2.6; they are sometimes >- # delivered to the wrong thread. >- use_threads=false ;; >-*-solaris*) >- use_threads=true ;; >-*-ibm-aix*) >- use_threads=true ;; >-*-hp-hpux10*) >- use_threads=false ;; >-*-hp-hpux11*) >- use_threads=true ;; >-*-sgi-irix*) >- use_threads=true ;; >-*-sco-sysv*uw*) >- # UnixWare >- use_threads=false ;; >-*-netbsd*) >- # Socket I/O optimizations introduced in 9.2 expose a >- # bug in unproven-pthreads; see PR #12650 >- use_threads=false ;; >-*-openbsd*) >- # OpenBSD users have reported that named dumps core on >- # startup when built with threads. >- use_threads=false ;; >-*-freebsd*) >- use_threads=false ;; >-*-bsdi*) >- # Thread signals do not appear to work reliably on BSDI. >- use_threads=false ;; >-*-linux*) >- # Threads are disabled on Linux by default because most >- # Linux kernels produce unusable core dumps from multithreaded >- # programs, and because of limitations in setuid(). >- use_threads=false ;; >-*) >- use_threads=false ;; >-esac >- >-# Check whether --enable-threads or --disable-threads was given. >-if test "${enable_threads+set}" = set; then >- enableval="$enable_threads" >- >-fi; >-case "$enable_threads" in >- yes) >- use_threads=true >- ;; >- no) >- use_threads=false >- ;; >- '') >- # Use system-dependent default >- ;; >- *) >- { { echo "$as_me:$LINENO: error: --enable-threads takes yes or no" >&5 >-echo "$as_me: error: --enable-threads takes yes or no" >&2;} >- { (exit 1); exit 1; }; } >- ;; >-esac >- >-if $use_threads >-then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >-if $use_threads >-then >- # >- # Search for / configure pthreads in a system-dependent fashion. >- # >- case "$host" in >- *-netbsd*) >- # NetBSD has multiple pthreads implementations. The >- # recommended one to use is "unproven-pthreads". The >- # older "mit-pthreads" may also work on some NetBSD >- # versions. The PTL2 thread library does not >- # currently work with bind9, but can be chosen with >- # the --with-ptl2 option for those who wish to >- # experiment with it. >- CC="gcc" >- echo "$as_me:$LINENO: checking which NetBSD thread library to use" >&5 >-echo $ECHO_N "checking which NetBSD thread library to use... $ECHO_C" >&6 >- >- >-# Check whether --with-ptl2 or --without-ptl2 was given. >-if test "${with_ptl2+set}" = set; then >- withval="$with_ptl2" >- use_ptl2="$withval" >-else >- use_ptl2="no" >-fi; >- >- : ${LOCALBASE:=/usr/pkg} >- >- if test "X$use_ptl2" = "Xyes" >- then >- echo "$as_me:$LINENO: result: PTL2" >&5 >-echo "${ECHO_T}PTL2" >&6 >- { echo "$as_me:$LINENO: WARNING: linking with PTL2 is highly experimental and not expected to work" >&5 >-echo "$as_me: WARNING: linking with PTL2 is highly experimental and not expected to work" >&2;} >- CC=ptlgcc >- else >- if test ! -d $LOCALBASE/pthreads >- then >- echo "$as_me:$LINENO: result: none" >&5 >-echo "${ECHO_T}none" >&6 >- { { echo "$as_me:$LINENO: error: \"could not find thread libraries\"" >&5 >-echo "$as_me: error: \"could not find thread libraries\"" >&2;} >- { (exit 1); exit 1; }; } >- fi >- >- if $use_threads >- then >- echo "$as_me:$LINENO: result: mit-pthreads/unproven-pthreads" >&5 >-echo "${ECHO_T}mit-pthreads/unproven-pthreads" >&6 >- pkg="$LOCALBASE/pthreads" >- lib1="-L$pkg/lib -Wl,-R$pkg/lib" >- lib2="-lpthread -lm -lgcc -lpthread" >- LIBS="$lib1 $lib2 $LIBS" >- CPPFLAGS="$CPPFLAGS -I$pkg/include" >- STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include" >- fi >- fi >- ;; >- *) >- >-echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 >-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 >-if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lpthread $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char pthread_create (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-pthread_create (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_pthread_pthread_create=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_pthread_pthread_create=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 >-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 >-if test $ac_cv_lib_pthread_pthread_create = yes; then >- cat >>confdefs.h <<_ACEOF >-#define HAVE_LIBPTHREAD 1 >-_ACEOF >- >- LIBS="-lpthread $LIBS" >- >-else >- >-echo "$as_me:$LINENO: checking for __pthread_create in -lpthread" >&5 >-echo $ECHO_N "checking for __pthread_create in -lpthread... $ECHO_C" >&6 >-if test "${ac_cv_lib_pthread___pthread_create+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lpthread $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char __pthread_create (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-__pthread_create (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_pthread___pthread_create=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_pthread___pthread_create=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create" >&5 >-echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create" >&6 >-if test $ac_cv_lib_pthread___pthread_create = yes; then >- cat >>confdefs.h <<_ACEOF >-#define HAVE_LIBPTHREAD 1 >-_ACEOF >- >- LIBS="-lpthread $LIBS" >- >-else >- >-echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5 >-echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6 >-if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lpthread $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char __pthread_create_system (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-__pthread_create_system (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_pthread___pthread_create_system=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_pthread___pthread_create_system=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5 >-echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6 >-if test $ac_cv_lib_pthread___pthread_create_system = yes; then >- cat >>confdefs.h <<_ACEOF >-#define HAVE_LIBPTHREAD 1 >-_ACEOF >- >- LIBS="-lpthread $LIBS" >- >-else >- >-echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5 >-echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6 >-if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lc_r $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char pthread_create (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-pthread_create (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_c_r_pthread_create=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_c_r_pthread_create=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5 >-echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6 >-if test $ac_cv_lib_c_r_pthread_create = yes; then >- cat >>confdefs.h <<_ACEOF >-#define HAVE_LIBC_R 1 >-_ACEOF >- >- LIBS="-lc_r $LIBS" >- >-else >- >-echo "$as_me:$LINENO: checking for pthread_create in -lc" >&5 >-echo $ECHO_N "checking for pthread_create in -lc... $ECHO_C" >&6 >-if test "${ac_cv_lib_c_pthread_create+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lc $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char pthread_create (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-pthread_create (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_c_pthread_create=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_c_pthread_create=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_create" >&5 >-echo "${ECHO_T}$ac_cv_lib_c_pthread_create" >&6 >-if test $ac_cv_lib_c_pthread_create = yes; then >- cat >>confdefs.h <<_ACEOF >-#define HAVE_LIBC 1 >-_ACEOF >- >- LIBS="-lc $LIBS" >- >-else >- { { echo "$as_me:$LINENO: error: \"could not find thread libraries\"" >&5 >-echo "$as_me: error: \"could not find thread libraries\"" >&2;} >- { (exit 1); exit 1; }; } >-fi >- >-fi >- >-fi >- >-fi >- >-fi >- >- ;; >- esac >-fi >- >-if $use_threads >-then >- # >- # We'd like to use sigwait() too >- # >- echo "$as_me:$LINENO: checking for sigwait in -lc" >&5 >-echo $ECHO_N "checking for sigwait in -lc... $ECHO_C" >&6 >-if test "${ac_cv_lib_c_sigwait+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lc $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char sigwait (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-sigwait (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_c_sigwait=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_c_sigwait=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigwait" >&5 >-echo "${ECHO_T}$ac_cv_lib_c_sigwait" >&6 >-if test $ac_cv_lib_c_sigwait = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_SIGWAIT 1 >-_ACEOF >- >-else >- echo "$as_me:$LINENO: checking for sigwait in -lpthread" >&5 >-echo $ECHO_N "checking for sigwait in -lpthread... $ECHO_C" >&6 >-if test "${ac_cv_lib_pthread_sigwait+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lpthread $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char sigwait (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-sigwait (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_pthread_sigwait=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_pthread_sigwait=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_sigwait" >&5 >-echo "${ECHO_T}$ac_cv_lib_pthread_sigwait" >&6 >-if test $ac_cv_lib_pthread_sigwait = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_SIGWAIT 1 >-_ACEOF >- >-else >- echo "$as_me:$LINENO: checking for _Psigwait in -lpthread" >&5 >-echo $ECHO_N "checking for _Psigwait in -lpthread... $ECHO_C" >&6 >-if test "${ac_cv_lib_pthread__Psigwait+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lpthread $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char _Psigwait (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-_Psigwait (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_pthread__Psigwait=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_pthread__Psigwait=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_pthread__Psigwait" >&5 >-echo "${ECHO_T}$ac_cv_lib_pthread__Psigwait" >&6 >-if test $ac_cv_lib_pthread__Psigwait = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_SIGWAIT 1 >-_ACEOF >- >-fi >- >-fi >- >- >-fi >- >- >- echo "$as_me:$LINENO: checking for pthread_attr_getstacksize" >&5 >-echo $ECHO_N "checking for pthread_attr_getstacksize... $ECHO_C" >&6 >-if test "${ac_cv_func_pthread_attr_getstacksize+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define pthread_attr_getstacksize to an innocuous variant, in case <limits.h> declares pthread_attr_getstacksize. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define pthread_attr_getstacksize innocuous_pthread_attr_getstacksize >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char pthread_attr_getstacksize (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef pthread_attr_getstacksize >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char pthread_attr_getstacksize (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_pthread_attr_getstacksize) || defined (__stub___pthread_attr_getstacksize) >-choke me >-#else >-char (*f) () = pthread_attr_getstacksize; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != pthread_attr_getstacksize; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_pthread_attr_getstacksize=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_pthread_attr_getstacksize=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_getstacksize" >&5 >-echo "${ECHO_T}$ac_cv_func_pthread_attr_getstacksize" >&6 >-if test $ac_cv_func_pthread_attr_getstacksize = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1 >-_ACEOF >- >-fi >- >- >- # >- # Additional OS-specific issues related to pthreads and sigwait. >- # >- case "$host" in >- # >- # One more place to look for sigwait. >- # >- *-freebsd*) >- echo "$as_me:$LINENO: checking for sigwait in -lc_r" >&5 >-echo $ECHO_N "checking for sigwait in -lc_r... $ECHO_C" >&6 >-if test "${ac_cv_lib_c_r_sigwait+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lc_r $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char sigwait (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-sigwait (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_c_r_sigwait=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_c_r_sigwait=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_sigwait" >&5 >-echo "${ECHO_T}$ac_cv_lib_c_r_sigwait" >&6 >-if test $ac_cv_lib_c_r_sigwait = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_SIGWAIT 1 >-_ACEOF >- >-fi >- >- ;; >- # >- # BSDI 3.0 through 4.0.1 needs pthread_init() to be >- # called before certain pthreads calls. This is deprecated >- # in BSD/OS 4.1. >- # >- *-bsdi3.*|*-bsdi4.0*) >- cat >>confdefs.h <<\_ACEOF >-#define NEED_PTHREAD_INIT 1 >-_ACEOF >- >- ;; >- # >- # LinuxThreads requires some changes to the way we >- # deal with signals. >- # >- *-linux*) >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_LINUXTHREADS 1 >-_ACEOF >- >- ;; >- # >- # Ensure the right sigwait() semantics on Solaris and make >- # sure we call pthread_setconcurrency. >- # >- *-solaris*) >- cat >>confdefs.h <<\_ACEOF >-#define _POSIX_PTHREAD_SEMANTICS 1 >-_ACEOF >- >- echo "$as_me:$LINENO: checking for pthread_setconcurrency" >&5 >-echo $ECHO_N "checking for pthread_setconcurrency... $ECHO_C" >&6 >-if test "${ac_cv_func_pthread_setconcurrency+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define pthread_setconcurrency to an innocuous variant, in case <limits.h> declares pthread_setconcurrency. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define pthread_setconcurrency innocuous_pthread_setconcurrency >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char pthread_setconcurrency (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef pthread_setconcurrency >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char pthread_setconcurrency (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_pthread_setconcurrency) || defined (__stub___pthread_setconcurrency) >-choke me >-#else >-char (*f) () = pthread_setconcurrency; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != pthread_setconcurrency; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_pthread_setconcurrency=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_pthread_setconcurrency=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_pthread_setconcurrency" >&5 >-echo "${ECHO_T}$ac_cv_func_pthread_setconcurrency" >&6 >-if test $ac_cv_func_pthread_setconcurrency = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define CALL_PTHREAD_SETCONCURRENCY 1 >-_ACEOF >- >-fi >- >- ;; >- # >- # UnixWare does things its own way. >- # >- *-sco-sysv*uw*) >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_UNIXWARE_SIGWAIT 1 >-_ACEOF >- >- ;; >- esac >- >- # >- # Look for sysconf to allow detection of the number of processors. >- # >- echo "$as_me:$LINENO: checking for sysconf" >&5 >-echo $ECHO_N "checking for sysconf... $ECHO_C" >&6 >-if test "${ac_cv_func_sysconf+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define sysconf to an innocuous variant, in case <limits.h> declares sysconf. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define sysconf innocuous_sysconf >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char sysconf (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef sysconf >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char sysconf (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_sysconf) || defined (__stub___sysconf) >-choke me >-#else >-char (*f) () = sysconf; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != sysconf; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_sysconf=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_sysconf=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_sysconf" >&5 >-echo "${ECHO_T}$ac_cv_func_sysconf" >&6 >-if test $ac_cv_func_sysconf = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_SYSCONF 1 >-_ACEOF >- >-fi >- >- >- if test "X$GCC" = "Xyes"; then >- case "$host" in >- *-freebsd*) >- CC="$CC -pthread" >- CCOPT="$CCOPT -pthread" >- STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" >- ;; >- *-openbsd*) >- CC="$CC -pthread" >- CCOPT="$CCOPT -pthread" >- ;; >- *-solaris*) >- LIBS="$LIBS -lthread" >- ;; >- *-ibm-aix*) >- STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" >- ;; >- esac >- else >- case $host in >- *-dec-osf*) >- CC="$CC -pthread" >- CCOPT="$CCOPT -pthread" >- ;; >- *-solaris*) >- CC="$CC -mt" >- CCOPT="$CCOPT -mt" >- ;; >- *-ibm-aix*) >- STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" >- ;; >- *-sco-sysv*uw*) >- CC="$CC -Kthread" >- CCOPT="$CCOPT -Kthread" >- ;; >- esac >- fi >- ALWAYS_DEFINES="-D_REENTRANT" >- ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1" >- thread_dir=pthreads >-else >- ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS" >- thread_dir=nothreads >- ALWAYS_DEFINES="" >-fi >- >- >- >- >-ISC_THREAD_DIR=$thread_dir >- >- >-# >-# flockfile is usually provided by pthreads, but we may want to use it >-# even if compiled with --disable-threads. getc_unlocked might also not >-# be defined. >-# >-echo "$as_me:$LINENO: checking for flockfile" >&5 >-echo $ECHO_N "checking for flockfile... $ECHO_C" >&6 >-if test "${ac_cv_func_flockfile+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define flockfile to an innocuous variant, in case <limits.h> declares flockfile. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define flockfile innocuous_flockfile >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char flockfile (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef flockfile >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char flockfile (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_flockfile) || defined (__stub___flockfile) >-choke me >-#else >-char (*f) () = flockfile; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != flockfile; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_flockfile=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_flockfile=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_flockfile" >&5 >-echo "${ECHO_T}$ac_cv_func_flockfile" >&6 >-if test $ac_cv_func_flockfile = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_FLOCKFILE 1 >-_ACEOF >- >-fi >- >-echo "$as_me:$LINENO: checking for getc_unlocked" >&5 >-echo $ECHO_N "checking for getc_unlocked... $ECHO_C" >&6 >-if test "${ac_cv_func_getc_unlocked+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define getc_unlocked to an innocuous variant, in case <limits.h> declares getc_unlocked. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define getc_unlocked innocuous_getc_unlocked >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char getc_unlocked (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef getc_unlocked >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char getc_unlocked (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_getc_unlocked) || defined (__stub___getc_unlocked) >-choke me >-#else >-char (*f) () = getc_unlocked; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != getc_unlocked; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_getc_unlocked=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_getc_unlocked=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_getc_unlocked" >&5 >-echo "${ECHO_T}$ac_cv_func_getc_unlocked" >&6 >-if test $ac_cv_func_getc_unlocked = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_GETCUNLOCKED 1 >-_ACEOF >- >-fi >- >- >-# >-# Indicate what the final decision was regarding threads. >-# >-echo "$as_me:$LINENO: checking whether to build with threads" >&5 >-echo $ECHO_N "checking whether to build with threads... $ECHO_C" >&6 >-if $use_threads; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >-# >-# End of pthreads stuff. >-# >- >-# >-# Additional compiler settings. >-# >-MKDEPCC="$CC" >-MKDEPCFLAGS="-M" >-IRIX_DNSSEC_WARNINGS_HACK="" >- >-if test "X$GCC" = "Xyes"; then >- STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat" >-else >- case $host in >- *-dec-osf*) >- CC="$CC -std" >- CCOPT="$CCOPT -std" >- MKDEPCC="$CC" >- ;; >- *-hp-hpux*) >- CC="$CC -Ae -z" >- # The version of the C compiler that constantly warns about >- # 'const' as well as alignment issues is unfortunately not >- # able to be discerned via the version of the operating >- # system, nor does cc have a version flag. >- case "`$CC +W 123 2>&1`" in >- *Unknown?option*) >- STD_CWARNINGS="+w1" >- ;; >- *) >- # Turn off the pointlessly noisy warnings. >- STD_CWARNINGS="+w1 +W 474,530" >- ;; >- esac >- CCOPT="$CCOPT -Ae -z" >- LIBS="-Wl,+vnocompatwarnings $LIBS" >- MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP' >- ;; >- *-sgi-irix*) >- STD_CWARNINGS="-fullwarn -woff 1209" >- # >- # Silence more than 250 instances of >- # "prototyped function redeclared without prototype" >- # and 11 instances of >- # "variable ... was set but never used" >- # from lib/dns/sec/openssl. >- # >- IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552" >- ;; >- *-solaris*) >- MKDEPCFLAGS="-xM" >- ;; >- *-sco-sysv*uw*) >- # UnixWare >- CC="$CC -w" >- ;; >- esac >-fi >- >- >- >- >- >- >-# >-# NLS >-# >-echo "$as_me:$LINENO: checking for catgets" >&5 >-echo $ECHO_N "checking for catgets... $ECHO_C" >&6 >-if test "${ac_cv_func_catgets+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define catgets to an innocuous variant, in case <limits.h> declares catgets. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define catgets innocuous_catgets >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char catgets (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef catgets >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char catgets (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_catgets) || defined (__stub___catgets) >-choke me >-#else >-char (*f) () = catgets; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != catgets; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_catgets=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_catgets=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_catgets" >&5 >-echo "${ECHO_T}$ac_cv_func_catgets" >&6 >-if test $ac_cv_func_catgets = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_CATGETS 1 >-_ACEOF >- >-fi >- >- >-# >-# -lxnet buys us one big porting headache... standards, gotta love 'em. >-# >-# AC_CHECK_LIB(xnet, socket, , >-# AC_CHECK_LIB(socket, socket) >-# AC_CHECK_LIB(nsl, inet_ntoa) >-# ) >-# >-# Use this for now, instead: >-# >-case "$host" in >- mips-sgi-irix*) >- ;; >- *) >- >-echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 >-echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 >-if test "${ac_cv_lib_socket_socket+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lsocket $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char socket (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-socket (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_socket_socket=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_socket_socket=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 >-echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 >-if test $ac_cv_lib_socket_socket = yes; then >- cat >>confdefs.h <<_ACEOF >-#define HAVE_LIBSOCKET 1 >-_ACEOF >- >- LIBS="-lsocket $LIBS" >- >-fi >- >- >-echo "$as_me:$LINENO: checking for inet_ntoa in -lnsl" >&5 >-echo $ECHO_N "checking for inet_ntoa in -lnsl... $ECHO_C" >&6 >-if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lnsl $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char inet_ntoa (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-inet_ntoa (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_nsl_inet_ntoa=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_nsl_inet_ntoa=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_ntoa" >&5 >-echo "${ECHO_T}$ac_cv_lib_nsl_inet_ntoa" >&6 >-if test $ac_cv_lib_nsl_inet_ntoa = yes; then >- cat >>confdefs.h <<_ACEOF >-#define HAVE_LIBNSL 1 >-_ACEOF >- >- LIBS="-lnsl $LIBS" >- >-fi >- >- ;; >-esac >- >-# >-# Purify support >-# >-echo "$as_me:$LINENO: checking whether to use purify" >&5 >-echo $ECHO_N "checking whether to use purify... $ECHO_C" >&6 >- >-# Check whether --with-purify or --without-purify was given. >-if test "${with_purify+set}" = set; then >- withval="$with_purify" >- use_purify="$withval" >-else >- use_purify="no" >-fi; >- >-case "$use_purify" in >- no) >- ;; >- yes) >- # Extract the first word of "purify", so it can be a program name with args. >-set dummy purify; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_path_purify_path+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- case $purify_path in >- [\\/]* | ?:[\\/]*) >- ac_cv_path_purify_path="$purify_path" # Let the user override the test with a path. >- ;; >- *) >- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_path_purify_path="$as_dir/$ac_word$ac_exec_ext" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >- test -z "$ac_cv_path_purify_path" && ac_cv_path_purify_path="purify" >- ;; >-esac >-fi >-purify_path=$ac_cv_path_purify_path >- >-if test -n "$purify_path"; then >- echo "$as_me:$LINENO: result: $purify_path" >&5 >-echo "${ECHO_T}$purify_path" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- ;; >- *) >- purify_path="$use_purify" >- ;; >-esac >- >-case "$use_purify" in >- no) >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- PURIFY="" >- ;; >- *) >- if test -f $purify_path || test $purify_path = purify; then >- echo "$as_me:$LINENO: result: $purify_path" >&5 >-echo "${ECHO_T}$purify_path" >&6 >- PURIFYFLAGS="`echo $PURIFYOPTIONS`" >- PURIFY="$purify_path $PURIFYFLAGS" >- else >- { { echo "$as_me:$LINENO: error: $purify_path not found. >- >-Please choose the proper path with the following command: >- >- configure --with-purify=PATH >-" >&5 >-echo "$as_me: error: $purify_path not found. >- >-Please choose the proper path with the following command: >- >- configure --with-purify=PATH >-" >&2;} >- { (exit 1); exit 1; }; } >- fi >- ;; >-esac >- >- >- >-# >-# GNU libtool support >-# >- >-# Check whether --with-libtool or --without-libtool was given. >-if test "${with_libtool+set}" = set; then >- withval="$with_libtool" >- use_libtool="$withval" >-else >- use_libtool="no" >-fi; >- >-case $use_libtool in >- yes) >- # Check whether --enable-shared or --disable-shared was given. >-if test "${enable_shared+set}" = set; then >- enableval="$enable_shared" >- 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 >-else >- enable_shared=yes >-fi; >-# Check whether --enable-static or --disable-static was given. >-if test "${enable_static+set}" = set; then >- enableval="$enable_static" >- 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 >-else >- enable_static=yes >-fi; >-# Check whether --enable-fast-install or --disable-fast-install was given. >-if test "${enable_fast_install+set}" = set; then >- enableval="$enable_fast_install" >- p=${PACKAGE-default} >-case $enableval in >-yes) enable_fast_install=yes ;; >-no) enable_fast_install=no ;; >-*) >- enable_fast_install=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_fast_install=yes >- fi >- done >- IFS="$ac_save_ifs" >- ;; >-esac >-else >- enable_fast_install=yes >-fi; >- >-# Check whether --with-gnu-ld or --without-gnu-ld was given. >-if test "${with_gnu_ld+set}" = set; then >- withval="$with_gnu_ld" >- test "$withval" = no || with_gnu_ld=yes >-else >- with_gnu_ld=no >-fi; >-ac_prog=ld >-if test "$GCC" = yes; then >- # Check if gcc -print-prog-name=ld gives a path. >- echo "$as_me:$LINENO: checking for ld used by GCC" >&5 >-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 >- case $host in >- *-*-mingw*) >- # gcc leaves a trailing carriage return which upsets mingw >- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; >- *) >- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; >- esac >- case $ac_prog in >- # Accept absolute paths. >- [\\/]* | [A-Za-z]:[\\/]*) >- re_direlt='/[^/][^/]*/\.\./' >- # Canonicalize the path of ld >- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` >- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do >- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` >- done >- test -z "$LD" && LD="$ac_prog" >- ;; >- "") >- # If it fails, then pretend we aren't using GCC. >- ac_prog=ld >- ;; >- *) >- # If it is relative, then search for the first ld in PATH. >- with_gnu_ld=unknown >- ;; >- esac >-elif test "$with_gnu_ld" = yes; then >- echo "$as_me:$LINENO: checking for GNU ld" >&5 >-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 >-else >- echo "$as_me:$LINENO: checking for non-GNU ld" >&5 >-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 >-fi >-if test "${lt_cv_path_LD+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -z "$LD"; then >- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" >- for ac_dir in $PATH; do >- test -z "$ac_dir" && ac_dir=. >- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then >- lt_cv_path_LD="$ac_dir/$ac_prog" >- # Check to see if the program is GNU ld. I'd rather use --version, >- # but apparently some GNU ld's only accept -v. >- # Break only if it was the GNU/non-GNU ld that we prefer. >- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then >- test "$with_gnu_ld" != no && break >- else >- test "$with_gnu_ld" != yes && break >- fi >- fi >- done >- IFS="$ac_save_ifs" >-else >- lt_cv_path_LD="$LD" # Let the user override the test with a path. >-fi >-fi >- >-LD="$lt_cv_path_LD" >-if test -n "$LD"; then >- echo "$as_me:$LINENO: result: $LD" >&5 >-echo "${ECHO_T}$LD" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 >-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} >- { (exit 1); exit 1; }; } >-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 >-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 >-if test "${lt_cv_prog_gnu_ld+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- # I'd rather use --version here, but apparently some GNU ld's only accept -v. >-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then >- lt_cv_prog_gnu_ld=yes >-else >- lt_cv_prog_gnu_ld=no >-fi >-fi >-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 >-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 >-with_gnu_ld=$lt_cv_prog_gnu_ld >- >- >-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 >-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 >-if test "${lt_cv_ld_reload_flag+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- lt_cv_ld_reload_flag='-r' >-fi >-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 >-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 >-reload_flag=$lt_cv_ld_reload_flag >-test -n "$reload_flag" && reload_flag=" $reload_flag" >- >-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 >-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 >-if test "${lt_cv_path_NM+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$NM"; then >- # Let the user override the test. >- lt_cv_path_NM="$NM" >-else >- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" >- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do >- test -z "$ac_dir" && ac_dir=. >- tmp_nm=$ac_dir/${ac_tool_prefix}nm >- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then >- # Check to see if the nm accepts a BSD-compat flag. >- # Adding the `sed 1q' prevents false positives on HP-UX, which says: >- # nm: unknown option "B" ignored >- # Tru64's nm complains that /dev/null is an invalid object file >- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then >- lt_cv_path_NM="$tmp_nm -B" >- break >- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then >- lt_cv_path_NM="$tmp_nm -p" >- break >- else >- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but >- continue # so that we can try to find one that supports BSD flags >- fi >- fi >- done >- IFS="$ac_save_ifs" >- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm >-fi >-fi >- >-NM="$lt_cv_path_NM" >-echo "$as_me:$LINENO: result: $NM" >&5 >-echo "${ECHO_T}$NM" >&6 >- >-echo "$as_me:$LINENO: checking whether ln -s works" >&5 >-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 >-LN_S=$as_ln_s >-if test "$LN_S" = "ln -s"; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >-else >- echo "$as_me:$LINENO: result: no, using $LN_S" >&5 >-echo "${ECHO_T}no, using $LN_S" >&6 >-fi >- >-echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5 >-echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6 >-if test "${lt_cv_deplibs_check_method+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- lt_cv_file_magic_cmd='$MAGIC_CMD' >-lt_cv_file_magic_test_file= >-lt_cv_deplibs_check_method='unknown' >-# Need to set the preceding variable on all platforms that support >-# interlibrary dependencies. >-# 'none' -- dependencies not supported. >-# `unknown' -- same as none, but documents that we really don't know. >-# 'pass_all' -- all dependencies passed with no checks. >-# 'test_compile' -- check by making test program. >-# ['file_magic [regex]'] -- check by looking for files in library path >-# which responds to the $file_magic_cmd with a given egrep regex. >-# If you have `file' or equivalent on your system and you're not sure >-# whether `pass_all' will *always* work, you probably want this one. >- >-case $host_os in >-aix4* | aix5*) >- lt_cv_deplibs_check_method=pass_all >- ;; >- >-beos*) >- lt_cv_deplibs_check_method=pass_all >- ;; >- >-bsdi4*) >- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' >- lt_cv_file_magic_cmd='/usr/bin/file -L' >- lt_cv_file_magic_test_file=/shlib/libc.so >- ;; >- >-cygwin* | mingw* | pw32*) >- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' >- lt_cv_file_magic_cmd='$OBJDUMP -f' >- ;; >- >-darwin* | rhapsody*) >- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' >- lt_cv_file_magic_cmd='/usr/bin/file -L' >- case "$host_os" in >- rhapsody* | darwin1.012) >- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` >- ;; >- *) # Darwin 1.3 on >- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' >- ;; >- esac >- ;; >- >-freebsd*) >- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then >- case $host_cpu in >- i*86 ) >- # Not sure whether the presence of OpenBSD here was a mistake. >- # Let's accept both of them until this is cleared up. >- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' >- lt_cv_file_magic_cmd=/usr/bin/file >- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` >- ;; >- esac >- else >- lt_cv_deplibs_check_method=pass_all >- fi >- ;; >- >-gnu*) >- lt_cv_deplibs_check_method=pass_all >- ;; >- >-hpux10.20*|hpux11*) >- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' >- lt_cv_file_magic_cmd=/usr/bin/file >- lt_cv_file_magic_test_file=/usr/lib/libc.sl >- ;; >- >-irix5* | irix6*) >- case $host_os in >- irix5*) >- # this will be overridden with pass_all, but let us keep it just in case >- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" >- ;; >- *) >- case $LD in >- *-32|*"-32 ") libmagic=32-bit;; >- *-n32|*"-n32 ") libmagic=N32;; >- *-64|*"-64 ") libmagic=64-bit;; >- *) libmagic=never-match;; >- esac >- # this will be overridden with pass_all, but let us keep it just in case >- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" >- ;; >- esac >- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` >- lt_cv_deplibs_check_method=pass_all >- ;; >- >-# This must be Linux ELF. >-linux-gnu*) >- case $host_cpu in >- alpha* | i*86 | powerpc* | sparc* | ia64* ) >- lt_cv_deplibs_check_method=pass_all ;; >- *) >- # glibc up to 2.1.1 does not perform some relocations on ARM >- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; >- esac >- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` >- ;; >- >-netbsd*) >- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then >- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' >- else >- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' >- fi >- ;; >- >-newos6*) >- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' >- lt_cv_file_magic_cmd=/usr/bin/file >- lt_cv_file_magic_test_file=/usr/lib/libnls.so >- ;; >- >-osf3* | osf4* | osf5*) >- # this will be overridden with pass_all, but let us keep it just in case >- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' >- lt_cv_file_magic_test_file=/shlib/libc.so >- lt_cv_deplibs_check_method=pass_all >- ;; >- >-sco3.2v5*) >- lt_cv_deplibs_check_method=pass_all >- ;; >- >-solaris*) >- lt_cv_deplibs_check_method=pass_all >- lt_cv_file_magic_test_file=/lib/libc.so >- ;; >- >-sysv5uw[78]* | sysv4*uw2*) >- lt_cv_deplibs_check_method=pass_all >- ;; >- >-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) >- case $host_vendor in >- motorola) >- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' >- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` >- ;; >- ncr) >- lt_cv_deplibs_check_method=pass_all >- ;; >- sequent) >- lt_cv_file_magic_cmd='/bin/file' >- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' >- ;; >- sni) >- lt_cv_file_magic_cmd='/bin/file' >- lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" >- lt_cv_file_magic_test_file=/lib/libc.so >- ;; >- esac >- ;; >-esac >- >-fi >-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 >-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 >-file_magic_cmd=$lt_cv_file_magic_cmd >-deplibs_check_method=$lt_cv_deplibs_check_method >- >- >- >- >- >- >- >-# Check for command to grab the raw symbol name followed by C symbol from nm. >-echo "$as_me:$LINENO: checking command to parse $NM output" >&5 >-echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6 >-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- >-# These are sane defaults that work on at least a few old systems. >-# [They come from Ultrix. What could be older than Ultrix?!! ;)] >- >-# Character class describing NM global symbol codes. >-symcode='[BCDEGRST]' >- >-# Regexp to match symbols that can be accessed directly from C. >-sympat='\([_A-Za-z][_A-Za-z0-9]*\)' >- >-# Transform the above into a raw symbol and a C symbol. >-symxfrm='\1 \2\3 \3' >- >-# Transform an extracted symbol line into a proper C declaration >-lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" >- >-# Define system-specific variables. >-case $host_os in >-aix*) >- symcode='[BCDT]' >- ;; >-cygwin* | mingw* | pw32*) >- symcode='[ABCDGISTW]' >- ;; >-hpux*) # Its linker distinguishes data from code symbols >- lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" >- ;; >-irix*) >- symcode='[BCDEGRST]' >- ;; >-solaris* | sysv5*) >- symcode='[BDT]' >- ;; >-sysv4) >- symcode='[DFNSTU]' >- ;; >-esac >- >-# Handle CRLF in mingw tool chain >-opt_cr= >-case $host_os in >-mingw*) >- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp >- ;; >-esac >- >-# If we're using GNU nm, then use its standard symbol codes. >-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then >- symcode='[ABCDGISTW]' >-fi >- >-# Try without a prefix undercore, then with it. >-for ac_symprfx in "" "_"; do >- >- # Write the raw and C identifiers. >-lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" >- >- # Check to see that the pipe works correctly. >- pipe_works=no >- rm -f conftest* >- cat > conftest.$ac_ext <<EOF >-#ifdef __cplusplus >-extern "C" { >-#endif >-char nm_test_var; >-void nm_test_func(){} >-#ifdef __cplusplus >-} >-#endif >-int main(){nm_test_var='a';nm_test_func();return(0);} >-EOF >- >- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; then >- # Now try to grab the symbols. >- nlist=conftest.nm >- if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 >- (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && test -s "$nlist"; then >- # Try sorting and uniquifying the output. >- if sort "$nlist" | uniq > "$nlist"T; then >- mv -f "$nlist"T "$nlist" >- else >- rm -f "$nlist"T >- fi >- >- # Make sure that we snagged all the symbols we need. >- if egrep ' nm_test_var$' "$nlist" >/dev/null; then >- if egrep ' nm_test_func$' "$nlist" >/dev/null; then >- cat <<EOF > conftest.$ac_ext >-#ifdef __cplusplus >-extern "C" { >-#endif >- >-EOF >- # Now generate the symbol file. >- eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' >- >- cat <<EOF >> conftest.$ac_ext >-#if defined (__STDC__) && __STDC__ >-# define lt_ptr_t void * >-#else >-# define lt_ptr_t char * >-# define const >-#endif >- >-/* The mapping between symbol names and symbols. */ >-const struct { >- const char *name; >- lt_ptr_t address; >-} >-lt_preloaded_symbols[] = >-{ >-EOF >- sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext >- cat <<\EOF >> conftest.$ac_ext >- {0, (lt_ptr_t) 0} >-}; >- >-#ifdef __cplusplus >-} >-#endif >-EOF >- # Now try linking the two files. >- mv conftest.$ac_objext conftstm.$ac_objext >- save_LIBS="$LIBS" >- save_CFLAGS="$CFLAGS" >- LIBS="conftstm.$ac_objext" >- CFLAGS="$CFLAGS$no_builtin_flag" >- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && test -s conftest; then >- pipe_works=yes >- fi >- LIBS="$save_LIBS" >- CFLAGS="$save_CFLAGS" >- else >- echo "cannot find nm_test_func in $nlist" >&5 >- fi >- else >- echo "cannot find nm_test_var in $nlist" >&5 >- fi >- else >- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 >- fi >- else >- echo "$progname: failed program was:" >&5 >- cat conftest.$ac_ext >&5 >- fi >- rm -f conftest* conftst* >- >- # Do not use the global_symbol_pipe unless it works. >- if test "$pipe_works" = yes; then >- break >- else >- lt_cv_sys_global_symbol_pipe= >- fi >-done >- >-fi >- >-global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" >-if test -z "$lt_cv_sys_global_symbol_pipe"; then >- global_symbol_to_cdecl= >-else >- global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" >-fi >-if test -z "$global_symbol_pipe$global_symbol_to_cdecl"; then >- echo "$as_me:$LINENO: result: failed" >&5 >-echo "${ECHO_T}failed" >&6 >-else >- echo "$as_me:$LINENO: result: ok" >&5 >-echo "${ECHO_T}ok" >&6 >-fi >- >- >-for ac_header in dlfcn.h >-do >-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo "$as_me:$LINENO: checking for $ac_header" >&5 >-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-fi >-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 >-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 >-else >- # Is the header compilable? >-echo "$as_me:$LINENO: checking $ac_header usability" >&5 >-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-$ac_includes_default >-#include <$ac_header> >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_header_compiler=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_header_compiler=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 >-echo "${ECHO_T}$ac_header_compiler" >&6 >- >-# Is the header present? >-echo "$as_me:$LINENO: checking $ac_header presence" >&5 >-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <$ac_header> >-_ACEOF >-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 >- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 >- ac_status=$? >- egrep -v '^ *\+' conftest.er1 >conftest.err >- rm -f conftest.er1 >- cat conftest.err >&5 >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >/dev/null; then >- if test -s conftest.err; then >- ac_cpp_err=$ac_c_preproc_warn_flag >- else >- ac_cpp_err= >- fi >-else >- ac_cpp_err=yes >-fi >-if test -z "$ac_cpp_err"; then >- ac_header_preproc=yes >-else >- echo "$as_me: failed program was:" >&5 >- cat conftest.$ac_ext >&5 >- ac_header_preproc=no >-fi >-rm -f conftest.err conftest.$ac_ext >-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 >-echo "${ECHO_T}$ac_header_preproc" >&6 >- >-# So? What about this header? >-case $ac_header_compiler:$ac_header_preproc in >- yes:no ) >- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 >-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 >-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; >- no:yes ) >- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 >-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 >-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 >-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; >-esac >-echo "$as_me:$LINENO: checking for $ac_header" >&5 >-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- eval "$as_ac_Header=$ac_header_preproc" >-fi >-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 >-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 >- >-fi >-if test `eval echo '${'$as_ac_Header'}'` = yes; then >- cat >>confdefs.h <<_ACEOF >-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 >-_ACEOF >- >-fi >- >-done >- >- >- >- >- >-# Only perform the check for file, if the check method requires it >-case $deplibs_check_method in >-file_magic*) >- if test "$file_magic_cmd" = '$MAGIC_CMD'; then >- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 >-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 >-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- case $MAGIC_CMD in >- /*) >- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. >- ;; >- ?:/*) >- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. >- ;; >- *) >- ac_save_MAGIC_CMD="$MAGIC_CMD" >- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >- ac_dummy="/usr/bin:$PATH" >- for ac_dir in $ac_dummy; do >- test -z "$ac_dir" && ac_dir=. >- if test -f $ac_dir/${ac_tool_prefix}file; then >- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" >- if test -n "$file_magic_test_file"; then >- case $deplibs_check_method in >- "file_magic "*) >- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" >- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" >- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | >- egrep "$file_magic_regex" > /dev/null; then >- : >- else >- cat <<EOF 1>&2 >- >-*** Warning: the command libtool uses to detect shared libraries, >-*** $file_magic_cmd, produces output that libtool cannot recognize. >-*** The result is that libtool may fail to recognize shared libraries >-*** as such. This will affect the creation of libtool libraries that >-*** depend on shared libraries, but programs linked with such libtool >-*** libraries will work regardless of this problem. Nevertheless, you >-*** may want to report the problem to your system manager and/or to >-*** bug-libtool@gnu.org >- >-EOF >- fi ;; >- esac >- fi >- break >- fi >- done >- IFS="$ac_save_ifs" >- MAGIC_CMD="$ac_save_MAGIC_CMD" >- ;; >-esac >-fi >- >-MAGIC_CMD="$lt_cv_path_MAGIC_CMD" >-if test -n "$MAGIC_CMD"; then >- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 >-echo "${ECHO_T}$MAGIC_CMD" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >-if test -z "$lt_cv_path_MAGIC_CMD"; then >- if test -n "$ac_tool_prefix"; then >- echo "$as_me:$LINENO: checking for file" >&5 >-echo $ECHO_N "checking for file... $ECHO_C" >&6 >-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- case $MAGIC_CMD in >- /*) >- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. >- ;; >- ?:/*) >- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. >- ;; >- *) >- ac_save_MAGIC_CMD="$MAGIC_CMD" >- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >- ac_dummy="/usr/bin:$PATH" >- for ac_dir in $ac_dummy; do >- test -z "$ac_dir" && ac_dir=. >- if test -f $ac_dir/file; then >- lt_cv_path_MAGIC_CMD="$ac_dir/file" >- if test -n "$file_magic_test_file"; then >- case $deplibs_check_method in >- "file_magic "*) >- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" >- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" >- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | >- egrep "$file_magic_regex" > /dev/null; then >- : >- else >- cat <<EOF 1>&2 >- >-*** Warning: the command libtool uses to detect shared libraries, >-*** $file_magic_cmd, produces output that libtool cannot recognize. >-*** The result is that libtool may fail to recognize shared libraries >-*** as such. This will affect the creation of libtool libraries that >-*** depend on shared libraries, but programs linked with such libtool >-*** libraries will work regardless of this problem. Nevertheless, you >-*** may want to report the problem to your system manager and/or to >-*** bug-libtool@gnu.org >- >-EOF >- fi ;; >- esac >- fi >- break >- fi >- done >- IFS="$ac_save_ifs" >- MAGIC_CMD="$ac_save_MAGIC_CMD" >- ;; >-esac >-fi >- >-MAGIC_CMD="$lt_cv_path_MAGIC_CMD" >-if test -n "$MAGIC_CMD"; then >- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 >-echo "${ECHO_T}$MAGIC_CMD" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- else >- MAGIC_CMD=: >- fi >-fi >- >- fi >- ;; >-esac >- >-if test -n "$ac_tool_prefix"; then >- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. >-set dummy ${ac_tool_prefix}ranlib; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_RANLIB+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$RANLIB"; then >- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >-fi >-fi >-RANLIB=$ac_cv_prog_RANLIB >-if test -n "$RANLIB"; then >- echo "$as_me:$LINENO: result: $RANLIB" >&5 >-echo "${ECHO_T}$RANLIB" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >-fi >-if test -z "$ac_cv_prog_RANLIB"; then >- ac_ct_RANLIB=$RANLIB >- # Extract the first word of "ranlib", so it can be a program name with args. >-set dummy ranlib; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$ac_ct_RANLIB"; then >- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_ac_ct_RANLIB="ranlib" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" >-fi >-fi >-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB >-if test -n "$ac_ct_RANLIB"; then >- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 >-echo "${ECHO_T}$ac_ct_RANLIB" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- RANLIB=$ac_ct_RANLIB >-else >- RANLIB="$ac_cv_prog_RANLIB" >-fi >- >-if test -n "$ac_tool_prefix"; then >- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. >-set dummy ${ac_tool_prefix}strip; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_STRIP+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$STRIP"; then >- ac_cv_prog_STRIP="$STRIP" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_STRIP="${ac_tool_prefix}strip" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >-fi >-fi >-STRIP=$ac_cv_prog_STRIP >-if test -n "$STRIP"; then >- echo "$as_me:$LINENO: result: $STRIP" >&5 >-echo "${ECHO_T}$STRIP" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >-fi >-if test -z "$ac_cv_prog_STRIP"; then >- ac_ct_STRIP=$STRIP >- # Extract the first word of "strip", so it can be a program name with args. >-set dummy strip; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test -n "$ac_ct_STRIP"; then >- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. >-else >-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_prog_ac_ct_STRIP="strip" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" >-fi >-fi >-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP >-if test -n "$ac_ct_STRIP"; then >- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 >-echo "${ECHO_T}$ac_ct_STRIP" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- STRIP=$ac_ct_STRIP >-else >- STRIP="$ac_cv_prog_STRIP" >-fi >- >- >-enable_dlopen=no >-enable_win32_dll=no >- >-# Check whether --enable-libtool-lock or --disable-libtool-lock was given. >-if test "${enable_libtool_lock+set}" = set; then >- enableval="$enable_libtool_lock" >- >-fi; >-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes >- >-# Some flags need to be propagated to the compiler or linker for good >-# libtool support. >-case $host in >-*-*-irix6*) >- # Find out which ABI we are using. >- echo '#line 7374 "configure"' > conftest.$ac_ext >- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; then >- case `/usr/bin/file conftest.$ac_objext` in >- *32-bit*) >- LD="${LD-ld} -32" >- ;; >- *N32*) >- LD="${LD-ld} -n32" >- ;; >- *64-bit*) >- LD="${LD-ld} -64" >- ;; >- esac >- fi >- rm -rf conftest* >- ;; >- >-*-*-sco3.2v5*) >- # On SCO OpenServer 5, we need -belf to get full-featured binaries. >- SAVE_CFLAGS="$CFLAGS" >- CFLAGS="$CFLAGS -belf" >- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 >-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 >-if test "${lt_cv_cc_needs_belf+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- >- >- ac_ext=c >-ac_cpp='$CPP $CPPFLAGS' >-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' >-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >-ac_compiler_gnu=$ac_cv_c_compiler_gnu >- >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- lt_cv_cc_needs_belf=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-lt_cv_cc_needs_belf=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >- ac_ext=c >-ac_cpp='$CPP $CPPFLAGS' >-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' >-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >-ac_compiler_gnu=$ac_cv_c_compiler_gnu >- >-fi >-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 >-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 >- if test x"$lt_cv_cc_needs_belf" != x"yes"; then >- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf >- CFLAGS="$SAVE_CFLAGS" >- fi >- ;; >- >- >-esac >- >-# Sed substitution that helps us do robust quoting. It backslashifies >-# metacharacters that are still active within double-quoted strings. >-Xsed='sed -e s/^X//' >-sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' >- >-# Same as above, but do not quote variable references. >-double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' >- >-# Sed substitution to delay expansion of an escaped shell variable in a >-# double_quote_subst'ed string. >-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' >- >-# Constants: >-rm="rm -f" >- >-# Global variables: >-default_ofile=libtool >-can_build_shared=yes >- >-# All known linkers require a `.a' archive for static linking (except M$VC, >-# which needs '.lib'). >-libext=a >-ltmain="$ac_aux_dir/ltmain.sh" >-ofile="$default_ofile" >-with_gnu_ld="$lt_cv_prog_gnu_ld" >-need_locks="$enable_libtool_lock" >- >-old_CC="$CC" >-old_CFLAGS="$CFLAGS" >- >-# Set sane defaults for various variables >-test -z "$AR" && AR=ar >-test -z "$AR_FLAGS" && AR_FLAGS=cru >-test -z "$AS" && AS=as >-test -z "$CC" && CC=cc >-test -z "$DLLTOOL" && DLLTOOL=dlltool >-test -z "$LD" && LD=ld >-test -z "$LN_S" && LN_S="ln -s" >-test -z "$MAGIC_CMD" && MAGIC_CMD=file >-test -z "$NM" && NM=nm >-test -z "$OBJDUMP" && OBJDUMP=objdump >-test -z "$RANLIB" && RANLIB=: >-test -z "$STRIP" && STRIP=: >-test -z "$ac_objext" && ac_objext=o >- >-if test x"$host" != x"$build"; then >- ac_tool_prefix=${host_alias}- >-else >- ac_tool_prefix= >-fi >- >-# Transform linux* to *-*-linux-gnu*, to support old configure scripts. >-case $host_os in >-linux-gnu*) ;; >-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` >-esac >- >-case $host_os in >-aix3*) >- # AIX sometimes has problems with the GCC collect2 program. For some >- # reason, if we set the COLLECT_NAMES environment variable, the problems >- # vanish in a puff of smoke. >- if test "X${COLLECT_NAMES+set}" != Xset; then >- COLLECT_NAMES= >- export COLLECT_NAMES >- fi >- ;; >-esac >- >-# Determine commands to create old-style static archives. >-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' >-old_postinstall_cmds='chmod 644 $oldlib' >-old_postuninstall_cmds= >- >-if test -n "$RANLIB"; then >- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" >- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" >-fi >- >-# Allow CC to be a program name with arguments. >-set dummy $CC >-compiler="$2" >- >-## FIXME: this should be a separate macro >-## >-echo "$as_me:$LINENO: checking for objdir" >&5 >-echo $ECHO_N "checking for objdir... $ECHO_C" >&6 >-rm -f .libs 2>/dev/null >-mkdir .libs 2>/dev/null >-if test -d .libs; then >- objdir=.libs >-else >- # MS-DOS does not allow filenames that begin with a dot. >- objdir=_libs >-fi >-rmdir .libs 2>/dev/null >-echo "$as_me:$LINENO: result: $objdir" >&5 >-echo "${ECHO_T}$objdir" >&6 >-## >-## END FIXME >- >- >-## FIXME: this should be a separate macro >-## >- >-# Check whether --with-pic or --without-pic was given. >-if test "${with_pic+set}" = set; then >- withval="$with_pic" >- pic_mode="$withval" >-else >- pic_mode=default >-fi; >-test -z "$pic_mode" && pic_mode=default >- >-# We assume here that the value for lt_cv_prog_cc_pic will not be cached >-# in isolation, and that seeing it set (from the cache) indicates that >-# the associated values are set (in the cache) correctly too. >-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 >-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 >-if test "${lt_cv_prog_cc_pic+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- lt_cv_prog_cc_pic= >- lt_cv_prog_cc_shlib= >- lt_cv_prog_cc_wl= >- lt_cv_prog_cc_static= >- lt_cv_prog_cc_no_builtin= >- lt_cv_prog_cc_can_build_shared=$can_build_shared >- >- if test "$GCC" = yes; then >- lt_cv_prog_cc_wl='-Wl,' >- lt_cv_prog_cc_static='-static' >- >- case $host_os in >- aix*) >- # Below there is a dirty hack to force normal static linking with -ldl >- # The problem is because libdl dynamically linked with both libc and >- # libC (AIX C++ library), which obviously doesn't included in libraries >- # list by gcc. This cause undefined symbols with -static flags. >- # This hack allows C programs to be linked with "-static -ldl", but >- # we not sure about C++ programs. >- lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" >- ;; >- amigaos*) >- # FIXME: we need at least 68020 code to build shared libraries, but >- # adding the `-m68020' flag to GCC prevents building anything better, >- # like `-m68040'. >- lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' >- ;; >- beos* | irix5* | irix6* | osf3* | osf4* | osf5*) >- # PIC is the default for these OSes. >- ;; >- darwin* | rhapsody*) >- # PIC is the default on this platform >- # Common symbols not allowed in MH_DYLIB files >- lt_cv_prog_cc_pic='-fno-common' >- ;; >- cygwin* | mingw* | pw32* | os2*) >- # This hack is so that the source file can tell whether it is being >- # built for inclusion in a dll (and should export symbols for example). >- lt_cv_prog_cc_pic='-DDLL_EXPORT' >- ;; >- sysv4*MP*) >- if test -d /usr/nec; then >- lt_cv_prog_cc_pic=-Kconform_pic >- fi >- ;; >- *) >- lt_cv_prog_cc_pic='-fPIC' >- ;; >- esac >- else >- # PORTME Check for PIC flags for the system compiler. >- case $host_os in >- aix3* | aix4* | aix5*) >- # All AIX code is PIC. >- if test "$host_cpu" = ia64; then >- # AIX 5 now supports IA64 processor >- lt_cv_prog_cc_static='-Bstatic' >- lt_cv_prog_cc_wl='-Wl,' >- else >- lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' >- fi >- ;; >- >- hpux9* | hpux10* | hpux11*) >- # Is there a better lt_cv_prog_cc_static that works with the bundled CC? >- lt_cv_prog_cc_wl='-Wl,' >- lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" >- lt_cv_prog_cc_pic='+Z' >- ;; >- >- irix5* | irix6*) >- lt_cv_prog_cc_wl='-Wl,' >- lt_cv_prog_cc_static='-non_shared' >- # PIC (with -KPIC) is the default. >- ;; >- >- cygwin* | mingw* | pw32* | os2*) >- # This hack is so that the source file can tell whether it is being >- # built for inclusion in a dll (and should export symbols for example). >- lt_cv_prog_cc_pic='-DDLL_EXPORT' >- ;; >- >- newsos6) >- lt_cv_prog_cc_pic='-KPIC' >- lt_cv_prog_cc_static='-Bstatic' >- ;; >- >- osf3* | osf4* | osf5*) >- # All OSF/1 code is PIC. >- lt_cv_prog_cc_wl='-Wl,' >- lt_cv_prog_cc_static='-non_shared' >- ;; >- >- sco3.2v5*) >- lt_cv_prog_cc_pic='-Kpic' >- lt_cv_prog_cc_static='-dn' >- lt_cv_prog_cc_shlib='-belf' >- ;; >- >- solaris*) >- lt_cv_prog_cc_pic='-KPIC' >- lt_cv_prog_cc_static='-Bstatic' >- lt_cv_prog_cc_wl='-Wl,' >- ;; >- >- sunos4*) >- lt_cv_prog_cc_pic='-PIC' >- lt_cv_prog_cc_static='-Bstatic' >- lt_cv_prog_cc_wl='-Qoption ld ' >- ;; >- >- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) >- lt_cv_prog_cc_pic='-KPIC' >- lt_cv_prog_cc_static='-Bstatic' >- if test "x$host_vendor" = xsni; then >- lt_cv_prog_cc_wl='-LD' >- else >- lt_cv_prog_cc_wl='-Wl,' >- fi >- ;; >- >- uts4*) >- lt_cv_prog_cc_pic='-pic' >- lt_cv_prog_cc_static='-Bstatic' >- ;; >- >- sysv4*MP*) >- if test -d /usr/nec ;then >- lt_cv_prog_cc_pic='-Kconform_pic' >- lt_cv_prog_cc_static='-Bstatic' >- fi >- ;; >- >- *) >- lt_cv_prog_cc_can_build_shared=no >- ;; >- esac >- fi >- >-fi >- >-if test -z "$lt_cv_prog_cc_pic"; then >- echo "$as_me:$LINENO: result: none" >&5 >-echo "${ECHO_T}none" >&6 >-else >- echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5 >-echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6 >- >- # Check to make sure the pic_flag actually works. >- echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 >-echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6 >- if test "${lt_cv_prog_cc_pic_works+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- save_CFLAGS="$CFLAGS" >- CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- case $host_os in >- hpux9* | hpux10* | hpux11*) >- # On HP-UX, both CC and GCC only warn that PIC is supported... then >- # they create non-PIC objects. So, if there were any warnings, we >- # assume that PIC is not supported. >- if test -s conftest.err; then >- lt_cv_prog_cc_pic_works=no >- else >- lt_cv_prog_cc_pic_works=yes >- fi >- ;; >- *) >- lt_cv_prog_cc_pic_works=yes >- ;; >- esac >- >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >- lt_cv_prog_cc_pic_works=no >- >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- CFLAGS="$save_CFLAGS" >- >-fi >- >- >- if test "X$lt_cv_prog_cc_pic_works" = Xno; then >- lt_cv_prog_cc_pic= >- lt_cv_prog_cc_can_build_shared=no >- else >- lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" >- fi >- >- echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5 >-echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6 >-fi >-## >-## END FIXME >- >-# Check for any special shared library compilation flags. >-if test -n "$lt_cv_prog_cc_shlib"; then >- { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5 >-echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;} >- if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then : >- else >- { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 >-echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} >- lt_cv_prog_cc_can_build_shared=no >- fi >-fi >- >-## FIXME: this should be a separate macro >-## >-echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 >-echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6 >-if test "${lt_cv_prog_cc_static_works+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- lt_cv_prog_cc_static_works=no >- save_LDFLAGS="$LDFLAGS" >- LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- lt_cv_prog_cc_static_works=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >- LDFLAGS="$save_LDFLAGS" >- >-fi >- >- >-# Belt *and* braces to stop my trousers falling down: >-test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= >-echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5 >-echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6 >- >-pic_flag="$lt_cv_prog_cc_pic" >-special_shlib_compile_flags="$lt_cv_prog_cc_shlib" >-wl="$lt_cv_prog_cc_wl" >-link_static_flag="$lt_cv_prog_cc_static" >-no_builtin_flag="$lt_cv_prog_cc_no_builtin" >-can_build_shared="$lt_cv_prog_cc_can_build_shared" >-## >-## END FIXME >- >- >-## FIXME: this should be a separate macro >-## >-# Check to see if options -o and -c are simultaneously supported by compiler >-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 >-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 >-if test "${lt_cv_compiler_c_o+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- >-$rm -r conftest 2>/dev/null >-mkdir conftest >-cd conftest >-echo "int some_variable = 0;" > conftest.$ac_ext >-mkdir out >-# According to Tom Tromey, Ian Lance Taylor reported there are C compilers >-# that will create temporary files in the current directory regardless of >-# the output directory. Thus, making CWD read-only will cause this test >-# to fail, enabling locking or at least warning the user not to do parallel >-# builds. >-chmod -w . >-save_CFLAGS="$CFLAGS" >-CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" >-compiler_c_o=no >-if { (eval echo configure:7917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then >- # The compiler can only warn and ignore the option if not recognized >- # So say no if there are warnings >- if test -s out/conftest.err; then >- lt_cv_compiler_c_o=no >- else >- lt_cv_compiler_c_o=yes >- fi >-else >- # Append any errors to the config.log. >- cat out/conftest.err 1>&5 >- lt_cv_compiler_c_o=no >-fi >-CFLAGS="$save_CFLAGS" >-chmod u+w . >-$rm conftest* out/* >-rmdir out >-cd .. >-rmdir conftest >-$rm -r conftest 2>/dev/null >- >-fi >- >-compiler_c_o=$lt_cv_compiler_c_o >-echo "$as_me:$LINENO: result: $compiler_c_o" >&5 >-echo "${ECHO_T}$compiler_c_o" >&6 >- >-if test x"$compiler_c_o" = x"yes"; then >- # Check to see if we can write to a .lo >- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5 >-echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6 >- if test "${lt_cv_compiler_o_lo+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- >- lt_cv_compiler_o_lo=no >- save_CFLAGS="$CFLAGS" >- CFLAGS="$CFLAGS -c -o conftest.lo" >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-int some_variable = 0; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- # The compiler can only warn and ignore the option if not recognized >- # So say no if there are warnings >- if test -s conftest.err; then >- lt_cv_compiler_o_lo=no >- else >- lt_cv_compiler_o_lo=yes >- fi >- >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- CFLAGS="$save_CFLAGS" >- >-fi >- >- compiler_o_lo=$lt_cv_compiler_o_lo >- echo "$as_me:$LINENO: result: $compiler_c_lo" >&5 >-echo "${ECHO_T}$compiler_c_lo" >&6 >-else >- compiler_o_lo=no >-fi >-## >-## END FIXME >- >-## FIXME: this should be a separate macro >-## >-# Check to see if we can do hard links to lock some files if needed >-hard_links="nottested" >-if test "$compiler_c_o" = no && test "$need_locks" != no; then >- # do not overwrite the value of need_locks provided by the user >- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 >-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 >- hard_links=yes >- $rm conftest* >- ln conftest.a conftest.b 2>/dev/null && hard_links=no >- touch conftest.a >- ln conftest.a conftest.b 2>&5 || hard_links=no >- ln conftest.a conftest.b 2>/dev/null && hard_links=no >- echo "$as_me:$LINENO: result: $hard_links" >&5 >-echo "${ECHO_T}$hard_links" >&6 >- if test "$hard_links" = no; then >- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 >-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} >- need_locks=warn >- fi >-else >- need_locks=no >-fi >-## >-## END FIXME >- >-## FIXME: this should be a separate macro >-## >-if test "$GCC" = yes; then >- # Check to see if options -fno-rtti -fno-exceptions are supported by compiler >- echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 >-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 >- echo "int some_variable = 0;" > conftest.$ac_ext >- save_CFLAGS="$CFLAGS" >- CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" >- compiler_rtti_exceptions=no >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-int some_variable = 0; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- # The compiler can only warn and ignore the option if not recognized >- # So say no if there are warnings >- if test -s conftest.err; then >- compiler_rtti_exceptions=no >- else >- compiler_rtti_exceptions=yes >- fi >- >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- CFLAGS="$save_CFLAGS" >- echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5 >-echo "${ECHO_T}$compiler_rtti_exceptions" >&6 >- >- if test "$compiler_rtti_exceptions" = "yes"; then >- no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' >- else >- no_builtin_flag=' -fno-builtin' >- fi >-fi >-## >-## END FIXME >- >-## FIXME: this should be a separate macro >-## >-# See if the linker supports building shared libraries. >-echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5 >-echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6 >- >-allow_undefined_flag= >-no_undefined_flag= >-need_lib_prefix=unknown >-need_version=unknown >-# when you set need_version to no, make sure it does not cause -set_version >-# flags to be left without arguments >-archive_cmds= >-archive_expsym_cmds= >-old_archive_from_new_cmds= >-old_archive_from_expsyms_cmds= >-export_dynamic_flag_spec= >-whole_archive_flag_spec= >-thread_safe_flag_spec= >-hardcode_into_libs=no >-hardcode_libdir_flag_spec= >-hardcode_libdir_separator= >-hardcode_direct=no >-hardcode_minus_L=no >-hardcode_shlibpath_var=unsupported >-runpath_var= >-link_all_deplibs=unknown >-always_export_symbols=no >-export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' >-# include_expsyms should be a list of space-separated symbols to be *always* >-# included in the symbol list >-include_expsyms= >-# exclude_expsyms can be an egrep regular expression of symbols to exclude >-# it will be wrapped by ` (' and `)$', so one must not match beginning or >-# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', >-# as well as any symbol that contains `d'. >-exclude_expsyms="_GLOBAL_OFFSET_TABLE_" >-# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out >-# platforms (ab)use it in PIC code, but their linkers get confused if >-# the symbol is explicitly referenced. Since portable code cannot >-# rely on this symbol name, it's probably fine to never include it in >-# preloaded symbol tables. >-extract_expsyms_cmds= >- >-case $host_os in >-cygwin* | mingw* | pw32* ) >- # FIXME: the MSVC++ port hasn't been tested in a loooong time >- # When not using gcc, we currently assume that we are using >- # Microsoft Visual C++. >- if test "$GCC" != yes; then >- with_gnu_ld=no >- fi >- ;; >- >-esac >- >-ld_shlibs=yes >-if test "$with_gnu_ld" = yes; then >- # If archive_cmds runs LD, not CC, wlarc should be empty >- wlarc='${wl}' >- >- # See if GNU ld supports shared libraries. >- case $host_os in >- aix3* | aix4* | aix5*) >- # On AIX, the GNU linker is very broken >- # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. >- ld_shlibs=no >- cat <<EOF 1>&2 >- >-*** Warning: the GNU linker, at least up to release 2.9.1, is reported >-*** to be unable to reliably create shared libraries on AIX. >-*** Therefore, libtool is disabling shared libraries support. If you >-*** really care for shared libraries, you may want to modify your PATH >-*** so that a non-GNU linker is found, and then restart. >- >-EOF >- ;; >- >- amigaos*) >- archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' >- hardcode_libdir_flag_spec='-L$libdir' >- hardcode_minus_L=yes >- >- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports >- # that the semantics of dynamic libraries on AmigaOS, at least up >- # to version 4, is to share data among multiple programs linked >- # with the same dynamic library. Since this doesn't match the >- # behavior of shared libraries on other platforms, we can use >- # them. >- ld_shlibs=no >- ;; >- >- beos*) >- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then >- allow_undefined_flag=unsupported >- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc >- # support --undefined. This deserves some investigation. FIXME >- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' >- else >- ld_shlibs=no >- fi >- ;; >- >- cygwin* | mingw* | pw32*) >- # hardcode_libdir_flag_spec is actually meaningless, as there is >- # no search path for DLLs. >- hardcode_libdir_flag_spec='-L$libdir' >- allow_undefined_flag=unsupported >- always_export_symbols=yes >- >- extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ >- sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ >- test -f $output_objdir/impgen.exe || (cd $output_objdir && \ >- if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ >- else $CC -o impgen impgen.c ; fi)~ >- $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' >- >- old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' >- >- # cygwin and mingw dlls have different entry points and sets of symbols >- # to exclude. >- # FIXME: what about values for MSVC? >- dll_entry=__cygwin_dll_entry@12 >- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ >- case $host_os in >- mingw*) >- # mingw values >- dll_entry=_DllMainCRTStartup@12 >- dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ >- ;; >- esac >- >- # mingw and cygwin differ, and it's simplest to just exclude the union >- # of the two symbol sets. >- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 >- >- # recent cygwin and mingw systems supply a stub DllMain which the user >- # can override, but on older systems we have to supply one (in ltdll.c) >- if test "x$lt_cv_need_dllmain" = "xyes"; then >- ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " >- ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < [$]0 > $output_objdir/$soname-ltdll.c~ >- test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' >- else >- ltdll_obj= >- ltdll_cmds= >- fi >- >- # Extract the symbol export list from an `--export-all' def file, >- # then regenerate the def file from the symbol export list, so that >- # the compiled dll only exports the symbol export list. >- # Be careful not to strip the DATA tag left be newer dlltools. >- export_symbols_cmds="$ltdll_cmds"' >- $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ >- sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' >- >- # If the export-symbols file already is a .def file (1st line >- # is EXPORTS), use it as is. >- # If DATA tags from a recent dlltool are present, honour them! >- archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then >- cp $export_symbols $output_objdir/$soname-def; >- else >- echo EXPORTS > $output_objdir/$soname-def; >- _lt_hint=1; >- cat $export_symbols | while read symbol; do >- set dummy \$symbol; >- case \$# in >- 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; >- *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; >- esac; >- _lt_hint=`expr 1 + \$_lt_hint`; >- done; >- fi~ >- '"$ltdll_cmds"' >- $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ >- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ >- $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ >- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ >- $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' >- ;; >- >- netbsd*) >- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then >- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' >- wlarc= >- else >- archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' >- archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' >- fi >- ;; >- >- solaris* | sysv5*) >- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then >- ld_shlibs=no >- cat <<EOF 1>&2 >- >-*** Warning: The releases 2.8.* of the GNU linker cannot reliably >-*** create shared libraries on Solaris systems. Therefore, libtool >-*** is disabling shared libraries support. We urge you to upgrade GNU >-*** binutils to release 2.9.1 or newer. Another option is to modify >-*** your PATH or compiler configuration so that the native linker is >-*** used, and then restart. >- >-EOF >- elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then >- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' >- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' >- else >- ld_shlibs=no >- fi >- ;; >- >- sunos4*) >- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' >- wlarc= >- hardcode_direct=yes >- hardcode_shlibpath_var=no >- ;; >- >- *) >- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then >- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' >- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' >- else >- ld_shlibs=no >- fi >- ;; >- esac >- >- if test "$ld_shlibs" = yes; then >- runpath_var=LD_RUN_PATH >- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' >- export_dynamic_flag_spec='${wl}--export-dynamic' >- case $host_os in >- cygwin* | mingw* | pw32*) >- # dlltool doesn't understand --whole-archive et. al. >- whole_archive_flag_spec= >- ;; >- *) >- # ancient GNU ld didn't support --whole-archive et. al. >- if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then >- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' >- else >- whole_archive_flag_spec= >- fi >- ;; >- esac >- fi >-else >- # PORTME fill in a description of your system's linker (not GNU ld) >- case $host_os in >- aix3*) >- allow_undefined_flag=unsupported >- always_export_symbols=yes >- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' >- # Note: this linker hardcodes the directories in LIBPATH if there >- # are no directories specified by -L. >- hardcode_minus_L=yes >- if test "$GCC" = yes && test -z "$link_static_flag"; then >- # Neither direct hardcoding nor static linking is supported with a >- # broken collect2. >- hardcode_direct=unsupported >- fi >- ;; >- >- aix4* | aix5*) >- # When large executables or shared objects are built, AIX ld can >- # have problems creating the table of contents. If linking a library >- # or program results in "error TOC overflow" add -mminimal-toc to >- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not >- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. >- >- archive_cmds='' >- hardcode_libdir_separator=':' >- if test "$GCC" = yes; then >- collect2name=`${CC} -print-prog-name=collect2` >- if test -f "$collect2name" && \ >- strings "$collect2name" | grep resolve_lib_name >/dev/null >- then >- # We have reworked collect2 >- hardcode_direct=yes >- else >- # We have old collect2 >- hardcode_direct=unsupported >- # It fails to find uninstalled libraries when the uninstalled >- # path is not listed in the libpath. Setting hardcode_minus_L >- # to unsupported forces relinking >- hardcode_minus_L=yes >- hardcode_libdir_flag_spec='-L$libdir' >- hardcode_libdir_separator= >- fi >- shared_flag='-shared' >- else >- if test "$host_cpu" = ia64; then >- shared_flag='-G' >- else >- shared_flag='${wl}-bM:SRE' >- fi >- hardcode_direct=yes >- fi >- >- if test "$host_cpu" = ia64; then >- # On IA64, the linker does run time linking by default, so we don't >- # have to do anything special. >- aix_use_runtimelinking=no >- exp_sym_flag='-Bexport' >- no_entry_flag="" >- else >- # Test if we are trying to use run time linking, or normal AIX style linking. >- # If -brtl is somewhere in LDFLAGS, we need to do run time linking. >- aix_use_runtimelinking=no >- for ld_flag in $LDFLAGS; do >- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then >- aix_use_runtimelinking=yes >- break >- fi >- done >- exp_sym_flag='-bexport' >- no_entry_flag='-bnoentry' >- fi >- # It seems that -bexpall can do strange things, so it is better to >- # generate a list of symbols to export. >- always_export_symbols=yes >- if test "$aix_use_runtimelinking" = yes; then >- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' >- allow_undefined_flag=' -Wl,-G' >- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" >- else >- if test "$host_cpu" = ia64; then >- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' >- allow_undefined_flag="-znodefs" >- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" >- else >- hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' >- # Warning - without using the other run time loading flags, -berok will >- # link without error, but may produce a broken library. >- allow_undefined_flag='${wl}-berok" >- # This is a bit strange, but is similar to how AIX traditionally builds >- # it's shared libraries. >- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' >- fi >- fi >- ;; >- >- amigaos*) >- archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' >- hardcode_libdir_flag_spec='-L$libdir' >- hardcode_minus_L=yes >- # see comment about different semantics on the GNU ld section >- ld_shlibs=no >- ;; >- >- cygwin* | mingw* | pw32*) >- # When not using gcc, we currently assume that we are using >- # Microsoft Visual C++. >- # hardcode_libdir_flag_spec is actually meaningless, as there is >- # no search path for DLLs. >- hardcode_libdir_flag_spec=' ' >- allow_undefined_flag=unsupported >- # Tell ltmain to make .lib files, not .a files. >- libext=lib >- # FIXME: Setting linknames here is a bad hack. >- archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' >- # The linker will automatically build a .lib file if we build a DLL. >- old_archive_from_new_cmds='true' >- # FIXME: Should let the user specify the lib program. >- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' >- fix_srcfile_path='`cygpath -w "$srcfile"`' >- ;; >- >- darwin* | rhapsody*) >- allow_undefined_flag='-undefined suppress' >- # FIXME: Relying on posixy $() will cause problems for >- # cross-compilation, but unfortunately the echo tests do not >- # yet detect zsh echo's removal of \ escapes. >- archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)' >- # We need to add '_' to the symbols in $export_symbols first >- #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' >- hardcode_direct=yes >- hardcode_shlibpath_var=no >- whole_archive_flag_spec='-all_load $convenience' >- ;; >- >- freebsd1*) >- ld_shlibs=no >- ;; >- >- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor >- # support. Future versions do this automatically, but an explicit c++rt0.o >- # does not break anything, and helps significantly (at the cost of a little >- # extra space). >- freebsd2.2*) >- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' >- hardcode_libdir_flag_spec='-R$libdir' >- hardcode_direct=yes >- hardcode_shlibpath_var=no >- ;; >- >- # Unfortunately, older versions of FreeBSD 2 do not have this feature. >- freebsd2*) >- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' >- hardcode_direct=yes >- hardcode_minus_L=yes >- hardcode_shlibpath_var=no >- ;; >- >- # FreeBSD 3 and greater uses gcc -shared to do shared libraries. >- freebsd*) >- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' >- hardcode_libdir_flag_spec='-R$libdir' >- hardcode_direct=yes >- hardcode_shlibpath_var=no >- ;; >- >- hpux9* | hpux10* | hpux11*) >- case $host_os in >- hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; >- *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; >- esac >- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' >- hardcode_libdir_separator=: >- hardcode_direct=yes >- hardcode_minus_L=yes # Not in the search PATH, but as the default >- # location of the library. >- export_dynamic_flag_spec='${wl}-E' >- ;; >- >- irix5* | irix6*) >- if test "$GCC" = yes; then >- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' >- else >- archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' >- fi >- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' >- hardcode_libdir_separator=: >- link_all_deplibs=yes >- ;; >- >- netbsd*) >- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then >- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out >- else >- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF >- fi >- hardcode_libdir_flag_spec='-R$libdir' >- hardcode_direct=yes >- hardcode_shlibpath_var=no >- ;; >- >- newsos6) >- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' >- hardcode_direct=yes >- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' >- hardcode_libdir_separator=: >- hardcode_shlibpath_var=no >- ;; >- >- openbsd*) >- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' >- hardcode_libdir_flag_spec='-R$libdir' >- hardcode_direct=yes >- hardcode_shlibpath_var=no >- ;; >- >- os2*) >- hardcode_libdir_flag_spec='-L$libdir' >- hardcode_minus_L=yes >- allow_undefined_flag=unsupported >- archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' >- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' >- ;; >- >- osf3*) >- if test "$GCC" = yes; then >- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' >- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' >- else >- allow_undefined_flag=' -expect_unresolved \*' >- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' >- fi >- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' >- hardcode_libdir_separator=: >- ;; >- >- osf4* | osf5*) # as osf3* with the addition of -msym flag >- if test "$GCC" = yes; then >- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' >- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' >- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' >- else >- allow_undefined_flag=' -expect_unresolved \*' >- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' >- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ >- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' >- >- #Both c and cxx compiler support -rpath directly >- hardcode_libdir_flag_spec='-rpath $libdir' >- fi >- hardcode_libdir_separator=: >- ;; >- >- sco3.2v5*) >- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >- hardcode_shlibpath_var=no >- runpath_var=LD_RUN_PATH >- hardcode_runpath_var=yes >- ;; >- >- solaris*) >- no_undefined_flag=' -z defs' >- # $CC -shared without GNU ld will not create a library from C++ >- # object files and a static libstdc++, better avoid it by now >- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' >- archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ >- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' >- hardcode_libdir_flag_spec='-R$libdir' >- hardcode_shlibpath_var=no >- case $host_os in >- solaris2.[0-5] | solaris2.[0-5].*) ;; >- *) # Supported since Solaris 2.6 (maybe 2.5.1?) >- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; >- esac >- link_all_deplibs=yes >- ;; >- >- sunos4*) >- if test "x$host_vendor" = xsequent; then >- # Use $CC to link under sequent, because it throws in some extra .o >- # files that make .init and .fini sections work. >- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' >- else >- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' >- fi >- hardcode_libdir_flag_spec='-L$libdir' >- hardcode_direct=yes >- hardcode_minus_L=yes >- hardcode_shlibpath_var=no >- ;; >- >- sysv4) >- if test "x$host_vendor" = xsno; then >- archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts' >- hardcode_direct=yes # is this really true??? >- else >- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >- hardcode_direct=no #Motorola manual says yes, but my tests say they lie >- fi >- runpath_var='LD_RUN_PATH' >- hardcode_shlibpath_var=no >- ;; >- >- sysv4.3*) >- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >- hardcode_shlibpath_var=no >- export_dynamic_flag_spec='-Bexport' >- ;; >- >- sysv5*) >- no_undefined_flag=' -z text' >- # $CC -shared without GNU ld will not create a library from C++ >- # object files and a static libstdc++, better avoid it by now >- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' >- archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ >- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' >- hardcode_libdir_flag_spec= >- hardcode_shlibpath_var=no >- runpath_var='LD_RUN_PATH' >- ;; >- >- uts4*) >- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >- hardcode_libdir_flag_spec='-L$libdir' >- hardcode_shlibpath_var=no >- ;; >- >- dgux*) >- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >- hardcode_libdir_flag_spec='-L$libdir' >- hardcode_shlibpath_var=no >- ;; >- >- sysv4*MP*) >- if test -d /usr/nec; then >- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >- hardcode_shlibpath_var=no >- runpath_var=LD_RUN_PATH >- hardcode_runpath_var=yes >- ld_shlibs=yes >- fi >- ;; >- >- sysv4.2uw2*) >- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' >- hardcode_direct=yes >- hardcode_minus_L=no >- hardcode_shlibpath_var=no >- hardcode_runpath_var=yes >- runpath_var=LD_RUN_PATH >- ;; >- >- sysv5uw7* | unixware7*) >- no_undefined_flag='${wl}-z ${wl}text' >- if test "$GCC" = yes; then >- archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' >- else >- archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' >- fi >- runpath_var='LD_RUN_PATH' >- hardcode_shlibpath_var=no >- ;; >- >- *) >- ld_shlibs=no >- ;; >- esac >-fi >-echo "$as_me:$LINENO: result: $ld_shlibs" >&5 >-echo "${ECHO_T}$ld_shlibs" >&6 >-test "$ld_shlibs" = no && can_build_shared=no >-## >-## END FIXME >- >-## FIXME: this should be a separate macro >-## >-# Check hardcoding attributes. >-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 >-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 >-hardcode_action= >-if test -n "$hardcode_libdir_flag_spec" || \ >- test -n "$runpath_var"; then >- >- # We can hardcode non-existant directories. >- if test "$hardcode_direct" != no && >- # If the only mechanism to avoid hardcoding is shlibpath_var, we >- # have to relink, otherwise we might link with an installed library >- # when we should be linking with a yet-to-be-installed one >- ## test "$hardcode_shlibpath_var" != no && >- test "$hardcode_minus_L" != no; then >- # Linking always hardcodes the temporary library directory. >- hardcode_action=relink >- else >- # We can link without hardcoding, and we can hardcode nonexisting dirs. >- hardcode_action=immediate >- fi >-else >- # We cannot hardcode anything, or else we can only hardcode existing >- # directories. >- hardcode_action=unsupported >-fi >-echo "$as_me:$LINENO: result: $hardcode_action" >&5 >-echo "${ECHO_T}$hardcode_action" >&6 >-## >-## END FIXME >- >-## FIXME: this should be a separate macro >-## >-striplib= >-old_striplib= >-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 >-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 >-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then >- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" >- test -z "$striplib" && striplib="$STRIP --strip-unneeded" >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >-## >-## END FIXME >- >-reload_cmds='$LD$reload_flag -o $output$reload_objs' >-test -z "$deplibs_check_method" && deplibs_check_method=unknown >- >-## FIXME: this should be a separate macro >-## >-# PORTME Fill in your ld.so characteristics >-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 >-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 >-library_names_spec= >-libname_spec='lib$name' >-soname_spec= >-postinstall_cmds= >-postuninstall_cmds= >-finish_cmds= >-finish_eval= >-shlibpath_var= >-shlibpath_overrides_runpath=unknown >-version_type=none >-dynamic_linker="$host_os ld.so" >-sys_lib_dlsearch_path_spec="/lib /usr/lib" >-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" >- >-case $host_os in >-aix3*) >- version_type=linux >- library_names_spec='${libname}${release}.so$versuffix $libname.a' >- shlibpath_var=LIBPATH >- >- # AIX has no versioning support, so we append a major version to the name. >- soname_spec='${libname}${release}.so$major' >- ;; >- >-aix4* | aix5*) >- version_type=linux >- if test "$host_cpu" = ia64; then >- # AIX 5 supports IA64 >- library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' >- shlibpath_var=LD_LIBRARY_PATH >- else >- # With GCC up to 2.95.x, collect2 would create an import file >- # for dependence libraries. The import file would start with >- # the line `#! .'. This would cause the generated library to >- # depend on `.', always an invalid library. This was fixed in >- # development snapshots of GCC prior to 3.0. >- case $host_os in >- aix4 | aix4.[01] | aix4.[01].*) >- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' >- echo ' yes ' >- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then >- : >- else >- can_build_shared=no >- fi >- ;; >- esac >- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct >- # soname into executable. Probably we can add versioning support to >- # collect2, so additional links can be useful in future. >- if test "$aix_use_runtimelinking" = yes; then >- # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of >- # lib<name>.a to let people know that these are not typical AIX shared libraries. >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >- else >- # We preserve .a as extension for shared libraries through AIX4.2 >- # and later when we are not doing run time linking. >- library_names_spec='${libname}${release}.a $libname.a' >- soname_spec='${libname}${release}.so$major' >- fi >- shlibpath_var=LIBPATH >- deplibs_check_method=pass_all >- fi >- ;; >- >-amigaos*) >- library_names_spec='$libname.ixlibrary $libname.a' >- # Create ${libname}_ixlibrary.a entries in /sys/libs. >- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' >- ;; >- >-beos*) >- library_names_spec='${libname}.so' >- dynamic_linker="$host_os ld.so" >- shlibpath_var=LIBRARY_PATH >- ;; >- >-bsdi4*) >- version_type=linux >- need_version=no >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >- soname_spec='${libname}${release}.so$major' >- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' >- shlibpath_var=LD_LIBRARY_PATH >- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" >- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" >- export_dynamic_flag_spec=-rdynamic >- # the default ld.so.conf also contains /usr/contrib/lib and >- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow >- # libtool to hard-code these into programs >- ;; >- >-cygwin* | mingw* | pw32*) >- version_type=windows >- need_version=no >- need_lib_prefix=no >- case $GCC,$host_os in >- yes,cygwin*) >- library_names_spec='$libname.dll.a' >- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' >- postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ >- dldir=$destdir/`dirname \$dlpath`~ >- test -d \$dldir || mkdir -p \$dldir~ >- $install_prog .libs/$dlname \$dldir/$dlname' >- postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ >- dlpath=$dir/\$dldll~ >- $rm \$dlpath' >- ;; >- yes,mingw*) >- library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' >- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` >- ;; >- yes,pw32*) >- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll' >- ;; >- *) >- library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' >- ;; >- esac >- dynamic_linker='Win32 ld.exe' >- # FIXME: first we should search . and the directory the executable is in >- shlibpath_var=PATH >- ;; >- >-darwin* | rhapsody*) >- dynamic_linker="$host_os dyld" >- version_type=darwin >- need_lib_prefix=no >- need_version=no >- # FIXME: Relying on posixy $() will cause problems for >- # cross-compilation, but unfortunately the echo tests do not >- # yet detect zsh echo's removal of \ escapes. >- library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' >- soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' >- shlibpath_overrides_runpath=yes >- shlibpath_var=DYLD_LIBRARY_PATH >- ;; >- >-freebsd1*) >- dynamic_linker=no >- ;; >- >-freebsd*) >- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` >- version_type=freebsd-$objformat >- case $version_type in >- freebsd-elf*) >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' >- need_version=no >- need_lib_prefix=no >- ;; >- freebsd-*) >- library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' >- need_version=yes >- ;; >- esac >- shlibpath_var=LD_LIBRARY_PATH >- case $host_os in >- freebsd2*) >- shlibpath_overrides_runpath=yes >- ;; >- *) >- shlibpath_overrides_runpath=no >- hardcode_into_libs=yes >- ;; >- esac >- ;; >- >-gnu*) >- version_type=linux >- need_lib_prefix=no >- need_version=no >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' >- soname_spec='${libname}${release}.so$major' >- shlibpath_var=LD_LIBRARY_PATH >- hardcode_into_libs=yes >- ;; >- >-hpux9* | hpux10* | hpux11*) >- # Give a soname corresponding to the major version so that dld.sl refuses to >- # link against other versions. >- dynamic_linker="$host_os dld.sl" >- version_type=sunos >- need_lib_prefix=no >- need_version=no >- shlibpath_var=SHLIB_PATH >- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH >- library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' >- soname_spec='${libname}${release}.sl$major' >- # HP-UX runs *really* slowly unless shared libraries are mode 555. >- postinstall_cmds='chmod 555 $lib' >- ;; >- >-irix5* | irix6*) >- version_type=irix >- need_lib_prefix=no >- need_version=no >- soname_spec='${libname}${release}.so$major' >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' >- case $host_os in >- irix5*) >- libsuff= shlibsuff= >- ;; >- *) >- case $LD in # libtool.m4 will add one of these switches to LD >- *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; >- *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; >- *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; >- *) libsuff= shlibsuff= libmagic=never-match;; >- esac >- ;; >- esac >- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH >- shlibpath_overrides_runpath=no >- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" >- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" >- ;; >- >-# No shared lib support for Linux oldld, aout, or coff. >-linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) >- dynamic_linker=no >- ;; >- >-# This must be Linux ELF. >-linux-gnu*) >- version_type=linux >- need_lib_prefix=no >- need_version=no >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >- soname_spec='${libname}${release}.so$major' >- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' >- shlibpath_var=LD_LIBRARY_PATH >- shlibpath_overrides_runpath=no >- # This implies no fast_install, which is unacceptable. >- # Some rework will be needed to allow for fast_install >- # before this can be enabled. >- hardcode_into_libs=yes >- >- # We used to test for /lib/ld.so.1 and disable shared libraries on >- # powerpc, because MkLinux only supported shared libraries with the >- # GNU dynamic linker. Since this was broken with cross compilers, >- # most powerpc-linux boxes support dynamic linking these days and >- # people can always --disable-shared, the test was removed, and we >- # assume the GNU/Linux dynamic linker is in use. >- dynamic_linker='GNU/Linux ld.so' >- ;; >- >-netbsd*) >- version_type=sunos >- need_lib_prefix=no >- need_version=no >- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then >- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' >- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' >- dynamic_linker='NetBSD (a.out) ld.so' >- else >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' >- soname_spec='${libname}${release}.so$major' >- dynamic_linker='NetBSD ld.elf_so' >- fi >- shlibpath_var=LD_LIBRARY_PATH >- shlibpath_overrides_runpath=yes >- hardcode_into_libs=yes >- ;; >- >-newsos6) >- version_type=linux >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >- shlibpath_var=LD_LIBRARY_PATH >- shlibpath_overrides_runpath=yes >- ;; >- >-openbsd*) >- version_type=sunos >- if test "$with_gnu_ld" = yes; then >- need_lib_prefix=no >- need_version=no >- fi >- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' >- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' >- shlibpath_var=LD_LIBRARY_PATH >- ;; >- >-os2*) >- libname_spec='$name' >- need_lib_prefix=no >- library_names_spec='$libname.dll $libname.a' >- dynamic_linker='OS/2 ld.exe' >- shlibpath_var=LIBPATH >- ;; >- >-osf3* | osf4* | osf5*) >- version_type=osf >- need_version=no >- soname_spec='${libname}${release}.so' >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' >- shlibpath_var=LD_LIBRARY_PATH >- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" >- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" >- ;; >- >-sco3.2v5*) >- version_type=osf >- soname_spec='${libname}${release}.so$major' >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >- shlibpath_var=LD_LIBRARY_PATH >- ;; >- >-solaris*) >- version_type=linux >- need_lib_prefix=no >- need_version=no >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >- soname_spec='${libname}${release}.so$major' >- shlibpath_var=LD_LIBRARY_PATH >- shlibpath_overrides_runpath=yes >- hardcode_into_libs=yes >- # ldd complains unless libraries are executable >- postinstall_cmds='chmod +x $lib' >- ;; >- >-sunos4*) >- version_type=sunos >- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' >- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' >- shlibpath_var=LD_LIBRARY_PATH >- shlibpath_overrides_runpath=yes >- if test "$with_gnu_ld" = yes; then >- need_lib_prefix=no >- fi >- need_version=yes >- ;; >- >-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) >- version_type=linux >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >- soname_spec='${libname}${release}.so$major' >- shlibpath_var=LD_LIBRARY_PATH >- case $host_vendor in >- sni) >- shlibpath_overrides_runpath=no >- ;; >- motorola) >- need_lib_prefix=no >- need_version=no >- shlibpath_overrides_runpath=no >- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' >- ;; >- esac >- ;; >- >-uts4*) >- version_type=linux >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >- soname_spec='${libname}${release}.so$major' >- shlibpath_var=LD_LIBRARY_PATH >- ;; >- >-dgux*) >- version_type=linux >- need_lib_prefix=no >- need_version=no >- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >- soname_spec='${libname}${release}.so$major' >- shlibpath_var=LD_LIBRARY_PATH >- ;; >- >-sysv4*MP*) >- if test -d /usr/nec ;then >- version_type=linux >- library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' >- soname_spec='$libname.so.$major' >- shlibpath_var=LD_LIBRARY_PATH >- fi >- ;; >- >-*) >- dynamic_linker=no >- ;; >-esac >-echo "$as_me:$LINENO: result: $dynamic_linker" >&5 >-echo "${ECHO_T}$dynamic_linker" >&6 >-test "$dynamic_linker" = no && can_build_shared=no >-## >-## END FIXME >- >-## FIXME: this should be a separate macro >-## >-# Report the final consequences. >-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 >-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 >-echo "$as_me:$LINENO: result: $can_build_shared" >&5 >-echo "${ECHO_T}$can_build_shared" >&6 >-## >-## END FIXME >- >-if test "$hardcode_action" = relink; then >- # Fast installation is not supported >- enable_fast_install=no >-elif test "$shlibpath_overrides_runpath" = yes || >- test "$enable_shared" = no; then >- # Fast installation is not necessary >- enable_fast_install=needless >-fi >- >-variables_saved_for_relink="PATH $shlibpath_var $runpath_var" >-if test "$GCC" = yes; then >- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" >-fi >- >-if test "x$enable_dlopen" != xyes; then >- enable_dlopen=unknown >- enable_dlopen_self=unknown >- enable_dlopen_self_static=unknown >-else >- lt_cv_dlopen=no >- lt_cv_dlopen_libs= >- >- case $host_os in >- beos*) >- lt_cv_dlopen="load_add_on" >- lt_cv_dlopen_libs= >- lt_cv_dlopen_self=yes >- ;; >- >- cygwin* | mingw* | pw32*) >- lt_cv_dlopen="LoadLibrary" >- lt_cv_dlopen_libs= >- ;; >- >- *) >- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 >-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 >-if test "${ac_cv_lib_dl_dlopen+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-ldl $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char dlopen (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-dlopen (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_dl_dlopen=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_dl_dlopen=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 >-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 >-if test $ac_cv_lib_dl_dlopen = yes; then >- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" >-else >- echo "$as_me:$LINENO: checking for dlopen" >&5 >-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 >-if test "${ac_cv_func_dlopen+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define dlopen innocuous_dlopen >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char dlopen (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef dlopen >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char dlopen (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_dlopen) || defined (__stub___dlopen) >-choke me >-#else >-char (*f) () = dlopen; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != dlopen; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_dlopen=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_dlopen=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 >-echo "${ECHO_T}$ac_cv_func_dlopen" >&6 >-if test $ac_cv_func_dlopen = yes; then >- lt_cv_dlopen="dlopen" >-else >- echo "$as_me:$LINENO: checking for shl_load" >&5 >-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 >-if test "${ac_cv_func_shl_load+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define shl_load innocuous_shl_load >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char shl_load (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef shl_load >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char shl_load (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_shl_load) || defined (__stub___shl_load) >-choke me >-#else >-char (*f) () = shl_load; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != shl_load; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_shl_load=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_shl_load=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 >-echo "${ECHO_T}$ac_cv_func_shl_load" >&6 >-if test $ac_cv_func_shl_load = yes; then >- lt_cv_dlopen="shl_load" >-else >- echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 >-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 >-if test "${ac_cv_lib_svld_dlopen+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-lsvld $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char dlopen (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-dlopen (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_svld_dlopen=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_svld_dlopen=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 >-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 >-if test $ac_cv_lib_svld_dlopen = yes; then >- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" >-else >- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 >-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 >-if test "${ac_cv_lib_dld_shl_load+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- ac_check_lib_save_LIBS=$LIBS >-LIBS="-ldld $LIBS" >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char shl_load (); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-shl_load (); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_lib_dld_shl_load=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_lib_dld_shl_load=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-LIBS=$ac_check_lib_save_LIBS >-fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 >-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 >-if test $ac_cv_lib_dld_shl_load = yes; then >- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" >-fi >- >- >-fi >- >- >-fi >- >- >-fi >- >- >-fi >- >- ;; >- esac >- >- if test "x$lt_cv_dlopen" != xno; then >- enable_dlopen=yes >- else >- enable_dlopen=no >- fi >- >- case $lt_cv_dlopen in >- dlopen) >- save_CPPFLAGS="$CPPFLAGS" >- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" >- >- save_LDFLAGS="$LDFLAGS" >- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" >- >- save_LIBS="$LIBS" >- LIBS="$lt_cv_dlopen_libs $LIBS" >- >- echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 >-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 >-if test "${lt_cv_dlopen_self+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test "$cross_compiling" = yes; then : >- lt_cv_dlopen_self=cross >-else >- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 >- lt_status=$lt_dlunknown >- cat > conftest.$ac_ext <<EOF >-#line 9602 "configure" >-#include "confdefs.h" >- >-#if HAVE_DLFCN_H >-#include <dlfcn.h> >-#endif >- >-#include <stdio.h> >- >-#ifdef RTLD_GLOBAL >-# define LT_DLGLOBAL RTLD_GLOBAL >-#else >-# ifdef DL_GLOBAL >-# define LT_DLGLOBAL DL_GLOBAL >-# else >-# define LT_DLGLOBAL 0 >-# endif >-#endif >- >-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we >- find out it does not work in some platform. */ >-#ifndef LT_DLLAZY_OR_NOW >-# ifdef RTLD_LAZY >-# define LT_DLLAZY_OR_NOW RTLD_LAZY >-# else >-# ifdef DL_LAZY >-# define LT_DLLAZY_OR_NOW DL_LAZY >-# else >-# ifdef RTLD_NOW >-# define LT_DLLAZY_OR_NOW RTLD_NOW >-# else >-# ifdef DL_NOW >-# define LT_DLLAZY_OR_NOW DL_NOW >-# else >-# define LT_DLLAZY_OR_NOW 0 >-# endif >-# endif >-# endif >-# endif >-#endif >- >-#ifdef __cplusplus >-extern "C" void exit (int); >-#endif >- >-void fnord() { int i=42;} >-int main () >-{ >- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); >- int status = $lt_dlunknown; >- >- if (self) >- { >- if (dlsym (self,"fnord")) status = $lt_dlno_uscore; >- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; >- /* dlclose (self); */ >- } >- >- exit (status); >-} >-EOF >- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then >- (./conftest; exit; ) 2>/dev/null >- lt_status=$? >- case x$lt_status in >- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; >- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; >- x$lt_unknown|x*) lt_cv_dlopen_self=no ;; >- esac >- else : >- # compilation failed >- lt_cv_dlopen_self=no >- fi >-fi >-rm -fr conftest* >- >- >-fi >-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 >-echo "${ECHO_T}$lt_cv_dlopen_self" >&6 >- >- if test "x$lt_cv_dlopen_self" = xyes; then >- LDFLAGS="$LDFLAGS $link_static_flag" >- echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 >-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 >-if test "${lt_cv_dlopen_self_static+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- if test "$cross_compiling" = yes; then : >- lt_cv_dlopen_self_static=cross >-else >- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 >- lt_status=$lt_dlunknown >- cat > conftest.$ac_ext <<EOF >-#line 9700 "configure" >-#include "confdefs.h" >- >-#if HAVE_DLFCN_H >-#include <dlfcn.h> >-#endif >- >-#include <stdio.h> >- >-#ifdef RTLD_GLOBAL >-# define LT_DLGLOBAL RTLD_GLOBAL >-#else >-# ifdef DL_GLOBAL >-# define LT_DLGLOBAL DL_GLOBAL >-# else >-# define LT_DLGLOBAL 0 >-# endif >-#endif >- >-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we >- find out it does not work in some platform. */ >-#ifndef LT_DLLAZY_OR_NOW >-# ifdef RTLD_LAZY >-# define LT_DLLAZY_OR_NOW RTLD_LAZY >-# else >-# ifdef DL_LAZY >-# define LT_DLLAZY_OR_NOW DL_LAZY >-# else >-# ifdef RTLD_NOW >-# define LT_DLLAZY_OR_NOW RTLD_NOW >-# else >-# ifdef DL_NOW >-# define LT_DLLAZY_OR_NOW DL_NOW >-# else >-# define LT_DLLAZY_OR_NOW 0 >-# endif >-# endif >-# endif >-# endif >-#endif >- >-#ifdef __cplusplus >-extern "C" void exit (int); >-#endif >- >-void fnord() { int i=42;} >-int main () >-{ >- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); >- int status = $lt_dlunknown; >- >- if (self) >- { >- if (dlsym (self,"fnord")) status = $lt_dlno_uscore; >- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; >- /* dlclose (self); */ >- } >- >- exit (status); >-} >-EOF >- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then >- (./conftest; exit; ) 2>/dev/null >- lt_status=$? >- case x$lt_status in >- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; >- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; >- x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; >- esac >- else : >- # compilation failed >- lt_cv_dlopen_self_static=no >- fi >-fi >-rm -fr conftest* >- >- >-fi >-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 >-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 >- fi >- >- CPPFLAGS="$save_CPPFLAGS" >- LDFLAGS="$save_LDFLAGS" >- LIBS="$save_LIBS" >- ;; >- esac >- >- case $lt_cv_dlopen_self in >- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; >- *) enable_dlopen_self=unknown ;; >- esac >- >- case $lt_cv_dlopen_self_static in >- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; >- *) enable_dlopen_self_static=unknown ;; >- esac >-fi >- >- >-## FIXME: this should be a separate macro >-## >-if test "$enable_shared" = yes && test "$GCC" = yes; then >- case $archive_cmds in >- *'~'*) >- # FIXME: we may have to deal with multi-command sequences. >- ;; >- '$CC '*) >- # Test whether the compiler implicitly links with -lc since on some >- # systems, -lgcc has to come before -lc. If gcc already passes -lc >- # to ld, don't add -lc before -lgcc. >- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 >-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 >- if test "${lt_cv_archive_cmds_need_lc+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- $rm conftest* >- echo 'static int dummy;' > conftest.$ac_ext >- >- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; then >- soname=conftest >- lib=conftest >- libobjs=conftest.$ac_objext >- deplibs= >- wl=$lt_cv_prog_cc_wl >- compiler_flags=-v >- linker_flags=-v >- verstring= >- output_objdir=. >- libname=conftest >- save_allow_undefined_flag=$allow_undefined_flag >- allow_undefined_flag= >- if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 >- (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >- then >- lt_cv_archive_cmds_need_lc=no >- else >- lt_cv_archive_cmds_need_lc=yes >- fi >- allow_undefined_flag=$save_allow_undefined_flag >- else >- cat conftest.err 1>&5 >- fi >-fi >- >- echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 >-echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6 >- ;; >- esac >-fi >-need_lc=${lt_cv_archive_cmds_need_lc-yes} >-## >-## END FIXME >- >-## FIXME: this should be a separate macro >-## >-# The second clause should only fire when bootstrapping the >-# libtool distribution, otherwise you forgot to ship ltmain.sh >-# with your package, and you will get complaints that there are >-# no rules to generate ltmain.sh. >-if test -f "$ltmain"; then >- : >-else >- # If there is no Makefile yet, we rely on a make rule to execute >- # `config.status --recheck' to rerun these tests and create the >- # libtool script then. >- test -f Makefile && make "$ltmain" >-fi >- >-if test -f "$ltmain"; then >- trap "$rm \"${ofile}T\"; exit 1" 1 2 15 >- $rm -f "${ofile}T" >- >- echo creating $ofile >- >- # Now quote all the things that may contain metacharacters while being >- # careful not to overquote the AC_SUBSTed values. We take copies of the >- # variables and quote the copies for generation of the libtool script. >- for var in echo old_CC old_CFLAGS \ >- AR AR_FLAGS CC LD LN_S NM SHELL \ >- reload_flag reload_cmds wl \ >- pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ >- thread_safe_flag_spec whole_archive_flag_spec libname_spec \ >- library_names_spec soname_spec \ >- RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ >- old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ >- postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ >- old_striplib striplib file_magic_cmd export_symbols_cmds \ >- deplibs_check_method allow_undefined_flag no_undefined_flag \ >- finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ >- hardcode_libdir_flag_spec hardcode_libdir_separator \ >- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ >- compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do >- >- case $var in >- reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ >- old_postinstall_cmds | old_postuninstall_cmds | \ >- export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ >- extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ >- postinstall_cmds | postuninstall_cmds | \ >- finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) >- # Double-quote double-evaled strings. >- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" >- ;; >- *) >- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" >- ;; >- esac >- done >- >- cat <<__EOF__ > "${ofile}T" >-#! $SHELL >- >-# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. >-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) >-# NOTE: Changes made to this file will be lost: look at ltmain.sh. >-# >-# Copyright (C) 1996-2000 Free Software Foundation, Inc. >-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 >-# >-# This program is free software; you can redistribute it and/or modify >-# it under the terms of the GNU General Public License as published by >-# the Free Software Foundation; either version 2 of the License, or >-# (at your option) any later version. >-# >-# This program is distributed in the hope that it will be useful, but >-# WITHOUT ANY WARRANTY; without even the implied warranty of >-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >-# General Public License for more details. >-# >-# You should have received a copy of the GNU General Public License >-# along with this program; if not, write to the Free Software >-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. >- >-# Sed that helps us avoid accidentally triggering echo(1) options like -n. >-Xsed="sed -e s/^X//" >- >-# The HP-UX ksh and POSIX shell print the target directory to stdout >-# if CDPATH is set. >-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi >- >-# ### BEGIN LIBTOOL CONFIG >- >-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: >- >-# Shell to use when invoking shell scripts. >-SHELL=$lt_SHELL >- >-# Whether or not to build shared libraries. >-build_libtool_libs=$enable_shared >- >-# Whether or not to add -lc for building shared libraries. >-build_libtool_need_lc=$need_lc >- >-# Whether or not to build static libraries. >-build_old_libs=$enable_static >- >-# Whether or not to optimize for fast installation. >-fast_install=$enable_fast_install >- >-# The host system. >-host_alias=$host_alias >-host=$host >- >-# An echo program that does not interpret backslashes. >-echo=$lt_echo >- >-# The archiver. >-AR=$lt_AR >-AR_FLAGS=$lt_AR_FLAGS >- >-# The default C compiler. >-CC=$lt_CC >- >-# Is the compiler the GNU C compiler? >-with_gcc=$GCC >- >-# The linker used to build libraries. >-LD=$lt_LD >- >-# Whether we need hard or soft links. >-LN_S=$lt_LN_S >- >-# A BSD-compatible nm program. >-NM=$lt_NM >- >-# A symbol stripping program >-STRIP=$STRIP >- >-# Used to examine libraries when file_magic_cmd begins "file" >-MAGIC_CMD=$MAGIC_CMD >- >-# Used on cygwin: DLL creation program. >-DLLTOOL="$DLLTOOL" >- >-# Used on cygwin: object dumper. >-OBJDUMP="$OBJDUMP" >- >-# Used on cygwin: assembler. >-AS="$AS" >- >-# The name of the directory that contains temporary libtool files. >-objdir=$objdir >- >-# How to create reloadable object files. >-reload_flag=$lt_reload_flag >-reload_cmds=$lt_reload_cmds >- >-# How to pass a linker flag through the compiler. >-wl=$lt_wl >- >-# Object file suffix (normally "o"). >-objext="$ac_objext" >- >-# Old archive suffix (normally "a"). >-libext="$libext" >- >-# Executable file suffix (normally ""). >-exeext="$exeext" >- >-# Additional compiler flags for building library objects. >-pic_flag=$lt_pic_flag >-pic_mode=$pic_mode >- >-# Does compiler simultaneously support -c and -o options? >-compiler_c_o=$lt_compiler_c_o >- >-# Can we write directly to a .lo ? >-compiler_o_lo=$lt_compiler_o_lo >- >-# Must we lock files when doing compilation ? >-need_locks=$lt_need_locks >- >-# Do we need the lib prefix for modules? >-need_lib_prefix=$need_lib_prefix >- >-# Do we need a version for libraries? >-need_version=$need_version >- >-# Whether dlopen is supported. >-dlopen_support=$enable_dlopen >- >-# Whether dlopen of programs is supported. >-dlopen_self=$enable_dlopen_self >- >-# Whether dlopen of statically linked programs is supported. >-dlopen_self_static=$enable_dlopen_self_static >- >-# Compiler flag to prevent dynamic linking. >-link_static_flag=$lt_link_static_flag >- >-# Compiler flag to turn off builtin functions. >-no_builtin_flag=$lt_no_builtin_flag >- >-# Compiler flag to allow reflexive dlopens. >-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec >- >-# Compiler flag to generate shared objects directly from archives. >-whole_archive_flag_spec=$lt_whole_archive_flag_spec >- >-# Compiler flag to generate thread-safe objects. >-thread_safe_flag_spec=$lt_thread_safe_flag_spec >- >-# Library versioning type. >-version_type=$version_type >- >-# Format of library name prefix. >-libname_spec=$lt_libname_spec >- >-# List of archive names. First name is the real one, the rest are links. >-# The last name is the one that the linker finds with -lNAME. >-library_names_spec=$lt_library_names_spec >- >-# The coded name of the library, if different from the real name. >-soname_spec=$lt_soname_spec >- >-# Commands used to build and install an old-style archive. >-RANLIB=$lt_RANLIB >-old_archive_cmds=$lt_old_archive_cmds >-old_postinstall_cmds=$lt_old_postinstall_cmds >-old_postuninstall_cmds=$lt_old_postuninstall_cmds >- >-# Create an old-style archive from a shared archive. >-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds >- >-# Create a temporary old-style archive to link instead of a shared archive. >-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds >- >-# Commands used to build and install a shared archive. >-archive_cmds=$lt_archive_cmds >-archive_expsym_cmds=$lt_archive_expsym_cmds >-postinstall_cmds=$lt_postinstall_cmds >-postuninstall_cmds=$lt_postuninstall_cmds >- >-# Commands to strip libraries. >-old_striplib=$lt_old_striplib >-striplib=$lt_striplib >- >-# Method to check whether dependent libraries are shared objects. >-deplibs_check_method=$lt_deplibs_check_method >- >-# Command to use when deplibs_check_method == file_magic. >-file_magic_cmd=$lt_file_magic_cmd >- >-# Flag that allows shared libraries with undefined symbols to be built. >-allow_undefined_flag=$lt_allow_undefined_flag >- >-# Flag that forces no undefined symbols. >-no_undefined_flag=$lt_no_undefined_flag >- >-# Commands used to finish a libtool library installation in a directory. >-finish_cmds=$lt_finish_cmds >- >-# Same as above, but a single script fragment to be evaled but not shown. >-finish_eval=$lt_finish_eval >- >-# Take the output of nm and produce a listing of raw symbols and C names. >-global_symbol_pipe=$lt_global_symbol_pipe >- >-# Transform the output of nm in a proper C declaration >-global_symbol_to_cdecl=$lt_global_symbol_to_cdecl >- >-# This is the shared library runtime path variable. >-runpath_var=$runpath_var >- >-# This is the shared library path variable. >-shlibpath_var=$shlibpath_var >- >-# Is shlibpath searched before the hard-coded library search path? >-shlibpath_overrides_runpath=$shlibpath_overrides_runpath >- >-# How to hardcode a shared library path into an executable. >-hardcode_action=$hardcode_action >- >-# Whether we should hardcode library paths into libraries. >-hardcode_into_libs=$hardcode_into_libs >- >-# Flag to hardcode \$libdir into a binary during linking. >-# This must work even if \$libdir does not exist. >-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec >- >-# Whether we need a single -rpath flag with a separated argument. >-hardcode_libdir_separator=$lt_hardcode_libdir_separator >- >-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the >-# resulting binary. >-hardcode_direct=$hardcode_direct >- >-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the >-# resulting binary. >-hardcode_minus_L=$hardcode_minus_L >- >-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into >-# the resulting binary. >-hardcode_shlibpath_var=$hardcode_shlibpath_var >- >-# Variables whose values should be saved in libtool wrapper scripts and >-# restored at relink time. >-variables_saved_for_relink="$variables_saved_for_relink" >- >-# Whether libtool must link a program against all its dependency libraries. >-link_all_deplibs=$link_all_deplibs >- >-# Compile-time system search path for libraries >-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec >- >-# Run-time system search path for libraries >-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec >- >-# Fix the shell variable \$srcfile for the compiler. >-fix_srcfile_path="$fix_srcfile_path" >- >-# Set to yes if exported symbols are required. >-always_export_symbols=$always_export_symbols >- >-# The commands to list exported symbols. >-export_symbols_cmds=$lt_export_symbols_cmds >- >-# The commands to extract the exported symbol list from a shared archive. >-extract_expsyms_cmds=$lt_extract_expsyms_cmds >- >-# Symbols that should not be listed in the preloaded symbols. >-exclude_expsyms=$lt_exclude_expsyms >- >-# Symbols that must always be exported. >-include_expsyms=$lt_include_expsyms >- >-# ### END LIBTOOL CONFIG >- >-__EOF__ >- >- case $host_os in >- aix3*) >- cat <<\EOF >> "${ofile}T" >- >-# AIX sometimes has problems with the GCC collect2 program. For some >-# reason, if we set the COLLECT_NAMES environment variable, the problems >-# vanish in a puff of smoke. >-if test "X${COLLECT_NAMES+set}" != Xset; then >- COLLECT_NAMES= >- export COLLECT_NAMES >-fi >-EOF >- ;; >- esac >- >- case $host_os in >- cygwin* | mingw* | pw32* | os2*) >- cat <<'EOF' >> "${ofile}T" >- # This is a source program that is used to create dlls on Windows >- # Don't remove nor modify the starting and closing comments >-# /* ltdll.c starts here */ >-# #define WIN32_LEAN_AND_MEAN >-# #include <windows.h> >-# #undef WIN32_LEAN_AND_MEAN >-# #include <stdio.h> >-# >-# #ifndef __CYGWIN__ >-# # ifdef __CYGWIN32__ >-# # define __CYGWIN__ __CYGWIN32__ >-# # endif >-# #endif >-# >-# #ifdef __cplusplus >-# extern "C" { >-# #endif >-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); >-# #ifdef __cplusplus >-# } >-# #endif >-# >-# #ifdef __CYGWIN__ >-# #include <cygwin/cygwin_dll.h> >-# DECLARE_CYGWIN_DLL( DllMain ); >-# #endif >-# HINSTANCE __hDllInstance_base; >-# >-# BOOL APIENTRY >-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) >-# { >-# __hDllInstance_base = hInst; >-# return TRUE; >-# } >-# /* ltdll.c ends here */ >- # This is a source program that is used to create import libraries >- # on Windows for dlls which lack them. Don't remove nor modify the >- # starting and closing comments >-# /* impgen.c starts here */ >-# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. >-# >-# This file is part of GNU libtool. >-# >-# This program is free software; you can redistribute it and/or modify >-# it under the terms of the GNU General Public License as published by >-# the Free Software Foundation; either version 2 of the License, or >-# (at your option) any later version. >-# >-# This program is distributed in the hope that it will be useful, >-# but WITHOUT ANY WARRANTY; without even the implied warranty of >-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >-# GNU General Public License for more details. >-# >-# You should have received a copy of the GNU General Public License >-# along with this program; if not, write to the Free Software >-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. >-# */ >-# >-# #include <stdio.h> /* for printf() */ >-# #include <unistd.h> /* for open(), lseek(), read() */ >-# #include <fcntl.h> /* for O_RDONLY, O_BINARY */ >-# #include <string.h> /* for strdup() */ >-# >-# /* O_BINARY isn't required (or even defined sometimes) under Unix */ >-# #ifndef O_BINARY >-# #define O_BINARY 0 >-# #endif >-# >-# static unsigned int >-# pe_get16 (fd, offset) >-# int fd; >-# int offset; >-# { >-# unsigned char b[2]; >-# lseek (fd, offset, SEEK_SET); >-# read (fd, b, 2); >-# return b[0] + (b[1]<<8); >-# } >-# >-# static unsigned int >-# pe_get32 (fd, offset) >-# int fd; >-# int offset; >-# { >-# unsigned char b[4]; >-# lseek (fd, offset, SEEK_SET); >-# read (fd, b, 4); >-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); >-# } >-# >-# static unsigned int >-# pe_as32 (ptr) >-# void *ptr; >-# { >-# unsigned char *b = ptr; >-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); >-# } >-# >-# int >-# main (argc, argv) >-# int argc; >-# char *argv[]; >-# { >-# int dll; >-# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; >-# unsigned long export_rva, export_size, nsections, secptr, expptr; >-# unsigned long name_rvas, nexp; >-# unsigned char *expdata, *erva; >-# char *filename, *dll_name; >-# >-# filename = argv[1]; >-# >-# dll = open(filename, O_RDONLY|O_BINARY); >-# if (dll < 1) >-# return 1; >-# >-# dll_name = filename; >-# >-# for (i=0; filename[i]; i++) >-# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') >-# dll_name = filename + i +1; >-# >-# pe_header_offset = pe_get32 (dll, 0x3c); >-# opthdr_ofs = pe_header_offset + 4 + 20; >-# num_entries = pe_get32 (dll, opthdr_ofs + 92); >-# >-# if (num_entries < 1) /* no exports */ >-# return 1; >-# >-# export_rva = pe_get32 (dll, opthdr_ofs + 96); >-# export_size = pe_get32 (dll, opthdr_ofs + 100); >-# nsections = pe_get16 (dll, pe_header_offset + 4 +2); >-# secptr = (pe_header_offset + 4 + 20 + >-# pe_get16 (dll, pe_header_offset + 4 + 16)); >-# >-# expptr = 0; >-# for (i = 0; i < nsections; i++) >-# { >-# char sname[8]; >-# unsigned long secptr1 = secptr + 40 * i; >-# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); >-# unsigned long vsize = pe_get32 (dll, secptr1 + 16); >-# unsigned long fptr = pe_get32 (dll, secptr1 + 20); >-# lseek(dll, secptr1, SEEK_SET); >-# read(dll, sname, 8); >-# if (vaddr <= export_rva && vaddr+vsize > export_rva) >-# { >-# expptr = fptr + (export_rva - vaddr); >-# if (export_rva + export_size > vaddr + vsize) >-# export_size = vsize - (export_rva - vaddr); >-# break; >-# } >-# } >-# >-# expdata = (unsigned char*)malloc(export_size); >-# lseek (dll, expptr, SEEK_SET); >-# read (dll, expdata, export_size); >-# erva = expdata - export_rva; >-# >-# nexp = pe_as32 (expdata+24); >-# name_rvas = pe_as32 (expdata+32); >-# >-# printf ("EXPORTS\n"); >-# for (i = 0; i<nexp; i++) >-# { >-# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); >-# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); >-# } >-# >-# return 0; >-# } >-# /* impgen.c ends here */ >- >-EOF >- ;; >- esac >- >- # We use sed instead of cat because bash on DJGPP gets confused if >- # if finds mixed CR/LF and LF-only lines. Since sed operates in >- # text mode, it properly converts lines to CR/LF. This bash problem >- # is reportedly fixed, but why not run on old versions too? >- sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) >- >- mv -f "${ofile}T" "$ofile" || \ >- (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") >- chmod +x "$ofile" >-fi >-## >-## END FIXME >- >- >- >- >- >-# This can be used to rebuild libtool when needed >-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" >- >-# Always use our own libtool. >-LIBTOOL='$(SHELL) $(top_builddir)/libtool' >- >-# Prevent multiple expansion >- >- >- O=lo >- A=la >- LIBTOOL_MKDEP_SED='s;\.o;\.lo;' >- ;; >- *) >- O=o >- A=a >- LIBTOOL= >- >- LIBTOOL_MKDEP_SED= >- ;; >-esac >- >-# >-# File name extension for static archive files, for those few places >-# where they are treated differently from dynamic ones. >-# >-SA=a >- >- >- >- >- >- >-# >-# build libbind? >-# >-# Check whether --enable-libbind or --disable-libbind was given. >-if test "${enable_libbind+set}" = set; then >- enableval="$enable_libbind" >- >-fi; >- >-case "$enable_libbind" in >- yes) >- LIBBIND=lib/bind >- >- ;; >- no|'') >- ;; >-esac >- >-# >-# Here begins a very long section to determine the system's networking >-# capabilities. The order of the tests is signficant. >-# >- >-# >-# IPv6 >-# >-# Check whether --enable-ipv6 or --disable-ipv6 was given. >-if test "${enable_ipv6+set}" = set; then >- enableval="$enable_ipv6" >- >-fi; >- >-case "$enable_ipv6" in >- yes|''|autodetect) >- cat >>confdefs.h <<\_ACEOF >-#define WANT_IPV6 1 >-_ACEOF >- >- ;; >- no) >- ;; >-esac >- >-# >-# We do the IPv6 compilation checking after libtool so that we can put >-# the right suffix on the files. >-# >-echo "$as_me:$LINENO: checking for IPv6 structures" >&5 >-echo $ECHO_N "checking for IPv6 structures... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/socket.h> >-#include <netinet/in.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct sockaddr_in6 sin6; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- found_ipv6=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- found_ipv6=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >-# >-# See whether IPv6 support is provided via a Kame add-on. >-# This is done before other IPv6 linking tests to LIBS is properly set. >-# >-echo "$as_me:$LINENO: checking for Kame IPv6 support" >&5 >-echo $ECHO_N "checking for Kame IPv6 support... $ECHO_C" >&6 >- >-# Check whether --with-kame or --without-kame was given. >-if test "${with_kame+set}" = set; then >- withval="$with_kame" >- use_kame="$withval" >-else >- use_kame="no" >-fi; >- >-case "$use_kame" in >- no) >- ;; >- yes) >- kame_path=/usr/local/v6 >- ;; >- *) >- kame_path="$use_kame" >- ;; >-esac >- >-case "$use_kame" in >- no) >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ;; >- *) >- if test -f $kame_path/lib/libinet6.a; then >- echo "$as_me:$LINENO: result: $kame_path/lib/libinet6.a" >&5 >-echo "${ECHO_T}$kame_path/lib/libinet6.a" >&6 >- LIBS="-L$kame_path/lib -linet6 $LIBS" >- else >- { { echo "$as_me:$LINENO: error: $kame_path/lib/libinet6.a not found. >- >-Please choose the proper path with the following command: >- >- configure --with-kame=PATH >-" >&5 >-echo "$as_me: error: $kame_path/lib/libinet6.a not found. >- >-Please choose the proper path with the following command: >- >- configure --with-kame=PATH >-" >&2;} >- { (exit 1); exit 1; }; } >- fi >- ;; >-esac >- >-# >-# Whether netinet6/in6.h is needed has to be defined in isc/platform.h. >-# Including it on Kame-using platforms is very bad, though, because >-# Kame uses #error against direct inclusion. So include it on only >-# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1. >-# This is done before the in6_pktinfo check because that's what >-# netinet6/in6.h is needed for. >-# >- >-case "$host" in >-*-bsdi4.[01]*) >- ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >- LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1" >- isc_netinet6in6_hack="#include <netinet6/in6.h>" >- ;; >-*) >- ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H" >- LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H" >- isc_netinet6in6_hack="" >- ;; >-esac >- >- >-# >-# This is similar to the netinet6/in6.h issue. >-# >-case "$host" in >-*-sco-sysv*uw*) >- # UnixWare >- ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1" >- LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1" >- ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1" >- isc_netinetin6_hack="#include <netinet/in6.h>" >- ;; >-*) >- ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H" >- LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H" >- ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR" >- isc_netinetin6_hack="" >- ;; >-esac >- >-# >-# Now delve deeper into the suitability of the IPv6 support. >-# >-case "$found_ipv6" in >- yes) >- ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1" >- LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1" >- >- echo "$as_me:$LINENO: checking for in6_addr" >&5 >-echo $ECHO_N "checking for in6_addr... $ECHO_C" >&6 >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/socket.h> >-#include <netinet/in.h> >-$isc_netinetin6_hack >-$isc_netinet6in6_hack >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct in6_addr in6; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" >- LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6" >- isc_in_addr6_hack="" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1" >- LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1" >- isc_in_addr6_hack="#define in6_addr in_addr6" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- echo "$as_me:$LINENO: checking for in6addr_any" >&5 >-echo $ECHO_N "checking for in6addr_any... $ECHO_C" >&6 >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/socket.h> >-#include <netinet/in.h> >-$isc_netinetin6_hack >-$isc_netinet6in6_hack >-$isc_in_addr6_hack >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" >- LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >- LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1" >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >- >- echo "$as_me:$LINENO: checking for in6addr_loopback" >&5 >-echo $ECHO_N "checking for in6addr_loopback... $ECHO_C" >&6 >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/socket.h> >-#include <netinet/in.h> >-$isc_netinetin6_hack >-$isc_netinet6in6_hack >-$isc_in_addr6_hack >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK" >- LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1" >- LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1" >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >- >- echo "$as_me:$LINENO: checking for sin6_scope_id in struct sockaddr_in6" >&5 >-echo $ECHO_N "checking for sin6_scope_id in struct sockaddr_in6... $ECHO_C" >&6 >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/socket.h> >-#include <netinet/in.h> >-$isc_netinetin6_hack >-$isc_netinet6in6_hack >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- result="#define LWRES_HAVE_SIN6_SCOPE_ID 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- result="#undef LWRES_HAVE_SIN6_SCOPE_ID" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- LWRES_HAVE_SIN6_SCOPE_ID="$result" >- >- echo "$as_me:$LINENO: checking for in6_pktinfo" >&5 >-echo $ECHO_N "checking for in6_pktinfo... $ECHO_C" >&6 >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/socket.h> >-#include <netinet/in.h> >-$isc_netinetin6_hack >-$isc_netinet6in6_hack >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct in6_pktinfo xyzzy; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no -- disabling runtime ipv6 support" >&5 >-echo "${ECHO_T}no -- disabling runtime ipv6 support" >&6 >- ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- ;; >- no) >- ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6" >- LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6" >- ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" >- LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY" >- ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO" >- LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1" >- ISC_IPV6_H="ipv6.h" >- ISC_IPV6_O="ipv6.$O" >- ISC_ISCIPV6_O="unix/ipv6.$O" >- ISC_IPV6_C="ipv6.c" >- ;; >-esac >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >-# >-# Check for network functions that are often missing. We do this >-# after the libtool checking, so we can put the right suffix on >-# the files. It also needs to come after checking for a Kame add-on, >-# which provides some (all?) of the desired functions. >-# >- >-echo "$as_me:$LINENO: checking for inet_ntop with IPv6 support" >&5 >-echo $ECHO_N "checking for inet_ntop with IPv6 support... $ECHO_C" >&6 >-if test "$cross_compiling" = yes; then >- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 >-echo "$as_me: error: cannot run test program while cross compiling" >&2;} >- { (exit 1); exit 1; }; } >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/socket.h> >-#include <netinet/in.h> >-#include <arpa/inet.h> >-main() { >-char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);} >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O" >- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c" >- ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1" >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >- >- >-# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts >-# addresses with less than four octets, like "1.2.3". Also leading >-# zeros should also be rejected. >- >-echo "$as_me:$LINENO: checking for working inet_pton with IPv6 support" >&5 >-echo $ECHO_N "checking for working inet_pton with IPv6 support... $ECHO_C" >&6 >-if test "$cross_compiling" = yes; then >- echo "$as_me:$LINENO: result: assuming target platform has working inet_pton" >&5 >-echo "${ECHO_T}assuming target platform has working inet_pton" >&6 >- ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/socket.h> >-#include <netinet/in.h> >-#include <arpa/inet.h> >-main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : >- inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : >- (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); } >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O" >- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c" >- ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1" >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >- >-echo "$as_me:$LINENO: checking for inet_aton" >&5 >-echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <netinet/in.h> >-#include <arpa/inet.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct in_addr in; inet_aton(0, &in); return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O" >- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c" >- ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1" >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >- >- >- >- >- >-# >-# Look for a 4.4BSD-style sa_len member in struct sockaddr. >-# >-case "$host" in >- *-dec-osf*) >- # Turn on 4.4BSD style sa_len support. >- cat >>confdefs.h <<\_ACEOF >-#define _SOCKADDR_LEN 1 >-_ACEOF >- >- ;; >-esac >- >-echo "$as_me:$LINENO: checking for sa_len in struct sockaddr" >&5 >-echo $ECHO_N "checking for sa_len in struct sockaddr... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/socket.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct sockaddr sa; sa.sa_len = 0; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" >- LWRES_PLATFORM_HAVESALEN="#define LWRES_PLATFORM_HAVESALEN 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN" >- LWRES_PLATFORM_HAVESALEN="#undef LWRES_PLATFORM_HAVESALEN" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >- >-# >-# Look for a 4.4BSD or 4.3BSD struct msghdr >-# >-echo "$as_me:$LINENO: checking for struct msghdr flavor" >&5 >-echo $ECHO_N "checking for struct msghdr flavor... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/socket.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct msghdr msg; msg.msg_flags = 0; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: 4.4BSD" >&5 >-echo "${ECHO_T}4.4BSD" >&6 >- ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: 4.3BSD" >&5 >-echo "${ECHO_T}4.3BSD" >&6 >- ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-# >-# Look for in_port_t. >-# >-echo "$as_me:$LINENO: checking for type in_port_t" >&5 >-echo $ECHO_N "checking for type in_port_t... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <netinet/in.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-in_port_t port = 25; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-# >-# Check for addrinfo >-# >-echo "$as_me:$LINENO: checking for struct addrinfo" >&5 >-echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <netdb.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct addrinfo a; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_ADDRINFO 1 >-_ACEOF >- >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-# >-# Check for rrsetinfo >-# >-echo "$as_me:$LINENO: checking for struct rrsetinfo" >&5 >-echo $ECHO_N "checking for struct rrsetinfo... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <netdb.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-struct rrsetinfo r; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-echo "$as_me:$LINENO: checking for int sethostent" >&5 >-echo $ECHO_N "checking for int sethostent... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <netdb.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-int i = sethostent(0); return(0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-echo "$as_me:$LINENO: checking for int endhostent" >&5 >-echo $ECHO_N "checking for int endhostent... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <netdb.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-int i = endhostent(); return(0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-echo "$as_me:$LINENO: checking for getnetbyaddr(in_addr_t, ...)" >&5 >-echo $ECHO_N "checking for getnetbyaddr(in_addr_t, ...)... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <netdb.h> >-struct netent *getnetbyaddr(in_addr_t, int); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >- >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-echo "$as_me:$LINENO: checking for int setnetent" >&5 >-echo $ECHO_N "checking for int setnetent... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <netdb.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-int i = setnetent(0); return(0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-echo "$as_me:$LINENO: checking for int endnetent" >&5 >-echo $ECHO_N "checking for int endnetent... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <netdb.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-int i = endnetent(); return(0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-echo "$as_me:$LINENO: checking for gethostbyaddr(const void *, size_t, ...)" >&5 >-echo $ECHO_N "checking for gethostbyaddr(const void *, size_t, ...)... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <netdb.h> >-struct hostent *gethostbyaddr(const void *, size_t, int); >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return(0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-echo "$as_me:$LINENO: checking for h_errno in netdb.h" >&5 >-echo $ECHO_N "checking for h_errno in netdb.h... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <netdb.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-h_errno = 1; return(0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1" >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-echo "$as_me:$LINENO: checking for getipnodebyname" >&5 >-echo $ECHO_N "checking for getipnodebyname... $ECHO_C" >&6 >-if test "${ac_cv_func_getipnodebyname+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define getipnodebyname to an innocuous variant, in case <limits.h> declares getipnodebyname. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define getipnodebyname innocuous_getipnodebyname >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char getipnodebyname (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef getipnodebyname >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char getipnodebyname (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_getipnodebyname) || defined (__stub___getipnodebyname) >-choke me >-#else >-char (*f) () = getipnodebyname; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != getipnodebyname; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_getipnodebyname=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_getipnodebyname=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_getipnodebyname" >&5 >-echo "${ECHO_T}$ac_cv_func_getipnodebyname" >&6 >-if test $ac_cv_func_getipnodebyname = yes; then >- ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO" >-else >- ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1" >-fi >- >-echo "$as_me:$LINENO: checking for getnameinfo" >&5 >-echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6 >-if test "${ac_cv_func_getnameinfo+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define getnameinfo to an innocuous variant, in case <limits.h> declares getnameinfo. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define getnameinfo innocuous_getnameinfo >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char getnameinfo (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef getnameinfo >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char getnameinfo (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_getnameinfo) || defined (__stub___getnameinfo) >-choke me >-#else >-char (*f) () = getnameinfo; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != getnameinfo; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_getnameinfo=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_getnameinfo=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5 >-echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6 >-if test $ac_cv_func_getnameinfo = yes; then >- ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO" >-else >- ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1" >-fi >- >-echo "$as_me:$LINENO: checking for getaddrinfo" >&5 >-echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 >-if test "${ac_cv_func_getaddrinfo+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define getaddrinfo innocuous_getaddrinfo >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char getaddrinfo (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef getaddrinfo >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char getaddrinfo (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) >-choke me >-#else >-char (*f) () = getaddrinfo; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != getaddrinfo; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_getaddrinfo=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_getaddrinfo=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 >-echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 >-if test $ac_cv_func_getaddrinfo = yes; then >- ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO" >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_GETADDRINFO 1 >-_ACEOF >- >-else >- ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1" >-fi >- >-echo "$as_me:$LINENO: checking for gai_strerror" >&5 >-echo $ECHO_N "checking for gai_strerror... $ECHO_C" >&6 >-if test "${ac_cv_func_gai_strerror+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define gai_strerror to an innocuous variant, in case <limits.h> declares gai_strerror. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define gai_strerror innocuous_gai_strerror >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char gai_strerror (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef gai_strerror >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char gai_strerror (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_gai_strerror) || defined (__stub___gai_strerror) >-choke me >-#else >-char (*f) () = gai_strerror; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != gai_strerror; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_gai_strerror=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_gai_strerror=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5 >-echo "${ECHO_T}$ac_cv_func_gai_strerror" >&6 >-if test $ac_cv_func_gai_strerror = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_GAISTRERROR 1 >-_ACEOF >- >-fi >- >- >- >- >- >-# >-# Look for a sysctl call to get the list of network interfaces. >-# >-echo "$as_me:$LINENO: checking for interface list sysctl" >&5 >-echo $ECHO_N "checking for interface list sysctl... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/param.h> >-#include <sys/sysctl.h> >-#include <sys/socket.h> >-#ifdef NET_RT_IFLIST >-found_rt_iflist >-#endif >- >-_ACEOF >-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | >- egrep "found_rt_iflist" >/dev/null 2>&1; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_IFLIST_SYSCTL 1 >-_ACEOF >- >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >-rm -f conftest* >- >- >-# >-# Check for some other useful functions that are not ever-present. >-# >- >-# We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC >-# because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77 >-# reportedly defines strsep() without declaring it in <string.h> when >-# -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and >-# AC_CHECK_FUNC() incorrectly succeeds because it declares >-# the function itself. >-echo "$as_me:$LINENO: checking for correctly declared strsep()" >&5 >-echo $ECHO_N "checking for correctly declared strsep()... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <string.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-char *sp; char *foo = strsep(&sp, "."); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6; ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6; ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1" >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >- >-echo "$as_me:$LINENO: checking for vsnprintf" >&5 >-echo $ECHO_N "checking for vsnprintf... $ECHO_C" >&6 >-if test "${ac_cv_func_vsnprintf+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define vsnprintf to an innocuous variant, in case <limits.h> declares vsnprintf. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define vsnprintf innocuous_vsnprintf >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char vsnprintf (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef vsnprintf >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char vsnprintf (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_vsnprintf) || defined (__stub___vsnprintf) >-choke me >-#else >-char (*f) () = vsnprintf; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != vsnprintf; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_vsnprintf=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_vsnprintf=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_vsnprintf" >&5 >-echo "${ECHO_T}$ac_cv_func_vsnprintf" >&6 >-if test $ac_cv_func_vsnprintf = yes; then >- ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF" >-else >- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O" >- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c" >- ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1" >-fi >- >- >- >-echo "$as_me:$LINENO: checking for strerror" >&5 >-echo $ECHO_N "checking for strerror... $ECHO_C" >&6 >-if test "${ac_cv_func_strerror+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define strerror to an innocuous variant, in case <limits.h> declares strerror. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define strerror innocuous_strerror >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char strerror (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef strerror >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char strerror (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_strerror) || defined (__stub___strerror) >-choke me >-#else >-char (*f) () = strerror; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != strerror; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_strerror=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_strerror=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 >-echo "${ECHO_T}$ac_cv_func_strerror" >&6 >-if test $ac_cv_func_strerror = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_STRERROR 1 >-_ACEOF >- >-fi >- >- >- >- >- >-# >-# Determine the printf format characters to use when printing >-# values of type isc_int64_t. We make the assumption that platforms >-# where a "long long" is the same size as a "long" (e.g., Alpha/OSF1) >-# want "%ld" and everyone else can use "%lld". Win32 uses "%I64d", >-# but that's defined elsewhere since we don't use configure on Win32. >-# >-echo "$as_me:$LINENO: checking printf format modifier for 64-bit integers" >&5 >-echo $ECHO_N "checking printf format modifier for 64-bit integers... $ECHO_C" >&6 >-if test "$cross_compiling" = yes; then >- echo "$as_me:$LINENO: result: assuming target platform uses ll" >&5 >-echo "${ECHO_T}assuming target platform uses ll" >&6 >- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"' >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-main() { exit(!(sizeof(long long int) == sizeof(long int))); } >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: l" >&5 >-echo "${ECHO_T}l" >&6 >- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"' >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >-echo "$as_me:$LINENO: result: ll" >&5 >-echo "${ECHO_T}ll" >&6 >- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"' >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >- >- >-# >-# Security Stuff >-# >-echo "$as_me:$LINENO: checking for chroot" >&5 >-echo $ECHO_N "checking for chroot... $ECHO_C" >&6 >-if test "${ac_cv_func_chroot+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-/* From autoconf 2.57 */ >-/* Define chroot to an innocuous variant, in case <limits.h> declares chroot. >- For example, HP-UX 11i <limits.h> declares gettimeofday. */ >-#define chroot innocuous_chroot >- >-/* System header to define __stub macros and hopefully few prototypes, >- which can conflict with char chroot (); below. >- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since >- <limits.h> exists even on freestanding compilers. */ >- >-#ifdef __STDC__ >-# include <limits.h> >-#else >-# include <assert.h> >-#endif >- >-#undef chroot >- >-/* Override any gcc2 internal prototype to avoid an error. */ >-#ifdef __cplusplus >-extern "C" >-{ >-#endif >-/* We use char because int might match the return type of a gcc2 >- builtin and then its argument prototype would still apply. */ >-char chroot (); >-/* The GNU C library defines this for functions which it implements >- to always fail with ENOSYS. Some functions are actually named >- something starting with __ and the normal name is an alias. */ >-#if defined (__stub_chroot) || defined (__stub___chroot) >-choke me >-#else >-char (*f) () = chroot; >-#endif >-#ifdef __cplusplus >-} >-#endif >- >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-return f != chroot; >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_cv_func_chroot=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_cv_func_chroot=no >-fi >-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext >-fi >-echo "$as_me:$LINENO: result: $ac_cv_func_chroot" >&5 >-echo "${ECHO_T}$ac_cv_func_chroot" >&6 >-if test $ac_cv_func_chroot = yes; then >- cat >>confdefs.h <<\_ACEOF >-#define HAVE_CHROOT 1 >-_ACEOF >- >-fi >- >-# Check whether --enable-linux-caps or --disable-linux-caps was given. >-if test "${enable_linux_caps+set}" = set; then >- enableval="$enable_linux_caps" >- >-fi; >-case "$enable_linux_caps" in >- yes|'') >- >-for ac_header in linux/capability.h >-do >-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo "$as_me:$LINENO: checking for $ac_header" >&5 >-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-fi >-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 >-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 >-else >- # Is the header compilable? >-echo "$as_me:$LINENO: checking $ac_header usability" >&5 >-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-$ac_includes_default >-#include <$ac_header> >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_header_compiler=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_header_compiler=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 >-echo "${ECHO_T}$ac_header_compiler" >&6 >- >-# Is the header present? >-echo "$as_me:$LINENO: checking $ac_header presence" >&5 >-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <$ac_header> >-_ACEOF >-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 >- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 >- ac_status=$? >- egrep -v '^ *\+' conftest.er1 >conftest.err >- rm -f conftest.er1 >- cat conftest.err >&5 >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >/dev/null; then >- if test -s conftest.err; then >- ac_cpp_err=$ac_c_preproc_warn_flag >- else >- ac_cpp_err= >- fi >-else >- ac_cpp_err=yes >-fi >-if test -z "$ac_cpp_err"; then >- ac_header_preproc=yes >-else >- echo "$as_me: failed program was:" >&5 >- cat conftest.$ac_ext >&5 >- ac_header_preproc=no >-fi >-rm -f conftest.err conftest.$ac_ext >-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 >-echo "${ECHO_T}$ac_header_preproc" >&6 >- >-# So? What about this header? >-case $ac_header_compiler:$ac_header_preproc in >- yes:no ) >- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 >-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 >-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; >- no:yes ) >- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 >-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 >-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 >-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; >-esac >-echo "$as_me:$LINENO: checking for $ac_header" >&5 >-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- eval "$as_ac_Header=$ac_header_preproc" >-fi >-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 >-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 >- >-fi >-if test `eval echo '${'$as_ac_Header'}'` = yes; then >- cat >>confdefs.h <<_ACEOF >-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 >-_ACEOF >- >-fi >- >-done >- >- ;; >- no) >- ;; >-esac >- >-for ac_header in sys/prctl.h >-do >-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo "$as_me:$LINENO: checking for $ac_header" >&5 >-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-fi >-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 >-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 >-else >- # Is the header compilable? >-echo "$as_me:$LINENO: checking $ac_header usability" >&5 >-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-$ac_includes_default >-#include <$ac_header> >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- ac_header_compiler=yes >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-ac_header_compiler=no >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 >-echo "${ECHO_T}$ac_header_compiler" >&6 >- >-# Is the header present? >-echo "$as_me:$LINENO: checking $ac_header presence" >&5 >-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >-#include <$ac_header> >-_ACEOF >-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 >- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 >- ac_status=$? >- egrep -v '^ *\+' conftest.er1 >conftest.err >- rm -f conftest.er1 >- cat conftest.err >&5 >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } >/dev/null; then >- if test -s conftest.err; then >- ac_cpp_err=$ac_c_preproc_warn_flag >- else >- ac_cpp_err= >- fi >-else >- ac_cpp_err=yes >-fi >-if test -z "$ac_cpp_err"; then >- ac_header_preproc=yes >-else >- echo "$as_me: failed program was:" >&5 >- cat conftest.$ac_ext >&5 >- ac_header_preproc=no >-fi >-rm -f conftest.err conftest.$ac_ext >-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 >-echo "${ECHO_T}$ac_header_preproc" >&6 >- >-# So? What about this header? >-case $ac_header_compiler:$ac_header_preproc in >- yes:no ) >- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 >-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 >-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; >- no:yes ) >- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 >-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 >-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} >- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 >-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; >-esac >-echo "$as_me:$LINENO: checking for $ac_header" >&5 >-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 >-if eval "test \"\${$as_ac_Header+set}\" = set"; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- eval "$as_ac_Header=$ac_header_preproc" >-fi >-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 >-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 >- >-fi >-if test `eval echo '${'$as_ac_Header'}'` = yes; then >- cat >>confdefs.h <<_ACEOF >-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 >-_ACEOF >- >-fi >- >-done >- >- >-# >-# BSD/OS, and perhaps some others, don't define rlim_t. >-# >-echo "$as_me:$LINENO: checking for type rlim_t" >&5 >-echo $ECHO_N "checking for type rlim_t... $ECHO_C" >&6 >-cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/time.h> >-#include <sys/resource.h> >-#ifdef F77_DUMMY_MAIN >-# ifdef __cplusplus >- extern "C" >-# endif >- int F77_DUMMY_MAIN() { return 1; } >-#endif >-int >-main () >-{ >-rlim_t rl = 19671212; return (0); >- ; >- return 0; >-} >-_ACEOF >-rm -f conftest.$ac_objext >-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >- (eval $ac_compile) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && >- { ac_try='test -s conftest.$ac_objext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: yes" >&5 >-echo "${ECHO_T}yes" >&6 >- ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t" >-else >- echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >- >-echo "$as_me:$LINENO: checking type of rlim_cur" >&5 >-echo $ECHO_N "checking type of rlim_cur... $ECHO_C" >&6 >-if test "$cross_compiling" = yes; then >- { { echo "$as_me:$LINENO: error: cannot determine type of rlim_cur when cross compiling - define rlim_t" >&5 >-echo "$as_me: error: cannot determine type of rlim_cur when cross compiling - define rlim_t" >&2;} >- { (exit 1); exit 1; }; } >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/time.h> >-#include <sys/resource.h> >-main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: int" >&5 >-echo "${ECHO_T}int" >&6 >-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int" >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >- >-if test "$cross_compiling" = yes; then >- { { echo "$as_me:$LINENO: error: this cannot happen" >&5 >-echo "$as_me: error: this cannot happen" >&2;} >- { (exit 1); exit 1; }; } >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/time.h> >-#include <sys/resource.h> >-main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: long int" >&5 >-echo "${ECHO_T}long int" >&6 >-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int" >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >- >-if test "$cross_compiling" = yes; then >- { { echo "$as_me:$LINENO: error: this cannot happen" >&5 >-echo "$as_me: error: this cannot happen" >&2;} >- { (exit 1); exit 1; }; } >-else >- cat >conftest.$ac_ext <<_ACEOF >-#line $LINENO "configure" >-#include "confdefs.h" >- >-#include <sys/types.h> >-#include <sys/time.h> >-#include <sys/resource.h> >-main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} >-_ACEOF >-rm -f conftest$ac_exeext >-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 >- (eval $ac_link) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >- (eval $ac_try) 2>&5 >- ac_status=$? >- echo "$as_me:$LINENO: \$? = $ac_status" >&5 >- (exit $ac_status); }; }; then >- echo "$as_me:$LINENO: result: long long int" >&5 >-echo "${ECHO_T}long long int" >&6 >-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int" >-else >- echo "$as_me: program exited with status $ac_status" >&5 >-echo "$as_me: failed program was:" >&5 >-cat conftest.$ac_ext >&5 >-( exit $ac_status ) >-{ { echo "$as_me:$LINENO: error: unable to determine sizeof rlim_cur" >&5 >-echo "$as_me: error: unable to determine sizeof rlim_cur" >&2;} >- { (exit 1); exit 1; }; } >- >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >- >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >- >-fi >-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >-fi >- >-fi >-rm -f conftest.$ac_objext conftest.$ac_ext >- >- >-# >-# Microsoft has their own way of handling shared libraries that requires >-# additional qualifiers on extern variables. Unix systems don't need it. >-# >- >-ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC" >- >-LWRES_PLATFORM_USEDECLSPEC="#undef LWRES_PLATFORM_USEDECLSPEC" >- >-# >-# Random remaining OS-specific issues involving compiler warnings. >-# XXXDCL print messages to indicate some compensation is being done? >-# >- >-ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT" >- >-case "$host" in >- *-bsdi3.1*) >- hack_shutup_sputaux=yes >- ;; >- *-bsdi4.0*) >- hack_shutup_sigwait=yes >- hack_shutup_sputaux=yes >- ;; >- *-bsdi4[12]*) >- hack_shutup_stdargcast=yes >- ;; >- *-solaris2.[89]) >- hack_shutup_pthreadonceinit=yes >- ;; >-esac >- >-case "$hack_shutup_pthreadonceinit" in >- yes) >- # >- # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings. >- # >- ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >- ;; >-esac >- >-case "$hack_shutup_sigwait" in >- yes) >- # >- # Shut up a -Wmissing-prototypes warning for sigwait(). >- # >- cat >>confdefs.h <<\_ACEOF >-#define SHUTUP_SIGWAIT 1 >-_ACEOF >- >- ;; >-esac >- >-case "$hack_shutup_sputaux" in >- yes) >- # >- # Shut up a -Wmissing-prototypes warning from <stdio.h>. >- # >- cat >>confdefs.h <<\_ACEOF >-#define SHUTUP_SPUTAUX 1 >-_ACEOF >- >- ;; >-esac >- >-case "$hack_shutup_stdargcast" in >- yes) >- # >- # Shut up a -Wcast-qual warning from va_start(). >- # >- cat >>confdefs.h <<\_ACEOF >-#define SHUTUP_STDARG_CAST 1 >-_ACEOF >- >- ;; >-esac >- >-# >-# The following sections deal with tools used for formatting >-# the documentation. They are all optional, unless you are >-# a developer editing the documentation source. >-# >- >-# Directory trees where SGML files are commonly found. >-sgmltrees="/usr/pkg/share/sgml /usr/local/share/sgml" >- >-# >-# Look for openjade. Plain jade is no longer supported. >-# >- >-for ac_prog in openjade >-do >- # Extract the first word of "$ac_prog", so it can be a program name with args. >-set dummy $ac_prog; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_path_OPENJADE+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- case $OPENJADE in >- [\\/]* | ?:[\\/]*) >- ac_cv_path_OPENJADE="$OPENJADE" # Let the user override the test with a path. >- ;; >- *) >- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_path_OPENJADE="$as_dir/$ac_word$ac_exec_ext" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >- ;; >-esac >-fi >-OPENJADE=$ac_cv_path_OPENJADE >- >-if test -n "$OPENJADE"; then >- echo "$as_me:$LINENO: result: $OPENJADE" >&5 >-echo "${ECHO_T}$OPENJADE" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- test -n "$OPENJADE" && break >-done >-test -n "$OPENJADE" || OPENJADE="openjade" >- >- >- >-# >-# Look for TeX. >-# >- >-for ac_prog in jadetex >-do >- # Extract the first word of "$ac_prog", so it can be a program name with args. >-set dummy $ac_prog; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_path_JADETEX+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- case $JADETEX in >- [\\/]* | ?:[\\/]*) >- ac_cv_path_JADETEX="$JADETEX" # Let the user override the test with a path. >- ;; >- *) >- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_path_JADETEX="$as_dir/$ac_word$ac_exec_ext" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >- ;; >-esac >-fi >-JADETEX=$ac_cv_path_JADETEX >- >-if test -n "$JADETEX"; then >- echo "$as_me:$LINENO: result: $JADETEX" >&5 >-echo "${ECHO_T}$JADETEX" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- test -n "$JADETEX" && break >-done >-test -n "$JADETEX" || JADETEX="jadetex" >- >- >- >-for ac_prog in pdfjadetex >-do >- # Extract the first word of "$ac_prog", so it can be a program name with args. >-set dummy $ac_prog; ac_word=$2 >-echo "$as_me:$LINENO: checking for $ac_word" >&5 >-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 >-if test "${ac_cv_path_PDFJADETEX+set}" = set; then >- echo $ECHO_N "(cached) $ECHO_C" >&6 >-else >- case $PDFJADETEX in >- [\\/]* | ?:[\\/]*) >- ac_cv_path_PDFJADETEX="$PDFJADETEX" # Let the user override the test with a path. >- ;; >- *) >- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for ac_exec_ext in '' $ac_executable_extensions; do >- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >- ac_cv_path_PDFJADETEX="$as_dir/$ac_word$ac_exec_ext" >- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 >- break 2 >- fi >-done >-done >- >- ;; >-esac >-fi >-PDFJADETEX=$ac_cv_path_PDFJADETEX >- >-if test -n "$PDFJADETEX"; then >- echo "$as_me:$LINENO: result: $PDFJADETEX" >&5 >-echo "${ECHO_T}$PDFJADETEX" >&6 >-else >- echo "$as_me:$LINENO: result: no" >&5 >-echo "${ECHO_T}no" >&6 >-fi >- >- test -n "$PDFJADETEX" && break >-done >-test -n "$PDFJADETEX" || PDFJADETEX="pdfjadetex" >- >- >- >-# >-# Subroutine for searching for an ordinary file (e.g., a stylesheet) >-# in a number of directories: >-# >-# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES) >-# >-# If the file FILENAME is found in one of the DIRECTORIES, the shell >-# variable VARIABLE is defined to its absolute pathname. Otherwise, >-# it is set to FILENAME, with no directory prefix (that's not terribly >-# useful, but looks less confusing in substitutions than leaving it >-# empty). The variable VARIABLE will be substituted into output files. >-# >- >- >- >- >-SGMLCATALOG="" >-echo "$as_me:$LINENO: checking for catalog" >&5 >-echo $ECHO_N "checking for catalog... $ECHO_C" >&6 >-for d in $sgmltrees >-do >- f=$d/catalog >- if test -f $f >- then >- SGMLCATALOG=$f >- echo "$as_me:$LINENO: result: $f" >&5 >-echo "${ECHO_T}$f" >&6 >- break >- fi >-done >-if test "X$SGMLCATALOG" = "X" >-then >- echo "$as_me:$LINENO: result: \"not found\"" >&5 >-echo "${ECHO_T}\"not found\"" >&6; >- SGMLCATALOG=catalog >-fi >- >- >- >-# >-# Look for the HTML stylesheet html/docbook.dsl, used for >-# formatting man pages in HTML. Its location varies, >-# so far we have seen: >-# >-# NetBSD /usr/pkg/share/docbook/dsssl/modular/ >-# FreeBSD /usr/local/share/docbook/dsssl/modular/ >-# Linux /usr/local/share/dsssl/docbook/ >-# >-# Ditto for the print stylesheet print/docbook.dsl. >-# >- >-stylepath="" >-for d in $sgmltrees >-do >- for s in docbook/dsssl/modular dsssl/docbook >- do >- stylepath="$stylepath $d/$s" >- done >-done >- >-HTMLSTYLE="" >-echo "$as_me:$LINENO: checking for html/docbook.dsl" >&5 >-echo $ECHO_N "checking for html/docbook.dsl... $ECHO_C" >&6 >-for d in $stylepath >-do >- f=$d/html/docbook.dsl >- if test -f $f >- then >- HTMLSTYLE=$f >- echo "$as_me:$LINENO: result: $f" >&5 >-echo "${ECHO_T}$f" >&6 >- break >- fi >-done >-if test "X$HTMLSTYLE" = "X" >-then >- echo "$as_me:$LINENO: result: \"not found\"" >&5 >-echo "${ECHO_T}\"not found\"" >&6; >- HTMLSTYLE=html/docbook.dsl >-fi >- >- >- >-PRINTSTYLE="" >-echo "$as_me:$LINENO: checking for print/docbook.dsl" >&5 >-echo $ECHO_N "checking for print/docbook.dsl... $ECHO_C" >&6 >-for d in $stylepath >-do >- f=$d/print/docbook.dsl >- if test -f $f >- then >- PRINTSTYLE=$f >- echo "$as_me:$LINENO: result: $f" >&5 >-echo "${ECHO_T}$f" >&6 >- break >- fi >-done >-if test "X$PRINTSTYLE" = "X" >-then >- echo "$as_me:$LINENO: result: \"not found\"" >&5 >-echo "${ECHO_T}\"not found\"" >&6; >- PRINTSTYLE=print/docbook.dsl >-fi >- >- >- >-# >-# Look for XML declarations >-# >- >- >-XMLDCL="" >-echo "$as_me:$LINENO: checking for docbook/dsssl/modular/dtds/decls/xml.dcl" >&5 >-echo $ECHO_N "checking for docbook/dsssl/modular/dtds/decls/xml.dcl... $ECHO_C" >&6 >-for d in $sgmltrees >-do >- f=$d/docbook/dsssl/modular/dtds/decls/xml.dcl >- if test -f $f >- then >- XMLDCL=$f >- echo "$as_me:$LINENO: result: $f" >&5 >-echo "${ECHO_T}$f" >&6 >- break >- fi >-done >-if test "X$XMLDCL" = "X" >-then >- echo "$as_me:$LINENO: result: \"not found\"" >&5 >-echo "${ECHO_T}\"not found\"" >&6; >- XMLDCL=docbook/dsssl/modular/dtds/decls/xml.dcl >-fi >- >- >- >-# >-# Look for docbook2man-spec.pl >-# >- >- >-DOCBOOK2MANSPEC="" >-echo "$as_me:$LINENO: checking for docbook2X/docbook2man-spec.pl" >&5 >-echo $ECHO_N "checking for docbook2X/docbook2man-spec.pl... $ECHO_C" >&6 >-for d in $sgmltrees >-do >- f=$d/docbook2X/docbook2man-spec.pl >- if test -f $f >- then >- DOCBOOK2MANSPEC=$f >- echo "$as_me:$LINENO: result: $f" >&5 >-echo "${ECHO_T}$f" >&6 >- break >- fi >-done >-if test "X$DOCBOOK2MANSPEC" = "X" >-then >- echo "$as_me:$LINENO: result: \"not found\"" >&5 >-echo "${ECHO_T}\"not found\"" >&6; >- DOCBOOK2MANSPEC=docbook2X/docbook2man-spec.pl >-fi >- >- >- >-# >-# Substitutions >-# >- >-BIND9_TOP_BUILDDIR=`pwd` >- >- >- >- >- >- >-if test "X$srcdir" != "X"; then >- BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include" >- BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include" >- BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include" >- BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include" >- BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include" >-else >- BIND9_ISC_BUILDINCLUDE="" >- BIND9_ISCCC_BUILDINCLUDE="" >- BIND9_ISCCFG_BUILDINCLUDE="" >- BIND9_DNS_BUILDINCLUDE="" >- BIND9_LWRES_BUILDINCLUDE="" >-fi >- >- >-BIND9_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes >- >- >-BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules >- >-. $srcdir/version >-BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}" >- >- >- >-LIBISC_API=$srcdir/lib/isc/api >- >- >-LIBISCCC_API=$srcdir/lib/isccc/api >- >- >-LIBISCCFG_API=$srcdir/lib/isccfg/api >- >- >-LIBDNS_API=$srcdir/lib/dns/api >- >- >-LIBLWRES_API=$srcdir/lib/lwres/api >- >-ac_config_files="$ac_config_files make/rules make/includes Makefile make/Makefile make/mkdep lib/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/nls/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/sec/Makefile lib/dns/sec/dst/Makefile lib/dns/sec/dst/include/Makefile lib/dns/sec/dst/include/dst/Makefile lib/lwres/Makefile lib/lwres/include/Makefile lib/lwres/include/lwres/Makefile lib/lwres/include/lwres/netdb.h lib/lwres/include/lwres/platform.h lib/lwres/man/Makefile lib/lwres/unix/Makefile lib/lwres/unix/include/Makefile lib/lwres/unix/include/lwres/Makefile lib/lwres/win32/Makefile lib/lwres/win32/include/Makefile lib/lwres/win32/include/lwres/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile bin/Makefile bin/check/Makefile bin/named/Makefile bin/named/unix/Makefile bin/rndc/Makefile bin/rndc/unix/Makefile bin/dig/Makefile bin/nsupdate/Makefile bin/tests/Makefile bin/tests/names/Makefile bin/tests/master/Makefile bin/tests/rbt/Makefile bin/tests/db/Makefile bin/tests/tasks/Makefile bin/tests/timers/Makefile bin/tests/dst/Makefile bin/tests/mem/Makefile bin/tests/net/Makefile bin/tests/sockaddr/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/lwresd/Makefile bin/tests/system/tkey/Makefile bin/tests/headerdep_test.sh bin/dnssec/Makefile doc/Makefile doc/arm/Makefile doc/arm/nominum-docbook-html.dsl doc/arm/nominum-docbook-print.dsl doc/arm/validate.sh doc/misc/Makefile docutil/docbook2man-wrapper.sh isc-config.sh" >-cat >confcache <<\_ACEOF >-# This file is a shell script that caches the results of configure >-# tests run on this system so they can be shared between configure >-# scripts and configure runs, see configure's option --config-cache. >-# It is not useful on other systems. If it contains results you don't >-# want to keep, you may remove or edit it. >-# >-# config.status only pays attention to the cache file if you give it >-# the --recheck option to rerun configure. >-# >-# `ac_cv_env_foo' variables (set or unset) will be overriden when >-# loading this file, other *unset* `ac_cv_foo' will be assigned the >-# following values. >- >-_ACEOF >- >-# The following way of writing the cache mishandles newlines in values, >-# but we know of no workaround that is simple, portable, and efficient. >-# So, don't put newlines in cache variables' values. >-# Ultrix sh set writes to stderr and can't be redirected directly, >-# and sets the high bit in the cache file unless we assign to the vars. >-{ >- (set) 2>&1 | >- case `(ac_space=' '; set | grep ac_space) 2>&1` in >- *ac_space=\ *) >- # `set' does not quote correctly, so add quotes (double-quote >- # substitution turns \\\\ into \\, and sed turns \\ into \). >- sed -n \ >- "s/'/'\\\\''/g; >- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" >- ;; >- *) >- # `set' quotes correctly as required by POSIX, so do not add quotes. >- sed -n \ >- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" >- ;; >- esac; >-} | >- sed ' >- t clear >- : clear >- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ >- t end >- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ >- : end' >>confcache >-if cmp -s $cache_file confcache; then :; else >- if test -w $cache_file; then >- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" >- cat confcache >$cache_file >- else >- echo "not updating unwritable cache $cache_file" >- fi >-fi >-rm -f confcache >- >-test "x$prefix" = xNONE && prefix=$ac_default_prefix >-# Let make expand exec_prefix. >-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' >- >-# VPATH may cause trouble with some makes, so we remove $(srcdir), >-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and >-# trailing colons and then remove the whole line if VPATH becomes empty >-# (actually we leave an empty line to preserve line numbers). >-if test "x$srcdir" = x.; then >- ac_vpsub='/^[ ]*VPATH[ ]*=/{ >-s/:*\$(srcdir):*/:/; >-s/:*\${srcdir}:*/:/; >-s/:*@srcdir@:*/:/; >-s/^\([^=]*=[ ]*\):*/\1/; >-s/:*$//; >-s/^[^=]*=[ ]*$//; >-}' >-fi >- >-DEFS=-DHAVE_CONFIG_H >- >- >-: ${CONFIG_STATUS=./config.status} >-ac_clean_files_save=$ac_clean_files >-ac_clean_files="$ac_clean_files $CONFIG_STATUS" >-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 >-echo "$as_me: creating $CONFIG_STATUS" >&6;} >-cat >$CONFIG_STATUS <<_ACEOF >-#! $SHELL >-# Generated by $as_me. >-# Run this file to recreate the current configuration. >-# Compiler output produced by configure, useful for debugging >-# configure, is in config.log if it exists. >- >-debug=false >-SHELL=\${CONFIG_SHELL-$SHELL} >-_ACEOF >- >-cat >>$CONFIG_STATUS <<\_ACEOF >- >-## --------------------- ## >-## M4sh Initialization. ## >-## --------------------- ## >- >-# Be Bourne compatible >-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then >- emulate sh >- NULLCMD=: >-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then >- set -o posix >-fi >- >-# NLS nuisances. >-# Support unset when possible. >-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then >- as_unset=unset >-else >- as_unset=false >-fi >- >-(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && >- { $as_unset LANG || test "${LANG+set}" != set; } || >- { LANG=C; export LANG; } >-(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && >- { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || >- { LC_ALL=C; export LC_ALL; } >-(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && >- { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || >- { LC_TIME=C; export LC_TIME; } >-(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && >- { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || >- { LC_CTYPE=C; export LC_CTYPE; } >-(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && >- { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || >- { LANGUAGE=C; export LANGUAGE; } >-(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && >- { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || >- { LC_COLLATE=C; export LC_COLLATE; } >-(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && >- { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || >- { LC_NUMERIC=C; export LC_NUMERIC; } >-(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && >- { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || >- { LC_MESSAGES=C; export LC_MESSAGES; } >- >- >-# Name of the executable. >-as_me=`(basename "$0") 2>/dev/null || >-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ >- X"$0" : 'X\(//\)$' \| \ >- X"$0" : 'X\(/\)$' \| \ >- . : '\(.\)' 2>/dev/null || >-echo X/"$0" | >- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } >- /^X\/\(\/\/\)$/{ s//\1/; q; } >- /^X\/\(\/\).*/{ s//\1/; q; } >- s/.*/./; q'` >- >-# PATH needs CR, and LINENO needs CR and PATH. >-# Avoid depending upon Character Ranges. >-as_cr_letters='abcdefghijklmnopqrstuvwxyz' >-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' >-as_cr_Letters=$as_cr_letters$as_cr_LETTERS >-as_cr_digits='0123456789' >-as_cr_alnum=$as_cr_Letters$as_cr_digits >- >-# The user is always right. >-if test "${PATH_SEPARATOR+set}" != set; then >- echo "#! /bin/sh" >conftest.sh >- echo "exit 0" >>conftest.sh >- chmod +x conftest.sh >- if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then >- PATH_SEPARATOR=';' >- else >- PATH_SEPARATOR=: >- fi >- rm -f conftest.sh >-fi >- >- >- as_lineno_1=$LINENO >- as_lineno_2=$LINENO >- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` >- test "x$as_lineno_1" != "x$as_lineno_2" && >- test "x$as_lineno_3" = "x$as_lineno_2" || { >- # Find who we are. Look in the path if we contain no path at all >- # relative or not. >- case $0 in >- *[\\/]* ) as_myself=$0 ;; >- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in $PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break >-done >- >- ;; >- esac >- # We did not find ourselves, most probably we were run as `sh COMMAND' >- # in which case we are not to be found in the path. >- if test "x$as_myself" = x; then >- as_myself=$0 >- fi >- if test ! -f "$as_myself"; then >- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 >-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} >- { (exit 1); exit 1; }; } >- fi >- case $CONFIG_SHELL in >- '') >- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH >-do >- IFS=$as_save_IFS >- test -z "$as_dir" && as_dir=. >- for as_base in sh bash ksh sh5; do >- case $as_dir in >- /*) >- if ("$as_dir/$as_base" -c ' >- as_lineno_1=$LINENO >- as_lineno_2=$LINENO >- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` >- test "x$as_lineno_1" != "x$as_lineno_2" && >- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then >- CONFIG_SHELL=$as_dir/$as_base >- export CONFIG_SHELL >- exec "$CONFIG_SHELL" "$0" ${1+"$@"} >- fi;; >- esac >- done >-done >-;; >- esac >- >- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO >- # uniformly replaced by the line number. The first 'sed' inserts a >- # line-number line before each line; the second 'sed' does the real >- # work. The second script uses 'N' to pair each line-number line >- # with the numbered line, and appends trailing '-' during >- # substitution so that $LINENO is not a special case at line end. >- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the >- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) >- sed '=' <$as_myself | >- sed ' >- N >- s,$,-, >- : loop >- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, >- t loop >- s,-$,, >- s,^['$as_cr_digits']*\n,, >- ' >$as_me.lineno && >- chmod +x $as_me.lineno || >- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 >-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} >- { (exit 1); exit 1; }; } >- >- # Don't try to exec as it changes $[0], causing all sort of problems >- # (the dirname of $[0] is not the place where we might find the >- # original and so on. Autoconf is especially sensible to this). >- . ./$as_me.lineno >- # Exit status is that of the last command. >- exit >-} >- >- >-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in >- *c*,-n*) ECHO_N= ECHO_C=' >-' ECHO_T=' ' ;; >- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; >- *) ECHO_N= ECHO_C='\c' ECHO_T= ;; >-esac >- >-if expr a : '\(a\)' >/dev/null 2>&1; then >- as_expr=expr >-else >- as_expr=false >-fi >- >-rm -f conf$$ conf$$.exe conf$$.file >-echo >conf$$.file >-if ln -s conf$$.file conf$$ 2>/dev/null; then >- # We could just check for DJGPP; but this test a) works b) is more generic >- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). >- if test -f conf$$.exe; then >- # Don't use ln at all; we don't have any links >- as_ln_s='cp -p' >- else >- as_ln_s='ln -s' >- fi >-elif ln conf$$.file conf$$ 2>/dev/null; then >- as_ln_s=ln >-else >- as_ln_s='cp -p' >-fi >-rm -f conf$$ conf$$.exe conf$$.file >- >-as_executable_p="test -f" >- >-# Sed expression to map a string onto a valid CPP name. >-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" >- >-# Sed expression to map a string onto a valid variable name. >-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" >- >- >-# IFS >-# We need space, tab and new line, in precisely that order. >-as_nl=' >-' >-IFS=" $as_nl" >- >-# CDPATH. >-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } >- >-exec 6>&1 >- >-# Open the log real soon, to keep \$[0] and so on meaningful, and to >-# report actual input values of CONFIG_FILES etc. instead of their >-# values after options handling. Logging --version etc. is OK. >-exec 5>>config.log >-{ >- echo >- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX >-## Running $as_me. ## >-_ASBOX >-} >&5 >-cat >&5 <<_CSEOF >- >-This file was extended by $as_me, which was >-generated by GNU Autoconf 2.53. Invocation command line was >- >- CONFIG_FILES = $CONFIG_FILES >- CONFIG_HEADERS = $CONFIG_HEADERS >- CONFIG_LINKS = $CONFIG_LINKS >- CONFIG_COMMANDS = $CONFIG_COMMANDS >- $ $0 $@ >- >-_CSEOF >-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 >-echo >&5 >-_ACEOF >- >-# Files that config.status was made for. >-if test -n "$ac_config_files"; then >- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS >-fi >- >-if test -n "$ac_config_headers"; then >- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS >-fi >- >-if test -n "$ac_config_links"; then >- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS >-fi >- >-if test -n "$ac_config_commands"; then >- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS >-fi >- >-cat >>$CONFIG_STATUS <<\_ACEOF >- >-ac_cs_usage="\ >-\`$as_me' instantiates files from templates according to the >-current configuration. >- >-Usage: $0 [OPTIONS] [FILE]... >- >- -h, --help print this help, then exit >- -V, --version print version number, then exit >- -d, --debug don't remove temporary files >- --recheck update $as_me by reconfiguring in the same conditions >- --file=FILE[:TEMPLATE] >- instantiate the configuration file FILE >- --header=FILE[:TEMPLATE] >- instantiate the configuration header FILE >- >-Configuration files: >-$config_files >- >-Configuration headers: >-$config_headers >- >-Report bugs to <bug-autoconf@gnu.org>." >-_ACEOF >- >-cat >>$CONFIG_STATUS <<_ACEOF >-ac_cs_version="\\ >-config.status >-configured by $0, generated by GNU Autoconf 2.53, >- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" >- >-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 >-Free Software Foundation, Inc. >-This config.status script is free software; the Free Software Foundation >-gives unlimited permission to copy, distribute and modify it." >-srcdir=$srcdir >-INSTALL="$INSTALL" >-_ACEOF >- >-cat >>$CONFIG_STATUS <<\_ACEOF >-# If no file are specified by the user, then we need to provide default >-# value. By we need to know if files were specified by the user. >-ac_need_defaults=: >-while test $# != 0 >-do >- case $1 in >- --*=*) >- ac_option=`expr "x$1" : 'x\([^=]*\)='` >- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` >- shift >- set dummy "$ac_option" "$ac_optarg" ${1+"$@"} >- shift >- ;; >- -*);; >- *) # This is not an option, so the user has probably given explicit >- # arguments. >- ac_need_defaults=false;; >- esac >- >- case $1 in >- # Handling of the options. >-_ACEOF >-cat >>$CONFIG_STATUS <<_ACEOF >- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) >- echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" >- exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; >-_ACEOF >-cat >>$CONFIG_STATUS <<\_ACEOF >- --version | --vers* | -V ) >- echo "$ac_cs_version"; exit 0 ;; >- --he | --h) >- # Conflict between --help and --header >- { { echo "$as_me:$LINENO: error: ambiguous option: $1 >-Try \`$0 --help' for more information." >&5 >-echo "$as_me: error: ambiguous option: $1 >-Try \`$0 --help' for more information." >&2;} >- { (exit 1); exit 1; }; };; >- --help | --hel | -h ) >- echo "$ac_cs_usage"; exit 0 ;; >- --debug | --d* | -d ) >- debug=: ;; >- --file | --fil | --fi | --f ) >- shift >- CONFIG_FILES="$CONFIG_FILES $1" >- ac_need_defaults=false;; >- --header | --heade | --head | --hea ) >- shift >- CONFIG_HEADERS="$CONFIG_HEADERS $1" >- ac_need_defaults=false;; >- >- # This is an error. >- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 >-Try \`$0 --help' for more information." >&5 >-echo "$as_me: error: unrecognized option: $1 >-Try \`$0 --help' for more information." >&2;} >- { (exit 1); exit 1; }; } ;; >- >- *) ac_config_targets="$ac_config_targets $1" ;; >- >- esac >- shift >-done >- >-_ACEOF >- >- >- >- >- >-cat >>$CONFIG_STATUS <<\_ACEOF >-for ac_config_target in $ac_config_targets >-do >- case "$ac_config_target" in >- # Handling of arguments. >- "make/rules" ) CONFIG_FILES="$CONFIG_FILES make/rules" ;; >- "make/includes" ) CONFIG_FILES="$CONFIG_FILES make/includes" ;; >- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; >- "make/Makefile" ) CONFIG_FILES="$CONFIG_FILES make/Makefile" ;; >- "make/mkdep" ) CONFIG_FILES="$CONFIG_FILES make/mkdep" ;; >- "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; >- "lib/isc/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isc/Makefile" ;; >- "lib/isc/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isc/include/Makefile" ;; >- "lib/isc/include/isc/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isc/include/isc/Makefile" ;; >- "lib/isc/include/isc/platform.h" ) CONFIG_FILES="$CONFIG_FILES lib/isc/include/isc/platform.h" ;; >- "lib/isc/unix/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isc/unix/Makefile" ;; >- "lib/isc/unix/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isc/unix/include/Makefile" ;; >- "lib/isc/unix/include/isc/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isc/unix/include/isc/Makefile" ;; >- "lib/isc/nls/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isc/nls/Makefile" ;; >- "lib/isc/$thread_dir/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isc/$thread_dir/Makefile" ;; >- "lib/isc/$thread_dir/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isc/$thread_dir/include/Makefile" ;; >- "lib/isc/$thread_dir/include/isc/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isc/$thread_dir/include/isc/Makefile" ;; >- "lib/isccc/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isccc/Makefile" ;; >- "lib/isccc/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isccc/include/Makefile" ;; >- "lib/isccc/include/isccc/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isccc/include/isccc/Makefile" ;; >- "lib/isccfg/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isccfg/Makefile" ;; >- "lib/isccfg/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isccfg/include/Makefile" ;; >- "lib/isccfg/include/isccfg/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/isccfg/include/isccfg/Makefile" ;; >- "lib/dns/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/dns/Makefile" ;; >- "lib/dns/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/dns/include/Makefile" ;; >- "lib/dns/include/dns/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/dns/include/dns/Makefile" ;; >- "lib/dns/sec/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/dns/sec/Makefile" ;; >- "lib/dns/sec/dst/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/dns/sec/dst/Makefile" ;; >- "lib/dns/sec/dst/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/dns/sec/dst/include/Makefile" ;; >- "lib/dns/sec/dst/include/dst/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/dns/sec/dst/include/dst/Makefile" ;; >- "lib/lwres/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/Makefile" ;; >- "lib/lwres/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/include/Makefile" ;; >- "lib/lwres/include/lwres/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/include/lwres/Makefile" ;; >- "lib/lwres/include/lwres/netdb.h" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/include/lwres/netdb.h" ;; >- "lib/lwres/include/lwres/platform.h" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/include/lwres/platform.h" ;; >- "lib/lwres/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/man/Makefile" ;; >- "lib/lwres/unix/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/unix/Makefile" ;; >- "lib/lwres/unix/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/unix/include/Makefile" ;; >- "lib/lwres/unix/include/lwres/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/unix/include/lwres/Makefile" ;; >- "lib/lwres/win32/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/win32/Makefile" ;; >- "lib/lwres/win32/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/win32/include/Makefile" ;; >- "lib/lwres/win32/include/lwres/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lwres/win32/include/lwres/Makefile" ;; >- "lib/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/tests/Makefile" ;; >- "lib/tests/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/tests/include/Makefile" ;; >- "lib/tests/include/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/tests/include/tests/Makefile" ;; >- "bin/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; >- "bin/check/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/check/Makefile" ;; >- "bin/named/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/named/Makefile" ;; >- "bin/named/unix/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/named/unix/Makefile" ;; >- "bin/rndc/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/rndc/Makefile" ;; >- "bin/rndc/unix/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/rndc/unix/Makefile" ;; >- "bin/dig/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/dig/Makefile" ;; >- "bin/nsupdate/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/nsupdate/Makefile" ;; >- "bin/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/Makefile" ;; >- "bin/tests/names/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/names/Makefile" ;; >- "bin/tests/master/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/master/Makefile" ;; >- "bin/tests/rbt/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/rbt/Makefile" ;; >- "bin/tests/db/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/db/Makefile" ;; >- "bin/tests/tasks/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/tasks/Makefile" ;; >- "bin/tests/timers/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/timers/Makefile" ;; >- "bin/tests/dst/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Makefile" ;; >- "bin/tests/mem/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/mem/Makefile" ;; >- "bin/tests/net/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/net/Makefile" ;; >- "bin/tests/sockaddr/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/sockaddr/Makefile" ;; >- "bin/tests/system/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/system/Makefile" ;; >- "bin/tests/system/conf.sh" ) CONFIG_FILES="$CONFIG_FILES bin/tests/system/conf.sh" ;; >- "bin/tests/system/lwresd/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/system/lwresd/Makefile" ;; >- "bin/tests/system/tkey/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/tests/system/tkey/Makefile" ;; >- "bin/tests/headerdep_test.sh" ) CONFIG_FILES="$CONFIG_FILES bin/tests/headerdep_test.sh" ;; >- "bin/dnssec/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/dnssec/Makefile" ;; >- "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; >- "doc/arm/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/arm/Makefile" ;; >- "doc/arm/nominum-docbook-html.dsl" ) CONFIG_FILES="$CONFIG_FILES doc/arm/nominum-docbook-html.dsl" ;; >- "doc/arm/nominum-docbook-print.dsl" ) CONFIG_FILES="$CONFIG_FILES doc/arm/nominum-docbook-print.dsl" ;; >- "doc/arm/validate.sh" ) CONFIG_FILES="$CONFIG_FILES doc/arm/validate.sh" ;; >- "doc/misc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; >- "docutil/docbook2man-wrapper.sh" ) CONFIG_FILES="$CONFIG_FILES docutil/docbook2man-wrapper.sh" ;; >- "isc-config.sh" ) CONFIG_FILES="$CONFIG_FILES isc-config.sh" ;; >- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; >- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 >-echo "$as_me: error: invalid argument: $ac_config_target" >&2;} >- { (exit 1); exit 1; }; };; >- esac >-done >- >-# If the user did not use the arguments to specify the items to instantiate, >-# then the envvar interface is used. Set only those that are not. >-# We use the long form for the default assignment because of an extremely >-# bizarre bug on SunOS 4.1.3. >-if $ac_need_defaults; then >- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files >- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers >-fi >- >-# Create a temporary directory, and hook for its removal unless debugging. >-$debug || >-{ >- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 >- trap '{ (exit 1); exit 1; }' 1 2 13 15 >-} >- >-# Create a (secure) tmp directory for tmp files. >-: ${TMPDIR=/tmp} >-{ >- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && >- test -n "$tmp" && test -d "$tmp" >-} || >-{ >- tmp=$TMPDIR/cs$$-$RANDOM >- (umask 077 && mkdir $tmp) >-} || >-{ >- echo "$me: cannot create a temporary directory in $TMPDIR" >&2 >- { (exit 1); exit 1; } >-} >- >-_ACEOF >- >-cat >>$CONFIG_STATUS <<_ACEOF >- >-# >-# CONFIG_FILES section. >-# >- >-# No need to generate the scripts if there are no CONFIG_FILES. >-# This happens for instance when ./config.status config.h >-if test -n "\$CONFIG_FILES"; then >- # Protect against being on the right side of a sed subst in config.status. >- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; >- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF >-s,@SHELL@,$SHELL,;t t >-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t >-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t >-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t >-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t >-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t >-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t >-s,@exec_prefix@,$exec_prefix,;t t >-s,@prefix@,$prefix,;t t >-s,@program_transform_name@,$program_transform_name,;t t >-s,@bindir@,$bindir,;t t >-s,@sbindir@,$sbindir,;t t >-s,@libexecdir@,$libexecdir,;t t >-s,@datadir@,$datadir,;t t >-s,@sysconfdir@,$sysconfdir,;t t >-s,@sharedstatedir@,$sharedstatedir,;t t >-s,@localstatedir@,$localstatedir,;t t >-s,@libdir@,$libdir,;t t >-s,@includedir@,$includedir,;t t >-s,@oldincludedir@,$oldincludedir,;t t >-s,@infodir@,$infodir,;t t >-s,@mandir@,$mandir,;t t >-s,@build_alias@,$build_alias,;t t >-s,@host_alias@,$host_alias,;t t >-s,@target_alias@,$target_alias,;t t >-s,@DEFS@,$DEFS,;t t >-s,@ECHO_C@,$ECHO_C,;t t >-s,@ECHO_N@,$ECHO_N,;t t >-s,@ECHO_T@,$ECHO_T,;t t >-s,@LIBS@,$LIBS,;t t >-s,@subdirs@,$subdirs,;t t >-s,@build@,$build,;t t >-s,@build_cpu@,$build_cpu,;t t >-s,@build_vendor@,$build_vendor,;t t >-s,@build_os@,$build_os,;t t >-s,@host@,$host,;t t >-s,@host_cpu@,$host_cpu,;t t >-s,@host_vendor@,$host_vendor,;t t >-s,@host_os@,$host_os,;t t >-s,@SET_MAKE@,$SET_MAKE,;t t >-s,@RANLIB@,$RANLIB,;t t >-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t >-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t >-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t >-s,@INSTALL_DATA@,$INSTALL_DATA,;t t >-s,@STD_CINCLUDES@,$STD_CINCLUDES,;t t >-s,@STD_CDEFINES@,$STD_CDEFINES,;t t >-s,@STD_CWARNINGS@,$STD_CWARNINGS,;t t >-s,@CCOPT@,$CCOPT,;t t >-s,@AR@,$AR,;t t >-s,@ARFLAGS@,$ARFLAGS,;t t >-s,@LN@,$LN,;t t >-s,@ETAGS@,$ETAGS,;t t >-s,@PERL@,$PERL,;t t >-s,@CC@,$CC,;t t >-s,@CFLAGS@,$CFLAGS,;t t >-s,@LDFLAGS@,$LDFLAGS,;t t >-s,@CPPFLAGS@,$CPPFLAGS,;t t >-s,@ac_ct_CC@,$ac_ct_CC,;t t >-s,@EXEEXT@,$EXEEXT,;t t >-s,@OBJEXT@,$OBJEXT,;t t >-s,@CPP@,$CPP,;t t >-s,@ISC_PLATFORM_HAVELONGLONG@,$ISC_PLATFORM_HAVELONGLONG,;t t >-s,@ISC_PLATFORM_NEEDSYSSELECTH@,$ISC_PLATFORM_NEEDSYSSELECTH,;t t >-s,@LWRES_PLATFORM_NEEDSYSSELECTH@,$LWRES_PLATFORM_NEEDSYSSELECTH,;t t >-s,@DST_OPENSSL_INC@,$DST_OPENSSL_INC,;t t >-s,@DNS_OPENSSL_LIBS@,$DNS_OPENSSL_LIBS,;t t >-s,@USE_OPENSSL@,$USE_OPENSSL,;t t >-s,@USE_GSSAPI@,$USE_GSSAPI,;t t >-s,@DST_GSSAPI_INC@,$DST_GSSAPI_INC,;t t >-s,@DNS_GSSAPI_LIBS@,$DNS_GSSAPI_LIBS,;t t >-s,@ALWAYS_DEFINES@,$ALWAYS_DEFINES,;t t >-s,@ISC_PLATFORM_USETHREADS@,$ISC_PLATFORM_USETHREADS,;t t >-s,@ISC_THREAD_DIR@,$ISC_THREAD_DIR,;t t >-s,@MKDEPCC@,$MKDEPCC,;t t >-s,@MKDEPCFLAGS@,$MKDEPCFLAGS,;t t >-s,@MKDEPPROG@,$MKDEPPROG,;t t >-s,@IRIX_DNSSEC_WARNINGS_HACK@,$IRIX_DNSSEC_WARNINGS_HACK,;t t >-s,@purify_path@,$purify_path,;t t >-s,@PURIFY@,$PURIFY,;t t >-s,@LN_S@,$LN_S,;t t >-s,@ECHO@,$ECHO,;t t >-s,@STRIP@,$STRIP,;t t >-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t >-s,@LIBTOOL@,$LIBTOOL,;t t >-s,@O@,$O,;t t >-s,@A@,$A,;t t >-s,@SA@,$SA,;t t >-s,@LIBTOOL_MKDEP_SED@,$LIBTOOL_MKDEP_SED,;t t >-s,@LIBBIND@,$LIBBIND,;t t >-s,@ISC_PLATFORM_HAVEIPV6@,$ISC_PLATFORM_HAVEIPV6,;t t >-s,@LWRES_PLATFORM_HAVEIPV6@,$LWRES_PLATFORM_HAVEIPV6,;t t >-s,@ISC_PLATFORM_NEEDNETINETIN6H@,$ISC_PLATFORM_NEEDNETINETIN6H,;t t >-s,@LWRES_PLATFORM_NEEDNETINETIN6H@,$LWRES_PLATFORM_NEEDNETINETIN6H,;t t >-s,@ISC_PLATFORM_NEEDNETINET6IN6H@,$ISC_PLATFORM_NEEDNETINET6IN6H,;t t >-s,@LWRES_PLATFORM_NEEDNETINET6IN6H@,$LWRES_PLATFORM_NEEDNETINET6IN6H,;t t >-s,@ISC_PLATFORM_HAVEINADDR6@,$ISC_PLATFORM_HAVEINADDR6,;t t >-s,@LWRES_PLATFORM_HAVEINADDR6@,$LWRES_PLATFORM_HAVEINADDR6,;t t >-s,@ISC_PLATFORM_NEEDIN6ADDRANY@,$ISC_PLATFORM_NEEDIN6ADDRANY,;t t >-s,@LWRES_PLATFORM_NEEDIN6ADDRANY@,$LWRES_PLATFORM_NEEDIN6ADDRANY,;t t >-s,@ISC_PLATFORM_NEEDIN6ADDRLOOPBACK@,$ISC_PLATFORM_NEEDIN6ADDRLOOPBACK,;t t >-s,@LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK@,$LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK,;t t >-s,@ISC_PLATFORM_HAVEIN6PKTINFO@,$ISC_PLATFORM_HAVEIN6PKTINFO,;t t >-s,@ISC_PLATFORM_FIXIN6ISADDR@,$ISC_PLATFORM_FIXIN6ISADDR,;t t >-s,@ISC_IPV6_H@,$ISC_IPV6_H,;t t >-s,@ISC_IPV6_O@,$ISC_IPV6_O,;t t >-s,@ISC_ISCIPV6_O@,$ISC_ISCIPV6_O,;t t >-s,@ISC_IPV6_C@,$ISC_IPV6_C,;t t >-s,@LWRES_HAVE_SIN6_SCOPE_ID@,$LWRES_HAVE_SIN6_SCOPE_ID,;t t >-s,@ISC_PLATFORM_NEEDNTOP@,$ISC_PLATFORM_NEEDNTOP,;t t >-s,@ISC_PLATFORM_NEEDPTON@,$ISC_PLATFORM_NEEDPTON,;t t >-s,@ISC_PLATFORM_NEEDATON@,$ISC_PLATFORM_NEEDATON,;t t >-s,@ISC_PLATFORM_HAVESALEN@,$ISC_PLATFORM_HAVESALEN,;t t >-s,@LWRES_PLATFORM_HAVESALEN@,$LWRES_PLATFORM_HAVESALEN,;t t >-s,@ISC_PLATFORM_MSGHDRFLAVOR@,$ISC_PLATFORM_MSGHDRFLAVOR,;t t >-s,@ISC_PLATFORM_NEEDPORTT@,$ISC_PLATFORM_NEEDPORTT,;t t >-s,@ISC_LWRES_NEEDADDRINFO@,$ISC_LWRES_NEEDADDRINFO,;t t >-s,@ISC_LWRES_NEEDRRSETINFO@,$ISC_LWRES_NEEDRRSETINFO,;t t >-s,@ISC_LWRES_SETHOSTENTINT@,$ISC_LWRES_SETHOSTENTINT,;t t >-s,@ISC_LWRES_ENDHOSTENTINT@,$ISC_LWRES_ENDHOSTENTINT,;t t >-s,@ISC_LWRES_GETNETBYADDRINADDR@,$ISC_LWRES_GETNETBYADDRINADDR,;t t >-s,@ISC_LWRES_SETNETENTINT@,$ISC_LWRES_SETNETENTINT,;t t >-s,@ISC_LWRES_ENDNETENTINT@,$ISC_LWRES_ENDNETENTINT,;t t >-s,@ISC_LWRES_GETHOSTBYADDRVOID@,$ISC_LWRES_GETHOSTBYADDRVOID,;t t >-s,@ISC_LWRES_NEEDHERRNO@,$ISC_LWRES_NEEDHERRNO,;t t >-s,@ISC_LWRES_GETIPNODEPROTO@,$ISC_LWRES_GETIPNODEPROTO,;t t >-s,@ISC_LWRES_GETADDRINFOPROTO@,$ISC_LWRES_GETADDRINFOPROTO,;t t >-s,@ISC_LWRES_GETNAMEINFOPROTO@,$ISC_LWRES_GETNAMEINFOPROTO,;t t >-s,@ISC_PLATFORM_NEEDSTRSEP@,$ISC_PLATFORM_NEEDSTRSEP,;t t >-s,@ISC_PLATFORM_NEEDVSNPRINTF@,$ISC_PLATFORM_NEEDVSNPRINTF,;t t >-s,@ISC_EXTRA_OBJS@,$ISC_EXTRA_OBJS,;t t >-s,@ISC_EXTRA_SRCS@,$ISC_EXTRA_SRCS,;t t >-s,@ISC_PLATFORM_QUADFORMAT@,$ISC_PLATFORM_QUADFORMAT,;t t >-s,@ISC_PLATFORM_RLIMITTYPE@,$ISC_PLATFORM_RLIMITTYPE,;t t >-s,@ISC_PLATFORM_USEDECLSPEC@,$ISC_PLATFORM_USEDECLSPEC,;t t >-s,@LWRES_PLATFORM_USEDECLSPEC@,$LWRES_PLATFORM_USEDECLSPEC,;t t >-s,@ISC_PLATFORM_BRACEPTHREADONCEINIT@,$ISC_PLATFORM_BRACEPTHREADONCEINIT,;t t >-s,@OPENJADE@,$OPENJADE,;t t >-s,@JADETEX@,$JADETEX,;t t >-s,@PDFJADETEX@,$PDFJADETEX,;t t >-s,@SGMLCATALOG@,$SGMLCATALOG,;t t >-s,@HTMLSTYLE@,$HTMLSTYLE,;t t >-s,@PRINTSTYLE@,$PRINTSTYLE,;t t >-s,@XMLDCL@,$XMLDCL,;t t >-s,@DOCBOOK2MANSPEC@,$DOCBOOK2MANSPEC,;t t >-s,@BIND9_TOP_BUILDDIR@,$BIND9_TOP_BUILDDIR,;t t >-s,@BIND9_ISC_BUILDINCLUDE@,$BIND9_ISC_BUILDINCLUDE,;t t >-s,@BIND9_ISCCC_BUILDINCLUDE@,$BIND9_ISCCC_BUILDINCLUDE,;t t >-s,@BIND9_ISCCFG_BUILDINCLUDE@,$BIND9_ISCCFG_BUILDINCLUDE,;t t >-s,@BIND9_DNS_BUILDINCLUDE@,$BIND9_DNS_BUILDINCLUDE,;t t >-s,@BIND9_LWRES_BUILDINCLUDE@,$BIND9_LWRES_BUILDINCLUDE,;t t >-/@BIND9_INCLUDES@/r $BIND9_INCLUDES >-s,@BIND9_INCLUDES@,,;t t >-/@BIND9_MAKE_RULES@/r $BIND9_MAKE_RULES >-s,@BIND9_MAKE_RULES@,,;t t >-s,@BIND9_VERSION@,$BIND9_VERSION,;t t >-/@LIBISC_API@/r $LIBISC_API >-s,@LIBISC_API@,,;t t >-/@LIBISCCC_API@/r $LIBISCCC_API >-s,@LIBISCCC_API@,,;t t >-/@LIBISCCFG_API@/r $LIBISCCFG_API >-s,@LIBISCCFG_API@,,;t t >-/@LIBDNS_API@/r $LIBDNS_API >-s,@LIBDNS_API@,,;t t >-/@LIBLWRES_API@/r $LIBLWRES_API >-s,@LIBLWRES_API@,,;t t >-CEOF >- >-_ACEOF >- >- cat >>$CONFIG_STATUS <<\_ACEOF >- # Split the substitutions into bite-sized pieces for seds with >- # small command number limits, like on Digital OSF/1 and HP-UX. >- ac_max_sed_lines=48 >- ac_sed_frag=1 # Number of current file. >- ac_beg=1 # First line for current file. >- ac_end=$ac_max_sed_lines # Line after last line for current file. >- ac_more_lines=: >- ac_sed_cmds= >- while $ac_more_lines; do >- if test $ac_beg -gt 1; then >- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag >- else >- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag >- fi >- if test ! -s $tmp/subs.frag; then >- ac_more_lines=false >- else >- # The purpose of the label and of the branching condition is to >- # speed up the sed processing (if there are no `@' at all, there >- # is no need to browse any of the substitutions). >- # These are the two extra sed commands mentioned above. >- (echo ':t >- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed >- if test -z "$ac_sed_cmds"; then >- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" >- else >- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" >- fi >- ac_sed_frag=`expr $ac_sed_frag + 1` >- ac_beg=$ac_end >- ac_end=`expr $ac_end + $ac_max_sed_lines` >- fi >- done >- if test -z "$ac_sed_cmds"; then >- ac_sed_cmds=cat >- fi >-fi # test -n "$CONFIG_FILES" >- >-_ACEOF >-cat >>$CONFIG_STATUS <<\_ACEOF >-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue >- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". >- case $ac_file in >- - | *:- | *:-:* ) # input from stdin >- cat >$tmp/stdin >- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` >- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; >- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` >- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; >- * ) ac_file_in=$ac_file.in ;; >- esac >- >- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. >- ac_dir=`(dirname "$ac_file") 2>/dev/null || >-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ >- X"$ac_file" : 'X\(//\)[^/]' \| \ >- X"$ac_file" : 'X\(//\)$' \| \ >- X"$ac_file" : 'X\(/\)' \| \ >- . : '\(.\)' 2>/dev/null || >-echo X"$ac_file" | >- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } >- /^X\(\/\/\)[^/].*/{ s//\1/; q; } >- /^X\(\/\/\)$/{ s//\1/; q; } >- /^X\(\/\).*/{ s//\1/; q; } >- s/.*/./; q'` >- { case "$ac_dir" in >- [\\/]* | ?:[\\/]* ) as_incr_dir=;; >- *) as_incr_dir=.;; >-esac >-as_dummy="$ac_dir" >-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do >- case $as_mkdir_dir in >- # Skip DOS drivespec >- ?:) as_incr_dir=$as_mkdir_dir ;; >- *) >- as_incr_dir=$as_incr_dir/$as_mkdir_dir >- test -d "$as_incr_dir" || >- mkdir "$as_incr_dir" || >- { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 >-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} >- { (exit 1); exit 1; }; } >- ;; >- esac >-done; } >- >- ac_builddir=. >- >-if test "$ac_dir" != .; then >- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` >- # A "../" for each directory in $ac_dir_suffix. >- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` >-else >- ac_dir_suffix= ac_top_builddir= >-fi >- >-case $srcdir in >- .) # No --srcdir option. We are building in place. >- ac_srcdir=. >- if test -z "$ac_top_builddir"; then >- ac_top_srcdir=. >- else >- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` >- fi ;; >- [\\/]* | ?:[\\/]* ) # Absolute path. >- ac_srcdir=$srcdir$ac_dir_suffix; >- ac_top_srcdir=$srcdir ;; >- *) # Relative path. >- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix >- ac_top_srcdir=$ac_top_builddir$srcdir ;; >-esac >-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be >-# absolute. >-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` >-ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` >-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` >-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` >- >- >- case $INSTALL in >- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; >- *) ac_INSTALL=$ac_top_builddir$INSTALL ;; >- esac >- >- if test x"$ac_file" != x-; then >- { echo "$as_me:$LINENO: creating $ac_file" >&5 >-echo "$as_me: creating $ac_file" >&6;} >- rm -f "$ac_file" >- fi >- # Let's still pretend it is `configure' which instantiates (i.e., don't >- # use $as_me), people would be surprised to read: >- # /* config.h. Generated by config.status. */ >- if test x"$ac_file" = x-; then >- configure_input= >- else >- configure_input="$ac_file. " >- fi >- configure_input=$configure_input"Generated from `echo $ac_file_in | >- sed 's,.*/,,'` by configure." >- >- # First look for the input files in the build tree, otherwise in the >- # src tree. >- ac_file_inputs=`IFS=: >- for f in $ac_file_in; do >- case $f in >- -) echo $tmp/stdin ;; >- [\\/$]*) >- # Absolute (can't be DOS-style, as IFS=:) >- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 >-echo "$as_me: error: cannot find input file: $f" >&2;} >- { (exit 1); exit 1; }; } >- echo $f;; >- *) # Relative >- if test -f "$f"; then >- # Build tree >- echo $f >- elif test -f "$srcdir/$f"; then >- # Source tree >- echo $srcdir/$f >- else >- # /dev/null tree >- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 >-echo "$as_me: error: cannot find input file: $f" >&2;} >- { (exit 1); exit 1; }; } >- fi;; >- esac >- done` || { (exit 1); exit 1; } >-_ACEOF >-cat >>$CONFIG_STATUS <<_ACEOF >- sed "$ac_vpsub >-$extrasub >-_ACEOF >-cat >>$CONFIG_STATUS <<\_ACEOF >-:t >-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b >-s,@configure_input@,$configure_input,;t t >-s,@srcdir@,$ac_srcdir,;t t >-s,@abs_srcdir@,$ac_abs_srcdir,;t t >-s,@top_srcdir@,$ac_top_srcdir,;t t >-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t >-s,@builddir@,$ac_builddir,;t t >-s,@abs_builddir@,$ac_abs_builddir,;t t >-s,@top_builddir@,$ac_top_builddir,;t t >-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t >-s,@INSTALL@,$ac_INSTALL,;t t >-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out >- rm -f $tmp/stdin >- if test x"$ac_file" != x-; then >- mv $tmp/out $ac_file >- else >- cat $tmp/out >- rm -f $tmp/out >- fi >- >-done >-_ACEOF >-cat >>$CONFIG_STATUS <<\_ACEOF >- >-# >-# CONFIG_HEADER section. >-# >- >-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where >-# NAME is the cpp macro being defined and VALUE is the value it is being given. >-# >-# ac_d sets the value in "#define NAME VALUE" lines. >-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' >-ac_dB='[ ].*$,\1#\2' >-ac_dC=' ' >-ac_dD=',;t' >-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". >-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' >-ac_uB='$,\1#\2define\3' >-ac_uC=' ' >-ac_uD=',;t' >- >-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue >- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". >- case $ac_file in >- - | *:- | *:-:* ) # input from stdin >- cat >$tmp/stdin >- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` >- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; >- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` >- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; >- * ) ac_file_in=$ac_file.in ;; >- esac >- >- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 >-echo "$as_me: creating $ac_file" >&6;} >- >- # First look for the input files in the build tree, otherwise in the >- # src tree. >- ac_file_inputs=`IFS=: >- for f in $ac_file_in; do >- case $f in >- -) echo $tmp/stdin ;; >- [\\/$]*) >- # Absolute (can't be DOS-style, as IFS=:) >- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 >-echo "$as_me: error: cannot find input file: $f" >&2;} >- { (exit 1); exit 1; }; } >- echo $f;; >- *) # Relative >- if test -f "$f"; then >- # Build tree >- echo $f >- elif test -f "$srcdir/$f"; then >- # Source tree >- echo $srcdir/$f >- else >- # /dev/null tree >- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 >-echo "$as_me: error: cannot find input file: $f" >&2;} >- { (exit 1); exit 1; }; } >- fi;; >- esac >- done` || { (exit 1); exit 1; } >- # Remove the trailing spaces. >- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in >- >-_ACEOF >- >-# Transform confdefs.h into two sed scripts, `conftest.defines' and >-# `conftest.undefs', that substitutes the proper values into >-# config.h.in to produce config.h. The first handles `#define' >-# templates, and the second `#undef' templates. >-# And first: Protect against being on the right side of a sed subst in >-# config.status. Protect against being in an unquoted here document >-# in config.status. >-rm -f conftest.defines conftest.undefs >-# Using a here document instead of a string reduces the quoting nightmare. >-# Putting comments in sed scripts is not portable. >-# >-# `end' is used to avoid that the second main sed command (meant for >-# 0-ary CPP macros) applies to n-ary macro definitions. >-# See the Autoconf documentation for `clear'. >-cat >confdef2sed.sed <<\_ACEOF >-s/[\\&,]/\\&/g >-s,[\\$`],\\&,g >-t clear >-: clear >-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp >-t end >-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp >-: end >-_ACEOF >-# If some macros were called several times there might be several times >-# the same #defines, which is useless. Nevertheless, we may not want to >-# sort them, since we want the *last* AC-DEFINE to be honored. >-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines >-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs >-rm -f confdef2sed.sed >- >-# This sed command replaces #undef with comments. This is necessary, for >-# example, in the case of _POSIX_SOURCE, which is predefined and required >-# on some systems where configure will not decide to define it. >-cat >>conftest.undefs <<\_ACEOF >-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, >-_ACEOF >- >-# Break up conftest.defines because some shells have a limit on the size >-# of here documents, and old seds have small limits too (100 cmds). >-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS >-echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS >-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS >-echo ' :' >>$CONFIG_STATUS >-rm -f conftest.tail >-while grep . conftest.defines >/dev/null >-do >- # Write a limited-size here document to $tmp/defines.sed. >- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS >- # Speed up: don't consider the non `#define' lines. >- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS >- # Work around the forget-to-reset-the-flag bug. >- echo 't clr' >>$CONFIG_STATUS >- echo ': clr' >>$CONFIG_STATUS >- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS >- echo 'CEOF >- sed -f $tmp/defines.sed $tmp/in >$tmp/out >- rm -f $tmp/in >- mv $tmp/out $tmp/in >-' >>$CONFIG_STATUS >- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail >- rm -f conftest.defines >- mv conftest.tail conftest.defines >-done >-rm -f conftest.defines >-echo ' fi # egrep' >>$CONFIG_STATUS >-echo >>$CONFIG_STATUS >- >-# Break up conftest.undefs because some shells have a limit on the size >-# of here documents, and old seds have small limits too (100 cmds). >-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS >-rm -f conftest.tail >-while grep . conftest.undefs >/dev/null >-do >- # Write a limited-size here document to $tmp/undefs.sed. >- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS >- # Speed up: don't consider the non `#undef' >- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS >- # Work around the forget-to-reset-the-flag bug. >- echo 't clr' >>$CONFIG_STATUS >- echo ': clr' >>$CONFIG_STATUS >- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS >- echo 'CEOF >- sed -f $tmp/undefs.sed $tmp/in >$tmp/out >- rm -f $tmp/in >- mv $tmp/out $tmp/in >-' >>$CONFIG_STATUS >- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail >- rm -f conftest.undefs >- mv conftest.tail conftest.undefs >-done >-rm -f conftest.undefs >- >-cat >>$CONFIG_STATUS <<\_ACEOF >- # Let's still pretend it is `configure' which instantiates (i.e., don't >- # use $as_me), people would be surprised to read: >- # /* config.h. Generated by config.status. */ >- if test x"$ac_file" = x-; then >- echo "/* Generated by configure. */" >$tmp/config.h >- else >- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h >- fi >- cat $tmp/in >>$tmp/config.h >- rm -f $tmp/in >- if test x"$ac_file" != x-; then >- if cmp -s $ac_file $tmp/config.h 2>/dev/null; then >- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 >-echo "$as_me: $ac_file is unchanged" >&6;} >- else >- ac_dir=`(dirname "$ac_file") 2>/dev/null || >-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ >- X"$ac_file" : 'X\(//\)[^/]' \| \ >- X"$ac_file" : 'X\(//\)$' \| \ >- X"$ac_file" : 'X\(/\)' \| \ >- . : '\(.\)' 2>/dev/null || >-echo X"$ac_file" | >- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } >- /^X\(\/\/\)[^/].*/{ s//\1/; q; } >- /^X\(\/\/\)$/{ s//\1/; q; } >- /^X\(\/\).*/{ s//\1/; q; } >- s/.*/./; q'` >- { case "$ac_dir" in >- [\\/]* | ?:[\\/]* ) as_incr_dir=;; >- *) as_incr_dir=.;; >-esac >-as_dummy="$ac_dir" >-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do >- case $as_mkdir_dir in >- # Skip DOS drivespec >- ?:) as_incr_dir=$as_mkdir_dir ;; >- *) >- as_incr_dir=$as_incr_dir/$as_mkdir_dir >- test -d "$as_incr_dir" || >- mkdir "$as_incr_dir" || >- { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 >-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} >- { (exit 1); exit 1; }; } >- ;; >- esac >-done; } >- >- rm -f $ac_file >- mv $tmp/config.h $ac_file >- fi >- else >- cat $tmp/config.h >- rm -f $tmp/config.h >- fi >-done >-_ACEOF >- >-cat >>$CONFIG_STATUS <<\_ACEOF >- >-{ (exit 0); exit 0; } >-_ACEOF >-chmod +x $CONFIG_STATUS >-ac_clean_files=$ac_clean_files_save >- >- >-# configure is writing to config.log, and then calls config.status. >-# config.status does its own redirection, appending to config.log. >-# Unfortunately, on DOS this fails, as config.log is still kept open >-# by configure, so config.status won't be able to write to it; its >-# output is simply discarded. So we exec the FD to /dev/null, >-# effectively closing config.log, so it can be properly (re)opened and >-# appended to by config.status. When coming back to configure, we >-# need to make the FD available again. >-if test "$no_create" != yes; then >- ac_cs_success=: >- exec 5>/dev/null >- $SHELL $CONFIG_STATUS || ac_cs_success=false >- exec 5>>config.log >- # Use ||, not &&, to avoid exiting from the if with $? = 1, which >- # would make configure fail if this is the last instruction. >- $ac_cs_success || { (exit 1); exit 1; } >-fi >- >-# >-# CONFIG_SUBDIRS section. >-# >-if test "$no_recursion" != yes; then >- >- # Remove --cache-file and --srcdir arguments so they do not pile up. >- ac_sub_configure_args= >- ac_prev= >- for ac_arg in $ac_configure_args; do >- if test -n "$ac_prev"; then >- ac_prev= >- continue >- fi >- case $ac_arg in >- -cache-file | --cache-file | --cache-fil | --cache-fi \ >- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) >- ac_prev=cache_file ;; >- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ >- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ >- | --c=*) >- ;; >- --config-cache | -C) >- ;; >- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) >- ac_prev=srcdir ;; >- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) >- ;; >- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) >- ac_prev=prefix ;; >- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) >- ;; >- *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; >- esac >- done >- >- # Always prepend --prefix to ensure using the same prefix >- # in subdir configurations. >- ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" >- >- ac_popdir=`pwd` >- for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue >- >- # Do not complain, so a configure script can configure whichever >- # parts of a large source tree are present. >- test -d $srcdir/$ac_dir || continue >- >- { echo "$as_me:$LINENO: configuring in $ac_dir" >&5 >-echo "$as_me: configuring in $ac_dir" >&6;} >- { case "$ac_dir" in >- [\\/]* | ?:[\\/]* ) as_incr_dir=;; >- *) as_incr_dir=.;; >-esac >-as_dummy="$ac_dir" >-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do >- case $as_mkdir_dir in >- # Skip DOS drivespec >- ?:) as_incr_dir=$as_mkdir_dir ;; >- *) >- as_incr_dir=$as_incr_dir/$as_mkdir_dir >- test -d "$as_incr_dir" || >- mkdir "$as_incr_dir" || >- { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 >-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} >- { (exit 1); exit 1; }; } >- ;; >- esac >-done; } >- >- ac_builddir=. >- >-if test "$ac_dir" != .; then >- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` >- # A "../" for each directory in $ac_dir_suffix. >- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` >-else >- ac_dir_suffix= ac_top_builddir= >-fi >- >-case $srcdir in >- .) # No --srcdir option. We are building in place. >- ac_srcdir=. >- if test -z "$ac_top_builddir"; then >- ac_top_srcdir=. >- else >- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` >- fi ;; >- [\\/]* | ?:[\\/]* ) # Absolute path. >- ac_srcdir=$srcdir$ac_dir_suffix; >- ac_top_srcdir=$srcdir ;; >- *) # Relative path. >- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix >- ac_top_srcdir=$ac_top_builddir$srcdir ;; >-esac >-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be >-# absolute. >-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` >-ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` >-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` >-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` >- >- >- cd $ac_dir >- >- # Check for guested configure; otherwise get Cygnus style configure. >- if test -f $ac_srcdir/configure.gnu; then >- ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'" >- elif test -f $ac_srcdir/configure; then >- ac_sub_configure="$SHELL '$ac_srcdir/configure'" >- elif test -f $ac_srcdir/configure.in; then >- ac_sub_configure=$ac_configure >- else >- { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 >-echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} >- ac_sub_configure= >- fi >- >- # The recursion is here. >- if test -n "$ac_sub_configure"; then >- # Make the cache file name correct relative to the subdirectory. >- case $cache_file in >- [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; >- *) # Relative path. >- ac_sub_cache_file=$ac_top_builddir$cache_file ;; >- esac >- >- { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 >-echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} >- # The eval makes quoting arguments work. >- eval $ac_sub_configure $ac_sub_configure_args \ >- --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir || >- { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 >-echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} >- { (exit 1); exit 1; }; } >- fi >- >- cd $ac_popdir >- done >-fi >- >-chmod a+x isc-config.sh >- >-# Tell Emacs to edit this file in shell mode. >-# Local Variables: >-# mode: sh >-# End: >+#! /bin/sh >+ >+# From configure.in Revision: 1.294.2.16.4.2 >+ >+# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- >+## Copyright 1996, 1997, 1998, 1999, 2000, 2001 >+## Free Software Foundation, Inc. >+## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 >+## >+## This program is free software; you can redistribute it and/or modify >+## it under the terms of the GNU General Public License as published by >+## the Free Software Foundation; either version 2 of the License, or >+## (at your option) any later version. >+## >+## This program is distributed in the hope that it will be useful, but >+## WITHOUT ANY WARRANTY; without even the implied warranty of >+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+## General Public License for more details. >+## >+## You should have received a copy of the GNU General Public License >+## along with this program; if not, write to the Free Software >+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. >+ >+# serial 46 AC_PROG_LIBTOOL >+ >+ >+ >+ >+# _LT_AC_CHECK_DLFCN >+# -------------------- >+# _LT_AC_CHECK_DLFCN >+ >+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE >+# --------------------------------- >+ # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE >+ >+# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR >+# --------------------------------- >+# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR >+ >+# _LT_AC_PROG_ECHO_BACKSLASH >+# -------------------------- >+# Add some code to the start of the generated configure script which >+# will find an echo command which doesn;t interpret backslashes. >+# _LT_AC_PROG_ECHO_BACKSLASH >+ >+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, >+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) >+# ------------------------------------------------------------------ >+# _LT_AC_TRY_DLOPEN_SELF >+ >+# AC_LIBTOOL_DLOPEN_SELF >+# ------------------- >+# AC_LIBTOOL_DLOPEN_SELF >+ >+# _LT_AC_LTCONFIG_HACK >+ >+# AC_LIBTOOL_DLOPEN - enable checks for dlopen support >+ >+ >+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's >+ >+ >+# AC_ENABLE_SHARED - implement the --enable-shared flag >+# Usage: AC_ENABLE_SHARED[(DEFAULT)] >+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to >+# `yes'. >+ >+ >+# AC_DISABLE_SHARED - set the default shared flag to --disable-shared >+ >+ >+# AC_ENABLE_STATIC - implement the --enable-static flag >+# Usage: AC_ENABLE_STATIC[(DEFAULT)] >+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to >+# `yes'. >+ >+ >+# AC_DISABLE_STATIC - set the default static flag to --disable-static >+ >+ >+ >+# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag >+# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] >+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to >+# `yes'. >+ >+ >+# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install >+ >+ >+# AC_LIBTOOL_PICMODE - implement the --with-pic flag >+# Usage: AC_LIBTOOL_PICMODE[(MODE)] >+# Where MODE is either `yes' or `no'. If omitted, it defaults to >+# `both'. >+ >+ >+ >+# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library >+ >+ >+ >+# AC_PATH_MAGIC - find a file program which can recognise a shared library >+ >+ >+ >+# AC_PROG_LD - find the path to the GNU or non-GNU linker >+ >+ >+# AC_PROG_LD_GNU - >+ >+ >+# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker >+# -- PORTME Some linkers may need a different reload flag. >+ >+ >+# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies >+# -- PORTME fill in with the dynamic library characteristics >+ >+ >+ >+# AC_PROG_NM - find the path to a BSD-compatible name lister >+ >+ >+# AC_CHECK_LIBM - check for math library >+ >+ >+# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for >+# the libltdl convenience library and INCLTDL to the include flags for >+# the libltdl header and adds --enable-ltdl-convenience to the >+# configure arguments. Note that LIBLTDL and INCLTDL are not >+# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not >+# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed >+# with '${top_builddir}/' and INCLTDL will be prefixed with >+# '${top_srcdir}/' (note the single quotes!). If your package is not >+# flat and you're not using automake, define top_builddir and >+# top_srcdir appropriately in the Makefiles. >+ >+ >+# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for >+# the libltdl installable library and INCLTDL to the include flags for >+# the libltdl header and adds --enable-ltdl-install to the configure >+# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is >+# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed >+# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will >+# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed >+# with '${top_srcdir}/' (note the single quotes!). If your package is >+# not flat and you're not using automake, define top_builddir and >+# top_srcdir appropriately in the Makefiles. >+# In the future, this macro may have to be called after AC_PROG_LIBTOOL. >+ >+ >+# old names >+ >+ >+ >+ >+ >+ >+ >+ >+# This is just to silence aclocal about the macro not being used >+ >+ >+# Guess values for system-dependent variables and create Makefiles. >+# Generated automatically using autoconf version 2.13 >+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. >+# >+# This configure script is free software; the Free Software Foundation >+# gives unlimited permission to copy, distribute and modify it. >+ >+# Defaults: >+ac_help= >+ac_default_prefix=/usr/local >+# Any additions from configure.in: >+ac_help="$ac_help >+ --with-dlz-postgres[=PATH] Build with Postgres DLZ driver [yes|no|path]. >+ (Required to use Postgres with DLZ)" >+ac_help="$ac_help >+ --with-dlz-mysql[=PATH] Build with MySQL DLZ driver [yes|no|path]. >+ (Required to use MySQL with DLZ)" >+ac_help="$ac_help >+ --with-dlz-bdb[=PATH] Build with Berkeley DB DLZ driver [yes|no|path]. >+ (Required to use Berkeley DB with DLZ)" >+ac_help="$ac_help >+ --with-dlz-filesystem[=PATH] Build with filesystem DLZ driver [yes|no]. >+ (Required to use file system driver with DLZ)" >+ac_help="$ac_help >+ --with-dlz-ldap[=PATH] Build with LDAP DLZ driver [yes|no|path]. >+ (Required to use LDAP with DLZ)" >+ac_help="$ac_help >+ --with-dlz-odbc[=PATH] Build with ODBC DLZ driver [yes|no|path]. >+ (Required to use ODBC with DLZ)" >+ac_help="$ac_help >+ --with-dlz-stub[=PATH] Build with stub DLZ driver [yes|no]. >+ (Required to use stub driver with DLZ)" >+ac_help="$ac_help >+ --with-openssl[=PATH] Build with OpenSSL [yes|no|path]. >+ (Required for DNSSEC)" >+ac_help="$ac_help >+ --with-randomdev=PATH Specify path for random device" >+ac_help="$ac_help >+ --enable-threads enable multithreading" >+ac_help="$ac_help >+ --with-ptl2 on NetBSD, use the ptl2 thread library (experimental)" >+ac_help="$ac_help >+ --with-purify[=PATH] use Rational purify" >+ac_help="$ac_help >+ --with-libtool use GNU libtool (following indented options supported)" >+ac_help="$ac_help >+ --enable-shared[=PKGS] build shared libraries [default=yes]" >+ac_help="$ac_help >+ --enable-static[=PKGS] build static libraries [default=yes]" >+ac_help="$ac_help >+ --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" >+ac_help="$ac_help >+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]" >+ >+# Find the correct PATH separator. Usually this is `:', but >+# DJGPP uses `;' like DOS. >+if test "X${PATH_SEPARATOR+set}" != Xset; then >+ UNAME=${UNAME-`uname 2>/dev/null`} >+ case X$UNAME in >+ *-DOS) lt_cv_sys_path_separator=';' ;; >+ *) lt_cv_sys_path_separator=':' ;; >+ esac >+fi >+ >+ >+# Check that we are running under the correct shell. >+SHELL=${CONFIG_SHELL-/bin/sh} >+ >+case X$ECHO in >+X*--fallback-echo) >+ # Remove one level of quotation (which was required for Make). >+ ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` >+ ;; >+esac >+ >+echo=${ECHO-echo} >+if test "X$1" = X--no-reexec; then >+ # Discard the --no-reexec flag, and continue. >+ shift >+elif test "X$1" = X--fallback-echo; then >+ # Avoid inline document here, it may be left over >+ : >+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then >+ # Yippee, $echo works! >+ : >+else >+ # Restart under the correct shell. >+ exec $SHELL "$0" --no-reexec ${1+"$@"} >+fi >+ >+if test "X$1" = X--fallback-echo; then >+ # used as fallback echo >+ shift >+ cat <<EOF >+ >+EOF >+ exit 0 >+fi >+ >+# The HP-UX ksh and POSIX shell print the target directory to stdout >+# if CDPATH is set. >+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi >+ >+if test -z "$ECHO"; then >+if test "X${echo_test_string+set}" != Xset; then >+# find a string as large as possible, as long as the shell can cope with it >+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do >+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... >+ if (echo_test_string="`eval $cmd`") 2>/dev/null && >+ echo_test_string="`eval $cmd`" && >+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null >+ then >+ break >+ fi >+ done >+fi >+ >+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && >+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && >+ test "X$echo_testing_string" = "X$echo_test_string"; then >+ : >+else >+ # The Solaris, AIX, and Digital Unix default echo programs unquote >+ # backslashes. This makes it impossible to quote backslashes using >+ # echo "$something" | sed 's/\\/\\\\/g' >+ # >+ # So, first we look for a working echo in the user's PATH. >+ >+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" >+ for dir in $PATH /usr/ucb; do >+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && >+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && >+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && >+ test "X$echo_testing_string" = "X$echo_test_string"; then >+ echo="$dir/echo" >+ break >+ fi >+ done >+ IFS="$save_ifs" >+ >+ if test "X$echo" = Xecho; then >+ # We didn't find a better echo, so look for alternatives. >+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && >+ echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && >+ test "X$echo_testing_string" = "X$echo_test_string"; then >+ # This shell has a builtin print -r that does the trick. >+ echo='print -r' >+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && >+ test "X$CONFIG_SHELL" != X/bin/ksh; then >+ # If we have ksh, try running configure again with it. >+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} >+ export ORIGINAL_CONFIG_SHELL >+ CONFIG_SHELL=/bin/ksh >+ export CONFIG_SHELL >+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} >+ else >+ # Try using printf. >+ echo='printf %s\n' >+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && >+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && >+ test "X$echo_testing_string" = "X$echo_test_string"; then >+ # Cool, printf works >+ : >+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && >+ test "X$echo_testing_string" = 'X\t' && >+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && >+ test "X$echo_testing_string" = "X$echo_test_string"; then >+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL >+ export CONFIG_SHELL >+ SHELL="$CONFIG_SHELL" >+ export SHELL >+ echo="$CONFIG_SHELL $0 --fallback-echo" >+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && >+ test "X$echo_testing_string" = 'X\t' && >+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && >+ test "X$echo_testing_string" = "X$echo_test_string"; then >+ echo="$CONFIG_SHELL $0 --fallback-echo" >+ else >+ # maybe with a smaller string... >+ prev=: >+ >+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do >+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null >+ then >+ break >+ fi >+ prev="$cmd" >+ done >+ >+ if test "$prev" != 'sed 50q "$0"'; then >+ echo_test_string=`eval $prev` >+ export echo_test_string >+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} >+ else >+ # Oops. We lost completely, so just stick with echo. >+ echo=echo >+ fi >+ fi >+ fi >+ fi >+fi >+fi >+ >+# Copy echo and quote the copy suitably for passing to libtool from >+# the Makefile, instead of quoting the original, which is used later. >+ECHO=$echo >+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then >+ ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" >+fi >+ >+ >+ac_help="$ac_help >+ --disable-libtool-lock avoid locking (might break parallel builds)" >+ac_help="$ac_help >+ --with-pic try to use only PIC/non-PIC objects [default=use both]" >+ac_help="$ac_help >+ --enable-libbind build libbind [default=no]" >+ac_help="$ac_help >+ --enable-ipv6 use IPv6 [default=autodetect]" >+ac_help="$ac_help >+ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]" >+ac_help="$ac_help >+ --disable-linux-caps disable linux capabilities" >+ >+# Initialize some variables set by options. >+# The variables have the same names as the options, with >+# dashes changed to underlines. >+build=NONE >+cache_file=./config.cache >+exec_prefix=NONE >+host=NONE >+no_create= >+nonopt=NONE >+no_recursion= >+prefix=NONE >+program_prefix=NONE >+program_suffix=NONE >+program_transform_name=s,x,x, >+silent= >+site= >+srcdir= >+target=NONE >+verbose= >+x_includes=NONE >+x_libraries=NONE >+bindir='${exec_prefix}/bin' >+sbindir='${exec_prefix}/sbin' >+libexecdir='${exec_prefix}/libexec' >+datadir='${prefix}/share' >+sysconfdir='${prefix}/etc' >+sharedstatedir='${prefix}/com' >+localstatedir='${prefix}/var' >+libdir='${exec_prefix}/lib' >+includedir='${prefix}/include' >+oldincludedir='/usr/include' >+infodir='${prefix}/info' >+mandir='${prefix}/man' >+ >+# Initialize some other variables. >+subdirs= >+MFLAGS= MAKEFLAGS= >+SHELL=${CONFIG_SHELL-/bin/sh} >+# Maximum number of lines to put in a shell here document. >+ac_max_here_lines=12 >+ >+ac_prev= >+for ac_option >+do >+ >+ # If the previous option needs an argument, assign it. >+ if test -n "$ac_prev"; then >+ eval "$ac_prev=\$ac_option" >+ ac_prev= >+ continue >+ fi >+ >+ case "$ac_option" in >+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; >+ *) ac_optarg= ;; >+ esac >+ >+ # Accept the important Cygnus configure options, so we can diagnose typos. >+ >+ case "$ac_option" in >+ >+ -bindir | --bindir | --bindi | --bind | --bin | --bi) >+ ac_prev=bindir ;; >+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) >+ bindir="$ac_optarg" ;; >+ >+ -build | --build | --buil | --bui | --bu) >+ ac_prev=build ;; >+ -build=* | --build=* | --buil=* | --bui=* | --bu=*) >+ build="$ac_optarg" ;; >+ >+ -cache-file | --cache-file | --cache-fil | --cache-fi \ >+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) >+ ac_prev=cache_file ;; >+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ >+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) >+ cache_file="$ac_optarg" ;; >+ >+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da) >+ ac_prev=datadir ;; >+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ >+ | --da=*) >+ datadir="$ac_optarg" ;; >+ >+ -disable-* | --disable-*) >+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` >+ # Reject names that are not valid shell variable names. >+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then >+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } >+ fi >+ ac_feature=`echo $ac_feature| sed 's/-/_/g'` >+ eval "enable_${ac_feature}=no" ;; >+ >+ -enable-* | --enable-*) >+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` >+ # Reject names that are not valid shell variable names. >+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then >+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } >+ fi >+ ac_feature=`echo $ac_feature| sed 's/-/_/g'` >+ case "$ac_option" in >+ *=*) ;; >+ *) ac_optarg=yes ;; >+ esac >+ eval "enable_${ac_feature}='$ac_optarg'" ;; >+ >+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ >+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ >+ | --exec | --exe | --ex) >+ ac_prev=exec_prefix ;; >+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ >+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ >+ | --exec=* | --exe=* | --ex=*) >+ exec_prefix="$ac_optarg" ;; >+ >+ -gas | --gas | --ga | --g) >+ # Obsolete; use --with-gas. >+ with_gas=yes ;; >+ >+ -help | --help | --hel | --he) >+ # Omit some internal or obsolete options to make the list less imposing. >+ # This message is too long to be a string in the A/UX 3.1 sh. >+ cat << EOF >+Usage: configure [options] [host] >+Options: [defaults in brackets after descriptions] >+Configuration: >+ --cache-file=FILE cache test results in FILE >+ --help print this message >+ --no-create do not create output files >+ --quiet, --silent do not print \`checking...' messages >+ --version print the version of autoconf that created configure >+Directory and file names: >+ --prefix=PREFIX install architecture-independent files in PREFIX >+ [$ac_default_prefix] >+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX >+ [same as prefix] >+ --bindir=DIR user executables in DIR [EPREFIX/bin] >+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] >+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec] >+ --datadir=DIR read-only architecture-independent data in DIR >+ [PREFIX/share] >+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] >+ --sharedstatedir=DIR modifiable architecture-independent data in DIR >+ [PREFIX/com] >+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] >+ --libdir=DIR object code libraries in DIR [EPREFIX/lib] >+ --includedir=DIR C header files in DIR [PREFIX/include] >+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] >+ --infodir=DIR info documentation in DIR [PREFIX/info] >+ --mandir=DIR man documentation in DIR [PREFIX/man] >+ --srcdir=DIR find the sources in DIR [configure dir or ..] >+ --program-prefix=PREFIX prepend PREFIX to installed program names >+ --program-suffix=SUFFIX append SUFFIX to installed program names >+ --program-transform-name=PROGRAM >+ run sed PROGRAM on installed program names >+EOF >+ cat << EOF >+Host type: >+ --build=BUILD configure for building on BUILD [BUILD=HOST] >+ --host=HOST configure for HOST [guessed] >+ --target=TARGET configure for TARGET [TARGET=HOST] >+Features and packages: >+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) >+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes] >+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] >+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) >+ --x-includes=DIR X include files are in DIR >+ --x-libraries=DIR X library files are in DIR >+EOF >+ if test -n "$ac_help"; then >+ echo "--enable and --with options recognized:$ac_help" >+ fi >+ exit 0 ;; >+ >+ -host | --host | --hos | --ho) >+ ac_prev=host ;; >+ -host=* | --host=* | --hos=* | --ho=*) >+ host="$ac_optarg" ;; >+ >+ -includedir | --includedir | --includedi | --included | --include \ >+ | --includ | --inclu | --incl | --inc) >+ ac_prev=includedir ;; >+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ >+ | --includ=* | --inclu=* | --incl=* | --inc=*) >+ includedir="$ac_optarg" ;; >+ >+ -infodir | --infodir | --infodi | --infod | --info | --inf) >+ ac_prev=infodir ;; >+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) >+ infodir="$ac_optarg" ;; >+ >+ -libdir | --libdir | --libdi | --libd) >+ ac_prev=libdir ;; >+ -libdir=* | --libdir=* | --libdi=* | --libd=*) >+ libdir="$ac_optarg" ;; >+ >+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ >+ | --libexe | --libex | --libe) >+ ac_prev=libexecdir ;; >+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ >+ | --libexe=* | --libex=* | --libe=*) >+ libexecdir="$ac_optarg" ;; >+ >+ -localstatedir | --localstatedir | --localstatedi | --localstated \ >+ | --localstate | --localstat | --localsta | --localst \ >+ | --locals | --local | --loca | --loc | --lo) >+ ac_prev=localstatedir ;; >+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ >+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ >+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) >+ localstatedir="$ac_optarg" ;; >+ >+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m) >+ ac_prev=mandir ;; >+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) >+ mandir="$ac_optarg" ;; >+ >+ -nfp | --nfp | --nf) >+ # Obsolete; use --without-fp. >+ with_fp=no ;; >+ >+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \ >+ | --no-cr | --no-c) >+ no_create=yes ;; >+ >+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \ >+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) >+ no_recursion=yes ;; >+ >+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ >+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ >+ | --oldin | --oldi | --old | --ol | --o) >+ ac_prev=oldincludedir ;; >+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ >+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ >+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) >+ oldincludedir="$ac_optarg" ;; >+ >+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) >+ ac_prev=prefix ;; >+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) >+ prefix="$ac_optarg" ;; >+ >+ -program-prefix | --program-prefix | --program-prefi | --program-pref \ >+ | --program-pre | --program-pr | --program-p) >+ ac_prev=program_prefix ;; >+ -program-prefix=* | --program-prefix=* | --program-prefi=* \ >+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) >+ program_prefix="$ac_optarg" ;; >+ >+ -program-suffix | --program-suffix | --program-suffi | --program-suff \ >+ | --program-suf | --program-su | --program-s) >+ ac_prev=program_suffix ;; >+ -program-suffix=* | --program-suffix=* | --program-suffi=* \ >+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) >+ program_suffix="$ac_optarg" ;; >+ >+ -program-transform-name | --program-transform-name \ >+ | --program-transform-nam | --program-transform-na \ >+ | --program-transform-n | --program-transform- \ >+ | --program-transform | --program-transfor \ >+ | --program-transfo | --program-transf \ >+ | --program-trans | --program-tran \ >+ | --progr-tra | --program-tr | --program-t) >+ ac_prev=program_transform_name ;; >+ -program-transform-name=* | --program-transform-name=* \ >+ | --program-transform-nam=* | --program-transform-na=* \ >+ | --program-transform-n=* | --program-transform-=* \ >+ | --program-transform=* | --program-transfor=* \ >+ | --program-transfo=* | --program-transf=* \ >+ | --program-trans=* | --program-tran=* \ >+ | --progr-tra=* | --program-tr=* | --program-t=*) >+ program_transform_name="$ac_optarg" ;; >+ >+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ >+ | -silent | --silent | --silen | --sile | --sil) >+ silent=yes ;; >+ >+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) >+ ac_prev=sbindir ;; >+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ >+ | --sbi=* | --sb=*) >+ sbindir="$ac_optarg" ;; >+ >+ -sharedstatedir | --sharedstatedir | --sharedstatedi \ >+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ >+ | --sharedst | --shareds | --shared | --share | --shar \ >+ | --sha | --sh) >+ ac_prev=sharedstatedir ;; >+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ >+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ >+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ >+ | --sha=* | --sh=*) >+ sharedstatedir="$ac_optarg" ;; >+ >+ -site | --site | --sit) >+ ac_prev=site ;; >+ -site=* | --site=* | --sit=*) >+ site="$ac_optarg" ;; >+ >+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) >+ ac_prev=srcdir ;; >+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) >+ srcdir="$ac_optarg" ;; >+ >+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ >+ | --syscon | --sysco | --sysc | --sys | --sy) >+ ac_prev=sysconfdir ;; >+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ >+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) >+ sysconfdir="$ac_optarg" ;; >+ >+ -target | --target | --targe | --targ | --tar | --ta | --t) >+ ac_prev=target ;; >+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) >+ target="$ac_optarg" ;; >+ >+ -v | -verbose | --verbose | --verbos | --verbo | --verb) >+ verbose=yes ;; >+ >+ -version | --version | --versio | --versi | --vers) >+ echo "configure generated by autoconf version 2.13" >+ exit 0 ;; >+ >+ -with-* | --with-*) >+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` >+ # Reject names that are not valid shell variable names. >+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then >+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } >+ fi >+ ac_package=`echo $ac_package| sed 's/-/_/g'` >+ case "$ac_option" in >+ *=*) ;; >+ *) ac_optarg=yes ;; >+ esac >+ eval "with_${ac_package}='$ac_optarg'" ;; >+ >+ -without-* | --without-*) >+ ac_package=`echo $ac_option|sed -e 's/-*without-//'` >+ # Reject names that are not valid shell variable names. >+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then >+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } >+ fi >+ ac_package=`echo $ac_package| sed 's/-/_/g'` >+ eval "with_${ac_package}=no" ;; >+ >+ --x) >+ # Obsolete; use --with-x. >+ with_x=yes ;; >+ >+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ >+ | --x-incl | --x-inc | --x-in | --x-i) >+ ac_prev=x_includes ;; >+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ >+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) >+ x_includes="$ac_optarg" ;; >+ >+ -x-libraries | --x-libraries | --x-librarie | --x-librari \ >+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) >+ ac_prev=x_libraries ;; >+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ >+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) >+ x_libraries="$ac_optarg" ;; >+ >+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } >+ ;; >+ >+ *) >+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then >+ echo "configure: warning: $ac_option: invalid host type" 1>&2 >+ fi >+ if test "x$nonopt" != xNONE; then >+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } >+ fi >+ nonopt="$ac_option" >+ ;; >+ >+ esac >+done >+ >+if test -n "$ac_prev"; then >+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } >+fi >+ >+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 >+ >+# File descriptor usage: >+# 0 standard input >+# 1 file creation >+# 2 errors and warnings >+# 3 some systems may open it to /dev/tty >+# 4 used on the Kubota Titan >+# 6 checking for... messages and results >+# 5 compiler messages saved in config.log >+if test "$silent" = yes; then >+ exec 6>/dev/null >+else >+ exec 6>&1 >+fi >+exec 5>./config.log >+ >+echo "\ >+This file contains any messages produced by compilers while >+running configure, to aid debugging if configure makes a mistake. >+" 1>&5 >+ >+# Strip out --no-create and --no-recursion so they do not pile up. >+# Also quote any args containing shell metacharacters. >+ac_configure_args= >+for ac_arg >+do >+ case "$ac_arg" in >+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \ >+ | --no-cr | --no-c) ;; >+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \ >+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; >+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) >+ ac_configure_args="$ac_configure_args '$ac_arg'" ;; >+ *) ac_configure_args="$ac_configure_args $ac_arg" ;; >+ esac >+done >+ >+# NLS nuisances. >+# Only set these to C if already set. These must not be set unconditionally >+# because not all systems understand e.g. LANG=C (notably SCO). >+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! >+# Non-C LC_CTYPE values break the ctype check. >+if test "${LANG+set}" = set; then LANG=C; export LANG; fi >+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi >+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi >+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi >+ >+# confdefs.h avoids OS command line length limits that DEFS can exceed. >+rm -rf conftest* confdefs.h >+# AIX cpp loses on an empty file, so make sure it contains at least a newline. >+echo > confdefs.h >+ >+# A filename unique to this package, relative to the directory that >+# configure is in, which we can look for to find out if srcdir is correct. >+ac_unique_file=lib/dns/name.c >+ >+# Find the source files, if location was not specified. >+if test -z "$srcdir"; then >+ ac_srcdir_defaulted=yes >+ # Try the directory containing this script, then its parent. >+ ac_prog=$0 >+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` >+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. >+ srcdir=$ac_confdir >+ if test ! -r $srcdir/$ac_unique_file; then >+ srcdir=.. >+ fi >+else >+ ac_srcdir_defaulted=no >+fi >+if test ! -r $srcdir/$ac_unique_file; then >+ if test "$ac_srcdir_defaulted" = yes; then >+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } >+ else >+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } >+ fi >+fi >+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` >+ >+# Prefer explicitly selected file to automatically selected ones. >+if test -z "$CONFIG_SITE"; then >+ if test "x$prefix" != xNONE; then >+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" >+ else >+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" >+ fi >+fi >+for ac_site_file in $CONFIG_SITE; do >+ if test -r "$ac_site_file"; then >+ echo "loading site script $ac_site_file" >+ . "$ac_site_file" >+ fi >+done >+ >+if test -r "$cache_file"; then >+ echo "loading cache $cache_file" >+ . $cache_file >+else >+ echo "creating cache $cache_file" >+ > $cache_file >+fi >+ >+ac_ext=c >+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. >+ac_cpp='$CPP $CPPFLAGS' >+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' >+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' >+cross_compiling=$ac_cv_prog_cc_cross >+ >+ac_exeext= >+ac_objext=o >+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then >+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. >+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then >+ ac_n= ac_c=' >+' ac_t=' ' >+ else >+ ac_n=-n ac_c= ac_t= >+ fi >+else >+ ac_n= ac_c='\c' ac_t= >+fi >+ >+ >+ >+ >+ >+ac_aux_dir= >+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do >+ if test -f $ac_dir/install-sh; then >+ ac_aux_dir=$ac_dir >+ ac_install_sh="$ac_aux_dir/install-sh -c" >+ break >+ elif test -f $ac_dir/install.sh; then >+ ac_aux_dir=$ac_dir >+ ac_install_sh="$ac_aux_dir/install.sh -c" >+ break >+ fi >+done >+if test -z "$ac_aux_dir"; then >+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } >+fi >+ac_config_guess=$ac_aux_dir/config.guess >+ac_config_sub=$ac_aux_dir/config.sub >+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. >+ >+subdirs="lib/bind" >+ >+ >+ >+# Make sure we can run config.sub. >+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : >+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } >+fi >+ >+echo $ac_n "checking host system type""... $ac_c" 1>&6 >+echo "configure:936: checking host system type" >&5 >+ >+host_alias=$host >+case "$host_alias" in >+NONE) >+ case $nonopt in >+ NONE) >+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : >+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } >+ fi ;; >+ *) host_alias=$nonopt ;; >+ esac ;; >+esac >+ >+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` >+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` >+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` >+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` >+echo "$ac_t""$host" 1>&6 >+ >+ >+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 >+echo "configure:958: checking whether ${MAKE-make} sets \${MAKE}" >&5 >+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftestmake <<\EOF >+all: >+ @echo 'ac_maketemp="${MAKE}"' >+EOF >+# GNU make sometimes prints "make[1]: Entering...", which would confuse us. >+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` >+if test -n "$ac_maketemp"; then >+ eval ac_cv_prog_make_${ac_make}_set=yes >+else >+ eval ac_cv_prog_make_${ac_make}_set=no >+fi >+rm -f conftestmake >+fi >+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ SET_MAKE= >+else >+ echo "$ac_t""no" 1>&6 >+ SET_MAKE="MAKE=${MAKE-make}" >+fi >+ >+# Extract the first word of "ranlib", so it can be a program name with args. >+set dummy ranlib; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:987: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test -n "$RANLIB"; then >+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. >+else >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_prog_RANLIB="ranlib" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" >+fi >+fi >+RANLIB="$ac_cv_prog_RANLIB" >+if test -n "$RANLIB"; then >+ echo "$ac_t""$RANLIB" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+# Find a good install program. We prefer a C program (faster), >+# so one script is as good as another. But avoid the broken or >+# incompatible versions: >+# SysV /etc/install, /usr/sbin/install >+# SunOS /usr/etc/install >+# IRIX /sbin/install >+# AIX /bin/install >+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag >+# AFS /usr/afsws/bin/install, which mishandles nonexistent args >+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" >+# ./install, which can be erroneously created by make from ./install.sh. >+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 >+echo "configure:1026: checking for a BSD compatible install" >&5 >+if test -z "$INSTALL"; then >+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" >+ for ac_dir in $PATH; do >+ # Account for people who put trailing slashes in PATH elements. >+ case "$ac_dir/" in >+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; >+ *) >+ # OSF1 and SCO ODT 3.0 have their own names for install. >+ # Don't use installbsd from OSF since it installs stuff as root >+ # by default. >+ for ac_prog in ginstall scoinst install; do >+ if test -f $ac_dir/$ac_prog; then >+ if test $ac_prog = install && >+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then >+ # AIX install. It has an incompatible calling convention. >+ : >+ else >+ ac_cv_path_install="$ac_dir/$ac_prog -c" >+ break 2 >+ fi >+ fi >+ done >+ ;; >+ esac >+ done >+ IFS="$ac_save_IFS" >+ >+fi >+ if test "${ac_cv_path_install+set}" = set; then >+ INSTALL="$ac_cv_path_install" >+ else >+ # As a last resort, use the slow shell script. We don't cache a >+ # path for INSTALL within a source directory, because that will >+ # break other packages using the cache if that directory is >+ # removed, or if the path is relative. >+ INSTALL="$ac_install_sh" >+ fi >+fi >+echo "$ac_t""$INSTALL" 1>&6 >+ >+# Use test -z because SunOS4 sh mishandles braces in ${var-val}. >+# It thinks the first close brace ends the variable substitution. >+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' >+ >+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' >+ >+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' >+ >+ >+ >+ >+ >+ >+ >+# Extract the first word of "ar", so it can be a program name with args. >+set dummy ar; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:1087: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ case "$AR" in >+ /*) >+ ac_cv_path_AR="$AR" # Let the user override the test with a path. >+ ;; >+ ?:/*) >+ ac_cv_path_AR="$AR" # Let the user override the test with a dos path. >+ ;; >+ *) >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_path_AR="$ac_dir/$ac_word" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ ;; >+esac >+fi >+AR="$ac_cv_path_AR" >+if test -n "$AR"; then >+ echo "$ac_t""$AR" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ARFLAGS="cruv" >+ >+ >+ >+# The POSIX ln(1) program. Non-POSIX systems may substitute >+# "copy" or something. >+LN=ln >+ >+ >+case "$AR" in >+ "") >+ { echo "configure: error: >+ar program not found. Please fix your PATH to include the directory in >+which ar resides, or set AR in the environment with the full path to ar. >+" 1>&2; exit 1; } >+ >+ ;; >+esac >+ >+# >+# Etags. >+# >+for ac_prog in etags emacs-etags >+do >+# Extract the first word of "$ac_prog", so it can be a program name with args. >+set dummy $ac_prog; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:1146: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_path_ETAGS'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ case "$ETAGS" in >+ /*) >+ ac_cv_path_ETAGS="$ETAGS" # Let the user override the test with a path. >+ ;; >+ ?:/*) >+ ac_cv_path_ETAGS="$ETAGS" # Let the user override the test with a dos path. >+ ;; >+ *) >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_path_ETAGS="$ac_dir/$ac_word" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ ;; >+esac >+fi >+ETAGS="$ac_cv_path_ETAGS" >+if test -n "$ETAGS"; then >+ echo "$ac_t""$ETAGS" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+test -n "$ETAGS" && break >+done >+ >+ >+# >+# Some systems, e.g. RH7, have the Exuberant Ctags etags instead of >+# GNU emacs etags, and it requires the -L flag. >+# >+if test "X$ETAGS" != "X"; then >+ echo $ac_n "checking for Exuberant Ctags etags""... $ac_c" 1>&6 >+echo "configure:1188: checking for Exuberant Ctags etags" >&5 >+ if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then >+ echo "$ac_t""yes" 1>&6 >+ ETAGS="$ETAGS -L" >+ else >+ echo "$ac_t""no" 1>&6 >+ fi >+fi >+ >+ >+# >+# Perl is optional; it is used only by some of the system test scripts. >+# >+for ac_prog in perl5 perl >+do >+# Extract the first word of "$ac_prog", so it can be a program name with args. >+set dummy $ac_prog; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:1206: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ case "$PERL" in >+ /*) >+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path. >+ ;; >+ ?:/*) >+ ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path. >+ ;; >+ *) >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_path_PERL="$ac_dir/$ac_word" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ ;; >+esac >+fi >+PERL="$ac_cv_path_PERL" >+if test -n "$PERL"; then >+ echo "$ac_t""$PERL" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+test -n "$PERL" && break >+done >+ >+ >+ >+# >+# Special processing of paths depending on whether --prefix, >+# --sysconfdir or --localstatedir arguments were given. What's >+# desired is some compatibility with the way previous versions >+# of BIND built; they defaulted to /usr/local for most parts of >+# the installation, but named.boot/named.conf was in /etc >+# and named.pid was in /var/run. >+# >+# So ... if none of --prefix, --sysconfdir or --localstatedir are >+# specified, set things up that way. If --prefix is given, use >+# it for sysconfdir and localstatedir the way configure normally >+# would. To change the prefix for everything but leave named.conf >+# in /etc or named.pid in /var/run, then do this the usual configure way: >+# ./configure --prefix=/somewhere --sysconfdir=/etc >+# ./configure --prefix=/somewhere --localstatedir=/var >+# >+# To put named.conf and named.pid in /usr/local with everything else, >+# set the prefix explicitly to /usr/local even though that's the default: >+# ./configure --prefix=/usr/local >+# >+case "$prefix" in >+ NONE) >+ case "$sysconfdir" in >+ '${prefix}/etc') >+ sysconfdir=/etc >+ ;; >+ esac >+ case "$localstatedir" in >+ '${prefix}/var') >+ localstatedir=/var >+ ;; >+ esac >+ ;; >+esac >+ >+# >+# Make sure INSTALL uses an absolute path, else it will be wrong in all >+# Makefiles, since they use make/rules.in and INSTALL will be adjusted by >+# configure based on the location of the file where it is substituted. >+# Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate >+# subdirectory of install-sh, This relative path will be wrong for all >+# directories more than one level down from install-sh. >+# >+case "$INSTALL" in >+ /*) >+ ;; >+ *) >+ # >+ # Not all systems have dirname. >+ # >+ >+ ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`" >+ >+ >+ ac_prog="`echo $INSTALL | sed 's%.*/%%'`" >+ test "$ac_dir" = "$ac_prog" && ac_dir=. >+ test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`" >+ INSTALL="$ac_dir/$ac_prog" >+ ;; >+esac >+ >+# >+# On these hosts, we really want to use cc, not gcc, even if it is >+# found. The gcc that these systems have will not correctly handle >+# pthreads. >+# >+# However, if the user sets $CC to be something, let that override >+# our change. >+# >+if test "X$CC" = "X" ; then >+ case "$host" in >+ *-dec-osf*) >+ CC="cc" >+ ;; >+ *-solaris*) >+ # Use Sun's cc if it is available, but watch >+ # out for /usr/ucb/cc; it will never be the right >+ # compiler to use. >+ # >+ # If setting CC here fails, the AC_PROG_CC done >+ # below might still find gcc. >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ for ac_dir in $PATH; do >+ test -z "$ac_dir" && ac_dir=. >+ case "$ac_dir" in >+ /usr/ucb) >+ # exclude >+ ;; >+ *) >+ if test -f "$ac_dir/cc"; then >+ CC="$ac_dir/cc" >+ break >+ fi >+ ;; >+ esac >+ done >+ IFS="$ac_save_ifs" >+ ;; >+ *-hp-hpux*) >+ CC="cc" >+ ;; >+ mips-sgi-irix*) >+ CC="cc" >+ ;; >+ esac >+fi >+ >+# Extract the first word of "gcc", so it can be a program name with args. >+set dummy gcc; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:1353: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test -n "$CC"; then >+ ac_cv_prog_CC="$CC" # Let the user override the test. >+else >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_prog_CC="gcc" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+fi >+fi >+CC="$ac_cv_prog_CC" >+if test -n "$CC"; then >+ echo "$ac_t""$CC" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+if test -z "$CC"; then >+ # Extract the first word of "cc", so it can be a program name with args. >+set dummy cc; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:1383: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test -n "$CC"; then >+ ac_cv_prog_CC="$CC" # Let the user override the test. >+else >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_prog_rejected=no >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then >+ ac_prog_rejected=yes >+ continue >+ fi >+ ac_cv_prog_CC="cc" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+if test $ac_prog_rejected = yes; then >+ # We found a bogon in the path, so make sure we never use it. >+ set dummy $ac_cv_prog_CC >+ shift >+ if test $# -gt 0; then >+ # We chose a different compiler from the bogus one. >+ # However, it has the same basename, so the bogon will be chosen >+ # first if we set CC to just the basename; use the full file name. >+ shift >+ set dummy "$ac_dir/$ac_word" "$@" >+ shift >+ ac_cv_prog_CC="$@" >+ fi >+fi >+fi >+fi >+CC="$ac_cv_prog_CC" >+if test -n "$CC"; then >+ echo "$ac_t""$CC" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ if test -z "$CC"; then >+ case "`uname -s`" in >+ *win32* | *WIN32*) >+ # Extract the first word of "cl", so it can be a program name with args. >+set dummy cl; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:1434: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test -n "$CC"; then >+ ac_cv_prog_CC="$CC" # Let the user override the test. >+else >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_prog_CC="cl" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+fi >+fi >+CC="$ac_cv_prog_CC" >+if test -n "$CC"; then >+ echo "$ac_t""$CC" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ ;; >+ esac >+ fi >+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } >+fi >+ >+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 >+echo "configure:1466: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 >+ >+ac_ext=c >+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. >+ac_cpp='$CPP $CPPFLAGS' >+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' >+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' >+cross_compiling=$ac_cv_prog_cc_cross >+ >+cat > conftest.$ac_ext << EOF >+ >+#line 1477 "configure" >+#include "confdefs.h" >+ >+main(){return(0);} >+EOF >+if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ ac_cv_prog_cc_works=yes >+ # If we can't run a trivial program, we are probably using a cross compiler. >+ if (./conftest; exit) 2>/dev/null; then >+ ac_cv_prog_cc_cross=no >+ else >+ ac_cv_prog_cc_cross=yes >+ fi >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ ac_cv_prog_cc_works=no >+fi >+rm -fr conftest* >+ac_ext=c >+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. >+ac_cpp='$CPP $CPPFLAGS' >+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' >+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' >+cross_compiling=$ac_cv_prog_cc_cross >+ >+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 >+if test $ac_cv_prog_cc_works = no; then >+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } >+fi >+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 >+echo "configure:1508: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 >+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 >+cross_compiling=$ac_cv_prog_cc_cross >+ >+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 >+echo "configure:1513: checking whether we are using GNU C" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.c <<EOF >+#ifdef __GNUC__ >+ yes; >+#endif >+EOF >+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then >+ ac_cv_prog_gcc=yes >+else >+ ac_cv_prog_gcc=no >+fi >+fi >+ >+echo "$ac_t""$ac_cv_prog_gcc" 1>&6 >+ >+if test $ac_cv_prog_gcc = yes; then >+ GCC=yes >+else >+ GCC= >+fi >+ >+ac_test_CFLAGS="${CFLAGS+set}" >+ac_save_CFLAGS="$CFLAGS" >+CFLAGS= >+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 >+echo "configure:1541: checking whether ${CC-cc} accepts -g" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ echo 'void f(){}' > conftest.c >+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then >+ ac_cv_prog_cc_g=yes >+else >+ ac_cv_prog_cc_g=no >+fi >+rm -f conftest* >+ >+fi >+ >+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 >+if test "$ac_test_CFLAGS" = set; then >+ CFLAGS="$ac_save_CFLAGS" >+elif test $ac_cv_prog_cc_g = yes; then >+ if test "$GCC" = yes; then >+ CFLAGS="-g -O2" >+ else >+ CFLAGS="-g" >+ fi >+else >+ if test "$GCC" = yes; then >+ CFLAGS="-O2" >+ else >+ CFLAGS= >+ fi >+fi >+ >+ >+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 >+echo "configure:1574: checking how to run the C preprocessor" >&5 >+# On Suns, sometimes $CPP names a directory. >+if test -n "$CPP" && test -d "$CPP"; then >+ CPP= >+fi >+if test -z "$CPP"; then >+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ # This must be in double quotes, not single quotes, because CPP may get >+ # substituted into the Makefile and "${CC-cc}" will confuse make. >+ CPP="${CC-cc} -E" >+ # On the NeXT, cc -E runs the code through the compiler's parser, >+ # not just through cpp. >+ cat > conftest.$ac_ext <<EOF >+#line 1589 "configure" >+#include "confdefs.h" >+#include <assert.h> >+Syntax Error >+EOF >+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" >+{ (eval echo configure:1595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } >+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` >+if test -z "$ac_err"; then >+ : >+else >+ echo "$ac_err" >&5 >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ CPP="${CC-cc} -E -traditional-cpp" >+ cat > conftest.$ac_ext <<EOF >+#line 1606 "configure" >+#include "confdefs.h" >+#include <assert.h> >+Syntax Error >+EOF >+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" >+{ (eval echo configure:1612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } >+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` >+if test -z "$ac_err"; then >+ : >+else >+ echo "$ac_err" >&5 >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ CPP="${CC-cc} -nologo -E" >+ cat > conftest.$ac_ext <<EOF >+#line 1623 "configure" >+#include "confdefs.h" >+#include <assert.h> >+Syntax Error >+EOF >+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" >+{ (eval echo configure:1629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } >+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` >+if test -z "$ac_err"; then >+ : >+else >+ echo "$ac_err" >&5 >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ CPP=/lib/cpp >+fi >+rm -f conftest* >+fi >+rm -f conftest* >+fi >+rm -f conftest* >+ ac_cv_prog_CPP="$CPP" >+fi >+ CPP="$ac_cv_prog_CPP" >+else >+ ac_cv_prog_CPP="$CPP" >+fi >+echo "$ac_t""$CPP" 1>&6 >+ >+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 >+echo "configure:1654: checking for ANSI C header files" >&5 >+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 1659 "configure" >+#include "confdefs.h" >+#include <stdlib.h> >+#include <stdarg.h> >+#include <string.h> >+#include <float.h> >+EOF >+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" >+{ (eval echo configure:1667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } >+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` >+if test -z "$ac_err"; then >+ rm -rf conftest* >+ ac_cv_header_stdc=yes >+else >+ echo "$ac_err" >&5 >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ ac_cv_header_stdc=no >+fi >+rm -f conftest* >+ >+if test $ac_cv_header_stdc = yes; then >+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI. >+cat > conftest.$ac_ext <<EOF >+#line 1684 "configure" >+#include "confdefs.h" >+#include <string.h> >+EOF >+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | >+ egrep "memchr" >/dev/null 2>&1; then >+ : >+else >+ rm -rf conftest* >+ ac_cv_header_stdc=no >+fi >+rm -f conftest* >+ >+fi >+ >+if test $ac_cv_header_stdc = yes; then >+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. >+cat > conftest.$ac_ext <<EOF >+#line 1702 "configure" >+#include "confdefs.h" >+#include <stdlib.h> >+EOF >+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | >+ egrep "free" >/dev/null 2>&1; then >+ : >+else >+ rm -rf conftest* >+ ac_cv_header_stdc=no >+fi >+rm -f conftest* >+ >+fi >+ >+if test $ac_cv_header_stdc = yes; then >+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. >+if test "$cross_compiling" = yes; then >+ : >+else >+ cat > conftest.$ac_ext <<EOF >+#line 1723 "configure" >+#include "confdefs.h" >+#include <ctype.h> >+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') >+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) >+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) >+int main () { int i; for (i = 0; i < 256; i++) >+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); >+exit (0); } >+ >+EOF >+if { (eval echo configure:1734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ : >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ ac_cv_header_stdc=no >+fi >+rm -fr conftest* >+fi >+ >+fi >+fi >+ >+echo "$ac_t""$ac_cv_header_stdc" 1>&6 >+if test $ac_cv_header_stdc = yes; then >+ cat >> confdefs.h <<\EOF >+#define STDC_HEADERS 1 >+EOF >+ >+fi >+ >+ >+for ac_hdr in fcntl.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/sysctl.h >+do >+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` >+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 >+echo "configure:1762: checking for $ac_hdr" >&5 >+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 1767 "configure" >+#include "confdefs.h" >+#include <$ac_hdr> >+EOF >+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" >+{ (eval echo configure:1772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } >+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` >+if test -z "$ac_err"; then >+ rm -rf conftest* >+ eval "ac_cv_header_$ac_safe=yes" >+else >+ echo "$ac_err" >&5 >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_header_$ac_safe=no" >+fi >+rm -f conftest* >+fi >+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_hdr 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+done >+ >+ >+echo $ac_n "checking for working const""... $ac_c" 1>&6 >+echo "configure:1800: checking for working const" >&5 >+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 1805 "configure" >+#include "confdefs.h" >+ >+int main() { >+ >+/* Ultrix mips cc rejects this. */ >+typedef int charset[2]; const charset x; >+/* SunOS 4.1.1 cc rejects this. */ >+char const *const *ccp; >+char **p; >+/* NEC SVR4.0.2 mips cc rejects this. */ >+struct point {int x, y;}; >+static struct point const zero = {0,0}; >+/* AIX XL C 1.02.0.0 rejects this. >+ It does not let you subtract one const X* pointer from another in an arm >+ of an if-expression whose if-part is not a constant expression */ >+const char *g = "string"; >+ccp = &g + (g ? g-g : 0); >+/* HPUX 7.0 cc rejects these. */ >+++ccp; >+p = (char**) ccp; >+ccp = (char const *const *) p; >+{ /* SCO 3.2v4 cc rejects this. */ >+ char *t; >+ char const *s = 0 ? (char *) 0 : (char const *) 0; >+ >+ *t++ = 0; >+} >+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ >+ int x[] = {25, 17}; >+ const int *foo = &x[0]; >+ ++foo; >+} >+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ >+ typedef const int *iptr; >+ iptr p = 0; >+ ++p; >+} >+{ /* AIX XL C 1.02.0.0 rejects this saying >+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ >+ struct s { int j; const int *ap[3]; }; >+ struct s *b; b->j = 5; >+} >+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ >+ const int foo = 10; >+} >+ >+; return 0; } >+EOF >+if { (eval echo configure:1854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ ac_cv_c_const=yes >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ ac_cv_c_const=no >+fi >+rm -f conftest* >+fi >+ >+echo "$ac_t""$ac_cv_c_const" 1>&6 >+if test $ac_cv_c_const = no; then >+ cat >> confdefs.h <<\EOF >+#define const >+EOF >+ >+fi >+ >+echo $ac_n "checking for inline""... $ac_c" 1>&6 >+echo "configure:1875: checking for inline" >&5 >+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_cv_c_inline=no >+for ac_kw in inline __inline__ __inline; do >+ cat > conftest.$ac_ext <<EOF >+#line 1882 "configure" >+#include "confdefs.h" >+ >+int main() { >+} $ac_kw foo() { >+; return 0; } >+EOF >+if { (eval echo configure:1889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ ac_cv_c_inline=$ac_kw; break >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+fi >+rm -f conftest* >+done >+ >+fi >+ >+echo "$ac_t""$ac_cv_c_inline" 1>&6 >+case "$ac_cv_c_inline" in >+ inline | yes) ;; >+ no) cat >> confdefs.h <<\EOF >+#define inline >+EOF >+ ;; >+ *) cat >> confdefs.h <<EOF >+#define inline $ac_cv_c_inline >+EOF >+ ;; >+esac >+ >+echo $ac_n "checking for sysctlbyname""... $ac_c" 1>&6 >+echo "configure:1915: checking for sysctlbyname" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_sysctlbyname'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 1920 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char sysctlbyname(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char sysctlbyname(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_sysctlbyname) || defined (__stub___sysctlbyname) >+choke me >+#else >+sysctlbyname(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_sysctlbyname=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_sysctlbyname=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'sysctlbyname`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_SYSCTLBYNAME 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+# >+# UnixWare 7.1.1 with the feature supplement to the UDK compiler >+# is reported to not support "static inline" (RT #1212). >+# >+echo $ac_n "checking for static inline breakage""... $ac_c" 1>&6 >+echo "configure:1971: checking for static inline breakage" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 1973 "configure" >+#include "confdefs.h" >+ >+int main() { >+ >+ foo1(); >+ } >+ >+ static inline int foo1() { >+ return 0; >+ } >+ >+ static inline int foo2() { >+ return foo1(); >+ >+; return 0; } >+EOF >+if { (eval echo configure:1990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define inline >+EOF >+ >+fi >+rm -f conftest* >+ >+echo $ac_n "checking for size_t""... $ac_c" 1>&6 >+echo "configure:2006: checking for size_t" >&5 >+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 2011 "configure" >+#include "confdefs.h" >+#include <sys/types.h> >+#if STDC_HEADERS >+#include <stdlib.h> >+#include <stddef.h> >+#endif >+EOF >+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | >+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then >+ rm -rf conftest* >+ ac_cv_type_size_t=yes >+else >+ rm -rf conftest* >+ ac_cv_type_size_t=no >+fi >+rm -f conftest* >+ >+fi >+echo "$ac_t""$ac_cv_type_size_t" 1>&6 >+if test $ac_cv_type_size_t = no; then >+ cat >> confdefs.h <<\EOF >+#define size_t unsigned >+EOF >+ >+fi >+ >+echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 >+echo "configure:2039: checking for ssize_t" >&5 >+if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 2044 "configure" >+#include "confdefs.h" >+#include <sys/types.h> >+#if STDC_HEADERS >+#include <stdlib.h> >+#include <stddef.h> >+#endif >+EOF >+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | >+ egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then >+ rm -rf conftest* >+ ac_cv_type_ssize_t=yes >+else >+ rm -rf conftest* >+ ac_cv_type_ssize_t=no >+fi >+rm -f conftest* >+ >+fi >+echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 >+if test $ac_cv_type_ssize_t = no; then >+ cat >> confdefs.h <<\EOF >+#define ssize_t int >+EOF >+ >+fi >+ >+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 >+echo "configure:2072: checking whether time.h and sys/time.h may both be included" >&5 >+if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 2077 "configure" >+#include "confdefs.h" >+#include <sys/types.h> >+#include <sys/time.h> >+#include <time.h> >+int main() { >+struct tm *tp; >+; return 0; } >+EOF >+if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ ac_cv_header_time=yes >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ ac_cv_header_time=no >+fi >+rm -f conftest* >+fi >+ >+echo "$ac_t""$ac_cv_header_time" 1>&6 >+if test $ac_cv_header_time = yes; then >+ cat >> confdefs.h <<\EOF >+#define TIME_WITH_SYS_TIME 1 >+EOF >+ >+fi >+ >+echo $ac_n "checking for long long""... $ac_c" 1>&6 >+echo "configure:2107: checking for long long" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 2109 "configure" >+#include "confdefs.h" >+ >+int main() { >+long long i = 0; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:2116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG" >+fi >+rm -f conftest* >+ >+ >+# >+# check if we need to #include sys/select.h explicitly >+# >+case $ac_cv_header_unistd_h in >+yes) >+echo $ac_n "checking if unistd.h or sys/types.h defines fd_set""... $ac_c" 1>&6 >+echo "configure:2136: checking if unistd.h or sys/types.h defines fd_set" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 2138 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> /* Ultrix */ >+#include <unistd.h> >+int main() { >+fd_set read_set; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH" >+ LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ case $ac_cv_header_sys_select_h in >+ yes) >+ ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1" >+ LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1" >+ ;; >+ no) >+ { echo "configure: error: need either working unistd.h or sys/select.h" 1>&2; exit 1; } >+ ;; >+ esac >+ >+fi >+rm -f conftest* >+ ;; >+no) >+ case $ac_cv_header_sys_select_h in >+ yes) >+ ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1" >+ LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1" >+ ;; >+ no) >+ { echo "configure: error: need either unistd.h or sys/select.h" 1>&2; exit 1; } >+ ;; >+ esac >+ ;; >+esac >+ >+ >+ >+# >+# Find the machine's endian flavor. >+# >+echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 >+echo "configure:2189: checking whether byte ordering is bigendian" >&5 >+if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_cv_c_bigendian=unknown >+# See if sys/param.h defines the BYTE_ORDER macro. >+cat > conftest.$ac_ext <<EOF >+#line 2196 "configure" >+#include "confdefs.h" >+#include <sys/types.h> >+#include <sys/param.h> >+int main() { >+ >+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN >+ bogus endian macros >+#endif >+; return 0; } >+EOF >+if { (eval echo configure:2207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ # It does; now see whether it defined to BIG_ENDIAN or not. >+cat > conftest.$ac_ext <<EOF >+#line 2211 "configure" >+#include "confdefs.h" >+#include <sys/types.h> >+#include <sys/param.h> >+int main() { >+ >+#if BYTE_ORDER != BIG_ENDIAN >+ not big endian >+#endif >+; return 0; } >+EOF >+if { (eval echo configure:2222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ ac_cv_c_bigendian=yes >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ ac_cv_c_bigendian=no >+fi >+rm -f conftest* >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+fi >+rm -f conftest* >+if test $ac_cv_c_bigendian = unknown; then >+if test "$cross_compiling" = yes; then >+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } >+else >+ cat > conftest.$ac_ext <<EOF >+#line 2242 "configure" >+#include "confdefs.h" >+main () { >+ /* Are we little or big endian? From Harbison&Steele. */ >+ union >+ { >+ long l; >+ char c[sizeof (long)]; >+ } u; >+ u.l = 1; >+ exit (u.c[sizeof (long) - 1] == 1); >+} >+EOF >+if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ ac_cv_c_bigendian=no >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ ac_cv_c_bigendian=yes >+fi >+rm -fr conftest* >+fi >+ >+fi >+fi >+ >+echo "$ac_t""$ac_cv_c_bigendian" 1>&6 >+if test $ac_cv_c_bigendian = yes; then >+ cat >> confdefs.h <<\EOF >+#define WORDS_BIGENDIAN 1 >+EOF >+ >+fi >+ >+ >+# >+# Build DLZ support? >+# >+# The use_dlz flag is set to no. If one of the DLZ drivers is selected >+# for build the use_dlz flag will be set to yes >+# >+ >+use_dlz=no >+ >+# >+# was --with-dlz-postgres specified? >+# >+ >+echo $ac_n "checking for Postgres DLZ driver""... $ac_c" 1>&6 >+echo "configure:2293: checking for Postgres DLZ driver" >&5 >+# Check whether --with-dlz_postgres or --without-dlz_postgres was given. >+if test "${with_dlz_postgres+set}" = set; then >+ withval="$with_dlz_postgres" >+ use_dlz_postgres="$withval" >+else >+ use_dlz_postgres="no" >+fi >+ >+ >+case "$use_dlz_postgres" in >+ no) >+ echo "$ac_t""no" 1>&6 >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ if test "$use_dlz_postgres" = "yes" >+ then >+ # User did not specify a path - guess it >+ pgdirs="/usr /usr/local /usr/local/pgsql /usr/pkg" >+ for d in $pgdirs >+ do >+ if test -f $d/include/libpq-fe.h >+ then >+ use_dlz_postgres=$d >+ break >+ fi >+ done >+ if test "$use_dlz_postgres" = "yes" >+ then >+ echo "$ac_t""not found" 1>&6 >+ { echo "configure: error: PostgreSQL was not found in any of $pgdirs; use --with-dlz-postgres=/path" 1>&2; exit 1; } >+ fi >+ fi >+ USE_DLZ_POSTGRES='-DDLZ_POSTGRES' >+ DLZ_POSTGRES_INC="-I$use_dlz_postgres/include" >+ DLZ_POSTGRES_LIBS="-L$use_dlz_postgres/lib -lpq" >+ echo "$ac_t""using PostgreSQL from $use_dlz_postgres/lib and $use_dlz_postgres/include" 1>&6 >+ ;; >+esac >+ >+ >+ >+ >+ >+ >+ >+# >+# was --with-dlz-mysql specified? >+# >+ >+echo $ac_n "checking for MySQL DLZ driver""... $ac_c" 1>&6 >+echo "configure:2346: checking for MySQL DLZ driver" >&5 >+# Check whether --with-dlz_mysql or --without-dlz_mysql was given. >+if test "${with_dlz_mysql+set}" = set; then >+ withval="$with_dlz_mysql" >+ use_dlz_mysql="$withval" >+else >+ use_dlz_mysql="no" >+fi >+ >+ >+case "$use_dlz_mysql" in >+ no) >+ echo "$ac_t""no" 1>&6 >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ if test "$use_dlz_mysql" = "yes" >+ then >+ # User did not specify a path - guess it >+ mysqldirs="/usr /usr/local /usr/local/mysql /usr/pkg" >+ for d in $mysqldirs >+ do >+ if test -f $d/include/mysql/mysql.h >+ then >+ use_dlz_mysql=$d >+ break >+ fi >+ done >+ if test "$use_dlz_mysql" = "yes" >+ then >+ echo "$ac_t""not found" 1>&6 >+ { echo "configure: error: MySQL was not found in any of $mysqldirs; use --with-dlz-mysql=/path" 1>&2; exit 1; } >+ fi >+ fi >+ USE_DLZ_MYSQL='-DDLZ_MYSQL' >+ DLZ_MYSQL_INC="-I$use_dlz_mysql/include/mysql" >+ DLZ_MYSQL_LIBS="-L$use_dlz_mysql/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm" >+ echo "$ac_t""using mysql from $use_dlz_mysql/lib/mysql and $use_dlz_mysql/include/mysql" 1>&6 >+ ;; >+esac >+ >+ >+ >+ >+ >+ >+# >+# was --with-dlz-bdb specified? >+# >+ >+echo $ac_n "checking for Berkeley DB DLZ driver""... $ac_c" 1>&6 >+echo "configure:2398: checking for Berkeley DB DLZ driver" >&5 >+# Check whether --with-dlz_bdb or --without-dlz_bdb was given. >+if test "${with_dlz_bdb+set}" = set; then >+ withval="$with_dlz_bdb" >+ use_dlz_bdb="$withval" >+else >+ use_dlz_bdb="no" >+fi >+ >+ >+case "$use_dlz_bdb" in >+ no) >+ echo "$ac_t""no" 1>&6 >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ #set DLZ_BDB_UTIL to "dlzbdb" so that it is built too >+ DLZ_BDB_UTIL="dlzbdb" >+ if test "$use_dlz_bdb" = "yes" >+ then >+ # User did not specify a path - guess it >+ bdbdirs="/usr /usr/local /usr/pkg" >+ for d in $bdbdirs >+ do >+ if test -f $d/include/db.h >+ then >+ use_dlz_bdb=$d >+ DLZ_BDB_INCDIR=$use_dlz_bdb/include >+ DLB_BDB_LIB="-ldb" >+ break >+ fi >+ done >+ if test "$use_dlz_bdb" = "yes" >+ then >+ echo "$ac_t""not found" 1>&6 >+ { echo "configure: error: Berkeley DB was not found in any of $bdbdirs; use --with-dlz-bdb=/path" 1>&2; exit 1; } >+ fi >+ # if the user specified a path try a few variations of the path >+ # for the include and library dirs >+ elif test -d "$use_dlz_bdb" >+ then >+ # set both to yes, so we can check them later >+ DLZ_BDB_INCDIR="yes" >+ DLZ_BDB_LIB="yes" >+ >+ # check other locations for includes. >+ bdb_incdirs="/ /db41/ /db4/ /db/" >+ for d in $bdb_incdirs >+ do >+ if test -f $use_dlz_bdb/include${d}db.h >+ then >+ DLZ_BDB_INCDIR=$use_dlz_bdb/include${d} >+ break >+ fi >+ done >+ >+ if test "$DLZ_BDB_INCDIR" = "yes" >+ then >+ echo "$ac_t""not found" 1>&6 >+ { echo "configure: error: Berkeley DB header was not found in $use_dlz_bdb/include, \ >+$use_dlz_bdb/include/db41, $use_dlz_bdb/include/db4 or $use_dlz_bdb/include/db" 1>&2; exit 1; } >+ fi >+ >+ # look for libname other than libdb.so >+ bdb_libnames="db41 db-4.1 db" >+ for d in $bdb_libnames >+ do >+ if test -f $use_dlz_bdb/lib/lib${d}.so >+ then >+ DLZ_BDB_LIB="-l${d}" >+ fi >+ done >+ >+ if test "$DLZ_BDB_LIB" = "yes" >+ then >+ echo "$ac_t""not found" 1>&6 >+ { echo "configure: error: Berkeley DB library libdb41.so, libdb-4.1.so or libdb.so could not be found \ >+in $use_dlz_bdb/lib" 1>&2; exit 1; } >+ fi >+ >+ >+ else >+ echo "$ac_t""not found" 1>&6 >+ { echo "configure: error: Path $use_dlz_bdb does not exist" 1>&2; exit 1; } >+ >+ fi >+ >+ USE_DLZ_BDB='-DDLZ_BDB' >+ DLZ_BDB_INC="-I$DLZ_BDB_INCDIR" >+ DLZ_BDB_LIBS="-L${use_dlz_bdb}/lib ${DLZ_BDB_LIB}" >+ echo "$ac_t""using Berkeley DB from $use_dlz_bdb/lib and $DLZ_BDB_INCDIR" 1>&6 >+ ;; >+esac >+ >+ >+ >+ >+ >+ >+ >+# >+# was --with-dlz-filesystem specified? >+# >+ >+echo $ac_n "checking for file system DLZ driver""... $ac_c" 1>&6 >+echo "configure:2504: checking for file system DLZ driver" >&5 >+# Check whether --with-dlz_filesystem or --without-dlz_filesystem was given. >+if test "${with_dlz_filesystem+set}" = set; then >+ withval="$with_dlz_filesystem" >+ use_dlz_filesystem="$withval" >+else >+ use_dlz_filesystem="no" >+fi >+ >+ >+case "$use_dlz_filesystem" in >+ no) >+ echo "$ac_t""no" 1>&6 >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ USE_DLZ_FILESYSTEM='-DDLZ_FILESYSTEM' >+ echo "$ac_t""yes" 1>&6 >+ ;; >+esac >+ >+ >+ >+ >+# >+# was --with-dlz-ldap specified? >+# >+ >+echo $ac_n "checking for LDAP DLZ driver""... $ac_c" 1>&6 >+echo "configure:2534: checking for LDAP DLZ driver" >&5 >+# Check whether --with-dlz_ldap or --without-dlz_ldap was given. >+if test "${with_dlz_ldap+set}" = set; then >+ withval="$with_dlz_ldap" >+ use_dlz_ldap="$withval" >+else >+ use_dlz_ldap="no" >+fi >+ >+ >+case "$use_dlz_ldap" in >+ no) >+ echo "$ac_t""no" 1>&6 >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ if test "$use_dlz_ldap" = "yes" >+ then >+ # User did not specify a path - guess it >+ ldapdirs="/usr /usr/local /usr/pkg" >+ for d in $ldapdirs >+ do >+ if test -f $d/include/ldap.h >+ then >+ use_dlz_ldap=$d >+ break >+ fi >+ done >+ if test "$use_dlz_ldap" = "yes" >+ then >+ echo "$ac_t""not found" 1>&6 >+ { echo "configure: error: LDAP headers were not found in any of $ldapdirs; use --with-dlz-ldap=/path" 1>&2; exit 1; } >+ fi >+ fi >+ USE_DLZ_LDAP='-DDLZ_LDAP' >+ DLZ_LDAP_INC="-I$use_dlz_ldap/include" >+ DLZ_LDAP_LIBS="-L$use_dlz_ldap/lib -lldap -llber" >+ echo "$ac_t""using LDAP from $use_dlz_ldap/lib and $use_dlz_ldap/include" 1>&6 >+ ;; >+esac >+ >+ >+ >+ >+ >+ >+ >+# >+# was --with-dlz-odbc specified? >+# >+ >+echo $ac_n "checking for ODBC DLZ driver""... $ac_c" 1>&6 >+echo "configure:2587: checking for ODBC DLZ driver" >&5 >+# Check whether --with-dlz_odbc or --without-dlz_odbc was given. >+if test "${with_dlz_odbc+set}" = set; then >+ withval="$with_dlz_odbc" >+ use_dlz_odbc="$withval" >+else >+ use_dlz_odbc="no" >+fi >+ >+ >+case "$use_dlz_odbc" in >+ no) >+ echo "$ac_t""no" 1>&6 >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ if test "$use_dlz_odbc" = "yes" >+ then >+ # User did not specify a path - guess it >+ odbcdirs="/usr /usr/local /usr/pkg" >+ for d in $odbcdirs >+ do >+ if test -f $d/include/sql.h >+ then >+ use_dlz_odbc=$d >+ break >+ fi >+ done >+ if test "$use_dlz_odbc" = "yes" >+ then >+ echo "$ac_t""not found" 1>&6 >+ { echo "configure: error: ODBC headers were not found in any of $odbcdirs; use --with-dlz-odbc=/path" 1>&2; exit 1; } >+ fi >+ fi >+ USE_DLZ_ODBC='-DDLZ_ODBC' >+ DLZ_ODBC_INC="-I$use_dlz_odbc/include" >+ DLZ_ODBC_LIBS="-L$use_dlz_odbc/lib -lodbc" >+ echo "$ac_t""using ODBC from $use_dlz_odbc/lib and $use_dlz_odbc/include" 1>&6 >+ ;; >+esac >+ >+ >+ >+ >+ >+ >+ >+# >+# was --with-dlz-stub specified? >+# >+ >+echo $ac_n "checking for stub DLZ driver""... $ac_c" 1>&6 >+echo "configure:2640: checking for stub DLZ driver" >&5 >+# Check whether --with-dlz_stub or --without-dlz_stub was given. >+if test "${with_dlz_stub+set}" = set; then >+ withval="$with_dlz_stub" >+ use_dlz_stub="$withval" >+else >+ use_dlz_stub="no" >+fi >+ >+ >+case "$use_dlz_stub" in >+ no) >+ echo "$ac_t""no" 1>&6 >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ USE_DLZ_STUB='-DDLZ_STUB' >+ echo "$ac_t""yes" 1>&6 >+ ;; >+esac >+ >+ >+ >+ >+# >+# If any DLZ driver is built, the DLZ core is built too. >+# >+ >+echo $ac_n "checking for DLZ""... $ac_c" 1>&6 >+echo "configure:2670: checking for DLZ" >&5 >+ >+# check if any DLZ driver was built >+if test "$use_dlz" = "yes" >+then >+ echo "$ac_t""yes" 1>&6 >+ USE_DLZ="-DDLZ" >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+ >+ >+# >+# was --with-openssl specified? >+# >+echo $ac_n "checking for OpenSSL library""... $ac_c" 1>&6 >+echo "configure:2688: checking for OpenSSL library" >&5 >+# Check whether --with-openssl or --without-openssl was given. >+if test "${with_openssl+set}" = set; then >+ withval="$with_openssl" >+ use_openssl="$withval" >+else >+ use_openssl="no" >+fi >+ >+ >+case "$use_openssl" in >+ no) >+ echo "$ac_t""no" 1>&6 >+ DST_OPENSSL_INC="" >+ USE_OPENSSL="" >+ ;; >+ *) >+ if test "$use_openssl" = "yes" >+ then >+ # User did not specify a path - guess it >+ openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg" >+ for d in $openssldirs >+ do >+ if test -f $d/include/openssl/opensslv.h >+ then >+ use_openssl=$d >+ break >+ fi >+ done >+ if test "$use_openssl" = "yes" >+ then >+ echo "$ac_t""not found" 1>&6 >+ { echo "configure: error: OpenSSL was not found in any of $openssldirs; use --with-openssl=/path" 1>&2; exit 1; } >+ fi >+ fi >+ USE_OPENSSL='-DOPENSSL' >+ DST_OPENSSL_INC="-I$use_openssl/include" >+ DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto" >+ echo "$ac_t""using openssl from $use_openssl/lib and $use_openssl/include" 1>&6 >+ >+ saved_cflags="$CFLAGS" >+ saved_libs="$LIBS" >+ CFLAGS="$CFLAGS $DST_OPENSSL_INC" >+ LIBS="$LIBS $DNS_OPENSSL_LIBS" >+ echo $ac_n "checking whether linking with OpenSSL works""... $ac_c" 1>&6 >+echo "configure:2733: checking whether linking with OpenSSL works" >&5 >+ if test "$cross_compiling" = yes; then >+ echo "$ac_t""assuming it does work on target platform" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 2738 "configure" >+#include "confdefs.h" >+ >+#include <openssl/err.h> >+int main() { >+ ERR_clear_error(); >+ return (0); >+} >+ >+EOF >+if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ echo "$ac_t""yes" 1>&6 >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ echo "$ac_t""no" 1>&6 >+ { echo "configure: error: Could not run test program using OpenSSL from >+$use_openssl/lib and $use_openssl/include. >+Please check the argument to --with-openssl and your >+shared library configuration (e.g., LD_LIBRARY_PATH)." 1>&2; exit 1; } >+fi >+rm -fr conftest* >+fi >+ >+ >+ echo $ac_n "checking whether linking with OpenSSL requires -ldl""... $ac_c" 1>&6 >+echo "configure:2766: checking whether linking with OpenSSL requires -ldl" >&5 >+ cat > conftest.$ac_ext <<EOF >+#line 2768 "configure" >+#include "confdefs.h" >+ >+#include <openssl/err.h> >+int main() { >+ DSO_METHOD_dlfcn(); >+; return 0; } >+EOF >+if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ LIBS="$LIBS -ldl" >+ cat > conftest.$ac_ext <<EOF >+#line 2785 "configure" >+#include "confdefs.h" >+ >+#include <openssl/err.h> >+ >+int main() { >+ DSO_METHOD_dlfcn(); >+; return 0; } >+EOF >+if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ DNS_OPENSSL_LIBS="$DNS_OPENSSL_LIBS -ldl" >+ >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""unknown" 1>&6 >+ { echo "configure: error: OpenSSL has unsupported dynamic loading" 1>&2; exit 1; } >+fi >+rm -f conftest* >+ >+fi >+rm -f conftest* >+ >+# >+# OpenSSLDie is new with CERT CS-2002-23. If we see it we have may >+# have a patched library otherwise check that we are greater than >+# the fixed versions >+# >+ echo $ac_n "checking for OpenSSLDie""... $ac_c" 1>&6 >+echo "configure:2817: checking for OpenSSLDie" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_OpenSSLDie'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 2822 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char OpenSSLDie(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char OpenSSLDie(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_OpenSSLDie) || defined (__stub___OpenSSLDie) >+choke me >+#else >+OpenSSLDie(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_OpenSSLDie=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_OpenSSLDie=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'OpenSSLDie`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ echo $ac_n "checking OpenSSL library version""... $ac_c" 1>&6 >+echo "configure:2860: checking OpenSSL library version" >&5 >+ if test "$cross_compiling" = yes; then >+ echo "$ac_t""assuming target platform has compatible version" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 2865 "configure" >+#include "confdefs.h" >+ >+#include <stdio.h> >+#include <openssl/opensslv.h> >+int main() { >+ if (OPENSSL_VERSION_NUMBER >= 0x0090581fL) >+ return (0); >+ printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n", >+ OPENSSL_VERSION_NUMBER); >+ printf("Require OPENSSL_VERSION_NUMBER 0x0090581f or greater\n\n"); >+ return (1); >+} >+ >+EOF >+if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ echo "$ac_t""ok" 1>&6 >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ echo "$ac_t""not compatible" 1>&6 >+ { echo "configure: error: you need OpenSSL 0.9.5a or newer" 1>&2; exit 1; } >+fi >+rm -fr conftest* >+fi >+ >+ >+else >+ echo "$ac_t""no" 1>&6 >+echo "$ac_t""did not find fixes for CERT CA-2002-23" 1>&6 >+ echo $ac_n "checking OpenSSL library version""... $ac_c" 1>&6 >+echo "configure:2898: checking OpenSSL library version" >&5 >+ if test "$cross_compiling" = yes; then >+ echo "$ac_t""assuming target platform has compatible version" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 2903 "configure" >+#include "confdefs.h" >+ >+#include <stdio.h> >+#include <openssl/opensslv.h> >+int main() { >+ if ((OPENSSL_VERSION_NUMBER >= 0x0090605fL && >+ OPENSSL_VERSION_NUMBER < 0x009070000L) || >+ OPENSSL_VERSION_NUMBER >= 0x00907003L) >+ return (0); >+ printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n", >+ OPENSSL_VERSION_NUMBER); >+ printf("Require OPENSSL_VERSION_NUMBER 0x0090605f or greater (0.9.6e)\n" >+ "Require OPENSSL_VERSION_NUMBER 0x00907003 or greater (0.9.7-beta2)\n\n"); >+ return (1); >+} >+ >+EOF >+if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ echo "$ac_t""ok" 1>&6 >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ echo "$ac_t""not compatible" 1>&6 >+ { echo "configure: error: you need OpenSSL 0.9.6e/0.9.7-beta2 (or newer): CERT CA-2002-23" 1>&2; exit 1; } >+fi >+rm -fr conftest* >+fi >+ >+fi >+ >+ CFLAGS="$saved_cflags" >+ LIBS="$saved_libs" >+ ;; >+esac >+ >+# >+# This would include the system openssl path (and linker options to use >+# it as needed) if it is found. >+# >+ >+ >+ >+ >+ >+# >+# was --with-gssapi specified? >+# >+#AC_MSG_CHECKING(for GSSAPI library) >+#AC_ARG_WITH(gssapi, >+#[ --with-gssapi=PATH Specify path for system-supplied GSSAPI], >+# use_gssapi="$withval", use_gssapi="no") >+# >+#case "$use_gssapi" in >+# no) >+# USE_GSSAPI='' >+# DST_GSSAPI_INC='' >+# DNS_GSSAPI_LIBS='' >+# AC_MSG_RESULT(not specified) >+# ;; >+# yes) >+# AC_MSG_ERROR([--with-gssapi must specify a path]) >+# ;; >+# *) >+# USE_GSSAPI='-DGSSAPI' >+# DST_GSSAPI_INC="-I$use_gssapi/include" >+# DNS_GSSAPI_LIBS="-L$use_gssapi/lib -lgssapi_krb5" >+# AC_MSG_RESULT(using gssapi from $use_gssapi/lib and $use_gssapi/include) >+# ;; >+#esac >+ >+USE_GSSAPI='' >+DST_GSSAPI_INC='' >+DNS_GSSAPI_LIBS='' >+ >+ >+ >+ >+ >+# >+# was --with-randomdev specified? >+# >+echo $ac_n "checking for random device""... $ac_c" 1>&6 >+echo "configure:2988: checking for random device" >&5 >+# Check whether --with-randomdev or --without-randomdev was given. >+if test "${with_randomdev+set}" = set; then >+ withval="$with_randomdev" >+ use_randomdev="$withval" >+else >+ use_randomdev="unspec" >+fi >+ >+ >+case "$use_randomdev" in >+ unspec) >+ case "$host" in >+ *-openbsd*) >+ devrandom=/dev/srandom >+ ;; >+ *) >+ devrandom=/dev/random >+ ;; >+ esac >+ echo "$ac_t""$devrandom" 1>&6 >+ >+ac_safe=`echo "$devrandom" | sed 'y%./+-%__p_%'` >+echo $ac_n "checking for $devrandom""... $ac_c" 1>&6 >+echo "configure:3012: checking for $devrandom" >&5 >+if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test "$cross_compiling" = yes; then >+ { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } >+else >+ if test -r $devrandom; then >+ eval "ac_cv_file_$ac_safe=yes" >+ else >+ eval "ac_cv_file_$ac_safe=no" >+ fi >+fi >+fi >+if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<EOF >+#define PATH_RANDOMDEV "$devrandom" >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+ >+fi >+ >+ ;; >+ yes) >+ { echo "configure: error: --with-randomdev must specify a path" 1>&2; exit 1; } >+ ;; >+ no) >+ echo "$ac_t""disabled" 1>&6 >+ ;; >+ *) >+ cat >> confdefs.h <<EOF >+#define PATH_RANDOMDEV "$use_randomdev" >+EOF >+ >+ echo "$ac_t""using "$use_randomdev"" 1>&6 >+ ;; >+esac >+ >+# >+# Begin pthreads checking. >+# >+# First, decide whether to use multithreading or not. >+# >+# Enable multithreading by default on systems where it is known >+# to work well, and where debugging of multithreaded programs >+# is supported. >+# >+ >+echo $ac_n "checking whether to build with thread support""... $ac_c" 1>&6 >+echo "configure:3064: checking whether to build with thread support" >&5 >+ >+case $host in >+*-dec-osf*) >+ use_threads=true ;; >+*-solaris2.[0-6]) >+ # Thread signals are broken on Solaris 2.6; they are sometimes >+ # delivered to the wrong thread. >+ use_threads=false ;; >+*-solaris*) >+ use_threads=true ;; >+*-ibm-aix*) >+ use_threads=true ;; >+*-hp-hpux10*) >+ use_threads=false ;; >+*-hp-hpux11*) >+ use_threads=true ;; >+*-sgi-irix*) >+ use_threads=true ;; >+*-sco-sysv*uw*) >+ # UnixWare >+ use_threads=false ;; >+*-netbsd*) >+ # Socket I/O optimizations introduced in 9.2 expose a >+ # bug in unproven-pthreads; see PR #12650 >+ use_threads=false ;; >+*-openbsd*) >+ # OpenBSD users have reported that named dumps core on >+ # startup when built with threads. >+ use_threads=false ;; >+*-freebsd*) >+ use_threads=false ;; >+*-bsdi*) >+ # Thread signals do not appear to work reliably on BSDI. >+ use_threads=false ;; >+*-linux*) >+ # Threads are disabled on Linux by default because most >+ # Linux kernels produce unusable core dumps from multithreaded >+ # programs, and because of limitations in setuid(). >+ use_threads=false ;; >+*) >+ use_threads=false ;; >+esac >+ >+# Check whether --enable-threads or --disable-threads was given. >+if test "${enable_threads+set}" = set; then >+ enableval="$enable_threads" >+ : >+fi >+ >+case "$enable_threads" in >+ yes) >+ use_threads=true >+ ;; >+ no) >+ use_threads=false >+ ;; >+ '') >+ # Use system-dependent default >+ ;; >+ *) >+ { echo "configure: error: --enable-threads takes yes or no" 1>&2; exit 1; } >+ ;; >+esac >+ >+if $use_threads >+then >+ echo "$ac_t""yes" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+if $use_threads >+then >+ # >+ # Search for / configure pthreads in a system-dependent fashion. >+ # >+ case "$host" in >+ *-netbsd*) >+ # NetBSD has multiple pthreads implementations. The >+ # recommended one to use is "unproven-pthreads". The >+ # older "mit-pthreads" may also work on some NetBSD >+ # versions. The PTL2 thread library does not >+ # currently work with bind9, but can be chosen with >+ # the --with-ptl2 option for those who wish to >+ # experiment with it. >+ CC="gcc" >+ echo $ac_n "checking which NetBSD thread library to use""... $ac_c" 1>&6 >+echo "configure:3152: checking which NetBSD thread library to use" >&5 >+ >+ # Check whether --with-ptl2 or --without-ptl2 was given. >+if test "${with_ptl2+set}" = set; then >+ withval="$with_ptl2" >+ use_ptl2="$withval" >+else >+ use_ptl2="no" >+fi >+ >+ >+ : ${LOCALBASE:=/usr/pkg} >+ >+ if test "X$use_ptl2" = "Xyes" >+ then >+ echo "$ac_t""PTL2" 1>&6 >+ echo "configure: warning: linking with PTL2 is highly experimental and not expected to work" 1>&2 >+ CC=ptlgcc >+ else >+ if test ! -d $LOCALBASE/pthreads >+ then >+ echo "$ac_t""none" 1>&6 >+ { echo "configure: error: "could not find thread libraries"" 1>&2; exit 1; } >+ fi >+ >+ if $use_threads >+ then >+ echo "$ac_t""mit-pthreads/unproven-pthreads" 1>&6 >+ pkg="$LOCALBASE/pthreads" >+ lib1="-L$pkg/lib -Wl,-R$pkg/lib" >+ lib2="-lpthread -lm -lgcc -lpthread" >+ LIBS="$lib1 $lib2 $LIBS" >+ CPPFLAGS="$CPPFLAGS -I$pkg/include" >+ STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include" >+ fi >+ fi >+ ;; >+ *) >+ echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 >+echo "configure:3191: checking for pthread_create in -lpthread" >&5 >+ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lpthread $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 3199 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char pthread_create(); >+ >+int main() { >+pthread_create() >+; return 0; } >+EOF >+if { (eval echo configure:3210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \ >+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_lib 1 >+EOF >+ >+ LIBS="-lpthread $LIBS" >+ >+else >+ echo "$ac_t""no" 1>&6 >+echo $ac_n "checking for __pthread_create in -lpthread""... $ac_c" 1>&6 >+echo "configure:3236: checking for __pthread_create in -lpthread" >&5 >+ac_lib_var=`echo pthread'_'__pthread_create | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lpthread $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 3244 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char __pthread_create(); >+ >+int main() { >+__pthread_create() >+; return 0; } >+EOF >+if { (eval echo configure:3255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/^a-zA-Z0-9_/_/g' \ >+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_lib 1 >+EOF >+ >+ LIBS="-lpthread $LIBS" >+ >+else >+ echo "$ac_t""no" 1>&6 >+echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 >+echo "configure:3281: checking for __pthread_create_system in -lpthread" >&5 >+ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lpthread $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 3289 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char __pthread_create_system(); >+ >+int main() { >+__pthread_create_system() >+; return 0; } >+EOF >+if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/^a-zA-Z0-9_/_/g' \ >+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_lib 1 >+EOF >+ >+ LIBS="-lpthread $LIBS" >+ >+else >+ echo "$ac_t""no" 1>&6 >+echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 >+echo "configure:3326: checking for pthread_create in -lc_r" >&5 >+ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lc_r $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 3334 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char pthread_create(); >+ >+int main() { >+pthread_create() >+; return 0; } >+EOF >+if { (eval echo configure:3345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/^a-zA-Z0-9_/_/g' \ >+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_lib 1 >+EOF >+ >+ LIBS="-lc_r $LIBS" >+ >+else >+ echo "$ac_t""no" 1>&6 >+echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 >+echo "configure:3371: checking for pthread_create in -lc" >&5 >+ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lc $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 3379 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char pthread_create(); >+ >+int main() { >+pthread_create() >+; return 0; } >+EOF >+if { (eval echo configure:3390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_lib=HAVE_LIB`echo c | sed -e 's/^a-zA-Z0-9_/_/g' \ >+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_lib 1 >+EOF >+ >+ LIBS="-lc $LIBS" >+ >+else >+ echo "$ac_t""no" 1>&6 >+{ echo "configure: error: "could not find thread libraries"" 1>&2; exit 1; } >+fi >+ >+fi >+ >+fi >+ >+fi >+ >+fi >+ >+ ;; >+ esac >+fi >+ >+if $use_threads >+then >+ # >+ # We'd like to use sigwait() too >+ # >+ echo $ac_n "checking for sigwait in -lc""... $ac_c" 1>&6 >+echo "configure:3436: checking for sigwait in -lc" >&5 >+ac_lib_var=`echo c'_'sigwait | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lc $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 3444 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char sigwait(); >+ >+int main() { >+sigwait() >+; return 0; } >+EOF >+if { (eval echo configure:3455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_SIGWAIT 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+echo $ac_n "checking for sigwait in -lpthread""... $ac_c" 1>&6 >+echo "configure:3477: checking for sigwait in -lpthread" >&5 >+ac_lib_var=`echo pthread'_'sigwait | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lpthread $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 3485 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char sigwait(); >+ >+int main() { >+sigwait() >+; return 0; } >+EOF >+if { (eval echo configure:3496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_SIGWAIT 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+echo $ac_n "checking for _Psigwait in -lpthread""... $ac_c" 1>&6 >+echo "configure:3518: checking for _Psigwait in -lpthread" >&5 >+ac_lib_var=`echo pthread'_'_Psigwait | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lpthread $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 3526 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char _Psigwait(); >+ >+int main() { >+_Psigwait() >+; return 0; } >+EOF >+if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_SIGWAIT 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+fi >+ >+ >+fi >+ >+ >+ echo $ac_n "checking for pthread_attr_getstacksize""... $ac_c" 1>&6 >+echo "configure:3567: checking for pthread_attr_getstacksize" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_getstacksize'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 3572 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char pthread_attr_getstacksize(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char pthread_attr_getstacksize(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_pthread_attr_getstacksize) || defined (__stub___pthread_attr_getstacksize) >+choke me >+#else >+pthread_attr_getstacksize(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_pthread_attr_getstacksize=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_pthread_attr_getstacksize=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'pthread_attr_getstacksize`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+ # >+ # Additional OS-specific issues related to pthreads and sigwait. >+ # >+ case "$host" in >+ # >+ # One more place to look for sigwait. >+ # >+ *-freebsd*) >+ echo $ac_n "checking for sigwait in -lc_r""... $ac_c" 1>&6 >+echo "configure:3627: checking for sigwait in -lc_r" >&5 >+ac_lib_var=`echo c_r'_'sigwait | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lc_r $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 3635 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char sigwait(); >+ >+int main() { >+sigwait() >+; return 0; } >+EOF >+if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_SIGWAIT 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ ;; >+ # >+ # BSDI 3.0 through 4.0.1 needs pthread_init() to be >+ # called before certain pthreads calls. This is deprecated >+ # in BSD/OS 4.1. >+ # >+ *-bsdi3.*|*-bsdi4.0*) >+ cat >> confdefs.h <<\EOF >+#define NEED_PTHREAD_INIT 1 >+EOF >+ >+ ;; >+ # >+ # LinuxThreads requires some changes to the way we >+ # deal with signals. >+ # >+ *-linux*) >+ cat >> confdefs.h <<\EOF >+#define HAVE_LINUXTHREADS 1 >+EOF >+ >+ ;; >+ # >+ # Ensure the right sigwait() semantics on Solaris and make >+ # sure we call pthread_setconcurrency. >+ # >+ *-solaris*) >+ cat >> confdefs.h <<\EOF >+#define _POSIX_PTHREAD_SEMANTICS 1 >+EOF >+ >+ echo $ac_n "checking for pthread_setconcurrency""... $ac_c" 1>&6 >+echo "configure:3701: checking for pthread_setconcurrency" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_pthread_setconcurrency'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 3706 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char pthread_setconcurrency(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char pthread_setconcurrency(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_pthread_setconcurrency) || defined (__stub___pthread_setconcurrency) >+choke me >+#else >+pthread_setconcurrency(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_pthread_setconcurrency=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_pthread_setconcurrency=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'pthread_setconcurrency`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define CALL_PTHREAD_SETCONCURRENCY 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ ;; >+ # >+ # UnixWare does things its own way. >+ # >+ *-sco-sysv*uw*) >+ cat >> confdefs.h <<\EOF >+#define HAVE_UNIXWARE_SIGWAIT 1 >+EOF >+ >+ ;; >+ esac >+ >+ # >+ # Look for sysconf to allow detection of the number of processors. >+ # >+ echo $ac_n "checking for sysconf""... $ac_c" 1>&6 >+echo "configure:3767: checking for sysconf" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 3772 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char sysconf(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char sysconf(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_sysconf) || defined (__stub___sysconf) >+choke me >+#else >+sysconf(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:3795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_sysconf=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_sysconf=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'sysconf`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_SYSCONF 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+ if test "X$GCC" = "Xyes"; then >+ case "$host" in >+ *-freebsd*) >+ CC="$CC -pthread" >+ CCOPT="$CCOPT -pthread" >+ STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" >+ ;; >+ *-openbsd*) >+ CC="$CC -pthread" >+ CCOPT="$CCOPT -pthread" >+ ;; >+ *-solaris*) >+ LIBS="$LIBS -lthread" >+ ;; >+ *-ibm-aix*) >+ STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" >+ ;; >+ esac >+ else >+ case $host in >+ *-dec-osf*) >+ CC="$CC -pthread" >+ CCOPT="$CCOPT -pthread" >+ ;; >+ *-solaris*) >+ CC="$CC -mt" >+ CCOPT="$CCOPT -mt" >+ ;; >+ *-ibm-aix*) >+ STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" >+ ;; >+ *-sco-sysv*uw*) >+ CC="$CC -Kthread" >+ CCOPT="$CCOPT -Kthread" >+ ;; >+ esac >+ fi >+ ALWAYS_DEFINES="-D_REENTRANT" >+ ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1" >+ thread_dir=pthreads >+else >+ ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS" >+ thread_dir=nothreads >+ ALWAYS_DEFINES="" >+fi >+ >+ >+ >+ >+ISC_THREAD_DIR=$thread_dir >+ >+ >+# >+# flockfile is usually provided by pthreads, but we may want to use it >+# even if compiled with --disable-threads. getc_unlocked might also not >+# be defined. >+# >+echo $ac_n "checking for flockfile""... $ac_c" 1>&6 >+echo "configure:3876: checking for flockfile" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_flockfile'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 3881 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char flockfile(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char flockfile(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_flockfile) || defined (__stub___flockfile) >+choke me >+#else >+flockfile(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_flockfile=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_flockfile=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'flockfile`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_FLOCKFILE 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+echo $ac_n "checking for getc_unlocked""... $ac_c" 1>&6 >+echo "configure:3927: checking for getc_unlocked" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_getc_unlocked'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 3932 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char getc_unlocked(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char getc_unlocked(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_getc_unlocked) || defined (__stub___getc_unlocked) >+choke me >+#else >+getc_unlocked(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_getc_unlocked=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_getc_unlocked=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'getc_unlocked`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_GETCUNLOCKED 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+# >+# Indicate what the final decision was regarding threads. >+# >+echo $ac_n "checking whether to build with threads""... $ac_c" 1>&6 >+echo "configure:3982: checking whether to build with threads" >&5 >+if $use_threads; then >+ echo "$ac_t""yes" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+# >+# End of pthreads stuff. >+# >+ >+# >+# Additional compiler settings. >+# >+MKDEPCC="$CC" >+MKDEPCFLAGS="-M" >+IRIX_DNSSEC_WARNINGS_HACK="" >+ >+if test "X$GCC" = "Xyes"; then >+ STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat" >+else >+ case $host in >+ *-dec-osf*) >+ CC="$CC -std" >+ CCOPT="$CCOPT -std" >+ MKDEPCC="$CC" >+ ;; >+ *-hp-hpux*) >+ CC="$CC -Ae -z" >+ # The version of the C compiler that constantly warns about >+ # 'const' as well as alignment issues is unfortunately not >+ # able to be discerned via the version of the operating >+ # system, nor does cc have a version flag. >+ case "`$CC +W 123 2>&1`" in >+ *Unknown?option*) >+ STD_CWARNINGS="+w1" >+ ;; >+ *) >+ # Turn off the pointlessly noisy warnings. >+ STD_CWARNINGS="+w1 +W 474,530" >+ ;; >+ esac >+ CCOPT="$CCOPT -Ae -z" >+ LIBS="-Wl,+vnocompatwarnings $LIBS" >+ MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP' >+ ;; >+ *-sgi-irix*) >+ STD_CWARNINGS="-fullwarn -woff 1209" >+ # >+ # Silence more than 250 instances of >+ # "prototyped function redeclared without prototype" >+ # and 11 instances of >+ # "variable ... was set but never used" >+ # from lib/dns/sec/openssl. >+ # >+ IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552" >+ ;; >+ *-solaris*) >+ MKDEPCFLAGS="-xM" >+ ;; >+ *-sco-sysv*uw*) >+ # UnixWare >+ CC="$CC -w" >+ ;; >+ esac >+fi >+ >+ >+ >+ >+ >+ >+# >+# NLS >+# >+echo $ac_n "checking for catgets""... $ac_c" 1>&6 >+echo "configure:4058: checking for catgets" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 4063 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char catgets(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char catgets(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_catgets) || defined (__stub___catgets) >+choke me >+#else >+catgets(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_catgets=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_catgets=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_CATGETS 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+# >+# -lxnet buys us one big porting headache... standards, gotta love 'em. >+# >+# AC_CHECK_LIB(xnet, socket, , >+# AC_CHECK_LIB(socket, socket) >+# AC_CHECK_LIB(nsl, inet_ntoa) >+# ) >+# >+# Use this for now, instead: >+# >+case "$host" in >+ mips-sgi-irix*) >+ ;; >+ *) >+ echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 >+echo "configure:4124: checking for socket in -lsocket" >&5 >+ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lsocket $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 4132 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char socket(); >+ >+int main() { >+socket() >+; return 0; } >+EOF >+if { (eval echo configure:4143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ >+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_lib 1 >+EOF >+ >+ LIBS="-lsocket $LIBS" >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 >+echo "configure:4171: checking for inet_ntoa in -lnsl" >&5 >+ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lnsl $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 4179 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char inet_ntoa(); >+ >+int main() { >+inet_ntoa() >+; return 0; } >+EOF >+if { (eval echo configure:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ >+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_lib 1 >+EOF >+ >+ LIBS="-lnsl $LIBS" >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ ;; >+esac >+ >+# >+# Purify support >+# >+echo $ac_n "checking whether to use purify""... $ac_c" 1>&6 >+echo "configure:4224: checking whether to use purify" >&5 >+# Check whether --with-purify or --without-purify was given. >+if test "${with_purify+set}" = set; then >+ withval="$with_purify" >+ use_purify="$withval" >+else >+ use_purify="no" >+fi >+ >+ >+case "$use_purify" in >+ no) >+ ;; >+ yes) >+ # Extract the first word of "purify", so it can be a program name with args. >+set dummy purify; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:4241: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_path_purify_path'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ case "$purify_path" in >+ /*) >+ ac_cv_path_purify_path="$purify_path" # Let the user override the test with a path. >+ ;; >+ ?:/*) >+ ac_cv_path_purify_path="$purify_path" # Let the user override the test with a dos path. >+ ;; >+ *) >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_path_purify_path="$ac_dir/$ac_word" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ test -z "$ac_cv_path_purify_path" && ac_cv_path_purify_path="purify" >+ ;; >+esac >+fi >+purify_path="$ac_cv_path_purify_path" >+if test -n "$purify_path"; then >+ echo "$ac_t""$purify_path" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ ;; >+ *) >+ purify_path="$use_purify" >+ ;; >+esac >+ >+case "$use_purify" in >+ no) >+ echo "$ac_t""no" 1>&6 >+ PURIFY="" >+ ;; >+ *) >+ if test -f $purify_path || test $purify_path = purify; then >+ echo "$ac_t""$purify_path" 1>&6 >+ PURIFYFLAGS="`echo $PURIFYOPTIONS`" >+ PURIFY="$purify_path $PURIFYFLAGS" >+ else >+ { echo "configure: error: $purify_path not found. >+ >+Please choose the proper path with the following command: >+ >+ configure --with-purify=PATH >+" 1>&2; exit 1; } >+ fi >+ ;; >+esac >+ >+ >+ >+# >+# GNU libtool support >+# >+# Check whether --with-libtool or --without-libtool was given. >+if test "${with_libtool+set}" = set; then >+ withval="$with_libtool" >+ use_libtool="$withval" >+else >+ use_libtool="no" >+fi >+ >+ >+case $use_libtool in >+ yes) >+ echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 >+echo "configure:4318: checking for Cygwin environment" >&5 >+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 4323 "configure" >+#include "confdefs.h" >+ >+int main() { >+ >+#ifndef __CYGWIN__ >+#define __CYGWIN__ __CYGWIN32__ >+#endif >+return __CYGWIN__; >+; return 0; } >+EOF >+if { (eval echo configure:4334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ ac_cv_cygwin=yes >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ ac_cv_cygwin=no >+fi >+rm -f conftest* >+rm -f conftest* >+fi >+ >+echo "$ac_t""$ac_cv_cygwin" 1>&6 >+CYGWIN= >+test "$ac_cv_cygwin" = yes && CYGWIN=yes >+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 >+echo "configure:4351: checking for mingw32 environment" >&5 >+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 4356 "configure" >+#include "confdefs.h" >+ >+int main() { >+return __MINGW32__; >+; return 0; } >+EOF >+if { (eval echo configure:4363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ ac_cv_mingw32=yes >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ ac_cv_mingw32=no >+fi >+rm -f conftest* >+rm -f conftest* >+fi >+ >+echo "$ac_t""$ac_cv_mingw32" 1>&6 >+MINGW32= >+test "$ac_cv_mingw32" = yes && MINGW32=yes >+# Check whether --enable-shared or --disable-shared was given. >+if test "${enable_shared+set}" = set; then >+ enableval="$enable_shared" >+ 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 >+else >+ enable_shared=yes >+fi >+ >+# Check whether --enable-static or --disable-static was given. >+if test "${enable_static+set}" = set; then >+ enableval="$enable_static" >+ 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 >+else >+ enable_static=yes >+fi >+ >+# Check whether --enable-fast-install or --disable-fast-install was given. >+if test "${enable_fast_install+set}" = set; then >+ enableval="$enable_fast_install" >+ p=${PACKAGE-default} >+case $enableval in >+yes) enable_fast_install=yes ;; >+no) enable_fast_install=no ;; >+*) >+ enable_fast_install=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_fast_install=yes >+ fi >+ done >+ IFS="$ac_save_ifs" >+ ;; >+esac >+else >+ enable_fast_install=yes >+fi >+ >+echo $ac_n "checking build system type""... $ac_c" 1>&6 >+echo "configure:4449: checking build system type" >&5 >+ >+build_alias=$build >+case "$build_alias" in >+NONE) >+ case $nonopt in >+ NONE) build_alias=$host_alias ;; >+ *) build_alias=$nonopt ;; >+ esac ;; >+esac >+ >+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` >+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` >+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` >+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` >+echo "$ac_t""$build" 1>&6 >+ >+# Check whether --with-gnu-ld or --without-gnu-ld was given. >+if test "${with_gnu_ld+set}" = set; then >+ withval="$with_gnu_ld" >+ test "$withval" = no || with_gnu_ld=yes >+else >+ with_gnu_ld=no >+fi >+ >+ac_prog=ld >+if test "$GCC" = yes; then >+ # Check if gcc -print-prog-name=ld gives a path. >+ echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 >+echo "configure:4478: checking for ld used by GCC" >&5 >+ case $host in >+ *-*-mingw*) >+ # gcc leaves a trailing carriage return which upsets mingw >+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; >+ *) >+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; >+ esac >+ case $ac_prog in >+ # Accept absolute paths. >+ [\\/]* | [A-Za-z]:[\\/]*) >+ re_direlt='/[^/][^/]*/\.\./' >+ # Canonicalize the path of ld >+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` >+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do >+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` >+ done >+ test -z "$LD" && LD="$ac_prog" >+ ;; >+ "") >+ # If it fails, then pretend we aren't using GCC. >+ ac_prog=ld >+ ;; >+ *) >+ # If it is relative, then search for the first ld in PATH. >+ with_gnu_ld=unknown >+ ;; >+ esac >+elif test "$with_gnu_ld" = yes; then >+ echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 >+echo "configure:4508: checking for GNU ld" >&5 >+else >+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 >+echo "configure:4511: checking for non-GNU ld" >&5 >+fi >+if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test -z "$LD"; then >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" >+ for ac_dir in $PATH; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then >+ lt_cv_path_LD="$ac_dir/$ac_prog" >+ # Check to see if the program is GNU ld. I'd rather use --version, >+ # but apparently some GNU ld's only accept -v. >+ # Break only if it was the GNU/non-GNU ld that we prefer. >+ if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then >+ test "$with_gnu_ld" != no && break >+ else >+ test "$with_gnu_ld" != yes && break >+ fi >+ fi >+ done >+ IFS="$ac_save_ifs" >+else >+ lt_cv_path_LD="$LD" # Let the user override the test with a path. >+fi >+fi >+ >+LD="$lt_cv_path_LD" >+if test -n "$LD"; then >+ echo "$ac_t""$LD" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } >+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 >+echo "configure:4546: checking if the linker ($LD) is GNU ld" >&5 >+if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ # I'd rather use --version here, but apparently some GNU ld's only accept -v. >+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then >+ lt_cv_prog_gnu_ld=yes >+else >+ lt_cv_prog_gnu_ld=no >+fi >+fi >+ >+echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6 >+with_gnu_ld=$lt_cv_prog_gnu_ld >+ >+ >+echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 >+echo "configure:4563: checking for $LD option to reload object files" >&5 >+if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ lt_cv_ld_reload_flag='-r' >+fi >+ >+echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 >+reload_flag=$lt_cv_ld_reload_flag >+test -n "$reload_flag" && reload_flag=" $reload_flag" >+ >+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 >+echo "configure:4575: checking for BSD-compatible nm" >&5 >+if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test -n "$NM"; then >+ # Let the user override the test. >+ lt_cv_path_NM="$NM" >+else >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" >+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do >+ test -z "$ac_dir" && ac_dir=. >+ tmp_nm=$ac_dir/${ac_tool_prefix}nm >+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then >+ # Check to see if the nm accepts a BSD-compat flag. >+ # Adding the `sed 1q' prevents false positives on HP-UX, which says: >+ # nm: unknown option "B" ignored >+ # Tru64's nm complains that /dev/null is an invalid object file >+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then >+ lt_cv_path_NM="$tmp_nm -B" >+ break >+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then >+ lt_cv_path_NM="$tmp_nm -p" >+ break >+ else >+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but >+ continue # so that we can try to find one that supports BSD flags >+ fi >+ fi >+ done >+ IFS="$ac_save_ifs" >+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm >+fi >+fi >+ >+NM="$lt_cv_path_NM" >+echo "$ac_t""$NM" 1>&6 >+ >+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 >+echo "configure:4613: checking whether ln -s works" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ rm -f conftestdata >+if ln -s X conftestdata 2>/dev/null >+then >+ rm -f conftestdata >+ ac_cv_prog_LN_S="ln -s" >+else >+ ac_cv_prog_LN_S=ln >+fi >+fi >+LN_S="$ac_cv_prog_LN_S" >+if test "$ac_cv_prog_LN_S" = "ln -s"; then >+ echo "$ac_t""yes" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 >+echo "configure:4634: checking how to recognise dependant libraries" >&5 >+if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ lt_cv_file_magic_cmd='$MAGIC_CMD' >+lt_cv_file_magic_test_file= >+lt_cv_deplibs_check_method='unknown' >+# Need to set the preceding variable on all platforms that support >+# interlibrary dependencies. >+# 'none' -- dependencies not supported. >+# `unknown' -- same as none, but documents that we really don't know. >+# 'pass_all' -- all dependencies passed with no checks. >+# 'test_compile' -- check by making test program. >+# ['file_magic [regex]'] -- check by looking for files in library path >+# which responds to the $file_magic_cmd with a given egrep regex. >+# If you have `file' or equivalent on your system and you're not sure >+# whether `pass_all' will *always* work, you probably want this one. >+ >+case $host_os in >+aix4* | aix5*) >+ lt_cv_deplibs_check_method=pass_all >+ ;; >+ >+beos*) >+ lt_cv_deplibs_check_method=pass_all >+ ;; >+ >+bsdi4*) >+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' >+ lt_cv_file_magic_cmd='/usr/bin/file -L' >+ lt_cv_file_magic_test_file=/shlib/libc.so >+ ;; >+ >+cygwin* | mingw* | pw32*) >+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' >+ lt_cv_file_magic_cmd='$OBJDUMP -f' >+ ;; >+ >+darwin* | rhapsody*) >+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' >+ lt_cv_file_magic_cmd='/usr/bin/file -L' >+ case "$host_os" in >+ rhapsody* | darwin1.012) >+ lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` >+ ;; >+ *) # Darwin 1.3 on >+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' >+ ;; >+ esac >+ ;; >+ >+freebsd*) >+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then >+ case $host_cpu in >+ i*86 ) >+ # Not sure whether the presence of OpenBSD here was a mistake. >+ # Let's accept both of them until this is cleared up. >+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' >+ lt_cv_file_magic_cmd=/usr/bin/file >+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` >+ ;; >+ esac >+ else >+ lt_cv_deplibs_check_method=pass_all >+ fi >+ ;; >+ >+gnu*) >+ lt_cv_deplibs_check_method=pass_all >+ ;; >+ >+hpux10.20*|hpux11*) >+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' >+ lt_cv_file_magic_cmd=/usr/bin/file >+ lt_cv_file_magic_test_file=/usr/lib/libc.sl >+ ;; >+ >+irix5* | irix6*) >+ case $host_os in >+ irix5*) >+ # this will be overridden with pass_all, but let us keep it just in case >+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" >+ ;; >+ *) >+ case $LD in >+ *-32|*"-32 ") libmagic=32-bit;; >+ *-n32|*"-n32 ") libmagic=N32;; >+ *-64|*"-64 ") libmagic=64-bit;; >+ *) libmagic=never-match;; >+ esac >+ # this will be overridden with pass_all, but let us keep it just in case >+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" >+ ;; >+ esac >+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` >+ lt_cv_deplibs_check_method=pass_all >+ ;; >+ >+# This must be Linux ELF. >+linux-gnu*) >+ case $host_cpu in >+ alpha* | i*86 | powerpc* | sparc* | ia64* ) >+ lt_cv_deplibs_check_method=pass_all ;; >+ *) >+ # glibc up to 2.1.1 does not perform some relocations on ARM >+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; >+ esac >+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` >+ ;; >+ >+netbsd*) >+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then >+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' >+ else >+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' >+ fi >+ ;; >+ >+newos6*) >+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' >+ lt_cv_file_magic_cmd=/usr/bin/file >+ lt_cv_file_magic_test_file=/usr/lib/libnls.so >+ ;; >+ >+osf3* | osf4* | osf5*) >+ # this will be overridden with pass_all, but let us keep it just in case >+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' >+ lt_cv_file_magic_test_file=/shlib/libc.so >+ lt_cv_deplibs_check_method=pass_all >+ ;; >+ >+sco3.2v5*) >+ lt_cv_deplibs_check_method=pass_all >+ ;; >+ >+solaris*) >+ lt_cv_deplibs_check_method=pass_all >+ lt_cv_file_magic_test_file=/lib/libc.so >+ ;; >+ >+sysv5uw[78]* | sysv4*uw2*) >+ lt_cv_deplibs_check_method=pass_all >+ ;; >+ >+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) >+ case $host_vendor in >+ motorola) >+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' >+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` >+ ;; >+ ncr) >+ lt_cv_deplibs_check_method=pass_all >+ ;; >+ sequent) >+ lt_cv_file_magic_cmd='/bin/file' >+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' >+ ;; >+ sni) >+ lt_cv_file_magic_cmd='/bin/file' >+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" >+ lt_cv_file_magic_test_file=/lib/libc.so >+ ;; >+ esac >+ ;; >+esac >+ >+fi >+ >+echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 >+file_magic_cmd=$lt_cv_file_magic_cmd >+deplibs_check_method=$lt_cv_deplibs_check_method >+ >+echo $ac_n "checking for object suffix""... $ac_c" 1>&6 >+echo "configure:4807: checking for object suffix" >&5 >+if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ rm -f conftest* >+echo 'int i = 1;' > conftest.$ac_ext >+if { (eval echo configure:4813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ for ac_file in conftest.*; do >+ case $ac_file in >+ *.c) ;; >+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; >+ esac >+ done >+else >+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } >+fi >+rm -f conftest* >+fi >+ >+echo "$ac_t""$ac_cv_objext" 1>&6 >+OBJEXT=$ac_cv_objext >+ac_objext=$ac_cv_objext >+ >+ >+ >+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 >+echo "configure:4833: checking for executable suffix" >&5 >+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then >+ ac_cv_exeext=.exe >+else >+ rm -f conftest* >+ echo 'int main () { return 0; }' > conftest.$ac_ext >+ ac_cv_exeext= >+ if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then >+ for file in conftest.*; do >+ case $file in >+ *.c | *.o | *.obj) ;; >+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; >+ esac >+ done >+ else >+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } >+ fi >+ rm -f conftest* >+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no >+fi >+fi >+ >+EXEEXT="" >+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} >+echo "$ac_t""${ac_cv_exeext}" 1>&6 >+ac_exeext=$EXEEXT >+ >+if test $host != $build; then >+ ac_tool_prefix=${host_alias}- >+else >+ ac_tool_prefix= >+fi >+ >+ >+ >+ >+# Check for command to grab the raw symbol name followed by C symbol from nm. >+echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 >+echo "configure:4874: checking command to parse $NM output" >&5 >+if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ >+# These are sane defaults that work on at least a few old systems. >+# [They come from Ultrix. What could be older than Ultrix?!! ;)] >+ >+# Character class describing NM global symbol codes. >+symcode='[BCDEGRST]' >+ >+# Regexp to match symbols that can be accessed directly from C. >+sympat='\([_A-Za-z][_A-Za-z0-9]*\)' >+ >+# Transform the above into a raw symbol and a C symbol. >+symxfrm='\1 \2\3 \3' >+ >+# Transform an extracted symbol line into a proper C declaration >+lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" >+ >+# Define system-specific variables. >+case $host_os in >+aix*) >+ symcode='[BCDT]' >+ ;; >+cygwin* | mingw* | pw32*) >+ symcode='[ABCDGISTW]' >+ ;; >+hpux*) # Its linker distinguishes data from code symbols >+ lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" >+ ;; >+irix*) >+ symcode='[BCDEGRST]' >+ ;; >+solaris* | sysv5*) >+ symcode='[BDT]' >+ ;; >+sysv4) >+ symcode='[DFNSTU]' >+ ;; >+esac >+ >+# Handle CRLF in mingw tool chain >+opt_cr= >+case $host_os in >+mingw*) >+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp >+ ;; >+esac >+ >+# If we're using GNU nm, then use its standard symbol codes. >+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then >+ symcode='[ABCDGISTW]' >+fi >+ >+# Try without a prefix undercore, then with it. >+for ac_symprfx in "" "_"; do >+ >+ # Write the raw and C identifiers. >+lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" >+ >+ # Check to see that the pipe works correctly. >+ pipe_works=no >+ rm -f conftest* >+ cat > conftest.$ac_ext <<EOF >+#ifdef __cplusplus >+extern "C" { >+#endif >+char nm_test_var; >+void nm_test_func(){} >+#ifdef __cplusplus >+} >+#endif >+int main(){nm_test_var='a';nm_test_func();return(0);} >+EOF >+ >+ if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ # Now try to grab the symbols. >+ nlist=conftest.nm >+ if { (eval echo configure:4953: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then >+ # Try sorting and uniquifying the output. >+ if sort "$nlist" | uniq > "$nlist"T; then >+ mv -f "$nlist"T "$nlist" >+ else >+ rm -f "$nlist"T >+ fi >+ >+ # Make sure that we snagged all the symbols we need. >+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then >+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then >+ cat <<EOF > conftest.$ac_ext >+#ifdef __cplusplus >+extern "C" { >+#endif >+ >+EOF >+ # Now generate the symbol file. >+ eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' >+ >+ cat <<EOF >> conftest.$ac_ext >+#if defined (__STDC__) && __STDC__ >+# define lt_ptr_t void * >+#else >+# define lt_ptr_t char * >+# define const >+#endif >+ >+/* The mapping between symbol names and symbols. */ >+const struct { >+ const char *name; >+ lt_ptr_t address; >+} >+lt_preloaded_symbols[] = >+{ >+EOF >+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext >+ cat <<\EOF >> conftest.$ac_ext >+ {0, (lt_ptr_t) 0} >+}; >+ >+#ifdef __cplusplus >+} >+#endif >+EOF >+ # Now try linking the two files. >+ mv conftest.$ac_objext conftstm.$ac_objext >+ save_LIBS="$LIBS" >+ save_CFLAGS="$CFLAGS" >+ LIBS="conftstm.$ac_objext" >+ CFLAGS="$CFLAGS$no_builtin_flag" >+ if { (eval echo configure:5004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then >+ pipe_works=yes >+ fi >+ LIBS="$save_LIBS" >+ CFLAGS="$save_CFLAGS" >+ else >+ echo "cannot find nm_test_func in $nlist" >&5 >+ fi >+ else >+ echo "cannot find nm_test_var in $nlist" >&5 >+ fi >+ else >+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 >+ fi >+ else >+ echo "$progname: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ fi >+ rm -f conftest* conftst* >+ >+ # Do not use the global_symbol_pipe unless it works. >+ if test "$pipe_works" = yes; then >+ break >+ else >+ lt_cv_sys_global_symbol_pipe= >+ fi >+done >+ >+fi >+ >+global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" >+if test -z "$lt_cv_sys_global_symbol_pipe"; then >+ global_symbol_to_cdecl= >+else >+ global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" >+fi >+if test -z "$global_symbol_pipe$global_symbol_to_cdecl"; then >+ echo "$ac_t""failed" 1>&6 >+else >+ echo "$ac_t""ok" 1>&6 >+fi >+ >+for ac_hdr in dlfcn.h >+do >+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` >+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 >+echo "configure:5050: checking for $ac_hdr" >&5 >+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 5055 "configure" >+#include "confdefs.h" >+#include <$ac_hdr> >+EOF >+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" >+{ (eval echo configure:5060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } >+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` >+if test -z "$ac_err"; then >+ rm -rf conftest* >+ eval "ac_cv_header_$ac_safe=yes" >+else >+ echo "$ac_err" >&5 >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_header_$ac_safe=no" >+fi >+rm -f conftest* >+fi >+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_hdr 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+done >+ >+ >+ >+ >+ >+# Only perform the check for file, if the check method requires it >+case $deplibs_check_method in >+file_magic*) >+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then >+ echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 >+echo "configure:5095: checking for ${ac_tool_prefix}file" >&5 >+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ case $MAGIC_CMD in >+ /*) >+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. >+ ;; >+ ?:/*) >+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. >+ ;; >+ *) >+ ac_save_MAGIC_CMD="$MAGIC_CMD" >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="/usr/bin:$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/${ac_tool_prefix}file; then >+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" >+ if test -n "$file_magic_test_file"; then >+ case $deplibs_check_method in >+ "file_magic "*) >+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" >+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" >+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | >+ egrep "$file_magic_regex" > /dev/null; then >+ : >+ else >+ cat <<EOF 1>&2 >+ >+*** Warning: the command libtool uses to detect shared libraries, >+*** $file_magic_cmd, produces output that libtool cannot recognize. >+*** The result is that libtool may fail to recognize shared libraries >+*** as such. This will affect the creation of libtool libraries that >+*** depend on shared libraries, but programs linked with such libtool >+*** libraries will work regardless of this problem. Nevertheless, you >+*** may want to report the problem to your system manager and/or to >+*** bug-libtool@gnu.org >+ >+EOF >+ fi ;; >+ esac >+ fi >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ MAGIC_CMD="$ac_save_MAGIC_CMD" >+ ;; >+esac >+fi >+ >+MAGIC_CMD="$lt_cv_path_MAGIC_CMD" >+if test -n "$MAGIC_CMD"; then >+ echo "$ac_t""$MAGIC_CMD" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+if test -z "$lt_cv_path_MAGIC_CMD"; then >+ if test -n "$ac_tool_prefix"; then >+ echo $ac_n "checking for file""... $ac_c" 1>&6 >+echo "configure:5157: checking for file" >&5 >+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ case $MAGIC_CMD in >+ /*) >+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. >+ ;; >+ ?:/*) >+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. >+ ;; >+ *) >+ ac_save_MAGIC_CMD="$MAGIC_CMD" >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="/usr/bin:$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/file; then >+ lt_cv_path_MAGIC_CMD="$ac_dir/file" >+ if test -n "$file_magic_test_file"; then >+ case $deplibs_check_method in >+ "file_magic "*) >+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" >+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" >+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | >+ egrep "$file_magic_regex" > /dev/null; then >+ : >+ else >+ cat <<EOF 1>&2 >+ >+*** Warning: the command libtool uses to detect shared libraries, >+*** $file_magic_cmd, produces output that libtool cannot recognize. >+*** The result is that libtool may fail to recognize shared libraries >+*** as such. This will affect the creation of libtool libraries that >+*** depend on shared libraries, but programs linked with such libtool >+*** libraries will work regardless of this problem. Nevertheless, you >+*** may want to report the problem to your system manager and/or to >+*** bug-libtool@gnu.org >+ >+EOF >+ fi ;; >+ esac >+ fi >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ MAGIC_CMD="$ac_save_MAGIC_CMD" >+ ;; >+esac >+fi >+ >+MAGIC_CMD="$lt_cv_path_MAGIC_CMD" >+if test -n "$MAGIC_CMD"; then >+ echo "$ac_t""$MAGIC_CMD" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ else >+ MAGIC_CMD=: >+ fi >+fi >+ >+ fi >+ ;; >+esac >+ >+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. >+set dummy ${ac_tool_prefix}ranlib; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:5228: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test -n "$RANLIB"; then >+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. >+else >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+fi >+fi >+RANLIB="$ac_cv_prog_RANLIB" >+if test -n "$RANLIB"; then >+ echo "$ac_t""$RANLIB" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+if test -z "$ac_cv_prog_RANLIB"; then >+if test -n "$ac_tool_prefix"; then >+ # Extract the first word of "ranlib", so it can be a program name with args. >+set dummy ranlib; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:5260: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test -n "$RANLIB"; then >+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. >+else >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_prog_RANLIB="ranlib" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" >+fi >+fi >+RANLIB="$ac_cv_prog_RANLIB" >+if test -n "$RANLIB"; then >+ echo "$ac_t""$RANLIB" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+else >+ RANLIB=":" >+fi >+fi >+ >+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. >+set dummy ${ac_tool_prefix}strip; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:5295: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test -n "$STRIP"; then >+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. >+else >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_prog_STRIP="${ac_tool_prefix}strip" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+fi >+fi >+STRIP="$ac_cv_prog_STRIP" >+if test -n "$STRIP"; then >+ echo "$ac_t""$STRIP" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+if test -z "$ac_cv_prog_STRIP"; then >+if test -n "$ac_tool_prefix"; then >+ # Extract the first word of "strip", so it can be a program name with args. >+set dummy strip; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:5327: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test -n "$STRIP"; then >+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. >+else >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_prog_STRIP="strip" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" >+fi >+fi >+STRIP="$ac_cv_prog_STRIP" >+if test -n "$STRIP"; then >+ echo "$ac_t""$STRIP" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+else >+ STRIP=":" >+fi >+fi >+ >+ >+enable_dlopen=no >+enable_win32_dll=no >+ >+# Check whether --enable-libtool-lock or --disable-libtool-lock was given. >+if test "${enable_libtool_lock+set}" = set; then >+ enableval="$enable_libtool_lock" >+ : >+fi >+ >+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes >+ >+# Some flags need to be propagated to the compiler or linker for good >+# libtool support. >+case $host in >+*-*-irix6*) >+ # Find out which ABI we are using. >+ echo '#line 5376 "configure"' > conftest.$ac_ext >+ if { (eval echo configure:5377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ case `/usr/bin/file conftest.$ac_objext` in >+ *32-bit*) >+ LD="${LD-ld} -32" >+ ;; >+ *N32*) >+ LD="${LD-ld} -n32" >+ ;; >+ *64-bit*) >+ LD="${LD-ld} -64" >+ ;; >+ esac >+ fi >+ rm -rf conftest* >+ ;; >+ >+*-*-sco3.2v5*) >+ # On SCO OpenServer 5, we need -belf to get full-featured binaries. >+ SAVE_CFLAGS="$CFLAGS" >+ CFLAGS="$CFLAGS -belf" >+ echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 >+echo "configure:5398: checking whether the C compiler needs -belf" >&5 >+if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ >+ ac_ext=c >+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. >+ac_cpp='$CPP $CPPFLAGS' >+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' >+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' >+cross_compiling=$ac_cv_prog_cc_cross >+ >+ cat > conftest.$ac_ext <<EOF >+#line 5411 "configure" >+#include "confdefs.h" >+ >+int main() { >+ >+; return 0; } >+EOF >+if { (eval echo configure:5418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ lt_cv_cc_needs_belf=yes >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ lt_cv_cc_needs_belf=no >+fi >+rm -f conftest* >+ ac_ext=c >+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. >+ac_cpp='$CPP $CPPFLAGS' >+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' >+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' >+cross_compiling=$ac_cv_prog_cc_cross >+ >+fi >+ >+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 >+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then >+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf >+ CFLAGS="$SAVE_CFLAGS" >+ fi >+ ;; >+ >+ >+esac >+ >+# Sed substitution that helps us do robust quoting. It backslashifies >+# metacharacters that are still active within double-quoted strings. >+Xsed='sed -e s/^X//' >+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' >+ >+# Same as above, but do not quote variable references. >+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' >+ >+# Sed substitution to delay expansion of an escaped shell variable in a >+# double_quote_subst'ed string. >+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' >+ >+# Constants: >+rm="rm -f" >+ >+# Global variables: >+default_ofile=libtool >+can_build_shared=yes >+ >+# All known linkers require a `.a' archive for static linking (except M$VC, >+# which needs '.lib'). >+libext=a >+ltmain="$ac_aux_dir/ltmain.sh" >+ofile="$default_ofile" >+with_gnu_ld="$lt_cv_prog_gnu_ld" >+need_locks="$enable_libtool_lock" >+ >+old_CC="$CC" >+old_CFLAGS="$CFLAGS" >+ >+# Set sane defaults for various variables >+test -z "$AR" && AR=ar >+test -z "$AR_FLAGS" && AR_FLAGS=cru >+test -z "$AS" && AS=as >+test -z "$CC" && CC=cc >+test -z "$DLLTOOL" && DLLTOOL=dlltool >+test -z "$LD" && LD=ld >+test -z "$LN_S" && LN_S="ln -s" >+test -z "$MAGIC_CMD" && MAGIC_CMD=file >+test -z "$NM" && NM=nm >+test -z "$OBJDUMP" && OBJDUMP=objdump >+test -z "$RANLIB" && RANLIB=: >+test -z "$STRIP" && STRIP=: >+test -z "$ac_objext" && ac_objext=o >+ >+if test x"$host" != x"$build"; then >+ ac_tool_prefix=${host_alias}- >+else >+ ac_tool_prefix= >+fi >+ >+# Transform linux* to *-*-linux-gnu*, to support old configure scripts. >+case $host_os in >+linux-gnu*) ;; >+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` >+esac >+ >+case $host_os in >+aix3*) >+ # AIX sometimes has problems with the GCC collect2 program. For some >+ # reason, if we set the COLLECT_NAMES environment variable, the problems >+ # vanish in a puff of smoke. >+ if test "X${COLLECT_NAMES+set}" != Xset; then >+ COLLECT_NAMES= >+ export COLLECT_NAMES >+ fi >+ ;; >+esac >+ >+# Determine commands to create old-style static archives. >+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' >+old_postinstall_cmds='chmod 644 $oldlib' >+old_postuninstall_cmds= >+ >+if test -n "$RANLIB"; then >+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" >+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" >+fi >+ >+# Allow CC to be a program name with arguments. >+set dummy $CC >+compiler="$2" >+ >+## FIXME: this should be a separate macro >+## >+echo $ac_n "checking for objdir""... $ac_c" 1>&6 >+echo "configure:5533: checking for objdir" >&5 >+rm -f .libs 2>/dev/null >+mkdir .libs 2>/dev/null >+if test -d .libs; then >+ objdir=.libs >+else >+ # MS-DOS does not allow filenames that begin with a dot. >+ objdir=_libs >+fi >+rmdir .libs 2>/dev/null >+echo "$ac_t""$objdir" 1>&6 >+## >+## END FIXME >+ >+ >+## FIXME: this should be a separate macro >+## >+# Check whether --with-pic or --without-pic was given. >+if test "${with_pic+set}" = set; then >+ withval="$with_pic" >+ pic_mode="$withval" >+else >+ pic_mode=default >+fi >+ >+test -z "$pic_mode" && pic_mode=default >+ >+# We assume here that the value for lt_cv_prog_cc_pic will not be cached >+# in isolation, and that seeing it set (from the cache) indicates that >+# the associated values are set (in the cache) correctly too. >+echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 >+echo "configure:5564: checking for $compiler option to produce PIC" >&5 >+if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ lt_cv_prog_cc_pic= >+ lt_cv_prog_cc_shlib= >+ lt_cv_prog_cc_wl= >+ lt_cv_prog_cc_static= >+ lt_cv_prog_cc_no_builtin= >+ lt_cv_prog_cc_can_build_shared=$can_build_shared >+ >+ if test "$GCC" = yes; then >+ lt_cv_prog_cc_wl='-Wl,' >+ lt_cv_prog_cc_static='-static' >+ >+ case $host_os in >+ aix*) >+ # Below there is a dirty hack to force normal static linking with -ldl >+ # The problem is because libdl dynamically linked with both libc and >+ # libC (AIX C++ library), which obviously doesn't included in libraries >+ # list by gcc. This cause undefined symbols with -static flags. >+ # This hack allows C programs to be linked with "-static -ldl", but >+ # we not sure about C++ programs. >+ lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" >+ ;; >+ amigaos*) >+ # FIXME: we need at least 68020 code to build shared libraries, but >+ # adding the `-m68020' flag to GCC prevents building anything better, >+ # like `-m68040'. >+ lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' >+ ;; >+ beos* | irix5* | irix6* | osf3* | osf4* | osf5*) >+ # PIC is the default for these OSes. >+ ;; >+ darwin* | rhapsody*) >+ # PIC is the default on this platform >+ # Common symbols not allowed in MH_DYLIB files >+ lt_cv_prog_cc_pic='-fno-common' >+ ;; >+ cygwin* | mingw* | pw32* | os2*) >+ # This hack is so that the source file can tell whether it is being >+ # built for inclusion in a dll (and should export symbols for example). >+ lt_cv_prog_cc_pic='-DDLL_EXPORT' >+ ;; >+ sysv4*MP*) >+ if test -d /usr/nec; then >+ lt_cv_prog_cc_pic=-Kconform_pic >+ fi >+ ;; >+ *) >+ lt_cv_prog_cc_pic='-fPIC' >+ ;; >+ esac >+ else >+ # PORTME Check for PIC flags for the system compiler. >+ case $host_os in >+ aix3* | aix4* | aix5*) >+ # All AIX code is PIC. >+ if test "$host_cpu" = ia64; then >+ # AIX 5 now supports IA64 processor >+ lt_cv_prog_cc_static='-Bstatic' >+ lt_cv_prog_cc_wl='-Wl,' >+ else >+ lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' >+ fi >+ ;; >+ >+ hpux9* | hpux10* | hpux11*) >+ # Is there a better lt_cv_prog_cc_static that works with the bundled CC? >+ lt_cv_prog_cc_wl='-Wl,' >+ lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" >+ lt_cv_prog_cc_pic='+Z' >+ ;; >+ >+ irix5* | irix6*) >+ lt_cv_prog_cc_wl='-Wl,' >+ lt_cv_prog_cc_static='-non_shared' >+ # PIC (with -KPIC) is the default. >+ ;; >+ >+ cygwin* | mingw* | pw32* | os2*) >+ # This hack is so that the source file can tell whether it is being >+ # built for inclusion in a dll (and should export symbols for example). >+ lt_cv_prog_cc_pic='-DDLL_EXPORT' >+ ;; >+ >+ newsos6) >+ lt_cv_prog_cc_pic='-KPIC' >+ lt_cv_prog_cc_static='-Bstatic' >+ ;; >+ >+ osf3* | osf4* | osf5*) >+ # All OSF/1 code is PIC. >+ lt_cv_prog_cc_wl='-Wl,' >+ lt_cv_prog_cc_static='-non_shared' >+ ;; >+ >+ sco3.2v5*) >+ lt_cv_prog_cc_pic='-Kpic' >+ lt_cv_prog_cc_static='-dn' >+ lt_cv_prog_cc_shlib='-belf' >+ ;; >+ >+ solaris*) >+ lt_cv_prog_cc_pic='-KPIC' >+ lt_cv_prog_cc_static='-Bstatic' >+ lt_cv_prog_cc_wl='-Wl,' >+ ;; >+ >+ sunos4*) >+ lt_cv_prog_cc_pic='-PIC' >+ lt_cv_prog_cc_static='-Bstatic' >+ lt_cv_prog_cc_wl='-Qoption ld ' >+ ;; >+ >+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) >+ lt_cv_prog_cc_pic='-KPIC' >+ lt_cv_prog_cc_static='-Bstatic' >+ if test "x$host_vendor" = xsni; then >+ lt_cv_prog_cc_wl='-LD' >+ else >+ lt_cv_prog_cc_wl='-Wl,' >+ fi >+ ;; >+ >+ uts4*) >+ lt_cv_prog_cc_pic='-pic' >+ lt_cv_prog_cc_static='-Bstatic' >+ ;; >+ >+ sysv4*MP*) >+ if test -d /usr/nec ;then >+ lt_cv_prog_cc_pic='-Kconform_pic' >+ lt_cv_prog_cc_static='-Bstatic' >+ fi >+ ;; >+ >+ *) >+ lt_cv_prog_cc_can_build_shared=no >+ ;; >+ esac >+ fi >+ >+fi >+ >+if test -z "$lt_cv_prog_cc_pic"; then >+ echo "$ac_t""none" 1>&6 >+else >+ echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6 >+ >+ # Check to make sure the pic_flag actually works. >+ echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 >+echo "configure:5716: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 >+ if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ save_CFLAGS="$CFLAGS" >+ CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" >+ cat > conftest.$ac_ext <<EOF >+#line 5723 "configure" >+#include "confdefs.h" >+ >+int main() { >+ >+; return 0; } >+EOF >+if { (eval echo configure:5730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ case $host_os in >+ hpux9* | hpux10* | hpux11*) >+ # On HP-UX, both CC and GCC only warn that PIC is supported... then >+ # they create non-PIC objects. So, if there were any warnings, we >+ # assume that PIC is not supported. >+ if test -s conftest.err; then >+ lt_cv_prog_cc_pic_works=no >+ else >+ lt_cv_prog_cc_pic_works=yes >+ fi >+ ;; >+ *) >+ lt_cv_prog_cc_pic_works=yes >+ ;; >+ esac >+ >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ lt_cv_prog_cc_pic_works=no >+ >+fi >+rm -f conftest* >+ CFLAGS="$save_CFLAGS" >+ >+fi >+ >+ >+ if test "X$lt_cv_prog_cc_pic_works" = Xno; then >+ lt_cv_prog_cc_pic= >+ lt_cv_prog_cc_can_build_shared=no >+ else >+ lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" >+ fi >+ >+ echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6 >+fi >+## >+## END FIXME >+ >+# Check for any special shared library compilation flags. >+if test -n "$lt_cv_prog_cc_shlib"; then >+ echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2 >+ if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then : >+ else >+ echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2 >+ lt_cv_prog_cc_can_build_shared=no >+ fi >+fi >+ >+## FIXME: this should be a separate macro >+## >+echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 >+echo "configure:5786: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 >+if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ lt_cv_prog_cc_static_works=no >+ save_LDFLAGS="$LDFLAGS" >+ LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" >+ cat > conftest.$ac_ext <<EOF >+#line 5794 "configure" >+#include "confdefs.h" >+ >+int main() { >+ >+; return 0; } >+EOF >+if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ lt_cv_prog_cc_static_works=yes >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+fi >+rm -f conftest* >+ LDFLAGS="$save_LDFLAGS" >+ >+fi >+ >+ >+# Belt *and* braces to stop my trousers falling down: >+test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= >+echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6 >+ >+pic_flag="$lt_cv_prog_cc_pic" >+special_shlib_compile_flags="$lt_cv_prog_cc_shlib" >+wl="$lt_cv_prog_cc_wl" >+link_static_flag="$lt_cv_prog_cc_static" >+no_builtin_flag="$lt_cv_prog_cc_no_builtin" >+can_build_shared="$lt_cv_prog_cc_can_build_shared" >+## >+## END FIXME >+ >+ >+## FIXME: this should be a separate macro >+## >+# Check to see if options -o and -c are simultaneously supported by compiler >+echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 >+echo "configure:5832: checking if $compiler supports -c -o file.$ac_objext" >&5 >+if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ >+$rm -r conftest 2>/dev/null >+mkdir conftest >+cd conftest >+echo "int some_variable = 0;" > conftest.$ac_ext >+mkdir out >+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers >+# that will create temporary files in the current directory regardless of >+# the output directory. Thus, making CWD read-only will cause this test >+# to fail, enabling locking or at least warning the user not to do parallel >+# builds. >+chmod -w . >+save_CFLAGS="$CFLAGS" >+CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" >+compiler_c_o=no >+if { (eval echo configure:5851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then >+ # The compiler can only warn and ignore the option if not recognized >+ # So say no if there are warnings >+ if test -s out/conftest.err; then >+ lt_cv_compiler_c_o=no >+ else >+ lt_cv_compiler_c_o=yes >+ fi >+else >+ # Append any errors to the config.log. >+ cat out/conftest.err 1>&5 >+ lt_cv_compiler_c_o=no >+fi >+CFLAGS="$save_CFLAGS" >+chmod u+w . >+$rm conftest* out/* >+rmdir out >+cd .. >+rmdir conftest >+$rm -r conftest 2>/dev/null >+ >+fi >+ >+compiler_c_o=$lt_cv_compiler_c_o >+echo "$ac_t""$compiler_c_o" 1>&6 >+ >+if test x"$compiler_c_o" = x"yes"; then >+ # Check to see if we can write to a .lo >+ echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 >+echo "configure:5880: checking if $compiler supports -c -o file.lo" >&5 >+ if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ >+ lt_cv_compiler_o_lo=no >+ save_CFLAGS="$CFLAGS" >+ CFLAGS="$CFLAGS -c -o conftest.lo" >+ cat > conftest.$ac_ext <<EOF >+#line 5889 "configure" >+#include "confdefs.h" >+ >+int main() { >+int some_variable = 0; >+; return 0; } >+EOF >+if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ # The compiler can only warn and ignore the option if not recognized >+ # So say no if there are warnings >+ if test -s conftest.err; then >+ lt_cv_compiler_o_lo=no >+ else >+ lt_cv_compiler_o_lo=yes >+ fi >+ >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+fi >+rm -f conftest* >+ CFLAGS="$save_CFLAGS" >+ >+fi >+ >+ compiler_o_lo=$lt_cv_compiler_o_lo >+ echo "$ac_t""$compiler_c_lo" 1>&6 >+else >+ compiler_o_lo=no >+fi >+## >+## END FIXME >+ >+## FIXME: this should be a separate macro >+## >+# Check to see if we can do hard links to lock some files if needed >+hard_links="nottested" >+if test "$compiler_c_o" = no && test "$need_locks" != no; then >+ # do not overwrite the value of need_locks provided by the user >+ echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 >+echo "configure:5930: checking if we can lock with hard links" >&5 >+ hard_links=yes >+ $rm conftest* >+ ln conftest.a conftest.b 2>/dev/null && hard_links=no >+ touch conftest.a >+ ln conftest.a conftest.b 2>&5 || hard_links=no >+ ln conftest.a conftest.b 2>/dev/null && hard_links=no >+ echo "$ac_t""$hard_links" 1>&6 >+ if test "$hard_links" = no; then >+ echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2 >+ need_locks=warn >+ fi >+else >+ need_locks=no >+fi >+## >+## END FIXME >+ >+## FIXME: this should be a separate macro >+## >+if test "$GCC" = yes; then >+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler >+ echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 >+echo "configure:5953: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 >+ echo "int some_variable = 0;" > conftest.$ac_ext >+ save_CFLAGS="$CFLAGS" >+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" >+ compiler_rtti_exceptions=no >+ cat > conftest.$ac_ext <<EOF >+#line 5959 "configure" >+#include "confdefs.h" >+ >+int main() { >+int some_variable = 0; >+; return 0; } >+EOF >+if { (eval echo configure:5966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ # The compiler can only warn and ignore the option if not recognized >+ # So say no if there are warnings >+ if test -s conftest.err; then >+ compiler_rtti_exceptions=no >+ else >+ compiler_rtti_exceptions=yes >+ fi >+ >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+fi >+rm -f conftest* >+ CFLAGS="$save_CFLAGS" >+ echo "$ac_t""$compiler_rtti_exceptions" 1>&6 >+ >+ if test "$compiler_rtti_exceptions" = "yes"; then >+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' >+ else >+ no_builtin_flag=' -fno-builtin' >+ fi >+fi >+## >+## END FIXME >+ >+## FIXME: this should be a separate macro >+## >+# See if the linker supports building shared libraries. >+echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 >+echo "configure:5997: checking whether the linker ($LD) supports shared libraries" >&5 >+ >+allow_undefined_flag= >+no_undefined_flag= >+need_lib_prefix=unknown >+need_version=unknown >+# when you set need_version to no, make sure it does not cause -set_version >+# flags to be left without arguments >+archive_cmds= >+archive_expsym_cmds= >+old_archive_from_new_cmds= >+old_archive_from_expsyms_cmds= >+export_dynamic_flag_spec= >+whole_archive_flag_spec= >+thread_safe_flag_spec= >+hardcode_into_libs=no >+hardcode_libdir_flag_spec= >+hardcode_libdir_separator= >+hardcode_direct=no >+hardcode_minus_L=no >+hardcode_shlibpath_var=unsupported >+runpath_var= >+link_all_deplibs=unknown >+always_export_symbols=no >+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' >+# include_expsyms should be a list of space-separated symbols to be *always* >+# included in the symbol list >+include_expsyms= >+# exclude_expsyms can be an egrep regular expression of symbols to exclude >+# it will be wrapped by ` (' and `)$', so one must not match beginning or >+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', >+# as well as any symbol that contains `d'. >+exclude_expsyms="_GLOBAL_OFFSET_TABLE_" >+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out >+# platforms (ab)use it in PIC code, but their linkers get confused if >+# the symbol is explicitly referenced. Since portable code cannot >+# rely on this symbol name, it's probably fine to never include it in >+# preloaded symbol tables. >+extract_expsyms_cmds= >+ >+case $host_os in >+cygwin* | mingw* | pw32* ) >+ # FIXME: the MSVC++ port hasn't been tested in a loooong time >+ # When not using gcc, we currently assume that we are using >+ # Microsoft Visual C++. >+ if test "$GCC" != yes; then >+ with_gnu_ld=no >+ fi >+ ;; >+ >+esac >+ >+ld_shlibs=yes >+if test "$with_gnu_ld" = yes; then >+ # If archive_cmds runs LD, not CC, wlarc should be empty >+ wlarc='${wl}' >+ >+ # See if GNU ld supports shared libraries. >+ case $host_os in >+ aix3* | aix4* | aix5*) >+ # On AIX, the GNU linker is very broken >+ # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. >+ ld_shlibs=no >+ cat <<EOF 1>&2 >+ >+*** Warning: the GNU linker, at least up to release 2.9.1, is reported >+*** to be unable to reliably create shared libraries on AIX. >+*** Therefore, libtool is disabling shared libraries support. If you >+*** really care for shared libraries, you may want to modify your PATH >+*** so that a non-GNU linker is found, and then restart. >+ >+EOF >+ ;; >+ >+ amigaos*) >+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' >+ hardcode_libdir_flag_spec='-L$libdir' >+ hardcode_minus_L=yes >+ >+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports >+ # that the semantics of dynamic libraries on AmigaOS, at least up >+ # to version 4, is to share data among multiple programs linked >+ # with the same dynamic library. Since this doesn't match the >+ # behavior of shared libraries on other platforms, we can use >+ # them. >+ ld_shlibs=no >+ ;; >+ >+ beos*) >+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then >+ allow_undefined_flag=unsupported >+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc >+ # support --undefined. This deserves some investigation. FIXME >+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' >+ else >+ ld_shlibs=no >+ fi >+ ;; >+ >+ cygwin* | mingw* | pw32*) >+ # hardcode_libdir_flag_spec is actually meaningless, as there is >+ # no search path for DLLs. >+ hardcode_libdir_flag_spec='-L$libdir' >+ allow_undefined_flag=unsupported >+ always_export_symbols=yes >+ >+ extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ >+ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ >+ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ >+ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ >+ else $CC -o impgen impgen.c ; fi)~ >+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' >+ >+ old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' >+ >+ # cygwin and mingw dlls have different entry points and sets of symbols >+ # to exclude. >+ # FIXME: what about values for MSVC? >+ dll_entry=__cygwin_dll_entry@12 >+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ >+ case $host_os in >+ mingw*) >+ # mingw values >+ dll_entry=_DllMainCRTStartup@12 >+ dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ >+ ;; >+ esac >+ >+ # mingw and cygwin differ, and it's simplest to just exclude the union >+ # of the two symbol sets. >+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 >+ >+ # recent cygwin and mingw systems supply a stub DllMain which the user >+ # can override, but on older systems we have to supply one (in ltdll.c) >+ if test "x$lt_cv_need_dllmain" = "xyes"; then >+ ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " >+ ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < [$]0 > $output_objdir/$soname-ltdll.c~ >+ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' >+ else >+ ltdll_obj= >+ ltdll_cmds= >+ fi >+ >+ # Extract the symbol export list from an `--export-all' def file, >+ # then regenerate the def file from the symbol export list, so that >+ # the compiled dll only exports the symbol export list. >+ # Be careful not to strip the DATA tag left be newer dlltools. >+ export_symbols_cmds="$ltdll_cmds"' >+ $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ >+ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' >+ >+ # If the export-symbols file already is a .def file (1st line >+ # is EXPORTS), use it as is. >+ # If DATA tags from a recent dlltool are present, honour them! >+ archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then >+ cp $export_symbols $output_objdir/$soname-def; >+ else >+ echo EXPORTS > $output_objdir/$soname-def; >+ _lt_hint=1; >+ cat $export_symbols | while read symbol; do >+ set dummy \$symbol; >+ case \$# in >+ 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; >+ *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; >+ esac; >+ _lt_hint=`expr 1 + \$_lt_hint`; >+ done; >+ fi~ >+ '"$ltdll_cmds"' >+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ >+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ >+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ >+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ >+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' >+ ;; >+ >+ netbsd*) >+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then >+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' >+ wlarc= >+ else >+ archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' >+ archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' >+ fi >+ ;; >+ >+ solaris* | sysv5*) >+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then >+ ld_shlibs=no >+ cat <<EOF 1>&2 >+ >+*** Warning: The releases 2.8.* of the GNU linker cannot reliably >+*** create shared libraries on Solaris systems. Therefore, libtool >+*** is disabling shared libraries support. We urge you to upgrade GNU >+*** binutils to release 2.9.1 or newer. Another option is to modify >+*** your PATH or compiler configuration so that the native linker is >+*** used, and then restart. >+ >+EOF >+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then >+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' >+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' >+ else >+ ld_shlibs=no >+ fi >+ ;; >+ >+ sunos4*) >+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' >+ wlarc= >+ hardcode_direct=yes >+ hardcode_shlibpath_var=no >+ ;; >+ >+ *) >+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then >+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' >+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' >+ else >+ ld_shlibs=no >+ fi >+ ;; >+ esac >+ >+ if test "$ld_shlibs" = yes; then >+ runpath_var=LD_RUN_PATH >+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' >+ export_dynamic_flag_spec='${wl}--export-dynamic' >+ case $host_os in >+ cygwin* | mingw* | pw32*) >+ # dlltool doesn't understand --whole-archive et. al. >+ whole_archive_flag_spec= >+ ;; >+ *) >+ # ancient GNU ld didn't support --whole-archive et. al. >+ if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then >+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' >+ else >+ whole_archive_flag_spec= >+ fi >+ ;; >+ esac >+ fi >+else >+ # PORTME fill in a description of your system's linker (not GNU ld) >+ case $host_os in >+ aix3*) >+ allow_undefined_flag=unsupported >+ always_export_symbols=yes >+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' >+ # Note: this linker hardcodes the directories in LIBPATH if there >+ # are no directories specified by -L. >+ hardcode_minus_L=yes >+ if test "$GCC" = yes && test -z "$link_static_flag"; then >+ # Neither direct hardcoding nor static linking is supported with a >+ # broken collect2. >+ hardcode_direct=unsupported >+ fi >+ ;; >+ >+ aix4* | aix5*) >+ # When large executables or shared objects are built, AIX ld can >+ # have problems creating the table of contents. If linking a library >+ # or program results in "error TOC overflow" add -mminimal-toc to >+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not >+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. >+ >+ archive_cmds='' >+ hardcode_libdir_separator=':' >+ if test "$GCC" = yes; then >+ collect2name=`${CC} -print-prog-name=collect2` >+ if test -f "$collect2name" && \ >+ strings "$collect2name" | grep resolve_lib_name >/dev/null >+ then >+ # We have reworked collect2 >+ hardcode_direct=yes >+ else >+ # We have old collect2 >+ hardcode_direct=unsupported >+ # It fails to find uninstalled libraries when the uninstalled >+ # path is not listed in the libpath. Setting hardcode_minus_L >+ # to unsupported forces relinking >+ hardcode_minus_L=yes >+ hardcode_libdir_flag_spec='-L$libdir' >+ hardcode_libdir_separator= >+ fi >+ shared_flag='-shared' >+ else >+ if test "$host_cpu" = ia64; then >+ shared_flag='-G' >+ else >+ shared_flag='${wl}-bM:SRE' >+ fi >+ hardcode_direct=yes >+ fi >+ >+ if test "$host_cpu" = ia64; then >+ # On IA64, the linker does run time linking by default, so we don't >+ # have to do anything special. >+ aix_use_runtimelinking=no >+ exp_sym_flag='-Bexport' >+ no_entry_flag="" >+ else >+ # Test if we are trying to use run time linking, or normal AIX style linking. >+ # If -brtl is somewhere in LDFLAGS, we need to do run time linking. >+ aix_use_runtimelinking=no >+ for ld_flag in $LDFLAGS; do >+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then >+ aix_use_runtimelinking=yes >+ break >+ fi >+ done >+ exp_sym_flag='-bexport' >+ no_entry_flag='-bnoentry' >+ fi >+ # It seems that -bexpall can do strange things, so it is better to >+ # generate a list of symbols to export. >+ always_export_symbols=yes >+ if test "$aix_use_runtimelinking" = yes; then >+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' >+ allow_undefined_flag=' -Wl,-G' >+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" >+ else >+ if test "$host_cpu" = ia64; then >+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' >+ allow_undefined_flag="-znodefs" >+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" >+ else >+ hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' >+ # Warning - without using the other run time loading flags, -berok will >+ # link without error, but may produce a broken library. >+ allow_undefined_flag='${wl}-berok" >+ # This is a bit strange, but is similar to how AIX traditionally builds >+ # it's shared libraries. >+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' >+ fi >+ fi >+ ;; >+ >+ amigaos*) >+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' >+ hardcode_libdir_flag_spec='-L$libdir' >+ hardcode_minus_L=yes >+ # see comment about different semantics on the GNU ld section >+ ld_shlibs=no >+ ;; >+ >+ cygwin* | mingw* | pw32*) >+ # When not using gcc, we currently assume that we are using >+ # Microsoft Visual C++. >+ # hardcode_libdir_flag_spec is actually meaningless, as there is >+ # no search path for DLLs. >+ hardcode_libdir_flag_spec=' ' >+ allow_undefined_flag=unsupported >+ # Tell ltmain to make .lib files, not .a files. >+ libext=lib >+ # FIXME: Setting linknames here is a bad hack. >+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' >+ # The linker will automatically build a .lib file if we build a DLL. >+ old_archive_from_new_cmds='true' >+ # FIXME: Should let the user specify the lib program. >+ old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' >+ fix_srcfile_path='`cygpath -w "$srcfile"`' >+ ;; >+ >+ darwin* | rhapsody*) >+ allow_undefined_flag='-undefined suppress' >+ # FIXME: Relying on posixy $() will cause problems for >+ # cross-compilation, but unfortunately the echo tests do not >+ # yet detect zsh echo's removal of \ escapes. >+ archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)' >+ # We need to add '_' to the symbols in $export_symbols first >+ #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' >+ hardcode_direct=yes >+ hardcode_shlibpath_var=no >+ whole_archive_flag_spec='-all_load $convenience' >+ ;; >+ >+ freebsd1*) >+ ld_shlibs=no >+ ;; >+ >+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor >+ # support. Future versions do this automatically, but an explicit c++rt0.o >+ # does not break anything, and helps significantly (at the cost of a little >+ # extra space). >+ freebsd2.2*) >+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' >+ hardcode_libdir_flag_spec='-R$libdir' >+ hardcode_direct=yes >+ hardcode_shlibpath_var=no >+ ;; >+ >+ # Unfortunately, older versions of FreeBSD 2 do not have this feature. >+ freebsd2*) >+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' >+ hardcode_direct=yes >+ hardcode_minus_L=yes >+ hardcode_shlibpath_var=no >+ ;; >+ >+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. >+ freebsd*) >+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' >+ hardcode_libdir_flag_spec='-R$libdir' >+ hardcode_direct=yes >+ hardcode_shlibpath_var=no >+ ;; >+ >+ hpux9* | hpux10* | hpux11*) >+ case $host_os in >+ hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; >+ *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; >+ esac >+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' >+ hardcode_libdir_separator=: >+ hardcode_direct=yes >+ hardcode_minus_L=yes # Not in the search PATH, but as the default >+ # location of the library. >+ export_dynamic_flag_spec='${wl}-E' >+ ;; >+ >+ irix5* | irix6*) >+ if test "$GCC" = yes; then >+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' >+ else >+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' >+ fi >+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' >+ hardcode_libdir_separator=: >+ link_all_deplibs=yes >+ ;; >+ >+ netbsd*) >+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then >+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out >+ else >+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF >+ fi >+ hardcode_libdir_flag_spec='-R$libdir' >+ hardcode_direct=yes >+ hardcode_shlibpath_var=no >+ ;; >+ >+ newsos6) >+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' >+ hardcode_direct=yes >+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' >+ hardcode_libdir_separator=: >+ hardcode_shlibpath_var=no >+ ;; >+ >+ openbsd*) >+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' >+ hardcode_libdir_flag_spec='-R$libdir' >+ hardcode_direct=yes >+ hardcode_shlibpath_var=no >+ ;; >+ >+ os2*) >+ hardcode_libdir_flag_spec='-L$libdir' >+ hardcode_minus_L=yes >+ allow_undefined_flag=unsupported >+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' >+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' >+ ;; >+ >+ osf3*) >+ if test "$GCC" = yes; then >+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' >+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' >+ else >+ allow_undefined_flag=' -expect_unresolved \*' >+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' >+ fi >+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' >+ hardcode_libdir_separator=: >+ ;; >+ >+ osf4* | osf5*) # as osf3* with the addition of -msym flag >+ if test "$GCC" = yes; then >+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' >+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' >+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' >+ else >+ allow_undefined_flag=' -expect_unresolved \*' >+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' >+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ >+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' >+ >+ #Both c and cxx compiler support -rpath directly >+ hardcode_libdir_flag_spec='-rpath $libdir' >+ fi >+ hardcode_libdir_separator=: >+ ;; >+ >+ sco3.2v5*) >+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >+ hardcode_shlibpath_var=no >+ runpath_var=LD_RUN_PATH >+ hardcode_runpath_var=yes >+ ;; >+ >+ solaris*) >+ no_undefined_flag=' -z defs' >+ # $CC -shared without GNU ld will not create a library from C++ >+ # object files and a static libstdc++, better avoid it by now >+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' >+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ >+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' >+ hardcode_libdir_flag_spec='-R$libdir' >+ hardcode_shlibpath_var=no >+ case $host_os in >+ solaris2.[0-5] | solaris2.[0-5].*) ;; >+ *) # Supported since Solaris 2.6 (maybe 2.5.1?) >+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; >+ esac >+ link_all_deplibs=yes >+ ;; >+ >+ sunos4*) >+ if test "x$host_vendor" = xsequent; then >+ # Use $CC to link under sequent, because it throws in some extra .o >+ # files that make .init and .fini sections work. >+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' >+ else >+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' >+ fi >+ hardcode_libdir_flag_spec='-L$libdir' >+ hardcode_direct=yes >+ hardcode_minus_L=yes >+ hardcode_shlibpath_var=no >+ ;; >+ >+ sysv4) >+ if test "x$host_vendor" = xsno; then >+ archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts' >+ hardcode_direct=yes # is this really true??? >+ else >+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie >+ fi >+ runpath_var='LD_RUN_PATH' >+ hardcode_shlibpath_var=no >+ ;; >+ >+ sysv4.3*) >+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >+ hardcode_shlibpath_var=no >+ export_dynamic_flag_spec='-Bexport' >+ ;; >+ >+ sysv5*) >+ no_undefined_flag=' -z text' >+ # $CC -shared without GNU ld will not create a library from C++ >+ # object files and a static libstdc++, better avoid it by now >+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' >+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ >+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' >+ hardcode_libdir_flag_spec= >+ hardcode_shlibpath_var=no >+ runpath_var='LD_RUN_PATH' >+ ;; >+ >+ uts4*) >+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >+ hardcode_libdir_flag_spec='-L$libdir' >+ hardcode_shlibpath_var=no >+ ;; >+ >+ dgux*) >+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >+ hardcode_libdir_flag_spec='-L$libdir' >+ hardcode_shlibpath_var=no >+ ;; >+ >+ sysv4*MP*) >+ if test -d /usr/nec; then >+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' >+ hardcode_shlibpath_var=no >+ runpath_var=LD_RUN_PATH >+ hardcode_runpath_var=yes >+ ld_shlibs=yes >+ fi >+ ;; >+ >+ sysv4.2uw2*) >+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' >+ hardcode_direct=yes >+ hardcode_minus_L=no >+ hardcode_shlibpath_var=no >+ hardcode_runpath_var=yes >+ runpath_var=LD_RUN_PATH >+ ;; >+ >+ sysv5uw7* | unixware7*) >+ no_undefined_flag='${wl}-z ${wl}text' >+ if test "$GCC" = yes; then >+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' >+ else >+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' >+ fi >+ runpath_var='LD_RUN_PATH' >+ hardcode_shlibpath_var=no >+ ;; >+ >+ *) >+ ld_shlibs=no >+ ;; >+ esac >+fi >+echo "$ac_t""$ld_shlibs" 1>&6 >+test "$ld_shlibs" = no && can_build_shared=no >+## >+## END FIXME >+ >+## FIXME: this should be a separate macro >+## >+# Check hardcoding attributes. >+echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 >+echo "configure:6617: checking how to hardcode library paths into programs" >&5 >+hardcode_action= >+if test -n "$hardcode_libdir_flag_spec" || \ >+ test -n "$runpath_var"; then >+ >+ # We can hardcode non-existant directories. >+ if test "$hardcode_direct" != no && >+ # If the only mechanism to avoid hardcoding is shlibpath_var, we >+ # have to relink, otherwise we might link with an installed library >+ # when we should be linking with a yet-to-be-installed one >+ ## test "$hardcode_shlibpath_var" != no && >+ test "$hardcode_minus_L" != no; then >+ # Linking always hardcodes the temporary library directory. >+ hardcode_action=relink >+ else >+ # We can link without hardcoding, and we can hardcode nonexisting dirs. >+ hardcode_action=immediate >+ fi >+else >+ # We cannot hardcode anything, or else we can only hardcode existing >+ # directories. >+ hardcode_action=unsupported >+fi >+echo "$ac_t""$hardcode_action" 1>&6 >+## >+## END FIXME >+ >+## FIXME: this should be a separate macro >+## >+striplib= >+old_striplib= >+echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 >+echo "configure:6649: checking whether stripping libraries is possible" >&5 >+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then >+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" >+ test -z "$striplib" && striplib="$STRIP --strip-unneeded" >+ echo "$ac_t""yes" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+## >+## END FIXME >+ >+reload_cmds='$LD$reload_flag -o $output$reload_objs' >+test -z "$deplibs_check_method" && deplibs_check_method=unknown >+ >+## FIXME: this should be a separate macro >+## >+# PORTME Fill in your ld.so characteristics >+echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 >+echo "configure:6667: checking dynamic linker characteristics" >&5 >+library_names_spec= >+libname_spec='lib$name' >+soname_spec= >+postinstall_cmds= >+postuninstall_cmds= >+finish_cmds= >+finish_eval= >+shlibpath_var= >+shlibpath_overrides_runpath=unknown >+version_type=none >+dynamic_linker="$host_os ld.so" >+sys_lib_dlsearch_path_spec="/lib /usr/lib" >+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" >+ >+case $host_os in >+aix3*) >+ version_type=linux >+ library_names_spec='${libname}${release}.so$versuffix $libname.a' >+ shlibpath_var=LIBPATH >+ >+ # AIX has no versioning support, so we append a major version to the name. >+ soname_spec='${libname}${release}.so$major' >+ ;; >+ >+aix4* | aix5*) >+ version_type=linux >+ if test "$host_cpu" = ia64; then >+ # AIX 5 supports IA64 >+ library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' >+ shlibpath_var=LD_LIBRARY_PATH >+ else >+ # With GCC up to 2.95.x, collect2 would create an import file >+ # for dependence libraries. The import file would start with >+ # the line `#! .'. This would cause the generated library to >+ # depend on `.', always an invalid library. This was fixed in >+ # development snapshots of GCC prior to 3.0. >+ case $host_os in >+ aix4 | aix4.[01] | aix4.[01].*) >+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' >+ echo ' yes ' >+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then >+ : >+ else >+ can_build_shared=no >+ fi >+ ;; >+ esac >+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct >+ # soname into executable. Probably we can add versioning support to >+ # collect2, so additional links can be useful in future. >+ if test "$aix_use_runtimelinking" = yes; then >+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of >+ # lib<name>.a to let people know that these are not typical AIX shared libraries. >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >+ else >+ # We preserve .a as extension for shared libraries through AIX4.2 >+ # and later when we are not doing run time linking. >+ library_names_spec='${libname}${release}.a $libname.a' >+ soname_spec='${libname}${release}.so$major' >+ fi >+ shlibpath_var=LIBPATH >+ deplibs_check_method=pass_all >+ fi >+ ;; >+ >+amigaos*) >+ library_names_spec='$libname.ixlibrary $libname.a' >+ # Create ${libname}_ixlibrary.a entries in /sys/libs. >+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' >+ ;; >+ >+beos*) >+ library_names_spec='${libname}.so' >+ dynamic_linker="$host_os ld.so" >+ shlibpath_var=LIBRARY_PATH >+ ;; >+ >+bsdi4*) >+ version_type=linux >+ need_version=no >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >+ soname_spec='${libname}${release}.so$major' >+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' >+ shlibpath_var=LD_LIBRARY_PATH >+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" >+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" >+ export_dynamic_flag_spec=-rdynamic >+ # the default ld.so.conf also contains /usr/contrib/lib and >+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow >+ # libtool to hard-code these into programs >+ ;; >+ >+cygwin* | mingw* | pw32*) >+ version_type=windows >+ need_version=no >+ need_lib_prefix=no >+ case $GCC,$host_os in >+ yes,cygwin*) >+ library_names_spec='$libname.dll.a' >+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' >+ postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ >+ dldir=$destdir/`dirname \$dlpath`~ >+ test -d \$dldir || mkdir -p \$dldir~ >+ $install_prog .libs/$dlname \$dldir/$dlname' >+ postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ >+ dlpath=$dir/\$dldll~ >+ $rm \$dlpath' >+ ;; >+ yes,mingw*) >+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' >+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` >+ ;; >+ yes,pw32*) >+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll' >+ ;; >+ *) >+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' >+ ;; >+ esac >+ dynamic_linker='Win32 ld.exe' >+ # FIXME: first we should search . and the directory the executable is in >+ shlibpath_var=PATH >+ ;; >+ >+darwin* | rhapsody*) >+ dynamic_linker="$host_os dyld" >+ version_type=darwin >+ need_lib_prefix=no >+ need_version=no >+ # FIXME: Relying on posixy $() will cause problems for >+ # cross-compilation, but unfortunately the echo tests do not >+ # yet detect zsh echo's removal of \ escapes. >+ library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' >+ soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' >+ shlibpath_overrides_runpath=yes >+ shlibpath_var=DYLD_LIBRARY_PATH >+ ;; >+ >+freebsd1*) >+ dynamic_linker=no >+ ;; >+ >+freebsd*) >+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` >+ version_type=freebsd-$objformat >+ case $version_type in >+ freebsd-elf*) >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' >+ need_version=no >+ need_lib_prefix=no >+ ;; >+ freebsd-*) >+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' >+ need_version=yes >+ ;; >+ esac >+ shlibpath_var=LD_LIBRARY_PATH >+ case $host_os in >+ freebsd2*) >+ shlibpath_overrides_runpath=yes >+ ;; >+ *) >+ shlibpath_overrides_runpath=no >+ hardcode_into_libs=yes >+ ;; >+ esac >+ ;; >+ >+gnu*) >+ version_type=linux >+ need_lib_prefix=no >+ need_version=no >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' >+ soname_spec='${libname}${release}.so$major' >+ shlibpath_var=LD_LIBRARY_PATH >+ hardcode_into_libs=yes >+ ;; >+ >+hpux9* | hpux10* | hpux11*) >+ # Give a soname corresponding to the major version so that dld.sl refuses to >+ # link against other versions. >+ dynamic_linker="$host_os dld.sl" >+ version_type=sunos >+ need_lib_prefix=no >+ need_version=no >+ shlibpath_var=SHLIB_PATH >+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH >+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' >+ soname_spec='${libname}${release}.sl$major' >+ # HP-UX runs *really* slowly unless shared libraries are mode 555. >+ postinstall_cmds='chmod 555 $lib' >+ ;; >+ >+irix5* | irix6*) >+ version_type=irix >+ need_lib_prefix=no >+ need_version=no >+ soname_spec='${libname}${release}.so$major' >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' >+ case $host_os in >+ irix5*) >+ libsuff= shlibsuff= >+ ;; >+ *) >+ case $LD in # libtool.m4 will add one of these switches to LD >+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; >+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; >+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; >+ *) libsuff= shlibsuff= libmagic=never-match;; >+ esac >+ ;; >+ esac >+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH >+ shlibpath_overrides_runpath=no >+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" >+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" >+ ;; >+ >+# No shared lib support for Linux oldld, aout, or coff. >+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) >+ dynamic_linker=no >+ ;; >+ >+# This must be Linux ELF. >+linux-gnu*) >+ version_type=linux >+ need_lib_prefix=no >+ need_version=no >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >+ soname_spec='${libname}${release}.so$major' >+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' >+ shlibpath_var=LD_LIBRARY_PATH >+ shlibpath_overrides_runpath=no >+ # This implies no fast_install, which is unacceptable. >+ # Some rework will be needed to allow for fast_install >+ # before this can be enabled. >+ hardcode_into_libs=yes >+ >+ # We used to test for /lib/ld.so.1 and disable shared libraries on >+ # powerpc, because MkLinux only supported shared libraries with the >+ # GNU dynamic linker. Since this was broken with cross compilers, >+ # most powerpc-linux boxes support dynamic linking these days and >+ # people can always --disable-shared, the test was removed, and we >+ # assume the GNU/Linux dynamic linker is in use. >+ dynamic_linker='GNU/Linux ld.so' >+ ;; >+ >+netbsd*) >+ version_type=sunos >+ need_lib_prefix=no >+ need_version=no >+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then >+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' >+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' >+ dynamic_linker='NetBSD (a.out) ld.so' >+ else >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' >+ soname_spec='${libname}${release}.so$major' >+ dynamic_linker='NetBSD ld.elf_so' >+ fi >+ shlibpath_var=LD_LIBRARY_PATH >+ shlibpath_overrides_runpath=yes >+ hardcode_into_libs=yes >+ ;; >+ >+newsos6) >+ version_type=linux >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >+ shlibpath_var=LD_LIBRARY_PATH >+ shlibpath_overrides_runpath=yes >+ ;; >+ >+openbsd*) >+ version_type=sunos >+ if test "$with_gnu_ld" = yes; then >+ need_lib_prefix=no >+ need_version=no >+ fi >+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' >+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' >+ shlibpath_var=LD_LIBRARY_PATH >+ ;; >+ >+os2*) >+ libname_spec='$name' >+ need_lib_prefix=no >+ library_names_spec='$libname.dll $libname.a' >+ dynamic_linker='OS/2 ld.exe' >+ shlibpath_var=LIBPATH >+ ;; >+ >+osf3* | osf4* | osf5*) >+ version_type=osf >+ need_version=no >+ soname_spec='${libname}${release}.so' >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' >+ shlibpath_var=LD_LIBRARY_PATH >+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" >+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" >+ ;; >+ >+sco3.2v5*) >+ version_type=osf >+ soname_spec='${libname}${release}.so$major' >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >+ shlibpath_var=LD_LIBRARY_PATH >+ ;; >+ >+solaris*) >+ version_type=linux >+ need_lib_prefix=no >+ need_version=no >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >+ soname_spec='${libname}${release}.so$major' >+ shlibpath_var=LD_LIBRARY_PATH >+ shlibpath_overrides_runpath=yes >+ hardcode_into_libs=yes >+ # ldd complains unless libraries are executable >+ postinstall_cmds='chmod +x $lib' >+ ;; >+ >+sunos4*) >+ version_type=sunos >+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' >+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' >+ shlibpath_var=LD_LIBRARY_PATH >+ shlibpath_overrides_runpath=yes >+ if test "$with_gnu_ld" = yes; then >+ need_lib_prefix=no >+ fi >+ need_version=yes >+ ;; >+ >+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) >+ version_type=linux >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >+ soname_spec='${libname}${release}.so$major' >+ shlibpath_var=LD_LIBRARY_PATH >+ case $host_vendor in >+ sni) >+ shlibpath_overrides_runpath=no >+ ;; >+ motorola) >+ need_lib_prefix=no >+ need_version=no >+ shlibpath_overrides_runpath=no >+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' >+ ;; >+ esac >+ ;; >+ >+uts4*) >+ version_type=linux >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >+ soname_spec='${libname}${release}.so$major' >+ shlibpath_var=LD_LIBRARY_PATH >+ ;; >+ >+dgux*) >+ version_type=linux >+ need_lib_prefix=no >+ need_version=no >+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' >+ soname_spec='${libname}${release}.so$major' >+ shlibpath_var=LD_LIBRARY_PATH >+ ;; >+ >+sysv4*MP*) >+ if test -d /usr/nec ;then >+ version_type=linux >+ library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' >+ soname_spec='$libname.so.$major' >+ shlibpath_var=LD_LIBRARY_PATH >+ fi >+ ;; >+ >+*) >+ dynamic_linker=no >+ ;; >+esac >+echo "$ac_t""$dynamic_linker" 1>&6 >+test "$dynamic_linker" = no && can_build_shared=no >+## >+## END FIXME >+ >+## FIXME: this should be a separate macro >+## >+# Report the final consequences. >+echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 >+echo "configure:7057: checking if libtool supports shared libraries" >&5 >+echo "$ac_t""$can_build_shared" 1>&6 >+## >+## END FIXME >+ >+if test "$hardcode_action" = relink; then >+ # Fast installation is not supported >+ enable_fast_install=no >+elif test "$shlibpath_overrides_runpath" = yes || >+ test "$enable_shared" = no; then >+ # Fast installation is not necessary >+ enable_fast_install=needless >+fi >+ >+variables_saved_for_relink="PATH $shlibpath_var $runpath_var" >+if test "$GCC" = yes; then >+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" >+fi >+ >+if test "x$enable_dlopen" != xyes; then >+ enable_dlopen=unknown >+ enable_dlopen_self=unknown >+ enable_dlopen_self_static=unknown >+else >+ lt_cv_dlopen=no >+ lt_cv_dlopen_libs= >+ >+ case $host_os in >+ beos*) >+ lt_cv_dlopen="load_add_on" >+ lt_cv_dlopen_libs= >+ lt_cv_dlopen_self=yes >+ ;; >+ >+ cygwin* | mingw* | pw32*) >+ lt_cv_dlopen="LoadLibrary" >+ lt_cv_dlopen_libs= >+ ;; >+ >+ *) >+ echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 >+echo "configure:7098: checking for dlopen in -ldl" >&5 >+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-ldl $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 7106 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char dlopen(); >+ >+int main() { >+dlopen() >+; return 0; } >+EOF >+if { (eval echo configure:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" >+else >+ echo "$ac_t""no" 1>&6 >+echo $ac_n "checking for dlopen""... $ac_c" 1>&6 >+echo "configure:7136: checking for dlopen" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 7141 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char dlopen(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char dlopen(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_dlopen) || defined (__stub___dlopen) >+choke me >+#else >+dlopen(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:7164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_dlopen=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_dlopen=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ lt_cv_dlopen="dlopen" >+else >+ echo "$ac_t""no" 1>&6 >+echo $ac_n "checking for shl_load""... $ac_c" 1>&6 >+echo "configure:7182: checking for shl_load" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 7187 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char shl_load(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char shl_load(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_shl_load) || defined (__stub___shl_load) >+choke me >+#else >+shl_load(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:7210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_shl_load=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_shl_load=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ lt_cv_dlopen="shl_load" >+else >+ echo "$ac_t""no" 1>&6 >+echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 >+echo "configure:7228: checking for dlopen in -lsvld" >&5 >+ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-lsvld $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 7236 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char dlopen(); >+ >+int main() { >+dlopen() >+; return 0; } >+EOF >+if { (eval echo configure:7247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" >+else >+ echo "$ac_t""no" 1>&6 >+echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 >+echo "configure:7266: checking for shl_load in -ldld" >&5 >+ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` >+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ ac_save_LIBS="$LIBS" >+LIBS="-ldld $LIBS" >+cat > conftest.$ac_ext <<EOF >+#line 7274 "configure" >+#include "confdefs.h" >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char shl_load(); >+ >+int main() { >+shl_load() >+; return 0; } >+EOF >+if { (eval echo configure:7285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_lib_$ac_lib_var=no" >+fi >+rm -f conftest* >+LIBS="$ac_save_LIBS" >+ >+fi >+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+fi >+ >+ >+fi >+ >+ >+fi >+ >+ >+fi >+ >+ ;; >+ esac >+ >+ if test "x$lt_cv_dlopen" != xno; then >+ enable_dlopen=yes >+ else >+ enable_dlopen=no >+ fi >+ >+ case $lt_cv_dlopen in >+ dlopen) >+ save_CPPFLAGS="$CPPFLAGS" >+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" >+ >+ save_LDFLAGS="$LDFLAGS" >+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" >+ >+ save_LIBS="$LIBS" >+ LIBS="$lt_cv_dlopen_libs $LIBS" >+ >+ echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 >+echo "configure:7338: checking whether a program can dlopen itself" >&5 >+if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test "$cross_compiling" = yes; then : >+ lt_cv_dlopen_self=cross >+else >+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 >+ lt_status=$lt_dlunknown >+ cat > conftest.$ac_ext <<EOF >+#line 7348 "configure" >+#include "confdefs.h" >+ >+#if HAVE_DLFCN_H >+#include <dlfcn.h> >+#endif >+ >+#include <stdio.h> >+ >+#ifdef RTLD_GLOBAL >+# define LT_DLGLOBAL RTLD_GLOBAL >+#else >+# ifdef DL_GLOBAL >+# define LT_DLGLOBAL DL_GLOBAL >+# else >+# define LT_DLGLOBAL 0 >+# endif >+#endif >+ >+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we >+ find out it does not work in some platform. */ >+#ifndef LT_DLLAZY_OR_NOW >+# ifdef RTLD_LAZY >+# define LT_DLLAZY_OR_NOW RTLD_LAZY >+# else >+# ifdef DL_LAZY >+# define LT_DLLAZY_OR_NOW DL_LAZY >+# else >+# ifdef RTLD_NOW >+# define LT_DLLAZY_OR_NOW RTLD_NOW >+# else >+# ifdef DL_NOW >+# define LT_DLLAZY_OR_NOW DL_NOW >+# else >+# define LT_DLLAZY_OR_NOW 0 >+# endif >+# endif >+# endif >+# endif >+#endif >+ >+#ifdef __cplusplus >+extern "C" void exit (int); >+#endif >+ >+void fnord() { int i=42;} >+int main () >+{ >+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); >+ int status = $lt_dlunknown; >+ >+ if (self) >+ { >+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore; >+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; >+ /* dlclose (self); */ >+ } >+ >+ exit (status); >+} >+EOF >+ if { (eval echo configure:7409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then >+ (./conftest; exit; ) 2>/dev/null >+ lt_status=$? >+ case x$lt_status in >+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; >+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; >+ x$lt_unknown|x*) lt_cv_dlopen_self=no ;; >+ esac >+ else : >+ # compilation failed >+ lt_cv_dlopen_self=no >+ fi >+fi >+rm -fr conftest* >+ >+ >+fi >+ >+echo "$ac_t""$lt_cv_dlopen_self" 1>&6 >+ >+ if test "x$lt_cv_dlopen_self" = xyes; then >+ LDFLAGS="$LDFLAGS $link_static_flag" >+ echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 >+echo "configure:7432: checking whether a statically linked program can dlopen itself" >&5 >+if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ if test "$cross_compiling" = yes; then : >+ lt_cv_dlopen_self_static=cross >+else >+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 >+ lt_status=$lt_dlunknown >+ cat > conftest.$ac_ext <<EOF >+#line 7442 "configure" >+#include "confdefs.h" >+ >+#if HAVE_DLFCN_H >+#include <dlfcn.h> >+#endif >+ >+#include <stdio.h> >+ >+#ifdef RTLD_GLOBAL >+# define LT_DLGLOBAL RTLD_GLOBAL >+#else >+# ifdef DL_GLOBAL >+# define LT_DLGLOBAL DL_GLOBAL >+# else >+# define LT_DLGLOBAL 0 >+# endif >+#endif >+ >+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we >+ find out it does not work in some platform. */ >+#ifndef LT_DLLAZY_OR_NOW >+# ifdef RTLD_LAZY >+# define LT_DLLAZY_OR_NOW RTLD_LAZY >+# else >+# ifdef DL_LAZY >+# define LT_DLLAZY_OR_NOW DL_LAZY >+# else >+# ifdef RTLD_NOW >+# define LT_DLLAZY_OR_NOW RTLD_NOW >+# else >+# ifdef DL_NOW >+# define LT_DLLAZY_OR_NOW DL_NOW >+# else >+# define LT_DLLAZY_OR_NOW 0 >+# endif >+# endif >+# endif >+# endif >+#endif >+ >+#ifdef __cplusplus >+extern "C" void exit (int); >+#endif >+ >+void fnord() { int i=42;} >+int main () >+{ >+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); >+ int status = $lt_dlunknown; >+ >+ if (self) >+ { >+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore; >+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; >+ /* dlclose (self); */ >+ } >+ >+ exit (status); >+} >+EOF >+ if { (eval echo configure:7503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then >+ (./conftest; exit; ) 2>/dev/null >+ lt_status=$? >+ case x$lt_status in >+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; >+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; >+ x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; >+ esac >+ else : >+ # compilation failed >+ lt_cv_dlopen_self_static=no >+ fi >+fi >+rm -fr conftest* >+ >+ >+fi >+ >+echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 >+ fi >+ >+ CPPFLAGS="$save_CPPFLAGS" >+ LDFLAGS="$save_LDFLAGS" >+ LIBS="$save_LIBS" >+ ;; >+ esac >+ >+ case $lt_cv_dlopen_self in >+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; >+ *) enable_dlopen_self=unknown ;; >+ esac >+ >+ case $lt_cv_dlopen_self_static in >+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; >+ *) enable_dlopen_self_static=unknown ;; >+ esac >+fi >+ >+ >+## FIXME: this should be a separate macro >+## >+if test "$enable_shared" = yes && test "$GCC" = yes; then >+ case $archive_cmds in >+ *'~'*) >+ # FIXME: we may have to deal with multi-command sequences. >+ ;; >+ '$CC '*) >+ # Test whether the compiler implicitly links with -lc since on some >+ # systems, -lgcc has to come before -lc. If gcc already passes -lc >+ # to ld, don't add -lc before -lgcc. >+ echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 >+echo "configure:7554: checking whether -lc should be explicitly linked in" >&5 >+ if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ $rm conftest* >+ echo 'static int dummy;' > conftest.$ac_ext >+ >+ if { (eval echo configure:7561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ soname=conftest >+ lib=conftest >+ libobjs=conftest.$ac_objext >+ deplibs= >+ wl=$lt_cv_prog_cc_wl >+ compiler_flags=-v >+ linker_flags=-v >+ verstring= >+ output_objdir=. >+ libname=conftest >+ save_allow_undefined_flag=$allow_undefined_flag >+ allow_undefined_flag= >+ if { (eval echo configure:7574: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } >+ then >+ lt_cv_archive_cmds_need_lc=no >+ else >+ lt_cv_archive_cmds_need_lc=yes >+ fi >+ allow_undefined_flag=$save_allow_undefined_flag >+ else >+ cat conftest.err 1>&5 >+ fi >+fi >+ >+ echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6 >+ ;; >+ esac >+fi >+need_lc=${lt_cv_archive_cmds_need_lc-yes} >+## >+## END FIXME >+ >+## FIXME: this should be a separate macro >+## >+# The second clause should only fire when bootstrapping the >+# libtool distribution, otherwise you forgot to ship ltmain.sh >+# with your package, and you will get complaints that there are >+# no rules to generate ltmain.sh. >+if test -f "$ltmain"; then >+ : >+else >+ # If there is no Makefile yet, we rely on a make rule to execute >+ # `config.status --recheck' to rerun these tests and create the >+ # libtool script then. >+ test -f Makefile && make "$ltmain" >+fi >+ >+if test -f "$ltmain"; then >+ trap "$rm \"${ofile}T\"; exit 1" 1 2 15 >+ $rm -f "${ofile}T" >+ >+ echo creating $ofile >+ >+ # Now quote all the things that may contain metacharacters while being >+ # careful not to overquote the AC_SUBSTed values. We take copies of the >+ # variables and quote the copies for generation of the libtool script. >+ for var in echo old_CC old_CFLAGS \ >+ AR AR_FLAGS CC LD LN_S NM SHELL \ >+ reload_flag reload_cmds wl \ >+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ >+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ >+ library_names_spec soname_spec \ >+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ >+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ >+ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ >+ old_striplib striplib file_magic_cmd export_symbols_cmds \ >+ deplibs_check_method allow_undefined_flag no_undefined_flag \ >+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ >+ hardcode_libdir_flag_spec hardcode_libdir_separator \ >+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ >+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do >+ >+ case $var in >+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ >+ old_postinstall_cmds | old_postuninstall_cmds | \ >+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ >+ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ >+ postinstall_cmds | postuninstall_cmds | \ >+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) >+ # Double-quote double-evaled strings. >+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" >+ ;; >+ *) >+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" >+ ;; >+ esac >+ done >+ >+ cat <<__EOF__ > "${ofile}T" >+#! $SHELL >+ >+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. >+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) >+# NOTE: Changes made to this file will be lost: look at ltmain.sh. >+# >+# Copyright (C) 1996-2000 Free Software Foundation, Inc. >+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 >+# >+# This program is free software; you can redistribute it and/or modify >+# it under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 2 of the License, or >+# (at your option) any later version. >+# >+# This program is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+# General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with this program; if not, write to the Free Software >+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. >+ >+# Sed that helps us avoid accidentally triggering echo(1) options like -n. >+Xsed="sed -e s/^X//" >+ >+# The HP-UX ksh and POSIX shell print the target directory to stdout >+# if CDPATH is set. >+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi >+ >+# ### BEGIN LIBTOOL CONFIG >+ >+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: >+ >+# Shell to use when invoking shell scripts. >+SHELL=$lt_SHELL >+ >+# Whether or not to build shared libraries. >+build_libtool_libs=$enable_shared >+ >+# Whether or not to add -lc for building shared libraries. >+build_libtool_need_lc=$need_lc >+ >+# Whether or not to build static libraries. >+build_old_libs=$enable_static >+ >+# Whether or not to optimize for fast installation. >+fast_install=$enable_fast_install >+ >+# The host system. >+host_alias=$host_alias >+host=$host >+ >+# An echo program that does not interpret backslashes. >+echo=$lt_echo >+ >+# The archiver. >+AR=$lt_AR >+AR_FLAGS=$lt_AR_FLAGS >+ >+# The default C compiler. >+CC=$lt_CC >+ >+# Is the compiler the GNU C compiler? >+with_gcc=$GCC >+ >+# The linker used to build libraries. >+LD=$lt_LD >+ >+# Whether we need hard or soft links. >+LN_S=$lt_LN_S >+ >+# A BSD-compatible nm program. >+NM=$lt_NM >+ >+# A symbol stripping program >+STRIP=$STRIP >+ >+# Used to examine libraries when file_magic_cmd begins "file" >+MAGIC_CMD=$MAGIC_CMD >+ >+# Used on cygwin: DLL creation program. >+DLLTOOL="$DLLTOOL" >+ >+# Used on cygwin: object dumper. >+OBJDUMP="$OBJDUMP" >+ >+# Used on cygwin: assembler. >+AS="$AS" >+ >+# The name of the directory that contains temporary libtool files. >+objdir=$objdir >+ >+# How to create reloadable object files. >+reload_flag=$lt_reload_flag >+reload_cmds=$lt_reload_cmds >+ >+# How to pass a linker flag through the compiler. >+wl=$lt_wl >+ >+# Object file suffix (normally "o"). >+objext="$ac_objext" >+ >+# Old archive suffix (normally "a"). >+libext="$libext" >+ >+# Executable file suffix (normally ""). >+exeext="$exeext" >+ >+# Additional compiler flags for building library objects. >+pic_flag=$lt_pic_flag >+pic_mode=$pic_mode >+ >+# Does compiler simultaneously support -c and -o options? >+compiler_c_o=$lt_compiler_c_o >+ >+# Can we write directly to a .lo ? >+compiler_o_lo=$lt_compiler_o_lo >+ >+# Must we lock files when doing compilation ? >+need_locks=$lt_need_locks >+ >+# Do we need the lib prefix for modules? >+need_lib_prefix=$need_lib_prefix >+ >+# Do we need a version for libraries? >+need_version=$need_version >+ >+# Whether dlopen is supported. >+dlopen_support=$enable_dlopen >+ >+# Whether dlopen of programs is supported. >+dlopen_self=$enable_dlopen_self >+ >+# Whether dlopen of statically linked programs is supported. >+dlopen_self_static=$enable_dlopen_self_static >+ >+# Compiler flag to prevent dynamic linking. >+link_static_flag=$lt_link_static_flag >+ >+# Compiler flag to turn off builtin functions. >+no_builtin_flag=$lt_no_builtin_flag >+ >+# Compiler flag to allow reflexive dlopens. >+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec >+ >+# Compiler flag to generate shared objects directly from archives. >+whole_archive_flag_spec=$lt_whole_archive_flag_spec >+ >+# Compiler flag to generate thread-safe objects. >+thread_safe_flag_spec=$lt_thread_safe_flag_spec >+ >+# Library versioning type. >+version_type=$version_type >+ >+# Format of library name prefix. >+libname_spec=$lt_libname_spec >+ >+# List of archive names. First name is the real one, the rest are links. >+# The last name is the one that the linker finds with -lNAME. >+library_names_spec=$lt_library_names_spec >+ >+# The coded name of the library, if different from the real name. >+soname_spec=$lt_soname_spec >+ >+# Commands used to build and install an old-style archive. >+RANLIB=$lt_RANLIB >+old_archive_cmds=$lt_old_archive_cmds >+old_postinstall_cmds=$lt_old_postinstall_cmds >+old_postuninstall_cmds=$lt_old_postuninstall_cmds >+ >+# Create an old-style archive from a shared archive. >+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds >+ >+# Create a temporary old-style archive to link instead of a shared archive. >+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds >+ >+# Commands used to build and install a shared archive. >+archive_cmds=$lt_archive_cmds >+archive_expsym_cmds=$lt_archive_expsym_cmds >+postinstall_cmds=$lt_postinstall_cmds >+postuninstall_cmds=$lt_postuninstall_cmds >+ >+# Commands to strip libraries. >+old_striplib=$lt_old_striplib >+striplib=$lt_striplib >+ >+# Method to check whether dependent libraries are shared objects. >+deplibs_check_method=$lt_deplibs_check_method >+ >+# Command to use when deplibs_check_method == file_magic. >+file_magic_cmd=$lt_file_magic_cmd >+ >+# Flag that allows shared libraries with undefined symbols to be built. >+allow_undefined_flag=$lt_allow_undefined_flag >+ >+# Flag that forces no undefined symbols. >+no_undefined_flag=$lt_no_undefined_flag >+ >+# Commands used to finish a libtool library installation in a directory. >+finish_cmds=$lt_finish_cmds >+ >+# Same as above, but a single script fragment to be evaled but not shown. >+finish_eval=$lt_finish_eval >+ >+# Take the output of nm and produce a listing of raw symbols and C names. >+global_symbol_pipe=$lt_global_symbol_pipe >+ >+# Transform the output of nm in a proper C declaration >+global_symbol_to_cdecl=$lt_global_symbol_to_cdecl >+ >+# This is the shared library runtime path variable. >+runpath_var=$runpath_var >+ >+# This is the shared library path variable. >+shlibpath_var=$shlibpath_var >+ >+# Is shlibpath searched before the hard-coded library search path? >+shlibpath_overrides_runpath=$shlibpath_overrides_runpath >+ >+# How to hardcode a shared library path into an executable. >+hardcode_action=$hardcode_action >+ >+# Whether we should hardcode library paths into libraries. >+hardcode_into_libs=$hardcode_into_libs >+ >+# Flag to hardcode \$libdir into a binary during linking. >+# This must work even if \$libdir does not exist. >+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec >+ >+# Whether we need a single -rpath flag with a separated argument. >+hardcode_libdir_separator=$lt_hardcode_libdir_separator >+ >+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the >+# resulting binary. >+hardcode_direct=$hardcode_direct >+ >+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the >+# resulting binary. >+hardcode_minus_L=$hardcode_minus_L >+ >+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into >+# the resulting binary. >+hardcode_shlibpath_var=$hardcode_shlibpath_var >+ >+# Variables whose values should be saved in libtool wrapper scripts and >+# restored at relink time. >+variables_saved_for_relink="$variables_saved_for_relink" >+ >+# Whether libtool must link a program against all its dependency libraries. >+link_all_deplibs=$link_all_deplibs >+ >+# Compile-time system search path for libraries >+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec >+ >+# Run-time system search path for libraries >+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec >+ >+# Fix the shell variable \$srcfile for the compiler. >+fix_srcfile_path="$fix_srcfile_path" >+ >+# Set to yes if exported symbols are required. >+always_export_symbols=$always_export_symbols >+ >+# The commands to list exported symbols. >+export_symbols_cmds=$lt_export_symbols_cmds >+ >+# The commands to extract the exported symbol list from a shared archive. >+extract_expsyms_cmds=$lt_extract_expsyms_cmds >+ >+# Symbols that should not be listed in the preloaded symbols. >+exclude_expsyms=$lt_exclude_expsyms >+ >+# Symbols that must always be exported. >+include_expsyms=$lt_include_expsyms >+ >+# ### END LIBTOOL CONFIG >+ >+__EOF__ >+ >+ case $host_os in >+ aix3*) >+ cat <<\EOF >> "${ofile}T" >+ >+# AIX sometimes has problems with the GCC collect2 program. For some >+# reason, if we set the COLLECT_NAMES environment variable, the problems >+# vanish in a puff of smoke. >+if test "X${COLLECT_NAMES+set}" != Xset; then >+ COLLECT_NAMES= >+ export COLLECT_NAMES >+fi >+EOF >+ ;; >+ esac >+ >+ case $host_os in >+ cygwin* | mingw* | pw32* | os2*) >+ cat <<'EOF' >> "${ofile}T" >+ # This is a source program that is used to create dlls on Windows >+ # Don't remove nor modify the starting and closing comments >+# /* ltdll.c starts here */ >+# #define WIN32_LEAN_AND_MEAN >+# #include <windows.h> >+# #undef WIN32_LEAN_AND_MEAN >+# #include <stdio.h> >+# >+# #ifndef __CYGWIN__ >+# # ifdef __CYGWIN32__ >+# # define __CYGWIN__ __CYGWIN32__ >+# # endif >+# #endif >+# >+# #ifdef __cplusplus >+# extern "C" { >+# #endif >+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); >+# #ifdef __cplusplus >+# } >+# #endif >+# >+# #ifdef __CYGWIN__ >+# #include <cygwin/cygwin_dll.h> >+# DECLARE_CYGWIN_DLL( DllMain ); >+# #endif >+# HINSTANCE __hDllInstance_base; >+# >+# BOOL APIENTRY >+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) >+# { >+# __hDllInstance_base = hInst; >+# return TRUE; >+# } >+# /* ltdll.c ends here */ >+ # This is a source program that is used to create import libraries >+ # on Windows for dlls which lack them. Don't remove nor modify the >+ # starting and closing comments >+# /* impgen.c starts here */ >+# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. >+# >+# This file is part of GNU libtool. >+# >+# This program is free software; you can redistribute it and/or modify >+# it under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 2 of the License, or >+# (at your option) any later version. >+# >+# This program is distributed in the hope that it will be useful, >+# but WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with this program; if not, write to the Free Software >+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. >+# */ >+# >+# #include <stdio.h> /* for printf() */ >+# #include <unistd.h> /* for open(), lseek(), read() */ >+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */ >+# #include <string.h> /* for strdup() */ >+# >+# /* O_BINARY isn't required (or even defined sometimes) under Unix */ >+# #ifndef O_BINARY >+# #define O_BINARY 0 >+# #endif >+# >+# static unsigned int >+# pe_get16 (fd, offset) >+# int fd; >+# int offset; >+# { >+# unsigned char b[2]; >+# lseek (fd, offset, SEEK_SET); >+# read (fd, b, 2); >+# return b[0] + (b[1]<<8); >+# } >+# >+# static unsigned int >+# pe_get32 (fd, offset) >+# int fd; >+# int offset; >+# { >+# unsigned char b[4]; >+# lseek (fd, offset, SEEK_SET); >+# read (fd, b, 4); >+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); >+# } >+# >+# static unsigned int >+# pe_as32 (ptr) >+# void *ptr; >+# { >+# unsigned char *b = ptr; >+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); >+# } >+# >+# int >+# main (argc, argv) >+# int argc; >+# char *argv[]; >+# { >+# int dll; >+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; >+# unsigned long export_rva, export_size, nsections, secptr, expptr; >+# unsigned long name_rvas, nexp; >+# unsigned char *expdata, *erva; >+# char *filename, *dll_name; >+# >+# filename = argv[1]; >+# >+# dll = open(filename, O_RDONLY|O_BINARY); >+# if (dll < 1) >+# return 1; >+# >+# dll_name = filename; >+# >+# for (i=0; filename[i]; i++) >+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') >+# dll_name = filename + i +1; >+# >+# pe_header_offset = pe_get32 (dll, 0x3c); >+# opthdr_ofs = pe_header_offset + 4 + 20; >+# num_entries = pe_get32 (dll, opthdr_ofs + 92); >+# >+# if (num_entries < 1) /* no exports */ >+# return 1; >+# >+# export_rva = pe_get32 (dll, opthdr_ofs + 96); >+# export_size = pe_get32 (dll, opthdr_ofs + 100); >+# nsections = pe_get16 (dll, pe_header_offset + 4 +2); >+# secptr = (pe_header_offset + 4 + 20 + >+# pe_get16 (dll, pe_header_offset + 4 + 16)); >+# >+# expptr = 0; >+# for (i = 0; i < nsections; i++) >+# { >+# char sname[8]; >+# unsigned long secptr1 = secptr + 40 * i; >+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); >+# unsigned long vsize = pe_get32 (dll, secptr1 + 16); >+# unsigned long fptr = pe_get32 (dll, secptr1 + 20); >+# lseek(dll, secptr1, SEEK_SET); >+# read(dll, sname, 8); >+# if (vaddr <= export_rva && vaddr+vsize > export_rva) >+# { >+# expptr = fptr + (export_rva - vaddr); >+# if (export_rva + export_size > vaddr + vsize) >+# export_size = vsize - (export_rva - vaddr); >+# break; >+# } >+# } >+# >+# expdata = (unsigned char*)malloc(export_size); >+# lseek (dll, expptr, SEEK_SET); >+# read (dll, expdata, export_size); >+# erva = expdata - export_rva; >+# >+# nexp = pe_as32 (expdata+24); >+# name_rvas = pe_as32 (expdata+32); >+# >+# printf ("EXPORTS\n"); >+# for (i = 0; i<nexp; i++) >+# { >+# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); >+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); >+# } >+# >+# return 0; >+# } >+# /* impgen.c ends here */ >+ >+EOF >+ ;; >+ esac >+ >+ # We use sed instead of cat because bash on DJGPP gets confused if >+ # if finds mixed CR/LF and LF-only lines. Since sed operates in >+ # text mode, it properly converts lines to CR/LF. This bash problem >+ # is reportedly fixed, but why not run on old versions too? >+ sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) >+ >+ mv -f "${ofile}T" "$ofile" || \ >+ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") >+ chmod +x "$ofile" >+fi >+## >+## END FIXME >+ >+ >+ >+ >+ >+# This can be used to rebuild libtool when needed >+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" >+ >+# Always use our own libtool. >+LIBTOOL='$(SHELL) $(top_builddir)/libtool' >+ >+# Prevent multiple expansion >+ >+ >+ O=lo >+ A=la >+ LIBTOOL_MKDEP_SED='s;\.o;\.lo;' >+ ;; >+ *) >+ O=o >+ A=a >+ LIBTOOL= >+ >+ LIBTOOL_MKDEP_SED= >+ ;; >+esac >+ >+# >+# File name extension for static archive files, for those few places >+# where they are treated differently from dynamic ones. >+# >+SA=a >+ >+ >+ >+ >+ >+ >+# >+# build libbind? >+# >+# Check whether --enable-libbind or --disable-libbind was given. >+if test "${enable_libbind+set}" = set; then >+ enableval="$enable_libbind" >+ : >+fi >+ >+ >+case "$enable_libbind" in >+ yes) >+ LIBBIND=lib/bind >+ >+ ;; >+ no|'') >+ ;; >+esac >+ >+# >+# Here begins a very long section to determine the system's networking >+# capabilities. The order of the tests is signficant. >+# >+ >+# >+# IPv6 >+# >+# Check whether --enable-ipv6 or --disable-ipv6 was given. >+if test "${enable_ipv6+set}" = set; then >+ enableval="$enable_ipv6" >+ : >+fi >+ >+ >+case "$enable_ipv6" in >+ yes|''|autodetect) >+ cat >> confdefs.h <<\EOF >+#define WANT_IPV6 1 >+EOF >+ >+ ;; >+ no) >+ ;; >+esac >+ >+# >+# We do the IPv6 compilation checking after libtool so that we can put >+# the right suffix on the files. >+# >+echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 >+echo "configure:8231: checking for IPv6 structures" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8233 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/socket.h> >+#include <netinet/in.h> >+int main() { >+struct sockaddr_in6 sin6; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:8243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ found_ipv6=yes >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ found_ipv6=no >+fi >+rm -f conftest* >+ >+# >+# See whether IPv6 support is provided via a Kame add-on. >+# This is done before other IPv6 linking tests to LIBS is properly set. >+# >+echo $ac_n "checking for Kame IPv6 support""... $ac_c" 1>&6 >+echo "configure:8261: checking for Kame IPv6 support" >&5 >+# Check whether --with-kame or --without-kame was given. >+if test "${with_kame+set}" = set; then >+ withval="$with_kame" >+ use_kame="$withval" >+else >+ use_kame="no" >+fi >+ >+ >+case "$use_kame" in >+ no) >+ ;; >+ yes) >+ kame_path=/usr/local/v6 >+ ;; >+ *) >+ kame_path="$use_kame" >+ ;; >+esac >+ >+case "$use_kame" in >+ no) >+ echo "$ac_t""no" 1>&6 >+ ;; >+ *) >+ if test -f $kame_path/lib/libinet6.a; then >+ echo "$ac_t""$kame_path/lib/libinet6.a" 1>&6 >+ LIBS="-L$kame_path/lib -linet6 $LIBS" >+ else >+ { echo "configure: error: $kame_path/lib/libinet6.a not found. >+ >+Please choose the proper path with the following command: >+ >+ configure --with-kame=PATH >+" 1>&2; exit 1; } >+ fi >+ ;; >+esac >+ >+# >+# Whether netinet6/in6.h is needed has to be defined in isc/platform.h. >+# Including it on Kame-using platforms is very bad, though, because >+# Kame uses #error against direct inclusion. So include it on only >+# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1. >+# This is done before the in6_pktinfo check because that's what >+# netinet6/in6.h is needed for. >+# >+ >+case "$host" in >+*-bsdi4.[01]*) >+ ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >+ LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1" >+ isc_netinet6in6_hack="#include <netinet6/in6.h>" >+ ;; >+*) >+ ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H" >+ LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H" >+ isc_netinet6in6_hack="" >+ ;; >+esac >+ >+ >+# >+# This is similar to the netinet6/in6.h issue. >+# >+case "$host" in >+*-sco-sysv*uw*) >+ # UnixWare >+ ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1" >+ LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1" >+ ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1" >+ isc_netinetin6_hack="#include <netinet/in6.h>" >+ ;; >+*) >+ ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H" >+ LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H" >+ ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR" >+ isc_netinetin6_hack="" >+ ;; >+esac >+ >+# >+# Now delve deeper into the suitability of the IPv6 support. >+# >+case "$found_ipv6" in >+ yes) >+ ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1" >+ LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1" >+ >+ echo $ac_n "checking for in6_addr""... $ac_c" 1>&6 >+echo "configure:8352: checking for in6_addr" >&5 >+ cat > conftest.$ac_ext <<EOF >+#line 8354 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/socket.h> >+#include <netinet/in.h> >+$isc_netinetin6_hack >+$isc_netinet6in6_hack >+ >+int main() { >+struct in6_addr in6; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:8367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" >+ LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6" >+ isc_in_addr6_hack="" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1" >+ LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1" >+ isc_in_addr6_hack="#define in6_addr in_addr6" >+fi >+rm -f conftest* >+ >+ echo $ac_n "checking for in6addr_any""... $ac_c" 1>&6 >+echo "configure:8385: checking for in6addr_any" >&5 >+ cat > conftest.$ac_ext <<EOF >+#line 8387 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/socket.h> >+#include <netinet/in.h> >+$isc_netinetin6_hack >+$isc_netinet6in6_hack >+$isc_in_addr6_hack >+ >+int main() { >+struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]); >+; return 0; } >+EOF >+if { (eval echo configure:8401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" >+ LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >+ LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1" >+fi >+rm -f conftest* >+ >+ echo $ac_n "checking for in6addr_loopback""... $ac_c" 1>&6 >+echo "configure:8417: checking for in6addr_loopback" >&5 >+ cat > conftest.$ac_ext <<EOF >+#line 8419 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/socket.h> >+#include <netinet/in.h> >+$isc_netinetin6_hack >+$isc_netinet6in6_hack >+$isc_in_addr6_hack >+ >+int main() { >+struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]); >+; return 0; } >+EOF >+if { (eval echo configure:8433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK" >+ LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1" >+ LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1" >+fi >+rm -f conftest* >+ >+ echo $ac_n "checking for sin6_scope_id in struct sockaddr_in6""... $ac_c" 1>&6 >+echo "configure:8449: checking for sin6_scope_id in struct sockaddr_in6" >&5 >+ cat > conftest.$ac_ext <<EOF >+#line 8451 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/socket.h> >+#include <netinet/in.h> >+$isc_netinetin6_hack >+$isc_netinet6in6_hack >+ >+int main() { >+struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:8464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ result="#define LWRES_HAVE_SIN6_SCOPE_ID 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ result="#undef LWRES_HAVE_SIN6_SCOPE_ID" >+fi >+rm -f conftest* >+ LWRES_HAVE_SIN6_SCOPE_ID="$result" >+ >+ echo $ac_n "checking for in6_pktinfo""... $ac_c" 1>&6 >+echo "configure:8479: checking for in6_pktinfo" >&5 >+ cat > conftest.$ac_ext <<EOF >+#line 8481 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/socket.h> >+#include <netinet/in.h> >+$isc_netinetin6_hack >+$isc_netinet6in6_hack >+ >+int main() { >+struct in6_pktinfo xyzzy; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:8494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no -- disabling runtime ipv6 support" 1>&6 >+ ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO" >+fi >+rm -f conftest* >+ ;; >+ no) >+ ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6" >+ LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6" >+ ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" >+ LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY" >+ ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO" >+ LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1" >+ ISC_IPV6_H="ipv6.h" >+ ISC_IPV6_O="ipv6.$O" >+ ISC_ISCIPV6_O="unix/ipv6.$O" >+ ISC_IPV6_C="ipv6.c" >+ ;; >+esac >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+# >+# Check for network functions that are often missing. We do this >+# after the libtool checking, so we can put the right suffix on >+# the files. It also needs to come after checking for a Kame add-on, >+# which provides some (all?) of the desired functions. >+# >+ >+echo $ac_n "checking for inet_ntop with IPv6 support""... $ac_c" 1>&6 >+echo "configure:8549: checking for inet_ntop with IPv6 support" >&5 >+if test "$cross_compiling" = yes; then >+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } >+else >+ cat > conftest.$ac_ext <<EOF >+#line 8554 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/socket.h> >+#include <netinet/in.h> >+#include <arpa/inet.h> >+main() { >+char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);} >+EOF >+if { (eval echo configure:8564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O" >+ ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c" >+ ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1" >+fi >+rm -fr conftest* >+fi >+ >+ >+ >+# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts >+# addresses with less than four octets, like "1.2.3". Also leading >+# zeros should also be rejected. >+ >+echo $ac_n "checking for working inet_pton with IPv6 support""... $ac_c" 1>&6 >+echo "configure:8587: checking for working inet_pton with IPv6 support" >&5 >+if test "$cross_compiling" = yes; then >+ echo "$ac_t""assuming target platform has working inet_pton" 1>&6 >+ ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" >+else >+ cat > conftest.$ac_ext <<EOF >+#line 8593 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/socket.h> >+#include <netinet/in.h> >+#include <arpa/inet.h> >+main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : >+ inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : >+ (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); } >+EOF >+if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O" >+ ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c" >+ ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1" >+fi >+rm -fr conftest* >+fi >+ >+ >+echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 >+echo "configure:8622: checking for inet_aton" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8624 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <netinet/in.h> >+#include <arpa/inet.h> >+int main() { >+struct in_addr in; inet_aton(0, &in); return (0); >+; return 0; } >+EOF >+if { (eval echo configure:8634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O" >+ ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c" >+ ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1" >+fi >+rm -f conftest* >+ >+ >+ >+ >+ >+# >+# Look for a 4.4BSD-style sa_len member in struct sockaddr. >+# >+case "$host" in >+ *-dec-osf*) >+ # Turn on 4.4BSD style sa_len support. >+ cat >> confdefs.h <<\EOF >+#define _SOCKADDR_LEN 1 >+EOF >+ >+ ;; >+esac >+ >+echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6 >+echo "configure:8667: checking for sa_len in struct sockaddr" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8669 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/socket.h> >+int main() { >+struct sockaddr sa; sa.sa_len = 0; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:8678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" >+ LWRES_PLATFORM_HAVESALEN="#define LWRES_PLATFORM_HAVESALEN 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN" >+ LWRES_PLATFORM_HAVESALEN="#undef LWRES_PLATFORM_HAVESALEN" >+fi >+rm -f conftest* >+ >+ >+ >+# >+# Look for a 4.4BSD or 4.3BSD struct msghdr >+# >+echo $ac_n "checking for struct msghdr flavor""... $ac_c" 1>&6 >+echo "configure:8699: checking for struct msghdr flavor" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8701 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/socket.h> >+int main() { >+struct msghdr msg; msg.msg_flags = 0; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:8710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""4.4BSD" 1>&6 >+ ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""4.3BSD" 1>&6 >+ ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1" >+fi >+rm -f conftest* >+ >+ >+# >+# Look for in_port_t. >+# >+echo $ac_n "checking for type in_port_t""... $ac_c" 1>&6 >+echo "configure:8728: checking for type in_port_t" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8730 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <netinet/in.h> >+int main() { >+in_port_t port = 25; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:8739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1" >+fi >+rm -f conftest* >+ >+ >+# >+# Check for addrinfo >+# >+echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 >+echo "configure:8757: checking for struct addrinfo" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8759 "configure" >+#include "confdefs.h" >+ >+#include <netdb.h> >+int main() { >+struct addrinfo a; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:8767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" >+ cat >> confdefs.h <<\EOF >+#define HAVE_ADDRINFO 1 >+EOF >+ >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1" >+fi >+rm -f conftest* >+ >+ >+# >+# Check for rrsetinfo >+# >+echo $ac_n "checking for struct rrsetinfo""... $ac_c" 1>&6 >+echo "configure:8789: checking for struct rrsetinfo" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8791 "configure" >+#include "confdefs.h" >+ >+#include <netdb.h> >+int main() { >+struct rrsetinfo r; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:8799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1" >+fi >+rm -f conftest* >+ >+ >+echo $ac_n "checking for int sethostent""... $ac_c" 1>&6 >+echo "configure:8814: checking for int sethostent" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8816 "configure" >+#include "confdefs.h" >+ >+#include <netdb.h> >+int main() { >+int i = sethostent(0); return(0); >+; return 0; } >+EOF >+if { (eval echo configure:8824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT" >+fi >+rm -f conftest* >+ >+ >+echo $ac_n "checking for int endhostent""... $ac_c" 1>&6 >+echo "configure:8839: checking for int endhostent" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8841 "configure" >+#include "confdefs.h" >+ >+#include <netdb.h> >+int main() { >+int i = endhostent(); return(0); >+; return 0; } >+EOF >+if { (eval echo configure:8849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT" >+fi >+rm -f conftest* >+ >+ >+echo $ac_n "checking for getnetbyaddr(in_addr_t, ...)""... $ac_c" 1>&6 >+echo "configure:8864: checking for getnetbyaddr(in_addr_t, ...)" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8866 "configure" >+#include "confdefs.h" >+ >+#include <netdb.h> >+struct netent *getnetbyaddr(in_addr_t, int); >+int main() { >+ >+; return 0; } >+EOF >+if { (eval echo configure:8875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR" >+fi >+rm -f conftest* >+ >+ >+echo $ac_n "checking for int setnetent""... $ac_c" 1>&6 >+echo "configure:8890: checking for int setnetent" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8892 "configure" >+#include "confdefs.h" >+ >+#include <netdb.h> >+int main() { >+int i = setnetent(0); return(0); >+; return 0; } >+EOF >+if { (eval echo configure:8900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT" >+fi >+rm -f conftest* >+ >+ >+echo $ac_n "checking for int endnetent""... $ac_c" 1>&6 >+echo "configure:8915: checking for int endnetent" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8917 "configure" >+#include "confdefs.h" >+ >+#include <netdb.h> >+int main() { >+int i = endnetent(); return(0); >+; return 0; } >+EOF >+if { (eval echo configure:8925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT" >+fi >+rm -f conftest* >+ >+ >+echo $ac_n "checking for gethostbyaddr(const void *, size_t, ...)""... $ac_c" 1>&6 >+echo "configure:8940: checking for gethostbyaddr(const void *, size_t, ...)" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8942 "configure" >+#include "confdefs.h" >+ >+#include <netdb.h> >+struct hostent *gethostbyaddr(const void *, size_t, int); >+int main() { >+return(0); >+; return 0; } >+EOF >+if { (eval echo configure:8951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID" >+fi >+rm -f conftest* >+ >+ >+echo $ac_n "checking for h_errno in netdb.h""... $ac_c" 1>&6 >+echo "configure:8966: checking for h_errno in netdb.h" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 8968 "configure" >+#include "confdefs.h" >+ >+#include <netdb.h> >+int main() { >+h_errno = 1; return(0); >+; return 0; } >+EOF >+if { (eval echo configure:8976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1" >+fi >+rm -f conftest* >+ >+ >+echo $ac_n "checking for getipnodebyname""... $ac_c" 1>&6 >+echo "configure:8991: checking for getipnodebyname" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_getipnodebyname'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 8996 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char getipnodebyname(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char getipnodebyname(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_getipnodebyname) || defined (__stub___getipnodebyname) >+choke me >+#else >+getipnodebyname(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:9019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_getipnodebyname=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_getipnodebyname=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'getipnodebyname`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO" >+else >+ echo "$ac_t""no" 1>&6 >+ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1" >+fi >+ >+echo $ac_n "checking for getnameinfo""... $ac_c" 1>&6 >+echo "configure:9040: checking for getnameinfo" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_getnameinfo'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9045 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char getnameinfo(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char getnameinfo(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_getnameinfo) || defined (__stub___getnameinfo) >+choke me >+#else >+getnameinfo(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:9068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_getnameinfo=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_getnameinfo=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'getnameinfo`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO" >+else >+ echo "$ac_t""no" 1>&6 >+ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1" >+fi >+ >+echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 >+echo "configure:9089: checking for getaddrinfo" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9094 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char getaddrinfo(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char getaddrinfo(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) >+choke me >+#else >+getaddrinfo(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:9117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_getaddrinfo=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_getaddrinfo=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'getaddrinfo`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO" >+ cat >> confdefs.h <<\EOF >+#define HAVE_GETADDRINFO 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1" >+fi >+ >+echo $ac_n "checking for gai_strerror""... $ac_c" 1>&6 >+echo "configure:9142: checking for gai_strerror" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_gai_strerror'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9147 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char gai_strerror(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char gai_strerror(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_gai_strerror) || defined (__stub___gai_strerror) >+choke me >+#else >+gai_strerror(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_gai_strerror=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_gai_strerror=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'gai_strerror`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_GAISTRERROR 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+ >+ >+ >+# >+# Look for a sysctl call to get the list of network interfaces. >+# >+echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6 >+echo "configure:9200: checking for interface list sysctl" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 9202 "configure" >+#include "confdefs.h" >+ >+#include <sys/param.h> >+#include <sys/sysctl.h> >+#include <sys/socket.h> >+#ifdef NET_RT_IFLIST >+found_rt_iflist >+#endif >+ >+EOF >+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | >+ egrep "found_rt_iflist" >/dev/null 2>&1; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_IFLIST_SYSCTL 1 >+EOF >+ >+else >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+fi >+rm -f conftest* >+ >+ >+# >+# Check for some other useful functions that are not ever-present. >+# >+ >+# We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC >+# because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77 >+# reportedly defines strsep() without declaring it in <string.h> when >+# -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and >+# AC_CHECK_FUNC() incorrectly succeeds because it declares >+# the function itself. >+echo $ac_n "checking for correctly declared strsep()""... $ac_c" 1>&6 >+echo "configure:9239: checking for correctly declared strsep()" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 9241 "configure" >+#include "confdefs.h" >+#include <string.h> >+int main() { >+char *sp; char *foo = strsep(&sp, "."); >+; return 0; } >+EOF >+if { (eval echo configure:9248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6; ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6; ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1" >+fi >+rm -f conftest* >+ >+echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 >+echo "configure:9260: checking for vsnprintf" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9265 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char vsnprintf(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char vsnprintf(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_vsnprintf) || defined (__stub___vsnprintf) >+choke me >+#else >+vsnprintf(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:9288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_vsnprintf=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_vsnprintf=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'vsnprintf`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF" >+else >+ echo "$ac_t""no" 1>&6 >+ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O" >+ ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c" >+ ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1" >+fi >+ >+ >+ >+echo $ac_n "checking for strerror""... $ac_c" 1>&6 >+echo "configure:9313: checking for strerror" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9318 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char strerror(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char strerror(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_strerror) || defined (__stub___strerror) >+choke me >+#else >+strerror(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:9341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_strerror=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_strerror=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_STRERROR 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+ >+ >+ >+ >+# >+# Determine the printf format characters to use when printing >+# values of type isc_int64_t. We make the assumption that platforms >+# where a "long long" is the same size as a "long" (e.g., Alpha/OSF1) >+# want "%ld" and everyone else can use "%lld". Win32 uses "%I64d", >+# but that's defined elsewhere since we don't use configure on Win32. >+# >+echo $ac_n "checking printf format modifier for 64-bit integers""... $ac_c" 1>&6 >+echo "configure:9375: checking printf format modifier for 64-bit integers" >&5 >+if test "$cross_compiling" = yes; then >+ echo "$ac_t""assuming target platform uses ll" 1>&6 >+ ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"' >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9381 "configure" >+#include "confdefs.h" >+main() { exit(!(sizeof(long long int) == sizeof(long int))); } >+EOF >+if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ echo "$ac_t""l" 1>&6 >+ ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"' >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ echo "$ac_t""ll" 1>&6 >+ ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"' >+fi >+rm -fr conftest* >+fi >+ >+ >+ >+# >+# Security Stuff >+# >+echo $ac_n "checking for chroot""... $ac_c" 1>&6 >+echo "configure:9405: checking for chroot" >&5 >+if eval "test \"`echo '$''{'ac_cv_func_chroot'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9410 "configure" >+#include "confdefs.h" >+/* System header to define __stub macros and hopefully few prototypes, >+ which can conflict with char chroot(); below. */ >+#include <assert.h> >+/* Override any gcc2 internal prototype to avoid an error. */ >+/* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+char chroot(); >+ >+int main() { >+ >+/* The GNU C library defines this for functions which it implements >+ to always fail with ENOSYS. Some functions are actually named >+ something starting with __ and the normal name is an alias. */ >+#if defined (__stub_chroot) || defined (__stub___chroot) >+choke me >+#else >+chroot(); >+#endif >+ >+; return 0; } >+EOF >+if { (eval echo configure:9433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then >+ rm -rf conftest* >+ eval "ac_cv_func_chroot=yes" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_func_chroot=no" >+fi >+rm -f conftest* >+fi >+ >+if eval "test \"`echo '$ac_cv_func_'chroot`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ cat >> confdefs.h <<\EOF >+#define HAVE_CHROOT 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+# Check whether --enable-linux-caps or --disable-linux-caps was given. >+if test "${enable_linux_caps+set}" = set; then >+ enableval="$enable_linux_caps" >+ : >+fi >+ >+case "$enable_linux_caps" in >+ yes|'') >+ for ac_hdr in linux/capability.h >+do >+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` >+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 >+echo "configure:9467: checking for $ac_hdr" >&5 >+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9472 "configure" >+#include "confdefs.h" >+#include <$ac_hdr> >+EOF >+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" >+{ (eval echo configure:9477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } >+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` >+if test -z "$ac_err"; then >+ rm -rf conftest* >+ eval "ac_cv_header_$ac_safe=yes" >+else >+ echo "$ac_err" >&5 >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_header_$ac_safe=no" >+fi >+rm -f conftest* >+fi >+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_hdr 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+done >+ >+ ;; >+ no) >+ ;; >+esac >+for ac_hdr in sys/prctl.h >+do >+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` >+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 >+echo "configure:9511: checking for $ac_hdr" >&5 >+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9516 "configure" >+#include "confdefs.h" >+#include <$ac_hdr> >+EOF >+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" >+{ (eval echo configure:9521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } >+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` >+if test -z "$ac_err"; then >+ rm -rf conftest* >+ eval "ac_cv_header_$ac_safe=yes" >+else >+ echo "$ac_err" >&5 >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ eval "ac_cv_header_$ac_safe=no" >+fi >+rm -f conftest* >+fi >+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then >+ echo "$ac_t""yes" 1>&6 >+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` >+ cat >> confdefs.h <<EOF >+#define $ac_tr_hdr 1 >+EOF >+ >+else >+ echo "$ac_t""no" 1>&6 >+fi >+done >+ >+ >+# >+# BSD/OS, and perhaps some others, don't define rlim_t. >+# >+echo $ac_n "checking for type rlim_t""... $ac_c" 1>&6 >+echo "configure:9552: checking for type rlim_t" >&5 >+cat > conftest.$ac_ext <<EOF >+#line 9554 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/time.h> >+#include <sys/resource.h> >+int main() { >+rlim_t rl = 19671212; return (0); >+; return 0; } >+EOF >+if { (eval echo configure:9564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then >+ rm -rf conftest* >+ echo "$ac_t""yes" 1>&6 >+ ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -rf conftest* >+ echo "$ac_t""no" 1>&6 >+ >+echo $ac_n "checking type of rlim_cur""... $ac_c" 1>&6 >+echo "configure:9575: checking type of rlim_cur" >&5 >+if test "$cross_compiling" = yes; then >+ { echo "configure: error: cannot determine type of rlim_cur when cross compiling - define rlim_t" 1>&2; exit 1; } >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9580 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/time.h> >+#include <sys/resource.h> >+main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} >+EOF >+if { (eval echo configure:9588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ echo "$ac_t""int" 1>&6 >+ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ >+if test "$cross_compiling" = yes; then >+ { echo "configure: error: this cannot happen" 1>&2; exit 1; } >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9601 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/time.h> >+#include <sys/resource.h> >+main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} >+EOF >+if { (eval echo configure:9609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ echo "$ac_t""long int" 1>&6 >+ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ >+if test "$cross_compiling" = yes; then >+ { echo "configure: error: this cannot happen" 1>&2; exit 1; } >+else >+ cat > conftest.$ac_ext <<EOF >+#line 9622 "configure" >+#include "confdefs.h" >+ >+#include <sys/types.h> >+#include <sys/time.h> >+#include <sys/resource.h> >+main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} >+EOF >+if { (eval echo configure:9630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null >+then >+ echo "$ac_t""long long int" 1>&6 >+ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int" >+else >+ echo "configure: failed program was:" >&5 >+ cat conftest.$ac_ext >&5 >+ rm -fr conftest* >+ { echo "configure: error: unable to determine sizeof rlim_cur" 1>&2; exit 1; } >+ >+fi >+rm -fr conftest* >+fi >+ >+ >+fi >+rm -fr conftest* >+fi >+ >+ >+fi >+rm -fr conftest* >+fi >+ >+ >+fi >+rm -f conftest* >+ >+ >+# >+# Microsoft has their own way of handling shared libraries that requires >+# additional qualifiers on extern variables. Unix systems don't need it. >+# >+ >+ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC" >+ >+LWRES_PLATFORM_USEDECLSPEC="#undef LWRES_PLATFORM_USEDECLSPEC" >+ >+# >+# Random remaining OS-specific issues involving compiler warnings. >+# XXXDCL print messages to indicate some compensation is being done? >+# >+ >+ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT" >+ >+case "$host" in >+ *-bsdi3.1*) >+ hack_shutup_sputaux=yes >+ ;; >+ *-bsdi4.0*) >+ hack_shutup_sigwait=yes >+ hack_shutup_sputaux=yes >+ ;; >+ *-bsdi4[12]*) >+ hack_shutup_stdargcast=yes >+ ;; >+ *-solaris2.[89]) >+ hack_shutup_pthreadonceinit=yes >+ ;; >+esac >+ >+case "$hack_shutup_pthreadonceinit" in >+ yes) >+ # >+ # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings. >+ # >+ ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >+ ;; >+esac >+ >+case "$hack_shutup_sigwait" in >+ yes) >+ # >+ # Shut up a -Wmissing-prototypes warning for sigwait(). >+ # >+ cat >> confdefs.h <<\EOF >+#define SHUTUP_SIGWAIT 1 >+EOF >+ >+ ;; >+esac >+ >+case "$hack_shutup_sputaux" in >+ yes) >+ # >+ # Shut up a -Wmissing-prototypes warning from <stdio.h>. >+ # >+ cat >> confdefs.h <<\EOF >+#define SHUTUP_SPUTAUX 1 >+EOF >+ >+ ;; >+esac >+ >+case "$hack_shutup_stdargcast" in >+ yes) >+ # >+ # Shut up a -Wcast-qual warning from va_start(). >+ # >+ cat >> confdefs.h <<\EOF >+#define SHUTUP_STDARG_CAST 1 >+EOF >+ >+ ;; >+esac >+ >+# >+# The following sections deal with tools used for formatting >+# the documentation. They are all optional, unless you are >+# a developer editing the documentation source. >+# >+ >+# Directory trees where SGML files are commonly found. >+sgmltrees="/usr/pkg/share/sgml /usr/local/share/sgml" >+ >+# >+# Look for openjade. Plain jade is no longer supported. >+# >+ >+for ac_prog in openjade >+do >+# Extract the first word of "$ac_prog", so it can be a program name with args. >+set dummy $ac_prog; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:9754: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_path_OPENJADE'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ case "$OPENJADE" in >+ /*) >+ ac_cv_path_OPENJADE="$OPENJADE" # Let the user override the test with a path. >+ ;; >+ ?:/*) >+ ac_cv_path_OPENJADE="$OPENJADE" # Let the user override the test with a dos path. >+ ;; >+ *) >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_path_OPENJADE="$ac_dir/$ac_word" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ ;; >+esac >+fi >+OPENJADE="$ac_cv_path_OPENJADE" >+if test -n "$OPENJADE"; then >+ echo "$ac_t""$OPENJADE" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+test -n "$OPENJADE" && break >+done >+test -n "$OPENJADE" || OPENJADE="openjade" >+ >+ >+ >+# >+# Look for TeX. >+# >+ >+for ac_prog in jadetex >+do >+# Extract the first word of "$ac_prog", so it can be a program name with args. >+set dummy $ac_prog; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:9801: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_path_JADETEX'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ case "$JADETEX" in >+ /*) >+ ac_cv_path_JADETEX="$JADETEX" # Let the user override the test with a path. >+ ;; >+ ?:/*) >+ ac_cv_path_JADETEX="$JADETEX" # Let the user override the test with a dos path. >+ ;; >+ *) >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_path_JADETEX="$ac_dir/$ac_word" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ ;; >+esac >+fi >+JADETEX="$ac_cv_path_JADETEX" >+if test -n "$JADETEX"; then >+ echo "$ac_t""$JADETEX" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+test -n "$JADETEX" && break >+done >+test -n "$JADETEX" || JADETEX="jadetex" >+ >+ >+ >+for ac_prog in pdfjadetex >+do >+# Extract the first word of "$ac_prog", so it can be a program name with args. >+set dummy $ac_prog; ac_word=$2 >+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >+echo "configure:9844: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_path_PDFJADETEX'+set}'`\" = set"; then >+ echo $ac_n "(cached) $ac_c" 1>&6 >+else >+ case "$PDFJADETEX" in >+ /*) >+ ac_cv_path_PDFJADETEX="$PDFJADETEX" # Let the user override the test with a path. >+ ;; >+ ?:/*) >+ ac_cv_path_PDFJADETEX="$PDFJADETEX" # Let the user override the test with a dos path. >+ ;; >+ *) >+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >+ ac_dummy="$PATH" >+ for ac_dir in $ac_dummy; do >+ test -z "$ac_dir" && ac_dir=. >+ if test -f $ac_dir/$ac_word; then >+ ac_cv_path_PDFJADETEX="$ac_dir/$ac_word" >+ break >+ fi >+ done >+ IFS="$ac_save_ifs" >+ ;; >+esac >+fi >+PDFJADETEX="$ac_cv_path_PDFJADETEX" >+if test -n "$PDFJADETEX"; then >+ echo "$ac_t""$PDFJADETEX" 1>&6 >+else >+ echo "$ac_t""no" 1>&6 >+fi >+ >+test -n "$PDFJADETEX" && break >+done >+test -n "$PDFJADETEX" || PDFJADETEX="pdfjadetex" >+ >+ >+ >+# >+# Subroutine for searching for an ordinary file (e.g., a stylesheet) >+# in a number of directories: >+# >+# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES) >+# >+# If the file FILENAME is found in one of the DIRECTORIES, the shell >+# variable VARIABLE is defined to its absolute pathname. Otherwise, >+# it is set to FILENAME, with no directory prefix (that's not terribly >+# useful, but looks less confusing in substitutions than leaving it >+# empty). The variable VARIABLE will be substituted into output files. >+# >+ >+ >+ >+ >+SGMLCATALOG="" >+echo $ac_n "checking for catalog""... $ac_c" 1>&6 >+echo "configure:9900: checking for catalog" >&5 >+for d in $sgmltrees >+do >+ f=$d/catalog >+ if test -f $f >+ then >+ SGMLCATALOG=$f >+ echo "$ac_t""$f" 1>&6 >+ break >+ fi >+done >+if test "X$SGMLCATALOG" = "X" >+then >+ echo "$ac_t"""not found"" 1>&6; >+ SGMLCATALOG=catalog >+fi >+ >+ >+ >+# >+# Look for the HTML stylesheet html/docbook.dsl, used for >+# formatting man pages in HTML. Its location varies, >+# so far we have seen: >+# >+# NetBSD /usr/pkg/share/docbook/dsssl/modular/ >+# FreeBSD /usr/local/share/docbook/dsssl/modular/ >+# Linux /usr/local/share/dsssl/docbook/ >+# >+# Ditto for the print stylesheet print/docbook.dsl. >+# >+ >+stylepath="" >+for d in $sgmltrees >+do >+ for s in docbook/dsssl/modular dsssl/docbook >+ do >+ stylepath="$stylepath $d/$s" >+ done >+done >+ >+HTMLSTYLE="" >+echo $ac_n "checking for html/docbook.dsl""... $ac_c" 1>&6 >+echo "configure:9942: checking for html/docbook.dsl" >&5 >+for d in $stylepath >+do >+ f=$d/html/docbook.dsl >+ if test -f $f >+ then >+ HTMLSTYLE=$f >+ echo "$ac_t""$f" 1>&6 >+ break >+ fi >+done >+if test "X$HTMLSTYLE" = "X" >+then >+ echo "$ac_t"""not found"" 1>&6; >+ HTMLSTYLE=html/docbook.dsl >+fi >+ >+ >+ >+PRINTSTYLE="" >+echo $ac_n "checking for print/docbook.dsl""... $ac_c" 1>&6 >+echo "configure:9963: checking for print/docbook.dsl" >&5 >+for d in $stylepath >+do >+ f=$d/print/docbook.dsl >+ if test -f $f >+ then >+ PRINTSTYLE=$f >+ echo "$ac_t""$f" 1>&6 >+ break >+ fi >+done >+if test "X$PRINTSTYLE" = "X" >+then >+ echo "$ac_t"""not found"" 1>&6; >+ PRINTSTYLE=print/docbook.dsl >+fi >+ >+ >+ >+# >+# Look for XML declarations >+# >+ >+ >+XMLDCL="" >+echo $ac_n "checking for docbook/dsssl/modular/dtds/decls/xml.dcl""... $ac_c" 1>&6 >+echo "configure:9989: checking for docbook/dsssl/modular/dtds/decls/xml.dcl" >&5 >+for d in $sgmltrees >+do >+ f=$d/docbook/dsssl/modular/dtds/decls/xml.dcl >+ if test -f $f >+ then >+ XMLDCL=$f >+ echo "$ac_t""$f" 1>&6 >+ break >+ fi >+done >+if test "X$XMLDCL" = "X" >+then >+ echo "$ac_t"""not found"" 1>&6; >+ XMLDCL=docbook/dsssl/modular/dtds/decls/xml.dcl >+fi >+ >+ >+ >+# >+# Look for docbook2man-spec.pl >+# >+ >+ >+DOCBOOK2MANSPEC="" >+echo $ac_n "checking for docbook2X/docbook2man-spec.pl""... $ac_c" 1>&6 >+echo "configure:10015: checking for docbook2X/docbook2man-spec.pl" >&5 >+for d in $sgmltrees >+do >+ f=$d/docbook2X/docbook2man-spec.pl >+ if test -f $f >+ then >+ DOCBOOK2MANSPEC=$f >+ echo "$ac_t""$f" 1>&6 >+ break >+ fi >+done >+if test "X$DOCBOOK2MANSPEC" = "X" >+then >+ echo "$ac_t"""not found"" 1>&6; >+ DOCBOOK2MANSPEC=docbook2X/docbook2man-spec.pl >+fi >+ >+ >+ >+# >+# Substitutions >+# >+ >+BIND9_TOP_BUILDDIR=`pwd` >+ >+ >+ >+ >+ >+ >+if test "X$srcdir" != "X"; then >+ BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include" >+ BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include" >+ BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include" >+ BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include" >+ BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include" >+else >+ BIND9_ISC_BUILDINCLUDE="" >+ BIND9_ISCCC_BUILDINCLUDE="" >+ BIND9_ISCCFG_BUILDINCLUDE="" >+ BIND9_DNS_BUILDINCLUDE="" >+ BIND9_LWRES_BUILDINCLUDE="" >+fi >+ >+ >+BIND9_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes >+ >+ >+BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules >+ >+. $srcdir/version >+BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}" >+ >+ >+ >+LIBISC_API=$srcdir/lib/isc/api >+ >+ >+LIBISCCC_API=$srcdir/lib/isccc/api >+ >+ >+LIBISCCFG_API=$srcdir/lib/isccfg/api >+ >+ >+LIBDNS_API=$srcdir/lib/dns/api >+ >+ >+LIBLWRES_API=$srcdir/lib/lwres/api >+ >+trap '' 1 2 15 >+cat > confcache <<\EOF >+# This file is a shell script that caches the results of configure >+# tests run on this system so they can be shared between configure >+# scripts and configure runs. It is not useful on other systems. >+# If it contains results you don't want to keep, you may remove or edit it. >+# >+# By default, configure uses ./config.cache as the cache file, >+# creating it if it does not exist already. You can give configure >+# the --cache-file=FILE option to use a different cache file; that is >+# what configure does when it calls configure scripts in >+# subdirectories, so they share the cache. >+# Giving --cache-file=/dev/null disables caching, for debugging configure. >+# config.status only pays attention to the cache file if you give it the >+# --recheck option to rerun configure. >+# >+EOF >+# The following way of writing the cache mishandles newlines in values, >+# but we know of no workaround that is simple, portable, and efficient. >+# So, don't put newlines in cache variables' values. >+# Ultrix sh set writes to stderr and can't be redirected directly, >+# and sets the high bit in the cache file unless we assign to the vars. >+(set) 2>&1 | >+ case `(ac_space=' '; set | grep ac_space) 2>&1` in >+ *ac_space=\ *) >+ # `set' does not quote correctly, so add quotes (double-quote substitution >+ # turns \\\\ into \\, and sed turns \\ into \). >+ sed -n \ >+ -e "s/'/'\\\\''/g" \ >+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" >+ ;; >+ *) >+ # `set' quotes correctly as required by POSIX, so do not add quotes. >+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' >+ ;; >+ esac >> confcache >+if cmp -s $cache_file confcache; then >+ : >+else >+ if test -w $cache_file; then >+ echo "updating cache $cache_file" >+ cat confcache > $cache_file >+ else >+ echo "not updating unwritable cache $cache_file" >+ fi >+fi >+rm -f confcache >+ >+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 >+ >+test "x$prefix" = xNONE && prefix=$ac_default_prefix >+# Let make expand exec_prefix. >+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' >+ >+# Any assignment to VPATH causes Sun make to only execute >+# the first set of double-colon rules, so remove it if not needed. >+# If there is a colon in the path, we need to keep it. >+if test "x$srcdir" = x.; then >+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' >+fi >+ >+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 >+ >+DEFS=-DHAVE_CONFIG_H >+ >+# Without the "./", some shells look in PATH for config.status. >+: ${CONFIG_STATUS=./config.status} >+ >+echo creating $CONFIG_STATUS >+rm -f $CONFIG_STATUS >+cat > $CONFIG_STATUS <<EOF >+#! /bin/sh >+# Generated automatically by configure. >+# Run this file to recreate the current configuration. >+# This directory was configured as follows, >+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: >+# >+# $0 $ac_configure_args >+# >+# Compiler output produced by configure, useful for debugging >+# configure, is in ./config.log if it exists. >+ >+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" >+for ac_option >+do >+ case "\$ac_option" in >+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) >+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" >+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; >+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v) >+ echo "$CONFIG_STATUS generated by autoconf version 2.13" >+ exit 0 ;; >+ -help | --help | --hel | --he | --h) >+ echo "\$ac_cs_usage"; exit 0 ;; >+ *) echo "\$ac_cs_usage"; exit 1 ;; >+ esac >+done >+ >+ac_given_srcdir=$srcdir >+ac_given_INSTALL="$INSTALL" >+ >+trap 'rm -fr `echo "make/rules >+ make/includes >+ Makefile >+ make/Makefile >+ make/mkdep >+ lib/Makefile >+ lib/isc/Makefile >+ lib/isc/include/Makefile >+ lib/isc/include/isc/Makefile >+ lib/isc/include/isc/platform.h >+ lib/isc/unix/Makefile >+ lib/isc/unix/include/Makefile >+ lib/isc/unix/include/isc/Makefile >+ lib/isc/nls/Makefile >+ lib/isc/$thread_dir/Makefile >+ lib/isc/$thread_dir/include/Makefile >+ lib/isc/$thread_dir/include/isc/Makefile >+ lib/isccc/Makefile >+ lib/isccc/include/Makefile >+ lib/isccc/include/isccc/Makefile >+ lib/isccfg/Makefile >+ lib/isccfg/include/Makefile >+ lib/isccfg/include/isccfg/Makefile >+ lib/dns/Makefile >+ lib/dns/include/Makefile >+ lib/dns/include/dns/Makefile >+ lib/dns/sec/Makefile >+ lib/dns/sec/dst/Makefile >+ lib/dns/sec/dst/include/Makefile >+ lib/dns/sec/dst/include/dst/Makefile >+ lib/lwres/Makefile >+ lib/lwres/include/Makefile >+ lib/lwres/include/lwres/Makefile >+ lib/lwres/include/lwres/netdb.h >+ lib/lwres/include/lwres/platform.h >+ lib/lwres/man/Makefile >+ lib/lwres/unix/Makefile >+ lib/lwres/unix/include/Makefile >+ lib/lwres/unix/include/lwres/Makefile >+ lib/lwres/win32/Makefile >+ lib/lwres/win32/include/Makefile >+ lib/lwres/win32/include/lwres/Makefile >+ lib/tests/Makefile >+ lib/tests/include/Makefile >+ lib/tests/include/tests/Makefile >+ bin/Makefile >+ bin/dlzbdb/Makefile >+ bin/check/Makefile >+ bin/named/Makefile >+ bin/named/unix/Makefile >+ bin/rndc/Makefile >+ bin/rndc/unix/Makefile >+ bin/dig/Makefile >+ bin/nsupdate/Makefile >+ bin/tests/Makefile >+ bin/tests/names/Makefile >+ bin/tests/master/Makefile >+ bin/tests/rbt/Makefile >+ bin/tests/db/Makefile >+ bin/tests/tasks/Makefile >+ bin/tests/timers/Makefile >+ bin/tests/dst/Makefile >+ bin/tests/mem/Makefile >+ bin/tests/net/Makefile >+ bin/tests/sockaddr/Makefile >+ bin/tests/system/Makefile >+ bin/tests/system/conf.sh >+ bin/tests/system/lwresd/Makefile >+ bin/tests/system/tkey/Makefile >+ bin/tests/headerdep_test.sh >+ bin/dnssec/Makefile >+ doc/Makefile >+ doc/arm/Makefile >+ doc/arm/nominum-docbook-html.dsl >+ doc/arm/nominum-docbook-print.dsl >+ doc/arm/validate.sh >+ doc/misc/Makefile >+ docutil/docbook2man-wrapper.sh >+ isc-config.sh >+ config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 >+EOF >+cat >> $CONFIG_STATUS <<EOF >+ >+# Protect against being on the right side of a sed subst in config.status. >+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; >+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF >+$ac_vpsub >+$extrasub >+s%@SHELL@%$SHELL%g >+s%@CFLAGS@%$CFLAGS%g >+s%@CPPFLAGS@%$CPPFLAGS%g >+s%@CXXFLAGS@%$CXXFLAGS%g >+s%@FFLAGS@%$FFLAGS%g >+s%@DEFS@%$DEFS%g >+s%@LDFLAGS@%$LDFLAGS%g >+s%@LIBS@%$LIBS%g >+s%@exec_prefix@%$exec_prefix%g >+s%@prefix@%$prefix%g >+s%@program_transform_name@%$program_transform_name%g >+s%@bindir@%$bindir%g >+s%@sbindir@%$sbindir%g >+s%@libexecdir@%$libexecdir%g >+s%@datadir@%$datadir%g >+s%@sysconfdir@%$sysconfdir%g >+s%@sharedstatedir@%$sharedstatedir%g >+s%@localstatedir@%$localstatedir%g >+s%@libdir@%$libdir%g >+s%@includedir@%$includedir%g >+s%@oldincludedir@%$oldincludedir%g >+s%@infodir@%$infodir%g >+s%@mandir@%$mandir%g >+s%@subdirs@%$subdirs%g >+s%@host@%$host%g >+s%@host_alias@%$host_alias%g >+s%@host_cpu@%$host_cpu%g >+s%@host_vendor@%$host_vendor%g >+s%@host_os@%$host_os%g >+s%@SET_MAKE@%$SET_MAKE%g >+s%@RANLIB@%$RANLIB%g >+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g >+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g >+s%@INSTALL_DATA@%$INSTALL_DATA%g >+s%@STD_CINCLUDES@%$STD_CINCLUDES%g >+s%@STD_CDEFINES@%$STD_CDEFINES%g >+s%@STD_CWARNINGS@%$STD_CWARNINGS%g >+s%@CCOPT@%$CCOPT%g >+s%@AR@%$AR%g >+s%@ARFLAGS@%$ARFLAGS%g >+s%@LN@%$LN%g >+s%@ETAGS@%$ETAGS%g >+s%@PERL@%$PERL%g >+s%@CC@%$CC%g >+s%@CPP@%$CPP%g >+s%@ISC_PLATFORM_HAVELONGLONG@%$ISC_PLATFORM_HAVELONGLONG%g >+s%@ISC_PLATFORM_NEEDSYSSELECTH@%$ISC_PLATFORM_NEEDSYSSELECTH%g >+s%@LWRES_PLATFORM_NEEDSYSSELECTH@%$LWRES_PLATFORM_NEEDSYSSELECTH%g >+s%@DLZ_POSTGRES_INC@%$DLZ_POSTGRES_INC%g >+s%@DLZ_POSTGRES_LIBS@%$DLZ_POSTGRES_LIBS%g >+s%@USE_DLZ_POSTGRES@%$USE_DLZ_POSTGRES%g >+s%@DLZ_MYSQL_INC@%$DLZ_MYSQL_INC%g >+s%@DLZ_MYSQL_LIBS@%$DLZ_MYSQL_LIBS%g >+s%@USE_DLZ_MYSQL@%$USE_DLZ_MYSQL%g >+s%@DLZ_BDB_UTIL@%$DLZ_BDB_UTIL%g >+s%@DLZ_BDB_INC@%$DLZ_BDB_INC%g >+s%@DLZ_BDB_LIBS@%$DLZ_BDB_LIBS%g >+s%@USE_DLZ_BDB@%$USE_DLZ_BDB%g >+s%@USE_DLZ_FILESYSTEM@%$USE_DLZ_FILESYSTEM%g >+s%@DLZ_LDAP_INC@%$DLZ_LDAP_INC%g >+s%@DLZ_LDAP_LIBS@%$DLZ_LDAP_LIBS%g >+s%@USE_DLZ_LDAP@%$USE_DLZ_LDAP%g >+s%@DLZ_ODBC_INC@%$DLZ_ODBC_INC%g >+s%@DLZ_ODBC_LIBS@%$DLZ_ODBC_LIBS%g >+s%@USE_DLZ_ODBC@%$USE_DLZ_ODBC%g >+s%@USE_DLZ_STUB@%$USE_DLZ_STUB%g >+s%@USE_DLZ@%$USE_DLZ%g >+s%@DST_OPENSSL_INC@%$DST_OPENSSL_INC%g >+s%@DNS_OPENSSL_LIBS@%$DNS_OPENSSL_LIBS%g >+s%@USE_OPENSSL@%$USE_OPENSSL%g >+s%@USE_GSSAPI@%$USE_GSSAPI%g >+s%@DST_GSSAPI_INC@%$DST_GSSAPI_INC%g >+s%@DNS_GSSAPI_LIBS@%$DNS_GSSAPI_LIBS%g >+s%@ALWAYS_DEFINES@%$ALWAYS_DEFINES%g >+s%@ISC_PLATFORM_USETHREADS@%$ISC_PLATFORM_USETHREADS%g >+s%@ISC_THREAD_DIR@%$ISC_THREAD_DIR%g >+s%@MKDEPCC@%$MKDEPCC%g >+s%@MKDEPCFLAGS@%$MKDEPCFLAGS%g >+s%@MKDEPPROG@%$MKDEPPROG%g >+s%@IRIX_DNSSEC_WARNINGS_HACK@%$IRIX_DNSSEC_WARNINGS_HACK%g >+s%@purify_path@%$purify_path%g >+s%@PURIFY@%$PURIFY%g >+s%@build@%$build%g >+s%@build_alias@%$build_alias%g >+s%@build_cpu@%$build_cpu%g >+s%@build_vendor@%$build_vendor%g >+s%@build_os@%$build_os%g >+s%@LN_S@%$LN_S%g >+s%@OBJEXT@%$OBJEXT%g >+s%@EXEEXT@%$EXEEXT%g >+s%@ECHO@%$ECHO%g >+s%@STRIP@%$STRIP%g >+s%@LIBTOOL@%$LIBTOOL%g >+s%@O@%$O%g >+s%@A@%$A%g >+s%@SA@%$SA%g >+s%@LIBTOOL_MKDEP_SED@%$LIBTOOL_MKDEP_SED%g >+s%@LIBBIND@%$LIBBIND%g >+s%@ISC_PLATFORM_HAVEIPV6@%$ISC_PLATFORM_HAVEIPV6%g >+s%@LWRES_PLATFORM_HAVEIPV6@%$LWRES_PLATFORM_HAVEIPV6%g >+s%@ISC_PLATFORM_NEEDNETINETIN6H@%$ISC_PLATFORM_NEEDNETINETIN6H%g >+s%@LWRES_PLATFORM_NEEDNETINETIN6H@%$LWRES_PLATFORM_NEEDNETINETIN6H%g >+s%@ISC_PLATFORM_NEEDNETINET6IN6H@%$ISC_PLATFORM_NEEDNETINET6IN6H%g >+s%@LWRES_PLATFORM_NEEDNETINET6IN6H@%$LWRES_PLATFORM_NEEDNETINET6IN6H%g >+s%@ISC_PLATFORM_HAVEINADDR6@%$ISC_PLATFORM_HAVEINADDR6%g >+s%@LWRES_PLATFORM_HAVEINADDR6@%$LWRES_PLATFORM_HAVEINADDR6%g >+s%@ISC_PLATFORM_NEEDIN6ADDRANY@%$ISC_PLATFORM_NEEDIN6ADDRANY%g >+s%@LWRES_PLATFORM_NEEDIN6ADDRANY@%$LWRES_PLATFORM_NEEDIN6ADDRANY%g >+s%@ISC_PLATFORM_NEEDIN6ADDRLOOPBACK@%$ISC_PLATFORM_NEEDIN6ADDRLOOPBACK%g >+s%@LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK@%$LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK%g >+s%@ISC_PLATFORM_HAVEIN6PKTINFO@%$ISC_PLATFORM_HAVEIN6PKTINFO%g >+s%@ISC_PLATFORM_FIXIN6ISADDR@%$ISC_PLATFORM_FIXIN6ISADDR%g >+s%@ISC_IPV6_H@%$ISC_IPV6_H%g >+s%@ISC_IPV6_O@%$ISC_IPV6_O%g >+s%@ISC_ISCIPV6_O@%$ISC_ISCIPV6_O%g >+s%@ISC_IPV6_C@%$ISC_IPV6_C%g >+s%@LWRES_HAVE_SIN6_SCOPE_ID@%$LWRES_HAVE_SIN6_SCOPE_ID%g >+s%@ISC_PLATFORM_NEEDNTOP@%$ISC_PLATFORM_NEEDNTOP%g >+s%@ISC_PLATFORM_NEEDPTON@%$ISC_PLATFORM_NEEDPTON%g >+s%@ISC_PLATFORM_NEEDATON@%$ISC_PLATFORM_NEEDATON%g >+s%@ISC_PLATFORM_HAVESALEN@%$ISC_PLATFORM_HAVESALEN%g >+s%@LWRES_PLATFORM_HAVESALEN@%$LWRES_PLATFORM_HAVESALEN%g >+s%@ISC_PLATFORM_MSGHDRFLAVOR@%$ISC_PLATFORM_MSGHDRFLAVOR%g >+s%@ISC_PLATFORM_NEEDPORTT@%$ISC_PLATFORM_NEEDPORTT%g >+s%@ISC_LWRES_NEEDADDRINFO@%$ISC_LWRES_NEEDADDRINFO%g >+s%@ISC_LWRES_NEEDRRSETINFO@%$ISC_LWRES_NEEDRRSETINFO%g >+s%@ISC_LWRES_SETHOSTENTINT@%$ISC_LWRES_SETHOSTENTINT%g >+s%@ISC_LWRES_ENDHOSTENTINT@%$ISC_LWRES_ENDHOSTENTINT%g >+s%@ISC_LWRES_GETNETBYADDRINADDR@%$ISC_LWRES_GETNETBYADDRINADDR%g >+s%@ISC_LWRES_SETNETENTINT@%$ISC_LWRES_SETNETENTINT%g >+s%@ISC_LWRES_ENDNETENTINT@%$ISC_LWRES_ENDNETENTINT%g >+s%@ISC_LWRES_GETHOSTBYADDRVOID@%$ISC_LWRES_GETHOSTBYADDRVOID%g >+s%@ISC_LWRES_NEEDHERRNO@%$ISC_LWRES_NEEDHERRNO%g >+s%@ISC_LWRES_GETIPNODEPROTO@%$ISC_LWRES_GETIPNODEPROTO%g >+s%@ISC_LWRES_GETADDRINFOPROTO@%$ISC_LWRES_GETADDRINFOPROTO%g >+s%@ISC_LWRES_GETNAMEINFOPROTO@%$ISC_LWRES_GETNAMEINFOPROTO%g >+s%@ISC_PLATFORM_NEEDSTRSEP@%$ISC_PLATFORM_NEEDSTRSEP%g >+s%@ISC_PLATFORM_NEEDVSNPRINTF@%$ISC_PLATFORM_NEEDVSNPRINTF%g >+s%@ISC_EXTRA_OBJS@%$ISC_EXTRA_OBJS%g >+s%@ISC_EXTRA_SRCS@%$ISC_EXTRA_SRCS%g >+s%@ISC_PLATFORM_QUADFORMAT@%$ISC_PLATFORM_QUADFORMAT%g >+s%@ISC_PLATFORM_RLIMITTYPE@%$ISC_PLATFORM_RLIMITTYPE%g >+s%@ISC_PLATFORM_USEDECLSPEC@%$ISC_PLATFORM_USEDECLSPEC%g >+s%@LWRES_PLATFORM_USEDECLSPEC@%$LWRES_PLATFORM_USEDECLSPEC%g >+s%@ISC_PLATFORM_BRACEPTHREADONCEINIT@%$ISC_PLATFORM_BRACEPTHREADONCEINIT%g >+s%@OPENJADE@%$OPENJADE%g >+s%@JADETEX@%$JADETEX%g >+s%@PDFJADETEX@%$PDFJADETEX%g >+s%@SGMLCATALOG@%$SGMLCATALOG%g >+s%@HTMLSTYLE@%$HTMLSTYLE%g >+s%@PRINTSTYLE@%$PRINTSTYLE%g >+s%@XMLDCL@%$XMLDCL%g >+s%@DOCBOOK2MANSPEC@%$DOCBOOK2MANSPEC%g >+s%@BIND9_TOP_BUILDDIR@%$BIND9_TOP_BUILDDIR%g >+s%@BIND9_ISC_BUILDINCLUDE@%$BIND9_ISC_BUILDINCLUDE%g >+s%@BIND9_ISCCC_BUILDINCLUDE@%$BIND9_ISCCC_BUILDINCLUDE%g >+s%@BIND9_ISCCFG_BUILDINCLUDE@%$BIND9_ISCCFG_BUILDINCLUDE%g >+s%@BIND9_DNS_BUILDINCLUDE@%$BIND9_DNS_BUILDINCLUDE%g >+s%@BIND9_LWRES_BUILDINCLUDE@%$BIND9_LWRES_BUILDINCLUDE%g >+/@BIND9_INCLUDES@/r $BIND9_INCLUDES >+s%@BIND9_INCLUDES@%%g >+/@BIND9_MAKE_RULES@/r $BIND9_MAKE_RULES >+s%@BIND9_MAKE_RULES@%%g >+s%@BIND9_VERSION@%$BIND9_VERSION%g >+/@LIBISC_API@/r $LIBISC_API >+s%@LIBISC_API@%%g >+/@LIBISCCC_API@/r $LIBISCCC_API >+s%@LIBISCCC_API@%%g >+/@LIBISCCFG_API@/r $LIBISCCFG_API >+s%@LIBISCCFG_API@%%g >+/@LIBDNS_API@/r $LIBDNS_API >+s%@LIBDNS_API@%%g >+/@LIBLWRES_API@/r $LIBLWRES_API >+s%@LIBLWRES_API@%%g >+ >+CEOF >+EOF >+ >+cat >> $CONFIG_STATUS <<\EOF >+ >+# Split the substitutions into bite-sized pieces for seds with >+# small command number limits, like on Digital OSF/1 and HP-UX. >+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. >+ac_file=1 # Number of current file. >+ac_beg=1 # First line for current file. >+ac_end=$ac_max_sed_cmds # Line after last line for current file. >+ac_more_lines=: >+ac_sed_cmds="" >+while $ac_more_lines; do >+ if test $ac_beg -gt 1; then >+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file >+ else >+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file >+ fi >+ if test ! -s conftest.s$ac_file; then >+ ac_more_lines=false >+ rm -f conftest.s$ac_file >+ else >+ if test -z "$ac_sed_cmds"; then >+ ac_sed_cmds="sed -f conftest.s$ac_file" >+ else >+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" >+ fi >+ ac_file=`expr $ac_file + 1` >+ ac_beg=$ac_end >+ ac_end=`expr $ac_end + $ac_max_sed_cmds` >+ fi >+done >+if test -z "$ac_sed_cmds"; then >+ ac_sed_cmds=cat >+fi >+EOF >+ >+cat >> $CONFIG_STATUS <<EOF >+ >+CONFIG_FILES=\${CONFIG_FILES-"make/rules >+ make/includes >+ Makefile >+ make/Makefile >+ make/mkdep >+ lib/Makefile >+ lib/isc/Makefile >+ lib/isc/include/Makefile >+ lib/isc/include/isc/Makefile >+ lib/isc/include/isc/platform.h >+ lib/isc/unix/Makefile >+ lib/isc/unix/include/Makefile >+ lib/isc/unix/include/isc/Makefile >+ lib/isc/nls/Makefile >+ lib/isc/$thread_dir/Makefile >+ lib/isc/$thread_dir/include/Makefile >+ lib/isc/$thread_dir/include/isc/Makefile >+ lib/isccc/Makefile >+ lib/isccc/include/Makefile >+ lib/isccc/include/isccc/Makefile >+ lib/isccfg/Makefile >+ lib/isccfg/include/Makefile >+ lib/isccfg/include/isccfg/Makefile >+ lib/dns/Makefile >+ lib/dns/include/Makefile >+ lib/dns/include/dns/Makefile >+ lib/dns/sec/Makefile >+ lib/dns/sec/dst/Makefile >+ lib/dns/sec/dst/include/Makefile >+ lib/dns/sec/dst/include/dst/Makefile >+ lib/lwres/Makefile >+ lib/lwres/include/Makefile >+ lib/lwres/include/lwres/Makefile >+ lib/lwres/include/lwres/netdb.h >+ lib/lwres/include/lwres/platform.h >+ lib/lwres/man/Makefile >+ lib/lwres/unix/Makefile >+ lib/lwres/unix/include/Makefile >+ lib/lwres/unix/include/lwres/Makefile >+ lib/lwres/win32/Makefile >+ lib/lwres/win32/include/Makefile >+ lib/lwres/win32/include/lwres/Makefile >+ lib/tests/Makefile >+ lib/tests/include/Makefile >+ lib/tests/include/tests/Makefile >+ bin/Makefile >+ bin/dlzbdb/Makefile >+ bin/check/Makefile >+ bin/named/Makefile >+ bin/named/unix/Makefile >+ bin/rndc/Makefile >+ bin/rndc/unix/Makefile >+ bin/dig/Makefile >+ bin/nsupdate/Makefile >+ bin/tests/Makefile >+ bin/tests/names/Makefile >+ bin/tests/master/Makefile >+ bin/tests/rbt/Makefile >+ bin/tests/db/Makefile >+ bin/tests/tasks/Makefile >+ bin/tests/timers/Makefile >+ bin/tests/dst/Makefile >+ bin/tests/mem/Makefile >+ bin/tests/net/Makefile >+ bin/tests/sockaddr/Makefile >+ bin/tests/system/Makefile >+ bin/tests/system/conf.sh >+ bin/tests/system/lwresd/Makefile >+ bin/tests/system/tkey/Makefile >+ bin/tests/headerdep_test.sh >+ bin/dnssec/Makefile >+ doc/Makefile >+ doc/arm/Makefile >+ doc/arm/nominum-docbook-html.dsl >+ doc/arm/nominum-docbook-print.dsl >+ doc/arm/validate.sh >+ doc/misc/Makefile >+ docutil/docbook2man-wrapper.sh >+ isc-config.sh >+"} >+EOF >+cat >> $CONFIG_STATUS <<\EOF >+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then >+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". >+ case "$ac_file" in >+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` >+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; >+ *) ac_file_in="${ac_file}.in" ;; >+ esac >+ >+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. >+ >+ # Remove last slash and all that follows it. Not all systems have dirname. >+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` >+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then >+ # The file is in a subdirectory. >+ test ! -d "$ac_dir" && mkdir "$ac_dir" >+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" >+ # A "../" for each directory in $ac_dir_suffix. >+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` >+ else >+ ac_dir_suffix= ac_dots= >+ fi >+ >+ case "$ac_given_srcdir" in >+ .) srcdir=. >+ if test -z "$ac_dots"; then top_srcdir=. >+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; >+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; >+ *) # Relative path. >+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" >+ top_srcdir="$ac_dots$ac_given_srcdir" ;; >+ esac >+ >+ case "$ac_given_INSTALL" in >+ [/$]*) INSTALL="$ac_given_INSTALL" ;; >+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;; >+ esac >+ >+ echo creating "$ac_file" >+ rm -f "$ac_file" >+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." >+ case "$ac_file" in >+ *Makefile*) ac_comsub="1i\\ >+# $configure_input" ;; >+ *) ac_comsub= ;; >+ esac >+ >+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` >+ sed -e "$ac_comsub >+s%@configure_input@%$configure_input%g >+s%@srcdir@%$srcdir%g >+s%@top_srcdir@%$top_srcdir%g >+s%@INSTALL@%$INSTALL%g >+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file >+fi; done >+rm -f conftest.s* >+ >+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where >+# NAME is the cpp macro being defined and VALUE is the value it is being given. >+# >+# ac_d sets the value in "#define NAME VALUE" lines. >+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' >+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' >+ac_dC='\3' >+ac_dD='%g' >+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". >+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' >+ac_uB='\([ ]\)%\1#\2define\3' >+ac_uC=' ' >+ac_uD='\4%g' >+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". >+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' >+ac_eB='$%\1#\2define\3' >+ac_eC=' ' >+ac_eD='%g' >+ >+if test "${CONFIG_HEADERS+set}" != set; then >+EOF >+cat >> $CONFIG_STATUS <<EOF >+ CONFIG_HEADERS="config.h" >+EOF >+cat >> $CONFIG_STATUS <<\EOF >+fi >+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then >+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". >+ case "$ac_file" in >+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` >+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; >+ *) ac_file_in="${ac_file}.in" ;; >+ esac >+ >+ echo creating $ac_file >+ >+ rm -f conftest.frag conftest.in conftest.out >+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` >+ cat $ac_file_inputs > conftest.in >+ >+EOF >+ >+# Transform confdefs.h into a sed script conftest.vals that substitutes >+# the proper values into config.h.in to produce config.h. And first: >+# Protect against being on the right side of a sed subst in config.status. >+# Protect against being in an unquoted here document in config.status. >+rm -f conftest.vals >+cat > conftest.hdr <<\EOF >+s/[\\&%]/\\&/g >+s%[\\$`]%\\&%g >+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp >+s%ac_d%ac_u%gp >+s%ac_u%ac_e%gp >+EOF >+sed -n -f conftest.hdr confdefs.h > conftest.vals >+rm -f conftest.hdr >+ >+# This sed command replaces #undef with comments. This is necessary, for >+# example, in the case of _POSIX_SOURCE, which is predefined and required >+# on some systems where configure will not decide to define it. >+cat >> conftest.vals <<\EOF >+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% >+EOF >+ >+# Break up conftest.vals because some shells have a limit on >+# the size of here documents, and old seds have small limits too. >+ >+rm -f conftest.tail >+while : >+do >+ ac_lines=`grep -c . conftest.vals` >+ # grep -c gives empty output for an empty file on some AIX systems. >+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi >+ # Write a limited-size here document to conftest.frag. >+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS >+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS >+ echo 'CEOF >+ sed -f conftest.frag conftest.in > conftest.out >+ rm -f conftest.in >+ mv conftest.out conftest.in >+' >> $CONFIG_STATUS >+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail >+ rm -f conftest.vals >+ mv conftest.tail conftest.vals >+done >+rm -f conftest.vals >+ >+cat >> $CONFIG_STATUS <<\EOF >+ rm -f conftest.frag conftest.h >+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h >+ cat conftest.in >> conftest.h >+ rm -f conftest.in >+ if cmp -s $ac_file conftest.h 2>/dev/null; then >+ echo "$ac_file is unchanged" >+ rm -f conftest.h >+ else >+ # Remove last slash and all that follows it. Not all systems have dirname. >+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` >+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then >+ # The file is in a subdirectory. >+ test ! -d "$ac_dir" && mkdir "$ac_dir" >+ fi >+ rm -f $ac_file >+ mv conftest.h $ac_file >+ fi >+fi; done >+ >+EOF >+cat >> $CONFIG_STATUS <<EOF >+ >+EOF >+cat >> $CONFIG_STATUS <<\EOF >+ >+exit 0 >+EOF >+chmod +x $CONFIG_STATUS >+rm -fr confdefs* $ac_clean_files >+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 >+ >+if test "$no_recursion" != yes; then >+ >+ # Remove --cache-file and --srcdir arguments so they do not pile up. >+ ac_sub_configure_args= >+ ac_prev= >+ for ac_arg in $ac_configure_args; do >+ if test -n "$ac_prev"; then >+ ac_prev= >+ continue >+ fi >+ case "$ac_arg" in >+ -cache-file | --cache-file | --cache-fil | --cache-fi \ >+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) >+ ac_prev=cache_file ;; >+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ >+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) >+ ;; >+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) >+ ac_prev=srcdir ;; >+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) >+ ;; >+ *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; >+ esac >+ done >+ >+ for ac_config_dir in lib/bind; do >+ >+ # Do not complain, so a configure script can configure whichever >+ # parts of a large source tree are present. >+ if test ! -d $srcdir/$ac_config_dir; then >+ continue >+ fi >+ >+ echo configuring in $ac_config_dir >+ >+ case "$srcdir" in >+ .) ;; >+ *) >+ if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; >+ else >+ { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } >+ fi >+ ;; >+ esac >+ >+ ac_popdir=`pwd` >+ cd $ac_config_dir >+ >+ # A "../" for each directory in /$ac_config_dir. >+ ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` >+ >+ case "$srcdir" in >+ .) # No --srcdir option. We are building in place. >+ ac_sub_srcdir=$srcdir ;; >+ /*) # Absolute path. >+ ac_sub_srcdir=$srcdir/$ac_config_dir ;; >+ *) # Relative path. >+ ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; >+ esac >+ >+ # Check for guested configure; otherwise get Cygnus style configure. >+ if test -f $ac_sub_srcdir/configure; then >+ ac_sub_configure=$ac_sub_srcdir/configure >+ elif test -f $ac_sub_srcdir/configure.in; then >+ ac_sub_configure=$ac_configure >+ else >+ echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 >+ ac_sub_configure= >+ fi >+ >+ # The recursion is here. >+ if test -n "$ac_sub_configure"; then >+ >+ # Make the cache file name correct relative to the subdirectory. >+ case "$cache_file" in >+ /*) ac_sub_cache_file=$cache_file ;; >+ *) # Relative path. >+ ac_sub_cache_file="$ac_dots$cache_file" ;; >+ esac >+ case "$ac_given_INSTALL" in >+ [/$]*) INSTALL="$ac_given_INSTALL" ;; >+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;; >+ esac >+ >+ echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" >+ # The eval makes quoting arguments work. >+ if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir >+ then : >+ else >+ { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } >+ fi >+ fi >+ >+ cd $ac_popdir >+ done >+fi >+ >+chmod a+x isc-config.sh >+ >+# Tell Emacs to edit this file in shell mode. >+# Local Variables: >+# mode: sh >+# End: >diff -Naur bind-9.2.2-orig/configure.in bind-9.2.2/configure.in >--- bind-9.2.2-orig/configure.in Mon Feb 17 02:05:02 2003 >+++ bind-9.2.2/configure.in Tue Oct 28 20:21:23 2003 >@@ -272,6 +272,388 @@ > AC_C_BIGENDIAN > > # >+# Build DLZ support? >+# >+# The use_dlz flag is set to no. If one of the DLZ drivers is selected >+# for build the use_dlz flag will be set to yes >+# >+ >+use_dlz=no >+ >+# >+# was --with-dlz-postgres specified? >+# >+ >+AC_MSG_CHECKING(for Postgres DLZ driver) >+AC_ARG_WITH(dlz_postgres, >+[ --with-dlz-postgres[=PATH] Build with Postgres DLZ driver [yes|no|path]. >+ (Required to use Postgres with DLZ)], >+ use_dlz_postgres="$withval", use_dlz_postgres="no") >+ >+case "$use_dlz_postgres" in >+ no) >+ AC_MSG_RESULT(no) >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ if test "$use_dlz_postgres" = "yes" >+ then >+ # User did not specify a path - guess it >+ pgdirs="/usr /usr/local /usr/local/pgsql /usr/pkg" >+ for d in $pgdirs >+ do >+ if test -f $d/include/libpq-fe.h >+ then >+ use_dlz_postgres=$d >+ break >+ fi >+ done >+ if test "$use_dlz_postgres" = "yes" >+ then >+ AC_MSG_RESULT(not found) >+ AC_MSG_ERROR( >+[PostgreSQL was not found in any of $pgdirs; use --with-dlz-postgres=/path]) >+ fi >+ fi >+ USE_DLZ_POSTGRES='-DDLZ_POSTGRES' >+ DLZ_POSTGRES_INC="-I$use_dlz_postgres/include" >+ DLZ_POSTGRES_LIBS="-L$use_dlz_postgres/lib -lpq" >+ AC_MSG_RESULT( >+[using PostgreSQL from $use_dlz_postgres/lib and $use_dlz_postgres/include]) >+ ;; >+esac >+ >+ >+AC_SUBST(DLZ_POSTGRES_INC) >+AC_SUBST(DLZ_POSTGRES_LIBS) >+AC_SUBST(USE_DLZ_POSTGRES) >+ >+ >+# >+# was --with-dlz-mysql specified? >+# >+ >+AC_MSG_CHECKING(for MySQL DLZ driver) >+AC_ARG_WITH(dlz_mysql, >+[ --with-dlz-mysql[=PATH] Build with MySQL DLZ driver [yes|no|path]. >+ (Required to use MySQL with DLZ)], >+ use_dlz_mysql="$withval", use_dlz_mysql="no") >+ >+case "$use_dlz_mysql" in >+ no) >+ AC_MSG_RESULT(no) >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ if test "$use_dlz_mysql" = "yes" >+ then >+ # User did not specify a path - guess it >+ mysqldirs="/usr /usr/local /usr/local/mysql /usr/pkg" >+ for d in $mysqldirs >+ do >+ if test -f $d/include/mysql/mysql.h >+ then >+ use_dlz_mysql=$d >+ break >+ fi >+ done >+ if test "$use_dlz_mysql" = "yes" >+ then >+ AC_MSG_RESULT(not found) >+ AC_MSG_ERROR( >+[MySQL was not found in any of $mysqldirs; use --with-dlz-mysql=/path]) >+ fi >+ fi >+ USE_DLZ_MYSQL='-DDLZ_MYSQL' >+ DLZ_MYSQL_INC="-I$use_dlz_mysql/include/mysql" >+ DLZ_MYSQL_LIBS="-L$use_dlz_mysql/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm" >+ AC_MSG_RESULT( >+[using mysql from $use_dlz_mysql/lib/mysql and $use_dlz_mysql/include/mysql]) >+ ;; >+esac >+ >+AC_SUBST(DLZ_MYSQL_INC) >+AC_SUBST(DLZ_MYSQL_LIBS) >+AC_SUBST(USE_DLZ_MYSQL) >+ >+ >+# >+# was --with-dlz-bdb specified? >+# >+ >+AC_MSG_CHECKING(for Berkeley DB DLZ driver) >+AC_ARG_WITH(dlz_bdb, >+[ --with-dlz-bdb[=PATH] Build with Berkeley DB DLZ driver [yes|no|path]. >+ (Required to use Berkeley DB with DLZ)], >+ use_dlz_bdb="$withval", use_dlz_bdb="no") >+ >+case "$use_dlz_bdb" in >+ no) >+ AC_MSG_RESULT(no) >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ #set DLZ_BDB_UTIL to "dlzbdb" so that it is built too >+ DLZ_BDB_UTIL="dlzbdb" >+ if test "$use_dlz_bdb" = "yes" >+ then >+ # User did not specify a path - guess it >+ bdbdirs="/usr /usr/local /usr/pkg" >+ for d in $bdbdirs >+ do >+ if test -f $d/include/db.h >+ then >+ use_dlz_bdb=$d >+ DLZ_BDB_INCDIR=$use_dlz_bdb/include >+ DLB_BDB_LIB="-ldb" >+ break >+ fi >+ done >+ if test "$use_dlz_bdb" = "yes" >+ then >+ AC_MSG_RESULT(not found) >+ AC_MSG_ERROR( >+[Berkeley DB was not found in any of $bdbdirs; use --with-dlz-bdb=/path]) >+ fi >+ # if the user specified a path try a few variations of the path >+ # for the include and library dirs >+ elif test -d "$use_dlz_bdb" >+ then >+ # set both to yes, so we can check them later >+ DLZ_BDB_INCDIR="yes" >+ DLZ_BDB_LIB="yes" >+ >+ # check other locations for includes. >+ bdb_incdirs="/ /db41/ /db4/ /db/" >+ for d in $bdb_incdirs >+ do >+ if test -f $use_dlz_bdb/include${d}db.h >+ then >+ DLZ_BDB_INCDIR=$use_dlz_bdb/include${d} >+ break >+ fi >+ done >+ >+ if test "$DLZ_BDB_INCDIR" = "yes" >+ then >+ AC_MSG_RESULT(not found) >+ AC_MSG_ERROR( >+[Berkeley DB header was not found in $use_dlz_bdb/include, \ >+$use_dlz_bdb/include/db41, $use_dlz_bdb/include/db4 or $use_dlz_bdb/include/db]) >+ fi >+ >+ # look for libname other than libdb.so >+ bdb_libnames="db41 db-4.1 db" >+ for d in $bdb_libnames >+ do >+ if test -f $use_dlz_bdb/lib/lib${d}.so >+ then >+ DLZ_BDB_LIB="-l${d}" >+ fi >+ done >+ >+ if test "$DLZ_BDB_LIB" = "yes" >+ then >+ AC_MSG_RESULT(not found) >+ AC_MSG_ERROR( >+[Berkeley DB library libdb41.so, libdb-4.1.so or libdb.so could not be found \ >+in $use_dlz_bdb/lib]) >+ fi >+ >+ >+ else >+ AC_MSG_RESULT(not found) >+ AC_MSG_ERROR( >+[Path $use_dlz_bdb does not exist]) >+ >+ fi >+ >+ USE_DLZ_BDB='-DDLZ_BDB' >+ DLZ_BDB_INC="-I$DLZ_BDB_INCDIR" >+ DLZ_BDB_LIBS="-L${use_dlz_bdb}/lib ${DLZ_BDB_LIB}" >+ AC_MSG_RESULT( >+[using Berkeley DB from $use_dlz_bdb/lib and $DLZ_BDB_INCDIR]) >+ ;; >+esac >+ >+AC_SUBST(DLZ_BDB_UTIL) >+AC_SUBST(DLZ_BDB_INC) >+AC_SUBST(DLZ_BDB_LIBS) >+AC_SUBST(USE_DLZ_BDB) >+ >+ >+# >+# was --with-dlz-filesystem specified? >+# >+ >+AC_MSG_CHECKING(for file system DLZ driver) >+AC_ARG_WITH(dlz_filesystem, >+[ --with-dlz-filesystem[=PATH] Build with filesystem DLZ driver [yes|no]. >+ (Required to use file system driver with DLZ)], >+ use_dlz_filesystem="$withval", use_dlz_filesystem="no") >+ >+case "$use_dlz_filesystem" in >+ no) >+ AC_MSG_RESULT(no) >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ USE_DLZ_FILESYSTEM='-DDLZ_FILESYSTEM' >+ AC_MSG_RESULT(yes) >+ ;; >+esac >+ >+AC_SUBST(USE_DLZ_FILESYSTEM) >+ >+ >+# >+# was --with-dlz-ldap specified? >+# >+ >+AC_MSG_CHECKING(for LDAP DLZ driver) >+AC_ARG_WITH(dlz_ldap, >+[ --with-dlz-ldap[=PATH] Build with LDAP DLZ driver [yes|no|path]. >+ (Required to use LDAP with DLZ)], >+ use_dlz_ldap="$withval", use_dlz_ldap="no") >+ >+case "$use_dlz_ldap" in >+ no) >+ AC_MSG_RESULT(no) >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ if test "$use_dlz_ldap" = "yes" >+ then >+ # User did not specify a path - guess it >+ ldapdirs="/usr /usr/local /usr/pkg" >+ for d in $ldapdirs >+ do >+ if test -f $d/include/ldap.h >+ then >+ use_dlz_ldap=$d >+ break >+ fi >+ done >+ if test "$use_dlz_ldap" = "yes" >+ then >+ AC_MSG_RESULT(not found) >+ AC_MSG_ERROR( >+[LDAP headers were not found in any of $ldapdirs; use --with-dlz-ldap=/path]) >+ fi >+ fi >+ USE_DLZ_LDAP='-DDLZ_LDAP' >+ DLZ_LDAP_INC="-I$use_dlz_ldap/include" >+ DLZ_LDAP_LIBS="-L$use_dlz_ldap/lib -lldap -llber" >+ AC_MSG_RESULT( >+[using LDAP from $use_dlz_ldap/lib and $use_dlz_ldap/include]) >+ ;; >+esac >+ >+ >+AC_SUBST(DLZ_LDAP_INC) >+AC_SUBST(DLZ_LDAP_LIBS) >+AC_SUBST(USE_DLZ_LDAP) >+ >+ >+# >+# was --with-dlz-odbc specified? >+# >+ >+AC_MSG_CHECKING(for ODBC DLZ driver) >+AC_ARG_WITH(dlz_odbc, >+[ --with-dlz-odbc[=PATH] Build with ODBC DLZ driver [yes|no|path]. >+ (Required to use ODBC with DLZ)], >+ use_dlz_odbc="$withval", use_dlz_odbc="no") >+ >+case "$use_dlz_odbc" in >+ no) >+ AC_MSG_RESULT(no) >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ if test "$use_dlz_odbc" = "yes" >+ then >+ # User did not specify a path - guess it >+ odbcdirs="/usr /usr/local /usr/pkg" >+ for d in $odbcdirs >+ do >+ if test -f $d/include/sql.h >+ then >+ use_dlz_odbc=$d >+ break >+ fi >+ done >+ if test "$use_dlz_odbc" = "yes" >+ then >+ AC_MSG_RESULT(not found) >+ AC_MSG_ERROR( >+[ODBC headers were not found in any of $odbcdirs; use --with-dlz-odbc=/path]) >+ fi >+ fi >+ USE_DLZ_ODBC='-DDLZ_ODBC' >+ DLZ_ODBC_INC="-I$use_dlz_odbc/include" >+ DLZ_ODBC_LIBS="-L$use_dlz_odbc/lib -lodbc" >+ AC_MSG_RESULT( >+[using ODBC from $use_dlz_odbc/lib and $use_dlz_odbc/include]) >+ ;; >+esac >+ >+ >+AC_SUBST(DLZ_ODBC_INC) >+AC_SUBST(DLZ_ODBC_LIBS) >+AC_SUBST(USE_DLZ_ODBC) >+ >+ >+# >+# was --with-dlz-stub specified? >+# >+ >+AC_MSG_CHECKING(for stub DLZ driver) >+AC_ARG_WITH(dlz_stub, >+[ --with-dlz-stub[=PATH] Build with stub DLZ driver [yes|no]. >+ (Required to use stub driver with DLZ)], >+ use_dlz_stub="$withval", use_dlz_stub="no") >+ >+case "$use_dlz_stub" in >+ no) >+ AC_MSG_RESULT(no) >+ ;; >+ *) >+ #set use_dlz = "yes" so the DLZ core will be built >+ use_dlz=yes >+ USE_DLZ_STUB='-DDLZ_STUB' >+ AC_MSG_RESULT(yes) >+ ;; >+esac >+ >+AC_SUBST(USE_DLZ_STUB) >+ >+ >+# >+# If any DLZ driver is built, the DLZ core is built too. >+# >+ >+AC_MSG_CHECKING(for DLZ) >+ >+# check if any DLZ driver was built >+if test "$use_dlz" = "yes" >+then >+ AC_MSG_RESULT(yes) >+ USE_DLZ="-DDLZ" >+else >+ AC_MSG_RESULT(no) >+fi >+ >+AC_SUBST(USE_DLZ) >+ >+ >+# > # was --with-openssl specified? > # > AC_MSG_CHECKING(for OpenSSL library) >@@ -1732,7 +2114,7 @@ > > AC_OUTPUT( > make/rules >- make/includes >+ make/includes > Makefile > make/Makefile > make/mkdep >@@ -1777,6 +2159,7 @@ > lib/tests/include/Makefile > lib/tests/include/tests/Makefile > bin/Makefile >+ bin/dlzbdb/Makefile > bin/check/Makefile > bin/named/Makefile > bin/named/unix/Makefile >diff -Naur bind-9.2.2-orig/lib/dns/Makefile.in bind-9.2.2/lib/dns/Makefile.in >--- bind-9.2.2-orig/lib/dns/Makefile.in Wed Nov 14 20:24:06 2001 >+++ bind-9.2.2/lib/dns/Makefile.in Sun Apr 27 17:35:32 2003 >@@ -27,7 +27,7 @@ > > CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} > >-CDEFINES = >+CDEFINES = @USE_DLZ@ > CWARNINGS = > > LIBS = @LIBS@ >@@ -46,13 +46,13 @@ > OBJS = a6.@O@ acl.@O@ adb.@O@ byaddr.@O@ \ > cache.@O@ callbacks.@O@ compress.@O@ \ > db.@O@ dbiterator.@O@ dbtable.@O@ diff.@O@ dispatch.@O@ \ >- dnssec.@O@ forward.@O@ journal.@O@ keytable.@O@ \ >+ dlz.@O@ dnssec.@O@ forward.@O@ journal.@O@ keytable.@O@ \ > lib.@O@ log.@O@ lookup.@O@ \ > master.@O@ masterdump.@O@ message.@O@ \ > name.@O@ ncache.@O@ nxt.@O@ peer.@O@ \ > rbt.@O@ rbtdb.@O@ rbtdb64.@O@ rdata.@O@ rdatalist.@O@ \ > rdataset.@O@ rdatasetiter.@O@ rdataslab.@O@ request.@O@ \ >- resolver.@O@ result.@O@ rootns.@O@ sdb.@O@ soa.@O@ ssu.@O@ \ >+ resolver.@O@ result.@O@ rootns.@O@ sdb.@O@ sdlz.@O@ soa.@O@ ssu.@O@ \ > stats.@O@ tcpmsg.@O@ time.@O@ timer.@O@ tkey.@O@ \ > tsig.@O@ ttl.@O@ validator.@O@ \ > version.@O@ view.@O@ xfrin.@O@ zone.@O@ zonekey.@O@ zt.@O@ \ >@@ -62,13 +62,13 @@ > SRCS = a6.c acl.c adb.c byaddr.c \ > cache.c callbacks.c compress.c \ > db.c dbiterator.c dbtable.c diff.c dispatch.c \ >- dnssec.c forward.c journal.c keytable.c \ >+ dlz.c dnssec.c forward.c journal.c keytable.c \ > lib.c log.c lookup.c \ > master.c masterdump.c message.c \ > name.c ncache.c nxt.c peer.c \ > rbt.c rbtdb.c rbtdb64.c rdata.c rdatalist.c \ > rdataset.c rdatasetiter.c rdataslab.c request.c \ >- resolver.c result.c rootns.c sdb.c soa.c ssu.c \ >+ resolver.c result.c rootns.c sdb.c sdlz.c soa.c ssu.c \ > stats.c tcpmsg.c time.c timer.c tkey.c \ > tsig.c ttl.c validator.c \ > version.c view.c xfrin.c zone.c zonekey.c zt.c ${OTHERSRCS} >diff -Naur bind-9.2.2-orig/lib/dns/dlz.c bind-9.2.2/lib/dns/dlz.c >--- bind-9.2.2-orig/lib/dns/dlz.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/lib/dns/dlz.c Sat Sep 20 10:04:55 2003 >@@ -0,0 +1,480 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+ >+/*** >+ *** Imports >+ ***/ >+ >+#ifdef DLZ >+ >+#include <config.h> >+ >+#include <dns/fixedname.h> >+#include <dns/log.h> >+#include <dns/master.h> >+#include <dns/dlz.h> >+ >+ >+#include <isc/buffer.h> >+#include <isc/magic.h> >+#include <isc/mem.h> >+#include <isc/once.h> >+#include <isc/rwlock.h> >+#include <isc/string.h> >+#include <isc/util.h> >+ >+/*** >+ *** Supported DLZ DB Implementations Registry >+ ***/ >+ >+static ISC_LIST(dns_dlzimplementation_t) dlz_implementations; >+static isc_rwlock_t dlz_implock; >+static isc_once_t once = ISC_ONCE_INIT; >+ >+static void >+dlz_initialize(void) { >+ RUNTIME_CHECK(isc_rwlock_init(&dlz_implock, 0, 0) == ISC_R_SUCCESS); >+ ISC_LIST_INIT(dlz_implementations); >+} >+ >+/* Searches the dlz_implementations list for a driver matching name */ >+static inline dns_dlzimplementation_t * >+dlz_impfind(const char *name) { >+ dns_dlzimplementation_t *imp; >+ >+ for (imp = ISC_LIST_HEAD(dlz_implementations); >+ imp != NULL; >+ imp = ISC_LIST_NEXT(imp, link)) >+ if (strcasecmp(name, imp->name) == 0) >+ return (imp); >+ return (NULL); >+} >+ >+/*** >+ *** Basic DLZ Methods >+ ***/ >+/**/ >+isc_result_t >+dns_dlzallowzonexfr(dns_view_t *view, dns_name_t *name, >+ isc_sockaddr_t *clientaddr, dns_db_t **dbp) >+{ >+ isc_result_t result; >+ >+ /* Performs checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(DNS_DLZ_VALID(view->dlzdatabase)); >+ REQUIRE(name != NULL); >+ REQUIRE(dbp != NULL && *dbp == NULL); >+ >+ /* ask driver if the zone is supported */ >+ result = view->dlzdatabase->implementation->methods->allowzonexfr( >+ view->dlzdatabase->implementation->driverarg, >+ view->dlzdatabase->dbdata, view->dlzdatabase->mctx, >+ view->rdclass, name, clientaddr, dbp); >+ >+ if(result == ISC_R_NOTIMPLEMENTED) >+ return (ISC_R_NOTFOUND); >+ return result; >+} >+ >+ >+isc_result_t >+dns_dlzcreate(isc_mem_t *mctx, const char *dlzname, const char *drivername, >+ unsigned int argc, char *argv[], dns_dlzdb_t **dbp) >+{ >+ >+ dns_dlzimplementation_t *impinfo; >+ isc_result_t result; >+ >+ /* >+ * initialize the dlz_implementations list, this is guaranteed >+ * to only really happen once. >+ */ >+ RUNTIME_CHECK(isc_once_do(&once, dlz_initialize) == ISC_R_SUCCESS); >+ >+ /* Performs checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(dbp != NULL && *dbp == NULL); >+ REQUIRE(dlzname != NULL); >+ REQUIRE(drivername != NULL); >+ REQUIRE(mctx != NULL); >+ >+ /* write log message */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_INFO, >+ "Loading '%s' using driver %s", dlzname, drivername); >+ >+ /* lock the dlz_implementations list so we can search it. */ >+ RWLOCK(&dlz_implock, isc_rwlocktype_read); >+ >+ /* search for the driver implementation */ >+ impinfo = dlz_impfind(drivername); >+ if (impinfo == NULL) { >+ RWUNLOCK(&dlz_implock, isc_rwlocktype_read); >+ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "unsupported DLZ database driver '%s'. %s not loaded.", >+ drivername, dlzname); >+ >+ return (ISC_R_NOTFOUND); >+ } >+ >+ /* Allocate memory to hold the DLZ database driver */ >+ (*dbp) = isc_mem_get(mctx, sizeof(dns_dlzdb_t)); >+ if((*dbp) == NULL){ >+ RWUNLOCK(&dlz_implock, isc_rwlocktype_read); >+ return (ISC_R_NOMEMORY); >+ } >+ >+ /* Make sure memory region is set to all 0's */ >+ memset((*dbp), 0, sizeof(dns_dlzdb_t)); >+ >+ (*dbp)->implementation = impinfo; >+ >+ /* Create a new database using implementation 'drivername'. */ >+ result = ((impinfo->methods->create)(mctx, dlzname, argc, argv, >+ impinfo->driverarg, &(*dbp)->dbdata)); >+ >+ /* mark the DLZ driver as valid */ >+ if(result == ISC_R_SUCCESS){ >+ RWUNLOCK(&dlz_implock, isc_rwlocktype_read); >+ (*dbp)->magic = DNS_DLZ_MAGIC; >+ isc_mem_attach(mctx, &(*dbp)->mctx); >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "DLZ driver loaded successfully."); >+ return (ISC_R_SUCCESS); >+ } else { >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "DLZ driver failed to load."); >+ } >+ >+ /* impinfo->methods->create failed. */ >+ RWUNLOCK(&dlz_implock, isc_rwlocktype_read); >+ isc_mem_put(mctx, (*dbp), sizeof(dns_dlzdb_t)); >+ return (result); >+} >+ >+void >+dns_dlzdestroy(dns_dlzdb_t **dbp) >+{ >+ isc_mem_t *mctx; >+ >+ /* Write debugging message to log */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unloading DLZ driver."); >+ >+ /* Perform checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(dbp != NULL && DNS_DLZ_VALID(*dbp)); >+ >+ /* call the drivers destroy method */ >+ if((*dbp) != NULL){ >+ mctx = (*dbp)->mctx; >+ (*dbp)->implementation->methods->destroy((*dbp)->implementation->driverarg, >+ (*dbp)->dbdata); >+ /* return memory */ >+ isc_mem_put(mctx, (*dbp), sizeof(dns_dlzdb_t)); >+ isc_mem_detach(&mctx); >+ } >+ >+ *dbp = NULL; >+} >+ >+ >+isc_result_t >+dns_dlzfindzone(dns_view_t *view, dns_name_t *name, unsigned int minlabels, >+ dns_db_t **dbp) >+{ >+ dns_fixedname_t fname; >+ dns_name_t *zonename; >+ unsigned int namelabels; >+ unsigned int i; >+ isc_result_t result; >+ >+ /* Performs checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(DNS_DLZ_VALID(view->dlzdatabase)); >+ REQUIRE(name != NULL); >+ REQUIRE(dbp != NULL && *dbp == NULL); >+ >+ /* setup a "fixed" dns name */ >+ dns_fixedname_init(&fname); >+ zonename = dns_fixedname_name(&fname); >+ >+ /* count the number of labels in the name */ >+ namelabels = dns_name_countlabels(name); >+ >+ /* >+ * loop through starting with the longest domain name and trying shorter names >+ * portions of the name until we find a match, have an error, or are below the >+ * 'minlabels' threshold. minlabels is 0, if the standard database didn't have >+ * a zone name match. Otherwise minlables is the number of labels in that name. >+ * We need to beat that for a "better" match for the DLZ database to be >+ * authoritative instead of the standard database. >+ */ >+ for(i = namelabels; i > minlabels && i > 1; i--){ >+ if(i == namelabels){ >+ result = dns_name_copy(name, zonename, NULL); >+ if(result != ISC_R_SUCCESS) >+ return result; >+ } else{ >+ result = dns_name_splitatdepth(name, i, NULL, zonename); >+ if(result != ISC_R_SUCCESS) >+ return result; >+ } >+ >+ /* ask SDLZ driver if the zone is supported */ >+ result = view->dlzdatabase->implementation->methods->findzone( >+ view->dlzdatabase->implementation->driverarg, >+ view->dlzdatabase->dbdata, view->dlzdatabase->mctx, >+ view->rdclass, zonename, dbp); >+ if(result != ISC_R_NOTFOUND) >+ return result; >+ } >+ return (ISC_R_NOTFOUND); >+} >+ >+/* >+ * Registers a DLZ driver. This basically just adds the dlz >+ * driver to the list of available drivers in the dlz_implementations list. >+ */ >+isc_result_t >+dns_dlzregister(const char *drivername, const dns_dlzmethods_t *methods, >+ void *driverarg, isc_mem_t *mctx, dns_dlzimplementation_t **dlzimp) >+{ >+ >+ dns_dlzimplementation_t *dlz_imp; >+ >+ /* Write debugging message to log */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Registering DLZ driver '%s'", drivername); >+ >+ /* Performs checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(drivername != NULL); >+ REQUIRE(methods != NULL); >+ REQUIRE(methods->create != NULL); >+ REQUIRE(methods->destroy != NULL); >+ REQUIRE(methods->findzone != NULL); >+ REQUIRE(mctx != NULL); >+ REQUIRE(dlzimp != NULL && *dlzimp == NULL); >+ >+ /* >+ * initialize the dlz_implementations list, this is guaranteed >+ * to only really happen once. >+ */ >+ RUNTIME_CHECK(isc_once_do(&once, dlz_initialize) == ISC_R_SUCCESS); >+ >+ /* lock the dlz_implementations list so we can modify it. */ >+ RWLOCK(&dlz_implock, isc_rwlocktype_write); >+ >+ /* check that another already registered driver isn't using the same name */ >+ dlz_imp = dlz_impfind(drivername); >+ if (dlz_imp != NULL) { >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "DLZ Driver '%s' already registered", drivername); >+ RWUNLOCK(&dlz_implock, isc_rwlocktype_write); >+ return (ISC_R_EXISTS); >+ } >+ >+ /* Allocate memory for a dlz_implementation object. Error if we cannot. */ >+ dlz_imp = isc_mem_get(mctx, sizeof(dns_dlzimplementation_t)); >+ if (dlz_imp == NULL) { >+ RWUNLOCK(&dlz_implock, isc_rwlocktype_write); >+ return (ISC_R_NOMEMORY); >+ } >+ >+ /* Make sure memory region is set to all 0's */ >+ memset(dlz_imp, 0, sizeof(dns_dlzimplementation_t)); >+ >+ /* Store the data passed into this method */ >+ dlz_imp->name = drivername; >+ dlz_imp->methods = methods; >+ dlz_imp->mctx = NULL; >+ dlz_imp->driverarg = driverarg; >+ >+ /* attach the new dlz_implementation object to a memory context */ >+ isc_mem_attach(mctx, &dlz_imp->mctx); >+ >+ /* >+ * prepare the dlz_implementation object to be put in a list, >+ * and append it to the list >+ */ >+ ISC_LINK_INIT(dlz_imp, link); >+ ISC_LIST_APPEND(dlz_implementations, dlz_imp, link); >+ >+ /* Unlock the dlz_implementations list. */ >+ RWUNLOCK(&dlz_implock, isc_rwlocktype_write); >+ >+ /* Pass back the dlz_implementation that we created. */ >+ *dlzimp = dlz_imp; >+ >+ return (ISC_R_SUCCESS); >+} >+ >+/* Helper function for dns_dlzstrtoargv(). Pardon the gratuitous recursion. */ >+static isc_result_t >+dns_dlzstrtoargvsub(isc_mem_t *mctx, char *s, unsigned int *argcp, >+ char ***argvp, unsigned int n) >+{ >+ isc_result_t result; >+ >+restart: >+ /* Discard leading whitespace. */ >+ while (*s == ' ' || *s == '\t') >+ s++; >+ >+ if (*s == '\0') { >+ /* We have reached the end of the string. */ >+ *argcp = n; >+ *argvp = isc_mem_get(mctx, n * sizeof(char *)); >+ if (*argvp == NULL) >+ return (ISC_R_NOMEMORY); >+ } else { >+ char *p = s; >+ while (*p != ' ' && *p != '\t' && *p != '\0' && *p != '{'){ >+ if(*p == '\n'){ >+ *p = ' '; >+ goto restart; >+ } >+ p++; >+ } >+ >+ /* do "grouping", items between { and } are one arg */ >+ if(*p == '{'){ >+ char *t = p; >+ /* shift all characters to left by 1 to get rid of '{' */ >+ while (*t != '\0'){ >+ t++; >+ *(t-1) = *t; >+ } >+ while (*p != '\0' && *p != '}'){ >+ p++; >+ } >+ /* get rid of '}' character */ >+ if (*p == '}'){ >+ *p = '\0'; >+ p++; >+ } >+ /* normal case, no "grouping" */ >+ } else if (*p != '\0') >+ *p++ = '\0'; >+ >+ result = dns_dlzstrtoargvsub(mctx, p, argcp, argvp, n + 1); >+ if (result != ISC_R_SUCCESS) >+ return (result); >+ (*argvp)[n] = s; >+ } >+ return (ISC_R_SUCCESS); >+} >+ >+/* >+ * Tokenize the string "s" into whitespace-separated words, >+ * return the number of words in '*argcp' and an array >+ * of pointers to the words in '*argvp'. The caller >+ * must free the array using isc_mem_put(). The string >+ * is modified in-place. >+ */ >+isc_result_t >+dns_dlzstrtoargv(isc_mem_t *mctx, char *s, unsigned int *argcp, char ***argvp) { >+ return(dns_dlzstrtoargvsub(mctx, s, argcp, argvp, 0)); >+} >+ >+/* >+ * Unregisters a DLZ driver. This basically just removes the dlz >+ * driver from the list of available drivers in the dlz_implementations list. >+ */ >+void >+dns_dlzunregister(dns_dlzimplementation_t **dlzimp) >+{ >+ dns_dlzimplementation_t *dlz_imp; >+ isc_mem_t *mctx; >+ >+ /* Write debugging message to log */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unregistering DLZ driver."); >+ >+ /* Performs checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(dlzimp != NULL && *dlzimp != NULL); >+ >+ /* >+ * initialize the dlz_implementations list, this is guaranteed >+ * to only really happen once. >+ */ >+ RUNTIME_CHECK(isc_once_do(&once, dlz_initialize) == ISC_R_SUCCESS); >+ >+ dlz_imp = *dlzimp; >+ >+ /* lock the dlz_implementations list so we can modify it. */ >+ RWLOCK(&dlz_implock, isc_rwlocktype_write); >+ >+ /* remove the dlz_implementation object from the list */ >+ ISC_LIST_UNLINK(dlz_implementations, dlz_imp, link); >+ mctx = dlz_imp->mctx; >+ >+ /* >+ * return the memory back to the available memory pool and remove it from >+ * the memory context. >+ */ >+ isc_mem_put(mctx, dlz_imp, sizeof(dns_dlzimplementation_t)); >+ isc_mem_detach(&mctx); >+ >+ /* Unlock the dlz_implementations list. */ >+ RWUNLOCK(&dlz_implock, isc_rwlocktype_write); >+ >+} >+ >+#endif >+ >diff -Naur bind-9.2.2-orig/lib/dns/include/dns/dlz.h bind-9.2.2/lib/dns/include/dns/dlz.h >--- bind-9.2.2-orig/lib/dns/include/dns/dlz.h Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/lib/dns/include/dns/dlz.h Sun Apr 27 17:35:42 2003 >@@ -0,0 +1,264 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+ >+ >+#ifndef DLZ_H >+#define DLZ_H 1 >+ >+/***** >+ ***** Module Info >+ *****/ >+ >+/* >+ * DLZ Interface >+ * >+ * The DLZ interface allows zones to be looked up using a driver instead of >+ * Bind's default in memory zone table. >+ * >+ * >+ * Reliability: >+ * No anticipated impact. >+ * >+ * Resources: >+ * >+ * Security: >+ * No anticipated impact. >+ * >+ * Standards: >+ * None. >+ */ >+ >+/***** >+ ***** Imports >+ *****/ >+ >+#include <dns/name.h> >+#include <dns/types.h> >+#include <dns/view.h> >+ >+#include <isc/lang.h> >+ >+ISC_LANG_BEGINDECLS >+ >+/*** >+ *** Types >+ ***/ >+ >+#define DNS_DLZ_MAGIC ISC_MAGIC('D','L','Z','D') >+#define DNS_DLZ_VALID(dlz) ISC_MAGIC_VALID(dlz, DNS_DLZ_MAGIC) >+ >+typedef isc_result_t >+(*dns_dlzallowzonexfr_t)(void *driverarg, void *dbdata, isc_mem_t *mctx, >+ dns_rdataclass_t rdclass, dns_name_t *name, isc_sockaddr_t *clientaddr, >+ dns_db_t **dbp); >+ >+/* >+ * Method prototype. Drivers implementing the DLZ interface MUST supply an >+ * allow zone transfer method. This method is called when the DNS server is performing >+ * a zone transfer query. >+ * The driver's method should return ISC_R_SUCCESS and a database pointer >+ * to the name server if the zone is supported by the database, and zone transfer is allowed. >+ * Otherwise it will return ISC_R_NOTFOUND if the zone is not supported by the database, or >+ * ISC_R_NOPERM if zone transfers are not allowed. >+ * If an error occurs it should return a result code indicating the type of error. >+ */ >+ >+typedef isc_result_t >+(*dns_dlzcreate_t)(isc_mem_t *mctx, const char *dlzname, unsigned int argc, >+ char *argv[], void *driverarg, void **dbdata); >+ >+/* >+ * Method prototype. Drivers implementing the DLZ interface MUST supply a >+ * create method. This method is called when the DNS server is starting up >+ * and creating drivers for use later. >+ */ >+ >+typedef void >+(*dns_dlzdestroy_t)(void *driverarg, void **dbdata); >+ >+/* >+ * Method prototype. Drivers implementing the DLZ interface MUST supply a >+ * destroy method. This method is called when the DNS server is shuting down >+ * and no longer needs the driver. >+ */ >+ >+typedef isc_result_t >+(*dns_dlzfindzone_t)(void *driverarg, void *dbdata, isc_mem_t *mctx, >+ dns_rdataclass_t rdclass, dns_name_t *name, dns_db_t **dbp); >+ >+/* >+ * Method prototype. Drivers implementing the DLZ interface MUST supply a >+ * find zone method. This method is called when the DNS server is performing a query. >+ * The find zone method will be called with the longest possible name first, and continue >+ * to be called with successively shorter domain names, until any of the following occur: >+ * 1) a match is found, and the function returns (ISC_R_SUCCESS) >+ * 2) a problem occurs, and the functions returns anything other than (ISC_R_NOTFOUND) >+ * 3) we run out of domain name labels. I.E. we have tried the shortest domain name >+ * 4) the number of labels in the domain name is less than min_lables for dns_dlzfindzone >+ * >+ * The driver's find zone method should return ISC_R_SUCCESS and a database pointer >+ * to the name server if the zone is supported by the database. Otherwise >+ * it will return ISC_R_NOTFOUND, and a null pointer if the zone is not supported. >+ * If an error occurs it should return a result code indicating the type of error. >+ */ >+ >+ /* the methods supplied by a DLZ driver */ >+typedef struct dns_dlzmethods { >+ dns_dlzcreate_t create; >+ dns_dlzdestroy_t destroy; >+ dns_dlzfindzone_t findzone; >+ dns_dlzallowzonexfr_t allowzonexfr; >+} dns_dlzmethods_t; >+ >+ /* information about a DLZ driver */ >+struct dns_dlzimplementation { >+ const char *name; >+ const dns_dlzmethods_t *methods; >+ isc_mem_t *mctx; >+ void *driverarg; >+ ISC_LINK(dns_dlzimplementation_t) link; >+}; >+ >+ /* an instance of a DLZ driver */ >+struct dns_dlzdb{ >+ unsigned int magic; >+ isc_mem_t *mctx; >+ dns_dlzimplementation_t *implementation; >+ void *dbdata; >+}; >+ >+ >+/*** >+ *** Method declarations >+ ***/ >+ >+isc_result_t >+dns_dlzallowzonexfr(dns_view_t *view, dns_name_t *name, isc_sockaddr_t *clientaddr, dns_db_t **dbp); >+ >+/* >+ * This method is called when the DNS server is performing a zone transfer query. It will call >+ * the DLZ driver's allow zone tranfer method. >+ */ >+ >+isc_result_t >+dns_dlzcreate(isc_mem_t *mctx, const char *dlzname, const char *drivername, unsigned int argc, >+ char *argv[], dns_dlzdb_t **dbp); >+ >+/* >+ * This method is called when the DNS server is starting up and creating drivers for use later. >+ * It will search the DLZ driver list for 'drivername' and return a DLZ driver via dbp if a match >+ * is found. If the DLZ driver supplies a create method, this function will call it. >+ */ >+ >+void >+dns_dlzdestroy(dns_dlzdb_t **dbp); >+ >+/* >+ * This method is called when the DNS server is shuting down and no longer needs the driver. >+ * If the DLZ driver supplies a destroy methods, this function will call it. >+ */ >+ >+isc_result_t >+dns_dlzfindzone(dns_view_t *view, dns_name_t *name, unsigned int minlabels, dns_db_t **dbp); >+ >+/* >+ * This method is called when the DNS server is performing a query. It will call the DLZ >+ * driver's find zone method. >+ */ >+ >+isc_result_t >+dns_dlzregister(const char *drivername, const dns_dlzmethods_t *methods, >+ void *driverarg, isc_mem_t *mctx, dns_dlzimplementation_t **dlzimp); >+ >+/* >+ * Register a dynamically loadable zones (DLZ) driver for the database type 'drivername', >+ * implemented by the functions in '*methods'. >+ * >+ * dlzimp must point to a NULL dlz_implementation_t pointer. That is, >+ * dlzimp != NULL && *dlzimp == NULL. It will be assigned a value that >+ * will later be used to identify the driver when deregistering it. >+ */ >+ >+isc_result_t >+dns_dlzstrtoargv(isc_mem_t *mctx, char *s, unsigned int *argcp, char ***argvp); >+ >+/* >+ * This method is called when the name server is starting up to parse the DLZ driver >+ * command line from named.conf. Basically it splits up a string into and argc / argv. >+ * The primary difference of this method is items between braces { } are considered >+ * only 1 word. for example the command line "this is { one grouped phrase } and this isn't" >+ * would be parsed into: >+ * argv[0]: "this" >+ * argv[1]: "is" >+ * argv{2]: " one grouped phrase " >+ * argv[3]: "and" >+ * argv[4]: "this" >+ * argv{5}: "isn't" >+ * braces should NOT be nested, more than one grouping in the command line is allowed. >+ * Notice, argv[2] has an extra space at the beginning and end. Extra spaces are not stripped >+ * between a grouping. You can do so in your driver if needed, or be sure not to put extra >+ * spaces before / after the braces. >+ */ >+ >+void >+dns_dlzunregister(dns_dlzimplementation_t **dlzimp); >+ >+/* >+ * Removes the dlz driver from the list of registered dlz drivers. >+ * There must be no active dlz drivers of this type when this function >+ * is called. >+ */ >+ >+ISC_LANG_ENDDECLS >+ >+#endif /* DLZ_H */ >diff -Naur bind-9.2.2-orig/lib/dns/include/dns/log.h bind-9.2.2/lib/dns/include/dns/log.h >--- bind-9.2.2-orig/lib/dns/include/dns/log.h Wed Oct 10 23:03:24 2001 >+++ bind-9.2.2/lib/dns/include/dns/log.h Sun Apr 27 17:35:42 2003 >@@ -68,6 +68,9 @@ > #define DNS_LOGMODULE_SDB (&dns_modules[22]) > #define DNS_LOGMODULE_DIFF (&dns_modules[23]) > #define DNS_LOGMODULE_HINTS (&dns_modules[24]) >+#ifdef DLZ >+#define DNS_LOGMODULE_DLZ (&dns_modules[25]) >+#endif > > ISC_LANG_BEGINDECLS > >diff -Naur bind-9.2.2-orig/lib/dns/include/dns/sdlz.h bind-9.2.2/lib/dns/include/dns/sdlz.h >--- bind-9.2.2-orig/lib/dns/include/dns/sdlz.h Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/lib/dns/include/dns/sdlz.h Sun Apr 27 17:35:42 2003 >@@ -0,0 +1,244 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifndef SDLZ_H >+#define SDLZ_H 1 >+ >+#include <dns/dlz.h> >+ >+ISC_LANG_BEGINDECLS >+ >+#define DNS_SDLZFLAG_THREADSAFE 0x00000001U >+#define DNS_SDLZFLAG_RELATIVEOWNER 0x00000002U >+#define DNS_SDLZFLAG_RELATIVERDATA 0x00000004U >+ >+ /* A simple DLZ database. */ >+typedef struct dns_sdlz_db dns_sdlz_db_t; >+ >+ /* A simple DLZ database lookup in progress. */ >+typedef struct dns_sdlzlookup dns_sdlzlookup_t; >+ >+ /* A simple DLZ database traversal in progress. */ >+typedef struct dns_sdlzallnodes dns_sdlzallnodes_t; >+ >+ >+typedef isc_result_t >+(*dns_sdlzallnodesfunc_t)(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzallnodes_t *allnodes); >+ >+/* >+ * Method prototype. Drivers implementing the SDLZ interface may supply an >+ * all nodes method. This method is called when the DNS server is performing a >+ * zone transfer query, after the allow zone transfer method has been called. >+ * This method is only called if the allow zone transfer method returned >+ * ISC_R_SUCCESS. This method and the allow zone transfer method are both >+ * required for zone transfers to be supported. If the driver generates data >+ * dynamically (instead of searching in a database for it) it should not implement >+ * this function as a zone transfer would be meaningless. A SDLZ driver does not >+ * have to implement an all nodes method. >+ */ >+ >+typedef isc_result_t >+(*dns_sdlzallowzonexfr_t)(void *driverarg, void *dbdata, const char *name, >+ const char *client); >+ >+/* >+ * Method prototype. Drivers implementing the SDLZ interface may supply an >+ * allow zone transfer method. This method is called when the DNS server is >+ * performing a zone transfer query, before the all nodes method can be called. >+ * This method and the all node method are both required for zone transfers to be >+ * supported. If the driver generates data dynamically (instead of searching in >+ * a database for it) it should not implement this function as a zone transfer >+ * would be meaningless. A SDLZ driver does not have to implement an allow >+ * zone transfer method. >+ * This method should return ISC_R_SUCCESS if the zone is supported >+ * by the database and a zone transfer is allowed for the specified client. >+ * If the zone is supported by the database, but zone transfers are not allowed >+ * for the specified client this method should return ISC_R_NOPERM.. >+ * Lastly the method should return ISC_R_NOTFOUND if the zone is not supported >+ * by the database. If an error occurs it should return a result code >+ * indicating the type of error. >+ */ >+ >+ >+typedef isc_result_t >+(*dns_sdlzauthorityfunc_t)(const char *zone, void *driverarg, void *dbdata, >+ dns_sdlzlookup_t *lookup); >+ >+/* >+ * Method prototype. Drivers implementing the SDLZ interface may supply an >+ * authority method. This method is called when the DNS server is performing a query, >+ * after both the find zone and lookup methods have been called. This method >+ * is required if the lookup function does not supply authority information for >+ * the dns record. A SDLZ driver does not have to implement an authority method. >+ */ >+ >+typedef isc_result_t >+(*dns_sdlzcreate_t)(const char *dlzname, unsigned int argc, char *argv[], >+ void *driverarg, void **dbdata); >+ >+/* >+ * Method prototype. Drivers implementing the SDLZ interface may supply a >+ * create method. This method is called when the DNS server is starting up >+ * and creating drivers for use later. A SDLZ driver does not have to implement >+ * a create method. >+ */ >+ >+typedef void >+(*dns_sdlzdestroy_t)(void *driverarg, void *dbdata); >+ >+/* >+ * Method prototype. Drivers implementing the SDLZ interface may supply a >+ * destroy method. This method is called when the DNS server is shuting down >+ * and no longer needs the driver. A SDLZ driver does not have to implement >+ * a destroy method. >+ */ >+ >+typedef isc_result_t >+(*dns_sdlzfindzone_t)(void *driverarg, void *dbdata, const char *name); >+ >+/* >+ * Method prototype. Drivers implementing the SDLZ interface MUST supply a >+ * find zone method. This method is called when the DNS server is performing a >+ * query to to determine if 'name' is a supported dns zone. >+ * The find zone method will be called with the longest possible name first, >+ * and continue to be called with successively shorter domain names, until >+ * any of the following occur: >+ * 1) the function returns (ISC_R_SUCCESS) indicating a zone name match. >+ * 2) a problem occurs, and the functions returns anything other than (ISC_R_NOTFOUND) >+ * 3) we run out of domain name labels. I.E. we have tried the shortest domain name >+ * 4) the number of labels in the domain name is less than min_lables for dns_dlzfindzone >+ * >+ * The driver's find zone method should return ISC_R_SUCCESS if the zone is >+ * supported by the database. Otherwise it should return ISC_R_NOTFOUND, if >+ * the zone is not supported. If an error occurs it should return a result >+ * code indicating the type of error. >+ */ >+ >+typedef isc_result_t >+(*dns_sdlzlookupfunc_t)(const char *zone, const char *name, void *driverarg, >+ void *dbdata, dns_sdlzlookup_t *lookup); >+ >+/* >+ * Method prototype. Drivers implementing the SDLZ interface MUST supply a >+ * lookup method. This method is called when the DNS server is performing a query, >+ * after the find zone and before any other methods have been called. This function >+ * returns record DNS record information using the dns_sdlz_putrr and dns_sdlz_putsoa >+ * functions. If this function supplies authority information for the DNS record >+ * the authority method is not required. If it does not, the authority function is >+ * required. A SDLZ driver must implement a lookup method. >+ */ >+ >+typedef struct dns_sdlzmethods { >+ dns_sdlzcreate_t create; >+ dns_sdlzdestroy_t destroy; >+ dns_sdlzfindzone_t findzone; >+ dns_sdlzlookupfunc_t lookup; >+ dns_sdlzauthorityfunc_t authority; >+ dns_sdlzallnodesfunc_t allnodes; >+ dns_sdlzallowzonexfr_t allowzonexfr; >+} dns_sdlzmethods_t; >+ >+isc_result_t >+dns_sdlzregister(const char *drivername, const dns_sdlzmethods_t *methods, >+ void *driverarg, unsigned int flags, isc_mem_t *mctx, >+ dns_sdlzimplementation_t **sdlzimp); >+/* >+ * Register a dynamically loadable zones (dlz) driver for the database type >+ * 'drivername', implemented by the functions in '*methods'. >+ * >+ * sdlzimp must point to a NULL dns_sdlzimplementation_t pointer. That is, >+ * sdlzimp != NULL && *sdlzimp == NULL. It will be assigned a value that >+ * will later be used to identify the driver when deregistering it. >+ */ >+ >+void >+dns_sdlzunregister(dns_sdlzimplementation_t **sdlzimp); >+ >+/* >+ * Removes the sdlz driver from the list of registered sdlz drivers. >+ * There must be no active sdlz drivers of this type when this function >+ * is called. >+ */ >+ >+isc_result_t >+dns_sdlz_putnamedrr(dns_sdlzallnodes_t *allnodes, const char *name, >+ const char *type, dns_ttl_t ttl, const char *data); >+/* >+ * Add a single resource record to the allnodes structure to be later >+ * parsed into a zone transfer response. >+ */ >+ >+isc_result_t >+dns_sdlz_putrr(dns_sdlzlookup_t *lookup, const char *type, dns_ttl_t ttl, >+ const char *data); >+/* >+ * Add a single resource record to the lookup structure to be later >+ * parsed into a query response. >+ */ >+ >+isc_result_t >+dns_sdlz_putsoa(dns_sdlzlookup_t *lookup, const char *mname, const char *rname, >+ isc_uint32_t serial); >+/* >+ * This function may optionally be called from the 'authority' callback >+ * to simplify construction of the SOA record for 'zone'. It will >+ * provide a SOA listing 'mname' as as the master server and 'rname' as >+ * the responsible person mailbox. It is the responsibility of the >+ * driver to increment the serial number between responses if necessary. >+ * All other SOA fields will have reasonable default values. >+ */ >+ >+ >+ISC_LANG_ENDDECLS >+ >+#endif /* SDLZ_H */ >diff -Naur bind-9.2.2-orig/lib/dns/include/dns/types.h bind-9.2.2/lib/dns/include/dns/types.h >--- bind-9.2.2-orig/lib/dns/include/dns/types.h Mon Jul 23 14:55:38 2001 >+++ bind-9.2.2/lib/dns/include/dns/types.h Sun Apr 27 17:35:42 2003 >@@ -51,6 +51,11 @@ > typedef void dns_dbnode_t; > typedef struct dns_dbtable dns_dbtable_t; > typedef void dns_dbversion_t; >+#ifdef DLZ >+typedef struct dns_dlzimplementation dns_dlzimplementation_t; >+typedef struct dns_dlzdb dns_dlzdb_t; >+typedef struct dns_sdlzimplementation dns_sdlzimplementation_t; >+#endif > typedef struct dns_decompress dns_decompress_t; > typedef struct dns_dispatch dns_dispatch_t; > typedef struct dns_dispatchevent dns_dispatchevent_t; >diff -Naur bind-9.2.2-orig/lib/dns/include/dns/view.h bind-9.2.2/lib/dns/include/dns/view.h >--- bind-9.2.2-orig/lib/dns/include/dns/view.h Mon Aug 5 03:57:14 2002 >+++ bind-9.2.2/lib/dns/include/dns/view.h Sun Apr 27 17:35:42 2003 >@@ -82,6 +82,9 @@ > dns_rdataclass_t rdclass; > char * name; > dns_zt_t * zonetable; >+#ifdef DLZ >+ dns_dlzdb_t * dlzdatabase; >+#endif > dns_resolver_t * resolver; > dns_adb_t * adb; > dns_requestmgr_t * requestmgr; >diff -Naur bind-9.2.2-orig/lib/dns/log.c bind-9.2.2/lib/dns/log.c >--- bind-9.2.2-orig/lib/dns/log.c Thu Oct 11 20:07:00 2001 >+++ bind-9.2.2/lib/dns/log.c Sun Apr 27 17:35:36 2003 >@@ -73,6 +73,9 @@ > { "dns/sdb", 0 }, > { "dns/diff", 0 }, > { "dns/hints", 0 }, >+#ifdef DLZ >+ { "dns/dlz", 0 }, >+#endif > { NULL, 0 } > }; > >diff -Naur bind-9.2.2-orig/lib/dns/sdlz.c bind-9.2.2/lib/dns/sdlz.c >--- bind-9.2.2-orig/lib/dns/sdlz.c Wed Dec 31 19:00:00 1969 >+++ bind-9.2.2/lib/dns/sdlz.c Wed Oct 29 19:51:34 2003 >@@ -0,0 +1,1761 @@ >+/* >+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ * >+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was >+ * conceived and contributed by Rob Butler. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the >+ * above copyright notice and this permission notice appear in all >+ * copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR >+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS >+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE >+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE >+ * USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+/* >+ * Copyright (C) 1999-2001 Internet Software Consortium. >+ * >+ * Permission to use, copy, modify, and distribute this software for any >+ * purpose with or without fee is hereby granted, provided that the above >+ * copyright notice and this permission notice appear in all copies. >+ * >+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM >+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL >+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, >+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING >+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, >+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION >+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >+#ifdef DLZ >+ >+#include <config.h> >+#include <string.h> >+ >+#include <isc/buffer.h> >+#include <isc/lex.h> >+#include <isc/log.h> >+#include <isc/rwlock.h> >+#include <isc/string.h> >+#include <isc/util.h> >+#include <isc/magic.h> >+#include <isc/mem.h> >+#include <isc/once.h> >+#include <isc/print.h> >+#include <isc/region.h> >+ >+#include <dns/callbacks.h> >+#include <dns/db.h> >+#include <dns/dbiterator.h> >+#include <dns/dlz.h> >+#include <dns/fixedname.h> >+#include <dns/log.h> >+#include <dns/rdata.h> >+#include <dns/rdatalist.h> >+#include <dns/rdataset.h> >+#include <dns/rdatasetiter.h> >+#include <dns/rdatatype.h> >+#include <dns/result.h> >+#include <dns/master.h> >+#include <dns/sdlz.h> >+#include <dns/types.h> >+ >+#include "rdatalist_p.h" >+ >+/*** >+ *** Private Types >+ ***/ >+ >+struct dns_sdlzimplementation { >+ const dns_sdlzmethods_t *methods; >+ isc_mem_t *mctx; >+ void *driverarg; >+ unsigned int flags; >+ isc_mutex_t driverlock; >+ dns_dlzimplementation_t *dlz_imp; >+}; >+ >+struct dns_sdlz_db { >+ /* Unlocked */ >+ dns_db_t common; >+ void *dbdata; >+ dns_sdlzimplementation_t *dlzimp; >+ isc_mutex_t refcnt_lock; >+ /* Locked */ >+ unsigned int references; >+}; >+ >+struct dns_sdlzlookup { >+ /* Unlocked */ >+ unsigned int magic; >+ dns_sdlz_db_t *sdlz; >+ ISC_LIST(dns_rdatalist_t) lists; >+ ISC_LIST(isc_buffer_t) buffers; >+ dns_name_t *name; >+ ISC_LINK(dns_sdlzlookup_t) link; >+ isc_mutex_t lock; >+ dns_rdatacallbacks_t callbacks; >+ /* Locked */ >+ unsigned int references; >+}; >+ >+typedef struct dns_sdlzlookup dns_sdlznode_t; >+ >+struct dns_sdlzallnodes { >+ dns_dbiterator_t common; >+ ISC_LIST(dns_sdlznode_t) nodelist; >+ dns_sdlznode_t *current; >+ dns_sdlznode_t *origin; >+}; >+ >+typedef dns_sdlzallnodes_t sdlz_dbiterator_t; >+ >+typedef struct sdlz_rdatasetiter { >+ dns_rdatasetiter_t common; >+ dns_rdatalist_t *current; >+} sdlz_rdatasetiter_t; >+ >+ >+#define SDLZDB_MAGIC ISC_MAGIC('D', 'L', 'Z', 'S') >+ >+/* >+ * Note that "impmagic" is not the first four bytes of the struct, so >+ * ISC_MAGIC_VALID cannot be used. >+ */ >+ >+#define VALID_SDLZDB(sdlzdb) ((sdlzdb) != NULL && \ >+ (sdlzdb)->common.impmagic == SDLZDB_MAGIC) >+ >+#define SDLZLOOKUP_MAGIC ISC_MAGIC('D','L','Z','L') >+#define VALID_SDLZLOOKUP(sdlzl) ISC_MAGIC_VALID(sdlzl, SDLZLOOKUP_MAGIC) >+#define VALID_SDLZNODE(sdlzn) VALID_SDLZLOOKUP(sdlzn) >+ >+/* These values are taken from RFC 1537 */ >+#define SDLZ_DEFAULT_REFRESH (60 * 60 * 8) >+#define SDLZ_DEFAULT_RETRY (60 * 60 * 2) >+#define SDLZ_DEFAULT_EXPIRE (60 * 60 * 24 * 7) >+#define SDLZ_DEFAULT_MINIMUM (60 * 60 * 24) >+ >+/* This is a reasonable value */ >+#define SDLZ_DEFAULT_TTL (60 * 60 * 24) >+ >+void dns_sdlz_tolower(char *str); >+ >+isc_result_t >+dns_sdlzcreateDBP(isc_mem_t *mctx, void *driverarg, void *dbdata, >+ dns_name_t *name, dns_rdataclass_t rdclass, dns_db_t **dbp); >+ >+isc_result_t >+dns_sdlzallowzonexfr(void *driverarg, void *dbdata, isc_mem_t *mctx, >+ dns_rdataclass_t rdclass, dns_name_t *name, >+ isc_sockaddr_t *clientaddr, dns_db_t **dbp); >+ >+isc_result_t >+dns_sdlzcreate(isc_mem_t *mctx, const char *dlzname, unsigned int argc, >+ char *argv[], void *driverarg, void **dbdata); >+ >+void >+dns_sdlzdestroy(void *driverdata, void **dbdata); >+ >+isc_result_t >+dns_sdlzfindzone(void *driverarg, void *dbdata, isc_mem_t *mctx, >+ dns_rdataclass_t rdclass, dns_name_t *name, dns_db_t **dbp); >+ >+static int dummy; >+ >+static isc_result_t findrdataset(dns_db_t *db, dns_dbnode_t *node, >+ dns_dbversion_t *version, >+ dns_rdatatype_t type, dns_rdatatype_t covers, >+ isc_stdtime_t now, dns_rdataset_t *rdataset, >+ dns_rdataset_t *sigrdataset); >+ >+static isc_result_t createnode(dns_sdlz_db_t *sdlz, dns_sdlznode_t **nodep); >+ >+static void destroynode(dns_sdlznode_t *node); >+ >+static void detachnode(dns_db_t *db, dns_dbnode_t **targetp); >+ >+ >+static void list_tordataset(dns_rdatalist_t *rdatalist, >+ dns_db_t *db, dns_dbnode_t *node, >+ dns_rdataset_t *rdataset); >+ >+static void dbiterator_destroy(dns_dbiterator_t **iteratorp); >+static isc_result_t dbiterator_first(dns_dbiterator_t *iterator); >+static isc_result_t dbiterator_last(dns_dbiterator_t *iterator); >+static isc_result_t dbiterator_seek(dns_dbiterator_t *iterator, >+ dns_name_t *name); >+static isc_result_t dbiterator_prev(dns_dbiterator_t *iterator); >+static isc_result_t dbiterator_next(dns_dbiterator_t *iterator); >+static isc_result_t dbiterator_current(dns_dbiterator_t *iterator, >+ dns_dbnode_t **nodep, >+ dns_name_t *name); >+static isc_result_t dbiterator_pause(dns_dbiterator_t *iterator); >+static isc_result_t dbiterator_origin(dns_dbiterator_t *iterator, >+ dns_name_t *name); >+ >+static dns_dbiteratormethods_t dbiterator_methods = { >+ dbiterator_destroy, >+ dbiterator_first, >+ dbiterator_last, >+ dbiterator_seek, >+ dbiterator_prev, >+ dbiterator_next, >+ dbiterator_current, >+ dbiterator_pause, >+ dbiterator_origin >+}; >+ >+static void rdatasetiter_destroy(dns_rdatasetiter_t **iteratorp); >+static isc_result_t rdatasetiter_first(dns_rdatasetiter_t *iterator); >+static isc_result_t rdatasetiter_next(dns_rdatasetiter_t *iterator); >+static void rdatasetiter_current(dns_rdatasetiter_t *iterator, >+ dns_rdataset_t *rdataset); >+ >+static dns_rdatasetitermethods_t rdatasetiter_methods = { >+ rdatasetiter_destroy, >+ rdatasetiter_first, >+ rdatasetiter_next, >+ rdatasetiter_current >+}; >+ >+#define MAYBE_LOCK(imp) \ >+ do { \ >+ unsigned int flags = imp->flags; \ >+ if((flags & DNS_SDLZFLAG_THREADSAFE) == 0) \ >+ LOCK(&imp->driverlock); \ >+ } while(0) >+ >+#define MAYBE_UNLOCK(imp) \ >+ do { \ >+ unsigned int flags = imp->flags; \ >+ if((flags & DNS_SDLZFLAG_THREADSAFE) == 0) \ >+ UNLOCK(&imp->driverlock); \ >+ } while(0) >+ >+/*** >+ *** Functions >+ ***/ >+ >+ /* Converts the input string to lowercase, in place. */ >+ >+void >+dns_sdlz_tolower(char *str) { >+ >+ unsigned int len = strlen(str); >+ unsigned int i; >+ >+ for(i = 0; i < len; i++){ >+ if(str[i] >= 'A' && str[i] <= 'Z') >+ str[i] += 32; >+ } >+ >+} >+ >+static inline unsigned int >+initial_size(const char *data) { >+/* unsigned int len = strlen(data); >+ unsigned int size; >+ for (size = 64; size < (64 * 1024); size *= 2) >+ if (len < size) >+ return (size); >+ return (64 * 1024); >+*/ >+ unsigned int len = (strlen(data) / 64) + 1; >+ return len * 64 + 64; >+} >+ >+isc_result_t >+dns_sdlz_putrr(dns_sdlzlookup_t *lookup, const char *type, dns_ttl_t ttl, >+ const char *data) >+{ >+ dns_rdatalist_t *rdatalist; >+ dns_rdata_t *rdata; >+ dns_rdatatype_t typeval; >+ isc_consttextregion_t r; >+ isc_buffer_t b; >+ isc_buffer_t *rdatabuf; >+ isc_lex_t *lex; >+ isc_result_t result; >+ unsigned int size; >+ isc_mem_t *mctx; >+ dns_name_t *origin; >+ >+ REQUIRE(VALID_SDLZLOOKUP(lookup)); >+ REQUIRE(type != NULL); >+ REQUIRE(data != NULL); >+ >+ mctx = lookup->sdlz->common.mctx; >+ >+ r.base = type; >+ r.length = strlen(type); >+ result = dns_rdatatype_fromtext(&typeval, (isc_textregion_t *)&r); >+ if (result != ISC_R_SUCCESS) >+ return (result); >+ >+ rdatalist = ISC_LIST_HEAD(lookup->lists); >+ while (rdatalist != NULL) { >+ if (rdatalist->type == typeval) >+ break; >+ rdatalist = ISC_LIST_NEXT(rdatalist, link); >+ } >+ >+ if (rdatalist == NULL) { >+ rdatalist = isc_mem_get(mctx, sizeof(dns_rdatalist_t)); >+ if (rdatalist == NULL) >+ return (ISC_R_NOMEMORY); >+ rdatalist->rdclass = lookup->sdlz->common.rdclass; >+ rdatalist->type = typeval; >+ rdatalist->covers = 0; >+ rdatalist->ttl = ttl; >+ ISC_LIST_INIT(rdatalist->rdata); >+ ISC_LINK_INIT(rdatalist, link); >+ ISC_LIST_APPEND(lookup->lists, rdatalist, link); >+ } else >+ if (rdatalist->ttl != ttl) >+ return (DNS_R_BADTTL); >+ >+ rdata = isc_mem_get(mctx, sizeof(dns_rdata_t)); >+ if (rdata == NULL) >+ return (ISC_R_NOMEMORY); >+ dns_rdata_init(rdata); >+ >+ if ((lookup->sdlz->dlzimp->flags & DNS_SDLZFLAG_RELATIVERDATA) != 0) >+ origin = &lookup->sdlz->common.origin; >+ else >+ origin = dns_rootname; >+ >+ lex = NULL; >+ result = isc_lex_create(mctx, 64, &lex); >+ if (result != ISC_R_SUCCESS) >+ goto failure; >+ >+ size = initial_size(data); >+ do { >+ isc_buffer_init(&b, data, strlen(data)); >+ isc_buffer_add(&b, strlen(data)); >+ >+ result = isc_lex_openbuffer(lex, &b); >+ if (result != ISC_R_SUCCESS) >+ goto failure; >+ >+ rdatabuf = NULL; >+ result = isc_buffer_allocate(mctx, &rdatabuf, size); >+ if (result != ISC_R_SUCCESS) >+ goto failure; >+ >+ result = dns_rdata_fromtext(rdata, rdatalist->rdclass, >+ rdatalist->type, lex, >+ origin, ISC_FALSE, >+ mctx, rdatabuf, >+ &lookup->callbacks); >+ if (result != ISC_R_SUCCESS) >+ isc_buffer_free(&rdatabuf); >+ size *= 2; >+ } while (result == ISC_R_NOSPACE); >+ >+ if (result != ISC_R_SUCCESS) >+ goto failure; >+ >+ ISC_LIST_APPEND(rdatalist->rdata, rdata, link); >+ ISC_LIST_APPEND(lookup->buffers, rdatabuf, link); >+ >+ if (lex != NULL) >+ isc_lex_destroy(&lex); >+ >+ return (ISC_R_SUCCESS); >+ >+ failure: >+ >+ if (rdatabuf != NULL) >+ isc_buffer_free(&rdatabuf); >+ if (lex != NULL) >+ isc_lex_destroy(&lex); >+ isc_mem_put(mctx, rdata, sizeof(dns_rdata_t)); >+ >+ return (result); >+} >+ >+isc_result_t >+dns_sdlz_putnamedrr(dns_sdlzallnodes_t *allnodes, const char *name, >+ const char *type, dns_ttl_t ttl, const char *data) >+{ >+ dns_name_t *newname, *origin; >+ dns_fixedname_t fnewname; >+ dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)allnodes->common.db; >+ dns_sdlznode_t *sdlznode; >+ isc_mem_t *mctx = sdlz->common.mctx; >+ isc_buffer_t b; >+ isc_result_t result; >+ >+ dns_fixedname_init(&fnewname); >+ newname = dns_fixedname_name(&fnewname); >+ >+ if ((sdlz->dlzimp->flags & DNS_SDLZFLAG_RELATIVERDATA) != 0) >+ origin = &sdlz->common.origin; >+ else >+ origin = dns_rootname; >+ isc_buffer_init(&b, name, strlen(name)); >+ isc_buffer_add(&b, strlen(name)); >+ >+ result = dns_name_fromtext(newname, &b, origin, ISC_FALSE, NULL); >+ if (result != ISC_R_SUCCESS) >+ return (result); >+ >+ if (allnodes->common.relative_names) { >+ /* All names are relative to the root */ >+ unsigned int nlabels = dns_name_countlabels(newname); >+ dns_name_getlabelsequence(newname, 0, nlabels - 1, newname); >+ } >+ >+ sdlznode = ISC_LIST_HEAD(allnodes->nodelist); >+ if (sdlznode == NULL || !dns_name_equal(sdlznode->name, newname)) { >+ sdlznode = NULL; >+ result = createnode(sdlz, &sdlznode); >+ if (result != ISC_R_SUCCESS) >+ return (result); >+ sdlznode->name = isc_mem_get(mctx, sizeof(dns_name_t)); >+ if (sdlznode->name == NULL) { >+ destroynode(sdlznode); >+ return (ISC_R_NOMEMORY); >+ } >+ dns_name_init(sdlznode->name, NULL); >+ result = dns_name_dup(newname, mctx, sdlznode->name); >+ if (result != ISC_R_SUCCESS) { >+ isc_mem_put(mctx, sdlznode->name, sizeof(dns_name_t)); >+ destroynode(sdlznode); >+ return (result); >+ } >+ ISC_LIST_PREPEND(allnodes->nodelist, sdlznode, link); >+ if (allnodes->origin == NULL && >+ dns_name_equal(newname, &sdlz->common.origin)) >+ allnodes->origin = sdlznode; >+ } >+ return (dns_sdlz_putrr(sdlznode, type, ttl, data)); >+ >+} >+ >+isc_result_t >+dns_sdlz_putsoa(dns_sdlzlookup_t *lookup, const char *mname, const char *rname, >+ isc_uint32_t serial) >+{ >+ char str[2 * DNS_NAME_MAXTEXT + 5 * (sizeof("2147483647")) + 7]; >+ int n; >+ >+ REQUIRE(mname != NULL); >+ REQUIRE(rname != NULL); >+ >+ n = snprintf(str, sizeof str, "%s %s %u %u %u %u %u", >+ mname, rname, serial, >+ SDLZ_DEFAULT_REFRESH, SDLZ_DEFAULT_RETRY, >+ SDLZ_DEFAULT_EXPIRE, SDLZ_DEFAULT_MINIMUM); >+ if (n >= (int)sizeof(str) || n < 0) >+ return (ISC_R_NOSPACE); >+ return (dns_sdlz_putrr(lookup, "SOA", SDLZ_DEFAULT_TTL, str)); >+} >+ >+/* >+ * DB routines. These methods were "borrowed" from the SDB driver interface. >+ * See the SDB driver interface documentation for more info. >+ */ >+ >+static void >+attach(dns_db_t *source, dns_db_t **targetp) { >+ dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *) source; >+ >+ REQUIRE(VALID_SDLZDB(sdlz)); >+ >+ LOCK(&sdlz->refcnt_lock); >+ REQUIRE(sdlz->references > 0); >+ sdlz->references++; >+ UNLOCK(&sdlz->refcnt_lock); >+ >+ *targetp = source; >+} >+ >+static void >+destroy(dns_sdlz_db_t *sdlz) { >+ isc_mem_t *mctx; >+ mctx = sdlz->common.mctx; >+ >+ sdlz->common.magic = 0; >+ sdlz->common.impmagic = 0; >+ >+ isc_mutex_destroy(&sdlz->refcnt_lock); >+ >+ dns_name_free(&sdlz->common.origin, mctx); >+ >+ isc_mem_put(mctx, sdlz, sizeof(dns_sdlz_db_t)); >+ isc_mem_detach(&mctx); >+} >+ >+static void >+detach(dns_db_t **dbp) { >+ dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)(*dbp); >+ isc_boolean_t need_destroy = ISC_FALSE; >+ >+ REQUIRE(VALID_SDLZDB(sdlz)); >+ LOCK(&sdlz->refcnt_lock); >+ REQUIRE(sdlz->references > 0); >+ sdlz->references--; >+ if (sdlz->references == 0) >+ need_destroy = ISC_TRUE; >+ UNLOCK(&sdlz->refcnt_lock); >+ >+ if (need_destroy) >+ destroy(sdlz); >+ >+ *dbp = NULL; >+} >+ >+static isc_result_t >+beginload(dns_db_t *db, dns_addrdatasetfunc_t *addp, dns_dbload_t **dbloadp) { >+ UNUSED(db); >+ UNUSED(addp); >+ UNUSED(dbloadp); >+ return (ISC_R_NOTIMPLEMENTED); >+} >+ >+static isc_result_t >+endload(dns_db_t *db, dns_dbload_t **dbloadp) { >+ UNUSED(db); >+ UNUSED(dbloadp); >+ return (ISC_R_NOTIMPLEMENTED); >+} >+ >+static isc_result_t >+dump(dns_db_t *db, dns_dbversion_t *version, const char *filename) { >+ UNUSED(db); >+ UNUSED(version); >+ UNUSED(filename); >+ return (ISC_R_NOTIMPLEMENTED); >+} >+ >+static void >+currentversion(dns_db_t *db, dns_dbversion_t **versionp) { >+ REQUIRE(versionp != NULL && *versionp == NULL); >+ >+ UNUSED(db); >+ >+ *versionp = (void *) &dummy; >+ return; >+} >+ >+static isc_result_t >+newversion(dns_db_t *db, dns_dbversion_t **versionp) { >+ UNUSED(db); >+ UNUSED(versionp); >+ >+ return (ISC_R_NOTIMPLEMENTED); >+} >+ >+static void >+attachversion(dns_db_t *db, dns_dbversion_t *source, >+ dns_dbversion_t **targetp) >+{ >+ REQUIRE(source != NULL && source == (void *) &dummy); >+ >+ UNUSED(db); >+ UNUSED(source); >+ UNUSED(targetp); >+ return; >+} >+ >+static void >+closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) { >+ REQUIRE(versionp != NULL && *versionp == (void *) &dummy); >+ REQUIRE(commit == ISC_FALSE); >+ >+ UNUSED(db); >+ UNUSED(commit); >+ >+ *versionp = NULL; >+} >+ >+static isc_result_t >+createnode(dns_sdlz_db_t *sdlz, dns_sdlznode_t **nodep) { >+ dns_sdlznode_t *node; >+ isc_result_t result; >+ >+ node = isc_mem_get(sdlz->common.mctx, sizeof(dns_sdlznode_t)); >+ if (node == NULL) >+ return (ISC_R_NOMEMORY); >+ >+ node->sdlz = NULL; >+ attach((dns_db_t *)sdlz, (dns_db_t **)&node->sdlz); >+ ISC_LIST_INIT(node->lists); >+ ISC_LIST_INIT(node->buffers); >+ ISC_LINK_INIT(node, link); >+ node->name = NULL; >+ result = isc_mutex_init(&node->lock); >+ if (result != ISC_R_SUCCESS) { >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "isc_mutex_init() failed: %s", >+ isc_result_totext(result)); >+ isc_mem_put(sdlz->common.mctx, node, sizeof(dns_sdlznode_t)); >+ return (ISC_R_UNEXPECTED); >+ } >+ dns_rdatacallbacks_init(&node->callbacks); >+ node->references = 1; >+ node->magic = SDLZLOOKUP_MAGIC; >+ >+ *nodep = node; >+ return (ISC_R_SUCCESS); >+} >+ >+static void >+destroynode(dns_sdlznode_t *node) { >+ dns_rdatalist_t *list; >+ dns_rdata_t *rdata; >+ isc_buffer_t *b; >+ dns_sdlz_db_t *sdlz; >+ isc_mem_t *mctx; >+ >+ sdlz = node->sdlz; >+ mctx = sdlz->common.mctx; >+ >+ while (!ISC_LIST_EMPTY(node->lists)) { >+ list = ISC_LIST_HEAD(node->lists); >+ while (!ISC_LIST_EMPTY(list->rdata)) { >+ rdata = ISC_LIST_HEAD(list->rdata); >+ ISC_LIST_UNLINK(list->rdata, rdata, link); >+ isc_mem_put(mctx, rdata, sizeof(dns_rdata_t)); >+ } >+ ISC_LIST_UNLINK(node->lists, list, link); >+ isc_mem_put(mctx, list, sizeof(dns_rdatalist_t)); >+ } >+ >+ while (!ISC_LIST_EMPTY(node->buffers)) { >+ b = ISC_LIST_HEAD(node->buffers); >+ ISC_LIST_UNLINK(node->buffers, b, link); >+ isc_buffer_free(&b); >+ } >+ >+ if (node->name != NULL) { >+ dns_name_free(node->name, mctx); >+ isc_mem_put(mctx, node->name, sizeof(dns_name_t)); >+ } >+ DESTROYLOCK(&node->lock); >+ node->magic = 0; >+ isc_mem_put(mctx, node, sizeof(dns_sdlznode_t)); >+ detach((dns_db_t **)&sdlz); >+} >+ >+static isc_result_t >+findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create, >+ dns_dbnode_t **nodep) >+{ >+ dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)db; >+ dns_sdlznode_t *node = NULL; >+ isc_result_t result; >+ isc_buffer_t b; >+ char namestr[DNS_NAME_MAXTEXT + 1]; >+ isc_buffer_t b2; >+ char zonestr[DNS_NAME_MAXTEXT + 1]; >+ isc_boolean_t isorigin; >+ >+ REQUIRE(VALID_SDLZDB(sdlz)); >+ REQUIRE(create == ISC_FALSE); >+ REQUIRE(nodep != NULL && *nodep == NULL); >+ >+ UNUSED(name); >+ UNUSED(create); >+ >+ isc_buffer_init(&b, namestr, sizeof(namestr)); >+ if ((sdlz->dlzimp->flags & DNS_SDLZFLAG_RELATIVEOWNER) != 0) { >+ dns_name_t relname; >+ unsigned int labels; >+ >+ labels = dns_name_countlabels(name) - >+ dns_name_countlabels(&db->origin); >+ dns_name_init(&relname, NULL); >+ dns_name_getlabelsequence(name, 0, labels, &relname); >+ result = dns_name_totext(&relname, ISC_TRUE, &b); >+ if (result != ISC_R_SUCCESS) >+ return (result); >+ } else { >+ result = dns_name_totext(name, ISC_TRUE, &b); >+ if (result != ISC_R_SUCCESS) >+ return (result); >+ } >+ isc_buffer_putuint8(&b, 0); >+ >+ isc_buffer_init(&b2, zonestr, sizeof(zonestr)); >+ result = dns_name_totext(&sdlz->common.origin, ISC_TRUE, &b2); >+ if (result != ISC_R_SUCCESS) >+ return (result); >+ isc_buffer_putuint8(&b2, 0); >+ >+ result = createnode(sdlz, &node); >+ if (result != ISC_R_SUCCESS) >+ return (result); >+ >+ isorigin = dns_name_equal(name, &sdlz->common.origin); >+ >+ // make sure strings are always lowercase >+ dns_sdlz_tolower(zonestr); >+ dns_sdlz_tolower(namestr); >+ >+ MAYBE_LOCK(sdlz->dlzimp); >+ >+ // try to lookup the host (namestr) >+ result = sdlz->dlzimp->methods->lookup(zonestr, namestr, >+ sdlz->dlzimp->driverarg, sdlz->dbdata, node); >+ >+ // if the host (namestr) was not found, try to lookup a "wildcard" host. >+ if(result != ISC_R_SUCCESS){ >+ result = sdlz->dlzimp->methods->lookup(zonestr, "*", >+ sdlz->dlzimp->driverarg, sdlz->dbdata, node); >+ } >+ >+ MAYBE_UNLOCK(sdlz->dlzimp); >+ >+ if (result != ISC_R_SUCCESS && !isorigin) { >+ destroynode(node); >+ return (result); >+ } >+ >+ if (isorigin && sdlz->dlzimp->methods->authority != NULL) { >+ MAYBE_LOCK(sdlz->dlzimp); >+ result = sdlz->dlzimp->methods->authority(zonestr, >+ sdlz->dlzimp->driverarg, sdlz->dbdata, node); >+ MAYBE_UNLOCK(sdlz->dlzimp); >+ if (result != ISC_R_SUCCESS && result != ISC_R_NOTIMPLEMENTED) { >+ destroynode(node); >+ return (result); >+ } >+ } >+ >+ *nodep = node; >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version, >+ dns_rdatatype_t type, unsigned int options, isc_stdtime_t now, >+ dns_dbnode_t **nodep, dns_name_t *foundname, >+ dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) >+{ >+ dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)db; >+ dns_dbnode_t *node = NULL; >+ dns_fixedname_t fname; >+ dns_rdataset_t xrdataset; >+ dns_name_t *xname; >+ unsigned int nlabels, olabels; >+ isc_result_t result; >+ unsigned int i; >+ >+ REQUIRE(VALID_SDLZDB(sdlz)); >+ REQUIRE(nodep == NULL || *nodep == NULL); >+ REQUIRE(version == NULL || version == (void *) &dummy); >+ >+ UNUSED(options); >+ UNUSED(sdlz); >+ >+ if (!dns_name_issubdomain(name, &db->origin)) >+ return (DNS_R_NXDOMAIN); >+ >+ olabels = dns_name_countlabels(&db->origin); >+ nlabels = dns_name_countlabels(name); >+ >+ dns_fixedname_init(&fname); >+ xname = dns_fixedname_name(&fname); >+ >+ if (rdataset == NULL) >+ rdataset = &xrdataset; >+ >+ result = DNS_R_NXDOMAIN; >+ >+ for (i = olabels; i <= nlabels; i++) { >+ /* >+ * Unless this is an explicit lookup at the origin, don't >+ * look at the origin. >+ */ >+ if (i == olabels && i != nlabels) >+ continue; >+ >+ /* >+ * Look up the next label. >+ */ >+ dns_name_getlabelsequence(name, nlabels - i, i, xname); >+ result = findnode(db, xname, ISC_FALSE, &node); >+ if (result != ISC_R_SUCCESS) { >+ result = DNS_R_NXDOMAIN; >+ continue; >+ } >+ >+ /* >+ * Look for a DNAME at the current label, unless this is >+ * the qname. >+ */ >+ if (i < nlabels) { >+ result = findrdataset(db, node, version, >+ dns_rdatatype_dname, >+ 0, now, rdataset, sigrdataset); >+ if (result == ISC_R_SUCCESS) { >+ result = DNS_R_DNAME; >+ break; >+ } >+ } >+ >+ /* >+ * Look for an NS at the current label, unless this is the >+ * origin or glue is ok. >+ */ >+ if (i != olabels && (options & DNS_DBFIND_GLUEOK) == 0) { >+ result = findrdataset(db, node, version, >+ dns_rdatatype_ns, >+ 0, now, rdataset, sigrdataset); >+ if (result == ISC_R_SUCCESS) { >+ if (i == nlabels && type == dns_rdatatype_any) >+ { >+ result = DNS_R_ZONECUT; >+ dns_rdataset_disassociate(rdataset); >+ if (sigrdataset != NULL) >+ dns_rdataset_disassociate >+ (sigrdataset); >+ } else >+ result = DNS_R_DELEGATION; >+ break; >+ } >+ } >+ >+ /* >+ * If the current name is not the qname, add another label >+ * and try again. >+ */ >+ if (i < nlabels) { >+ destroynode(node); >+ node = NULL; >+ continue; >+ } >+ >+ /* >+ * If we're looking for ANY, we're done. >+ */ >+ if (type == dns_rdatatype_any) { >+ result = ISC_R_SUCCESS; >+ break; >+ } >+ >+ /* >+ * Look for the qtype. >+ */ >+ result = findrdataset(db, node, version, type, >+ 0, now, rdataset, sigrdataset); >+ if (result == ISC_R_SUCCESS) >+ break; >+ >+ /* >+ * Look for a CNAME >+ */ >+ if (type != dns_rdatatype_cname) { >+ result = findrdataset(db, node, version, >+ dns_rdatatype_cname, >+ 0, now, rdataset, sigrdataset); >+ if (result == ISC_R_SUCCESS) { >+ result = DNS_R_CNAME; >+ break; >+ } >+ } >+ >+ result = DNS_R_NXRRSET; >+ break; >+ } >+ >+ if (rdataset == &xrdataset && dns_rdataset_isassociated(rdataset)) >+ dns_rdataset_disassociate(rdataset); >+ >+ if (foundname != NULL) { >+ isc_result_t xresult; >+ >+ xresult = dns_name_copy(xname, foundname, NULL); >+ if (xresult != ISC_R_SUCCESS) { >+ destroynode(node); >+ if (dns_rdataset_isassociated(rdataset)) >+ dns_rdataset_disassociate(rdataset); >+ return (DNS_R_BADDB); >+ } >+ } >+ >+ if (nodep != NULL) >+ *nodep = node; >+ else if (node != NULL) >+ detachnode(db, &node); >+ >+ return (result); >+} >+ >+static isc_result_t >+findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options, >+ isc_stdtime_t now, dns_dbnode_t **nodep, dns_name_t *foundname, >+ dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) >+{ >+ UNUSED(db); >+ UNUSED(name); >+ UNUSED(options); >+ UNUSED(now); >+ UNUSED(nodep); >+ UNUSED(foundname); >+ UNUSED(rdataset); >+ UNUSED(sigrdataset); >+ >+ return (ISC_R_NOTIMPLEMENTED); >+} >+ >+static void >+attachnode(dns_db_t *db, dns_dbnode_t *source, dns_dbnode_t **targetp) { >+ dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)db; >+ dns_sdlznode_t *node = (dns_sdlznode_t *)source; >+ >+ REQUIRE(VALID_SDLZDB(sdlz)); >+ >+ UNUSED(sdlz); >+ >+ LOCK(&node->lock); >+ INSIST(node->references > 0); >+ node->references++; >+ INSIST(node->references != 0); /* Catch overflow. */ >+ UNLOCK(&node->lock); >+ >+ *targetp = source; >+} >+ >+static void >+detachnode(dns_db_t *db, dns_dbnode_t **targetp) { >+ dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)db; >+ dns_sdlznode_t *node; >+ isc_boolean_t need_destroy = ISC_FALSE; >+ >+ REQUIRE(VALID_SDLZDB(sdlz)); >+ REQUIRE(targetp != NULL && *targetp != NULL); >+ >+ UNUSED(sdlz); >+ >+ node = (dns_sdlznode_t *)(*targetp); >+ >+ LOCK(&node->lock); >+ INSIST(node->references > 0); >+ node->references--; >+ if (node->references == 0) >+ need_destroy = ISC_TRUE; >+ UNLOCK(&node->lock); >+ >+ if (need_destroy) >+ destroynode(node); >+ >+ *targetp = NULL; >+} >+ >+static isc_result_t >+expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) { >+ UNUSED(db); >+ UNUSED(node); >+ UNUSED(now); >+ INSIST(0); >+ return (ISC_R_UNEXPECTED); >+} >+ >+static void >+printnode(dns_db_t *db, dns_dbnode_t *node, FILE *out) { >+ UNUSED(db); >+ UNUSED(node); >+ UNUSED(out); >+ return; >+} >+ >+static isc_result_t >+createiterator(dns_db_t *db, isc_boolean_t relative_names, >+ dns_dbiterator_t **iteratorp) >+{ >+ dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)db; >+ sdlz_dbiterator_t *sdlziter; >+ isc_result_t result; >+ isc_buffer_t b; >+ char zonestr[DNS_NAME_MAXTEXT + 1]; >+ >+ REQUIRE(VALID_SDLZDB(sdlz)); >+ >+ if (sdlz->dlzimp->methods->allnodes == NULL) >+ return (ISC_R_NOTIMPLEMENTED); >+ >+ isc_buffer_init(&b, zonestr, sizeof(zonestr)); >+ result = dns_name_totext(&sdlz->common.origin, ISC_TRUE, &b); >+ if (result != ISC_R_SUCCESS) >+ return (result); >+ isc_buffer_putuint8(&b, 0); >+ >+ sdlziter = isc_mem_get(sdlz->common.mctx, sizeof(sdlz_dbiterator_t)); >+ if (sdlziter == NULL) >+ return (ISC_R_NOMEMORY); >+ >+ sdlziter->common.methods = &dbiterator_methods; >+ sdlziter->common.db = NULL; >+ dns_db_attach(db, &sdlziter->common.db); >+ sdlziter->common.relative_names = relative_names; >+ sdlziter->common.magic = DNS_DBITERATOR_MAGIC; >+ ISC_LIST_INIT(sdlziter->nodelist); >+ sdlziter->current = NULL; >+ sdlziter->origin = NULL; >+ >+ // make sure strings are always lowercase >+ dns_sdlz_tolower(zonestr); >+ >+ MAYBE_LOCK(sdlz->dlzimp); >+ result = sdlz->dlzimp->methods->allnodes(zonestr, sdlz->dlzimp->driverarg, >+ sdlz->dbdata, sdlziter); >+ MAYBE_UNLOCK(sdlz->dlzimp); >+ if (result != ISC_R_SUCCESS) { >+ dbiterator_destroy((dns_dbiterator_t **)&sdlziter); >+ return (result); >+ } >+ >+ if (sdlziter->origin != NULL) { >+ ISC_LIST_UNLINK(sdlziter->nodelist, sdlziter->origin, link); >+ ISC_LIST_PREPEND(sdlziter->nodelist, sdlziter->origin, link); >+ } >+ >+ *iteratorp = (dns_dbiterator_t *)sdlziter; >+ >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, >+ dns_rdatatype_t type, dns_rdatatype_t covers, >+ isc_stdtime_t now, dns_rdataset_t *rdataset, >+ dns_rdataset_t *sigrdataset) >+{ >+ dns_rdatalist_t *list; >+ dns_sdlznode_t *sdlznode = (dns_sdlznode_t *)node; >+ >+ REQUIRE(VALID_SDLZNODE(node)); >+ >+ UNUSED(db); >+ UNUSED(version); >+ UNUSED(covers); >+ UNUSED(now); >+ UNUSED(sigrdataset); >+ >+ if (type == dns_rdatatype_sig) >+ return (ISC_R_NOTIMPLEMENTED); >+ >+ list = ISC_LIST_HEAD(sdlznode->lists); >+ while (list != NULL) { >+ if (list->type == type) >+ break; >+ list = ISC_LIST_NEXT(list, link); >+ } >+ if (list == NULL) >+ return (ISC_R_NOTFOUND); >+ >+ list_tordataset(list, db, node, rdataset); >+ >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, >+ isc_stdtime_t now, dns_rdatasetiter_t **iteratorp) >+{ >+ sdlz_rdatasetiter_t *iterator; >+ >+ REQUIRE(version == NULL || version == &dummy); >+ >+ UNUSED(version); >+ UNUSED(now); >+ >+ iterator = isc_mem_get(db->mctx, sizeof(sdlz_rdatasetiter_t)); >+ if (iterator == NULL) >+ return (ISC_R_NOMEMORY); >+ >+ iterator->common.magic = DNS_RDATASETITER_MAGIC; >+ iterator->common.methods = &rdatasetiter_methods; >+ iterator->common.db = db; >+ iterator->common.node = NULL; >+ attachnode(db, node, &iterator->common.node); >+ iterator->common.version = version; >+ iterator->common.now = now; >+ >+ *iteratorp = (dns_rdatasetiter_t *)iterator; >+ >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, >+ isc_stdtime_t now, dns_rdataset_t *rdataset, unsigned int options, >+ dns_rdataset_t *addedrdataset) >+{ >+ UNUSED(db); >+ UNUSED(node); >+ UNUSED(version); >+ UNUSED(now); >+ UNUSED(rdataset); >+ UNUSED(options); >+ UNUSED(addedrdataset); >+ >+ return (ISC_R_NOTIMPLEMENTED); >+} >+ >+static isc_result_t >+subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, >+ dns_rdataset_t *rdataset, unsigned int options, >+ dns_rdataset_t *newrdataset) >+{ >+ UNUSED(db); >+ UNUSED(node); >+ UNUSED(version); >+ UNUSED(rdataset); >+ UNUSED(options); >+ UNUSED(newrdataset); >+ >+ return (ISC_R_NOTIMPLEMENTED); >+} >+ >+static isc_result_t >+deleterdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, >+ dns_rdatatype_t type, dns_rdatatype_t covers) >+{ >+ UNUSED(db); >+ UNUSED(node); >+ UNUSED(version); >+ UNUSED(type); >+ UNUSED(covers); >+ >+ return (ISC_R_NOTIMPLEMENTED); >+} >+ >+static isc_boolean_t >+issecure(dns_db_t *db) { >+ UNUSED(db); >+ >+ return (ISC_FALSE); >+} >+ >+static unsigned int >+nodecount(dns_db_t *db) { >+ UNUSED(db); >+ >+ return (0); >+} >+ >+static isc_boolean_t >+ispersistent(dns_db_t *db) { >+ UNUSED(db); >+ return (ISC_TRUE); >+} >+ >+static void >+overmem(dns_db_t *db, isc_boolean_t overmem) { >+ UNUSED(db); >+ UNUSED(overmem); >+} >+ >+ >+static dns_dbmethods_t sdlzdb_methods = { >+ attach, >+ detach, >+ beginload, >+ endload, >+ dump, >+ currentversion, >+ newversion, >+ attachversion, >+ closeversion, >+ findnode, >+ find, >+ findzonecut, >+ attachnode, >+ detachnode, >+ expirenode, >+ printnode, >+ createiterator, >+ findrdataset, >+ allrdatasets, >+ addrdataset, >+ subtractrdataset, >+ deleterdataset, >+ issecure, >+ nodecount, >+ ispersistent, >+ overmem >+}; >+ >+ >+/* >+ * Rdataset Methods. These methods were "borrowed" from the SDB driver >+ * interface. See the SDB driver interface documentation for more info. >+ */ >+ >+static void >+disassociate(dns_rdataset_t *rdataset) { >+ dns_dbnode_t *node = rdataset->private5; >+ dns_sdlznode_t *sdlznode = (dns_sdlznode_t *) node; >+ dns_db_t *db = (dns_db_t *) sdlznode->sdlz; >+ >+ detachnode(db, &node); >+ isc__rdatalist_disassociate(rdataset); >+} >+ >+static void >+rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target) { >+ dns_dbnode_t *node = source->private5; >+ dns_sdlznode_t *sdlznode = (dns_sdlznode_t *) node; >+ dns_db_t *db = (dns_db_t *) sdlznode->sdlz; >+ dns_dbnode_t *tempdb = NULL; >+ >+ isc__rdatalist_clone(source, target); >+ attachnode(db, node, &tempdb); >+ source->private5 = tempdb; >+} >+ >+static dns_rdatasetmethods_t methods = { >+ disassociate, >+ isc__rdatalist_first, >+ isc__rdatalist_next, >+ isc__rdatalist_current, >+ rdataset_clone, >+ isc__rdatalist_count >+}; >+ >+static void >+list_tordataset(dns_rdatalist_t *rdatalist, >+ dns_db_t *db, dns_dbnode_t *node, >+ dns_rdataset_t *rdataset) >+{ >+ /* >+ * The sdlz rdataset is an rdatalist with some additions. >+ * - private1 & private2 are used by the rdatalist. >+ * - private3 & private 4 are unused. >+ * - private5 is the node. >+ */ >+ >+ /* This should never fail. */ >+ RUNTIME_CHECK(dns_rdatalist_tordataset(rdatalist, rdataset) == >+ ISC_R_SUCCESS); >+ >+ rdataset->methods = &methods; >+ dns_db_attachnode(db, node, &rdataset->private5); >+} >+ >+/* >+ * Database Iterator Methods. These methods were "borrowed" from the SDB >+ * driver interface. See the SDB driver interface documentation for more info. >+ */ >+static void >+dbiterator_destroy(dns_dbiterator_t **iteratorp) { >+ sdlz_dbiterator_t *sdlziter = (sdlz_dbiterator_t *)(*iteratorp); >+ dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)sdlziter->common.db; >+ >+ while (!ISC_LIST_EMPTY(sdlziter->nodelist)) { >+ dns_sdlznode_t *node; >+ node = ISC_LIST_HEAD(sdlziter->nodelist); >+ ISC_LIST_UNLINK(sdlziter->nodelist, node, link); >+ destroynode(node); >+ } >+ >+ dns_db_detach(&sdlziter->common.db); >+ isc_mem_put(sdlz->common.mctx, sdlziter, sizeof(sdlz_dbiterator_t)); >+ >+ *iteratorp = NULL; >+} >+ >+static isc_result_t >+dbiterator_first(dns_dbiterator_t *iterator) { >+ sdlz_dbiterator_t *sdlziter = (sdlz_dbiterator_t *)iterator; >+ >+ sdlziter->current = ISC_LIST_HEAD(sdlziter->nodelist); >+ if (sdlziter->current == NULL) >+ return (ISC_R_NOMORE); >+ else >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+dbiterator_last(dns_dbiterator_t *iterator) { >+ sdlz_dbiterator_t *sdlziter = (sdlz_dbiterator_t *)iterator; >+ >+ sdlziter->current = ISC_LIST_TAIL(sdlziter->nodelist); >+ if (sdlziter->current == NULL) >+ return (ISC_R_NOMORE); >+ else >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+dbiterator_seek(dns_dbiterator_t *iterator, dns_name_t *name) { >+ sdlz_dbiterator_t *sdlziter = (sdlz_dbiterator_t *)iterator; >+ >+ sdlziter->current = ISC_LIST_HEAD(sdlziter->nodelist); >+ while (sdlziter->current != NULL) >+ if (dns_name_equal(sdlziter->current->name, name)) >+ return (ISC_R_SUCCESS); >+ return (ISC_R_NOTFOUND); >+} >+ >+static isc_result_t >+dbiterator_prev(dns_dbiterator_t *iterator) { >+ sdlz_dbiterator_t *sdlziter = (sdlz_dbiterator_t *)iterator; >+ >+ sdlziter->current = ISC_LIST_PREV(sdlziter->current, link); >+ if (sdlziter->current == NULL) >+ return (ISC_R_NOMORE); >+ else >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+dbiterator_next(dns_dbiterator_t *iterator) { >+ sdlz_dbiterator_t *sdlziter = (sdlz_dbiterator_t *)iterator; >+ >+ sdlziter->current = ISC_LIST_NEXT(sdlziter->current, link); >+ if (sdlziter->current == NULL) >+ return (ISC_R_NOMORE); >+ else >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep, >+ dns_name_t *name) >+{ >+ sdlz_dbiterator_t *sdlziter = (sdlz_dbiterator_t *)iterator; >+ >+ attachnode(iterator->db, sdlziter->current, nodep); >+ if (name != NULL) >+ return (dns_name_copy(sdlziter->current->name, name, NULL)); >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+dbiterator_pause(dns_dbiterator_t *iterator) { >+ UNUSED(iterator); >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) { >+ UNUSED(iterator); >+ return (dns_name_copy(dns_rootname, name, NULL)); >+} >+ >+/* >+ * Rdataset Iterator Methods. These methods were "borrowed" from the SDB >+ * driver interface. See the SDB driver interface documentation for more info. >+ */ >+ >+static void >+rdatasetiter_destroy(dns_rdatasetiter_t **iteratorp) { >+ sdlz_rdatasetiter_t *sdlziterator = (sdlz_rdatasetiter_t *)(*iteratorp); >+ detachnode(sdlziterator->common.db, &sdlziterator->common.node); >+ isc_mem_put(sdlziterator->common.db->mctx, sdlziterator, >+ sizeof(sdlz_rdatasetiter_t)); >+ *iteratorp = NULL; >+} >+ >+static isc_result_t >+rdatasetiter_first(dns_rdatasetiter_t *iterator) { >+ sdlz_rdatasetiter_t *sdlziterator = (sdlz_rdatasetiter_t *)iterator; >+ dns_sdlznode_t *sdlznode = (dns_sdlznode_t *)iterator->node; >+ >+ if (ISC_LIST_EMPTY(sdlznode->lists)) >+ return (ISC_R_NOMORE); >+ sdlziterator->current = ISC_LIST_HEAD(sdlznode->lists); >+ return (ISC_R_SUCCESS); >+} >+ >+static isc_result_t >+rdatasetiter_next(dns_rdatasetiter_t *iterator) { >+ sdlz_rdatasetiter_t *sdlziterator = (sdlz_rdatasetiter_t *)iterator; >+ >+ sdlziterator->current = ISC_LIST_NEXT(sdlziterator->current, link); >+ if (sdlziterator->current == NULL) >+ return (ISC_R_NOMORE); >+ else >+ return (ISC_R_SUCCESS); >+} >+ >+static void >+rdatasetiter_current(dns_rdatasetiter_t *iterator, dns_rdataset_t *rdataset) { >+ sdlz_rdatasetiter_t *sdlziterator = (sdlz_rdatasetiter_t *)iterator; >+ >+ list_tordataset(sdlziterator->current, iterator->db, iterator->node, >+ rdataset); >+} >+ >+ >+/* >+ * SDLZ core methods. This is the core of the new DLZ functionality. >+ */ >+ >+/* >+ * Build a 'bind' database driver structure to be returned by >+ * either the find zone or the allow zone transfer method. >+ * This method is only available in this source file, it is >+ * not made available anywhere else. >+ */ >+ >+isc_result_t >+dns_sdlzcreateDBP(isc_mem_t *mctx, void *driverarg, void *dbdata, >+ dns_name_t *name, dns_rdataclass_t rdclass, dns_db_t **dbp) >+{ >+ >+ isc_result_t result; >+ dns_sdlz_db_t *sdlzdb; >+ dns_sdlzimplementation_t *imp; >+ >+ /* check that things are as we expect */ >+ REQUIRE(dbp != NULL && *dbp == NULL); >+ REQUIRE(name != NULL); >+ >+ imp = (dns_sdlzimplementation_t *) driverarg; >+ >+ /* allocate and zero memory for driver structure */ >+ sdlzdb = isc_mem_get(mctx, sizeof(dns_sdlz_db_t)); >+ if (sdlzdb == NULL) >+ return (ISC_R_NOMEMORY); >+ memset(sdlzdb, 0, sizeof(dns_sdlz_db_t)); >+ >+ /* initialize and set origin */ >+ dns_name_init(&sdlzdb->common.origin, NULL); >+ result = dns_name_dupwithoffsets(name, mctx, &sdlzdb->common.origin); >+ if (result != ISC_R_SUCCESS) >+ goto mem_cleanup; >+ >+ /* initialize the reference count mutex */ >+ result = isc_mutex_init(&sdlzdb->refcnt_lock); >+ if (result != ISC_R_SUCCESS) >+ goto name_cleanup; >+ >+ /* set the rest of the database structure attributes */ >+ sdlzdb->dlzimp = imp; >+ sdlzdb->common.methods = &sdlzdb_methods; >+ sdlzdb->common.attributes = 0; >+ sdlzdb->common.rdclass = rdclass; >+ sdlzdb->common.mctx = NULL; >+ sdlzdb->dbdata = dbdata; >+ sdlzdb->references = 1; >+ >+ /* attach to the memory context */ >+ isc_mem_attach(mctx, &sdlzdb->common.mctx); >+ >+ /* mark structure as valid */ >+ sdlzdb->common.magic = DNS_DB_MAGIC; >+ sdlzdb->common.impmagic = SDLZDB_MAGIC; >+ *dbp = (dns_db_t *) sdlzdb; >+ >+ return result; >+ >+ /* reference count mutex could not be initialized, clean up name memory */ >+name_cleanup: >+ dns_name_free(&sdlzdb->common.origin, mctx); >+mem_cleanup: >+ isc_mem_put(mctx, sdlzdb, sizeof(dns_sdlz_db_t)); >+ return result; >+} >+ >+isc_result_t >+dns_sdlzallowzonexfr(void *driverarg, void *dbdata, isc_mem_t *mctx, >+ dns_rdataclass_t rdclass, dns_name_t *name, >+ isc_sockaddr_t *clientaddr, dns_db_t **dbp) >+{ >+ >+ isc_buffer_t b; >+ isc_buffer_t b2; >+ char namestr[DNS_NAME_MAXTEXT + 1]; >+ char clientstr[(sizeof "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255") + 1]; >+ isc_netaddr_t netaddr; >+ isc_result_t result; >+ dns_sdlzimplementation_t *imp; >+ >+ /* Perform checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(driverarg != NULL); >+ REQUIRE(name != NULL); >+ REQUIRE(clientaddr != NULL); >+ REQUIRE(dbp != NULL && *dbp == NULL); >+ >+ imp = (dns_sdlzimplementation_t *) driverarg; >+ >+ /* Convert DNS name to ascii text */ >+ isc_buffer_init(&b, namestr, sizeof(namestr)); >+ result = dns_name_totext(name, ISC_TRUE, &b); >+ if (result != ISC_R_SUCCESS) >+ return result; >+ isc_buffer_putuint8(&b, 0); >+ >+ /* convert client address to ascii text */ >+ isc_buffer_init(&b2, clientstr, sizeof(clientstr)); >+ isc_netaddr_fromsockaddr(&netaddr, clientaddr); >+ result = isc_netaddr_totext(&netaddr, &b2); >+ if (result != ISC_R_SUCCESS) >+ return result; >+ isc_buffer_putuint8(&b2, 0); >+ >+ // make sure strings are always lowercase >+ dns_sdlz_tolower(namestr); >+ dns_sdlz_tolower(clientstr); >+ >+ /* Call SDLZ driver's find zone method */ >+ if(imp->methods->allowzonexfr != NULL){ >+ MAYBE_LOCK(imp); >+ result = imp->methods->allowzonexfr(imp->driverarg, dbdata, namestr, clientstr); >+ MAYBE_UNLOCK(imp); >+ /* if zone is supported and transfers allowed build a 'bind' database driver */ >+ if(result == ISC_R_SUCCESS) >+ result = dns_sdlzcreateDBP(mctx, driverarg, dbdata, name, rdclass, dbp); >+ return result; >+ } >+ >+ return ISC_R_NOTIMPLEMENTED; >+} >+ >+isc_result_t >+dns_sdlzcreate(isc_mem_t *mctx, const char *dlzname, unsigned int argc, >+ char *argv[], void *driverarg, void **dbdata) >+{ >+ dns_sdlzimplementation_t *imp; >+ isc_result_t result = ISC_R_NOTFOUND; >+ >+ /* Write debugging message to log */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Loading SDLZ driver."); >+ >+ /* Performs checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(driverarg != NULL); >+ REQUIRE(dlzname != NULL); >+ REQUIRE(dbdata != NULL); >+ UNUSED(mctx); >+ >+ imp = driverarg; >+ >+ /* If the create method exists, call it. */ >+ if(imp->methods->create != NULL){ >+ MAYBE_LOCK(imp); >+ result = imp->methods->create(dlzname, argc, argv, imp->driverarg, dbdata); >+ MAYBE_UNLOCK(imp); >+ } >+ >+ /* Write debugging message to log */ >+ if(result == ISC_R_SUCCESS){ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "SDLZ driver loaded successfully."); >+ } else { >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, >+ "SDLZ driver failed to load."); >+ } >+ >+ return result; >+} >+ >+void >+dns_sdlzdestroy(void *driverdata, void **dbdata) >+{ >+ >+ dns_sdlzimplementation_t *imp; >+ >+ /* Write debugging message to log */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unloading SDLZ driver."); >+ >+ imp = driverdata; >+ >+ /* If the destroy method exists, call it. */ >+ if(imp->methods->destroy != NULL){ >+ MAYBE_LOCK(imp); >+ imp->methods->destroy(imp->driverarg, dbdata); >+ MAYBE_UNLOCK(imp); >+ } >+} >+ >+isc_result_t >+dns_sdlzfindzone(void *driverarg, void *dbdata, isc_mem_t *mctx, >+ dns_rdataclass_t rdclass, dns_name_t *name, dns_db_t **dbp) >+{ >+ isc_buffer_t b; >+ char namestr[DNS_NAME_MAXTEXT + 1]; >+ isc_result_t result; >+ dns_sdlzimplementation_t *imp; >+ >+ /* Perform checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(driverarg != NULL); >+ REQUIRE(name != NULL); >+ REQUIRE(dbp != NULL && *dbp == NULL); >+ >+ imp = (dns_sdlzimplementation_t *) driverarg; >+ >+ /* Convert DNS name to ascii text */ >+ isc_buffer_init(&b, namestr, sizeof(namestr)); >+ result = dns_name_totext(name, ISC_TRUE, &b); >+ if (result != ISC_R_SUCCESS) >+ return result; >+ isc_buffer_putuint8(&b, 0); >+ >+ // make sure strings are always lowercase >+ dns_sdlz_tolower(namestr); >+ >+ /* Call SDLZ driver's find zone method */ >+ MAYBE_LOCK(imp); >+ result = imp->methods->findzone(imp->driverarg, dbdata, namestr); >+ MAYBE_UNLOCK(imp); >+ >+ /* if zone is supported build a 'bind' database driver structure to return */ >+ if(result == ISC_R_SUCCESS) >+ result = dns_sdlzcreateDBP(mctx, driverarg, dbdata, name, rdclass, dbp); >+ >+ return result; >+} >+ >+static dns_dlzmethods_t sdlzmethods = {dns_sdlzcreate, dns_sdlzdestroy, dns_sdlzfindzone, >+ dns_sdlzallowzonexfr}; >+ >+isc_result_t >+dns_sdlzregister(const char *drivername, const dns_sdlzmethods_t *methods, >+ void *driverarg, unsigned int flags, isc_mem_t *mctx, >+ dns_sdlzimplementation_t **sdlzimp) >+{ >+ >+ dns_sdlzimplementation_t *imp; >+ isc_result_t result; >+ >+ /* Performs checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(drivername != NULL); >+ REQUIRE(methods != NULL); >+ REQUIRE(methods->findzone != NULL); >+ REQUIRE(methods->lookup != NULL); >+ REQUIRE(mctx != NULL); >+ REQUIRE(sdlzimp != NULL && *sdlzimp == NULL); >+ REQUIRE((flags & ~(DNS_SDLZFLAG_RELATIVEOWNER | >+ DNS_SDLZFLAG_RELATIVERDATA | >+ DNS_SDLZFLAG_THREADSAFE)) == 0); >+ >+ /* Write debugging message to log */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Registering SDLZ driver '%s'", drivername); >+ >+ /* Allocate memory for a sdlz_implementation object. Error if we cannot. */ >+ imp = isc_mem_get(mctx, sizeof(dns_sdlzimplementation_t)); >+ if (imp == NULL) >+ return (ISC_R_NOMEMORY); >+ >+ /* Make sure memory region is set to all 0's */ >+ memset(imp, 0, sizeof(dns_sdlzimplementation_t)); >+ >+ /* Store the data passed into this method */ >+ imp->methods = methods; >+ imp->driverarg = driverarg; >+ imp->flags = flags; >+ imp->mctx = NULL; >+ >+ /* attach the new sdlz_implementation object to a memory context */ >+ isc_mem_attach(mctx, &imp->mctx); >+ >+ /* >+ * initialize the driver lock, error if we cannot >+ * (used if a driver does not support multiple threads) >+ */ >+ result = isc_mutex_init(&imp->driverlock); >+ if (result != ISC_R_SUCCESS) { >+ UNEXPECTED_ERROR(__FILE__, __LINE__, >+ "isc_mutex_init() failed: %s", >+ isc_result_totext(result)); >+ goto cleanup_mctx; >+ } >+ >+ imp->dlz_imp = NULL; >+ >+ /* >+ * register the DLZ driver. Pass in our "extra" sdlz information as >+ * a driverarg. (that's why we stored the passed in driver arg in our >+ * sdlz_implementation structure) Also, store the dlz_implementation >+ * structure in our sdlz_implementation. >+ */ >+ result = dns_dlzregister(drivername, &sdlzmethods, imp, mctx, >+ &imp->dlz_imp); >+ >+ /* if registration fails, cleanup and get outta here. */ >+ if (result != ISC_R_SUCCESS) >+ goto cleanup_mutex; >+ >+ *sdlzimp = imp; >+ >+ return (ISC_R_SUCCESS); >+ >+ cleanup_mutex: >+ /* destroy the driver lock, we don't need it anymore */ >+ DESTROYLOCK(&imp->driverlock); >+ >+ cleanup_mctx: >+ /* >+ * return the memory back to the available memory pool and remove it from >+ * the memory context. >+ */ >+ isc_mem_put(mctx, imp, sizeof(dns_sdlzimplementation_t)); >+ isc_mem_detach(&mctx); >+ return (result); >+} >+ >+void >+dns_sdlzunregister(dns_sdlzimplementation_t **sdlzimp) { >+ >+ dns_sdlzimplementation_t *imp; >+ isc_mem_t *mctx; >+ >+ /* Write debugging message to log */ >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), >+ "Unregistering SDLZ driver."); >+ >+ /* Performs checks to make sure data is as we expect / require it to be. */ >+ REQUIRE(sdlzimp != NULL && *sdlzimp != NULL); >+ >+ imp = *sdlzimp; >+ >+ /* Unregister the DLZ driver implementation */ >+ dns_dlzunregister(&imp->dlz_imp); >+ >+ /* destroy the driver lock, we don't need it anymore */ >+ DESTROYLOCK(&imp->driverlock); >+ >+ mctx = imp->mctx; >+ >+ /* >+ * return the memory back to the available memory pool and remove it from >+ * the memory context. >+ */ >+ isc_mem_put(mctx, imp, sizeof(dns_sdlzimplementation_t)); >+ isc_mem_detach(&mctx); >+ >+ *sdlzimp = NULL; >+} >+ >+#endif >+ >diff -Naur bind-9.2.2-orig/lib/dns/view.c bind-9.2.2/lib/dns/view.c >--- bind-9.2.2-orig/lib/dns/view.c Mon Aug 5 03:57:12 2002 >+++ bind-9.2.2/lib/dns/view.c Sun Apr 27 17:35:36 2003 >@@ -27,6 +27,9 @@ > #include <dns/adb.h> > #include <dns/cache.h> > #include <dns/db.h> >+#ifdef DLZ >+#include <dns/dlz.h> >+#endif > #include <dns/events.h> > #include <dns/forward.h> > #include <dns/keytable.h> >@@ -118,6 +121,9 @@ > > view->cache = NULL; > view->cachedb = NULL; >+#ifdef DLZ >+ view->dlzdatabase = NULL; >+#endif > view->hints = NULL; > view->resolver = NULL; > view->adb = NULL; >@@ -239,6 +245,10 @@ > isc_task_detach(&view->task); > if (view->hints != NULL) > dns_db_detach(&view->hints); >+#ifdef DLZ >+ if (view->dlzdatabase != NULL) >+ dns_dlzdestroy(&view->dlzdatabase); >+#endif > if (view->cachedb != NULL) > dns_db_detach(&view->cachedb); > if (view->cache != NULL) >diff -Naur bind-9.2.2-orig/lib/dns/win32/libdns.def bind-9.2.2/lib/dns/win32/libdns.def >--- bind-9.2.2-orig/lib/dns/win32/libdns.def Mon Jul 16 02:10:30 2001 >+++ bind-9.2.2/lib/dns/win32/libdns.def Sun Apr 27 17:45:59 2003 >@@ -715,3 +715,15 @@ > dst_lib_initmsgcat > dst_result_totext > dst_result_register >+dns_dlzregister >+dns_dlzunregister >+dns_dlzallowzonexfr >+dns_dlzcreate >+dns_dlzdestroy >+dns_dlzstrtoargv >+dns_dlzfindzone >+dns_sdlzregister >+dns_sdlzunregister >+dns_sdlz_putnamedrr >+dns_sdlz_putrr >+dns_sdlz_putsoa >\ No newline at end of file >diff -Naur bind-9.2.2-orig/lib/isc/unix/dir.c bind-9.2.2/lib/isc/unix/dir.c >--- bind-9.2.2-orig/lib/isc/unix/dir.c Fri Jun 8 20:50:32 2001 >+++ bind-9.2.2/lib/isc/unix/dir.c Sun Apr 27 17:46:49 2003 >@@ -56,10 +56,29 @@ > */ > isc_result_t > isc_dir_open(isc_dir_t *dir, const char *dirname) { >+ char *p; > isc_result_t result = ISC_R_SUCCESS; > > REQUIRE(VALID_DIR(dir)); > REQUIRE(dirname != NULL); >+ >+ /* >+ * Copy directory name. Need to have enough space for the name, >+ * a possible path separator, the wildcard, and the final NUL. >+ */ >+ if (strlen(dirname) + 3 > sizeof(dir->dirname)) >+ /* XXXDCL ? */ >+ return (ISC_R_NOSPACE); >+ strcpy(dir->dirname, dirname); >+ >+ /* >+ * Append path separator, if needed, and "*". >+ */ >+ p = dir->dirname + strlen(dir->dirname); >+ if (dir->dirname < p && *(p - 1) != '/') >+ *p++ = '/'; >+ *p++ = '*'; >+ *p++ = '\0'; > > /* > * Open stream. >diff -Naur bind-9.2.2-orig/lib/isccfg/Makefile.in bind-9.2.2/lib/isccfg/Makefile.in >--- bind-9.2.2-orig/lib/isccfg/Makefile.in Mon Jul 9 19:25:28 2001 >+++ bind-9.2.2/lib/isccfg/Makefile.in Sun Apr 27 17:36:16 2003 >@@ -27,7 +27,7 @@ > > CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} > >-CDEFINES = >+CDEFINES = @USE_DLZ@ > CWARNINGS = > > ISCLIBS = ../../lib/isc/libisc.@A@ >diff -Naur bind-9.2.2-orig/lib/isccfg/check.c bind-9.2.2/lib/isccfg/check.c >--- bind-9.2.2-orig/lib/isccfg/check.c Mon Apr 22 23:00:04 2002 >+++ bind-9.2.2/lib/isccfg/check.c Sun Apr 27 17:36:16 2003 >@@ -340,6 +340,36 @@ > return (result); > } > >+#ifdef DLZ >+static isc_result_t >+check_dynamically_loadable_zones_conf(cfg_obj_t *DLZconfig, isc_log_t *logctx) { >+ >+ isc_result_t result; >+ const char *DLZname; >+ cfg_obj_t *DLZoptions; >+ cfg_obj_t *obj; >+ >+ DLZname = cfg_obj_asstring(cfg_tuple_get(DLZconfig, "name")); >+ >+ DLZoptions = cfg_tuple_get(DLZconfig, "options"); >+ >+ obj = NULL; >+ result = cfg_map_get(DLZoptions, "database", &obj); >+ >+ if(obj == NULL){ >+ cfg_obj_log(DLZconfig, logctx, ISC_LOG_ERROR, >+ "dynamically loadable zones (DLZ) '%s': database not present", DLZname); >+ return(ISC_R_FAILURE); >+ }else if (strlen(cfg_obj_asstring(obj)) < 1) { >+ cfg_obj_log(DLZconfig, logctx, ISC_LOG_ERROR, >+ "dynamically loadable zones (DLZ) database command string is zero length."); >+ return(ISC_R_FAILURE); >+ } >+ return(ISC_R_SUCCESS); >+} >+ >+#endif >+ > isc_result_t > cfg_check_key(cfg_obj_t *key, isc_log_t *logctx) { > cfg_obj_t *algobj = NULL; >@@ -437,6 +467,9 @@ > cfg_obj_t *servers = NULL; > cfg_obj_t *zones = NULL; > cfg_obj_t *keys = NULL; >+#ifdef DLZ >+ cfg_obj_t *dynamically_loadable_zones = NULL; >+#endif > cfg_listelt_t *element; > isc_symtab_t *symtab = NULL; > isc_result_t result = ISC_R_SUCCESS; >@@ -467,6 +500,22 @@ > } > > isc_symtab_destroy(&symtab); >+ >+#ifdef DLZ >+ /* >+ * Check that all dynamically loadable zone statements are syntactically correct. >+ */ >+ >+ if (vconfig != NULL) >+ (void)cfg_map_get(vconfig, "dlz", &dynamically_loadable_zones); >+ else >+ (void)cfg_map_get(config, "dlz", &dynamically_loadable_zones); >+ >+ if(dynamically_loadable_zones != NULL) >+ if (check_dynamically_loadable_zones_conf(dynamically_loadable_zones, logctx) != ISC_R_SUCCESS) >+ return (ISC_R_FAILURE); >+ >+#endif > > /* > * Check that all key statements are syntactically correct and >diff -Naur bind-9.2.2-orig/lib/isccfg/parser.c bind-9.2.2/lib/isccfg/parser.c >--- bind-9.2.2-orig/lib/isccfg/parser.c Mon Feb 17 02:05:10 2003 >+++ bind-9.2.2/lib/isccfg/parser.c Sun Apr 27 17:36:18 2003 >@@ -448,6 +448,10 @@ > static cfg_type_t cfg_type_netprefix; > static cfg_type_t cfg_type_zone; > static cfg_type_t cfg_type_zoneopts; >+#ifdef DLZ >+static cfg_type_t cfg_type_dynamically_loadable_zones; >+static cfg_type_t cfg_type_dynamically_loadable_zones_opts; >+#endif > static cfg_type_t cfg_type_logging; > static cfg_type_t cfg_type_optional_facility; > static cfg_type_t cfg_type_void; >@@ -634,6 +638,20 @@ > static cfg_type_t cfg_type_zone = { > "zone", parse_tuple, print_tuple, &cfg_rep_tuple, zone_fields }; > >+#ifdef DLZ >+/* >+ * A dynamically loadable zones statement. >+ */ >+static cfg_tuplefielddef_t dynamically_loadable_zones_fields[] = { >+ { "name", &cfg_type_astring, 0 }, >+ { "options", &cfg_type_dynamically_loadable_zones_opts, 0 }, >+ { NULL, NULL, 0 } >+}; >+static cfg_type_t cfg_type_dynamically_loadable_zones = { >+ "dlz", parse_tuple, print_tuple, &cfg_rep_tuple, dynamically_loadable_zones_fields}; >+ >+#endif >+ > /* > * A "category" clause in the "logging" statement. > */ >@@ -798,6 +816,9 @@ > namedconf_or_view_clauses[] = { > { "key", &cfg_type_key, CFG_CLAUSEFLAG_MULTI }, > { "zone", &cfg_type_zone, CFG_CLAUSEFLAG_MULTI }, >+#ifdef DLZ >+ { "dlz", &cfg_type_dynamically_loadable_zones, 0 }, // only 1 DLZ per view allowed >+#endif > { "server", &cfg_type_server, CFG_CLAUSEFLAG_MULTI }, > #ifdef ISC_RFC2535 > { "trusted-keys", &cfg_type_trustedkeys, CFG_CLAUSEFLAG_MULTI }, >@@ -963,6 +984,18 @@ > { NULL, NULL, 0 } > }; > >+#ifdef DLZ >+ >+/* >+ * Clauses that can be found in a 'dynamically loadable zones' statement >+ */ >+static cfg_clausedef_t >+dynamically_loadable_zones_clauses[] = { >+ { "database", &cfg_type_astring, 0 }, >+ { NULL, NULL, 0 } >+}; >+ >+#endif > > /* The top-level named.conf syntax. */ > >@@ -998,6 +1031,9 @@ > namedconf_or_view_clauses, > view_clauses, > zone_clauses, >+#ifdef DLZ >+ dynamically_loadable_zones_clauses, >+#endif > NULL > }; > static cfg_type_t cfg_type_viewopts = { >@@ -1013,6 +1049,19 @@ > }; > static cfg_type_t cfg_type_zoneopts = { > "zoneopts", parse_map, print_map, &cfg_rep_map, zone_clausesets }; >+ >+#ifdef DLZ >+/* The "dynamically loadable zones" statement syntax. */ >+ >+static cfg_clausedef_t * >+dynamically_loadable_zones_clausesets[] = { >+ dynamically_loadable_zones_clauses, >+ NULL >+}; >+static cfg_type_t cfg_type_dynamically_loadable_zones_opts = { >+ "dynamically_loadable_zones_opts", parse_map, print_map, &cfg_rep_map, dynamically_loadable_zones_clausesets }; >+ >+#endif > > /* > * Clauses that can be found within the 'key' statement.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45254
:
27715
| 28062