]> git.sur5r.net Git - openldap/commitdiff
Changes from HEAD for beta
authorKurt Zeilenga <kurt@openldap.org>
Thu, 18 Sep 2003 17:43:21 +0000 (17:43 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 18 Sep 2003 17:43:21 +0000 (17:43 +0000)
339 files changed:
acconfig.h
build/openldap.m4
build/version.var
clients/tools/common.c
clients/tools/common.h
clients/tools/ldapcompare.c
clients/tools/ldapdelete.c
clients/tools/ldapmodify.c
clients/tools/ldapmodrdn.c
clients/tools/ldappasswd.c
clients/tools/ldapsearch.c
clients/tools/ldapwhoami.c
configure
configure.in
contrib/ldapc++/Makefile.am
contrib/ldapc++/Makefile.in
contrib/ldapc++/aclocal.m4
contrib/ldapc++/configure
contrib/ldapc++/configure.in
contrib/ldapc++/depcomp [new file with mode: 0755]
contrib/ldapc++/examples/Makefile.am [new file with mode: 0644]
contrib/ldapc++/examples/Makefile.in [new file with mode: 0644]
contrib/ldapc++/examples/main.cpp [new file with mode: 0644]
contrib/ldapc++/src/LDAPAddRequest.cpp
contrib/ldapc++/src/LDAPAsynConnection.cpp
contrib/ldapc++/src/LDAPAsynConnection.h
contrib/ldapc++/src/LDAPAttrType.cpp [new file with mode: 0644]
contrib/ldapc++/src/LDAPAttrType.h [new file with mode: 0644]
contrib/ldapc++/src/LDAPConnection.cpp
contrib/ldapc++/src/LDAPConnection.h
contrib/ldapc++/src/LDAPDeleteRequest.cpp
contrib/ldapc++/src/LDAPModDNRequest.cpp
contrib/ldapc++/src/LDAPModifyRequest.cpp
contrib/ldapc++/src/LDAPObjClass.cpp [new file with mode: 0644]
contrib/ldapc++/src/LDAPObjClass.h [new file with mode: 0644]
contrib/ldapc++/src/LDAPSchema.cpp [new file with mode: 0644]
contrib/ldapc++/src/LDAPSchema.h [new file with mode: 0644]
contrib/ldapc++/src/Makefile.am
contrib/ldapc++/src/Makefile.in
contrib/ldapc++/src/config.h.in
contrib/ldapc++/src/main.cpp [deleted file]
contrib/ldapsasl/ldapdb.c
doc/devel/todo
doc/man/man1/ldapcompare.1
doc/man/man1/ldapdelete.1
doc/man/man1/ldapmodify.1
doc/man/man1/ldapmodrdn.1
doc/man/man1/ldappasswd.1
doc/man/man1/ldapsearch.1
doc/man/man1/ldapwhoami.1
doc/man/man3/lber-decode.3
doc/man/man3/lber-encode.3
doc/man/man3/lber-memory.3
doc/man/man3/lber-types.3
doc/man/man3/ldap.3
doc/man/man3/ldap_abandon.3
doc/man/man3/ldap_add.3
doc/man/man3/ldap_bind.3
doc/man/man3/ldap_compare.3
doc/man/man3/ldap_delete.3
doc/man/man3/ldap_error.3
doc/man/man3/ldap_first_attribute.3
doc/man/man3/ldap_first_entry.3
doc/man/man3/ldap_first_message.3
doc/man/man3/ldap_first_reference.3
doc/man/man3/ldap_get_dn.3
doc/man/man3/ldap_get_values.3
doc/man/man3/ldap_modify.3
doc/man/man3/ldap_modrdn.3
doc/man/man3/ldap_open.3
doc/man/man3/ldap_parse_reference.3
doc/man/man3/ldap_parse_result.3
doc/man/man3/ldap_result.3
doc/man/man3/ldap_schema.3
doc/man/man3/ldap_search.3
doc/man/man3/ldap_sort.3
doc/man/man5/ldap.conf.5
doc/man/man5/ldif.5
doc/man/man5/slapd-bdb.5
doc/man/man5/slapd-ldbm.5
doc/man/man5/slapd-meta.5
doc/man/man5/slapd-monitor.5
doc/man/man5/slapd-shell.5
doc/man/man5/slapd.conf.5
doc/man/man5/slapd.replog.5
doc/man/man8/slapadd.8
doc/man/man8/slapcat.8
doc/man/man8/slapd.8
doc/man/man8/slapindex.8
doc/man/man8/slurpd.8
include/ac/localize.h
include/lber.h
include/ldap.h
include/ldap_defaults.h
include/ldap_log.h
include/ldap_queue.h
include/portable.h.in
include/portable.nt
include/slapi-plugin.h
libraries/liblber/bprint.c
libraries/liblber/debug.c
libraries/liblber/decode.c
libraries/liblber/encode.c
libraries/liblber/etest.c
libraries/liblber/io.c
libraries/liblber/memory.c
libraries/liblber/nt_err.c
libraries/liblber/options.c
libraries/liblber/sockbuf.c
libraries/liblber/stdio.c
libraries/libldap/abandon.c
libraries/libldap/add.c
libraries/libldap/bind.c
libraries/libldap/compare.c
libraries/libldap/controls.c
libraries/libldap/cyrus.c
libraries/libldap/delete.c
libraries/libldap/error.c
libraries/libldap/extended.c
libraries/libldap/filter.c
libraries/libldap/kbind.c
libraries/libldap/ldap-int.h
libraries/libldap/modify.c
libraries/libldap/modrdn.c
libraries/libldap/os-ip.c
libraries/libldap/os-local.c
libraries/libldap/passwd.c
libraries/libldap/result.c
libraries/libldap/sasl.c
libraries/libldap/sbind.c
libraries/libldap/search.c
libraries/libldap/sortctrl.c
libraries/libldap/unbind.c
libraries/libldap/utf-8.c
libraries/libldap/vlvctrl.c
libraries/liblunicode/ucdata/ucdata.c
libraries/liblunicode/ucstr.c
libraries/liblutil/getopt.c
libraries/liblutil/passwd.c
libraries/liblutil/uuid.c
servers/slapd/Makefile.in
servers/slapd/acl.c
servers/slapd/aclparse.c
servers/slapd/add.c
servers/slapd/attr.c
servers/slapd/back-bdb/Makefile.in
servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/back-bdb.h
servers/slapd/back-bdb/cache.c
servers/slapd/back-bdb/compare.c
servers/slapd/back-bdb/ctxcsn.c [new file with mode: 0644]
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/dn2entry.c
servers/slapd/back-bdb/dn2id.c
servers/slapd/back-bdb/external.h
servers/slapd/back-bdb/filterindex.c
servers/slapd/back-bdb/index.c
servers/slapd/back-bdb/init.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-bdb/modrdn.c
servers/slapd/back-bdb/passwd.c
servers/slapd/back-bdb/proto-bdb.h
servers/slapd/back-bdb/search.c
servers/slapd/back-bdb/tools.c
servers/slapd/back-bdb/trans.c [new file with mode: 0644]
servers/slapd/back-dnssrv/init.c
servers/slapd/back-hdb/Makefile.in
servers/slapd/back-ldap/Makefile.in
servers/slapd/back-ldap/back-ldap.h
servers/slapd/back-ldap/bind.c
servers/slapd/back-ldap/chain.c [new file with mode: 0644]
servers/slapd/back-ldap/init.c
servers/slapd/back-ldbm/add.c
servers/slapd/back-ldbm/back-ldbm.h
servers/slapd/back-ldbm/bind.c
servers/slapd/back-ldbm/cache.c
servers/slapd/back-ldbm/delete.c
servers/slapd/back-ldbm/dn2id.c
servers/slapd/back-ldbm/entry.c
servers/slapd/back-ldbm/init.c
servers/slapd/back-ldbm/modify.c
servers/slapd/back-ldbm/modrdn.c
servers/slapd/back-ldbm/passwd.c
servers/slapd/back-ldbm/search.c
servers/slapd/back-meta/back-meta.h
servers/slapd/back-meta/bind.c
servers/slapd/back-meta/cache-config.c
servers/slapd/back-meta/cache-merge.c
servers/slapd/back-meta/cache-query.c
servers/slapd/back-meta/cache-remove.c
servers/slapd/back-meta/cache-search.c
servers/slapd/back-meta/cache-substring.c
servers/slapd/back-meta/cache-template.c
servers/slapd/back-meta/cache.h
servers/slapd/back-meta/config.c
servers/slapd/back-meta/init.c
servers/slapd/back-meta/search.c
servers/slapd/back-monitor/init.c
servers/slapd/back-passwd/init.c
servers/slapd/back-perl/add.c
servers/slapd/back-perl/asperl_undefs.h
servers/slapd/back-perl/bind.c
servers/slapd/back-perl/close.c
servers/slapd/back-perl/compare.c
servers/slapd/back-perl/config.c
servers/slapd/back-perl/delete.c
servers/slapd/back-perl/init.c
servers/slapd/back-perl/modify.c
servers/slapd/back-perl/modrdn.c
servers/slapd/back-perl/search.c
servers/slapd/back-shell/Makefile.in
servers/slapd/back-shell/abandon.c [deleted file]
servers/slapd/back-shell/add.c
servers/slapd/back-shell/bind.c
servers/slapd/back-shell/compare.c
servers/slapd/back-shell/config.c
servers/slapd/back-shell/delete.c
servers/slapd/back-shell/external.h
servers/slapd/back-shell/init.c
servers/slapd/back-shell/modify.c
servers/slapd/back-shell/modrdn.c
servers/slapd/back-shell/search.c
servers/slapd/back-shell/shell.h
servers/slapd/back-shell/unbind.c
servers/slapd/back-sql/init.c
servers/slapd/back-sql/search.c
servers/slapd/backend.c
servers/slapd/backglue.c
servers/slapd/backover.c [new file with mode: 0644]
servers/slapd/bind.c
servers/slapd/cancel.c
servers/slapd/config.c
servers/slapd/connection.c
servers/slapd/controls.c
servers/slapd/ctxcsn.c [new file with mode: 0644]
servers/slapd/daemon.c
servers/slapd/delete.c
servers/slapd/dn.c
servers/slapd/extended.c
servers/slapd/globals.c
servers/slapd/init.c
servers/slapd/main.c
servers/slapd/matchedValues.c
servers/slapd/modify.c
servers/slapd/modrdn.c
servers/slapd/mods.c
servers/slapd/module.c
servers/slapd/operation.c
servers/slapd/passwd.c
servers/slapd/proto-slap.h
servers/slapd/repl.c
servers/slapd/result.c
servers/slapd/root_dse.c
servers/slapd/sasl.c
servers/slapd/saslauthz.c
servers/slapd/schema_check.c
servers/slapd/schema_init.c
servers/slapd/schema_prep.c
servers/slapd/schemaparse.c
servers/slapd/search.c
servers/slapd/slap.h
servers/slapd/slapi/Makefile.in
servers/slapd/slapi/plugin.c
servers/slapd/slapi/proto-slapi.h
servers/slapd/slapi/slapi.h
servers/slapd/slapi/slapi_ext.c [new file with mode: 0644]
servers/slapd/slapi/slapi_ops.c
servers/slapd/slapi/slapi_pblock.c
servers/slapd/slapi/slapi_utils.c
servers/slapd/syncrepl.c
servers/slapd/tools/Makefile.in
servers/slapd/tools/mimic.c
servers/slapd/tools/slapadd.c
servers/slapd/tools/slapcat.c
servers/slapd/tools/slapcommon.c
servers/slapd/tools/slapcommon.h
servers/slapd/tools/slappasswd.c
servers/slurpd/config.c
servers/slurpd/ldap_op.c
servers/slurpd/ri.c
servers/slurpd/slurp.h
tests/Makefile.in
tests/data/acl.out.master
tests/data/modify.out.master
tests/data/modrdn.out.master
tests/data/modrdn.out.master.0
tests/data/search.out.master
tests/data/search.out.xsearch
tests/data/slapd-acl.conf
tests/data/slapd-cache-master.conf [new file with mode: 0644]
tests/data/slapd-glue.conf
tests/data/slapd-master.conf
tests/data/slapd-passwd.conf
tests/data/slapd-proxycache.conf [new file with mode: 0644]
tests/data/slapd-pw.conf
tests/data/slapd-ref-slave.conf
tests/data/slapd-referrals.conf
tests/data/slapd-repl-master.conf
tests/data/slapd-repl-slave.conf
tests/data/slapd-repl-submaster.conf
tests/data/slapd-repl-subslave.conf
tests/data/slapd-syncrepl-master.conf
tests/data/slapd-syncrepl-slave-persist.conf [deleted file]
tests/data/slapd-syncrepl-slave-persist1.conf [new file with mode: 0644]
tests/data/slapd-syncrepl-slave-persist2.conf [new file with mode: 0644]
tests/data/slapd-syncrepl-slave-persist3.conf [new file with mode: 0644]
tests/data/slapd-syncrepl-slave-refresh.conf [deleted file]
tests/data/slapd-syncrepl-slave-refresh1.conf [new file with mode: 0644]
tests/data/slapd-syncrepl-slave-refresh2.conf [new file with mode: 0644]
tests/data/slapd.conf
tests/data/test-glued.ldif
tests/data/test-ordered-nocp.ldif
tests/data/test-ordered.ldif
tests/data/test.ldif
tests/scripts/all
tests/scripts/args.sh
tests/scripts/conf.sh
tests/scripts/defines.sh
tests/scripts/test000-rootdse
tests/scripts/test001-slapadd
tests/scripts/test002-populate
tests/scripts/test003-search
tests/scripts/test004-modify
tests/scripts/test005-modrdn
tests/scripts/test006-acls
tests/scripts/test007-replication
tests/scripts/test008-concurrency
tests/scripts/test009-referral
tests/scripts/test010-passwd
tests/scripts/test011-subtree-repl
tests/scripts/test012-glue
tests/scripts/test013-language
tests/scripts/test014-whoami
tests/scripts/test015-xsearch
tests/scripts/test016-subref
tests/scripts/test017-syncreplication-refresh
tests/scripts/test018-syncreplication-persist
tests/scripts/test019-proxycaching [new file with mode: 0755]
tests/scripts/test020-syncreplication-cascading [new file with mode: 0755]

index 8137f1096a0102cda8b3bcf8f312d73e2c846f79..aaeacdc7da30e9692da1c7e257bf4502eeecbf2d 100644 (file)
@@ -95,9 +95,6 @@
 #if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
 #define LDAP_TEST
 #endif
-#if defined(LDAP_TEST) && !defined(LDAP_DEBUG)
-#define LDAP_DEBUG
-#endif
 #endif
 
 #ifdef HAVE_EBCDIC 
index 26b2458e2142d6f8544f732ca0e547c586ae010e..7b919f535bbaaa59903ca1cf2f06ebd0099ae0a1 100644 (file)
@@ -1206,9 +1206,7 @@ AC_DEFUN([OL_SASL_COMPAT],
 #endif
 
 /* require 2.1.3 or later */
-#if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
-       char *__sasl_compat = "1.5.x okay";
-#elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
+#if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
        __sasl_compat "2.2+ or better okay (we guess)";
 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
        && SASL_VERSION_STEP >=3
index 697fa7212c06a568d38fe10d736d35191c9ca690..c048c53cc597453e5975630e4f8c5df2c545db5a 100644 (file)
@@ -7,7 +7,7 @@
 ol_package=OpenLDAP
 ol_major=2
 ol_minor=2
-ol_patch=0alpha
+ol_patch=X
 ol_api_inc=20200
 ol_api_lib=2:200:0
 ol_release_date="05/31/2003"
index c301ee618d024859d70cdb5b887140483e85c1f2..1266f3010f6352e61bb4d0002b4fd0661aad6ff8 100644 (file)
@@ -18,6 +18,8 @@
 #include <ldap.h>
 
 #include "lutil_ldap.h"
+#include "ldap_defaults.h"
+#include "ldap_pvt.h"
 
 #include "common.h"
 
@@ -40,9 +42,15 @@ char *sasl_secprops = NULL;
 #endif
 int   use_tls = 0;
 
+int      assertctl;
+char *assertion = NULL;
 char *authzid = NULL;
 int   manageDSAit = 0;
 int   noop = 0;
+int   preread = 0;
+char *preread_attrs = NULL;
+int   postread = 0;
+char *postread_attrs = NULL;
 
 int   not = 0;
 int   want_bindpw = 0;
@@ -59,9 +67,9 @@ char *prog = NULL;
 void
 tool_init( void )
 {
-       setlocale(LC_MESSAGES,"");
-       bindtextdomain(OPENLDAP_PACKAGE, LDAP_LOCALEDIR);
-       textdomain(OPENLDAP_PACKAGE);
+       ldap_pvt_setlocale(LC_MESSAGES, "");
+       ldap_pvt_bindtextdomain(OPENLDAP_PACKAGE, LDAP_LOCALEDIR);
+       ldap_pvt_textdomain(OPENLDAP_PACKAGE);
 }
 
 void
@@ -73,9 +81,12 @@ N_("  -C         chase referrals\n"),
 N_("  -d level   set LDAP debugging level to `level'\n"),
 N_("  -D binddn  bind DN\n"),
 N_("  -e [!]<ctrl>[=<ctrlparam>] general controls (! indicates criticality)\n")
-N_("             [!]authzid=<authzid> (\"dn:<dn>\" or \"u:<user>\")\n")
-N_("             [!]manageDSAit       (alternate form, see -M)\n")
+N_("             [!]assert=<filter>     (an RFC 2254 Filter)\n")
+N_("             [!]authzid=<authzid>   (\"dn:<dn>\" or \"u:<user>\")\n")
+N_("             [!]manageDSAit\n")
 N_("             [!]noop\n"),
+N_("             [!]postread[=<attrs>]  (a comma-separated attribute list)\n"),
+N_("             [!]preread[=<attrs>]   (a comma-separated attribute list)\n"),
 N_("  -f file    read operations from `file'\n"),
 N_("  -h host    LDAP server\n"),
 N_("  -H URI     LDAP Uniform Resource Indentifier(s)\n"),
@@ -154,7 +165,22 @@ tool_args( int argc, char **argv )
                                *cvalue++ = '\0';
                        }
 
-                       if ( strcasecmp( control, "authzid" ) == 0 ) {
+                       if ( strcasecmp( control, "assert" ) == 0 ) {
+                               if( assertctl ) {
+                                       fprintf( stderr, "assert control previously specified\n");
+                                       exit( EXIT_FAILURE );
+                               }
+                               if( cvalue == NULL ) {
+                                       fprintf( stderr, "assert: control value expected\n" );
+                                       usage();
+                               }
+
+                               assertctl = 1 + crit;
+
+                               assert( assertion == NULL );
+                               assertion = cvalue;
+
+                       } else if ( strcasecmp( control, "authzid" ) == 0 ) {
                                if( authzid != NULL ) {
                                        fprintf( stderr, "authzid control previously specified\n");
                                        exit( EXIT_FAILURE );
@@ -197,6 +223,24 @@ tool_args( int argc, char **argv )
 
                                noop = 1 + crit;
 
+                       } else if ( strcasecmp( control, "preread" ) == 0 ) {
+                               if( preread ) {
+                                       fprintf( stderr, "preread control previously specified\n");
+                                       exit( EXIT_FAILURE );
+                               }
+
+                               preread = 1 + crit;
+                               preread_attrs = cvalue;
+
+                       } else if ( strcasecmp( control, "postread" ) == 0 ) {
+                               if( postread ) {
+                                       fprintf( stderr, "postread control previously specified\n");
+                                       exit( EXIT_FAILURE );
+                               }
+
+                               postread = 1 + crit;
+                               postread_attrs = cvalue;
+
                        } else {
                                fprintf( stderr, "Invalid general control name: %s\n",
                                        control );
@@ -709,7 +753,7 @@ void
 tool_server_controls( LDAP *ld, LDAPControl *extra_c, int count )
 {
        int i = 0, j, crit = 0, err;
-       LDAPControl c[3], **ctrls;
+       LDAPControl c[6], **ctrls;
 
        ctrls = (LDAPControl**) malloc(sizeof(c) + (count+1)*sizeof(LDAPControl*));
        if ( ctrls == NULL ) {
@@ -717,6 +761,35 @@ tool_server_controls( LDAP *ld, LDAPControl *extra_c, int count )
                exit( EXIT_FAILURE );
        }
 
+       if ( assertctl ) {
+               char berbuf[LBER_ELEMENT_SIZEOF];
+               BerElement *ber = (BerElement *)berbuf;
+               
+               if( assertion == NULL || *assertion == '\0' ) {
+                       fprintf( stderr, "Assertion=<empty>\n" );
+                       exit( EXIT_FAILURE );
+               }
+
+               ber_init2( ber, NULL, LBER_USE_DER );
+
+               err = ldap_pvt_put_filter( ber, assertion );
+               if( err < 0 ) {
+                       fprintf( stderr, "assertion encode failed (%d)\n", err );
+                       exit( EXIT_FAILURE );
+               }
+
+               err = ber_flatten2( ber, &c[i].ldctl_value, 0 );
+               if( err < 0 ) {
+                       fprintf( stderr, "assertion flatten failed (%d)\n", err );
+                       exit( EXIT_FAILURE );
+               }
+
+               c[i].ldctl_oid = LDAP_CONTROL_ASSERT;
+               c[i].ldctl_iscritical = assertctl > 1;
+               ctrls[i] = &c[i];
+               i++;
+       }
+
        if ( authzid ) {
                c[i].ldctl_oid = LDAP_CONTROL_PROXY_AUTHZ;
                c[i].ldctl_value.bv_val = authzid;
@@ -744,6 +817,66 @@ tool_server_controls( LDAP *ld, LDAPControl *extra_c, int count )
                i++;
        }
        
+       if ( preread ) {
+               char berbuf[LBER_ELEMENT_SIZEOF];
+               BerElement *ber = (BerElement *)berbuf;
+               char **attrs;
+
+               if( preread_attrs ) {
+                       attrs = ldap_str2charray( preread_attrs, "," );
+               }
+
+               ber_init2( ber, NULL, LBER_USE_DER );
+
+               if( ber_printf( ber, "{v}", attrs ) == -1 ) {
+                       fprintf( stderr, "preread attrs encode failed.\n" );
+                       exit( EXIT_FAILURE );
+               }
+
+               err = ber_flatten2( ber, &c[i].ldctl_value, 0 );
+               if( err < 0 ) {
+                       fprintf( stderr, "preread flatten failed (%d)\n", err );
+                       exit( EXIT_FAILURE );
+               }
+
+               c[i].ldctl_oid = LDAP_CONTROL_PRE_READ;
+               c[i].ldctl_iscritical = preread > 1;
+               ctrls[i] = &c[i];
+               i++;
+
+               if( attrs ) ldap_charray_free( attrs );
+       }
+
+       if ( postread ) {
+               char berbuf[LBER_ELEMENT_SIZEOF];
+               BerElement *ber = (BerElement *)berbuf;
+               char **attrs;
+
+               if( postread_attrs ) {
+                       attrs = ldap_str2charray( postread_attrs, "," );
+               }
+
+               ber_init2( ber, NULL, LBER_USE_DER );
+
+               if( ber_printf( ber, "{v}", attrs ) == -1 ) {
+                       fprintf( stderr, "postread attrs encode failed.\n" );
+                       exit( EXIT_FAILURE );
+               }
+
+               err = ber_flatten2( ber, &c[i].ldctl_value, 0 );
+               if( err < 0 ) {
+                       fprintf( stderr, "postread flatten failed (%d)\n", err );
+                       exit( EXIT_FAILURE );
+               }
+
+               c[i].ldctl_oid = LDAP_CONTROL_POST_READ;
+               c[i].ldctl_iscritical = postread > 1;
+               ctrls[i] = &c[i];
+               i++;
+
+               if( attrs ) ldap_charray_free( attrs );
+       }
+
        while ( count-- ) {
                ctrls[i++] = extra_c++;
        }
index dabcf250c988d3c3c9aacf49e5082ced96eb6556..dba31d251c94421b1d48b4fe590d432ba9d9e323 100644 (file)
@@ -29,9 +29,11 @@ extern char  *sasl_secprops;
 #endif
 extern int   use_tls;
 
+extern char *assertion;
 extern char *authzid;
 extern int   manageDSAit;
 extern int   noop;
+extern int     preread, postread;
 
 extern int   not;
 extern int   want_bindpw;
index da957436a5e0fc603f8957b2e6a2b693dda76b35..93ed554cc5e44cc63ff55ff0e5664d1eca62745d 100644 (file)
@@ -172,8 +172,9 @@ main( int argc, char **argv )
 
        tool_bind( ld );
 
-       if ( authzid || manageDSAit || noop )
+       if ( assertion || authzid || manageDSAit || noop ) {
                tool_server_controls( ld, NULL, 0 );
+       }
 
        if ( verbose ) {
                fprintf( stderr, _("DN:%s, attr:%s, value:%s\n"),
index 908f7f1495f609865c9adf5578fab5301ee83003..7aa0b7bf5e9fb80fa0f9497e4905929f79c6bf48 100644 (file)
@@ -143,8 +143,9 @@ main( int argc, char **argv )
 
        tool_bind( ld );
 
-       if ( authzid || manageDSAit || noop )
+       if ( assertion || authzid || manageDSAit || noop ) {
                tool_server_controls( ld, NULL, 0 );
+       }
 
        retval = rc = 0;
 
index 2003d23dc937b0a72b3cc3c1f65a47d801fbc400..ff60a8b78ea65a1810cbd0ec0dcdfcc76697d863 100644 (file)
@@ -58,6 +58,7 @@ static LDAP   *ld = NULL;
 #define T_MODOPADDSTR          "add"
 #define T_MODOPREPLACESTR      "replace"
 #define T_MODOPDELETESTR       "delete"
+#define T_MODOPINCREMENTSTR    "increment"
 #define T_MODSEPSTR            "-"
 #define T_NEWRDNSTR            "newrdn"
 #define T_DELETEOLDRDNSTR      "deleteoldrdn"
@@ -168,123 +169,123 @@ handle_private_option( int i )
 int
 main( int argc, char **argv )
 {
-    char               *rbuf, *start, *rejbuf = NULL;
-    FILE               *fp, *rejfp;
+       char            *rbuf, *start, *rejbuf = NULL;
+       FILE            *fp, *rejfp;
        char            *matched_msg, *error_msg;
        int             rc, retval;
        int count, len;
 
-    tool_init();
-    prog = lutil_progname( "ldapmodify", argc, argv );
+       tool_init();
+       prog = lutil_progname( "ldapmodify", argc, argv );
 
        /* strncmp instead of strcmp since NT binaries carry .exe extension */
-    ldapadd = ( strncasecmp( prog, "ldapadd", sizeof("ldapadd")-1 ) == 0 );
+       ldapadd = ( strncasecmp( prog, "ldapadd", sizeof("ldapadd")-1 ) == 0 );
 
-    /* Print usage when no parameters */
-    if( argc < 2 ) usage();
+       /* Print usage when no parameters */
+       if( argc < 2 ) usage();
 
        tool_args( argc, argv );
 
-       if ( argc != optind )
-       usage();
+       if ( argc != optind ) usage();
 
-    if ( rejfile != NULL ) {
-       if (( rejfp = fopen( rejfile, "w" )) == NULL ) {
-           perror( rejfile );
-           return( EXIT_FAILURE );
+       if ( rejfile != NULL ) {
+               if (( rejfp = fopen( rejfile, "w" )) == NULL ) {
+                       perror( rejfile );
+                       return( EXIT_FAILURE );
+               }
+       } else {
+               rejfp = NULL;
        }
-    } else {
-       rejfp = NULL;
-    }
 
-    if ( infile != NULL ) {
-       if (( fp = fopen( infile, "r" )) == NULL ) {
-           perror( infile );
-           return( EXIT_FAILURE );
+       if ( infile != NULL ) {
+               if (( fp = fopen( infile, "r" )) == NULL ) {
+                       perror( infile );
+                       return( EXIT_FAILURE );
+               }
+       } else {
+               fp = stdin;
        }
-    } else {
-       fp = stdin;
-    }
 
-       if ( debug )
-               ldif_debug = debug;
+       if ( debug ) ldif_debug = debug;
 
        ld = tool_conn_setup( not, 0 );
 
-    if ( !not ) {
-       if ( pw_file || want_bindpw ) {
-               if ( pw_file ) {
-                       rc = lutil_get_filed_password( pw_file, &passwd );
-                       if( rc ) return EXIT_FAILURE;
-               } else {
-                       passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
-                       passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
+       if ( !not ) {
+               if ( pw_file || want_bindpw ) {
+                       if ( pw_file ) {
+                               rc = lutil_get_filed_password( pw_file, &passwd );
+                               if( rc ) return EXIT_FAILURE;
+                       } else {
+                               passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
+                               passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
+                       }
                }
+               tool_bind( ld );
        }
 
-       tool_bind( ld );
-    }
-
     rc = 0;
 
-       if ( authzid || manageDSAit || noop )
+       if ( assertion || authzid || manageDSAit || noop || preread || postread ) {
                tool_server_controls( ld, NULL, 0 );
+       }
 
        count = 0;
        retval = 0;
-    while (( rc == 0 || contoper ) &&
-               ( rbuf = read_one_record( fp )) != NULL ) {
-       count++;
+       while (( rc == 0 || contoper ) &&
+               ( rbuf = read_one_record( fp )) != NULL )
+       {
+               count++;
 
-       start = rbuf;
+               start = rbuf;
 
-       if ( rejfp ) {
-               len = strlen( rbuf );
-               if (( rejbuf = (char *)ber_memalloc( len+1 )) == NULL ) {
-                       perror( "malloc" );
-                       exit( EXIT_FAILURE );
+               if ( rejfp ) {
+                       len = strlen( rbuf );
+                       if (( rejbuf = (char *)ber_memalloc( len+1 )) == NULL ) {
+                               perror( "malloc" );
+                               exit( EXIT_FAILURE );
+                       }
+                       memcpy( rejbuf, rbuf, len+1 );
                }
-               memcpy( rejbuf, rbuf, len+1 );
-       }
 
-    rc = process_ldif_rec( start, count );
+               rc = process_ldif_rec( start, count );
 
-       if ( rc )
-               retval = rc;
-       if ( rc && rejfp ) {
-               fprintf(rejfp, _("# Error: %s (%d)"), ldap_err2string(rc), rc);
+               if ( rc ) retval = rc;
+               if ( rc && rejfp ) {
+                       fprintf(rejfp, _("# Error: %s (%d)"), ldap_err2string(rc), rc);
 
-               matched_msg = NULL;
-               ldap_get_option(ld, LDAP_OPT_MATCHED_DN, &matched_msg);
-               if ( matched_msg != NULL ) {
-                       if ( *matched_msg != '\0' )
-                               fprintf( rejfp, _(", matched DN: %s"), matched_msg );
-                       ldap_memfree( matched_msg );
-               }
+                       matched_msg = NULL;
+                       ldap_get_option(ld, LDAP_OPT_MATCHED_DN, &matched_msg);
+                       if ( matched_msg != NULL ) {
+                               if ( *matched_msg != '\0' ) {
+                                       fprintf( rejfp, _(", matched DN: %s"), matched_msg );
+                               }
+                               ldap_memfree( matched_msg );
+                       }
 
-               error_msg = NULL;
-               ldap_get_option(ld, LDAP_OPT_ERROR_STRING, &error_msg);
-               if ( error_msg != NULL ) {
-                       if ( *error_msg != '\0' )
-                               fprintf( rejfp, _(", additional info: %s"), error_msg );
-                       ldap_memfree( error_msg );
+                       error_msg = NULL;
+                       ldap_get_option(ld, LDAP_OPT_ERROR_STRING, &error_msg);
+                       if ( error_msg != NULL ) {
+                               if ( *error_msg != '\0' ) {
+                                       fprintf( rejfp, _(", additional info: %s"), error_msg );
+                               }
+                               ldap_memfree( error_msg );
+                       }
+                       fprintf( rejfp, "\n%s\n", rejbuf );
                }
-               fprintf( rejfp, "\n%s\n", rejbuf );
-       }
-               if (rejfp) 
-                       free( rejbuf );
+
+               if (rejfp) free( rejbuf );
                free( rbuf );
-    }
+       }
 
-    if ( !not ) {
+       if ( !not ) {
                ldap_unbind( ld );
-    }
+       }
 
-    if ( rejfp != NULL ) {
-           fclose( rejfp );
-    }
+       if ( rejfp != NULL ) {
+               fclose( rejfp );
+       }
 
-    return( retval );
+       return( retval );
 }
 
 
@@ -461,6 +462,10 @@ process_ldif_rec( char *rbuf, int count )
                modop = LDAP_MOD_DELETE;
                addmodifyop( &pmods, modop, val.bv_val, NULL );
                goto end_line;
+           } else if ( strcasecmp( type, T_MODOPINCREMENTSTR ) == 0 ) {
+               modop = LDAP_MOD_INCREMENT;
+               addmodifyop( &pmods, modop, val.bv_val, NULL );
+               goto end_line;
            } else {    /* no modify op:  use default */
                modop = ldapadd ? LDAP_MOD_ADD : LDAP_MOD_REPLACE;
            }
@@ -809,6 +814,11 @@ domodify(
     int                        i, j, k, notascii, op;
     struct berval      *bvp;
 
+       if ( dn == NULL ) {
+       fprintf( stderr, _("%s: no DN specified\n"), prog );
+       return( LDAP_PARAM_ERROR );
+       }
+
     if ( pmods == NULL ) {
        fprintf( stderr, _("%s: no attributes to change or add (entry=\"%s\")\n"),
                prog, dn );
@@ -829,8 +839,11 @@ domodify(
        for ( i = 0; pmods[ i ] != NULL; ++i ) {
            op = pmods[ i ]->mod_op & ~LDAP_MOD_BVALUES;
            printf( "%s %s:\n",
-                       op == LDAP_MOD_REPLACE ? _("replace") : op == LDAP_MOD_ADD
-                               ?  _("add") : _("delete"),
+                       op == LDAP_MOD_REPLACE ? _("replace") :
+                               op == LDAP_MOD_ADD ?  _("add") :
+                                       op == LDAP_MOD_INCREMENT ?  _("increment") :
+                                               op == LDAP_MOD_DELETE ?  _("delete") :
+                                                       _("unknown"),
                        pmods[ i ]->mod_type );
            if ( pmods[ i ]->mod_bvalues != NULL ) {
                for ( j = 0; pmods[ i ]->mod_bvalues[ j ] != NULL; ++j ) {
index 53db82726d730af4d525af2a78ebf12708da64bb..672a4ca424ee9d7133a340ff7cc940f5eb3ddc76 100644 (file)
@@ -171,8 +171,9 @@ main(int argc, char **argv)
 
        tool_bind( ld );
 
-       if ( authzid || manageDSAit || noop )
+       if ( assertion || authzid || manageDSAit || noop ) {
                tool_server_controls( ld, NULL, 0 );
+       }
 
     retval = rc = 0;
     if (havedn)
index 0551229f8002d6e210b9684cb942647ccadef06b..b7b99697d5eb9d8f633623c041e82618eb8c509a 100644 (file)
@@ -166,7 +166,7 @@ main( int argc, char *argv[] )
        }
 
        if( oldpwfile ) {
-               rc = lutil_get_filed_password( prog, &oldpw );
+               rc = lutil_get_filed_password( oldpwfile, &oldpw );
                if( rc ) return EXIT_FAILURE;
        }
 
@@ -187,7 +187,7 @@ main( int argc, char *argv[] )
        }
 
        if( newpwfile ) {
-               rc = lutil_get_filed_password( prog, &newpw );
+               rc = lutil_get_filed_password( newpwfile, &newpw );
                if( rc ) return EXIT_FAILURE;
        }
 
@@ -207,22 +207,22 @@ main( int argc, char *argv[] )
                newpw.bv_len = strlen( newpw.bv_val );
        }
 
-       if( want_bindpw && passwd.bv_val == NULL ) {
-               if ( pw_file ) {
-                       rc = lutil_get_filed_password( pw_file, &passwd );
-                       if( rc ) return EXIT_FAILURE;
-               } else {
-                       passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
-                       passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
-               }
+       if ( pw_file ) {
+               rc = lutil_get_filed_password( pw_file, &passwd );
+               if( rc ) return EXIT_FAILURE;
+
+       } else if ( want_bindpw ) {
+               passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
+               passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
        }
 
        ld = tool_conn_setup( 0, 0 );
 
        tool_bind( ld );
 
-       if ( authzid || manageDSAit || noop )
+       if ( assertion || authzid || manageDSAit || noop ) {
                tool_server_controls( ld, NULL, 0 );
+       }
 
        if( user != NULL || oldpw.bv_val != NULL || newpw.bv_val != NULL ) {
                /* build change password control */
index 399933196cde8baa2003eaf3cb6c5c67bf2bd176..31be49d5f0b4385c6e64b69997cc226eba7a9182 100644 (file)
@@ -75,17 +75,8 @@ usage( void )
 #ifdef LDAP_CONTROL_SUBENTRIES
        fprintf( stderr, _("             [!]subentries[=true|false]  (subentries)\n"));
 #endif
-#ifdef LDAP_CLIENT_UPDATE
-       fprintf( stderr, _("             [!]lcup=p/<cint>/<cookie>/<slimit> (LDAP client update)\n"));
-/*
- * "                      s/<cint>/<cookie>  (LDAP client update)\n"
- * "                     sp/<cint>/<cookie>/<slimit>\n"
- * */
-#endif
-#ifdef LDAP_SYNC
        fprintf( stderr, _("             [!]sync=ro[/<cookie>]            (LDAP Sync refreshOnly)\n"));
        fprintf( stderr, _("                     rp[/<cookie>][/<slimit>] (LDAP Sync refreshAndPersist)\n"));
-#endif
        fprintf( stderr, _("  -F prefix  URL prefix for files (default: %s)\n"), def_urlpre);
        fprintf( stderr, _("  -l limit   time limit (in seconds) for search\n"));
        fprintf( stderr, _("  -L         print responses in LDIFv1 format\n"));
@@ -160,21 +151,9 @@ static char        *vrFilter = NULL;
 static int domainScope = 0;
 #endif
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-static int lcup = 0;
 static int ldapsync = 0;
-#endif
-
-#ifdef LDAP_CLIENT_UPDATE
-static int lcup_cint = 0;
-static struct berval lcup_cookie = { 0, NULL };
-static int lcup_slimit = -1;
-#endif
-
-#ifdef LDAP_SYNC
 static struct berval sync_cookie = { 0, NULL };
 static int sync_slimit = -1;
-#endif
 
 #ifdef LDAP_CONTROL_PAGEDRESULTS
 static int pagedResults = 0;
@@ -330,67 +309,6 @@ handle_private_option( int i )
                        if( crit ) subentries *= -1;
 #endif
 
-#ifdef LDAP_CLIENT_UPDATE
-                } else if ( strcasecmp( control, "lcup" ) == 0 ) {
-                        char *cookiep;
-                        char *slimitp;
-                        if ( lcup ) {
-                                fprintf( stderr, _("client update control previously specified\n"));
-                                exit( EXIT_FAILURE );
-                        }
-                        if ( ldapsync != -1 ) {
-                                fprintf( stderr, _("ldap sync control previously specified\n"));
-                                exit( EXIT_FAILURE );
-                        }
-                        if ( cvalue == NULL ) {
-                                fprintf( stderr,
-                                        _("missing specification of client update control\n"));
-                                exit( EXIT_FAILURE );
-                        }
-                        if ( strncasecmp( cvalue, "p", 1 ) == 0 ) {
-                                lcup = LDAP_CUP_PERSIST_ONLY;
-                                cvalue = strchr( cvalue, '/' );
-                                cvalue++;
-                                cookiep = strchr( cvalue, '/' );
-                                *cookiep++ = '\0';
-                                lcup_cint = atoi( cvalue );
-                                cvalue = cookiep;
-                                slimitp = strchr( cvalue, '/' );
-                                *slimitp++ = '\0';
-                                while ( isspace( (unsigned char) *cookiep ) )
-                                    cookiep++;
-                                ber_str2bv( cookiep, 0, 0, &lcup_cookie );
-                                lcup_slimit = atoi( slimitp );
-/*
-                       } else if ( strncasecmp( cvalue, "s", 1 ) == 0 ) {
-                               lcup = LDAP_CUP_SYNC_ONLY;
-                               cvalue += 2;
-                               cookiep = strchr( cvalue, '/' );
-                               *cookiep++ = '\0';
-                               lcup_cint = atoi( cvalue );
-                               ber_str2bv( cookiep, 0, 0, &lcup_cookie );
-                       } else if ( strncasecmp( cvalue, "sp", 2 ) == 0 ) {
-                               lcup = LDAP_CUP_SYNC_AND_PERSIST;
-                               cvalue += 3;
-                               cookiep = strchr( cvalue, '/' );
-                               *cookiep++ = '\0';
-                               lcup_cint = atoi( cvalue );
-                               cvalue = cookiep;
-                               slimitp = strchr( cvalue, '/' );
-                               *slimitp++ = '\0';
-                               ber_str2bv( cookiep, 0, 0, &lcup_cookie );
-                               lcup_slimit = atoi( slimitp );
-*/
-                       } else {
-                               fprintf( stderr,
-                                       _("client update control value \"%s\" invalid\n"),
-                                       cvalue );
-                               exit( EXIT_FAILURE );
-                       }
-                       if ( crit ) lcup *= -1;
-#endif
-
-#ifdef LDAP_SYNC
        } else if ( strcasecmp( control, "sync" ) == 0 ) {
                        char *cookiep;
                        char *slimitp;
@@ -398,10 +316,6 @@ handle_private_option( int i )
                                fprintf( stderr, _("ldap sync control previously specified\n") );
                                exit( EXIT_FAILURE );
                        }
-                       if ( lcup ) {
-                               fprintf( stderr, _("client update control previously specified\n") );
-                               exit( EXIT_FAILURE );
-                       }
                        if ( cvalue == NULL ) {
                                fprintf( stderr,
                                        _("missing specification of ldap sync control\n"));
@@ -438,7 +352,6 @@ handle_private_option( int i )
                                exit( EXIT_FAILURE );
                        }
                        if ( crit ) ldapsync *= -1;
-#endif
 
                } else {
                        fprintf( stderr, _("Invalid control name: %s\n"), control );
@@ -527,15 +440,9 @@ main( int argc, char **argv )
        int                     rc, i, first;
        LDAP            *ld = NULL;
        BerElement      *seber = NULL, *vrber = NULL, *prber = NULL;
-#ifdef LDAP_CLIENT_UPDATE
-       BerElement      *cuber = NULL;
-        struct berval   *cubvalp = NULL;
-#endif
 
-#ifdef LDAP_SYNC
        BerElement      *syncber = NULL;
        struct berval   *syncbvalp = NULL;
-#endif
 
        tool_init();
 
@@ -633,20 +540,16 @@ main( int argc, char **argv )
        tool_bind( ld );
 
 getNextPage:
-       if ( manageDSAit || noop || subentries || valuesReturnFilter
+       if ( assertion || authzid || manageDSAit || noop
 #ifdef LDAP_CONTROL_X_DOMAIN_SCOPE
-                       || domainScope
+               || domainScope
 #endif
 #ifdef LDAP_CONTROL_PAGEDRESULTS
-                       || pageSize
-#endif
-#ifdef LDAP_CLIENT_UPDATE
-                       || lcup
-#endif
-#ifdef LDAP_SYNC
-                       || ldapsync
+               || pageSize
 #endif
-                       ) {
+               || ldapsync
+               || subentries || valuesReturnFilter )
+       {
                int err;
                int i=0;
                LDAPControl c[6];
@@ -684,37 +587,6 @@ getNextPage:
                }
 #endif
 
-#ifdef LDAP_CLIENT_UPDATE
-                if ( lcup ) {
-                        if (( cuber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
-                                return EXIT_FAILURE;
-                        }
-
-                        if ( lcup_cookie.bv_len == 0 ) {
-                                err = ber_printf( cuber, "{ei}", abs(lcup), lcup_cint );
-                        } else {
-                                err = ber_printf( cuber, "{ei{sO}}", abs(lcup), lcup_cint,
-                                    LDAP_CUP_COOKIE_OID, &lcup_cookie );
-                        }
-
-                        if ( err == LBER_ERROR ) {
-                                ber_free( cuber, 1 );
-                                fprintf( stderr, _("client update control encoding error!\n") );
-                                return EXIT_FAILURE;
-                        }
-
-                        if ( ber_flatten( cuber, &cubvalp ) == LBER_ERROR ) {
-                                return EXIT_FAILURE;
-                        }
-
-                        c[i].ldctl_oid = LDAP_CONTROL_CLIENT_UPDATE;
-                        c[i].ldctl_value = (*cubvalp);
-                        c[i].ldctl_iscritical = lcup < 0;
-                        i++;
-                }
-#endif
-
-#ifdef LDAP_SYNC
                if ( ldapsync ) {
                        if (( syncber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
                                return EXIT_FAILURE;
@@ -742,7 +614,6 @@ getNextPage:
                        c[i].ldctl_iscritical = ldapsync < 0;
                        i++;
                }
-#endif
 
                if ( valuesReturnFilter ) {
                if (( vrber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
@@ -948,12 +819,10 @@ static int dosearch(
        int                     npartial;
        LDAPMessage             *res, *msg;
        ber_int_t               msgid;
-#ifdef LDAP_SYNC
        char                    *retoid = NULL;
        struct berval           *retdata = NULL;
        int                     nresponses_psearch = -1;
        int                     cancel_msgid = -1;
-#endif
 
        if( filtpatt != NULL ) {
                filter = malloc( strlen( filtpatt ) + strlen( value ) );
@@ -1011,10 +880,8 @@ static int dosearch(
                        msg = ldap_next_message( ld, msg ) )
                {
                        if ( nresponses++ ) putchar('\n');
-#if LDAP_SYNC
                        if ( nresponses_psearch >= 0 ) 
                                nresponses_psearch++;
-#endif
 
                        switch( ldap_msgtype( msg ) ) {
                        case LDAP_RES_SEARCH_ENTRY:
@@ -1036,14 +903,12 @@ static int dosearch(
                                        goto done;
                                }
 
-#ifdef LDAP_SYNC
                                if ( cancel_msgid != -1 &&
                                                cancel_msgid == ldap_msgid( msg ) ) {
                                        printf(_("Cancelled \n"));
                                        printf(_("cancel_msgid = %d\n"), cancel_msgid);
                                        goto done;
                                }
-#endif
                                break;
 
                        case LDAP_RES_SEARCH_RESULT:
@@ -1054,28 +919,14 @@ static int dosearch(
                                }
 #endif
 
-#ifdef LDAP_CLIENT_UPDATE
-                               if ( lcup == LDAP_CUP_PERSIST_ONLY ||
-                                    lcup == LDAP_CUP_SYNC_AND_PERSIST ) {
-                                       break;
-                               }
-#endif
-#if defined(LDAP_CLIENT_UPDATE) && defined(LDAP_SYNC)
-                               else
-#endif
-#ifdef LDAP_SYNC
                                if ( ldapsync == LDAP_SYNC_REFRESH_AND_PERSIST ) {
                                        break;
                                }
-#endif
 
                                goto done;
 
                        case LDAP_RES_INTERMEDIATE:
                                npartial++;
-#ifndef LDAP_SYNC
-                               print_partial( ld, msg );
-#else
                                ldap_parse_intermediate( ld, msg,
                                        &retoid, &retdata, NULL, 0 );
 
@@ -1092,16 +943,8 @@ static int dosearch(
                                ldap_memfree( retoid );
                                ber_bvfree( retdata );
                                goto done;
-#endif
                        }
 
-#ifdef LDAP_CLIENT_UPDATE
-                       if ( lcup && lcup_slimit != -1 && nresponses >= lcup_slimit ) {
-                               ldap_abandon (ld, ldap_msgid(msg));
-                               goto done;
-                       }
-#endif
-#ifdef LDAP_SYNC
                        if ( ldapsync && sync_slimit != -1 &&
                                        nresponses_psearch >= sync_slimit ) {
                                BerElement *msgidber = NULL;
@@ -1113,8 +956,6 @@ static int dosearch(
                                                msgidvalp, NULL, NULL, &cancel_msgid);
                                nresponses_psearch = -1;
                        }
-#endif
-
                }
 
                ldap_msgfree( res );
index f81971dde08c8eb1b70bcb1b0bdffbbca266fbc4..f0ea1c40d8bc782de6dc668bb0543a4f77fb2400 100644 (file)
@@ -124,8 +124,9 @@ main( int argc, char *argv[] )
                goto skip;
        }
 
-       if ( authzid || manageDSAit || noop )
+       if ( assertion || authzid || manageDSAit || noop ) {
                tool_server_controls( ld, NULL, 0 );
+       }
 
        rc = ldap_whoami_s( ld, &retdata, NULL, NULL ); 
 
index 5f83aa8a41fb1f9d2ae5a569a314d9a9bd77e42a..963cbf09e68b7d385284d9a3006afd630f8bc4c5 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # $OpenLDAP$
-# from OpenLDAP 
+# from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.3 2003/05/31 19:06:55 kurt Exp  
 
 # Copyright 1998-2003 The OpenLDAP Foundation.  All Rights Reserved.
 # 
@@ -2828,6 +2828,7 @@ BUILD_LDAP=no
 BUILD_LDBM=no
 BUILD_META=no
 BUILD_MONITOR=no
+BUILD_CACHE=no
 BUILD_NULL=no
 BUILD_PASSWD=no
 BUILD_PERL=no
@@ -2887,7 +2888,7 @@ SLAPD_SLP_LIBS=
 # 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:2891: checking for a BSD compatible install" >&5
+echo "configure:2892: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2968,7 +2969,7 @@ 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:2972: checking for $ac_word" >&5
+echo "configure:2973: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3020,7 +3021,7 @@ 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:3024: checking for $ac_word" >&5
+echo "configure:3025: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3062,7 +3063,7 @@ 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:3066: checking for $ac_word" >&5
+echo "configure:3067: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3112,12 +3113,12 @@ if test "X${PATH_SEPARATOR+set}" != Xset; then
 fi
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:3116: checking for Cygwin environment" >&5
+echo "configure:3117: checking for Cygwin environment" >&5
 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3121 "configure"
+#line 3122 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -3128,7 +3129,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:3132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -3144,19 +3145,19 @@ 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:3148: checking for mingw32 environment" >&5
+echo "configure:3149: checking for mingw32 environment" >&5
 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3153 "configure"
+#line 3154 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:3160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -3172,19 +3173,19 @@ echo "$ac_t""$ac_cv_mingw32" 1>&6
 MINGW32=
 test "$ac_cv_mingw32" = yes && MINGW32=yes
 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
-echo "configure:3176: checking for EMX OS/2 environment" >&5
+echo "configure:3177: checking for EMX OS/2 environment" >&5
 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3181 "configure"
+#line 3182 "configure"
 #include "confdefs.h"
 
 int main() {
 return __EMX__;
 ; return 0; }
 EOF
-if { (eval echo configure:3188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_emxos2=yes
 else
@@ -3200,7 +3201,7 @@ echo "$ac_t""$ac_cv_emxos2" 1>&6
 EMXOS2=
 test "$ac_cv_emxos2" = yes && EMXOS2=yes
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:3204: checking how to run the C preprocessor" >&5
+echo "configure:3205: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -3215,13 +3216,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 3219 "configure"
+#line 3220 "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:3225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3226: \"$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
   :
@@ -3232,13 +3233,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 3236 "configure"
+#line 3237 "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:3242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3243: \"$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
   :
@@ -3249,13 +3250,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 3253 "configure"
+#line 3254 "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:3259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3260: \"$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
   :
@@ -3305,7 +3306,7 @@ 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:3309: checking for $ac_word" >&5
+echo "configure:3310: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3335,7 +3336,7 @@ 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:3339: checking for $ac_word" >&5
+echo "configure:3340: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3386,7 +3387,7 @@ fi
       # 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:3390: checking for $ac_word" >&5
+echo "configure:3391: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3418,7 +3419,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:3422: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
+echo "configure:3423: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -3429,12 +3430,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 3433 "configure"
+#line 3434 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:3438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3439: \"$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
@@ -3460,12 +3461,12 @@ 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 $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:3464: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:3465: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $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:3469: checking whether we are using GNU C" >&5
+echo "configure:3470: checking whether we are using GNU C" >&5
 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3474,7 +3475,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3479: \"$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
@@ -3493,7 +3494,7 @@ 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:3497: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:3498: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3536,7 +3537,7 @@ 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:3540: checking for ld used by GCC" >&5
+echo "configure:3541: checking for ld used by GCC" >&5
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -3566,10 +3567,10 @@ echo "configure:3540: checking for ld used by GCC" >&5
   esac
 elif test "$with_gnu_ld" = yes; then
   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:3570: checking for GNU ld" >&5
+echo "configure:3571: checking for GNU ld" >&5
 else
   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:3573: checking for non-GNU ld" >&5
+echo "configure:3574: checking for non-GNU ld" >&5
 fi
 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3604,7 +3605,7 @@ else
 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:3608: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:3609: checking if the linker ($LD) is GNU ld" >&5
 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3621,7 +3622,7 @@ 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:3625: checking for $LD option to reload object files" >&5
+echo "configure:3626: checking for $LD option to reload object files" >&5
 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3633,7 +3634,7 @@ 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:3637: checking for BSD-compatible nm" >&5
+echo "configure:3638: checking for BSD-compatible nm" >&5
 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3671,7 +3672,7 @@ NM="$lt_cv_path_NM"
 echo "$ac_t""$NM" 1>&6
 
 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
-echo "configure:3675: checking for a sed that does not truncate output" >&5
+echo "configure:3676: checking for a sed that does not truncate output" >&5
 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3755,7 +3756,7 @@ fi
 echo "$ac_t""$SED" 1>&6
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:3759: checking whether ln -s works" >&5
+echo "configure:3760: checking whether ln -s works" >&5
 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3776,7 +3777,7 @@ else
 fi
 
 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
-echo "configure:3780: checking how to recognise dependent libraries" >&5
+echo "configure:3781: checking how to recognise dependent libraries" >&5
 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3962,13 +3963,13 @@ 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:3966: checking for object suffix" >&5
+echo "configure:3967: checking for object suffix" >&5
 if eval "test \"\${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:3972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   for ac_file in conftest.*; do
     case $ac_file in
     *.c) ;;
@@ -3989,7 +3990,7 @@ ac_objext=$ac_cv_objext
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3993: checking for executable suffix" >&5
+echo "configure:3994: checking for executable suffix" >&5
 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3999,7 +4000,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.C | *.o | *.obj | *.xcoff) ;;
@@ -4030,7 +4031,7 @@ 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:4034: checking command to parse $NM output" >&5
+echo "configure:4035: checking command to parse $NM output" >&5
 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4113,10 +4114,10 @@ void nm_test_func(){}
 int main(){nm_test_var='a';nm_test_func();return(0);}
 EOF
 
-  if { (eval echo configure:4117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if { (eval echo configure:4120: \"$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
+    if { (eval echo configure:4121: \"$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"
@@ -4167,7 +4168,7 @@ EOF
          save_CFLAGS="$CFLAGS"
          LIBS="conftstm.$ac_objext"
          CFLAGS="$CFLAGS$no_builtin_flag"
-         if { (eval echo configure:4171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
+         if { (eval echo configure:4172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
            pipe_works=yes
          fi
          LIBS="$save_LIBS"
@@ -4216,17 +4217,17 @@ 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:4220: checking for $ac_hdr" >&5
+echo "configure:4221: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4225 "configure"
+#line 4226 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4231: \"$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*
@@ -4262,7 +4263,7 @@ 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:4266: checking for ${ac_tool_prefix}file" >&5
+echo "configure:4267: checking for ${ac_tool_prefix}file" >&5
 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4324,7 +4325,7 @@ 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:4328: checking for file" >&5
+echo "configure:4329: checking for file" >&5
 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4395,7 +4396,7 @@ 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:4399: checking for $ac_word" >&5
+echo "configure:4400: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4427,7 +4428,7 @@ 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:4431: checking for $ac_word" >&5
+echo "configure:4432: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4462,7 +4463,7 @@ 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:4466: checking for $ac_word" >&5
+echo "configure:4467: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4494,7 +4495,7 @@ 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:4498: checking for $ac_word" >&5
+echo "configure:4499: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4543,8 +4544,8 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 4547 "configure"' > conftest.$ac_ext
-  if { (eval echo configure:4548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  echo '#line 4548 "configure"' > conftest.$ac_ext
+  if { (eval echo configure:4549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     case `/usr/bin/file conftest.$ac_objext` in
     *32-bit*)
       LD="${LD-ld} -32"
@@ -4565,7 +4566,7 @@ case $host in
   SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:4569: checking whether the C compiler needs -belf" >&5
+echo "configure:4570: checking whether the C compiler needs -belf" >&5
 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4578,14 +4579,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
 cross_compiling=$ac_cv_prog_cc_cross
 
      cat > conftest.$ac_ext <<EOF
-#line 4582 "configure"
+#line 4583 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4590: \"$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
@@ -4615,7 +4616,7 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4619: checking for $ac_word" >&5
+echo "configure:4620: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4647,7 +4648,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "dlltool", so it can be a program name with args.
 set dummy dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4651: checking for $ac_word" >&5
+echo "configure:4652: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4682,7 +4683,7 @@ fi
   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
 set dummy ${ac_tool_prefix}as; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4686: checking for $ac_word" >&5
+echo "configure:4687: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4714,7 +4715,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "as", so it can be a program name with args.
 set dummy as; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4718: checking for $ac_word" >&5
+echo "configure:4719: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4749,7 +4750,7 @@ fi
   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
 set dummy ${ac_tool_prefix}objdump; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4753: checking for $ac_word" >&5
+echo "configure:4754: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4781,7 +4782,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "objdump", so it can be a program name with args.
 set dummy objdump; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4785: checking for $ac_word" >&5
+echo "configure:4786: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4817,12 +4818,12 @@ fi
   # recent cygwin and mingw systems supply a stub DllMain which the user
   # can override, but on older systems we have to supply one
   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:4821: checking if libtool should supply DllMain function" >&5
+echo "configure:4822: checking if libtool should supply DllMain function" >&5
 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4826 "configure"
+#line 4827 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -4830,7 +4831,7 @@ extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
       DllMain (0, 0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   lt_cv_need_dllmain=no
 else
@@ -4851,19 +4852,19 @@ echo "$ac_t""$lt_cv_need_dllmain" 1>&6
     SAVE_CFLAGS="$CFLAGS"
     CFLAGS="$CFLAGS -mdll"
     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:4855: checking how to link DLLs" >&5
+echo "configure:4856: checking how to link DLLs" >&5
 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4860 "configure"
+#line 4861 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   lt_cv_cc_dll_switch=-mdll
 else
@@ -4977,7 +4978,7 @@ set dummy $CC
 compiler="$2"
 
 echo $ac_n "checking for objdir""... $ac_c" 1>&6
-echo "configure:4981: checking for objdir" >&5
+echo "configure:4982: checking for objdir" >&5
 rm -f .libs 2>/dev/null
 mkdir .libs 2>/dev/null
 if test -d .libs; then
@@ -5004,7 +5005,7 @@ test -z "$pic_mode" && pic_mode=default
 # 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:5008: checking for $compiler option to produce PIC" >&5
+echo "configure:5009: checking for $compiler option to produce PIC" >&5
 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5152,21 +5153,21 @@ else
 
   # 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:5156: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
+echo "configure:5157: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
   if eval "test \"\${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 5163 "configure"
+#line 5164 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
         case $host_os in
       hpux9* | hpux10* | hpux11*)
@@ -5218,7 +5219,7 @@ if test -n "$lt_cv_prog_cc_shlib"; then
 fi
 
 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
-echo "configure:5222: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
+echo "configure:5223: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5226,14 +5227,14 @@ else
   save_LDFLAGS="$LDFLAGS"
   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
   cat > conftest.$ac_ext <<EOF
-#line 5230 "configure"
+#line 5231 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5238: \"$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
@@ -5260,7 +5261,7 @@ can_build_shared="$lt_cv_prog_cc_can_build_shared"
 
 # 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:5264: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo "configure:5265: checking if $compiler supports -c -o file.$ac_objext" >&5
 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5279,7 +5280,7 @@ chmod -w .
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 compiler_c_o=no
-if { (eval echo configure:5283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5284: \"$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
@@ -5308,7 +5309,7 @@ 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:5312: checking if $compiler supports -c -o file.lo" >&5
+echo "configure:5313: checking if $compiler supports -c -o file.lo" >&5
   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5319,14 +5320,14 @@ else
   save_objext="$ac_objext"
   ac_objext=lo
   cat > conftest.$ac_ext <<EOF
-#line 5323 "configure"
+#line 5324 "configure"
 #include "confdefs.h"
 
 int main() {
 int some_variable = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:5330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5331: \"$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
@@ -5357,7 +5358,7 @@ 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:5361: checking if we can lock with hard links" >&5
+echo "configure:5362: 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
@@ -5376,20 +5377,20 @@ fi
 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:5380: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo "configure:5381: 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 5386 "configure"
+#line 5387 "configure"
 #include "confdefs.h"
 
 int main() {
 int some_variable = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:5393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5394: \"$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
@@ -5416,7 +5417,7 @@ fi
 
 # 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:5420: checking whether the linker ($LD) supports shared libraries" >&5
+echo "configure:5421: checking whether the linker ($LD) supports shared libraries" >&5
 
 allow_undefined_flag=
 no_undefined_flag=
@@ -6115,7 +6116,7 @@ test "$ld_shlibs" = no && can_build_shared=no
 
 # Check hardcoding attributes.
 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
-echo "configure:6119: checking how to hardcode library paths into programs" >&5
+echo "configure:6120: checking how to hardcode library paths into programs" >&5
 hardcode_action=
 if test -n "$hardcode_libdir_flag_spec" || \
    test -n "$runpath_var"; then
@@ -6143,7 +6144,7 @@ echo "$ac_t""$hardcode_action" 1>&6
 striplib=
 old_striplib=
 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
-echo "configure:6147: checking whether stripping libraries is possible" >&5
+echo "configure:6148: 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"
@@ -6157,7 +6158,7 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 # PORTME Fill in your ld.so characteristics
 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
-echo "configure:6161: checking dynamic linker characteristics" >&5
+echo "configure:6162: checking dynamic linker characteristics" >&5
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -6568,11 +6569,11 @@ test "$dynamic_linker" = no && can_build_shared=no
 
 # Report the final consequences.
 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
-echo "configure:6572: checking if libtool supports shared libraries" >&5
+echo "configure:6573: checking if libtool supports shared libraries" >&5
 echo "$ac_t""$can_build_shared" 1>&6
 
 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
-echo "configure:6576: checking whether to build shared libraries" >&5
+echo "configure:6577: checking whether to build shared libraries" >&5
 test "$can_build_shared" = "no" && enable_shared=no
 
 # On AIX, shared libraries and static libraries use the same namespace, and
@@ -6595,7 +6596,7 @@ esac
 echo "$ac_t""$enable_shared" 1>&6
 
 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
-echo "configure:6599: checking whether to build static libraries" >&5
+echo "configure:6600: checking whether to build static libraries" >&5
 # Make sure either enable_shared or enable_static is yes.
 test "$enable_shared" = yes || enable_static=yes
 echo "$ac_t""$enable_static" 1>&6
@@ -6636,12 +6637,12 @@ else
 
   *)
     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "configure:6640: checking for shl_load" >&5
+echo "configure:6641: checking for shl_load" >&5
 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6645 "configure"
+#line 6646 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shl_load(); below.  */
@@ -6665,7 +6666,7 @@ f = shl_load;
 
 ; return 0; }
 EOF
-if { (eval echo configure:6669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6670: \"$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
@@ -6683,7 +6684,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:6687: checking for shl_load in -ldld" >&5
+echo "configure:6688: checking for shl_load in -ldld" >&5
 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6691,7 +6692,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6695 "configure"
+#line 6696 "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
@@ -6702,7 +6703,7 @@ int main() {
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6707: \"$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
@@ -6721,12 +6722,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:6725: checking for dlopen" >&5
+echo "configure:6726: checking for dlopen" >&5
 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6730 "configure"
+#line 6731 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlopen(); below.  */
@@ -6750,7 +6751,7 @@ f = dlopen;
 
 ; return 0; }
 EOF
-if { (eval echo configure:6754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6755: \"$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
@@ -6768,7 +6769,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:6772: checking for dlopen in -ldl" >&5
+echo "configure:6773: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6776,7 +6777,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6780 "configure"
+#line 6781 "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
@@ -6787,7 +6788,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:6791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6792: \"$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
@@ -6806,7 +6807,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
-echo "configure:6810: checking for dlopen in -lsvld" >&5
+echo "configure:6811: checking for dlopen in -lsvld" >&5
 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6814,7 +6815,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsvld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6818 "configure"
+#line 6819 "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
@@ -6825,7 +6826,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:6829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6830: \"$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
@@ -6844,7 +6845,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "configure:6848: checking for dld_link in -ldld" >&5
+echo "configure:6849: checking for dld_link in -ldld" >&5
 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6852,7 +6853,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6856 "configure"
+#line 6857 "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
@@ -6863,7 +6864,7 @@ int main() {
 dld_link()
 ; return 0; }
 EOF
-if { (eval echo configure:6867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6868: \"$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
@@ -6919,7 +6920,7 @@ fi
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "configure:6923: checking whether a program can dlopen itself" >&5
+echo "configure:6924: checking whether a program can dlopen itself" >&5
 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6929,7 +6930,7 @@ else
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 6933 "configure"
+#line 6934 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -6990,7 +6991,7 @@ int main ()
     exit (status);
 }
 EOF
-  if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  if { (eval echo configure:6995: \"$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
@@ -7013,7 +7014,7 @@ 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:7017: checking whether a statically linked program can dlopen itself" >&5
+echo "configure:7018: checking whether a statically linked program can dlopen itself" >&5
 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7023,7 +7024,7 @@ else
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 7027 "configure"
+#line 7028 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -7084,7 +7085,7 @@ int main ()
     exit (status);
 }
 EOF
-  if { (eval echo configure:7088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  if { (eval echo configure:7089: \"$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
@@ -7133,14 +7134,14 @@ if test "$enable_shared" = yes && test "$GCC" = yes; then
     # 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:7137: checking whether -lc should be explicitly linked in" >&5
+echo "configure:7138: checking whether -lc should be explicitly linked in" >&5
     if eval "test \"\${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:7144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+    if { (eval echo configure:7145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
       soname=conftest
       lib=conftest
       libobjs=conftest.$ac_objext
@@ -7153,7 +7154,7 @@ else
       libname=conftest
       save_allow_undefined_flag=$allow_undefined_flag
       allow_undefined_flag=
-      if { (eval echo configure:7157: \"$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; }
+      if { (eval echo configure:7158: \"$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
@@ -7740,7 +7741,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 # test for ln hardlink support
 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
-echo "configure:7744: checking whether ln works" >&5
+echo "configure:7745: checking whether ln works" >&5
 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7763,7 +7764,7 @@ else
 fi
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:7767: checking whether ln -s works" >&5
+echo "configure:7768: checking whether ln -s works" >&5
 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7789,7 +7790,7 @@ if test $ol_enable_perl != no ; then
        # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7793: checking for $ac_word" >&5
+echo "configure:7794: checking for $ac_word" >&5
 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7840,7 +7841,7 @@ fi
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:7844: checking how to run the C preprocessor" >&5
+echo "configure:7845: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -7855,13 +7856,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 7859 "configure"
+#line 7860 "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:7865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7866: \"$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
   :
@@ -7872,13 +7873,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 7876 "configure"
+#line 7877 "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:7882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7883: \"$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
   :
@@ -7889,13 +7890,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 7893 "configure"
+#line 7894 "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:7899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7900: \"$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
   :
@@ -7934,12 +7935,12 @@ fi
 
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:7938: checking for Cygwin environment" >&5
+echo "configure:7939: checking for Cygwin environment" >&5
 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7943 "configure"
+#line 7944 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -7950,7 +7951,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:7954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -7966,19 +7967,19 @@ 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:7970: checking for mingw32 environment" >&5
+echo "configure:7971: checking for mingw32 environment" >&5
 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7975 "configure"
+#line 7976 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:7982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -7997,7 +7998,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:8001: checking for executable suffix" >&5
+echo "configure:8002: checking for executable suffix" >&5
 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8007,7 +8008,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:8011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:8012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.C | *.o | *.obj | *.xcoff) ;;
@@ -8028,13 +8029,13 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6
 ac_exeext=$EXEEXT
 
 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:8032: checking for object suffix" >&5
+echo "configure:8033: checking for object suffix" >&5
 if eval "test \"\${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:8038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   for ac_file in conftest.*; do
     case $ac_file in
     *.c) ;;
@@ -8058,7 +8059,7 @@ EOF
 
 
 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
-echo "configure:8062: checking for be_app in -lbe" >&5
+echo "configure:8063: checking for be_app in -lbe" >&5
 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8066,7 +8067,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbe -lroot -lnet $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8070 "configure"
+#line 8071 "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
@@ -8077,7 +8078,7 @@ int main() {
 be_app()
 ; return 0; }
 EOF
-if { (eval echo configure:8081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8082: \"$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
@@ -8103,7 +8104,7 @@ fi
 
 
 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:8107: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:8108: checking for ${CC-cc} option to accept ANSI C" >&5
 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8120,7 +8121,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO
 do
   CC="$ac_save_CC $ac_arg"
   cat > conftest.$ac_ext <<EOF
-#line 8124 "configure"
+#line 8125 "configure"
 #include "confdefs.h"
 #include <stdarg.h>
 #include <stdio.h>
@@ -8157,7 +8158,7 @@ return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
 
 ; return 0; }
 EOF
-if { (eval echo configure:8161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_prog_cc_stdc="$ac_arg"; break
 else
@@ -8191,7 +8192,7 @@ if test -z "${MKDEP}"; then
        OL_MKDEP="${CC-cc}"
        if test -z "${MKDEP_FLAGS}"; then
                echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
-echo "configure:8195: checking for ${OL_MKDEP} depend flag" >&5
+echo "configure:8196: checking for ${OL_MKDEP} depend flag" >&5
 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8201,7 +8202,7 @@ else
                                cat > conftest.c <<EOF
  noCode;
 EOF
-                               if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
+                               if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
                                        | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
                                then
                                        if test ! -f conftest."${ac_object}" ; then
@@ -8234,7 +8235,7 @@ if test "${ol_cv_mkdep}" = no ; then
 fi
 
 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
-echo "configure:8238: checking for afopen in -ls" >&5
+echo "configure:8239: checking for afopen in -ls" >&5
 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8242,7 +8243,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ls  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8246 "configure"
+#line 8247 "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
@@ -8253,7 +8254,7 @@ int main() {
 afopen()
 ; return 0; }
 EOF
-if { (eval echo configure:8257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8258: \"$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
@@ -8296,17 +8297,17 @@ if test $ol_enable_modules != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8300: checking for $ac_hdr" >&5
+echo "configure:8301: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8305 "configure"
+#line 8306 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8311: \"$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*
@@ -8338,7 +8339,7 @@ done
        fi
 
        echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
-echo "configure:8342: checking for lt_dlinit in -lltdl" >&5
+echo "configure:8343: checking for lt_dlinit in -lltdl" >&5
 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8346,7 +8347,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lltdl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8350 "configure"
+#line 8351 "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
@@ -8357,7 +8358,7 @@ int main() {
 lt_dlinit()
 ; return 0; }
 EOF
-if { (eval echo configure:8361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8362: \"$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
@@ -8405,13 +8406,13 @@ fi
 
 # test for EBCDIC
 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
-echo "configure:8409: checking for EBCDIC" >&5
+echo "configure:8410: checking for EBCDIC" >&5
 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 8415 "configure"
+#line 8416 "configure"
 #include "confdefs.h"
 
 #if !('M' == 0xd4)
@@ -8420,7 +8421,7 @@ else
 
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8425: \"$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*
@@ -8444,12 +8445,12 @@ EOF
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:8448: checking for ANSI C header files" >&5
+echo "configure:8449: checking for ANSI C header files" >&5
 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8453 "configure"
+#line 8454 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -8457,7 +8458,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8462: \"$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*
@@ -8474,7 +8475,7 @@ rm -f conftest*
 if test $ol_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 8478 "configure"
+#line 8479 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -8492,7 +8493,7 @@ fi
 if test $ol_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 8496 "configure"
+#line 8497 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -8513,7 +8514,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 8517 "configure"
+#line 8518 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #ifndef HAVE_EBCDIC
@@ -8531,7 +8532,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:8535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -8565,12 +8566,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:8569: checking for $ac_hdr that defines DIR" >&5
+echo "configure:8570: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8574 "configure"
+#line 8575 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -8578,7 +8579,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:8582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -8603,7 +8604,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:8607: checking for opendir in -ldir" >&5
+echo "configure:8608: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8611,7 +8612,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8615 "configure"
+#line 8616 "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
@@ -8622,7 +8623,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:8626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8627: \"$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
@@ -8644,7 +8645,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:8648: checking for opendir in -lx" >&5
+echo "configure:8649: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8652,7 +8653,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8656 "configure"
+#line 8657 "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
@@ -8663,7 +8664,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:8667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8668: \"$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
@@ -8686,12 +8687,12 @@ fi
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:8690: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:8691: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8695 "configure"
+#line 8696 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -8707,7 +8708,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:8711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -8728,12 +8729,12 @@ EOF
 fi
 
 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
-echo "configure:8732: checking POSIX termios" >&5
+echo "configure:8733: checking POSIX termios" >&5
 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8737 "configure"
+#line 8738 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <unistd.h>
@@ -8743,7 +8744,7 @@ int main() {
    tcgetattr(0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:8747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_sys_posix_termios=yes
 else
@@ -8759,7 +8760,7 @@ echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
 
 
  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
-echo "configure:8763: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
+echo "configure:8764: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8768,7 +8769,7 @@ else
   gwinsz_in_termios_h=no
   if test $am_cv_sys_posix_termios = yes; then
     cat > conftest.$ac_ext <<EOF
-#line 8772 "configure"
+#line 8773 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #     include <termios.h>
@@ -8788,7 +8789,7 @@ rm -f conftest*
 
   if test $gwinsz_in_termios_h = no; then
     cat > conftest.$ac_ext <<EOF
-#line 8792 "configure"
+#line 8793 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #     include <sys/ioctl.h>
@@ -8875,17 +8876,17 @@ for ac_hdr in \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8879: checking for $ac_hdr" >&5
+echo "configure:8880: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8884 "configure"
+#line 8885 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8890: \"$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*
@@ -8915,12 +8916,12 @@ done
 
 
 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:8919: checking for dlopen" >&5
+echo "configure:8920: checking for dlopen" >&5
 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8924 "configure"
+#line 8925 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlopen(); below.  */
@@ -8944,7 +8945,7 @@ f = dlopen;
 
 ; return 0; }
 EOF
-if { (eval echo configure:8948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8949: \"$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
@@ -8962,7 +8963,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:8966: checking for dlopen in -ldl" >&5
+echo "configure:8967: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8970,7 +8971,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8974 "configure"
+#line 8975 "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
@@ -8981,7 +8982,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:8985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8986: \"$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
@@ -9012,7 +9013,7 @@ fi
 
 
 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
-echo "configure:9016: checking for sigset in -lV3" >&5
+echo "configure:9017: checking for sigset in -lV3" >&5
 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9020,7 +9021,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lV3  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9024 "configure"
+#line 9025 "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
@@ -9031,7 +9032,7 @@ int main() {
 sigset()
 ; return 0; }
 EOF
-if { (eval echo configure:9035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9036: \"$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
@@ -9060,12 +9061,12 @@ fi
 
 
 echo $ac_n "checking for winsock""... $ac_c" 1>&6
-echo "configure:9064: checking for winsock" >&5
+echo "configure:9065: checking for winsock" >&5
 save_LIBS="$LIBS"
 for curlib in ws2_32 wsock32; do
        LIBS="$LIBS -l$curlib"
        cat > conftest.$ac_ext <<EOF
-#line 9069 "configure"
+#line 9070 "configure"
 #include "confdefs.h"
 
                        char socket@12();
@@ -9082,7 +9083,7 @@ int main() {
                        
 ; return 0; }
 EOF
-if { (eval echo configure:9086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   have_winsock=yes
 else
@@ -9117,12 +9118,12 @@ echo "$ac_t""$have_winsock" 1>&6
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:9121: checking for socket" >&5
+echo "configure:9122: checking for socket" >&5
 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9126 "configure"
+#line 9127 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -9146,7 +9147,7 @@ f = socket;
 
 ; return 0; }
 EOF
-if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -9165,7 +9166,7 @@ else
   echo "$ac_t""no" 1>&6
        
        echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:9169: checking for main in -lsocket" >&5
+echo "configure:9170: checking for main in -lsocket" >&5
 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9173,14 +9174,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9177 "configure"
+#line 9178 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:9184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9185: \"$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
@@ -9208,7 +9209,7 @@ else
 fi
 
        echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
-echo "configure:9212: checking for main in -lnet" >&5
+echo "configure:9213: checking for main in -lnet" >&5
 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9216,14 +9217,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9220 "configure"
+#line 9221 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:9227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9228: \"$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
@@ -9251,7 +9252,7 @@ else
 fi
 
        echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
-echo "configure:9255: checking for main in -lnsl_s" >&5
+echo "configure:9256: checking for main in -lnsl_s" >&5
 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9259,14 +9260,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9263 "configure"
+#line 9264 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:9270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9271: \"$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
@@ -9294,7 +9295,7 @@ else
 fi
 
        echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:9298: checking for main in -lnsl" >&5
+echo "configure:9299: checking for main in -lnsl" >&5
 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9302,14 +9303,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9306 "configure"
+#line 9307 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:9313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9314: \"$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
@@ -9337,7 +9338,7 @@ else
 fi
 
        echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
-echo "configure:9341: checking for socket in -linet" >&5
+echo "configure:9342: checking for socket in -linet" >&5
 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9345,7 +9346,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-linet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9349 "configure"
+#line 9350 "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
@@ -9356,7 +9357,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9361: \"$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
@@ -9384,7 +9385,7 @@ else
 fi
 
        echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
-echo "configure:9388: checking for main in -lgen" >&5
+echo "configure:9389: checking for main in -lgen" >&5
 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9392,14 +9393,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9396 "configure"
+#line 9397 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:9403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9404: \"$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
@@ -9431,12 +9432,12 @@ fi
 
 
 echo $ac_n "checking for select""... $ac_c" 1>&6
-echo "configure:9435: checking for select" >&5
+echo "configure:9436: checking for select" >&5
 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9440 "configure"
+#line 9441 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char select(); below.  */
@@ -9460,7 +9461,7 @@ f = select;
 
 ; return 0; }
 EOF
-if { (eval echo configure:9464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_select=yes"
 else
@@ -9483,7 +9484,7 @@ fi
 
 if test "${ac_cv_header_winsock_h}" != yes; then
                                echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
-echo "configure:9487: checking types of arguments for select()" >&5
+echo "configure:9488: checking types of arguments for select()" >&5
  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -9497,7 +9498,7 @@ else
      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
        cat > conftest.$ac_ext <<EOF
-#line 9501 "configure"
+#line 9502 "configure"
 #include "confdefs.h"
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -9516,7 +9517,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:9520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
           ac_not_found=no ; break 3
 else
@@ -9561,17 +9562,17 @@ for ac_hdr in regex.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9565: checking for $ac_hdr" >&5
+echo "configure:9566: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9570 "configure"
+#line 9571 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9576: \"$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*
@@ -9602,14 +9603,14 @@ if test "$ac_cv_header_regex_h" != yes ; then
 fi
 
 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
-echo "configure:9606: checking for library containing regfree" >&5
+echo "configure:9607: checking for library containing regfree" >&5
 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_regfree="no"
 cat > conftest.$ac_ext <<EOF
-#line 9613 "configure"
+#line 9614 "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
@@ -9620,7 +9621,7 @@ int main() {
 regfree()
 ; return 0; }
 EOF
-if { (eval echo configure:9624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_regfree="none required"
 else
@@ -9631,7 +9632,7 @@ rm -f conftest*
 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9635 "configure"
+#line 9636 "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
@@ -9642,7 +9643,7 @@ int main() {
 regfree()
 ; return 0; }
 EOF
-if { (eval echo configure:9646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_regfree="-l$ac_lib"
 break
@@ -9665,7 +9666,7 @@ fi
 
 
 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
-echo "configure:9669: checking for compatible POSIX regex" >&5
+echo "configure:9670: checking for compatible POSIX regex" >&5
 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -9674,7 +9675,7 @@ else
   ol_cv_c_posix_regex=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9678 "configure"
+#line 9679 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -9700,7 +9701,7 @@ main()
        return rc;
 }
 EOF
-if { (eval echo configure:9704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_c_posix_regex=yes
 else
@@ -9726,17 +9727,17 @@ for ac_hdr in sys/uuid.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9730: checking for $ac_hdr" >&5
+echo "configure:9731: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9735 "configure"
+#line 9736 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9741: \"$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*
@@ -9766,14 +9767,14 @@ if test $ac_cv_header_sys_uuid_h = yes ; then
        save_LIBS="$LIBS"
        
 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
-echo "configure:9770: checking for library containing uuid_to_str" >&5
+echo "configure:9771: checking for library containing uuid_to_str" >&5
 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_uuid_to_str="no"
 cat > conftest.$ac_ext <<EOF
-#line 9777 "configure"
+#line 9778 "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
@@ -9784,7 +9785,7 @@ int main() {
 uuid_to_str()
 ; return 0; }
 EOF
-if { (eval echo configure:9788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_uuid_to_str="none required"
 else
@@ -9795,7 +9796,7 @@ rm -f conftest*
 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9799 "configure"
+#line 9800 "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
@@ -9806,7 +9807,7 @@ int main() {
 uuid_to_str()
 ; return 0; }
 EOF
-if { (eval echo configure:9810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_uuid_to_str="-l$ac_lib"
 break
@@ -9841,11 +9842,11 @@ fi
 
 if test $have_uuid = no ; then
        echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
-echo "configure:9845: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
+echo "configure:9846: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
        save_LIBS="$LIBS"
        LIBS="$LIBS -lrpcrt4"
        cat > conftest.$ac_ext <<EOF
-#line 9849 "configure"
+#line 9850 "configure"
 #include "confdefs.h"
 
                char UuidCreate@4();
@@ -9858,7 +9859,7 @@ int main() {
                
 ; return 0; }
 EOF
-if { (eval echo configure:9862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   need_rpcrt=yes
 else
@@ -9877,12 +9878,12 @@ fi
 
 ol_link_dnssrv=no
 echo $ac_n "checking for res_query""... $ac_c" 1>&6
-echo "configure:9881: checking for res_query" >&5
+echo "configure:9882: checking for res_query" >&5
 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9886 "configure"
+#line 9887 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char res_query(); below.  */
@@ -9906,7 +9907,7 @@ f = res_query;
 
 ; return 0; }
 EOF
-if { (eval echo configure:9910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_res_query=yes"
 else
@@ -9927,12 +9928,12 @@ fi
 
 if test $ac_cv_func_res_query = no ; then 
        echo $ac_n "checking for __res_query""... $ac_c" 1>&6
-echo "configure:9931: checking for __res_query" >&5
+echo "configure:9932: checking for __res_query" >&5
 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9936 "configure"
+#line 9937 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __res_query(); below.  */
@@ -9956,7 +9957,7 @@ f = __res_query;
 
 ; return 0; }
 EOF
-if { (eval echo configure:9960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___res_query=yes"
 else
@@ -9980,7 +9981,7 @@ fi
 
 if test $ac_cv_func_res_query = no ; then 
        echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
-echo "configure:9984: checking for res_query in -lbind" >&5
+echo "configure:9985: checking for res_query in -lbind" >&5
 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9988,7 +9989,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9992 "configure"
+#line 9993 "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
@@ -9999,7 +10000,7 @@ int main() {
 res_query()
 ; return 0; }
 EOF
-if { (eval echo configure:10003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10004: \"$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
@@ -10031,7 +10032,7 @@ fi
 
 if test $ac_cv_func_res_query = no ; then 
        echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
-echo "configure:10035: checking for __res_query in -lbind" >&5
+echo "configure:10036: checking for __res_query in -lbind" >&5
 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10039,7 +10040,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10043 "configure"
+#line 10044 "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
@@ -10050,7 +10051,7 @@ int main() {
 __res_query()
 ; return 0; }
 EOF
-if { (eval echo configure:10054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10055: \"$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
@@ -10082,7 +10083,7 @@ fi
 
 if test $ac_cv_func_res_query = no ; then 
        echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
-echo "configure:10086: checking for res_query in -lresolv" >&5
+echo "configure:10087: checking for res_query in -lresolv" >&5
 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10090,7 +10091,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10094 "configure"
+#line 10095 "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
@@ -10101,7 +10102,7 @@ int main() {
 res_query()
 ; return 0; }
 EOF
-if { (eval echo configure:10105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10106: \"$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
@@ -10133,7 +10134,7 @@ fi
 
 if test $ac_cv_func_res_query = no ; then 
        echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
-echo "configure:10137: checking for __res_query in -lresolv" >&5
+echo "configure:10138: checking for __res_query in -lresolv" >&5
 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10141,7 +10142,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10145 "configure"
+#line 10146 "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
@@ -10152,7 +10153,7 @@ int main() {
 __res_query()
 ; return 0; }
 EOF
-if { (eval echo configure:10156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10157: \"$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
 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10204: checking for $ac_func" >&5
+echo "configure:10205: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10209 "configure"
+#line 10210 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -10229,7 +10230,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:10233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -10261,13 +10262,13 @@ if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
        fi
 elif test $ol_enable_ipv6 != no ; then
        echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
-echo "configure:10265: checking INET6_ADDRSTRLEN" >&5
+echo "configure:10266: checking INET6_ADDRSTRLEN" >&5
 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 10271 "configure"
+#line 10272 "configure"
 #include "confdefs.h"
 
 #                      include <netinet/in.h>
@@ -10292,13 +10293,13 @@ echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
 
 
        echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
-echo "configure:10296: checking struct sockaddr_storage" >&5
+echo "configure:10297: checking struct sockaddr_storage" >&5
 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 10302 "configure"
+#line 10303 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10310,7 +10311,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:10314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_struct_sockaddr_storage=yes
 else
@@ -10341,17 +10342,17 @@ if test $ol_enable_local != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10345: checking for $ac_hdr" >&5
+echo "configure:10346: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10350 "configure"
+#line 10351 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10356: \"$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*
@@ -10398,17 +10399,17 @@ if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10402: checking for $ac_hdr" >&5
+echo "configure:10403: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10407 "configure"
+#line 10408 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10413: \"$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*
@@ -10440,17 +10441,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10444: checking for $ac_hdr" >&5
+echo "configure:10445: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10449 "configure"
+#line 10450 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10455: \"$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*
@@ -10484,7 +10485,7 @@ done
 
                if test $krb5_impl = mit; then
                        echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
-echo "configure:10488: checking for main in -lk5crypto" >&5
+echo "configure:10489: checking for main in -lk5crypto" >&5
 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10492,14 +10493,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lk5crypto  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10496 "configure"
+#line 10497 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10504: \"$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
@@ -10522,7 +10523,7 @@ fi
 
 
                        echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
-echo "configure:10526: checking for main in -lkrb5" >&5
+echo "configure:10527: checking for main in -lkrb5" >&5
 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10530,14 +10531,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10534 "configure"
+#line 10535 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10542: \"$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
@@ -10562,7 +10563,7 @@ fi
 
                elif test $krb5_impl = heimdal; then
                        echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
-echo "configure:10566: checking for main in -ldes" >&5
+echo "configure:10567: checking for main in -ldes" >&5
 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10570,14 +10571,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldes  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10574 "configure"
+#line 10575 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10582: \"$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
@@ -10600,7 +10601,7 @@ fi
 
 
                        echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
-echo "configure:10604: checking for main in -lkrb5" >&5
+echo "configure:10605: checking for main in -lkrb5" >&5
 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10608,14 +10609,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10612 "configure"
+#line 10613 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10620: \"$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
@@ -10678,17 +10679,17 @@ if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10682: checking for $ac_hdr" >&5
+echo "configure:10683: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10687 "configure"
+#line 10688 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10693: \"$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*
@@ -10718,7 +10719,7 @@ done
        if test $ac_cv_header_kerberosIV_krb_h = yes ; then
                if test $krb5_impl = mit; then
                        echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
-echo "configure:10722: checking for main in -lkrb4" >&5
+echo "configure:10723: checking for main in -lkrb4" >&5
 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10726,14 +10727,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10730 "configure"
+#line 10731 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10738: \"$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
@@ -10758,7 +10759,7 @@ fi
 
                elif test $krb5_impl = heimdal; then
                        echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
-echo "configure:10762: checking for main in -lkrb4" >&5
+echo "configure:10763: checking for main in -lkrb4" >&5
 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10766,14 +10767,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10770 "configure"
+#line 10771 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10778: \"$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
@@ -10815,7 +10816,7 @@ EOF
 
 
                        echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
-echo "configure:10819: checking for des_debug in Kerberos libraries" >&5
+echo "configure:10820: checking for des_debug in Kerberos libraries" >&5
 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -10823,7 +10824,7 @@ else
                                                                save_LIBS="$LIBS"
                                LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
                                cat > conftest.$ac_ext <<EOF
-#line 10827 "configure"
+#line 10828 "configure"
 #include "confdefs.h"
 
 #include <kerberosIV/krb.h>
@@ -10836,7 +10837,7 @@ des_debug = 1;
 
 ; return 0; }
 EOF
-if { (eval echo configure:10840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_var_des_debug=yes
 else
@@ -10875,17 +10876,17 @@ if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10879: checking for $ac_hdr" >&5
+echo "configure:10880: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10884 "configure"
+#line 10885 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10890: \"$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*
@@ -10914,7 +10915,7 @@ done
 
        if test $ac_cv_header_krb_h = yes ; then
                echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
-echo "configure:10918: checking for main in -lkrb" >&5
+echo "configure:10919: checking for main in -lkrb" >&5
 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10922,14 +10923,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb -ldes $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10926 "configure"
+#line 10927 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10934: \"$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
@@ -10999,17 +11000,17 @@ if test $ol_with_tls != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11003: checking for $ac_hdr" >&5
+echo "configure:11004: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11008 "configure"
+#line 11009 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11014: \"$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*
@@ -11039,7 +11040,7 @@ done
        if test $ac_cv_header_openssl_ssl_h = yes \
                -o $ac_cv_header_ssl_h = yes ; then
                echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
-echo "configure:11043: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
+echo "configure:11044: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -11047,7 +11048,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lssl -lcrypto $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11051 "configure"
+#line 11052 "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
@@ -11058,7 +11059,7 @@ int main() {
 SSLeay_add_ssl_algorithms()
 ; return 0; }
 EOF
-if { (eval echo configure:11062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11063: \"$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
@@ -11083,7 +11084,7 @@ fi
                        
                if test $have_ssleay = no ; then
                        echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
-echo "configure:11087: checking for SSL_library_init in -lssl" >&5
+echo "configure:11088: checking for SSL_library_init in -lssl" >&5
 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -11091,7 +11092,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lssl -lcrypto $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11095 "configure"
+#line 11096 "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
@@ -11102,7 +11103,7 @@ int main() {
 SSL_library_init()
 ; return 0; }
 EOF
-if { (eval echo configure:11106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11107: \"$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
@@ -11128,7 +11129,7 @@ fi
 
                if test $have_ssleay = no ; then
                        echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
-echo "configure:11132: checking for ssl3_accept in -lssl" >&5
+echo "configure:11133: checking for ssl3_accept in -lssl" >&5
 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -11136,7 +11137,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11140 "configure"
+#line 11141 "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
@@ -11147,7 +11148,7 @@ int main() {
 ssl3_accept()
 ; return 0; }
 EOF
-if { (eval echo configure:11151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11152: \"$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
@@ -11229,12 +11230,12 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 
        
        echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
-echo "configure:11233: checking for _beginthread" >&5
+echo "configure:11234: checking for _beginthread" >&5
 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11238 "configure"
+#line 11239 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _beginthread(); below.  */
@@ -11258,7 +11259,7 @@ f = _beginthread;
 
 ; return 0; }
 EOF
-if { (eval echo configure:11262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__beginthread=yes"
 else
@@ -11314,17 +11315,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11318: checking for $ac_hdr" >&5
+echo "configure:11319: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11323 "configure"
+#line 11324 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11329: \"$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*
@@ -11353,13 +11354,13 @@ done
 
        if test $ac_cv_header_pthread_h = yes ; then
                echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
-echo "configure:11357: checking POSIX thread version" >&5
+echo "configure:11358: checking POSIX thread version" >&5
 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 11363 "configure"
+#line 11364 "configure"
 #include "confdefs.h"
 
 #              include <pthread.h>
@@ -11370,11 +11371,11 @@ int main() {
        
 ; return 0; }
 EOF
-if { (eval echo configure:11374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        cat > conftest.$ac_ext <<EOF
-#line 11378 "configure"
+#line 11379 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -11394,7 +11395,7 @@ else
   rm -rf conftest*
   
        cat > conftest.$ac_ext <<EOF
-#line 11398 "configure"
+#line 11399 "configure"
 #include "confdefs.h"
 
 #              include <pthread.h>
@@ -11411,7 +11412,7 @@ else
   rm -rf conftest*
   
        cat > conftest.$ac_ext <<EOF
-#line 11415 "configure"
+#line 11416 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -11423,7 +11424,7 @@ else
   rm -rf conftest*
   
        cat > conftest.$ac_ext <<EOF
-#line 11427 "configure"
+#line 11428 "configure"
 #include "confdefs.h"
 
 #              include <pthread.h>
@@ -11470,12 +11471,12 @@ EOF
 
                
        echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
-echo "configure:11474: checking for LinuxThreads pthread.h" >&5
+echo "configure:11475: checking for LinuxThreads pthread.h" >&5
 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11479 "configure"
+#line 11480 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -11502,12 +11503,12 @@ EOF
 
                
        echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
-echo "configure:11506: checking for GNU Pth pthread.h" >&5
+echo "configure:11507: checking for GNU Pth pthread.h" >&5
 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11511 "configure"
+#line 11512 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 #ifdef _POSIX_THREAD_IS_GNU_PTH
@@ -11536,17 +11537,17 @@ echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11540: checking for $ac_hdr" >&5
+echo "configure:11541: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11545 "configure"
+#line 11546 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11551: \"$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*
@@ -11576,14 +11577,14 @@ done
 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
-echo "configure:11580: checking for pthread_create in default libraries" >&5
+echo "configure:11581: checking for pthread_create in default libraries" >&5
 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 11587 "configure"
+#line 11588 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -11650,7 +11651,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:11654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_create=yes
 else
@@ -11662,7 +11663,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 11666 "configure"
+#line 11667 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -11734,7 +11735,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:11738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_create=yes
 else
@@ -11759,7 +11760,7 @@ echo "$ac_t""$ol_cv_pthread_create" 1>&6
 if test "$ol_link_threads" = no ; then
        # try -kthread
        echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
-echo "configure:11763: checking for pthread link with -kthread" >&5
+echo "configure:11764: checking for pthread link with -kthread" >&5
 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -11770,7 +11771,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 11774 "configure"
+#line 11775 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -11837,7 +11838,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:11841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_kthread=yes
 else
@@ -11849,7 +11850,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 11853 "configure"
+#line 11854 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -11921,7 +11922,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:11925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_kthread=yes
 else
@@ -11951,7 +11952,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -pthread
        echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
-echo "configure:11955: checking for pthread link with -pthread" >&5
+echo "configure:11956: checking for pthread link with -pthread" >&5
 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -11962,7 +11963,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 11966 "configure"
+#line 11967 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12029,7 +12030,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:12033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_pthread=yes
 else
@@ -12041,7 +12042,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 12045 "configure"
+#line 12046 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12113,7 +12114,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:12117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_pthread=yes
 else
@@ -12143,7 +12144,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -pthreads
        echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
-echo "configure:12147: checking for pthread link with -pthreads" >&5
+echo "configure:12148: checking for pthread link with -pthreads" >&5
 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -12154,7 +12155,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 12158 "configure"
+#line 12159 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12221,7 +12222,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:12225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_pthreads=yes
 else
@@ -12233,7 +12234,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 12237 "configure"
+#line 12238 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12305,7 +12306,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:12309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_pthreads=yes
 else
@@ -12335,7 +12336,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -mthreads
        echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
-echo "configure:12339: checking for pthread link with -mthreads" >&5
+echo "configure:12340: checking for pthread link with -mthreads" >&5
 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -12346,7 +12347,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 12350 "configure"
+#line 12351 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12413,7 +12414,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:12417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_mthreads=yes
 else
@@ -12425,7 +12426,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 12429 "configure"
+#line 12430 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12497,7 +12498,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:12501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_mthreads=yes
 else
@@ -12527,7 +12528,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -thread
        echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
-echo "configure:12531: checking for pthread link with -thread" >&5
+echo "configure:12532: checking for pthread link with -thread" >&5
 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -12538,7 +12539,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 12542 "configure"
+#line 12543 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12605,7 +12606,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:12609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_thread=yes
 else
@@ -12617,7 +12618,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 12621 "configure"
+#line 12622 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12689,7 +12690,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:12693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_thread=yes
 else
@@ -12720,7 +12721,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthread -lmach -lexc -lc_r
        echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
-echo "configure:12724: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
+echo "configure:12725: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -12731,7 +12732,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 12735 "configure"
+#line 12736 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12798,7 +12799,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:12802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
 else
@@ -12810,7 +12811,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 12814 "configure"
+#line 12815 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12882,7 +12883,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:12886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
 else
@@ -12912,7 +12913,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthread -lmach -lexc
        echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
-echo "configure:12916: checking for pthread link with -lpthread -lmach -lexc" >&5
+echo "configure:12917: checking for pthread link with -lpthread -lmach -lexc" >&5
 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -12923,7 +12924,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 12927 "configure"
+#line 12928 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -12990,7 +12991,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:12994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthread_lmach_lexc=yes
 else
@@ -13002,7 +13003,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13006 "configure"
+#line 13007 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -13074,7 +13075,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:13078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthread_lmach_lexc=yes
 else
@@ -13105,7 +13106,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthread -Wl,-woff,85
        echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
-echo "configure:13109: checking for pthread link with -lpthread -Wl,-woff,85" >&5
+echo "configure:13110: checking for pthread link with -lpthread -Wl,-woff,85" >&5
 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -13116,7 +13117,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 13120 "configure"
+#line 13121 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -13183,7 +13184,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:13187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lib_lpthread_woff=yes
 else
@@ -13195,7 +13196,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13199 "configure"
+#line 13200 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -13267,7 +13268,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:13271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lib_lpthread_woff=yes
 else
@@ -13298,7 +13299,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthread
        echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
-echo "configure:13302: checking for pthread link with -lpthread" >&5
+echo "configure:13303: checking for pthread link with -lpthread" >&5
 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -13309,7 +13310,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 13313 "configure"
+#line 13314 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -13376,7 +13377,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:13380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthread=yes
 else
@@ -13388,7 +13389,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13392 "configure"
+#line 13393 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -13460,7 +13461,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:13464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthread=yes
 else
@@ -13490,7 +13491,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lc_r
        echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
-echo "configure:13494: checking for pthread link with -lc_r" >&5
+echo "configure:13495: checking for pthread link with -lc_r" >&5
 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -13501,7 +13502,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 13505 "configure"
+#line 13506 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -13568,7 +13569,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:13572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lc_r=yes
 else
@@ -13580,7 +13581,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13584 "configure"
+#line 13585 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -13652,7 +13653,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:13656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lc_r=yes
 else
@@ -13683,7 +13684,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -threads
        echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
-echo "configure:13687: checking for pthread link with -threads" >&5
+echo "configure:13688: checking for pthread link with -threads" >&5
 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -13694,7 +13695,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 13698 "configure"
+#line 13699 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -13761,7 +13762,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:13765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_threads=yes
 else
@@ -13773,7 +13774,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13777 "configure"
+#line 13778 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -13845,7 +13846,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:13849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_threads=yes
 else
@@ -13876,7 +13877,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthreads -lmach -lexc -lc_r
        echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
-echo "configure:13880: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
+echo "configure:13881: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -13887,7 +13888,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 13891 "configure"
+#line 13892 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -13954,7 +13955,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:13958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
 else
@@ -13966,7 +13967,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13970 "configure"
+#line 13971 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -14038,7 +14039,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:14042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
 else
@@ -14068,7 +14069,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthreads -lmach -lexc
        echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
-echo "configure:14072: checking for pthread link with -lpthreads -lmach -lexc" >&5
+echo "configure:14073: checking for pthread link with -lpthreads -lmach -lexc" >&5
 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14079,7 +14080,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 14083 "configure"
+#line 14084 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -14146,7 +14147,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:14150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthreads_lmach_lexc=yes
 else
@@ -14158,7 +14159,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 14162 "configure"
+#line 14163 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -14230,7 +14231,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:14234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthreads_lmach_lexc=yes
 else
@@ -14260,7 +14261,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthreads -lexc
        echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
-echo "configure:14264: checking for pthread link with -lpthreads -lexc" >&5
+echo "configure:14265: checking for pthread link with -lpthreads -lexc" >&5
 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14271,7 +14272,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 14275 "configure"
+#line 14276 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -14338,7 +14339,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:14342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthreads_lexc=yes
 else
@@ -14350,7 +14351,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 14354 "configure"
+#line 14355 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -14422,7 +14423,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:14426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthreads_lexc=yes
 else
@@ -14453,7 +14454,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthreads
        echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
-echo "configure:14457: checking for pthread link with -lpthreads" >&5
+echo "configure:14458: checking for pthread link with -lpthreads" >&5
 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14464,7 +14465,7 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 14468 "configure"
+#line 14469 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -14531,7 +14532,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:14535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lib_lpthreads=yes
 else
@@ -14543,7 +14544,7 @@ fi
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 14547 "configure"
+#line 14548 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -14615,7 +14616,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:14619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lib_lpthreads=yes
 else
                                                                                                for ac_func in sched_yield pthread_yield thr_yield
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14656: checking for $ac_func" >&5
+echo "configure:14657: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 14661 "configure"
+#line 14662 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -14681,7 +14682,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:14685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -14710,7 +14711,7 @@ done
                                $ac_cv_func_pthread_yield = no -a \
                                $ac_cv_func_thr_yield = no ; then
                                                                echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
-echo "configure:14714: checking for sched_yield in -lrt" >&5
+echo "configure:14715: checking for sched_yield in -lrt" >&5
 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -14718,7 +14719,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14722 "configure"
+#line 14723 "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
@@ -14729,7 +14730,7 @@ int main() {
 sched_yield()
 ; return 0; }
 EOF
-if { (eval echo configure:14733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14734: \"$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
                                                for ac_func in pthread_kill pthread_rwlock_destroy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14769: checking for $ac_func" >&5
+echo "configure:14770: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 14774 "configure"
+#line 14775 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -14794,7 +14795,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:14798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -14820,13 +14821,13 @@ done
 
 
                                                                        echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
-echo "configure:14824: checking for pthread_detach with <pthread.h>" >&5
+echo "configure:14825: checking for pthread_detach with <pthread.h>" >&5
 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                                                                cat > conftest.$ac_ext <<EOF
-#line 14830 "configure"
+#line 14831 "configure"
 #include "confdefs.h"
 
 #include <pthread.h>
@@ -14838,7 +14839,7 @@ int main() {
 pthread_detach(NULL);
 ; return 0; }
 EOF
-if { (eval echo configure:14842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_func_pthread_detach=yes
 else
@@ -14870,12 +14871,12 @@ EOF
                        
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14874: checking for $ac_func" >&5
+echo "configure:14875: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 14879 "configure"
+#line 14880 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -14899,7 +14900,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:14903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -14928,12 +14929,12 @@ done
        for ac_func in pthread_kill_other_threads_np
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14932: checking for $ac_func" >&5
+echo "configure:14933: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 14937 "configure"
+#line 14938 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -14957,7 +14958,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:14961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -14982,7 +14983,7 @@ fi
 done
 
        echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
-echo "configure:14986: checking for LinuxThreads implementation" >&5
+echo "configure:14987: checking for LinuxThreads implementation" >&5
 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14995,7 +14996,7 @@ echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
        
        
        echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
-echo "configure:14999: checking for LinuxThreads consistency" >&5
+echo "configure:15000: checking for LinuxThreads consistency" >&5
 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -15020,7 +15021,7 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6
                        fi
 
                        echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
-echo "configure:15024: checking if pthread_create() works" >&5
+echo "configure:15025: checking if pthread_create() works" >&5
 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -15029,7 +15030,7 @@ else
                                ol_cv_pthread_create_works=yes
 else
   cat > conftest.$ac_ext <<EOF
-#line 15033 "configure"
+#line 15034 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
@@ -15101,7 +15102,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:15105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_create_works=yes
 else
@@ -15123,7 +15124,7 @@ echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
 
                                                if test $ol_with_yielding_select = auto ; then
                                echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
-echo "configure:15127: checking if select yields when using pthreads" >&5
+echo "configure:15128: checking if select yields when using pthreads" >&5
 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -15132,7 +15133,7 @@ else
   ol_cv_pthread_select_yields=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 15136 "configure"
+#line 15137 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -15209,7 +15210,7 @@ int main(argc, argv)
        exit(2);
 }
 EOF
-if { (eval echo configure:15213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_select_yields=no
 else
@@ -15253,17 +15254,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:15257: checking for $ac_hdr" >&5
+echo "configure:15258: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15262 "configure"
+#line 15263 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15268: \"$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*
@@ -15293,12 +15294,12 @@ done
                ol_with_threads=found
 
                                echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
-echo "configure:15297: checking for cthread_fork" >&5
+echo "configure:15298: checking for cthread_fork" >&5
 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15302 "configure"
+#line 15303 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char cthread_fork(); below.  */
@@ -15322,7 +15323,7 @@ f = cthread_fork;
 
 ; return 0; }
 EOF
-if { (eval echo configure:15326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_cthread_fork=yes"
 else
@@ -15344,7 +15345,7 @@ fi
 
                if test $ol_link_threads = no ; then
                                                                        echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
-echo "configure:15348: checking for cthread_fork with -all_load" >&5
+echo "configure:15349: checking for cthread_fork with -all_load" >&5
 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -15352,7 +15353,7 @@ else
                                                                save_LIBS="$LIBS"
                                LIBS="-all_load $LIBS"
                                cat > conftest.$ac_ext <<EOF
-#line 15356 "configure"
+#line 15357 "configure"
 #include "confdefs.h"
 #include <mach/cthreads.h>
 int main() {
@@ -15361,7 +15362,7 @@ int main() {
                                        
 ; return 0; }
 EOF
-if { (eval echo configure:15365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_cthread_all_load=yes
 else
@@ -15391,12 +15392,12 @@ echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
                                save_LIBS="$LIBS"
                LIBS="$LIBS -lthreads"
                echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
-echo "configure:15395: checking for cthread_fork" >&5
+echo "configure:15396: checking for cthread_fork" >&5
 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15400 "configure"
+#line 15401 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char cthread_fork(); below.  */
@@ -15420,7 +15421,7 @@ f = cthread_fork;
 
 ; return 0; }
 EOF
-if { (eval echo configure:15424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_cthread_fork=yes"
 else
@@ -15470,17 +15471,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:15474: checking for $ac_hdr" >&5
+echo "configure:15475: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15479 "configure"
+#line 15480 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15485: \"$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*
@@ -15509,7 +15510,7 @@ done
 
        if test $ac_cv_header_pth_h = yes ; then
                echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
-echo "configure:15513: checking for pth_version in -lpth" >&5
+echo "configure:15514: checking for pth_version in -lpth" >&5
 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15517,7 +15518,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15521 "configure"
+#line 15522 "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
@@ -15528,7 +15529,7 @@ int main() {
 pth_version()
 ; return 0; }
 EOF
-if { (eval echo configure:15532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15533: \"$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
@@ -15573,17 +15574,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:15577: checking for $ac_hdr" >&5
+echo "configure:15578: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15582 "configure"
+#line 15583 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15588: \"$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*
@@ -15611,7 +15612,7 @@ done
 
        if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
                echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
-echo "configure:15615: checking for thr_create in -lthread" >&5
+echo "configure:15616: checking for thr_create in -lthread" >&5
 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15619,7 +15620,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15623 "configure"
+#line 15624 "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
@@ -15630,7 +15631,7 @@ int main() {
 thr_create()
 ; return 0; }
 EOF
-if { (eval echo configure:15634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15635: \"$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
@@ -15670,12 +15671,12 @@ EOF
                        
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15674: checking for $ac_func" >&5
+echo "configure:15675: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15679 "configure"
+#line 15680 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -15699,7 +15700,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:15703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -15730,17 +15731,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:15734: checking for $ac_hdr" >&5
+echo "configure:15735: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15739 "configure"
+#line 15740 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15745: \"$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*
@@ -15768,7 +15769,7 @@ done
 
        if test $ac_cv_header_lwp_lwp_h = yes ; then
                echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
-echo "configure:15772: checking for lwp_create in -llwp" >&5
+echo "configure:15773: checking for lwp_create in -llwp" >&5
 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15776,7 +15777,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llwp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15780 "configure"
+#line 15781 "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
@@ -15787,7 +15788,7 @@ int main() {
 lwp_create()
 ; return 0; }
 EOF
-if { (eval echo configure:15791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15792: \"$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
@@ -15840,17 +15841,17 @@ if test $ol_with_threads = manual ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:15844: checking for $ac_hdr" >&5
+echo "configure:15845: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15849 "configure"
+#line 15850 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15855: \"$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*
@@ -15879,12 +15880,12 @@ done
        for ac_func in sched_yield pthread_yield
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15883: checking for $ac_func" >&5
+echo "configure:15884: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15888 "configure"
+#line 15889 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -15908,7 +15909,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:15912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -15934,12 +15935,12 @@ done
 
        
        echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
-echo "configure:15938: checking for LinuxThreads pthread.h" >&5
+echo "configure:15939: checking for LinuxThreads pthread.h" >&5
 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15943 "configure"
+#line 15944 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -15969,17 +15970,17 @@ EOF
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:15973: checking for $ac_hdr" >&5
+echo "configure:15974: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15978 "configure"
+#line 15979 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15984: \"$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*
@@ -16009,17 +16010,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16013: checking for $ac_hdr" >&5
+echo "configure:16014: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16018 "configure"
+#line 16019 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16024: \"$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*
@@ -16049,17 +16050,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16053: checking for $ac_hdr" >&5
+echo "configure:16054: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16058 "configure"
+#line 16059 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16064: \"$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*
@@ -16118,20 +16119,20 @@ EOF
 
 
                        echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
-echo "configure:16122: checking for thread specific errno" >&5
+echo "configure:16123: checking for thread specific errno" >&5
 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 16128 "configure"
+#line 16129 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
 errno = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:16135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_errno_thread_specific=yes
 else
 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
 
                        echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
-echo "configure:16151: checking for thread specific h_errno" >&5
+echo "configure:16152: checking for thread specific h_errno" >&5
 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 16157 "configure"
+#line 16158 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 h_errno = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:16164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_h_errno_thread_specific=yes
 else
@@ -16213,12 +16214,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16217: checking for $ac_func" >&5
+echo "configure:16218: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16222 "configure"
+#line 16223 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -16242,7 +16243,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:16246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -16271,19 +16272,19 @@ if test "$ac_cv_func_ctime_r" = no ; then
        ol_cv_func_ctime_r_nargs=0
 else
        echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
-echo "configure:16275: checking number of arguments of ctime_r" >&5
+echo "configure:16276: checking number of arguments of ctime_r" >&5
 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16280 "configure"
+#line 16281 "configure"
 #include "confdefs.h"
 #include <time.h>
 int main() {
 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
 ; return 0; }
 EOF
-if { (eval echo configure:16287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_ctime_r_nargs3=yes
 else
 rm -f conftest*
 
        cat > conftest.$ac_ext <<EOF
-#line 16299 "configure"
+#line 16300 "configure"
 #include "confdefs.h"
 #include <time.h>
 int main() {
 time_t ti; char *buffer; ctime_r(&ti,buffer);
 ; return 0; }
 EOF
-if { (eval echo configure:16306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_ctime_r_nargs2=yes
 else
 
 if test "$ac_cv_func_gethostbyname_r" = yes ; then
        echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
-echo "configure:16346: checking number of arguments of gethostbyname_r" >&5
+echo "configure:16347: checking number of arguments of gethostbyname_r" >&5
 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16351 "configure"
+#line 16352 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -16361,7 +16362,7 @@ struct hostent hent; char buffer[BUFSIZE];
                        buffer, bufsize, &h_errno);
 ; return 0; }
 EOF
-if { (eval echo configure:16365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_gethostbyname_r_nargs5=yes
 else
@@ -16373,7 +16374,7 @@ fi
 rm -f conftest*
 
        cat > conftest.$ac_ext <<EOF
-#line 16377 "configure"
+#line 16378 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -16388,7 +16389,7 @@ struct hostent hent;struct hostent *rhent;
                        &rhent, &h_errno);
 ; return 0; }
 EOF
-if { (eval echo configure:16392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_gethostbyname_r_nargs6=yes
 else
  
 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
        echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
-echo "configure:16433: checking number of arguments of gethostbyaddr_r" >&5
+echo "configure:16434: checking number of arguments of gethostbyaddr_r" >&5
 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16438 "configure"
+#line 16439 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -16450,7 +16451,7 @@ struct hostent hent; char buffer[BUFSIZE];
                        alen, AF_INET, &hent, buffer, bufsize, &h_errno);
 ; return 0; }
 EOF
-if { (eval echo configure:16454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_gethostbyaddr_r_nargs7=yes
 else
@@ -16462,7 +16463,7 @@ fi
 rm -f conftest*
 
        cat > conftest.$ac_ext <<EOF
-#line 16466 "configure"
+#line 16467 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -16480,7 +16481,7 @@ struct hostent hent;
                        &rhent, &h_errno);
 ; return 0; }
 EOF
-if { (eval echo configure:16484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_gethostbyaddr_r_nargs8=yes
 else
@@ -16530,17 +16531,17 @@ if test $ol_with_ldbm_api = auto \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16534: checking for $ac_hdr" >&5
+echo "configure:16535: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16539 "configure"
+#line 16540 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16545: \"$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*
@@ -16568,13 +16569,13 @@ done
 
 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
        echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
-echo "configure:16572: checking if Berkeley DB header compatibility" >&5
+echo "configure:16573: checking if Berkeley DB header compatibility" >&5
 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 16578 "configure"
+#line 16579 "configure"
 #include "confdefs.h"
 
 #if HAVE_DB_185_H
@@ -16611,7 +16612,7 @@ echo "$ac_t""$ol_cv_header_db1" 1>&6
                ol_cv_lib_db=no
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
-echo "configure:16615: checking for Berkeley DB link (default)" >&5
+echo "configure:16616: checking for Berkeley DB link (default)" >&5
 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -16621,7 +16622,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 16625 "configure"
+#line 16626 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -16668,7 +16669,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:16672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_none=yes
 else
@@ -16692,7 +16693,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
-echo "configure:16696: checking for Berkeley DB link (-ldb41)" >&5
+echo "configure:16697: checking for Berkeley DB link (-ldb41)" >&5
 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -16702,7 +16703,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 16706 "configure"
+#line 16707 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -16749,7 +16750,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:16753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db41=yes
 else
@@ -16773,7 +16774,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
-echo "configure:16777: checking for Berkeley DB link (-ldb-41)" >&5
+echo "configure:16778: checking for Berkeley DB link (-ldb-41)" >&5
 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -16783,7 +16784,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 16787 "configure"
+#line 16788 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -16830,7 +16831,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:16834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_41=yes
 else
@@ -16854,7 +16855,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
-echo "configure:16858: checking for Berkeley DB link (-ldb-4.1)" >&5
+echo "configure:16859: checking for Berkeley DB link (-ldb-4.1)" >&5
 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -16864,7 +16865,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 16868 "configure"
+#line 16869 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -16911,7 +16912,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:16915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_4_dot_1=yes
 else
@@ -16935,7 +16936,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
-echo "configure:16939: checking for Berkeley DB link (-ldb-4-1)" >&5
+echo "configure:16940: checking for Berkeley DB link (-ldb-4-1)" >&5
 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -16945,7 +16946,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 16949 "configure"
+#line 16950 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -16992,7 +16993,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:16996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_4_1=yes
 else
@@ -17016,7 +17017,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
-echo "configure:17020: checking for Berkeley DB link (-ldb-4)" >&5
+echo "configure:17021: checking for Berkeley DB link (-ldb-4)" >&5
 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17026,7 +17027,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17030 "configure"
+#line 17031 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17073,7 +17074,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_4=yes
 else
@@ -17097,7 +17098,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
-echo "configure:17101: checking for Berkeley DB link (-ldb4)" >&5
+echo "configure:17102: checking for Berkeley DB link (-ldb4)" >&5
 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17107,7 +17108,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17111 "configure"
+#line 17112 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17154,7 +17155,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db4=yes
 else
@@ -17178,7 +17179,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
-echo "configure:17182: checking for Berkeley DB link (-ldb)" >&5
+echo "configure:17183: checking for Berkeley DB link (-ldb)" >&5
 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17188,7 +17189,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17192 "configure"
+#line 17193 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17235,7 +17236,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db=yes
 else
@@ -17259,7 +17260,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
-echo "configure:17263: checking for Berkeley DB link (-ldb3)" >&5
+echo "configure:17264: checking for Berkeley DB link (-ldb3)" >&5
 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17269,7 +17270,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17273 "configure"
+#line 17274 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17316,7 +17317,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db3=yes
 else
@@ -17340,7 +17341,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
-echo "configure:17344: checking for Berkeley DB link (-ldb-3)" >&5
+echo "configure:17345: checking for Berkeley DB link (-ldb-3)" >&5
 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17350,7 +17351,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17354 "configure"
+#line 17355 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17397,7 +17398,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_3=yes
 else
@@ -17421,7 +17422,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
-echo "configure:17425: checking for Berkeley DB link (-ldb2)" >&5
+echo "configure:17426: checking for Berkeley DB link (-ldb2)" >&5
 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17431,7 +17432,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17435 "configure"
+#line 17436 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17478,7 +17479,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db2=yes
 else
@@ -17502,7 +17503,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
-echo "configure:17506: checking for Berkeley DB link (-ldb-2)" >&5
+echo "configure:17507: checking for Berkeley DB link (-ldb-2)" >&5
 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17512,7 +17513,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17516 "configure"
+#line 17517 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17559,7 +17560,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_2=yes
 else
@@ -17583,7 +17584,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
-echo "configure:17587: checking for Berkeley DB link (-ldb1)" >&5
+echo "configure:17588: checking for Berkeley DB link (-ldb1)" >&5
 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17593,7 +17594,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17597 "configure"
+#line 17598 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17640,7 +17641,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db1=yes
 else
@@ -17664,7 +17665,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
-echo "configure:17668: checking for Berkeley DB link (-ldb-1)" >&5
+echo "configure:17669: checking for Berkeley DB link (-ldb-1)" >&5
 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17674,7 +17675,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17678 "configure"
+#line 17679 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17721,7 +17722,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_1=yes
 else
@@ -17756,17 +17757,17 @@ for ac_hdr in db.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:17760: checking for $ac_hdr" >&5
+echo "configure:17761: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17765 "configure"
+#line 17766 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:17770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:17771: \"$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*
@@ -17796,7 +17797,7 @@ if test $ac_cv_header_db_h = yes; then
        ol_cv_lib_db=no
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
-echo "configure:17800: checking for Berkeley DB link (default)" >&5
+echo "configure:17801: checking for Berkeley DB link (default)" >&5
 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17806,7 +17807,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17810 "configure"
+#line 17811 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17853,7 +17854,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_none=yes
 else
@@ -17877,7 +17878,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
-echo "configure:17881: checking for Berkeley DB link (-ldb41)" >&5
+echo "configure:17882: checking for Berkeley DB link (-ldb41)" >&5
 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17887,7 +17888,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17891 "configure"
+#line 17892 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17934,7 +17935,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db41=yes
 else
@@ -17958,7 +17959,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
-echo "configure:17962: checking for Berkeley DB link (-ldb-41)" >&5
+echo "configure:17963: checking for Berkeley DB link (-ldb-41)" >&5
 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17968,7 +17969,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17972 "configure"
+#line 17973 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18015,7 +18016,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_41=yes
 else
@@ -18039,7 +18040,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
-echo "configure:18043: checking for Berkeley DB link (-ldb-4.1)" >&5
+echo "configure:18044: checking for Berkeley DB link (-ldb-4.1)" >&5
 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18049,7 +18050,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18053 "configure"
+#line 18054 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18096,7 +18097,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_4_dot_1=yes
 else
@@ -18120,7 +18121,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
-echo "configure:18124: checking for Berkeley DB link (-ldb-4-1)" >&5
+echo "configure:18125: checking for Berkeley DB link (-ldb-4-1)" >&5
 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18130,7 +18131,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18134 "configure"
+#line 18135 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18177,7 +18178,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_4_1=yes
 else
@@ -18201,7 +18202,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
-echo "configure:18205: checking for Berkeley DB link (-ldb-4)" >&5
+echo "configure:18206: checking for Berkeley DB link (-ldb-4)" >&5
 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18211,7 +18212,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18215 "configure"
+#line 18216 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18258,7 +18259,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_4=yes
 else
@@ -18282,7 +18283,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
-echo "configure:18286: checking for Berkeley DB link (-ldb4)" >&5
+echo "configure:18287: checking for Berkeley DB link (-ldb4)" >&5
 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18292,7 +18293,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18296 "configure"
+#line 18297 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18339,7 +18340,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db4=yes
 else
@@ -18363,7 +18364,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
-echo "configure:18367: checking for Berkeley DB link (-ldb)" >&5
+echo "configure:18368: checking for Berkeley DB link (-ldb)" >&5
 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18373,7 +18374,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18377 "configure"
+#line 18378 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18420,7 +18421,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db=yes
 else
@@ -18444,7 +18445,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
-echo "configure:18448: checking for Berkeley DB link (-ldb3)" >&5
+echo "configure:18449: checking for Berkeley DB link (-ldb3)" >&5
 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18454,7 +18455,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18458 "configure"
+#line 18459 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18501,7 +18502,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db3=yes
 else
@@ -18525,7 +18526,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
-echo "configure:18529: checking for Berkeley DB link (-ldb-3)" >&5
+echo "configure:18530: checking for Berkeley DB link (-ldb-3)" >&5
 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18535,7 +18536,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18539 "configure"
+#line 18540 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18582,7 +18583,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_3=yes
 else
@@ -18606,7 +18607,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
-echo "configure:18610: checking for Berkeley DB link (-ldb2)" >&5
+echo "configure:18611: checking for Berkeley DB link (-ldb2)" >&5
 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18616,7 +18617,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18620 "configure"
+#line 18621 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18663,7 +18664,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db2=yes
 else
@@ -18687,7 +18688,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
-echo "configure:18691: checking for Berkeley DB link (-ldb-2)" >&5
+echo "configure:18692: checking for Berkeley DB link (-ldb-2)" >&5
 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18697,7 +18698,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18701 "configure"
+#line 18702 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18744,7 +18745,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_2=yes
 else
@@ -18768,7 +18769,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
-echo "configure:18772: checking for Berkeley DB link (-ldb1)" >&5
+echo "configure:18773: checking for Berkeley DB link (-ldb1)" >&5
 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18778,7 +18779,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18782 "configure"
+#line 18783 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18825,7 +18826,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db1=yes
 else
@@ -18849,7 +18850,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
-echo "configure:18853: checking for Berkeley DB link (-ldb-1)" >&5
+echo "configure:18854: checking for Berkeley DB link (-ldb-1)" >&5
 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18859,7 +18860,7 @@ else
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18863 "configure"
+#line 18864 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18906,7 +18907,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_1=yes
 else
@@ -18932,7 +18933,7 @@ fi
        if test "$ol_cv_lib_db" != no ; then
                ol_cv_berkeley_db=yes
                echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
-echo "configure:18936: checking for Berkeley DB thread support" >&5
+echo "configure:18937: checking for Berkeley DB thread support" >&5
 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18947,7 +18948,7 @@ else
   ol_cv_berkeley_db_thread=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 18951 "configure"
+#line 18952 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -19014,7 +19015,7 @@ main()
        return rc;
 }
 EOF
-if { (eval echo configure:19018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:19019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_berkeley_db_thread=yes
 else
@@ -19076,13 +19077,13 @@ if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
        { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
        echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
-echo "configure:19080: checking Berkeley DB version for BDB backend" >&5
+echo "configure:19081: checking Berkeley DB version for BDB backend" >&5
 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 19086 "configure"
+#line 19087 "configure"
 #include "confdefs.h"
 
 #include <db.h>
 
 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
        echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
-echo "configure:19139: checking for MDBM library" >&5
+echo "configure:19140: checking for MDBM library" >&5
 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
        ol_LIBS="$LIBS"
        echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
-echo "configure:19145: checking for mdbm_set_chain" >&5
+echo "configure:19146: checking for mdbm_set_chain" >&5
 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19150 "configure"
+#line 19151 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char mdbm_set_chain(); below.  */
@@ -19170,7 +19171,7 @@ f = mdbm_set_chain;
 
 ; return 0; }
 EOF
-if { (eval echo configure:19174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_mdbm_set_chain=yes"
 else
@@ -19189,7 +19190,7 @@ else
   echo "$ac_t""no" 1>&6
 
                echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
-echo "configure:19193: checking for mdbm_set_chain in -lmdbm" >&5
+echo "configure:19194: checking for mdbm_set_chain in -lmdbm" >&5
 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19197,7 +19198,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmdbm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19201 "configure"
+#line 19202 "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
@@ -19208,7 +19209,7 @@ int main() {
 mdbm_set_chain()
 ; return 0; }
 EOF
-if { (eval echo configure:19212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19213: \"$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
@@ -19243,17 +19244,17 @@ echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19247: checking for $ac_hdr" >&5
+echo "configure:19248: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19252 "configure"
+#line 19253 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19258: \"$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*
@@ -19280,7 +19281,7 @@ fi
 done
 
  echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:19284: checking for db" >&5
+echo "configure:19285: checking for db" >&5
 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 
 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
        echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
-echo "configure:19317: checking for GDBM library" >&5
+echo "configure:19318: checking for GDBM library" >&5
 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
        ol_LIBS="$LIBS"
        echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
-echo "configure:19323: checking for gdbm_open" >&5
+echo "configure:19324: checking for gdbm_open" >&5
 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19328 "configure"
+#line 19329 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gdbm_open(); below.  */
@@ -19348,7 +19349,7 @@ f = gdbm_open;
 
 ; return 0; }
 EOF
-if { (eval echo configure:19352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gdbm_open=yes"
 else
@@ -19367,7 +19368,7 @@ else
   echo "$ac_t""no" 1>&6
 
                echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:19371: checking for gdbm_open in -lgdbm" >&5
+echo "configure:19372: checking for gdbm_open in -lgdbm" >&5
 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19375,7 +19376,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgdbm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19379 "configure"
+#line 19380 "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
@@ -19386,7 +19387,7 @@ int main() {
 gdbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:19390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19391: \"$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
@@ -19421,17 +19422,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19425: checking for $ac_hdr" >&5
+echo "configure:19426: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19430 "configure"
+#line 19431 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19436: \"$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*
@@ -19458,7 +19459,7 @@ fi
 done
 
  echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:19462: checking for db" >&5
+echo "configure:19463: checking for db" >&5
 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 
 if test $ol_with_ldbm_api = ndbm ; then
        echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
-echo "configure:19496: checking for NDBM library" >&5
+echo "configure:19497: checking for NDBM library" >&5
 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
        ol_LIBS="$LIBS"
        echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:19502: checking for dbm_open" >&5
+echo "configure:19503: checking for dbm_open" >&5
 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19507 "configure"
+#line 19508 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -19527,7 +19528,7 @@ f = dbm_open;
 
 ; return 0; }
 EOF
-if { (eval echo configure:19531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -19546,7 +19547,7 @@ else
   echo "$ac_t""no" 1>&6
 
                echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
-echo "configure:19550: checking for dbm_open in -lndbm" >&5
+echo "configure:19551: checking for dbm_open in -lndbm" >&5
 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19554,7 +19555,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lndbm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19558 "configure"
+#line 19559 "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
@@ -19565,7 +19566,7 @@ int main() {
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:19569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19570: \"$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
@@ -19585,7 +19586,7 @@ else
   echo "$ac_t""no" 1>&6
 
                        echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:19589: checking for dbm_open in -ldbm" >&5
+echo "configure:19590: checking for dbm_open in -ldbm" >&5
 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19593,7 +19594,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldbm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19597 "configure"
+#line 19598 "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
@@ -19604,7 +19605,7 @@ int main() {
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:19608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19609: \"$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
@@ -19641,17 +19642,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19645: checking for $ac_hdr" >&5
+echo "configure:19646: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19650 "configure"
+#line 19651 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19656: \"$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*
@@ -19678,7 +19679,7 @@ fi
 done
 
  echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:19682: checking for db" >&5
+echo "configure:19683: checking for db" >&5
 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -19738,17 +19739,17 @@ if test $ol_enable_wrappers != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19742: checking for $ac_hdr" >&5
+echo "configure:19743: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19747 "configure"
+#line 19748 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19753: \"$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*
@@ -19770,11 +19771,11 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 EOF
  
                echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
-echo "configure:19774: checking for TCP wrappers library" >&5
+echo "configure:19775: checking for TCP wrappers library" >&5
                save_LIBS="$LIBS"
                LIBS="$LIBS -lwrap"
                cat > conftest.$ac_ext <<EOF
-#line 19778 "configure"
+#line 19779 "configure"
 #include "confdefs.h"
 
 #include <tcpd.h>
@@ -19789,7 +19790,7 @@ hosts_access(req)
                
 ; return 0; }
 EOF
-if { (eval echo configure:19793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""-lwrap" 1>&6
                have_wrappers=yes
@@ -19801,7 +19802,7 @@ else
   
                                LIBS="$LIBS -lnsl"
                cat > conftest.$ac_ext <<EOF
-#line 19805 "configure"
+#line 19806 "configure"
 #include "confdefs.h"
 
 #include <tcpd.h>
@@ -19816,7 +19817,7 @@ hosts_access(req)
                
 ; return 0; }
 EOF
-if { (eval echo configure:19820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""-lwrap -lnsl" 1>&6
                have_wrappers=yes
 
 if test $ol_enable_syslog != no ; then
        echo $ac_n "checking for openlog""... $ac_c" 1>&6
-echo "configure:19860: checking for openlog" >&5
+echo "configure:19861: checking for openlog" >&5
 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19865 "configure"
+#line 19866 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char openlog(); below.  */
@@ -19885,7 +19886,7 @@ f = openlog;
 
 ; return 0; }
 EOF
-if { (eval echo configure:19889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_openlog=yes"
 else
@@ -19917,17 +19918,17 @@ if test $ol_enable_sql != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19921: checking for $ac_hdr" >&5
+echo "configure:19922: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19926 "configure"
+#line 19927 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19932: \"$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*
@@ -19957,7 +19958,7 @@ done
 
 
        echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
-echo "configure:19961: checking for SQLDriverConnect in -liodbc" >&5
+echo "configure:19962: checking for SQLDriverConnect in -liodbc" >&5
 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19965,7 +19966,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-liodbc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19969 "configure"
+#line 19970 "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
@@ -19976,7 +19977,7 @@ int main() {
 SQLDriverConnect()
 ; return 0; }
 EOF
-if { (eval echo configure:19980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19981: \"$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
@@ -20001,7 +20002,7 @@ fi
                ol_link_sql="-liodbc"
        else
                echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
-echo "configure:20005: checking for SQLDriverConnect in -lodbc" >&5
+echo "configure:20006: checking for SQLDriverConnect in -lodbc" >&5
 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20009,7 +20010,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lodbc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20013 "configure"
+#line 20014 "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
@@ -20020,7 +20021,7 @@ int main() {
 SQLDriverConnect()
 ; return 0; }
 EOF
-if { (eval echo configure:20024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20025: \"$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
@@ -20059,17 +20060,17 @@ for ac_hdr in termcap.h ncurses.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:20063: checking for $ac_hdr" >&5
+echo "configure:20064: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20068 "configure"
+#line 20069 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:20073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:20074: \"$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*
@@ -20098,7 +20099,7 @@ done
 
 if test $ol_link_termcap = no ; then
        echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
-echo "configure:20102: checking for tputs in -ltermcap" >&5
+echo "configure:20103: checking for tputs in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20106,7 +20107,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20110 "configure"
+#line 20111 "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
@@ -20117,7 +20118,7 @@ int main() {
 tputs()
 ; return 0; }
 EOF
-if { (eval echo configure:20121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20122: \"$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
@@ -20150,7 +20151,7 @@ fi
 
 if test $ol_link_termcap = no ; then
        echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
-echo "configure:20154: checking for initscr in -lncurses" >&5
+echo "configure:20155: checking for initscr in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20158,7 +20159,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20162 "configure"
+#line 20163 "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
@@ -20169,7 +20170,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:20173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20174: \"$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
@@ -20215,17 +20216,17 @@ if test $ol_with_cyrus_sasl != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:20219: checking for $ac_hdr" >&5
+echo "configure:20220: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20224 "configure"
+#line 20225 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:20229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:20230: \"$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*
@@ -20254,7 +20255,7 @@ done
 
        if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
                echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
-echo "configure:20258: checking for sasl_client_init in -lsasl2" >&5
+echo "configure:20259: checking for sasl_client_init in -lsasl2" >&5
 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20262,7 +20263,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsasl2  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20266 "configure"
+#line 20267 "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
@@ -20273,7 +20274,7 @@ int main() {
 sasl_client_init()
 ; return 0; }
 EOF
-if { (eval echo configure:20277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20278: \"$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
@@ -20292,7 +20293,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
-echo "configure:20296: checking for sasl_client_init in -lsasl" >&5
+echo "configure:20297: checking for sasl_client_init in -lsasl" >&5
 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20300,7 +20301,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsasl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20304 "configure"
+#line 20305 "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
@@ -20311,7 +20312,7 @@ int main() {
 sasl_client_init()
 ; return 0; }
 EOF
-if { (eval echo configure:20315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20316: \"$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
                fi
        else
                echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
-echo "configure:20351: checking Cyrus SASL library version" >&5
+echo "configure:20352: checking Cyrus SASL library version" >&5
 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 20357 "configure"
+#line 20358 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_SASL_SASL_H
@@ -20363,9 +20364,7 @@ else
 #endif
 
 /* require 2.1.3 or later */
-#if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
-       char *__sasl_compat = "1.5.x okay";
-#elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
+#if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
        __sasl_compat "2.2+ or better okay (we guess)";
 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
        && SASL_VERSION_STEP >=3
@@ -20404,12 +20403,12 @@ EOF
                ac_save_LIBS="$LIBS"
                LIBS="$LIBS $ol_link_sasl"
                echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
-echo "configure:20408: checking for sasl_version" >&5
+echo "configure:20407: checking for sasl_version" >&5
 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20413 "configure"
+#line 20412 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char sasl_version(); below.  */
@@ -20433,7 +20432,7 @@ f = sasl_version;
 
 ; return 0; }
 EOF
-if { (eval echo configure:20437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_sasl_version=yes"
 else
@@ -20492,13 +20491,13 @@ if test $ol_with_fetch != no ; then
        ol_LIBS=$LIBS
 LIBS="-lfetch -lcom_err $LIBS"
 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
-echo "configure:20496: checking fetch(3) library" >&5
+echo "configure:20495: checking fetch(3) library" >&5
 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 20502 "configure"
+#line 20501 "configure"
 #include "confdefs.h"
 
 #include <sys/param.h>
@@ -20508,7 +20507,7 @@ int main() {
 struct url *u = fetchParseURL("file:///"); 
 ; return 0; }
 EOF
-if { (eval echo configure:20512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_lib_fetch=yes
 else
@@ -20545,12 +20544,12 @@ if test $ol_enable_crypt != no ; then
        LIBS="$TLS_LIBS $LIBS"
 
        echo $ac_n "checking for crypt""... $ac_c" 1>&6
-echo "configure:20549: checking for crypt" >&5
+echo "configure:20548: checking for crypt" >&5
 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20554 "configure"
+#line 20553 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char crypt(); below.  */
@@ -20574,7 +20573,7 @@ f = crypt;
 
 ; return 0; }
 EOF
-if { (eval echo configure:20578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_crypt=yes"
 else
@@ -20594,7 +20593,7 @@ else
 
                LIBS="$save_LIBS"
                echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:20598: checking for crypt in -lcrypt" >&5
+echo "configure:20597: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20602,7 +20601,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20606 "configure"
+#line 20605 "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
@@ -20613,7 +20612,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:20617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20616: \"$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
 
 if test $ol_enable_proctitle != no ; then
        echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
-echo "configure:20662: checking for setproctitle" >&5
+echo "configure:20661: checking for setproctitle" >&5
 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20667 "configure"
+#line 20666 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char setproctitle(); below.  */
@@ -20687,7 +20686,7 @@ f = setproctitle;
 
 ; return 0; }
 EOF
-if { (eval echo configure:20691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_setproctitle=yes"
 else
@@ -20706,7 +20705,7 @@ else
   echo "$ac_t""no" 1>&6
 
                echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
-echo "configure:20710: checking for setproctitle in -lutil" >&5
+echo "configure:20709: checking for setproctitle in -lutil" >&5
 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20714,7 +20713,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lutil  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20718 "configure"
+#line 20717 "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
@@ -20725,7 +20724,7 @@ int main() {
 setproctitle()
 ; return 0; }
 EOF
-if { (eval echo configure:20729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20728: \"$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
@@ -20765,17 +20764,17 @@ if test $ol_enable_slp != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:20769: checking for $ac_hdr" >&5
+echo "configure:20768: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20774 "configure"
+#line 20773 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:20779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:20778: \"$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*
@@ -20804,7 +20803,7 @@ done
 
        if test $ac_cv_header_slp_h = yes ; then
                echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
-echo "configure:20808: checking for SLPOpen in -lslp" >&5
+echo "configure:20807: checking for SLPOpen in -lslp" >&5
 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20812,7 +20811,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lslp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20816 "configure"
+#line 20815 "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
@@ -20823,7 +20822,7 @@ int main() {
 SLPOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:20827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20826: \"$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
@@ -20857,13 +20856,48 @@ EOF
        fi
 fi
 
+
+echo $ac_n "checking long long""... $ac_c" 1>&6
+echo "configure:20862: checking long long" >&5
+if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 20868 "configure"
+#include "confdefs.h"
+
+int main() {
+long long x;
+; return 0; }
+EOF
+if { (eval echo configure:20875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ol_cv_type_long_long=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_type_long_long=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ol_cv_type_long_long" 1>&6
+if test $ol_cv_type_long_long = yes; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_LONG_LONG 1
+EOF
+
+fi
+
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:20862: checking for ANSI C header files" >&5
+echo "configure:20896: checking for ANSI C header files" >&5
 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20867 "configure"
+#line 20901 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -20871,7 +20905,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:20875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:20909: \"$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*
@@ -20888,7 +20922,7 @@ 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 20892 "configure"
+#line 20926 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -20906,7 +20940,7 @@ 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 20910 "configure"
+#line 20944 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -20927,7 +20961,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 20931 "configure"
+#line 20965 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #if ((' ' & 0x0FF) == 0x020)
@@ -20945,7 +20979,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:20949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:20983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -20969,12 +21003,12 @@ EOF
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:20973: checking for mode_t" >&5
+echo "configure:21007: checking for mode_t" >&5
 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20978 "configure"
+#line 21012 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -21005,12 +21039,12 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:21009: checking for off_t" >&5
+echo "configure:21043: checking for off_t" >&5
 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21014 "configure"
+#line 21048 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -21041,12 +21075,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:21045: checking for pid_t" >&5
+echo "configure:21079: checking for pid_t" >&5
 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21050 "configure"
+#line 21084 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -21077,19 +21111,19 @@ EOF
 fi
 
 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
-echo "configure:21081: checking for ptrdiff_t" >&5
+echo "configure:21115: checking for ptrdiff_t" >&5
 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21086 "configure"
+#line 21120 "configure"
 #include "confdefs.h"
 #include <stddef.h>
 int main() {
 ptrdiff_t p
 ; return 0; }
 EOF
-if { (eval echo configure:21093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_type_ptrdiff_t=yes
 else
@@ -21110,12 +21144,12 @@ EOF
    fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:21114: checking return type of signal handlers" >&5
+echo "configure:21148: checking return type of signal handlers" >&5
 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21119 "configure"
+#line 21153 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -21132,7 +21166,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:21136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -21151,12 +21185,12 @@ EOF
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:21155: checking for size_t" >&5
+echo "configure:21189: checking for size_t" >&5
 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21160 "configure"
+#line 21194 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:21192: checking for ssize_t" >&5
+echo "configure:21226: checking for ssize_t" >&5
 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21197 "configure"
+#line 21231 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -21224,12 +21258,12 @@ EOF
 fi
 
 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
-echo "configure:21228: checking for caddr_t" >&5
+echo "configure:21262: checking for caddr_t" >&5
 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21233 "configure"
+#line 21267 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 
 
 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:21265: checking for socklen_t" >&5
+echo "configure:21299: checking for socklen_t" >&5
 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21270 "configure"
+#line 21304 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_SYS_TYPES_H
@@ -21280,7 +21314,7 @@ int main() {
 socklen_t len;
 ; return 0; }
 EOF
-if { (eval echo configure:21284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_type_socklen_t=yes
 else
@@ -21301,12 +21335,12 @@ EOF
   fi
  
 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
-echo "configure:21305: checking for member st_blksize in aggregate type struct stat" >&5
+echo "configure:21339: checking for member st_blksize in aggregate type struct stat" >&5
 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21310 "configure"
+#line 21344 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -21314,7 +21348,7 @@ int main() {
 struct stat foo; foo.st_blksize;
 ; return 0; }
 EOF
-if { (eval echo configure:21318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_struct_member_st_blksize=yes
 else
@@ -21336,12 +21370,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:21340: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:21374: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21345 "configure"
+#line 21379 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -21350,7 +21384,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:21354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -21371,12 +21405,12 @@ EOF
 fi
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:21375: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:21409: checking whether struct tm is in sys/time.h or time.h" >&5
 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21380 "configure"
+#line 21414 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -21384,7 +21418,7 @@ int main() {
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:21388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -21405,12 +21439,12 @@ EOF
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:21409: checking for uid_t in sys/types.h" >&5
+echo "configure:21443: checking for uid_t in sys/types.h" >&5
 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21414 "configure"
+#line 21448 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -21439,19 +21473,19 @@ EOF
 fi
 
 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
-echo "configure:21443: checking for sig_atomic_t" >&5
+echo "configure:21477: checking for sig_atomic_t" >&5
 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21448 "configure"
+#line 21482 "configure"
 #include "confdefs.h"
 #include <signal.h>
 int main() {
 sig_atomic_t atomic;
 ; return 0; }
 EOF
-if { (eval echo configure:21455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_type_sig_atomic_t=yes
 else
@@ -21475,13 +21509,13 @@ EOF
 
 # test for pw_gecos in struct passwd
 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
-echo "configure:21479: checking struct passwd for pw_gecos" >&5
+echo "configure:21513: checking struct passwd for pw_gecos" >&5
 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 21485 "configure"
+#line 21519 "configure"
 #include "confdefs.h"
 #include <pwd.h>
 int main() {
@@ -21491,7 +21525,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:21495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_struct_passwd_pw_gecos=yes
 else
 
 # test for pw_passwd in struct passwd
 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
-echo "configure:21517: checking struct passwd for pw_passwd" >&5
+echo "configure:21551: checking struct passwd for pw_passwd" >&5
 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 21523 "configure"
+#line 21557 "configure"
 #include "confdefs.h"
 #include <pwd.h>
 int main() {
@@ -21529,7 +21563,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:21533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_struct_passwd_pw_passwd=yes
 else
@@ -21551,7 +21585,7 @@ fi
 
 
 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
-echo "configure:21555: checking if toupper() requires islower()" >&5
+echo "configure:21589: checking if toupper() requires islower()" >&5
 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -21560,7 +21594,7 @@ else
   ol_cv_c_upper_lower=safe
 else
   cat > conftest.$ac_ext <<EOF
-#line 21564 "configure"
+#line 21598 "configure"
 #include "confdefs.h"
 
 #include <ctype.h>
@@ -21572,7 +21606,7 @@ main()
                exit(1);
 }
 EOF
-if { (eval echo configure:21576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:21610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_c_upper_lower=no
 else
@@ -21595,12 +21629,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:21599: checking for working const" >&5
+echo "configure:21633: checking for working const" >&5
 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21604 "configure"
+#line 21638 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -21649,7 +21683,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:21653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -21670,12 +21704,12 @@ EOF
 fi
 
 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
-echo "configure:21674: checking if compiler understands volatile" >&5
+echo "configure:21708: checking if compiler understands volatile" >&5
 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21679 "configure"
+#line 21713 "configure"
 #include "confdefs.h"
 int x, y, z;
 int main() {
@@ -21684,7 +21718,7 @@ volatile int a; int * volatile b = x ? &y : &z;
       *b = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:21688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_c_volatile=yes
 else
@@ -21714,14 +21748,14 @@ EOF
 
 else
        echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:21718: checking whether byte ordering is bigendian" >&5
+echo "configure:21752: checking whether byte ordering is bigendian" >&5
 if eval "test \"\${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 21725 "configure"
+#line 21759 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -21732,11 +21766,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:21736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21770: \"$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 21740 "configure"
+#line 21774 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -21747,7 +21781,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:21751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -21767,7 +21801,7 @@ 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 21771 "configure"
+#line 21805 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -21780,7 +21814,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:21784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:21818: \"$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
 fi
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:21810: checking size of short" >&5 
+echo "configure:21844: checking size of short" >&5 
 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 21816 "configure"
+#line 21850 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -21822,7 +21856,7 @@ int main() {
 switch (0) case 0: case (sizeof (short) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:21826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_short=$ac_size
 else
@@ -21845,13 +21879,13 @@ EOF
  
  
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:21849: checking size of int" >&5 
+echo "configure:21883: checking size of int" >&5 
 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 21855 "configure"
+#line 21889 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -21861,7 +21895,7 @@ int main() {
 switch (0) case 0: case (sizeof (int) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:21865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_int=$ac_size
 else
@@ -21884,13 +21918,13 @@ EOF
  
  
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:21888: checking size of long" >&5 
+echo "configure:21922: checking size of long" >&5 
 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 21894 "configure"
+#line 21928 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -21900,7 +21934,7 @@ int main() {
 switch (0) case 0: case (sizeof (long) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:21904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_long=$ac_size
 else
@@ -21951,7 +21985,7 @@ EOF
 
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:21955: checking for 8-bit clean memcmp" >&5
+echo "configure:21989: checking for 8-bit clean memcmp" >&5
 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -21959,7 +21993,7 @@ else
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 21963 "configure"
+#line 21997 "configure"
 #include "confdefs.h"
 
 main()
@@ -21969,7 +22003,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:21973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:22007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_memcmp_clean=yes
 else
@@ -21987,12 +22021,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
 
 echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:21991: checking for strftime" >&5
+echo "configure:22025: checking for strftime" >&5
 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21996 "configure"
+#line 22030 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char strftime(); below.  */
@@ -22016,7 +22050,7 @@ f = strftime;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_strftime=yes"
 else
@@ -22038,7 +22072,7 @@ else
   echo "$ac_t""no" 1>&6
 # strftime is in -lintl on SCO UNIX.
 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:22042: checking for strftime in -lintl" >&5
+echo "configure:22076: checking for strftime in -lintl" >&5
 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -22046,7 +22080,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 22050 "configure"
+#line 22084 "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
@@ -22057,7 +22091,7 @@ int main() {
 strftime()
 ; return 0; }
 EOF
-if { (eval echo configure:22061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22095: \"$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 $ac_n "checking for inet_aton()""... $ac_c" 1>&6
-echo "configure:22089: checking for inet_aton()" >&5
+echo "configure:22123: checking for inet_aton()" >&5
 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22094 "configure"
+#line 22128 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_SYS_TYPES_H
@@ -22112,7 +22146,7 @@ struct in_addr in;
 int rc = inet_aton( "255.255.255.255", &in );
 ; return 0; }
 EOF
-if { (eval echo configure:22116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_func_inet_aton=yes
 else
@@ -22134,12 +22168,12 @@ EOF
  
 
 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
-echo "configure:22138: checking for _spawnlp" >&5
+echo "configure:22172: checking for _spawnlp" >&5
 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22143 "configure"
+#line 22177 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _spawnlp(); below.  */
@@ -22163,7 +22197,7 @@ f = _spawnlp;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__spawnlp=yes"
 else
 
 
 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
-echo "configure:22191: checking for _snprintf" >&5
+echo "configure:22225: checking for _snprintf" >&5
 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22196 "configure"
+#line 22230 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _snprintf(); below.  */
@@ -22216,7 +22250,7 @@ f = _snprintf;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__snprintf=yes"
 else
 
 
 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
-echo "configure:22246: checking for _vsnprintf" >&5
+echo "configure:22280: checking for _vsnprintf" >&5
 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22251 "configure"
+#line 22285 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _vsnprintf(); below.  */
@@ -22271,7 +22305,7 @@ f = _vsnprintf;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22309: \"$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 $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:22301: checking for vprintf" >&5
+echo "configure:22335: checking for vprintf" >&5
 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22306 "configure"
+#line 22340 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -22326,7 +22360,7 @@ f = vprintf;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:22354: checking for _doprnt" >&5
+echo "configure:22388: checking for _doprnt" >&5
 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22359 "configure"
+#line 22393 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -22379,7 +22413,7 @@ f = _doprnt;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -22408,12 +22442,12 @@ if test $ac_cv_func_vprintf = yes ; then
                for ac_func in snprintf vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22412: checking for $ac_func" >&5
+echo "configure:22446: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22417 "configure"
+#line 22451 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -22437,7 +22471,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -22520,12 +22554,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22524: checking for $ac_func" >&5
+echo "configure:22558: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22529 "configure"
+#line 22563 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -22549,7 +22583,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -22577,12 +22611,12 @@ done
 for ac_func in getopt getpeereid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22581: checking for $ac_func" >&5
+echo "configure:22615: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22586 "configure"
+#line 22620 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -22606,7 +22640,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -22638,19 +22672,19 @@ if test "$ac_cv_func_getopt" != yes; then
 fi
 if test "$ac_cv_func_getpeereid" != yes; then
        echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
-echo "configure:22642: checking for msg_accrights in msghdr" >&5
+echo "configure:22676: checking for msg_accrights in msghdr" >&5
 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22647 "configure"
+#line 22681 "configure"
 #include "confdefs.h"
 #include <sys/socket.h>
 int main() {
 struct msghdr m; m.msg_accrightslen=0
 ; return 0; }
 EOF
-if { (eval echo configure:22654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:22688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_msghdr_msg_accrights=yes
 else
 
 # Check Configuration
 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:22694: checking declaration of sys_errlist" >&5
+echo "configure:22728: checking declaration of sys_errlist" >&5
 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 22700 "configure"
+#line 22734 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -22709,7 +22743,7 @@ int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:22713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:22747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_dcl_sys_errlist=yes
        ol_cv_have_sys_errlist=yes
@@ -22732,20 +22766,20 @@ EOF
 
 
        echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
-echo "configure:22736: checking existence of sys_errlist" >&5
+echo "configure:22770: checking existence of sys_errlist" >&5
 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 22742 "configure"
+#line 22776 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:22749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_have_sys_errlist=yes
 else
@@ -22773,17 +22807,17 @@ if test "$ol_enable_slapi" != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:22777: checking for $ac_hdr" >&5
+echo "configure:22811: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22782 "configure"
+#line 22816 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:22787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:22821: \"$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*
@@ -22814,7 +22848,7 @@ done
                { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
        fi
        echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
-echo "configure:22818: checking for lt_dlinit in -lltdl" >&5
+echo "configure:22852: checking for lt_dlinit in -lltdl" >&5
 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -22822,7 +22856,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lltdl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 22826 "configure"
+#line 22860 "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
@@ -22833,7 +22867,7 @@ int main() {
 lt_dlinit()
 ; return 0; }
 EOF
-if { (eval echo configure:22837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22871: \"$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
@@ -23076,8 +23110,11 @@ EOF
 
        BUILD_SLAPD=yes
        BUILD_META=yes
-       BUILD_LDAP=yes
        BUILD_REWRITE=yes
+        if test $ol_enable_ldbm = yes -o \
+               $ol_enable_bdb = yes ; then 
+                BUILD_CACHE=yes
+        fi
        if test "$ol_with_meta_module" != static ; then
                cat >> confdefs.h <<\EOF
 #define SLAPD_META_DYNAMIC 1
@@ -23282,6 +23319,7 @@ fi
   
   
   
+  
 
 
 
@@ -23523,6 +23561,7 @@ s%@BUILD_LDAP@%$BUILD_LDAP%g
 s%@BUILD_LDBM@%$BUILD_LDBM%g
 s%@BUILD_META@%$BUILD_META%g
 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
+s%@BUILD_CACHE@%$BUILD_CACHE%g
 s%@BUILD_NULL@%$BUILD_NULL%g
 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
 s%@BUILD_PERL@%$BUILD_PERL%g
index c147070e40de137b4e0754124e76c7c9df40ec50..3807524a519f43d9d24a922a1b04885f07c973ee 100644 (file)
@@ -529,6 +529,7 @@ BUILD_LDAP=no
 BUILD_LDBM=no
 BUILD_META=no
 BUILD_MONITOR=no
+BUILD_CACHE=no
 BUILD_NULL=no
 BUILD_PASSWD=no
 BUILD_PERL=no
@@ -2295,6 +2296,16 @@ fi
 
 dnl ----------------------------------------------------------------
 dnl Checks for typedefs, structures, and compiler characteristics.
+
+dnl Checks for long long
+AC_CACHE_CHECK([long long], ol_cv_type_long_long, [
+       AC_TRY_COMPILE([], [long long x;],
+               [ol_cv_type_long_long=yes],
+               [ol_cv_type_long_long=no])])
+if test $ol_cv_type_long_long = yes; then
+       AC_DEFINE(HAVE_LONG_LONG, 1, [define if you have `long long'])
+fi
+
 AC_TYPE_MODE_T
 AC_TYPE_OFF_T
 AC_TYPE_PID_T
@@ -2607,8 +2618,11 @@ if test "$ol_enable_meta" != no ; then
        AC_DEFINE(SLAPD_META,1,[define to support LDAP Metadirectory backend])
        BUILD_SLAPD=yes
        BUILD_META=yes
-       BUILD_LDAP=yes
        BUILD_REWRITE=yes
+        if test $ol_enable_ldbm = yes -o \
+               $ol_enable_bdb = yes ; then 
+                BUILD_CACHE=yes
+        fi
        if test "$ol_with_meta_module" != static ; then
                AC_DEFINE(SLAPD_META_DYNAMIC,1,
                        [define to support dynamic LDAP Metadirectory backend])
@@ -2763,6 +2777,7 @@ AC_SUBST(BUILD_SLAPD)
   AC_SUBST(BUILD_LDBM)
   AC_SUBST(BUILD_META)
   AC_SUBST(BUILD_MONITOR)
+  AC_SUBST(BUILD_CACHE)
   AC_SUBST(BUILD_NULL)
   AC_SUBST(BUILD_PASSWD)
   AC_SUBST(BUILD_PERL)
index d042552ff70517285f6951f26984731fb489dab1..85c1b008fd921e6efd80ff6e4a4dd19cdead51ea 100644 (file)
@@ -1,8 +1,8 @@
 ##
-# Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
+# Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
 # COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 ##
 
 EXTRA_DIST = BUGS
-SUBDIRS = src 
+SUBDIRS = src examples
 
index 36a4d2160e5e39eb6cf8408661ea994cd8dd1a3a..aedb193700a1abf8a85388550f66092ceb8c3927 100644 (file)
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated by automake 1.7.2 from Makefile.am.
+# @configure_input@
 
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
-# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
-
+@SET_MAKE@
 
-SHELL = @SHELL@
+# Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
+# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-
 top_builddir = .
 
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
 NORMAL_INSTALL = :
 PRE_INSTALL = :
 POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-host_alias = @host_alias@
 host_triplet = @host@
-AS = @AS@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
 CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
 CXX = @CXX@
-DLLTOOL = @DLLTOOL@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
 ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
 EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
-OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
 EXTRA_DIST = BUGS
-SUBDIRS = src 
+SUBDIRS = src examples
+subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = ./src/config.h
-CONFIG_CLEAN_FILES = 
-DIST_COMMON =  README AUTHORS Makefile.am Makefile.in TODO acconfig.h \
-aclocal.m4 config.guess config.sub configure configure.in install-sh \
-ltmain.sh missing mkinstalldirs src/config.h.in src/stamp-h.in
-
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+       ps-recursive install-info-recursive uninstall-info-recursive \
+       all-recursive install-data-recursive install-exec-recursive \
+       installdirs-recursive install-recursive uninstall-recursive \
+       check-recursive installcheck-recursive
+DIST_COMMON = README AUTHORS Makefile.am Makefile.in TODO acconfig.h \
+       aclocal.m4 config.guess config.sub configure configure.in \
+       depcomp install-sh ltmain.sh missing mkinstalldirs
+DIST_SUBDIRS = $(SUBDIRS)
+all: all-recursive
 
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-all: all-redirect
 .SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-       cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
 
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
-       cd $(top_builddir) \
-         && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --foreign  Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
 
-$(ACLOCAL_M4):  configure.in 
-       cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck
-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure:  $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
        cd $(srcdir) && $(AUTOCONF)
 
-src/config.h: src/stamp-h
-       @if test ! -f $@; then \
-               rm -f src/stamp-h; \
-               $(MAKE) src/stamp-h; \
-       else :; fi
-src/stamp-h: $(srcdir)/src/config.h.in $(top_builddir)/config.status
-       cd $(top_builddir) \
-         && CONFIG_FILES= CONFIG_HEADERS=src/config.h \
-            $(SHELL) ./config.status
-       @echo timestamp > src/stamp-h 2> /dev/null
-$(srcdir)/src/config.h.in: $(srcdir)/src/stamp-h.in
-       @if test ! -f $@; then \
-               rm -f $(srcdir)/src/stamp-h.in; \
-               $(MAKE) $(srcdir)/src/stamp-h.in; \
-       else :; fi
-$(srcdir)/src/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
-       cd $(top_srcdir) && $(AUTOHEADER)
-       @echo timestamp > $(srcdir)/src/stamp-h.in 2> /dev/null
-
-mostlyclean-hdr:
-
-clean-hdr:
-
-distclean-hdr:
-       -rm -f src/config.h
-
-maintainer-clean-hdr:
+$(ACLOCAL_M4):  configure.in 
+       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -144,13 +180,8 @@ maintainer-clean-hdr:
 # (1) if the variable is set in `config.status', edit `config.status'
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive  \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
-       @set fnord $(MAKEFLAGS); amf=$$2; \
+$(RECURSIVE_TARGETS):
+       @set fnord $$MAKEFLAGS; amf=$$2; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
        list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -170,13 +201,18 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-       @set fnord $(MAKEFLAGS); amf=$$2; \
+       @set fnord $$MAKEFLAGS; amf=$$2; \
        dot_seen=no; \
-       rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
-         rev="$$subdir $$rev"; \
-         test "$$subdir" != "." || dot_seen=yes; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
        done; \
-       test "$$dot_seen" = "no" && rev=". $$rev"; \
+       rev="$$rev ."; \
        target=`echo $@ | sed s/-recursive//`; \
        for subdir in $$rev; do \
          echo "Making $$target in $$subdir"; \
@@ -192,175 +228,289 @@ tags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
        done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
 
 tags: TAGS
 
-ID: $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS)'; \
-       unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
-       here=`pwd` && cd $(srcdir) \
-         && mkid -f$$here/ID $$unique $(LISP)
+       mkid -fID $$unique
 
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
        tags=; \
        here=`pwd`; \
        list='$(SUBDIRS)'; for subdir in $$list; do \
-   if test "$$subdir" = .; then :; else \
+         if test "$$subdir" = .; then :; else \
            test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
-   fi; \
+         fi; \
        done; \
-       list='$(SOURCES) $(HEADERS)'; \
-       unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
-       test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
-         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+       test -z "$(ETAGS_ARGS)$$tags$$unique" \
+         || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+            $$tags $$unique
 
-mostlyclean-tags:
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
 
-clean-tags:
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
 
 distclean-tags:
-       -rm -f TAGS ID
-
-maintainer-clean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
+top_distdir = .
 distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
 
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-       -rm -rf $(distdir)
-       GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
-       mkdir $(distdir)/=build
-       mkdir $(distdir)/=inst
-       dc_install_base=`cd $(distdir)/=inst && pwd`; \
-       cd $(distdir)/=build \
-         && ../configure --srcdir=.. --prefix=$$dc_install_base \
-         && $(MAKE) $(AM_MAKEFLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) dvi \
-         && $(MAKE) $(AM_MAKEFLAGS) check \
-         && $(MAKE) $(AM_MAKEFLAGS) install \
-         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) dist
-       -rm -rf $(distdir)
-       @banner="$(distdir).tar.gz is ready for distribution"; \
-       dashes=`echo "$$banner" | sed s/./=/g`; \
-       echo "$$dashes"; \
-       echo "$$banner"; \
-       echo "$$dashes"
-dist: distdir
-       -chmod -R a+r $(distdir)
-       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
-dist-all: distdir
-       -chmod -R a+r $(distdir)
-       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+
 distdir: $(DISTFILES)
-       -rm -rf $(distdir)
+       $(am__remove_distdir)
        mkdir $(distdir)
-       -chmod 777 $(distdir)
-       here=`cd $(top_builddir) && pwd`; \
-       top_distdir=`cd $(distdir) && pwd`; \
-       distdir=`cd $(distdir) && pwd`; \
-       cd $(top_srcdir) \
-         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
-       @for file in $(DISTFILES); do \
-         d=$(srcdir); \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
          if test -d $$d/$$file; then \
-           cp -pr $$d/$$file $(distdir)/$$file; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
          else \
            test -f $(distdir)/$$file \
-           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-           || cp -p $$d/$$file $(distdir)/$$file || :; \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
          fi; \
        done
-       for subdir in $(SUBDIRS); do \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d $(distdir)/$$subdir \
            || mkdir $(distdir)/$$subdir \
            || exit 1; \
-           chmod 777 $(distdir)/$$subdir; \
-           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$(top_distdir)" \
+               distdir=../$(distdir)/$$subdir \
+               distdir) \
              || exit 1; \
          fi; \
        done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
+       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r $(distdir)
+dist-gzip: distdir
+       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+dist dist-all: distdir
+       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       $(am__remove_distdir)
+       GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       mkdir $(distdir)/=build
+       mkdir $(distdir)/=inst
+       chmod a-w $(distdir)
+       dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
+         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+         && cd $(distdir)/=build \
+         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(DISTCHECK_CONFIGURE_FLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+               distuninstallcheck \
+         && chmod -R a-w "$$dc_install_base" \
+         && ({ \
+              (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+             } || { rm -rf "$$dc_destdir"; exit 1; }) \
+         && rm -rf "$$dc_destdir" \
+         && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
+         && rm -f $(distdir).tar.gz \
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+       $(am__remove_distdir)
+       @echo "$(distdir).tar.gz is ready for distribution" | \
+         sed 'h;s/./=/g;p;x;p;x'
+distuninstallcheck:
+       cd $(distuninstallcheck_dir) \
+       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+          || { echo "ERROR: files left after uninstall:" ; \
+               if test -n "$(DESTDIR)"; then \
+                 echo "  (check DESTDIR support)"; \
+               fi ; \
+               $(distuninstallcheck_listfiles) ; \
+               exit 1; } >&2
+distcleancheck: distclean
+       if test '$(srcdir)' = . ; then \
+         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+         exit 1 ; \
+       fi
+       test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+         || { echo "ERROR: files left in build directory after distclean:" ; \
+              $(distcleancheck_listfiles) ; \
+              exit 1; } >&2
 check-am: all-am
 check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-exec-am:
-install-exec: install-exec-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
 
-install-data-am:
+install: install-recursive
+install-exec: install-exec-recursive
 install-data: install-data-recursive
+uninstall: uninstall-recursive
 
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am:
-uninstall: uninstall-recursive
-all-am: Makefile
-all-redirect: all-recursive
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
-
 
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -rm -f Makefile $(CONFIG_CLEAN_FILES)
-       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-mostlyclean-am:  mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
 
-mostlyclean: mostlyclean-recursive
+clean-am: clean-generic clean-libtool mostlyclean-am
 
-clean-am:  clean-hdr clean-tags clean-generic mostlyclean-am
+distclean: distclean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+distclean-am: clean-am distclean-generic distclean-libtool \
+       distclean-tags
 
-clean: clean-recursive
+dvi: dvi-recursive
 
-distclean-am:  distclean-hdr distclean-tags distclean-generic clean-am
-       -rm -f libtool
+dvi-am:
 
-distclean: distclean-recursive
-       -rm -f config.status
+info: info-recursive
 
-maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-tags \
-               maintainer-clean-generic distclean-am
-       @echo "This command is intended for maintainers to use;"
-       @echo "it deletes files that may require special tools to rebuild."
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
-       -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-install-data-recursive uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs-am \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf autom4te.cache
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
 
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+       clean-generic clean-libtool clean-recursive ctags \
+       ctags-recursive dist dist-all dist-gzip distcheck distclean \
+       distclean-generic distclean-libtool distclean-recursive \
+       distclean-tags distcleancheck distdir distuninstallcheck dvi \
+       dvi-am dvi-recursive info info-am info-recursive install \
+       install-am install-data install-data-am install-data-recursive \
+       install-exec install-exec-am install-exec-recursive \
+       install-info install-info-am install-info-recursive install-man \
+       install-recursive install-strip installcheck installcheck-am \
+       installdirs installdirs-am installdirs-recursive \
+       maintainer-clean maintainer-clean-generic \
+       maintainer-clean-recursive mostlyclean mostlyclean-generic \
+       mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
+       pdf-recursive ps ps-am ps-recursive tags tags-recursive \
+       uninstall uninstall-am uninstall-info-am \
+       uninstall-info-recursive uninstall-recursive
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 4c2b77a5435494d89c4218df5ab4d87c5641e515..a407448bb6fbba989bd2f3f0d48c25a4b1eaaaa1 100644 (file)
-dnl aclocal.m4 generated automatically by aclocal 1.4-p5
+# generated automatically by aclocal 1.7.2 -*- Autoconf -*-
 
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-# Do all the work for Automake.  This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
+# Do all the work for Automake.                            -*- Autoconf -*-
 
-# serial 1
+# This macro actually does too much some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
 
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
 
+# 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, 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.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+AC_PREREQ([2.54])
+
+# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
+ AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright 2002  Free Software Foundation, Inc.
+
+# 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, 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
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+        [AM_AUTOMAKE_VERSION([1.7.2])])
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+
+# Copyright 2001, 2002  Free Software Foundation, Inc.
+
+# 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, 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.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
 #
 # Check to make sure that the build environment is sane.
 #
 
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# 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, 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.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
 AC_DEFUN([AM_SANITY_CHECK],
 [AC_MSG_CHECKING([whether build environment is sane])
 # Just in case
 sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
-   if test "[$]*" = "X"; then
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftestfile`
+      set X `ls -t $srcdir/configure conftest.file`
    fi
-   if test "[$]*" != "X $srcdir/configure conftestfile" \
-      && test "[$]*" != "X conftestfile $srcdir/configure"; then
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
       # If neither matched, then we have a broken ls.  This can happen
       # if, for instance, CONFIG_SHELL is bash and it inherits a
@@ -74,7 +259,7 @@ if (
 alias in your environment])
    fi
 
-   test "[$]2" = conftestfile
+   test "$[2]" = conftest.file
    )
 then
    # Ok.
@@ -83,54 +268,551 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-rm -f conftest*
 AC_MSG_RESULT(yes)])
 
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
+#  -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# 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, 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.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
 AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
-   $1=$2
-   AC_MSG_RESULT(found)
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
 else
-   $1="$3/missing $2"
-   AC_MSG_RESULT(missing)
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
 fi
-AC_SUBST($1)])
+])
 
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated.  We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
-  case " <<$>>CONFIG_HEADERS " in
-  *" <<$>>am_file "*<<)>>
-    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
-    ;;
-  esac
-  am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# 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, 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.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# 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, 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.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# 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, 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.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# serial 4                                             -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# 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, 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.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_$1_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+  DEPDIR=.deps
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+AC_SUBST([DEPDIR])
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.   -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# 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, 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.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+       s/\\\\$//
+       p
+       n
+       /\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Check to see how 'make' treats includes.     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+
+# 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, 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.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+       @echo done
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST(am__include)
+AC_SUBST(am__quote)
+AC_MSG_RESULT($_am_result)
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL                                              -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# 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, 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.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# 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, 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.
+
+AC_PREREQ([2.52])
+
+# serial 6
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
 
 # serial 46 AC_PROG_LIBTOOL
 
-builtin([undefine],[symbols])
-
 AC_DEFUN([AC_PROG_LIBTOOL],
 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
@@ -156,6 +838,8 @@ AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_LD])dnl
 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
 AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+
 AC_REQUIRE([AC_PROG_LN_S])dnl
 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 AC_REQUIRE([AC_OBJEXT])dnl
@@ -205,6 +889,20 @@ case $host in
   rm -rf conftest*
   ;;
 
+*-*-linux*)
+  # Test if the compiler is 64bit
+  echo 'int i;' > conftest.$ac_ext
+  lt_cv_cc_64bit_output=no
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *"ELF 64"*)
+      lt_cv_cc_64bit_output=yes
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+  
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
   SAVE_CFLAGS="$CFLAGS"
@@ -256,9 +954,30 @@ _LT_AC_LTCONFIG_HACK
 
 ])
 
+# AC_LIBTOOL_HEADER_ASSERT
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
+[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
+    [lt_cv_func_assert_works],
+    [case $host in
+    *-*-solaris*)
+      if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
+        case `$CC --version 2>/dev/null` in
+        [[12]].*) lt_cv_func_assert_works=no ;;
+        *)        lt_cv_func_assert_works=yes ;;
+        esac
+      fi
+      ;;
+    esac])
+
+if test "x$lt_cv_func_assert_works" = xyes; then
+  AC_CHECK_HEADERS(assert.h)
+fi
+])# AC_LIBTOOL_HEADER_ASSERT
+
 # _LT_AC_CHECK_DLFCN
 # --------------------
-AC_DEFUN(_LT_AC_CHECK_DLFCN,
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
 [AC_CHECK_HEADERS(dlfcn.h)
 ])# _LT_AC_CHECK_DLFCN
 
@@ -276,10 +995,10 @@ AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
 # Character class describing NM global symbol codes.
-[symcode='[BCDEGRST]']
+symcode='[[BCDEGRST]]'
 
 # Regexp to match symbols that can be accessed directly from C.
-[sympat='\([_A-Za-z][_A-Za-z0-9]*\)']
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
 # Transform the above into a raw symbol and a C symbol.
 symxfrm='\1 \2\3 \3'
@@ -293,23 +1012,26 @@ lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\
 # Define system-specific variables.
 case $host_os in
 aix*)
-  [symcode='[BCDT]']
+  symcode='[[BCDT]]'
   ;;
 cygwin* | mingw* | pw32*)
-  [symcode='[ABCDGISTW]']
+  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'"
   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
-irix*)
-  [symcode='[BCDEGRST]']
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
   ;;
 solaris* | sysv5*)
-  [symcode='[BDT]']
+  symcode='[[BDT]]'
   ;;
 sysv4)
-  [symcode='[DFNSTU]']
+  symcode='[[DFNSTU]]'
   ;;
 esac
 
@@ -323,14 +1045,14 @@ 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]']
+  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'"]
+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
@@ -383,7 +1105,7 @@ const struct {
   const char *name;
   lt_ptr address;
 }
-[lt_preloaded_symbols[] =]
+lt_preloaded_symbols[[]] =
 {
 EOF
          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
@@ -401,7 +1123,7 @@ EOF
          save_CFLAGS="$CFLAGS"
          LIBS="conftstm.$ac_objext"
          CFLAGS="$CFLAGS$no_builtin_flag"
-         if AC_TRY_EVAL(ac_link) && test -s conftest; then
+         if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
            pipe_works=yes
          fi
          LIBS="$save_LIBS"
@@ -456,13 +1178,14 @@ if test "X${PATH_SEPARATOR+set}" != Xset; then
     *-DOS) lt_cv_sys_path_separator=';' ;;
     *)     lt_cv_sys_path_separator=':' ;;
   esac
+  PATH_SEPARATOR=$lt_cv_sys_path_separator
 fi
 ])# _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.
+# will find an echo command which doesn't interpret backslashes.
 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
                              [AC_DIVERT_PUSH(NOTICE)])
@@ -531,7 +1254,7 @@ else
   #
   # So, first we look for a working echo in the user's PATH.
 
-  IFS="${IFS=  }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+  IFS="${IFS=  }"; save_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' &&
@@ -620,7 +1343,7 @@ AC_DIVERT_POP
 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 # ------------------------------------------------------------------
-AC_DEFUN(_LT_AC_TRY_DLOPEN_SELF,
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
 [if test "$cross_compiling" = yes; then :
   [$4]
 else
@@ -707,7 +1430,7 @@ rm -fr conftest*
 
 # AC_LIBTOOL_DLOPEN_SELF
 # -------------------
-AC_DEFUN(AC_LIBTOOL_DLOPEN_SELF,
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
 [if test "x$enable_dlopen" != xyes; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
@@ -807,10 +1530,10 @@ AC_DEFUN([_LT_AC_LTCONFIG_HACK],
 # 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']
+sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
 
 # Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
 
 # Sed substitution to delay expansion of an escaped shell variable in a
 # double_quote_subst'ed string.
@@ -938,7 +1661,7 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic,
       # like `-m68040'.
       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
       ;;
-    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
     darwin* | rhapsody*)
@@ -981,7 +1704,7 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic,
       lt_cv_prog_cc_pic='+Z'
       ;;
 
-    irix5* | irix6*)
+    irix5* | irix6* | nonstopux*)
       lt_cv_prog_cc_wl='-Wl,'
       lt_cv_prog_cc_static='-non_shared'
       # PIC (with -KPIC) is the default.
@@ -1025,11 +1748,7 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic,
     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
+      lt_cv_prog_cc_wl='-Wl,'
       ;;
 
     uts4*)
@@ -1095,7 +1814,7 @@ fi
 # Check for any special shared library compilation flags.
 if test -n "$lt_cv_prog_cc_shlib"; then
   AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
-  if echo "$old_CC $old_CFLAGS " | [egrep -e "[        ]$lt_cv_prog_cc_shlib[  ]"] >/dev/null; then :
+  if echo "$old_CC $old_CFLAGS " | egrep -e "[[        ]]$lt_cv_prog_cc_shlib[[        ]]" >/dev/null; then :
   else
    AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
     lt_cv_prog_cc_can_build_shared=no
@@ -1376,7 +2095,7 @@ EOF
     # 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~
+      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=
@@ -1389,12 +2108,12 @@ EOF
     # 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'
+      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
+    archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
        cp $export_symbols $output_objdir/$soname-def;
       else
        echo EXPORTS > $output_objdir/$soname-def;
@@ -1403,6 +2122,7 @@ EOF
         set dummy \$symbol;
         case \[$]# in
           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+          4) echo "   \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
         esac;
         _lt_hint=`expr 1 + \$_lt_hint`;
@@ -1515,10 +2235,12 @@ else
       # need to do runtime linking.
       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
        for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+         case $ld_flag in
+         *-brtl*)
            aix_use_runtimelinking=yes
            break
-         fi
+         ;;
+         esac
        done
       esac
 
@@ -1632,8 +2354,9 @@ else
     esac
     # 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='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
+    #       `"' quotes if we put them in here... so don't!
+    archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
     # We need to add '_' to the symbols in $export_symbols first
     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
     hardcode_direct=yes
@@ -1685,13 +2408,14 @@ else
     export_dynamic_flag_spec='${wl}-E'
     ;;
 
-  irix5* | irix6*)
+  irix5* | irix6* | nonstopux*)
     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'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     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'
+      hardcode_libdir_flag_spec='-rpath $libdir'
     fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     hardcode_libdir_separator=:
     link_all_deplibs=yes
     ;;
@@ -1719,7 +2443,7 @@ else
     hardcode_direct=yes
     hardcode_shlibpath_var=no
     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
       export_dynamic_flag_spec='${wl}-E'
     else
@@ -1729,7 +2453,7 @@ else
        hardcode_libdir_flag_spec='-R$libdir'
         ;;
       *)
-        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
         ;;
       esac
@@ -1782,7 +2506,35 @@ else
     ;;
 
   solaris*)
+    # gcc --version < 3.0 without binutils cannot create self contained
+    # shared libraries reliably, requiring libgcc.a to resolve some of
+    # the object symbols generated in some cases.  Libraries that use
+    # assert need libgcc.a to resolve __eprintf, for example.  Linking
+    # a copy of libgcc.a into every shared library to guarantee resolving
+    # such symbols causes other problems:  According to Tim Van Holder
+    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
+    # (to the application) exception stack for one thing.
     no_undefined_flag=' -z defs'
+    if test "$GCC" = yes; then
+      case `$CC --version 2>/dev/null` in
+      [[12]].*)
+       cat <<EOF 1>&2
+
+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
+*** create self contained shared libraries on Solaris systems, without
+*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
+*** -no-undefined support, which will at least allow you to build shared
+*** libraries.  However, you may find that when you link such libraries
+*** into an application without using GCC, you have to manually add
+*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
+*** upgrade to a newer version of GCC.  Another option is to rebuild your
+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
+
+EOF
+        no_undefined_flag=
+       ;;
+      esac
+    fi
     # $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'
@@ -1791,7 +2543,7 @@ else
     hardcode_libdir_flag_spec='-R$libdir'
     hardcode_shlibpath_var=no
     case $host_os in
-    [solaris2.[0-5] | solaris2.[0-5].*]) ;;
+    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
@@ -1813,13 +2565,23 @@ else
     ;;
 
   sysv4)
-    if test "x$host_vendor" = xsno; then
-      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      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
+    case $host_vendor in
+      sni)
+        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+        hardcode_direct=yes # is this really true???
+        ;;
+      siemens)
+        ## LD is ld it makes a PLAMLIB
+        ## CC just makes a GrossModule.
+        archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+        reload_cmds='$CC -r -o $output$reload_objs'
+        hardcode_direct=no
+        ;;
+      motorola)
+        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
+        ;;
+    esac
     runpath_var='LD_RUN_PATH'
     hardcode_shlibpath_var=no
     ;;
@@ -1960,6 +2722,9 @@ aix3*)
 
 aix4* | aix5*)
   version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
   if test "$host_cpu" = ia64; then
     # AIX 5 supports IA64
     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
@@ -1971,15 +2736,15 @@ aix4* | aix5*)
     # 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
-      ;;
+      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
@@ -1998,12 +2763,13 @@ aix4* | aix5*)
     fi
     shlibpath_var=LIBPATH
   fi
+  hardcode_into_libs=yes
   ;;
 
 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'
+  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*)
@@ -2034,7 +2800,7 @@ cygwin* | mingw* | pw32*)
   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'
+    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~
@@ -2044,14 +2810,14 @@ cygwin* | mingw* | pw32*)
        $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"`
+    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" -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'
+    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
     ;;
   esac
   dynamic_linker='Win32 ld.exe'
@@ -2128,14 +2894,17 @@ hpux9* | hpux10* | hpux11*)
   postinstall_cmds='chmod 555 $lib'
   ;;
 
-irix5* | irix6*)
-  version_type=irix
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)          version_type=irix ;;
+  esac
   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*)
+  irix5* | nonstopux*)
     libsuff= shlibsuff=
     ;;
   *)
@@ -2173,6 +2942,13 @@ linux*)
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  case $host_cpu:$lt_cv_cc_64bit_output in
+  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+    sys_lib_dlsearch_path_spec="/lib64 /usr/lib64"
+    sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64"
+    ;;
+  esac
+
   # 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,
@@ -2239,11 +3015,12 @@ os2*)
 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'
+  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $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"
+  hardcode_into_libs=yes
   ;;
 
 sco3.2v5*)
@@ -2286,6 +3063,12 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
   case $host_vendor in
     sni)
       shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
       ;;
     motorola)
       need_lib_prefix=no
@@ -2440,7 +3223,7 @@ if test -f "$ltmain"; then
   # 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 \
+  for var in echo old_CC old_CFLAGS SED \
     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 \
@@ -2502,8 +3285,11 @@ if test -f "$ltmain"; then
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+# A sed that does not truncate output.
+SED=$lt_SED
+
 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
+Xsed="${SED} -e s/^X//"
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
@@ -2567,7 +3353,7 @@ DLLTOOL="$DLLTOOL"
 OBJDUMP="$OBJDUMP"
 
 # Used on cygwin: assembler.
-AS="$AS"
+AS=$lt_AS
 
 # The name of the directory that contains temporary libtool files.
 objdir=$objdir
@@ -3172,6 +3958,7 @@ test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
@@ -3185,8 +3972,8 @@ if test "$GCC" = yes; then
   esac
   case $ac_prog in
     # Accept absolute paths.
-    [[\\/]* | [A-Za-z]:[\\/]*)]
-      [re_direlt='/[^/][^/]*/\.\./']
+    [[\\/]]* | [[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
@@ -3210,7 +3997,7 @@ else
 fi
 AC_CACHE_VAL(lt_cv_path_LD,
 [if test -z "$LD"; then
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  IFS="${IFS=  }"; ac_save_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
@@ -3263,7 +4050,7 @@ test -n "$reload_flag" && reload_flag=" $reload_flag"
 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
 #  -- PORTME fill in with the dynamic library characteristics
 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
 lt_cv_deplibs_check_method,
 [lt_cv_file_magic_cmd='$MAGIC_CMD'
 lt_cv_file_magic_test_file=
@@ -3274,7 +4061,7 @@ lt_cv_deplibs_check_method='unknown'
 # `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
+# '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.
@@ -3289,7 +4076,7 @@ beos*)
   ;;
 
 bsdi4*)
-  [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
+  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
   ;;
@@ -3318,7 +4105,7 @@ freebsd*)
     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_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.*`
       ;;
@@ -3333,14 +4120,14 @@ gnu*)
   ;;
 
 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_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*)
+irix5* | irix6* | nonstopux*)
   case $host_os in
-  irix5*)
+  irix5* | nonstopux*)
     # 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"
     ;;
@@ -3352,7 +4139,7 @@ irix5* | irix6*)
     *) 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"]
+    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*`
@@ -3362,25 +4149,25 @@ irix5* | irix6*)
 # This must be Linux ELF.
 linux*)
   case $host_cpu in
-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* | m68* )
+  alpha* | hppa* | i*86 | m68* | mips | mipsel | powerpc* | s390* | sparc* | ia64* | x86_64*)
     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 )' ;;]
+    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]+$']
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
   else
-    [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
+    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_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
   ;;
@@ -3411,14 +4198,14 @@ solaris*)
   lt_cv_file_magic_test_file=/lib/libc.so
   ;;
 
-[sysv5uw[78]* | sysv4*uw2*)]
+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_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)
@@ -3426,13 +4213,16 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
     ;;
   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 )']
+    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_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
     lt_cv_file_magic_test_file=/lib/libc.so
     ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
   esac
   ;;
 esac
@@ -3444,13 +4234,14 @@ deplibs_check_method=$lt_cv_deplibs_check_method
 
 # AC_PROG_NM - find the path to a BSD-compatible name lister
 AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
+[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
+AC_MSG_CHECKING([for BSD-compatible nm])
 AC_CACHE_VAL(lt_cv_path_NM,
 [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-:}"
+  IFS="${IFS=  }"; ac_save_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
@@ -3497,12 +4288,12 @@ esac
 ])
 
 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
+# the libltdl convenience library and LTDLINCL to the include flags for
 # the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments.  Note that LIBLTDL and INCLTDL are not
+# configure arguments.  Note that LIBLTDL and LTDLINCL 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
+# with '${top_builddir}/' and LTDLINCL 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.
@@ -3514,16 +4305,18 @@ AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
   esac
   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
-  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
 ])
 
 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
+# the libltdl installable library and LTDLINCL 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
+# arguments.  Note that LIBLTDL and LTDLINCL 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
+# be prefixed with '${top_builddir}/' and LTDLINCL 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.
@@ -3541,12 +4334,14 @@ AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
   if test x"$enable_ltdl_install" = x"yes"; then
     ac_configure_args="$ac_configure_args --enable-ltdl-install"
     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
-    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
   else
     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
     LIBLTDL="-lltdl"
-    INCLTDL=
+    LTDLINCL=
   fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
 ])
 
 # old names
@@ -3561,3 +4356,92 @@ AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
 # This is just to silence aclocal about the macro not being used
 ifelse([AC_DISABLE_FAST_INSTALL])
 
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_executable_p="test -f"
+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_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+
+  # 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/sedXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=$TMPDIR/sed$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   { (exit 1); exit 1; }
+}
+  _max=0
+  _count=0
+  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+  # along with /bin/sed that truncates output.
+  for _sed in $_sed_list /usr/xpg4/bin/sed; do
+    test ! -f ${_sed} && break
+    cat /dev/null > "$tmp/sed.in"
+    _count=0
+    echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
+    # Check for GNU sed and select it if it is found.
+    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
+      lt_cv_path_SED=${_sed}
+      break
+    fi
+    while true; do
+      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
+      mv "$tmp/sed.tmp" "$tmp/sed.in"
+      cp "$tmp/sed.in" "$tmp/sed.nl"
+      echo >>"$tmp/sed.nl"
+      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
+      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
+      # 40000 chars as input seems more than enough
+      test $_count -gt 10 && break
+      _count=`expr $_count + 1`
+      if test $_count -gt $_max; then
+        _max=$_count
+        lt_cv_path_SED=$_sed
+      fi
+    done
+  done
+  rm -rf "$tmp"
+])
+if test "X$SED" != "X"; then
+  lt_cv_path_SED=$SED
+else
+  SED=$lt_cv_path_SED
+fi
+AC_MSG_RESULT([$SED])
+])
+
index efd26184f93b2029fe9cf132451a682c8f5eff78..b1f9a8f37175d0abce807a78779d397be1286a89 100755 (executable)
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.
+# Generated by GNU Autoconf 2.57.
 #
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
 # Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)$' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+         /^X\/\(\/\/\)$/{ s//\1/; q; }
+         /^X\/\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+        case $as_dir in
+        /*)
+          if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+            CONFIG_SHELL=$as_dir/$as_base
+            export CONFIG_SHELL
+            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+          fi;;
+        esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS="  $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
 
 # Find the correct PATH separator.  Usually this is `:', but
 # DJGPP uses `;' like DOS.
@@ -15,8 +248,10 @@ if test "X${PATH_SEPARATOR+set}" != Xset; then
     *-DOS) lt_cv_sys_path_separator=';' ;;
     *)     lt_cv_sys_path_separator=':' ;;
   esac
+  PATH_SEPARATOR=$lt_cv_sys_path_separator
 fi
 
+
 # Check that we are running under the correct shell.
 SHELL=${CONFIG_SHELL-/bin/sh}
 
@@ -80,7 +315,7 @@ else
   #
   # So, first we look for a working echo in the user's PATH.
 
-  IFS="${IFS=  }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+  IFS="${IFS=  }"; save_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' &&
@@ -162,81 +397,7 @@ if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
 fi
 
-# 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
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
-
-# 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"
-
-# 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
-
-# Name of the executable.
-as_me=`echo "$0" |sed 's,.*[\\/],,'`
-
-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"
-
-# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-# NLS nuisances.
-$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
-$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
-$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
-$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
-$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
-$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
-$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
-$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
-
-# 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=:; export CDPATH; }
 
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -249,9 +410,11 @@ exec 6>&1
 # Initializations.
 #
 ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
 cross_compiling=no
 subdirs=
-MFLAGS= MAKEFLAGS=
+MFLAGS=
+MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Maximum number of lines to put in a shell here document.
@@ -259,7 +422,53 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # only ac_max_sed_lines should be used.
 : ${ac_max_here_lines=38}
 
-ac_unique_file="src/main.cpp"
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="examples/main.cpp"
+# 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"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL LIBOBJS LTLIBOBJS'
+ac_subst_files=''
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -299,13 +508,6 @@ oldincludedir='/usr/include'
 infodir='${prefix}/info'
 mandir='${prefix}/man'
 
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
 ac_prev=
 for ac_option
 do
@@ -438,7 +640,7 @@ do
     with_fp=no ;;
 
   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
+  | --no-cr | --no-c | -n)
     no_create=yes ;;
 
   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -617,7 +819,7 @@ do
   eval ac_val=$`echo $ac_var`
   case $ac_val in
     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
-    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
    { (exit 1); exit 1; }; };;
   esac
 done
@@ -629,18 +831,19 @@ do
   eval ac_val=$`echo $ac_var`
   case $ac_val in
     [\\/$]* | ?:[\\/]* ) ;;
-    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+    *)  { 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: should be removed in autoconf 3.0.
+# FIXME: To remove some day.
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
@@ -656,13 +859,23 @@ 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_prog=$0
-  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$0" : 'X\(//\)[^/]' \| \
+         X"$0" : 'X\(//\)$' \| \
+         X"$0" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
   srcdir=$ac_confdir
   if test ! -r $srcdir/$ac_unique_file; then
     srcdir=..
@@ -672,13 +885,16 @@ else
 fi
 if test ! -r $srcdir/$ac_unique_file; then
   if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
+    { 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 in $srcdir" >&2
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
    { (exit 1); exit 1; }; }
   fi
 fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
 ac_env_build_alias_set=${build_alias+set}
 ac_env_build_alias_value=$build_alias
@@ -727,7 +943,7 @@ ac_cv_env_CPP_value=$CPP
 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 <<EOF
+  cat <<_ACEOF
 \`configure' configures this package to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -748,9 +964,9 @@ Configuration:
   -n, --no-create         do not create output files
       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
-EOF
+_ACEOF
 
-  cat <<EOF
+  cat <<_ACEOF
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
                           [$ac_default_prefix]
@@ -777,9 +993,9 @@ Fine tuning of the installation directories:
   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
   --infodir=DIR          info documentation [PREFIX/info]
   --mandir=DIR           man documentation [PREFIX/man]
-EOF
+_ACEOF
 
-  cat <<\EOF
+  cat <<\_ACEOF
 
 Program names:
   --program-prefix=PREFIX            prepend PREFIX to installed program names
@@ -788,17 +1004,19 @@ Program names:
 
 System types:
   --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       build programs to run on HOST [BUILD]
-EOF
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
 fi
 
 if test -n "$ac_init_help"; then
 
-  cat <<\EOF
+  cat <<\_ACEOF
 
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors
   --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
@@ -827,40 +1045,60 @@ Some influential environment variables:
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-EOF
+_ACEOF
 fi
 
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
   ac_popdir=`pwd`
-  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
-    cd $ac_subdir
-    # A "../" for each directory in /$ac_subdir.
-    ac_dots=`echo $ac_subdir |
-             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
-
-    case $srcdir in
-    .) # No --srcdir option.  We are building in place.
-      ac_sub_srcdir=$srcdir ;;
-    [\\/]* | ?:[\\/]* ) # Absolute path.
-      ac_sub_srcdir=$srcdir/$ac_subdir ;;
-    *) # Relative path.
-      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
-    esac
+  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_sub_srcdir/configure.gnu; then
+    if test -f $ac_srcdir/configure.gnu; then
       echo
-      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
-    elif test -f $ac_sub_srcdir/configure; then
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
       echo
-      $SHELL $ac_sub_srcdir/configure  --help=recursive
-    elif test -f $ac_sub_srcdir/configure.ac ||
-           test -f $ac_sub_srcdir/configure.in; then
+      $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_subdir" >&2
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi
     cd $ac_popdir
   done
@@ -868,31 +1106,31 @@ fi
 
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
-  cat <<\EOF
+  cat <<\_ACEOF
 
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+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.
-EOF
+_ACEOF
   exit 0
 fi
 exec 5>config.log
-cat >&5 <<EOF
+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.52.  Invocation command line was
+generated by GNU Autoconf 2.57.  Invocation command line was
 
   $ $0 $@
 
-EOF
+_ACEOF
 {
 cat <<_ASUNAME
-## ---------- ##
-## Platform.  ##
-## ---------- ##
+## --------- ##
+## Platform. ##
+## --------- ##
 
 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
 uname -m = `(uname -m) 2>/dev/null || echo unknown`
@@ -911,51 +1149,96 @@ hostinfo               = `(hostinfo) 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`
 
-PATH = $PATH
-
 _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 <<EOF
-## ------------ ##
-## Core tests.  ##
-## ------------ ##
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
 
-EOF
 
 # Keep a trace of the command line.
 # Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
 # Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
 ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
 ac_sep=
-for ac_arg
+ac_must_keep_next=false
+for ac_pass in 1 2
 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_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
-    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-    ac_sep=" " ;;
-  *) 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.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  echo >&5
-  echo "## ----------------- ##" >&5
-  echo "## Cache variables.  ##" >&5
-  echo "## ----------------- ##" >&5
-  echo >&5
-  # The following way of writing the cache mishandles newlines in values,
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+        ac_must_keep_next=false # Got value, back to normal.
+      else
+        case $ac_arg in
+          *=* | --config-cache | -C | -disable-* | --disable-* \
+          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+          | -with-* | --with-* | -without-* | --without-* | --x)
+            case "$ac_configure_args0 " in
+              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+            esac
+            ;;
+          -* ) ac_must_keep_next=true ;;
+        esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# 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
@@ -969,21 +1252,53 @@ trap 'exit_status=$?
         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
       ;;
     esac;
-} >&5
-  sed "/^$/d" confdefs.h >conftest.log
-  if test -s conftest.log; then
-    echo >&5
-    echo "## ------------ ##" >&5
-    echo "## confdefs.h.  ##" >&5
-    echo "## ------------ ##" >&5
-    echo >&5
-    cat conftest.log >&5
-  fi
-  (echo; echo) >&5
-  test "$ac_signal" != 0 &&
-    echo "$as_me: caught signal $ac_signal" >&5
-  echo "$as_me: exit $exit_status" >&5
-  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=$`echo $ac_var`
+        echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core core.* *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
     exit $exit_status
      ' 0
 for ac_signal in 1 2 13 15; do
@@ -996,6 +1311,33 @@ 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
@@ -1007,9 +1349,9 @@ if test -z "$CONFIG_SITE"; then
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
-    { echo "$as_me:1010: loading site script $ac_site_file" >&5
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
 echo "$as_me: loading site script $ac_site_file" >&6;}
-    cat "$ac_site_file" >&5
+    sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file"
   fi
 done
@@ -1018,7 +1360,7 @@ 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:1021: loading cache $cache_file" >&5
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -1026,7 +1368,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
     esac
   fi
 else
-  { echo "$as_me:1029: creating cache $cache_file" >&5
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
 echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
@@ -1042,42 +1384,42 @@ for ac_var in `(set) 2>&1 |
   eval ac_new_val="\$ac_env_${ac_var}_value"
   case $ac_old_set,$ac_new_set in
     set,)
-      { echo "$as_me:1045: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+      { 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:1049: error: \`$ac_var' was not set in the previous run" >&5
+      { 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:1055: error: \`$ac_var' has changed since the previous run:" >&5
+        { 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:1057:   former value:  $ac_old_val" >&5
+        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
 echo "$as_me:   former value:  $ac_old_val" >&2;}
-        { echo "$as_me:1059:   current value: $ac_new_val" >&5
+        { 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.  It doesn't matter if
-  # we pass some twice (in addition to the command line arguments).
+  # 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_configure_args="$ac_configure_args '$ac_arg'"
-      ;;
-    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
-       ;;
+      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:1078: error: changes in the environment can compromise the build" >&5
+  { 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:1080: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+  { { 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
@@ -1088,27 +1430,25 @@ 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
 
-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
-echo "#! $SHELL" >conftest.sh
-echo  "exit 0"   >>conftest.sh
-chmod +x conftest.sh
-if { (echo "$as_me:1100: PATH=\".;.\"; conftest.sh") >&5
-  (PATH=".;."; conftest.sh) 2>&5
-  ac_status=$?
-  echo "$as_me:1103: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  ac_path_separator=';'
-else
-  ac_path_separator=:
-fi
-PATH_SEPARATOR="$ac_path_separator"
-rm -f conftest.sh
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.7"
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   if test -f $ac_dir/install-sh; then
@@ -1126,7 +1466,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:1129: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+  { { 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
@@ -1146,43 +1486,48 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 # 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:1149: checking for a BSD compatible install" >&5
-echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
+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
-    ac_save_IFS=$IFS; IFS=$ac_path_separator
-  for ac_dir in $PATH; do
-    IFS=$ac_save_IFS
-    # Account for people who put trailing slashes in PATH elements.
-    case $ac_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
-        if $as_executable_p "$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.
-           :
-         elif test $ac_prog = install &&
-           grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           ac_cv_path_install="$ac_dir/$ac_prog -c"
-           break 2
-         fi
-       fi
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+          if test $ac_prog = install &&
+            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # AIX install.  It has an incompatible calling convention.
+            :
+          elif test $ac_prog = install &&
+            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # program-specific install script used by HP pwplus--don't use.
+            :
+          else
+            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+            break 3
+          fi
+        fi
       done
-      ;;
-    esac
-  done
+    done
+    ;;
+esac
+done
+
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
@@ -1195,7 +1540,7 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-echo "$as_me:1198: result: $INSTALL" >&5
+echo "$as_me:$LINENO: result: $INSTALL" >&5
 echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -1206,50 +1551,50 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-echo "$as_me:1209: checking whether build environment is sane" >&5
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
 # Just in case
 sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
    if test "$*" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftestfile`
+      set X `ls -t $srcdir/configure conftest.file`
    fi
-   if test "$*" != "X $srcdir/configure conftestfile" \
-      && test "$*" != "X conftestfile $srcdir/configure"; then
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
 
       # If neither matched, then we have a broken ls.  This can happen
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:1232: error: ls -t appears to fail.  Make sure there is not a broken
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" >&5
 echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" >&2;}
    { (exit 1); exit 1; }; }
    fi
 
-   test "$2" = conftestfile
+   test "$2" = conftest.file
    )
 then
    # Ok.
    :
 else
-   { { echo "$as_me:1245: error: newly created file is older than distributed files!
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
 Check your system clock" >&5
 echo "$as_me: error: newly created file is older than distributed files!
 Check your system clock" >&2;}
    { (exit 1); exit 1; }; }
 fi
-rm -f conftest*
-echo "$as_me:1252: result: yes" >&5
+echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 test "$program_prefix" != NONE &&
   program_transform_name="s,^,$program_prefix,;$program_transform_name"
@@ -1264,16 +1609,70 @@ _ACEOF
 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
 rm conftest.sed
 
-echo "$as_me:1267: checking whether ${MAKE-make} sets \${MAKE}" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+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_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+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 <<\EOF
+  cat >conftest.make <<\_ACEOF
 all:
-       @echo 'ac_maketemp="${MAKE}"'
-EOF
+       @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
 rm -f conftest.make
 fi
 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:1287: result: yes" >&5
+  echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
   SET_MAKE=
 else
-  echo "$as_me:1291: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
-PACKAGE=main
-
-VERSION=0.0.1
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
-  { { echo "$as_me:1301: error: source directory already configured; run \"make distclean\" there first" >&5
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
-cat >>confdefs.h <<EOF
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=main
+ VERSION=0.0.1
+
+
+cat >>confdefs.h <<_ACEOF
 #define PACKAGE "$PACKAGE"
-EOF
+_ACEOF
+
 
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
 #define VERSION "$VERSION"
-EOF
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  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
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+
+
+
+          ac_config_headers="$ac_config_headers src/config.h"
+
 
-missing_dir=`cd $ac_aux_dir && pwd`
-echo "$as_me:1315: checking for working aclocal" >&5
-echo $ECHO_N "checking for working aclocal... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
-   ACLOCAL=aclocal
-   echo "$as_me:1322: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
-   ACLOCAL="$missing_dir/missing aclocal"
-   echo "$as_me:1326: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:1330: checking for working autoconf" >&5
-echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
-   AUTOCONF=autoconf
-   echo "$as_me:1337: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
-   AUTOCONF="$missing_dir/missing autoconf"
-   echo "$as_me:1341: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:1345: checking for working automake" >&5
-echo $ECHO_N "checking for working automake... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
-   AUTOMAKE=automake
-   echo "$as_me:1352: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
-   AUTOMAKE="$missing_dir/missing automake"
-   echo "$as_me:1356: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:1360: checking for working autoheader" >&5
-echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
-   AUTOHEADER=autoheader
-   echo "$as_me:1367: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
-   AUTOHEADER="$missing_dir/missing autoheader"
-   echo "$as_me:1371: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:1375: checking for working makeinfo" >&5
-echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
-   MAKEINFO=makeinfo
-   echo "$as_me:1382: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
-   MAKEINFO="$missing_dir/missing makeinfo"
-   echo "$as_me:1386: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-ac_config_headers="$ac_config_headers src/config.h"
-
-ac_config_commands="$ac_config_commands default-1"
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -1403,43 +1854,48 @@ ac_config_commands="$ac_config_commands default-1"
 # 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:1406: checking for a BSD compatible install" >&5
-echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
+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
-    ac_save_IFS=$IFS; IFS=$ac_path_separator
-  for ac_dir in $PATH; do
-    IFS=$ac_save_IFS
-    # Account for people who put trailing slashes in PATH elements.
-    case $ac_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
-        if $as_executable_p "$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.
-           :
-         elif test $ac_prog = install &&
-           grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           ac_cv_path_install="$ac_dir/$ac_prog -c"
-           break 2
-         fi
-       fi
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+          if test $ac_prog = install &&
+            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # AIX install.  It has an incompatible calling convention.
+            :
+          elif test $ac_prog = install &&
+            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # program-specific install script used by HP pwplus--don't use.
+            :
+          else
+            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+            break 3
+          fi
+        fi
       done
-      ;;
-    esac
-  done
+    done
+    ;;
+esac
+done
+
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
@@ -1452,7 +1908,7 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-echo "$as_me:1455: result: $INSTALL" >&5
+echo "$as_me:$LINENO: result: $INSTALL" >&5
 echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -1473,7 +1929,7 @@ if test -n "$ac_tool_prefix"; then
   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:1476: checking for $ac_word" >&5
+echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1481,25 +1937,28 @@ else
   if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-echo "$as_me:1491: found $ac_dir/$ac_word" >&5
-break
+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_CXX="$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
 CXX=$ac_cv_prog_CXX
 if test -n "$CXX"; then
-  echo "$as_me:1499: result: $CXX" >&5
+  echo "$as_me:$LINENO: result: $CXX" >&5
 echo "${ECHO_T}$CXX" >&6
 else
-  echo "$as_me:1502: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1512,7 +1971,7 @@ if test -z "$CXX"; then
 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:1515: checking for $ac_word" >&5
+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_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1520,25 +1979,28 @@ else
   if test -n "$ac_ct_CXX"; then
   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_CXX="$ac_prog"
-echo "$as_me:1530: found $ac_dir/$ac_word" >&5
-break
+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_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
 done
 
 fi
 fi
 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
 if test -n "$ac_ct_CXX"; then
-  echo "$as_me:1538: result: $ac_ct_CXX" >&5
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
 echo "${ECHO_T}$ac_ct_CXX" >&6
 else
-  echo "$as_me:1541: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1549,29 +2011,34 @@ test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
   CXX=$ac_ct_CXX
 fi
 
+
 # Provide some information about the compiler.
-echo "$as_me:1553:" \
+echo "$as_me:$LINENO:" \
      "checking for C++ compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1556: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (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:1559: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1561: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (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:1564: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1566: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (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:1569: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 1573 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -1582,100 +2049,120 @@ main ()
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe"
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
 # 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:1589: checking for C++ compiler default output" >&5
+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:1592: \"$ac_link_default\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
   (eval $ac_link_default) 2>&5
   ac_status=$?
-  echo "$as_me:1595: \$? = $ac_status" >&5
+  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.
-for ac_file in `ls a.exe conftest.exe 2>/dev/null;
-                ls a.out conftest 2>/dev/null;
-                ls a.* conftest.* 2>/dev/null`; do
+
+# 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=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
-    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;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+        ;;
+    conftest.$ac_ext )
+        # This is the source file.
+        ;;
+    [ab].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,
+        # but it would be cool to find out if it's true.  Does anybody
+        # maintain 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:1618: error: C++ compiler cannot create executables" >&5
-echo "$as_me: error: C++ compiler cannot create executables" >&2;}
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ compiler cannot create executables
+See \`config.log' for more details." >&2;}
    { (exit 77); exit 77; }; }
 fi
 
 ac_exeext=$ac_cv_exeext
-echo "$as_me:1624: result: $ac_file" >&5
+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:1629: checking whether the C++ compiler works" >&5
+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:1635: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1638: \$? = $ac_status" >&5
+  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:1645: error: cannot run C++ compiled programs.
-If you meant to cross compile, use \`--host'." >&5
+       { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
 echo "$as_me: error: cannot run C++ compiled programs.
-If you meant to cross compile, use \`--host'." >&2;}
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
     fi
   fi
 fi
-echo "$as_me:1653: result: yes" >&5
+echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
-rm -f a.out a.exe conftest$ac_cv_exeext
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
 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:1660: checking whether we are cross compiling" >&5
+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:1662: result: $cross_compiling" >&5
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
 echo "${ECHO_T}$cross_compiling" >&6
 
-echo "$as_me:1665: checking for executable suffix" >&5
-echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
-if { (eval echo "$as_me:1667: \"$ac_link\"") >&5
+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:1670: \$? = $ac_status" >&5
+  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
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
           export ac_cv_exeext
           break;;
@@ -1683,26 +2170,32 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
   esac
 done
 else
-  { { echo "$as_me:1686: error: cannot compute EXEEXT: cannot compile and link" >&5
-echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 rm -f conftest$ac_cv_exeext
-echo "$as_me:1692: result: $ac_cv_exeext" >&5
+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:1698: checking for object suffix" >&5
-echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
+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 1704 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -1713,40 +2206,47 @@ main ()
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1716: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1719: \$? = $ac_status" >&5
+  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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
     *) 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:1731: error: cannot compute OBJEXT: cannot compile" >&5
-echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-echo "$as_me:1738: result: $ac_cv_objext" >&5
+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:1742: checking whether we are using the GNU C++ compiler" >&5
+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_cxx_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1748 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -1760,41 +2260,46 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1763: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1766: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1769: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1772: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_compiler_gnu=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:1784: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
 GXX=`test $ac_compiler_gnu = yes && echo yes`
 ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="-g"
-echo "$as_me:1790: checking whether $CXX accepts -g" >&5
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
 if test "${ac_cv_prog_cxx_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1796 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -1805,26 +2310,27 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1808: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1811: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1814: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1817: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cxx_g=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_prog_cxx_g=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:1827: result: $ac_cv_prog_cxx_g" >&5
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
 if test "$ac_test_CXXFLAGS" = set; then
   CXXFLAGS=$ac_save_CXXFLAGS
@@ -1851,8 +2357,12 @@ for ac_declaration in \
    'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
-#line 1854 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <stdlib.h>
 $ac_declaration
 int
@@ -1864,27 +2374,32 @@ exit (42);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1867: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1870: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1873: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1876: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 continue
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 1886 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_declaration
 int
 main ()
@@ -1895,21 +2410,22 @@ exit (42);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1898: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1901: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1904: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1907: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
@@ -1925,6 +2441,160 @@ 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
+rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+  DEPDIR=.deps
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+       @echo done
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_CXX_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
 
 # Check whether --enable-shared or --disable-shared was given.
 if test "${enable_shared+set}" = set; then
@@ -1994,11 +2664,11 @@ else
 fi;
 # Make sure we can run config.sub.
 $ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:1997: error: cannot run $ac_config_sub" >&5
+  { { 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:2001: checking build system type" >&5
+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
@@ -2007,26 +2677,24 @@ else
 test -z "$ac_cv_build_alias" &&
   ac_cv_build_alias=`$ac_config_guess`
 test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:2010: error: cannot guess build type; you must specify one" >&5
+  { { 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:2014: error: $ac_config_sub $ac_cv_build_alias failed." >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
+  { { 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:2019: result: $ac_cv_build" >&5
+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/'`
 
-test -z "$build_alias" &&
-  build_alias=$ac_cv_build
 
-echo "$as_me:2029: checking host system type" >&5
+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
@@ -2035,20 +2703,18 @@ else
 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:2038: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+  { { 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:2043: result: $ac_cv_host" >&5
+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/'`
 
-test -z "$host_alias" &&
-  host_alias=$ac_cv_host
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2058,7 +2724,7 @@ 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:2061: checking for $ac_word" >&5
+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
@@ -2066,25 +2732,28 @@ else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_CC="${ac_tool_prefix}gcc"
-echo "$as_me:2076: found $ac_dir/$ac_word" >&5
-break
+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:2084: result: $CC" >&5
+  echo "$as_me:$LINENO: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:2087: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2093,7 +2762,7 @@ 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:2096: checking for $ac_word" >&5
+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
@@ -2101,25 +2770,28 @@ else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_CC="gcc"
-echo "$as_me:2111: found $ac_dir/$ac_word" >&5
-break
+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:2119: result: $ac_ct_CC" >&5
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:2122: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2132,7 +2804,7 @@ 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:2135: checking for $ac_word" >&5
+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
@@ -2140,25 +2812,28 @@ else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_CC="${ac_tool_prefix}cc"
-echo "$as_me:2150: found $ac_dir/$ac_word" >&5
-break
+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:2158: result: $CC" >&5
+  echo "$as_me:$LINENO: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:2161: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2167,7 +2842,7 @@ 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:2170: checking for $ac_word" >&5
+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
@@ -2175,25 +2850,28 @@ else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_CC="cc"
-echo "$as_me:2185: found $ac_dir/$ac_word" >&5
-break
+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:2193: result: $ac_ct_CC" >&5
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:2196: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2206,7 +2884,7 @@ 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:2209: checking for $ac_word" >&5
+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
@@ -2215,19 +2893,22 @@ else
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   ac_prog_rejected=no
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-  ac_prog_rejected=yes
-  continue
-fi
-ac_cv_prog_CC="cc"
-echo "$as_me:2229: found $ac_dir/$ac_word" >&5
-break
+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
@@ -2239,19 +2920,17 @@ if test $ac_prog_rejected = yes; then
     # 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" ${1+"$@"}
-    shift
-    ac_cv_prog_CC="$@"
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
   fi
 fi
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:2251: result: $CC" >&5
+  echo "$as_me:$LINENO: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:2254: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2262,7 +2941,7 @@ if test -z "$CC"; then
   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:2265: checking for $ac_word" >&5
+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
@@ -2270,25 +2949,28 @@ else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-echo "$as_me:2280: found $ac_dir/$ac_word" >&5
-break
+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:2288: result: $CC" >&5
+  echo "$as_me:$LINENO: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:2291: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2301,7 +2983,7 @@ if test -z "$CC"; then
 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:2304: checking for $ac_word" >&5
+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
@@ -2309,25 +2991,28 @@ else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_CC="$ac_prog"
-echo "$as_me:2319: found $ac_dir/$ac_word" >&5
-break
+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:2327: result: $ac_ct_CC" >&5
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:2330: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2339,38 +3024,45 @@ fi
 
 fi
 
-test -z "$CC" && { { echo "$as_me:2342: error: no acceptable cc found in \$PATH" >&5
-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
-echo "$as_me:2347:" \
+echo "$as_me:$LINENO:" \
      "checking for C compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:2350: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (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:2353: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:2355: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (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:2358: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:2360: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (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:2363: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 
-echo "$as_me:2366: checking whether we are using the GNU C compiler" >&5
+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 2372 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -2384,41 +3076,46 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2387: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2390: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2393: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2396: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' 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:2408: result: $ac_cv_c_compiler_gnu" >&5
+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:2414: checking whether $CC accepts -g" >&5
+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 2420 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -2429,26 +3126,27 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2432: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2435: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2438: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2441: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_prog_cc_g=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:2451: result: $ac_cv_prog_cc_g" >&5
+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
@@ -2465,6 +3163,102 @@ else
     CFLAGS=
   fi
 fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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;
+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
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
 # Some people use a C++ compiler to compile C.  Since we use `exit',
 # in C++ we need to declare it.  In case someone uses the same compiler
 # for both compiling C and C++ we need to have the C++ compiler decide
@@ -2475,16 +3269,16 @@ cat >conftest.$ac_ext <<_ACEOF
 #endif
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2478: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2481: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2484: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2487: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   for ac_declaration in \
    ''\
@@ -2496,8 +3290,12 @@ if { (eval echo "$as_me:2478: \"$ac_compile\"") >&5
    'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
-#line 2499 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <stdlib.h>
 $ac_declaration
 int
@@ -2509,27 +3307,32 @@ exit (42);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2512: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2515: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2518: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2521: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 continue
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 2531 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 $ac_declaration
 int
 main ()
@@ -2540,21 +3343,22 @@ exit (42);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2543: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2546: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2549: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2552: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
@@ -2567,7 +3371,8 @@ fi
 
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=c
@@ -2576,6 +3381,99 @@ 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
 
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_CC_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+# 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
+  PATH_SEPARATOR=$lt_cv_sys_path_separator
+fi
+
+
 # Check whether --with-gnu-ld or --without-gnu-ld was given.
 if test "${with_gnu_ld+set}" = set; then
   withval="$with_gnu_ld"
@@ -2586,7 +3484,7 @@ fi;
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
-  echo "$as_me:2589: checking for ld used by GCC" >&5
+  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*)
@@ -2616,17 +3514,17 @@ echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
     ;;
   esac
 elif test "$with_gnu_ld" = yes; then
-  echo "$as_me:2619: checking for GNU ld" >&5
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
 else
-  echo "$as_me:2622: checking for non-GNU ld" >&5
+  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-:}"
+  IFS="${IFS=  }"; ac_save_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
@@ -2649,16 +3547,16 @@ fi
 
 LD="$lt_cv_path_LD"
 if test -n "$LD"; then
-  echo "$as_me:2652: result: $LD" >&5
+  echo "$as_me:$LINENO: result: $LD" >&5
 echo "${ECHO_T}$LD" >&6
 else
-  echo "$as_me:2655: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
-test -z "$LD" && { { echo "$as_me:2658: error: no acceptable ld found in \$PATH" >&5
+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:2661: checking if the linker ($LD) is GNU ld" >&5
+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
@@ -2670,23 +3568,24 @@ else
   lt_cv_prog_gnu_ld=no
 fi
 fi
-echo "$as_me:2673: result: $lt_cv_prog_gnu_ld" >&5
+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:2677: checking for $LD option to reload object files" >&5
+
+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:2684: result: $lt_cv_ld_reload_flag" >&5
+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:2689: checking for BSD-compatible nm" >&5
+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
@@ -2695,7 +3594,7 @@ else
   # Let the user override the test.
   lt_cv_path_NM="$NM"
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  IFS="${IFS=  }"; ac_save_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
 fi
 
 NM="$lt_cv_path_NM"
-echo "$as_me:2725: result: $NM" >&5
+echo "$as_me:$LINENO: result: $NM" >&5
 echo "${ECHO_T}$NM" >&6
 
-echo "$as_me:2728: checking whether ln -s works" >&5
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_executable_p="test -f"
+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_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+
+  # 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/sedXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=$TMPDIR/sed$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   { (exit 1); exit 1; }
+}
+  _max=0
+  _count=0
+  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+  # along with /bin/sed that truncates output.
+  for _sed in $_sed_list /usr/xpg4/bin/sed; do
+    test ! -f ${_sed} && break
+    cat /dev/null > "$tmp/sed.in"
+    _count=0
+    echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
+    # Check for GNU sed and select it if it is found.
+    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
+      lt_cv_path_SED=${_sed}
+      break
+    fi
+    while true; do
+      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
+      mv "$tmp/sed.tmp" "$tmp/sed.in"
+      cp "$tmp/sed.in" "$tmp/sed.nl"
+      echo >>"$tmp/sed.nl"
+      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
+      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
+      # 40000 chars as input seems more than enough
+      test $_count -gt 10 && break
+      _count=`expr $_count + 1`
+      if test $_count -gt $_max; then
+        _max=$_count
+        lt_cv_path_SED=$_sed
+      fi
+    done
+  done
+  rm -rf "$tmp"
+
+fi
+
+if test "X$SED" != "X"; then
+  lt_cv_path_SED=$SED
+else
+  SED=$lt_cv_path_SED
+fi
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&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:2732: result: yes" >&5
+  echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
-  echo "$as_me:2735: result: no, using $LN_S" >&5
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
 echo "${ECHO_T}no, using $LN_S" >&6
 fi
 
-echo "$as_me:2739: checking how to recognise dependant libraries" >&5
-echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
 if test "${lt_cv_deplibs_check_method+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -2750,7 +3734,7 @@ lt_cv_deplibs_check_method='unknown'
 # `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
+# '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.
@@ -2814,9 +3798,9 @@ hpux10.20*|hpux11*)
   lt_cv_file_magic_test_file=/usr/lib/libc.sl
   ;;
 
-irix5* | irix6*)
+irix5* | irix6* | nonstopux*)
   case $host_os in
-  irix5*)
+  irix5* | nonstopux*)
     # 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"
     ;;
@@ -2838,7 +3822,7 @@ irix5* | irix6*)
 # This must be Linux ELF.
 linux*)
   case $host_cpu in
-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* | m68* )
+  alpha* | hppa* | i*86 | m68* | mips | mipsel | powerpc* | s390* | sparc* | ia64* | x86_64*)
     lt_cv_deplibs_check_method=pass_all ;;
   *)
     # glibc up to 2.1.1 does not perform some relocations on ARM
@@ -2909,18 +3893,28 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
     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
     ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
   esac
   ;;
 esac
 
 fi
-echo "$as_me:2917: result: $lt_cv_deplibs_check_method" >&5
+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:2923: checking command to parse $NM output" >&5
+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
@@ -2956,9 +3950,12 @@ 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'"
   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
-irix*)
+irix* | nonstopux*)
   symcode='[BCDEGRST]'
   ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
 solaris* | sysv5*)
   symcode='[BDT]'
   ;;
@@ -3001,17 +3998,17 @@ void nm_test_func(){}
 int main(){nm_test_var='a';nm_test_func();return(0);}
 EOF
 
-  if { (eval echo "$as_me:3004: \"$ac_compile\"") >&5
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3007: \$? = $ac_status" >&5
+  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:3011: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+    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:3014: \$? = $ac_status" >&5
+  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
@@ -3063,11 +4060,11 @@ EOF
          save_CFLAGS="$CFLAGS"
          LIBS="conftstm.$ac_objext"
          CFLAGS="$CFLAGS$no_builtin_flag"
-         if { (eval echo "$as_me:3066: \"$ac_link\"") >&5
+         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3069: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest; then
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest$ac_exeext; then
            pipe_works=yes
          fi
          LIBS="$save_LIBS"
@@ -3107,10 +4104,10 @@ else
 fi
 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
 then
-  echo "$as_me:3110: result: failed" >&5
+  echo "$as_me:$LINENO: result: failed" >&5
 echo "${ECHO_T}failed" >&6
 else
-  echo "$as_me:3113: result: ok" >&5
+  echo "$as_me:$LINENO: result: ok" >&5
 echo "${ECHO_T}ok" >&6
 fi
 
@@ -3119,7 +4116,7 @@ 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:3122: checking how to run the C preprocessor" >&5
+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
@@ -3137,21 +4134,31 @@ 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.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
   # 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 3143 "configure"
-#include "confdefs.h"
-#include <assert.h>
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:3148: \"$ac_cpp conftest.$ac_ext\"") >&5
+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
+  grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:3154: \$? = $ac_status" >&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
@@ -3165,7 +4172,8 @@ if test -z "$ac_cpp_err"; then
   :
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   # Broken: fails on valid input.
 continue
 fi
@@ -3174,17 +4182,21 @@ 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 3177 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:3181: \"$ac_cpp conftest.$ac_ext\"") >&5
+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
+  grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:3187: \$? = $ac_status" >&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
@@ -3199,7 +4211,8 @@ if test -z "$ac_cpp_err"; then
 continue
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   # Passes both tests.
 ac_preproc_ok=:
 break
@@ -3221,28 +4234,38 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-echo "$as_me:3224: result: $CPP" >&5
+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.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
   # 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 3234 "configure"
-#include "confdefs.h"
-#include <assert.h>
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:3239: \"$ac_cpp conftest.$ac_ext\"") >&5
+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
+  grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:3245: \$? = $ac_status" >&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
@@ -3256,7 +4279,8 @@ if test -z "$ac_cpp_err"; then
   :
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   # Broken: fails on valid input.
 continue
 fi
@@ -3265,17 +4289,21 @@ 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 3268 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:3272: \"$ac_cpp conftest.$ac_ext\"") >&5
+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
+  grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:3278: \$? = $ac_status" >&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
@@ -3290,7 +4318,8 @@ if test -z "$ac_cpp_err"; then
 continue
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   # Passes both tests.
 ac_preproc_ok=:
 break
@@ -3303,8 +4332,10 @@ rm -f conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then
   :
 else
-  { { echo "$as_me:3306: error: C preprocessor \"$CPP\" fails sanity check" >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
@@ -3314,29 +4345,316 @@ 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
 
-for ac_header in dlfcn.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:3320: 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 "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+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 3326 "configure"
-#include "confdefs.h"
-#include <$ac_header>
+#line $LINENO "configure"
+/* confdefs.h.  */
 _ACEOF
-if { (eval echo "$as_me:3330: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:3336: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
+  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_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext 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"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out 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"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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
+sed 's/^/| /' 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 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"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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
+sed 's/^/| /' 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"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
   else
     ac_cpp_err=
   fi
@@ -3344,29 +4662,80 @@ else
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  eval "$as_ac_Header=yes"
+  ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  eval "$as_ac_Header=no"
+sed 's/^/| /' 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;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&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;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&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:3355: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+  cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_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:3369: checking for ${ac_tool_prefix}file" >&5
+    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
@@ -3421,16 +4790,16 @@ fi
 
 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 if test -n "$MAGIC_CMD"; then
-  echo "$as_me:3424: result: $MAGIC_CMD" >&5
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
 echo "${ECHO_T}$MAGIC_CMD" >&6
 else
-  echo "$as_me:3427: result: no" >&5
+  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:3433: checking for file" >&5
+    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
@@ -3485,10 +4854,10 @@ fi
 
 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 if test -n "$MAGIC_CMD"; then
-  echo "$as_me:3488: result: $MAGIC_CMD" >&5
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
 echo "${ECHO_T}$MAGIC_CMD" >&6
 else
-  echo "$as_me:3491: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3504,7 +4873,7 @@ 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:3507: checking for $ac_word" >&5
+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
@@ -3512,25 +4881,28 @@ else
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-echo "$as_me:3522: found $ac_dir/$ac_word" >&5
-break
+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:3530: result: $RANLIB" >&5
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
 echo "${ECHO_T}$RANLIB" >&6
 else
-  echo "$as_me:3533: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3539,7 +4911,7 @@ 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:3542: checking for $ac_word" >&5
+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
@@ -3547,15 +4919,18 @@ else
   if test -n "$ac_ct_RANLIB"; then
   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_RANLIB="ranlib"
-echo "$as_me:3557: found $ac_dir/$ac_word" >&5
-break
+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=":"
@@ -3563,10 +4938,10 @@ fi
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
-  echo "$as_me:3566: result: $ac_ct_RANLIB" >&5
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
 echo "${ECHO_T}$ac_ct_RANLIB" >&6
 else
-  echo "$as_me:3569: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3578,7 +4953,7 @@ 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:3581: checking for $ac_word" >&5
+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
@@ -3586,25 +4961,28 @@ else
   if test -n "$STRIP"; then
   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-echo "$as_me:3596: found $ac_dir/$ac_word" >&5
-break
+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:3604: result: $STRIP" >&5
+  echo "$as_me:$LINENO: result: $STRIP" >&5
 echo "${ECHO_T}$STRIP" >&6
 else
-  echo "$as_me:3607: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3613,7 +4991,7 @@ 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:3616: checking for $ac_word" >&5
+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
@@ -3621,15 +4999,18 @@ else
   if test -n "$ac_ct_STRIP"; then
   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_STRIP="strip"
-echo "$as_me:3631: found $ac_dir/$ac_word" >&5
-break
+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=":"
@@ -3637,10 +5018,10 @@ fi
 fi
 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
 if test -n "$ac_ct_STRIP"; then
-  echo "$as_me:3640: result: $ac_ct_STRIP" >&5
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
 echo "${ECHO_T}$ac_ct_STRIP" >&6
 else
-  echo "$as_me:3643: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3649,6 +5030,7 @@ else
   STRIP="$ac_cv_prog_STRIP"
 fi
 
+
 enable_dlopen=no
 enable_win32_dll=no
 
@@ -3664,11 +5046,11 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 3667 "configure"' > conftest.$ac_ext
-  if { (eval echo "$as_me:3668: \"$ac_compile\"") >&5
+  echo '#line 5049 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3671: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
     case `/usr/bin/file conftest.$ac_objext` in
     *32-bit*)
@@ -3685,16 +5067,35 @@ case $host in
   rm -rf conftest*
   ;;
 
+*-*-linux*)
+  # Test if the compiler is 64bit
+  echo 'int i;' > conftest.$ac_ext
+  lt_cv_cc_64bit_output=no
+  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
+    *"ELF 64"*)
+      lt_cv_cc_64bit_output=yes
+      ;;
+    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:3692: checking whether the C compiler needs -belf" >&5
+  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'
@@ -3702,8 +5103,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
      cat >conftest.$ac_ext <<_ACEOF
-#line 3705 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -3714,21 +5119,22 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3717: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3720: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3723: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3726: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' conftest.$ac_ext >&5
+
 lt_cv_cc_needs_belf=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3739,7 +5145,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 fi
-echo "$as_me:3742: result: $lt_cv_cc_needs_belf" >&5
+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
@@ -3747,6 +5153,7 @@ echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
   fi
   ;;
 
+
 esac
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
@@ -3833,7 +5240,7 @@ fi
 set dummy $CC
 compiler="$2"
 
-echo "$as_me:3836: checking for objdir" >&5
+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
@@ -3844,9 +5251,11 @@ else
   objdir=_libs
 fi
 rmdir .libs 2>/dev/null
-echo "$as_me:3847: result: $objdir" >&5
+echo "$as_me:$LINENO: result: $objdir" >&5
 echo "${ECHO_T}$objdir" >&6
 
+
+
 # Check whether --with-pic or --without-pic was given.
 if test "${with_pic+set}" = set; then
   withval="$with_pic"
@@ -3859,7 +5268,7 @@ 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:3862: checking for $compiler option to produce PIC" >&5
+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
@@ -3891,7 +5300,7 @@ else
       # like `-m68040'.
       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
       ;;
-    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
     darwin* | rhapsody*)
@@ -3934,7 +5343,7 @@ else
       lt_cv_prog_cc_pic='+Z'
       ;;
 
-    irix5* | irix6*)
+    irix5* | irix6* | nonstopux*)
       lt_cv_prog_cc_wl='-Wl,'
       lt_cv_prog_cc_static='-non_shared'
       # PIC (with -KPIC) is the default.
@@ -3978,11 +5387,7 @@ else
     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
+      lt_cv_prog_cc_wl='-Wl,'
       ;;
 
     uts4*)
@@ -4006,14 +5411,14 @@ else
 fi
 
 if test -z "$lt_cv_prog_cc_pic"; then
-  echo "$as_me:4009: result: none" >&5
+  echo "$as_me:$LINENO: result: none" >&5
 echo "${ECHO_T}none" >&6
 else
-  echo "$as_me:4012: result: $lt_cv_prog_cc_pic" >&5
+  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:4016: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
+  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
@@ -4021,8 +5426,12 @@ else
       save_CFLAGS="$CFLAGS"
     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
     cat >conftest.$ac_ext <<_ACEOF
-#line 4024 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -4033,16 +5442,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4036: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:4039: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4042: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4045: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
         case $host_os in
       hpux9* | hpux10* | hpux11*)
@@ -4062,7 +5471,8 @@ if { (eval echo "$as_me:4036: \"$ac_compile\"") >&5
 
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
       lt_cv_prog_cc_pic_works=no
 
 fi
@@ -4071,6 +5481,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 
 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
@@ -4078,23 +5489,23 @@ fi
     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
   fi
 
-  echo "$as_me:4081: result: $lt_cv_prog_cc_pic_works" >&5
+  echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
 echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
 fi
 
 # Check for any special shared library compilation flags.
 if test -n "$lt_cv_prog_cc_shlib"; then
-  { echo "$as_me:4087: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
+  { 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:4091: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
+   { 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
 
-echo "$as_me:4097: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
+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
@@ -4103,8 +5514,12 @@ else
   save_LDFLAGS="$LDFLAGS"
   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
   cat >conftest.$ac_ext <<_ACEOF
-#line 4106 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -4115,30 +5530,32 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4118: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4121: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4124: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4127: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' 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:4141: result: $lt_cv_prog_cc_static_works" >&5
+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"
@@ -4148,8 +5565,9 @@ 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"
 
+
 # Check to see if options -o and -c are simultaneously supported by compiler
-echo "$as_me:4152: checking if $compiler supports -c -o file.$ac_objext" >&5
+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
@@ -4169,7 +5587,7 @@ chmod -w .
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 compiler_c_o=no
-if { (eval echo configure:4172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5590: \"$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
@@ -4193,12 +5611,12 @@ $rm -r conftest 2>/dev/null
 fi
 
 compiler_c_o=$lt_cv_compiler_c_o
-echo "$as_me:4196: result: $compiler_c_o" >&5
+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:4201: checking if $compiler supports -c -o file.lo" >&5
+  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
@@ -4210,8 +5628,12 @@ else
   save_objext="$ac_objext"
   ac_objext=lo
   cat >conftest.$ac_ext <<_ACEOF
-#line 4213 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -4222,16 +5644,16 @@ int some_variable = 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4225: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:4228: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4231: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4234: \$? = $ac_status" >&5
+  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
@@ -4243,7 +5665,8 @@ if { (eval echo "$as_me:4225: \"$ac_compile\"") >&5
 
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   ac_objext="$save_objext"
@@ -4252,7 +5675,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
   compiler_o_lo=$lt_cv_compiler_o_lo
-  echo "$as_me:4255: result: $compiler_o_lo" >&5
+  echo "$as_me:$LINENO: result: $compiler_o_lo" >&5
 echo "${ECHO_T}$compiler_o_lo" >&6
 else
   compiler_o_lo=no
@@ -4262,7 +5685,7 @@ fi
 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:4265: checking if we can lock with hard links" >&5
+  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*
@@ -4270,10 +5693,10 @@ echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
   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:4273: result: $hard_links" >&5
+  echo "$as_me:$LINENO: result: $hard_links" >&5
 echo "${ECHO_T}$hard_links" >&6
   if test "$hard_links" = no; then
-    { echo "$as_me:4276: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+    { 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
@@ -4283,15 +5706,19 @@ fi
 
 if test "$GCC" = yes; then
   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
-  echo "$as_me:4286: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+  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 4293 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 int
 main ()
@@ -4302,16 +5729,16 @@ int some_variable = 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4305: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:4308: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4311: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4314: \$? = $ac_status" >&5
+  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
@@ -4323,11 +5750,12 @@ if { (eval echo "$as_me:4305: \"$ac_compile\"") >&5
 
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   CFLAGS="$save_CFLAGS"
-  echo "$as_me:4330: result: $compiler_rtti_exceptions" >&5
+  echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5
 echo "${ECHO_T}$compiler_rtti_exceptions" >&6
 
   if test "$compiler_rtti_exceptions" = "yes"; then
@@ -4338,7 +5766,7 @@ echo "${ECHO_T}$compiler_rtti_exceptions" >&6
 fi
 
 # See if the linker supports building shared libraries.
-echo "$as_me:4341: checking whether the linker ($LD) supports shared libraries" >&5
+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=
@@ -4477,7 +5905,7 @@ EOF
     # 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~
+      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=
@@ -4495,7 +5923,7 @@ EOF
     # 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
+    archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
        cp $export_symbols $output_objdir/$soname-def;
       else
        echo EXPORTS > $output_objdir/$soname-def;
@@ -4504,6 +5932,7 @@ EOF
         set dummy \$symbol;
         case \$# in
           2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+          4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
           *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
         esac;
         _lt_hint=`expr 1 + \$_lt_hint`;
@@ -4616,10 +6045,12 @@ else
       # need to do runtime linking.
       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
        for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+         case $ld_flag in
+         *-brtl*)
            aix_use_runtimelinking=yes
            break
-         fi
+         ;;
+         esac
        done
       esac
 
@@ -4733,8 +6164,9 @@ else
     esac
     # 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='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
+    #       `"' quotes if we put them in here... so don't!
+    archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
     # We need to add '_' to the symbols in $export_symbols first
     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
     hardcode_direct=yes
@@ -4786,13 +6218,14 @@ else
     export_dynamic_flag_spec='${wl}-E'
     ;;
 
-  irix5* | irix6*)
+  irix5* | irix6* | nonstopux*)
     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'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     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'
+      hardcode_libdir_flag_spec='-rpath $libdir'
     fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     hardcode_libdir_separator=:
     link_all_deplibs=yes
     ;;
@@ -4820,7 +6253,7 @@ else
     hardcode_direct=yes
     hardcode_shlibpath_var=no
     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
       export_dynamic_flag_spec='${wl}-E'
     else
@@ -4830,7 +6263,7 @@ else
        hardcode_libdir_flag_spec='-R$libdir'
         ;;
       *)
-        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
         ;;
       esac
@@ -4883,7 +6316,35 @@ else
     ;;
 
   solaris*)
+    # gcc --version < 3.0 without binutils cannot create self contained
+    # shared libraries reliably, requiring libgcc.a to resolve some of
+    # the object symbols generated in some cases.  Libraries that use
+    # assert need libgcc.a to resolve __eprintf, for example.  Linking
+    # a copy of libgcc.a into every shared library to guarantee resolving
+    # such symbols causes other problems:  According to Tim Van Holder
+    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
+    # (to the application) exception stack for one thing.
     no_undefined_flag=' -z defs'
+    if test "$GCC" = yes; then
+      case `$CC --version 2>/dev/null` in
+      [12].*)
+       cat <<EOF 1>&2
+
+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
+*** create self contained shared libraries on Solaris systems, without
+*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
+*** -no-undefined support, which will at least allow you to build shared
+*** libraries.  However, you may find that when you link such libraries
+*** into an application without using GCC, you have to manually add
+*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
+*** upgrade to a newer version of GCC.  Another option is to rebuild your
+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
+
+EOF
+        no_undefined_flag=
+       ;;
+      esac
+    fi
     # $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'
@@ -4914,13 +6375,23 @@ else
     ;;
 
   sysv4)
-    if test "x$host_vendor" = xsno; then
-      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      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
+    case $host_vendor in
+      sni)
+        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+        hardcode_direct=yes # is this really true???
+        ;;
+      siemens)
+        ## LD is ld it makes a PLAMLIB
+        ## CC just makes a GrossModule.
+        archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+        reload_cmds='$CC -r -o $output$reload_objs'
+        hardcode_direct=no
+        ;;
+      motorola)
+        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
+        ;;
+    esac
     runpath_var='LD_RUN_PATH'
     hardcode_shlibpath_var=no
     ;;
@@ -4990,12 +6461,12 @@ else
     ;;
   esac
 fi
-echo "$as_me:4993: result: $ld_shlibs" >&5
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
 echo "${ECHO_T}$ld_shlibs" >&6
 test "$ld_shlibs" = no && can_build_shared=no
 
 # Check hardcoding attributes.
-echo "$as_me:4998: checking how to hardcode library paths into programs" >&5
+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" || \
@@ -5019,20 +6490,20 @@ else
   # directories.
   hardcode_action=unsupported
 fi
-echo "$as_me:5022: result: $hardcode_action" >&5
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
 echo "${ECHO_T}$hardcode_action" >&6
 
 striplib=
 old_striplib=
-echo "$as_me:5027: checking whether stripping libraries is possible" >&5
+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:5032: result: yes" >&5
+  echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
-  echo "$as_me:5035: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -5040,7 +6511,7 @@ reload_cmds='$LD$reload_flag -o $output$reload_objs'
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 # PORTME Fill in your ld.so characteristics
-echo "$as_me:5043: checking dynamic linker characteristics" >&5
+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'
@@ -5068,6 +6539,9 @@ aix3*)
 
 aix4* | aix5*)
   version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
   if test "$host_cpu" = ia64; then
     # AIX 5 supports IA64
     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
@@ -5079,15 +6553,15 @@ aix4* | aix5*)
     # 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
-      ;;
+      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
@@ -5106,6 +6580,7 @@ aix4* | aix5*)
     fi
     shlibpath_var=LIBPATH
   fi
+  hardcode_into_libs=yes
   ;;
 
 amigaos*)
@@ -5153,7 +6628,7 @@ cygwin* | mingw* | pw32*)
     ;;
   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"`
+    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
     ;;
   yes,pw32*)
     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
@@ -5236,14 +6711,17 @@ hpux9* | hpux10* | hpux11*)
   postinstall_cmds='chmod 555 $lib'
   ;;
 
-irix5* | irix6*)
-  version_type=irix
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)          version_type=irix ;;
+  esac
   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*)
+  irix5* | nonstopux*)
     libsuff= shlibsuff=
     ;;
   *)
@@ -5281,6 +6759,13 @@ linux*)
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  case $host_cpu:$lt_cv_cc_64bit_output in
+  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+    sys_lib_dlsearch_path_spec="/lib64 /usr/lib64"
+    sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64"
+    ;;
+  esac
+
   # 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,
@@ -5347,11 +6832,12 @@ os2*)
 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'
+  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $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"
+  hardcode_into_libs=yes
   ;;
 
 sco3.2v5*)
@@ -5394,6 +6880,12 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
   case $host_vendor in
     sni)
       shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
       ;;
     motorola)
       need_lib_prefix=no
@@ -5433,17 +6925,17 @@ sysv4*MP*)
   dynamic_linker=no
   ;;
 esac
-echo "$as_me:5436: result: $dynamic_linker" >&5
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
 echo "${ECHO_T}$dynamic_linker" >&6
 test "$dynamic_linker" = no && can_build_shared=no
 
 # Report the final consequences.
-echo "$as_me:5441: checking if libtool supports shared libraries" >&5
+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:5443: result: $can_build_shared" >&5
+echo "$as_me:$LINENO: result: $can_build_shared" >&5
 echo "${ECHO_T}$can_build_shared" >&6
 
-echo "$as_me:5446: checking whether to build shared libraries" >&5
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
 test "$can_build_shared" = "no" && enable_shared=no
 
@@ -5464,14 +6956,14 @@ aix4*)
   fi
   ;;
 esac
-echo "$as_me:5467: result: $enable_shared" >&5
+echo "$as_me:$LINENO: result: $enable_shared" >&5
 echo "${ECHO_T}$enable_shared" >&6
 
-echo "$as_me:5470: checking whether to build static libraries" >&5
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
 # Make sure either enable_shared or enable_static is yes.
 test "$enable_shared" = yes || enable_static=yes
-echo "$as_me:5474: result: $enable_static" >&5
+echo "$as_me:$LINENO: result: $enable_static" >&5
 echo "${ECHO_T}$enable_static" >&6
 
 if test "$hardcode_action" = relink; then
@@ -5509,68 +7001,82 @@ else
    ;;
 
   *)
-    echo "$as_me:5512: checking for shl_load" >&5
+    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 5518 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load (); below.  */
-#include <assert.h>
+    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
 /* 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 ();
-char (*f) ();
-
-int
-main ()
-{
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_shl_load) || defined (__stub___shl_load)
 choke me
 #else
-f = shl_load;
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
 #endif
 
+int
+main ()
+{
+return f != shl_load;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5549: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5552: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5555: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5558: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' 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:5568: result: $ac_cv_func_shl_load" >&5
+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:5573: checking for shl_load in -ldld" >&5
+  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
@@ -5578,8 +7084,12 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5581 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -5597,93 +7107,108 @@ shl_load ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5600: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5603: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5606: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5609: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' 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:5620: result: $ac_cv_lib_dld_shl_load" >&5
+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="shl_load" lt_cv_dlopen_libs="-dld"
 else
-  echo "$as_me:5625: checking for dlopen" >&5
+  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 5631 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.  */
-#include <assert.h>
+    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
 /* 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 ();
-char (*f) ();
-
-int
-main ()
-{
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_dlopen) || defined (__stub___dlopen)
 choke me
 #else
-f = dlopen;
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
 #endif
 
+int
+main ()
+{
+return f != dlopen;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5662: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5665: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5668: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5671: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' 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:5681: result: $ac_cv_func_dlopen" >&5
+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:5686: checking for dlopen in -ldl" >&5
+  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
@@ -5691,8 +7216,12 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5694 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -5710,32 +7239,33 @@ dlopen ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5713: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5716: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5719: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5722: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' 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:5733: result: $ac_cv_lib_dl_dlopen" >&5
+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:5738: checking for dlopen in -lsvld" >&5
+  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
@@ -5743,8 +7273,12 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lsvld  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5746 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -5762,32 +7296,33 @@ dlopen ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5765: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5768: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5771: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5774: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' 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:5785: result: $ac_cv_lib_svld_dlopen" >&5
+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:5790: checking for dld_link in -ldld" >&5
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5795,8 +7330,12 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5798 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -5814,40 +7353,46 @@ dld_link ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5817: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5820: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5823: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5826: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dld_dld_link=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_lib_dld_dld_link=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:5837: result: $ac_cv_lib_dld_dld_link" >&5
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
 if test $ac_cv_lib_dld_dld_link = yes; then
   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
 fi
 
+
 fi
 
+
 fi
 
+
 fi
 
+
 fi
 
+
 fi
 
     ;;
@@ -5870,7 +7415,7 @@ fi
     save_LIBS="$LIBS"
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
-    echo "$as_me:5873: checking whether a program can dlopen itself" >&5
+    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
@@ -5881,7 +7426,7 @@ else
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 5884 "configure"
+#line 7429 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -5942,10 +7487,10 @@ int main ()
     exit (status);
 }
 EOF
-  if { (eval echo "$as_me:5945: \"$ac_link\"") >&5
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5948: \$? = $ac_status" >&5
+  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=$?
@@ -5961,13 +7506,14 @@ EOF
 fi
 rm -fr conftest*
 
+
 fi
-echo "$as_me:5965: result: $lt_cv_dlopen_self" >&5
+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:5970: checking whether a statically linked program can dlopen itself" >&5
+      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
@@ -5978,7 +7524,7 @@ else
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 5981 "configure"
+#line 7527 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -6039,10 +7585,10 @@ int main ()
     exit (status);
 }
 EOF
-  if { (eval echo "$as_me:6042: \"$ac_link\"") >&5
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6045: \$? = $ac_status" >&5
+  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=$?
@@ -6058,8 +7604,9 @@ EOF
 fi
 rm -fr conftest*
 
+
 fi
-echo "$as_me:6062: result: $lt_cv_dlopen_self_static" >&5
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
     fi
 
@@ -6080,6 +7627,7 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
   esac
 fi
 
+
 if test "$enable_shared" = yes && test "$GCC" = yes; then
   case $archive_cmds in
   *'~'*)
@@ -6089,7 +7637,7 @@ if test "$enable_shared" = yes && test "$GCC" = yes; then
     # 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:6092: checking whether -lc should be explicitly linked in" >&5
+    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
@@ -6097,10 +7645,10 @@ else
   $rm conftest*
     echo 'static int dummy;' > conftest.$ac_ext
 
-    if { (eval echo "$as_me:6100: \"$ac_compile\"") >&5
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:6103: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
       soname=conftest
       lib=conftest
@@ -6114,10 +7662,10 @@ else
       libname=conftest
       save_allow_undefined_flag=$allow_undefined_flag
       allow_undefined_flag=
-      if { (eval echo "$as_me:6117: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+      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:6120: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
       then
        lt_cv_archive_cmds_need_lc=no
@@ -6130,7 +7678,7 @@ else
     fi
 fi
 
-    echo "$as_me:6133: result: $lt_cv_archive_cmds_need_lc" >&5
+    echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
 echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
     ;;
   esac
@@ -6159,7 +7707,7 @@ if test -f "$ltmain"; then
   # 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 \
+  for var in echo old_CC old_CFLAGS SED \
     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 \
@@ -6221,8 +7769,11 @@ if test -f "$ltmain"; then
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+# A sed that does not truncate output.
+SED=$lt_SED
+
 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
+Xsed="${SED} -e s/^X//"
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
@@ -6286,7 +7837,7 @@ DLLTOOL="$DLLTOOL"
 OBJDUMP="$OBJDUMP"
 
 # Used on cygwin: assembler.
-AS="$AS"
+AS=$lt_AS
 
 # The name of the directory that contains temporary libtool files.
 objdir=$objdir
@@ -6687,6 +8238,10 @@ EOF
   chmod +x "$ofile"
 fi
 
+
+
+
+
 # This can be used to rebuild libtool when needed
 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
@@ -6695,21 +8250,25 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 # Prevent multiple expansion
 
+
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
 
        CXXFLAGS="-g -O0 -Wall"
-    cat >>confdefs.h <<\EOF
+    cat >>confdefs.h <<\_ACEOF
 #define WITH_DEBUG 1
-EOF
+_ACEOF
+
 
 else
 
        CXXFLAGS="-O0"
 
+
 fi;
 
+
 # Check whether --with-libldap or --without-libldap was given.
 if test "${with_libldap+set}" = set; then
   withval="$with_libldap"
@@ -6720,8 +8279,10 @@ else
 
        LIBS="-L/usr/local/lib $LIBS "
 
+
 fi;
 
+
 # Check whether --with-ldap-includes or --without-ldap-includes was given.
 if test "${with_ldap_includes+set}" = set; then
   withval="$with_ldap_includes"
@@ -6732,9 +8293,10 @@ else
 
        CPPFLAGS="-I/usr/local/include $CPPFLAGS "
 
+
 fi;
 
-echo "$as_me:6737: checking for main in -lresolv" >&5
+echo "$as_me:$LINENO: checking for main in -lresolv" >&5
 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
 if test "${ac_cv_lib_resolv_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6742,8 +8304,13 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lresolv  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6745 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
 
 int
 main ()
@@ -6754,38 +8321,39 @@ main ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6757: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6760: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6763: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6766: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_resolv_main=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_lib_resolv_main=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6777: result: $ac_cv_lib_resolv_main" >&5
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
 if test $ac_cv_lib_resolv_main = yes; then
-  cat >>confdefs.h <<EOF
+  cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBRESOLV 1
-EOF
+_ACEOF
 
   LIBS="-lresolv $LIBS"
 
 fi
 
-echo "$as_me:6788: checking for ber_strdup in -llber" >&5
+echo "$as_me:$LINENO: checking for ber_strdup in -llber" >&5
 echo $ECHO_N "checking for ber_strdup in -llber... $ECHO_C" >&6
 if test "${ac_cv_lib_lber_ber_strdup+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6793,8 +8361,12 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-llber  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6796 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -6812,27 +8384,28 @@ ber_strdup ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6815: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6818: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6821: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6824: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_lber_ber_strdup=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_lib_lber_ber_strdup=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6835: result: $ac_cv_lib_lber_ber_strdup" >&5
+echo "$as_me:$LINENO: result: $ac_cv_lib_lber_ber_strdup" >&5
 echo "${ECHO_T}$ac_cv_lib_lber_ber_strdup" >&6
 if test $ac_cv_lib_lber_ber_strdup = yes; then
 
@@ -6847,7 +8420,7 @@ else
 
 fi
 
-echo "$as_me:6850: checking for ldap_add_ext in -lldap" >&5
+echo "$as_me:$LINENO: checking for ldap_add_ext in -lldap" >&5
 echo $ECHO_N "checking for ldap_add_ext in -lldap... $ECHO_C" >&6
 if test "${ac_cv_lib_ldap_ldap_add_ext+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6857,8 +8430,12 @@ LIBS="-lldap
     -llber
      $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6860 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -6876,27 +8453,28 @@ ldap_add_ext ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6879: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6882: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6885: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6888: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_ldap_ldap_add_ext=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_lib_ldap_ldap_add_ext=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6899: result: $ac_cv_lib_ldap_ldap_add_ext" >&5
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_add_ext" >&5
 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_add_ext" >&6
 if test $ac_cv_lib_ldap_ldap_add_ext = yes; then
 
@@ -6911,14 +8489,18 @@ else
 
 fi
 
-echo "$as_me:6914: checking whether time.h and sys/time.h may both be included" >&5
+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 6920 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <sys/types.h>
 #include <sys/time.h>
 #include <time.h>
@@ -6933,52 +8515,100 @@ return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6936: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:6939: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6942: \"$ac_try\"") >&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6945: \$? = $ac_status" >&5
+  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
+sed 's/^/| /' conftest.$ac_ext >&5
+
 ac_cv_header_time=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:6955: result: $ac_cv_header_time" >&5
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
 echo "${ECHO_T}$ac_cv_header_time" >&6
 if test $ac_cv_header_time = yes; then
 
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
 #define TIME_WITH_SYS_TIME 1
-EOF
+_ACEOF
 
 fi
 
-echo "$as_me:6965: checking for ldap.h" >&5
+if test "${ac_cv_header_ldap_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for ldap.h" >&5
 echo $ECHO_N "checking for ldap.h... $ECHO_C" >&6
 if test "${ac_cv_header_ldap_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ldap_h" >&5
+echo "${ECHO_T}$ac_cv_header_ldap_h" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 6971 "configure"
-#include "confdefs.h"
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking ldap.h usability" >&5
+echo $ECHO_N "checking ldap.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
 #include <ldap.h>
 _ACEOF
-if { (eval echo "$as_me:6975: \"$ac_cpp conftest.$ac_ext\"") >&5
+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
+sed 's/^/| /' 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 ldap.h presence" >&5
+echo $ECHO_N "checking ldap.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ldap.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
+  grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:6981: \$? = $ac_status" >&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
@@ -6989,25 +8619,75 @@ else
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  ac_cv_header_ldap_h=yes
+  ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_header_ldap_h=no
+sed 's/^/| /' 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: ldap.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ldap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ldap.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ldap.h: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: ldap.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ldap.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ldap.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ldap.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ldap.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ldap.h: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for ldap.h" >&5
+echo $ECHO_N "checking for ldap.h... $ECHO_C" >&6
+if test "${ac_cv_header_ldap_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_ldap_h=$ac_header_preproc
 fi
-echo "$as_me:7000: result: $ac_cv_header_ldap_h" >&5
+echo "$as_me:$LINENO: result: $ac_cv_header_ldap_h" >&5
 echo "${ECHO_T}$ac_cv_header_ldap_h" >&6
 
+fi
+
+
 cat >conftest.$ac_ext <<_ACEOF
-#line 7004 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <ldap.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "ldap_add_ext" >/dev/null 2>&1; then
+  $EGREP "ldap_add_ext" >/dev/null 2>&1; then
 
         :
 
@@ -7021,23 +8701,70 @@ else
 fi
 rm -f conftest*
 
-echo "$as_me:7024: checking for lber.h" >&5
+if test "${ac_cv_header_lber_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for lber.h" >&5
 echo $ECHO_N "checking for lber.h... $ECHO_C" >&6
 if test "${ac_cv_header_lber_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_lber_h" >&5
+echo "${ECHO_T}$ac_cv_header_lber_h" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 7030 "configure"
-#include "confdefs.h"
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking lber.h usability" >&5
+echo $ECHO_N "checking lber.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
 #include <lber.h>
 _ACEOF
-if { (eval echo "$as_me:7034: \"$ac_cpp conftest.$ac_ext\"") >&5
+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
+sed 's/^/| /' 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 lber.h presence" >&5
+echo $ECHO_N "checking lber.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <lber.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
+  grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:7040: \$? = $ac_status" >&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
@@ -7048,25 +8775,75 @@ else
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  ac_cv_header_lber_h=yes
+  ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_header_lber_h=no
+sed 's/^/| /' 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: lber.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: lber.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lber.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: lber.h: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: lber.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: lber.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lber.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: lber.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lber.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: lber.h: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for lber.h" >&5
+echo $ECHO_N "checking for lber.h... $ECHO_C" >&6
+if test "${ac_cv_header_lber_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_lber_h=$ac_header_preproc
 fi
-echo "$as_me:7059: result: $ac_cv_header_lber_h" >&5
+echo "$as_me:$LINENO: result: $ac_cv_header_lber_h" >&5
 echo "${ECHO_T}$ac_cv_header_lber_h" >&6
 
+fi
+
+
 cat >conftest.$ac_ext <<_ACEOF
-#line 7063 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <lber.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "ber_strdup" >/dev/null 2>&1; then
+  $EGREP "ber_strdup" >/dev/null 2>&1; then
 
         :
 
@@ -7080,7 +8857,10 @@ else
 fi
 rm -f conftest*
 
-ac_config_files="$ac_config_files Makefile src/Makefile"
+
+
+
+                              ac_config_files="$ac_config_files Makefile src/Makefile examples/Makefile"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -7091,7 +8871,7 @@ cat >confcache <<\_ACEOF
 # 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
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
 # loading this file, other *unset* `ac_cv_foo' will be assigned the
 # following values.
 
@@ -7126,7 +8906,7 @@ _ACEOF
      t end
      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
      : end' >>confcache
-if cmp -s $cache_file confcache; then :; else
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
   if test -w $cache_file; then
     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
     cat confcache >$cache_file
 
 DEFS=-DHAVE_CONFIG_H
 
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:7163: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
-# Generated automatically by configure.
+# 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
+ac_cs_recheck=false
+ac_cs_silent=false
 SHELL=\${CONFIG_SHELL-$SHELL}
-ac_cs_invocation="\$0 \$@"
-
 _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=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
 
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
 # Name of the executable.
-as_me=`echo "$0" |sed 's,.*[\\/],,'`
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)$' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+         /^X\/\(\/\/\)$/{ s//\1/; q; }
+         /^X\/\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.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
+            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+            CONFIG_SHELL=$as_dir/$as_base
+            export CONFIG_SHELL
+            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+          fi;;
+        esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$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
@@ -7211,24 +9204,20 @@ else
 fi
 rm -f conf$$ conf$$.exe conf$$.file
 
-as_executable_p="test -f"
-
-# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
-  as_unset=unset
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
 else
-  as_unset=false
+  as_mkdir_p=false
 fi
 
-# NLS nuisances.
-$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
-$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
-$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
-$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
-$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
-$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
-$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
-$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+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.
@@ -7237,10 +9226,34 @@ as_nl='
 IFS="  $as_nl"
 
 # CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+$as_unset CDPATH
 
 exec 6>&1
 
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.57.  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.
@@ -7260,7 +9273,7 @@ if test -n "$ac_config_commands"; then
   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
 fi
 
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
 
 ac_cs_usage="\
 \`$as_me' instantiates files from templates according to the
@@ -7270,6 +9283,7 @@ Usage: $0 [OPTIONS] [FILE]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
   --file=FILE[:TEMPLATE]
@@ -7287,12 +9301,12 @@ Configuration commands:
 $config_commands
 
 Report bugs to <bug-autoconf@gnu.org>."
-EOF
+_ACEOF
 
-cat >>$CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.52,
+configured by $0, generated by GNU Autoconf 2.57,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -7301,9 +9315,9 @@ This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 srcdir=$srcdir
 INSTALL="$INSTALL"
-EOF
+_ACEOF
 
-cat >>$CONFIG_STATUS <<\EOF
+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=:
@@ -7313,30 +9327,30 @@ do
   --*=*)
     ac_option=`expr "x$1" : 'x\([^=]*\)='`
     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
-    shift
-    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
-    shift
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
     ;;
-  -*);;
   *) # This is not an option, so the user has probably given explicit
      # arguments.
+     ac_option=$1
      ac_need_defaults=false;;
   esac
 
-  case $1 in
+  case $ac_option in
   # Handling of the options.
-EOF
-cat >>$CONFIG_STATUS <<EOF
+_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 ;;
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+    ac_cs_recheck=: ;;
   --version | --vers* | -V )
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:7339: error: ambiguous option: $1
+    { { 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;}
@@ -7346,16 +9360,19 @@ Try \`$0 --help' for more information." >&2;}
   --debug | --d* | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
-    shift
-    CONFIG_FILES="$CONFIG_FILES $1"
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
-    shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $1"
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
     ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { { echo "$as_me:7358: error: unrecognized option: $1
+  -*) { { 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;}
@@ -7367,41 +9384,44 @@ Try \`$0 --help' for more information." >&2;}
   shift
 done
 
-exec 5>>config.log
-cat >&5 << _ACEOF
+ac_configure_extra_args=
 
-## ----------------------- ##
-## Running config.status.  ##
-## ----------------------- ##
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
 
-This file was extended by $as_me 2.52, executed with
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  > $ac_cs_invocation
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
 
 _ACEOF
-EOF
 
-cat >>$CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<_ACEOF
 #
 # INIT-COMMANDS section.
 #
 
-EOF
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
 
-cat >>$CONFIG_STATUS <<\EOF
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
 for ac_config_target in $ac_config_targets
 do
   case "$ac_config_target" in
   # Handling of arguments.
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
-  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+  "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
   "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
-  *) { { echo "$as_me:7404: error: invalid argument: $ac_config_target" >&5
+  *) { { 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
@@ -7417,6 +9437,9 @@ if $ac_need_defaults; then
   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 fi
 
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
 # Create a temporary directory, and hook for its removal unless debugging.
 $debug ||
 {
@@ -7425,23 +9448,23 @@ $debug ||
 }
 
 # Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+
 {
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {
-  tmp=$TMPDIR/cs$$-$RANDOM
+  tmp=./confstat$$-$RANDOM
   (umask 077 && mkdir $tmp)
 } ||
 {
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   echo "$me: cannot create a temporary directory in ." >&2
    { (exit 1); exit 1; }
 }
 
-EOF
+_ACEOF
 
-cat >>$CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<_ACEOF
 
 #
 # CONFIG_FILES section.
@@ -7454,6 +9477,12 @@ if test -n "\$CONFIG_FILES"; then
   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
@@ -7469,23 +9498,18 @@ s,@includedir@,$includedir,;t t
 s,@oldincludedir@,$oldincludedir,;t t
 s,@infodir@,$infodir,;t t
 s,@mandir@,$mandir,;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,@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,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@DEFS@,$DEFS,;t t
 s,@LIBS@,$LIBS,;t t
 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
 s,@PACKAGE@,$PACKAGE,;t t
 s,@VERSION@,$VERSION,;t t
 s,@ACLOCAL@,$ACLOCAL,;t t
@@ -7493,6 +9517,12 @@ s,@AUTOCONF@,$AUTOCONF,;t t
 s,@AUTOMAKE@,$AUTOMAKE,;t t
 s,@AUTOHEADER@,$AUTOHEADER,;t t
 s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@AWK@,$AWK,;t t
 s,@SET_MAKE@,$SET_MAKE,;t t
 s,@CXX@,$CXX,;t t
 s,@CXXFLAGS@,$CXXFLAGS,;t t
@@ -7501,6 +9531,15 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
 s,@EXEEXT@,$EXEEXT,;t t
 s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CXXDEPMODE@,$CXXDEPMODE,;t t
+s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
 s,@build@,$build,;t t
 s,@build_cpu@,$build_cpu,;t t
 s,@build_vendor@,$build_vendor,;t t
@@ -7512,19 +9551,23 @@ s,@host_os@,$host_os,;t t
 s,@CC@,$CC,;t t
 s,@CFLAGS@,$CFLAGS,;t t
 s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
 s,@LN_S@,$LN_S,;t t
 s,@ECHO@,$ECHO,;t t
 s,@RANLIB@,$RANLIB,;t t
 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@STRIP@,$STRIP,;t t
-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
 s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
 s,@LIBTOOL@,$LIBTOOL,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 CEOF
 
-EOF
+_ACEOF
 
-  cat >>$CONFIG_STATUS <<\EOF
+  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
@@ -7563,8 +9606,8 @@ EOF
   fi
 fi # test -n "$CONFIG_FILES"
 
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_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
@@ -7578,7 +9621,8 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   esac
 
   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+  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\(/\)' \| \
@@ -7589,60 +9633,84 @@ echo X"$ac_file" |
          /^X\(\/\/\)$/{ s//\1/; q; }
          /^X\(\/\).*/{ s//\1/; q; }
          s/.*/./; q'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    { 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"
-    ;;
-  esac
-done; }
-
-    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
   else
-    ac_dir_suffix= ac_dots=
-  fi
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
 
-  case $srcdir in
-  .)  ac_srcdir=.
-      if test -z "$ac_dots"; then
-         ac_top_srcdir=.
-      else
-         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
-      fi ;;
-  [\\/]* | ?:[\\/]* )
-      ac_srcdir=$srcdir$ac_dir_suffix;
-      ac_top_srcdir=$srcdir ;;
+  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_dots$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_dots$srcdir ;;
-  esac
+    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_dots$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:7637: creating $ac_file" >&5
+    { 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 automatically by config.status.  */
-  configure_input="Generated automatically from `echo $ac_file_in |
-                                                 sed 's,.*/,,'` by configure."
+  #    /* 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.
@@ -7652,7 +9720,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:7655: error: cannot find input file: $f" >&5
+         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;;
@@ -7665,23 +9733,29 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:7668: error: cannot find input file: $f" >&5
+           { { 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; }
-EOF
-cat >>$CONFIG_STATUS <<EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
   sed "$ac_vpsub
 $extrasub
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_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
@@ -7693,8 +9767,8 @@ s,@INSTALL@,$ac_INSTALL,;t t
   fi
 
 done
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
 
 #
 # CONFIG_HEADER section.
@@ -7726,7 +9800,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   * )   ac_file_in=$ac_file.in ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:7729: creating $ac_file" >&5
+  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
@@ -7737,7 +9811,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:7740: error: cannot find input file: $f" >&5
+         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;;
@@ -7750,7 +9824,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:7753: error: cannot find input file: $f" >&5
+           { { 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;;
@@ -7759,7 +9833,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
   # Remove the trailing spaces.
   sed 's/[     ]*$//' $ac_file_inputs >$tmp/in
 
-EOF
+_ACEOF
 
 # Transform confdefs.h into two sed scripts, `conftest.defines' and
 # `conftest.undefs', that substitutes the proper values into
@@ -7775,16 +9849,16 @@ rm -f conftest.defines conftest.undefs
 # `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 <<\EOF
+cat >confdef2sed.sed <<\_ACEOF
 s/[\\&,]/\\&/g
 s,[\\$`],\\&,g
 t clear
 : clear
-s,^[   ]*#[    ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
+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
-EOF
+_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.
@@ -7795,14 +9869,14 @@ 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 <<\EOF
+cat >>conftest.undefs <<\_ACEOF
 s,^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-EOF
+_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 grep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
 echo '  :' >>$CONFIG_STATUS
 rm -f conftest.tail
@@ -7826,7 +9900,7 @@ do
   mv conftest.tail conftest.defines
 done
 rm -f conftest.defines
-echo '  fi # egrep' >>$CONFIG_STATUS
+echo '  fi # grep' >>$CONFIG_STATUS
 echo >>$CONFIG_STATUS
 
 # Break up conftest.undefs because some shells have a limit on the size
@@ -7854,23 +9928,24 @@ do
 done
 rm -f conftest.undefs
 
-cat >>$CONFIG_STATUS <<\EOF
+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 automatically by config.status.  */
+  #    /* config.h.  Generated by config.status.  */
   if test x"$ac_file" = x-; then
-    echo "/* Generated automatically by configure.  */" >$tmp/config.h
+    echo "/* Generated by configure.  */" >$tmp/config.h
   else
-    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
+    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:7870: $ac_file is unchanged" >&5
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
-      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+      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\(/\)' \| \
@@ -7881,24 +9956,31 @@ echo X"$ac_file" |
          /^X\(\/\/\)$/{ s//\1/; q; }
          /^X\(\/\).*/{ s//\1/; q; }
          s/.*/./; q'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-        { 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"
-    ;;
-  esac
-done; }
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
 
-      fi
       rm -f $ac_file
       mv $tmp/config.h $ac_file
     fi
@@ -7906,9 +9988,22 @@ done; }
     cat $tmp/config.h
     rm -f $tmp/config.h
   fi
+_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
+echo "timestamp for $ac_file" >`(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'`/stamp-h$_am_stamp_count
 done
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
 
 #
 # CONFIG_COMMANDS section.
@@ -7916,20 +10011,157 @@ cat >>$CONFIG_STATUS <<\EOF
 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_dest" : 'X\(//\)[^/]' \| \
+         X"$ac_dest" : 'X\(//\)$' \| \
+         X"$ac_dest" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  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`
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
   case $ac_dest in
-    default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > src/stamp-h ;;
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$mf" : 'X\(//\)[^/]' \| \
+         X"$mf" : 'X\(//\)$' \| \
+         X"$mf" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+       s/\\\\$//
+       p
+       n
+       /\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$file" : 'X\(//\)[^/]' \| \
+         X"$file" : 'X\(//\)$' \| \
+         X"$file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
   esac
 done
-EOF
+_ACEOF
 
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
 
 { (exit 0); exit 0; }
-EOF
+_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
@@ -7940,8 +10172,11 @@ ac_clean_files=$ac_clean_files_save
 # need to make the FD available again.
 if test "$no_create" != yes; then
   ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
   exec 5>/dev/null
-  $SHELL $CONFIG_STATUS || ac_cs_success=false
+  $SHELL $CONFIG_STATUS $ac_config_status_args || 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.
index a622bf759e620333eb713be7c47c96329a06df89..f303f743b551bca989ed616324c74ddfaa49cad2 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
+dnl Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
 dnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file
   
   
@@ -8,7 +8,7 @@ dnl disable config.cache
 dnl define([AC_CACHE_LOAD], )
 dnl define([AC_CACHE_SAVE], )
 
-AC_INIT(src/main.cpp)
+AC_INIT(examples/main.cpp)
 AM_INIT_AUTOMAKE(main, 0.0.1)
 AM_CONFIG_HEADER(src/config.h)
 
@@ -91,4 +91,4 @@ dnl Checks for typedefs, structures, and compiler characteristics.
 
 dnl Checks for library functions.
 
-AC_OUTPUT(Makefile src/Makefile)
+AC_OUTPUT(Makefile src/Makefile examples/Makefile)
diff --git a/contrib/ldapc++/depcomp b/contrib/ldapc++/depcomp
new file mode 100755 (executable)
index 0000000..807b991
--- /dev/null
@@ -0,0 +1,423 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# 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, 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.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+   dir=`echo "$object" | sed 's,/.*$,/,'`
+   if test "$dir" = "$object"; then
+      dir=
+   fi
+   # FIXME: should be _deps on DOS.
+   depfile="$dir.deps/$base"
+fi
+
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  This file always lives in the current directory.
+  # Also, the AIX compiler puts `$object:' at the start of each line;
+  # $object doesn't have directory information.
+  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  outname="$stripped.o"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      tmpdepfile1="$dir.libs/$base.lo.d"
+      tmpdepfile2="$dir.libs/$base.d"
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1="$dir$base.o.d"
+      tmpdepfile2="$dir$base.d"
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      exit $stat
+   fi
+
+   if test -f "$tmpdepfile1"; then
+      tmpdepfile="$tmpdepfile1"
+   else
+      tmpdepfile="$tmpdepfile2"
+   fi
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a space and a tab in the [].
+      sed -e 's,^.*\.[a-z]*:[  ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.  We will use -o /dev/null later,
+  # however we can't do the remplacement now because
+  # `-o $object' might simply not be used
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[      ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    -*)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
diff --git a/contrib/ldapc++/examples/Makefile.am b/contrib/ldapc++/examples/Makefile.am
new file mode 100644 (file)
index 0000000..3e3a6b8
--- /dev/null
@@ -0,0 +1,8 @@
+##
+# Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
+# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+##
+noinst_PROGRAMS = main
+
+main_SOURCES = main.cpp
+main_LDADD = ../src/libldapcpp.la
diff --git a/contrib/ldapc++/examples/Makefile.in b/contrib/ldapc++/examples/Makefile.in
new file mode 100644 (file)
index 0000000..2c8914f
--- /dev/null
@@ -0,0 +1,410 @@
+# Makefile.in generated by automake 1.7.2 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+
+# Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
+# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+noinst_PROGRAMS = main
+
+main_SOURCES = main.cpp
+main_LDADD = ../src/libldapcpp.la
+subdir = examples
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+noinst_PROGRAMS = main$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+
+am_main_OBJECTS = main.$(OBJEXT)
+main_OBJECTS = $(am_main_OBJECTS)
+main_DEPENDENCIES = ../src/libldapcpp.la
+main_LDFLAGS =
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/main.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(main_SOURCES)
+DIST_COMMON = Makefile.am Makefile.in
+SOURCES = $(main_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --foreign  examples/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+clean-noinstPROGRAMS:
+       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         echo " rm -f $$p $$f"; \
+         rm -f $$p $$f ; \
+       done
+main$(EXEEXT): $(main_OBJECTS) $(main_DEPENDENCIES) 
+       @rm -f main$(EXEEXT)
+       $(CXXLINK) $(main_LDFLAGS) $(main_OBJECTS) $(main_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+
+distclean-depend:
+       -rm -rf ./$(DEPDIR)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCXX_TRUE@    -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCXX_TRUE@  then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCXX_TRUE@  else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCXX_TRUE@  fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCXX_TRUE@    -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCXX_TRUE@  then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCXX_TRUE@  else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCXX_TRUE@  fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@  if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCXX_TRUE@    -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCXX_TRUE@  then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
+@am__fastdepCXX_TRUE@  else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCXX_TRUE@  fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(ETAGS_ARGS)$$tags$$unique" \
+         || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+            $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+
+installdirs:
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+       mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+       distclean-generic distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstPROGRAMS ctags distclean \
+       distclean-compile distclean-depend distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am info \
+       info-am install install-am install-data install-data-am \
+       install-exec install-exec-am install-info install-info-am \
+       install-man install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/ldapc++/examples/main.cpp b/contrib/ldapc++/examples/main.cpp
new file mode 100644 (file)
index 0000000..8fff4d4
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include<iostream.h>
+#include<strstream>
+#include "LDAPConnection.h"
+#include "LDAPConstraints.h"
+#include "LDAPSearchReference.h"
+#include "LDAPSearchResults.h"
+#include "LDAPAttribute.h"
+#include "LDAPAttributeList.h"
+#include "LDAPEntry.h"
+#include "LDAPException.h"
+#include "LDAPModification.h"
+#include "LDAPReferralException.h"
+
+#include"debug.h"
+
+int main(){
+    LDAPConstraints* cons=new LDAPConstraints;
+    LDAPControlSet* ctrls=new LDAPControlSet;
+    ctrls->add(LDAPCtrl(LDAP_CONTROL_MANAGEDSAIT));
+    cons->setServerControls(ctrls);
+    LDAPConnection *lc=new LDAPConnection("localhost",9009);
+    lc->setConstraints(cons);
+    cout << "----------------------doing bind...." <<  endl;
+    try{
+        lc->bind("cn=Manager,o=Organisation,c=DE" , "secret",cons);
+        cout << lc->getHost() << endl;    
+        bool result = lc->compare("cn=Manager,o=Organisation,c=DE", 
+                LDAPAttribute("cn","Manaer"));
+        cout << "Compare: " << result << endl;
+    
+        LDAPAttributeList* attrs=new LDAPAttributeList();
+        StringList values;
+        StringList s2;
+        values.add("top");
+        values.add("Person");
+        attrs->addAttribute(LDAPAttribute("objectClass",values));
+        attrs->addAttribute(LDAPAttribute("cn","Peter"));
+        attrs->addAttribute(LDAPAttribute("sn","Peter,hallo"));
+        LDAPEntry* entry=new LDAPEntry(
+                "cn=Peter , o=Organisation, c=DE", attrs);    
+//        lc->add(entry);
+        
+//        lc->del("ou=Groups,o=Organisation,c=DE");
+
+        LDAPSearchResults* entries = lc->search("o=Organisation,c=DE",
+                LDAPConnection::SEARCH_ONE);
+        if (entries != 0){
+            LDAPEntry* entry = entries->getNext();
+            if(entry != 0){
+                cout << *(entry) << endl;
+            }
+            while(entry){
+                try{
+                    entry = entries->getNext();
+                    if(entry != 0){
+                        cout << *(entry) << endl;
+                    }
+                    delete entry;
+                }catch(LDAPReferralException e){
+                    cout << "Caught Referral" << endl;
+                }
+            }
+        }
+        
+        lc->unbind();
+        delete lc;
+   }catch (LDAPException e){
+        cout << "------------------------- caught Exception ---------"<< endl;
+        cout << e << endl;
+    }
+
+    /*
+    cout << "--------------------starting search" << endl;
+    LDAPAttributeList* attrs=new LDAPAttributeList();
+    StringList values;
+    values.add("top");
+    values.add("organizationalUnit");
+    attrs->addAttribute(LDAPAttribute("objectClass",values));
+    attrs->addAttribute(LDAPAttribute("ou","Groups"));
+    LDAPEntry* entry=new LDAPEntry(
+            "ou=Groups, o=Organisation, c=DE", attrs);    
+
+    LDAPAttribute newattr("description");
+    LDAPModification::mod_op op = LDAPModification::OP_DELETE;
+    LDAPModList *mod=new LDAPModList();
+    mod->addModification(LDAPModification(newattr,op));
+    LDAPMessageQueue* q=0;
+    try{
+        q=lc->search("o=Organisation,c=de",LDAPAsynConnection::SEARCH_SUB,
+         "objectClass=*",StringList());
+//        q=lc->add(entry);
+//        q=lc->modify("cn=Manager,o=Organisation,c=DE",
+//                mod);
+        LDAPMsg *res=q->getNext();
+        bool cont=true;
+        while( cont  ) {
+            switch(res->getMessageType()){
+                LDAPSearchResult *res2;
+                const LDAPEntry *entry;
+                case LDAP_RES_SEARCH_ENTRY :
+                    res2= (LDAPSearchResult*)res;
+                    entry=  res2->getEntry();
+                    cout << "Entry:            " << *entry << endl; 
+                    delete res;
+                    res=q->getNext();
+                break;
+                case LDAP_RES_SEARCH_REFERENCE :
+                    cout << "Reference:         "  << endl;
+                    delete res;
+                    res=q->getNext();
+                break;
+                default :
+                    cout << ( *(LDAPResult*) res) << endl;
+                    delete res;
+                    cout  << "-----------------search done" << endl;
+                    cont=false;
+                break;
+            }
+        }
+        delete q;
+    }catch (LDAPException e){
+        cout << "----------------error during search" << endl;
+        delete q;
+        cout << e << endl;
+    }
+    lc->unbind();
+    */
+}
+
index b3a1a4d099373699d34294e004cbe8ec66a3fcac..ab07749dca34529ebf0d64d7e6c02b169ee1bc85 100644 (file)
@@ -37,8 +37,6 @@ LDAPAddRequest::LDAPAddRequest(const LDAPEntry* entry,
 LDAPAddRequest::~LDAPAddRequest(){
     DEBUG(LDAP_DEBUG_DESTROY, "LDAPAddRequest::~LDAPAddRequest()" << endl);
     delete m_entry;
-    // flush the cache, as the add may affect searches
-    m_connection->flush_cache();
 }
 
 LDAPMessageQueue* LDAPAddRequest::sendRequest(){
index 6a5d5c464c17fafe8e3e048a98b1c90699912208..74011169f54b87a901b865e6d7c371aeba064f44 100644 (file)
@@ -39,9 +39,6 @@ LDAPAsynConnection::LDAPAsynConnection(const string& hostname, int port,
 LDAPAsynConnection::~LDAPAsynConnection(){
     DEBUG(LDAP_DEBUG_DESTROY,
             "LDAPAsynConnection::~LDAPAsynConnection()" << endl);
-    if (cur_session){
-        ldap_destroy_cache(cur_session);
-    }    
     unbind();
     //delete m_constr;        
 }
@@ -295,26 +292,3 @@ LDAPAsynConnection* LDAPAsynConnection::referralConnect(
     return 0;
 }
 
-int LDAPAsynConnection::enableCache(long timeout, long maxmem){
-    int retval = ldap_enable_cache(cur_session, timeout, maxmem);
-    if (!retval)
-        m_cacheEnabled = true;
-    return retval;    
-}    
-
-void LDAPAsynConnection::disableCache(){
-    ldap_disable_cache(cur_session);
-    m_cacheEnabled = false;
-}
-
-void LDAPAsynConnection::uncache_entry(string &dn){
-    if (m_cacheEnabled){
-        ldap_uncache_entry(cur_session, dn.c_str());
-    }
-}
-
-void LDAPAsynConnection::flush_cache(){
-    if (m_cacheEnabled){
-        ldap_flush_cache(cur_session);
-    }
-}
index fdef9ccd5f44e6926a291ca3dd3e096d6b27c774..ed217d01cd78c704d6b5800795d96229af7629e0 100644 (file)
@@ -286,22 +286,6 @@ class LDAPAsynConnection{
                 LDAPUrlList::const_iterator& usedUrl,
                 const LDAPConstraints* cons) const;
 
-        /**
-         * Turn on caching, maxmem is in MB and timeout is in seconds.
-         * maxmem can be zero if you want to restrict caching by timeout only.
-         */
-        int enableCache(long timeout, long maxmem);
-        /// disable caching.
-        void disableCache();
-        /// is cacheEnabled?
-        bool getCacheEnabled() { return m_cacheEnabled;};
-        /// uncache a specific dn.  Used internally by methods that write.
-        void uncache_entry(std::string &dn);
-        /// used to clear the cache.  Probably should be used after creating
-        /// an object that a cached search should find.
-        void flush_cache();
-        
-        
     private :
         /**
          * Private copy constructor. So nobody can call it.
diff --git a/contrib/ldapc++/src/LDAPAttrType.cpp b/contrib/ldapc++/src/LDAPAttrType.cpp
new file mode 100644 (file)
index 0000000..121f9b6
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include "debug.h"
+#include "LDAPAttrType.h"
+
+
+LDAPAttrType::LDAPAttrType(){
+    DEBUG(LDAP_DEBUG_CONSTRUCT,
+            "LDAPAttrType::LDAPAttrType( )" << endl);
+
+    oid = string ();
+    desc = string ();
+    names = StringList ();
+    single = false;
+}
+
+LDAPAttrType::LDAPAttrType (const LDAPAttrType &at){
+    DEBUG(LDAP_DEBUG_CONSTRUCT,
+            "LDAPAttrType::LDAPAttrType( )" << endl);
+
+    oid = at.oid;
+    desc = at.desc;
+    names = at.names;
+    single = at.single;
+}
+
+LDAPAttrType::LDAPAttrType (string at_item) { 
+
+    DEBUG(LDAP_DEBUG_CONSTRUCT,
+            "LDAPAttrType::LDAPAttrType( )" << endl);
+
+    LDAPAttributeType *a;
+    int ret;
+    const char *errp;
+    a = ldap_str2attributetype (at_item.c_str(), &ret, &errp,SCHEMA_PARSE_FLAG);
+
+    if (a) {
+       this->setNames (a->at_names);
+       this->setDesc (a->at_desc);
+       this->setOid (a->at_oid);
+       this->setSingle (a->at_single_value);
+    }
+    // else? -> error
+}
+
+LDAPAttrType::~LDAPAttrType() {
+    DEBUG(LDAP_DEBUG_DESTROY,"LDAPAttrType::~LDAPAttrType()" << endl);
+}
+
+void LDAPAttrType::setSingle (int at_single) {
+    single = (at_single == 1);
+}
+    
+void LDAPAttrType::setNames (char **at_names) {
+    names = StringList (at_names);
+}
+
+void LDAPAttrType::setDesc (char *at_desc) {
+    desc = string ();
+    if (at_desc)
+       desc = at_desc;
+}
+
+void LDAPAttrType::setOid (char *at_oid) {
+    oid = string ();
+    if (at_oid)
+       oid = at_oid;
+}
+
+bool LDAPAttrType::isSingle () {
+    return single;
+}
+
+string LDAPAttrType::getOid () {
+    return oid;
+}
+
+string LDAPAttrType::getDesc () {
+    return desc;
+}
+
+StringList LDAPAttrType::getNames () {
+    return names;
+}
+
+string LDAPAttrType::getName () {
+
+    if (names.empty())
+       return "";
+    else
+       return *(names.begin());
+}
diff --git a/contrib/ldapc++/src/LDAPAttrType.h b/contrib/ldapc++/src/LDAPAttrType.h
new file mode 100644 (file)
index 0000000..3042ab5
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#ifndef LDAP_ATTRTYPE_H
+#define LDAP_ATTRTYPE_H
+
+#include <ldap_schema.h>
+#include <string>
+
+#include "StringList.h"
+
+#define SCHEMA_PARSE_FLAG    0x03
+
+
+using namespace std;
+
+/**
+ * Represents the Attribute Type (from LDAP schema)
+ */
+class LDAPAttrType{
+    private :
+       StringList names;
+       string desc, oid;
+       bool single;
+       
+    public :
+
+        /**
+         * Constructor
+         */   
+        LDAPAttrType();
+
+        /**
+         * Copy constructor
+         */   
+       LDAPAttrType (const LDAPAttrType& oc);
+
+        /**
+        * Constructs new object and fills the data structure by parsing the
+        * argument.
+        * @param at_item description of attribute type is string returned
+        *  by the search command. It is in the form:
+        * "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC ''
+        *    EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )"
+         */   
+        LDAPAttrType (string at_item);
+
+        /**
+         * Destructor
+         */
+        virtual ~LDAPAttrType();
+       
+       
+       /**
+        * Returns attribute description
+        */
+       string getDesc ();
+       
+       /**
+        * Returns attribute oid
+        */
+       string getOid ();
+
+       /**
+        * Returns attribute name (first one if there are more of them)
+        */
+       string getName ();
+
+       /**
+        * Returns all attribute names
+        */
+       StringList getNames();
+       
+       /**
+        * Returns true if attribute type hllows only single value
+        */
+       bool isSingle();
+       
+       void setNames (char **at_names);
+       void setDesc (char *at_desc);
+       void setOid (char *at_oid);
+       void setSingle (int at_single_value);
+       
+};
+
+#endif // LDAP_ATTRTYPE_H
index 71165ea8529232f0a8619952cd2db75bfb226511..821f2ec03c73a34a1e4f0ea19174365494d5d26e 100644 (file)
@@ -334,26 +334,3 @@ void LDAPConnection::setConstraints(LDAPConstraints* cons){
 const LDAPConstraints* LDAPConnection::getConstraints() const{
     return LDAPAsynConnection::getConstraints();
 }
-
-int LDAPConnection::enableCache(long timeout, long maxmem) {
-    return LDAPAsynConnection::enableCache(timeout, maxmem);
-}
-
-
-void LDAPConnection::disableCache() {
-    LDAPAsynConnection::disableCache();
-}
-
-bool LDAPConnection::getCacheEnabled() { 
-    return LDAPAsynConnection::getCacheEnabled();
-}
-
-void LDAPConnection::uncache_entry(string &dn) {
-    LDAPAsynConnection::uncache_entry(dn);
-}
-
-void LDAPConnection::flush_cache()
-{
-    LDAPAsynConnection::flush_cache();
-}
-
index 93acf618cc4c0cecdc95e5cd383c794a318f8e2f..b18842d88ef2a413c362d9a0b5198d767bd2c499 100644 (file)
@@ -229,22 +229,6 @@ class LDAPConnection : private LDAPAsynConnection {
         void setConstraints(LDAPConstraints *cons);
         
         const LDAPConstraints* getConstraints() const ;
-
-        /**
-         * Turn on caching, maxmem is in MB and timeout is in seconds.
-         * maxmem can be zero if you want to restrict caching by timeout only.
-         */
-        int enableCache(long timeout, long maxmem);
-        /// disable caching.
-        void disableCache();
-        /// is cacheEnabled?
-        bool getCacheEnabled();
-        /// uncache a specific dn.  Used internally by methods that write.
-        void uncache_entry(std::string &dn);
-        /// used to clear the cache.  Probably should be used after creating
-        /// an object that a cached search should find.
-        void flush_cache();
-
 };
 
 #endif //LDAP_CONNECTION_H
index 78d086f5fc306e688c51b82535e1e64c2f3cbd6e..66c79b16e9938cf1369ec9ae84ec323ccc94d8c5 100644 (file)
@@ -35,10 +35,6 @@ LDAPDeleteRequest::LDAPDeleteRequest(const string& dn,
 LDAPDeleteRequest::~LDAPDeleteRequest(){
     DEBUG(LDAP_DEBUG_DESTROY,
           "LDAPDeleteRequest::~LDAPDeleteRequest()" << endl);
-    // TODO -- flush the entire cache here?  or does this invalidate
-    // cached searches that may have found the deleted entry.
-    // m_connection->uncache_entry(m_dn);
-    m_connection->flush_cache();
 }
 
 LDAPMessageQueue* LDAPDeleteRequest::sendRequest(){
index 0d964370791d47e1937d47ed5cd26ed8d46cb29e..d50c04f2895e3398f4d54f5e163fe263f6e5595e 100644 (file)
@@ -44,9 +44,6 @@ LDAPModDNRequest::LDAPModDNRequest(const string& dn, const string& newRDN,
 
 LDAPModDNRequest::~LDAPModDNRequest(){
     DEBUG(LDAP_DEBUG_DESTROY, "LDAPModDNRequest::~LDAPModDNRequest()" << endl);
-    // flush entries from the cache.
-    m_connection->uncache_entry(m_dn);
-    m_connection->uncache_entry(m_newRDN);
 }
 
 LDAPMessageQueue* LDAPModDNRequest::sendRequest(){
index 3d688ca35372faf0b5a28e68a6f98d373e280376..310ececcb38d09dc7e816ff66f044c1720a3e59e 100644 (file)
@@ -39,10 +39,6 @@ LDAPModifyRequest::~LDAPModifyRequest(){
     DEBUG(LDAP_DEBUG_DESTROY, 
             "LDAPModifyRequest::~LDAPModifyRequest()" << endl);
     delete m_modList;
-    // flush this entry from cache.
-    //m_connection->uncache_entry(m_dn);
-    // I think we need to do this... (j.costlow)
-    m_connection->flush_cache();
 }
 
 LDAPMessageQueue* LDAPModifyRequest::sendRequest(){
diff --git a/contrib/ldapc++/src/LDAPObjClass.cpp b/contrib/ldapc++/src/LDAPObjClass.cpp
new file mode 100644 (file)
index 0000000..c78a675
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include "debug.h"
+#include "LDAPObjClass.h"
+
+
+LDAPObjClass::LDAPObjClass(){
+    DEBUG(LDAP_DEBUG_CONSTRUCT,
+            "LDAPObjClass::LDAPObjClass( )" << endl);
+
+    oid = string ();
+    desc = string ();
+    names = StringList ();
+    must = StringList();
+    may = StringList();
+    sup = StringList();
+}
+
+LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){
+    DEBUG(LDAP_DEBUG_CONSTRUCT,
+            "LDAPObjClass::LDAPObjClass( )" << endl);
+
+    oid = oc.oid;
+    desc = oc.desc;
+    names = oc.names;
+    must = oc.must;
+    may = oc.may;
+    kind = oc.kind;
+    sup = oc.sup;
+}
+
+LDAPObjClass::LDAPObjClass (string oc_item) { 
+
+    DEBUG(LDAP_DEBUG_CONSTRUCT,
+            "LDAPObjClass::LDAPObjClass( )" << endl);
+
+    LDAPObjectClass *o;
+    int ret;
+    const char *errp;
+    o = ldap_str2objectclass ( oc_item.c_str(), &ret, &errp, SCHEMA_PARSE_FLAG);
+
+    if (o) {
+        this->setNames (o->oc_names);
+       this->setDesc (o->oc_desc);
+        this->setOid (o->oc_oid);
+       this->setKind (o->oc_kind);
+        this->setMust (o->oc_at_oids_must);
+       this->setMay (o->oc_at_oids_may);
+        this->setSup (o->oc_sup_oids);
+    }
+    // else? -> error
+}
+
+LDAPObjClass::~LDAPObjClass() {
+    DEBUG(LDAP_DEBUG_DESTROY,"LDAPObjClass::~LDAPObjClass()" << endl);
+}
+
+void LDAPObjClass::setKind (int oc_kind) {
+    kind = oc_kind;
+}
+    
+void LDAPObjClass::setNames (char **oc_names) {
+    names = StringList (oc_names);
+}
+
+void LDAPObjClass::setMust (char **oc_must) {
+    must = StringList (oc_must);
+}
+
+void LDAPObjClass::setMay (char **oc_may) {
+    may = StringList (oc_may);
+}
+
+void LDAPObjClass::setSup (char **oc_sup) {
+    sup = StringList (oc_sup);
+}
+
+void LDAPObjClass::setDesc (char *oc_desc) {
+    desc = string ();
+    if (oc_desc)
+       desc = oc_desc;
+}
+
+void LDAPObjClass::setOid (char *oc_oid) {
+    oid = string ();
+    if (oc_oid)
+       oid = oc_oid;
+}
+
+string LDAPObjClass::getOid () {
+    return oid;
+}
+
+string LDAPObjClass::getDesc () {
+    return desc;
+}
+
+StringList LDAPObjClass::getNames () {
+    return names;
+}
+
+StringList LDAPObjClass::getMust () {
+    return must;
+}
+
+StringList LDAPObjClass::getMay () {
+    return may;
+}
+
+StringList LDAPObjClass::getSup () {
+    return sup;
+}
+
+string LDAPObjClass::getName () {
+
+    if (names.empty())
+       return "";
+    else
+       return *(names.begin());
+}
diff --git a/contrib/ldapc++/src/LDAPObjClass.h b/contrib/ldapc++/src/LDAPObjClass.h
new file mode 100644 (file)
index 0000000..4a383d6
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#ifndef LDAP_OBJCLASS_H
+#define LDAP_OBJCLASS_H
+
+#include <ldap_schema.h>
+#include <string>
+
+#include "StringList.h"
+
+#define SCHEMA_PARSE_FLAG    0x03
+
+
+using namespace std;
+
+/**
+ * Represents the Object Class (from LDAP schema)
+ */
+class LDAPObjClass{
+    private :
+       StringList names, must, may, sup;
+       string desc, oid;
+       int kind;
+       
+    public :
+
+        /**
+         * Constructs an empty object.
+         */   
+        LDAPObjClass();
+
+        /**
+         * Copy constructor
+        */   
+       LDAPObjClass (const LDAPObjClass& oc);
+
+        /**
+        * Constructs new object and fills the data structure by parsing the
+        * argument.
+        * @param oc_item description of object class is string returned
+        * by the search command. It is in the form:
+        * "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL
+        *    DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))"
+         */   
+        LDAPObjClass (string oc_item);
+
+        /**
+         * Destructor
+         */
+        virtual ~LDAPObjClass();
+       
+       /**
+        * Returns object class description
+        */
+       string getDesc ();
+       
+       /**
+        * Returns object class oid
+        */
+       string getOid ();
+
+       /**
+        * Returns object class name (first one if there are more of them)
+        */
+       string getName ();
+
+       /**
+        * Returns all object class names
+        */
+       StringList getNames();
+       
+       /**
+        * Returns list of required attributes
+        */
+       StringList getMust();
+       
+       /**
+        * Returns list of allowed (and not required) attributes
+        */
+       StringList getMay();
+       
+        /**
+        * Returns list of the OIDs of the superior ObjectClasses
+        */
+       StringList getSup();
+
+       void setNames (char **oc_names);
+       void setMay (char **oc_may);
+       void setMust (char **oc_must);
+       void setDesc (char *oc_desc);
+       void setOid (char *oc_oid);
+       void setKind (int oc_kind);
+       void setSup (char **oc_sup);
+       
+};
+
+#endif // LDAP_OBJCLASS_H
diff --git a/contrib/ldapc++/src/LDAPSchema.cpp b/contrib/ldapc++/src/LDAPSchema.cpp
new file mode 100644 (file)
index 0000000..e69d275
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include "debug.h"
+#include "StringList.h"
+#include "LDAPSchema.h"
+
+using namespace std;
+
+LDAPSchema::LDAPSchema(){
+    DEBUG(LDAP_DEBUG_CONSTRUCT,
+            "LDAPSchema::LDAPSchema( )" << endl);
+}
+
+LDAPSchema::~LDAPSchema() {
+    DEBUG(LDAP_DEBUG_DESTROY,"LDAPSchema::~LDAPSchema()" << endl);
+}
+
+void LDAPSchema::setObjectClasses (const StringList &ocs) {
+    DEBUG(LDAP_DEBUG_TRACE,"LDAPSchema::setObjectClasses()" << endl);
+    
+    // parse the stringlist and save it to global map...
+    StringList::const_iterator i,j;
+    for (i = ocs.begin(); i != ocs.end(); i++) {
+       LDAPObjClass oc ( (*i) );
+       StringList names = oc.getNames();
+       // there could be more names for one object...
+       for (j = names.begin(); j != names.end(); j++) {
+           object_classes [(*j)] = LDAPObjClass (oc);
+       }
+    }
+}
+
+void LDAPSchema::setAttributeTypes (const StringList &ats) {
+    DEBUG(LDAP_DEBUG_TRACE,"LDAPSchema::setAttributeTypes()" << endl);
+    
+    // parse the stringlist and save it to global map...
+    StringList::const_iterator i,j;
+    for (i = ats.begin(); i != ats.end(); i++) {
+       LDAPAttrType at ( (*i) );
+       StringList names = at.getNames();
+       // there could be more names for one object...
+       for (j = names.begin(); j != names.end(); j++) {
+           attr_types [(*j)] = LDAPAttrType (at);
+       }
+    }
+}
+
+LDAPObjClass LDAPSchema::getObjectClassByName (string name) {
+
+    return object_classes [name];
+}
+
+LDAPAttrType LDAPSchema::getAttributeTypeByName (string name) {
+
+    return attr_types [name];
+}
diff --git a/contrib/ldapc++/src/LDAPSchema.h b/contrib/ldapc++/src/LDAPSchema.h
new file mode 100644 (file)
index 0000000..367e1fb
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#ifndef LDAP_SCHEMA_H
+#define LDAP_SCHEMA_H
+
+#include <ldap.h>
+#include <string>
+#include <map>
+
+#include "LDAPObjClass.h"
+#include "LDAPAttrType.h"
+
+/**
+ * Represents the LDAP schema
+ */
+class LDAPSchema{
+    private :
+       /**
+        * map of object classes: index is name, value is LDAPObjClass object
+        */
+       map <string, LDAPObjClass> object_classes;
+       
+       /**
+        * map of attribute types: index is name, value is LDAPAttrType object
+        */
+       map <string, LDAPAttrType> attr_types;
+
+    public :
+
+        /**
+         * Constructs an empty object
+         */   
+        LDAPSchema();
+
+        /**
+         * Destructor
+         */
+        virtual ~LDAPSchema();
+       
+        /**
+         * Fill the object_classes map
+        * @param oc description of one objectclass (string returned by search
+        * command), in form:
+        * "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL
+        *    DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))"
+         */
+       void setObjectClasses (const StringList &oc);
+
+        /**
+         * Fill the attr_types map
+        * @param at description of one attribute type
+        *  (string returned by search command), in form:
+        * "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC ''
+        *    EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )"
+         */
+       void setAttributeTypes (const StringList &at);
+
+       /**
+        * Returns object class object with given name
+        */
+       LDAPObjClass getObjectClassByName (std::string name);
+       
+       /**
+        * Returns attribute type object with given name
+        */
+       LDAPAttrType getAttributeTypeByName (string name);
+
+};
+
+#endif // LDAP_SCHEMA_H
index d9e85faa3abad392d211c37077f60c7ed2cf6434..d18fbe7e68884b288e8ab2be0d05a81042923190 100644 (file)
@@ -6,48 +6,52 @@
 lib_LTLIBRARIES = libldapcpp.la
 
 libldapcpp_la_SOURCES = LDAPAddRequest.cpp \
-                       LDAPAsynConnection.cpp \
-                       LDAPAttribute.cpp \
-                       LDAPAttributeList.cpp \
-                       LDAPBindRequest.cpp \
-                       LDAPCompareRequest.cpp \
-            LDAPConnection.cpp \
-                       LDAPConstraints.cpp \
-                       LDAPControl.cpp \
-                       LDAPControlSet.cpp \
-                       LDAPDeleteRequest.cpp \
-                       LDAPEntry.cpp \
-                       LDAPEntryList.cpp \
-                       LDAPException.cpp \
-                       LDAPExtRequest.cpp \
-                       LDAPExtResult.cpp \
-                       LDAPMessage.cpp \
-                       LDAPMessageQueue.cpp \
-                       LDAPModDNRequest.cpp \
-                       LDAPModification.cpp \
-                       LDAPModifyRequest.cpp \
-                       LDAPModList.cpp \
-                       LDAPRebind.cpp \
-                       LDAPRebindAuth.cpp \
-                       LDAPReferralException.cpp \
-            LDAPReferenceList.cpp \
-            LDAPRequest.cpp \
-                       LDAPResult.cpp \
-                       LDAPSearchReference.cpp \
-                       LDAPSearchRequest.cpp \
-                       LDAPSearchResult.cpp \
-                       LDAPSearchResults.cpp \
-                       LDAPUrl.cpp \
-                       LDAPUrlList.cpp \
-                       StringList.cpp 
+                        LDAPAsynConnection.cpp \
+                        LDAPAttribute.cpp \
+                        LDAPAttributeList.cpp \
+                        LDAPAttrType.cpp \
+                        LDAPBindRequest.cpp \
+                        LDAPCompareRequest.cpp \
+                        LDAPConnection.cpp \
+                        LDAPConstraints.cpp \
+                        LDAPControl.cpp \
+                        LDAPControlSet.cpp \
+                        LDAPDeleteRequest.cpp \
+                        LDAPEntry.cpp \
+                        LDAPEntryList.cpp \
+                        LDAPException.cpp \
+                        LDAPExtRequest.cpp \
+                        LDAPExtResult.cpp \
+                        LDAPMessage.cpp \
+                        LDAPMessageQueue.cpp \
+                        LDAPModDNRequest.cpp \
+                        LDAPModification.cpp \
+                        LDAPModifyRequest.cpp \
+                        LDAPModList.cpp \
+                        LDAPObjClass.cpp \
+                        LDAPRebind.cpp \
+                        LDAPRebindAuth.cpp \
+                        LDAPReferralException.cpp \
+                        LDAPReferenceList.cpp \
+                        LDAPRequest.cpp \
+                        LDAPResult.cpp \
+                        LDAPSchema.cpp \
+                        LDAPSearchReference.cpp \
+                        LDAPSearchRequest.cpp \
+                        LDAPSearchResult.cpp \
+                        LDAPSearchResults.cpp \
+                        LDAPUrl.cpp \
+                        LDAPUrlList.cpp \
+                        StringList.cpp 
 
 include_HEADERS = LDAPAsynConnection.h \
                         LDAPAttribute.h \
                         LDAPAttributeList.h \
+                        LDAPAttrType.h \
                         LDAPConnection.h \
                         LDAPConstraints.h \
                         LDAPControl.h \
-                       LDAPControlSet.h \
+                        LDAPControlSet.h \
                         LDAPEntry.h \
                         LDAPEntryList.h \
                         LDAPException.h \
@@ -56,11 +60,13 @@ include_HEADERS = LDAPAsynConnection.h \
                         LDAPMessageQueue.h \
                         LDAPModification.h \
                         LDAPModList.h \
+                        LDAPObjClass.h \
                         LDAPRebind.h \
                         LDAPRebindAuth.h \
                         LDAPReferralException.h \
                         LDAPReferenceList.h \
                         LDAPResult.h \
+                        LDAPSchema.h \
                         LDAPSearchReference.h \
                         LDAPSearchResult.h \
                         LDAPSearchResults.h \
@@ -80,10 +86,4 @@ noinst_HEADERS = LDAPAddRequest.h \
 
 libldapcpp_la_LIBADD = -lldap -llber
 libldapcpp_la_LDFLAGS = -version-info 0:1:0
-                       
-noinst_PROGRAMS = main
-
-main_SOURCES = main.cpp
-main_LDADD = ./libldapcpp.la 
-
 
index 98b5e1aaa1a4993e44cd4dd550a465a65db06d03..b10a3b5cdc0b4b146dc05eaf120f7a85e784eec3 100644 (file)
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated by automake 1.7.2 from Makefile.am.
+# @configure_input@
 
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+@SET_MAKE@
+
 # Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
 # COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 
-
-SHELL = @SHELL@
-
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-
 top_builddir = ..
 
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
 NORMAL_INSTALL = :
 PRE_INSTALL = :
 POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-host_alias = @host_alias@
 host_triplet = @host@
-AS = @AS@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
 CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
 CXX = @CXX@
-DLLTOOL = @DLLTOOL@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
 ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
 EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
-OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
 lib_LTLIBRARIES = libldapcpp.la
 
-libldapcpp_la_SOURCES = LDAPAddRequest.cpp                     LDAPAsynConnection.cpp                  LDAPAttribute.cpp                       LDAPAttributeList.cpp                   LDAPBindRequest.cpp                     LDAPCompareRequest.cpp             LDAPConnection.cpp                   LDAPConstraints.cpp                     LDAPControl.cpp                         LDAPControlSet.cpp                      LDAPDeleteRequest.cpp                   LDAPEntry.cpp                   LDAPEntryList.cpp                       LDAPException.cpp                       LDAPExtRequest.cpp                      LDAPExtResult.cpp                       LDAPMessage.cpp                         LDAPMessageQueue.cpp                    LDAPModDNRequest.cpp                    LDAPModification.cpp                    LDAPModifyRequest.cpp                   LDAPModList.cpp                         LDAPRebind.cpp                  LDAPRebindAuth.cpp                      LDAPReferralException.cpp             LDAPReferenceList.cpp             LDAPRequest.cpp                         LDAPResult.cpp                  LDAPSearchReference.cpp                         LDAPSearchRequest.cpp                   LDAPSearchResult.cpp                    LDAPSearchResults.cpp                   LDAPUrl.cpp                     LDAPUrlList.cpp                         StringList.cpp 
-
-
-include_HEADERS = LDAPAsynConnection.h                         LDAPAttribute.h                         LDAPAttributeList.h                         LDAPConnection.h                         LDAPConstraints.h                         LDAPControl.h                    LDAPControlSet.h                         LDAPEntry.h                         LDAPEntryList.h                         LDAPException.h                         LDAPExtResult.h                         LDAPMessage.h                         LDAPMessageQueue.h                         LDAPModification.h                         LDAPModList.h                         LDAPRebind.h                         LDAPRebindAuth.h                         LDAPReferralException.h                         LDAPReferenceList.h                         LDAPResult.h                         LDAPSearchReference.h                         LDAPSearchResult.h                         LDAPSearchResults.h                         LDAPUrl.h                         LDAPUrlList.h                         StringList.h 
-
-
-noinst_HEADERS = LDAPAddRequest.h                 LDAPBindRequest.h                 LDAPCompareRequest.h                 LDAPDeleteRequest.h                 LDAPExtRequest.h                 LDAPModDNRequest.h                 LDAPModifyRequest.h                 LDAPRequest.h                 LDAPSearchRequest.h 
+libldapcpp_la_SOURCES = LDAPAddRequest.cpp \
+                        LDAPAsynConnection.cpp \
+                        LDAPAttribute.cpp \
+                        LDAPAttributeList.cpp \
+                        LDAPAttrType.cpp \
+                        LDAPBindRequest.cpp \
+                        LDAPCompareRequest.cpp \
+                        LDAPConnection.cpp \
+                        LDAPConstraints.cpp \
+                        LDAPControl.cpp \
+                        LDAPControlSet.cpp \
+                        LDAPDeleteRequest.cpp \
+                        LDAPEntry.cpp \
+                        LDAPEntryList.cpp \
+                        LDAPException.cpp \
+                        LDAPExtRequest.cpp \
+                        LDAPExtResult.cpp \
+                        LDAPMessage.cpp \
+                        LDAPMessageQueue.cpp \
+                        LDAPModDNRequest.cpp \
+                        LDAPModification.cpp \
+                        LDAPModifyRequest.cpp \
+                        LDAPModList.cpp \
+                        LDAPObjClass.cpp \
+                        LDAPRebind.cpp \
+                        LDAPRebindAuth.cpp \
+                        LDAPReferralException.cpp \
+                        LDAPReferenceList.cpp \
+                        LDAPRequest.cpp \
+                        LDAPResult.cpp \
+                        LDAPSchema.cpp \
+                        LDAPSearchReference.cpp \
+                        LDAPSearchRequest.cpp \
+                        LDAPSearchResult.cpp \
+                        LDAPSearchResults.cpp \
+                        LDAPUrl.cpp \
+                        LDAPUrlList.cpp \
+                        StringList.cpp 
+
+
+include_HEADERS = LDAPAsynConnection.h \
+                        LDAPAttribute.h \
+                        LDAPAttributeList.h \
+                        LDAPAttrType.h \
+                        LDAPConnection.h \
+                        LDAPConstraints.h \
+                        LDAPControl.h \
+                        LDAPControlSet.h \
+                        LDAPEntry.h \
+                        LDAPEntryList.h \
+                        LDAPException.h \
+                        LDAPExtResult.h \
+                        LDAPMessage.h \
+                        LDAPMessageQueue.h \
+                        LDAPModification.h \
+                        LDAPModList.h \
+                        LDAPObjClass.h \
+                        LDAPRebind.h \
+                        LDAPRebindAuth.h \
+                        LDAPReferralException.h \
+                        LDAPReferenceList.h \
+                        LDAPResult.h \
+                        LDAPSchema.h \
+                        LDAPSearchReference.h \
+                        LDAPSearchResult.h \
+                        LDAPSearchResults.h \
+                        LDAPUrl.h \
+                        LDAPUrlList.h \
+                        StringList.h 
+
+
+noinst_HEADERS = LDAPAddRequest.h \
+                LDAPBindRequest.h \
+                LDAPCompareRequest.h \
+                LDAPDeleteRequest.h \
+                LDAPExtRequest.h \
+                LDAPModDNRequest.h \
+                LDAPModifyRequest.h \
+                LDAPRequest.h \
+                LDAPSearchRequest.h 
 
 
 libldapcpp_la_LIBADD = -lldap -llber
 libldapcpp_la_LDFLAGS = -version-info 0:1:0
-
-noinst_PROGRAMS = main
-
-main_SOURCES = main.cpp
-main_LDADD = ./libldapcpp.la 
+subdir = src
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = 
-LTLIBRARIES =  $(lib_LTLIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-libldapcpp_la_DEPENDENCIES = 
-libldapcpp_la_OBJECTS =  LDAPAddRequest.lo LDAPAsynConnection.lo \
-LDAPAttribute.lo LDAPAttributeList.lo LDAPBindRequest.lo \
-LDAPCompareRequest.lo LDAPConnection.lo LDAPConstraints.lo \
-LDAPControl.lo LDAPControlSet.lo LDAPDeleteRequest.lo LDAPEntry.lo \
-LDAPEntryList.lo LDAPException.lo LDAPExtRequest.lo LDAPExtResult.lo \
-LDAPMessage.lo LDAPMessageQueue.lo LDAPModDNRequest.lo \
-LDAPModification.lo LDAPModifyRequest.lo LDAPModList.lo LDAPRebind.lo \
-LDAPRebindAuth.lo LDAPReferralException.lo LDAPReferenceList.lo \
-LDAPRequest.lo LDAPResult.lo LDAPSearchReference.lo \
-LDAPSearchRequest.lo LDAPSearchResult.lo LDAPSearchResults.lo \
-LDAPUrl.lo LDAPUrlList.lo StringList.lo
-noinst_PROGRAMS =  main$(EXEEXT)
-PROGRAMS =  $(noinst_PROGRAMS)
-
-main_OBJECTS =  main.$(OBJEXT)
-main_DEPENDENCIES =  ./libldapcpp.la
-main_LDFLAGS = 
-CXXFLAGS = @CXXFLAGS@
-CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+libldapcpp_la_DEPENDENCIES =
+am_libldapcpp_la_OBJECTS = LDAPAddRequest.lo LDAPAsynConnection.lo \
+       LDAPAttribute.lo LDAPAttributeList.lo LDAPAttrType.lo \
+       LDAPBindRequest.lo LDAPCompareRequest.lo LDAPConnection.lo \
+       LDAPConstraints.lo LDAPControl.lo LDAPControlSet.lo \
+       LDAPDeleteRequest.lo LDAPEntry.lo LDAPEntryList.lo \
+       LDAPException.lo LDAPExtRequest.lo LDAPExtResult.lo \
+       LDAPMessage.lo LDAPMessageQueue.lo LDAPModDNRequest.lo \
+       LDAPModification.lo LDAPModifyRequest.lo LDAPModList.lo \
+       LDAPObjClass.lo LDAPRebind.lo LDAPRebindAuth.lo \
+       LDAPReferralException.lo LDAPReferenceList.lo LDAPRequest.lo \
+       LDAPResult.lo LDAPSchema.lo LDAPSearchReference.lo \
+       LDAPSearchRequest.lo LDAPSearchResult.lo LDAPSearchResults.lo \
+       LDAPUrl.lo LDAPUrlList.lo StringList.lo
+libldapcpp_la_OBJECTS = $(am_libldapcpp_la_OBJECTS)
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I.
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/LDAPAddRequest.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPAsynConnection.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPAttrType.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPAttribute.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPAttributeList.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPBindRequest.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPCompareRequest.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPConnection.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPConstraints.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPControl.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPControlSet.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPDeleteRequest.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPEntry.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPEntryList.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPException.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPExtRequest.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPExtResult.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPMessage.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPMessageQueue.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPModDNRequest.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPModList.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPModification.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPModifyRequest.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPObjClass.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPRebind.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPRebindAuth.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPReferenceList.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPReferralException.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPRequest.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPResult.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPSchema.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPSearchReference.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPSearchRequest.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPSearchResult.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPSearchResults.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/LDAPUrl.Plo ./$(DEPDIR)/LDAPUrlList.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/StringList.Plo
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CXXFLAGS) $(CXXFLAGS)
 CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
-HEADERS =  $(include_HEADERS) $(noinst_HEADERS)
-
-DIST_COMMON =  ./stamp-h.in Makefile.am Makefile.in config.h.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-DEP_FILES =  .deps/LDAPAddRequest.P .deps/LDAPAsynConnection.P \
-.deps/LDAPAttribute.P .deps/LDAPAttributeList.P .deps/LDAPBindRequest.P \
-.deps/LDAPCompareRequest.P .deps/LDAPConnection.P \
-.deps/LDAPConstraints.P .deps/LDAPControl.P .deps/LDAPControlSet.P \
-.deps/LDAPDeleteRequest.P .deps/LDAPEntry.P .deps/LDAPEntryList.P \
-.deps/LDAPException.P .deps/LDAPExtRequest.P .deps/LDAPExtResult.P \
-.deps/LDAPMessage.P .deps/LDAPMessageQueue.P .deps/LDAPModDNRequest.P \
-.deps/LDAPModList.P .deps/LDAPModification.P .deps/LDAPModifyRequest.P \
-.deps/LDAPRebind.P .deps/LDAPRebindAuth.P .deps/LDAPReferenceList.P \
-.deps/LDAPReferralException.P .deps/LDAPRequest.P .deps/LDAPResult.P \
-.deps/LDAPSearchReference.P .deps/LDAPSearchRequest.P \
-.deps/LDAPSearchResult.P .deps/LDAPSearchResults.P .deps/LDAPUrl.P \
-.deps/LDAPUrlList.P .deps/StringList.P .deps/main.P
-SOURCES = $(libldapcpp_la_SOURCES) $(main_SOURCES)
-OBJECTS = $(libldapcpp_la_OBJECTS) $(main_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .cpp .lo .o .obj .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-       cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libldapcpp_la_SOURCES)
+HEADERS = $(include_HEADERS) $(noinst_HEADERS)
 
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
-       cd $(top_builddir) \
-         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) Makefile.am \
+       Makefile.in config.h.in
+SOURCES = $(libldapcpp_la_SOURCES)
 
+all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-am
 
-config.h: stamp-h
-       @if test ! -f $@; then \
-               rm -f stamp-h; \
-               $(MAKE) stamp-h; \
-       else :; fi
-stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
-       cd $(top_builddir) \
-         && CONFIG_FILES= CONFIG_HEADERS=src/config.h \
-            $(SHELL) ./config.status
-       @echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --foreign  src/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+config.h: stamp-h1
        @if test ! -f $@; then \
-               rm -f $(srcdir)/stamp-h.in; \
-               $(MAKE) $(srcdir)/stamp-h.in; \
+         rm -f stamp-h1; \
+         $(MAKE) stamp-h1; \
        else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-       cd $(top_srcdir) && $(AUTOHEADER)
-       @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
 
-mostlyclean-hdr:
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+       @rm -f stamp-h1
+       cd $(top_builddir) && $(SHELL) ./config.status src/config.h
 
-clean-hdr:
+$(srcdir)/config.h.in:  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
+       cd $(top_srcdir) && $(AUTOHEADER)
+       touch $(srcdir)/config.h.in
 
 distclean-hdr:
-       -rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-libLTLIBRARIES:
-
-clean-libLTLIBRARIES:
-       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-
-distclean-libLTLIBRARIES:
-
-maintainer-clean-libLTLIBRARIES:
-
+       -rm -f config.h stamp-h1
+libLTLIBRARIES_INSTALL = $(INSTALL)
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(libdir)
        @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
-           echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
-           $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
+           f="`echo $$p | sed -e 's|^.*/||'`"; \
+           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \
+           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \
          else :; fi; \
        done
 
 uninstall-libLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+           p="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
+         $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
        done
 
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
-       $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
-       $(COMPILE) -c $<
-
-.S.o:
-       $(COMPILE) -c $<
+clean-libLTLIBRARIES:
+       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" = "$$p" && dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+libldapcpp.la: $(libldapcpp_la_OBJECTS) $(libldapcpp_la_DEPENDENCIES) 
+       $(CXXLINK) -rpath $(libdir) $(libldapcpp_la_LDFLAGS) $(libldapcpp_la_OBJECTS) $(libldapcpp_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
-       -rm -f *.o core *.core
-       -rm -f *.$(OBJEXT)
-
-clean-compile:
+       -rm -f *.$(OBJEXT) core *.core
 
 distclean-compile:
        -rm -f *.tab.c
 
-maintainer-clean-compile:
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPAddRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPAsynConnection.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPAttrType.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPAttribute.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPAttributeList.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPBindRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPCompareRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPConnection.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPConstraints.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPControl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPControlSet.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPDeleteRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPEntry.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPEntryList.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPException.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPExtRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPExtResult.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPMessage.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPMessageQueue.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPModDNRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPModList.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPModification.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPModifyRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPObjClass.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPRebind.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPRebindAuth.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPReferenceList.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPReferralException.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPResult.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSchema.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchReference.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchRequest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchResult.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchResults.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPUrl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPUrlList.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StringList.Plo@am__quote@
 
-.s.lo:
-       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+distclean-depend:
+       -rm -rf ./$(DEPDIR)
 
-.S.lo:
-       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.cpp.o:
+@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCXX_TRUE@    -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCXX_TRUE@  then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCXX_TRUE@  else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCXX_TRUE@  fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCXX_TRUE@    -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCXX_TRUE@  then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCXX_TRUE@  else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCXX_TRUE@  fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@  if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCXX_TRUE@    -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCXX_TRUE@  then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
+@am__fastdepCXX_TRUE@  else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCXX_TRUE@  fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -253,235 +435,205 @@ clean-libtool:
        -rm -rf .libs _libs
 
 distclean-libtool:
-
-maintainer-clean-libtool:
-
-libldapcpp.la: $(libldapcpp_la_OBJECTS) $(libldapcpp_la_DEPENDENCIES)
-       $(CXXLINK) -rpath $(libdir) $(libldapcpp_la_LDFLAGS) $(libldapcpp_la_OBJECTS) $(libldapcpp_la_LIBADD) $(LIBS)
-
-mostlyclean-noinstPROGRAMS:
-
-clean-noinstPROGRAMS:
-       -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-distclean-noinstPROGRAMS:
-
-maintainer-clean-noinstPROGRAMS:
-
-main$(EXEEXT): $(main_OBJECTS) $(main_DEPENDENCIES)
-       @rm -f main$(EXEEXT)
-       $(CXXLINK) $(main_LDFLAGS) $(main_OBJECTS) $(main_LDADD) $(LIBS)
-.cpp.o:
-       $(CXXCOMPILE) -c $<
-.cpp.obj:
-       $(CXXCOMPILE) -c `cygpath -w $<`
-.cpp.lo:
-       $(LTCXXCOMPILE) -c $<
-
+       -rm -f libtool
+uninstall-info-am:
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
 install-includeHEADERS: $(include_HEADERS)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(includedir)
        @list='$(include_HEADERS)'; for p in $$list; do \
-         if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
-         echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
-         $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
+         $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
        done
 
 uninstall-includeHEADERS:
        @$(NORMAL_UNINSTALL)
-       list='$(include_HEADERS)'; for p in $$list; do \
-         rm -f $(DESTDIR)$(includedir)/$$p; \
+       @list='$(include_HEADERS)'; for p in $$list; do \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
+         rm -f $(DESTDIR)$(includedir)/$$f; \
        done
 
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
 tags: TAGS
 
-ID: $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS)'; \
-       unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
-       here=`pwd` && cd $(srcdir) \
-         && mkid -f$$here/ID $$unique $(LISP)
+       mkid -fID $$unique
 
-TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
        tags=; \
        here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)'; \
-       unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
-       test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
-         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+       test -z "$(ETAGS_ARGS)$$tags$$unique" \
+         || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+            $$tags $$unique
 
-mostlyclean-tags:
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
 
-clean-tags:
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
 
 distclean-tags:
-       -rm -f TAGS ID
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = src
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
 distdir: $(DISTFILES)
-       here=`cd $(top_builddir) && pwd`; \
-       top_distdir=`cd $(top_distdir) && pwd`; \
-       distdir=`cd $(distdir) && pwd`; \
-       cd $(top_srcdir) \
-         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign src/Makefile
-       @for file in $(DISTFILES); do \
-         d=$(srcdir); \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
          if test -d $$d/$$file; then \
-           cp -pr $$d/$$file $(distdir)/$$file; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
          else \
            test -f $(distdir)/$$file \
-           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-           || cp -p $$d/$$file $(distdir)/$$file || :; \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
          fi; \
        done
-
-DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-
--include $(DEP_FILES)
-
-mostlyclean-depend:
-
-clean-depend:
-
-distclean-depend:
-       -rm -rf .deps
-
-maintainer-clean-depend:
-
-%.o: %.c
-       @echo '$(COMPILE) -c $<'; \
-       $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
-       @-cp .deps/$(*F).pp .deps/$(*F).P; \
-       tr ' ' '\012' < .deps/$(*F).pp \
-         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
-           >> .deps/$(*F).P; \
-       rm .deps/$(*F).pp
-
-%.lo: %.c
-       @echo '$(LTCOMPILE) -c $<'; \
-       $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
-       @-sed -e 's/^\([^:]*\)\.o[      ]*:/\1.lo \1.o :/' \
-         < .deps/$(*F).pp > .deps/$(*F).P; \
-       tr ' ' '\012' < .deps/$(*F).pp \
-         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
-           >> .deps/$(*F).P; \
-       rm -f .deps/$(*F).pp
-
-%.o: %.cpp
-       @echo '$(CXXCOMPILE) -c $<'; \
-       $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
-       @-cp .deps/$(*F).pp .deps/$(*F).P; \
-       tr ' ' '\012' < .deps/$(*F).pp \
-         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
-           >> .deps/$(*F).P; \
-       rm .deps/$(*F).pp
-
-%.lo: %.cpp
-       @echo '$(LTCXXCOMPILE) -c $<'; \
-       $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
-       @-sed -e 's/^\([^:]*\)\.o[      ]*:/\1.lo \1.o :/' \
-         < .deps/$(*F).pp > .deps/$(*F).P; \
-       tr ' ' '\012' < .deps/$(*F).pp \
-         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
-           >> .deps/$(*F).P; \
-       rm -f .deps/$(*F).pp
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
 check-am: all-am
 check: check-am
-installcheck-am:
-installcheck: installcheck-am
-all-recursive-am: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
 
-install-exec-am: install-libLTLIBRARIES
-install-exec: install-exec-am
+installdirs:
+       $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
 
-install-data-am: install-includeHEADERS
+install: install-am
+install-exec: install-exec-am
 install-data: install-data-am
+uninstall: uninstall-am
 
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-libLTLIBRARIES uninstall-includeHEADERS
-uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) config.h
-all-redirect: all-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-       $(mkinstalldirs)  $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
-
 
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -rm -f Makefile $(CONFIG_CLEAN_FILES)
-       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-mostlyclean-am:  mostlyclean-hdr mostlyclean-libLTLIBRARIES \
-               mostlyclean-compile mostlyclean-libtool \
-               mostlyclean-noinstPROGRAMS mostlyclean-tags \
-               mostlyclean-depend mostlyclean-generic
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-mostlyclean: mostlyclean-am
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+       mostlyclean-am
 
-clean-am:  clean-hdr clean-libLTLIBRARIES clean-compile clean-libtool \
-               clean-noinstPROGRAMS clean-tags clean-depend \
-               clean-generic mostlyclean-am
+distclean: distclean-am
 
-clean: clean-am
+distclean-am: clean-am distclean-compile distclean-depend \
+       distclean-generic distclean-hdr distclean-libtool \
+       distclean-tags
 
-distclean-am:  distclean-hdr distclean-libLTLIBRARIES distclean-compile \
-               distclean-libtool distclean-noinstPROGRAMS \
-               distclean-tags distclean-depend distclean-generic \
-               clean-am
-       -rm -f libtool
+dvi: dvi-am
 
-distclean: distclean-am
+dvi-am:
 
-maintainer-clean-am:  maintainer-clean-hdr \
-               maintainer-clean-libLTLIBRARIES \
-               maintainer-clean-compile maintainer-clean-libtool \
-               maintainer-clean-noinstPROGRAMS maintainer-clean-tags \
-               maintainer-clean-depend maintainer-clean-generic \
-               distclean-am
-       @echo "This command is intended for maintainers to use;"
-       @echo "it deletes files that may require special tools to rebuild."
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
 
 maintainer-clean: maintainer-clean-am
 
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
-clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
-uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
-distclean-compile clean-compile maintainer-clean-compile \
-mostlyclean-libtool distclean-libtool clean-libtool \
-maintainer-clean-libtool mostlyclean-noinstPROGRAMS \
-distclean-noinstPROGRAMS clean-noinstPROGRAMS \
-maintainer-clean-noinstPROGRAMS uninstall-includeHEADERS \
-install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
-maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
-clean-depend maintainer-clean-depend info-am info dvi-am dvi check \
-check-am installcheck-am installcheck all-recursive-am install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS uninstall-info-am \
+       uninstall-libLTLIBRARIES
 
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libLTLIBRARIES clean-libtool ctags distclean \
+       distclean-compile distclean-depend distclean-generic \
+       distclean-hdr distclean-libtool distclean-tags distdir dvi \
+       dvi-am info info-am install install-am install-data \
+       install-data-am install-exec install-exec-am \
+       install-includeHEADERS install-info install-info-am \
+       install-libLTLIBRARIES install-man install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-includeHEADERS \
+       uninstall-info-am uninstall-libLTLIBRARIES
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index d2c1714044d6b452ac49d9d5fcb8dada053b18a7..7d4dbab085f1e7c3e60a2f43dab1297b58275122 100644 (file)
@@ -1,17 +1,62 @@
-/* src/config.h.in.  Generated automatically from configure.in by autoheader.  */
+/* src/config.h.in.  Generated from configure.in by autoheader.  */
 #undef WITH_DEBUG
 
 
-/* Define if you have the <dlfcn.h> header file. */
+/* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define if you have the `resolv' library (-lresolv). */
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
 #undef HAVE_LIBRESOLV
 
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
 /* Name of package */
 #undef PACKAGE
 
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
 #undef TIME_WITH_SYS_TIME
 
 /* Version number of package */
diff --git a/contrib/ldapc++/src/main.cpp b/contrib/ldapc++/src/main.cpp
deleted file mode 100644 (file)
index 8fff4d4..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- */
-
-#include<iostream.h>
-#include<strstream>
-#include "LDAPConnection.h"
-#include "LDAPConstraints.h"
-#include "LDAPSearchReference.h"
-#include "LDAPSearchResults.h"
-#include "LDAPAttribute.h"
-#include "LDAPAttributeList.h"
-#include "LDAPEntry.h"
-#include "LDAPException.h"
-#include "LDAPModification.h"
-#include "LDAPReferralException.h"
-
-#include"debug.h"
-
-int main(){
-    LDAPConstraints* cons=new LDAPConstraints;
-    LDAPControlSet* ctrls=new LDAPControlSet;
-    ctrls->add(LDAPCtrl(LDAP_CONTROL_MANAGEDSAIT));
-    cons->setServerControls(ctrls);
-    LDAPConnection *lc=new LDAPConnection("localhost",9009);
-    lc->setConstraints(cons);
-    cout << "----------------------doing bind...." <<  endl;
-    try{
-        lc->bind("cn=Manager,o=Organisation,c=DE" , "secret",cons);
-        cout << lc->getHost() << endl;    
-        bool result = lc->compare("cn=Manager,o=Organisation,c=DE", 
-                LDAPAttribute("cn","Manaer"));
-        cout << "Compare: " << result << endl;
-    
-        LDAPAttributeList* attrs=new LDAPAttributeList();
-        StringList values;
-        StringList s2;
-        values.add("top");
-        values.add("Person");
-        attrs->addAttribute(LDAPAttribute("objectClass",values));
-        attrs->addAttribute(LDAPAttribute("cn","Peter"));
-        attrs->addAttribute(LDAPAttribute("sn","Peter,hallo"));
-        LDAPEntry* entry=new LDAPEntry(
-                "cn=Peter , o=Organisation, c=DE", attrs);    
-//        lc->add(entry);
-        
-//        lc->del("ou=Groups,o=Organisation,c=DE");
-
-        LDAPSearchResults* entries = lc->search("o=Organisation,c=DE",
-                LDAPConnection::SEARCH_ONE);
-        if (entries != 0){
-            LDAPEntry* entry = entries->getNext();
-            if(entry != 0){
-                cout << *(entry) << endl;
-            }
-            while(entry){
-                try{
-                    entry = entries->getNext();
-                    if(entry != 0){
-                        cout << *(entry) << endl;
-                    }
-                    delete entry;
-                }catch(LDAPReferralException e){
-                    cout << "Caught Referral" << endl;
-                }
-            }
-        }
-        
-        lc->unbind();
-        delete lc;
-   }catch (LDAPException e){
-        cout << "------------------------- caught Exception ---------"<< endl;
-        cout << e << endl;
-    }
-
-    /*
-    cout << "--------------------starting search" << endl;
-    LDAPAttributeList* attrs=new LDAPAttributeList();
-    StringList values;
-    values.add("top");
-    values.add("organizationalUnit");
-    attrs->addAttribute(LDAPAttribute("objectClass",values));
-    attrs->addAttribute(LDAPAttribute("ou","Groups"));
-    LDAPEntry* entry=new LDAPEntry(
-            "ou=Groups, o=Organisation, c=DE", attrs);    
-
-    LDAPAttribute newattr("description");
-    LDAPModification::mod_op op = LDAPModification::OP_DELETE;
-    LDAPModList *mod=new LDAPModList();
-    mod->addModification(LDAPModification(newattr,op));
-    LDAPMessageQueue* q=0;
-    try{
-        q=lc->search("o=Organisation,c=de",LDAPAsynConnection::SEARCH_SUB,
-         "objectClass=*",StringList());
-//        q=lc->add(entry);
-//        q=lc->modify("cn=Manager,o=Organisation,c=DE",
-//                mod);
-        LDAPMsg *res=q->getNext();
-        bool cont=true;
-        while( cont  ) {
-            switch(res->getMessageType()){
-                LDAPSearchResult *res2;
-                const LDAPEntry *entry;
-                case LDAP_RES_SEARCH_ENTRY :
-                    res2= (LDAPSearchResult*)res;
-                    entry=  res2->getEntry();
-                    cout << "Entry:            " << *entry << endl; 
-                    delete res;
-                    res=q->getNext();
-                break;
-                case LDAP_RES_SEARCH_REFERENCE :
-                    cout << "Reference:         "  << endl;
-                    delete res;
-                    res=q->getNext();
-                break;
-                default :
-                    cout << ( *(LDAPResult*) res) << endl;
-                    delete res;
-                    cout  << "-----------------search done" << endl;
-                    cont=false;
-                break;
-            }
-        }
-        delete q;
-    }catch (LDAPException e){
-        cout << "----------------error during search" << endl;
-        delete q;
-        cout << e << endl;
-    }
-    lc->unbind();
-    */
-}
-
index a373127b0718ccc545546ff6c9af14e38b1a1da5..b2c408e3bc8bf6fd2bb1adcef17cb7baa4942a76 100644 (file)
@@ -204,6 +204,7 @@ static int ldapdb_auxprop_plug_init(const sasl_utils_t *utils,
 {
     ldapctx tmp, *p;
     const char *s;
+    unsigned len;
 
     if(!out_version || !plug) return SASL_BADPARAM;
 
@@ -213,13 +214,27 @@ static int ldapdb_auxprop_plug_init(const sasl_utils_t *utils,
     if(!tmp.uri) return SASL_BADPARAM;
 
     utils->getopt(utils->getopt_context, ldapdb, "ldapdb_id",
-       (const char **)&tmp.id.bv_val, (unsigned *)&tmp.id.bv_len);
+       (const char **)&tmp.id.bv_val, &len);
+    tmp.id.bv_len = len;
     utils->getopt(utils->getopt_context, ldapdb, "ldapdb_pw",
-       (const char **)&tmp.pw.bv_val, (unsigned *)&tmp.pw.bv_len);
+       (const char **)&tmp.pw.bv_val, &len);
+    tmp.pw.bv_len = len;
     utils->getopt(utils->getopt_context, ldapdb, "ldapdb_mech",
-       (const char **)&tmp.mech.bv_val, (unsigned *)&tmp.mech.bv_len);
-    utils->getopt(utils->getopt_context, ldapdb, "ldapdb_rc", &s, NULL);
-    if(s && setenv("LDAPRC", s, 1)) return SASL_BADPARAM;
+       (const char **)&tmp.mech.bv_val, &len);
+    tmp.mech.bv_len = len;
+    utils->getopt(utils->getopt_context, ldapdb, "ldapdb_rc", &s, &len);
+    if (s)
+    {
+       char *str = utils->malloc(sizeof("LDAPRC=")+len);
+       if (!str) return SASL_NOMEM;
+       strcpy( str, "LDAPRC=" );
+       strcpy( str + sizeof("LDAPRC=")-1, s );
+       if (putenv(str))
+       {
+           utils->free(str);
+           return SASL_NOMEM;
+       }
+    }
 
     p = utils->malloc(sizeof(ldapctx));
     if (!p) return SASL_NOMEM;
index d15d5ec34b74d1579658aeddba84f601b8459cc2..a8a72a75f1eea8c48fb6d65df68501ce1ad37552 100644 (file)
@@ -40,7 +40,6 @@ Medium projects
 ---------------
 Implement authPassword (RFC 3112)
 Implement DIT Structure Rules and Name Forms
-Implement LDAP Assertion Control
 Implement LDAP Transactions extension
 Redesign slapd memory allocation fault handling
 Localize tools
index 462d71425e1e8b59d052d94dec99114cba29781d..4a8ad9e7406087765adc994e2a482b2e051d2417 100644 (file)
@@ -197,7 +197,7 @@ file compares.
 .SH AUTHOR
 The OpenLDAP Project <http://www.openldap.org/>
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 0f04e5547f018d378bde1266ed61638bc8361f70..8dd37364a6e34443961024209d904bdc2b841508 100644 (file)
@@ -210,7 +210,7 @@ status and a diagnostic message being written to standard error.
 .SH AUTHOR
 The OpenLDAP Project <http://www.openldap.org/>
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 3b1182dd7be4b8f0b59d1cabbcbb022921ffffa1..959ab07b49dc15529e5e5130552b41bd54301ea8 100644 (file)
@@ -295,7 +295,7 @@ exists and has the contents:
     dn: cn=Modify Me,dc=example,dc=com
     changetype: modify
     replace: mail
-    mail: modme@OpenLDAP.org
+    mail: modme@example.com
     -
     add: title
     title: Grand Poobah
@@ -381,7 +381,7 @@ exit status and a diagnostic message being written to standard error.
 .SH AUTHOR
 The OpenLDAP Project <http://www.openldap.org/>
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index be1d2cfc6add43298209a3f3c00450462f28e6b5..49b50f90ff19671dd59fe106f1970ebf8b36321c 100644 (file)
@@ -231,7 +231,7 @@ status and a diagnostic message being written to standard error.
 .SH AUTHOR
 The OpenLDAP Project <http://www.openldap.org/>
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 252c80816abc305b8227feb61125f067f3c09ce3..e258a827e7cee9cdfc6281d9436e98aab9a31ca2 100644 (file)
@@ -183,7 +183,7 @@ the command will require the operation to be successful
 .SH AUTHOR
 The OpenLDAP Project <http://www.openldap.org/>
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index b05068f37284ab7bba863683afc4c03d34d45690..865d48829d98951bf65793194dcabf97b40f5ceb 100644 (file)
@@ -281,15 +281,15 @@ output in LDAP Data Interchange Format or
 .BR ldif (5):
 .LP
 .nf
-       version: 1
+    version: 1
 
-       # bjensen, example, net
-       dn: uid=bjensen,dc=example,dc=net
-       objectClass: person
-       objectClass: dcObject
-       uid: bjensen
-       cn: Barbara Jensen
-       sn: Jensen
+    # bjensen, example, net
+    dn: uid=bjensen,dc=example,dc=net
+    objectClass: person
+    objectClass: dcObject
+    uid: bjensen
+    cn: Barbara Jensen
+    sn: Jensen
     ...
 .fi
 .LP
@@ -313,20 +313,20 @@ The output might look something like this if two entries are found:
 .LP
 .nf
     dn: uid=jts,dc=example,dc=com
-       cn: John Smith
-       cn: John T. Smith
-       sn: Smith
-       sn;lang-en: Smith
-       sn;lang-de: Schmidt
-       telephoneNumber: 1 555 123-4567
+    cn: John Smith
+    cn: John T. Smith
+    sn: Smith
+    sn;lang-en: Smith
+    sn;lang-de: Schmidt
+    telephoneNumber: 1 555 123-4567
 
-       dn: uid=sss,dc=example,dc=com
-       cn: Steve Smith
-       cn: Steve S. Smith
-       sn: Smith
-       sn;lang-en: Smith
-       sn;lang-de: Schmidt
-       telephoneNumber: 1 555 765-4321
+    dn: uid=sss,dc=example,dc=com
+    cn: Steve Smith
+    cn: Steve S. Smith
+    sn: Smith
+    sn;lang-en: Smith
+    sn;lang-de: Schmidt
+    telephoneNumber: 1 555 765-4321
 .fi
 .LP
 The command:
@@ -401,7 +401,7 @@ a diagnostic message being written to standard error.
 .SH AUTHOR
 The OpenLDAP Project <http://www.openldap.org/>
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 20cc26727f95a909f547ad85b2ea8234ec53b74b..03b4eb43caf88939fb41b3714f1df70a59e8dc21 100644 (file)
@@ -146,7 +146,7 @@ Issue StartTLS (Transport Layer Security) extended operation. If you use
 .SH AUTHOR
 The OpenLDAP Project <http://www.openldap.org/>
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 0494010a43e142963d1313505fd43e48e3e3a11e..3a6275cb7d5f6ef640cc780d56a5d7315818f375 100644 (file)
@@ -350,7 +350,7 @@ which must be freed by the caller using supplied deallocation routines.
 .BR lber-sockbuf (3),
 .BR lber-types (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index c9a11150748a606926be585de2232fbc6c6724df..8d08af7e91ef450195cd89d67e6dcc6f6b4a6a87 100644 (file)
@@ -244,7 +244,7 @@ can be achieved like so:
       ber = ber_alloc_t( LBER_USE_DER );
 
       if ( ber == NULL ) {
-               /* error */
+              /* error */
       }
 
       rc = ber_printf( ber, "{siiiib{v}}", dn, scope, ali,
@@ -269,7 +269,7 @@ The return values for all of these functions are declared in the
 .BR lber-sockbuf (3),
 .BR lber-types (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 62aeccc92579a243aa30c40630e574a40a2aedd5..896353b585378f9eb7503fb76c6d61124bed4310 100644 (file)
@@ -46,7 +46,7 @@ arbitrary dynamically allocated objects.
 .BR lber-types (3)
 .LP
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 2421bc5fa81f1a15b1824ffdad6d85045122ee7e..e5f2340ca3c043bf67faab68aca35629aea3a49a 100644 (file)
@@ -164,7 +164,7 @@ does nothing.  If \fIfreebuf\fP is zero, the internal buffer is not freed.
 .BR lber-memory (3)
 .LP
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 3f38547ac7515debdb315d643c5824d1b4cabd70..24b364f1f3eb370cb125bdadbb5aaff6d9b71e6f 100644 (file)
@@ -283,9 +283,9 @@ case insensitive string comparison
 .BR slapd (8),
 .BR draft-ietf-ldapext-ldap-c-api-xx.txt \ <http://www.ietf.org>
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
 .LP
 These API manual pages are based upon descriptions provided in the
index bc3fe40f10146c10d9c2db000faaf12ec5cbe81e..98f110dd00b45edca1b891878ad1bd37dcc99a41 100644 (file)
@@ -62,7 +62,7 @@ for details.
 .BR ldap_result (3),
 .BR ldap_error (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index f65bd5e8a21454c086d91daa4699a258a774fca4..e42cc279a5ca773ea9be6c8c830bead43b34a2d9 100644 (file)
@@ -84,7 +84,7 @@ also directly return LDAP error codes.
 .BR ldap (3),
 .BR ldap_modify (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 5714b04303cb2d3039375ec1c1964497de5729e7..86dc518822471694cb3eead05cae6d97fbd09433 100644 (file)
@@ -221,7 +221,7 @@ for more information.
 .B Cyrus SASL
 (http://asg.web.cmu.edu/sasl/)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 0f0363be8c92ba809a43ac1602a35d0355ae48a6..0e5f231d7ab5f97d08791cb3d8959f0fd3ef7b1e 100644 (file)
@@ -54,7 +54,7 @@ There is no way to compare binary values, but there should be.
 .BR ldap (3),
 .BR ldap_error (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 737507871205132c22bee14a129608e60dd40321..a9352fd3938cc34ee325bf54fe91b65629b6d2c2 100644 (file)
@@ -51,7 +51,7 @@ non-negative message id of the request if things went ok.
 .BR ldap (3),
 .BR ldap_error (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index b86af8422fea1b61fd9f88609a9dd666bc64c543..cbbf7a842bc24c6e69283f3d83cf973bf1489de8 100644 (file)
@@ -28,8 +28,9 @@ is accessible using
 and
 .BR ldap_set_option (3)
 with the
-.B LDAP_OPT_ERROR_NUMBER
-option.
+.B LDAP_OPT_RESULT_CODE
+option (previously called
+.BR LDAP_OPT_ERROR_NUMBER ).
 .LP
 The
 .B ldap_result2error()
@@ -205,7 +206,7 @@ library routine.
 .BR ldap (3),
 .BR perror (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index cdc18dbf2a4b5809523680779e2a321c9a8ab59d..af7ed34af6232fecb4ca75c9f6362a1a986949f4 100644 (file)
@@ -70,7 +70,7 @@ return dynamically allocated memory that must be freed by the caller via
 .BR ldap_get_values (3),
 .BR ldap_error (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 884c98d878a897da1052c5bc99336272566cd3d2..f917492943280725c3c803767c355664f16e4bc0 100644 (file)
@@ -77,7 +77,7 @@ for a description of possible error codes.
 .BR ldap_get_values (3),
 .BR ldap_get_dn (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 87e2411a200334da9f2dc80c754be2b83a871380..bda99a1db4facfcc96e9c493908a8b29549970d3 100644 (file)
@@ -80,7 +80,7 @@ NULL is returned.  If an error occurs in
 .BR ldap_first_entry (3),
 .BR ldap_first_reference (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index f7401391e65fc9e33dcc8a489ab51865ae3f86ef..abfeda8c119785ff8160c72c33cae3ebf450de3f 100644 (file)
@@ -69,7 +69,7 @@ NULL is returned.  If an error occurs in
 .BR ldap_search (3),
 .BR ldap_parse_reference (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 1b51a6bb286e0492941a14b16dc4c0996e3d0321..70b52606483dce5fa2f0859c89c6f45f1e131499 100644 (file)
@@ -234,7 +234,7 @@ These routines dynamically allocate memory that the caller must free.
 .BR ldap_memfree (3),
 .BR ldap_value_free (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 9aa28fb401ff19a6298d51679953985625ef7bbe..fabf943617f009479bb5ab1e6a9b99cecf32445b 100644 (file)
@@ -99,7 +99,7 @@ using the supplied routines.
 .BR ldap_first_attribute (3),
 .BR ldap_error (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index d71a93fdc62be07bf563789118af0d8874c5781b..178f3140371718c5a1e18890a8e76ac69d87024b 100644 (file)
@@ -48,8 +48,8 @@ defined below.
            int mod_op;
            char *mod_type;
            union {
-               char **modv_strvals;
-               struct berval **modv_bvals;
+               char **modv_strvals;
+               struct berval **modv_bvals;
            } mod_vals;
            struct ldapmod *mod_next;
        } LDAPMod;
@@ -116,7 +116,7 @@ field of \fIld\fP.
 .BR ldap_error (3),
 .BR ldap_add (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 3036dd20769e74bfe5cf7be0098d5eb0597a87cc..f217f26ad29d5a47011187ae52fa37521f444f77 100644 (file)
@@ -78,7 +78,7 @@ for more details.
 .BR ldap (3),
 .BR ldap_error (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 01278035cecbb3912220ff16a6f5a4122a0b150e..3d39babfc28714030d8f010d41057cd00c81484b 100644 (file)
@@ -70,7 +70,7 @@ for more details.
                char            *ld_matched;
                int             ld_refhoplimit;
                unsigned long   ld_options;
-       #define LDAP_OPT_REFERRALS      0x00000002      /* set by default */
+       #define LDAP_OPT_REFERRALS      0x00000002 /* set by default */
        #define LDAP_OPT_RESTART        0x00000004
                /* ... other stuff you should not mess with ... */
        } LDAP;
@@ -116,7 +116,7 @@ in the LDAP structure.
 .BR ldap_bind (3),
 .BR errno (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 01723180ae9ab1e99de080e0721dee8c55fdf31e..3c72ca88fe0a9b2a51e20b527101521e83d7cabd 100644 (file)
@@ -13,7 +13,8 @@ OpenLDAP LDAP (libldap, -lldap)
 .LP
 .ft B
 int ldap_parse_reference( LDAP *ld, LDAPMessage *reference,
-       char ***referralsp, LDAPControl ***serverctrlsp, int freeit )
+       char ***referralsp, LDAPControl ***serverctrlsp,
+       int freeit )
 .SH DESCRIPTION
 .LP
 The
@@ -57,7 +58,7 @@ Upon success LDAP_SUCCESS is returned. Otherwise the values of the
 .BR ldap_get_values (3),
 .BR ldap_controls_free (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 471f2f755a4040c3c78252ba36803416b5978052..4c0d0cbc9cc367552145ba65b35b02ece7ae7f4d 100644 (file)
@@ -14,7 +14,8 @@ OpenLDAP LDAP (libldap, -lldap)
 .ft B
 int ldap_parse_result( LDAP *ld, LDAPMessage *result,
        int *errcodep, char **matcheddnp, char **errmsgp,
-       char ***referralsp, LDAPControl ***serverctrlsp, int freeit )
+       char ***referralsp, LDAPControl ***serverctrlsp,
+       int freeit )
 .LP
 .ft B
 int ldap_parse_sasl_bind_result( LDAP *ld, LDAPMessage *result,
@@ -102,7 +103,7 @@ result parameters are undefined.
 .BR ldap_controls_free (3),
 .BR lber-types (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 128d79a551ff24a5f84b9b328afbbaa3f02f43a2..1932aeedb6145c78336b172ba06e014e41b63113 100644 (file)
@@ -96,13 +96,14 @@ The possible result types returned are:
 The
 .B ldap_msgfree()
 routine is used to free the memory allocated for
-a result by
+result(s) by
 .B ldap_result()
 or
 .BR ldap_search_s (3)
-and friends.  It takes
-a pointer to the result to be freed and returns the type of the
-message it freed.
+and friends.
+It takes a pointer to the result or result chain to be freed and returns
+the type of the last message in the chain.
+If the parameter is NULL, the function does nothing and returns zero.
 .LP
 The
 .B ldap_msgtype()
@@ -125,7 +126,7 @@ return -1 on error.
 .BR ldap_first_message (3),
 .BR select (2)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index ffa50beb5b02974d037b3eb7171e52315afbb0f3..b7dc7c410b1d8e5452b4fa605467abdc82d9bbea 100644 (file)
@@ -324,8 +324,8 @@ Unexpected end of data.
 .SH SEE ALSO
 .BR ldap (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
 
index 3530b25b6ac4c78c5cd0e9989d24e16bd16a3753..0c9958b965d379658e01dc489875b538e40d92f0 100644 (file)
@@ -127,7 +127,7 @@ in <ldap.h>.
 .BR ldap_getfilter (3),
 .BR ldap_error (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 8ef18ed1259f972d5bdb4c1d62c9ac0fcee79d0c..3797152eafbfa6a604e92962789afaf44fdb7f3b 100644 (file)
@@ -77,10 +77,14 @@ For example:
        LDAP *ld;
        LDAPMessage *res;
 
-       /* ... call to ldap_search_s(), fill in res, retrieve sn attr ... */
+       /*
+        * ... call to ldap_search_s(), fill in res,
+        * retrieve sn attr ...
+        */
 
        /* now sort the entries on surname attribute */
-       if ( ldap_sort_entries( ld, &res, "sn", ldap_sort_strcasecmp ) != 0 )
+       if ( ldap_sort_entries( ld, &res, "sn",
+                       ldap_sort_strcasecmp ) != 0 )
                ldap_perror( ld, "ldap_sort_entries" );
 .ft
 .fi
@@ -106,7 +110,7 @@ deallocation routines.
 .BR ldap_result (3),
 .BR qsort (3)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 64078fbfdfa920758b2aed33dcd76658c0b1eb1e..6ec30bfe988969ec94324897f949a88130e372ed 100644 (file)
@@ -278,7 +278,7 @@ local ldap configuration file
 .SH AUTHOR
 Kurt Zeilenga, The OpenLDAP Project
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 5b0c9e07df0da2b349045f8faaef08b588a4d46a..d47ecdb419a1fbb426c50a9581c484b64b4742df 100644 (file)
@@ -16,12 +16,12 @@ The basic form of an LDIF entry is:
 .LP
 .nf
 .ft tt
-       dn: <distinguished name>
-       <attrdesc>: <attrvalue>
-       <attrdesc>: <attrvalue>
-       <attrdesc>:: <base64-encoded-value>
-       <attrdesc>:< <URL>
-       ...
+    dn: <distinguished name>
+    <attrdesc>: <attrvalue>
+    <attrdesc>: <attrvalue>
+    <attrdesc>:: <base64-encoded-value>
+    <attrdesc>:< <URL>
+    ...
 .ft
 .fi
 .LP
@@ -33,8 +33,8 @@ or tab, e.g.,
 .LP
 .nf
 .ft tt
-       dn: cn=Barbara J Jensen,dc=exam
-        ple,dc=com
+    dn: cn=Barbara J Jensen,dc=exam
+     ple,dc=com
 .ft
 .fi
 .LP
@@ -44,8 +44,8 @@ Multiple attribute values are specified on separate lines, e.g.,
 .LP
 .nf
 .ft tt
-       cn: Barbara J Jensen
-       cn: Babs Jensen
+    cn: Barbara J Jensen
+    cn: Babs Jensen
 .ft
 .fi
 .LP
@@ -56,7 +56,7 @@ the value " begins with a space" would be encoded like this:
 .LP
 .nf
 .ft tt
-       cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
+    cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
 .ft
 .fi
 .LP
@@ -66,7 +66,7 @@ in the file /tmp/value would be listed like this:
 .LP
 .nf
 .ft tt
-       cn:< file:///tmp/value
+    cn:< file:///tmp/value
 .ft
 .fi
 Other URI schemes (ftp,http) may be supported as well.
@@ -78,28 +78,28 @@ Here is an example of an LDIF file containing three entries.
 .LP
 .nf
 .ft tt
-       dn: cn=Barbara J Jensen,dc=example,dc=com
-       cn: Barbara J Jensen
-       cn: Babs Jensen
-       objectclass: person
-       description:< file://tmp/babs
-       sn: Jensen
+    dn: cn=Barbara J Jensen,dc=example,dc=com
+    cn: Barbara J Jensen
+    cn: Babs Jensen
+    objectclass: person
+    description:< file://tmp/babs
+    sn: Jensen
 
-       dn: cn=Bjorn J Jensen,dc=example,dc=com
-       cn: Bjorn J Jensen
-       cn: Bjorn Jensen
-       objectclass: person
-       sn: Jensen
+    dn: cn=Bjorn J Jensen,dc=example,dc=com
+    cn: Bjorn J Jensen
+    cn: Bjorn Jensen
+    objectclass: person
+    sn: Jensen
 
-       dn: cn=Jennifer J Jensen,dc=example,dc=com
-       cn: Jennifer J Jensen
-       cn: Jennifer Jensen
-       objectclass: person
-       sn: Jensen
-       jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
-        A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
-        ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
-       ...
+    dn: cn=Jennifer J Jensen,dc=example,dc=com
+    cn: Jennifer J Jensen
+    cn: Jennifer Jensen
+    objectclass: person
+    sn: Jensen
+    jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
+     A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
+     ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
+    ...
 .ft
 .fi
 .LP
@@ -113,7 +113,7 @@ Jensen's entry is encoded using base 64.
 .LP
 "LDAP Data Interchange Format," Good, G., RFC 2849.
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index bef49fd4d75ef9607cadd7ba23556f79643b04e2..99f8afede35da2cf0f48577ca015d6ddb20e0c83 100644 (file)
@@ -10,9 +10,11 @@ ETCDIR/slapd.conf
 The BDB backend to
 .BR slapd (8)
 is the recommended backend for a normal slapd database.
+However, it takes more care than with the LDBM backend to configure
+it properly.
 It uses the Sleepycat Berkeley DB (BDB) package to store data.
 It makes extensive use of indexing and caching to speed data access.
-.TP
+.LP
 It is noted that these options are intended to complement
 Berkeley DB configuration options set in the environment's
 .B DB_CONFIG
@@ -130,4 +132,4 @@ Berkeley DB configuration file
 .BR slapadd (8),
 .BR slapcat (8),
 .BR slapindex (8),
-.BR Berkeley DB documentation .
+Berkeley DB documentation.
index 70b46055d1b9cde7ee1e7f86b1b6a3d0d3df826c..2fee75373972b6742d449992ab5f4a237300c3d5 100644 (file)
@@ -9,8 +9,10 @@ ETCDIR/slapd.conf
 .SH DESCRIPTION
 The LDBM backend to
 .BR slapd (8)
-is a database which uses one of BerkeleyDB, GNU DBM, MDBM or NDBM to
-store data.
+is the database backend which is easiest to configure.
+However, it does not offer the data durability features of the BDB
+backend.
+It uses Berkeley DB or GDBM to store data.
 It makes extensive use of indexing and caching to speed data access.
 .SH CONFIGURATION
 These
@@ -102,8 +104,11 @@ can be decomposed into
 .B subfinal
 indices.
 The special type
-.B nolang
-may be specified to disallow use of this index by language subtypes.
+.B notags
+(or
+.BR nolang )
+may be specified to disallow use of this index by subtypes with tagging
+options (such as language options).
 The special type
 .B nosubtypes
 may be specified to disallow use of this index by named subtypes.
index 2fc21405790d6877577d1af4e4b9659e28b15779..e05ddb835dd4efa0f75a5c383a2ccbfd40a6ba89 100644 (file)
@@ -679,6 +679,61 @@ been written:
 .fi
 .LP
 with the advantage of saving one rewrite pass ...)
+.SH PROXY CACHE EXTENSION
+The proxy cache extension to 
+.B meta 
+backend allows caching of LDAP search requests (queries). For an incoming query, the
+proxy cache determines its corresponding \fBtemplate\fP. If the template was
+specified as cacheable using the \fBaddtemplate\fP directive and the request is
+contained in a cached request, it is answered from the proxy cache. Otherwise,
+the proxy cache obtains and caches results from target(s) specified by the
+\fBuri\fP directive. 
+.LP
+
+A template is defined by a filter string and an index identifying a set of
+attributes. The \fBtemplate string\fP for a query can be obtained by
+removing assertion values from the RFC 2254 representation of its search
+filter. A query belongs to a template if its template string and set of
+projected attributes correspond to a cacheable template. Examples of template strings are (mail=), (|(sn=)(cn=)), (&(sn=)(givenName=)).    
+
+.LP 
+The following cache specific directives can be used to configure the proxy
+cache: 
+.TP
+.B cacheparams <lo_thresh> <hi_thresh> <numattrsets> <max_entries> <cc_period> 
+The directive enables proxy caching in the \fBmeta\fP backend and sets general
+cache parameters. Cache replacement is invoked when the cache size crosses the 
+<hi_thresh> bytes and continues till the cache size is greater than <lo_thresh>
+bytes. <numattrsets> should be equal to the number of following \fBattrset\fP
+directives. Queries are cached only if they correspond to a cacheable template
+(specified by the \fBaddtemplate\fP directive) and the number of entries
+returned is less than <max_entries>. Consistency check is performed every
+<cc_period> duration (specified in secs). In each cycle queries with expired
+"time to live(\fBTTL\fP)" are removed. A sample cache configuration is: 
+.LP
+.RS
+cacheparams \fB10000 150000 1 50 100\fP
+.RE
+.TP
+.B attrset <index> <attrs...>
+Used to associate a set of attributes <attrs..> with an <index>. Each attribute
+set is associated with an integer from 0 to <numattrsets>-1. These indices are
+used by the \fBaddtemplate\fP directive to define cacheable templates. 
+
+.TP
+.B addtemplate <template_string> <attrset_index> <ttl> 
+Specifies a cacheable template and "time to live" (in sec) <ttl> of queries 
+belonging to the template. 
+
+.LP
+The following adds a template with filter string (&sn=)(givenName=)) and attributes mail, postaladdress, telephonenumber and a TTL of 1 hour. 
+.LP
+.RS
+.nf
+attrset \fB0 mail postaladdress telephonenumber\fP
+addtemplate \fB(&(sn=)(givenName=)) 0 3600\fP
+.fi
+.RE
 .SH FILES
 .TP
 ETCDIR/slapd.conf
index 76259c5ab604b59bef2dd786e1892c7681c8f489..faa85348da62ef322095848473e7221436fb489e 100644 (file)
@@ -42,7 +42,7 @@ directive.
 .LP
 The following directives can be used:
 .TP
-.B l   <locality>
+.B l <locality>
 The
 .B <locality>
 string is added to the "\fIcn=Monitor\fP" entry as value of the
@@ -69,7 +69,7 @@ file:
 .LP
 .RS
 .nf
-database       monitor
+database monitor
 .fi
 .RE
 .TP
index 3f74d6999d256271c64e3b77dd59fb596cc48d01..4a339a7067b6d41fe6e76c9cfafeee99ed1cc411 100644 (file)
@@ -16,9 +16,9 @@ front-end.
 .LP
 This backend is is primarily intended to be used in prototypes.
 .SH WARNING
-.B "This backend's calling conventions have changed since OpenLDAP 2.0."
-The abandon operation now gets a new "pid:" line.
-The "msgid:" lines will be removed in a future version.
+The
+.B abandon
+shell command has been removed since OpenLDAP 2.1.
 .SH CONFIGURATION
 These
 .B slapd.conf
@@ -33,14 +33,6 @@ These options specify the pathname and arguments of the program to
 execute in response to the given LDAP operation.
 Each option is followed by the input lines that the program receives:
 .TP
-.B abandon  <pathname> <argument>...
-.nf
-ABANDON
-msgid: <message ID of operation to abandon>
-<repeat { "suffix:" <database suffix DN> }>
-pid: <process ID of operation to abandon>
-.fi
-.TP
 .B add      <pathname> <argument>...
 .nf
 ADD
@@ -129,7 +121,7 @@ want the backend to handle.
 Operations for which a command is not supplied will be refused with an
 "unwilling to perform" error.
 .LP
-The commands - except \fBabandon\fP and \fBunbind\fP - should output:
+The commands - except \fBunbind\fP - should output:
 .RS
 .nf
 RESULT
index 9a84f3dc07680165cbe6907f826b8c0a0433a7b5..633cd317b59deddde54cd0bdb37197f4207c6230 100644 (file)
@@ -35,7 +35,7 @@ is as follows:
     # comment - these options apply to every database
     <global configuration options>
     # first database definition & configuration options
-    database   <backend 1 type>
+    database <backend 1 type>
     <configuration options specific to backend 1>
     # subsequent database definitions & configuration options
     ...
@@ -629,8 +629,10 @@ Used to specify the fully qualified domain name used for SASL processing.
 Specify SASL realm.  Default is empty.
 .TP
 .B sasl-regexp <match> <replace>
-Used by the SASL authorization mechanism to convert a SASL authenticated 
-username to an LDAP DN. When an authorization request is received, the SASL 
+Used by the SASL mechanism to convert a SASL authenticated 
+username to an LDAP DN used for authorization purposes.  Note that
+the resultant DN need not refer to an existing entry to be considered
+valid.  When an authorization request is received, the SASL 
 .B USERNAME, REALM, 
 and
 .B MECHANISM
@@ -639,7 +641,7 @@ form
 .RS
 .RS
 .TP
-.B uid=<username>[,cn=<realm>],cn=<mechanism>,cn=auth
+.B UID=<username>[[,CN=<realm>],CN=<mechanism>,]CN=auth
 
 .RE
 This SASL name is then compared against the
@@ -651,11 +653,9 @@ string. If there are wildcard strings in the
 .B match
 regular expression that are enclosed in parenthesis, e.g. 
 .RS
-.RS
 .TP
-.B uid=(.*),cn=.*
+.B UID=([^,]*),CN=.*
 
-.RE
 .RE
 then the portion of the SASL name that matched the wildcard will be stored
 in the numbered placeholder variable $1. If there are other wildcard strings
@@ -664,15 +664,20 @@ placeholders can then be used in the
 .B replace
 string, e.g. 
 .RS
-.RS
 .TP
-.B cn=$1,ou=Accounts,dc=$2,dc=$4. 
+.B UID=$1,OU=Accounts,DC=example,DC=com 
 
 .RE
+The replaced SASL name can be either a DN or an LDAP URI. If the
+latter, the server will use the URI to search its own database(s)
+and, if the search returns exactly one entry, the SASL name is
+replaced by the DN of that entry.   The LDAP URI must have no
+hostport, attrs, or extensions components, e.g.
+.RS
+.TP
+.B ldap:///OU=Accounts,DC=example,DC=com??one?(UID=$1)
+
 .RE
-The replaced SASL name can be either a DN or an LDAP URI. If the latter, the slapd
-server will use the URI to search its own database, and if the search returns 
-exactly one entry, the SASL name is replaced by the DN of that entry.
 Multiple 
 .B sasl-regexp 
 options can be given in the configuration file to allow for multiple matching 
@@ -820,7 +825,7 @@ for an explanation of the different flags.
 .TP
 .B ucdata-path <path>
 Specify the path to the directory containing the Unicode character
-tables. The default path is LOCALSTATEDIR/ucdata.
+tables. The default path is DATADIR/ucdata.
 .SH TLS OPTIONS
 If
 .B slapd
@@ -966,7 +971,8 @@ This option puts the database into "read-only" mode.  Any attempts to
 modify the database will return an "unwilling to perform" error.  By
 default, readonly is off.
 .HP
-.B replica host=<hostname>[:port] [tls=yes|critical]
+.B replica uri=ldap[s]://<hostname>[:port]|host=<hostname>[:port] 
+.B [starttls=yes|critical]
 .B [suffix=<suffix> [...]]
 .B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
@@ -979,7 +985,14 @@ Administrator's Guide" for detailed information on setting up a replicated
 directory service. Zero or more
 .B suffix
 instances can be used to select the subtrees that will be replicated
-(defaults to all the database). A
+(defaults to all the database). 
+.B host
+is deprecated in favor of the
+.B uri
+option.
+.B uri
+allows the replica LDAP server to be specified as an LDAP URI. 
+A
 .B bindmethod
 of
 .B simple
@@ -1088,11 +1101,172 @@ Specify the referral to pass back when
 .BR slapd (8)
 is asked to modify a replicated local database.
 If specified multiple times, each url is provided.
+.HP
+.B syncrepl id=<replica ID>
+.B provider=ldap[s]://<hostname>[:port]
+.B [updatedn=<dn>]
+.B [binddn=<dn>]
+.B [bindmethod=simple|sasl] [binddn=<simple DN>] [credentials=<simple passwd>]
+.B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
+.B [authcId=<authentication ID>] [authzId=<authorization ID>]
+.B [searchbase=<base DN>]
+.B [filter=<filter str>]
+.B [attrs=<attr list>]
+.B [schemachecking=on|off]
+.B [scope=sub|one|base]
+.B [type=refreshOnly|refreshAndPersist]
+.B [interval=dd:hh:mm]
+.RS
+Specify an LDAP Sync replication session between the specified replication provider
+site and this database (a replication consumer).
+The replication consumer communicates with the replication provider to perform
+an initial population and the following periodic or persistent synchronizations.
+The LDAP Sync replication engine is based on the LDAP Content Sync protocol :
+a stateful, pull, incremental, and partial synchronization protocol which
+supports both polling and listening modes of operations.
+It currently supports entry-level synchronization.
+A directory server wide
+.B id
+uniquely identifies this LDAP Sync replication specification
+in the directory server instance. The specification of an LDAP Sync replication
+session is based on the search specification which defines the replica content.
+The replicated entries are those directory entries of the subtree under the
+.B searchbase
+with the
+.B scope
+that match the
+.B filter.
+Only the attributes specified in the
+.B attrs 
+are included in the replica content.
+There are two synchronization modes depending on the incremental
+synchronization semantics after the intial content population.
+The incremental synchronization is performed periodically with
+the
+.B interval
+when the sync
+.B type
+is
+.B refreshOnly.
+Alternatively, the provider sends synchronization messages to the consumer
+upon updates to the replicated contents when the sync
+.B type
+is
+.B refreshAndPersist.
+The replication provider site is specified by
+.B provider
+as an LDAP URI.
+If 
+.B schemachecking
+is
+.B on,
+every replicated entry will be checked for its schema
+when it is stored in the consumer replica.
+The consumer slapd should retrieve attributes of an entry
+that are required by the schema definition.
+If 
+.B schemachecking
+is
+.B off,
+entries will be stored without checking the schema conformance.
+A
+.B bindmethod
+of 
+.B simple
+requires the options 
+.B binddn
+and 
+.B credentials
+and should only be used when adequate security services (e.g. TLS or IPSEC) are in place.
+A
+.B bindmethod
+of
+.B sasl
+requires the option
+.B saslmech.
+Specific security properties (as with the
+.B sasl secprops
+keyword above) for a SASL bind can be set with the
+.B secprops
+option. A non default SASL realm can be set with the
+.B realm 
+option.
+If the 
+.B mechanism
+will use Kerberos, a kerberos instance should be given in
+.B authcId.
+.B updatedn
+specifies the DN used to update (subject to access controls) the
+replica at the consumer replica.
 .SH DATABASE-SPECIFIC OPTIONS
 Each database may allow specific configuration options; they are
-documented separately in the
+documented separately in the backends' manual pages.
+.SH BACKENDS
+The following backends can be compiled into slapd.
+They are documented in the
 .BR slapd-<backend> (5)
 manual pages.
+.TP
+.B bdb
+This is the recommended backend for a normal slapd database.
+However, it takes more care than with the LDBM backend to configure
+it properly.
+It uses the Sleepycat Berkeley DB (BDB) package to store data.
+.TP
+.B ldbm
+This is the database backend which is easiest to configure.
+However, it does not offer the data durability features of the BDB
+backend.
+It uses Berkeley DB or GDBM to store data.
+.TP
+.B dnssrv
+This backend is experimental.
+It serves up referrals based upon SRV resource records held in the
+Domain Name System.
+.TP
+.B ldap
+This backend acts as a proxy to forward incoming requests to another
+LDAP server.
+.TP
+.B meta
+This backend performs basic LDAP proxying with respect to a set of
+remote LDAP servers. It is an enhancement of the ldap backend. The
+proxy cache extension of meta backend provides answering of search
+requests from the proxy using results of previously cached requests.
+.TP
+.B monitor
+This backend provides information about the running status of the slapd
+daemon.
+.TP
+.B null
+Operations in this backend succeed but do nothing.
+.TP
+.B passwd
+This backend is provided for demonstration purposes only.
+It serves up user account information from the system
+.BR passwd (5)
+file.
+.TP
+.B perl
+This backend embeds a
+.BR perl (1)
+interpreter into slapd.
+It runs Perl subroutines to implement LDAP operations.
+.TP
+.B shell
+This backend executes external programs to implement LDAP operations.
+It is is primarily intended to be used in prototypes.
+.TP
+.B sql
+This backend is experimental.
+It services LDAP requests from an SQL database.
+.TP
+.B tcl
+This backend is experimental.
+It embeds a
+.BR Tcl (3tcl)
+interpreter into slapd.
+It runs Tcl commands to implement LDAP operations.
 .SH EXAMPLES
 .LP
 Here is a short example of a configuration file:
@@ -1112,7 +1286,7 @@ database  bdb
 suffix    "dc=our-domain,dc=com"
 # The database directory MUST exist prior to
 # running slapd AND should only be accessible
-# by the slapd/tools. Mode 700 recommended.
+# by the slapd/tools. Mode 0700 recommended.
 directory LOCALSTATEDIR/openldap-data
 # Indices to maintain
 index     objectClass  eq
@@ -1141,6 +1315,7 @@ default slapd configuration file
 .BR slapd-ldap (5),
 .BR slapd-ldbm (5),
 .BR slapd-meta (5),
+.BR slapd-monitor (5),
 .BR slapd-null (5),
 .BR slapd-passwd (5),
 .BR slapd-perl (5),
@@ -1149,7 +1324,6 @@ default slapd configuration file
 .BR slapd-tcl (5),
 .BR slapd.replog (5),
 .BR slapd.access (5),
-.BR locale (5),
 .BR slapd (8),
 .BR slapadd (8),
 .BR slapcat (8),
@@ -1159,7 +1333,7 @@ default slapd configuration file
 .LP
 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 668132afae0d411209d1e1980dfb201613acabed..cb7df69367d4e32dbe0007d182e97bebcab7104b 100644 (file)
@@ -164,7 +164,7 @@ lockfile for slapd.replog
 .BR slapd (8),
 .BR slurpd (8)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 9ffba940ec8307184484d2aad0dd6b636677d972..6bc17bac58531fe85d46ccf5be8fa121bea9e8eb 100644 (file)
@@ -105,7 +105,7 @@ database give the command:
 .LP
 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 26b51715eed28ead2edbe232f93c693b40bd3ea0..e53faf497cc4022c2d6759ef7aebe8d6b61743b1 100644 (file)
@@ -99,7 +99,7 @@ give the command:
 .LP
 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 6f38a435f3ecc71b1bc5cd2fdf3f9cbb9bb55cc4..3b59b39a11b926ddb8a9a1d45420443199d5d42e 100644 (file)
@@ -30,15 +30,14 @@ If configured in
 .BR ETCDIR/slapd.conf ,
 the
 .B slapd
-process will print its process ID ( see
-.BR getpid (2)
-to a 
+process will print its process ID (see
+.BR getpid (2))
+to a 
 .B .pid
 file, as well as the command line options during invocation to an
 .B .args
-file ( see 
-.BR slapd.conf (5)
-).
+file (see 
+.BR slapd.conf (5)).
 If the
 .B \-d
 flag is given, even with a zero argument,
@@ -212,7 +211,7 @@ To test whether the configuration file is correct or not, type:
 .SH BUGS
 See http://www.openldap.org/its/
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 1434391e340d5238c830efc1e7ed72d184205b93..43d967f5115bf5d3bdb4d3381a0b6e260f4a1884 100644 (file)
@@ -79,7 +79,7 @@ To reindex your SLAPD database, give the command:
 .LP
 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index 8d855155247e8574a2a78c0ae4e7c59e835516b0..255b44c17b4a9a050611af2f85666eb86ffa3e77 100644 (file)
@@ -166,7 +166,7 @@ on voluminous debugging which will be printed on standard error, type:
 .LP
 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
 .SH ACKNOWLEDGEMENTS
-.B     OpenLDAP
+.B OpenLDAP
 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B     OpenLDAP
+.B OpenLDAP
 is derived from University of Michigan LDAP 3.3 Release.  
index a3572346c318dbb50dbf370fba4eabbbbab81ace..834c0a16c67b4ba9cc1444bd0b7caff50d254409 100644 (file)
@@ -15,6 +15,7 @@
 #define _AC_LOCALIZE_H
 
 #ifdef LDAP_LOCALIZE
+
 #      include <locale.h>
 #      include <libintl.h>
 
 #      define gettext_noop(s)          s
 #      define _(s)                                     gettext(s)
 #      define N_(s)                            gettext_noop(s)
+#      define ldap_pvt_setlocale(c,l)          ((void) setlocale(c, l))
+#      define ldap_pvt_textdomain(d)           ((void) textdomain(d))
+#      define ldap_pvt_bindtextdomain(p,d)     ((void) bindtextdomain(p, d))
 
 #else
-       /* disable i18n/l10n */
-#      define setlocale(c,l)           /* empty */ 
 
+       /* disable i18n/l10n */
 #      define _(s)                                     s
 #      define N_(s)                            s
-#      define textdomain(d)            /* empty */
-#      define bindtextdomain(p,d)      /* empty */
+#      define ldap_pvt_setlocale(c,l)          ((void) 0)
+#      define ldap_pvt_textdomain(d)           ((void) 0)
+#      define ldap_pvt_bindtextdomain(p,d)     ((void) 0)
 
 #endif
 
index 5db9fb39f3327e193c7c0b0c514d4d110ef1093f..728f575090fd96796802bb52e9c39402e0b4881c 100644 (file)
@@ -149,7 +149,8 @@ typedef struct lber_memory_fns {
 #define LBER_OPT_SOCKBUF_DEBUG         0x1002
 
 /* on/off values */
-#define LBER_OPT_ON            ((void *) 1)
+extern char ber_pvt_opt_on;
+#define LBER_OPT_ON            ((void *) &ber_pvt_opt_on)
 #define LBER_OPT_OFF   ((void *) 0)
 
 #define LBER_OPT_SUCCESS       (0)
@@ -531,9 +532,7 @@ LBER_V( Sockbuf_IO ) ber_sockbuf_io_tcp;
 LBER_V( Sockbuf_IO ) ber_sockbuf_io_readahead;
 LBER_V( Sockbuf_IO ) ber_sockbuf_io_fd;
 LBER_V( Sockbuf_IO ) ber_sockbuf_io_debug;
-#ifdef LDAP_CONNECTIONLESS
 LBER_V( Sockbuf_IO ) ber_sockbuf_io_udp;
-#endif
 
 /*
  * LBER memory.c
index 6b3fcf14232087b65f42b82ad3a0323fa42099c1..9d8b66056d6050e8fca130751c8cac3f4c774da3 100644 (file)
@@ -95,7 +95,8 @@ LDAP_BEGIN_DECL
 
 /* 0x16 - 0x2f not defined by current draft */
 #define LDAP_OPT_HOST_NAME                     0x0030
-#define        LDAP_OPT_ERROR_NUMBER           0x0031
+#define LDAP_OPT_RESULT_CODE           0x0031
+#define LDAP_OPT_ERROR_NUMBER          LDAP_OPT_RESULT_CODE
 #define LDAP_OPT_ERROR_STRING          0x0032
 #define LDAP_OPT_MATCHED_DN                    0x0033
 
@@ -144,7 +145,7 @@ LDAP_BEGIN_DECL
 #define        LDAP_OPT_X_SASL_MAXBUFSIZE              0x6109
 
 /* on/off values */
-#define LDAP_OPT_ON            ((void *) 1)
+#define LDAP_OPT_ON            ((void *) &ber_pvt_opt_on)
 #define LDAP_OPT_OFF   ((void *) 0)
 
 /*
@@ -180,11 +181,16 @@ typedef struct ldapcontrol {
 } LDAPControl;
 
 /* LDAP Controls */
-#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"
-#define LDAP_CONTROL_SUBENTRIES                "1.3.6.1.4.1.4203.1.10.1"
-#define LDAP_CONTROL_NOOP                      "1.3.6.1.4.1.4203.1.10.2"
-#define LDAP_CONTROL_MANAGEDSAIT       "2.16.840.1.113730.3.4.2"
-#define LDAP_CONTROL_PROXY_AUTHZ       "2.16.840.1.113730.3.4.18"
+#define LDAP_CONTROL_ASSERT                            "1.3.6.1.4.1.4203.666.5.9"
+#define LDAP_CONTROL_PRE_READ                  "1.3.6.1.4.1.4203.666.5.10.1"
+#define LDAP_CONTROL_POST_READ                 "1.3.6.1.4.1.4203.666.5.10.2"
+#define LDAP_CONTROL_MODIFY_INCREMENT  "1.3.6.1.4.1.4203.666.5.11"
+
+#define LDAP_CONTROL_VALUESRETURNFILTER        "1.2.826.0.1.334810.2.3"
+#define LDAP_CONTROL_SUBENTRIES                        "1.3.6.1.4.1.4203.1.10.1"
+#define LDAP_CONTROL_NOOP                              "1.3.6.1.4.1.4203.1.10.2"
+#define LDAP_CONTROL_MANAGEDSAIT               "2.16.840.1.113730.3.4.2"
+#define LDAP_CONTROL_PROXY_AUTHZ               "2.16.840.1.113730.3.4.18"
 
 #if 0
 #define LDAP_CONTROL_DUPENT_REQUEST            "2.16.840.1.113719.1.27.101.1"
@@ -193,31 +199,26 @@ typedef struct ldapcontrol {
 #define LDAP_CONTROL_DUPENT    LDAP_CONTROL_DUPENT_REQUEST
 #endif
 
-#define LDAP_CONTROL_PAGEDRESULTS      "1.2.840.113556.1.4.319"
-
-#ifdef LDAP_CLIENT_UPDATE
-#define LDAP_CONTROL_CLIENT_UPDATE             "1.3.6.1.4.1.4203.666.5.3"
-#define LDAP_CONTROL_ENTRY_UPDATE              "1.3.6.1.4.1.4203.666.5.4"
-#define LDAP_CONTROL_CLIENT_UPDATE_DONE        "1.3.6.1.4.1.4203.666.5.5"
-#define LDAP_CUP_COOKIE_OID                            "1.3.6.1.4.1.4203.666.10.1"
-#endif
+#define LDAP_CONTROL_PAGEDRESULTS              "1.2.840.113556.1.4.319"
 
-#define LDAP_SYNC 2
-#ifdef LDAP_SYNC
-#define LDAP_SYNCREPL 1
 #define LDAP_CONTROL_SYNC              "1.3.6.1.4.1.4203.666.5.6"
 #define LDAP_CONTROL_SYNC_STATE        "1.3.6.1.4.1.4203.666.5.7"
 #define LDAP_CONTROL_SYNC_DONE "1.3.6.1.4.1.4203.666.5.8"
 #define LDAP_SYNC_INFO                 "1.3.6.1.4.1.4203.666.10.2"
 
-#define LDAP_SYNC_REFRESH_DONE 0
-#define LDAP_SYNC_NEW_COOKIE   1
+#define LDAP_SYNC_NEW_COOKIE           0
+#define LDAP_SYNC_STATE_MODE_DONE      1
+#define        LDAP_SYNC_LOG_MODE_DONE         2
+#define LDAP_SYNC_REFRESH_DONE         3
+
+#define LDAP_SYNC_STATE_MODE           0
+#define LDAP_SYNC_LOG_MODE                     1
+#define LDAP_SYNC_PERSIST_MODE         2
 
 #define LDAP_SYNC_PRESENT              0
 #define LDAP_SYNC_ADD                  1
 #define LDAP_SYNC_MODIFY               2
 #define LDAP_SYNC_DELETE               3
-#endif
 
 #define LDAP_CONTROL_SORTREQUEST    "1.2.840.113556.1.4.473"
 #define LDAP_CONTROL_SORTRESPONSE      "1.2.840.113556.1.4.474"
@@ -250,6 +251,7 @@ typedef struct ldapcontrol {
 #define LDAP_FEATURE_ABSOLUTE_FILTERS "1.3.6.1.4.1.4203.1.5.3"  /* (&) (|) */
 #define LDAP_FEATURE_LANGUAGE_TAG_OPTIONS "1.3.6.1.4.1.4203.1.5.4"
 #define LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS "1.3.6.1.4.1.4203.1.5.5"
+#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.666.5.6"
 
 /*
  * specific LDAP instantiations of BER types we know about
@@ -291,14 +293,7 @@ typedef struct ldapcontrol {
 
 #define LDAP_TAG_SASL_RES_CREDS        ((ber_tag_t) 0x87U)     /* context specific + primitive */
 
-#ifdef LDAP_CLIENT_UPDATE
-#define LDAP_CUP_TAG_INTERVAL  ((ber_tag_t) 0x02U)     /* integer */
-#define LDAP_CUP_TAG_COOKIE            ((ber_tag_t) 0x30U)     /* sequence */
-#endif
-
-#ifdef LDAP_SYNC
 #define LDAP_SYNC_TAG_COOKIE   ((ber_tag_t) 0x04U)     /* octet string */
-#endif
 
 
 /* possible operations a client can invoke */
@@ -475,15 +470,14 @@ typedef struct ldapcontrol {
 #define LDAP_CLIENT_LOOP                               0x60    /* draft-ietf-ldap-c-api-xx */
 #define LDAP_REFERRAL_LIMIT_EXCEEDED   0x61    /* draft-ietf-ldap-c-api-xx */
 
-#ifdef LDAP_CLIENT_UPDATE
-/* resultCode for LCUP */
-#define LDAP_CUP_RESOURCES_EXHAUSTED   0x100
-#define LDAP_CUP_SECURITY_VIOLATION            0x101
-#define LDAP_CUP_INVALID_COOKIE                        0x102
-#define LDAP_CUP_UNSUPPORTED_SCHEME            0x103
-#define LDAP_CUP_CLIENT_DISCONNECT             0x104
-#define LDAP_CUP_RELOAD_REQUIRED               0x105
-#endif
+#define LDAP_SYNC_RESOURCES_EXHAUSTED  0x100
+#define LDAP_SYNC_SECURITY_VIOLATION   0x101
+#define LDAP_SYNC_INVALID_COOKIE               0x102
+#define LDAP_SYNC_UNSUPPORTED_SCHEME   0x103
+#define LDAP_SYNC_CLIENT_DISCONNECT            0x104
+#define LDAP_SYNC_RELOAD_REQUIRED              0x105
+
+#define LDAP_ASSERTION_FAILED                  0x10f
 
 #ifdef LDAP_EXOP_X_CANCEL
 /* resultCode for Cancel Response */
@@ -493,23 +487,10 @@ typedef struct ldapcontrol {
 #define LDAP_CANNOT_CANCEL                             0x113
 #endif
 
-#ifdef LDAP_CLIENT_UPDATE
-/* LCUP update type */
-#define LDAP_CUP_NONE                                  0x00
-#define LDAP_CUP_SYNC_ONLY                             0x01
-#define LDAP_CUP_PERSIST_ONLY                  0x02
-#define LDAP_CUP_SYNC_AND_PERSIST              0x03
-
-/* LCUP default cookie interval */
-#define LDAP_CUP_DEFAULT_SEND_COOKIE_INTERVAL  0x01
-#endif /* LDAP_CLIENT_UPDATE */
-
 /* LDAP SYNC request type */
-#ifdef LDAP_SYNC
 #define LDAP_SYNC_NONE                                 0x00
 #define LDAP_SYNC_REFRESH_ONLY                 0x01
 #define LDAP_SYNC_REFRESH_AND_PERSIST  0x03
-#endif
 
 /*
  * This structure represents both ldap messages and ldap responses.
@@ -523,9 +504,11 @@ typedef struct ldapmsg LDAPMessage;
 typedef struct ldapmod {
        int             mod_op;
 
+#define LDAP_MOD_OP                    (0x0007)
 #define LDAP_MOD_ADD           (0x0000)
 #define LDAP_MOD_DELETE                (0x0001)
 #define LDAP_MOD_REPLACE       (0x0002)
+#define LDAP_MOD_INCREMENT     (0x0003)
 #define LDAP_MOD_BVALUES       (0x0080)
 /* IMPORTANT: do not use code 0x1000 (or above),
  * it is used internally by the backends!
index f7d1d9d944d4b85d75808d37bc271efbc21eab0c..5ceddf528f00e4e3f3bc5cec102db28a963bb89a 100644 (file)
@@ -72,7 +72,7 @@
  */
        /* location of the default slapd config file */
 #define SLAPD_DEFAULT_CONFIGFILE       LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.conf"
-#define SLAPD_DEFAULT_DB_DIR           LDAP_DATADIR LDAP_DIRSEP "openldap-data"
+#define SLAPD_DEFAULT_DB_DIR           LDAP_RUNDIR LDAP_DIRSEP "openldap-data"
 #define SLAPD_DEFAULT_DB_MODE          0600
 #define SLAPD_DEFAULT_UCDATA           LDAP_DATADIR LDAP_DIRSEP "ucdata"
        /* default max deref depth for aliases */
index 4e38b45ab5edeb772b10312c37f636391b12ea4b..51e19565d1f965dbfbaccc69edd5b7bdec34eb3e 100644 (file)
@@ -139,6 +139,9 @@ LDAP_BEGIN_DECL
 
 #ifdef NEW_LOGGING
 extern int ldap_loglevels[LDAP_SUBSYS_NUM];
+
+#ifdef LDAP_DEBUG
+
 #define LDAP_LOG(a, b, fmt, arg1, arg2, arg3) do {\
        if (ldap_loglevels[LDAP_SUBSYS_##a] >= LDAP_LEVEL_##b || \
                ldap_loglevels[LDAP_SUBSYS_GLOBAL] >= LDAP_LEVEL_##b)\
@@ -150,10 +153,13 @@ extern int ldap_loglevels[LDAP_SUBSYS_NUM];
        (ldap_loglevels[LDAP_SUBSYS_##a] >= LDAP_LEVEL_##b || \
         ldap_loglevels[LDAP_SUBSYS_GLOBAL] >= LDAP_LEVEL_##b)
 
-#endif /* LDAP_LOG */
+#endif /* LDAP_DEBUG */
+
+#endif /* NEW_LOGGING */
 
 #ifndef LDAP_LOG
 #define LDAP_LOG(a, b, fmt, arg1, arg2, arg3)
+#define LDAP_LOGS_TEST(a, b) 0
 #endif
 
 LDAP_LUTIL_F(int) lutil_mnem2level LDAP_P(( const char *level ));
index 464913c1a42843f6d23ef841c3d29d455fd235dd..c809a0bb1f8ee44a8d32b331500dc61216a81d2d 100644 (file)
@@ -361,7 +361,7 @@ struct {                                                            \
 #define        LDAP_TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
 
 #define LDAP_TAILQ_FOREACH(var, head, field)                           \
-       for (var = LDAP_TAILQ_FIRST(head); var; var = TAILQ_NEXT(var, field))
+       for (var = LDAP_TAILQ_FIRST(head); var; var = LDAP_TAILQ_NEXT(var, field))
 
 #define LDAP_TAILQ_FOREACH_REVERSE(var, head, type, field)             \
        for ((var) = LDAP_TAILQ_LAST((head), type, field);              \
index e4f7a9bfe627781e6d541ee8f05197ed53dec816..f3458bf3d39264d18f4f53aa48dc2fd7490a4d61 100644 (file)
 /* define if you have -lslp */
 #undef HAVE_SLP
 
+/* define if you have `long long' */
+#undef HAVE_LONG_LONG
+
 /* Define to `int' if <sys/types.h> does not define. */
 #undef mode_t
 
 #if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
 #define LDAP_TEST
 #endif
-#if defined(LDAP_TEST) && !defined(LDAP_DEBUG)
-#define LDAP_DEBUG
-#endif
 #endif
 
 #ifdef HAVE_EBCDIC 
index 4e45bb60dd6d24250c73b9aa253f3500deae282a..a2c6240914b719e0aef3d936c77cc235cc60cfb9 100644 (file)
 /* define if you have -lslp */
 /* #undef HAVE_SLP */
 
+/* define if you have `long long' */
+#define HAVE_LONG_LONG 1
+
 /* Define to `int' if <sys/types.h> does not define. */
 #define mode_t int
 
@@ -1050,9 +1053,6 @@ typedef signed int ssize_t;
 #if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
 #define LDAP_TEST
 #endif
-#if defined(LDAP_TEST) && !defined(LDAP_DEBUG)
-#define LDAP_DEBUG
-#endif
 
 #include "ldap_cdefs.h"
 #include "ldap_features.h"
index c8edeb09a1a41cbbd1a182875d6f31e4f3f0cc6b..3f763428b259cdf8a812918050924d1c0303773f 100644 (file)
@@ -243,6 +243,35 @@ int compute_rewrite_search_filter(Slapi_PBlock *pb);
 int compute_evaluator(computed_attr_context *c, char *type, Slapi_Entry *e, slapi_compute_output_t outputfn);
 int slapi_x_compute_get_pblock(computed_attr_context *c, Slapi_PBlock **pb);
 
+/* ACL plugins; only SLAPI_PLUGIN_ACL_ALLOW_ACCESS supported now */
+typedef int (*slapi_acl_callback_t)(Slapi_PBlock *pb,
+       Slapi_Entry *e,
+       const char *attr,
+       struct berval *berval,
+       int access,
+       void *state);
+
+/* object extensions */
+typedef void *(*slapi_extension_constructor_fnptr)(void *object, void *parent);
+
+typedef void (*slapi_extension_destructor_fnptr)(void *extension,
+       void *object, void *parent);
+
+int slapi_register_object_extension( const char *pluginname,
+       const char *objectname, slapi_extension_constructor_fnptr constructor,
+       slapi_extension_destructor_fnptr destructor, int *objecttype,
+       int *extensionhandle);
+
+#define SLAPI_EXT_CONNECTION    "Connection"
+#define SLAPI_EXT_OPERATION     "Operation"
+#define SLAPI_EXT_ENTRY         "Entry"
+#define SLAPI_EXT_MTNODE        "Mapping Tree Node"
+
+void *slapi_get_object_extension(int objecttype, void *object,
+       int extensionhandle);
+void slapi_set_object_extension(int objecttype, void *object,
+       int extensionhandle, void *extension);
+
 /* parameters currently supported */
 
 /*
@@ -305,6 +334,8 @@ int slapi_x_compute_get_pblock(computed_attr_context *c, Slapi_PBlock **pb);
 #define SLAPI_X_CONN_CLIENTPATH                        1300
 #define SLAPI_X_CONN_SERVERPATH                        1301
 #define SLAPI_X_CONN_IS_UDP                    1302
+#define SLAPI_X_CONN_SSF                       1303
+#define SLAPI_X_CONN_SASL_CONTEXT              1304
 
 /*  Authentication types */
 #define SLAPD_AUTH_NONE   "none"
@@ -438,6 +469,12 @@ int slapi_x_compute_get_pblock(computed_attr_context *c, Slapi_PBlock **pb);
 #define SLAPI_PLUGIN_SYNTAX_FLAG_ORKEYS                        1
 #define SLAPI_PLUGIN_SYNTAX_FLAG_ORDERING              2
 
+#define SLAPI_PLUGIN_ACL_INIT                  730
+#define SLAPI_PLUGIN_ACL_SYNTAX_CHECK          731
+#define SLAPI_PLUGIN_ACL_ALLOW_ACCESS          732
+#define SLAPI_PLUGIN_ACL_MODS_ALLOWED          733
+#define SLAPI_PLUGIN_ACL_MODS_UPDATE           734
+
 #define SLAPI_OPERATION_AUTHTYPE                741
 #define SLAPI_OPERATION_ID                      742
 #define SLAPI_CONN_CERT                         743
index 5ba264ae6f559cde2f95714fc4b22648643e9eb6..9c80a5126a934397df24f9b6a31865bb98608e88 100644 (file)
@@ -75,31 +75,30 @@ int ber_pvt_log_output(
        const char *fmt,
        ... )
 {
-       char buf[ 1024 ];
+       char buf[1024];
        va_list vl;
        va_start( vl, fmt );
 
-       if ( ber_int_log_proc != NULL )
-       {
+       if ( ber_int_log_proc != NULL ) {
                ber_int_log_proc( ber_pvt_err_file, subsystem, level, fmt, vl );
+
+       } else {
+               int level;
+               ber_get_option( NULL, LBER_OPT_BER_DEBUG, &level );
+               buf[sizeof(buf) - 1] = '\0';
+               vsnprintf( buf, sizeof(buf)-1, fmt, vl );
+               if ( ber_log_check( LDAP_DEBUG_BER, level ) ) {
+                       (*ber_pvt_log_print)( buf );
+               }
        }
-       else
-       {
-            int level;
-            ber_get_option( NULL, LBER_OPT_BER_DEBUG, &level );
-            buf[sizeof(buf) - 1] = '\0';
-            vsnprintf( buf, sizeof(buf)-1, fmt, vl );
-            if ( ber_log_check( LDAP_DEBUG_BER, level ) )
-                (*ber_pvt_log_print)( buf );
-        }
-       va_end(vl);
 
+       va_end(vl);
        return 1;
 }
        
 int ber_pvt_log_printf( int errlvl, int loglvl, const char *fmt, ... )
 {
-       char buf[ 1024 ];
+       char buf[1024];
        va_list ap;
 
        assert( fmt != NULL );
@@ -158,11 +157,11 @@ ber_bprint(
        LDAP_CONST char *data,
        ber_len_t len )
 {
-       static const char       hexdig[] = "0123456789abcdef";
+       static const char hexdig[] = "0123456789abcdef";
 #define BP_OFFSET 9
 #define BP_GRAPH 60
 #define BP_LEN 80
-       char    line[ BP_LEN ];
+       char    line[BP_LEN];
        ber_len_t i;
 
        assert( data != NULL );
@@ -183,23 +182,23 @@ ber_bprint(
 
                        off = i % 0x0ffffU;
 
-                       line[ 2 ] = hexdig[ 0x0f & (off >> 12) ];
-                       line[ 3 ] = hexdig[ 0x0f & (off >>  8) ];
-                       line[ 4 ] = hexdig[ 0x0f & (off >>  4) ];
-                       line[ 5 ] = hexdig[ 0x0f & off ];
-                       line[ 6 ] = ':';
+                       line[2] = hexdig[0x0f & (off >> 12)];
+                       line[3] = hexdig[0x0f & (off >>  8)];
+                       line[4] = hexdig[0x0f & (off >>  4)];
+                       line[5] = hexdig[0x0f & off];
+                       line[6] = ':';
                }
 
                off = BP_OFFSET + n*3 + ((n >= 8)?1:0);
-               line[ off   ] = hexdig[ 0x0f & ( data[i] >> 4 ) ];
-               line[ off+1 ] = hexdig[ 0x0f & data[i] ];
+               line[off] = hexdig[0x0f & ( data[i] >> 4 )];
+               line[off+1] = hexdig[0x0f & data[i]];
                
                off = BP_GRAPH + n + ((n >= 8)?1:0);
 
                if ( isprint( (unsigned char) data[i] )) {
-                       line[ BP_GRAPH + n ] = data[i];
+                       line[BP_GRAPH + n] = data[i];
                } else {
-                       line[ BP_GRAPH + n ] = '.';
+                       line[BP_GRAPH + n] = '.';
                }
        }
 
@@ -258,23 +257,23 @@ int ber_output_dump(
             
             off = i % 0x0ffffU;
 
-            line[ 2 ] = hexdig[ 0x0f & (off >> 12) ];
-            line[ 3 ] = hexdig[ 0x0f & (off >>  8) ];
-            line[ 4 ] = hexdig[ 0x0f & (off >>  4) ];
-            line[ 5 ] = hexdig[ 0x0f & off ];
-            line[ 6 ] = ':';
+            line[2] = hexdig[0x0f & (off >> 12)];
+            line[3] = hexdig[0x0f & (off >>  8)];
+            line[4] = hexdig[0x0f & (off >>  4)];
+            line[5] = hexdig[0x0f & off ];
+            line[6] = ':';
         }
 
         off = BP_OFFSET + n*3 + ((n >= 8)?1:0);
-        line[ off   ] = hexdig[ 0x0f & ( data[i] >> 4 ) ];
-        line[ off+1 ] = hexdig[ 0x0f & data[i] ];
+        line[off] = hexdig[ 0x0f & ( data[i] >> 4 ) ];
+        line[off+1] = hexdig[ 0x0f & data[i] ];
         
         off = BP_GRAPH + n + ((n >= 8)?1:0);
         
         if ( isprint( (unsigned char) data[i] )) {
-            line[ BP_GRAPH + n ] = data[i];
+            line[BP_GRAPH + n] = data[i];
         } else {
-            line[ BP_GRAPH + n ] = '.';
+            line[BP_GRAPH + n] = '.';
         }
     }
 
index ff844feb70ba8e365732960ea955182cc0578f2f..d08ec0cab918682ca778dab34f8d5fe855e19f6f 100644 (file)
@@ -39,84 +39,77 @@ static int use_syslog = 0;
 
 static int debug2syslog(int l) {
        switch (l) {
-       case LDAP_LEVEL_EMERG:  return LOG_EMERG;
-       case LDAP_LEVEL_ALERT:  return LOG_ALERT;
-       case LDAP_LEVEL_CRIT:   return LOG_CRIT;
-       case LDAP_LEVEL_ERR:    return LOG_ERR;
-       case LDAP_LEVEL_WARNING:        return LOG_WARNING;
-       case LDAP_LEVEL_NOTICE: return LOG_NOTICE;
-       case LDAP_LEVEL_INFO:   return LOG_INFO;
+       case LDAP_LEVEL_EMERG: return LOG_EMERG;
+       case LDAP_LEVEL_ALERT: return LOG_ALERT;
+       case LDAP_LEVEL_CRIT: return LOG_CRIT;
+       case LDAP_LEVEL_ERR: return LOG_ERR;
+       case LDAP_LEVEL_WARNING: return LOG_WARNING;
+       case LDAP_LEVEL_NOTICE: return LOG_NOTICE;
+       case LDAP_LEVEL_INFO: return LOG_INFO;
        }
        return LOG_DEBUG;
 }
 #endif
 
-static char *lutil_levels[] = {"emergency", "alert", "critical",
-                          "error", "warning", "notice",
-                          "information", "entry", "args",
-                          "results", "detail1", "detail2",
-                          NULL};
-
-static char *lutil_subsys[LDAP_SUBSYS_NUM] = {"global","operation", "transport",
-                               "connection", "filter", "ber", 
-                               "config", "acl", "cache", "index", 
-                               "ldif", "tools", "slapd", "slurpd",
-                               "backend", "back_bdb", "back_ldbm", 
-                               "back_ldap", "back_meta", "back_mon" };
+static char *lutil_levels[] = {
+       "emergency", "alert", "critical",
+       "error", "warning", "notice",
+       "information", "entry", "args",
+       "results", "detail1", "detail2",
+       NULL };
+
+static char *lutil_subsys[LDAP_SUBSYS_NUM] = {
+       "global","operation", "transport",
+       "connection", "filter", "ber", 
+       "config", "acl", "cache", "index", 
+       "ldif", "tools", "slapd", "slurpd",
+       "backend", "back_bdb", "back_ldbm", 
+       "back_ldap", "back_meta", "back_mon" };
 
 int lutil_mnem2subsys( const char *subsys )
 {
-    int i;
-    for( i = 0; i < LDAP_SUBSYS_NUM; i++ )
-    {
-               if ( !strcasecmp( subsys, lutil_subsys[i] ) )
-               {
-               return i;
+       int i;
+       for( i = 0; i < LDAP_SUBSYS_NUM; i++ ) {
+               if ( !strcasecmp( subsys, lutil_subsys[i] ) ) {
+                       return i;
                }
-    }
-    return -1;
+       }
+       return -1;
 }
 
 void lutil_set_all_backends( int level )
 {
-    int i;
+       int i;
 
-    for( i = 0; i < LDAP_SUBSYS_NUM; i++ )
-    {
-               if ( !strncasecmp( "back_", lutil_subsys[i], strlen("back_") ) )
-               {
+       for( i = 0; i < LDAP_SUBSYS_NUM; i++ ) {
+               if ( !strncasecmp( "back_", lutil_subsys[i], strlen("back_") ) ) {
                        ldap_loglevels[i] = level;
                }
-    }
+       }
 }
 
 int lutil_mnem2level( const char *level )
 {
-    int i;
-    for( i = 0; lutil_levels[i] != NULL; i++ )
-    {
-       if ( !strcasecmp( level, lutil_levels[i] ) )
-       {
-           return i;
+       int i;
+       for( i = 0; lutil_levels[i] != NULL; i++ ) {
+               if ( !strcasecmp( level, lutil_levels[i] ) ) {
+                       return i;
+               }
        }
-    }
-    return -1;
+       return -1;
 }
 
 static int addSubsys( const char *subsys, int level )
 {
        int subsys_num;
 
-       if ( !strcasecmp( subsys, "backend" ) )
-       {
+       if ( !strcasecmp( subsys, "backend" ) ) {
                lutil_set_all_backends( level );
                return level;
-       }
-       else
-       {
+
+       } else {
                subsys_num = lutil_mnem2subsys(subsys);
-               if(subsys_num < 0)
-               {
+               if(subsys_num < 0) {
                        fprintf(stderr, _("Unknown Subsystem name [ %s ] - Discarded\n"), 
                                subsys);
                        fflush(stderr);
@@ -131,7 +124,7 @@ static int addSubsys( const char *subsys, int level )
 
 int lutil_set_debug_level( const char* subsys, int level )
 {
-    return( addSubsys( subsys, level ) );
+       return( addSubsys( subsys, level ) );
 }
 
 int lutil_debug_file( FILE *file )
@@ -157,8 +150,9 @@ void lutil_log_int(
 
        t_subsys = strdup(subsys);
        
-       for(tmp = t_subsys, i = 0; i < strlen(t_subsys); i++, tmp++)
+       for(tmp = t_subsys, i = 0; i < strlen(t_subsys); i++, tmp++) {
                *tmp = TOUPPER( (unsigned char) *tmp );
+       }
 
 #ifdef LDAP_SYSLOG
        /* we're configured to use syslog */
@@ -179,11 +173,10 @@ void lutil_log_int(
        if( log_file == NULL ) {
                log_file = fopen( LDAP_RUNDIR LDAP_DIRSEP "openldap.log", "w" );
 
-               if ( log_file == NULL )
+               if ( log_file == NULL ) {
                        log_file = fopen( "openldap.log", "w" );
-
-               if ( log_file == NULL )
-                       return;
+                       if ( log_file == NULL ) return;
+               }
 
                ber_set_option( NULL, LBER_OPT_LOG_PRINT_FILE, log_file );
        }
@@ -203,7 +196,7 @@ void lutil_log_int(
         * Stick the time in the buffer to output when using Winsock
         * as NT can't pipe to a timestamp program like Unix can.
         * This, of course, makes some logs hard to read.
-     */
+        */
        time( &now );
        today = localtime( &now );
        fprintf( file, "%4d%02d%02d:%02d:%02d:%02d ",
@@ -238,53 +231,50 @@ void lutil_log( const int subsys, int level, const char *fmt, ... )
 
 void lutil_log_initialize(int argc, char **argv)
 {
-    int i;
-    /*
-     * Start by setting the hook for the libraries to use this logging
-     * routine.
-     */
-    ber_set_option( NULL, LBER_OPT_LOG_PROC, (void*)lutil_log_int );
-
-    if ( argc == 0 ) return;
-    /*
-     * Now go through the command line options to set the debugging
-     * levels
-     */
-    for( i = 0; i < argc; i++ )
-    {
+       int i;
+       /*
+        * Start by setting the hook for the libraries to use this logging
+        * routine.
+        */
+       ber_set_option( NULL, LBER_OPT_LOG_PROC, (void*)lutil_log_int );
+
+       if ( argc == 0 ) return;
+
+       /*
+        * Now go through the command line options to set the debugging
+        * levels
+        */
+       for( i = 0; i < argc; i++ ) {
                char *next = argv[i];
        
-               if ( i < argc-1 && next[0] == '-' && next[1] == 'd' )
-               {
-                       char subsys[64];
-                       int level;
-               char *optarg = argv[i+1];
-               char *index = strchr( optarg, '=' );
-               if ( index != NULL )
-               {
+               if ( i < argc-1 && next[0] == '-' && next[1] == 'd' ) {
+                       char subsys[64];
+                       int level;
+                       char *optarg = argv[i+1];
+                       char *index = strchr( optarg, '=' );
+
+                       if ( index != NULL ) {
                                *index = 0;
                                strcpy ( subsys, optarg );
                                level = atoi( index+1 );
                                if ( level <= 0 ) level = lutil_mnem2level( index + 1 );
                                lutil_set_debug_level( subsys, level );
                                *index = '=';
-               }
-               else
-               {
+
+                       } else {
                                global_level = atoi( optarg );
                                ldap_loglevels[0] = global_level;
                                /* 
                                * if a negative number was used, make the global level the
                                * maximum sane level.
                                */
-                               if ( global_level < 0 ) 
-                               {
+                               if ( global_level < 0 ) {
                                        global_level = 65535;
                                        ldap_loglevels[0] = 65535;
-                       }
-               }
+                               }
+                       }
                }
-    }
+       }
 }
 
 void (lutil_debug)( int debug, int level, const char *fmt, ... )
@@ -292,18 +282,16 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... )
        char buffer[4096];
        va_list vl;
 
-       if ( !(level & debug ) )
-               return;
+       if ( !(level & debug ) ) return;
 
 #ifdef HAVE_WINSOCK
        if( log_file == NULL ) {
                log_file = fopen( LDAP_RUNDIR LDAP_DIRSEP "openldap.log", "w" );
 
-               if ( log_file == NULL )
+               if ( log_file == NULL ) {
                        log_file = fopen( "openldap.log", "w" );
-
-               if ( log_file == NULL )
-                       return;
+                       if ( log_file == NULL ) return;
+               }
 
                ber_set_option( NULL, LBER_OPT_LOG_PRINT_FILE, log_file );
        }
index ae0b963b033614af71f9eaf62fb267db599f3fa7..456c17e0ec9e8d1cfc6a6da13cb28ad5d2270a3e 100644 (file)
@@ -48,10 +48,11 @@ ber_get_tag( BerElement *ber )
                return LBER_DEFAULT;
        }
 
-       if ( ber->ber_ptr == ber->ber_buf )
+       if ( ber->ber_ptr == ber->ber_buf ) {
                tag = *(unsigned char *)ber->ber_ptr;
-       else
+       } else {
                tag = ber->ber_tag;
+       }
        ber->ber_ptr++;
 
        if ( (tag & LBER_BIG_TAG_MASK) != LBER_BIG_TAG_MASK ) {
@@ -118,8 +119,9 @@ ber_skip_tag( BerElement *ber, ber_len_t *len )
         * greater than what we can hold in a ber_len_t.
         */
 
-       if ( ber_read( ber, (char *) &lc, 1 ) != 1 )
+       if ( ber_read( ber, (char *) &lc, 1 ) != 1 ) {
                return LBER_DEFAULT;
+       }
 
        if ( lc & 0x80U ) {
                noctets = (lc & 0x7fU);
@@ -320,8 +322,7 @@ ber_get_stringbvl( bgbvr *b, ber_len_t *rlen )
        tag = b->ber->ber_tag;
 
        if ( ber_first_element( b->ber, &len, &last ) != LBER_DEFAULT ) {
-               for ( ; b->ber->ber_ptr < last; i++ )
-               {
+               for ( ; b->ber->ber_ptr < last; i++ ) {
                        if (ber_skip_tag( b->ber, &len ) == LBER_DEFAULT) break;
                        b->ber->ber_ptr += len;
                        b->ber->ber_tag = *(unsigned char *)b->ber->ber_ptr;
@@ -330,8 +331,7 @@ ber_get_stringbvl( bgbvr *b, ber_len_t *rlen )
 
        if ( rlen ) *rlen = i;
 
-       if ( i == 0 )
-       {
+       if ( i == 0 ) {
                *b->res.c = NULL;
                return 0;
        }
@@ -341,27 +341,26 @@ ber_get_stringbvl( bgbvr *b, ber_len_t *rlen )
        /* Allocate the result vector */
        switch (b->choice) {
        case ChArray:
-               *b->res.c = ber_memalloc_x( (n+1) * sizeof( char * ), b->ber->ber_memctx);
-               if ( *b->res.c == NULL )
-                       return LBER_DEFAULT;
+               *b->res.c = ber_memalloc_x( (n+1)*sizeof( char * ),
+                       b->ber->ber_memctx);
+               if ( *b->res.c == NULL ) return LBER_DEFAULT;
                (*b->res.c)[n] = NULL;
                break;
        case BvArray:
-               *b->res.ba = ber_memalloc_x( (n+1) * sizeof( struct berval ), b->ber->ber_memctx);
-               if ( *b->res.ba == NULL )
-                       return LBER_DEFAULT;
+               *b->res.ba = ber_memalloc_x( (n+1)*sizeof( struct berval ),
+                       b->ber->ber_memctx);
+               if ( *b->res.ba == NULL ) return LBER_DEFAULT;
                (*b->res.ba)[n].bv_val = NULL;
                break;
        case BvVec:
-               *b->res.bv = ber_memalloc_x( (n+1) * sizeof( struct berval *), b->ber->ber_memctx);
-               if ( *b->res.bv == NULL )
-                       return LBER_DEFAULT;
+               *b->res.bv = ber_memalloc_x( (n+1)*sizeof( struct berval *),
+                       b->ber->ber_memctx);
+               if ( *b->res.bv == NULL ) return LBER_DEFAULT;
                (*b->res.bv)[n] = NULL;
                break;
        case BvOff:
                *b->res.ba = ber_memalloc_x( (n+1) * b->siz, b->ber->ber_memctx );
-               if ( *b->res.ba == NULL )
-                       return LBER_DEFAULT;
+               if ( *b->res.ba == NULL ) return LBER_DEFAULT;
                ((struct berval *)((long)(*b->res.ba) + n*b->siz +
                        b->off))->bv_val = NULL;
                break;
@@ -373,8 +372,9 @@ ber_get_stringbvl( bgbvr *b, ber_len_t *rlen )
        for (n=0; n<i; n++)
        {
                tag = ber_next_element( b->ber, &len, last );
-               if ( ber_get_stringbv( b->ber, &bv, b->alloc ) == LBER_DEFAULT )
+               if ( ber_get_stringbv( b->ber, &bv, b->alloc ) == LBER_DEFAULT ) {
                        goto nomem;
+               }
 
                /* store my result */
                switch (b->choice) {
@@ -399,17 +399,23 @@ ber_get_stringbvl( bgbvr *b, ber_len_t *rlen )
                }
        }
        return tag;
+
 nomem:
-       if (b->alloc || b->choice == BvVec)
-       {
-               for (--n; n>=0; n--)
-               {
+       if (b->alloc || b->choice == BvVec) {
+               for (--n; n>=0; n--) {
                        switch(b->choice) {
-                       case ChArray: LBER_FREE((*b->res.c)[n]); break;
-                       case BvArray: LBER_FREE((*b->res.ba)[n].bv_val); break;
-                       case BvVec: LBER_FREE((*b->res.bv)[n]->bv_val);
-                               LBER_FREE((*b->res.bv)[n]); break;
-                       default: break;
+                       case ChArray:
+                               LBER_FREE((*b->res.c)[n]);
+                               break;
+                       case BvArray:
+                               LBER_FREE((*b->res.ba)[n].bv_val);
+                               break;
+                       case BvVec:
+                               LBER_FREE((*b->res.bv)[n]->bv_val);
+                               LBER_FREE((*b->res.bv)[n]);
+                               break;
+                       default:
+                               break;
                        }
                }
        }
@@ -438,12 +444,15 @@ ber_get_stringbv( BerElement *ber, struct berval *bv, int alloc )
        }
 
        if ( alloc ) {
-               if ( (bv->bv_val = (char *) ber_memalloc_x( bv->bv_len + 1, ber->ber_memctx )) == NULL ) {
+               bv->bv_val = (char *) ber_memalloc_x( bv->bv_len + 1,
+                       ber->ber_memctx );
+               if ( bv->bv_val == NULL ) {
                        return LBER_DEFAULT;
                }
 
                if ( bv->bv_len > 0 && (ber_len_t) ber_read( ber, bv->bv_val,
-                       bv->bv_len ) != bv->bv_len ) {
+                       bv->bv_len ) != bv->bv_len )
+               {
                        LBER_FREE( bv->bv_val );
                        bv->bv_val = NULL;
                        return LBER_DEFAULT;
@@ -480,7 +489,8 @@ ber_get_stringal( BerElement *ber, struct berval **bv )
        assert( ber != NULL );
        assert( bv != NULL );
 
-       *bv = (struct berval *) ber_memalloc_x( sizeof(struct berval), ber->ber_memctx );
+       *bv = (struct berval *) ber_memalloc_x( sizeof(struct berval),
+               ber->ber_memctx );
        if ( *bv == NULL ) {
                return LBER_DEFAULT;
        }
@@ -515,7 +525,8 @@ ber_get_bitstringa(
        }
        --datalen;
 
-       if ( (*buf = (char *) ber_memalloc_x( datalen, ber->ber_memctx )) == NULL ) {
+       *buf = (char *) ber_memalloc_x( datalen, ber->ber_memctx );
+       if ( *buf == NULL ) {
                return LBER_DEFAULT;
        }
 
@@ -649,8 +660,9 @@ ber_scanf ( BerElement *ber,
 #ifdef NEW_LOGGING
        LDAP_LOG( BER, ENTRY, "ber_scanf fmt (%s) ber:\n", fmt, 0, 0 );
 
-       if ( LDAP_LOGS_TEST(BER, DETAIL2 ))
+       if ( LDAP_LOGS_TEST(BER, DETAIL2 )) {
                        BER_DUMP(( "liblber", LDAP_LEVEL_DETAIL2, ber, 1 ));
+       }
 #else
        ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
                "ber_scanf fmt (%s) ber:\n", fmt );
@@ -815,13 +827,13 @@ ber_scanf ( BerElement *ber,
 
        va_end( ap );
        if ( rc == LBER_DEFAULT ) {
-           /*
-            * Error.  Reclaim malloced memory that was given to the caller.
-            * Set allocated pointers to NULL, "data length" outvalues to 0.
-            */
-           va_start( ap, fmt );
+               /*
+                * Error.  Reclaim malloced memory that was given to the caller.
+                * Set allocated pointers to NULL, "data length" outvalues to 0.
+                */
+               va_start( ap, fmt );
 
-           for ( ; fmt_reset < fmt; fmt_reset++ ) {
+               for ( ; fmt_reset < fmt; fmt_reset++ ) {
                switch ( *fmt_reset ) {
                case '!': { /* Hook */
                                BERDecodeCallback *f;
@@ -904,9 +916,9 @@ ber_scanf ( BerElement *ber,
                        /* format should be good */
                        assert( 0 );
                }
-           }
+               }
 
-           va_end( ap );
+               va_end( ap );
        }
 
        return rc;
index 5e2fecf69f710a6ed48473b3b45610713d4a5b76..3b86dc0d4f03f69262545c080e2f09c100ba8353 100644 (file)
@@ -97,20 +97,16 @@ ber_calc_lenlen( ber_len_t len )
         * with bit 8 0.
         */
 
-       if ( len <= (ber_len_t) 0x7FU )
-               return 1;
+       if ( len <= (ber_len_t) 0x7FU ) return 1;
 
        /*
         * long len otherwise - one byte with bit 8 set, giving the
         * length of the length, followed by the length itself.
         */
 
-       if ( len <= (ber_len_t) 0xffU )
-               return 2;
-       if ( len <= (ber_len_t) 0xffffU )
-               return 3;
-       if ( len <= (ber_len_t) 0xffffffU )
-               return 4;
+       if ( len <= (ber_len_t) 0xffU ) return 2;
+       if ( len <= (ber_len_t) 0xffffU ) return 3;
+       if ( len <= (ber_len_t) 0xffffffU ) return 4;
 
        return 5;
 }
@@ -149,14 +145,12 @@ ber_put_len( BerElement *ber, ber_len_t len, int nosos )
                if ( len & mask ) break;
        }
        lenlen = (unsigned char) ++i;
-       if ( lenlen > 4 )
-               return -1;
+       if ( lenlen > 4 ) return -1;
 
        lenlen |= 0x80UL;
 
        /* write the length of the length */
-       if ( ber_write( ber, &lenlen, 1, nosos ) != 1 )
-               return -1;
+       if ( ber_write( ber, &lenlen, 1, nosos ) != 1 ) return -1;
 
        for( j=0; j<i; j++) {
                netlen[(sizeof(ber_len_t)-1) - j] = (unsigned char)(len & 0xffU);
@@ -220,8 +214,9 @@ ber_put_int_or_enum(
                return -1;
        }
 
-       if ( (lenlen = ber_put_len( ber, len, 0 )) == -1 )
+       if ( (lenlen = ber_put_len( ber, len, 0 )) == -1 ) {
                return -1;
+       }
        i++;
 
        for( j=0; j<i; j++ ) {
@@ -291,7 +286,8 @@ ber_put_ostring(
                return -1;
 
        if ( (lenlen = ber_put_len( ber, len, 0 )) == -1 ||
-               (ber_len_t) ber_write( ber, str, len, 0 ) != len ) {
+               (ber_len_t) ber_write( ber, str, len, 0 ) != len )
+       {
                rc = -1;
        } else {
                /* return length of tag + length + contents */
@@ -421,9 +417,7 @@ ber_put_boolean(
 
        c = boolval ? (unsigned char) ~0U : (unsigned char) 0U;
 
-       if ( ber_write( ber, (char *) &c, 1, 0 )
-               != 1 )
-       {
+       if ( ber_write( ber, (char *) &c, 1, 0 ) != 1 ) {
                return -1;
        }
 
@@ -823,10 +817,11 @@ ber_printf( BerElement *ber, LDAP_CONST char *fmt, ... )
                        break;
                }
 
-               if ( ber->ber_usertag == 0 )
+               if ( ber->ber_usertag == 0 ) {
                        ber->ber_tag = LBER_DEFAULT;
-               else
+               } else {
                        ber->ber_usertag = 0;
+               }
        }
 
        va_end( ap );
index 25db4cdc5d66aa100c47d2201ad94ca15967ed39..31f788b159707acbcd25d72a5307ccfff5fa3d04 100644 (file)
@@ -34,11 +34,9 @@ static char* getbuf( void ) {
        char *p;
        static char buf[1024];
 
-       if ( fgets( buf, sizeof(buf), stdin ) == NULL )
-               return NULL;
+       if ( fgets( buf, sizeof(buf), stdin ) == NULL ) return NULL;
 
-       if ( (p = strchr( buf, '\n' )) != NULL )
-               *p = '\0';
+       if ( (p = strchr( buf, '\n' )) != NULL ) *p = '\0';
 
        return buf;
 }
index 65913a40961a39a14f39d6dce328e8f777b833ea..bb32aec6decad3a6286784de724692c219a58b2e 100644 (file)
@@ -72,8 +72,7 @@ ber_write(
 
        if ( nosos || ber->ber_sos == NULL ) {
                if ( ber->ber_ptr + len > ber->ber_end ) {
-                       if ( ber_realloc( ber, len ) != 0 )
-                               return( -1 );
+                       if ( ber_realloc( ber, len ) != 0 ) return( -1 );
                }
                AC_MEMCPY( ber->ber_ptr, buf, (size_t)len );
                ber->ber_ptr += len;
@@ -81,8 +80,7 @@ ber_write(
 
        } else {
                if ( ber->ber_sos->sos_ptr + len > ber->ber_end ) {
-                       if ( ber_realloc( ber, len ) != 0 )
-                               return( -1 );
+                       if ( ber_realloc( ber, len ) != 0 ) return( -1 );
                }
                AC_MEMCPY( ber->ber_sos->sos_ptr, buf, (size_t)len );
                ber->ber_sos->sos_ptr += len;
@@ -183,8 +181,7 @@ ber_free( BerElement *ber, int freebuf )
                return;
        }
 
-       if( freebuf )
-               ber_free_buf( ber );
+       if( freebuf ) ber_free_buf( ber );
 
        ber_memfree_x( (char *) ber, ber->ber_memctx );
 }
@@ -240,8 +237,7 @@ ber_flush( Sockbuf *sb, BerElement *ber, int freeit )
                ber->ber_rwptr += rc;
        } 
 
-       if ( freeit )
-               ber_free( ber, 1 );
+       if ( freeit ) ber_free( ber, 1 );
 
        return( 0 );
 }
@@ -582,22 +578,22 @@ ber_get_next(
 #endif                 
                                return LBER_DEFAULT;
                        }
-                       for (i=0; i<llen; i++)
-                       {
+                       for (i=0; i<llen; i++) {
                                tlen <<=8;
                                tlen |= *p++;
                        }
-                       ber->ber_ptr = p;
+                       ber->ber_ptr = (char *)p;
                } else {
                        tlen = *(unsigned char *)ber->ber_ptr++;
                }
 
                /* Are there leftover data bytes inside ber->ber_len? */
                if (ber->ber_ptr < (char *)&ber->ber_usertag) {
-                       if (ber->ber_rwptr < (char *)&ber->ber_usertag)
+                       if (ber->ber_rwptr < (char *)&ber->ber_usertag) {
                                sblen = ber->ber_rwptr - ber->ber_ptr;
-                       else
+                       } else {
                                sblen = (char *)&ber->ber_usertag - ber->ber_ptr;
+                       }
                        AC_MEMCPY(buf, ber->ber_ptr, sblen);
                        ber->ber_ptr += sblen;
                } else {
index c4c8d74a02b7cbba2d07487c2d1a39d26a337037..97e3dff57b61f9fb24d2bdf8f9004d57398e12d5 100644 (file)
@@ -608,8 +608,9 @@ ber_mem2bv_x(
        if ( dup ) {
                if ( (new->bv_val = ber_memalloc_x( new->bv_len+1, ctx )) == NULL ) {
                        ber_errno = LBER_ERROR_MEMORY;
-                       if ( !bv )
+                       if ( !bv ) {
                                ber_memfree_x( new, ctx );
+                       }
                        return NULL;
                }
 
@@ -692,7 +693,7 @@ ber_strndup_x( LDAP_CONST char *s, ber_len_t l, void *ctx )
        }
 
        AC_MEMCPY( p, s, len );
-       p[ len ] = '\0';
+       p[len] = '\0';
        return p;
 }
 
index 7ae2f4fe22b52a77f72bdd525c5645b77e202ab7..1a41cfb46cf88459b1d4b1fd1a42bd95accbf885 100644 (file)
@@ -15,8 +15,7 @@
 
 char *ber_pvt_wsa_err2string( int err )
 {
-       switch( err )
-       {
+       switch( err ) {
                LBER_RETSTR( WSAEINTR )
                LBER_RETSTR( WSAEBADF )
                LBER_RETSTR( WSAEACCES )
@@ -84,4 +83,4 @@ char *ber_pvt_wsa_err2string( int err )
                LBER_RETSTR( WSANO_DATA )
        }
        return "unknown WSA error";
-}
\ No newline at end of file
+}
index f59dcc13935a8179a1ceb332d3cd5013b31d5104..d2371567e706a781d6b6ecc4c063bb26967e2c18 100644 (file)
@@ -10,6 +10,8 @@
 #include <ac/stdarg.h>
 #include "lber-int.h"
 
+char ber_pvt_opt_on;   /* used to get a non-NULL address for *_OPT_ON */
+
 struct lber_options ber_int_options = {
        LBER_UNINITIALIZED, 0, 0, 0 };
 
index 62af5e3690fa7e86a3eb6ccce3015e3d88df150b..eca111a8dd8eae725e784959a5e8c0bb66edf404 100644 (file)
@@ -144,8 +144,7 @@ ber_sockbuf_ctrl( Sockbuf *sb, int opt, void *arg )
                        break;
 
                default:
-                       ret = sb->sb_iod->sbiod_io->sbi_ctrl( sb->sb_iod,
-                               opt, arg );
+                       ret = sb->sb_iod->sbiod_io->sbi_ctrl( sb->sb_iod, opt, arg );
                        break;
    }
 
@@ -182,11 +181,11 @@ ber_sockbuf_add_io( Sockbuf *sb, Sockbuf_IO *sbio, int layer, void *arg )
        memset( &d->sbiod_pvt, '\0', sizeof( d->sbiod_pvt ) );
        d->sbiod_next = p;
        *q = d;
-      
+
        if ( sbio->sbi_setup != NULL && ( sbio->sbi_setup( d, arg ) < 0 ) ) {
                return -1;
        }
-      
+
        return 0;
 }
    
@@ -360,9 +359,7 @@ ber_int_sb_close( Sockbuf *sb )
    
        p = sb->sb_iod;
        while ( p ) {
-               if ( p->sbiod_io->sbi_close &&
-                       p->sbiod_io->sbi_close( p ) < 0 )
-               {
+               if ( p->sbiod_io->sbi_close && p->sbiod_io->sbi_close( p ) < 0 ) {
                        return -1;
                }
                p = p->sbiod_next;
@@ -450,7 +447,7 @@ sb_stream_read( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len )
  * MacTCP/OpenTransport
  */
        return tcpread( sbiod->sbiod_sb->sb_fd, 0, (unsigned char *)buf,
-                  len, NULL );
+               len, NULL );
 
 #elif defined( HAVE_PCNFS ) || \
    defined( HAVE_WINSOCK ) || defined ( __BEOS__ )
@@ -814,21 +811,20 @@ sb_debug_read( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len )
        ber_slen_t              ret;
 
        ret = LBER_SBIOD_READ_NEXT( sbiod, buf, len );
-       if (sbiod->sbiod_sb->sb_debug & LDAP_DEBUG_PACKETS)
-       {
-           int err = errno;
-           if ( ret < 0 ) {
-               ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
-                       "%sread: want=%ld error=%s\n", (char *)sbiod->sbiod_pvt,
-                       (long)len, STRERROR( errno ) );
-           } else {
-               ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
-                       "%sread: want=%ld, got=%ld\n", (char *)sbiod->sbiod_pvt,
-                       (long)len, (long)ret );
-               ber_log_bprint( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
-                       (const char *)buf, ret );
-           }
-           errno = err;
+       if (sbiod->sbiod_sb->sb_debug & LDAP_DEBUG_PACKETS) {
+               int err = errno;
+               if ( ret < 0 ) {
+                       ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
+                               "%sread: want=%ld error=%s\n", (char *)sbiod->sbiod_pvt,
+                               (long)len, STRERROR( errno ) );
+               } else {
+                       ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
+                               "%sread: want=%ld, got=%ld\n", (char *)sbiod->sbiod_pvt,
+                               (long)len, (long)ret );
+                       ber_log_bprint( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
+                               (const char *)buf, ret );
+               }
+               errno = err;
        }
        return ret;
 }
@@ -839,23 +835,22 @@ sb_debug_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len )
        ber_slen_t              ret;
 
        ret = LBER_SBIOD_WRITE_NEXT( sbiod, buf, len );
-       if (sbiod->sbiod_sb->sb_debug & LDAP_DEBUG_PACKETS)
-       {
-           int err = errno;
-           if ( ret < 0 ) {
-               ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
-                       "%swrite: want=%ld error=%s\n",
-                       (char *)sbiod->sbiod_pvt, (long)len,
-                       STRERROR( errno ) );
+       if (sbiod->sbiod_sb->sb_debug & LDAP_DEBUG_PACKETS) {
+               int err = errno;
+               if ( ret < 0 ) {
+                       ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
+                               "%swrite: want=%ld error=%s\n",
+                               (char *)sbiod->sbiod_pvt, (long)len,
+                               STRERROR( errno ) );
+                       errno = err;
+               } else {
+                       ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
+                               "%swrite: want=%ld, written=%ld\n",
+                               (char *)sbiod->sbiod_pvt, (long)len, (long)ret );
+                       ber_log_bprint( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
+                               (const char *)buf, ret );
+               }
                errno = err;
-           } else {
-               ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
-                       "%swrite: want=%ld, written=%ld\n",
-                       (char *)sbiod->sbiod_pvt, (long)len, (long)ret );
-               ber_log_bprint( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
-                       (const char *)buf, ret );
-           }
-           errno = err;
        }
 
        return ret;
@@ -888,8 +883,7 @@ sb_dgram_setup( Sockbuf_IO_Desc *sbiod, void *arg )
        assert( sbiod != NULL);
        assert( SOCKBUF_VALID( sbiod->sbiod_sb ) );
 
-       if ( arg != NULL )
-               sbiod->sbiod_sb->sb_fd = *((int *)arg);
+       if ( arg != NULL ) sbiod->sbiod_sb->sb_fd = *((int *)arg);
        return 0;
 }
 
@@ -907,8 +901,7 @@ sb_dgram_read( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len )
        addrlen = sizeof( struct sockaddr );
        src = buf;
        buf += addrlen;
-       rc = recvfrom( sbiod->sbiod_sb->sb_fd, buf, len, 0, src,
-               &addrlen );
+       rc = recvfrom( sbiod->sbiod_sb->sb_fd, buf, len, 0, src, &addrlen );
 
        return rc > 0 ? rc+sizeof(struct sockaddr) : rc;
 }
@@ -928,15 +921,14 @@ sb_dgram_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len )
        len -= sizeof( struct sockaddr );
    
        rc = sendto( sbiod->sbiod_sb->sb_fd, buf, len, 0, dst,
-            sizeof( struct sockaddr ) );
+               sizeof( struct sockaddr ) );
 
-       if ( rc < 0 )
-               return -1;
+       if ( rc < 0 ) return -1;
    
        /* fake error if write was not atomic */
        if (rc < len) {
 # ifdef EMSGSIZE
-       errno = EMSGSIZE;
+               errno = EMSGSIZE;
 # endif
                return -1;
        }
index d652439fbd1c17087cd9bd7f57966031784dff86..57a743679305b489bcc77c0dedbf6a1537195897 100644 (file)
@@ -75,7 +75,7 @@ int ber_pvt_snprintf( char *str, size_t n, const char *fmt, ... )
        va_end( ap );
        return res;
 }
-#endif /* !HAVE_VSNPRINTF */
+#endif /* !HAVE_SNPRINTF */
 
 #ifdef HAVE_EBCDIC
 /* stdio replacements with ASCII/EBCDIC translation for OS/390.
@@ -128,10 +128,11 @@ int ber_pvt_vsnprintf( char *str, size_t n, const char *fmt, va_list ap )
        ptr = (char *)fmt;
        s2 = str;
        fm2[0] = '%';
-       if (n)
+       if (n) {
                end = str + n;
-       else
+       } else {
                end = NULL;
+       }
 
        for (pct = strchr(ptr, '%'); pct; pct = strchr(ptr, '%')) {
                len = pct-ptr;
@@ -145,8 +146,9 @@ int ber_pvt_vsnprintf( char *str, size_t n, const char *fmt, va_list ap )
                if (len < pct-ptr) return -1;
                for (pct++, f2 = fm2+1; isdigit(*pct);) *f2++ = *pct++;
                if (*pct == 'l') *f2++ = *pct++;
-               if (*pct == '%') *s2++ = '%';
-               else {
+               if (*pct == '%') {
+                       *s2++ = '%';
+               } else {
                        *f2++ = *pct;
                        *f2 = '\0';
                        if (*pct == 's') {
@@ -166,8 +168,9 @@ int ber_pvt_vsnprintf( char *str, size_t n, const char *fmt, va_list ap )
                                } else {
                                        s2 += sprintf(s2, fm2, ss);
                                }
-                       } else
+                       } else {
                                s2 += sprintf(s2, fm2, va_arg(ap, int));
+                       }
                }
                ptr = pct + 1;
        }
index f9de18aa8665dd297b91fd7ec8d6bf44c7e64773..48843350092a6314e77b495c628bb44744e3ea24 100644 (file)
@@ -9,6 +9,10 @@
  *
  *  abandon.c
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /*
  * An abandon request looks like this:
index 383c7da49f6e5ef7af09de13494843fb3c622fac..73018ff44461f072d81d5e5125d4ab3eaa7c47aa 100644 (file)
@@ -9,6 +9,10 @@
  *
  *  add.c
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /*
  * An add request looks like this:
index 04ba176d28e64813351a1bc04b8bc7c6adfacb38..e9637c48e91c5336d40a4f9b82e51d3d9ce1e162 100644 (file)
@@ -9,6 +9,10 @@
  *
  *  bind.c
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /*
  *     BindRequest ::= SEQUENCE {
index c2543623c8a8714c3dd4d2c5dcb6279c4cd92db9..e0fe80dd38fc126255de542345028af2e4e87034 100644 (file)
@@ -9,6 +9,10 @@
  *
  *  compare.c
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /* The compare request looks like this:
  *     CompareRequest ::= SEQUENCE {
index 88ee4c9196ee5bd98a7acb512dc8ef20e92c9bec..d61be4e43641df908ba0f9469385a437c1a90fef 100644 (file)
@@ -3,6 +3,10 @@
  * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /* LDAPv3 Controls (RFC2251)
  *
index bf4d839e4420bf27e4bd2477b4604f77fab48044..baf0d1b1d98987af7eecc413c1ad4068046db0e7 100644 (file)
@@ -57,22 +57,29 @@ int ldap_int_sasl_init( void )
        };
 
 #ifdef HAVE_SASL_VERSION
-#define SASL_BUILD_VERSION ((SASL_VERSION_MAJOR << 24) |\
-       (SASL_VERSION_MINOR << 16) | SASL_VERSION_STEP)
-
+       /* stringify the version number, sasl.h doesn't do it for us */
+#define VSTR0(maj, min, pat)   #maj "." #min "." #pat
+#define VSTR(maj, min, pat)    VSTR0(maj, min, pat)
+#define SASL_VERSION_STRING    VSTR(SASL_VERSION_MAJOR, SASL_VERSION_MINOR, \
+                               SASL_VERSION_STEP)
        { int rc;
        sasl_version( NULL, &rc );
        if ( ((rc >> 16) != ((SASL_VERSION_MAJOR << 8)|SASL_VERSION_MINOR)) ||
                (rc & 0xffff) < SASL_VERSION_STEP) {
+               char version[sizeof("xxx.xxx.xxxxx")];
+               sprintf( version, "%d.%d.%d", rc >> 24, rc >> 16 * 0xff,
+                       rc & 0xffff );
 
 #ifdef NEW_LOGGING
                LDAP_LOG( TRANSPORT, INFO,
-               "ldap_int_sasl_init: SASL version mismatch, got %x, wanted %x.\n",
-                       rc, SASL_BUILD_VERSION, 0 );
+               "ldap_int_sasl_init: SASL library version mismatch:"
+               " expected " SASL_VERSION_STRING ","
+               " got %s\n", version, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ANY,
-               "ldap_int_sasl_init: SASL version mismatch, got %x, wanted %x.\n",
-                       rc, SASL_BUILD_VERSION, 0 );
+               "ldap_int_sasl_init: SASL library version mismatch:"
+               " expected " SASL_VERSION_STRING ","
+               " got %s\n", version, 0, 0 );
 #endif
                return -1;
        }
@@ -146,6 +153,9 @@ sb_sasl_setup( Sockbuf_IO_Desc *sbiod, void *arg )
        }
        sasl_getprop( p->sasl_context, SASL_MAXOUTBUF,
                (SASL_CONST void **) &p->sasl_maxbuf );
+           
+       if ( p->sasl_maxbuf == 0 )
+               p->sasl_maxbuf = SASL_MAX_BUFF_SIZE;
 
        sbiod->sbiod_pvt = p;
 
index 8d6e482693302f8ca1abc7e65902e78ca7e2503d..70ad60e3132122fe422ed332e737d5615d28f063 100644 (file)
@@ -9,6 +9,10 @@
  *
  *  delete.c
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /*
  * A delete request looks like this:
index 464b9e5172ce3877669cec5c75db24f977d53b93..e4359eca4f1b9ac89e512b77bf371276f572b275 100644 (file)
@@ -3,6 +3,10 @@
  * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 #include "portable.h"
 
@@ -93,14 +97,14 @@ static struct ldaperror ldap_builtin_errlist[] = {
        {LDAP_CLIENT_LOOP,                              N_("Client Loop")},
        {LDAP_REFERRAL_LIMIT_EXCEEDED,  N_("Referral Limit Exceeded")},
 
-#ifdef LDAP_CLIENT_UPDATE
-       {LDAP_CUP_RESOURCES_EXHAUSTED,  N_("Client Update Resource Exhausted")},
-       {LDAP_CUP_SECURITY_VIOLATION,   N_("Client Update Security Violation")},
-       {LDAP_CUP_INVALID_COOKIE,               N_("Client Update Invalid Cookie")},
-       {LDAP_CUP_UNSUPPORTED_SCHEME,   N_("Client Update Unsupported Scheme")},
-       {LDAP_CUP_CLIENT_DISCONNECT,    N_("Client Update Client Disconnect")},
-       {LDAP_CUP_RELOAD_REQUIRED,              N_("Client Update Reload Required")},
-#endif
+       {LDAP_ASSERTION_FAILED,                 N_("Assertion Failed")},
+
+       {LDAP_SYNC_RESOURCES_EXHAUSTED, N_("Content Sync Resource Exhausted")},
+       {LDAP_SYNC_SECURITY_VIOLATION,  N_("Content Sync Security Violation")},
+       {LDAP_SYNC_INVALID_COOKIE,              N_("Content Sync Invalid Cookie")},
+       {LDAP_SYNC_UNSUPPORTED_SCHEME,  N_("Content Sync Unsupported Scheme")},
+       {LDAP_SYNC_CLIENT_DISCONNECT,   N_("Content Sync Client Disconnect")},
+       {LDAP_SYNC_RELOAD_REQUIRED,             N_("Content Sync Reload Required")},
 
 #ifdef LDAP_EXOP_X_CANCEL
        {LDAP_CANCELLED,                                N_("Cancelled")},
index 4fd921dd607c25d069bfffc0dcfd74dbabd986d5..61b62f53fba5904fb71c54da1d76a34ac82377b1 100644 (file)
@@ -3,6 +3,10 @@
  * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /*
  * LDAPv3 Extended Operation Request
index 912bf20c28f9710f3440348fb0c2a8de32f6cc87..163c3b0305f24911a546aa6668ad927b4a8acf70 100644 (file)
@@ -9,6 +9,10 @@
  *
  *  search.c
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 #include "portable.h"
 
index 587eb48a47529daeffaddb38d3d032dbb04e5c5f..6171b7b57f1d2ca7e65a3f226b8692fbb2fbb467 100644 (file)
@@ -9,6 +9,10 @@
  *
  *  kbind.c
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /*
  *     BindRequest ::= SEQUENCE {
index 790b72789536db1a1f2eff7524f45c3536ee9e35..1ba930d1e57cf1194911e40976033385b762c09d 100644 (file)
@@ -58,6 +58,9 @@
 #include "ldap_log.h"
 
 #undef Debug
+
+#ifdef LDAP_DEBUG
+
 #define Debug( level, fmt, arg1, arg2, arg3 ) \
        do { if ( ldap_debug & level ) \
        ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) ); \
 #define LDAP_Debug( subsystem, level, fmt, arg1, arg2, arg3 )\
        ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) )
 
+#else
+
+#define Debug( level, fmt, arg1, arg2, arg3 )                 ((void)0)
+#define LDAP_Debug( subsystem, level, fmt, arg1, arg2, arg3 ) ((void)0)
+
+#endif /* LDAP_DEBUG */
+
 #include "ldap.h"
 
 #include "ldap_pvt.h"
index 659a6dd23baf36dc772b772ef2fd77cdd918609a..7704737209159b70436dd99239229da53ff96737 100644 (file)
@@ -9,6 +9,10 @@
  *
  *  modify.c
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 #include "portable.h"
 
@@ -37,7 +41,9 @@
  * Example:
  *     LDAPMod *mods[] = { 
  *                     { LDAP_MOD_ADD, "cn", { "babs jensen", "babs", 0 } },
- *                     { LDAP_MOD_REPLACE, "sn", { "jensen", 0 } },
+ *                     { LDAP_MOD_REPLACE, "sn", { "babs jensen", "babs", 0 } },
+ *                     { LDAP_MOD_DELETE, "ou", 0 },
+ *                     { LDAP_MOD_INCREMENT, "uidNumber, { "1", 0 } }
  *                     0
  *             }
  *     rc=  ldap_modify_ext( ld, dn, mods, sctrls, cctrls, &msgid );
@@ -61,8 +67,9 @@ ldap_modify_ext( LDAP *ld,
         *              modifications   SEQUENCE OF SEQUENCE {
         *                      operation       ENUMERATED {
         *                              add     (0),
-        *                              delete  (1),
-        *                              replace (2)
+        *                              delete (1),
+        *                              replace (2),
+        *                              increment (3) -- extension
         *                      },
         *                      modification    SEQUENCE {
         *                              type    AttributeType,
@@ -151,7 +158,9 @@ ldap_modify_ext( LDAP *ld,
  * Example:
  *     LDAPMod *mods[] = { 
  *                     { LDAP_MOD_ADD, "cn", { "babs jensen", "babs", 0 } },
- *                     { LDAP_MOD_REPLACE, "sn", { "jensen", 0 } },
+ *                     { LDAP_MOD_REPLACE, "sn", { "babs jensen", "babs", 0 } },
+ *                     { LDAP_MOD_DELETE, "ou", 0 },
+ *                     { LDAP_MOD_INCREMENT, "uidNumber, { "1", 0 } }
  *                     0
  *             }
  *     msgid = ldap_modify( ld, dn, mods );
index 4f59a09df25060bf57b4dd2f627a0ff2ea3a50f2..42b2dd735137f651b5994708f88341a14672198b 100644 (file)
  * without restriction or fee of any kind as long as this notice
  * is preserved.
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /*
  * A modify rdn request looks like this:
index 5d097e415ffb2c80f692b3c732655d9d56bab88d..57195918db1ef1a4f12fa1161cd68ada0155658a 100644 (file)
@@ -52,11 +52,19 @@ int ldap_int_inet4or6 = AF_INET;
  * ftp://koobera.math.uic.edu/www/docs/connect.html.
  */
 
+#ifdef LDAP_DEBUG
+
 #define osip_debug(ld,fmt,arg1,arg2,arg3) \
 do { \
        ldap_log_printf(NULL, LDAP_DEBUG_TRACE, fmt, arg1, arg2, arg3); \
 } while(0)
 
+#else
+
+#define osip_debug(ld,fmt,arg1,arg2,arg3) ((void)0)
+
+#endif /* LDAP_DEBUG */
+
 static void
 ldap_pvt_set_errno(int err)
 {
index 66386abe12afd96d1988310e9ac4e9a22375f7ea..0210e44ae69be6d137702ee109e0c1b157d683b5 100644 (file)
 
 /* int ldap_int_tblsize = 0; */
 
+#ifdef LDAP_DEBUG
+
 #define oslocal_debug(ld,fmt,arg1,arg2,arg3) \
 do { \
        ldap_log_printf(ld, LDAP_DEBUG_TRACE, fmt, arg1, arg2, arg3); \
 } while(0)
 
+#else
+
+#define oslocal_debug(ld,fmt,arg1,arg2,arg3) ((void)0)
+
+#endif /* LDAP_DEBUG */
+
 static void
 ldap_pvt_set_errno(int err)
 {
index e228ba8ced28d929cbc3cc384bec0325ea480483..84a2ed4ac2e856c8dc8e9a1d0873d821c00f6318 100644 (file)
@@ -14,7 +14,7 @@
 #include "ldap-int.h"
 
 /*
- * LDAP Password Modify (Extended) Operation <RFC 3???>
+ * LDAP Password Modify (Extended) Operation <RFC 3062>
  */
 
 int ldap_parse_passwd(
index f326074e2d63b44ea818b44c413ec05a4ecfb40a..a5a9a7ab35e549e5d88c1f0a55f3ef3d07da38cb 100644 (file)
  * can be found in the file "build/LICENSE-2.0.1" in this distribution
  * of OpenLDAP Software.
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /*
  * LDAPv3 (RFC2251)
index 28802c868feb971fa2cf0d46f69682a8c14103b0..1509ccd3b18a1538e335d183099adc260ceea487 100644 (file)
@@ -3,6 +3,10 @@
  * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /*
  *     BindRequest ::= SEQUENCE {
@@ -439,26 +443,26 @@ ldap_sasl_interactive_bind_s(
                 * ask all the time. No, we don't ever actually bind, but I'll
                 * let the final bind handler take care of saving the cdn.
                 */
-               rc = ldap_simple_bind(ld, dn, NULL);
-               return rc < 0 ? rc : 0;
+               rc = ldap_simple_bind( ld, dn, NULL );
+               rc = rc < 0 ? rc : 0;
+               goto done;
        } else
 #endif
        if( mechs == NULL || *mechs == '\0' ) {
                char *smechs;
 
                rc = ldap_pvt_sasl_getmechs( ld, &smechs );
-
                if( rc != LDAP_SUCCESS ) {
                        goto done;
                }
 
 #ifdef NEW_LOGGING
                LDAP_LOG ( TRANSPORT, DETAIL1, 
-                       "ldap_interactive_sasl_bind_s: server supports: %s\n", 
+                       "ldap_sasl_interactive_bind_s: server supports: %s\n", 
                        smechs, 0, 0 );
 #else
                Debug( LDAP_DEBUG_TRACE,
-                       "ldap_interactive_sasl_bind_s: server supports: %s\n",
+                       "ldap_sasl_interactive_bind_s: server supports: %s\n",
                        smechs, 0, 0 );
 #endif
 
@@ -467,10 +471,11 @@ ldap_sasl_interactive_bind_s(
        } else {
 #ifdef NEW_LOGGING
                LDAP_LOG ( TRANSPORT, DETAIL1, 
-                       "ldap_interactive_sasl_bind_s: user selected: %s\n", mechs, 0, 0 );
+                       "ldap_sasl_interactive_bind_s: user selected: %s\n",
+                       mechs, 0, 0 );
 #else
                Debug( LDAP_DEBUG_TRACE,
-                       "ldap_interactive_sasl_bind_s: user selected: %s\n",
+                       "ldap_sasl_interactive_bind_s: user selected: %s\n",
                        mechs, 0, 0 );
 #endif
        }
index cec3af36d7a838a8ba2f1dc3571f65909172aa40..62cc0493af7c6d5529268d5544311c6ab7672dfe 100644 (file)
@@ -9,6 +9,10 @@
  *
  *  sbind.c
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /*
  *     BindRequest ::= SEQUENCE {
index 56c45c2eed17cd222a1c3726a93c5ea5e1024941..8f53c684d02b9da809a52a369240957009410cc1 100644 (file)
@@ -77,7 +77,7 @@ ldap_search_ext(
 
        /*
         * if timeout is provided, both tv_sec and tv_usec must
-        * be non-zero
+        * not be zero
         */
        if( timeout != NULL ) {
                if( timeout->tv_sec == 0 && timeout->tv_usec == 0 ) {
index 8079b0549fb709661d86bde8383d76a8348d4216..184573049d7cf35109baaffcac510772546d8208 100644 (file)
  * can be found in the file "build/LICENSE-2.0.1" in this distribution
  * of OpenLDAP Software.
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 #include "portable.h"
 
index 76938f385f4f10eac2113d8db1dc2a00eeaaad68..40cd5e8d102e8d5a01764baeea435740773565d1 100644 (file)
@@ -9,6 +9,10 @@
  *
  *  unbind.c
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 /* An Unbind Request looks like this:
  *
index f97fe9efbbc23c8fd7fb77f341401764f1532d5d..c1bca85527fe83628a1abdc9bab3c0ab52ad4062 100644 (file)
@@ -3,6 +3,11 @@
  * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
+/*
+ * Portions Copyright (C) The Internet Society (1998)
+ * UTF-8 encodings are derived from those in RFC 2279;
+ * see RFC for full legal notices.
+ */
 
 /*
  * Basic UTF-8 routines
index a4b10cec056912bee721151084ca7efd3d11397b..033adcf143734db7d9b6fded87741b14143fc610 100644 (file)
  * can be found in the file "build/LICENSE-2.0.1" in this distribution
  * of OpenLDAP Software.
  */
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
 
 #include "portable.h"
 
index cae3085ff9f18450dfb83c45eb0816a7819591bd..1e78ae1b5d61d3cff1309f618fa57a3bdc77184d 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <ac/bytes.h>
 
-#include <lber.h>
+#include "lber_pvt.h"
 #include "ucdata.h"
 
 /**************************************************************************
index 53b1ed349f01ee6d00acae2f925f6dd13828d9ed..a8c65df8616e8de76045f0ad346dd01837e7eb69 100644 (file)
@@ -10,7 +10,7 @@
 #include <ac/string.h>
 #include <ac/stdlib.h>
 
-#include <lber.h>
+#include <lber_pvt.h>
 
 #include <ldap_utf8.h>
 #include <ldap_pvt_uc.h>
@@ -102,10 +102,11 @@ struct berval * UTF8bvnormalize(
        char *out, *outtmp, *s;
        unsigned long *ucs, *p, *ucsout;
 
+       static unsigned char mask[] = {
+               0, 0x7f, 0x1f, 0x0f, 0x07, 0x03, 0x01 };
+
        unsigned casefold = flags & LDAP_UTF8_CASEFOLD;
        unsigned approx = flags & LDAP_UTF8_APPROX;
-       static unsigned char mask[] = {
-                0, 0x7f, 0x1f, 0x0f, 0x07, 0x03, 0x01 };
 
        if ( bv == NULL ) {
                return NULL;
@@ -118,9 +119,9 @@ struct berval * UTF8bvnormalize(
                return ber_dupbv_x( newbv, bv, ctx );
        }
        
-       /* FIXME: Should first check to see if string is already in
-        * proper normalized form. This is almost as time consuming
-        * as the normalization though.
+       /* Should first check to see if string is already in proper
+        * normalized form. This is almost as time consuming as
+        * the normalization though.
         */
 
        /* finish off everything up to character before first non-ascii */
@@ -137,7 +138,7 @@ struct berval * UTF8bvnormalize(
                                out[outpos++] = TOLOWER( s[i-1] );
                        }
                        if ( i == len ) {
-                               out[outpos++] = TOLOWER( s[len - 1] );
+                               out[outpos++] = TOLOWER( s[len-1] );
                                out[outpos] = '\0';
                                return ber_str2bv( out, outpos, 0, newbv);
                        }
@@ -176,7 +177,7 @@ struct berval * UTF8bvnormalize(
 
        /* convert character before first non-ascii to ucs-4 */
        if ( i > 0 ) {
-               *p = casefold ? TOLOWER( s[i - 1] ) : s[i - 1];
+               *p = casefold ? TOLOWER( s[i-1] ) : s[i-1];
                p++;
        }
 
@@ -211,7 +212,7 @@ struct berval * UTF8bvnormalize(
                                *p = uctolower( *p );
                        }
                        p++;
-                }
+               }
                /* normalize ucs of length p - ucs */
                uccompatdecomp( ucs, p - ucs, &ucsout, &ucsoutlen, ctx );
                if ( approx ) {
@@ -256,14 +257,15 @@ struct berval * UTF8bvnormalize(
                        out[outpos++] = casefold ? TOLOWER( s[i-1] ) : s[i-1];
                }
                if ( i == len ) {
-                       out[outpos++] = casefold ? TOLOWER( s[len - 1] ) : s[len - 1];
+                       out[outpos++] = casefold ? TOLOWER( s[len-1] ) : s[len-1];
                        break;
                }
 
                /* convert character before next non-ascii to ucs-4 */
-               *ucs = casefold ? TOLOWER( s[i - 1] ) : s[i - 1];
+               *ucs = casefold ? TOLOWER( s[i-1] ) : s[i-1];
                p = ucs + 1;
-       }               
+       }
+
        free( ucs );
        out[outpos] = '\0';
        return ber_str2bv( out, outpos, 0, newbv );
@@ -280,12 +282,14 @@ int UTF8bvnormcmp(
        int i, l1, l2, len, ulen, res = 0;
        char *s1, *s2, *done;
        unsigned long *ucs, *ucsout1, *ucsout2;
+
        unsigned casefold = flags & LDAP_UTF8_CASEFOLD;
        unsigned norm1 = flags & LDAP_UTF8_ARG1NFC;
        unsigned norm2 = flags & LDAP_UTF8_ARG2NFC;
 
        if (bv1 == NULL) {
                return bv2 == NULL ? 0 : -1;
+
        } else if (bv2 == NULL) {
                return 1;
        }
@@ -306,7 +310,7 @@ int UTF8bvnormcmp(
                if (casefold) {
                        char c1 = TOLOWER(*s1);
                        char c2 = TOLOWER(*s2);
-                       res = c1 - c2;
+                       res = c1 - c2;
                } else {
                        res = *s1 - *s2;
                }                       
@@ -319,7 +323,8 @@ int UTF8bvnormcmp(
                                        break;
                                }
                        } else if (((len < l1) && !LDAP_UTF8_ISASCII(s1)) ||
-                                  ((len < l2) && !LDAP_UTF8_ISASCII(s2))) {
+                               ((len < l2) && !LDAP_UTF8_ISASCII(s2)))
+                       {
                                break;
                        }
                        return res;
@@ -346,10 +351,9 @@ int UTF8bvnormcmp(
                l2 -= i - 1;
        }
                        
-       /* FIXME: Should first check to see if strings are already in
+       /* Should first check to see if strings are already in
         * proper normalized form.
         */
-
        ucs = malloc( ( ( norm1 || l1 > l2 ) ? l1 : l2 ) * sizeof(*ucs) );
        if ( ucs == NULL ) {
                return l1 > l2 ? 1 : -1; /* what to do??? */
@@ -362,11 +366,11 @@ int UTF8bvnormcmp(
        
        /* convert and normalize 1st string */
        for ( i = 0, ulen = 0; i < l1; i += len, ulen++ ) {
-                ucs[ulen] = ldap_x_utf8_to_ucs4( s1 + i );
-                if ( ucs[ulen] == LDAP_UCS4_INVALID ) {
+               ucs[ulen] = ldap_x_utf8_to_ucs4( s1 + i );
+               if ( ucs[ulen] == LDAP_UCS4_INVALID ) {
                        free( ucs );
-                        return -1; /* what to do??? */
-                }
+                       return -1; /* what to do??? */
+               }
                len = LDAP_UTF8_CHARLEN( s1 + i );
        }
 
@@ -384,12 +388,12 @@ int UTF8bvnormcmp(
 
        /* convert and normalize 2nd string */
        for ( i = 0, ulen = 0; i < l2; i += len, ulen++ ) {
-                ucs[ulen] = ldap_x_utf8_to_ucs4( s2 + i );
-                if ( ucs[ulen] == LDAP_UCS4_INVALID ) {
+               ucs[ulen] = ldap_x_utf8_to_ucs4( s2 + i );
+               if ( ucs[ulen] == LDAP_UCS4_INVALID ) {
                        free( ucsout1 );
                        free( ucs );
-                        return 1; /* what to do??? */
-                }
+                       return 1; /* what to do??? */
+               }
                len = LDAP_UTF8_CHARLEN( s2 + i );
        }
 
index 788bc30833fd12404ad6b54cabe6ea80227df1df..9fd2e2ecd455c8cbd5efca80c6e1432c44c7a550 100644 (file)
@@ -4,11 +4,10 @@
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*
-       getopt.c
-
-       modified public-domain AT&T getopt(3)
-       modified by Kurt Zeilenga for inclusion into OpenLDAP
-*/
+ * getopt.c
+ * modified public-domain AT&T getopt(3)
+ * modified by Kurt Zeilenga for inclusion into OpenLDAP
+ */
 
 #include "portable.h"
 
index f3a727d150bcf18e5acde5b34372cbb90fd98c8b..737a1e2562241d12dbf234d7ef9ccdece83b08a8 100644 (file)
@@ -624,16 +624,129 @@ static int chk_md5(
 }
 
 #ifdef SLAPD_LMHASH
+/* pseudocode from RFC2433
+ * A.2 LmPasswordHash()
+ * 
+ *    LmPasswordHash(
+ *    IN  0-to-14-oem-char Password,
+ *    OUT 16-octet         PasswordHash )
+ *    {
+ *       Set UcasePassword to the uppercased Password
+ *       Zero pad UcasePassword to 14 characters
+ * 
+ *       DesHash( 1st 7-octets of UcasePassword,
+ *                giving 1st 8-octets of PasswordHash )
+ * 
+ *       DesHash( 2nd 7-octets of UcasePassword,
+ *                giving 2nd 8-octets of PasswordHash )
+ *    }
+ * 
+ * 
+ * A.3 DesHash()
+ * 
+ *    DesHash(
+ *    IN  7-octet Clear,
+ *    OUT 8-octet Cypher )
+ *    {
+ *        *
+ *        * Make Cypher an irreversibly encrypted form of Clear by
+ *        * encrypting known text using Clear as the secret key.
+ *        * The known text consists of the string
+ *        *
+ *        *              KGS!@#$%
+ *        *
+ * 
+ *       Set StdText to "KGS!@#$%"
+ *       DesEncrypt( StdText, Clear, giving Cypher )
+ *    }
+ * 
+ * 
+ * A.4 DesEncrypt()
+ * 
+ *    DesEncrypt(
+ *    IN  8-octet Clear,
+ *    IN  7-octet Key,
+ *    OUT 8-octet Cypher )
+ *    {
+ *        *
+ *        * Use the DES encryption algorithm [4] in ECB mode [9]
+ *        * to encrypt Clear into Cypher such that Cypher can
+ *        * only be decrypted back to Clear by providing Key.
+ *        * Note that the DES algorithm takes as input a 64-bit
+ *        * stream where the 8th, 16th, 24th, etc.  bits are
+ *        * parity bits ignored by the encrypting algorithm.
+ *        * Unless you write your own DES to accept 56-bit input
+ *        * without parity, you will need to insert the parity bits
+ *        * yourself.
+ *        *
+ *    }
+ */
+
+static void lmPasswd_to_key(
+       const unsigned char *lmPasswd,
+       des_cblock *key)
+{
+       /* make room for parity bits */
+       ((char *)key)[0] = lmPasswd[0];
+       ((char *)key)[1] = ((lmPasswd[0]&0x01)<<7) | (lmPasswd[1]>>1);
+       ((char *)key)[2] = ((lmPasswd[1]&0x03)<<6) | (lmPasswd[2]>>2);
+       ((char *)key)[3] = ((lmPasswd[2]&0x07)<<5) | (lmPasswd[3]>>3);
+       ((char *)key)[4] = ((lmPasswd[3]&0x0F)<<4) | (lmPasswd[4]>>4);
+       ((char *)key)[5] = ((lmPasswd[4]&0x1F)<<3) | (lmPasswd[5]>>5);
+       ((char *)key)[6] = ((lmPasswd[5]&0x3F)<<2) | (lmPasswd[6]>>6);
+       ((char *)key)[7] = ((lmPasswd[6]&0x7F)<<1);
+               
+       des_set_odd_parity( key );
+}      
+
 static int chk_lanman(
        const struct berval *scheme,
        const struct berval *passwd,
        const struct berval *cred,
        const char **text )
 {
-       struct berval *hash;
-
-       hash = hash_lanman( scheme, cred );
-       return memcmp( &hash->bv_val[scheme->bv_len], passwd->bv_val, 32);
+       int i;
+       char UcasePassword[15];
+       des_cblock key;
+       des_key_schedule schedule;
+       des_cblock StdText = "KGS!@#$%";
+       des_cblock PasswordHash1, PasswordHash2;
+       char PasswordHash[33], storedPasswordHash[33];
+       
+       for( i=0; i<cred->bv_len; i++) {
+               if(cred->bv_val[i] == '\0') {
+                       return -1;      /* NUL character in password */
+               }
+       }
+       
+       if( cred->bv_val[i] != '\0' ) {
+               return -1;      /* passwd must behave like a string */
+       }
+       
+       strncpy( UcasePassword, cred->bv_val, 14 );
+       UcasePassword[14] = '\0';
+       ldap_pvt_str2upper( UcasePassword );
+       
+       lmPasswd_to_key( UcasePassword, &key );
+       des_set_key_unchecked( &key, schedule );
+       des_ecb_encrypt( &StdText, &PasswordHash1, schedule , DES_ENCRYPT );
+       
+       lmPasswd_to_key( &UcasePassword[7], &key );
+       des_set_key_unchecked( &key, schedule );
+       des_ecb_encrypt( &StdText, &PasswordHash2, schedule , DES_ENCRYPT );
+       
+       sprintf( PasswordHash, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", 
+               PasswordHash1[0],PasswordHash1[1],PasswordHash1[2],PasswordHash1[3],
+               PasswordHash1[4],PasswordHash1[5],PasswordHash1[6],PasswordHash1[7],
+               PasswordHash2[0],PasswordHash2[1],PasswordHash2[2],PasswordHash2[3],
+               PasswordHash2[4],PasswordHash2[5],PasswordHash2[6],PasswordHash2[7] );
+       
+       /* as a precaution convert stored password hash to lower case */
+       strncpy( storedPasswordHash, passwd->bv_val, 32 );
+       storedPasswordHash[32] = '\0';
+       ldap_pvt_str2lower( storedPasswordHash );
+       
+       return memcmp( PasswordHash, storedPasswordHash, 32) ? 1 : 0;
 }
 #endif /* SLAPD_LMHASH */
 
@@ -646,9 +759,13 @@ static int chk_ns_mta_md5(
 {
        lutil_MD5_CTX MD5context;
        unsigned char MD5digest[LUTIL_MD5_BYTES], c;
-       char buffer[LUTIL_MD5_BYTES + LUTIL_MD5_BYTES + 1];
+       char buffer[LUTIL_MD5_BYTES*2];
        int i;
 
+       if( passwd.bv_len != LUTIL_MD5_BYTES*2 ) {
+               return 1;
+       }
+
        /* hash credentials with salt */
        lutil_MD5Init(&MD5context);
        lutil_MD5Update(&MD5context,
@@ -681,8 +798,8 @@ static int chk_ns_mta_md5(
        }
 
        /* compare */
-       return memcmp((char *)passwd->bv_val, (char *)buffer, sizeof(buffer))
-               ? 1 : 0;
+       return memcmp((char *)passwd->bv_val,
+               (char *)buffer, sizeof(buffer)) ? 1 : 0;
 }
 #endif
 
@@ -1142,81 +1259,6 @@ static struct berval *hash_md5(
 }
 
 #ifdef SLAPD_LMHASH 
-/* pseudocode from RFC2433
- * A.2 LmPasswordHash()
- * 
- *    LmPasswordHash(
- *    IN  0-to-14-oem-char Password,
- *    OUT 16-octet         PasswordHash )
- *    {
- *       Set UcasePassword to the uppercased Password
- *       Zero pad UcasePassword to 14 characters
- * 
- *       DesHash( 1st 7-octets of UcasePassword,
- *                giving 1st 8-octets of PasswordHash )
- * 
- *       DesHash( 2nd 7-octets of UcasePassword,
- *                giving 2nd 8-octets of PasswordHash )
- *    }
- * 
- * 
- * A.3 DesHash()
- * 
- *    DesHash(
- *    IN  7-octet Clear,
- *    OUT 8-octet Cypher )
- *    {
- *        *
- *        * Make Cypher an irreversibly encrypted form of Clear by
- *        * encrypting known text using Clear as the secret key.
- *        * The known text consists of the string
- *        *
- *        *              KGS!@#$%
- *        *
- * 
- *       Set StdText to "KGS!@#$%"
- *       DesEncrypt( StdText, Clear, giving Cypher )
- *    }
- * 
- * 
- * A.4 DesEncrypt()
- * 
- *    DesEncrypt(
- *    IN  8-octet Clear,
- *    IN  7-octet Key,
- *    OUT 8-octet Cypher )
- *    {
- *        *
- *        * Use the DES encryption algorithm [4] in ECB mode [9]
- *        * to encrypt Clear into Cypher such that Cypher can
- *        * only be decrypted back to Clear by providing Key.
- *        * Note that the DES algorithm takes as input a 64-bit
- *        * stream where the 8th, 16th, 24th, etc.  bits are
- *        * parity bits ignored by the encrypting algorithm.
- *        * Unless you write your own DES to accept 56-bit input
- *        * without parity, you will need to insert the parity bits
- *        * yourself.
- *        *
- *    }
- */
-
-static void lmPasswd_to_key(
-       const unsigned char *lmPasswd,
-       des_cblock *key)
-{
-       /* make room for parity bits */
-       ((char *)key)[0] = lmPasswd[0];
-       ((char *)key)[1] = ((lmPasswd[0]&0x01)<<7) | (lmPasswd[1]>>1);
-       ((char *)key)[2] = ((lmPasswd[1]&0x03)<<6) | (lmPasswd[2]>>2);
-       ((char *)key)[3] = ((lmPasswd[2]&0x07)<<5) | (lmPasswd[3]>>3);
-       ((char *)key)[4] = ((lmPasswd[3]&0x0F)<<4) | (lmPasswd[4]>>4);
-       ((char *)key)[5] = ((lmPasswd[4]&0x1F)<<3) | (lmPasswd[5]>>5);
-       ((char *)key)[6] = ((lmPasswd[5]&0x3F)<<2) | (lmPasswd[6]>>6);
-       ((char *)key)[7] = ((lmPasswd[6]&0x7F)<<1);
-               
-       des_set_odd_parity( key );
-}      
-
 static struct berval *hash_lanman(
        const struct berval *scheme,
        const struct berval *passwd,
@@ -1228,8 +1270,8 @@ static struct berval *hash_lanman(
        des_cblock key;
        des_key_schedule schedule;
        des_cblock StdText = "KGS!@#$%";
-       des_cblock hash1, hash2;
-       char lmhash[33];
+       des_cblock PasswordHash1, PasswordHash2;
+       char PasswordHash[33];
        struct berval hash;
        
        for( i=0; i<passwd->bv_len; i++) {
@@ -1248,17 +1290,19 @@ static struct berval *hash_lanman(
        
        lmPasswd_to_key( UcasePassword, &key );
        des_set_key_unchecked( &key, schedule );
-       des_ecb_encrypt( &StdText, &hash1, schedule , DES_ENCRYPT );
+       des_ecb_encrypt( &StdText, &PasswordHash1, schedule , DES_ENCRYPT );
        
        lmPasswd_to_key( &UcasePassword[7], &key );
        des_set_key_unchecked( &key, schedule );
-       des_ecb_encrypt( &StdText, &hash2, schedule , DES_ENCRYPT );
+       des_ecb_encrypt( &StdText, &PasswordHash2, schedule , DES_ENCRYPT );
        
-       sprintf( lmhash, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", 
-               hash1[0],hash1[1],hash1[2],hash1[3],hash1[4],hash1[5],hash1[6],hash1[7],
-               hash2[0],hash2[1],hash2[2],hash2[3],hash2[4],hash2[5],hash2[6],hash2[7] );
+       sprintf( PasswordHash, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", 
+               PasswordHash1[0],PasswordHash1[1],PasswordHash1[2],PasswordHash1[3],
+               PasswordHash1[4],PasswordHash1[5],PasswordHash1[6],PasswordHash1[7],
+               PasswordHash2[0],PasswordHash2[1],PasswordHash2[2],PasswordHash2[3],
+               PasswordHash2[4],PasswordHash2[5],PasswordHash2[6],PasswordHash2[7] );
        
-       hash.bv_val = lmhash;
+       hash.bv_val = PasswordHash;
        hash.bv_len = 32;
        
        return pw_string( scheme, &hash );
index a9640c13603197e4ef7dbf3b87a665a88b9ab97a..579b03a1331f7ee656ac70558002c6d399d80833 100644 (file)
@@ -17,6 +17,7 @@
  */
 #include "portable.h"
 
+#include <limits.h>
 #include <stdio.h>
 #include <sys/types.h>
 
 #else
 #  include <ac/socket.h>
 #  include <ac/time.h>
-
-       /* 100 usec intervals from 10/10/1582 to 1/1/1970 */
-#      define UUID_TPLUS       0x01B21DD2138140LL
-
 #  ifdef HAVE_SYS_SYSCTL_H
 #    include <net/if.h>
 #    include <sys/sysctl.h>
@@ -163,8 +160,84 @@ lutil_eaddr( void )
        return eaddr;
 #endif
 }
+
+#if (ULONG_MAX >> 31 >> 31) > 1 || defined HAVE_LONG_LONG
+
+#if (ULONG_MAX >> 31 >> 31) > 1
+    typedef unsigned long       UI64;
+       /* 100 usec intervals from 10/10/1582 to 1/1/1970 */
+#   define UUID_TPLUS           0x01B21DD2138140ul
+#else
+    typedef unsigned long long  UI64;
+#   define UUID_TPLUS           0x01B21DD2138140ull
 #endif
 
+#define high32(i)           ((unsigned long) ((i) >> 32))
+#define low32(i)            ((unsigned long) (i) & 0xFFFFFFFFul)
+#define set_add64(res, i)   ((res) += (i))
+#define set_add64l(res, i)  ((res) += (i))
+#define mul64ll(i1, i2)     ((UI64) (i1) * (i2))
+
+#else /* ! (ULONG_MAX >= 64 bits || HAVE_LONG_LONG) */
+
+typedef struct {
+       unsigned long high, low;
+} UI64;
+
+static const UI64 UUID_TPLUS = { 0x01B21Dul, 0xD2138140ul };
+
+#define high32(i)                       ((i).high)
+#define low32(i)                        ((i).low)
+
+/* res += ui64 */
+#define set_add64(res, ui64) \
+{ \
+       res.high += ui64.high; \
+       res.low  = (res.low + ui64.low) & 0xFFFFFFFFul; \
+       if (res.low < ui64.low) res.high++; \
+}
+
+/* res += ul32 */
+#define set_add64l(res, ul32) \
+{ \
+       res.low = (res.low + ul32) & 0xFFFFFFFFul; \
+       if (res.low < ul32) res.high++; \
+}
+
+/* compute i1 * i2 */
+static UI64
+mul64ll(unsigned long i1, unsigned long i2)
+{
+       const unsigned int high1 = (i1 >> 16), low1 = (i1 & 0xffff);
+       const unsigned int high2 = (i2 >> 16), low2 = (i2 & 0xffff);
+
+       UI64 res;
+       unsigned long tmp;
+
+       res.high = (unsigned long) high1 * high2;
+       res.low  = (unsigned long) low1  * low2;
+
+       tmp = (unsigned long) low1 * high2;
+       res.high += (tmp >> 16);
+       tmp = (tmp << 16) & 0xFFFFFFFFul;
+       res.low = (res.low + tmp) & 0xFFFFFFFFul;
+       if (res.low < tmp)
+               res.high++;
+
+       tmp = (unsigned long) low2 * high1;
+       res.high += (tmp >> 16);
+       tmp = (tmp << 16) & 0xFFFFFFFFul;
+       res.low = (res.low + tmp) & 0xFFFFFFFFul;
+       if (res.low < tmp)
+               res.high++;
+
+       return res;
+}
+
+#endif /* ULONG_MAX >= 64 bits || HAVE_LONG_LONG */
+
+#endif /* !HAVE_UUID_TO_STR && !_WIN32 */
+
 /*
 ** All we really care about is an ISO UUID string.  The format of a UUID is:
 **     field                   octet           note
@@ -235,10 +308,11 @@ lutil_uuidstr( char *buf, size_t len )
  
 #else
        struct timeval tv;
-       unsigned long long tl;
+       UI64 tl;
        unsigned char *nl;
        unsigned short t2, t3, s1;
-       unsigned int t1;
+       unsigned long t1, tl_high;
+       unsigned int rc;
 
        /*
         * Theoretically we should delay if seq wraps within 100usec but for now
@@ -259,22 +333,26 @@ lutil_uuidstr( char *buf, size_t len )
        tv.tv_usec = 0;
 #endif
 
-       tl = ( tv.tv_sec * 10000000LL ) + ( tv.tv_usec * 10LL ) + UUID_TPLUS;
+       tl = mul64ll(tv.tv_sec, 10000000UL);
+       set_add64l(tl, tv.tv_usec * 10UL);
+       set_add64(tl, UUID_TPLUS);
+
        nl = lutil_eaddr();
 
-       t1 = tl & 0xffffffff;                                   /* time_low */
-       t2 = ( tl >> 32 ) & 0xffff;                             /* time_mid */
-       t3 = ( ( tl >> 48 ) & 0x0fff ) | 0x1000;        /* time_hi_and_version */
+       t1 = low32(tl);                         /* time_low */
+       tl_high = high32(tl);
+       t2 = tl_high & 0xffff;          /* time_mid */
+       t3 = ((tl_high >> 16) & 0x0fff) | 0x1000;       /* time_hi_and_version */
        s1 = ( ++seq & 0x1fff ) | 0x8000;               /* clock_seq_and_reserved */
 
-       t1 = snprintf( buf, len,
-               "%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",
-           t1, (unsigned) t2, (unsigned) t3, (unsigned) s1,
+       rc = snprintf( buf, len,
+               "%08lx-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",
+               t1, (unsigned) t2, (unsigned) t3, (unsigned) s1,
                (unsigned) nl[0], (unsigned) nl[1],
                (unsigned) nl[2], (unsigned) nl[3],
                (unsigned) nl[4], (unsigned) nl[5] );
 
-       return (0 < t1 && t1 < len) ? t1 : 0;
+       return rc < len ? rc : 0;
 #endif
 }
 
index dd8fbddca239112722217c38c31089f12d9ad1aa..c571c12f04eb22c422852168d8e49a79e1b9bb09 100644 (file)
@@ -23,7 +23,7 @@ SRCS  = main.c globals.c config.c daemon.c \
                oidm.c starttls.c index.c sets.c referral.c root_dse.c \
                sasl.c module.c mra.c mods.c sl_malloc.c limits.c \
                backglue.c operational.c matchedValues.c cancel.c syncrepl.c \
-               $(@PLAT@_SRCS)
+               backover.c ctxcsn.c $(@PLAT@_SRCS)
 
 OBJS   = main.o globals.o config.o daemon.o \
                connection.o search.o filter.o add.o cr.o \
@@ -37,7 +37,7 @@ OBJS  = main.o globals.o config.o daemon.o \
                oidm.o starttls.o index.o sets.o referral.o root_dse.o \
                sasl.o module.o mra.o mods.o sl_malloc.o limits.o \
                backglue.o operational.o matchedValues.o cancel.o syncrepl.o \
-               $(@PLAT@_OBJS)
+               backover.o ctxcsn.o $(@PLAT@_OBJS)
 
 LDAP_INCDIR= ../../include -I$(srcdir)/slapi
 LDAP_LIBDIR= ../../libraries
index f924da1a8e8bfd871fa7801604fc97960149db3c..5b1f0434b84f1e19589728a7ec6502811c334519 100644 (file)
@@ -24,6 +24,7 @@
  */
 static struct berval 
        aci_bv_entry            = BER_BVC("entry"),
+       aci_bv_children         = BER_BVC("children"),
        aci_bv_br_entry         = BER_BVC("[entry]"),
        aci_bv_br_all           = BER_BVC("[all]"),
        aci_bv_access_id        = BER_BVC("access-id"),
@@ -68,7 +69,8 @@ static int aci_mask(
        struct berval *aci,
        regmatch_t *matches,
        slap_access_t *grant,
-       slap_access_t *deny );
+       slap_access_t *deny,
+       struct berval *scope);
 #endif
 
 static int     regex_matches(
@@ -174,6 +176,14 @@ access_allowed(
                goto done;
        }
 
+#ifdef LDAP_SLAPI
+       ret = slapi_x_access_allowed( op, e, desc, val, access, state );
+       if ( ret == 0 ) {
+               /* ACL plugin denied access */
+               goto done;
+       }
+#endif /* LDAP_SLAPI */
+
        be = op->o_bd;
        if ( be == NULL ) {
                be = &backends[0];
@@ -269,6 +279,7 @@ access_allowed(
                goto vd_access;
 
        } else {
+               if ( state ) state->as_vi_acl = NULL;
                a = NULL;
                ACL_INIT(mask);
                count = 0;
@@ -568,6 +579,7 @@ acl_mask(
        Access  *b;
 #ifdef LDAP_DEBUG
        char accessmaskbuf[ACCESSMASK_MAXLEN];
+       char accessmaskbuf1[ACCESSMASK_MAXLEN];
 #endif
        const char *attr;
 
@@ -1084,6 +1096,9 @@ dn_match_cleanup:;
                if ( b->a_aci_at != NULL ) {
                        Attribute       *at;
                        slap_access_t grant, deny, tgrant, tdeny;
+                       struct berval parent_ndn, old_parent_ndn;
+                       BerVarray bvals = NULL;
+                       int ret,stop;
 
                        /* this case works different from the others above.
                         * since aci's themselves give permissions, we need
@@ -1101,34 +1116,90 @@ dn_match_cleanup:;
                        if ( ! ACL_GRANT( b->a_access_mask, *mask ) ) {
                                continue;
                        }
-
-                       /* get the aci attribute */
-                       at = attr_find( e->e_attrs, b->a_aci_at );
-                       if ( at == NULL ) {
-                               continue;
-                       }
-
-                       ACL_RECORD_VALUE_STATE;
-
                        /* start out with nothing granted, nothing denied */
                        ACL_INIT(tgrant);
                        ACL_INIT(tdeny);
 
-                       /* the aci is an multi-valued attribute.  The
-                        * rights are determined by OR'ing the individual
-                        * rights given by the acis.
+                       /* get the aci attribute */
+                       at = attr_find( e->e_attrs, b->a_aci_at );
+                       if ( at != NULL ) {
+                               ACL_RECORD_VALUE_STATE;
+                               /* the aci is an multi-valued attribute.  The
+                               * rights are determined by OR'ing the individual
+                               * rights given by the acis.
+                               */
+                               for ( i = 0; at->a_vals[i].bv_val != NULL; i++ ) {
+                                       if (aci_mask( op,
+                                               e, desc, val,
+                                               &at->a_nvals[i],
+                                               matches, &grant, &deny,  &aci_bv_entry ) != 0)
+                                       {
+                                               tgrant |= grant;
+                                               tdeny |= deny;
+                                       }
+                               }
+                               Debug(LDAP_DEBUG_ACL, "<= aci_mask grant %s deny %s\n",
+                                         accessmask2str(tgrant,accessmaskbuf), 
+                                         accessmask2str(tdeny, accessmaskbuf1), 0);
+
+                       }
+                       /* If the entry level aci didn't contain anything valid for the 
+                        * current operation, climb up the tree and evaluate the
+                        * acis with scope set to subtree
                         */
-                       for ( i = 0; at->a_vals[i].bv_val != NULL; i++ ) {
-                               if (aci_mask( op,
-                                       e, desc, val,
-                                       &at->a_nvals[i],
-                                       matches, &grant, &deny ) != 0)
-                               {
-                                       tgrant |= grant;
-                                       tdeny |= deny;
+                       if( (tgrant == ACL_PRIV_NONE) && (tdeny == ACL_PRIV_NONE) ){
+                               dnParent(&(e->e_nname), &parent_ndn);
+                               while ( parent_ndn.bv_val != old_parent_ndn.bv_val ){
+                                       old_parent_ndn = parent_ndn;
+                                       Debug(LDAP_DEBUG_ACL, "checking ACI of %s\n", parent_ndn.bv_val, 0, 0);
+                                       ret=backend_attribute(op, NULL, &parent_ndn, b->a_aci_at, &bvals);
+                                       switch(ret){
+                                               case LDAP_SUCCESS :
+                                                       if(bvals){
+                                                               for( i = 0; bvals[i].bv_val != NULL; i++){
+                                                                       ACL_RECORD_VALUE_STATE;
+                                                                       if (aci_mask(op, e, desc, val, &bvals[i], matches,
+                                                                                       &grant, &deny, &aci_bv_children) != 0) {
+                                                                               tgrant |= grant;
+                                                                               tdeny |= deny;
+                                                                               /* evaluation stops as soon as either a "deny" or a 
+                                                                                * "grant" directive matches.
+                                                                                */
+                                                                               if( (tgrant != ACL_PRIV_NONE) || (tdeny != ACL_PRIV_NONE) ){
+                                                                                       stop=1;
+                                                                               }
+                                                                       }
+                                                                       Debug(LDAP_DEBUG_ACL, "<= aci_mask grant %s deny %s\n", 
+                                                                               accessmask2str(tgrant,accessmaskbuf),
+                                                                               accessmask2str(tdeny, accessmaskbuf1), 0);
+                                                               }
+                                                       }
+                                                       stop=0;
+                                                       break;
+                                               case LDAP_NO_SUCH_ATTRIBUTE:
+                                                       /* just go on if the aci-Attribute is not present in
+                                                        * the current entry 
+                                                        */
+                                                       Debug(LDAP_DEBUG_ACL, "no such attribute\n", 0, 0, 0);
+                                                       stop=0;
+                                                       break;
+                                               case LDAP_NO_SUCH_OBJECT:
+                                                       /* We have reached the base object */
+                                                       Debug(LDAP_DEBUG_ACL, "no such object\n", 0, 0, 0);
+                                                       stop=1;
+                                                       break;
+                                               default:
+                                                       stop=1;
+                                                       break;
+                                       }
+                                       if(stop){
+                                               break;
+                                       }
+                                       dnParent(&old_parent_ndn, &parent_ndn);
                                }
                        }
 
+
                        /* remove anything that the ACL clause does not allow */
                        tgrant &= b->a_access_mask & ACL_PRIV_MASK;
                        tdeny &= ACL_PRIV_MASK;
@@ -1743,7 +1814,8 @@ aci_mask(
     struct berval      *aci,
        regmatch_t              *matches,
        slap_access_t   *grant,
-       slap_access_t   *deny
+       slap_access_t   *deny,
+       struct berval   *scope
 )
 {
     struct berval bv, perms, sdn;
@@ -1762,7 +1834,6 @@ aci_mask(
 
           For now, this routine only supports scope=entry.
         */
-
        /* check that the aci has all 5 components */
        if (aci_get_part(aci, 4, '#', NULL) < 0)
                return(0);
@@ -1771,9 +1842,9 @@ aci_mask(
        if (aci_get_part(aci, 0, '#', &bv) < 0)
                return(0);
 
-       /* check that the scope is "entry" */
+       /* check that the scope matches */
        if (aci_get_part(aci, 1, '#', &bv) < 0
-               || ber_bvstrcasecmp( &aci_bv_entry, &bv ) != 0)
+               || ber_bvstrcasecmp( scope, &bv ) != 0)
        {
                return(0);
        }
index 6ea473f434b3d2c24a72b11e7c5fd9e6903aacd4..581d447f112d9f6b2fb5bf5eb7265c644e4cd285 100644 (file)
@@ -169,8 +169,14 @@ parse_acl(
                                        } else if ( strcasecmp( style, "subtree" ) == 0
                                                || strcasecmp( style, "sub" ) == 0 )
                                        {
-                                               a->acl_dn_style = ACL_STYLE_SUBTREE;
-                                               ber_str2bv( right, 0, 1, &a->acl_dn_pat );
+                                               if( *right == '\0' ) {
+                                                       a->acl_dn_pat.bv_val = ch_strdup( "*" );
+                                                       a->acl_dn_pat.bv_len = 1;
+
+                                               } else {
+                                                       a->acl_dn_style = ACL_STYLE_SUBTREE;
+                                                       ber_str2bv( right, 0, 1, &a->acl_dn_pat );
+                                               }
 
                                        } else if ( strcasecmp( style, "children" ) == 0 ) {
                                                a->acl_dn_style = ACL_STYLE_CHILDREN;
@@ -1288,7 +1294,7 @@ str2accessmask( const char *str )
 static void
 acl_usage( void )
 {
-       fprintf( stderr, "\n"
+       fprintf( stderr, "%s%s\n",
                "<access clause> ::= access to <what> "
                                "[ by <who> <access> [ <control> ] ]+ \n"
                "<what> ::= * | [dn[.<dnstyle>]=<DN>] [filter=<filter>] [attrs=<attrlist>]\n"
@@ -1297,7 +1303,7 @@ acl_usage( void )
                "<who> ::= [ * | anonymous | users | self | dn[.<dnstyle>]=<DN> ]\n"
                        "\t[dnattr=<attrname>]\n"
                        "\t[group[/<objectclass>[/<attrname>]][.<style>]=<group>]\n"
-                       "\t[peername[.<style>]=<peer>] [sockname[.<style>]=<name>]\n"
+                       "\t[peername[.<style>]=<peer>] [sockname[.<style>]=<name>]\n",
                        "\t[domain[.<style>]=<domain>] [sockurl[.<style>]=<url>]\n"
 #ifdef SLAPD_ACI_ENABLED
                        "\t[aci=<attrname>]\n"
index d63b92c49df76435400d9bf12c50ed36b4b8af61..ef7684a8e92b2396f25c356d85b001c4c05b3552 100644 (file)
@@ -243,13 +243,11 @@ do_add( Operation *op, SlapReply *rs )
        if ( op->o_bd->be_add ) {
                /* do the update here */
                int repl_user = be_isupdate(op->o_bd, &op->o_ndn );
-#if defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
+#ifndef SLAPD_MULTIMASTER
                if ( !op->o_bd->syncinfo &&
                                                ( !op->o_bd->be_update_ndn.bv_len || repl_user ))
-#elif defined(LDAP_SYNCREPL) && defined(SLAPD_MULTIMASTER)
-               if ( !op->o_bd->syncinfo )      /* LDAP_SYNCREPL overrides MM */
-#elif !defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
-               if ( !op->o_bd->be_update_ndn.bv_len || repl_user )
+#else
+               if ( !op->o_bd->syncinfo )
 #endif
                {
                        int update = op->o_bd->be_update_ndn.bv_len;
@@ -280,8 +278,8 @@ do_add( Operation *op, SlapReply *rs )
                                }
                        }
 
-                       rs->sr_err = slap_mods2entry( modlist, &e, repl_user, &rs->sr_text,
-                               textbuf, textlen );
+                       rs->sr_err = slap_mods2entry( modlist, &e, repl_user, 0,
+                                                                       &rs->sr_text, textbuf, textlen );
                        if( rs->sr_err != LDAP_SUCCESS ) {
                                send_ldap_result( op, rs );
                                goto done;
@@ -311,7 +309,7 @@ do_add( Operation *op, SlapReply *rs )
                                e = NULL;
                        }
 
-#if defined(LDAP_SYNCREPL) || !defined(SLAPD_MULTIMASTER)
+#ifndef SLAPD_MULTIMASTER
                } else {
                        BerVarray defref = NULL;
 #ifdef LDAP_SLAPI
@@ -326,12 +324,9 @@ do_add( Operation *op, SlapReply *rs )
                        }
 #endif /* LDAP_SLAPI */
 
-#ifdef LDAP_SYNCREPL
                        if ( op->o_bd->syncinfo ) {
-                               defref = op->o_bd->syncinfo->master_bv;
-                       } else
-#endif
-                       {
+                               defref = op->o_bd->syncinfo->provideruri_bv;
+                       } else {
                                defref = op->o_bd->be_update_refs
                                                        ? op->o_bd->be_update_refs : default_referral;
                        }
@@ -375,6 +370,9 @@ do_add( Operation *op, SlapReply *rs )
 #endif /* LDAP_SLAPI */
 
 done:
+
+       slap_graduate_commit_csn( op );
+
        if( modlist != NULL ) {
                slap_mods_free( modlist );
        }
@@ -392,6 +390,7 @@ slap_mods2entry(
        Modifications *mods,
        Entry **e,
        int repl_user,
+       int dup,
        const char **text,
        char *textbuf, size_t textlen )
 {
@@ -403,7 +402,9 @@ slap_mods2entry(
        for( ; mods != NULL; mods = mods->sml_next ) {
                Attribute *attr;
 
-               assert( mods->sml_op == LDAP_MOD_ADD );
+               if ( !repl_user ) {
+                       assert( mods->sml_op == LDAP_MOD_ADD );
+               }
                assert( mods->sml_desc != NULL );
 
                attr = attr_find( (*e)->e_attrs, mods->sml_desc );
@@ -522,16 +523,37 @@ slap_mods2entry(
 
                /* move ad to attr structure */
                attr->a_desc = mods->sml_desc;
-               mods->sml_desc = NULL;
+               if ( !dup )
+                       mods->sml_desc = NULL;
 
                /* move values to attr structure */
                /*      should check for duplicates */
-               attr->a_vals = mods->sml_values;
-               mods->sml_values = NULL;
+               if ( dup ) { 
+                       int i;
+                       for ( i = 0; mods->sml_values[i].bv_val; i++ ) ;
+                       attr->a_vals = (BerVarray) ch_calloc( i+1, sizeof( BerValue ));
+                       for ( i = 0; mods->sml_values[i].bv_val; i++ )
+                               ber_dupbv( &attr->a_vals[i], &mods->sml_values[i] );
+                       attr->a_vals[i].bv_len = 0;
+                       attr->a_vals[i].bv_val = NULL;
+               } else {
+                       attr->a_vals = mods->sml_values;
+                       mods->sml_values = NULL;
+               }
 
                if ( mods->sml_nvalues ) {
-                       attr->a_nvals = mods->sml_nvalues;
-                       mods->sml_nvalues = NULL;
+                       if ( dup ) {
+                               int i;
+                               for ( i = 0; mods->sml_nvalues[i].bv_val; i++ ) ;
+                               attr->a_nvals = (BerVarray) ch_calloc( i+1, sizeof( BerValue ));
+                               for ( i = 0; mods->sml_nvalues[i].bv_val; i++ )
+                                       ber_dupbv( &attr->a_nvals[i], &mods->sml_nvalues[i] );
+                               attr->a_nvals[i].bv_len = 0;
+                               attr->a_nvals[i].bv_val = NULL;
+                       } else {
+                               attr->a_nvals = mods->sml_nvalues;
+                               mods->sml_nvalues = NULL;
+                       }
                } else {
                        attr->a_nvals = attr->a_vals;
                }
@@ -543,6 +565,77 @@ slap_mods2entry(
        return LDAP_SUCCESS;
 }
 
+int
+slap_entry2mods(
+       Entry *e,
+       Modifications **mods,
+       const char **text
+)
+{
+       Modifications   *modhead = NULL;
+       Modifications   *mod;
+       Modifications   **modtail = &modhead;
+       Attribute               *a_new;
+       AttributeDescription    *a_new_desc;
+       int                             i, count, rc;
+
+       a_new = e->e_attrs;
+
+       while ( a_new != NULL ) {
+               a_new_desc = a_new->a_desc;
+               mod = (Modifications *) malloc( sizeof( Modifications ));
+               
+               if ( a_new_desc != slap_schema.si_ad_queryid )
+                       mod->sml_op = LDAP_MOD_REPLACE;
+               else
+                       mod->sml_op = LDAP_MOD_ADD;
+
+               ber_dupbv( &mod->sml_type, &a_new_desc->ad_cname );
+
+               for ( count = 0; a_new->a_vals[count].bv_val; count++ );
+
+               mod->sml_bvalues = (struct berval*) malloc(
+                               (count+1) * sizeof( struct berval) );
+
+               mod->sml_nvalues = (struct berval*) malloc(
+                               (count+1) * sizeof( struct berval) );
+
+               for ( i = 0; i < count; i++ ) {
+                       ber_dupbv(mod->sml_bvalues+i, a_new->a_vals+i); 
+                       if ( a_new->a_desc->ad_type->sat_equality &&
+                               a_new->a_desc->ad_type->sat_equality->smr_normalize ) {
+                               rc = a_new->a_desc->ad_type->sat_equality->smr_normalize(
+                                       0,
+                                       a_new->a_desc->ad_type->sat_syntax,
+                                       a_new->a_desc->ad_type->sat_equality,
+                                       a_new->a_vals+i, mod->sml_nvalues+i, NULL );
+                               if (rc) {
+                                       return rc; 
+                               } 
+                       }
+                       else {  
+                               ber_dupbv( mod->sml_nvalues+i, a_new->a_vals+i ); 
+                       } 
+               }
+
+               mod->sml_bvalues[count].bv_val = 0; 
+               mod->sml_bvalues[count].bv_len = 0; 
+
+               mod->sml_nvalues[count].bv_val = 0; 
+               mod->sml_nvalues[count].bv_len = 0; 
+
+               mod->sml_desc = a_new_desc;
+               mod->sml_next =NULL;
+               *modtail = mod;
+               modtail = &mod->sml_next;
+               a_new = a_new->a_next; 
+       }
+
+       *mods = modhead;
+
+       return LDAP_SUCCESS;
+}
+
 #ifdef LDAP_SLAPI
 static void initAddPlugin( Operation *op,
        struct berval *dn, Entry *e, int manageDSAit )
index f46be1f472e21eaabe485e47bca459f61ac7da3e..4bb4e2a53ae22c04a32df45461d8e37b82dd6c91 100644 (file)
@@ -167,7 +167,7 @@ attr_merge_normalize(
                
                for ( i = 0; vals[i].bv_val; i++ );
 
-               nvals = ch_calloc( sizeof(struct berval), i + 1 );
+               nvals = sl_calloc( sizeof(struct berval), i + 1, memctx );
                for ( i = 0; vals[i].bv_val; i++ ) {
                        rc = (*desc->ad_type->sat_equality->smr_normalize)(
                                        0,
@@ -187,7 +187,7 @@ attr_merge_normalize(
 
 error_return:;
        if ( nvals != NULL ) {
-               ber_bvarray_free( nvals );
+               ber_bvarray_free_x( nvals, memctx );
        }
        return rc;
 }
@@ -252,7 +252,7 @@ attr_merge_normalize_one(
 
        rc = attr_merge_one( e, desc, val, nvalp );
        if ( nvalp != NULL ) {
-               ch_free( nval.bv_val );
+               sl_free( nval.bv_val, memctx );
        }
        return rc;
 }
index 47a6d9a57bab3c3ca9ed7337e2f1ed353fc6caef..cbbe73db790e84dd72ccb6c887478dac7a327666 100644 (file)
@@ -6,12 +6,12 @@ SRCS = init.c tools.c config.c \
        add.c bind.c compare.c delete.c modify.c modrdn.c search.c \
        extended.c passwd.c referral.c operational.c \
        attr.c index.c key.c dbcache.c filterindex.c \
-       dn2entry.c dn2id.c error.c id2entry.c idl.c nextid.c cache.c
+       dn2entry.c dn2id.c error.c id2entry.c idl.c nextid.c cache.c trans.c ctxcsn.c
 OBJS = init.lo tools.lo config.lo \
        add.lo bind.lo compare.lo delete.lo modify.lo modrdn.lo search.lo \
        extended.lo passwd.lo referral.lo operational.lo \
        attr.lo index.lo key.lo dbcache.lo filterindex.lo \
-       dn2entry.lo dn2id.lo error.lo id2entry.lo idl.lo nextid.lo cache.lo
+       dn2entry.lo dn2id.lo error.lo id2entry.lo idl.lo nextid.lo cache.lo trans.lo ctxcsn.lo
 
 LDAP_INCDIR= ../../../include       
 LDAP_LIBDIR= ../../../libraries
index 0ccf2db32f974904b076ce3f5a9fa8b40c68bac7..e345b5ba3988029ace873f11d36f87f6d5003281 100644 (file)
@@ -33,9 +33,16 @@ bdb_add(Operation *op, SlapReply *rs )
        DB_LOCK         lock;
        int             noop = 0;
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+       int             num_retries = 0;
+
        Operation* ps_list;
-#endif
+       int             rc;
+       EntryInfo       *suffix_ei;
+       Entry           *ctxcsn_e;
+       int                     ctxcsn_added = 0;
+
+       LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
+       int num_ctrls = 0;
 
 #ifdef NEW_LOGGING
        LDAP_LOG ( OPERATION, ARGS, "==> bdb_add: %s\n", op->oq_add.rs_e->e_name.bv_val, 0, 0 );
@@ -72,8 +79,7 @@ bdb_add(Operation *op, SlapReply *rs )
                        "bdb_add: next_id failed (%d)\n", rs->sr_err, 0, 0 );
 #else
                Debug( LDAP_DEBUG_TRACE,
-                       "bdb_add: next_id failed (%d)\n",
-                       rs->sr_err, 0, 0 );
+                       "bdb_add: next_id failed (%d)\n", rs->sr_err, 0, 0 );
 #endif
                rs->sr_err = LDAP_OTHER;
                rs->sr_text = "internal error";
@@ -96,6 +102,7 @@ retry:       /* transaction retry */
                        rs->sr_text = "internal error";
                        goto return_results;
                }
+               bdb_trans_backoff( ++num_retries );
                ldap_pvt_thread_yield();
        }
 
@@ -309,10 +316,9 @@ retry:     /* transaction retry */
 #endif
                                        rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
                                        rs->sr_text = "no write access to parent";
-                                       goto return_results;;
+                                       goto return_results;
                                }
-
-                       } else {
+                       } else if ( !is_entry_glue( op->oq_add.rs_e )) {
 #ifdef NEW_LOGGING
                                LDAP_LOG ( OPERATION, DETAIL1, "bdb_add: %s denied\n", 
                                        pdn.bv_len == 0 ? "suffix" : "entry at root", 0, 0 );
@@ -321,7 +327,7 @@ retry:      /* transaction retry */
                                        pdn.bv_len == 0 ? "suffix" : "entry at root",
                                        0, 0 );
 #endif
-                               rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
+                               rs->sr_err = LDAP_NO_SUCH_OBJECT;
                                goto return_results;
                        }
                }
@@ -336,13 +342,21 @@ retry:    /* transaction retry */
                                "bdb_add: no parent, cannot add subentry\n",
                                0, 0, 0 );
 #endif
-                       rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
+                       rs->sr_err = LDAP_NO_SUCH_OBJECT;
                        rs->sr_text = "no parent, cannot add subentry";
-                       goto return_results;;
+                       goto return_results;
                }
 #endif
        }
 
+       if ( get_assert( op ) &&
+               ( test_filter( op, op->oq_add.rs_e, get_assertion( op ))
+                       != LDAP_COMPARE_TRUE ))
+       {
+               rs->sr_err = LDAP_ASSERTION_FAILED;
+               goto return_results;
+       }
+
        rs->sr_err = access_allowed( op, op->oq_add.rs_e,
                entry, NULL, ACL_WRITE, NULL );
 
@@ -365,6 +379,23 @@ retry:     /* transaction retry */
                goto return_results;;
        }
 
+       /* post-read */
+       if( op->o_postread ) {
+               if ( slap_read_controls( op, rs, op->oq_add.rs_e,
+                       &slap_post_read_bv, &ctrls[num_ctrls] ) )
+               {
+#ifdef NEW_LOGGING
+                       LDAP_LOG ( OPERATION, DETAIL1, 
+                               "<=- bdb_add: post-read failed!\n", 0, 0, 0 );
+#else
+                       Debug( LDAP_DEBUG_TRACE,
+                               "<=- bdb_add: post-read failed!\n", 0, 0, 0 );
+#endif
+                       goto return_results;
+               }
+               ctrls[++num_ctrls] = NULL;
+       }
+
        /* nested transaction */
        rs->sr_err = TXN_BEGIN( bdb->bi_dbenv, ltid, &lt2, 
                bdb->bi_db_opflags );
@@ -453,7 +484,18 @@ retry:     /* transaction retry */
                goto return_results;
        }
 
-       if( op->o_noop ) {
+       if ( !op->o_bd->syncinfo ) {
+               rc = bdb_csn_commit( op, rs, ltid, ei, &suffix_ei,
+                       &ctxcsn_e, &ctxcsn_added, locker );
+               switch ( rc ) {
+               case BDB_CSN_ABORT :
+                       goto return_results;
+               case BDB_CSN_RETRY :
+                       goto retry;
+               }
+       }
+
+       if ( op->o_noop ) {
                if (( rs->sr_err=TXN_ABORT( ltid )) != 0 ) {
                        rs->sr_text = "txn_abort (no-op) failed";
                } else {
@@ -472,6 +514,7 @@ retry:      /* transaction retry */
 
                } else {
                        struct berval nrdn;
+                       struct berval ctx_nrdn;
 
                        if (pdn.bv_len) {
                                nrdn.bv_val = op->ora_e->e_nname.bv_val;
@@ -480,7 +523,19 @@ retry:     /* transaction retry */
                                nrdn = op->ora_e->e_nname;
                        }
 
-                       bdb_cache_add(bdb, ei, op->oq_add.rs_e, &nrdn, locker );
+                       bdb_cache_add( bdb, ei, op->oq_add.rs_e, &nrdn, locker );
+
+                       if ( suffix_ei == NULL ) {
+                               suffix_ei = op->oq_add.rs_e->e_private;
+                       }
+
+                       if ( !op->o_bd->syncinfo ) {
+                               if ( ctxcsn_added ) {
+                                       ctx_nrdn.bv_val = "cn=ldapsync";
+                                       ctx_nrdn.bv_len = strlen( ctx_nrdn.bv_val );
+                                       bdb_cache_add( bdb, suffix_ei, ctxcsn_e, &ctx_nrdn, locker );
+                               }
+                       }
 
                        if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
                                rs->sr_text = "txn_commit failed";
@@ -493,38 +548,41 @@ retry:    /* transaction retry */
        ltid = NULL;
        op->o_private = NULL;
 
-       if (rs->sr_err == LDAP_SUCCESS) {
-#ifdef NEW_LOGGING
-               LDAP_LOG ( OPERATION, RESULTS, 
-                       "bdb_add: added%s id=%08lx dn=\"%s\"\n", 
-                       op->o_noop ? " (no-op)" : "", op->oq_add.rs_e->e_id, op->oq_add.rs_e->e_dn );
-#else
-               Debug(LDAP_DEBUG_TRACE, "bdb_add: added%s id=%08lx dn=\"%s\"\n",
-                       op->o_noop ? " (no-op)" : "", op->oq_add.rs_e->e_id, op->oq_add.rs_e->e_dn );
-#endif
-               rs->sr_text = NULL;
-       }
-       else {
+       if (rs->sr_err != LDAP_SUCCESS) {
 #ifdef NEW_LOGGING
                LDAP_LOG ( OPERATION, ERR, 
-                       "bdb_add: %s : %s (%d)\n",  rs->sr_text, db_strerror(rs->sr_err), rs->sr_err );
+                       "bdb_add: %s : %s (%d)\n",  rs->sr_text,
+                               db_strerror(rs->sr_err), rs->sr_err );
 #else
                Debug( LDAP_DEBUG_TRACE, "bdb_add: %s : %s (%d)\n",
                        rs->sr_text, db_strerror(rs->sr_err), rs->sr_err );
 #endif
                rs->sr_err = LDAP_OTHER;
+               goto return_results;
        }
 
+#ifdef NEW_LOGGING
+       LDAP_LOG ( OPERATION, RESULTS, 
+               "bdb_add: added%s id=%08lx dn=\"%s\"\n", 
+               op->o_noop ? " (no-op)" : "",
+               op->oq_add.rs_e->e_id, op->oq_add.rs_e->e_dn );
+#else
+       Debug(LDAP_DEBUG_TRACE, "bdb_add: added%s id=%08lx dn=\"%s\"\n",
+               op->o_noop ? " (no-op)" : "",
+               op->oq_add.rs_e->e_id, op->oq_add.rs_e->e_dn );
+#endif
+
+       rs->sr_text = NULL;
+       if( num_ctrls ) rs->sr_ctrls = ctrls;
+
 return_results:
        send_ldap_result( op, rs );
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
        if ( rs->sr_err == LDAP_SUCCESS && !noop ) {
                LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
                        bdb_psearch( op, rs, ps_list, op->oq_add.rs_e, LDAP_PSEARCH_BY_ADD );
                }
        }
-#endif /* LDAP_CLIENT_UPDATE */
 
        if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp ) {
                ldap_pvt_thread_yield();
@@ -533,7 +591,6 @@ return_results:
        }
 
 done:
-
        if( ltid != NULL ) {
                TXN_ABORT( ltid );
                op->o_private = NULL;
@@ -541,4 +598,3 @@ done:
 
        return ( ( rs->sr_err == LDAP_SUCCESS ) ? noop : rs->sr_err );
 }
-
index 64bc55c547728097a5e3b47ca048978d7636c3eb..93356b13b5860fc95ee2880f55ace0fa515e6abe 100644 (file)
@@ -14,9 +14,7 @@
 
 LDAP_BEGIN_DECL
 
-#ifdef LDAP_SYNCREPL
 #define BDB_SUBENTRIES 1
-#endif
 
 #define DN_BASE_PREFIX         SLAP_INDEX_EQUALITY_PREFIX
 #define DN_ONE_PREFIX          '%'
@@ -158,9 +156,7 @@ struct bdb_info {
 
        ID                      bi_lastid;
        ldap_pvt_thread_mutex_t bi_lastid_mutex;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
        LDAP_LIST_HEAD(pl, slap_op) bi_psearch_list;
-#endif
 #ifdef SLAP_IDL_CACHE
        int             bi_idl_cache_max_size;
        int             bi_idl_cache_size;
@@ -223,6 +219,10 @@ struct bdb_op_info {
 
 #define BDB_REUSE_LOCKERS
 
+#define BDB_CSN_COMMIT 0
+#define BDB_CSN_ABORT  1
+#define BDB_CSN_RETRY  2
+
 LDAP_END_DECL
 
 #include "proto-bdb.h"
index d1e99534637253b2f4ebf7273a792f296a7c6b52..69b7f1ccb8695b39a9735d861f3d6aaf85110f69 100644 (file)
@@ -34,7 +34,7 @@ bdb_cache_entryinfo_new( )
 }
 
 /* Atomically release and reacquire a lock */
-static int
+int
 bdb_cache_entry_db_relock(
        DB_ENV *env,
        u_int32_t locker,
@@ -239,6 +239,14 @@ bdb_entryinfo_add_internal(
                         */
                        if ( bdb_cache_entry_db_lock( env, locker, elru, 1, 1,
                                &lock ) == 0 ) {
+                               /* If there's no entry, or this node is in
+                                * the process of linking into the cache,
+                                * skip it.
+                                */
+                               if ( !elru->bei_e || (elru->bei_state & CACHE_ENTRY_NOT_LINKED) ) {
+                                       bdb_cache_entry_db_unlock( env, &lock );
+                                       continue;
+                               }
                                /* Need to lock parent to delete child */
                                if ( ldap_pvt_thread_mutex_trylock(
                                        &elru->bei_parent->bei_kids_mutex )) {
@@ -418,8 +426,10 @@ hdb_cache_find_parent(
 {
        struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
        EntryInfo ei, eip, *ei2 = NULL, *ein = NULL, *eir = NULL;
+       char ndn[SLAP_LDAPDN_MAXLEN];
        ID parent;
        int rc;
+       int addlru = 1;
 
        ei.bei_id = id;
        ei.bei_kids = NULL;
@@ -442,20 +452,28 @@ hdb_cache_find_parent(
                ein->bei_state = CACHE_ENTRY_NOT_LINKED;
 
                /* Insert this node into the ID tree */
-               ldap_pvt_thread_rdwr_rlock( &bdb->bi_cache.c_rwlock );
+               ldap_pvt_thread_rdwr_wlock( &bdb->bi_cache.c_rwlock );
                if ( avl_insert( &bdb->bi_cache.c_idtree, (caddr_t)ein,
                        bdb_id_cmp, avl_dup_error ) ) {
 
-                       /* Hm, can this really happen? */
+                       /* Someone else created this node just before us.
+                        * Free our new copy and use the existing one.
+                        */
                        bdb_cache_entryinfo_destroy( ein );
                        ein = (EntryInfo *)avl_find( bdb->bi_cache.c_idtree,
                                (caddr_t) &ei, bdb_id_cmp );
+                       
+                       /* Link in any kids we've already processed */
                        if ( ei2 ) {
                                bdb_cache_entryinfo_lock( ein );
                                avl_insert( &ein->bei_kids, (caddr_t)ei2,
                                        bdb_rdn_cmp, avl_dup_error );
                                bdb_cache_entryinfo_unlock( ein );
                        }
+
+                       if ( !eir ) {
+                               addlru = 0;
+                       }
                }
 
                /* If this is the first time, save this node
@@ -466,27 +484,28 @@ hdb_cache_find_parent(
                /* If there was a previous node, link it to this one */
                if ( ei2 ) ei2->bei_parent = ein;
 
+               /* Look for this node's parent */
                if ( eip.bei_id ) {
                        ei2 = (EntryInfo *) avl_find( bdb->bi_cache.c_idtree,
                                        (caddr_t) &eip, bdb_id_cmp );
                } else {
                        ei2 = &bdb->bi_cache.c_dntree;
                }
+               ldap_pvt_thread_rdwr_wunlock( &bdb->bi_cache.c_rwlock );
 
+               /* Got the parent, link in and we're done. */
                if ( ei2 ) {
-                       ein->bei_parent = ei2;
                        bdb_cache_entryinfo_lock( ei2 );
+                       ein->bei_parent = ei2;
                        avl_insert( &ei2->bei_kids, (caddr_t)ein, bdb_rdn_cmp,
                                avl_dup_error);
                        bdb_cache_entryinfo_unlock( ei2 );
-                       *res = eir;
                        bdb_cache_entryinfo_lock( eir );
-               }
-               ldap_pvt_thread_rdwr_runlock( &bdb->bi_cache.c_rwlock );
-               if ( ei2 ) {
-                       /* Found a link. Reset all the state info */
+
+                       /* Reset all the state info */
                        for (ein = eir; ein != ei2; ein=ein->bei_parent)
                                ein->bei_state &= ~CACHE_ENTRY_NOT_LINKED;
+                       *res = eir;
                        break;
                }
                ei.bei_kids = NULL;
@@ -524,11 +543,33 @@ bdb_cache_find_id(
 
        /* If we weren't given any info, see if we have it already cached */
        if ( !*eip ) {
-               ldap_pvt_thread_rdwr_rlock( &bdb->bi_cache.c_rwlock );
+again:         ldap_pvt_thread_rdwr_rlock( &bdb->bi_cache.c_rwlock );
                *eip = (EntryInfo *) avl_find( bdb->bi_cache.c_idtree,
                                        (caddr_t) &ei, bdb_id_cmp );
                if ( *eip ) {
-                       bdb_cache_entryinfo_lock( *eip );
+                       /* If the lock attempt fails, the info is in use */
+                       if ( ldap_pvt_thread_mutex_trylock(
+                                       &(*eip)->bei_kids_mutex )) {
+                               ldap_pvt_thread_rdwr_runlock( &bdb->bi_cache.c_rwlock );
+                               /* If this node is being deleted, treat
+                                * as if the delete has already finished
+                                */
+                               if ( (*eip)->bei_state & CACHE_ENTRY_DELETED ) {
+                                       return DB_NOTFOUND;
+                               }
+                               /* otherwise, wait for the info to free up */
+                               ldap_pvt_thread_yield();
+                               goto again;
+                       }
+                       /* If this info isn't hooked up to its parent yet,
+                        * unlock and wait for it to be fully initialized
+                        */
+                       if ( (*eip)->bei_state & CACHE_ENTRY_NOT_LINKED ) {
+                               bdb_cache_entryinfo_unlock( *eip );
+                               ldap_pvt_thread_rdwr_runlock( &bdb->bi_cache.c_rwlock );
+                               ldap_pvt_thread_yield();
+                               goto again;
+                       }
                        islocked = 1;
                }
                ldap_pvt_thread_rdwr_runlock( &bdb->bi_cache.c_rwlock );
@@ -559,37 +600,44 @@ bdb_cache_find_id(
        if ( *eip && rc == 0 ) {
                if ( (*eip)->bei_state & CACHE_ENTRY_DELETED ) {
                        rc = DB_NOTFOUND;
-               } else if (!(*eip)->bei_e ) {
-                       if (!ep) {
-                               rc = bdb_id2entry( op->o_bd, tid, id, &ep );
-                       }
-                       if ( rc == 0 ) {
-                               bdb_cache_entry_db_lock( bdb->bi_dbenv, locker,
-                                       *eip, 1, 0, lock );
-                               ep->e_private = *eip;
+               } else {
+                       bdb_cache_entry_db_lock( bdb->bi_dbenv, locker,
+                                       *eip, 0, 0, lock );
+                       if ( !(*eip)->bei_e ) {
+                               if (!ep) {
+                                       rc = bdb_id2entry( op->o_bd, tid, id, &ep );
+                               }
+                               if ( rc == 0 ) {
+                                       bdb_cache_entry_db_relock( bdb->bi_dbenv, locker,
+                                               *eip, 1, 0, lock );
+                                       /* Make sure no other modifier beat us to it */
+                                       if ( (*eip)->bei_e ) {
+                                               bdb_entry_return( ep );
+                                               ep = NULL;
+                                       } else {
+                                               ep->e_private = *eip;
 #ifdef BDB_HIER
-                               bdb_fix_dn( ep, 0 );
+                                               bdb_fix_dn( ep, 0 );
 #endif
-                               (*eip)->bei_e = ep;
-                               bdb_cache_entry_db_relock( bdb->bi_dbenv, locker,
-                                       *eip, 0, 0, lock );
+                                               (*eip)->bei_e = ep;
+                                       }
+                                       bdb_cache_entry_db_relock( bdb->bi_dbenv, locker,
+                                               *eip, 0, 0, lock );
+                               }
                        }
-               } else {
 #ifdef BDB_HIER
-                       rc = bdb_fix_dn( (*eip)->bei_e, 1 );
-                       if ( rc ) {
-                               bdb_cache_entry_db_lock( bdb->bi_dbenv,
-                                       locker, *eip, 1, 0, lock );
-                               rc = bdb_fix_dn( (*eip)->bei_e, 2 );
-                               bdb_cache_entry_db_relock( bdb->bi_dbenv,
-                                       locker, *eip, 0, 0, lock );
-                       } else {
-                               bdb_cache_entry_db_lock( bdb->bi_dbenv,
-                                       locker, *eip, 0, 0, lock );
+                       else {
+                               rc = bdb_fix_dn( (*eip)->bei_e, 1 );
+                               if ( rc ) {
+                                       bdb_cache_entry_db_relock( bdb->bi_dbenv,
+                                               locker, *eip, 1, 0, lock );
+                                       /* check again in case other modifier did it already */
+                                       if ( bdb_fix_dn( (*eip)->bei_e, 1 ) )
+                                               rc = bdb_fix_dn( (*eip)->bei_e, 2 );
+                                       bdb_cache_entry_db_relock( bdb->bi_dbenv,
+                                               locker, *eip, 0, 0, lock );
+                               }
                        }
-#else
-                       bdb_cache_entry_db_lock( bdb->bi_dbenv, locker,
-                                       *eip, 0, 0, lock );
 #endif
                }
        }
@@ -786,6 +834,9 @@ bdb_cache_delete(
        /* Set this early, warn off any queriers */
        ei->bei_state |= CACHE_ENTRY_DELETED;
 
+       /* Lock the entry's info */
+       bdb_cache_entryinfo_lock( ei );
+
        /* Get write lock on the data */
        bdb_cache_entry_db_relock( env, locker, ei, 1, 0, lock );
 
@@ -812,6 +863,9 @@ bdb_cache_delete(
        /* free cache write lock */
        ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
        bdb_cache_entryinfo_unlock( ei->bei_parent );
+
+       /* Leave entry info locked */
+
        return( rc );
 }
 
@@ -820,6 +874,7 @@ bdb_cache_delete_cleanup(
        Entry *e
 )
 {
+       bdb_cache_entryinfo_unlock( BEI(e) );
        bdb_cache_entryinfo_destroy( e->e_private );
        e->e_private = NULL;
        bdb_entry_return( e );
index 635208d9f54a1adce373ec3237a734db43cdb76f..d44c26ac6f15e24bcdaaa4c87ddd41ad1405ba2b 100644 (file)
@@ -102,8 +102,15 @@ dn2entry_retry:
                goto done;
        }
 
-       rs->sr_err = access_allowed( op, e,
-               op->oq_compare.rs_ava->aa_desc, &op->oq_compare.rs_ava->aa_value, ACL_COMPARE, NULL );
+       if ( get_assert( op ) &&
+               ( test_filter( op, e, get_assertion( op )) != LDAP_COMPARE_TRUE ))
+       {
+               rs->sr_err = LDAP_ASSERTION_FAILED;
+               goto return_results;
+       }
+
+       rs->sr_err = access_allowed( op, e, op->oq_compare.rs_ava->aa_desc,
+               &op->oq_compare.rs_ava->aa_value, ACL_COMPARE, NULL );
        if ( ! rs->sr_err ) {
                rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
                goto return_results;
diff --git a/servers/slapd/back-bdb/ctxcsn.c b/servers/slapd/back-bdb/ctxcsn.c
new file mode 100644 (file)
index 0000000..0bf3219
--- /dev/null
@@ -0,0 +1,377 @@
+/* $OpenLDAP$ */
+/*
+ * back-bdb Context CSN Management Routines
+ */
+/* Copyright (c) 2003 by International Business Machines, Inc.
+ *
+ * International Business Machines, Inc. (hereinafter called IBM) grants
+ * permission under its copyrights to use, copy, modify, and distribute this
+ * Software with or without fee, provided that the above copyright notice and
+ * all paragraphs of this notice appear in all copies, and that the name of IBM
+ * not be used in connection with the marketing of any product incorporating
+ * the Software or modifications thereof, without specific, written prior
+ * permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
+ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
+ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include "portable.h"
+
+#include <stdio.h>
+
+#include <ac/string.h>
+#include <ac/time.h>
+
+#include "lutil.h"
+#include "back-bdb.h"
+#include "external.h"
+
+int
+bdb_csn_commit(
+       Operation *op,
+       SlapReply *rs,
+       DB_TXN *tid,
+       EntryInfo *ei,
+       EntryInfo **suffix_ei,
+       Entry **ctxcsn_e,
+       int *ctxcsn_added,
+       u_int32_t locker
+)
+{
+       struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
+       struct berval   ctxcsn_ndn = { 0, NULL };
+       EntryInfo               *ctxcsn_ei = NULL;
+       DB_LOCK                 ctxcsn_lock;
+       struct berval   *max_committed_csn = NULL;
+       DB_LOCK                 suffix_lock;
+       int                             rc, ret;
+       ID                              ctxcsn_id;
+       Entry                   *e;
+       char                    textbuf[SLAP_TEXT_BUFLEN];
+       size_t                  textlen = sizeof textbuf;
+       EntryInfo               *eip = NULL;
+
+       if ( ei ) {
+               e = ei->bei_e;
+       }
+
+       build_new_dn( &ctxcsn_ndn, &op->o_bd->be_nsuffix[0],
+               (struct berval *)&slap_ldapsync_cn_bv );
+
+       rc = bdb_dn2entry( op, tid, &ctxcsn_ndn, &ctxcsn_ei,
+                                                          1, locker, &ctxcsn_lock );
+
+       *ctxcsn_e = ctxcsn_ei->bei_e;
+
+       max_committed_csn = slap_get_commit_csn( op );
+
+       if ( max_committed_csn == NULL ) {
+               return BDB_CSN_COMMIT;
+       }
+
+       *ctxcsn_added = 0;
+
+       switch( rc ) {
+       case 0:
+               if ( !*ctxcsn_e ) {
+                       rs->sr_err = LDAP_OTHER;
+                       rs->sr_text = "context csn not present";
+                       ber_bvfree( max_committed_csn );
+                       return BDB_CSN_ABORT;
+               } else {
+                       Modifications mod;
+                       struct berval modvals[2];
+
+                       modvals[0] = *max_committed_csn;
+                       modvals[1].bv_val = NULL;
+                       modvals[1].bv_len = 0;
+
+                       mod.sml_op = LDAP_MOD_REPLACE;
+                       mod.sml_bvalues = modvals;
+                       mod.sml_nvalues = NULL;
+                       mod.sml_desc = slap_schema.si_ad_contextCSN;
+                       mod.sml_type = mod.sml_desc->ad_cname;
+                       mod.sml_next = NULL;
+
+                       bdb_cache_entry_db_relock( bdb->bi_dbenv, locker, ctxcsn_ei, 1, 0, &ctxcsn_lock );
+
+                       ret = bdb_modify_internal( op, tid, &mod, *ctxcsn_e,
+                                                                       &rs->sr_text, textbuf, textlen );                                                               
+                       ber_bvfree( max_committed_csn );
+                       if ( ret != LDAP_SUCCESS ) {
+#ifdef NEW_LOGGING
+                               LDAP_LOG ( OPERATION, ERR,
+                                               "bdb_csn_commit: modify failed (%d)\n", rs->sr_err, 0, 0 );
+#else
+                               Debug( LDAP_DEBUG_TRACE,
+                                               "bdb_csn_commit: modify failed (%d)\n", rs->sr_err, 0, 0 );
+#endif
+                               switch( ret ) {
+                               case DB_LOCK_DEADLOCK:
+                               case DB_LOCK_NOTGRANTED:
+                                       goto rewind;
+                               default:
+                                       return BDB_CSN_ABORT;
+                               }
+                       }
+
+                       ret = bdb_id2entry_update( op->o_bd, tid, *ctxcsn_e );
+                       switch ( ret ) {
+                       case 0 :
+                               break;
+                       case DB_LOCK_DEADLOCK :
+                       case DB_LOCK_NOTGRANTED :
+                               goto rewind;
+                       default :
+                               rs->sr_err = ret;
+                               rs->sr_text = "context csn update failed";
+                               return BDB_CSN_ABORT;
+                       }
+               }
+               break;
+       case DB_NOTFOUND:
+               if ( op->o_tag == LDAP_REQ_ADD &&
+                                               be_issuffix( op->o_bd, &op->oq_add.rs_e->e_nname )) {
+                       *suffix_ei = NULL;
+                       eip = (EntryInfo *) ch_calloc( 1, sizeof( EntryInfo ));
+                       eip->bei_id = op->oq_add.rs_e->e_id;
+               } else {
+                       eip = *suffix_ei = ctxcsn_ei;
+               }
+
+               /* This serializes add. But this case is very rare : only once. */
+               rs->sr_err = bdb_next_id( op->o_bd, tid, &ctxcsn_id );
+               if ( rs->sr_err != 0 ) {
+#ifdef NEW_LOGGING
+                       LDAP_LOG ( OPERATION, ERR,
+                               "bdb_add: next_id failed (%d)\n", rs->sr_err, 0, 0 );
+#else
+                       Debug( LDAP_DEBUG_TRACE,
+                               "bdb_add: next_id failed (%d)\n", rs->sr_err, 0, 0 );
+#endif
+                       rs->sr_err = LDAP_OTHER;
+                       rs->sr_text = "internal error";
+                       return BDB_CSN_ABORT;
+               }
+
+               *ctxcsn_e = slap_create_context_csn_entry( op->o_bd, max_committed_csn );
+               ber_bvfree( max_committed_csn );
+               (*ctxcsn_e)->e_id = ctxcsn_id;
+               *ctxcsn_added = 1;
+
+               ret = bdb_dn2id_add( op, tid, eip, *ctxcsn_e );
+               switch ( ret ) {
+               case 0 :
+                       break;
+               case DB_LOCK_DEADLOCK :
+               case DB_LOCK_NOTGRANTED :
+                       goto rewind;
+               case DB_KEYEXIST :
+                       rs->sr_err = LDAP_OTHER;
+                       rs->sr_text = "context csn exists before contex prefix does";
+                       return BDB_CSN_ABORT;
+               default :
+                       rs->sr_err = LDAP_OTHER;
+                       rs->sr_text = "context csn store failed";
+                       return BDB_CSN_ABORT;
+               }
+
+               if ( *suffix_ei == NULL ) {
+                       ch_free( eip );
+               }
+
+               ret = bdb_id2entry_add( op->o_bd, tid, *ctxcsn_e );
+               switch ( ret ) {
+               case 0 :
+                       break;
+               case DB_LOCK_DEADLOCK :
+               case DB_LOCK_NOTGRANTED :
+                       goto rewind;
+               default :
+                       rs->sr_err = LDAP_OTHER;
+                       rs->sr_text = "context csn store failed";
+                       return BDB_CSN_ABORT;
+               }
+               ret = bdb_index_entry_add( op, tid, *ctxcsn_e );
+               switch ( ret ) {
+               case 0 :
+                       break;
+               case DB_LOCK_DEADLOCK :
+               case DB_LOCK_NOTGRANTED :
+                       goto rewind;
+               default :
+                       rs->sr_err = LDAP_OTHER;
+                       rs->sr_text = "context csn indexing failed";
+                       return BDB_CSN_ABORT;
+               }
+               break;
+       case DB_LOCK_DEADLOCK:
+       case DB_LOCK_NOTGRANTED:
+#ifdef NEW_LOGGING
+               LDAP_LOG( OPERATION, ERR,
+                               "bdb_csn_commit : bdb_dn2entry retry\n", 0, 0, 0 );
+#else
+               Debug( LDAP_DEBUG_TRACE,
+                               "bdb_csn_commit : bdb_dn2entry retry\n", 0, 0, 0 );
+#endif
+               goto rewind;
+       case LDAP_BUSY:
+               rs->sr_err = rc;
+               rs->sr_text = "ldap server busy";
+               return BDB_CSN_ABORT;
+       default:
+               rs->sr_err = LDAP_OTHER;
+               rs->sr_text = "internal error";
+               return BDB_CSN_ABORT;
+       }
+
+       return BDB_CSN_COMMIT;
+
+rewind :
+       slap_rewind_commit_csn( op );
+       return BDB_CSN_RETRY;
+}
+
+int
+bdb_get_commit_csn(
+       Operation       *op,
+       SlapReply       *rs,
+       struct berval   **search_context_csn,
+       u_int32_t       locker,
+       DB_LOCK         *ctxcsn_lock
+)
+{
+       struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
+       struct berval ctxcsn_rdn = BER_BVNULL;
+       struct berval ctxcsn_ndn = BER_BVNULL;
+       struct berval csn = BER_BVNULL;
+       struct berval ctx_nrdn = BER_BVC( "cn=ldapsync" );
+       EntryInfo       *ctxcsn_ei = NULL;
+       EntryInfo       *suffix_ei = NULL;
+       Entry           *ctxcsn_e = NULL;
+       DB_TXN          *ltid = NULL;
+       Attribute       *csn_a;
+       char            substr[67];
+       char            gid[DB_XIDDATASIZE];
+       char            csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
+       int                     num_retries = 0;
+       int                     ctxcsn_added = 0;
+       int                     rc;
+
+       if ( op->o_sync_mode != SLAP_SYNC_NONE ) {
+               if ( op->o_bd->syncinfo ) {
+                       sprintf( substr, "cn=syncrepl%d", op->o_bd->syncinfo->id );
+                       ber_str2bv( substr, strlen( substr ), 0, &ctxcsn_rdn );
+                       build_new_dn( &ctxcsn_ndn, &op->o_bd->be_nsuffix[0], &ctxcsn_rdn );
+               } else {
+                       ber_str2bv( "cn=ldapsync", strlen("cn=ldapsync"), 0, &ctxcsn_rdn );
+                       build_new_dn( &ctxcsn_ndn, &op->o_bd->be_nsuffix[0], &ctxcsn_rdn );
+               }
+
+ctxcsn_retry :
+               rs->sr_err = bdb_dn2entry( op, NULL, &ctxcsn_ndn, &ctxcsn_ei,
+                                                                       0, locker, ctxcsn_lock );
+               switch(rs->sr_err) {
+               case 0:
+                       ch_free( ctxcsn_ndn.bv_val );
+                       if ( ctxcsn_ei ) {
+                               ctxcsn_e = ctxcsn_ei->bei_e;
+                       }
+                       break;
+        case LDAP_BUSY:
+                       ch_free( ctxcsn_ndn.bv_val );
+                       LOCK_ID_FREE (bdb->bi_dbenv, locker );
+                       return LDAP_BUSY;
+        case DB_LOCK_DEADLOCK:
+        case DB_LOCK_NOTGRANTED:
+                       goto ctxcsn_retry;
+        case DB_NOTFOUND:
+                       if ( !op->o_bd->syncinfo ) {
+                               snprintf( gid, sizeof( gid ), "%s-%08lx-%08lx",
+                                                       bdb_uuid.bv_val, (long) op->o_connid, (long) op->o_opid );
+
+                               slap_get_csn( op, csnbuf, sizeof(csnbuf), &csn, 1 );
+
+                               if ( 0 ) {
+txn_retry:
+                                       rs->sr_err = TXN_ABORT( ltid );
+                                       if ( rs->sr_err != 0 ) {
+                                               rs->sr_err = LDAP_OTHER;
+                                               return rs->sr_err;
+                                       }
+
+                                       bdb_trans_backoff( ++num_retries );
+                                       ldap_pvt_thread_yield();
+                               }
+                               rs->sr_err = TXN_BEGIN( bdb->bi_dbenv, NULL, &ltid, bdb->bi_db_opflags );
+                               if ( rs->sr_err != 0 ) {
+                                       rs->sr_err = LDAP_OTHER;
+                                       return rs->sr_err;
+                               }
+
+                               rs->sr_err = bdb_csn_commit( op, rs, ltid, NULL, &suffix_ei,
+                                                                               &ctxcsn_e, &ctxcsn_added, locker );
+                               switch( rs->sr_err ) {
+                               case BDB_CSN_ABORT:
+                                       LOCK_ID_FREE( bdb->bi_dbenv, locker );
+                                       return LDAP_OTHER;
+                               case BDB_CSN_RETRY:
+                                       goto txn_retry;
+                               }
+
+                               rs->sr_err = TXN_PREPARE( ltid, gid );
+                               if ( rs->sr_err != 0 ) {
+                                       rs->sr_err = LDAP_OTHER;
+                                       return rs->sr_err;
+                               }
+
+                               bdb_cache_add( bdb, suffix_ei, ctxcsn_e, &ctx_nrdn, locker );
+
+                               rs->sr_err = TXN_COMMIT( ltid, 0 );
+                               if ( rs->sr_err != 0 ) {
+                                       rs->sr_err = LDAP_OTHER;
+                                       return rs->sr_err;
+                               }
+
+                               ctxcsn_ei = NULL;
+                               rs->sr_err = bdb_dn2entry( op, NULL, &ctxcsn_ndn, &ctxcsn_ei,
+                                                                               0, locker, ctxcsn_lock );
+                               ch_free( ctxcsn_ndn.bv_val );
+
+                               if ( ctxcsn_ei ) {
+                                       ctxcsn_e = ctxcsn_ei->bei_e;
+                               }
+                       } else {
+                               LOCK_ID_FREE( bdb->bi_dbenv, locker );
+                               return LDAP_OTHER;
+                       }
+                       break;
+
+               default:
+                       LOCK_ID_FREE (bdb->bi_dbenv, locker );
+                       return LDAP_OTHER;
+               }
+
+               if ( ctxcsn_e ) {
+                       if ( op->o_bd->syncinfo ) {
+                               csn_a = attr_find( ctxcsn_e->e_attrs, slap_schema.si_ad_syncreplCookie );
+                       } else {
+                               csn_a = attr_find( ctxcsn_e->e_attrs, slap_schema.si_ad_contextCSN );
+                       }
+                       if ( csn_a ) {
+                               *search_context_csn = ber_dupbv( NULL, &csn_a->a_vals[0] );
+                       } else {
+                               *search_context_csn = NULL;
+                       }
+               } else {
+                       *search_context_csn = NULL;
+               }
+       }
+
+       return LDAP_SUCCESS;
+}
index ef8dcd82d8ddcee381e3be2fe9d00b5c290ad6d3..664d2f8e4ce666ed744ffe002b8b61911180cb2a 100644 (file)
@@ -17,7 +17,7 @@ int
 bdb_delete( Operation *op, SlapReply *rs )
 {
        struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
-       Entry   *matched;
+       Entry   *matched = NULL;
        struct berval   pdn = {0, NULL};
        Entry   *e = NULL;
        Entry   *p = NULL;
@@ -33,9 +33,16 @@ bdb_delete( Operation *op, SlapReply *rs )
 
        int             noop = 0;
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+       int             num_retries = 0;
+
        Operation* ps_list;
-#endif
+       int     rc;
+       EntryInfo   *suffix_ei;
+       Entry       *ctxcsn_e;
+       int         ctxcsn_added = 0;
+
+       LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
+       int num_ctrls = 0;
 
 #ifdef NEW_LOGGING
        LDAP_LOG ( OPERATION, ARGS,  "==> bdb_delete: %s\n", op->o_req_dn.bv_val, 0, 0 );
@@ -66,6 +73,7 @@ retry:        /* transaction retry */
                        rs->sr_text = "internal error";
                        goto return_results;
                }
+               bdb_trans_backoff( ++num_retries );
                ldap_pvt_thread_yield();
        }
 
@@ -223,7 +231,8 @@ retry:      /* transaction retry */
                }
        }
 
-       if ( e == NULL ) {
+       /* FIXME : dn2entry() should return non-glue entry */
+       if ( e == NULL || ( !manageDSAit && is_entry_glue( e ))) {
 #ifdef NEW_LOGGING
                LDAP_LOG ( OPERATION, ARGS, 
                        "<=- bdb_delete: no such object %s\n", op->o_req_dn.bv_val, 0, 0);
@@ -242,8 +251,9 @@ retry:      /* transaction retry */
                        matched = NULL;
 
                } else {
-                       rs->sr_ref = referral_rewrite( default_referral,
-                               NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
+                       BerVarray deref = op->o_bd->syncinfo ?
+                                                         op->o_bd->syncinfo->provideruri_bv : default_referral;
+                       rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                }
 
                rs->sr_err = LDAP_REFERRAL;
@@ -258,6 +268,13 @@ retry:     /* transaction retry */
                goto done;
        }
 
+       if ( get_assert( op ) &&
+               ( test_filter( op, e, get_assertion( op )) != LDAP_COMPARE_TRUE ))
+       {
+               rs->sr_err = LDAP_ASSERTION_FAILED;
+               goto return_results;
+       }
+
        rs->sr_err = access_allowed( op, e,
                entry, NULL, ACL_WRITE, NULL );
 
@@ -290,8 +307,7 @@ retry:      /* transaction retry */
                        "<=- bdb_delete: entry is referral\n", 0, 0, 0 );
 #else
                Debug( LDAP_DEBUG_TRACE,
-                       "bdb_delete: entry is referral\n",
-                       0, 0, 0 );
+                       "bdb_delete: entry is referral\n", 0, 0, 0 );
 #endif
 
                rs->sr_err = LDAP_REFERRAL;
@@ -306,6 +322,23 @@ retry:     /* transaction retry */
                goto done;
        }
 
+       /* pre-read */
+       if( op->o_preread ) {
+               if( slap_read_controls( op, rs, e,
+                       &slap_pre_read_bv, &ctrls[num_ctrls] ) )
+               {
+#ifdef NEW_LOGGING
+                       LDAP_LOG ( OPERATION, DETAIL1, 
+                               "<=- bdb_delete: pre-read failed!\n", 0, 0, 0 );
+#else
+                       Debug( LDAP_DEBUG_TRACE,
+                               "<=- bdb_delete: pre-read failed!\n", 0, 0, 0 );
+#endif
+                       goto return_results;
+               }
+               ctrls[++num_ctrls] = NULL;
+       }
+
        /* nested transaction */
        rs->sr_err = TXN_BEGIN( bdb->bi_dbenv, ltid, &lt2, 
                bdb->bi_db_opflags );
@@ -438,6 +471,16 @@ retry:     /* transaction retry */
        ldap_pvt_thread_mutex_unlock( &bdb->bi_lastid_mutex );
 #endif
 
+       if ( !op->o_bd->syncinfo ) {
+               rc = bdb_csn_commit( op, rs, ltid, ei, &suffix_ei, &ctxcsn_e, &ctxcsn_added, locker );
+               switch ( rc ) {
+               case BDB_CSN_ABORT :
+                       goto return_results;
+               case BDB_CSN_RETRY :
+                       goto retry;
+               }
+       }
+
        if( op->o_noop ) {
                if ( ( rs->sr_err = TXN_ABORT( ltid ) ) != 0 ) {
                        rs->sr_text = "txn_abort (no-op) failed";
@@ -446,8 +489,19 @@ retry:     /* transaction retry */
                        rs->sr_err = LDAP_SUCCESS;
                }
        } else {
+               struct berval ctx_nrdn;
+
                bdb_cache_delete( &bdb->bi_cache, e, bdb->bi_dbenv,
                        locker, &lock );
+
+               if ( !op->o_bd->syncinfo ) {
+                       if ( ctxcsn_added ) {
+                               ctx_nrdn.bv_val = "cn=ldapsync";
+                               ctx_nrdn.bv_len = strlen( ctx_nrdn.bv_val );
+                               bdb_cache_add( bdb, suffix_ei, ctxcsn_e, &ctx_nrdn, locker );
+                       }
+               }
+
                rs->sr_err = TXN_COMMIT( ltid, 0 );
        }
        ltid = NULL;
@@ -467,31 +521,31 @@ retry:    /* transaction retry */
                rs->sr_err = LDAP_OTHER;
                rs->sr_text = "commit failed";
 
-       } else {
+               goto return_results;
+       }
+
 #ifdef NEW_LOGGING
-               LDAP_LOG ( OPERATION, RESULTS, 
-                       "bdb_delete: deleted%s id=%08lx db=\"%s\"\n",
-                       op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn );
+       LDAP_LOG ( OPERATION, RESULTS, 
+               "bdb_delete: deleted%s id=%08lx db=\"%s\"\n",
+               op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn );
 #else
-               Debug( LDAP_DEBUG_TRACE,
-                       "bdb_delete: deleted%s id=%08lx dn=\"%s\"\n",
-                       op->o_noop ? " (no-op)" : "",
-                       e->e_id, e->e_dn );
+       Debug( LDAP_DEBUG_TRACE,
+               "bdb_delete: deleted%s id=%08lx dn=\"%s\"\n",
+               op->o_noop ? " (no-op)" : "",
+               e->e_id, e->e_dn );
 #endif
-               rs->sr_err = LDAP_SUCCESS;
-               rs->sr_text = NULL;
-       }
+       rs->sr_err = LDAP_SUCCESS;
+       rs->sr_text = NULL;
+       if( num_ctrls ) rs->sr_ctrls = ctrls;
 
 return_results:
        send_ldap_result( op, rs );
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
        if ( rs->sr_err == LDAP_SUCCESS && !noop ) {
                LDAP_LIST_FOREACH( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
                        bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_DELETE );
                }
        }
-#endif
 
        if(rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp ) {
                ldap_pvt_thread_yield();
index ac20900f597b83fe48e8a592c33a0db843b61115..1479051802e21d7fe21ef6c36ff704943cfe9b05 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "back-bdb.h"
 
-
 /*
  * dn2entry - look up dn in the cache/indexes and return the corresponding
  * entry. If the requested DN is not found and matched is TRUE, return info
index 0dd6a20d3bed54ac323b50f3db05bee4368a08f6..1bf131eb77d5865075edb5772954eb69ae43aaf6 100644 (file)
@@ -556,6 +556,7 @@ int hdb_fix_dn(
                }
                /* checkit == 2. do the fix. */
                free( e->e_name.bv_val );
+               free( e->e_nname.bv_val );
        }
 
        e->e_name.bv_len = rlen - 1;
index 92fda884d8eae41733694f73c8eaccfa442b8cd8..e95b86dd8fae57f39e9dda2e40a20cf14c8d7c80 100644 (file)
@@ -36,6 +36,9 @@ LDAP_BEGIN_DECL
 #define bdb_tool_entry_get                     BDB_SYMBOL(tool_entry_get)
 #define bdb_tool_entry_put                     BDB_SYMBOL(tool_entry_put)
 #define bdb_tool_entry_reindex         BDB_SYMBOL(tool_entry_reindex)
+#define bdb_tool_dn2id_get                     BDB_SYMBOL(tool_dn2id_get)
+#define bdb_tool_id2entry_get          BDB_SYMBOL(tool_id2entry_get)
+#define bdb_tool_entry_modify          BDB_SYMBOL(tool_entry_modify)
 
 extern BI_init bdb_initialize;
 
@@ -70,8 +73,9 @@ extern BI_tool_entry_next     bdb_tool_entry_next;
 extern BI_tool_entry_get       bdb_tool_entry_get;
 extern BI_tool_entry_put       bdb_tool_entry_put;
 extern BI_tool_entry_reindex   bdb_tool_entry_reindex;
-
-
+extern BI_tool_dn2id_get       bdb_tool_dn2id_get;
+extern BI_tool_id2entry_get    bdb_tool_id2entry_get;
+extern BI_tool_entry_modify    bdb_tool_entry_modify;
 
 LDAP_END_DECL
 
index 149e5fdbbf2b69cb0f25bd45fe93096a4a9ba700..32ec02b3571c4eaa6785283f63187370ffa846e4 100644 (file)
@@ -242,6 +242,7 @@ list_candidates(
                     f->f_result == LDAP_SUCCESS ) {
                        continue;
                }
+               BDB_IDL_ZERO( save );
                rc = bdb_filter_candidates( op, f, save, tmp,
                        save+BDB_IDL_UM_SIZE );
 
index c4196495cbf6237fe231d8be60e2239d8f79a801..271a92d40dd603f9dfd70767761f64db26063226 100644 (file)
@@ -147,14 +147,15 @@ static int indexer(
        AttributeDescription *ad,
        struct berval *atname,
        BerVarray vals,
+       BerVarray xvals,
        ID id,
        int opid,
        slap_mask_t mask )
 {
-       int rc, i;
+       int rc, i, j;
        const char *text;
        DB *db;
-       struct berval *keys;
+       struct berval *keys, *xkeys = NULL;
        void *mark;
 
        assert( mask );
@@ -174,11 +175,13 @@ static int indexer(
                return LDAP_OTHER;
        }
 
-#if 0  /* No longer needed, our frees are in order so nothing accumulates */
        mark = sl_mark(op->o_tmpmemctx);
-#endif
 
-       if( IS_SLAP_INDEX( mask, SLAP_INDEX_PRESENT ) ) {
+       /* For a delete op, make sure we're deleting the entire
+        * attribute (xvals == NULL) before changing the presence
+        * index. xvals is only non-NULL when deleting part of an attribute.
+        */
+       if( IS_SLAP_INDEX( mask, SLAP_INDEX_PRESENT ) && xvals == NULL ) {
                rc = bdb_key_change( op->o_bd, db, txn, &presence_key, id, opid );
                if( rc ) {
                        goto done;
@@ -194,14 +197,39 @@ static int indexer(
                        atname, vals, &keys, op->o_tmpmemctx );
 
                if( rc == LDAP_SUCCESS && keys != NULL ) {
+                       /* xvals is only provided on deletes. Generate the keys for
+                        * xvals, representing all of the keys that will exist in
+                        * the index when we're done. If we find a delete key that
+                        * is in the xkeys, nullify the delete on that key.
+                        */
+                       if( xvals ) {
+                               rc = ad->ad_type->sat_equality->smr_indexer(
+                                       LDAP_FILTER_EQUALITY, mask,
+                                       ad->ad_type->sat_syntax,
+                                       ad->ad_type->sat_equality,
+                                       atname, xvals, &xkeys,
+                                       op->o_tmpmemctx );
+
+                               for( i=0; keys[i].bv_val; i++ ) {
+                                       for( j=0; xkeys[j].bv_val != NULL; j++ ) {
+                                               if( bvmatch( &keys[i], &xkeys[j] ) ) {
+                                                       keys[i].bv_len = 0;
+                                               }
+                                       }
+                               }
+                       }
                        for( i=0; keys[i].bv_val != NULL; i++ ) {
+                               /* ignore nullified keys */
+                               if( keys[i].bv_len == 0 ) continue;
                                rc = bdb_key_change( op->o_bd, db, txn, &keys[i], id, opid );
-                               if( rc ) {
-                                       ber_bvarray_free_x( keys, op->o_tmpmemctx );
-                                       goto done;
-                               }
+                               if( rc ) break;
+                       }
+                       if( xkeys ) {
+                               ber_bvarray_free_x( xkeys, op->o_tmpmemctx );
+                               xkeys = NULL;
                        }
                        ber_bvarray_free_x( keys, op->o_tmpmemctx );
+                       if( rc ) goto done;
                }
                rc = LDAP_SUCCESS;
        }
@@ -215,14 +243,44 @@ static int indexer(
                        atname, vals, &keys, op->o_tmpmemctx );
 
                if( rc == LDAP_SUCCESS && keys != NULL ) {
+                       /* nullify duplicate keys */
+                       for( i=0; keys[i].bv_val; i++ ) {
+                               if( !keys[i].bv_len ) continue;
+                               for( j=i+1; keys[j].bv_val; j++ ) {
+                                       if( bvmatch( &keys[i], &keys[j] ) ) {
+                                               keys[j].bv_len = 0;
+                                               break;
+                                       }
+                               }
+                       }
+                       if( xvals ) {
+                               rc = ad->ad_type->sat_equality->smr_indexer(
+                                       LDAP_FILTER_APPROX, mask,
+                                       ad->ad_type->sat_syntax,
+                                       ad->ad_type->sat_approx,
+                                       atname, xvals, &xkeys,
+                                       op->o_tmpmemctx );
+
+                               for( i=0; keys[i].bv_val; i++ ) {
+                                       for( j=0; xkeys[j].bv_val != NULL; j++ ) {
+                                               if( bvmatch( &keys[i], &xkeys[j] ) ) {
+                                                       keys[i].bv_len = 0;
+                                               }
+                                       }
+                               }
+                       }
                        for( i=0; keys[i].bv_val != NULL; i++ ) {
+                               /* ignore nullified keys */
+                               if( keys[i].bv_len == 0 ) continue;
                                rc = bdb_key_change( op->o_bd, db, txn, &keys[i], id, opid );
-                               if( rc ) {
-                                       ber_bvarray_free_x( keys, op->o_tmpmemctx );
-                                       goto done;
-                               }
+                               if( rc ) break;
+                       }
+                       if( xkeys ) {
+                               ber_bvarray_free_x( xkeys, op->o_tmpmemctx );
+                               xkeys = NULL;
                        }
                        ber_bvarray_free_x( keys, op->o_tmpmemctx );
+                       if( rc ) goto done;
                }
 
                rc = LDAP_SUCCESS;
@@ -237,23 +295,51 @@ static int indexer(
                        atname, vals, &keys, op->o_tmpmemctx );
 
                if( rc == LDAP_SUCCESS && keys != NULL ) {
+                       /* nullify duplicate keys */
+                       for( i=0; keys[i].bv_val; i++ ) {
+                               if( !keys[i].bv_len ) continue;
+                               for( j=i+1; keys[j].bv_val; j++ ) {
+                                       if( bvmatch( &keys[i], &keys[j] ) ) {
+                                               keys[j].bv_len = 0;
+                                               break;
+                                       }
+                               }
+                       }
+                       if( xvals ) {
+                               rc = ad->ad_type->sat_equality->smr_indexer(
+                                       LDAP_FILTER_SUBSTRINGS, mask,
+                                       ad->ad_type->sat_syntax,
+                                       ad->ad_type->sat_substr,
+                                       atname, xvals, &xkeys,
+                                       op->o_tmpmemctx );
+
+                               for( i=0; keys[i].bv_val; i++ ) {
+                                       for( j=0; xkeys[j].bv_val != NULL; j++ ) {
+                                               if( bvmatch( &keys[i], &xkeys[j] ) ) {
+                                                       keys[i].bv_len = 0;
+                                               }
+                                       }
+                               }
+                       }
                        for( i=0; keys[i].bv_val != NULL; i++ ) {
+                               /* ignore nullified keys */
+                               if ( keys[i].bv_len == 0 ) continue;
                                bdb_key_change( op->o_bd, db, txn, &keys[i], id, opid );
-                               if( rc ) {
-                                       ber_bvarray_free_x( keys, op->o_tmpmemctx );
-                                       goto done;
-                               }
+                               if( rc ) break;
+                       }
+                       if( xkeys ) {
+                               ber_bvarray_free_x( xkeys, op->o_tmpmemctx );
+                               xkeys = NULL;
                        }
                        ber_bvarray_free_x( keys, op->o_tmpmemctx );
+                       if( rc ) goto done;
                }
 
                rc = LDAP_SUCCESS;
        }
 
 done:
-#if 0
        sl_release( mark, op->o_tmpmemctx );
-#endif
        return rc;
 }
 
@@ -264,6 +350,7 @@ static int index_at_values(
        AttributeType *type,
        struct berval *tags,
        BerVarray vals,
+       BerVarray xvals,
        ID id,
        int opid )
 {
@@ -274,7 +361,7 @@ static int index_at_values(
                /* recurse */
                rc = index_at_values( op, txn, NULL,
                        type->sat_sup, tags,
-                       vals, id, opid );
+                       vals, xvals, id, opid );
 
                if( rc ) return rc;
        }
@@ -287,7 +374,7 @@ static int index_at_values(
 
        if( mask ) {
                rc = indexer( op, txn, ad, &type->sat_cname,
-                       vals, id, opid,
+                       vals, xvals, id, opid,
                        mask );
 
                if( rc ) return rc;
@@ -305,7 +392,7 @@ static int index_at_values(
 
                if( mask ) {
                        rc = indexer( op, txn, desc, &desc->ad_cname,
-                               vals, id, opid,
+                               vals, xvals, id, opid,
                                mask );
 
                        if( rc ) {
@@ -322,6 +409,7 @@ int bdb_index_values(
        DB_TXN *txn,
        AttributeDescription *desc,
        BerVarray vals,
+       BerVarray xvals,
        ID id,
        int opid )
 {
@@ -329,7 +417,7 @@ int bdb_index_values(
 
        rc = index_at_values( op, txn, desc,
                desc->ad_type, &desc->ad_tags,
-               vals, id, opid );
+               vals, xvals, id, opid );
 
        return rc;
 }
@@ -356,7 +444,7 @@ bdb_index_entry(
        /* add each attribute to the indexes */
        for ( ; ap != NULL; ap = ap->a_next ) {
                rc = bdb_index_values( op, txn, ap->a_desc,
-                       ap->a_nvals, e->e_id, opid );
+                       ap->a_nvals, NULL, e->e_id, opid );
 
                if( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
index 41ecef07a0837aa0110501f33f7588275543d922..8a5a468af165e6157970f6833c6d311e00138870 100644 (file)
@@ -68,6 +68,7 @@ bdb_db_init( BackendDB *be )
 
        /* indicate system schema supported */
        be->be_flags |=
+               SLAP_BFLAG_INCREMENT |
 #ifdef BDB_SUBENTRIES
                SLAP_BFLAG_SUBENTRIES |
 #endif
@@ -90,9 +91,7 @@ bdb_db_init( BackendDB *be )
        bdb->bi_search_stack_depth = DEFAULT_SEARCH_STACK_DEPTH;
        bdb->bi_search_stack = NULL;
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
        LDAP_LIST_INIT (&bdb->bi_psearch_list);
-#endif
 
        ldap_pvt_thread_mutex_init( &bdb->bi_lastid_mutex );
        ldap_pvt_thread_mutex_init( &bdb->bi_cache.lru_mutex );
@@ -200,6 +199,7 @@ bdb_db_open( BackendDB *be )
 
 #ifdef SLAP_IDL_CACHE
        if ( bdb->bi_idl_cache_max_size ) {
+               bdb->bi_idl_tree = NULL;
                ldap_pvt_thread_rdwr_init( &bdb->bi_idl_tree_rwlock );
                ldap_pvt_thread_mutex_init( &bdb->bi_idl_tree_lrulock );
                bdb->bi_idl_cache_size = 0;
@@ -553,7 +553,7 @@ bdb_db_destroy( BackendDB *be )
 }
 
 #ifdef SLAPD_BDB_DYNAMIC
-int back_bdb_LTX_init_module( int argc, char *argv[] ) {
+int init_module( int argc, char *argv[] ) {
        BackendInfo bi;
 
        memset( &bi, '\0', sizeof(bi) );
@@ -571,18 +571,16 @@ bdb_initialize(
 )
 {
        static char *controls[] = {
+               LDAP_CONTROL_ASSERT,
                LDAP_CONTROL_MANAGEDSAIT,
                LDAP_CONTROL_NOOP,
 #ifdef LDAP_CONTROL_PAGEDRESULTS
                LDAP_CONTROL_PAGEDRESULTS,
 #endif
-               LDAP_CONTROL_VALUESRETURNFILTER,
 #ifdef LDAP_CONTROL_SUBENTRIES
                LDAP_CONTROL_SUBENTRIES,
 #endif
-#ifdef LDAP_CLIENT_UPDATE
-               LDAP_CONTROL_CLIENT_UPDATE,
-#endif
+               LDAP_CONTROL_VALUESRETURNFILTER,
                NULL
        };
 
@@ -617,13 +615,14 @@ bdb_initialize(
                {
 #ifdef NEW_LOGGING
                        LDAP_LOG( BACK_BDB, ERR, 
-                               "bdb_db_initialize: version mismatch: "
-                               "\texpected: %s \tgot: %s\n", DB_VERSION_STRING, version, 0 );
+                               "bdb_initialize: BDB library version mismatch:"
+                               " expected " DB_VERSION_STRING ","
+                               " got %s\n", version, 0, 0 );
 #else
                        Debug( LDAP_DEBUG_ANY,
-                               "bdb_initialize: version mismatch\n"
-                               "\texpected: " DB_VERSION_STRING "\n"
-                               "\tgot: %s \n", version, 0, 0 );
+                               "bdb_initialize: BDB library version mismatch:"
+                               " expected " DB_VERSION_STRING ","
+                               " got %s\n", version, 0, 0 );
 #endif
                }
 
@@ -674,13 +673,8 @@ bdb_initialize(
 
        bi->bi_op_unbind = 0;
 
-#ifdef LDAP_CLIENT_UPDATE
        bi->bi_op_abandon = bdb_abandon;
        bi->bi_op_cancel = bdb_cancel;
-#else
-       bi->bi_op_abandon = 0;
-       bi->bi_op_cancel = 0;
-#endif
 
        bi->bi_extended = bdb_extended;
 
@@ -701,6 +695,9 @@ bdb_initialize(
        bi->bi_tool_entry_put = bdb_tool_entry_put;
        bi->bi_tool_entry_reindex = bdb_tool_entry_reindex;
        bi->bi_tool_sync = 0;
+       bi->bi_tool_dn2id_get = bdb_tool_dn2id_get;
+       bi->bi_tool_id2entry_get = bdb_tool_id2entry_get;
+       bi->bi_tool_entry_modify = bdb_tool_entry_modify;
 
        bi->bi_connection_init = 0;
        bi->bi_connection_destroy = 0;
index 387f9f5551c172cbc38ebd9a5900189f763d4ddb..68806a7859a6d512825da2a1b716d2cf17389771 100644 (file)
@@ -112,6 +112,28 @@ int bdb_modify_internal(
                        }
                        break;
 
+               case LDAP_MOD_INCREMENT:
+#ifdef NEW_LOGGING
+                       LDAP_LOG ( OPERATION, DETAIL1, 
+                               "bdb_modify_internal: increment\n", 0, 0, 0 );
+#else
+                       Debug(LDAP_DEBUG_ARGS,
+                               "bdb_modify_internal: increment\n", 0, 0, 0);
+#endif
+                       err = modify_increment_values( e, mod, get_permissiveModify(op),
+                               text, textbuf, textlen );
+                       if( err != LDAP_SUCCESS ) {
+#ifdef NEW_LOGGING
+                               LDAP_LOG ( OPERATION, ERR, 
+                                       "bdb_modify_internal: %d %s\n", err, *text, 0 );
+#else
+                               Debug(LDAP_DEBUG_ARGS,
+                                       "bdb_modify_internal: %d %s\n",
+                                       err, *text, 0);
+#endif
+                       }
+                       break;
+
                case SLAP_MOD_SOFTADD:
 #ifdef NEW_LOGGING
                        LDAP_LOG ( OPERATION, DETAIL1, 
@@ -230,8 +252,10 @@ int bdb_modify_internal(
                        switch ( ml->sml_op ) {
                        case LDAP_MOD_DELETE:
                                if ( ml->sml_bvalues ) {
+                                       ap = attr_find( e->e_attrs, ml->sml_desc );
                                        rc = bdb_index_values( op, tid, ml->sml_desc,
                                                ml->sml_nvalues ? ml->sml_nvalues : ml->sml_bvalues,
+                                               ap ? ap->a_nvals : NULL,
                                                e->e_id, SLAP_INDEX_DELETE_OP );
                                        break;
                                }
@@ -242,7 +266,7 @@ int bdb_modify_internal(
                                ap = attr_find( save_attrs, ml->sml_desc );
                                if ( ap != NULL ) {
                                        rc = bdb_index_values( op, tid, ap->a_desc,
-                                               ap->a_nvals,
+                                               ap->a_nvals, NULL,
                                                e->e_id, SLAP_INDEX_DELETE_OP );
                                } else {
                                        rc = LDAP_SUCCESS;
@@ -255,7 +279,7 @@ int bdb_modify_internal(
                        case SLAP_MOD_SOFTADD:
                                rc = bdb_index_values( op, tid, ml->sml_desc,
                                        ml->sml_nvalues ? ml->sml_nvalues : ml->sml_bvalues,
-                                       e->e_id, SLAP_INDEX_ADD_OP );
+                                       NULL, e->e_id, SLAP_INDEX_ADD_OP );
                                break;
                        }
                        ml->sml_op &= ~NULLIFIED;
@@ -302,10 +326,17 @@ bdb_modify( Operation *op, SlapReply *rs )
 
        int             noop = 0;
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+       int             num_retries = 0;
+
+       LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
+       int num_ctrls = 0;
+
        Operation* ps_list;
        struct psid_entry *pm_list, *pm_prev;
-#endif
+       int rc;
+       EntryInfo       *suffix_ei;
+       Entry           *ctxcsn_e;
+       int                     ctxcsn_added = 0;
 
 #ifdef NEW_LOGGING
        LDAP_LOG ( OPERATION, ENTRY, "bdb_modify: %s\n", op->o_req_dn.bv_val, 0, 0 );
@@ -326,7 +357,6 @@ retry:      /* transaction retry */
                        "bdb_modify: retrying...\n", 0, 0, 0);
 #endif
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
                pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
                while ( pm_list != NULL ) {
                        LDAP_LIST_REMOVE ( pm_list, ps_link );
@@ -334,7 +364,6 @@ retry:      /* transaction retry */
                        pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
                        ch_free( pm_prev );
                }
-#endif
 
                rs->sr_err = TXN_ABORT( ltid );
                ltid = NULL;
@@ -345,6 +374,7 @@ retry:      /* transaction retry */
                        rs->sr_text = "internal error";
                        goto return_results;
                }
+               bdb_trans_backoff( ++num_retries );
                ldap_pvt_thread_yield();
        }
 
@@ -406,7 +436,8 @@ retry:      /* transaction retry */
 
        e = ei->bei_e;
        /* acquire and lock entry */
-       if ( rs->sr_err == DB_NOTFOUND ) {
+       /* FIXME: dn2entry() should return non-glue entry */
+       if (( rs->sr_err == DB_NOTFOUND ) || ( !manageDSAit && e && is_entry_glue( e ))) {
                if ( e != NULL ) {
                        rs->sr_matched = ch_strdup( e->e_dn );
                        rs->sr_ref = is_entry_referral( e )
@@ -416,8 +447,9 @@ retry:      /* transaction retry */
                        e = NULL;
 
                } else {
-                       rs->sr_ref = referral_rewrite( default_referral,
-                               NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
+                       BerVarray deref = op->o_bd->syncinfo ?
+                                                         op->o_bd->syncinfo->provideruri_bv : default_referral;
+                       rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                }
 
                rs->sr_err = LDAP_REFERRAL;
@@ -453,14 +485,36 @@ retry:    /* transaction retry */
                goto done;
        }
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+       if ( get_assert( op ) &&
+               ( test_filter( op, e, get_assertion( op )) != LDAP_COMPARE_TRUE ))
+       {
+               rs->sr_err = LDAP_ASSERTION_FAILED;
+               goto return_results;
+       }
+
        if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
                LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
                        bdb_psearch(op, rs, ps_list, e, LDAP_PSEARCH_BY_PREMODIFY );
                }
        }
+
+       if( op->o_preread ) {
+               if ( slap_read_controls( op, rs, e,
+                       &slap_pre_read_bv, &ctrls[num_ctrls] ) )
+               {
+#ifdef NEW_LOGGING
+                       LDAP_LOG ( OPERATION, DETAIL1,
+                               "<=- bdb_modify: pre-read failed!\n", 0, 0, 0 );
+#else
+                       Debug( LDAP_DEBUG_TRACE,
+                               "<=- bdb_modify: pre-read failed!\n", 0, 0, 0 );
 #endif
-       
+                       goto return_results;
+               }
+               ctrls[++num_ctrls] = NULL;
+               op->o_preread = 0; /* prevent redo on retry */
+       }
+
        /* nested transaction */
        rs->sr_err = TXN_BEGIN( bdb->bi_dbenv, ltid, &lt2, 
                bdb->bi_db_opflags );
@@ -503,6 +557,24 @@ retry:     /* transaction retry */
                goto return_results;
        }
 
+       if( op->o_postread ) {
+               if( slap_read_controls( op, rs, e,
+                       &slap_post_read_bv, &ctrls[num_ctrls] ) )
+               {
+#ifdef NEW_LOGGING
+                       LDAP_LOG ( OPERATION, DETAIL1,
+                               "<=- bdb_modify: post-read failed!\n", 0, 0, 0 );
+#else
+                       Debug( LDAP_DEBUG_TRACE,
+                               "<=- bdb_modify: post-read failed!\n", 0, 0, 0 );
+#endif
+                       goto return_results;
+               }
+               ctrls[++num_ctrls] = NULL;
+               op->o_postread = 0;  /* prevent redo on retry */
+               /* FIXME: should read entry on the last retry */
+       }
+
        /* change the entry itself */
        rs->sr_err = bdb_id2entry_update( op->o_bd, lt2, &dummy );
        if ( rs->sr_err != 0 ) {
@@ -522,12 +594,24 @@ retry:    /* transaction retry */
                rs->sr_text = "entry update failed";
                goto return_results;
        }
+
        if ( TXN_COMMIT( lt2, 0 ) != 0 ) {
                rs->sr_err = LDAP_OTHER;
                rs->sr_text = "txn_commit(2) failed";
                goto return_results;
        }
 
+       if ( !op->o_bd->syncinfo ) {
+               rc = bdb_csn_commit( op, rs, ltid, ei, &suffix_ei,
+                       &ctxcsn_e, &ctxcsn_added, locker );
+               switch ( rc ) {
+               case BDB_CSN_ABORT :
+                       goto return_results;
+               case BDB_CSN_RETRY :
+                       goto retry;
+               }
+       }
+
        if( op->o_noop ) {
                if ( ( rs->sr_err = TXN_ABORT( ltid ) ) != 0 ) {
                        rs->sr_text = "txn_abort (no-op) failed";
@@ -536,7 +620,19 @@ retry:     /* transaction retry */
                        rs->sr_err = LDAP_SUCCESS;
                }
        } else {
+               struct berval ctx_nrdn;
+               EntryInfo *ctx_ei;
+
                bdb_cache_modify( e, dummy.e_attrs, bdb->bi_dbenv, locker, &lock );
+
+               if ( !op->o_bd->syncinfo ) {
+                       if ( ctxcsn_added ) {
+                               ctx_nrdn.bv_val = "cn=ldapsync";
+                               ctx_nrdn.bv_len = strlen( ctx_nrdn.bv_val );
+                               bdb_cache_add( bdb, suffix_ei, ctxcsn_e, &ctx_nrdn, locker );
+                       }
+               }
+
                rs->sr_err = TXN_COMMIT( ltid, 0 );
        }
        ltid = NULL;
@@ -546,7 +642,8 @@ retry:      /* transaction retry */
 #ifdef NEW_LOGGING
                LDAP_LOG ( OPERATION, ERR, 
                        "bdb_modify: txn_%s failed %s (%d)\n", 
-                       op->o_noop ? "abort (no_op)" : "commit", db_strerror(rs->sr_err), rs->sr_err );
+                       op->o_noop ? "abort (no_op)" : "commit",
+                       db_strerror(rs->sr_err), rs->sr_err );
 #else
                Debug( LDAP_DEBUG_TRACE,
                        "bdb_modify: txn_%s failed: %s (%d)\n",
@@ -556,25 +653,27 @@ retry:    /* transaction retry */
                rs->sr_err = LDAP_OTHER;
                rs->sr_text = "commit failed";
 
-       } else {
+               goto return_results;
+       }
+
 #ifdef NEW_LOGGING
-               LDAP_LOG ( OPERATION, DETAIL1, 
-                       "bdb_modify: updated%s id=%08lx dn=\"%s\"\n", 
-                       op->o_noop ? " (no_op)" : "", e->e_id, e->e_dn );
+       LDAP_LOG ( OPERATION, DETAIL1, 
+               "bdb_modify: updated%s id=%08lx dn=\"%s\"\n", 
+               op->o_noop ? " (no_op)" : "", e->e_id, e->e_dn );
 #else
-               Debug( LDAP_DEBUG_TRACE,
-                       "bdb_modify: updated%s id=%08lx dn=\"%s\"\n",
-                       op->o_noop ? " (no-op)" : "",
-                       e->e_id, e->e_dn );
+       Debug( LDAP_DEBUG_TRACE,
+               "bdb_modify: updated%s id=%08lx dn=\"%s\"\n",
+               op->o_noop ? " (no-op)" : "",
+               e->e_id, e->e_dn );
 #endif
-               rs->sr_err = LDAP_SUCCESS;
-               rs->sr_text = NULL;
-       }
+
+       rs->sr_err = LDAP_SUCCESS;
+       rs->sr_text = NULL;
+       if( num_ctrls ) rs->sr_ctrls = ctrls;
 
 return_results:
        send_ldap_result( op, rs );
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
        if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
                /* Loop through in-scope entries for each psearch spec */
                LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
@@ -590,7 +689,6 @@ return_results:
                        ch_free( pm_prev );
                }
        }
-#endif
 
        if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp ) {
                ldap_pvt_thread_yield();
@@ -600,7 +698,6 @@ return_results:
 
 done:
        if( ltid != NULL ) {
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
                pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
                while ( pm_list != NULL ) {
                        LDAP_LIST_REMOVE ( pm_list, ps_link );
@@ -608,7 +705,6 @@ done:
                        pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
                        ch_free( pm_prev );
                }
-#endif
                TXN_ABORT( ltid );
                op->o_private = NULL;
        }
index 412426f0b220c6d0a43607f32c8aeb8bf692b845..80d41518d51d9ce9c2c05540357c18aedd1fe5e4 100644 (file)
@@ -51,10 +51,17 @@ bdb_modrdn( Operation       *op, SlapReply *rs )
 
        int             noop = 0;
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-        Operation *ps_list;
+       int             num_retries = 0;
+
+       LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
+       int num_ctrls = 0;
+
+       Operation *ps_list;
        struct psid_entry *pm_list, *pm_prev;
-#endif
+       int     rc;
+       EntryInfo       *suffix_ei;
+       Entry           *ctxcsn_e;
+       int                     ctxcsn_added = 0;
 
 #ifdef NEW_LOGGING
        LDAP_LOG ( OPERATION, ENTRY, "==>bdb_modrdn(%s,%s,%s)\n", 
@@ -86,15 +93,13 @@ retry:      /* transaction retry */
                Debug( LDAP_DEBUG_TRACE, "==>bdb_modrdn: retrying...\n", 0, 0, 0 );
 #endif
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-                pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
-                while ( pm_list != NULL ) {
-                        LDAP_LIST_REMOVE ( pm_list, ps_link );
+               pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
+               while ( pm_list != NULL ) {
+                       LDAP_LIST_REMOVE ( pm_list, ps_link );
                        pm_prev = pm_list;
-                        pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
+                       pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
                        ch_free( pm_prev );
-                }
-#endif
+               }
 
                rs->sr_err = TXN_ABORT( ltid );
                ltid = NULL;
@@ -105,6 +110,7 @@ retry:      /* transaction retry */
                        rs->sr_text = "internal error";
                        goto return_results;
                }
+               bdb_trans_backoff( ++num_retries );
                ldap_pvt_thread_yield();
        }
 
@@ -157,7 +163,8 @@ retry:      /* transaction retry */
        }
 
        e = ei->bei_e;
-       if ( rs->sr_err == DB_NOTFOUND ) {
+       /* FIXME: dn2entry() should return non-glue entry */
+       if (( rs->sr_err == DB_NOTFOUND ) || ( !manageDSAit && e && is_entry_glue( e ))) {
                if( e != NULL ) {
                        rs->sr_matched = ch_strdup( e->e_dn );
                        rs->sr_ref = is_entry_referral( e )
@@ -167,8 +174,9 @@ retry:      /* transaction retry */
                        e = NULL;
 
                } else {
-                       rs->sr_ref = referral_rewrite( default_referral,
-                               NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
+                       BerVarray deref = op->o_bd->syncinfo ?
+                                                         op->o_bd->syncinfo->provideruri_bv : default_referral;
+                       rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                }
 
                rs->sr_err = LDAP_REFERRAL;
@@ -182,9 +190,15 @@ retry:     /* transaction retry */
                goto done;
        }
 
+       if ( get_assert( op ) &&
+               ( test_filter( op, e, get_assertion( op )) != LDAP_COMPARE_TRUE ))
+       {
+               rs->sr_err = LDAP_ASSERTION_FAILED;
+               goto return_results;
+       }
+
        /* check write on old entry */
        rs->sr_err = access_allowed( op, e, entry, NULL, ACL_WRITE, NULL );
-
        if ( ! rs->sr_err ) {
                switch( opinfo.boi_err ) {
                case DB_LOCK_DEADLOCK:
@@ -667,6 +681,7 @@ retry:      /* transaction retry */
                new_ndn.bv_val, 0, 0 );
 #endif
 
+
        /* Shortcut the search */
        nei = neip ? neip : eip;
        rs->sr_err = bdb_cache_find_ndn ( op, ltid, &new_ndn, &nei, locker );
@@ -751,6 +766,23 @@ retry:     /* transaction retry */
                }
        }
 
+       if( op->o_preread ) {
+               if( slap_read_controls( op, rs, e,
+                       &slap_pre_read_bv, &ctrls[num_ctrls] ) )
+               {
+#ifdef NEW_LOGGING                                   
+                       LDAP_LOG ( OPERATION, DETAIL1,
+                               "<=- bdb_modrdn: post-read failed!\n", 0, 0, 0 );
+#else
+                       Debug( LDAP_DEBUG_TRACE,        
+                               "<=- bdb_modrdn: post-read failed!\n", 0, 0, 0 );
+#endif
+                       goto return_results;
+               }                   
+               ctrls[++num_ctrls] = NULL;
+               op->o_preread = 0;  /* prevent redo on retry */
+       }
+
        /* nested transaction */
        rs->sr_err = TXN_BEGIN( bdb->bi_dbenv, ltid, &lt2, 
                bdb->bi_db_opflags );
@@ -832,13 +864,11 @@ retry:    /* transaction retry */
                goto return_results;
        }
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
        if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
                LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
                        bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_PREMODIFY );
                }
        }
-#endif
 
        /* modify entry */
        rs->sr_err = bdb_modify_internal( op, lt2, &mod[0], e,
@@ -864,7 +894,25 @@ retry:     /* transaction retry */
                }
                goto return_results;
        }
-       
+
+       if( op->o_postread ) {
+               if( slap_read_controls( op, rs, e,
+                       &slap_post_read_bv, &ctrls[num_ctrls] ) )
+               {
+#ifdef NEW_LOGGING                                   
+                       LDAP_LOG ( OPERATION, DETAIL1,
+                               "<=- bdb_modrdn: post-read failed!\n", 0, 0, 0 );
+#else
+                       Debug( LDAP_DEBUG_TRACE,        
+                               "<=- bdb_modrdn: post-read failed!\n", 0, 0, 0 );
+#endif
+                       goto return_results;
+               }                   
+               ctrls[++num_ctrls] = NULL;
+               op->o_postread = 0;  /* prevent redo on retry */
+               /* FIXME: should read entry on the last retry */
+       }
+
        /* id2entry index */
        rs->sr_err = bdb_id2entry_update( op->o_bd, lt2, e );
        if ( rs->sr_err != 0 ) {
@@ -892,6 +940,16 @@ retry:     /* transaction retry */
                goto return_results;
        }
 
+       if ( !op->o_bd->syncinfo ) {
+               rc = bdb_csn_commit( op, rs, ltid, ei, &suffix_ei, &ctxcsn_e, &ctxcsn_added, locker );
+               switch ( rc ) {
+               case BDB_CSN_ABORT :
+                       goto return_results;
+               case BDB_CSN_RETRY :
+                       goto retry;
+               }
+       }
+
        if( op->o_noop ) {
                if(( rs->sr_err=TXN_ABORT( ltid )) != 0 ) {
                        rs->sr_text = "txn_abort (no-op) failed";
@@ -909,8 +967,19 @@ retry:     /* transaction retry */
                if(( rs->sr_err=TXN_PREPARE( ltid, gid )) != 0 ) {
                        rs->sr_text = "txn_prepare failed";
                } else {
+                       struct berval ctx_nrdn;
+
                        bdb_cache_modrdn( save, &op->orr_nnewrdn, e, neip,
                                bdb->bi_dbenv, locker, &lock );
+
+                       if ( !op->o_bd->syncinfo ) {
+                               if ( ctxcsn_added ) {
+                                       ctx_nrdn.bv_val = "cn=ldapsync";
+                                       ctx_nrdn.bv_len = strlen( ctx_nrdn.bv_val );
+                                       bdb_cache_add( bdb, suffix_ei, ctxcsn_e, &ctx_nrdn, locker );
+                               }
+                       }
+
                        if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
                                rs->sr_text = "txn_commit failed";
                        } else {
@@ -922,18 +991,7 @@ retry:     /* transaction retry */
        ltid = NULL;
        op->o_private = NULL;
  
-       if( rs->sr_err == LDAP_SUCCESS ) {
-#ifdef NEW_LOGGING
-               LDAP_LOG ( OPERATION, RESULTS, 
-                       "bdb_modrdn: rdn modified%s id=%08lx dn=\"%s\"\n", 
-                       op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn );
-#else
-               Debug(LDAP_DEBUG_TRACE,
-                       "bdb_modrdn: rdn modified%s id=%08lx dn=\"%s\"\n",
-                       op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn );
-#endif
-               rs->sr_text = NULL;
-       } else {
+       if( rs->sr_err != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
                LDAP_LOG ( OPERATION, RESULTS, "bdb_modrdn: %s : %s (%d)\n", 
                        rs->sr_text, db_strerror(rs->sr_err), rs->sr_err );
@@ -942,12 +1000,25 @@ retry:   /* transaction retry */
                        rs->sr_text, db_strerror(rs->sr_err), rs->sr_err );
 #endif
                rs->sr_err = LDAP_OTHER;
+
+               goto return_results;
        }
 
+#ifdef NEW_LOGGING
+       LDAP_LOG ( OPERATION, RESULTS, 
+               "bdb_modrdn: rdn modified%s id=%08lx dn=\"%s\"\n", 
+               op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn );
+#else
+       Debug(LDAP_DEBUG_TRACE,
+               "bdb_modrdn: rdn modified%s id=%08lx dn=\"%s\"\n",
+               op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn );
+#endif
+       rs->sr_text = NULL;
+       if( num_ctrls ) rs->sr_ctrls = ctrls;
+
 return_results:
        send_ldap_result( op, rs );
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
        if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
                /* Loop through in-scope entries for each psearch spec */
                LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
@@ -963,7 +1034,6 @@ return_results:
                        ch_free( pm_prev );
                }
        }
-#endif
 
        if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp ) {
                ldap_pvt_thread_yield();
@@ -1008,15 +1078,13 @@ done:
        }
 
        if( ltid != NULL ) {
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-                pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
-                while ( pm_list != NULL ) {
-                        LDAP_LIST_REMOVE ( pm_list, ps_link );
+               pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
+               while ( pm_list != NULL ) {
+                       LDAP_LIST_REMOVE ( pm_list, ps_link );
                        pm_prev = pm_list;
-                        pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
+                       pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
                        ch_free( pm_prev );
-                }
-#endif
+               }
                TXN_ABORT( ltid );
                op->o_private = NULL;
        }
index a3c0ebf408ccd3a65d4fcb88461905b93561aaeb..e8ca8f70f76434e4aa7bc107504b4ce084057a03 100644 (file)
@@ -36,6 +36,8 @@ bdb_exop_passwd( Operation *op, SlapReply *rs )
        u_int32_t       locker = 0;
        DB_LOCK         lock;
 
+       int             num_retries = 0;
+
        assert( ber_bvcmp( &slap_EXOP_MODIFY_PASSWD, &op->oq_extended.rs_reqoid ) == 0 );
 
        rc = slap_passwd_parse( op->oq_extended.rs_reqdata,
@@ -118,6 +120,7 @@ retry:      /* transaction retry */
                        rs->sr_text = "internal error";
                        goto done;
                }
+               bdb_trans_backoff( ++num_retries );
                ldap_pvt_thread_yield();
        }
 
@@ -170,7 +173,8 @@ retry:      /* transaction retry */
 
        if ( ei ) e = ei->bei_e;
 
-       if( e == NULL ) {
+       if ( e == NULL || is_entry_glue( e )) {
+                       /* FIXME: dn2entry() should return non-glue entry */
                rs->sr_text = "could not locate authorization entry";
                rc = LDAP_NO_SUCH_OBJECT;
                goto done;
@@ -184,6 +188,7 @@ retry:      /* transaction retry */
                goto done;
        }
 #endif
+
 #ifdef BDB_ALIASES
        if( is_entry_alias( e ) ) {
                /* entry is an alias, don't allow operation */
@@ -207,7 +212,8 @@ retry:      /* transaction retry */
        if( rc != 0 ) {
 #ifdef NEW_LOGGING
                LDAP_LOG ( OPERATION, ERR, 
-                       "bdb_exop_passwd: txn_begin(2) failed: %s (%d)\n", db_strerror(rs->sr_err), rs->sr_err, 0 );
+                       "bdb_exop_passwd: txn_begin(2) failed: %s (%d)\n",
+                       db_strerror(rs->sr_err), rs->sr_err, 0 );
 #else
                Debug( LDAP_DEBUG_TRACE,
                        "bdb_exop_passwd: txn_begin(2) failed: %s (%d)\n",
@@ -217,6 +223,7 @@ retry:      /* transaction retry */
                rs->sr_text = "internal error";
                goto done;
        }
+
        {
                Modifications ml;
                struct berval vals[2];
index 27e10d5f4ca72ea191ff8479a3387e5e6bfff270..58f1d92dc41302e3833388874e2590b37ec4e83a 100644 (file)
@@ -33,6 +33,20 @@ int bdb_attr_index_config LDAP_P(( struct bdb_info *bdb,
 
 void bdb_attr_index_destroy LDAP_P(( Avlnode *tree ));
 
+/*
+ * ctxcsn.c
+ */
+#define bdb_csn_commit                         BDB_SYMBOL(csn_commit)
+#define bdb_get_commit_csn                     BDB_SYMBOL(get_commit_csn)
+
+int bdb_csn_commit LDAP_P(( Operation *op, SlapReply *rs, DB_TXN *tid,
+                                               EntryInfo *ei, EntryInfo **suffix_ei, Entry **ctxcsn_e,
+                                               int *ctxcsn_added, u_int32_t locker ));
+
+int bdb_get_commit_csn LDAP_P(( Operation *op, SlapReply *rs,
+                                               struct berval **search_context_csn,
+                                               u_int32_t locker, DB_LOCK *ctxcsn_lock ));
+
 /*
  * dbcache.c
  */
@@ -294,15 +308,16 @@ bdb_index_values LDAP_P((
        DB_TXN *txn,
        AttributeDescription *desc,
        BerVarray vals,
+       BerVarray xvals,
        ID id,
        int opid ));
 
 int bdb_index_entry LDAP_P(( Operation *op, DB_TXN *t, int r, Entry *e ));
 
-#define bdb_index_entry_add(be,t,e) \
-       bdb_index_entry((be),(t),SLAP_INDEX_ADD_OP,(e))
-#define bdb_index_entry_del(be,t,e) \
-       bdb_index_entry((be),(t),SLAP_INDEX_DELETE_OP,(e))
+#define bdb_index_entry_add(op,t,e) \
+       bdb_index_entry((op),(t),SLAP_INDEX_ADD_OP,(e))
+#define bdb_index_entry_del(op,t,e) \
+       bdb_index_entry((op),(t),SLAP_INDEX_DELETE_OP,(e))
 
 /*
  * init.c
@@ -467,6 +482,15 @@ void bdb_cache_delete_cleanup(
 );
 void bdb_cache_release_all( Cache *cache );
 
+#define bdb_cache_entry_db_relock              BDB_SYMBOL(cache_entry_db_relock)
+int bdb_cache_entry_db_relock(
+       DB_ENV *env,
+       u_int32_t locker,
+       EntryInfo *ei,
+       int rw,
+       int tryOnly,
+       DB_LOCK *lock );
+
 #ifdef BDB_REUSE_LOCKERS
 
 #define bdb_locker_id                          BDB_SYMBOL(locker_id)
@@ -486,8 +510,6 @@ int bdb_locker_id( Operation *op, DB_ENV *env, int *locker );
  * search.c
  */
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-
 #define bdb_abandon                                    BDB_SYMBOL(abandon)
 #define bdb_cancel                                     BDB_SYMBOL(cancel)
 #define bdb_do_search                          BDB_SYMBOL(do_search)
@@ -503,34 +525,7 @@ int bdb_do_search(
        int             psearch_type
 );
 #define        bdb_psearch(op, rs, sop, e, ps_type)    bdb_do_search(op, rs, sop, e, ps_type)
-#endif
-
 
-#ifdef LDAP_CLIENT_UPDATE
-#define bdb_build_lcup_update_ctrl     BDB_SYMBOL(build_lcup_update_ctrl)
-#define bdb_build_lcup_done_ctrl       BDB_SYMBOL(build_lcup_done_ctrl)
-
-int
-bdb_build_lcup_update_ctrl(
-       Operation       *op,
-       SlapReply       *rs,
-       Entry           *e,
-       int             entry_count,
-       LDAPControl     **ctrls,
-       int             num_ctrls,
-       struct berval   *latest_entrycsn_bv,
-       int             isdeleted       );
-
-int
-bdb_build_lcup_done_ctrl(
-       Operation       *op,
-       SlapReply       *rs,
-       LDAPControl     **ctrls,
-       int             num_ctrls,
-       struct berval   *latest_entrycsn_bv     );
-#endif
-
-#ifdef LDAP_SYNC
 #define bdb_build_sync_state_ctrl      BDB_SYMBOL(build_sync_state_ctrl)
 #define bdb_build_sync_done_ctrl       BDB_SYMBOL(build_sync_done_ctrl)
 #define bdb_send_ldap_intermediate     BDB_SYMBOL(send_ldap_intermediate)
@@ -538,13 +533,13 @@ bdb_build_lcup_done_ctrl(
 int
 bdb_build_sync_state_ctrl(
        Operation       *op,
-       SlapReply       *rs,
+       SlapReply               *rs,
        Entry           *e,
        int             entry_sync_state,
        LDAPControl     **ctrls,
        int             num_ctrls,
        int             send_cookie,
-       struct berval   *latest_entrycsn_bv     );
+       struct berval   *csn     );
 
 int
 bdb_build_sync_done_ctrl(
@@ -561,8 +556,14 @@ bdb_send_ldap_intermediate(
        SlapReply       *rs,
        int         state,
        struct berval *cookie );
-#endif
 
+/*
+ * trans.c
+ */
+#define bdb_trans_backoff                      BDB_SYMBOL(trans_backoff)
+
+void
+bdb_trans_backoff( int num_retries );
 
 LDAP_END_DECL
 
index 2c4c80e3ae0eedc6ff73680f08327d3d29cd8b59..93a8714d333da7e171823432c364c5240f704177 100644 (file)
@@ -18,6 +18,7 @@ static int base_candidate(
        BackendDB       *be,
        Entry   *e,
        ID              *ids );
+
 static int search_candidates(
        Operation *stackop,     /* op with the current threadctx/slab cache */
        Operation *sop,         /* search op */
@@ -26,6 +27,7 @@ static int search_candidates(
        u_int32_t locker,
        ID      *ids,
        ID      *scopes );
+
 static void send_pagerequest_response( 
        Operation *op,
        SlapReply *rs,
@@ -280,22 +282,11 @@ nextido:
 static
 int is_sync_protocol( Operation *op )
 {
-#if !defined(LDAP_CLIENT_UPDATE) && !defined(LDAP_SYNC)
-       return 0;
-#endif
-
-#ifdef LDAP_CLIENT_UPDATE
-       if ( op->o_clientupdate_type & SLAP_LCUP_SYNC_AND_PERSIST )
-               return 1;
-#endif
-#ifdef LDAP_SYNC
        if ( op->o_sync_mode & SLAP_SYNC_REFRESH_AND_PERSIST )
                return 1;
-#endif
        return 0;
 }
        
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
 #define IS_BDB_REPLACE(type) (( type == LDAP_PSEARCH_BY_DELETE ) || \
        ( type == LDAP_PSEARCH_BY_SCOPEOUT ))
 #define IS_PSEARCH (op != sop)
@@ -331,12 +322,6 @@ bdb_cancel( Operation *op, SlapReply *rs )
                                ps_list->o_cancel = SLAP_CANCEL_DONE;
                                LDAP_LIST_REMOVE( ps_list, o_ps_link );
 
-#if 0
-                               bdb_build_sync_done_ctrl( conn, ps_list, ps_list->ctrls,
-                                       1, &latest_entrycsn_bv );
-                               send_ldap_result( conn, ps_list, LDAP_CANCELLED,
-                                       NULL, NULL, NULL, ps_list->ctrls, ps_list->nentries);
-#endif
                                rs->sr_err = LDAP_CANCELLED;
                                send_ldap_result( ps_list, rs );
 
@@ -363,11 +348,6 @@ int bdb_search( Operation *op, SlapReply *rs )
 int
 bdb_do_search( Operation *op, SlapReply *rs, Operation *sop,
        Entry *ps_e, int ps_type )
-#else
-#define        IS_PSEARCH      0
-#define        sop     op
-int bdb_search( Operation *op, SlapReply *rs )
-#endif
 {
        struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
        time_t          stoptime;
@@ -383,23 +363,19 @@ int bdb_search( Operation *op, SlapReply *rs )
        ID              lastid = NOID;
        AttributeName   *attrs;
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-       Filter          cookief, csnfnot, csnfeq, csnfand, csnfge;
-       AttributeAssertion aa_ge, aa_eq;
+       Filter          contextcsnand, contextcsnle, cookief, csnfnot, csnfeq, csnfand, csnfge;
+       Filter          omitcsnf, omitcsnfle;
+       AttributeAssertion aa_ge, aa_eq, aa_le;
        int             entry_count = 0;
-#if 0
-       struct berval   entrycsn_bv = { 0, NULL };
-#endif
-       struct berval   latest_entrycsn_bv = { 0, NULL };
-       LDAPControl     *ctrls[SLAP_SEARCH_MAX_CTRLS];
+       struct berval *search_context_csn = NULL;
+       DB_LOCK         ctxcsn_lock;
+       LDAPControl     *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
        int             num_ctrls = 0;
        AttributeName   uuid_attr[2];
-#ifdef LDAP_SYNC
        int             rc_sync = 0;
        int             entry_sync_state = -1;
        AttributeName   null_attr;
-#endif
-#endif
+       int             no_sync_state_change = 0;
        struct slap_limits_set *limit = NULL;
        int isroot = 0;
 
@@ -414,78 +390,37 @@ int bdb_search( Operation *op, SlapReply *rs )
 #endif
        attrs = sop->oq_search.rs_attrs;
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-#ifdef LDAP_CLIENT_UPDATE
-       if ( !IS_PSEARCH && sop->o_clientupdate_type & SLAP_LCUP_PERSIST ) {
-               sop->o_ps_protocol = LDAP_CLIENT_UPDATE;
-               LDAP_LIST_INSERT_HEAD( &bdb->bi_psearch_list, sop, o_ps_link );
-               return LDAP_SUCCESS;
-       }
-#endif
-#ifdef LDAP_SYNC
        /* psearch needs to be registered before refresh begins */
        /* psearch and refresh transmission is serialized in send_ldap_ber() */
        if ( !IS_PSEARCH && sop->o_sync_mode & SLAP_SYNC_PERSIST ) {
-               sop->o_ps_protocol = LDAP_SYNC;
                LDAP_LIST_INSERT_HEAD( &bdb->bi_psearch_list, sop, o_ps_link );
        }
        null_attr.an_desc = NULL;
        null_attr.an_oc = NULL;
        null_attr.an_name.bv_len = 0;
        null_attr.an_name.bv_val = NULL;
-#endif
 
-       for ( num_ctrls = 0; num_ctrls < SLAP_SEARCH_MAX_CTRLS; num_ctrls++ ) {
+       for( num_ctrls = 0; num_ctrls < SLAP_MAX_RESPONSE_CONTROLS; num_ctrls++ ) {
                ctrls[num_ctrls] = NULL;
        }
        num_ctrls = 0;
 
        if ( IS_PSEARCH && IS_BDB_REPLACE(ps_type)) {
-#ifdef LDAP_CLIENT_UPDATE
-               if ( sop->o_ps_protocol == LDAP_CLIENT_UPDATE ) {
-                       attrs = uuid_attr;
-                       attrs[0].an_desc = slap_schema.si_ad_entryUUID;
-                       attrs[0].an_oc = NULL;
-                       attrs[0].an_name =  attrs[0].an_desc->ad_cname;
-                       attrs[1].an_desc = NULL;
-                       attrs[1].an_oc = NULL;
-                       attrs[1].an_name.bv_len = 0;
-                       attrs[1].an_name.bv_val = NULL;
-               } else
-#endif
-#ifdef LDAP_SYNC
-               if (sop->o_ps_protocol == LDAP_SYNC ) {
-                       attrs = uuid_attr;
-                       attrs[0].an_desc = NULL;
-                       attrs[0].an_oc = NULL;
-                       attrs[0].an_name.bv_len = 0;
-                       attrs[0].an_name.bv_val = NULL;
-               } else
-#endif
-               {
-                       rs->sr_err = 1;
-                       goto done;
-               }
+               attrs = uuid_attr;
+               attrs[0].an_desc = NULL;
+               attrs[0].an_oc = NULL;
+               attrs[0].an_name.bv_len = 0;
+               attrs[0].an_name.bv_val = NULL;
        }
-#endif
 
        manageDSAit = get_manageDSAit( sop );
 
-       /* Sync / LCUP controls override manageDSAit */
+       /* Sync control overrides manageDSAit */
 
-#ifdef LDAP_CLIENT_UPDATE
-       if ( !IS_PSEARCH && sop->o_clientupdate_type & SLAP_LCUP_SYNC ) {
-               if ( manageDSAit == SLAP_NO_CONTROL )
-                       manageDSAit = SLAP_CRITICAL_CONTROL;
-       } else
-#endif
-#ifdef LDAP_SYNC
        if ( !IS_PSEARCH && sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
                if ( manageDSAit == SLAP_NO_CONTROL )
                        manageDSAit = SLAP_CRITICAL_CONTROL;
-       } else
-#endif
-       if ( IS_PSEARCH ) {
+       } else if ( IS_PSEARCH ) {
                if ( manageDSAit == SLAP_NO_CONTROL )
                        manageDSAit = SLAP_CRITICAL_CONTROL;
        }
@@ -503,7 +438,7 @@ int bdb_search( Operation *op, SlapReply *rs )
        if ( sop->o_req_ndn.bv_len == 0 ) {
                /* DIT root special case */
                e = (Entry *) &slap_entry_root;
-               rs->sr_err = 0;
+               rs->sr_err = LDAP_SUCCESS;
        } else {
 dn2entry_retry:
                /* get entry with reader lock */
@@ -561,7 +496,7 @@ dn2entry_retry:
                                NULL, &sop->o_req_dn, sop->oq_search.rs_scope );
                }
 
-               rs->sr_err=LDAP_REFERRAL;
+               rs->sr_err = LDAP_REFERRAL;
                rs->sr_matched = matched_dn.bv_val;
                send_ldap_result( sop, rs );
 
@@ -615,6 +550,14 @@ dn2entry_retry:
                return 1;
        }
 
+       if ( get_assert( op ) &&
+               ( test_filter( op, e, get_assertion( op )) != LDAP_COMPARE_TRUE ))
+       {
+               rs->sr_err = LDAP_ASSERTION_FAILED;
+               send_ldap_result( sop, rs );
+               return 1;
+       }
+
        /* if not root, get appropriate limits */
        if ( be_isroot( op->o_bd, &sop->o_ndn ) ) {
                isroot = 1;
@@ -653,7 +596,7 @@ dn2entry_retry:
                        } else if ( limit->lms_t_hard > 0 ) {
                                rs->sr_err = LDAP_ADMINLIMIT_EXCEEDED;
                                send_ldap_result( sop, rs );
-                               rs->sr_err = 0;
+                               rs->sr_err = LDAP_SUCCESS;
                                goto done;
                        }
                
@@ -680,7 +623,7 @@ dn2entry_retry:
                        } else if ( limit->lms_s_hard > 0 ) {
                                rs->sr_err = LDAP_ADMINLIMIT_EXCEEDED;
                                send_ldap_result( sop, rs );
-                               rs->sr_err = 0; 
+                               rs->sr_err = LDAP_SUCCESS;      
                                goto done;
                        }
                        
@@ -706,6 +649,13 @@ dn2entry_retry:
        }
        e = NULL;
 
+       rs->sr_err = bdb_get_commit_csn( sop, rs, &search_context_csn, locker, &ctxcsn_lock );
+
+       if ( rs->sr_err != LDAP_SUCCESS ) {
+               send_ldap_error( sop, rs, rs->sr_err, "error in csn management in search" );
+               goto done;
+       }
+
        /* select candidates */
        if ( sop->oq_search.rs_scope == LDAP_SCOPE_BASE ) {
                rs->sr_err = base_candidate( op->o_bd, &base, candidates );
@@ -716,10 +666,13 @@ dn2entry_retry:
                rs->sr_err = search_candidates( op, sop, rs, &base, locker, candidates, scopes );
        }
 
+       if ( sop->o_sync_mode != SLAP_SYNC_NONE ) {
+               bdb_cache_entry_db_unlock( bdb->bi_dbenv, &ctxcsn_lock );
+       }
+
        /* start cursor at beginning of candidates.
         */
        cursor = 0;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
        if (IS_PSEARCH) {
                if ( !BDB_IDL_IS_RANGE( candidates ) ) {
                        cursor = bdb_idl_search( candidates, ps_e->e_id );
@@ -737,7 +690,6 @@ dn2entry_retry:
                candidates[0] = 1;
                candidates[1] = ps_e->e_id;
        }
-#endif
 
        if ( candidates[0] == 0 ) {
 #ifdef NEW_LOGGING
@@ -749,8 +701,8 @@ dn2entry_retry:
 #endif
 
                rs->sr_err = LDAP_SUCCESS;
+               rs->sr_entry = NULL;
                send_ldap_result( sop, rs );
-               rs->sr_err = 1;
                goto done;
        }
 
@@ -759,7 +711,7 @@ dn2entry_retry:
                if ( BDB_IDL_N(candidates) > (unsigned) limit->lms_s_unchecked ) {
                        rs->sr_err = LDAP_ADMINLIMIT_EXCEEDED;
                        send_ldap_result( sop, rs );
-                       rs->sr_err = 1;
+                       rs->sr_err = LDAP_SUCCESS;
                        goto done;
                }
        }
@@ -795,48 +747,19 @@ dn2entry_retry:
 #endif
                        send_pagerequest_response( sop, rs, lastid, 0 );
 
-                       rs->sr_err = 1;
+                       rs->sr_err = LDAP_OTHER;
                        goto done;
                }
                goto loop_begin;
        }
 #endif
 
-#ifdef LDAP_CLIENT_UPDATE
-       if ( (sop->o_clientupdate_type & SLAP_LCUP_SYNC) ||
-           (IS_PSEARCH && sop->o_ps_protocol == LDAP_CLIENT_UPDATE ))
+       if ( (sop->o_sync_mode & SLAP_SYNC_REFRESH) || IS_PSEARCH )
        {
-               cookief.f_choice = LDAP_FILTER_AND;
-               cookief.f_and = &csnfnot;
-               cookief.f_next = NULL;
+               MatchingRule    *mr;
+               const char              *text;
+               int                             match;
 
-               csnfnot.f_choice = LDAP_FILTER_NOT;
-               csnfnot.f_not = &csnfeq;
-               csnfnot.f_next = &csnfand;
-
-               csnfeq.f_choice = LDAP_FILTER_EQUALITY;
-               csnfeq.f_ava = &aa_eq;
-               csnfeq.f_av_desc = slap_schema.si_ad_entryCSN;
-               csnfeq.f_av_value = sop->o_clientupdate_state;
-
-               csnfand.f_choice = LDAP_FILTER_AND;
-               csnfand.f_and = &csnfge;
-               csnfand.f_next = NULL;
-
-               csnfge.f_choice = LDAP_FILTER_GE;
-               csnfge.f_ava = &aa_ge;
-               csnfge.f_av_desc = slap_schema.si_ad_entryCSN;
-               csnfge.f_av_value = sop->o_clientupdate_state;
-               csnfge.f_next = sop->oq_search.rs_filter;
-       }
-#endif
-#if defined(LDAP_CLIENT_UPDATE) && defined(LDAP_SYNC)
-       else
-#endif
-#ifdef LDAP_SYNC
-       if ( (sop->o_sync_mode & SLAP_SYNC_REFRESH) ||
-               ( IS_PSEARCH && sop->o_ps_protocol == LDAP_SYNC ))
-       {
                cookief.f_choice = LDAP_FILTER_AND;
                cookief.f_and = &csnfnot;
                cookief.f_next = NULL;
@@ -858,9 +781,33 @@ dn2entry_retry:
                csnfge.f_ava = &aa_ge;
                csnfge.f_av_desc = slap_schema.si_ad_entryCSN;
                csnfge.f_av_value = sop->o_sync_state;
-               csnfge.f_next = sop->oq_search.rs_filter;
+
+               if ( search_context_csn && !IS_PSEARCH ) {
+                       csnfge.f_next = &contextcsnand;
+
+                       contextcsnand.f_choice = LDAP_FILTER_AND;
+                       contextcsnand.f_and = &contextcsnle;
+                       contextcsnand.f_next = NULL;
+       
+                       contextcsnle.f_choice = LDAP_FILTER_LE;
+                       contextcsnle.f_ava = &aa_le;
+                       contextcsnle.f_av_desc = slap_schema.si_ad_entryCSN;
+                       contextcsnle.f_av_value = *search_context_csn;
+                       contextcsnle.f_next = sop->oq_search.rs_filter;
+
+                       mr = slap_schema.si_ad_entryCSN->ad_type->sat_ordering;
+                       if ( sop->o_sync_state.bv_len != 0 ) {
+                               value_match( &match, slap_schema.si_ad_entryCSN, mr,
+                                                       SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
+                                                       &sop->o_sync_state, search_context_csn, &text );
+                       } else {
+                               match = -1;
+                       }
+                       no_sync_state_change = !match;
+               } else {
+                       csnfge.f_next = sop->oq_search.rs_filter;
+               }
        }
-#endif
 
        for ( id = bdb_idl_first( candidates, &cursor );
                id != NOID;
@@ -871,7 +818,7 @@ dn2entry_retry:
 loop_begin:
                /* check for abandon */
                if ( sop->o_abandon ) {
-                       rs->sr_err = 0;
+                       rs->sr_err = LDAP_SUCCESS;
                        goto done;
                }
 
@@ -881,7 +828,7 @@ loop_begin:
                        rs->sr_err = LDAP_CANCELLED;
                        send_ldap_result( sop, rs );
                        sop->o_cancel = SLAP_CANCEL_ACK;
-                       rs->sr_err = 0;
+                       rs->sr_err = LDAP_SUCCESS;
                        goto done;
                }
 #endif
@@ -891,13 +838,12 @@ loop_begin:
                        rs->sr_err = LDAP_TIMELIMIT_EXCEEDED;
                        rs->sr_ref = rs->sr_v2ref;
                        send_ldap_result( sop, rs );
+                       rs->sr_err = LDAP_SUCCESS;
                        goto done;
                }
 
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
                if (!IS_PSEARCH) {
-#endif
 id2entry_retry:
                        /* get the entry with reader lock */
                        ei = NULL;
@@ -915,7 +861,7 @@ id2entry_retry:
                                goto id2entry_retry;    
                        }
 
-                       if ( ei && rs->sr_err == 0 ) {
+                       if ( ei && rs->sr_err == LDAP_SUCCESS ) {
                                e = ei->bei_e;
                        } else {
                                e = NULL;
@@ -937,15 +883,15 @@ id2entry_retry:
 
                                goto loop_continue;
                        }
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
                } else {
                        e = ps_e;
                }
-#endif
 
                rs->sr_entry = e;
 #ifdef BDB_SUBENTRIES
+               /* FIXME: send all but syncrepl
                if ( !is_sync_protocol( sop ) ) {
+               */
                        if ( is_entry_subentry( e ) ) {
                                if( sop->oq_search.rs_scope != LDAP_SCOPE_BASE ) {
                                        if(!get_subentries_visibility( sop )) {
@@ -964,7 +910,9 @@ id2entry_retry:
                                /* only subentries are visible */
                                goto loop_continue;
                        }
+               /*
                }
+               */
 #endif
 
                /* Does this candidate actually satisfy the search scope?
@@ -1074,8 +1022,11 @@ id2entry_retry:
                        goto loop_continue;
                }
 
+               if ( !manageDSAit && is_entry_glue( e )) {
+                       goto loop_continue;
+               }
+
                /* if it matches the filter and scope, send it */
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
                if (IS_PSEARCH) {
                        if (ps_type != LDAP_PSEARCH_BY_SCOPEOUT) {
                                rs->sr_err = test_filter( sop, rs->sr_entry, &cookief );
@@ -1083,47 +1034,50 @@ id2entry_retry:
                                rs->sr_err = LDAP_COMPARE_TRUE;
                        }
                } else {
-#ifdef LDAP_CLIENT_UPDATE
-                       if ( sop->o_clientupdate_type & SLAP_LCUP_SYNC ) {
-                               rs->sr_err = test_filter( sop, rs->sr_entry, &cookief );
-                       } else
-#endif
-#ifdef LDAP_SYNC
                        if ( sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
                                rc_sync = test_filter( sop, rs->sr_entry, &cookief );
                                rs->sr_err = test_filter( sop,
-                                       rs->sr_entry, sop->oq_search.rs_filter );
+                                       rs->sr_entry, &contextcsnand );
                                if ( rs->sr_err == LDAP_COMPARE_TRUE ) {
                                        if ( rc_sync == LDAP_COMPARE_TRUE ) {
+                                               if ( no_sync_state_change ) {
+#ifdef NEW_LOGGING
+                                                       LDAP_LOG ( OPERATION, RESULTS,
+                                                               "bdb_search: error in context csn management\n",
+                                                               0, 0, 0 );
+#else
+                                                       Debug( LDAP_DEBUG_TRACE,
+                                                               "bdb_search: error in context csn management\n",
+                                                               0, 0, 0 );
+#endif
+                                               }
                                                entry_sync_state = LDAP_SYNC_ADD;
                                        } else {
+                                               if ( no_sync_state_change ) {
+                                                       goto loop_continue;
+                                               }
                                                entry_sync_state = LDAP_SYNC_PRESENT;
                                        }
                                }
-                       } else
-#endif
-#endif
-                       {
+                       } else {
                                rs->sr_err = test_filter( sop,
                                        rs->sr_entry, sop->oq_search.rs_filter );
                        }
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
                }
-#endif
 
                if ( rs->sr_err == LDAP_COMPARE_TRUE ) {
                        /* check size limit */
                        if ( --sop->oq_search.rs_slimit == -1 ) {
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-                               if (!IS_PSEARCH)
-#endif
-                               bdb_cache_return_entry_r( bdb->bi_dbenv,
-                                       &bdb->bi_cache, e, &lock );
+                               if (!IS_PSEARCH) {
+                                       bdb_cache_return_entry_r( bdb->bi_dbenv,
+                                               &bdb->bi_cache, e, &lock );
+                               }
                                e = NULL;
                                rs->sr_entry = NULL;
                                rs->sr_err = LDAP_SIZELIMIT_EXCEEDED;
                                rs->sr_ref = rs->sr_v2ref;
                                send_ldap_result( sop, rs );
+                               rs->sr_err = LDAP_SUCCESS;
                                goto done;
                        }
 
@@ -1147,12 +1101,9 @@ id2entry_retry:
                                        result = 0;
                                } else
 #endif
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
                                if (IS_PSEARCH) {
-#ifdef LDAP_SYNC
                                        int premodify_found = 0;
                                        int entry_sync_state;
-#endif
 
                                        if ( ps_type == LDAP_PSEARCH_BY_ADD ||
                                                 ps_type == LDAP_PSEARCH_BY_DELETE ||
@@ -1165,16 +1116,13 @@ id2entry_retry:
                                                                &op->o_pm_list, ps_link)
                                                        {
                                                                if( psid_e->ps_op == sop ) {
-#ifdef LDAP_SYNC
                                                                        premodify_found = 1;
-#endif
                                                                        LDAP_LIST_REMOVE(psid_e, ps_link);
                                                                        break;
                                                                }
                                                        }
                                                        if (psid_e != NULL) free (psid_e);
                                                }
-#ifdef LDAP_SYNC
                                                if ( ps_type == LDAP_PSEARCH_BY_ADD ) {
                                                        entry_sync_state = LDAP_SYNC_ADD;
                                                } else if ( ps_type == LDAP_PSEARCH_BY_DELETE ) {
@@ -1188,54 +1136,20 @@ id2entry_retry:
                                                } else if ( ps_type == LDAP_PSEARCH_BY_SCOPEOUT )
                                                        entry_sync_state = LDAP_SYNC_DELETE;
                                                else {
-                                                       rs->sr_err = 1;
-                                                       goto done;
-                                               }
-#endif
-
-#ifdef LDAP_CLIENT_UPDATE
-                                               if ( sop->o_ps_protocol == LDAP_CLIENT_UPDATE ) {
-                                                       int entry_count = ++sop->o_ps_entries;
-                                                       if ( IS_BDB_REPLACE(ps_type) ) {
-                                                               rs->sr_err = bdb_build_lcup_update_ctrl( sop,
-                                                                       rs, e, entry_count, ctrls,
-                                                                       num_ctrls++, &latest_entrycsn_bv,
-                                                                       SLAP_LCUP_ENTRY_DELETED_TRUE );
-                                                       } else {
-                                                               rs->sr_err = bdb_build_lcup_update_ctrl( sop,
-                                                                       rs, e, entry_count, ctrls,
-                                                                       num_ctrls++, &latest_entrycsn_bv,
-                                                                       SLAP_LCUP_ENTRY_DELETED_FALSE );
-                                                       }
-                                                       if ( rs->sr_err != LDAP_SUCCESS ) goto done;
-                                                       rs->sr_attrs = attrs;
-                                                       rs->sr_ctrls = ctrls;
-                                                       result = send_search_entry( sop, rs );
-                                                       ch_free( ctrls[num_ctrls-1]->ldctl_value.bv_val );
-                                                       ch_free( ctrls[--num_ctrls] );
-                                                       ctrls[num_ctrls] = NULL;
-                                                       rs->sr_ctrls = NULL;
-                                               } else
-#endif
-#ifdef LDAP_SYNC
-                                               if ( sop->o_ps_protocol == LDAP_SYNC ) {
-                                                       rs->sr_err = bdb_build_sync_state_ctrl( sop,
-                                                               rs, e, entry_sync_state, ctrls,
-                                                               num_ctrls++, 1, &latest_entrycsn_bv );
-                                                       if ( rs->sr_err != LDAP_SUCCESS ) goto done;
-                                                       rs->sr_attrs = attrs;
-                                                       rs->sr_ctrls = ctrls;
-                                                       result = send_search_entry( sop, rs );
-                                                       ch_free( ctrls[num_ctrls-1]->ldctl_value.bv_val );
-                                                       ch_free( ctrls[--num_ctrls] );
-                                                       ctrls[num_ctrls] = NULL;
-                                                       rs->sr_ctrls = NULL;
-                                               } else
-#endif
-                                               {
-                                                       rs->sr_err = 1;
+                                                       rs->sr_err = LDAP_OTHER;
                                                        goto done;
                                                }
+                                               rs->sr_err = bdb_build_sync_state_ctrl( sop,
+                                                       rs, e, entry_sync_state, ctrls,
+                                                       num_ctrls++, 1, search_context_csn );
+                                               if ( rs->sr_err != LDAP_SUCCESS ) goto done;
+                                               rs->sr_attrs = attrs;
+                                               rs->sr_ctrls = ctrls;
+                                               result = send_search_entry( sop, rs );
+                                               ch_free( ctrls[num_ctrls-1]->ldctl_value.bv_val );
+                                               ch_free( ctrls[--num_ctrls] );
+                                               ctrls[num_ctrls] = NULL;
+                                               rs->sr_ctrls = NULL;
 
                                        } else if ( ps_type == LDAP_PSEARCH_BY_PREMODIFY ) {
                                                struct psid_entry* psid_e;
@@ -1249,27 +1163,10 @@ id2entry_retry:
                                                printf("Error !\n");
                                        }
                                } else {
-#ifdef LDAP_CLIENT_UPDATE
-                                       if ( sop->o_clientupdate_type & SLAP_LCUP_SYNC ) {
-                                               rs->sr_err = bdb_build_lcup_update_ctrl( sop,
-                                                       rs, e, ++entry_count, ctrls,
-                                                       num_ctrls++, &latest_entrycsn_bv,
-                                                       SLAP_LCUP_ENTRY_DELETED_FALSE );
-                                               if ( rs->sr_err != LDAP_SUCCESS ) goto done;
-                                               rs->sr_ctrls = ctrls;
-                                               rs->sr_attrs = sop->oq_search.rs_attrs;
-                                               result = send_search_entry( sop, rs );
-                                               ch_free( ctrls[num_ctrls-1]->ldctl_value.bv_val );
-                                               ch_free( ctrls[--num_ctrls] );
-                                               ctrls[num_ctrls] = NULL;
-                                               rs->sr_ctrls = NULL;
-                                       } else
-#endif
-#ifdef LDAP_SYNC
                                        if ( sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
                                                rs->sr_err = bdb_build_sync_state_ctrl( sop,
                                                        rs, e, entry_sync_state, ctrls,
-                                                       num_ctrls++, 0, &latest_entrycsn_bv );
+                                                       num_ctrls++, 0, search_context_csn );
                                                if ( rs->sr_err != LDAP_SUCCESS ) goto done;
 
                                                rs->sr_ctrls = ctrls;
@@ -1283,10 +1180,7 @@ id2entry_retry:
                                                ch_free( ctrls[--num_ctrls] );
                                                ctrls[num_ctrls] = NULL;
                                                rs->sr_ctrls = NULL;
-                                       } else
-#endif
-#endif
-                                       {
+                                       } else {
                                                rs->sr_attrs = sop->oq_search.rs_attrs;
                                                rs->sr_ctrls = NULL;
                                                result = send_search_entry( sop, rs );
@@ -1334,60 +1228,39 @@ loop_continue:
        }
 
        if (!IS_PSEARCH) {
-#ifdef LDAP_CLIENT_UPDATE
-       if ( sop->o_clientupdate_type & SLAP_LCUP_SYNC ) {
-               bdb_build_lcup_done_ctrl( sop, rs, ctrls,
-                       num_ctrls++, &latest_entrycsn_bv );
-
-               rs->sr_ctrls = ctrls;
-               rs->sr_ref = rs->sr_v2ref;
-               rs->sr_err = (rs->sr_v2ref == NULL) ? LDAP_SUCCESS : LDAP_REFERRAL;
-               send_ldap_result( sop, rs );
-
-               ch_free( latest_entrycsn_bv.bv_val );
-               latest_entrycsn_bv.bv_val = NULL;
-
-               if ( ctrls[num_ctrls-1]->ldctl_value.bv_val != NULL ) {
-                       ch_free( ctrls[num_ctrls-1]->ldctl_value.bv_val );
-               }
-               ch_free( ctrls[--num_ctrls] );
-               ctrls[num_ctrls] = NULL;
-       } else
-#endif
-#ifdef LDAP_SYNC
-       if ( sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
-               if ( sop->o_sync_mode & SLAP_SYNC_PERSIST ) {
-                       /* refreshAndPersist mode */
+               if ( sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
                        rs->sr_err = LDAP_SUCCESS;
                        rs->sr_rspoid = LDAP_SYNC_INFO;
                        rs->sr_ctrls = NULL;
                        bdb_send_ldap_intermediate( sop, rs,
-                               LDAP_SYNC_REFRESH_DONE, &latest_entrycsn_bv );
+                               LDAP_SYNC_STATE_MODE_DONE, search_context_csn );
+
+                       /* If changelog is supported, this is where to process it */
+       
+                       if ( sop->o_sync_mode & SLAP_SYNC_PERSIST ) {
+                               /* refreshAndPersist mode */
+                               bdb_send_ldap_intermediate( sop, rs,
+                                       LDAP_SYNC_LOG_MODE_DONE, search_context_csn );
+                       } else {
+                               /* refreshOnly mode */
+                               bdb_build_sync_done_ctrl( sop, rs, ctrls,
+                                       num_ctrls++, 1, search_context_csn );
+                               rs->sr_ctrls = ctrls;
+                               rs->sr_ref = rs->sr_v2ref;
+                               rs->sr_err = (rs->sr_v2ref == NULL) ? LDAP_SUCCESS : LDAP_REFERRAL;
+                               send_ldap_result( sop, rs );
+                               if ( ctrls[num_ctrls-1]->ldctl_value.bv_val != NULL ) {
+                                       ch_free( ctrls[num_ctrls-1]->ldctl_value.bv_val );
+                               }
+                               ch_free( ctrls[--num_ctrls] );
+                               ctrls[num_ctrls] = NULL;
+                       }
                } else {
-                       /* refreshOnly mode */
-                       bdb_build_sync_done_ctrl( sop, rs, ctrls,
-                               num_ctrls++, 1, &latest_entrycsn_bv );
-                       rs->sr_ctrls = ctrls;
+                       rs->sr_ctrls = NULL;
                        rs->sr_ref = rs->sr_v2ref;
                        rs->sr_err = (rs->sr_v2ref == NULL) ? LDAP_SUCCESS : LDAP_REFERRAL;
                        send_ldap_result( sop, rs );
-                       if ( ctrls[num_ctrls-1]->ldctl_value.bv_val != NULL ) {
-                               ch_free( ctrls[num_ctrls-1]->ldctl_value.bv_val );
-                       }
-                       ch_free( ctrls[--num_ctrls] );
-                       ctrls[num_ctrls] = NULL;
                }
-
-               ch_free( latest_entrycsn_bv.bv_val );
-               latest_entrycsn_bv.bv_val = NULL;
-       } else
-#endif
-       {
-               rs->sr_ctrls = NULL;
-               rs->sr_ref = rs->sr_v2ref;
-               rs->sr_err = (rs->sr_v2ref == NULL) ? LDAP_SUCCESS : LDAP_REFERRAL;
-               send_ldap_result( sop, rs );
-       }
        }
 
        rs->sr_err = LDAP_SUCCESS;
@@ -1400,6 +1273,8 @@ done:
 
        LOCK_ID_FREE (bdb->bi_dbenv, locker );
 
+       ber_bvfree( search_context_csn );
+
        if( rs->sr_v2ref ) {
                ber_bvarray_free( rs->sr_v2ref );
                rs->sr_v2ref = NULL;
@@ -1685,155 +1560,16 @@ done:
 }                      
 #endif
 
-#ifdef LDAP_CLIENT_UPDATE
-int
-bdb_build_lcup_update_ctrl(
-       Operation       *op,
-       SlapReply       *rs,
-       Entry           *e,
-       int             entry_count,
-       LDAPControl     **ctrls,
-       int             num_ctrls,
-       struct berval   *latest_entrycsn_bv,
-       int             isdeleted       )
-{
-       Attribute* a;
-       int ret;
-       int res;
-       const char *text = NULL;
-
-       char berbuf[LBER_ELEMENT_SIZEOF];
-       BerElement *ber = (BerElement *)berbuf;
-
-       struct berval entrycsn_bv = { 0, NULL };
-
-       ber_init2( ber, 0, LBER_USE_DER );
-
-       ctrls[num_ctrls] = ch_malloc ( sizeof ( LDAPControl ) );
-
-       for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
-               AttributeDescription *desc = a->a_desc;
-               if ( desc == slap_schema.si_ad_entryCSN ) {
-                       ber_dupbv( &entrycsn_bv, &a->a_vals[0] );
-                       if ( latest_entrycsn_bv->bv_val == NULL ) {
-                               ber_dupbv( latest_entrycsn_bv, &entrycsn_bv );
-                       } else {
-                               res = value_match( &ret, desc,
-                                       desc->ad_type->sat_ordering, 0,
-                                       &entrycsn_bv, latest_entrycsn_bv, &text );
-                               if ( res != LDAP_SUCCESS ) {
-                                       ret = 0;
-#ifdef NEW_LOGGING
-                                       LDAP_LOG ( OPERATION, RESULTS, 
-                                               "bdb_search: value_match failed\n",
-                                               0, 0, 0 );
-#else
-                                       Debug( LDAP_DEBUG_TRACE,
-                                               "bdb_search: value_match failed\n",
-                                               0, 0, 0 );
-#endif
-                               }
-
-                               if ( ret > 0 ) {
-                                       ch_free( latest_entrycsn_bv->bv_val );
-                                       latest_entrycsn_bv->bv_val = NULL;
-                                       ber_dupbv( latest_entrycsn_bv, &entrycsn_bv );
-                               }
-                       }
-               }
-       }
-
-       if ( entry_count % op->o_clientupdate_interval == 0 ) {
-               ber_printf( ber,
-                       "{bb{sON}N}",
-                       SLAP_LCUP_STATE_UPDATE_FALSE,
-                       isdeleted,
-                       LDAP_CUP_COOKIE_OID, &entrycsn_bv );
-       } else { /* Do not send cookie */
-               ber_printf( ber,
-                       "{bbN}",
-                       SLAP_LCUP_STATE_UPDATE_FALSE,
-                       isdeleted );
-       }
-
-       ch_free( entrycsn_bv.bv_val );
-       entrycsn_bv.bv_val = NULL;
-
-       ctrls[num_ctrls]->ldctl_oid = LDAP_CONTROL_ENTRY_UPDATE;
-       ctrls[num_ctrls]->ldctl_iscritical = op->o_clientupdate;
-       ret = ber_flatten2( ber, &ctrls[num_ctrls]->ldctl_value, 1 );
-
-       ber_free_buf( ber );
-
-       if ( ret < 0 ) {
-#ifdef NEW_LOGGING
-               LDAP_LOG ( OPERATION, RESULTS, 
-                       "bdb_build_lcup_ctrl: ber_flatten2 failed\n",
-                       0, 0, 0 );
-#else
-               Debug( LDAP_DEBUG_TRACE,
-                       "bdb_build_lcup_ctrl: ber_flatten2 failed\n",
-                       0, 0, 0 );
-#endif
-               send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
-               return ret;
-       }
-
-       return LDAP_SUCCESS;
-}
-
-int
-bdb_build_lcup_done_ctrl(
-       Operation       *op,
-       SlapReply       *rs,
-       LDAPControl     **ctrls,
-       int             num_ctrls,
-       struct berval   *latest_entrycsn_bv     )
-{
-       int ret;
-       char berbuf[LBER_ELEMENT_SIZEOF];
-       BerElement *ber = (BerElement *)berbuf;
-
-       ber_init2( ber, NULL, LBER_USE_DER );
-
-       ctrls[num_ctrls] = ch_malloc ( sizeof ( LDAPControl ) );
-
-       ber_printf( ber, "{sON}", LDAP_CUP_COOKIE_OID, latest_entrycsn_bv );
-
-       ctrls[num_ctrls]->ldctl_oid = LDAP_CONTROL_CLIENT_UPDATE_DONE;
-       ctrls[num_ctrls]->ldctl_iscritical = op->o_clientupdate;
-       ret = ber_flatten2( ber, &ctrls[num_ctrls]->ldctl_value, 1 );
-
-       ber_free_buf( ber );
-
-       if ( ret < 0 ) {
-#ifdef NEW_LOGGING
-               LDAP_LOG ( OPERATION, RESULTS, 
-                       "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n", 0, 0, 0 );
-#else
-               Debug( LDAP_DEBUG_TRACE,
-                       "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n",
-                       0, 0, 0 );
-#endif
-               send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
-               return ret;
-       }
-
-       return LDAP_SUCCESS;
-}
-#endif
-
-#ifdef LDAP_SYNC
 int
 bdb_build_sync_state_ctrl(
        Operation       *op,
        SlapReply       *rs,
        Entry           *e,
-       int             entry_sync_state,
+       int                     entry_sync_state,
        LDAPControl     **ctrls,
-       int             num_ctrls,
-       int             send_cookie,
-       struct berval   *latest_entrycsn_bv     )
+       int                     num_ctrls,
+       int                     send_cookie,
+       struct berval   *csn)
 {
        Attribute* a;
        int ret;
@@ -1844,7 +1580,6 @@ bdb_build_sync_state_ctrl(
        BerElement *ber = (BerElement *)berbuf;
 
        struct berval entryuuid_bv      = { 0, NULL };
-       struct berval entrycsn_bv       = { 0, NULL };
 
        ber_init2( ber, 0, LBER_USE_DER );
 
@@ -1852,47 +1587,19 @@ bdb_build_sync_state_ctrl(
 
        for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
                AttributeDescription *desc = a->a_desc;
-               if ( desc == slap_schema.si_ad_entryCSN ) {
-                       ber_dupbv( &entrycsn_bv, &a->a_vals[0] );
-                       if ( latest_entrycsn_bv->bv_val == NULL ) {
-                               ber_dupbv( latest_entrycsn_bv, &entrycsn_bv );
-                       } else {
-                               res = value_match( &ret, desc,
-                                               desc->ad_type->sat_ordering, 0,
-                                               &entrycsn_bv, latest_entrycsn_bv, &text );
-                               if ( res != LDAP_SUCCESS ) {
-                                       ret = 0;
-#ifdef NEW_LOGGING
-                                       LDAP_LOG ( OPERATION, RESULTS,
-                                                       "bdb_search: value_match failed\n",
-                                                       0, 0, 0 );
-#else
-                                       Debug( LDAP_DEBUG_TRACE,
-                                                       "bdb_search: value_match failed\n",
-                                                       0, 0, 0 );
-#endif
-                               }
-                               if ( ret > 0 ) {
-                                       ch_free( latest_entrycsn_bv->bv_val );
-                                       latest_entrycsn_bv->bv_val = NULL;
-                                       ber_dupbv( latest_entrycsn_bv, &entrycsn_bv );
-                               }
-                       }
-               } else if ( desc == slap_schema.si_ad_entryUUID ) {
+               if ( desc == slap_schema.si_ad_entryUUID ) {
                        ber_dupbv( &entryuuid_bv, &a->a_vals[0] );
                }
        }
 
-       if ( send_cookie ) {
+       if ( send_cookie && csn ) {
                ber_printf( ber, "{eOON}",
-                       entry_sync_state, &entryuuid_bv, &entrycsn_bv );
+                       entry_sync_state, &entryuuid_bv, csn );
        } else {
                ber_printf( ber, "{eON}",
                        entry_sync_state, &entryuuid_bv );
        }
 
-       ch_free( entrycsn_bv.bv_val );
-       entrycsn_bv.bv_val = NULL;
        ch_free( entryuuid_bv.bv_val );
        entryuuid_bv.bv_val = NULL;
 
@@ -1926,7 +1633,7 @@ bdb_build_sync_done_ctrl(
        LDAPControl     **ctrls,
        int             num_ctrls,
        int             send_cookie,
-       struct berval   *latest_entrycsn_bv     )
+       struct berval   *csn )
 {
        int ret;
        char berbuf[LBER_ELEMENT_SIZEOF];
@@ -1936,8 +1643,8 @@ bdb_build_sync_done_ctrl(
 
        ctrls[num_ctrls] = ch_malloc ( sizeof ( LDAPControl ) );
 
-       if ( send_cookie ) {
-               ber_printf( ber, "{ON}", latest_entrycsn_bv );
+       if ( send_cookie && csn ) {
+               ber_printf( ber, "{ON}", csn );
        } else {
                ber_printf( ber, "{N}" );
        }
@@ -1951,11 +1658,11 @@ bdb_build_sync_done_ctrl(
        if ( ret < 0 ) {
 #ifdef NEW_LOGGING
                LDAP_LOG ( OPERATION, RESULTS, 
-                       "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n",
+                       "bdb_build_sync_done_ctrl: ber_flatten2 failed\n",
                        0, 0, 0 );
 #else
                Debug( LDAP_DEBUG_TRACE,
-                       "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n",
+                       "bdb_build_sync_done_ctrl: ber_flatten2 failed\n",
                        0, 0, 0 );
 #endif
                send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
@@ -1991,11 +1698,11 @@ bdb_send_ldap_intermediate(
        if ( ret < 0 ) {
 #ifdef NEW_LOGGING
                LDAP_LOG ( OPERATION, RESULTS, 
-                       "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n",
+                       "bdb_send_ldap_intermediate: ber_flatten2 failed\n",
                        0, 0, 0 );
 #else
                Debug( LDAP_DEBUG_TRACE,
-                       "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n",
+                       "bdb_send_ldap_intermediate: ber_flatten2 failed\n",
                        0, 0, 0 );
 #endif
                send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
@@ -2009,4 +1716,3 @@ bdb_send_ldap_intermediate(
 
        return LDAP_SUCCESS;
 }
-#endif
index 69aeea22aea59b9ae632faf1da58688638f50679..354589cc35b53012b21577b3574a3796256a7276 100644 (file)
@@ -104,6 +104,54 @@ ID bdb_tool_entry_next(
        return id;
 }
 
+ID bdb_tool_dn2id_get(
+       Backend *be,
+       struct berval *dn
+)
+{
+       struct bdb_info *bdb = (struct bdb_info *) be->be_private;
+       DB *db = bdb->bi_dn2id->bdi_db;
+       int rc;
+       DBT     key, data;
+       ID      id;
+
+       DBTzero( &key );
+       key.size = dn->bv_len + 2;
+       key.data = ch_malloc( key.size );
+       ((char*)key.data)[0] = DN_BASE_PREFIX;
+       AC_MEMCPY( &((char*)key.data)[1], dn->bv_val, key.size - 1 );
+
+       DBTzero( &data );
+       data.data = &id;
+       data.ulen = sizeof(ID);
+       data.flags = DB_DBT_USERMEM;
+
+       rc = db->get( db, NULL, &key, &data, bdb->bi_db_opflags );
+
+    if( rc != 0 ) {
+#ifdef NEW_LOGGING
+               LDAP_LOG ( INDEX, ERR, "bdb_tool_dn2id_get: get failed %s (%d)\n",
+                               db_strerror(rc), rc, 0 );
+#else
+               Debug( LDAP_DEBUG_TRACE, "bdb_tool_dn2id_get: get failed: %s (%d)\n",
+                               db_strerror( rc ), rc, 0 );
+#endif
+               id = NOID;
+       }
+
+       ch_free( key.data );
+       return id;
+}
+
+int bdb_tool_id2entry_get(
+       Backend *be,
+       ID id,
+       Entry **e
+)
+{
+       return bdb_id2entry( be, NULL, id, e );
+}
+
 Entry* bdb_tool_entry_get( BackendDB *be, ID id )
 {
        int rc;
@@ -173,10 +221,10 @@ static int bdb_tool_next_id(
                                db_strerror(rc), rc );
 #ifdef NEW_LOGGING
                LDAP_LOG ( TOOLS, ERR, 
-                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+                       "=> bdb_tool_next_id: %s\n", text->bv_val, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ANY,
-                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+                       "=> bdb_tool_next_id: %s\n", text->bv_val, 0, 0 );
 #endif
                        return rc;
                }
@@ -188,10 +236,10 @@ static int bdb_tool_next_id(
                                db_strerror(rc), rc );
 #ifdef NEW_LOGGING
                LDAP_LOG ( TOOLS, ERR, 
-                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+                       "=> bdb_tool_next_id: %s\n", text->bv_val, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ANY,
-                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+                       "=> bdb_tool_next_id: %s\n", text->bv_val, 0, 0 );
 #endif
                } else if ( hole ) {
                        if ( nholes == nhmax - 1 ) {
@@ -464,3 +512,134 @@ done:
 
        return rc;
 }
+
+ID bdb_tool_entry_modify(
+       BackendDB *be,
+       Entry *e,
+       struct berval *text )
+{
+       int rc;
+       struct bdb_info *bdb = (struct bdb_info *) be->be_private;
+       DB_TXN *tid = NULL;
+       Operation op = {0};
+
+       assert( be != NULL );
+       assert( slapMode & SLAP_TOOL_MODE );
+
+       assert( text );
+       assert( text->bv_val );
+       assert( text->bv_val[0] == '\0' );      /* overconservative? */
+
+       assert ( e->e_id != NOID );
+       assert ( e->e_id != 0 );
+
+#ifdef NEW_LOGGING
+       LDAP_LOG ( TOOLS, ARGS, "=> bdb_tool_entry_put( %ld, \"%s\" )\n",
+               (long) e->e_id, e->e_dn, 0 );
+#else
+       Debug( LDAP_DEBUG_TRACE, "=> bdb_tool_entry_put( %ld, \"%s\" )\n",
+               (long) e->e_id, e->e_dn, 0 );
+#endif
+
+       rc = TXN_BEGIN( bdb->bi_dbenv, NULL, &tid, 
+               bdb->bi_db_opflags );
+       if( rc != 0 ) {
+               snprintf( text->bv_val, text->bv_len,
+                       "txn_begin failed: %s (%d)",
+                       db_strerror(rc), rc );
+#ifdef NEW_LOGGING
+       LDAP_LOG ( TOOLS, ERR, "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+#else
+               Debug( LDAP_DEBUG_ANY,
+                       "=> bdb_tool_entry_put: %s\n",
+                        text->bv_val, 0, 0 );
+#endif
+               return NOID;
+       }
+
+       op.o_bd = be;
+       op.o_tmpmemctx = NULL;
+       op.o_tmpmfuncs = &ch_mfuncs;
+
+       /* id2entry index */
+       rc = bdb_id2entry_update( be, tid, e );
+       if( rc != 0 ) {
+               snprintf( text->bv_val, text->bv_len,
+                               "id2entry_add failed: %s (%d)",
+                               db_strerror(rc), rc );
+#ifdef NEW_LOGGING
+               LDAP_LOG ( TOOLS, ERR, 
+                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+#else
+               Debug( LDAP_DEBUG_ANY,
+                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+#endif
+               goto done;
+       }
+
+       rc = bdb_index_entry_del( &op, tid, e );
+       if( rc != 0 ) {
+               snprintf( text->bv_val, text->bv_len,
+                               "index_entry_del failed: %s (%d)",
+                               db_strerror(rc), rc );
+#ifdef NEW_LOGGING
+               LDAP_LOG ( TOOLS, ERR, 
+                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+#else
+               Debug( LDAP_DEBUG_ANY,
+                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+#endif
+               goto done;
+       }
+
+       rc = bdb_index_entry_add( &op, tid, e );
+       if( rc != 0 ) {
+               snprintf( text->bv_val, text->bv_len,
+                               "index_entry_add failed: %s (%d)",
+                               db_strerror(rc), rc );
+#ifdef NEW_LOGGING
+               LDAP_LOG ( TOOLS, ERR, 
+                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+#else
+               Debug( LDAP_DEBUG_ANY,
+                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+#endif
+               goto done;
+       }
+
+done:
+       if( rc == 0 ) {
+               rc = TXN_COMMIT( tid, 0 );
+               if( rc != 0 ) {
+                       snprintf( text->bv_val, text->bv_len,
+                                       "txn_commit failed: %s (%d)",
+                                       db_strerror(rc), rc );
+#ifdef NEW_LOGGING
+                       LDAP_LOG ( TOOLS, ERR, 
+                               "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+#else
+                       Debug( LDAP_DEBUG_ANY,
+                               "=> bdb_tool_entry_put: %s\n",
+                               text->bv_val, 0, 0 );
+#endif
+                       e->e_id = NOID;
+               }
+
+       } else {
+               TXN_ABORT( tid );
+               snprintf( text->bv_val, text->bv_len,
+                       "txn_aborted! %s (%d)",
+                       db_strerror(rc), rc );
+#ifdef NEW_LOGGING
+               LDAP_LOG ( TOOLS, ERR, 
+                       "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+#else
+               Debug( LDAP_DEBUG_ANY,
+                       "=> bdb_tool_entry_put: %s\n",
+                       text->bv_val, 0, 0 );
+#endif
+               e->e_id = NOID;
+       }
+
+       return e->e_id;
+}
diff --git a/servers/slapd/back-bdb/trans.c b/servers/slapd/back-bdb/trans.c
new file mode 100644 (file)
index 0000000..51fecf4
--- /dev/null
@@ -0,0 +1,47 @@
+/* trans.c - bdb backend transaction routines */
+/* $OpenLDAP$ */
+
+#include "portable.h"
+
+#include <stdio.h>
+#include <ac/string.h>
+
+#include "back-bdb.h"
+#include "external.h"
+#include "lber_pvt.h"
+
+
+/* Congestion avoidance code
+ * for Deadlock Rollback
+ */
+
+void
+bdb_trans_backoff( int num_retries )
+{
+       int i;
+       int delay = 0;
+       int pow_retries = 1;
+       unsigned long key = 0;
+       unsigned long max_key = -1;
+       struct timeval timeout;
+
+       lutil_entropy( &key, sizeof( unsigned long ));
+
+       for ( i = 0; i < num_retries; i++ ) {
+               if ( i >= 5 ) break;
+               pow_retries *= 4;
+       }
+
+       delay = 16384 * (key * (double) pow_retries / (double) max_key);
+       delay = delay ? delay : 1;
+
+#ifdef NEW_LOGGING
+       LDAP_LOG( OPERATION, ERR, "delay = %d, num_retries = %d\n", delay, num_retries, 0 );
+#else
+       Debug( LDAP_DEBUG_TRACE,  "delay = %d, num_retries = %d\n", delay, num_retries, 0 );
+#endif
+
+       timeout.tv_sec = delay / 1000000;
+       timeout.tv_usec = delay % 1000000;
+       select( 0, NULL, NULL, NULL, &timeout );
+}
index adb99fc28254f1970e7c0f7dbcdabf3c0e394af0..fa0a1c2a43299af3c837e3255c7906a01bc15dff 100644 (file)
@@ -16,7 +16,7 @@
 
 #ifdef SLAPD_DNSSRV_DYNAMIC
 
-int back_dnssrv_LTX_init_module(int argc, char *argv[])
+int init_module(int argc, char *argv[])
 {
     BackendInfo bi;
 
index 2d81067a78137f73af34ec57a93c9b435d072988..5119229a591fb4c1fb9e486abf00e1460401a247 100644 (file)
@@ -6,14 +6,14 @@ XXDIR = $(srcdir)/../back-bdb
 XXSRCS = init.c tools.c config.c \
        add.c bind.c compare.c delete.c modify.c modrdn.c search.c \
        extended.c passwd.c referral.c operational.c \
-       attr.c index.c key.c dbcache.c filterindex.c \
-       dn2entry.c dn2id.c error.c id2entry.c idl.c nextid.c cache.c
+       attr.c index.c key.c dbcache.c filterindex.c trans.c \
+       dn2entry.c dn2id.c error.c id2entry.c idl.c nextid.c cache.c ctxcsn.c
 SRCS = $(XXSRCS)
 OBJS = init.lo tools.lo config.lo \
        add.lo bind.lo compare.lo delete.lo modify.lo modrdn.lo search.lo \
        extended.lo passwd.lo referral.lo operational.lo \
-       attr.lo index.lo key.lo dbcache.lo filterindex.lo \
-       dn2entry.lo dn2id.lo error.lo id2entry.lo idl.lo nextid.lo cache.lo
+       attr.lo index.lo key.lo dbcache.lo filterindex.lo trans.lo \
+       dn2entry.lo dn2id.lo error.lo id2entry.lo idl.lo nextid.lo cache.lo ctxcsn.lo
 
 LDAP_INCDIR= ../../../include       
 LDAP_LIBDIR= ../../../libraries
index bbeba6b0c7e25c0f49bf9086171b460adb6c1985..554bdf69cf70b59b8d8816aee846a1624e4de93f 100644 (file)
@@ -4,10 +4,10 @@
 
 SRCS   = init.c config.c search.c bind.c unbind.c add.c compare.c \
                delete.c modify.c modrdn.c \
-               suffixmassage.c map.c extended.c
+               suffixmassage.c map.c extended.c chain.c
 OBJS   = init.lo config.lo search.lo bind.lo unbind.lo add.lo compare.lo \
                delete.lo modify.lo modrdn.lo \
-               suffixmassage.lo map.lo extended.lo
+               suffixmassage.lo map.lo extended.lo chain.lo
 
 LDAP_INCDIR= ../../../include       
 LDAP_LIBDIR= ../../../libraries
index dc67f7e1586c0a964f097e8cf992bec23afd4723..97cc6eff86d5e8f27a02c88bad80fb10130d3cdf 100644 (file)
@@ -194,6 +194,8 @@ extern int suffix_massage_config( struct rewrite_info *info,
 extern int ldap_dnattr_rewrite( dncookie *dc, BerVarray a_vals );
 extern int ldap_dnattr_result_rewrite( dncookie *dc, BerVarray a_vals );
 
+extern int ldap_chain_setup();
+
 LDAP_END_DECL
 
 #endif /* SLAPD_LDAP_H */
index 015660a7d690433de226cb1aabfff6e7ff8e21ed..f9fbcfdaa717d94f782375c3def9714b68079d0c 100644 (file)
@@ -304,7 +304,7 @@ ldap_back_getconn(Operation *op, SlapReply *rs)
                        lc->cred.bv_val = NULL;
                        lc->bound_dn.bv_val = NULL;
                        lc->bound_dn.bv_len = 0;
-                       if ( op->o_conn->c_dn.bv_len != 0
+                       if ( op->o_conn && op->o_conn->c_dn.bv_len != 0
                                        && ( op->o_bd == op->o_conn->c_authz_backend ) ) {
                                
                                dncookie dc;
@@ -324,7 +324,7 @@ ldap_back_getconn(Operation *op, SlapReply *rs)
 #endif
 
                                if ( ldap_back_dn_massage( &dc, &op->o_conn->c_dn, &bv ) ) {
-                                       if (op->o_conn) send_ldap_result( op, rs );
+                                       send_ldap_result( op, rs );
                                        return NULL;
                                }
 
diff --git a/servers/slapd/back-ldap/chain.c b/servers/slapd/back-ldap/chain.c
new file mode 100644 (file)
index 0000000..03784d2
--- /dev/null
@@ -0,0 +1,203 @@
+/* chain.c - chain LDAP operations */
+/* $OpenLDAP$ */
+/*
+ * Copyright 2003 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*
+ * Copyright 2003, Howard Chu, All rights reserved. <hyc@highlandsun.com>
+ * 
+ * Permission is granted to anyone to use this software for any purpose
+ * on any computer system, and to alter it and redistribute it, subject
+ * to the following restrictions:
+ * 
+ * 1. The author is not responsible for the consequences of use of this
+ *    software, no matter how awful, even if they arise from flaws in it.
+ * 
+ * 2. The origin of this software must not be misrepresented, either by
+ *    explicit claim or by omission.  Since few users ever read sources,
+ *    credits should appear in the documentation.
+ * 
+ * 3. Altered versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.  Since few users
+ *    ever read sources, credits should appear in the documentation.
+ * 
+ * 4. This notice may not be removed or altered.
+ */
+
+#include "portable.h"
+
+#include <stdio.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
+#include "slap.h"
+#include "back-ldap.h"
+
+static int
+ldap_chain_response( Operation *op, SlapReply *rs )
+{
+       slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
+       void *private = op->o_bd->be_private;
+       slap_callback *sc = op->o_callback;
+       LDAPControl **prev = op->o_ctrls;
+       LDAPControl **ctrls = NULL, authz;
+       int i, nctrls, rc;
+       int cache = op->o_do_not_cache;
+       char *authzid = NULL;
+       BerVarray ref;
+       struct berval ndn = op->o_ndn;
+
+       if ( rs->sr_err != LDAP_REFERRAL )
+               return SLAP_CB_CONTINUE;
+
+       /* currently we assume only one referral destination.
+        * we'll have to parse this in the future.
+        */
+       ref = rs->sr_ref;
+       rs->sr_ref = NULL;
+
+       op->o_bd->be_private = on->on_bi.bi_private;
+       op->o_callback = NULL;
+
+       /* Chaining is performed by a privileged user on behalf
+        * of a normal user, using the ProxyAuthz control. However,
+        * Binds are done separately, on an anonymous session.
+        */
+       if ( op->o_tag != LDAP_REQ_BIND ) {
+               for (i=0; prev && prev[i]; i++);
+               nctrls = i;
+
+               /* Add an extra NULL slot */
+               if (!prev) i++;
+
+               ctrls = op->o_tmpalloc((i+1)*sizeof(LDAPControl *),
+                       op->o_tmpmemctx);
+               for (i=0; i <nctrls; i++)
+                       ctrls[i] = prev[i];
+               ctrls[nctrls] = &authz;
+               ctrls[nctrls+1] = NULL;
+               authz.ldctl_oid = LDAP_CONTROL_PROXY_AUTHZ;
+               authz.ldctl_iscritical = 1;
+               authz.ldctl_value = op->o_dn;
+               if ( op->o_dn.bv_len ) {
+                       authzid = op->o_tmpalloc( op->o_dn.bv_len+4,
+                               op->o_tmpmemctx );
+                       strcpy(authzid, "dn: ");
+                       strcpy(authzid+4, op->o_dn.bv_val);
+                       authz.ldctl_value.bv_len = op->o_dn.bv_len + 4;
+                       authz.ldctl_value.bv_val = authzid;
+               }
+               op->o_ctrls = ctrls;
+               op->o_ndn = op->o_bd->be_rootndn;
+       }
+
+       switch( op->o_tag ) {
+       case LDAP_REQ_BIND: {
+               struct berval rndn = op->o_req_ndn;
+               Connection *conn = op->o_conn;
+               op->o_req_ndn = slap_empty_bv;
+               op->o_conn = NULL;
+               rc = ldap_back_bind( op, rs );
+               op->o_req_ndn = rndn;
+               op->o_conn = conn;
+               }
+               break;
+       case LDAP_REQ_ADD:
+               rc = ldap_back_add( op, rs );
+               break;
+       case LDAP_REQ_DELETE:
+               rc = ldap_back_delete( op, rs );
+               break;
+       case LDAP_REQ_MODRDN:
+               rc = ldap_back_modrdn( op, rs );
+               break;
+       case LDAP_REQ_MODIFY:
+               rc = ldap_back_modify( op, rs );
+               break;
+       case LDAP_REQ_COMPARE:
+               rc = ldap_back_compare( op, rs );
+               break;
+       case LDAP_REQ_SEARCH:
+               rc = ldap_back_search( op, rs );
+               break;
+       case LDAP_REQ_EXTENDED:
+               rc = ldap_back_extended( op, rs );
+               break;
+       default:
+               rc = SLAP_CB_CONTINUE;
+               break;
+       }
+       op->o_do_not_cache = cache;
+       op->o_ctrls = prev;
+       op->o_bd->be_private = private;
+       op->o_callback = sc;
+       op->o_ndn = ndn;
+       if ( ctrls ) op->o_tmpfree( ctrls, op->o_tmpmemctx );
+       if ( authzid ) op->o_tmpfree( authzid, op->o_tmpmemctx );
+       rs->sr_ref = ref;
+
+       return rc;
+}
+
+static int ldap_chain_config(
+    BackendDB  *be,
+    const char *fname,
+    int                lineno,
+    int                argc,
+    char       **argv
+)
+{
+       slap_overinst *on = (slap_overinst *) be->bd_info;
+       void *private = be->be_private;
+       int rc;
+
+       be->be_private = on->on_bi.bi_private;
+       rc = ldap_back_db_config( be, fname, lineno, argc, argv );
+       be->be_private = private;
+       return rc;
+}
+
+static int ldap_chain_init(
+       BackendDB *be
+)
+{
+       slap_overinst *on = (slap_overinst *) be->bd_info;
+       void *private = be->be_private;
+       int rc;
+
+       be->be_private = NULL;
+       rc = ldap_back_db_init( be );
+       on->on_bi.bi_private = be->be_private;
+       be->be_private = private;
+       return rc;
+}
+
+static int ldap_chain_destroy(
+       BackendDB *be
+)
+{
+       slap_overinst *on = (slap_overinst *) be->bd_info;
+       void *private = be->be_private;
+       int rc;
+
+       be->be_private = on->on_bi.bi_private;
+       rc = ldap_back_db_destroy( be );
+       on->on_bi.bi_private = be->be_private;
+       be->be_private = private;
+       return rc;
+}
+
+static slap_overinst ldapchain;
+
+int ldap_chain_setup()
+{
+       ldapchain.on_bi.bi_type = "chain";
+       ldapchain.on_bi.bi_db_init = ldap_chain_init;
+       ldapchain.on_bi.bi_db_config = ldap_chain_config;
+       ldapchain.on_bi.bi_db_destroy = ldap_chain_destroy;
+       ldapchain.on_response = ldap_chain_response;
+
+       return overlay_register( &ldapchain );
+}
index 5bf32766f276f1d0d5953880892204e8a86af27c..fb3d8d676d36f3de99701ed35a73d9d3dbaf60c4 100644 (file)
@@ -47,7 +47,7 @@
 
 #ifdef SLAPD_LDAP_DYNAMIC
 
-int back_ldap_LTX_init_module(int argc, char *argv[]) {
+int init_module(int argc, char *argv[]) {
     BackendInfo bi;
 
     memset( &bi, '\0', sizeof(bi) );
@@ -96,6 +96,8 @@ ldap_back_initialize(
        bi->bi_connection_init = 0;
        bi->bi_connection_destroy = ldap_back_conn_destroy;
 
+       ldap_chain_setup();
+
        return 0;
 }
 
index 52aa5a5d3f6c313a2e3cac9947a0893a35cc9730..7406a93d7e8bcfd5abb8a7230f24d343c765c859 100644 (file)
@@ -29,6 +29,9 @@ ldbm_back_add(
        AttributeDescription *entry = slap_schema.si_ad_entry;
        char textbuf[SLAP_TEXT_BUFLEN];
        size_t textlen = sizeof textbuf;
+#ifdef LDBM_SUBENTRIES
+       int subentry;
+#endif
 
 #ifdef NEW_LOGGING
        LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_back_add: %s\n", op->o_req_dn.bv_val, 0, 0 );
@@ -36,15 +39,7 @@ ldbm_back_add(
        Debug(LDAP_DEBUG_ARGS, "==> ldbm_back_add: %s\n", op->o_req_dn.bv_val, 0, 0);
 #endif
        
-#ifndef LDAP_CACHING
        rs->sr_err = entry_schema_check( op->o_bd, op->oq_add.rs_e, NULL, &rs->sr_text, textbuf, textlen );
-#else /* LDAP_CACHING */
-        if ( !op->o_caching_on ) {
-               rs->sr_err = entry_schema_check( op->o_bd, op->oq_add.rs_e, NULL, &rs->sr_text, textbuf, textlen );
-       } else {
-               rs->sr_err = LDAP_SUCCESS;
-       }
-#endif /* LDAP_CACHING */
 
        if ( rs->sr_err != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
@@ -56,12 +51,13 @@ ldbm_back_add(
 #endif
 
                send_ldap_result( op, rs );
-               return( -1 );
+               return rs->sr_err;
        }
 
-#ifdef LDAP_CACHING
-       if ( !op->o_caching_on ) {
-#endif /* LDAP_CACHING */
+#ifdef LDBM_SUBENTRIES
+       subentry = is_entry_subentry( op->oq_add.rs_e );
+#endif
+
        if ( !access_allowed( op, op->oq_add.rs_e,
                                entry, NULL, ACL_WRITE, NULL ) )
        {
@@ -77,11 +73,8 @@ ldbm_back_add(
                send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS,
                    "no write access to entry" );
 
-               return -1;
-       }
-#ifdef LDAP_CACHING
+               return LDAP_INSUFFICIENT_ACCESS;
        }
-#endif /* LDAP_CACHING */
 
        /* grab giant lock for writing */
        ldap_pvt_thread_rdwr_wlock(&li->li_giant_rwlock);
@@ -91,7 +84,7 @@ ldbm_back_add(
                ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
                rs->sr_err = rs->sr_err ? LDAP_OTHER : LDAP_ALREADY_EXISTS;
                send_ldap_result( op, rs );
-               return( -1 );
+               return rs->sr_err;
        }
 
        /*
@@ -106,11 +99,7 @@ ldbm_back_add(
                dnParent( &op->o_req_ndn, &pdn );
        }
 
-#ifndef LDAP_CACHING
        if( pdn.bv_len )
-#else /* LDAP_CACHING */
-       if( pdn.bv_len && !op->o_caching_on )
-#endif /* LDAP_CACHING */
        {
                Entry *matched = NULL;
 
@@ -146,7 +135,7 @@ ldbm_back_add(
                        ber_bvarray_free( rs->sr_ref );
                        free( (char *)rs->sr_matched );
 
-                       return -1;
+                       return rs->sr_err;
                }
 
                if ( ! access_allowed( op, p,
@@ -168,9 +157,24 @@ ldbm_back_add(
                        send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS,
                            "no write access to parent" );
 
-                       return -1;
+                       return LDAP_INSUFFICIENT_ACCESS;
                }
 
+#ifdef LDBM_SUBENTRIES
+               if ( is_entry_subentry( p )) {
+#ifdef NEW_LOGGING
+                       LDAP_LOG( OPERATION, DETAIL1,
+                               "bdb_add: parent is subentry\n", 0, 0, 0 );
+#else
+                       Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is subentry\n",
+                               0, 0, 0 );
+#endif
+                       rs->sr_err = LDAP_OBJECT_CLASS_VIOLATION;
+                       rs->sr_text = "parent is a subentry";
+                       goto return_results;
+               }
+#endif
+
                if ( is_entry_alias( p ) ) {
                        /* parent is an alias, don't allow add */
 
@@ -190,7 +194,7 @@ ldbm_back_add(
                        send_ldap_error( op, rs, LDAP_ALIAS_PROBLEM,
                            "parent is an alias" );
 
-                       return -1;
+                       return LDAP_ALIAS_PROBLEM;
                }
 
                if ( is_entry_referral( p ) ) {
@@ -216,25 +220,24 @@ ldbm_back_add(
 
                        ber_bvarray_free( rs->sr_ref );
                        free( (char *)rs->sr_matched );
-                       return -1;
+                       return rs->sr_err;
                }
 
+#ifdef LDBM_SUBENTRIES
+               if ( subentry ) {
+                       /* FIXME: */
+                       /* parent must be an administrative point of the required kind */
+               }
+#endif
+
        } else {
-#ifndef LDAP_CACHING
                if( pdn.bv_val != NULL )
-#else /* LDAP_CACHING */
-               if( pdn.bv_val != NULL && !op->o_caching_on )
-#endif /* LDAP_CACHING */
                {
                        assert( *pdn.bv_val == '\0' );
                }
 
                /* no parent, must be adding entry to root */
-#ifndef LDAP_CACHING
                if ( !be_isroot( op->o_bd, &op->o_ndn ) )
-#else /* LDAP_CACHING */
-               if ( !be_isroot( op->o_bd, &op->o_ndn ) && !op->o_caching_on )
-#endif /* LDAP_CACHING */
                {
                        if ( be_issuffix( op->o_bd, (struct berval *)&slap_empty_bv ) || be_isupdate( op->o_bd, &op->o_ndn ) ) {
                                p = (Entry *)&slap_entry_root;
@@ -260,10 +263,9 @@ ldbm_back_add(
                                                LDAP_INSUFFICIENT_ACCESS,
                                                "no write access to parent" );
 
-                                       return -1;
+                                       return LDAP_INSUFFICIENT_ACCESS;
                                }
-
-                       } else {
+                       } else if ( !is_entry_glue( op->oq_add.rs_e )) {
                                ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
 
 #ifdef NEW_LOGGING
@@ -278,11 +280,27 @@ ldbm_back_add(
 #endif
 
                                send_ldap_error( op, rs,
-                                               LDAP_INSUFFICIENT_ACCESS, NULL );
+                                               LDAP_NO_SUCH_OBJECT, NULL );
 
-                               return -1;
+                                       return LDAP_NO_SUCH_OBJECT;
                        }
                }
+
+#ifdef LDBM_SUBENTRIES
+                       if( subentry ) {
+#ifdef NEW_LOGGING
+                                       LDAP_LOG ( OPERATION, DETAIL1,
+                                               "bdb_add: no parent, cannot add subentry\n", 0, 0, 0 );
+#else
+                                       Debug( LDAP_DEBUG_TRACE,
+                                               "bdb_add: no parent, cannot add subentry\n", 0, 0, 0 );
+#endif
+                                       rs->sr_err = LDAP_NO_SUCH_OBJECT;
+                                       rs->sr_text = "no parent, cannot add subentry";
+                                       goto return_results;
+                               }
+#endif
+
        }
 
        if ( next_id( op->o_bd, &op->oq_add.rs_e->e_id ) ) {
@@ -304,7 +322,7 @@ ldbm_back_add(
                send_ldap_error( op, rs, LDAP_OTHER,
                        "next_id add failed" );
 
-               return( -1 );
+               return LDAP_OTHER;
        }
 
        /*
@@ -332,7 +350,7 @@ ldbm_back_add(
                rs->sr_err = rs->sr_err > 0 ? LDAP_ALREADY_EXISTS : LDAP_OTHER;
                send_ldap_result( op, rs );
 
-               return( -1 );
+               return rs->sr_err;
        }
 
        rs->sr_err = -1;
index b4f16656e087d04b256c40871a53cb866d3e8331..669f80793dd2cd2e0c84425b4f43bdc85d1728af 100644 (file)
@@ -12,6 +12,8 @@
 
 LDAP_BEGIN_DECL
 
+#define LDBM_SUBENTRIES 1
+
 #define DEFAULT_CACHE_SIZE     1000
 
 #if defined(HAVE_BERKELEY_DB) && DB_VERSION_MAJOR >= 2
index cb2f341a82f692817e183bbe0e529dcd4d566e8a..73ab8217d1874b788942a36550c105550eb59b3f 100644 (file)
@@ -81,12 +81,28 @@ ldbm_back_bind(
 
                if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );
                if ( rs->sr_matched ) free( (char *)rs->sr_matched );
-               return( rc );
+               return rs->sr_err;
        }
 
        ber_dupbv( &op->oq_bind.rb_edn, &e->e_name );
 
        /* check for deleted */
+#ifdef LDBM_SUBENTRIES
+       if ( is_entry_subentry( e ) ) {
+               /* entry is an subentry, don't allow bind */
+#ifdef NEW_LOGGING
+               LDAP_LOG ( OPERATION, DETAIL1,
+                               "bdb_bind: entry is subentry\n", 0, 0, 0 );
+#else
+               Debug( LDAP_DEBUG_TRACE,
+                               "entry is subentry\n", 0, 0, 0 );
+#endif
+               rs->sr_err = LDAP_INVALID_CREDENTIALS;
+               send_ldap_result( op, rs );
+               rc = LDAP_INVALID_CREDENTIALS;
+               goto return_results;
+       }
+#endif
 
        if ( is_entry_alias( e ) ) {
                /* entry is an alias, don't allow bind */
@@ -102,7 +118,7 @@ ldbm_back_bind(
                send_ldap_error( op, rs, LDAP_ALIAS_PROBLEM,
                    "entry is alias" );
 
-               rc = 1;
+               rc = LDAP_ALIAS_PROBLEM;
                goto return_results;
        }
 
@@ -130,7 +146,7 @@ ldbm_back_bind(
 
                ber_bvarray_free( rs->sr_ref );
 
-               rc = 1;
+               rc = rs->sr_err;
                goto return_results;
        }
 
@@ -140,7 +156,7 @@ ldbm_back_bind(
                        password, NULL, ACL_AUTH, NULL ) )
                {
                        send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
-                       rc = 1;
+                       rc = LDAP_INSUFFICIENT_ACCESS;
                        goto return_results;
                }
 
@@ -148,14 +164,14 @@ ldbm_back_bind(
                        send_ldap_error( op, rs, LDAP_INAPPROPRIATE_AUTH, NULL );
 
                        /* stop front end from sending result */
-                       rc = 1;
+                       rc = LDAP_INAPPROPRIATE_AUTH;
                        goto return_results;
                }
 
                if ( slap_passwd_check( op->o_conn, a, &op->oq_bind.rb_cred, &rs->sr_text ) != 0 ) {
                        send_ldap_error( op, rs, LDAP_INVALID_CREDENTIALS, NULL );
                        /* stop front end from sending result */
-                       rc = 1;
+                       rc = LDAP_INVALID_CREDENTIALS;
                        goto return_results;
                }
 
@@ -166,7 +182,7 @@ ldbm_back_bind(
        case LDAP_AUTH_KRBV41:
                if ( krbv4_ldap_auth( op->o_bd, &op->oq_bind.rb_cred, &ad ) != LDAP_SUCCESS ) {
                        send_ldap_error( op, rs, LDAP_INVALID_CREDENTIALS, NULL );
-                       rc = 1;
+                       rc = LDAP_INVALID_CREDENTIALS;
                        goto return_results;
                }
 
@@ -175,7 +191,7 @@ ldbm_back_bind(
                {
                        send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS,
                                NULL );
-                       rc = 1;
+                       rc = LDAP_INSUFFICIENT_ACCESS;
                        goto return_results;
                }
 
@@ -191,7 +207,7 @@ ldbm_back_bind(
                                break;
                        }
                        send_ldap_error( op, rs, LDAP_INAPPROPRIATE_AUTH, NULL );
-                       rc = 1;
+                       rc = LDAP_INAPPROPRIATE_AUTH;
                        goto return_results;
 
                } else {        /* look for krbname match */
@@ -203,7 +219,7 @@ ldbm_back_bind(
                        if ( value_find( a->a_desc, a->a_vals, &krbval ) != 0 ) {
                                send_ldap_error( op, rs,
                                    LDAP_INVALID_CREDENTIALS, NULL );
-                               rc = 1;
+                               rc = LDAP_INVALID_CREDENTIALS;
                                goto return_results;
                        }
                }
@@ -221,7 +237,7 @@ ldbm_back_bind(
        default:
                send_ldap_error( op, rs, LDAP_STRONG_AUTH_NOT_SUPPORTED,
                    "authentication method not supported" );
-               rc = 1;
+               rc = LDAP_STRONG_AUTH_NOT_SUPPORTED;
                goto return_results;
        }
 
index c6f9b237a72c6f2f36d598e32e5783c09276c500..f8a609ae4bf906ad36e7181e29110f295d9c4fce 100644 (file)
@@ -511,11 +511,11 @@ try_again:
 
 #ifdef NEW_LOGGING
                        LDAP_LOG( CACHE, INFO, 
-                                  "cache_find_entry_dn2id: (%s) %ld not ready: %d\n",
+                                  "cache_find_entry_ndn2id: (%s) %ld not ready: %d\n",
                                   ndn->bv_val, id, state );
 #else
                        Debug(LDAP_DEBUG_TRACE,
-                               "====> cache_find_entry_dn2id(\"%s\"): %ld (not ready) %d\n",
+                               "====> cache_find_entry_ndn2id(\"%s\"): %ld (not ready) %d\n",
                                ndn->bv_val, id, state);
 #endif
 
@@ -532,11 +532,11 @@ try_again:
 
 #ifdef NEW_LOGGING
                LDAP_LOG( CACHE, DETAIL1, 
-                          "cache_find_entry_dn2id: (%s): %ld %d tries\n",
+                          "cache_find_entry_ndn2id: (%s): %ld %d tries\n",
                           ndn->bv_val, id, count );
 #else
                Debug(LDAP_DEBUG_TRACE,
-                       "====> cache_find_entry_dn2id(\"%s\"): %ld (%d tries)\n",
+                       "====> cache_find_entry_ndn2id(\"%s\"): %ld (%d tries)\n",
                        ndn->bv_val, id, count);
 #endif
 
index 1e9a3989c0d07c054f360151f144c8e0d96d5159..73ce46668331250d936225a972ebdf7e5cbcacc4 100644 (file)
@@ -40,7 +40,10 @@ ldbm_back_delete(
        ldap_pvt_thread_rdwr_wlock(&li->li_giant_rwlock);
 
        /* get entry with writer lock */
-       if ( (e = dn2entry_w( op->o_bd, &op->o_req_ndn, &matched )) == NULL ) {
+       e = dn2entry_w( op->o_bd, &op->o_req_ndn, &matched );
+
+       /* FIXME : dn2entry() should return non-glue entry */
+       if ( e == NULL || ( !manageDSAit && is_entry_glue( e ))) {
 #ifdef NEW_LOGGING
                LDAP_LOG( BACK_LDBM, INFO, 
                        "ldbm_back_delete: no such object %s\n", op->o_req_dn.bv_val, 0, 0 );
@@ -57,8 +60,9 @@ ldbm_back_delete(
                        cache_return_entry_r( &li->li_cache, matched );
 
                } else {
-                       rs->sr_ref = referral_rewrite( default_referral,
-                               NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
+                       BerVarray deref = op->o_bd->syncinfo ?
+                                                         op->o_bd->syncinfo->provideruri_bv : default_referral;
+                       rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                }
 
                ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
@@ -73,9 +77,6 @@ ldbm_back_delete(
        }
 
        /* check entry for "entry" acl */
-#ifdef LDAP_CACHING
-       if( !op->o_caching_on ) {
-#endif /* LDAP_CACHING */
        if ( ! access_allowed( op, e,
                entry, NULL, ACL_WRITE, NULL ) )
        {
@@ -92,7 +93,7 @@ ldbm_back_delete(
                send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS,
                        "no write access to entry" );
 
-               rc = 1;
+               rc = LDAP_INSUFFICIENT_ACCESS;
                goto return_results;
        }
 
@@ -115,7 +116,7 @@ ldbm_back_delete(
 
                if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );
 
-               rc = 1;
+               rc = LDAP_REFERRAL;
                goto return_results;
        }
 
@@ -215,9 +216,6 @@ ldbm_back_delete(
                        }
                }
        }
-#ifdef LDAP_CACHING
-       }
-#endif /* LDAP_CACHING */
 
        /* delete from dn2id mapping */
        if ( dn2id_delete( op->o_bd, &e->e_nname, e->e_id ) != 0 ) {
@@ -256,7 +254,7 @@ ldbm_back_delete(
 
        rs->sr_err = LDAP_SUCCESS;
        send_ldap_result( op, rs );
-       rc = 0;
+       rc = LDAP_SUCCESS;
 
 return_results:;
        if( p != NULL ) {
index 491723fe47471b14accc103c0a2aaa3bef77a459..ca379be5345fcd5409047c0afed6bef9ea8169cf 100644 (file)
@@ -419,7 +419,8 @@ dn2entry_rw(
        /* entry does not exist - see how much of the dn does exist */
        if ( !be_issuffix( be, dn ) && (dnParent( dn, &pdn ), pdn.bv_len) ) {
                /* get entry with reader lock */
-               if ( (e = dn2entry_r( be, &pdn, matched )) != NULL ) {
+               if ((e = dn2entry_r( be, &pdn, matched )) != NULL )
+               {
                        *matched = e;
                }
        }
index acb3b763f3eb9954adad143c5514767a994b79c8..33edb9bfc35558a721fc6d4622574f4f408b271b 100644 (file)
@@ -65,9 +65,9 @@ int ldbm_back_entry_get(
        const char *at_name = at->ad_cname.bv_val;
 
 #ifdef NEW_LOGGING
-       LDAP_LOG( BACK_BDB, ARGS, 
+       LDAP_LOG( BACK_LDBM, ARGS, 
                "ldbm_back_entry_get: ndn: \"%s\"\n", ndn->bv_val, 0, 0 );
-       LDAP_LOG( BACK_BDB, ARGS, 
+       LDAP_LOG( BACK_LDBM, ARGS, 
                "ldbm_back_entry_get: oc: \"%s\", at: \"%s\"\n",
                oc ? oc->soc_cname.bv_val : "(null)", at_name, 0);
 #else
@@ -84,7 +84,7 @@ int ldbm_back_entry_get(
        e = dn2entry_rw( op->o_bd, ndn, NULL, rw );
        if (e == NULL) {
 #ifdef NEW_LOGGING
-               LDAP_LOG( BACK_BDB, INFO, 
+               LDAP_LOG( BACK_LDBM, INFO, 
                        "ldbm_back_entry_get: cannot find entry (%s)\n", 
                        ndn->bv_val, 0, 0 );
 #else
@@ -96,7 +96,7 @@ int ldbm_back_entry_get(
        }
        
 #ifdef NEW_LOGGING
-       LDAP_LOG( BACK_BDB, DETAIL1, "ldbm_back_entry_get: found entry (%s)\n",
+       LDAP_LOG( BACK_LDBM, DETAIL1, "ldbm_back_entry_get: found entry (%s)\n",
                ndn->bv_val, 0, 0 );
 #else
        Debug( LDAP_DEBUG_ACL,
@@ -108,7 +108,7 @@ int ldbm_back_entry_get(
        /* find attribute values */
        if( is_entry_alias( e ) ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG( BACK_BDB, INFO, 
+               LDAP_LOG( BACK_LDBM, INFO, 
                        "ldbm_back_entry_get: entry (%s) is an alias\n", e->e_name.bv_val, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ACL,
@@ -121,7 +121,7 @@ int ldbm_back_entry_get(
 
        if( is_entry_referral( e ) ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG( BACK_BDB, INFO, 
+               LDAP_LOG( BACK_LDBM, INFO, 
                        "ldbm_back_entry_get: entry (%s) is a referral.\n", e->e_name.bv_val, 0, 0);
 #else
                Debug( LDAP_DEBUG_ACL,
@@ -133,7 +133,7 @@ int ldbm_back_entry_get(
 
        if ( oc && !is_entry_objectclass( e, oc, 0 )) {
 #ifdef NEW_LOGGING
-               LDAP_LOG( BACK_BDB, INFO, 
+               LDAP_LOG( BACK_LDBM, INFO, 
                        "ldbm_back_entry_get: failed to find objectClass.\n", 0, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ACL,
@@ -155,7 +155,7 @@ return_results:
        }
 
 #ifdef NEW_LOGGING
-       LDAP_LOG( BACK_BDB, ENTRY, "ldbm_back_entry_get: rc=%d\n", rc, 0, 0 );
+       LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_back_entry_get: rc=%d\n", rc, 0, 0 );
 #else
        Debug( LDAP_DEBUG_TRACE,
                "ldbm_back_entry_get: rc=%d\n",
index 26c411d1710dc25022c11842b995f19b7de073a9..cab46804e1c8a255ebf76fc5db4f2e8b9e97c483 100644 (file)
@@ -17,7 +17,7 @@
 
 #ifdef SLAPD_LDBM_DYNAMIC
 
-int back_ldbm_LTX_init_module(int argc, char *argv[]) {
+int init_module(int argc, char *argv[]) {
     BackendInfo bi;
 
     memset( &bi, '\0', sizeof(bi) );
@@ -84,6 +84,10 @@ ldbm_back_initialize(
        bi->bi_tool_entry_reindex = ldbm_tool_entry_reindex;
        bi->bi_tool_sync = ldbm_tool_sync;
 
+       bi->bi_tool_dn2id_get = 0;
+       bi->bi_tool_id2entry_get = 0;
+       bi->bi_tool_entry_modify = 0;
+
        bi->bi_connection_init = 0;
        bi->bi_connection_destroy = 0;
 
@@ -129,6 +133,10 @@ ldbm_back_db_init(
 
        /* indicate system schema supported */
        be->be_flags |= 
+               SLAP_BFLAG_INCREMENT |
+#ifdef LDBM_SUBENTRIES
+               SLAP_BFLAG_SUBENTRIES |
+#endif
                SLAP_BFLAG_ALIASES |
                SLAP_BFLAG_REFERRALS;
 
index b044b7ffdeb3e44d6c13f1a89629951e35d95744..1e78935a79e4d5d7c3e58a4bc03d67c7520a2c58 100644 (file)
@@ -116,6 +116,28 @@ int ldbm_modify_internal(
                        }
                        break;
 
+               case LDAP_MOD_INCREMENT:
+#ifdef NEW_LOGGING
+                       LDAP_LOG( BACK_LDBM, DETAIL1,
+                               "ldbm_modify_internal:  increment\n",0,0,0);
+#else
+                       Debug(LDAP_DEBUG_ARGS,
+                               "ldbm_modify_internal:  increment\n",0,0,0);
+#endif
+
+                       rc = modify_increment_values( e, mod, get_permissiveModify( op ),
+                               text, textbuf, textlen );
+                       if( rc != LDAP_SUCCESS ) {
+#ifdef NEW_LOGGING
+                               LDAP_LOG( BACK_LDBM, INFO, 
+                                       "ldbm_modify_internal: failed %d (%s)\n", rc, *text, 0 );
+#else
+                               Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
+                                       rc, *text, 0);
+#endif
+                       }
+                       break;
+
                case SLAP_MOD_SOFTADD:
 #ifdef NEW_LOGGING
                        LDAP_LOG( BACK_LDBM, DETAIL1, 
@@ -187,16 +209,7 @@ int ldbm_modify_internal(
        }
 
        /* check that the entry still obeys the schema */
-#ifndef LDAP_CACHING
        rc = entry_schema_check( op->o_bd, e, save_attrs, text, textbuf, textlen );
-#else /* LDAP_CACHING */
-       if ( !op->o_caching_on ) {
-               rc = entry_schema_check( op->o_bd, e, save_attrs,
-                               text, textbuf, textlen );
-       } else {
-               rc = LDAP_SUCCESS; 
-       }
-#endif /* LDAP_CACHING */
 
        if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
@@ -299,7 +312,10 @@ ldbm_back_modify(
        ldap_pvt_thread_rdwr_wlock(&li->li_giant_rwlock);
 
        /* acquire and lock entry */
-       if ( (e = dn2entry_w( op->o_bd, &op->o_req_ndn, &matched )) == NULL ) {
+       e = dn2entry_w( op->o_bd, &op->o_req_ndn, &matched );
+
+       /* FIXME: dn2entry() should return non-glue entry */
+       if (( e == NULL ) || ( !manageDSAit && e && is_entry_glue( e ))) {
                if ( matched != NULL ) {
                        rs->sr_matched = ch_strdup( matched->e_dn );
                        rs->sr_ref = is_entry_referral( matched )
@@ -307,8 +323,9 @@ ldbm_back_modify(
                                : NULL;
                        cache_return_entry_r( &li->li_cache, matched );
                } else {
-                       rs->sr_ref = referral_rewrite( default_referral,
-                               NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
+                       BerVarray deref = op->o_bd->syncinfo ?
+                                                         op->o_bd->syncinfo->provideruri_bv : default_referral;
+                       rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                }
 
                ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
@@ -318,14 +335,10 @@ ldbm_back_modify(
                if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );
                free( (char *)rs->sr_matched );
 
-               return( -1 );
+               return rs->sr_err;
        }
 
-#ifndef LDAP_CACHING
        if ( !manageDSAit && is_entry_referral( e ) )
-#else /* LDAP_CACHING */
-       if ( !op->o_caching_on && !manageDSAit && is_entry_referral( e ) )
-#endif /* LDAP_CACHING */
        {
                /* parent is a referral, don't allow add */
                /* parent is an alias, don't allow add */
@@ -364,6 +377,7 @@ ldbm_back_modify(
        if ( id2entry_add( op->o_bd, e ) != 0 ) {
                send_ldap_error( op, rs, LDAP_OTHER,
                        "id2entry failure" );
+               rs->sr_err = LDAP_OTHER;
                goto error_return;
        }
 
@@ -372,10 +386,11 @@ ldbm_back_modify(
 
        cache_return_entry_w( &li->li_cache, e );
        ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
-       return( 0 );
+
+       return LDAP_SUCCESS;
 
 error_return:;
        cache_return_entry_w( &li->li_cache, e );
        ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
-       return( -1 );
+       return rs->sr_err;
 }
index 8123505849574710e9625b809bad67472470023f..7200a7bc481abc49912a64fac339e0bc56a20df4 100644 (file)
@@ -80,17 +80,21 @@ ldbm_back_modrdn(
        /* grab giant lock for writing */
        ldap_pvt_thread_rdwr_wlock(&li->li_giant_rwlock);
 
+       e = dn2entry_w( op->o_bd, &op->o_req_ndn, &matched );
+
        /* get entry with writer lock */
-       if ( (e = dn2entry_w( op->o_bd, &op->o_req_ndn, &matched )) == NULL ) {
-               if( matched != NULL ) {
+       /* FIXME: dn2entry() should return non-glue entry */
+       if (( e == NULL  ) || ( !manageDSAit && e && is_entry_glue( e ))) {
+               if ( matched != NULL ) {
                        rs->sr_matched = strdup( matched->e_dn );
                        rs->sr_ref = is_entry_referral( matched )
                                ? get_entry_referrals( op, matched )
                                : NULL;
                        cache_return_entry_r( &li->li_cache, matched );
                } else {
-                       rs->sr_ref = referral_rewrite( default_referral,
-                               NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
+                       BerVarray deref = op->o_bd->syncinfo ?
+                                                         op->o_bd->syncinfo->provideruri_bv : default_referral;
+                       rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                }
 
                ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
@@ -101,7 +105,7 @@ ldbm_back_modrdn(
                if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );
                free( (char *)rs->sr_matched );
 
-               return( -1 );
+               return rs->sr_err;
        }
 
        /* check entry for "entry" acl */
index 8df10e7708ce5983ea3fd5119c2eb306bf119920..b5d0c5ebdcce00a6a05111968bf8832a1ee82fb4 100644 (file)
@@ -40,13 +40,12 @@ ldbm_back_exop_passwd(
 
 #ifdef NEW_LOGGING
        LDAP_LOG( BACK_LDBM, ENTRY,
-                  "ldbm_back_exop_passwd: \"%s\"\n", id.bv_val ? id.bv_val : "", 0,0 );
+               "ldbm_back_exop_passwd: \"%s\"\n", id.bv_val ? id.bv_val : "", 0,0 );
 #else
        Debug( LDAP_DEBUG_ARGS, "==> ldbm_back_exop_passwd: \"%s\"\n",
                id.bv_val ? id.bv_val : "", 0, 0 );
 #endif
 
-
        if( rc != LDAP_SUCCESS ) {
                goto done;
        }
@@ -102,13 +101,24 @@ ldbm_back_exop_passwd(
        ldap_pvt_thread_rdwr_wlock(&li->li_giant_rwlock);
 
        e = dn2entry_w( op->o_bd, &ndn, NULL );
-       if( e == NULL ) {
+
+       if ( e == NULL || is_entry_glue( e )) {
+               /* FIXME : dn2entry() should return non-glue entry */
                ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
                rs->sr_text = "could not locate authorization entry";
                rc = LDAP_NO_SUCH_OBJECT;
                goto done;
        }
 
+#ifdef LDBM_SUBENTRIES
+       if( is_entry_subentry( e ) ) {
+               /* entry is a subentry, don't allow operation */
+               rs->sr_text = "authorization entry is subentry";
+               rc = LDAP_OTHER;
+               goto done;
+       }
+#endif
+
        if( is_entry_alias( e ) ) {
                /* entry is an alias, don't allow operation */
                rs->sr_text = "authorization entry is alias";
index 3c84a361dd8f57ceb5398ae0ede67867b5dfb0a9..4a463522085c54b6f25ace591d31aa018a643f4d 100644 (file)
@@ -41,10 +41,6 @@ ldbm_back_search(
        int             manageDSAit = get_manageDSAit( op );
        int             cscope = LDAP_SCOPE_DEFAULT;
 
-#ifdef LDAP_CACHING
-       Entry           cache_base_entry; 
-#endif /* LDAP_CACHING */
-
        struct slap_limits_set *limit = NULL;
        int isroot = 0;
                
@@ -57,7 +53,6 @@ ldbm_back_search(
        /* grab giant lock for reading */
        ldap_pvt_thread_rdwr_rlock(&li->li_giant_rwlock);
 
-#ifndef LDAP_CACHING
        if ( op->o_req_ndn.bv_len == 0 ) {
                /* DIT root special case */
                e = (Entry *) &slap_entry_root;
@@ -65,25 +60,6 @@ ldbm_back_search(
                /* need normalized dn below */
                ber_dupbv( &realbase, &e->e_nname );
 
-#else /* LDAP_CACHING */
-       if ( op->o_caching_on || op->o_req_ndn.bv_len == 0 ) {
-               if (op->o_req_ndn.bv_len == 0) {
-                   e = (Entry *) &slap_entry_root;
-                   /* need normalized dn below */
-                   ber_dupbv( &realbase, &e->e_nname );
-               } else {
-                       if ((op->oq_search.rs_scope == LDAP_SCOPE_BASE) 
-                                       && (e = dn2entry_r( op->o_bd, &op->o_req_ndn, &matched )))
-                       {
-                               candidates = base_candidate(op->o_bd, e);
-                               cache_return_entry_r( &li->li_cache, e );
-                               goto searchit;
-                       }
-                       cache_base_entry.e_nname = op->o_req_ndn;
-                       e = &cache_base_entry;
-               }
-#endif /* LDAP_CACHING */
-
                candidates = search_candidates( op, e, op->oq_search.rs_filter,
                                op->oq_search.rs_scope, op->oq_search.rs_deref,
                                manageDSAit || get_domainScope(op) );
@@ -135,7 +111,7 @@ ldbm_back_search(
 
                ber_bvarray_free( rs->sr_ref );
                ber_memfree( matched_dn.bv_val );
-               return 1;
+               return LDAP_REFERRAL;
        }
 
        if (!manageDSAit && is_entry_referral( e ) ) {
@@ -179,7 +155,7 @@ ldbm_back_search(
                }
 
                ber_memfree( matched_dn.bv_val );
-               return 1;
+               return LDAP_OTHER;
        }
 
        if ( is_entry_alias( e ) ) {
@@ -213,31 +189,16 @@ searchit:
                Debug( LDAP_DEBUG_TRACE, "ldbm_search: no candidates\n",
                        0, 0, 0 );
 #endif
-#ifdef LDAP_CACHING
-                if ( op->o_caching_on ) {
-                       ldap_pvt_thread_rdwr_runlock(&li->li_giant_rwlock);
-               }
-#endif /* LDAP_CACHING */
 
                rs->sr_err = LDAP_SUCCESS;
                send_ldap_result( op, rs );
 
-#ifdef LDAP_CACHING
-                if ( op->o_caching_on ) {
-                       ldap_pvt_thread_rdwr_rlock(&li->li_giant_rwlock);
-               }
-#endif /* LDAP_CACHING */
-
-               rc = 1;
+               rc = LDAP_SUCCESS;
                goto done;
        }
 
        /* if not root, get appropriate limits */
-#ifndef LDAP_CACHING
        if ( be_isroot( op->o_bd, &op->o_ndn ) )
-#else /* LDAP_CACHING */
-       if ( op->o_caching_on || be_isroot( op->o_bd, &op->o_ndn ) )
-#endif /* LDAP_CACHING */
        {
                /*
                 * FIXME: I'd consider this dangerous if someone
@@ -253,7 +214,7 @@ searchit:
                if ( ID_BLOCK_NIDS( candidates ) > (unsigned) limit->lms_s_unchecked ) {
                        send_ldap_error( op, rs, LDAP_ADMINLIMIT_EXCEEDED,
                                        NULL );
-                       rc = 0;
+                       rc = LDAP_SUCCESS;
                        goto done;
                }
        }
@@ -286,7 +247,7 @@ searchit:
                                send_ldap_error( op, rs,
                                                LDAP_ADMINLIMIT_EXCEEDED,
                                                NULL );
-                               rc = 0
+                               rc = LDAP_SUCCESS
                                goto done;
                        }
 
@@ -310,7 +271,7 @@ searchit:
                                send_ldap_error( op, rs,
                                                LDAP_ADMINLIMIT_EXCEEDED,
                                                NULL );
-                               rc = 0;
+                               rc = LDAP_SUCCESS;
                                goto done;
                        }
 
@@ -330,7 +291,7 @@ searchit:
 
                /* check for abandon */
                if ( op->o_abandon ) {
-                       rc = 0;
+                       rc = LDAP_SUCCESS;
                        goto done;
                }
 
@@ -338,7 +299,7 @@ searchit:
                if ( op->oq_search.rs_tlimit != -1 && slap_get_time() > stoptime ) {
                        rs->sr_err = LDAP_TIMELIMIT_EXCEEDED;
                        send_ldap_result( op, rs );
-                       rc = 0;
+                       rc = LDAP_SUCCESS;
                        goto done;
                }
 
@@ -359,9 +320,25 @@ searchit:
                }
 
                rs->sr_entry = e;
-#ifdef LDAP_CACHING
-                if ( !op->o_caching_on ) {
-#endif /* LDAP_CACHING */
+
+#ifdef LDBM_SUBENTRIES
+       if ( is_entry_subentry( e ) ) {
+               if( op->oq_search.rs_scope != LDAP_SCOPE_BASE ) {
+                       if(!get_subentries_visibility( op )) {
+                               /* only subentries are visible */
+                               goto loop_continue;
+                       }
+               } else if ( get_subentries( op ) &&
+                       !get_subentries_visibility( op ))
+               {
+                       /* only subentries are visible */
+                       goto loop_continue;
+               }
+       } else if ( get_subentries_visibility( op )) {
+               /* only subentries are visible */
+               goto loop_continue;
+       }
+#endif
 
                if ( op->oq_search.rs_deref & LDAP_DEREF_SEARCHING && is_entry_alias( e ) ) {
                        Entry *matched;
@@ -461,9 +438,9 @@ searchit:
                        goto loop_continue;
                }
 
-#ifdef LDAP_CACHING
+               if ( !manageDSAit && is_entry_glue( e )) {
+                       goto loop_continue;
                }
-#endif /* LDAP_CACHING */
 
                /* if it matches the filter and scope, send it */
                result = test_filter( op, e, op->oq_search.rs_filter );
@@ -493,28 +470,14 @@ searchit:
                                        cache_return_entry_r( &li->li_cache, e );
                                        rs->sr_err = LDAP_SIZELIMIT_EXCEEDED;
                                        send_ldap_result( op, rs );
-                                       rc = 0;
+                                       rc = LDAP_SUCCESS;
                                        goto done;
                                }
 
                                if (e) {
 
-#ifdef LDAP_CACHING
-                                       if ( op->o_caching_on ) {
-                                               ldap_pvt_thread_rdwr_runlock(&li->li_giant_rwlock);
-                                               cache_return_entry_r( &li->li_cache, e );
-                                       }
-#endif /* LDAP_CACHING */
-
                                        result = send_search_entry( op, rs );
 
-#ifdef LDAP_CACHING
-                                       if ( op->o_caching_on ) {
-                                               ldap_pvt_thread_rdwr_rlock( &li->li_giant_rwlock );
-                                       }
-#endif /* LDAP_CACHING */
-
-
                                        switch (result) {
                                        case 0:         /* entry sent ok */
                                                break;
@@ -522,7 +485,7 @@ searchit:
                                                break;
                                        case -1:        /* connection closed */
                                                cache_return_entry_r( &li->li_cache, e );
-                                               rc = 0;
+                                               rc = LDAP_SUCCESS;
                                                goto done;
                                        }
                                }
@@ -553,13 +516,7 @@ searchit:
 loop_continue:
                if( e != NULL ) {
                        /* free reader lock */
-#ifndef LDAP_CACHING
                        cache_return_entry_r( &li->li_cache, e );
-#else /* LDAP_CACHING */
-                       if ( !op->o_caching_on ) {
-                               cache_return_entry_r( &li->li_cache, e );
-                       }
-#endif /* LDAP_CACHING */
                }
 
                ldap_pvt_thread_yield();
@@ -569,7 +526,7 @@ loop_continue:
        rs->sr_ref = rs->sr_v2ref;
        send_ldap_result( op, rs );
 
-       rc = 0;
+       rc = LDAP_SUCCESS;
 
 done:
        ldap_pvt_thread_rdwr_runlock(&li->li_giant_rwlock);
@@ -618,6 +575,10 @@ search_candidates(
     AttributeAssertion aa_ref, aa_alias;
        struct berval bv_ref = { sizeof("referral")-1, "referral" };
        struct berval bv_alias = { sizeof("alias")-1, "alias" };
+#ifdef LDBM_SUBENTRIES
+       Filter  sf;
+       AttributeAssertion aa_subentry;
+#endif
 
 #ifdef NEW_LOGGING
        LDAP_LOG( BACK_LDBM, DETAIL1,
@@ -663,6 +624,18 @@ search_candidates(
        fand.f_dn = &e->e_nname;
        fand.f_next = xf.f_or == filter ? filter : &xf ;
 
+#ifdef LDBM_SUBENTRIES
+       if ( get_subentries_visibility( op )) {
+               struct berval bv_subentry = { sizeof("SUBENTRY")-1, "SUBENTRY" };
+               sf.f_choice = LDAP_FILTER_EQUALITY;
+               sf.f_ava = &aa_subentry;
+               sf.f_av_desc = slap_schema.si_ad_objectClass;
+               sf.f_av_value = bv_subentry;
+               sf.f_next = fand.f_next;
+               fand.f_next = &sf;
+       }
+#endif
+
        candidates = filter_candidates( op, &f );
 
        return( candidates );
index 41b6cda62804505b96a91dbcd307393a2b8eaf40..56623fc6409b09e627209d179a0276b9c6b52e33 100644 (file)
@@ -150,11 +150,9 @@ struct metainfo {
 #define META_DEFAULT_TARGET_NONE       -1
        struct metatarget       **targets;
 
-#ifdef LDAP_CACHING 
        struct rewrite_info     *rwinfo;
        cache_manager           *cm; 
        Backend                 *glue_be; 
-#endif /* LDAP_CACHING */
 
        struct metadncache      cache;
        
index 483f045d1b848c7ede89f4449f867863695ea0e6..d52c8b76b839c85e17e2bfd7a3d4acae9a51153d 100644 (file)
@@ -116,7 +116,8 @@ meta_back_bind( Operation *op, SlapReply *rs )
        if ( !lc ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( BACK_META, NOTICE,
-                               "meta_back_bind: no target for dn %s.\n", dn->bv_val, 0, 0 );
+                               "meta_back_bind: no target for dn %s.\n",
+                               op->o_req_dn.bv_val, 0, 0 );
 #else /* !NEW_LOGGING */
                Debug( LDAP_DEBUG_ANY,
                                "meta_back_bind: no target for dn %s.\n%s%s",
index a4417949f27f3d1365c3c3cafbc1c3a098e38bf7..a7bc35d9ccbb3a2f08deb28c3ac49a0dfb96eede 100644 (file)
@@ -27,7 +27,6 @@
 #include "../back-ldap/back-ldap.h"
 #include "back-meta.h"
 
-#ifdef LDAP_CACHING 
 #define MAX_ATTR_SETS 500 
 static void find_supersets( struct attr_set* attr_sets, int numsets ); 
 static int compare_sets( struct attr_set* setA, int, int );
@@ -113,6 +112,7 @@ meta_back_cache_config(
                        cache_suffix = be->be_nsuffix[0];
                }
                li->glue_be = select_backend( &cache_suffix, 0, 1 );
+               li->glue_be->be_flags |= SLAP_BFLAG_NO_SCHEMA_CHECK;
                if ( cache_suffix.bv_val != be->be_nsuffix[0].bv_val ) {
                        ch_free( cache_suffix.bv_val );
                }
@@ -329,4 +329,3 @@ compare_sets(struct attr_set* set, int i, int j)
 
        return result; 
 }
-#endif
index 3f59c3022b7185b99fbe0dda64914940d66a572e..211ec672e372dba2c359499644a1880a267be5c3 100644 (file)
 #include "../../../libraries/libldap/ldap-int.h"
 #include <sys/time.h>
 
-#ifdef LDAP_CACHING
-
 static struct berval bv_queryid_any = BER_BVC( "(queryid=*)" );
 
-static int
-merge_func (
-       Operation       *op,
-       SlapReply       *rs
-); 
-
-static void
-add_func (
-       Operation       *op,
-       SlapReply       *rs
-); 
-
 static Attribute* 
 add_attribute(AttributeDescription *ad,
        Entry* e,
        BerVarray value_array
 ); 
 
-static int
-get_size_func (
-       Operation       *op,
-       SlapReply       *rs
-); 
-
 static int
 null_response (
        Operation       *op,
@@ -116,25 +96,6 @@ get_entry_size(
        return size;
 }
 
-/* quick hack: call the right callback */
-static int
-add_merge_func( Operation *op, SlapReply *rs )
-{
-       switch ( rs->sr_type ) {
-       case REP_SEARCH:
-               merge_func( op, rs );
-               break;
-
-       case REP_RESULT:
-               add_func( op, rs );
-               break;
-
-       default:
-               assert( 0 );
-       }
-       return 0;
-}
-
 int
 merge_entry(
        Operation               *op,
@@ -143,248 +104,100 @@ merge_entry(
        struct exception*       result )
 {
        struct entry_info info;
-       struct berval normdn;
-       struct berval prettydn;
+       int             rc;
+       Modifications* modlist = NULL;
+       const char*     text = NULL;
+       BerVarray               value_array; 
+       Attribute               *uuid_attr, *attr;
+       Entry                   *e;
 
        SlapReply sreply = {REP_RESULT};
 
        Operation op_tmp = *op;
-       slap_callback cb = { add_merge_func, NULL };
+       slap_callback cb;
 
-       Filter* filter = str2filter( bv_queryid_any.bv_val );
        sreply.sr_entry = NULL; 
        sreply.sr_nentries = 0; 
 
-       dnPrettyNormal(0, &rs->sr_entry->e_name, &prettydn, &normdn,
-                       op->o_tmpmemctx);
-
-       free(rs->sr_entry->e_name.bv_val);
-       rs->sr_entry->e_name = prettydn;
-       if (rs->sr_entry->e_nname.bv_val) free(rs->sr_entry->e_nname.bv_val);
-       rs->sr_entry->e_nname = normdn;
-
-       info.entry = rs->sr_entry;
-       info.uuid = query_uuid;
-       info.size_init = 0;
-       info.size_final = 0;
-       info.added = 0;
-       info.glue_be = op->o_bd;
-       info.err = SUCCESS;
-       cb.sc_private = &info;
-
-       op_tmp.o_tag = LDAP_REQ_SEARCH;
-       op_tmp.o_protocol = LDAP_VERSION3;
-       op_tmp.o_callback = &cb;
-       op_tmp.o_caching_on = 1;
-       op_tmp.o_time = slap_get_time();
-       op_tmp.o_do_not_cache = 1;
-
-       op_tmp.o_req_dn = rs->sr_entry->e_name;
-       op_tmp.o_req_ndn = rs->sr_entry->e_nname;
-       op_tmp.ors_scope = LDAP_SCOPE_BASE;
-       op_tmp.ors_deref = LDAP_DEREF_NEVER;
-       op_tmp.ors_slimit = 1;
-       op_tmp.ors_tlimit = 0;
-       op_tmp.ors_filter = filter;
-       op_tmp.ors_filterstr = bv_queryid_any;
-       op_tmp.ors_attrs = NULL;
-       op_tmp.ors_attrsonly = 0;
-
-       op->o_bd->be_search( &op_tmp, &sreply );
-       result->type = info.err; 
-       if ( result->type == SUCCESS )
-               result->rc = info.added; 
-       else 
-               result->rc = 0; 
-       return ( info.size_final - info.size_init );
-}
-
-static int
-merge_func (
-       Operation       *op,
-       SlapReply       *rs
-)
-{
-       Backend                 *be;
-       char                    *new_attr_name;
-       Attribute               *a_new, *a;
-       int                     i = 0;
-       int                     rc = 0;
-    
-       int                     count;
-       struct timeval          time;   /* time */
-       long                    timediff; /* time */
-       struct entry_info       *info = op->o_callback->sc_private;
-       Filter                  *filter = str2filter( bv_queryid_any.bv_val );
-       Entry                   *entry = info->entry;
-       struct berval           *uuid = info->uuid;
-       Modifications           *modhead = NULL;
-       Modifications           *mod;
-       Modifications           **modtail = &modhead;
-       AttributeDescription    *a_new_desc;
-       const char              *text = NULL;
-       Operation               op_tmp = *op;
-       SlapReply               sreply = {REP_RESULT}; 
-       SlapReply               sreply1 = {REP_RESULT}; 
-
-       info->err = SUCCESS; 
-
-       be = select_backend(&entry->e_nname, 0, 0); 
-     
-       info->size_init = get_entry_size(rs->sr_entry, 0, 0);  
-       a_new = entry->e_attrs;
-
-       while (a_new != NULL) {
-               a_new_desc = a_new->a_desc; 
-               mod = (Modifications *) malloc( sizeof(Modifications) );
-               mod->sml_op = LDAP_MOD_REPLACE;
-               ber_dupbv(&mod->sml_type, &a_new_desc->ad_cname); 
-
-               for ( count = 0; a_new->a_vals[count].bv_val; count++ ) 
-                       ;
-
-               mod->sml_bvalues = (struct berval*) malloc(
-                               (count+1) * sizeof( struct berval) );
-
-               for ( i = 0; i < count; i++ ) {
-                       ber_dupbv(mod->sml_bvalues+i, a_new->a_vals+i); 
-               }
-
-               mod->sml_bvalues[count].bv_val = 0; 
-               mod->sml_bvalues[count].bv_len = 0; 
-
-               mod->sml_desc = NULL;
-               slap_bv2ad(&mod->sml_type, &mod->sml_desc, &text); 
-               mod->sml_next =NULL;
-               *modtail = mod;
-               modtail = &mod->sml_next;
-               a_new = a_new->a_next; 
-       } 
-
-       /* add query UUID to queryid attribute */
-       mod = (Modifications *) ch_malloc( sizeof(Modifications) );
-       mod->sml_op = LDAP_MOD_ADD;
-       mod->sml_desc = slap_schema.si_ad_queryid; 
-       ber_dupbv(&mod->sml_type, &mod->sml_desc->ad_cname); 
-       mod->sml_bvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-       ber_dupbv( mod->sml_bvalues, uuid );
-       mod->sml_bvalues[1].bv_val = NULL;
-       mod->sml_bvalues[1].bv_len = 0;
-       *modtail = mod;
-       mod->sml_next = NULL; 
-
-       /* Apply changes */
-       op_tmp.o_req_dn = entry->e_name;
-       op_tmp.o_req_ndn = entry->e_nname;
-       op_tmp.orm_modlist = modhead;
-
-       op_tmp.o_callback->sc_response = null_response; 
-       if (be->be_modify(&op_tmp, &sreply ) != 0 ) {
-               /* FIXME: cleanup ? */
-               info->err = MERGE_ERR;
-               goto cleanup; 
-       }
-
-       /* compute the size of the entry */
-       op_tmp.o_callback->sc_response = get_size_func; 
-
-       op_tmp.ors_scope = LDAP_SCOPE_BASE;
-       op_tmp.ors_deref = LDAP_DEREF_NEVER;
-       op_tmp.ors_slimit = 1;
-       op_tmp.ors_tlimit = 0;
-       op_tmp.ors_filter = filter;
-       op_tmp.ors_filterstr = bv_queryid_any;
-       op_tmp.ors_attrs = NULL;
-       op_tmp.ors_attrsonly = 0;
-   
-        sreply1.sr_entry = NULL; 
-       sreply1.sr_nentries = 0; 
-
-       if (be->be_search( &op_tmp, &sreply1 ) != 0) {
-               info->err = GET_SIZE_ERR;
-       }
-
-cleanup:;
-       if ( modhead != NULL) {
-               slap_mods_free( modhead );
-       }
-
-       return 0; 
-}
-
-static void
-add_func (
-       Operation       *op,
-       SlapReply       *rs
-)
-{
-       struct entry_info       *info = op->o_callback->sc_private; 
-       Entry                   *entry = info->entry; 
-       struct berval           *uuid = info->uuid; 
-       Backend                 *be; 
-       BerVarray               value_array; 
-       Entry                   *e; 
-       Attribute               *a, *attr; 
-       int                     i,j;
-       SlapReply               sreply = {REP_RESULT}; 
-
-       struct timeval          time;   /* time */ 
-       long                    timediff; /* time */ 
-
-       Operation               op_tmp = *op;
-
-       /* 
-        * new entry, construct an entry with 
-        * the projected attributes 
-        */
-       if (rs->sr_nentries) {
-               return;
-       }
-       
-       op_tmp.o_callback->sc_response = null_response; 
-       be = select_backend(&entry->e_nname, 0, 0); 
-       e = (Entry*)malloc(sizeof(Entry)); 
-
-       ber_dupbv(&e->e_name,&entry->e_name); 
-       ber_dupbv(&e->e_nname,&entry->e_nname); 
+       e = ( Entry * ) ch_calloc( 1, sizeof( Entry )); 
+       dnPrettyNormal(0, &rs->sr_entry->e_name, &e->e_name, &e->e_nname, op->o_tmpmemctx);
 
-       e->e_private = 0;
-       e->e_attrs = 0
-       e->e_bv.bv_val = 0
+       e->e_private = NULL;
+       e->e_attrs = NULL
+       e->e_bv.bv_val = NULL
 
        /* add queryid attribute */     
        value_array = (struct berval *)malloc(2 * sizeof( struct berval) );
-       ber_dupbv(value_array, uuid);
+       ber_dupbv(value_array, query_uuid);
        value_array[1].bv_val = NULL;
        value_array[1].bv_len = 0;
 
-       a = add_attribute(slap_schema.si_ad_queryid, 
-                       e, value_array); 
+       uuid_attr = add_attribute(slap_schema.si_ad_queryid, e, value_array); 
 
        /* append the attribute list from the fetched entry */
-       a->a_next = entry->e_attrs;
-       entry->e_attrs = NULL;
+       uuid_attr->a_next = rs->sr_entry->e_attrs;
+       rs->sr_entry->e_attrs = NULL;
 
        for ( attr = e->e_attrs; attr; attr = attr->a_next ) {
                if ( normalize_values( attr ) ) {
-                       info->err = MERGE_ERR; 
-                       return;
+                       info.err = MERGE_ERR; 
+                       result->rc = info.err;
+                       return 0;
                }
        }
 
-       info->size_final = get_entry_size( e, 0, NULL ); 
+       info.entry = e;
+       info.uuid = query_uuid;
+       info.size_init = get_entry_size( rs->sr_entry, 0, 0 );
+       info.size_final = 0;
+       info.added = 0;
+       info.glue_be = op->o_bd;
+       info.err = SUCCESS;
+       cb.sc_private = &info;
+       cb.sc_response = null_response;
+
+       op_tmp.o_tag = LDAP_REQ_ADD;
+       op_tmp.o_protocol = LDAP_VERSION3;
+       op_tmp.o_callback = &cb;
+       op_tmp.o_time = slap_get_time();
+       op_tmp.o_do_not_cache = 1;
 
-       op_tmp.o_bd = be;
        op_tmp.ora_e = e;
-       
-       if ( be->be_add( &op_tmp, &sreply ) == 0 ) {
-               info->added = 1; 
-               be_entry_release_w( &op_tmp, e );
+       op_tmp.o_req_dn = e->e_name;
+       op_tmp.o_req_ndn = e->e_nname;
+       rc = op->o_bd->be_add( &op_tmp, &sreply );
+
+       if ( rc != LDAP_SUCCESS ) {
+               if ( rc == LDAP_ALREADY_EXISTS ) {
+                       slap_entry2mods( e, &modlist, &text );
+                       op_tmp.o_tag = LDAP_REQ_MODIFY;
+                       op_tmp.orm_modlist = modlist;
+                       op_tmp.o_req_dn = e->e_name;
+                       op_tmp.o_req_ndn = e->e_nname;
+                       rc = op->o_bd->be_modify( &op_tmp, &sreply );
+                       result->rc = info.added;
+               } else if ( rc == LDAP_REFERRAL ||
+                                       rc == LDAP_NO_SUCH_OBJECT ) {
+                       slap_entry2mods( e, &modlist, &text );
+                       syncrepl_add_glue( NULL, NULL, &op_tmp, e, modlist, 0, NULL, NULL );
+                       result->rc = info.added;
+               } else {
+                       result->rc = 0;
+               }
+               if ( modlist != NULL ) slap_mods_free( modlist );
        } else {
-               info->err = MERGE_ERR; 
+               info.size_init = 0;
+               result->rc = info.added;
+               be_entry_release_w( &op_tmp, e );
        }
+
+       if ( result->rc )
+               info.size_final = get_entry_size( e, info.size_init, result );
+       else
+               info.size_final = info.size_init;
+
+       return ( info.size_final - info.size_init );
 }
 
 static Attribute* 
 add_attribute(AttributeDescription *ad,
@@ -415,25 +228,6 @@ add_attribute(AttributeDescription *ad,
        return new_attr; 
 }
 
-static int
-get_size_func (
-       Operation       *op,
-       SlapReply       *rs
-)
-{
-       struct entry_info       *info = op->o_callback->sc_private; 
-       struct exception        result; 
-
-       if ( rs->sr_type == REP_SEARCH ) {
-               result.type = info->err;  
-               info->size_final = get_entry_size(rs->sr_entry,
-                               info->size_init, &result); 
-       }
-
-       return 0; 
-}
-
-
 static int
 null_response (
        Operation       *op,
@@ -490,5 +284,3 @@ normalize_values( Attribute* attr )
 
        return LDAP_SUCCESS;
 }
-
-#endif /* LDAP_CACHING */
index 58e986dbe232604fe1c2d5ed996881e69aa7bafb..1571ec380f0108c977f3c64dd46183615900b878 100644 (file)
@@ -26,7 +26,6 @@
 #include "../back-ldap/back-ldap.h"
 #include "back-meta.h"
 
-#ifdef LDAP_CACHING 
 static void    add_query_on_top (query_manager*, CachedQuery*);
 static int     base_scope_compare(struct berval* dn_stored, 
                                   struct berval* dn_incoming, int scope_stored,
@@ -117,6 +116,7 @@ query_containment(query_manager* qm,
                                                }
                                        } 
                                        switch (fs->f_choice) {
+                                       case LDAP_FILTER_OR: 
                                        case LDAP_FILTER_AND:
                                                fs = fs->f_and;
                                                fi = fi->f_and;
@@ -161,6 +161,9 @@ query_containment(query_manager* qm,
                                                fs=fs->f_next;
                                                fi=fi->f_next;  
                                                break;
+                                       case LDAP_FILTER_NOT:
+                                               res=0;
+                                               break;
                                        default:
                                                break;
                                        } 
@@ -461,4 +464,3 @@ remove_from_template (CachedQuery* qc, QueryTemplate* template)
 
        template->no_of_queries--;  
 }    
-#endif
index ce7781f3b00c5f649598383a872b53b59464c4d7..f375ea11eb103f518f5e5caf524a91d5fd860900 100644 (file)
@@ -34,7 +34,6 @@
 #include "../../../libraries/libldap/ldap-int.h"
 #include <sys/time.h>
 
-#ifdef LDAP_CACHING 
 static int
 remove_func (
        Operation       *op,
@@ -80,7 +79,6 @@ remove_query_data (
        op_tmp.o_callback = &cb;
        op_tmp.o_time = slap_get_time();
        op_tmp.o_do_not_cache = 1;
-       op_tmp.o_caching_on = 1; 
 
        op_tmp.o_req_dn = op->o_bd->be_suffix[0];
        op_tmp.o_req_ndn = op->o_bd->be_nsuffix[0];
@@ -189,5 +187,3 @@ remove_func (
 
        return 0;
 }
-
-#endif /* LDAP_CACHING */
index 3a0171a8a9b7113e5772c72f549aec10ce213de3..8f61bef9f6348f3c959bea302bdd6e0d9c67df42 100644 (file)
 #include "ldap_log.h"
 #include "../../../libraries/libldap/ldap-int.h"
 
-#ifdef LDAP_CACHING 
 static Entry* 
 meta_create_entry(
        Backend         *be,
@@ -241,6 +240,8 @@ meta_back_cache_search(
        cache_manager*          cm = li->cm; 
        query_manager*          qm = cm->qm; 
 
+       Operation               *oper;
+
        time_t                  curr_time; 
 
        int count, rc = 0, *msgid = NULL; 
@@ -272,8 +273,8 @@ meta_back_cache_search(
        int             num_entries = 0;
        int             curr_limit;
        int             fattr_cnt=0; 
+       int             oc_attr_absent = 1;
 
-   
        struct exception result[1]; 
 
        Filter* filter = str2filter(op->ors_filterstr.bv_val); 
@@ -282,10 +283,12 @@ meta_back_cache_search(
        cb.sc_private = op->o_bd; 
 
        if (op->ors_attrs) {
-               for ( count=0; op->ors_attrs[ count ].an_name.bv_val; count++ )
-                       ;
-               attrs = (AttributeName*)malloc( ( count + 1 ) *
-                                               sizeof(AttributeName));
+               for ( count=0; op->ors_attrs[ count ].an_name.bv_val; count++ ) {
+                       if ( op->ors_attrs[count].an_desc == slap_schema.si_ad_objectClass )
+                               oc_attr_absent = 0;
+               }
+               attrs = (AttributeName*)malloc( ( count + 1 + oc_attr_absent )
+                                                               *sizeof(AttributeName));
                for ( count=0; op->ors_attrs[ count ].an_name.bv_val; count++ ) {
                        ber_dupbv(&attrs[ count ].an_name,
                                                &op->ors_attrs[ count ].an_name);
@@ -295,7 +298,6 @@ meta_back_cache_search(
                attrs[ count ].an_name.bv_len = 0;
        }
 
-
        result->type = SUCCESS; 
        result->rc = 0; 
        ldap_pvt_thread_mutex_lock(&cm->cache_mutex); 
@@ -306,11 +308,13 @@ meta_back_cache_search(
        Debug( LDAP_DEBUG_ANY, "Threads++ = %d\n", cm->threads, 0, 0 );
 #endif /* !NEW_LOGGING */
        ldap_pvt_thread_mutex_unlock(&cm->cache_mutex); 
-    
+       
        ldap_pvt_thread_mutex_lock(&cm->cc_mutex); 
        if (!cm->cc_thread_started) {
+               oper = (Operation*)malloc(sizeof(Operation)); 
+               *oper = *op; 
                cm->cc_thread_started = 1; 
-                ldap_pvt_thread_create(&(cm->cc_thread), 1, consistency_check, (void*)op); 
+                ldap_pvt_thread_create(&(cm->cc_thread), 1, consistency_check, (void*)oper); 
        }       
        ldap_pvt_thread_mutex_unlock(&cm->cc_mutex); 
 
@@ -360,6 +364,15 @@ meta_back_cache_search(
                }
        }
 
+       if ( attrs && oc_attr_absent ) {
+               for ( count = 0; attrs[count].an_name.bv_val; count++) ;
+               attrs[ count ].an_name.bv_val = "objectClass";
+               attrs[ count ].an_name.bv_len = strlen( "objectClass" );
+               attrs[ count ].an_desc = slap_schema.si_ad_objectClass;
+               attrs[ count + 1 ].an_name.bv_val = NULL;
+               attrs[ count + 1 ].an_name.bv_len = 0;
+       }
+
        if (answerable) {
                Operation       op_tmp;
 
@@ -390,7 +403,6 @@ meta_back_cache_search(
                op_tmp.o_req_dn = cachebase;
                op_tmp.o_req_ndn = ncachebase;
 
-               op_tmp.o_caching_on = 1; 
                op_tmp.o_callback = &cb; 
 
                li->glue_be->be_search(&op_tmp, rs);
@@ -402,8 +414,8 @@ meta_back_cache_search(
 
                ldap_pvt_thread_rdwr_runlock(&qm->templates[i].t_rwlock); 
        } else {
-               Operation       op_tmp = *op;
-
+               Operation       op_tmp;
+               op_tmp = *op;
 #ifdef NEW_LOGGING
                LDAP_LOG( BACK_META, DETAIL1, "QUERY NOT ANSWERABLE\n",
                                        0, 0, 0 );
@@ -411,14 +423,14 @@ meta_back_cache_search(
                Debug( LDAP_DEBUG_ANY, "QUERY NOT ANSWERABLE\n", 0, 0, 0 );
 #endif /* !NEW_LOGGING */
 
-               if ( op_tmp.ors_scope == LDAP_SCOPE_BASE ) {
+               if ( op->ors_scope == LDAP_SCOPE_BASE ) {
                        op_type = META_OP_REQUIRE_SINGLE;
                } else {
                        op_type = META_OP_ALLOW_MULTIPLE;
                }
 
                lc = metaConnect(&op_tmp, rs, op_type,
-                               &op_tmp.o_req_ndn, result);
+                               &op->o_req_ndn, result);
 
                if (result->type != SUCCESS) 
                        goto Catch; 
@@ -430,14 +442,6 @@ meta_back_cache_search(
                ldap_pvt_thread_mutex_unlock(&cm->cache_mutex); 
                
                if (cacheable) {
-#ifdef NEW_LOGGING
-                       LDAP_LOG( BACK_META, DETAIL1,
-                                       "QUERY TEMPLATE CACHEABLE\n",
-                                       0, 0, 0);
-#else /* !NEW_LOGGING */
-                       Debug( LDAP_DEBUG_ANY, "QUERY TEMPLATE CACHEABLE\n",
-                                       0, 0, 0);
-#endif /* !NEW_LOGGING */
                        add_filter_attrs(&new_attrs, attrs, filter_attrs);
                } else {
                        new_attrs = attrs; 
@@ -462,6 +466,7 @@ meta_back_cache_search(
                /*
                 * Inits searches
                 */
+
                for ( i = 0, lsc = lc->conns; !META_LAST(lsc); ++i, ++lsc ) {
                        char    *realbase = ( char * )op->o_req_dn.bv_val;
                        int     realscope = op->ors_scope;
@@ -617,10 +622,15 @@ meta_back_cache_search(
                         */
                        msgid[ i ] = ldap_search( lsc->ld, mbase, realscope,
                                                mapped_filter, mapped_attrs,
-                                               op->ors_attrsonly ); 
+                                               op->ors_attrsonly );
+
                        if ( msgid[ i ] == -1 ) {
+                               result->type = CONN_ERR; 
+                               goto Catch; 
+                               /*
                                lsc->candidate = META_NOT_CANDIDATE;
                                continue;
+                               */
                        }
 
                        if ( mapped_attrs ) {
@@ -658,8 +668,7 @@ meta_back_cache_search(
                        Debug( LDAP_DEBUG_ANY, "QUERY CACHEABLE\n", 0, 0, 0 );
 #endif /* !NEW_LOGGING */
                        op_tmp.o_bd = li->glue_be;
-                       uuid = cache_entries(&op_tmp, rs, entry_array,
-                                       cm, result); 
+                       uuid = cache_entries(&op_tmp, rs, entry_array, cm, result); 
 #ifdef NEW_LOGGING
                        LDAP_LOG( BACK_META, DETAIL1,
                                        "Added query %s UUID %s ENTRIES %d\n",
@@ -679,6 +688,28 @@ meta_back_cache_search(
                                goto Catch; 
                        filter = 0; 
                        attrs = 0; 
+
+                       /* FIXME : launch do_syncrepl() threads around here
+                        *
+                        * entryUUID and entryCSN need also to be requested by :
+                        */
+                       /*
+                       msgid[ i ] = ldap_search( lsc->ld, mbase, realscope,
+                                               mapped_filter, mapped_attrs, op->ors_attrsonly );
+                       */
+                       /* Also, mbase, realscope, mapped_filter, mapped_attrs need
+                        * be managed as arrays. Each element needs to be retained by this point.
+                        */
+
+               } else {
+#ifdef NEW_LOGGING
+                       LDAP_LOG( BACK_META, DETAIL1,
+                                       "QUERY NOT CACHEABLE no\n",
+                                       0, 0, 0);
+#else /* !NEW_LOGGING */
+                       Debug( LDAP_DEBUG_ANY, "QUERY NOT CACHEABLE no\n",
+                                       0, 0, 0);
+#endif /* !NEW_LOGGING */
                }
        }
 
@@ -813,11 +844,15 @@ meta_create_entry (
        struct berval           a, mapped;
        Entry*                  ent;
        BerElement              ber = *e->lm_ber;
-       Attribute               *attr, **attrp;
-       struct berval           dummy = { 0, NULL };
-       struct berval           *bv, bdn;
+       Attribute               *attr, *soc_attr, **attrp;
+       struct berval   dummy = { 0, NULL };
+       struct berval   *bv, bdn;
        const char              *text;
-        char*                  ename = NULL; 
+       char*                   ename = NULL; 
+       struct berval   sc;
+       char*                   textbuf;
+       size_t                  textlen;
+
        if ( ber_scanf( &ber, "{m{", &bdn ) == LBER_ERROR ) {
                result->type = CREATE_ENTRY_ERR;        
                return NULL; 
@@ -919,9 +954,13 @@ meta_create_entry (
                if ( ber_scanf( &ber, "[W]", &attr->a_vals ) == LBER_ERROR 
                                || attr->a_vals == NULL ) {
                        attr->a_vals = &dummy;
+#if 0
                } else if ( attr->a_desc == slap_schema.si_ad_objectClass ||
                                attr->a_desc ==
                                slap_schema.si_ad_structuralObjectClass) {
+#else
+               } else if ( attr->a_desc == slap_schema.si_ad_objectClass ) {
+#endif
                        int i, last;
                        for ( last = 0; attr->a_vals[ last ].bv_val; ++last )
                                ;
@@ -942,6 +981,22 @@ meta_create_entry (
                                        ber_dupbv( bv, &mapped );
                                }
                        }
+
+                       structural_class( attr->a_vals, &sc, NULL, &text, textbuf, textlen );
+                       soc_attr = (Attribute*) ch_malloc( sizeof( Attribute ));
+                       soc_attr->a_desc = slap_schema.si_ad_structuralObjectClass;
+                       soc_attr->a_vals = (BerVarray) ch_malloc( 2* sizeof( BerValue ));
+                       ber_dupbv( &soc_attr->a_vals[0], &sc );
+                       soc_attr->a_vals[1].bv_len = 0;
+                       soc_attr->a_vals[1].bv_val = NULL;
+                       soc_attr->a_nvals = (BerVarray) ch_malloc( 2* sizeof( BerValue ));
+                       ber_dupbv( &soc_attr->a_nvals[0], &sc );
+                       soc_attr->a_nvals[1].bv_len = 0;
+                       soc_attr->a_nvals[1].bv_val = NULL;
+
+                       *attrp = soc_attr;
+                       attrp = &soc_attr->a_next;
+
                /*
                 * It is necessary to try to rewrite attributes with
                 * dn syntax because they might be used in ACLs as
@@ -993,6 +1048,7 @@ meta_create_entry (
                *attrp = attr;
                attrp = &attr->a_next;
        }
+
        return ent; 
 }
 
@@ -1012,7 +1068,7 @@ is_one_level_rdn(
 
 static struct metaconn*  
 metaConnect(
-       Operation               *op, 
+       Operation*              op, 
        SlapReply               *rs,
        int                     op_type, 
        struct berval           *nbase, 
@@ -1035,8 +1091,11 @@ add_filter_attrs(
        AttributeName* attrs, 
        AttributeName* filter_attrs )
 {
-       struct berval all_user = BER_BVC(LDAP_ALL_USER_ATTRIBUTES);
-       struct berval all_op = BER_BVC(LDAP_ALL_OPERATIONAL_ATTRIBUTES);
+       struct berval all_user = { sizeof(LDAP_ALL_USER_ATTRIBUTES) -1,
+                                  LDAP_ALL_USER_ATTRIBUTES };
+
+       struct berval all_op = { sizeof(LDAP_ALL_OPERATIONAL_ATTRIBUTES) -1,
+                                       LDAP_ALL_OPERATIONAL_ATTRIBUTES}; 
 
        int alluser = 0; 
        int allop = 0; 
@@ -1044,29 +1103,27 @@ add_filter_attrs(
        int count; 
 
        /* duplicate attrs */
-       for (count=0; attrs[count].an_name.bv_val; count++) 
-               ;
-       *new_attrs =  (AttributeName*)(malloc((count+1)*sizeof(AttributeName))); 
-       for (i=0; i<count; i++) {
-               /*
-               ber_dupbv(&((*new_attrs)[i].an_name), &(attrs[i].an_name)); 
-               */
-               (*new_attrs)[i].an_name = attrs[i].an_name; 
-               (*new_attrs)[i].an_desc = attrs[i].an_desc;  
+        if (attrs == NULL) {
+               count = 1; 
+       } else { 
+               for (count=0; attrs[count].an_name.bv_val; count++) 
+                       ;
        }
-       (*new_attrs)[count].an_name.bv_val = NULL; 
-       (*new_attrs)[count].an_name.bv_len = 0; 
-
-
-       if ((*new_attrs)[0].an_name.bv_val == NULL) {
-               *new_attrs = (AttributeName*)(malloc(2*sizeof(AttributeName))); 
+       *new_attrs = (AttributeName*)(malloc((count+1)*sizeof(AttributeName))); 
+       if (attrs == NULL) { 
                (*new_attrs)[0].an_name.bv_val = "*"; 
                (*new_attrs)[0].an_name.bv_len = 1; 
-               (*new_attrs)[1].an_name.bv_val = NULL; 
+               (*new_attrs)[1].an_name.bv_val = NULL;
                (*new_attrs)[1].an_name.bv_len = 0; 
                alluser = 1; 
-               count = 1; 
-       } else {
+               allop = 0; 
+       } else {  
+               for (i=0; i<count; i++) {
+                       (*new_attrs)[i].an_name = attrs[i].an_name; 
+                       (*new_attrs)[i].an_desc = attrs[i].an_desc;  
+               }
+               (*new_attrs)[count].an_name.bv_val = NULL; 
+               (*new_attrs)[count].an_name.bv_len = 0; 
                alluser = an_find(*new_attrs, &all_user); 
                allop = an_find(*new_attrs, &all_op); 
        }
@@ -1074,10 +1131,10 @@ add_filter_attrs(
        for ( i=0; filter_attrs[i].an_name.bv_val; i++ ) {
                if ( an_find(*new_attrs, &filter_attrs[i].an_name ))
                        continue; 
-               if ( is_at_operational(filter_attrs[i].an_desc->ad_type)
-                                               && allop )
-                       continue; 
-               else if (alluser) 
+               if ( is_at_operational(filter_attrs[i].an_desc->ad_type) ) {
+                       if (allop) 
+                               continue; 
+               else if (alluser) 
                        continue; 
                *new_attrs = (AttributeName*)(realloc(*new_attrs,
                                        (count+2)*sizeof(AttributeName))); 
@@ -1423,8 +1480,12 @@ attrscmp(
        AttributeName* attrs)
 {
        int i, count1, count2; 
-       if ((attrs_in==NULL) || (attrs==NULL)) 
-               return 1; 
+       if ( attrs_in == NULL ) {
+               return (attrs ? 0 : 1); 
+       } 
+       if ( attrs == NULL ) 
+               return 0; 
+       
        for ( count1=0;
              attrs_in && attrs_in[count1].an_name.bv_val != NULL;
              count1++ )
@@ -1640,12 +1701,11 @@ is_temp_answerable(
 static void* 
 consistency_check(void* operation)
 {
-       Operation* op_tmp = (Operation*)operation; 
+       Operation* op = (Operation*)operation; 
 
-       Operation op = *op_tmp; 
        SlapReply rs = {REP_RESULT}; 
 
-       struct metainfo *li = ( struct metainfo * )op.o_bd->be_private;
+       struct metainfo *li = ( struct metainfo * )op->o_bd->be_private;
        cache_manager*  cm = li->cm; 
        query_manager* qm = cm->qm; 
        CachedQuery* query, *query_prev; 
@@ -1656,7 +1716,7 @@ consistency_check(void* operation)
        QueryTemplate* templ;
 
 
-       op.o_bd = li->glue_be;
+       op->o_bd = li->glue_be;
       
         for(;;) {
                ldap_pvt_thread_sleep(cm->cc_period);     
@@ -1696,7 +1756,7 @@ consistency_check(void* operation)
                                ldap_pvt_thread_rdwr_wunlock(&templ->t_rwlock);  
                                uuid.bv_val = query->q_uuid; 
                                uuid.bv_len = strlen(query->q_uuid); 
-                               return_val = remove_query_data(&op, &rs, &uuid, &result); 
+                               return_val = remove_query_data(op, &rs, &uuid, &result); 
 #ifdef NEW_LOGGING
                                LDAP_LOG( BACK_META, DETAIL1,
                                                "STALE QUERY REMOVED, SIZE=%d\n",
@@ -1772,14 +1832,10 @@ cache_back_sentry(
                rs->sr_entry->e_nname = ndn; 
 
                op->o_callback = cb; 
-               return 0;
-
+               return 0; 
        } else if (rs->sr_type == REP_RESULT) { 
                op->o_callback = NULL; 
                send_ldap_result( op, rs ); 
                return 0; 
        }
-
-       return -1;
 }
-#endif
index 8871093620454b3c401de6fd8886307ae72c7528..574ec2509eb4b8c60804dd1f9f27ccf5d8ee1ba8 100644 (file)
@@ -35,7 +35,6 @@
 #include "slap.h"
 #include "back-meta.h"
 
-#ifdef LDAP_CACHING 
 static char* invert_string(char* string);
 static struct berval* merge_init_final(struct berval*, struct berval*, struct berval*); 
 static int strings_containment(struct berval* stored, struct berval* incoming); 
@@ -287,4 +286,3 @@ final:
        */
        return rc;
 }              
-#endif
index bad7b5b8d3820d85600d0a81dda1fc3b301a0539..64fd2d28aa3643b936c4eb4e2e670ca96f033313 100644 (file)
@@ -30,7 +30,6 @@
 #undef ldap_debug      /* silence a warning in ldap-int.h */
 #include "../../../libraries/libldap/ldap-int.h"
 
-#ifdef LDAP_CACHING
 void 
 filter2template(
        Filter                  *f,
@@ -244,4 +243,3 @@ filter2template(
                return;
        }
 }
-#endif /* LDAP_CACHING */
index 2e2328cefdbd9d061064c5ab5749d04b4e1e977a..1f7a50c0834f838fecaa8e0d6e8fc9002492601b 100644 (file)
@@ -27,7 +27,6 @@ EVEN
 #define META_CACHE_H
 #include "slap.h"
 
-#ifdef LDAP_CACHING
 /* cache specific errors */
 enum type_of_result 
 { 
@@ -215,4 +214,3 @@ remove_query_data (
                   struct exception* result
 );
 #endif
-#endif
index f404141cd6c41b3cc4c2ceadca36b1aa20c992bc..9685449d890f18a6e1bde12c3c84528b4eed58a3 100644 (file)
@@ -522,17 +522,11 @@ meta_back_db_config(
                int             i = li->ntargets-1;
 
                if ( i < 0 ) {
-#ifndef LDAP_CACHING
-                       fprintf( stderr,
-       "%s: line %d: need \"uri\" directive first\n",
-                               fname, lineno );
-#else /* LDAP_CACHING */
                        if ( strcasecmp( argv[0], "rewriteEngine" ) == 0 ) {
                                li->rwinfo = rewrite_info_init( REWRITE_MODE_USE_DEFAULT );
                        }
                        return rewrite_parse(li->rwinfo, fname, lineno,
                                        argc, argv); 
-#endif /* LDAP_CACHING */
                }
                
                return rewrite_parse( li->targets[ i ]->rwmap.rwm_rw, fname, lineno,
@@ -554,11 +548,9 @@ meta_back_db_config(
                                fname, lineno, argc, argv );
        /* anything else */
        } else {
-#ifdef LDAP_CACHING
                if ( meta_back_cache_config( be, fname, lineno, argc, argv ) == 0 ) {
                        return 0;
                }
-#endif /* LDAP_CACHING */
 
                fprintf( stderr,
        "%s: line %d: unknown directive \"%s\" in meta database definition"
index 4978ee98b4cd68ca3b5a59b19e110e767aeefa28..3f8009a185667d9ca4eb2d9be712270610879c8b 100644 (file)
@@ -78,7 +78,7 @@
 #ifdef SLAPD_META_DYNAMIC
 
 int
-back_meta_LTX_init_module( int argc, char *argv[] ) {
+init_module( int argc, char *argv[] ) {
     BackendInfo bi;
 
     memset( &bi, '\0', sizeof( bi ) );
@@ -136,7 +136,6 @@ meta_back_db_init(
 {
        struct metainfo *li;
 
-#ifdef LDAP_CACHING
        struct rewrite_info     *rwinfo;
        cache_manager           *cm;
        query_manager           *qm;
@@ -159,11 +158,11 @@ meta_back_db_init(
                return -1;
        }
 
-        cm->caching = 0; 
-        cm->qm = qm; 
+       cm->caching = 0; 
+       cm->qm = qm; 
        cm->numattrsets = 0; 
        cm->numtemplates = 0;   
-        cm->num_entries_limit = 5;
+       cm->num_entries_limit = 5;
        cm->cache_size = 0;
        cm->thresh_hi = 500000;
        cm->thresh_lo = 700000;
@@ -182,12 +181,11 @@ meta_back_db_init(
        qm->qcfunc = query_containment; 
        qm->crfunc = cache_replacement; 
        qm->addfunc = add_query; 
-        ldap_pvt_thread_mutex_init(&qm->lru_mutex); 
+       ldap_pvt_thread_mutex_init(&qm->lru_mutex); 
         
-        ldap_pvt_thread_mutex_init(&cm->cache_mutex); 
-        ldap_pvt_thread_mutex_init(&cm->remove_mutex); 
+       ldap_pvt_thread_mutex_init(&cm->cache_mutex); 
+       ldap_pvt_thread_mutex_init(&cm->remove_mutex); 
        ldap_pvt_thread_mutex_init( &cm->cc_mutex );
-#endif /* LDAP_CACHING */
 
        li = ch_calloc( 1, sizeof( struct metainfo ) );
        if ( li == NULL ) {
@@ -199,11 +197,9 @@ meta_back_db_init(
         * this may change
         */
        li->defaulttarget = META_DEFAULT_TARGET_NONE;
-#ifdef LDAP_CACHING
        li->cm = cm; 
        li->rwinfo = rwinfo;
        /* FIXME: what about qm ? */
-#endif /* LDAP_CACHING */
 
        ldap_pvt_thread_mutex_init( &li->conn_mutex );
        ldap_pvt_thread_mutex_init( &li->cache.mutex );
index 6ac2a91e5f6a0ad700b3a159ee5c454af56ba99a..940ce702cc6f66c52f2442908e544b661673dc0a 100644 (file)
@@ -114,13 +114,11 @@ meta_back_search( Operation *op, SlapReply *rs )
        int isroot = 0;
        dncookie dc;
 
-#ifdef LDAP_CACHING
        cache_manager*  cm = li->cm;
 
        if (cm->caching) {
                return meta_back_cache_search(op, rs);
        }
-#endif /* LDAP_CACHING */
        
        /*
         * controls are set in ldap_back_dobind()
index cab41e3d492120eff64d11ddd8256b5c2236cb9c..5e53226d55a9f5ae6b0713c8186c94fc4198128f 100644 (file)
@@ -154,7 +154,7 @@ struct monitorsubsys monitor_subsys[] = {
 #ifdef SLAPD_MONITOR_DYNAMIC
 
 int
-back_monitor_LTX_init_module( int argc, char *argv[] )
+init_module( int argc, char *argv[] )
 {
        BackendInfo bi;
 
@@ -219,6 +219,9 @@ monitor_back_initialize(
        bi->bi_tool_entry_put = 0;
        bi->bi_tool_entry_reindex = 0;
        bi->bi_tool_sync = 0;
+       bi->bi_tool_dn2id_get = 0;
+       bi->bi_tool_id2entry_get = 0;
+       bi->bi_tool_entry_modify = 0;
 
        bi->bi_connection_init = 0;
        bi->bi_connection_destroy = 0;
index 0accdc50004ebb07e0fefb95c52081fd6aa0c4b2..a4c2df5e48eec193e75668e71a367296fd4e0373 100644 (file)
@@ -18,7 +18,7 @@ ldap_pvt_thread_mutex_t passwd_mutex;
 
 #ifdef SLAPD_PASSWD_DYNAMIC
 
-int back_passwd_LTX_init_module(int argc, char *argv[]) {
+int init_module(int argc, char *argv[]) {
     BackendInfo bi;
 
     memset( &bi, '\0', sizeof(bi) );
index 8f41042c6e61fedf795249d1b1a91495ec3c80ae..b17e7cdfb5a8669a7d07452701511b96cb375b9f 100644 (file)
  *      in file LICENSE in the top-level directory of the distribution.
  */
 
-#include "portable.h"
-
-#include <stdio.h>
+#include <EXTERN.h>
+#include <perl.h>
+#undef _ /* #defined used by both Perl and ac/localize.h */
 
-#include "slap.h"
 #ifdef HAVE_WIN32_ASPERL
 #include "asperl_undefs.h"
 #endif
 
-#include <EXTERN.h>
-#include <perl.h>
+#include "portable.h"
+
+#include <stdio.h>
+
+#include "slap.h"
 
 #include "perl_back.h"
 
index fb3fdb612bfdd90e387bc8c2fac1660d15cdc65b..2d0ea25d90d4ab4badb369edf65391a17e0190f8 100644 (file)
@@ -2,6 +2,10 @@
  * Copyright 1999-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
+
+/* This file is probably obsolete.  If it is not,        */
+/* #inclusion of it may have to be moved.  See ITS#2513. */
+
 /* This file is necessary because both PERL headers */
 /* and OpenLDAP define a number of macros without   */
 /* checking wether they're already defined */
index cee52ec5f368e39fdb6b4a0872ba092b00a5f490..a09825de7ffc2fadfa621321ab28df1bb17665fd 100644 (file)
  *      in file LICENSE in the top-level directory of the distribution.
  */
 
-#include "portable.h"
-/* init.c - initialize Perl backend */
-       
-#include <stdio.h>
+#include <EXTERN.h>
+#include <perl.h>
+#undef _ /* #defined used by both Perl and ac/localize.h */
 
-#include "slap.h"
 #ifdef HAVE_WIN32_ASPERL
 #include "asperl_undefs.h"
 #endif
 
-#include <EXTERN.h>
-#include <perl.h>
+#include "portable.h"
+       
+#include <stdio.h>
+
+#include "slap.h"
 
 #include "perl_back.h"
 
index 4ad62899ecc4f5e25108892bef7d10c0ffa95c08..2e3252c3c1a12bed75f64500bc3b04cece67bf3a 100644 (file)
  *      in file LICENSE in the top-level directory of the distribution.
  */
 
-#include "portable.h"
-/* init.c - initialize shell backend */
-       
-#include <stdio.h>
+#include <EXTERN.h>
+#include <perl.h>
+#undef _ /* #defined used by both Perl and ac/localize.h */
 
-#include "slap.h"
 #ifdef HAVE_WIN32_ASPERL
 #include "asperl_undefs.h"
 #endif
 
-#include <EXTERN.h>
-#include <perl.h>
+#include "portable.h"
+       
+#include <stdio.h>
+
+#include "slap.h"
 
 #include "perl_back.h"
 
index 8218bb41682a9830a43ba6a35dfc6744ff0e47d1..1dfcb125f57f5b26256f63264623e28cf7bbb45f 100644 (file)
  *      in file LICENSE in the top-level directory of the distribution.
  */
 
-#include "portable.h"
-
-#include <stdio.h>
+#include <EXTERN.h>
+#include <perl.h>
+#undef _ /* #defined used by both Perl and ac/localize.h */
 
-#include "slap.h"
 #ifdef HAVE_WIN32_ASPERL
 #include "asperl_undefs.h"
 #endif
 
-#include <EXTERN.h>
-#include <perl.h>
+#include "portable.h"
+
+#include <stdio.h>
+
+#include "slap.h"
 
 #include "lutil.h"
 #include "perl_back.h"
index b33151cde33e4a050c9bb77e2cfa5f15ee7093fa..ed9b9617113b2b92c5e0b18875d994a003ac45ac 100644 (file)
  *      in file LICENSE in the top-level directory of the distribution.
  */
 
-#include "portable.h"
-       
-#include <stdio.h>
+#include <EXTERN.h>
+#include <perl.h>
+#undef _ /* #defined used by both Perl and ac/localize.h */
 
-#include "slap.h"
 #ifdef HAVE_WIN32_ASPERL
 #include "asperl_undefs.h"
 #endif
 
-#include <EXTERN.h>
-#include <perl.h>
+#include "portable.h"
+       
+#include <stdio.h>
+
+#include "slap.h"
 
 #include "perl_back.h"
 
index 26e05363f3e0b4cac0c41c4465538d683757b2f0..9bc51264686ff80073eae10ff08a0acd760d4aa3 100644 (file)
  *      in file LICENSE in the top-level directory of the distribution.
  */
 
-#include "portable.h"
-
-#include <stdio.h>
+#include <EXTERN.h>
+#include <perl.h>
+#undef _ /* #defined used by both Perl and ac/localize.h */
 
-#include "slap.h"
 #ifdef HAVE_WIN32_ASPERL
 #include "asperl_undefs.h"
 #endif
 
-#include <EXTERN.h>
-#include <perl.h>
+#include "portable.h"
+
+#include <stdio.h>
+
+#include "slap.h"
 
 #include "perl_back.h"
 
index 6096fc876d4875719e4b44b566e7c852018c8867..5f4bec4375edc27edec93a6a860da2c20935d036 100644 (file)
  *      in file LICENSE in the top-level directory of the distribution.
  */
 
-#include "portable.h"
- /* init.c - initialize shell backend */
-       
-#include <stdio.h>
+#include <EXTERN.h>
+#include <perl.h>
+#undef _ /* #defined used by both Perl and ac/localize.h */
 
-#include "slap.h"
 #ifdef HAVE_WIN32_ASPERL
 #include "asperl_undefs.h"
 #endif
 
-#include <EXTERN.h>
-#include <perl.h>
+#include "portable.h"
+       
+#include <stdio.h>
+
+#include "slap.h"
 
 #include "perl_back.h"
 
@@ -37,7 +38,7 @@ ldap_pvt_thread_mutex_t       perl_interpreter_mutex;
 
 #ifdef SLAPD_PERL_DYNAMIC
 
-int back_perl_LTX_init_module(int argc, char *argv[])
+int init_module(int argc, char *argv[])
 {
        BackendInfo bi;
 
index 96c28fcb0c29aca860b1bd4cbc4ea2033e14c648..f77f3087525a73df3f4362acbef19dcb9b18deed 100644 (file)
  *      in file LICENSE in the top-level directory of the distribution.
  */
 
-#include "portable.h"
-
-#include <stdio.h>
+#include <EXTERN.h>
+#include <perl.h>
+#undef _ /* #defined used by both Perl and ac/localize.h */
 
-#include "slap.h"
 #ifdef HAVE_WIN32_ASPERL
 #include "asperl_undefs.h"
 #endif
 
-#include <EXTERN.h>
-#include <perl.h>
+#include "portable.h"
+
+#include <stdio.h>
+
+#include "slap.h"
 
 #include "perl_back.h"
 
index 20bdf3c8bdb44adff56dd87cdebc4cd64d34fc00..2befbb6ee7c8ff4669ffc14122a34302c582944d 100644 (file)
  *
  */
 
-#include "portable.h"
-
-#include <stdio.h>
+#include <EXTERN.h>
+#include <perl.h>
+#undef _ /* #defined used by both Perl and ac/localize.h */
 
-#include "slap.h"
 #ifdef HAVE_WIN32_ASPERL
 #include "asperl_undefs.h"
 #endif
 
-#include <EXTERN.h>
-#include <perl.h>
+#include "portable.h"
+
+#include <stdio.h>
+
+#include "slap.h"
 
 #include "perl_back.h"
 
index c070b46b0a1c51ce616ba5b937f744e641185ec4..50230e6efc4d6595d542387fe36d39e87c6ce412 100644 (file)
  *      in file LICENSE in the top-level directory of the distribution.
  */
 
-#include "portable.h"
-
-#include <stdio.h>
+#include <EXTERN.h>
+#include <perl.h>
+#undef _ /* #defined used by both Perl and ac/localize.h */
 
-#include "slap.h"
 #ifdef HAVE_WIN32_ASPERL
 #include "asperl_undefs.h"
 #endif
 
-#include <EXTERN.h>
-#include <perl.h>
+#include "portable.h"
+
+#include <stdio.h>
+
+#include "slap.h"
 
 #include "perl_back.h"
 
index 23c2a66be3fbe0dbeea76a23bbd6a435d0a80713..ad9ea914de2bdfb3370f413883877ddc61078299 100644 (file)
@@ -3,9 +3,9 @@
 ## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 
 SRCS   = init.c config.c fork.c search.c bind.c unbind.c add.c \
-               delete.c modify.c modrdn.c compare.c abandon.c result.c
+               delete.c modify.c modrdn.c compare.c result.c
 OBJS   = init.lo config.lo fork.lo search.lo bind.lo unbind.lo add.lo \
-               delete.lo modify.lo modrdn.lo compare.lo abandon.lo result.lo
+               delete.lo modify.lo modrdn.lo compare.lo result.lo
 
 LDAP_INCDIR= ../../../include       
 LDAP_LIBDIR= ../../../libraries
diff --git a/servers/slapd/back-shell/abandon.c b/servers/slapd/back-shell/abandon.c
deleted file mode 100644 (file)
index 040a999..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* abandon.c - shell backend abandon function */
-/* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-#include <ac/string.h>
-
-#include "slap.h"
-#include "shell.h"
-
-int
-shell_back_abandon(
-    Operation  *op,
-    SlapReply  *rs )
-{
-       struct shellinfo        *si = (struct shellinfo *) op->o_bd->be_private;
-       FILE                    *rfp, *wfp;
-       pid_t                   pid;
-       Operation               *o;
-
-       if ( si->si_abandon == NULL ) {
-               return 0;
-       }
-
-       pid = -1;
-       LDAP_STAILQ_FOREACH( o, &op->o_conn->c_ops, o_next ) {
-               if ( o->o_msgid == op->oq_abandon.rs_msgid ) {
-                       pid = (pid_t) o->o_private;
-                       break;
-               }
-       }
-
-       if ( pid == -1 ) {
-               Debug( LDAP_DEBUG_ARGS, "shell could not find op %ld\n",
-                      (long) op->oq_abandon.rs_msgid, 0, 0 );
-               return 0;
-       }
-
-       if ( forkandexec( si->si_abandon, &rfp, &wfp ) == -1 ) {
-               return 0;
-       }
-
-       /* write out the request to the abandon process */
-       fprintf( wfp, "ABANDON\n" );
-       fprintf( wfp, "msgid: %d\n", op->oq_abandon.rs_msgid );
-       print_suffixes( wfp, op->o_bd );
-       fprintf( wfp, "pid: %ld\n", (long) pid );
-       fclose( wfp );
-
-       /* no result from abandon */
-       fclose( rfp );
-
-       return 0;
-}
index 31c83e487b4787a9e6c72b81fe650197bdc97c09..368404ebf3bb0048c2461d9460b5baeb95211a1c 100644 (file)
@@ -38,7 +38,7 @@ shell_back_add(
                return -1;
        }
 
-       if ( (op->o_private = (void *) forkandexec( si->si_add, &rfp, &wfp )) == (void *) -1 ) {
+       if ( forkandexec( si->si_add, &rfp, &wfp ) == (pid_t)-1 ) {
                send_ldap_error( op, rs, LDAP_OTHER,
                    "could not fork/exec" );
                return( -1 );
index 0acca761ce517394b3ad9b655d8a3c311c03129f..d777394c691c3fa7b06c370ecb183ba52c76a3e5 100644 (file)
@@ -48,8 +48,7 @@ shell_back_bind(
                return -1;
        }
 
-       if ( (op->o_private = (void *) forkandexec( si->si_bind, &rfp, &wfp ))
-           == (void *) -1 ) {
+       if ( forkandexec( si->si_bind, &rfp, &wfp ) == (pid_t)-1 ) {
                send_ldap_error( op, rs, LDAP_OTHER,
                    "could not fork/exec" );
                return( -1 );
index 09ffb4d4aa937c0b3c17ba518158d47c74873c2d..1a840ef2967cac0f356dfb1930a4112012998300 100644 (file)
@@ -47,8 +47,7 @@ shell_back_compare(
                return -1;
        }
 
-       if ( (op->o_private = (void *) forkandexec( si->si_compare, &rfp, &wfp ))
-           == (void *) -1 ) {
+       if ( forkandexec( si->si_compare, &rfp, &wfp ) == (pid_t)-1 ) {
                send_ldap_error( op, rs, LDAP_OTHER,
                    "could not fork/exec" );
                return( -1 );
index a9ec0a95eae9b9db9a8dbbfa87119187509c4f73..d15e6264d1543e9159485a1164b91101ccdda501 100644 (file)
@@ -112,16 +112,6 @@ shell_back_db_config(
                }
                si->si_delete = ldap_charray_dup( &argv[1] );
 
-       /* command + args to exec for abandon */
-       } else if ( strcasecmp( argv[0], "abandon" ) == 0 ) {
-               if ( argc < 2 ) {
-                       fprintf( stderr,
-       "%s: line %d: missing executable in \"abandon <executable>\" line\n",
-                           fname, lineno );
-                       return( 1 );
-               }
-               si->si_abandon = ldap_charray_dup( &argv[1] );
-
        /* anything else */
        } else {
                fprintf( stderr,
index 3daec4c898cd09201a4e6663bd336b3253b5a271..d33ef122201c19e000c54e72d6fe872d757e635f 100644 (file)
@@ -47,8 +47,7 @@ shell_back_delete(
                return -1;
        }
 
-       if ( (op->o_private = (void *) forkandexec( si->si_delete, &rfp, &wfp ))
-           == (void *) -1 ) {
+       if ( forkandexec( si->si_delete, &rfp, &wfp ) == (pid_t)-1 ) {
                send_ldap_error( op, rs, LDAP_OTHER,
                    "could not fork/exec" );
                return( -1 );
index 1d58992ea3a8bd12b155b0ceeaef0bb8a44d6b3e..ec275c91fc554c7d978a73524b29f177248bdc7c 100644 (file)
@@ -34,8 +34,6 @@ extern BI_op_add      shell_back_add;
 
 extern BI_op_delete    shell_back_delete;
 
-extern BI_op_abandon   shell_back_abandon;
-
 LDAP_END_DECL
 
 #endif /* _SHELL_EXTERNAL_H */
index cfb5357dd0ab17a2c51f2e7f695e5b1472755601..ab7663a8ee175ffdd89a5c989e5c8afd9fca5c68 100644 (file)
@@ -16,7 +16,7 @@
 
 #ifdef SLAPD_SHELL_DYNAMIC
 
-int back_shell_LTX_init_module(int argc, char *argv[]) {
+int init_module(int argc, char *argv[]) {
     BackendInfo bi;
 
     memset( &bi, '\0', sizeof(bi) );
@@ -53,7 +53,7 @@ shell_back_initialize(
        bi->bi_op_modrdn = shell_back_modrdn;
        bi->bi_op_add = shell_back_add;
        bi->bi_op_delete = shell_back_delete;
-       bi->bi_op_abandon = shell_back_abandon;
+       bi->bi_op_abandon = 0;
 
        bi->bi_extended = 0;
 
index 248a64dc45d8602728c821d1b78558b5f2c1e2a5..906ee6093c8ab819339c172bd480383587ddd3f0 100644 (file)
@@ -50,8 +50,7 @@ shell_back_modify(
                return -1;
        }
 
-       if ( (op->o_private = (void *) forkandexec( si->si_modify, &rfp, &wfp ))
-           == (void *) -1 ) {
+       if ( forkandexec( si->si_modify, &rfp, &wfp ) == (pid_t)-1 ) {
                send_ldap_error( op, rs, LDAP_OTHER,
                    "could not fork/exec" );
                return( -1 );
index f24831e3ac79e3bba7cc6ebe8d19e6b7a343ccf1..ddffb9149318afca99636e4e3227933144117cb4 100644 (file)
@@ -60,8 +60,7 @@ shell_back_modrdn(
                return -1;
        }
 
-       if ( (op->o_private = (void *) forkandexec( si->si_modrdn, &rfp, &wfp ))
-           == (void *) -1 ) {
+       if ( forkandexec( si->si_modrdn, &rfp, &wfp ) == (pid_t)-1 ) {
                send_ldap_error( op, rs, LDAP_OTHER,
                    "could not fork/exec" );
                return( -1 );
index a80d9502cf69e55fdc32ef9c49c5ee6a91871953..13c073090f4a1294791978151d8555d5f6090765 100644 (file)
@@ -30,8 +30,7 @@ shell_back_search(
                return( -1 );
        }
 
-       if ( (op->o_private = (void *) forkandexec( si->si_search, &rfp, &wfp ))
-           == (void *) -1 ) {
+       if ( forkandexec( si->si_search, &rfp, &wfp ) == (pid_t)-1 ) {
                send_ldap_error( op, rs, LDAP_OTHER,
                    "could not fork/exec" );
                return( -1 );
index 86b9a0bb8c54b836a0dee9c7a1021893b04e9540..93cd28fcda266e139ec65d2beb9be62d5b437abb 100644 (file)
@@ -21,7 +21,6 @@ struct shellinfo {
        char    **si_modrdn;    /* cmd + args to exec for modrdn  */
        char    **si_add;               /* cmd + args to exec for add     */
        char    **si_delete;    /* cmd + args to exec for delete  */
-       char    **si_abandon;   /* cmd + args to exec for abandon */
 };
 
 struct slap_backend_db;
index 221b0f83a392fb42d97df6093ee090b23665d838..005b8640f0f3b3f25971254ea5a6810d651b2467 100644 (file)
@@ -28,8 +28,7 @@ shell_back_unbind(
                return 0;
        }
 
-       if ( (op->o_private = (void *) forkandexec( si->si_unbind, &rfp, &wfp ))
-           == (void *) -1 ) {
+       if ( forkandexec( si->si_unbind, &rfp, &wfp ) == (pid_t)-1 ) {
                return 0;
        }
 
index 49b86f3a1e6cb3ed214cc118e93604d2cb0e1d19..2e0c2829660c8330c8e30d6dd916a2602e26f907 100644 (file)
@@ -23,7 +23,7 @@
 #ifdef SLAPD_SQL_DYNAMIC
 
 int
-backsql_LTX_init_module(
+init_module(
        int             argc, 
        char            *argv[] )
 {
@@ -415,7 +415,7 @@ backsql_db_open(
        bb.bb_val.bv_len = 0;
        bb.bb_len = 0;
        backsql_strfcat( &bb, "sb",
-                       "SELECT COUNT(distinct subordinates.id) FROM ldap_entries,ldap_entries AS subordinates WHERE subordinates.parent=ldap_entries.id AND ",
+                       "SELECT COUNT(distinct subordinates.id) FROM ldap_entries,ldap_entries subordinates WHERE subordinates.parent=ldap_entries.id AND ",
 
                        &si->children_cond );
        si->has_children_query = bb.bb_val.bv_val;
index 9305d45aadc047ea132a3a3585123b410e328381..3d75b467e92f0df7c428263df644a761a333c043 100644 (file)
@@ -969,7 +969,7 @@ backsql_oc_get_candidates( void *v_oc, void *v_bsi )
                        return BACKSQL_CONTINUE;
                }
                
-               Debug( LDAP_DEBUG_TRACE, "(one)id: '%s'\n", base_id.id,
+               Debug( LDAP_DEBUG_TRACE, "(one)id: '%lu'\n", base_id.id,
                                0, 0 );
 
                rc = backsql_BindParamID( sth, 2, &base_id.id );
index 2ce177474bc801e48cfeb6d8da26e724d3169c22..be24c8189b9df0587603b4a8574df16416faed01 100644 (file)
@@ -128,18 +128,14 @@ BackendInfo       *backendInfo = NULL;
 int                    nBackendDB = 0; 
 BackendDB      *backendDB = NULL;
 
-#ifdef LDAP_SYNCREPL
 ldap_pvt_thread_pool_t syncrepl_pool;
 int                    syncrepl_pool_max = SLAP_MAX_SYNCREPL_THREADS;
-#endif
 
 int backend_init(void)
 {
        int rc = -1;
 
-#ifdef LDAP_SYNCREPL
-        ldap_pvt_thread_pool_init( &syncrepl_pool, syncrepl_pool_max, 0 );
-#endif
+       ldap_pvt_thread_pool_init( &syncrepl_pool, syncrepl_pool_max, 0 );
 
        if((nBackendInfo != 0) || (backendInfo != NULL)) {
                /* already initialized */
@@ -248,9 +244,7 @@ int backend_startup(Backend *be)
        int i;
        int rc = 0;
 
-#ifdef LDAP_SYNCREPL
        init_syncrepl();
-#endif
 
        if( ! ( nBackendDB > 0 ) ) {
                /* no databases */
@@ -267,6 +261,9 @@ int backend_startup(Backend *be)
 
        if(be != NULL) {
                /* startup a specific backend database */
+
+               LDAP_TAILQ_INIT( &be->be_pending_csn_list );
+
 #ifdef NEW_LOGGING
                LDAP_LOG( BACKEND, DETAIL1, "backend_startup:  starting \"%s\"\n",
                           be->be_suffix[0].bv_val, 0, 0 );
@@ -333,17 +330,17 @@ int backend_startup(Backend *be)
                }
        }
 
-#ifdef LDAP_SYNCREPL
        ldap_pvt_thread_mutex_init( &syncrepl_rq.rq_mutex );
        LDAP_STAILQ_INIT( &syncrepl_rq.task_list );
        LDAP_STAILQ_INIT( &syncrepl_rq.run_list );
-#endif
 
        /* open each backend database */
        for( i = 0; i < nBackendDB; i++ ) {
                /* append global access controls */
                acl_append( &backendDB[i].be_acl, global_acl );
 
+               LDAP_TAILQ_INIT( &backendDB[i].be_pending_csn_list );
+
                if ( backendDB[i].bd_info->bi_db_open ) {
                        rc = backendDB[i].bd_info->bi_db_open(
                                &backendDB[i] );
@@ -360,15 +357,14 @@ int backend_startup(Backend *be)
                        }
                }
 
-#ifdef LDAP_SYNCREPL
                if ( backendDB[i].syncinfo != NULL ) {
                        syncinfo_t *si = ( syncinfo_t * ) backendDB[i].syncinfo;
+                       si->be = &backendDB[i];
                        ldap_pvt_thread_mutex_lock( &syncrepl_rq.rq_mutex );
                        ldap_pvt_runqueue_insert( &syncrepl_rq, si->interval,
-                                                       do_syncrepl, (void *) &backendDB[i] );
+                                                       do_syncrepl, (void *) backendDB[i].syncinfo );
                        ldap_pvt_thread_mutex_unlock( &syncrepl_rq.rq_mutex );
                }
-#endif
        }
 
        return rc;
@@ -451,9 +447,7 @@ int backend_destroy(void)
        int i;
        BackendDB *bd;
 
-#ifdef LDAP_SYNCREPL
-        ldap_pvt_thread_pool_destroy( &syncrepl_pool, 1 );
-#endif
+       ldap_pvt_thread_pool_destroy( &syncrepl_pool, 1 );
 
        /* destroy each backend database */
        for( i = 0, bd = backendDB; i < nBackendDB; i++, bd++ ) {
@@ -534,9 +528,12 @@ backend_db_init(
        be->be_requires = global_requires;
        be->be_ssf_set = global_ssf_set;
 
-#ifdef LDAP_SYNCREPL
-        be->syncinfo = NULL;
-#endif
+       be->be_context_csn.bv_len = 0;
+       be->be_context_csn.bv_val = NULL;
+       ldap_pvt_thread_mutex_init( &be->be_pcl_mutex );
+       ldap_pvt_thread_mutex_init( &be->be_context_csn_mutex );
+
+       be->syncinfo = NULL;
 
        /* assign a default depth limit for alias deref */
        be->be_max_deref_depth = SLAPD_DEFAULT_MAXDEREFDEPTH; 
@@ -820,8 +817,8 @@ backend_check_controls(
 
        if( ctrls ) {
                for( ; *ctrls != NULL ; ctrls++ ) {
-                       if( (*ctrls)->ldctl_iscritical &&
-                               !ldap_charray_inlist( op->o_bd->be_controls, (*ctrls)->ldctl_oid ) )
+                       if( (*ctrls)->ldctl_iscritical && !ldap_charray_inlist(
+                               op->o_bd->be_controls, (*ctrls)->ldctl_oid ) )
                        {
                                rs->sr_text = "control unavailable in context";
                                rs->sr_err = LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
index e60be088babe4c7f72370563df1c0937ff2b4da2..d99eaa10de99f10f55d66f0098952193a0bf3fca 100644 (file)
@@ -187,11 +187,7 @@ glue_back_response ( Operation *op, SlapReply *rs )
                op->o_callback = gs->prevcb;
                if (op->o_callback && op->o_callback->sc_response) {
                        rs->sr_err = op->o_callback->sc_response( op, rs );
-               } else if (rs->sr_type == REP_SEARCH) {
-                       rs->sr_err = send_search_entry( op, rs );
-               } else {
-                       rs->sr_err = send_search_reference( op, rs );
-               }
+               } else rs->sr_err = SLAP_CB_CONTINUE;
                op->o_callback = tmp;
                return rs->sr_err;
 
@@ -591,6 +587,10 @@ glue_sub_init( )
                                bi->bi_tool_entry_put = glue_tool_entry_put;
                                bi->bi_tool_entry_reindex = glue_tool_entry_reindex;
                                bi->bi_tool_sync = glue_tool_sync;
+                               /* FIXME : will support later */
+                               bi->bi_tool_dn2id_get = 0;
+                               bi->bi_tool_id2entry_get = 0;
+                               bi->bi_tool_entry_modify = 0;
                        } else {
                                gi = (glueinfo *)ch_realloc(gi,
                                        sizeof(glueinfo) +
diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c
new file mode 100644 (file)
index 0000000..29edb84
--- /dev/null
@@ -0,0 +1,342 @@
+/* backover.c - backend overlay routines */
+/* $OpenLDAP$ */
+/*
+ * Copyright 2003 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+/*
+ * Functions to overlay other modules over a backend.
+ *
+ *  -- Howard Chu
+ */
+
+#include "portable.h"
+
+#include <stdio.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
+#define SLAPD_TOOLS
+#include "slap.h"
+
+static slap_overinst *overlays;
+
+enum db_which { db_open = 0, db_close, db_destroy };
+
+static int
+over_db_func(
+       BackendDB *be,
+       enum db_which which
+)
+{
+       slap_overinfo *oi = (slap_overinfo *) be->bd_info;
+       slap_overinst *on = oi->oi_list;
+       BackendDB bd;
+       BI_db_open **func;
+       int rc = 0;
+
+       func = &oi->oi_bd.bd_info->bi_db_open;
+       if ( func[which] ) {
+               rc = func[which]( &oi->oi_bd );
+               if ( rc ) return rc;
+       }
+
+       bd = *be;
+       for (; on; on=on->on_next) {
+               bd.bd_info = &on->on_bi;
+               func = &on->on_bi.bi_db_open;
+               if (func[which]) {
+                       rc = func[which]( &bd );
+                       if ( rc ) break;
+               }
+       }
+       return rc;
+}
+
+static int
+over_db_config(
+       BackendDB *be,
+       const char *fname,
+       int lineno,
+       int argc,
+       char **argv
+)
+{
+       slap_overinfo *oi = (slap_overinfo *) be->bd_info;
+       slap_overinst *on = oi->oi_list;
+       BackendDB bd;
+       int rc = 0;
+
+       if ( oi->oi_bd.bd_info->bi_db_config ) {
+               rc = oi->oi_bd.bd_info->bi_db_config( &oi->oi_bd, fname, lineno,
+                       argc, argv );
+               if ( rc ) return rc;
+       }
+
+       bd = *be;
+       for (; on; on=on->on_next) {
+               bd.bd_info = &on->on_bi;
+               if (on->on_bi.bi_db_config) {
+                       rc = on->on_bi.bi_db_config( &bd, fname, lineno,
+                               argc, argv );
+                       if ( rc ) break;
+               }
+       }
+       return rc;
+}
+
+static int
+over_db_open(
+       BackendDB *be
+)
+{
+       return over_db_func( be, db_open );
+}
+
+static int
+over_db_close(
+       BackendDB *be
+)
+{
+       return over_db_func( be, db_close );
+}
+
+static int
+over_db_destroy(
+       BackendDB *be
+)
+{
+       slap_overinfo *oi = (slap_overinfo *) be->bd_info;
+       slap_overinst *on = oi->oi_list, *next;
+       int rc;
+
+       rc = over_db_func( be, db_destroy );
+
+       for (next = on->on_next; on; on=next) {
+               next = on->on_next;
+               free( on );
+       }
+       free( oi );
+       return rc;
+}
+
+static int
+over_back_response ( Operation *op, SlapReply *rs )
+{
+       slap_overinfo *oi = (slap_overinfo *) op->o_bd->bd_info;
+       slap_overinst *on = oi->oi_list;
+       int rc = SLAP_CB_CONTINUE;
+       BackendDB *be = op->o_bd, db = *op->o_bd;
+       slap_callback *sc = op->o_callback->sc_private;
+       slap_callback *s0 = op->o_callback;
+
+       op->o_bd = &db;
+       op->o_callback = sc;
+       for (; on; on=on->on_next ) {
+               if ( on->on_response ) {
+                       db.bd_info = (BackendInfo *)on;
+                       rc = on->on_response( op, rs );
+                       if ( rc != SLAP_CB_CONTINUE ) break;
+               }
+       }
+       if ( sc && (rc == SLAP_CB_CONTINUE) ) {
+               rc = sc->sc_response( op, rs );
+       }
+       op->o_bd = be;
+       op->o_callback = s0;
+       return rc;
+}
+
+enum op_which { op_bind = 0, op_unbind, op_search, op_compare,
+       op_modify, op_modrdn, op_add, op_delete, op_abandon,
+       op_cancel, op_extended };
+
+static int
+over_op_func(
+       Operation *op,
+       SlapReply *rs,
+       enum op_which which
+)
+{
+       slap_overinfo *oi = (slap_overinfo *) op->o_bd->bd_info;
+       slap_overinst *on = oi->oi_list;
+       BI_op_bind **func;
+       BackendDB *be = op->o_bd, db = *op->o_bd;
+       slap_callback cb = {over_back_response, NULL};
+       int rc = 0;
+
+       op->o_bd = &db;
+       cb.sc_private = op->o_callback;
+       op->o_callback = &cb;
+
+       for (; on; on=on->on_next ) {
+               func = &on->on_bi.bi_op_bind;
+               if ( func[which] ) {
+                       db.bd_info = (BackendInfo *)on;
+                       rc = func[which]( op, rs );
+                       if ( rc ) break;
+               }
+       }
+
+       func = &oi->oi_bd.bd_info->bi_op_bind;
+       if ( func[which] ) {
+               rc = func[which]( op, rs );
+       }
+
+       op->o_bd = be;
+       return rc;
+}
+
+static int
+over_op_bind( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_bind );
+}
+
+static int
+over_op_unbind( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_unbind );
+}
+
+static int
+over_op_search( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_search );
+}
+
+static int
+over_op_compare( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_compare );
+}
+
+static int
+over_op_modify( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_modify );
+}
+
+static int
+over_op_modrdn( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_modrdn );
+}
+
+static int
+over_op_add( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_add );
+}
+
+static int
+over_op_delete( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_delete );
+}
+
+static int
+over_op_abandon( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_abandon );
+}
+
+static int
+over_op_cancel( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_cancel );
+}
+
+static int
+over_op_extended( Operation *op, SlapReply *rs )
+{
+       return over_op_func( op, rs, op_extended );
+}
+
+int
+overlay_register(
+       slap_overinst *on
+)
+{
+       on->on_next = overlays;
+       overlays = on;
+       return 0;
+}
+
+static const char overtype[] = "over";
+
+/* add an overlay to a particular backend. */
+int
+overlay_config( BackendDB *be, const char *ov )
+{
+       slap_overinst *on, *on2, *prev;
+       slap_overinfo *oi;
+       BackendInfo *bi;
+
+       for ( on = overlays; on; on=on->on_next ) {
+               if (!strcmp( ov, on->on_bi.bi_type ) )
+                       break;
+       }
+       if (!on) {
+               Debug( LDAP_DEBUG_ANY, "overlay %s not found\n", ov, 0, 0 );
+               return 1;
+       }
+
+       /* If this is the first overlay on this backend, set up the
+        * overlay info structure
+        */
+       if ( be->bd_info->bi_type != overtype ) {
+               oi = ch_malloc( sizeof(slap_overinfo) );
+               oi->oi_bd = *be;
+               oi->oi_bi = *be->bd_info;
+               oi->oi_list = NULL;
+               bi = (BackendInfo *)oi;
+
+               bi->bi_type = (char *)overtype;
+
+               bi->bi_db_config = over_db_config;
+               bi->bi_db_open = over_db_open;
+               bi->bi_db_close = over_db_close;
+               bi->bi_db_destroy = over_db_destroy;
+
+               bi->bi_op_bind = over_op_bind;
+               bi->bi_op_unbind = over_op_unbind;
+               bi->bi_op_search = over_op_search;
+               bi->bi_op_compare = over_op_compare;
+               bi->bi_op_modify = over_op_modify;
+               bi->bi_op_modrdn = over_op_modrdn;
+               bi->bi_op_add = over_op_add;
+               bi->bi_op_delete = over_op_delete;
+               bi->bi_op_abandon = over_op_abandon;
+               bi->bi_op_cancel = over_op_cancel;
+               bi->bi_extended = over_op_extended;
+
+               be->bd_info = bi;
+       }
+
+       /* Walk to the end of the list of overlays, add the new
+        * one onto the end
+        */
+       oi = (slap_overinfo *) be->bd_info;
+       for ( prev=NULL, on2 = oi->oi_list; on2; prev=on2, on2=on2->on_next );
+       on2 = ch_malloc( sizeof(slap_overinst) );
+       if ( !prev ) {
+               oi->oi_list = on2;
+       } else {
+               prev->on_next = on2;
+       }
+       *on2 = *on;
+       on2->on_next = NULL;
+
+       /* Any initialization needed? */
+       if ( on->on_bi.bi_db_init ) {
+               be->bd_info = (BackendInfo *)on2;
+               on2->on_bi.bi_db_init( be );
+               be->bd_info = (BackendInfo *)oi;
+       }
+
+       return 0;
+}
+
index 2678c18b4883fc22779ace536c51107881d57a68..0d87e303ed5a94733f1fe4e260b998caf9ad219c 100644 (file)
@@ -59,25 +59,25 @@ do_bind(
         * Force to connection to "anonymous" until bind succeeds.
         */
        ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
-       if ( op->o_conn->c_sasl_bind_in_progress ) be = op->o_conn->c_authz_backend;
-
-       /* log authorization identity demotion */
+       if ( op->o_conn->c_sasl_bind_in_progress ) {
+               be = op->o_conn->c_authz_backend;
+       }
        if ( op->o_conn->c_dn.bv_len ) {
+               /* log authorization identity demotion */
                Statslog( LDAP_DEBUG_STATS,
                        "conn=%lu op=%lu BIND anonymous mech=implicit ssf=0\n",
                        op->o_connid, op->o_opid, 0, 0, 0 );
        }
-
        connection2anonymous( op->o_conn );
-       if ( op->o_conn->c_sasl_bind_in_progress ) op->o_conn->c_authz_backend = be;
+       if ( op->o_conn->c_sasl_bind_in_progress ) {
+               op->o_conn->c_authz_backend = be;
+       }
        ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
-
        if ( op->o_dn.bv_val != NULL ) {
                free( op->o_dn.bv_val );
                op->o_dn.bv_val = ch_strdup( "" );
                op->o_dn.bv_len = 0;
        }
-
        if ( op->o_ndn.bv_val != NULL ) {
                free( op->o_ndn.bv_val );
                op->o_ndn.bv_val = ch_strdup( "" );
@@ -145,8 +145,7 @@ do_bind(
        }
 
        if ( tag == LBER_ERROR ) {
-               send_ldap_discon( op, rs, LDAP_PROTOCOL_ERROR,
-               "decoding error" );
+               send_ldap_discon( op, rs, LDAP_PROTOCOL_ERROR, "decoding error" );
                rs->sr_err = SLAPD_DISCONNECT;
                goto cleanup;
        }
@@ -165,7 +164,8 @@ do_bind(
         * However, we must dup with regular malloc when storing any
         * resulting DNs in the op or conn structures.
         */
-       rs->sr_err = dnPrettyNormal( NULL, &dn, &op->o_req_dn, &op->o_req_ndn, op->o_tmpmemctx );
+       rs->sr_err = dnPrettyNormal( NULL, &dn, &op->o_req_dn, &op->o_req_ndn,
+               op->o_tmpmemctx );
        if ( rs->sr_err != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, INFO, 
@@ -193,17 +193,19 @@ do_bind(
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, DETAIL1, 
                        "do_bind: version=%ld dn=\"%s\" method=%ld\n",
-                       (unsigned long) version, op->o_req_dn.bv_val, (unsigned long)method );
+                       (unsigned long) version, op->o_req_dn.bv_val,
+                       (unsigned long) method );
 #else
                Debug( LDAP_DEBUG_TRACE,
                        "do_bind: version=%ld dn=\"%s\" method=%ld\n",
-                       (unsigned long) version,
-                       op->o_req_dn.bv_val, (unsigned long) method );
+                       (unsigned long) version, op->o_req_dn.bv_val,
+                       (unsigned long) method );
 #endif
        }
 
        Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu BIND dn=\"%s\" method=%ld\n",
-           op->o_connid, op->o_opid, op->o_req_dn.bv_val, (unsigned long) method, 0 );
+           op->o_connid, op->o_opid, op->o_req_dn.bv_val, (unsigned long) method,
+               0 );
 
        if ( version < LDAP_VERSION_MIN || version > LDAP_VERSION_MAX ) {
 #ifdef NEW_LOGGING
@@ -226,8 +228,8 @@ do_bind(
                goto cleanup;
        }
 
-       /* we set connection version regardless of whether bind succeeds
-        * or not.
+       /*
+        * we set connection version regardless of whether bind succeeds or not.
         */
        ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
        op->o_conn->c_protocol = version;
@@ -352,6 +354,23 @@ do_bind(
                        }
                        op->o_conn->c_sasl_bind_in_progress = 0;
                }
+
+#ifdef LDAP_SLAPI
+               /*
+                * Normally post-operation plugins are called only after the
+                * backend operation. Because the front-end performs SASL
+                * binds on behalf of the backend, we'll make a special
+                * exception to call the post-operation plugins after a
+                * SASL bind.
+                */
+               slapi_x_pblock_set_operation( pb, op );
+               slapi_pblock_set( pb, SLAPI_BIND_TARGET, (void *)dn.bv_val );
+               slapi_pblock_set( pb, SLAPI_BIND_METHOD, (void *)method );
+               slapi_pblock_set( pb, SLAPI_BIND_CREDENTIALS, (void *)&op->orb_cred );
+               slapi_pblock_set( pb, SLAPI_MANAGEDSAIT, (void *)(0) );
+               (void) doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_BIND_FN, pb );
+#endif /* LDAP_SLAPI */
+
                ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
 
                goto cleanup;
@@ -387,7 +406,8 @@ do_bind(
                        {
                                /* DN is not empty, disallow */
                                rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
-                               rs->sr_text = "unauthenticated bind (DN with no password) disallowed";
+                               rs->sr_text =
+                                       "unauthenticated bind (DN with no password) disallowed";
 
                        } else if ( global_disallows & SLAP_DISALLOW_BIND_ANON ) {
                                /* disallow */
@@ -421,31 +441,11 @@ do_bind(
                        send_ldap_result( op, rs );
 #ifdef NEW_LOGGING
                        LDAP_LOG( OPERATION, INFO, 
-                                  "do_bind: conn %d  v%d simple bind(%s) disallowed\n",
-                                  op->o_connid, version, op->o_req_ndn.bv_val );
-#else
-                       Debug( LDAP_DEBUG_TRACE,
-                               "do_bind: v%d simple bind(%s) disallowed\n",
-                               version, op->o_req_ndn.bv_val, 0 );
-#endif
-                       goto cleanup;
-
-               } else if (( global_disallows & SLAP_DISALLOW_BIND_SIMPLE_UNPROTECTED )
-                       && ( op->o_ssf <= 1 ))
-               {
-                       rs->sr_err = LDAP_CONFIDENTIALITY_REQUIRED;
-                       rs->sr_text = "unwilling to perform simple authentication "
-                               "without confidentiality protection";
-
-                       send_ldap_result( op, rs );
-
-#ifdef NEW_LOGGING
-                       LDAP_LOG( OPERATION, INFO, "do_bind: conn %d  "
-                               "v%d unprotected simple bind(%s) disallowed\n",
+                               "do_bind: conn %d  v%d simple bind(%s) disallowed\n",
                                op->o_connid, version, op->o_req_ndn.bv_val );
 #else
                        Debug( LDAP_DEBUG_TRACE,
-                               "do_bind: v%d unprotected simple bind(%s) disallowed\n",
+                               "do_bind: v%d simple bind(%s) disallowed\n",
                                version, op->o_req_ndn.bv_val, 0 );
 #endif
                        goto cleanup;
@@ -461,8 +461,8 @@ do_bind(
                        send_ldap_result( op, rs );
 #ifdef NEW_LOGGING
                        LDAP_LOG( OPERATION, DETAIL1, 
-                                  "do_bind: conn %d  v%d Kerberos V4 bind\n",
-                                  op->o_connid, version , 0 );
+                               "do_bind: conn %d  v%d Kerberos V4 bind\n",
+                               op->o_connid, version , 0 );
 #else
                        Debug( LDAP_DEBUG_TRACE, "do_bind: v%d Kerberos V4 bind\n",
                                version, 0, 0 );
@@ -478,8 +478,8 @@ do_bind(
                send_ldap_result( op, rs );
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, INFO, 
-                          "do_bind: conn %ld  v%d unknown authentication method (%ld)\n",
-                          op->o_connid, version, method );
+                       "do_bind: conn %ld  v%d unknown authentication method (%ld)\n",
+                       op->o_connid, version, method );
 #else
                Debug( LDAP_DEBUG_TRACE,
                        "do_bind: v%d unknown authentication method (%ld)\n",
@@ -528,31 +528,47 @@ do_bind(
        slapi_pblock_set( pb, SLAPI_MANAGEDSAIT, (void *)(0) );
 
        rs->sr_err = doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_BIND_FN, pb );
-       if ( rs->sr_err < 0 ) {
-               /*
-                * Binding is a special case for SLAPI plugins. It is
-                * possible for a bind plugin to be successful *and*
-                * abort further processing; this means it has handled
-                * a bind request authoritatively. If we have reached
-                * here, a result has been sent to the client (XXX
-                * need to check with Sun whether SLAPI_BIND_ANONYMOUS
-                * means a result has been sent).
-                */
-               int ldapRc;
 
-               if ( ( slapi_pblock_get( op->o_pb, SLAPI_RESULT_CODE, (void *)&ldapRc ) != 0 ) ||
-                    ldapRc == LDAP_SUCCESS ) {
-                       ldapRc = LDAP_OTHER;
+#ifdef NEW_LOGGING
+       LDAP_LOG( OPERATION, INFO,
+               "do_bind: Bind preoperation plugin returned %d\n",
+               rs->sr_err, 0, 0);
+#else
+       Debug(LDAP_DEBUG_TRACE,
+               "do_bind: Bind preoperation plugin returned %d.\n",
+               rs->sr_err, 0, 0);
+#endif
+
+       switch ( rs->sr_err ) {
+       case SLAPI_BIND_SUCCESS:
+               /* Continue with backend processing */
+               break;
+       case SLAPI_BIND_FAIL:
+               /* Failure, server sends result */
+               rs->sr_err = LDAP_INVALID_CREDENTIALS;
+               send_ldap_result( op, rs );
+               goto cleanup;
+               break;
+       case SLAPI_BIND_ANONYMOUS:
+               /* SLAPI_BIND_ANONYMOUS is undocumented XXX */
+       default:
+               /* Authoritative, plugin sent result */
+               if ( slapi_pblock_get( op->o_pb, SLAPI_RESULT_CODE,
+                       (void *)&rs->sr_err) != 0 )
+               {
+                       rs->sr_err = LDAP_OTHER;
                }
+
                op->orb_edn.bv_val = NULL;
                op->orb_edn.bv_len = 0;
-               if ( rs->sr_err != SLAPI_BIND_FAIL && ldapRc == LDAP_SUCCESS ) {
-                       /* Set the new connection DN. */
-                       if ( rs->sr_err != SLAPI_BIND_ANONYMOUS ) {
-                               slapi_pblock_get( pb, SLAPI_CONN_DN, (void *)&op->orb_edn.bv_val );
-                               if ( op->orb_edn.bv_val ) op->orb_edn.bv_len = strlen( op->orb_edn.bv_val );
+
+               if ( rs->sr_err == LDAP_SUCCESS ) {
+                       slapi_pblock_get( pb, SLAPI_CONN_DN, (void *)&op->orb_edn.bv_val );
+                       if ( op->orb_edn.bv_val != NULL ) {
+                               op->orb_edn.bv_len = strlen( op->orb_edn.bv_val );
                        }
-                       rs->sr_err = dnPrettyNormal( NULL, &op->orb_edn, &op->o_req_dn, &op->o_req_ndn, op->o_tmpmemctx );
+                       rs->sr_err = dnPrettyNormal( NULL, &op->orb_edn,
+                               &op->o_req_dn, &op->o_req_ndn, op->o_tmpmemctx );
                        ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
                        ber_dupbv(&op->o_conn->c_dn, &op->o_req_dn);
                        ber_dupbv(&op->o_conn->c_ndn, &op->o_req_ndn);
@@ -564,28 +580,23 @@ do_bind(
                        op->o_req_ndn.bv_len = 0;
                        if ( op->o_conn->c_dn.bv_len != 0 ) {
                                ber_len_t max = sockbuf_max_incoming_auth;
-                               ber_sockbuf_ctrl( op->o_conn->c_sb, LBER_SB_OPT_SET_MAX_INCOMING, &max );
+                               ber_sockbuf_ctrl( op->o_conn->c_sb,
+                                       LBER_SB_OPT_SET_MAX_INCOMING, &max );
                        }
                        /* log authorization identity */
                        Statslog( LDAP_DEBUG_STATS,
                                "conn=%lu op=%lu BIND dn=\"%s\" mech=simple (SLAPI) ssf=0\n",
                                op->o_connid, op->o_opid,
-                               op->o_conn->c_dn.bv_val, 0, 0 );
+                               op->o_conn->c_dn.bv_val ? op->o_conn->c_dn.bv_val : "<empty>",
+                               0, 0 );
                        ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
                }
-#ifdef NEW_LOGGING
-               LDAP_LOG( OPERATION, INFO, "do_bind: Bind preoperation plugin returned %d\n",
-                               rs->sr_err, 0, 0);
-#else
-               Debug(LDAP_DEBUG_TRACE, "do_bind: Bind preoperation plugin returned %d.\n",
-                               rs->sr_err, 0, 0);
-#endif
-               rs->sr_err = ldapRc;
                goto cleanup;
+               break;
        }
 #endif /* defined( LDAP_SLAPI ) */
 
-       if ( op->o_bd->be_bind ) {
+       if( op->o_bd->be_bind ) {
                op->orb_method = method;
                rs->sr_err = (op->o_bd->be_bind)( op, rs );
 
@@ -597,7 +608,7 @@ do_bind(
                        }
 
                        /* be_bind returns regular/global edn */
-                       if(op->orb_edn.bv_len) {
+                       if( op->orb_edn.bv_len ) {
                                op->o_conn->c_dn = op->orb_edn;
                        } else {
                                ber_dupbv(&op->o_conn->c_dn, &op->o_req_dn);
@@ -638,22 +649,25 @@ do_bind(
 
        } else {
                send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
-                       "operation not supported within namingContext" );
+                       "operation not supported within naming context" );
        }
 
 #if defined( LDAP_SLAPI )
        if ( doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_BIND_FN, pb ) < 0 ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG( OPERATION, INFO, "do_bind: Bind postoperation plugins failed\n",
-                               0, 0, 0);
+               LDAP_LOG( OPERATION, INFO,
+                       "do_bind: Bind postoperation plugins failed\n",
+                       0, 0, 0);
 #else
-               Debug(LDAP_DEBUG_TRACE, "do_bind: Bind postoperation plugins failed.\n",
-                               0, 0, 0);
+               Debug(LDAP_DEBUG_TRACE,
+                       "do_bind: Bind postoperation plugins failed.\n",
+                       0, 0, 0);
 #endif
        }
 #endif /* defined( LDAP_SLAPI ) */
 
 cleanup:
+
        op->o_conn->c_sasl_bindop = NULL;
 
        if( op->o_req_dn.bv_val != NULL ) {
index a5ef060282aaa4908855d963256e43ab40125e3e..0916bcac9802f5fec580c87db00e78fc7c6cccf9 100644 (file)
@@ -78,7 +78,6 @@ int cancel_extop( Operation *op, SlapReply *rs )
        }
 
        if ( !found ) {
-#ifdef LDAP_SYNC
                for ( i = 0; i < nbackends; i++ ) {
                        op->o_bd = &backends[i];
                        if( !op->o_bd->be_cancel ) continue;
@@ -91,7 +90,6 @@ int cancel_extop( Operation *op, SlapReply *rs )
                        }
                        ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
                }
-#endif
                ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
                rs->sr_text = "message ID not found";
                return LDAP_NO_SUCH_OPERATION;
index e3b04a9023ea7facf008feecd52bce6bb7da320b..2b442a015a93fe9903494c69fc585f8d81a78ae6 100644 (file)
@@ -80,10 +80,8 @@ static int   fp_parse_line(int lineno, char *line);
 static char    *strtok_quote(char *line, char *sep);
 static int      load_ucdata(char *path);
 
-#ifdef LDAP_SYNCREPL
-static void     add_syncrepl LDAP_P(( Backend *, char **, int ));
+static int     add_syncrepl LDAP_P(( Backend *, char **, int ));
 static int      parse_syncrepl_line LDAP_P(( char **, int, syncinfo_t *));
-#endif
 
 int
 read_config( const char *fname, int depth )
@@ -94,7 +92,8 @@ read_config( const char *fname, int depth )
        int     lineno, i;
        int rc;
        struct berval vals[2];
-
+       char *replicahost;
+       LDAPURLDesc *ludp;
        static int lastmod = 1;
        static BackendInfo *bi = NULL;
        static BackendDB        *be = NULL;
@@ -910,7 +909,7 @@ read_config( const char *fname, int depth )
                                        "subordinate keyword must appear inside a database "
                                        "definition.\n", fname, lineno, 0 );
 #else
-                               Debug( LDAP_DEBUG_ANY, "%s: line %d: suffix line "
+                               Debug( LDAP_DEBUG_ANY, "%s: line %d: subordinate keyword "
                                        "must appear inside a database definition.\n",
                                    fname, lineno, 0 );
 #endif
@@ -921,6 +920,24 @@ read_config( const char *fname, int depth )
                                num_subordinates++;
                        }
 
+               /* add an overlay to this backend */
+               } else if ( strcasecmp( cargv[0], "overlay" ) == 0 ) {
+                       if ( be == NULL ) {
+#ifdef NEW_LOGGING
+                               LDAP_LOG( CONFIG, INFO, "%s: line %d: "
+                                       "overlay keyword must appear inside a database "
+                                       "definition.\n", fname, lineno, 0 );
+#else
+                               Debug( LDAP_DEBUG_ANY, "%s: line %d: overlay keyword "
+                                       "must appear inside a database definition.\n",
+                                   fname, lineno, 0 );
+#endif
+                               return 1;
+
+                       } else if ( overlay_config( be, cargv[1] )) {
+                               return 1;
+                       }
+
                /* set database suffix */
                } else if ( strcasecmp( cargv[0], "suffix" ) == 0 ) {
                        Backend *tmp_be;
@@ -1728,23 +1745,36 @@ read_config( const char *fname, int depth )
                                ldap_syslog += atoi( cargv[1] );
                        }
 
-#ifdef LDAP_SYNCREPL
                /* list of sync replication information in this backend (slave only) */
                } else if ( strcasecmp( cargv[0], "syncrepl" ) == 0 ) {
 
-                       add_syncrepl( be, cargv, cargc );
+                       if ( be == NULL ) {
+#ifdef NEW_LOGGING
+                               LDAP_LOG( CONFIG, INFO, 
+                                           "%s: line %d: syncrepl line must appear inside "
+                                           "a database definition.\n", fname, lineno, 0);
+#else
+                               Debug( LDAP_DEBUG_ANY,
+                                           "%s: line %d: syncrepl line must appear inside "
+                                           "a database definition.\n", fname, lineno, 0);
 #endif
+                               return 1;
+                       } else {
+                               if ( add_syncrepl( be, cargv, cargc )) {
+                                       return 1;
+                               }
+                       }
 
                /* list of replicas of the data in this backend (master only) */
                } else if ( strcasecmp( cargv[0], "replica" ) == 0 ) {
                        if ( cargc < 2 ) {
 #ifdef NEW_LOGGING
                                LDAP_LOG( CONFIG, CRIT, 
-                                       "%s: line %d: missing host in \"replica "
+                                       "%s: line %d: missing host or uri in \"replica "
                                        " <host[:port]\" line\n", fname, lineno , 0 );
 #else
                                Debug( LDAP_DEBUG_ANY,
-           "%s: line %d: missing host in \"replica <host[:port]>\" line\n",
+           "%s: line %d: missing host or uri in \"replica <host[:port]>\" line\n",
                                    fname, lineno, 0 );
 #endif
 
@@ -1771,16 +1801,62 @@ read_config( const char *fname, int depth )
                                                nr = add_replica_info( be, 
                                                        cargv[i] + 5 );
                                                break;
+                                       } else if (strncasecmp( cargv[i], "uri=", 4 )
+                                           == 0 ) {
+                                           if ( ldap_url_parse( cargv[ i ] + 4, &ludp )
+                                               != LDAP_SUCCESS ) {
+#ifdef NEW_LOGGING
+                                                       LDAP_LOG( CONFIG, INFO, 
+                                                       "%s: line %d: replica line contains invalid "
+                                                       "uri definition.\n", fname, lineno, 0);
+#else
+                                                       Debug( LDAP_DEBUG_ANY,
+                                                       "%s: line %d: replica line contains invalid "
+                                                       "uri definition.\n", fname, lineno, 0);
+#endif
+                                                       return 1;
+                                               }
+                                               if (ludp->lud_host == NULL ) {
+#ifdef NEW_LOGGING
+                                                       LDAP_LOG( CONFIG, INFO, 
+                                                       "%s: line %d: replica line contains invalid "
+                                                       "uri definition - missing hostname.\n", 
+                                                       fname, lineno, 0);
+#else
+                                                       Debug( LDAP_DEBUG_ANY,
+                                                       "%s: line %d: replica line contains invalid "
+                                                       "uri definition - missing hostname.\n", fname, lineno, 0);
+#endif
+                                                       return 1;
+                                               }
+                                       replicahost = ch_malloc( strlen( cargv[ i ] ) );
+                                               if ( replicahost == NULL ) {
+#ifdef NEW_LOGGING
+                                                       LDAP_LOG( CONFIG, ERR, 
+                                                       "out of memory in read_config\n", 0, 0,0 );
+#else
+                                                       Debug( LDAP_DEBUG_ANY, 
+                                                       "out of memory in read_config\n", 0, 0, 0 );
+#endif
+                                                       ldap_free_urldesc( ludp );                              
+                                                       exit( EXIT_FAILURE );
+                                               }
+                                               sprintf(replicahost, "%s:%d", 
+                                                       ludp->lud_host, ludp->lud_port);
+                                               nr = add_replica_info( be, replicahost );
+                                               ldap_free_urldesc( ludp );                              
+                                               ch_free(replicahost);
+                                               break;
                                        }
                                }
                                if ( i == cargc ) {
 #ifdef NEW_LOGGING
                                        LDAP_LOG( CONFIG, INFO, 
-                                               "%s: line %d: missing host in \"replica\" line\n", 
+                                               "%s: line %d: missing host or uri in \"replica\" line\n", 
                                                fname, lineno , 0 );
 #else
                                        Debug( LDAP_DEBUG_ANY,
-                   "%s: line %d: missing host in \"replica\" line\n",
+                   "%s: line %d: missing host or uri in \"replica\" line\n",
                                            fname, lineno, 0 );
 #endif
                                        return 1;
@@ -2315,7 +2391,7 @@ read_config( const char *fname, int depth )
 #ifdef NEW_LOGGING
                                LDAP_LOG( CONFIG, INFO, 
                                        "%s: line %d: plugin line must appear "
-                                       "inside a database definition.\n",
+                                       "insid a database definition.\n",
                                        fname, lineno, 0 );
 #else
                                Debug( LDAP_DEBUG_ANY, "%s: line %d: plugin "
@@ -2668,8 +2744,7 @@ config_destroy( )
        acl_destroy( global_acl, NULL );
 }
 
-#ifdef LDAP_SYNCREPL
-static void
+static int
 add_syncrepl(
        Backend *be,
        char    **cargv,
@@ -2678,6 +2753,19 @@ add_syncrepl(
 {
        syncinfo_t *si;
 
+       if ( be->syncinfo ) {
+#ifdef NEW_LOGGING
+               LDAP_LOG( CONFIG, INFO, 
+                           "add_syncrepl: multiple syncrepl lines in a database "
+                               "definition are yet to be supported.\n", 0, 0, 0 );
+#else
+               Debug( LDAP_DEBUG_ANY,
+                           "add_syncrepl: multiple syncrepl lines in a database "
+                               "definition are yet to be supported.\n", 0, 0, 0 );
+#endif
+               return 1;
+       }
+
        si = be->syncinfo = (syncinfo_t *) ch_calloc( 1, sizeof( syncinfo_t ) );
 
        if ( si == NULL ) {
@@ -2686,9 +2774,34 @@ add_syncrepl(
 #else
                Debug( LDAP_DEBUG_ANY, "out of memory in add_syncrepl\n", 0, 0, 0 );
 #endif
-               exit( EXIT_FAILURE );
+               return 1;
        }
 
+       si->tls = TLS_OFF;
+       if ( be->be_rootndn.bv_val )
+               ber_dupbv( &si->updatedn, &be->be_rootndn );
+       si->bindmethod = LDAP_AUTH_SIMPLE;
+       si->schemachecking = 0;
+       si->filterstr = "(objectclass=*)";
+       if ( be->be_suffix && be->be_suffix[0].bv_val )
+               si->base = ch_strdup( be->be_suffix[0].bv_val );
+       si->scope = LDAP_SCOPE_SUBTREE;
+       si->attrsonly = 0;
+       si->attrs = (char **) ch_calloc( 1, sizeof( char * ));
+       si->attrs[0] = NULL;
+       si->type = LDAP_SYNC_REFRESH_ONLY;
+       si->interval = 86400;
+       si->syncCookie = NULL;
+       si->manageDSAit = 0;
+       si->tlimit = -1;
+       si->slimit = -1;
+       si->syncUUID = NULL;
+       si->syncUUID_ndn = NULL;
+       si->sync_mode = LDAP_SYNC_STATE_MODE;
+
+       si->presentlist = NULL;
+       LDAP_LIST_INIT( &si->nonpresentlist );
+
        if ( parse_syncrepl_line( cargv, cargc, si ) < 0 ) {
                /* Something bad happened - back out */
 #ifdef NEW_LOGGING
@@ -2698,37 +2811,65 @@ add_syncrepl(
 #endif
                free( si );
                be->syncinfo = NULL;
+               return 1;
        } else {
 #ifdef NEW_LOGGING
                LDAP_LOG ( CONFIG, RESULTS,
-                       "add_syncrepl: Config: ** successfully added syncrepl \"%s%d\"\n",
-                       si->mastername == NULL ? "(null)" : si->mastername,
-                       si->masterport, 0 );
+                       "add_syncrepl: Config: ** successfully added syncrepl \"%s\"\n",
+                       si->provideruri == NULL ? "(null)" : si->provideruri, 0, 0 );
 #else
                Debug( LDAP_DEBUG_CONFIG,
-                       "Config: ** successfully added syncrepl \"%s:%d\"\n",
-                       si->mastername == NULL ? "(null)" : si->mastername,
-                       si->masterport, 0 );
+                       "Config: ** successfully added syncrepl \"%s\"\n",
+                       si->provideruri == NULL ? "(null)" : si->provideruri, 0, 0 );
 #endif
+               if ( !si->schemachecking ) {
+                       be->be_flags |= SLAP_BFLAG_NO_SCHEMA_CHECK;
+               }
                si->be = be;
+               return 0;
        }
 }
 
+#define IDSTR                  "id"
+#define PROVIDERSTR            "provider"
+#define SUFFIXSTR              "suffix"
+#define UPDATEDNSTR            "updatedn"
+#define BINDMETHSTR            "bindmethod"
+#define SIMPLESTR              "simple"
+#define SASLSTR                        "sasl"
+#define BINDDNSTR              "binddn"
+#define CREDSTR                        "credentials"
+#define OLDAUTHCSTR            "bindprincipal"
+#define AUTHCSTR               "authcID"
+#define AUTHZSTR               "authzID"
+#define SRVTABSTR              "srvtab"
+#define SASLMECHSTR            "saslmech"
+#define REALMSTR               "realm"
+#define SECPROPSSTR            "secprops"
+#define STARTTLSSTR            "starttls"
+#define CRITICALSTR            "critical"
+
+#define SCHEMASTR              "schemachecking"
+#define FILTERSTR              "filter"
+#define SEARCHBASESTR  "searchbase"
+#define SCOPESTR               "scope"
+#define ATTRSSTR               "attrs"
+#define ATTRSONLYSTR   "attrsonly"
+#define TYPESTR                        "type"
+#define INTERVALSTR            "interval"
+#define COOKIESTR              "cookie"
+#define LASTMODSTR             "lastmod"
+#define LMREQSTR               "req"
+#define LMGENSTR               "gen"
+#define LMNOSTR                        "no"
+#define MANAGEDSAITSTR "manageDSAit"
+#define SLIMITSTR              "sizelimit"
+#define TLIMITSTR              "timelimit"
+
 #define GOT_ID                 0x0001
-#define GOT_HOST               0x0002
-#define GOT_DN                 0x0004
-#define GOT_METHOD             0x0008
-#define GOT_MECH               0x0010
-#define GOT_FILTER             0x0020
-#define GOT_SEARCHBASE 0x0040
-#define GOT_SCOPE              0x0080
-#define GOT_ATTRS              0x0100
-#define GOT_TYPE               0x0200
-#define GOT_INTERVAL   0x0400
-#define GOT_LASTMOD            0x0800
-#define GOT_UPDATEDN   0x1000
-
-#define GOT_ALL                        0x1FFF
+#define GOT_PROVIDER   0x0002
+#define GOT_METHOD             0x0004
+#define GOT_ALL                        0x0007
 
 static int
 parse_syncrepl_line(
@@ -2748,39 +2889,20 @@ parse_syncrepl_line(
                        val = cargv[ i ] + sizeof( IDSTR );
                        si->id = atoi( val );
                        gots |= GOT_ID;
-               } else if ( !strncasecmp( cargv[ i ], MASTERSTR,
-                                       sizeof( MASTERSTR ) - 1 )) {
-                       val = cargv[ i ] + sizeof( MASTERSTR );
-                       si->masteruri = ch_strdup( val );
-                       if (( hp = strchr( val, ':' )) != NULL ) {
-                               if ( *( hp + 1 ) == '/' ) {
-                                       if ( *( hp + 2 ) == '/' ) {
-                                               val = hp + 3;
-                                       }
-                                       if (( hp = strchr( hp+1, ':' )) != NULL ) {
-                                               *hp = '\0';
-                                               hp++;
-                                               si->masterport = atoi( hp );
-                                       }
-                               } else {
-                                       *hp = '\0';
-                                       hp++;
-                                       si->masterport = atoi( hp );
-                               }
-                       }
-                       if ( si->masterport <= 0 ) {
-                               si->masterport = 0;
-                       }
-                       si->mastername = ch_strdup( val );
-                       si->master_bv = (BerVarray) ch_calloc( 2, sizeof (struct berval ));
-                       ber_str2bv( si->masteruri, strlen(si->masteruri), 0,
-                                                       &si->master_bv[0] );
-                       si->master_bv[1].bv_len = 0;
-                       si->master_bv[1].bv_val = NULL;
-                       gots |= GOT_HOST;
-               } else if ( !strncasecmp( cargv[ i ], TLSSTR, sizeof( TLSSTR ) - 1 ) ) {
-                       val = cargv[ i ] + sizeof( TLSSTR );
-                       if( !strcasecmp( val, TLSCRITICALSTR ) ) {
+               } else if ( !strncasecmp( cargv[ i ], PROVIDERSTR,
+                                       sizeof( PROVIDERSTR ) - 1 )) {
+                       val = cargv[ i ] + sizeof( PROVIDERSTR );
+                       si->provideruri = ch_strdup( val );
+                       si->provideruri_bv = (BerVarray) ch_calloc( 2, sizeof( struct berval ));
+                       ber_str2bv( si->provideruri, strlen( si->provideruri ), 0, &si->provideruri_bv[0] );
+                       si->provideruri_bv[1].bv_len = 0;
+                       si->provideruri_bv[1].bv_val = NULL;
+                       gots |= GOT_PROVIDER;
+               } else if ( !strncasecmp( cargv[ i ], STARTTLSSTR,
+                       sizeof(STARTTLSSTR) - 1 ) )
+               {
+                       val = cargv[ i ] + sizeof( STARTTLSSTR );
+                       if( !strcasecmp( val, CRITICALSTR ) ) {
                                si->tls = TLS_CRITICAL;
                        } else {
                                si->tls = TLS_ON;
@@ -2795,12 +2917,6 @@ parse_syncrepl_line(
                        dnNormalize( 0, NULL, NULL, &updatedn, &si->updatedn, NULL );
                        ch_free( str );
                        ch_free( updatedn.bv_val );
-                       gots |= GOT_UPDATEDN;
-               } else if ( !strncasecmp( cargv[ i ],
-                               BINDDNSTR, sizeof( BINDDNSTR ) - 1 ) ) {
-                       val = cargv[ i ] + sizeof( BINDDNSTR );
-                       si->binddn = ch_strdup( val );
-                       gots |= GOT_DN;
                } else if ( !strncasecmp( cargv[ i ], BINDMETHSTR,
                                sizeof( BINDMETHSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( BINDMETHSTR );
@@ -2813,30 +2929,18 @@ parse_syncrepl_line(
                        } else {
                                si->bindmethod = -1;
                        }
-               } else if ( !strncasecmp( cargv[ i ], LASTMODSTR,
-                               sizeof( LASTMODSTR ) - 1 ) ) {
-                       val = cargv[ i ] + sizeof( LASTMODSTR );
-                       if ( !strcasecmp( val, LMREQSTR )) {
-                               si->lastmod = LASTMOD_REQ;
-                               gots |= GOT_LASTMOD;
-                       } else if ( !strcasecmp( val, LMGENSTR )) {
-                               si->lastmod = LASTMOD_GEN;
-                               gots |= GOT_LASTMOD;
-                       } else if ( !strcasecmp( val, LMNOSTR )) {
-                               si->lastmod = LASTMOD_NO;
-                               gots |= GOT_LASTMOD;
-                       } else {
-                               si->lastmod = -1;
-                       }
                } else if ( !strncasecmp( cargv[ i ],
-                               SASLMECHSTR, sizeof( SASLMECHSTR ) - 1 ) ) {
-                       val = cargv[ i ] + sizeof( SASLMECHSTR );
-                       gots |= GOT_MECH;
-                       si->saslmech = ch_strdup( val );
+                               BINDDNSTR, sizeof( BINDDNSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( BINDDNSTR );
+                       si->binddn = ch_strdup( val );
                } else if ( !strncasecmp( cargv[ i ],
                                CREDSTR, sizeof( CREDSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( CREDSTR );
                        si->passwd = ch_strdup( val );
+               } else if ( !strncasecmp( cargv[ i ],
+                               SASLMECHSTR, sizeof( SASLMECHSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( SASLMECHSTR );
+                       si->saslmech = ch_strdup( val );
                } else if ( !strncasecmp( cargv[ i ],
                                SECPROPSSTR, sizeof( SECPROPSSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( SECPROPSSTR );
@@ -2865,20 +2969,27 @@ parse_syncrepl_line(
                                free( si->srvtab );
                        }
                        si->srvtab = ch_strdup( val );
+               } else if ( !strncasecmp( cargv[ i ],
+                               SCHEMASTR, sizeof( SCHEMASTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( SCHEMASTR );
+                       if ( !strncasecmp( val, "on", sizeof( "on" ) - 1 )) {
+                               si->schemachecking = 1;
+                       } else if ( !strncasecmp( val, "off", sizeof( "off" ) - 1 ) ) {
+                               si->schemachecking = 0;
+                       } else {
+                               si->schemachecking = 1;
+                       }
                } else if ( !strncasecmp( cargv[ i ],
                                FILTERSTR, sizeof( FILTERSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( FILTERSTR );
-                       gots |= GOT_FILTER;
                        si->filterstr = ch_strdup( val );
                } else if ( !strncasecmp( cargv[ i ],
                                SEARCHBASESTR, sizeof( SEARCHBASESTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( SEARCHBASESTR );
-                       gots |= GOT_SEARCHBASE;
                        si->base = ch_strdup( val );
                } else if ( !strncasecmp( cargv[ i ],
                                SCOPESTR, sizeof( SCOPESTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( SCOPESTR );
-                       gots |= GOT_SCOPE;
                        if ( !strncasecmp( val, "base", sizeof( "base" ) - 1 )) {
                                si->scope = LDAP_SCOPE_BASE;
                        } else if ( !strncasecmp( val, "one", sizeof( "one" ) - 1 )) {
@@ -2896,17 +3007,13 @@ parse_syncrepl_line(
                } else if ( !strncasecmp( cargv[ i ],
                                ATTRSSTR, sizeof( ATTRSSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( ATTRSSTR );
-                       si->attrs = NULL;
-                       si->attrs = str2clist( si->attrs, val, "," );
-                       gots |= GOT_ATTRS;
+                       str2clist( &si->attrs, val, "," );
                } else if ( !strncasecmp( cargv[ i ],
                                TYPESTR, sizeof( TYPESTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( TYPESTR );
-                       gots |= GOT_TYPE;
                        if ( !strncasecmp( val, "refreshOnly", sizeof( "refreshOnly" ) - 1 )) {
                                si->type = LDAP_SYNC_REFRESH_ONLY;
                        } else if ( !strncasecmp( val, "refreshAndPersist", sizeof( "refreshAndPersist" ) - 1 )) {
-                               gots |= GOT_INTERVAL;
                                si->type = LDAP_SYNC_REFRESH_AND_PERSIST;
                                si->interval = 0;
                        } else {
@@ -2917,11 +3024,30 @@ parse_syncrepl_line(
                } else if ( !strncasecmp( cargv[ i ],
                                INTERVALSTR, sizeof( INTERVALSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( INTERVALSTR );
-                       gots |= GOT_INTERVAL;
-                       if ( gots & GOT_TYPE && si->type == LDAP_SYNC_REFRESH_AND_PERSIST )
+                       if ( si->type == LDAP_SYNC_REFRESH_AND_PERSIST ) {
                                si->interval = 0;
-                       else
-                               si->interval = atoi( val );
+                       } else {
+                               char *dstr;
+                               char *hstr;
+                               char *mstr;
+                               dstr = val;
+                               hstr = strchr( dstr, ':' );
+                               if ( hstr == NULL ) {
+                                       fprintf( stderr, "Error: parse_syncrepl_line: "
+                                                                        "invalid interval \"%s\"\n", val );
+                                       return 1;
+                               }
+                               *hstr++ = '\0';
+                               mstr = strchr( hstr, ':' );
+                               if ( mstr == NULL ) {
+                                       fprintf( stderr, "Error: parse_syncrepl_line: "
+                                                                        "invalid interval \"%s\"\n", val );
+                                       return 1;
+                               }
+                               *mstr++ = '\0';
+                               si->interval = (( atoi( dstr ) * 24 + atoi( hstr )) * 60
+                                                               + atoi( mstr )) * 60;
+                       }
                        if ( si->interval < 0 ) {
                                fprintf( stderr, "Error: parse_syncrepl_line: "
                                                                 "invalid interval \"%ld\"\n",
@@ -2932,22 +3058,24 @@ parse_syncrepl_line(
                                COOKIESTR, sizeof( COOKIESTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( COOKIESTR );
                        si->syncCookie = ber_str2bv( val, strlen( val ), 1, NULL );
+               } else if ( !strncasecmp( cargv[ i ],
+                               MANAGEDSAITSTR, sizeof( MANAGEDSAITSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( COOKIESTR );
+                       si->manageDSAit = atoi( val );
+               } else if ( !strncasecmp( cargv[ i ],
+                               SLIMITSTR, sizeof( SLIMITSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( SLIMITSTR );
+                       si->slimit = atoi( val );
+               } else if ( !strncasecmp( cargv[ i ],
+                               TLIMITSTR, sizeof( TLIMITSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( TLIMITSTR );
+                       si->tlimit = atoi( val );
                } else {
                        fprintf( stderr, "Error: parse_syncrepl_line: "
                                                         "unknown keyword \"%s\"\n", cargv[ i ] );
                }
        }
 
-       if ( si->bindmethod == LDAP_AUTH_SASL) {
-               if ((gots & GOT_MECH) == 0) {
-                       fprintf( stderr, "Error: \"syncrepl\" line needs SASLmech flag " 
-                                        "in slapd config file\n" );
-                       return -1;
-               }
-       }
-
-       gots |= GOT_MECH;
-
        if ( gots != GOT_ALL ) {
                fprintf( stderr, "Error: Malformed \"syncrepl\" line in slapd config file"
  );
@@ -2956,4 +3084,3 @@ parse_syncrepl_line(
 
        return 0;
 }
-#endif /* LDAP_SYNCREPL */
index ab899a5369403d6db387b609e240b04438f2663f..e7effae3468768ec2ce5adedc1c40733959c3cc3 100644 (file)
 #include "lutil.h"
 #include "slap.h"
 
+#ifdef LDAP_SLAPI
+#include "slapi.h"
+#endif
+
 /* protected by connections_mutex */
 static ldap_pvt_thread_mutex_t connections_mutex;
 static Connection *connections = NULL;
@@ -135,6 +139,9 @@ int connections_destroy(void)
                        ldap_pvt_thread_mutex_destroy( &connections[i].c_mutex );
                        ldap_pvt_thread_mutex_destroy( &connections[i].c_write_mutex );
                        ldap_pvt_thread_cond_destroy( &connections[i].c_write_cv );
+#ifdef LDAP_SLAPI
+                       slapi_x_free_object_extensions( SLAPI_X_EXT_CONNECTION, &connections[i] );
+#endif
                }
        }
 
@@ -453,6 +460,10 @@ long connection_init(
                ldap_pvt_thread_mutex_init( &c->c_write_mutex );
                ldap_pvt_thread_cond_init( &c->c_write_cv );
 
+#ifdef LDAP_SLAPI
+               slapi_x_create_object_extensions( SLAPI_X_EXT_CONNECTION, c );
+#endif
+
                c->c_struct_state = SLAP_C_UNUSED;
        }
 
@@ -681,6 +692,11 @@ connection_destroy( Connection *c )
 
     c->c_conn_state = SLAP_C_INVALID;
     c->c_struct_state = SLAP_C_UNUSED;
+
+#ifdef LDAP_SLAPI
+       /* call destructors, then constructors; avoids unnecessary allocation */
+       slapi_x_clear_object_extensions( SLAPI_X_EXT_CONNECTION, c );
+#endif
 }
 
 int connection_state_closing( Connection *c )
@@ -1069,22 +1085,12 @@ operations_error:
        LDAP_STAILQ_REMOVE( &conn->c_ops, op, slap_op, o_next);
        LDAP_STAILQ_NEXT(op, o_next) = NULL;
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
        if ( op->o_cancel == SLAP_CANCEL_ACK )
                goto co_op_free;
-#endif
-#ifdef LDAP_CLIENT_UPDATE
-       if ( ( op->o_clientupdate_type & SLAP_LCUP_PERSIST ) ) {
-               sl_mem_detach( ctx, memctx );
-               goto no_co_op_free;
-       }
-#endif
-#ifdef LDAP_SYNC
        if ( ( op->o_sync_mode & SLAP_SYNC_PERSIST ) ) {
                sl_mem_detach( ctx, memctx );
                goto no_co_op_free;
        }
-#endif
 
 co_op_free:
 
@@ -1465,22 +1471,29 @@ connection_input(
        op = slap_op_alloc( ber, msgid, tag, conn->c_n_ops_received++ );
 
        op->o_conn = conn;
-       op->vrFilter = NULL;
+       op->o_assertion = NULL;
+       op->o_preread_attrs = NULL;
+       op->o_postread_attrs = NULL;
+       op->o_vrFilter = NULL;
+
 #ifdef LDAP_CONTROL_PAGEDRESULTS
        op->o_pagedresults_state = conn->c_pagedresults_state;
 #endif
+
+       op->o_res_ber = NULL;
+
 #ifdef LDAP_CONNECTIONLESS
        if (conn->c_is_udp) {
-
                if ( cdn ) {
                    ber_str2bv( cdn, 0, 1, &op->o_dn );
                    op->o_protocol = LDAP_VERSION2;
                }
                op->o_res_ber = ber_alloc_t( LBER_USE_DER );
-               if (op->o_res_ber == NULL)
-                       return 1;
+               if (op->o_res_ber == NULL) return 1;
+
+               rc = ber_write( op->o_res_ber, (char *)&peeraddr,
+                       sizeof(struct sockaddr), 0 );
 
-               rc = ber_write(op->o_res_ber, (char *)&peeraddr, sizeof(struct sockaddr), 0);
                if (rc != sizeof(struct sockaddr)) {
 #ifdef NEW_LOGGING
                        LDAP_LOG( CONNECTION, INFO, 
@@ -1515,12 +1528,14 @@ connection_input(
         * use up all the available threads, and don't execute if we're
         * currently blocked on output. And don't execute if there are
         * already pending ops, let them go first.
+        *
+        * But always allow Abandon through; it won't cost much.
         */
-       if ( conn->c_conn_state == SLAP_C_BINDING
+       if ( tag != LDAP_REQ_ABANDON && (conn->c_conn_state == SLAP_C_BINDING
                || conn->c_conn_state == SLAP_C_CLOSING
                || conn->c_n_ops_executing >= connection_pool_max/2
                || conn->c_n_ops_pending
-               || conn->c_writewaiter)
+               || conn->c_writewaiter))
        {
                int max = conn->c_dn.bv_len ? slap_conn_max_pending_auth
                         : slap_conn_max_pending;
index c5eacd2029e87107062a57ef52f8edbc03016007..2a7806194ad1a6d02e9679900d1d3510626633d7 100644 (file)
 
 #include "../../libraries/liblber/lber-int.h"
 
+static SLAP_CTRL_PARSE_FN parseAssert;
+static SLAP_CTRL_PARSE_FN parsePreRead;
+static SLAP_CTRL_PARSE_FN parsePostRead;
 static SLAP_CTRL_PARSE_FN parseProxyAuthz;
 static SLAP_CTRL_PARSE_FN parseManageDSAit;
+static SLAP_CTRL_PARSE_FN parseModifyIncrement;
 static SLAP_CTRL_PARSE_FN parseNoOp;
 static SLAP_CTRL_PARSE_FN parsePagedResults;
 static SLAP_CTRL_PARSE_FN parseValuesReturnFilter;
@@ -30,40 +34,24 @@ static SLAP_CTRL_PARSE_FN parseDomainScope;
 #ifdef LDAP_CONTROL_SUBENTRIES
 static SLAP_CTRL_PARSE_FN parseSubentries;
 #endif
-#ifdef LDAP_CLIENT_UPDATE
-static SLAP_CTRL_PARSE_FN parseClientUpdate;
-#endif
-#ifdef LDAP_SYNC
-static SLAP_CTRL_PARSE_FN parseLdupSync;
-#endif
+static SLAP_CTRL_PARSE_FN parseLDAPsync;
 
 #undef sc_mask /* avoid conflict with Irix 6.5 <sys/signal.h> */
 
-static char *proxy_authz_extops[] = {
-       LDAP_EXOP_MODIFY_PASSWD,
-       LDAP_EXOP_X_WHO_AM_I,
-       NULL
-};
+const struct berval slap_pre_read_bv = BER_BVC(LDAP_CONTROL_PRE_READ);
+const struct berval slap_post_read_bv = BER_BVC(LDAP_CONTROL_POST_READ);
 
 struct slap_control {
-       /*
-        * Control OID
-        */
+       /* Control OID */
        char *sc_oid;
 
-       /*
-        * Operations supported by control
-        */
+       /* Operations supported by control */
        slap_mask_t sc_mask;
 
-       /*
-        * Extended operations supported by control
-        */
+       /* Extended operations supported by control */
        char **sc_extendedops;
 
-       /*
-        * Control parsing callback
-        */
+       /* Control parsing callback */
        SLAP_CTRL_PARSE_FN *sc_parse;
 
        LDAP_SLIST_ENTRY(slap_control) sc_next;
@@ -77,7 +65,22 @@ static LDAP_SLIST_HEAD(ControlsList, slap_control) controls_list
  */
 char **slap_known_controls = NULL;
 
+static char *proxy_authz_extops[] = {
+       LDAP_EXOP_MODIFY_PASSWD,
+       LDAP_EXOP_X_WHO_AM_I,
+       NULL
+};
+
 static struct slap_control control_defs[] = {
+       { LDAP_CONTROL_ASSERT,
+               SLAP_CTRL_ACCESS, NULL,
+               parseAssert, LDAP_SLIST_ENTRY_INITIALIZER(next) },
+       { LDAP_CONTROL_PRE_READ,
+               SLAP_CTRL_DELETE|SLAP_CTRL_MODIFY|SLAP_CTRL_RENAME, NULL,
+               parsePreRead, LDAP_SLIST_ENTRY_INITIALIZER(next) },
+       { LDAP_CONTROL_POST_READ,
+               SLAP_CTRL_ADD|SLAP_CTRL_MODIFY|SLAP_CTRL_RENAME, NULL,
+               parsePostRead, LDAP_SLIST_ENTRY_INITIALIZER(next) },
        { LDAP_CONTROL_VALUESRETURNFILTER,
                SLAP_CTRL_SEARCH, NULL,
                parseValuesReturnFilter, LDAP_SLIST_ENTRY_INITIALIZER(next) },
@@ -104,16 +107,12 @@ static struct slap_control control_defs[] = {
        { LDAP_CONTROL_NOOP,
                SLAP_CTRL_ACCESS, NULL,
                parseNoOp, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#ifdef LDAP_CLIENT_UPDATE
-       { LDAP_CONTROL_CLIENT_UPDATE,
-               SLAP_CTRL_HIDE|SLAP_CTRL_SEARCH, NULL,
-               parseClientUpdate, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#endif
-#ifdef LDAP_SYNC
        { LDAP_CONTROL_SYNC,
                SLAP_CTRL_HIDE|SLAP_CTRL_SEARCH, NULL,
-               parseLdupSync, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#endif
+               parseLDAPsync, LDAP_SLIST_ENTRY_INITIALIZER(next) },
+       { LDAP_CONTROL_MODIFY_INCREMENT,
+               SLAP_CTRL_MODIFY, NULL,
+               parseModifyIncrement, LDAP_SLIST_ENTRY_INITIALIZER(next) },
        { LDAP_CONTROL_MANAGEDSAIT,
                SLAP_CTRL_ACCESS, NULL,
                parseManageDSAit, LDAP_SLIST_ENTRY_INITIALIZER(next) },
@@ -644,6 +643,32 @@ return_results:
        return rs->sr_err;
 }
 
+static int parseModifyIncrement (
+       Operation *op,
+       SlapReply *rs,
+       LDAPControl *ctrl )
+{
+#if 0
+       if ( op->o_parseModifyIncrement != SLAP_NO_CONTROL ) {
+               rs->sr_text = "modifyIncrement control specified multiple times";
+               return LDAP_PROTOCOL_ERROR;
+       }
+#endif
+
+       if ( ctrl->ldctl_value.bv_len ) {
+               rs->sr_text = "modifyIncrement control value not empty";
+               return LDAP_PROTOCOL_ERROR;
+       }
+
+#if 0
+       op->o_parseModifyIncrement = ctrl->ldctl_iscritical
+               ? SLAP_CRITICAL_CONTROL
+               : SLAP_NONCRITICAL_CONTROL;
+#endif
+
+       return LDAP_SUCCESS;
+}
+
 static int parseManageDSAit (
        Operation *op,
        SlapReply *rs,
@@ -872,6 +897,167 @@ static int parsePagedResults (
 }
 #endif
 
+static int parseAssert (
+       Operation *op,
+       SlapReply *rs,
+       LDAPControl *ctrl )
+{
+       BerElement      *ber;
+       struct berval   fstr = { 0, NULL };
+       const char *err_msg = "";
+
+       if ( op->o_assert != SLAP_NO_CONTROL ) {
+               rs->sr_text = "assert control specified multiple times";
+               return LDAP_PROTOCOL_ERROR;
+       }
+
+       if ( ctrl->ldctl_value.bv_len == 0 ) {
+               rs->sr_text = "assert control value is empty (or absent)";
+               return LDAP_PROTOCOL_ERROR;
+       }
+
+       ber = ber_init( &(ctrl->ldctl_value) );
+       if (ber == NULL) {
+               rs->sr_text = "assert control: internal error";
+               return LDAP_OTHER;
+       }
+       
+       rs->sr_err = get_filter( op, ber, &(op->o_assertion), &rs->sr_text);
+
+       if( rs->sr_err != LDAP_SUCCESS ) {
+               if( rs->sr_err == SLAPD_DISCONNECT ) {
+                       rs->sr_err = LDAP_PROTOCOL_ERROR;
+                       send_ldap_disconnect( op, rs );
+                       rs->sr_err = SLAPD_DISCONNECT;
+               } else {
+                       send_ldap_result( op, rs );
+               }
+               if( op->o_assertion != NULL ) {
+                       filter_free_x( op, op->o_assertion );
+               }
+               return rs->sr_err;
+       }
+
+#ifdef LDAP_DEBUG
+       filter2bv_x( op, op->o_assertion, &fstr );
+
+#ifdef NEW_LOGGING
+       LDAP_LOG( OPERATION, ARGS, 
+               "parseAssert: conn %ld assert: %s\n", 
+               op->o_connid, fstr.bv_len ? fstr.bv_val : "empty" , 0 );
+#else
+       Debug( LDAP_DEBUG_ARGS, "parseAssert: conn %ld assert: %s\n",
+               op->o_connid, fstr.bv_len ? fstr.bv_val : "empty" , 0 );
+#endif
+       op->o_tmpfree( fstr.bv_val, op->o_tmpmemctx );
+#endif
+
+       op->o_assert = ctrl->ldctl_iscritical
+               ? SLAP_CRITICAL_CONTROL
+               : SLAP_NONCRITICAL_CONTROL;
+
+       rs->sr_err = LDAP_SUCCESS;
+       return LDAP_SUCCESS;
+}
+
+static int parsePreRead (
+       Operation *op,
+       SlapReply *rs,
+       LDAPControl *ctrl )
+{
+       ber_len_t siz, off, i;
+       AttributeName *an = NULL;
+       BerElement      *ber;
+
+       if ( op->o_preread != SLAP_NO_CONTROL ) {
+               rs->sr_text = "preread control specified multiple times";
+               return LDAP_PROTOCOL_ERROR;
+       }
+
+       if ( ctrl->ldctl_value.bv_len == 0 ) {
+               rs->sr_text = "preread control value is empty (or absent)";
+               return LDAP_PROTOCOL_ERROR;
+       }
+
+       ber = ber_init( &(ctrl->ldctl_value) );
+       if (ber == NULL) {
+               rs->sr_text = "preread control: internal error";
+               return LDAP_OTHER;
+       }
+
+       siz = sizeof( AttributeName );
+       off = 0;
+       if ( ber_scanf( ber, "{M}", &an, &siz, off ) == LBER_ERROR ) {
+               rs->sr_text = "preread control: decoding error";
+               return LDAP_PROTOCOL_ERROR;
+       }
+
+       for( i=0; i<siz; i++ ) {
+               const char *dummy;
+               an[i].an_desc = NULL;
+               an[i].an_oc = NULL;
+               slap_bv2ad( &an[i].an_name, &an[i].an_desc, &dummy );
+       }
+
+       op->o_preread = ctrl->ldctl_iscritical
+               ? SLAP_CRITICAL_CONTROL
+               : SLAP_NONCRITICAL_CONTROL;
+
+       op->o_preread_attrs = an;
+
+       rs->sr_err = LDAP_SUCCESS;
+       return LDAP_SUCCESS;
+}
+
+static int parsePostRead (
+       Operation *op,
+       SlapReply *rs,
+       LDAPControl *ctrl )
+{
+       ber_len_t siz, off, i;
+       AttributeName *an = NULL;
+       BerElement      *ber;
+
+       if ( op->o_postread != SLAP_NO_CONTROL ) {
+               rs->sr_text = "postread control specified multiple times";
+               return LDAP_PROTOCOL_ERROR;
+       }
+
+       if ( ctrl->ldctl_value.bv_len == 0 ) {
+               rs->sr_text = "postread control value is empty (or absent)";
+               return LDAP_PROTOCOL_ERROR;
+       }
+
+       ber = ber_init( &(ctrl->ldctl_value) );
+       if (ber == NULL) {
+               rs->sr_text = "postread control: internal error";
+               return LDAP_OTHER;
+       }
+
+       siz = sizeof( AttributeName );
+       off = 0;
+       if ( ber_scanf( ber, "{M}", &an, &siz, off ) == LBER_ERROR ) {
+               rs->sr_text = "postread control: decoding error";
+               return LDAP_PROTOCOL_ERROR;
+       }
+
+       for( i=0; i<siz; i++ ) {
+               const char *dummy;
+               an[i].an_desc = NULL;
+               an[i].an_oc = NULL;
+               slap_bv2ad( &an[i].an_name, &an[i].an_desc, &dummy );
+       }
+
+       op->o_postread = ctrl->ldctl_iscritical
+               ? SLAP_CRITICAL_CONTROL
+               : SLAP_NONCRITICAL_CONTROL;
+
+       op->o_postread_attrs = an;
+
+       rs->sr_err = LDAP_SUCCESS;
+       return LDAP_SUCCESS;
+}
+
 int parseValuesReturnFilter (
        Operation *op,
        SlapReply *rs,
@@ -897,7 +1083,7 @@ int parseValuesReturnFilter (
                return LDAP_OTHER;
        }
        
-       rs->sr_err = get_vrFilter( op, ber, &(op->vrFilter), &rs->sr_text);
+       rs->sr_err = get_vrFilter( op, ber, &(op->o_vrFilter), &rs->sr_text);
 
        if( rs->sr_err != LDAP_SUCCESS ) {
                if( rs->sr_err == SLAPD_DISCONNECT ) {
@@ -907,12 +1093,11 @@ int parseValuesReturnFilter (
                } else {
                        send_ldap_result( op, rs );
                }
-               if( op->vrFilter != NULL) vrFilter_free( op, op->vrFilter ); 
-
+               if( op->o_vrFilter != NULL) vrFilter_free( op, op->o_vrFilter ); 
        }
 #ifdef LDAP_DEBUG
        else {
-               vrFilter2bv( op, op->vrFilter, &fstr );
+               vrFilter2bv( op, op->o_vrFilter, &fstr );
        }
 
 #ifdef NEW_LOGGING
@@ -1012,139 +1197,7 @@ static int parseDomainScope (
 }
 #endif
 
-#ifdef LDAP_CLIENT_UPDATE
-static int parseClientUpdate (
-       Operation *op,
-       SlapReply *rs,
-       LDAPControl *ctrl )
-{
-       ber_tag_t tag;
-       BerElement *ber;
-       ber_int_t type;
-       ber_int_t interval;
-       ber_len_t len;
-       struct berval scheme = { 0, NULL };
-       struct berval cookie = { 0, NULL };
-
-       if ( op->o_clientupdate != SLAP_NO_CONTROL ) {
-               rs->sr_text = "LCUP client update control specified multiple times";
-               return LDAP_PROTOCOL_ERROR;
-       }
-
-#ifdef LDAP_SYNC
-       if ( op->o_sync != SLAP_NO_CONTROL ) {
-               rs->sr_text = "LDAP Client Update and Sync controls used together";
-               return LDAP_PROTOCOL_ERROR;
-       }
-#endif
-
-       if ( ctrl->ldctl_value.bv_len == 0 ) {
-               rs->sr_text = "LCUP client update control value is empty (or absent)";
-               return LDAP_PROTOCOL_ERROR;
-       }
-
-       /* Parse the control value
-        *      ClientUpdateControlValue ::= SEQUENCE {
-        *              updateType      ENUMERATED {
-        *                                      synchronizeOnly {0},
-        *                                      synchronizeAndPersist {1},
-        *                                      persistOnly {2} },
-        *              sendCookieInterval INTEGER OPTIONAL,
-        *              cookie          LCUPCookie OPTIONAL
-        *      }
-        */
-
-       ber = ber_init( &ctrl->ldctl_value );
-       if( ber == NULL ) {
-               rs->sr_text = "internal error";
-               return LDAP_OTHER;
-       }
-
-       if ( (tag = ber_scanf( ber, "{i" /*}*/, &type )) == LBER_ERROR ) {
-               rs->sr_text = "LCUP client update control : decoding error";
-               return LDAP_PROTOCOL_ERROR;
-       }
-
-       switch( type ) {
-       case LDAP_CUP_SYNC_ONLY:
-               type = SLAP_LCUP_SYNC;
-               break;
-       case LDAP_CUP_SYNC_AND_PERSIST:
-               type = SLAP_LCUP_SYNC_AND_PERSIST;
-               break;
-       case LDAP_CUP_PERSIST_ONLY:
-               type = SLAP_LCUP_PERSIST;
-               break;
-       default:
-               rs->sr_text = "LCUP client update control : unknown update type";
-               return LDAP_PROTOCOL_ERROR;
-       }
-
-       if ( (tag = ber_peek_tag( ber, &len )) == LBER_DEFAULT ) {
-               rs->sr_text = "LCUP client update control : decoding error";
-               return LDAP_PROTOCOL_ERROR;
-       }
-
-       if ( tag == LDAP_CUP_TAG_INTERVAL ) {
-               if ( (tag = ber_scanf( ber, "i", &interval )) == LBER_ERROR ) {
-                       rs->sr_text = "LCUP client update control : decoding error";
-                       return LDAP_PROTOCOL_ERROR;
-               }
-               
-               if ( interval <= 0 ) {
-                       /* server chooses interval */
-                       interval = LDAP_CUP_DEFAULT_SEND_COOKIE_INTERVAL;
-               }
-
-       } else {
-               /* server chooses interval */
-               interval = LDAP_CUP_DEFAULT_SEND_COOKIE_INTERVAL;
-       }
-
-       if ( (tag = ber_peek_tag( ber, &len )) == LBER_DEFAULT ) {
-               rs->sr_text = "LCUP client update control : decoding error";
-               return LDAP_PROTOCOL_ERROR;
-       }
-
-       if ( tag == LDAP_CUP_TAG_COOKIE ) {
-               if ( (tag = ber_scanf( ber, /*{*/ "{mm}}",
-                       &scheme, &cookie )) == LBER_ERROR )
-               {
-                       rs->sr_text = "LCUP client update control : decoding error";
-                       return LDAP_PROTOCOL_ERROR;
-               }
-       }
-
-       /* TODO : Cookie Scheme Validation */
-#if 0
-       if ( lcup_cookie_scheme_validate(scheme) != LDAP_SUCCESS ) {
-               rs->sr_text = "Unsupported LCUP cookie scheme";
-               return LCUP_UNSUPPORTED_SCHEME;
-       }
-
-       if ( lcup_cookie_validate(scheme, cookie) != LDAP_SUCCESS ) {
-               rs->sr_text = "Invalid LCUP cookie";
-               return LCUP_INVALID_COOKIE;
-       }
-#endif
-
-       ber_dupbv( &op->o_clientupdate_state, &cookie );
-
-       (void) ber_free( ber, 1 );
-
-       op->o_clientupdate_type = (char) type;
-       op->o_clientupdate_interval = interval;
-
-       op->o_clientupdate = ctrl->ldctl_iscritical
-               ? SLAP_CRITICAL_CONTROL
-               : SLAP_NONCRITICAL_CONTROL;
-
-       return LDAP_SUCCESS;
-}
-#endif
-
-#ifdef LDAP_SYNC
-static int parseLdupSync (
+static int parseLDAPsync (
        Operation *op,
        SlapReply *rs,
        LDAPControl *ctrl )
@@ -1160,13 +1213,6 @@ static int parseLdupSync (
                return LDAP_PROTOCOL_ERROR;
        }
 
-#ifdef LDAP_CLIENT_UPDATE
-       if ( op->o_clientupdate != SLAP_NO_CONTROL ) {
-               rs->sr_text = "LDAP Sync and LDAP Client Update controls used together";
-               return LDAP_PROTOCOL_ERROR;
-       }
-#endif
-
        if ( ctrl->ldctl_value.bv_len == 0 ) {
                rs->sr_text = "LDAP Sync control value is empty (or absent)";
                return LDAP_PROTOCOL_ERROR;
@@ -1224,19 +1270,6 @@ static int parseLdupSync (
                cookie.bv_val = NULL;
        }
 
-       /* TODO : Cookie Scheme Validation */
-#if 0
-       if ( lcup_cookie_scheme_validate(scheme) != LDAP_SUCCESS ) {
-               rs->sr_text = "Unsupported LCUP cookie scheme";
-               return LCUP_UNSUPPORTED_SCHEME;
-       }
-
-       if ( lcup_cookie_validate(scheme, cookie) != LDAP_SUCCESS ) {
-               rs->sr_text = "Invalid LCUP cookie";
-               return LCUP_INVALID_COOKIE;
-       }
-#endif
-
        ber_dupbv( &op->o_sync_state, &cookie );
 
        (void) ber_free( ber, 1 );
@@ -1249,4 +1282,3 @@ static int parseLdupSync (
 
        return LDAP_SUCCESS;
 }
-#endif
diff --git a/servers/slapd/ctxcsn.c b/servers/slapd/ctxcsn.c
new file mode 100644 (file)
index 0000000..bcf7a4f
--- /dev/null
@@ -0,0 +1,203 @@
+/* $OpenLDAP$ */
+/*
+ * Context CSN Management Routines
+ */
+/* Copyright (c) 2003 by International Business Machines, Inc.
+ *
+ * International Business Machines, Inc. (hereinafter called IBM) grants
+ * permission under its copyrights to use, copy, modify, and distribute this
+ * Software with or without fee, provided that the above copyright notice and
+ * all paragraphs of this notice appear in all copies, and that the name of IBM
+ * not be used in connection with the marketing of any product incorporating
+ * the Software or modifications thereof, without specific, written prior
+ * permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
+ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
+ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include "portable.h"
+
+#include <stdio.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+#include <db.h>
+
+#include "ldap_pvt.h"
+#include "lutil.h"
+#include "slap.h"
+#include "lutil_ldap.h"
+
+struct berval *
+slap_get_commit_csn( Operation *op )
+{
+       struct berval *max_committed_csn = NULL;
+       struct slap_csn_entry *csne = NULL, *committed_csne = NULL;
+       int i = 0;
+
+       ldap_pvt_thread_mutex_lock( &op->o_bd->be_pcl_mutex );
+
+       LDAP_TAILQ_FOREACH( csne, &op->o_bd->be_pending_csn_list, csn_link ) {
+               if ( csne->opid == op->o_opid && csne->connid == op->o_connid )
+                       break;
+       }
+
+       if ( csne ) {
+               csne->state = SLAP_CSN_COMMIT;
+       }
+
+       LDAP_TAILQ_FOREACH( csne, &op->o_bd->be_pending_csn_list, csn_link ) {
+               if ( csne->state == SLAP_CSN_COMMIT )
+                       committed_csne = csne;
+               if ( csne->state == SLAP_CSN_PENDING )
+                       break;
+       }
+
+       ldap_pvt_thread_mutex_unlock( &op->o_bd->be_pcl_mutex );
+
+       if ( committed_csne ) {
+               max_committed_csn = ber_dupbv( NULL, committed_csne->csn );
+       }
+
+       return max_committed_csn;
+}
+
+void
+slap_rewind_commit_csn( Operation *op )
+{
+       struct slap_csn_entry *csne = NULL;
+
+       ldap_pvt_thread_mutex_lock( &op->o_bd->be_pcl_mutex );
+
+       LDAP_TAILQ_FOREACH( csne, &op->o_bd->be_pending_csn_list, csn_link ) {
+               if ( csne->opid == op->o_opid && csne->connid == op->o_connid )
+                       break;
+       }
+
+       if ( csne ) {
+               csne->state = SLAP_CSN_PENDING;
+       }
+       
+       ldap_pvt_thread_mutex_unlock( &op->o_bd->be_pcl_mutex );
+}
+
+void
+slap_graduate_commit_csn( Operation *op )
+{
+       struct slap_csn_entry *csne = NULL;
+
+       ldap_pvt_thread_mutex_lock( &op->o_bd->be_pcl_mutex );
+
+       LDAP_TAILQ_FOREACH( csne, &op->o_bd->be_pending_csn_list, csn_link ) {
+               if ( csne->opid == op->o_opid && csne->connid == op->o_connid )
+                       break;
+       }
+
+       if ( csne ) {
+               LDAP_TAILQ_REMOVE( &op->o_bd->be_pending_csn_list, csne, csn_link );
+               ch_free( csne->csn->bv_val );
+               ch_free( csne->csn );
+               ch_free( csne );
+       }
+
+       ldap_pvt_thread_mutex_unlock( &op->o_bd->be_pcl_mutex );
+
+       return;
+}
+
+static struct berval ocbva[] = {
+       BER_BVC("top"),
+       BER_BVC("subentry"),
+       BER_BVC("syncProviderSubentry"),
+       {0,NULL}
+};
+
+Entry *
+slap_create_context_csn_entry(
+       Backend *be,
+       struct berval *context_csn
+)
+{
+       Entry* e;
+       int rc;
+
+       struct berval bv;
+
+       e = ( Entry * ) ch_calloc( 1, sizeof( Entry ));
+
+       attr_merge( e, slap_schema.si_ad_objectClass, ocbva, NULL );
+
+       bv.bv_val = "subentry";
+       bv.bv_len = sizeof("subentry")-1;
+
+       attr_merge_one( e, slap_schema.si_ad_structuralObjectClass, &bv, NULL );
+
+       attr_merge_one( e, slap_schema.si_ad_cn, &slap_ldapsync_bv, NULL );
+
+       if ( context_csn ) {
+               attr_merge_one( e, slap_schema.si_ad_contextCSN,
+                       context_csn, NULL );
+       }
+
+       bv.bv_val = "{}";
+       bv.bv_len = sizeof("{}")-1;
+       attr_merge_one( e, slap_schema.si_ad_subtreeSpecification, &bv, NULL );
+
+       build_new_dn( &e->e_name, &be->be_nsuffix[0], &slap_ldapsync_cn_bv );
+       ber_dupbv( &e->e_nname, &e->e_name );
+
+       return e;
+}
+
+static int
+slap_contextcsn_callback(
+       Operation* op,
+       SlapReply* rs
+)
+{
+       if ( rs->sr_type != REP_SEARCH ) {
+               *((int*)op->o_callback->sc_private) = 0;
+       } else {
+               *((int*)op->o_callback->sc_private) = 1;
+       }
+       return LDAP_SUCCESS;
+}
+
+int
+slap_get_csn(
+       Operation *op,
+       char *csnbuf,
+       int     len,
+       struct berval *csn,
+       int manage_ctxcsn
+)
+{
+       struct  slap_csn_entry *pending;
+
+       if ( manage_ctxcsn ) {
+               pending = (struct slap_csn_entry *) ch_calloc( 1, sizeof( struct slap_csn_entry ));
+       }
+
+       if ( csn == NULL )
+               return LDAP_OTHER;
+
+       csn->bv_len = lutil_csnstr( csnbuf, len, 0, 0 );
+       csn->bv_val = csnbuf;
+
+       if ( manage_ctxcsn ) {
+               ldap_pvt_thread_mutex_lock( &op->o_bd->be_pcl_mutex );
+               pending->csn = ber_dupbv( NULL, csn );
+               pending->connid = op->o_connid;
+               pending->opid = op->o_opid;
+               pending->state = SLAP_CSN_PENDING;
+               LDAP_TAILQ_INSERT_TAIL( &op->o_bd->be_pending_csn_list, pending, csn_link );
+               ldap_pvt_thread_mutex_unlock( &op->o_bd->be_pcl_mutex );
+       }
+
+       return LDAP_SUCCESS;
+}
index a361be936afc9bdac4f583d3107073e9a17317a9..d83974becef47da5ef7651388d59a186f4d3e467 100644 (file)
@@ -20,9 +20,7 @@
 #include "lutil.h"
 #include "slap.h"
 
-#ifdef LDAP_SYNCREPL
 #include "ldap_rq.h"
-#endif
 
 #ifdef HAVE_TCPD
 #include <tcpd.h>
@@ -70,6 +68,7 @@ do { if (w) tcp_write( wake_sds[1], "0", 1 ); } while(0)
 static
 #endif
 volatile sig_atomic_t slapd_shutdown = 0, slapd_gentle_shutdown = 0;
+volatile sig_atomic_t slapd_abrupt_shutdown = 0;
 
 static struct slap_daemon {
        ldap_pvt_thread_mutex_t sd_mutex;
@@ -731,15 +730,21 @@ static int slap_open_listener(
 
        psal = sal;
        while ( *sal != NULL ) {
+               char *af;
                switch( (*sal)->sa_family ) {
                case AF_INET:
+                       af = "IPv4";
+                       break;
 #ifdef LDAP_PF_INET6
                case AF_INET6:
+                       af = "IPv6";
+                       break;
 #endif
 #ifdef LDAP_PF_LOCAL
                case AF_LOCAL:
-#endif
+                       af = "Local";
                        break;
+#endif
                default:
                        sal++;
                        continue;
@@ -752,12 +757,12 @@ static int slap_open_listener(
                        int err = sock_errno();
 #ifdef NEW_LOGGING
                        LDAP_LOG( CONNECTION, ERR, 
-                               "slap_open_listener: socket() failed errno=%d (%s)\n",
-                               err, sock_errstr(err), 0 );
+                               "slap_open_listener: %s socket() failed errno=%d (%s)\n",
+                               af, err, sock_errstr(err) );
 #else
                        Debug( LDAP_DEBUG_ANY,
-                               "daemon: socket() failed errno=%d (%s)\n", err,
-                               sock_errstr(err), 0 );
+                               "daemon: %s socket() failed errno=%d (%s)\n",
+                               af, err, sock_errstr(err) );
 #endif
                        sal++;
                        continue;
@@ -770,8 +775,8 @@ static int slap_open_listener(
                                "great %ld\n", (long)l.sl_sd, (long)dtblsize, 0 );
 #else
                        Debug( LDAP_DEBUG_ANY,
-                              "daemon: listener descriptor %ld is too great %ld\n",
-                              (long) l.sl_sd, (long) dtblsize, 0 );
+                               "daemon: listener descriptor %ld is too great %ld\n",
+                               (long) l.sl_sd, (long) dtblsize, 0 );
 #endif
                        tcp_close( l.sl_sd );
                        sal++;
@@ -788,7 +793,7 @@ static int slap_open_listener(
                        /* enable address reuse */
                        tmp = 1;
                        rc = setsockopt( l.sl_sd, SOL_SOCKET, SO_REUSEADDR,
-                                        (char *) &tmp, sizeof(tmp) );
+                               (char *) &tmp, sizeof(tmp) );
                        if ( rc == AC_SOCKET_ERROR ) {
                                int err = sock_errno();
 #ifdef NEW_LOGGING
@@ -1250,11 +1255,9 @@ slapd_daemon_task(
                struct timeval          tv;
                struct timeval          *tvp;
 
-#ifdef LDAP_SYNCREPL
                struct timeval          *cat;
                time_t                          tdelta = 1;
                struct re_s*            rtask;
-#endif
                now = slap_get_time();
 
                if( ( global_idletimeout > 0 ) &&
@@ -1334,9 +1337,15 @@ slapd_daemon_task(
                                 ldap_pvt_runqueue_persistent_backload( &syncrepl_rq );
                }
 
-               tvp = at ? &tv : NULL;
+               if ( at 
+#if defined(HAVE_YIELDING_SELECT) || defined(NO_THREADS)
+                       &&  ( tv.tv_sec || tv.tv_usec )
+#endif
+                       )
+                       tvp = &tv;
+               else
+                       tvp = NULL;
 
-#ifdef LDAP_SYNCREPL
                ldap_pvt_thread_mutex_lock( &syncrepl_rq.rq_mutex );
                rtask = ldap_pvt_runqueue_next_sched( &syncrepl_rq, &cat );
                while ( cat && cat->tv_sec && cat->tv_sec <= now ) {
@@ -1364,7 +1373,6 @@ slapd_daemon_task(
                                tvp = &tv;
                        }
                }
-#endif
 
                for ( l = 0; slap_listeners[l] != NULL; l++ ) {
                        if ( slap_listeners[l]->sl_sd == AC_SOCKET_INVALID ||
@@ -1944,6 +1952,7 @@ slapd_daemon_task(
        slap_listeners = NULL;
 
        if( !slapd_gentle_shutdown ) {
+               slapd_abrupt_shutdown = 1;
                connections_shutdown();
        }
 
@@ -2068,19 +2077,19 @@ slap_sig_shutdown( int sig )
         * SIGBREAK is generated when a user logs out.
         */
 
+#if 0
 #if HAVE_NT_SERVICE_MANAGER && SIGBREAK
        if (is_NT_Service && sig == SIGBREAK)
-#if 0
 #ifdef NEW_LOGGING
            LDAP_LOG( CONNECTION, CRIT,
                    "slap_sig_shutdown: SIGBREAK ignored.\n", 0, 0, 0 );
 #else
            Debug(LDAP_DEBUG_TRACE, "slap_sig_shutdown: SIGBREAK ignored.\n",
                  0, 0, 0);
-#endif
 #endif
        else
 #endif
+#endif
 #ifdef SIGHUP
        if (sig == SIGHUP && global_gentlehup && slapd_gentle_shutdown == 0)
                slapd_gentle_shutdown = 1;
index 6f39f82e7158163512e48431155fae2ca456beb6..7c46560c4e1b27a982918782fee53e1fac44de87 100644 (file)
@@ -25,6 +25,8 @@
 #include "ldap_pvt.h"
 #include "slap.h"
 
+#include "lutil.h"
+
 #ifdef LDAP_SLAPI
 #include "slapi.h"
 #endif
@@ -190,14 +192,19 @@ do_delete(
        if ( op->o_bd->be_delete ) {
                /* do the update here */
                int repl_user = be_isupdate( op->o_bd, &op->o_ndn );
-#if defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
+#ifndef SLAPD_MULTIMASTER
                if ( !op->o_bd->syncinfo && ( !op->o_bd->be_update_ndn.bv_len || repl_user ))
-#elif defined(LDAP_SYNCREPL) && defined(SLAPD_MULTIMASTER)
-               if ( !op->o_bd->syncinfo )  /* LDAP_SYNCREPL overrides MM */
-#elif !defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
-               if ( !op->o_bd->be_update_ndn.bv_len || repl_user )
+#else
+               if ( !op->o_bd->syncinfo )
 #endif
                {
+
+                       if ( !repl_user ) {
+                               struct berval csn = { 0 , NULL };
+                               char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
+                               slap_get_csn( op, csnbuf, sizeof(csnbuf), &csn, 1 );
+                       }
+
                        if ( (op->o_bd->be_delete)( op, rs ) == 0 ) {
 #ifdef SLAPD_MULTIMASTER
                                if ( !op->o_bd->be_update_ndn.bv_len || !repl_user )
@@ -206,15 +213,12 @@ do_delete(
                                        replog( op );
                                }
                        }
-#if defined(LDAP_SYNCREPL) || !defined(SLAPD_MULTIMASTER)
+#ifndef SLAPD_MULTIMASTER
                } else {
                        BerVarray defref = NULL;
-#ifdef LDAP_SYNCREPL
                        if ( op->o_bd->syncinfo ) {
-                               defref = op->o_bd->syncinfo->master_bv;
-                       } else
-#endif
-                       {
+                               defref = op->o_bd->syncinfo->provideruri_bv;
+                       } else {
                                defref = op->o_bd->be_update_refs
                                                ? op->o_bd->be_update_refs : default_referral;
                        }
@@ -252,6 +256,9 @@ do_delete(
 #endif /* defined( LDAP_SLAPI ) */
 
 cleanup:
+
+       slap_graduate_commit_csn( op );
+
        op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx );
        op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
        return rs->sr_err;
index f147f518ab0b95ff8d73847e6881fc41b538fcde..be518eec58d58a8d9db1d0706d2f2515a121311a 100644 (file)
@@ -454,7 +454,11 @@ dnPretty(
                }
        }
 
+#ifdef NEW_LOGGING
+       LDAP_LOG( OPERATION, ARGS, "<<< dnPretty: <%s>\n", out->bv_val, 0, 0 );
+#else
        Debug( LDAP_DEBUG_TRACE, "<<< dnPretty: <%s>\n", out->bv_val, 0, 0 );
+#endif
 
        return LDAP_SUCCESS;
 }
index b853d7a27d213ff6f3644ba46ae1c2ef7cea64bc..a39adb40bb916c297eb5133bcf9ad555d687677a 100644 (file)
@@ -81,7 +81,7 @@ static struct {
 #ifdef HAVE_TLS
        { &slap_EXOP_START_TLS, 0, starttls_extop },
 #endif
-       { NULL, NULL }
+       { NULL, 0, NULL }
 };
 
 
@@ -242,35 +242,7 @@ do_extended(
 #endif
 
 #if defined(LDAP_SLAPI)
-       if (ext != NULL) { /* OpenLDAP extended operation */
-#endif /* defined(LDAP_SLAPI) */
-
-               if (reqdata.bv_val) op->ore_reqdata = &reqdata;
-               rs->sr_err = (ext->ext_main)( op, rs );
-
-               if( rs->sr_err != SLAPD_ABANDON ) {
-                       if ( rs->sr_err == LDAP_REFERRAL && rs->sr_ref == NULL ) {
-                               rs->sr_ref = referral_rewrite( default_referral,
-                                       NULL, NULL, LDAP_SCOPE_DEFAULT );
-                       }
-
-                       send_ldap_extended( op, rs );
-
-                       ber_bvarray_free( rs->sr_ref );
-               }
-
-               if ( rs->sr_rspoid != NULL ) {
-                       free( (char *)rs->sr_rspoid );
-               }
-
-               if ( rs->sr_rspdata != NULL ) {
-                       ber_bvfree( rs->sr_rspdata );
-               }
-
-#if defined( LDAP_SLAPI )
-               goto done;  /* end of OpenLDAP extended operation */
-
-       } else { /* start of Netscape extended operation */
+       if ( funcAddr != NULL ) {
                rs->sr_err = slapi_pblock_set( pb, SLAPI_EXT_OP_REQ_OID,
                                (void *)op->ore_reqoid.bv_val);
                if ( rs->sr_err != LDAP_SUCCESS ) {
@@ -329,9 +301,32 @@ done2:;
                if ( rs->sr_rspdata != NULL ) {
                        ber_bvfree( rs->sr_rspdata );
                }
-
-       } /* end of Netscape extended operation */
+       } else { /* start of OpenLDAP extended operation */
 #endif /* defined( LDAP_SLAPI ) */
+               if (reqdata.bv_val) op->ore_reqdata = &reqdata;
+               rs->sr_err = (ext->ext_main)( op, rs );
+
+               if( rs->sr_err != SLAPD_ABANDON ) {
+                       if ( rs->sr_err == LDAP_REFERRAL && rs->sr_ref == NULL ) {
+                               rs->sr_ref = referral_rewrite( default_referral,
+                                       NULL, NULL, LDAP_SCOPE_DEFAULT );
+                       }
+
+                       send_ldap_extended( op, rs );
+
+                       ber_bvarray_free( rs->sr_ref );
+               }
+
+               if ( rs->sr_rspoid != NULL ) {
+                       free( (char *)rs->sr_rspoid );
+               }
+
+               if ( rs->sr_rspdata != NULL ) {
+                       ber_bvfree( rs->sr_rspdata );
+               }
+#ifdef LDAP_SLAPI
+       } /* end of OpenLDAP extended operation */
+#endif /* LDAP_SLAPI */
 
 done:
        return rs->sr_err;
index 6176244710e32527874e8b39d4f7c21431655533..f21065908fd8a4e2ce1f934fdbf21a8ff3b15026 100644 (file)
@@ -26,3 +26,6 @@ const struct berval slap_unknown_bv = BER_BVC("unknown");
 const struct berval slap_true_bv = BER_BVC("TRUE");
 const struct berval slap_false_bv = BER_BVC("FALSE");
 
+/* ldapsync items */
+const struct berval slap_ldapsync_bv = BER_BVC("ldapsync");
+const struct berval slap_ldapsync_cn_bv = BER_BVC("cn=ldapsync");
index a9031b6f6ba50ab118664daf682d9218faa9b304..c1dcae2a8a7d1b4c411dce19d0e7cf4ee0292d97 100644 (file)
@@ -15,6 +15,9 @@
 
 #include "slap.h"
 #include "lber_pvt.h"
+#ifdef LDAP_SLAPI
+#include "slapi.h"
+#endif
 
 /*
  * read-only global variables or variables only written by the listener
@@ -141,6 +144,7 @@ slap_init( int mode, const char *name )
                        if( rc == 0 ) {
                                rc = backend_init( );
                        }
+
                        break;
 
                default:
@@ -174,12 +178,26 @@ int slap_startup( Backend *be )
 
        rc = backend_startup( be );
 
+#ifdef LDAP_SLAPI
+       if( rc == 0 ) {
+               Slapi_PBlock *pb = slapi_pblock_new();
+
+               if ( doPluginFNs( NULL, SLAPI_PLUGIN_START_FN, pb ) < 0 ) {
+                       rc = -1;
+               }
+               slapi_pblock_destroy( pb );
+       }
+#endif /* LDAP_SLAPI */
+
        return rc;
 }
 
 int slap_shutdown( Backend *be )
 {
        int rc;
+#ifdef LDAP_SLAPI
+       Slapi_PBlock *pb;
+#endif
 
 #ifdef NEW_LOGGING
        LDAP_LOG( OPERATION, CRIT, 
@@ -196,6 +214,12 @@ int slap_shutdown( Backend *be )
        /* let backends do whatever cleanup they need to do */
        rc = backend_shutdown( be ); 
 
+#ifdef LDAP_SLAPI
+       pb = slapi_pblock_new( );
+       (void) doPluginFNs( NULL, SLAPI_PLUGIN_CLOSE_FN, pb );
+       slapi_pblock_destroy( pb );
+#endif /* LDAP_SLAPI */
+
        return rc;
 }
 
index ea41382b9ae95507c589fd3c77ba9b6f7b584243..61dc82e12186bb0210fdedbaf51460e4b5c37de8 100644 (file)
@@ -373,12 +373,6 @@ int main( int argc, char **argv )
        }
 #endif
 
-       if ( slap_init( serverMode, serverName ) != 0 ) {
-               rc = 1;
-               SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 18 );
-               goto destroy;
-       }
-
        if ( slap_schema_init( ) != 0 ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, CRIT, "main: schema initialization error\n", 0, 0, 0 );
@@ -391,6 +385,12 @@ int main( int argc, char **argv )
                goto destroy;
        }
 
+       if ( slap_init( serverMode, serverName ) != 0 ) {
+               rc = 1;
+               SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 18 );
+               goto destroy;
+       }
+
        if ( slap_controls_init( ) != 0 ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, CRIT, "main: controls initialization error\n", 0, 0, 0 );
index 39cb6426bb8efd85440900b3ca94e4f9dd117524..b92c4d1cb2072b7f2c3580674161958da16969e3 100644 (file)
@@ -67,7 +67,7 @@ filter_matched_values(
        Debug( LDAP_DEBUG_FILTER, "=> filter_matched_values\n", 0, 0, 0 );
 #endif
 
-       for ( vrf = op->vrFilter; vrf != NULL; vrf = vrf->vrf_next ) {
+       for ( vrf = op->o_vrFilter; vrf != NULL; vrf = vrf->vrf_next ) {
                switch ( vrf->vrf_choice ) {
                case SLAPD_FILTER_COMPUTED:
 #ifdef NEW_LOGGING
index 1405ca9c7201c0d5aca34333748160195efa7ff7..ac412159c136b3d8288c5c8099558885a8c22990 100644 (file)
@@ -50,6 +50,7 @@ do_modify(
        Slapi_PBlock *pb = op->o_pb;
 #endif
        int manageDSAit;
+       int increment = 0;
 
 #ifdef NEW_LOGGING
        LDAP_LOG( OPERATION, ENTRY, "do_modify: enter\n", 0, 0, 0 );
@@ -147,14 +148,53 @@ do_modify(
                case LDAP_MOD_REPLACE:
                        break;
 
+               case LDAP_MOD_INCREMENT:
+                       if( op->o_protocol >= LDAP_VERSION3 ) {
+                               increment++;
+                               if ( mod->sml_values == NULL ) {
+#ifdef NEW_LOGGING
+                                       LDAP_LOG( OPERATION, ERR, "do_modify: "
+                                               "modify/increment operation (%ld) requires value\n",
+                                               (long)mop, 0, 0 );
+#else
+                                       Debug( LDAP_DEBUG_ANY, "do_modify: "
+                                               "modify/increment operation (%ld) requires value\n",
+                                               (long) mop, 0, 0 );
+#endif
+
+                                       send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR,
+                                               "modify/increment operation requires value" );
+                                       goto cleanup;
+                               }
+
+                               if( mod->sml_values[1].bv_val ) {
+#ifdef NEW_LOGGING
+                                       LDAP_LOG( OPERATION, ERR, "do_modify: modify/increment "
+                                               "operation (%ld) requires single value\n",
+                                               (long)mop, 0, 0 );
+#else
+                                       Debug( LDAP_DEBUG_ANY, "do_modify: modify/increment "
+                                               "operation (%ld) requires single value\n",
+                                               (long) mop, 0, 0 );
+#endif
+
+                                       send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR,
+                                               "modify/increment operation requires single value" );
+                                       goto cleanup;
+                               }
+
+                               break;
+                       }
+                       /* fall thru */
+
                default: {
 #ifdef NEW_LOGGING
                                LDAP_LOG( OPERATION, ERR, 
-                                       "do_modify: invalid modify operation (%ld)\n",
+                                       "do_modify: unrecognized modify operation (%ld)\n",
                                        (long)mop, 0, 0 );
 #else
                                Debug( LDAP_DEBUG_ANY,
-                                       "do_modify: invalid modify operation (%ld)\n",
+                                       "do_modify: unrecognized modify operation (%ld)\n",
                                        (long) mop, 0, 0 );
 #endif
 
@@ -227,9 +267,10 @@ do_modify(
        for ( tmp = modlist; tmp != NULL; tmp = tmp->sml_next ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, DETAIL1, "\t%s:  %s\n", 
-                       tmp->sml_op == LDAP_MOD_ADD ?
-                       "add" : (tmp->sml_op == LDAP_MOD_DELETE ?
-                       "delete" : "replace"), tmp->sml_type.bv_val, 0 );
+                       tmp->sml_op == LDAP_MOD_ADD ? "add" :
+                               (tmp->sml_op == LDAP_MOD_INCREMENT ? "increment" :
+                                       (tmp->sml_op == LDAP_MOD_DELETE ? "delete" :
+                                               "replace")), tmp->sml_type.bv_val, 0 );
 
                if ( tmp->sml_values == NULL ) {
                        LDAP_LOG( OPERATION, DETAIL1, "\t\tno values", 0, 0, 0 );
@@ -243,9 +284,10 @@ do_modify(
 
 #else
                Debug( LDAP_DEBUG_ARGS, "\t%s: %s\n",
-                       tmp->sml_op == LDAP_MOD_ADD
-                               ? "add" : (tmp->sml_op == LDAP_MOD_DELETE
-                                       ? "delete" : "replace"), tmp->sml_type.bv_val, 0 );
+                       tmp->sml_op == LDAP_MOD_ADD ? "add" :
+                               (tmp->sml_op == LDAP_MOD_INCREMENT ? "increment" :
+                               (tmp->sml_op == LDAP_MOD_DELETE ? "delete" :
+                                       "replace")), tmp->sml_type.bv_val, 0 );
 
                if ( tmp->sml_values == NULL ) {
                        Debug( LDAP_DEBUG_ARGS, "%s\n",
@@ -311,7 +353,7 @@ do_modify(
                        if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
                } else {
                        send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
-                                       "referral missing" );
+                               "referral missing" );
                }
                goto cleanup;
        }
@@ -327,6 +369,12 @@ do_modify(
                goto cleanup;
        }
 
+       /* check for modify/increment support */
+       if( increment && !SLAP_INCREMENT( op->o_bd ) ) {
+               send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
+                       "modify/increment not supported in context" );
+       }
+
 #if defined( LDAP_SLAPI )
        slapi_x_pblock_set_operation( pb, op );
        slapi_pblock_set( pb, SLAPI_MODIFY_TARGET, (void *)dn.bv_val );
@@ -374,12 +422,14 @@ do_modify(
         * attribute types were included in the modification request,
         * then slapi_x_ldapmods2modifications() above will return
         * NULL).
+        *
+        * However, the post-operation plugin should still be 
+        * called.
         */
        if ( modlist == NULL ) {
                rs->sr_err = LDAP_SUCCESS;
                send_ldap_result( op, rs );
-               goto cleanup;
-       }
+       } else {
 #endif /* defined( LDAP_SLAPI ) */
 
        /*
@@ -395,13 +445,11 @@ do_modify(
                /* Multimaster slapd does not have to check for replicator dn
                 * because it accepts each modify request
                 */
-#if defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
+#ifndef SLAPD_MULTIMASTER
                if ( !op->o_bd->syncinfo &&
-                               ( !op->o_bd->be_update_ndn.bv_len || repl_user ))
-#elif defined(LDAP_SYNCREPL) && defined(SLAPD_MULTIMASTER)
-               if ( !op->o_bd->syncinfo )  /* LDAP_SYNCREPL overrides MM */
-#elif !defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
-               if ( !op->o_bd->be_update_ndn.bv_len || repl_user )
+                       ( !op->o_bd->be_update_ndn.bv_len || repl_user ))
+#else
+               if ( !op->o_bd->syncinfo )
 #endif
                {
                        int update = op->o_bd->be_update_ndn.bv_len;
@@ -442,16 +490,13 @@ do_modify(
                                replog( op );
                        }
 
-#if defined(LDAP_SYNCREPL) || !defined(SLAPD_MULTIMASTER)
+#ifndef SLAPD_MULTIMASTER
                /* send a referral */
                } else {
                        BerVarray defref = NULL;
-#ifdef LDAP_SYNCREPL
                        if ( op->o_bd->syncinfo ) {
-                               defref = op->o_bd->syncinfo->master_bv;
-                       } else
-#endif
-                       {
+                               defref = op->o_bd->syncinfo->provideruri_bv;
+                       } else {
                                defref = op->o_bd->be_update_refs
                                                ? op->o_bd->be_update_refs : default_referral;
                        }
@@ -478,6 +523,8 @@ do_modify(
        }
 
 #if defined( LDAP_SLAPI )
+       } /* modlist != NULL */
+
        if ( doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_MODIFY_FN, pb ) < 0 ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, INFO, "do_modify: modify postoperation plugins "
@@ -490,6 +537,9 @@ do_modify(
 #endif /* defined( LDAP_SLAPI ) */
 
 cleanup:
+
+       slap_graduate_commit_csn( op );
+
        op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx );
        op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
        if ( modlist != NULL ) slap_mods_free( modlist );
@@ -568,7 +618,9 @@ int slap_mods_check(
                }
 
                if ( is_at_obsolete( ad->ad_type ) &&
-                       ( ml->sml_op == LDAP_MOD_ADD || ml->sml_values != NULL ) )
+                       (( ml->sml_op != LDAP_MOD_REPLACE &&
+                               ml->sml_op != LDAP_MOD_DELETE ) ||
+                                       ml->sml_values != NULL ))
                {
                        /*
                         * attribute is obsolete,
@@ -581,6 +633,22 @@ int slap_mods_check(
                        return LDAP_CONSTRAINT_VIOLATION;
                }
 
+               if ( ml->sml_op == LDAP_MOD_INCREMENT &&
+#ifdef SLAPD_REAL_SYNTAX
+                       !is_at_syntax( ad->ad_type, SLAPD_REAL_SYNTAX ) &&
+#endif
+                       !is_at_syntax( ad->ad_type, SLAPD_INTEGER_SYNTAX ) )
+               {
+                       /*
+                        * attribute values must be INTEGER or REAL
+                        */
+                       snprintf( textbuf, textlen,
+                               "%s: attribute syntax inappropriate for increment",
+                               ml->sml_type.bv_val );
+                       *text = textbuf;
+                       return LDAP_CONSTRAINT_VIOLATION;
+               }
+
                /*
                 * check values
                 */
@@ -643,6 +711,14 @@ int slap_mods_check(
                                return LDAP_CONSTRAINT_VIOLATION;
                        }
 
+                       /* if the type has a normalizer, generate the
+                        * normalized values. otherwise leave them NULL.
+                        *
+                        * this is different from the rule for attributes
+                        * in an entry - in an attribute list, the normalized
+                        * value is set equal to the non-normalized value
+                        * when there is no normalizer.
+                        */
                        if( nvals && ad->ad_type->sat_equality &&
                                ad->ad_type->sat_equality->smr_normalize )
                        {
@@ -675,8 +751,6 @@ int slap_mods_check(
 
                                ml->sml_nvalues[nvals].bv_val = NULL;
                                ml->sml_nvalues[nvals].bv_len = 0;
-
-                       } else {
                        }
                }
        }
@@ -703,7 +777,7 @@ int slap_mods_opattrs(
        assert( modtail != NULL );
        assert( *modtail == NULL );
 
-       if( SLAP_LASTMOD(op->o_bd) ) {
+       if ( SLAP_LASTMOD( op->o_bd )) {
                struct tm *ltm;
                time_t now = slap_get_time();
 
@@ -711,9 +785,9 @@ int slap_mods_opattrs(
                ltm = gmtime( &now );
                lutil_gentime( timebuf, sizeof(timebuf), ltm );
 
-               csn.bv_len = lutil_csnstr( csnbuf, sizeof( csnbuf ), 0, 0 );
+               slap_get_csn( op, csnbuf, sizeof(csnbuf), &csn, 1 );
+
                ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
-               csn.bv_val = csnbuf;
 
                timestamp.bv_val = timebuf;
                timestamp.bv_len = strlen(timebuf);
@@ -734,9 +808,7 @@ int slap_mods_opattrs(
                if( global_schemacheck ) {
                        int rc = mods_structural_class( mods, &tmpval,
                                text, textbuf, textlen );
-                       if( rc != LDAP_SUCCESS ) {
-                               return rc;
-                       }
+                       if( rc != LDAP_SUCCESS ) return rc;
 
                        mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
                        mod->sml_op = mop;
@@ -758,7 +830,7 @@ int slap_mods_opattrs(
                        modtail = &mod->sml_next;
                }
 
-               if( SLAP_LASTMOD(op->o_bd) ) {
+               if ( SLAP_LASTMOD( op->o_bd )) {
                        char uuidbuf[ LDAP_LUTIL_UUIDSTR_BUFSIZE ];
 
                        tmpval.bv_len = lutil_uuidstr( uuidbuf, sizeof( uuidbuf ) );
@@ -769,7 +841,7 @@ int slap_mods_opattrs(
                        mod->sml_type.bv_val = NULL;
                        mod->sml_desc = slap_schema.si_ad_entryUUID;
                        mod->sml_values =
-                               (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
+                       (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
                        ber_dupbv( &mod->sml_values[0], &tmpval );
                        mod->sml_values[1].bv_len = 0;
                        mod->sml_values[1].bv_val = NULL;
@@ -811,7 +883,7 @@ int slap_mods_opattrs(
                }
        }
 
-       if( SLAP_LASTMOD(op->o_bd) ) {
+       if ( SLAP_LASTMOD( op->o_bd )) {
                mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
                mod->sml_op = mop;
                mod->sml_type.bv_val = NULL;
index 3f542adb4b81e1ed9a561a6fb8470bab5692fe7e..f780dd3aa26ee2f1479ef4b518f27ad2e5d7d150 100644 (file)
@@ -353,13 +353,11 @@ do_modrdn(
        if ( op->o_bd->be_modrdn ) {
                /* do the update here */
                int repl_user = be_isupdate( op->o_bd, &op->o_ndn );
-#if defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
+#ifndef SLAPD_MULTIMASTER
                if ( !op->o_bd->syncinfo &&
                                        ( !op->o_bd->be_update_ndn.bv_len || repl_user ))
-#elif defined(LDAP_SYNCREPL) && defined(SLAPD_MULTIMASTER)
-               if ( !op->o_bd->syncinfo )  /* LDAP_SYNCREPL overrides MM */
-#elif !defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
-               if ( !op->o_bd->be_update_ndn.bv_len || repl_user )
+#else
+               if ( !op->o_bd->syncinfo )
 #endif
                {
                        op->orr_deleteoldrdn = deloldrdn;
@@ -370,15 +368,12 @@ do_modrdn(
                        ) {
                                replog( op );
                        }
-#if defined(LDAP_SYNCREPL) || !defined(SLAPD_MULTIMASTER)
+#ifndef SLAPD_MULTIMASTER
                } else {
                        BerVarray defref = NULL;
-#ifdef LDAP_SYNCREPL
                        if ( op->o_bd->syncinfo ) {
-                               defref = op->o_bd->syncinfo->master_bv;
-                       } else
-#endif
-                       {
+                               defref = op->o_bd->syncinfo->provideruri_bv;
+                       } else {
                                defref = op->o_bd->be_update_refs
                                                ? op->o_bd->be_update_refs : default_referral;
                        }
@@ -416,6 +411,9 @@ do_modrdn(
 #endif /* defined( LDAP_SLAPI ) */
 
 cleanup:
+
+       slap_graduate_commit_csn( op );
+
        op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx );
        op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
 
@@ -438,11 +436,15 @@ slap_modrdn2mods(
        Modifications   **pmod )
 {
        Modifications   *mod = NULL;
+       Modifications   **modtail = &mod;
        int             a_cnt, d_cnt;
+       int repl_user;
 
        assert( new_rdn != NULL );
        assert( !op->orr_deleteoldrdn || old_rdn != NULL );
 
+       repl_user = be_isupdate( op->o_bd, &op->o_ndn );
+
        /* Add new attribute values to the entry */
        for ( a_cnt = 0; new_rdn[a_cnt]; a_cnt++ ) {
                AttributeDescription    *desc = NULL;
@@ -578,6 +580,21 @@ slap_modrdn2mods(
        }
        
 done:
+
+       if ( !repl_user ) {
+               char textbuf[ SLAP_TEXT_BUFLEN ];
+               size_t textlen = sizeof textbuf;
+
+               for( modtail = &mod;
+                       *modtail != NULL;
+                       modtail = &(*modtail)->sml_next )
+               {
+                       /* empty */
+               }
+
+               rs->sr_err = slap_mods_opattrs( op, mod, modtail, &rs->sr_text, textbuf, textlen );
+       }
+
        /* LDAP v2 supporting correct attribute handling. */
        if ( rs->sr_err != LDAP_SUCCESS && mod != NULL ) {
                Modifications *tmp;
index e097e44b8ccf59c83c84ebdbb7a8ece4cd8765e2..02d4bcb207883a7fe5daddb40b5731d1fc092447 100644 (file)
@@ -16,6 +16,8 @@
 
 #include "portable.h"
 
+#include <ac/string.h>
+
 #include "slap.h"
 
 int
@@ -40,8 +42,7 @@ modify_add_values(
        Modification    *mod,
        int     permissive,
        const char      **text,
-       char *textbuf, size_t textlen
-)
+       char *textbuf, size_t textlen )
 {
        int             i, j;
        int             matched;
@@ -176,8 +177,8 @@ modify_add_values(
 
                } else {
                        rc = modify_check_duplicates( mod->sm_desc, mr,
-                                       a ? a->a_vals : NULL, mod->sm_bvalues,
-                                       permissive, text, textbuf, textlen );
+                               a ? a->a_vals : NULL, mod->sm_bvalues,
+                               permissive, text, textbuf, textlen );
 
                        if ( permissive && rc == LDAP_TYPE_OR_VALUE_EXISTS ) {
                                return LDAP_SUCCESS;
@@ -190,8 +191,7 @@ modify_add_values(
        }
 
        /* no - add them */
-       if( attr_merge( e, mod->sm_desc, mod->sm_values, mod->sm_nvalues ) != 0 )
-       {
+       if( attr_merge( e, mod->sm_desc, mod->sm_values, mod->sm_nvalues ) != 0 ) {
                /* this should return result of attr_merge */
                *text = textbuf;
                snprintf( textbuf, textlen,
@@ -263,8 +263,7 @@ modify_delete_values(
 
        for ( i = 0; mod->sm_values[i].bv_val != NULL; i++ ) {
                int     found = 0;
-               for ( j = 0; a->a_vals[j].bv_val != NULL; j++ )
-               {
+               for ( j = 0; a->a_vals[j].bv_val != NULL; j++ ) {
                        int match;
 
                        if( mod->sm_nvalues ) {
@@ -312,7 +311,6 @@ modify_delete_values(
                        break;
                }
 
-
                if ( found == 0 ) {
                        *text = textbuf;
                        snprintf( textbuf, textlen,
@@ -324,8 +322,7 @@ modify_delete_values(
        }
 
        /* compact array skipping dummies */
-       for ( k = 0, j = 0; a->a_vals[k].bv_val != NULL; k++ )
-       {
+       for ( k = 0, j = 0; a->a_vals[k].bv_val != NULL; k++ ) {
                /* skip dummies */
                if( a->a_vals[k].bv_val == &dummy ) {
                        assert( a->a_nvals == NULL || a->a_nvals[k].bv_val == &dummy );
@@ -366,8 +363,7 @@ modify_replace_values(
        Modification    *mod,
        int             permissive,
        const char      **text,
-       char *textbuf, size_t textlen
-)
+       char *textbuf, size_t textlen )
 {
        (void) attr_delete( &e->e_attrs, mod->sm_desc );
 
@@ -378,11 +374,67 @@ modify_replace_values(
        return LDAP_SUCCESS;
 }
 
+int
+modify_increment_values(
+       Entry   *e,
+       Modification    *mod,
+       int     permissive,
+       const char      **text,
+       char *textbuf, size_t textlen )
+{
+       Attribute *a;
+
+       a = attr_find( e->e_attrs, mod->sm_desc );
+       if( a == NULL ) {
+               *text = textbuf;
+               snprintf( textbuf, textlen,
+                       "modify/increment: %s: no such attribute",
+                       mod->sm_desc->ad_cname.bv_val );
+               return LDAP_NO_SUCH_ATTRIBUTE;
+       }
+
+
+       if ( !strcmp( a->a_desc->ad_type->sat_syntax_oid, SLAPD_INTEGER_SYNTAX )) {
+               int i;
+               char str[sizeof(long)*3 + 2]; /* overly long */
+               long incr = atol( mod->sm_bvalues[0].bv_val );
+
+               /* treat zero and errors as a no-op */
+               if( incr == 0 ) {
+                       return LDAP_SUCCESS;
+               }
+
+               for( i=0; a->a_nvals[i].bv_val != NULL; i++ ) {
+                       char *tmp;
+                       long value = atol( a->a_nvals[i].bv_val );
+                       size_t strln = snprintf( str, sizeof(str), "%ld", value+incr );
+
+                       tmp = SLAP_REALLOC( a->a_nvals[i].bv_val, strln+1 );
+                       if( tmp == NULL ) {
+                               *text = "modify/increment: reallocation error";
+                               return LDAP_OTHER;;
+                       }
+                       a->a_nvals[i].bv_val = tmp;
+                       a->a_nvals[i].bv_len = strln;
+
+                       AC_MEMCPY( a->a_nvals[i].bv_val, str, strln+1 );
+               }
+
+       } else {
+               snprintf( textbuf, textlen,
+                       "modify/increment: %s: increment not supported for value syntax %s",
+                       mod->sm_desc->ad_cname.bv_val,
+                       a->a_desc->ad_type->sat_syntax_oid );
+               return LDAP_CONSTRAINT_VIOLATION;
+       }
+
+       return LDAP_SUCCESS;
+}
+
 void
 slap_mod_free(
        Modification    *mod,
-       int                             freeit
-)
+       int                             freeit )
 {
        if ( mod->sm_values != NULL ) ber_bvarray_free( mod->sm_values );
        mod->sm_values = NULL;
@@ -395,8 +447,7 @@ slap_mod_free(
 
 void
 slap_mods_free(
-    Modifications      *ml
-)
+    Modifications      *ml )
 {
        Modifications *next;
 
index 64e4c1188371bd188009df26002a1c0329530e50..9cb1592c88ea697b4958b52237d0915e858ca8ea 100644 (file)
@@ -40,13 +40,22 @@ module_loaded_t *module_list = NULL;
 
 static int module_unload (module_loaded_t *module);
 
+#ifdef HAVE_EBCDIC
+static char ebuf[BUFSIZ];
+#endif
+
 int module_init (void)
 {
        if (lt_dlinit()) {
                const char *error = lt_dlerror();
+#ifdef HAVE_EBCDIC
+               strcpy( ebuf, error );
+               __etoa( ebuf );
+               error = ebuf;
+#endif
 #ifdef NEW_LOGGING
                LDAP_LOG( SLAPD, CRIT, 
-                       "module_init: lt_ldinit failed: %s\n", error, 0, 0 );
+                       "module_init: lt_dlinit failed: %s\n", error, 0, 0 );
 #else
                Debug(LDAP_DEBUG_ANY, "lt_dlinit failed: %s\n", error, 0, 0);
 #endif
@@ -65,6 +74,11 @@ int module_kill (void)
 
        if (lt_dlexit()) {
                const char *error = lt_dlerror();
+#ifdef HAVE_EBCDIC
+               strcpy( ebuf, error );
+               __etoa( ebuf );
+               error = ebuf;
+#endif
 #ifdef NEW_LOGGING
                LDAP_LOG( SLAPD, CRIT, "module_kill: lt_dlexit failed: %s\n", 
                        error, 0, 0 );
@@ -83,6 +97,11 @@ int module_load(const char* file_name, int argc, char *argv[])
        const char *error;
        int rc;
        MODULE_INIT_FN initialize;
+#ifdef HAVE_EBCDIC
+#define        file    ebuf
+#else
+#define        file    file_name
+#endif
 
        module = (module_loaded_t *)ch_calloc(1, sizeof(module_loaded_t));
        if (module == NULL) {
@@ -97,19 +116,28 @@ int module_load(const char* file_name, int argc, char *argv[])
                return -1;
        }
 
+#ifdef HAVE_EBCDIC
+       strcpy( file, file_name );
+       __atoe( file );
+#endif
        /*
         * The result of lt_dlerror(), when called, must be cached prior
         * to calling Debug. This is because Debug is a macro that expands
         * into multiple function calls.
         */
-       if ((module->lib = lt_dlopen(file_name)) == NULL) {
+       if ((module->lib = lt_dlopenext(file)) == NULL) {
                error = lt_dlerror();
+#ifdef HAVE_EBCDIC
+               strcpy( ebuf, error );
+               __etoa( ebuf );
+               error = ebuf;
+#endif
 #ifdef NEW_LOGGING
                LDAP_LOG( SLAPD, CRIT, 
-                       "module_load: lt_dlopen failed: (%s) %s.\n", 
+                       "module_load: lt_dlopenext failed: (%s) %s.\n", 
                        file_name, error, 0 );
 #else
-               Debug(LDAP_DEBUG_ANY, "lt_dlopen failed: (%s) %s\n", file_name,
+               Debug(LDAP_DEBUG_ANY, "lt_dlopenext failed: (%s) %s\n", file_name,
                        error, 0);
 #endif
 
@@ -124,7 +152,13 @@ int module_load(const char* file_name, int argc, char *argv[])
 #endif
 
    
+#ifdef HAVE_EBCDIC
+#pragma convlit(suspend)
+#endif
        if ((initialize = lt_dlsym(module->lib, "init_module")) == NULL) {
+#ifdef HAVE_EBCDIC
+#pragma convlit(resume)
+#endif
 #ifdef NEW_LOGGING
                LDAP_LOG( SLAPD, ERR, 
                        "module_load: module %s : no init_module() function found\n",
@@ -217,11 +251,21 @@ int module_load(const char* file_name, int argc, char *argv[])
 
 int module_path(const char *path)
 {
+#ifdef HAVE_EBCDIC
+       strcpy(ebuf, path);
+       __atoe(ebuf);
+       path = ebuf;
+#endif
        return lt_dlsetsearchpath( path );
 }
 
 void *module_resolve (const void *module, const char *name)
 {
+#ifdef HAVE_EBCDIC
+       strcpy(ebuf, name);
+       __atoe(ebuf);
+       name = ebuf;
+#endif
        if (module == NULL || name == NULL)
                return(NULL);
        return(lt_dlsym(((module_loaded_t *)module)->lib, name));
@@ -246,7 +290,13 @@ static int module_unload (module_loaded_t *module)
                }
 
                /* call module's terminate routine, if present */
+#ifdef HAVE_EBCDIC
+#pragma convlit(suspend)
+#endif
                if ((terminate = lt_dlsym(module->lib, "term_module"))) {
+#ifdef HAVE_EBCDIC
+#pragma convlit(resume)
+#endif
                        terminate();
                }
 
index 95e28288b5882ab35f5b0b1596b94d8f410d9107..17d4e4efaaaca442b45782821dceace943d9523e 100644 (file)
@@ -65,21 +65,15 @@ slap_op_free( Operation *op )
                ber_free( op->o_res_ber, 1 );
        }
 #endif
-#ifdef LDAP_CLIENT_UPDATE
-       if ( op->o_clientupdate_state.bv_val != NULL ) {
-               free( op->o_clientupdate_state.bv_val );
-       }
-#endif
-#ifdef LDAP_SYNC
        if ( op->o_sync_state.bv_val != NULL ) {
                free( op->o_sync_state.bv_val );
        }
-#endif
 
 #if defined( LDAP_SLAPI )
        if ( op->o_pb != NULL ) {
                slapi_pblock_destroy( (Slapi_PBlock *)op->o_pb );
        }
+       slapi_x_free_object_extensions( SLAPI_X_EXT_OPERATION, op );
 #endif /* defined( LDAP_SLAPI ) */
 
        memset( op, 0, sizeof(Operation) );
@@ -113,12 +107,11 @@ slap_op_alloc(
 
        op->o_time = slap_get_time();
        op->o_opid = id;
-#ifdef LDAP_CONNECTIONLESS
        op->o_res_ber = NULL;
-#endif
 
 #if defined( LDAP_SLAPI )
        op->o_pb = slapi_pblock_new();
+       slapi_x_create_object_extensions( SLAPI_X_EXT_OPERATION, op );
 #endif /* defined( LDAP_SLAPI ) */
 
        return( op );
index b10bbe4b331820d24bc762198a4cba11e109509f..80241ecd14134717ec0e5ef6697920b92c65619a 100644 (file)
@@ -52,17 +52,14 @@ int passwd_extop(
                rs->sr_err = LDAP_OTHER;
 #endif
 
-#if defined(LDAP_SYNCREPL) || !defined(SLAPD_MULTIMASTER)
+#ifndef SLAPD_MULTIMASTER
        /* This does not apply to multi-master case */
        } else if( op->o_bd->be_update_ndn.bv_len ) {
                /* we SHOULD return a referral in this case */
                BerVarray defref = NULL;
-#ifdef LDAP_SYNCREPL
                if ( op->o_bd->syncinfo ) {
-                       defref = op->o_bd->syncinfo->master_bv;
-               } else
-#endif
-               {
+                       defref = op->o_bd->syncinfo->provideruri_bv;
+               } else {
                        defref = referral_rewrite( op->o_bd->be_update_refs,
                                NULL, NULL, LDAP_SCOPE_DEFAULT );
                }
index 5d378d991a9cfa658514c60c7a0c329821b0f990..47803caa77330f5407f346b8c330700dbbc7f977 100644 (file)
@@ -95,7 +95,10 @@ LDAP_SLAPD_F (MatchingRule *) ad_mr(
  * add.c
  */
 LDAP_SLAPD_F (int) slap_mods2entry LDAP_P(( Modifications *mods, Entry **e,
-       int repl_user, const char **text, char *textbuf, size_t textlen ));
+       int repl_user, int dup, const char **text, char *textbuf, size_t textlen ));
+
+LDAP_SLAPD_F (int) slap_entry2mods LDAP_P(( Entry *e,
+                                               Modifications **mods, const char **text ));
 
 /*
  * at.c
@@ -253,6 +256,13 @@ LDAP_SLAPD_F (Attribute *) backend_operational(
 LDAP_SLAPD_F (int) glue_back_initialize( BackendInfo *bi );
 LDAP_SLAPD_F (int) glue_sub_init( void );
 
+/*
+ * backover.c
+ */
+
+LDAP_SLAPD_F (int) overlay_register( slap_overinst *on );
+LDAP_SLAPD_F (int) overlay_config( BackendDB *be, const char *ov );
+
 /*
  * ch_malloc.c
  */
@@ -344,6 +354,16 @@ LDAP_SLAPD_F (ContentRule *) cr_find LDAP_P((
 LDAP_SLAPD_F (ContentRule *) cr_bvfind LDAP_P((
        struct berval *crname));
 
+/*
+ * ctxcsn.c
+ */
+
+LDAP_SLAPD_F (struct berval *) slap_get_commit_csn LDAP_P(( Operation * ));
+LDAP_SLAPD_F (void) slap_rewind_commit_csn LDAP_P(( Operation * ));
+LDAP_SLAPD_F (void) slap_graduate_commit_csn LDAP_P(( Operation * ));
+LDAP_SLAPD_F (Entry *) slap_create_context_csn_entry LDAP_P(( Backend *, struct berval *));
+LDAP_SLAPD_F (int) slap_get_csn LDAP_P(( Operation *, char *, int, struct berval *, int ));
+
 /*
  * daemon.c
  */
@@ -362,6 +382,8 @@ LDAP_SLAPD_F (void) slapd_clr_write LDAP_P((ber_socket_t s, int wake));
 LDAP_SLAPD_F (void) slapd_set_read LDAP_P((ber_socket_t s, int wake));
 LDAP_SLAPD_F (void) slapd_clr_read LDAP_P((ber_socket_t s, int wake));
 
+LDAP_SLAPD_V (volatile sig_atomic_t) slapd_abrupt_shutdown;
+
 /*
  * dn.c
  */
@@ -512,6 +534,8 @@ LDAP_SLAPD_V( const struct berval ) slap_empty_bv;
 LDAP_SLAPD_V( const struct berval ) slap_unknown_bv;
 LDAP_SLAPD_V( const struct berval ) slap_true_bv;
 LDAP_SLAPD_V( const struct berval ) slap_false_bv;
+LDAP_SLAPD_V( const struct berval ) slap_ldapsync_bv;
+LDAP_SLAPD_V( const struct berval ) slap_ldapsync_cn_bv;
 
 /*
  * index.c
@@ -609,6 +633,10 @@ LDAP_SLAPD_F( int ) modify_replace_values( Entry *e,
        Modification *mod,
        int permissive,
        const char **text, char *textbuf, size_t textlen );
+LDAP_SLAPD_F( int ) modify_increment_values( Entry *e,
+       Modification *mod,
+       int permissive,
+       const char **text, char *textbuf, size_t textlen );
 
 LDAP_SLAPD_F( void ) slap_mod_free( Modification *mod, int freeit );
 LDAP_SLAPD_F( void ) slap_mods_free( Modifications *mods );
@@ -708,6 +736,18 @@ LDAP_SLAPD_F (int) is_entry_objectclass LDAP_P((
        (((e)->e_ocflags & SLAP_OC__END) \
         ? (((e)->e_ocflags & SLAP_OC_DYNAMICOBJECT) != 0) \
         : is_entry_objectclass((e), slap_schema.si_oc_dynamicObject, 1))
+#define is_entry_glue(e)       \
+       (((e)->e_ocflags & SLAP_OC__END) \
+        ? (((e)->e_ocflags & SLAP_OC_GLUE) != 0) \
+        : is_entry_objectclass((e), slap_schema.si_oc_glue, 1))
+#define is_entry_syncProviderSubentry(e)       \
+       (((e)->e_ocflags & SLAP_OC__END) \
+        ? (((e)->e_ocflags & SLAP_OC_SYNCPROVIDERSUBENTRY) != 0) \
+        : is_entry_objectclass((e), slap_schema.si_oc_syncProviderSubentry, 1))
+#define is_entry_syncConsumerSubentry(e)       \
+       (((e)->e_ocflags & SLAP_OC__END) \
+        ? (((e)->e_ocflags & SLAP_OC_SYNCCONSUMERSUBENTRY) != 0) \
+        : is_entry_objectclass((e), slap_schema.si_oc_syncConsumerSubentry, 1))
 
 LDAP_SLAPD_F (int) oc_schema_info( Entry *e );
 
@@ -816,6 +856,11 @@ LDAP_SLAPD_F (void) slap_send_search_result LDAP_P(( Operation *op, SlapReply *r
 LDAP_SLAPD_F (int) slap_send_search_reference LDAP_P(( Operation *op, SlapReply *rs ));
 LDAP_SLAPD_F (int) slap_send_search_entry LDAP_P(( Operation *op, SlapReply *rs ));
 
+LDAP_SLAPD_V( const struct berval ) slap_pre_read_bv;
+LDAP_SLAPD_V( const struct berval ) slap_post_read_bv;
+LDAP_SLAPD_F (int) slap_read_controls LDAP_P(( Operation *op, SlapReply *rs,
+       Entry *e, const struct berval *oid, LDAPControl **ctrl ));
+
 LDAP_SLAPD_F (int) str2result LDAP_P(( char *s,
        int *code, char **matched, char **info ));
 
@@ -1127,14 +1172,25 @@ LDAP_SLAPD_F (int) do_extended LDAP_P((Operation *op, SlapReply *rs));
  * syncrepl
  */
 
-#ifdef LDAP_SYNCREPL
 LDAP_SLAPD_V (struct runqueue_s) syncrepl_rq;
 
 LDAP_SLAPD_F (void) init_syncrepl LDAP_P(());
 LDAP_SLAPD_F (void*) do_syncrepl LDAP_P((void *, void *));
-
-LDAP_SLAPD_F (char **) str2clist( char **, char *, const char * );
-#endif
+LDAP_SLAPD_F (int) ldap_sync_search LDAP_P((
+                                                       syncinfo_t *, LDAP *, LDAPControl **, LDAPControl **, int *));
+LDAP_SLAPD_F (Entry*) syncrepl_message_to_entry LDAP_P((
+                                                       syncinfo_t *, LDAP *, Operation *, LDAPMessage *,
+                                                       Modifications **, int*, struct berval *, struct berval * ));
+LDAP_SLAPD_F (int) syncrepl_entry LDAP_P((
+                                                       syncinfo_t *, LDAP *, Operation*, Entry*,
+                                                       Modifications*,int, struct berval*, struct berval*, int ));
+LDAP_SLAPD_F (void) syncrepl_updateCookie LDAP_P((
+                                                       syncinfo_t *, LDAP *, Operation *, struct berval *,
+                                                       struct berval * ));
+LDAP_SLAPD_F (char **) str2clist LDAP_P(( char ***, char *, const char * ));
+
+LDAP_SLAPD_F (void)  syncrepl_add_glue LDAP_P(( syncinfo_t *, LDAP *, Operation*, Entry*,
+                                                       Modifications*, int, struct berval*, struct berval* ));
 
 LDAP_END_DECL
 
index 77dbe9dafc559fe61619f2b53a39781b463ca3d7..807cb8a92f9dcba960cf03040a3da78b72ceb645 100644 (file)
@@ -285,7 +285,9 @@ replog1(
                        if ( ri && ri->ri_attrs ) {
                                int is_in = ad_inlist( ml->sml_desc, ri->ri_attrs );
 
-                               if ( ( !is_in && !ri->ri_exclude ) || ( is_in && ri->ri_exclude ) ) {
+                               if ( ( !is_in && !ri->ri_exclude )
+                                       || ( is_in && ri->ri_exclude ) )
+                               {
                                        continue;
                                }
                        }
@@ -302,9 +304,14 @@ replog1(
                        case LDAP_MOD_REPLACE:
                                fprintf( fp, "replace: %s\n", type );
                                break;
+
+                       case LDAP_MOD_INCREMENT:
+                               fprintf( fp, "increment: %s\n", type );
+                               break;
                        }
-                       if ( ml->sml_bvalues )
+                       if ( ml->sml_bvalues ) {
                                print_vals( fp, &ml->sml_desc->ad_cname, ml->sml_bvalues );
+                       }
                        fprintf( fp, "-\n" );
                }
                break;
index 6e8ee40ab1738b62611d30b2b6dfc6a4d0d554e3..c4311df7363513904964028e15ba06d5444a5a44 100644 (file)
@@ -218,7 +218,7 @@ send_ldap_controls( BerElement *ber, LDAPControl **c )
        return rc;
 }
 
-static void
+void
 send_ldap_response(
        Operation *op,
        SlapReply *rs )
@@ -229,8 +229,8 @@ send_ldap_response(
        long    bytes;
 
        if (op->o_callback && op->o_callback->sc_response) {
-               op->o_callback->sc_response( op, rs );
-               return;
+               rc = op->o_callback->sc_response( op, rs );
+               if ( rc != SLAP_CB_CONTINUE ) return;
        }
                
 #ifdef LDAP_CONNECTIONLESS
@@ -449,11 +449,13 @@ slap_send_ldap_result( Operation *op, SlapReply *rs )
 #ifdef NEW_LOGGING
        LDAP_LOG( OPERATION, ARGS, 
                "send_ldap_result: err=%d matched=\"%s\" text=\"%s\"\n",
-               rs->sr_err, rs->sr_matched ? rs->sr_matched : "", rs->sr_text ? rs->sr_text : "" );
+               rs->sr_err, rs->sr_matched ? rs->sr_matched : "",
+               rs->sr_text ? rs->sr_text : "" );
 #else
        Debug( LDAP_DEBUG_ARGS,
                "send_ldap_result: err=%d matched=\"%s\" text=\"%s\"\n",
-               rs->sr_err, rs->sr_matched ? rs->sr_matched : "", rs->sr_text ? rs->sr_text : "" );
+               rs->sr_err, rs->sr_matched ? rs->sr_matched : "",
+               rs->sr_text ? rs->sr_text : "" );
 #endif
 
 
@@ -498,20 +500,21 @@ slap_send_ldap_result( Operation *op, SlapReply *rs )
 
        if ( op->o_tag == LDAP_REQ_SEARCH ) {
                char nbuf[64];
-               snprintf( nbuf, sizeof nbuf, "%d nentries=%d", rs->sr_err, rs->sr_nentries );
+               snprintf( nbuf, sizeof nbuf, "%d nentries=%d",
+                       rs->sr_err, rs->sr_nentries );
 
                Statslog( LDAP_DEBUG_STATS,
-                       "conn=%lu op=%lu SEARCH RESULT tag=%lu err=%s text=%s\n",
-                       op->o_connid, op->o_opid, rs->sr_tag, nbuf, rs->sr_text ? rs->sr_text : "" );
+               "conn=%lu op=%lu SEARCH RESULT tag=%lu err=%s text=%s\n",
+                       op->o_connid, op->o_opid, rs->sr_tag, nbuf,
+                       rs->sr_text ? rs->sr_text : "" );
        } else {
                Statslog( LDAP_DEBUG_STATS,
                        "conn=%lu op=%lu RESULT tag=%lu err=%d text=%s\n",
-                       op->o_connid, op->o_opid, rs->sr_tag, rs->sr_err, rs->sr_text ? rs->sr_text : "" );
+                       op->o_connid, op->o_opid, rs->sr_tag, rs->sr_err,
+                       rs->sr_text ? rs->sr_text : "" );
        }
 
-       if( tmp != NULL ) {
-               ch_free(tmp);
-       }
+       if( tmp != NULL ) ch_free(tmp);
        rs->sr_text = otext;
        rs->sr_ref = oref;
 }
@@ -523,10 +526,12 @@ send_ldap_sasl( Operation *op, SlapReply *rs )
 #ifdef NEW_LOGGING
        LDAP_LOG( OPERATION, ENTRY, 
                "send_ldap_sasl: conn %lu err=%d len=%lu\n",
-               op->o_connid, rs->sr_err, rs->sr_sasldata ? rs->sr_sasldata->bv_len : -1 );
+               op->o_connid, rs->sr_err,
+               rs->sr_sasldata ? rs->sr_sasldata->bv_len : -1 );
 #else
        Debug( LDAP_DEBUG_TRACE, "send_ldap_sasl: err=%d len=%ld\n",
-               rs->sr_err, rs->sr_sasldata ? (long) rs->sr_sasldata->bv_len : -1, NULL );
+               rs->sr_err,
+               rs->sr_sasldata ? (long) rs->sr_sasldata->bv_len : -1, NULL );
 #endif
 
        rs->sr_tag = req2res( op->o_tag );
@@ -608,23 +613,23 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
 
        rs->sr_type = REP_SEARCH;
        if (op->o_callback && op->o_callback->sc_response) {
-               return op->o_callback->sc_response( op, rs );
+               rc = op->o_callback->sc_response( op, rs );
+               if ( rc != SLAP_CB_CONTINUE ) return rc;
        }
 
 #ifdef NEW_LOGGING
-       LDAP_LOG( OPERATION, ENTRY, 
-               "send_search_entry: conn %lu    dn=\"%s\"%s\n",
-               op->o_connid, rs->sr_entry->e_name.bv_val, op->ors_attrsonly ? " (attrsOnly)" : "" );
+       LDAP_LOG( OPERATION, ENTRY, "send_search_entry: conn %lu        dn=\"%s\"%s\n",
+               op->o_connid, rs->sr_entry->e_name.bv_val,
+               op->ors_attrsonly ? " (attrsOnly)" : "" );
 #else
-       Debug( LDAP_DEBUG_TRACE,
-               "=> send_search_entry: dn=\"%s\"%s\n",
-               rs->sr_entry->e_name.bv_val, op->ors_attrsonly ? " (attrsOnly)" : "", 0 );
+       Debug( LDAP_DEBUG_TRACE, "=> send_search_entry: dn=\"%s\"%s\n",
+               rs->sr_entry->e_name.bv_val,
+               op->ors_attrsonly ? " (attrsOnly)" : "", 0 );
 #endif
 
        mark = sl_mark( op->o_tmpmemctx );
 
-       if ( ! access_allowed( op, rs->sr_entry, ad_entry, NULL, ACL_READ, NULL ) )
-       {
+       if ( !access_allowed( op, rs->sr_entry, ad_entry, NULL, ACL_READ, NULL )) {
 #ifdef NEW_LOGGING
                LDAP_LOG( ACL, INFO, 
                        "send_search_entry: conn %lu access to entry (%s) not allowed\n", 
@@ -641,12 +646,10 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
 
        edn = rs->sr_entry->e_nname.bv_val;
 
-#ifdef LDAP_CONNECTIONLESS
-       if (op->o_conn && op->o_conn->c_is_udp)
+       if ( op->o_res_ber ) {
+               /* read back control or LDAP_CONNECTIONLESS */
            ber = op->o_res_ber;
-       else
-#endif
-       {
+       } else {
                ber_len_t       siz, len;
                struct berval   bv;
 
@@ -659,14 +662,23 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
        }
 
 #ifdef LDAP_CONNECTIONLESS
-       if (op->o_conn && op->o_conn->c_is_udp && op->o_protocol == LDAP_VERSION2) {
-           rc = ber_printf(ber, "t{O{" /*}}*/,
-               LDAP_RES_SEARCH_ENTRY, &rs->sr_entry->e_name);
+       if ( op->o_conn && op->o_conn->c_is_udp ) {
+               /* CONNECTIONLESS */
+               if ( op->o_protocol == LDAP_VERSION2 ) {
+               rc = ber_printf(ber, "t{O{" /*}}*/,
+                               LDAP_RES_SEARCH_ENTRY, &rs->sr_entry->e_name );
+               } else {
+               rc = ber_printf( ber, "{it{O{" /*}}}*/, op->o_msgid,
+                               LDAP_RES_SEARCH_ENTRY, &rs->sr_entry->e_name );
+               }
        } else
 #endif
-       {
+       if ( op->o_res_ber ) {
+               /* read back control */
+           rc = ber_printf( ber, "{O{" /*}}*/, &rs->sr_entry->e_name );
+       } else {
            rc = ber_printf( ber, "{it{O{" /*}}}*/, op->o_msgid,
-               LDAP_RES_SEARCH_ENTRY, &rs->sr_entry->e_name );
+                       LDAP_RES_SEARCH_ENTRY, &rs->sr_entry->e_name );
        }
 
        if ( rc == -1 ) {
@@ -678,10 +690,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
 #endif
 
-#ifdef LDAP_CONNECTIONLESS
-               if (!op->o_conn || op->o_conn->c_is_udp == 0)
-#endif
-               ber_free_buf( ber );
+               if ( op->o_res_ber == NULL ) ber_free_buf( ber );
                send_ldap_error( op, rs, LDAP_OTHER, "encoding DN error" );
                goto error_return;
        }
@@ -698,7 +707,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
         * to particular value of attribute and equals 1 if value matches
         * to ValuesReturnFilter or 0 if not
         */     
-       if ( op->vrFilter != NULL ) {
+       if ( op->o_vrFilter != NULL ) {
                int     k = 0;
                size_t  size;
 
@@ -726,7 +735,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                        }
                        a_flags = (char *)(e_flags + i);
                        memset( a_flags, 0, k );
-                       for ( a = rs->sr_entry->e_attrs, i=0; a != NULL; a = a->a_next, i++ ) {
+                       for ( a=rs->sr_entry->e_attrs, i=0; a != NULL; a=a->a_next, i++ ) {
                                for ( j = 0; a->a_vals[j].bv_val != NULL; j++ );
                                e_flags[i] = a_flags;
                                a_flags += j;
@@ -735,18 +744,16 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                        rc = filter_matched_values(op, rs->sr_entry->e_attrs, &e_flags) ; 
                        if ( rc == -1 ) {
 #ifdef NEW_LOGGING
-                               LDAP_LOG( OPERATION, ERR, 
-                                       "send_search_entry: conn %lu matched values filtering failed\n",
+                               LDAP_LOG( OPERATION, ERR, "send_search_entry: "
+                                       "conn %lu matched values filtering failed\n",
                                        op->o_connid ? op->o_connid : 0, 0, 0 );
 #else
                        Debug( LDAP_DEBUG_ANY,
                                        "matched values filtering failed\n", 0, 0, 0 );
 #endif
-#ifdef LDAP_CONNECTIONLESS
-                       if (!op->o_conn || op->o_conn->c_is_udp == 0)
-#endif
-                               ber_free( ber, 1 );
-                               send_ldap_error( op, rs, LDAP_OTHER, "matched values filtering error" );
+                               if ( op->o_res_ber == NULL ) ber_free_buf( ber );
+                               send_ldap_error( op, rs, LDAP_OTHER,
+                                       "matched values filtering error" );
                                goto error_return;
                        }
                }
@@ -799,10 +806,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                        Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
 #endif
 
-#ifdef LDAP_CONNECTIONLESS
-                       if (!op->o_conn || op->o_conn->c_is_udp == 0)
-#endif
-                       ber_free_buf( ber );
+                       if ( op->o_res_ber == NULL ) ber_free_buf( ber );
                        send_ldap_error( op, rs, LDAP_OTHER, "encoding description error");
                        goto error_return;
                }
@@ -827,7 +831,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                                        continue;
                                }
 
-                               if ( op->vrFilter && e_flags[j][i] == 0 ){
+                               if ( op->o_vrFilter && e_flags[j][i] == 0 ){
                                        continue;
                                }
 
@@ -841,11 +845,9 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                                            "ber_printf failed\n", 0, 0, 0 );
 #endif
 
-#ifdef LDAP_CONNECTIONLESS
-                                       if (!op->o_conn || op->o_conn->c_is_udp == 0)
-#endif
-                                       ber_free_buf( ber );
-                                       send_ldap_error( op, rs, LDAP_OTHER, "encoding values error" );
+                                       if ( op->o_res_ber == NULL ) ber_free_buf( ber );
+                                       send_ldap_error( op, rs, LDAP_OTHER,
+                                               "encoding values error" );
                                        goto error_return;
                                }
                        }
@@ -860,20 +862,17 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                        Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
 #endif
 
-#ifdef LDAP_CONNECTIONLESS
-                       if (!op->o_conn || op->o_conn->c_is_udp == 0)
-#endif
-                       ber_free_buf( ber );
+                       if ( op->o_res_ber == NULL ) ber_free_buf( ber );
                        send_ldap_error( op, rs, LDAP_OTHER, "encode end error" );
                        goto error_return;
                }
        }
 
        /* eventually will loop through generated operational attributes */
-       /* only have subschemaSubentry implemented */
+       /* only have subschemaSubentry and numSubordinates are implemented */
        aa = backend_operational( op, rs, opattrs );
 
-       if ( aa != NULL && op->vrFilter != NULL ) {
+       if ( aa != NULL && op->o_vrFilter != NULL ) {
                int     k = 0;
                size_t  size;
 
@@ -889,7 +888,8 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                         * Reuse previous memory - we likely need less space
                         * for operational attributes
                         */
-                       tmp = sl_realloc( e_flags, i * sizeof(char *) + k, op->o_tmpmemctx );
+                       tmp = sl_realloc( e_flags, i * sizeof(char *) + k,
+                               op->o_tmpmemctx );
                        if ( tmp == NULL ) {
 #ifdef NEW_LOGGING
                                LDAP_LOG( OPERATION, ERR, 
@@ -904,9 +904,9 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                                        "for matched values filtering\n",
                                        op->o_connid, 0, 0 );
 #endif
-                               ber_free( ber, 1 );
-       
-                               send_ldap_error( op, rs, LDAP_OTHER, "not enough memory for matched values filtering" );
+                               if ( op->o_res_ber == NULL ) ber_free_buf( ber );
+                               send_ldap_error( op, rs, LDAP_OTHER,
+                                       "not enough memory for matched values filtering" );
                                goto error_return;
                        }
                        e_flags = tmp;
@@ -929,12 +929,9 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                                Debug( LDAP_DEBUG_ANY,
                                        "matched values filtering failed\n", 0, 0, 0 );
 #endif
-#ifdef LDAP_CONNECTIONLESS
-                       if (!op->o_conn || op->o_conn->c_is_udp == 0)
-#endif
-                               ber_free( ber, 1 );
-       
-                               send_ldap_error( op, rs, LDAP_OTHER, "matched values filtering error" );
+                               if ( op->o_res_ber == NULL ) ber_free_buf( ber );
+                               send_ldap_error( op, rs, LDAP_OTHER,
+                                       "matched values filtering error" );
                                goto error_return;
                        }
                }
@@ -956,8 +953,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                                        continue;
                                }
                        } else {
-                               if (!userattrs && !ad_inlist( desc, rs->sr_attrs ) )
-                               {
+                               if (!userattrs && !ad_inlist( desc, rs->sr_attrs ) ) {
                                        continue;
                                }
                        }
@@ -973,8 +969,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                                op->o_connid, desc->ad_cname.bv_val, 0 );
 #else
                        Debug( LDAP_DEBUG_ACL, "send_search_entry: access to attribute %s "
-                                       "not allowed\n",
-                                       desc->ad_cname.bv_val, 0, 0 );
+                               "not allowed\n", desc->ad_cname.bv_val, 0, 0 );
 #endif
 
                        continue;
@@ -990,12 +985,8 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                        Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
 #endif
 
-#ifdef LDAP_CONNECTIONLESS
-                       if (!op->o_conn || op->o_conn->c_is_udp == 0)
-#endif
-                       ber_free_buf( ber );
+                       if ( op->o_res_ber == NULL ) ber_free_buf( ber );
                        send_ldap_error( op, rs, LDAP_OTHER, "encoding description error" );
-
                        attrs_free( aa );
                        goto error_return;
                }
@@ -1020,7 +1011,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                                        continue;
                                }
 
-                               if ( op->vrFilter && e_flags[j][i] == 0 ){
+                               if ( op->o_vrFilter && e_flags[j][i] == 0 ){
                                        continue;
                                }
 
@@ -1034,11 +1025,9 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                                            "ber_printf failed\n", 0, 0, 0 );
 #endif
 
-#ifdef LDAP_CONNECTIONLESS
-                                       if (!op->o_conn || op->o_conn->c_is_udp == 0)
-#endif
-                                       ber_free_buf( ber );
-                                       send_ldap_error( op, rs, LDAP_OTHER, "encoding values error" );
+                                       if ( op->o_res_ber == NULL ) ber_free_buf( ber );
+                                       send_ldap_error( op, rs, LDAP_OTHER,
+                                               "encoding values error" );
                                        attrs_free( aa );
                                        goto error_return;
                                }
@@ -1054,12 +1043,8 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                        Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
 #endif
 
-#ifdef LDAP_CONNECTIONLESS
-                       if (!op->o_conn || op->o_conn->c_is_udp == 0)
-#endif
-                       ber_free_buf( ber );
+                       if ( op->o_res_ber == NULL ) ber_free_buf( ber );
                        send_ldap_error( op, rs, LDAP_OTHER, "encode end error" );
-
                        attrs_free( aa );
                        goto error_return;
                }
@@ -1083,7 +1068,8 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
         */
        if ( rs->sr_attrs != NULL ) {
                for ( anp = rs->sr_attrs; anp->an_name.bv_val != NULL; anp++ ) {
-                       rc = compute_evaluator( &ctx, anp->an_name.bv_val, rs->sr_entry, slapi_x_compute_output_ber );
+                       rc = compute_evaluator( &ctx, anp->an_name.bv_val,
+                               rs->sr_entry, slapi_x_compute_output_ber );
                        if ( rc == 1 ) {
                                break;
                        }
@@ -1094,10 +1080,11 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                 * when the user requested only user attributes. We'll let the
                 * plugin decide whether to be naughty or not.
                 */
-               rc = compute_evaluator( &ctx, "*", rs->sr_entry, slapi_x_compute_output_ber );
+               rc = compute_evaluator( &ctx, "*",
+                       rs->sr_entry, slapi_x_compute_output_ber );
        }
        if ( rc == 1 ) {
-               ber_free_buf( ber );
+               if ( op->o_res_ber == NULL ) ber_free_buf( ber );
                send_ldap_error( op, rs, LDAP_OTHER, "computed attribute error" );
                goto error_return;
        }
@@ -1116,13 +1103,17 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                rc = send_ldap_controls( ber, rs->sr_ctrls );
        }
 
+       if( rc != -1 ) {
 #ifdef LDAP_CONNECTIONLESS
-       if( op->o_conn && op->o_conn->c_is_udp && op->o_protocol == LDAP_VERSION2 ) {
-               ; /* empty, skip following if */
-       } else
+               if( op->o_conn && op->o_conn->c_is_udp ) {
+                       if ( op->o_protocol != LDAP_VERSION2 ) {
+                               rc = ber_printf( ber, /*{*/ "N}" );
+                       }
+               } else
 #endif
-       if( rc != -1 ) {
-               rc = ber_printf( ber, /*{*/ "N}" );
+               if ( op->o_res_ber == NULL ) {
+                       rc = ber_printf( ber, /*{*/ "N}" );
+               }
        }
 
        if ( rc == -1 ) {
@@ -1134,46 +1125,38 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
 #endif
 
-#ifdef LDAP_CONNECTIONLESS
-               if (!op->o_conn || op->o_conn->c_is_udp == 0)
-#endif
-               ber_free_buf( ber );
+               if ( op->o_res_ber == NULL ) ber_free_buf( ber );
                send_ldap_error( op, rs, LDAP_OTHER, "encode entry end error" );
                sl_release( mark, op->o_tmpmemctx );
                return( 1 );
        }
 
-#ifdef LDAP_CONNECTIONLESS
-       if (!op->o_conn || op->o_conn->c_is_udp == 0) {
-#endif
-       bytes = op->o_noop ? 0 : send_ldap_ber( op->o_conn, ber );
-       ber_free_buf( ber );
+       if ( op->o_res_ber == NULL ) {
+               bytes = op->o_noop ? 0 : send_ldap_ber( op->o_conn, ber );
+               ber_free_buf( ber );
 
-       if ( bytes < 0 ) {
+               if ( bytes < 0 ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG( OPERATION, ERR, 
-                          "send_search_entry: conn %lu  ber write failed.\n", 
-                          op->o_connid, 0, 0 );
+                       LDAP_LOG( OPERATION, ERR, 
+                               "send_search_entry: conn %lu  ber write failed.\n", 
+                               op->o_connid, 0, 0 );
 #else
-               Debug( LDAP_DEBUG_ANY,
-                       "send_search_entry: ber write failed\n",
-                       0, 0, 0 );
+                       Debug( LDAP_DEBUG_ANY,
+                               "send_search_entry: ber write failed\n",
+                               0, 0, 0 );
 #endif
 
-               sl_release( mark, op->o_tmpmemctx );
-               return -1;
-       }
-       rs->sr_nentries++;
-
-       ldap_pvt_thread_mutex_lock( &num_sent_mutex );
-       num_bytes_sent += bytes;
-       num_entries_sent++;
-       num_pdu_sent++;
-       ldap_pvt_thread_mutex_unlock( &num_sent_mutex );
+                       sl_release( mark, op->o_tmpmemctx );
+                       return -1;
+               }
+               rs->sr_nentries++;
 
-#ifdef LDAP_CONNECTIONLESS
+               ldap_pvt_thread_mutex_lock( &num_sent_mutex );
+               num_bytes_sent += bytes;
+               num_entries_sent++;
+               num_pdu_sent++;
+               ldap_pvt_thread_mutex_unlock( &num_sent_mutex );
        }
-#endif
 
        Statslog( LDAP_DEBUG_STATS2, "conn=%lu op=%lu ENTRY dn=\"%s\"\n",
            op->o_connid, op->o_opid, rs->sr_entry->e_dn, 0, 0 );
@@ -1207,7 +1190,8 @@ slap_send_search_reference( Operation *op, SlapReply *rs )
 
        rs->sr_type = REP_SEARCHREF;
        if (op->o_callback && op->o_callback->sc_response) {
-               return op->o_callback->sc_response( op, rs );
+               rc = op->o_callback->sc_response( op, rs );
+               if ( rc != SLAP_CB_CONTINUE ) return rc;
        }
 
        mark = sl_mark( op->o_tmpmemctx );
@@ -1215,7 +1199,8 @@ slap_send_search_reference( Operation *op, SlapReply *rs )
 #ifdef NEW_LOGGING
        LDAP_LOG( OPERATION, ENTRY, 
                "send_search_reference: conn %lu  dn=\"%s\"\n", 
-               op->o_connid, rs->sr_entry ? rs->sr_entry->e_name.bv_val : "(null)", 0 );
+               op->o_connid,
+               rs->sr_entry ? rs->sr_entry->e_name.bv_val : "(null)", 0 );
 #else
        Debug( LDAP_DEBUG_TRACE,
                "=> send_search_reference: dn=\"%s\"\n",
@@ -1297,9 +1282,9 @@ slap_send_search_reference( Operation *op, SlapReply *rs )
        }
 
 #ifdef LDAP_CONNECTIONLESS
-       if (op->o_conn && op->o_conn->c_is_udp)
+       if( op->o_conn && op->o_conn->c_is_udp ) {
                ber = op->o_res_ber;
-       else
+       else
 #endif
        {
                ber_init_w_nullc( ber, LBER_USE_DER );
@@ -1428,3 +1413,57 @@ str2result(
 
        return( rc );
 }
+
+int slap_read_controls(
+       Operation *op,
+       SlapReply *rs,
+       Entry *e,
+       const struct berval *oid,
+       LDAPControl **ctrl )
+{
+       int rc;
+       struct berval bv;
+       char berbuf[LBER_ELEMENT_SIZEOF];
+       BerElement *ber = (BerElement *) berbuf;
+       LDAPControl c;
+       ber_len_t       siz, len;
+       Operation myop;
+
+#ifdef NEW_LOGGING
+       LDAP_LOG( OPERATION, INFO, "slap_read_controls: (%s) %s\n",
+               oid->bv_val, e->e_dn, 0 );
+#else
+       Debug( LDAP_DEBUG_ANY, "slap_read_controls: (%s) %s\n",
+               oid->bv_val, e->e_dn, 0 );
+#endif
+
+       rs->sr_entry = e;
+       rs->sr_attrs = ( oid == &slap_pre_read_bv ) ?
+               op->o_preread_attrs : op->o_postread_attrs; 
+
+       entry_flatsize( rs->sr_entry, &siz, &len, 0 );
+       bv.bv_len = siz + len;
+       bv.bv_val = op->o_tmpalloc(bv.bv_len, op->o_tmpmemctx );
+
+       ber_init2( ber, &bv, LBER_USE_DER );
+       ber_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
+
+       /* create new operation */
+       myop = *op;
+       myop.o_bd = NULL;
+       myop.o_res_ber = ber;
+
+       rc = slap_send_search_entry( &myop, rs );
+       if( rc ) return rc;
+
+       rc = ber_flatten2( ber, &c.ldctl_value, 0 );
+
+       if( rc == LBER_ERROR ) return LDAP_OTHER;
+
+       c.ldctl_oid = oid->bv_val;
+       c.ldctl_iscritical = 0;
+
+       *ctrl = sl_calloc( 1, sizeof(LDAPControl), NULL );
+       **ctrl = c;
+       return LDAP_SUCCESS;
+}
index 06f1ea12b2e6887f0d6b0a047c569482043be1e7..819c92e3bdffb01d0127d641048c3385d356666e 100644 (file)
 #endif
 
 static struct berval supportedFeatures[] = {
-       BER_BVC(LDAP_FEATURE_ALL_OPERATIONAL_ATTRS), /* all Operational Attributes ("+") */
-       BER_BVC(LDAP_FEATURE_OBJECTCLASS_ATTRS), /* OCs in Attributes List */
+       BER_BVC(LDAP_FEATURE_ALL_OPERATIONAL_ATTRS), /* All Op Attrs (+) */
+       BER_BVC(LDAP_FEATURE_OBJECTCLASS_ATTRS), /* OCs in Attrs List (+person) */
        BER_BVC(LDAP_FEATURE_ABSOLUTE_FILTERS), /* (&) and (|) search filters */
        BER_BVC(LDAP_FEATURE_LANGUAGE_TAG_OPTIONS), /* Language Tag Options */
        BER_BVC(LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS), /* Language Range Options */
+       BER_BVC(LDAP_FEATURE_MODIFY_INCREMENT), /* Modify/increment */
        {0,NULL}
 };
 
@@ -96,24 +97,24 @@ root_dse_info(
 
        vals[0].bv_val = "top";
        vals[0].bv_len = sizeof("top")-1;
-       if( attr_merge( e, ad_objectClass, vals, NULL ) )
-       {
+       if( attr_merge( e, ad_objectClass, vals, NULL ) ) {
                return LDAP_OTHER;
        }
 
        vals[0].bv_val = "OpenLDAProotDSE";
        vals[0].bv_len = sizeof("OpenLDAProotDSE")-1;
-       if( attr_merge( e, ad_objectClass, vals, NULL ) )
+       if( attr_merge( e, ad_objectClass, vals, NULL ) ) {
                return LDAP_OTHER;
-       if( attr_merge( e, ad_structuralObjectClass, vals, NULL ) )
+       }
+       if( attr_merge( e, ad_structuralObjectClass, vals, NULL ) ) {
                return LDAP_OTHER;
+       }
 
        for ( i = 0; i < nbackends; i++ ) {
                if ( backends[i].be_flags & SLAP_BFLAG_MONITOR ) {
                        vals[0] = backends[i].be_suffix[0];
                        nvals[0] = backends[i].be_nsuffix[0];
-                       if( attr_merge( e, ad_monitorContext, vals, nvals ) )
-                       {
+                       if( attr_merge( e, ad_monitorContext, vals, nvals ) ) {
                                return LDAP_OTHER;
                        }
                        continue;
@@ -124,8 +125,7 @@ root_dse_info(
                for ( j = 0; backends[i].be_suffix[j].bv_val != NULL; j++ ) {
                        vals[0] = backends[i].be_suffix[j];
                        nvals[0] = backends[i].be_nsuffix[0];
-                       if( attr_merge( e, ad_namingContexts, vals, nvals ) )
-                       {
+                       if( attr_merge( e, ad_namingContexts, vals, nvals ) ) {
                                return LDAP_OTHER;
                        }
                }
@@ -170,8 +170,7 @@ root_dse_info(
                snprintf(buf, sizeof buf, "%d", i);
                vals[0].bv_val = buf;
                vals[0].bv_len = strlen( vals[0].bv_val );
-               if( attr_merge( e, ad_supportedLDAPVersion, vals, NULL ) )
-               {
+               if( attr_merge( e, ad_supportedLDAPVersion, vals, NULL ) ) {
                        return LDAP_OTHER;
                }
        }
@@ -183,8 +182,7 @@ root_dse_info(
                for ( i=0; supportedSASLMechanisms[i] != NULL; i++ ) {
                        vals[0].bv_val = supportedSASLMechanisms[i];
                        vals[0].bv_len = strlen( vals[0].bv_val );
-                       if( attr_merge( e, ad_supportedSASLMechanisms, vals, NULL ) )
-                       {
+                       if( attr_merge( e, ad_supportedSASLMechanisms, vals, NULL ) ) {
                                return LDAP_OTHER;
                        }
                }
@@ -192,8 +190,7 @@ root_dse_info(
        }
 
        if ( default_referral != NULL ) {
-               if( attr_merge( e, ad_ref, default_referral, NULL /* FIXME */ ) )
-               {
+               if( attr_merge( e, ad_ref, default_referral, NULL /* FIXME */ ) ) {
                        return LDAP_OTHER;
                }
        }
@@ -202,7 +199,7 @@ root_dse_info(
                Attribute *a;
                for( a = usr_attr->e_attrs; a != NULL; a = a->a_next ) {
                        if( attr_merge( e, a->a_desc, a->a_vals,
-                        (a->a_nvals == a->a_vals) ? NULL : a->a_nvals ) )
+                               (a->a_nvals == a->a_vals) ? NULL : a->a_nvals ) )
                        {
                                return LDAP_OTHER;
                        }
@@ -276,7 +273,7 @@ int read_root_dse_file( const char *fname )
 
                for(a = e->e_attrs; a != NULL; a = a->a_next) {
                        if( attr_merge( usr_attr, a->a_desc, a->a_vals,
-                       (a->a_nvals == a->a_vals) ? NULL : a->a_nvals ) )
+                               (a->a_nvals == a->a_vals) ? NULL : a->a_nvals ) )
                        {
                                rc = LDAP_OTHER;
                                break;
index a8f3eca30ff548d4bc4300941ebc93a9bd18a2c3..527e95cda90308bfdbe1eb1a1ad30aa886553931 100644 (file)
@@ -440,6 +440,9 @@ slap_auxprop_lookup(
                        op.o_threadctx = conn->c_sasl_bindop->o_threadctx;
                        op.o_tmpmemctx = conn->c_sasl_bindop->o_tmpmemctx;
                        op.o_tmpmfuncs = conn->c_sasl_bindop->o_tmpmfuncs;
+#ifdef LDAP_SLAPI
+                       op.o_pb = conn->c_sasl_bindop->o_pb;
+#endif
                        op.o_conn = conn;
                        op.o_connid = conn->c_connid;
                        op.ors_scope = LDAP_SCOPE_BASE;
@@ -565,6 +568,9 @@ slap_sasl_checkpass(
                op.o_threadctx = conn->c_sasl_bindop->o_threadctx;
                op.o_tmpmemctx = conn->c_sasl_bindop->o_tmpmemctx;
                op.o_tmpmfuncs = conn->c_sasl_bindop->o_tmpmfuncs;
+#ifdef LDAP_SLAPI
+               op.o_pb = conn->c_sasl_bindop->o_pb;
+#endif
                op.o_conn = conn;
                op.o_connid = conn->c_connid;
                op.ors_scope = LDAP_SCOPE_BASE;
@@ -959,21 +965,28 @@ int slap_sasl_init( void )
        };
 
 #ifdef HAVE_SASL_VERSION
-#define SASL_BUILD_VERSION ((SASL_VERSION_MAJOR << 24) |\
-       (SASL_VERSION_MINOR << 16) | SASL_VERSION_STEP)
+       /* stringify the version number, sasl.h doesn't do it for us */
+#define        VSTR0(maj, min, pat)    #maj "." #min "." #pat
+#define        VSTR(maj, min, pat)     VSTR0(maj, min, pat)
+#define        SASL_VERSION_STRING     VSTR(SASL_VERSION_MAJOR, SASL_VERSION_MINOR, \
+                               SASL_VERSION_STEP)
 
        sasl_version( NULL, &rc );
        if ( ((rc >> 16) != ((SASL_VERSION_MAJOR << 8)|SASL_VERSION_MINOR)) ||
                (rc & 0xffff) < SASL_VERSION_STEP) {
-
+               char version[sizeof("xxx.xxx.xxxxx")];
+               sprintf( version, "%d.%d.%d", rc >> 24, rc >> 16 & 0xff,
+                       rc & 0xffff );
 #ifdef NEW_LOGGING
                LDAP_LOG( TRANSPORT, INFO,
-               "slap_sasl_init: SASL version mismatch, got %x, wanted %x.\n",
-                       rc, SASL_BUILD_VERSION, 0 );
+               "slap_sasl_init: SASL library version mismatch:"
+               " expected " SASL_VERSION_STRING ","
+               " got %s\n", version, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ANY,
-               "slap_sasl_init: SASL version mismatch, got %x, wanted %x.\n",
-                       rc, SASL_BUILD_VERSION, 0 );
+               "slap_sasl_init: SASL library version mismatch:"
+               " expected " SASL_VERSION_STRING ","
+               " got %s\n", version, 0, 0 );
 #endif
                return -1;
        }
index ba66b4249b7b8672de63041dd2981bb24e18306d..258301e38d39b8caf3555e18d22f3a0e129b5e0f 100644 (file)
@@ -65,8 +65,6 @@ int slap_sasl_setpolicy( const char *arg )
        return rc;
 }
 
-/* URI format: ldap://<host>/<base>[?[<attrs>][?[<scope>][?[<filter>]]]] */
-
 static int slap_parseURI( Operation *op, struct berval *uri,
        struct berval *searchbase, int *scope, Filter **filter )
 {
@@ -84,7 +82,8 @@ static int slap_parseURI( Operation *op, struct berval *uri,
        LDAP_LOG( TRANSPORT, ENTRY, 
                "slap_parseURI: parsing %s\n", uri->bv_val, 0, 0 );
 #else
-       Debug( LDAP_DEBUG_TRACE, "slap_parseURI: parsing %s\n", uri->bv_val, 0, 0 );
+       Debug( LDAP_DEBUG_TRACE,
+               "slap_parseURI: parsing %s\n", uri->bv_val, 0, 0 );
 #endif
 
        /* If it does not look like a URI, assume it is a DN */
@@ -114,8 +113,8 @@ is_dn:      bv.bv_len = uri->bv_len - (bv.bv_val - uri->bv_val);
        if (( ludp->lud_host && *ludp->lud_host )
                || ludp->lud_attrs || ludp->lud_exts )
        {
-               /* host part should be empty */
-               /* attrs and extensions parts should be empty */
+               /* host part must be empty */
+               /* attrs and extensions parts must be empty */
                return LDAP_PROTOCOL_ERROR;
        }
 
@@ -385,7 +384,8 @@ static int sasl_sc_smatch( Operation *o, SlapReply *rs )
  */
 
 static
-int slap_sasl_match(Operation *opx, struct berval *rule, struct berval *assertDN, struct berval *authc )
+int slap_sasl_match( Operation *opx, struct berval *rule,
+       struct berval *assertDN, struct berval *authc )
 {
        int rc; 
        regex_t reg;
@@ -404,7 +404,8 @@ int slap_sasl_match(Operation *opx, struct berval *rule, struct berval *assertDN
                assertDN->bv_val, rule->bv_val, 0 );
 #endif
 
-       rc = slap_parseURI( opx, rule, &op.o_req_ndn, &op.oq_search.rs_scope, &op.oq_search.rs_filter );
+       rc = slap_parseURI( opx, rule,
+               &op.o_req_ndn, &op.oq_search.rs_scope, &op.oq_search.rs_filter );
        if( rc != LDAP_SUCCESS ) goto CONCLUDED;
 
        /* Massive shortcut: search scope == base */
@@ -455,6 +456,9 @@ int slap_sasl_match(Operation *opx, struct berval *rule, struct berval *assertDN
        op.o_threadctx = opx->o_threadctx;
        op.o_tmpmemctx = opx->o_tmpmemctx;
        op.o_tmpmfuncs = opx->o_tmpmfuncs;
+#ifdef LDAP_SLAPI
+       op.o_pb = opx->o_pb;
+#endif
        op.o_conn = opx->o_conn;
        op.o_connid = opx->o_connid;
 
@@ -515,9 +519,11 @@ slap_sasl_check_authz( Operation *op,
        if( rc != LDAP_SUCCESS ) goto COMPLETE;
 
        /* Check if the *assertDN matches any **vals */
-       for( i=0; vals[i].bv_val != NULL; i++ ) {
-               rc = slap_sasl_match( op, &vals[i], assertDN, authc );
-               if ( rc == LDAP_SUCCESS ) goto COMPLETE;
+       if( vals != NULL ) {
+               for( i=0; vals[i].bv_val != NULL; i++ ) {
+                       rc = slap_sasl_match( op, &vals[i], assertDN, authc );
+                       if ( rc == LDAP_SUCCESS ) goto COMPLETE;
+               }
        }
        rc = LDAP_INAPPROPRIATE_AUTH;
 
@@ -573,7 +579,8 @@ void slap_sasl2dn( Operation *opx,
                goto FINISHED;
        }
 
-       rc = slap_parseURI( opx, &regout, &op.o_req_ndn, &op.oq_search.rs_scope, &op.oq_search.rs_filter );
+       rc = slap_parseURI( opx, &regout,
+               &op.o_req_ndn, &op.oq_search.rs_scope, &op.oq_search.rs_filter );
        if( regout.bv_val ) sl_free( regout.bv_val, opx->o_tmpmemctx );
        if( rc != LDAP_SUCCESS ) {
                goto FINISHED;
@@ -616,6 +623,9 @@ void slap_sasl2dn( Operation *opx,
        op.o_threadctx = opx->o_threadctx;
        op.o_tmpmemctx = opx->o_tmpmemctx;
        op.o_tmpmfuncs = opx->o_tmpmfuncs;
+#ifdef LDAP_SLAPI
+       op.o_pb = opx->o_pb;
+#endif
        op.oq_search.rs_deref = LDAP_DEREF_NEVER;
        op.oq_search.rs_slimit = 1;
        op.oq_search.rs_attrsonly = 1;
index ced207024e145ef317bd34cef1f4519983e68d17..c15d78eb37efb94fc8f098b5fb1ede14b465fcf7 100644 (file)
@@ -56,6 +56,10 @@ entry_schema_check(
        int subentry = is_entry_subentry( e );
        int collectiveSubentry = 0;
 
+       if ( SLAP_NO_SCHEMA_CHECK( be )) {
+               return LDAP_SUCCESS;
+       }
+
        if( subentry ) {
                collectiveSubentry = is_entry_collectiveAttributeSubentry( e );
        }
@@ -214,30 +218,25 @@ entry_schema_check(
                        aoc->a_vals[0].bv_val );
                return LDAP_OBJECT_CLASS_VIOLATION;
 
-       } else if ( sc != oc ) {
+       } else if ( sc != slap_schema.si_oc_glue && sc != oc ) {
                snprintf( textbuf, textlen, 
                        "structural object class modification "
                        "from '%s' to '%s' not allowed",
                        asc->a_vals[0].bv_val, nsc.bv_val );
                return LDAP_NO_OBJECT_CLASS_MODS;
+       } else if ( sc == slap_schema.si_oc_glue ) {
+               sc = oc;
        }
 
        /* naming check */
-#ifdef LDAP_SYNCREPL
         if ( !is_entry_objectclass ( e, slap_schema.si_oc_glue, 0 ) ) {
                 rc = entry_naming_check( e, text, textbuf, textlen );
                 if( rc != LDAP_SUCCESS ) {
                         return rc;
                 }
         } else {
-                printf("glue !!!\n");
+                       /* Glue Entry */
         }
-#else
-        rc = entry_naming_check( e, text, textbuf, textlen );
-        if( rc != LDAP_SUCCESS ) {
-                return rc;
-        }
-#endif
 
 #ifdef SLAP_EXTENDED_SCHEMA
        /* find the content rule for the structural class */
index 8bb263f880524ac49ede2633e71d92e9b048aaf3..e5fc458612099480d85ccb2043e715d7eda23291 100644 (file)
@@ -28,9 +28,6 @@
 #define HASH_Update(c,buf,len) lutil_HASHUpdate(c,buf,len)
 #define HASH_Final(d,c)                        lutil_HASHFinal(d,c)
 
-/* not yet implemented */
-#define uniqueMemberMatch NULL
-
 #define        OpenLDAPaciMatch                        NULL
 
 /* approx matching rules */
@@ -732,6 +729,87 @@ nameUIDValidate(
        return rc;
 }
 
+int
+nameUIDPretty(
+       Syntax *syntax,
+       struct berval *val,
+       struct berval *out,
+       void *ctx )
+{
+       assert( val );
+       assert( out );
+
+
+#ifdef NEW_LOGGING
+       LDAP_LOG( OPERATION, ARGS, ">>> nameUIDPretty: <%s>\n", val->bv_val, 0, 0 );
+#else
+       Debug( LDAP_DEBUG_TRACE, ">>> nameUIDPretty: <%s>\n", val->bv_val, 0, 0 );
+#endif
+
+       if( val->bv_len == 0 ) {
+               ber_dupbv_x( out, val, ctx );
+
+       } else if ( val->bv_len > SLAP_LDAPDN_MAXLEN ) {
+               return LDAP_INVALID_SYNTAX;
+
+       } else {
+               int rc;
+               struct berval dnval = *val;
+               struct berval uidval = { 0, NULL };
+
+               if( val->bv_val[val->bv_len-1] == 'B'
+                       && val->bv_val[val->bv_len-2] == '\'' )
+               {
+                       uidval.bv_val=strrchr( val->bv_val, '#' );
+                       if( uidval.bv_val ) {
+                               dnval.bv_len = uidval.bv_val - dnval.bv_val;
+                               uidval.bv_len = val->bv_len - dnval.bv_len;
+
+                               uidval.bv_len--;
+                               uidval.bv_val++;
+                       }
+               }
+
+               rc = dnPretty( syntax, &dnval, out, ctx );
+               if( rc != LDAP_SUCCESS ) return rc;
+
+               if( uidval.bv_val ) {
+                       char *tmp = sl_realloc( out->bv_val, out->bv_len + uidval.bv_len + 2, ctx );
+                       int i, c, got1;
+                       if( tmp == NULL ) {
+                               ber_memfree_x( out->bv_val, ctx );
+                               return LDAP_OTHER;
+                       }
+                       out->bv_val = tmp;
+                       out->bv_val[out->bv_len++] = '#';
+
+                       got1 = uidval.bv_len < sizeof("'0'B"); 
+                       for(i=0; i<uidval.bv_len; i++) {
+                               c = uidval.bv_val[i];
+                               switch(c) {
+                                       case '0':
+                                               if( got1 ) out->bv_val[out->bv_len++] = c;
+                                               break;
+                                       case '1':
+                                               got1 = 1;
+                                       default:
+                                               out->bv_val[out->bv_len++] = c;
+                               }
+                       }
+
+                       out->bv_val[out->bv_len] = '\0';
+               }
+       }
+
+#ifdef NEW_LOGGING
+       LDAP_LOG( OPERATION, ARGS, "<<< nameUIDPretty: <%s>\n", out->bv_val, 0, 0 );
+#else
+       Debug( LDAP_DEBUG_TRACE, "<<< nameUIDPretty: <%s>\n", out->bv_val, 0, 0 );
+#endif
+
+       return LDAP_SUCCESS;
+}
+
 static int
 uniqueMemberNormalize(
        slap_mask_t usage,
@@ -795,6 +873,77 @@ uniqueMemberNormalize(
        return LDAP_SUCCESS;
 }
 
+static int
+uniqueMemberMatch(
+       int *matchp,
+       slap_mask_t flags,
+       Syntax *syntax,
+       MatchingRule *mr,
+       struct berval *value,
+       void *assertedValue )
+{
+       int match;
+       struct berval *asserted = (struct berval *) assertedValue;
+       struct berval assertedDN = { 0, NULL };
+       struct berval assertedUID = { 0, NULL };
+       struct berval valueDN = { 0, NULL };
+       struct berval valueUID = { 0, NULL };
+
+       if( asserted->bv_len != 0 ) {
+               assertedDN = *asserted;
+
+               if( assertedDN.bv_val[assertedDN.bv_len-1] == 'B'
+                       && assertedDN.bv_val[assertedDN.bv_len-2] == '\'' )
+               {
+                       /* assume presence of optional UID */
+                       assertedUID.bv_val = strrchr( assertedDN.bv_val, '#' );
+
+                       if( assertedUID.bv_val == NULL ) {
+                               return LDAP_INVALID_SYNTAX;
+                       }
+
+                       assertedUID.bv_len = assertedDN.bv_len -
+                               (assertedUID.bv_val - assertedDN.bv_val);
+                       assertedDN.bv_len -= assertedUID.bv_len--;
+
+                       /* trim the separator */
+                       assertedUID.bv_val++;
+               }
+       }
+
+       if( value->bv_len != 0 ) {
+               valueDN = *value;
+
+               if( valueDN.bv_val[valueDN.bv_len-1] == 'B'
+                       && valueDN.bv_val[valueDN.bv_len-2] == '\'' )
+               {
+                       /* assume presence of optional UID */
+                       valueUID.bv_val = strrchr( valueDN.bv_val, '#' );
+
+                       if( valueUID.bv_val == NULL ) {
+                               return LDAP_INVALID_SYNTAX;
+                       }
+
+                       valueUID.bv_len = valueDN.bv_len -
+                               (assertedUID.bv_val - assertedDN.bv_val);
+                       valueDN.bv_len -= valueUID.bv_len--;
+
+                       /* trim the separator */
+                       valueUID.bv_val++;
+               }
+       }
+
+       if( valueUID.bv_len && assertedUID.bv_len ) {
+               match = memcmp( valueUID.bv_val, assertedUID.bv_val, valueUID.bv_len );
+               if( match ) {
+                       *matchp = match;
+                       return LDAP_SUCCESS;
+               }
+       }
+
+       return dnMatch( matchp, flags, syntax, mr, &valueDN, &assertedDN );
+}
+
 /*
  * Handling boolean syntax and matching is quite rigid.
  * A more flexible approach would be to allow a variety
@@ -1291,6 +1440,7 @@ telephoneNumberNormalize(
 
        if( normalized->bv_len == 0 ) {
                sl_free( normalized->bv_val, ctx );
+               normalized->bv_val = NULL;
                return LDAP_INVALID_SYNTAX;
        }
 
@@ -1858,8 +2008,8 @@ certificateExactConvert(
                        ERR_error_string(ERR_get_error(),NULL), 0, 0 );
 #else
                Debug( LDAP_DEBUG_ARGS, "certificateExactConvert: "
-                      "error parsing cert: %s\n",
-                      ERR_error_string(ERR_get_error(),NULL), NULL, NULL );
+                       "error parsing cert: %s\n",
+                       ERR_error_string(ERR_get_error(),NULL), NULL, NULL );
 #endif
                return LDAP_INVALID_SYNTAX;
        }
@@ -1869,7 +2019,7 @@ certificateExactConvert(
                return LDAP_INVALID_SYNTAX;
        }
 
-       rc = dnX509normalize(X509_get_issuer_name(xcert), &issuer_dn );
+       rc = dnX509normalize( X509_get_issuer_name(xcert), &issuer_dn );
        if( rc != LDAP_SUCCESS ) {
                X509_free(xcert);
                ber_memfree(serial.bv_val);
@@ -1890,11 +2040,10 @@ certificateExactConvert(
        *p++ = '\0';
 
 #ifdef NEW_LOGGING
-       LDAP_LOG( CONFIG, ARGS, 
-               "certificateExactConvert: \n    %s\n", out->bv_val, 0, 0 );
+       LDAP_LOG( CONFIG, ARGS, "certificateExactConvert: %s\n",
+               out->bv_val, 0, 0 );
 #else
-       Debug( LDAP_DEBUG_ARGS, "certificateExactConvert "
-               "\n\t\"%s\"\n",
+       Debug( LDAP_DEBUG_ARGS, "certificateExactConvert: %s\n",
                out->bv_val, NULL, NULL );
 #endif
 
@@ -1928,172 +2077,189 @@ certificateExactNormalize(
 #endif /* HAVE_TLS */
 
 
+#ifndef SUPPORT_OBSOLETE_UTC_SYNTAX
+/* slight optimization - does not need the start parameter */
+#define check_time_syntax(v, start, p, f) (check_time_syntax)(v, p, f)
+enum { start = 0 };
+#endif
+
 static int
 check_time_syntax (struct berval *val,
        int start,
-       int *parts)
+       int *parts,
+       struct berval *fraction)
 {
-       static int ceiling[9] = { 99, 99, 11, 30, 23, 59, 59, 12, 59 };
-       static int mdays[2][12] = {
+       /*
+        * start=0 GeneralizedTime YYYYmmddHH[MM[SS]][(./,)d...](Z|(+/-)HH[MM])
+        * start=1 UTCTime         YYmmddHHMM[SS][Z|(+/-)HHMM]
+        * GeneralizedTime supports leap seconds, UTCTime does not.
+        */
+       static const int ceiling[9] = { 100, 100, 12, 31, 24, 60, 60, 24, 60 };
+       static const int mdays[2][12] = {
                /* non-leap years */
-               { 30, 27, 30, 29, 30, 29, 30, 30, 29, 30, 29, 30 },
+               { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
                /* leap years */
-               { 30, 28, 30, 29, 30, 29, 30, 30, 29, 30, 29, 30 }
+               { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
        };
        char *p, *e;
-       int part, c, tzoffset, leapyear = 0 ;
-
-       if( val->bv_len == 0 ) {
-               return LDAP_INVALID_SYNTAX;
-       }
+       int part, c, c1, c2, tzoffset, leapyear = 0;
 
-       p = (char *)val->bv_val;
+       p = val->bv_val;
        e = p + val->bv_len;
 
-       /* Ignore initial whitespace */
-       while ( ( p < e ) && ASCII_SPACE( *p ) ) {
-               p++;
-       }
-
-       if (e - p < 13 - (2 * start)) {
-               return LDAP_INVALID_SYNTAX;
-       }
-
-       for (part = 0; part < 9; part++) {
-               parts[part] = 0;
-       }
-
-       for (part = start; part < 7; part++) {
-               c = *p;
-               if ((part == 6) && (c == 'Z' || c == '+' || c == '-')) {
-                       part++;
+#ifdef SUPPORT_OBSOLETE_UTC_SYNTAX
+       parts[0] = 20; /* century - any multiple of 4 from 04 to 96 */
+#endif
+       for (part = start; part < 7 && p < e; part++) {
+               c1 = *p;
+               if (!ASCII_DIGIT(c1)) {
                        break;
                }
                p++;
-               c -= '0';
                if (p == e) {
                        return LDAP_INVALID_SYNTAX;
                }
-               if (c < 0 || c > 9) {
+               c = *p++;
+               if (!ASCII_DIGIT(c)) {
                        return LDAP_INVALID_SYNTAX;
                }
-               parts[part] = c;
-
-               c = *p++ - '0';
-               if (p == e) {
-                       return LDAP_INVALID_SYNTAX;
-               }
-               if (c < 0 || c > 9) {
-                       return LDAP_INVALID_SYNTAX;
-               }
-               parts[part] *= 10;
-               parts[part] += c;
-
-               if (part == 2 || part == 3) {
-                       parts[part]--;
-               }
-               if (parts[part] < 0) {
-                       return LDAP_INVALID_SYNTAX;
+               c += c1 * 10 - '0' * 11;
+               if ((part | 1) == 3) {
+                       --c;
+                       if (c < 0) {
+                               return LDAP_INVALID_SYNTAX;
+                       }
                }
-               if (parts[part] > ceiling[part]) {
-                       return LDAP_INVALID_SYNTAX;
+               if (c >= ceiling[part]) {
+                       if (! (c == 60 && part == 6 && start == 0))
+                               return LDAP_INVALID_SYNTAX;
                }
+               parts[part] = c;
+       }
+       if (part < 5 + start) {
+               return LDAP_INVALID_SYNTAX;
+       }
+       for (; part < 9; part++) {
+               parts[part] = 0;
        }
 
        /* leapyear check for the Gregorian calendar (year>1581) */
-       if (((parts[1] % 4 == 0) && (parts[1] != 0)) ||
-               ((parts[0] % 4 == 0) && (parts[1] == 0)))
+       if (parts[parts[1] == 0 ? 0 : 1] % 4 == 0)
        {
                leapyear = 1;
        }
 
-       if (parts[3] > mdays[leapyear][parts[2]]) {
+       if (parts[3] >= mdays[leapyear][parts[2]]) {
                return LDAP_INVALID_SYNTAX;
        }
-       
-       c = *p++;
-       if (c == 'Z') {
-               tzoffset = 0; /* UTC */
-       } else if (c != '+' && c != '-') {
-               return LDAP_INVALID_SYNTAX;
-       } else {
-               if (c == '-') {
-                       tzoffset = -1;
-               } else /* c == '+' */ {
-                       tzoffset = 1;
-               }
-
-               if (p > e - 4) {
-                       return LDAP_INVALID_SYNTAX;
-               }
 
-               for (part = 7; part < 9; part++) {
-                       c = *p++ - '0';
-                       if (c < 0 || c > 9) {
-                               return LDAP_INVALID_SYNTAX;
-                       }
-                       parts[part] = c;
-
-                       c = *p++ - '0';
-                       if (c < 0 || c > 9) {
-                               return LDAP_INVALID_SYNTAX;
-                       }
-                       parts[part] *= 10;
-                       parts[part] += c;
-                       if (parts[part] < 0 || parts[part] > ceiling[part]) {
+       if (start == 0) {
+               fraction->bv_val = p;
+               fraction->bv_len = 0;
+               if (p < e && (*p == '.' || *p == ',')) {
+                       char *end_num;
+                       while (++p < e && ASCII_DIGIT(*p))
+                               ;
+                       if (p - fraction->bv_val == 1) {
                                return LDAP_INVALID_SYNTAX;
                        }
+                       for (end_num = p; end_num[-1] == '0'; --end_num)
+                               ;
+                       c = end_num - fraction->bv_val;
+                       if (c != 1)
+                               fraction->bv_len = c;
                }
        }
 
-       /* Ignore trailing whitespace */
-       while ( ( p < e ) && ASCII_SPACE( *p ) ) {
-               p++;
-       }
-       if (p != e) {
-               return LDAP_INVALID_SYNTAX;
+       if (p == e) {
+               /* no time zone */
+               return start == 0 ? LDAP_INVALID_SYNTAX : LDAP_SUCCESS;
        }
 
-       switch ( tzoffset ) {
-       case -1: /* negativ offset to UTC, ie west of Greenwich  */
-               parts[4] += parts[7];
-               parts[5] += parts[8];
-               for (part = 6; --part > 0; ) { /* offset is just hhmm, no seconds */
-                       if (part != 3) {
-                               c = ceiling[part];
-                       } else {
-                               c = mdays[leapyear][parts[2]];
+       tzoffset = *p++;
+       switch (tzoffset) {
+       default:
+               return LDAP_INVALID_SYNTAX;
+       case 'Z':
+               /* UTC */
+               break;
+       case '+':
+       case '-':
+               for (part = 7; part < 9 && p < e; part++) {
+                       c1 = *p;
+                       if (!ASCII_DIGIT(c1)) {
+                               break;
+                       }
+                       p++;
+                       if (p == e) {
+                               return LDAP_INVALID_SYNTAX;
+                       }
+                       c2 = *p++;
+                       if (!ASCII_DIGIT(c2)) {
+                               return LDAP_INVALID_SYNTAX;
                        }
-                       if (parts[part] > c) {
-                               parts[part] -= c + 1;
-                               parts[part - 1]++;
+                       parts[part] = c1 * 10 + c2 - '0' * 11;
+                       if (parts[part] >= ceiling[part]) {
+                               return LDAP_INVALID_SYNTAX;
                        }
                }
-               break;
-       case 1: /* positive offset to UTC, ie east of Greenwich */
-               parts[4] -= parts[7];
-               parts[5] -= parts[8];
-               for (part = 6; --part > 0; ) {
-                       if (part != 3) {
-                               c = ceiling[part];
-                       } else {
-                               /* first arg to % needs to be non negativ */
-                               c = mdays[leapyear][(parts[2] - 1 + 12) % 12];
+               if (part < 8 + start) {
+                       return LDAP_INVALID_SYNTAX;
+               }
+
+               if (tzoffset == '-') {
+                       /* negative offset to UTC, ie west of Greenwich */
+                       parts[4] += parts[7];
+                       parts[5] += parts[8];
+                       /* offset is just hhmm, no seconds */
+                       for (part = 6; --part >= 0; ) {
+                               if (part != 3) {
+                                       c = ceiling[part];
+                               } else {
+                                       c = mdays[leapyear][parts[2]];
+                               }
+                               if (parts[part] >= c) {
+                                       if (part == 0) {
+                                               return LDAP_INVALID_SYNTAX;
+                                       }
+                                       parts[part] -= c;
+                                       parts[part - 1]++;
+                                       continue;
+                               } else if (part != 5) {
+                                       break;
+                               }
                        }
-                       if (parts[part] < 0) {
-                               parts[part] += c + 1;
-                               parts[part - 1]--;
+               } else {
+                       /* positive offset to UTC, ie east of Greenwich */
+                       parts[4] -= parts[7];
+                       parts[5] -= parts[8];
+                       for (part = 6; --part >= 0; ) {
+                               if (parts[part] < 0) {
+                                       if (part == 0) {
+                                               return LDAP_INVALID_SYNTAX;
+                                       }
+                                       if (part != 3) {
+                                               c = ceiling[part];
+                                       } else {
+                                               /* make first arg to % non-negative */
+                                               c = mdays[leapyear][(parts[2] - 1 + 12) % 12];
+                                       }
+                                       parts[part] += c;
+                                       parts[part - 1]--;
+                                       continue;
+                               } else if (part != 5) {
+                                       break;
+                               }
                        }
                }
-               break;
-       case 0: /* already UTC */
-               break;
        }
 
-       return LDAP_SUCCESS;
+       return p != e ? LDAP_INVALID_SYNTAX : LDAP_SUCCESS;
 }
 
 #ifdef SUPPORT_OBSOLETE_UTC_SYNTAX
+
+#if 0
 static int
 xutcTimeNormalize(
        Syntax *syntax,
@@ -2102,7 +2268,7 @@ xutcTimeNormalize(
 {
        int parts[9], rc;
 
-       rc = check_time_syntax(val, 1, parts);
+       rc = check_time_syntax(val, 1, parts, NULL);
        if (rc != LDAP_SUCCESS) {
                return rc;
        }
@@ -2119,6 +2285,7 @@ xutcTimeNormalize(
 
        return LDAP_SUCCESS;
 }
+#endif /* 0 */
 
 static int
 utcTimeValidate(
@@ -2126,9 +2293,10 @@ utcTimeValidate(
        struct berval *in )
 {
        int parts[9];
-       return check_time_syntax(in, 1, parts);
+       return check_time_syntax(in, 1, parts, NULL);
 }
-#endif
+
+#endif /* SUPPORT_OBSOLETE_UTC_SYNTAX */
 
 static int
 generalizedTimeValidate(
@@ -2136,7 +2304,8 @@ generalizedTimeValidate(
        struct berval *in )
 {
        int parts[9];
-       return check_time_syntax(in, 0, parts);
+       struct berval fraction;
+       return check_time_syntax(in, 0, parts, &fraction);
 }
 
 static int
@@ -2149,22 +2318,53 @@ generalizedTimeNormalize(
        void *ctx )
 {
        int parts[9], rc;
+       unsigned int len;
+       struct berval fraction;
 
-       rc = check_time_syntax(val, 0, parts);
+       rc = check_time_syntax(val, 0, parts, &fraction);
        if (rc != LDAP_SUCCESS) {
                return rc;
        }
 
-       normalized->bv_val = sl_malloc( sizeof("YYYYmmddHHMMSSZ"), ctx );
+       len = sizeof("YYYYmmddHHMMSSZ")-1 + fraction.bv_len;
+       normalized->bv_val = sl_malloc( len + 1, ctx );
        if ( normalized->bv_val == NULL ) {
                return LBER_ERROR_MEMORY;
        }
 
-       sprintf( normalized->bv_val, "%02d%02d%02d%02d%02d%02d%02dZ",
+       sprintf( normalized->bv_val, "%02d%02d%02d%02d%02d%02d%02d",
                parts[0], parts[1], parts[2] + 1, parts[3] + 1,
                parts[4], parts[5], parts[6] );
-       normalized->bv_len = 15;
+       if ( fraction.bv_len ) {
+               memcpy( normalized->bv_val + sizeof("YYYYmmddHHMMSSZ")-2,
+                       fraction.bv_val, fraction.bv_len );
+               normalized->bv_val[sizeof("YYYYmmddHHMMSSZ")-2] = '.';
+       }
+       strcpy( normalized->bv_val + len-1, "Z" );
+       normalized->bv_len = len;
+
+       return LDAP_SUCCESS;
+}
+
+static int
+generalizedTimeOrderingMatch(
+       int *matchp,
+       slap_mask_t flags,
+       Syntax *syntax,
+       MatchingRule *mr,
+       struct berval *value,
+       void *assertedValue )
+{
+       struct berval *asserted = (struct berval *) assertedValue;
+       ber_len_t v_len  = value->bv_len;
+       ber_len_t av_len = asserted->bv_len;
+
+       /* ignore trailing 'Z' when comparing */
+       int match = memcmp( value->bv_val, asserted->bv_val,
+               (v_len < av_len ? v_len : av_len) - 1 );
+       if ( match == 0 ) match = v_len - av_len;
 
+       *matchp = match;
        return LDAP_SUCCESS;
 }
 
@@ -2313,6 +2513,7 @@ firstComponentNormalize(
        return rc;
 }
 
+
 #define X_BINARY "X-BINARY-TRANSFER-REQUIRED 'TRUE' "
 #define X_NOT_H_R "X-NOT-HUMAN-READABLE 'TRUE' "
 
@@ -2388,7 +2589,7 @@ static slap_syntax_defs_rec syntax_defs[] = {
        {"( 1.3.6.1.4.1.1466.115.121.1.33 DESC 'MHS OR Address' )",
                0, NULL, NULL},
        {"( 1.3.6.1.4.1.1466.115.121.1.34 DESC 'Name And Optional UID' )",
-               0, nameUIDValidate, NULL},
+               0, nameUIDValidate, nameUIDPretty },
        {"( 1.3.6.1.4.1.1466.115.121.1.35 DESC 'Name Form Description' )",
                0, NULL, NULL},
        {"( 1.3.6.1.4.1.1466.115.121.1.36 DESC 'Numeric String' )",
@@ -2712,7 +2913,7 @@ static slap_mrule_defs_rec mrule_defs[] = {
        {"( 2.5.13.28 NAME 'generalizedTimeOrderingMatch' "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 )",
                SLAP_MR_ORDERING, NULL,
-               NULL, generalizedTimeNormalize, octetStringOrderingMatch,
+               NULL, generalizedTimeNormalize, generalizedTimeOrderingMatch,
                NULL, NULL,
                "generalizedTimeMatch" },
 
index 0cc4b2ecc1951210f8377e61cda8590542342ffe..cf4c06fefe9c784b7a429c62f8fb6ac62ef45cd0 100644 (file)
@@ -224,28 +224,26 @@ static struct slap_schema_oc_map {
                dynamicObjectClass, SLAP_OC_DYNAMICOBJECT,
                offsetof(struct slap_internal_schema, si_oc_dynamicObject) },
 #endif
-#ifdef LDAP_SYNCREPL
        { "glue", "( 1.3.6.1.4.1.4203.666.3.4 "
                        "NAME 'glue' "
                        "DESC 'Glue Entry' "
                        "SUP top STRUCTURAL )",
-               0, SLAP_OC_OPERATIONAL|SLAP_OC_HIDE,
+               0, SLAP_OC_GLUE|SLAP_OC_OPERATIONAL|SLAP_OC_HIDE,
                offsetof(struct slap_internal_schema, si_oc_glue) },
        { "syncConsumerSubentry", "( 1.3.6.1.4.1.4203.666.3.5 "
                        "NAME 'syncConsumerSubentry' "
                        "DESC 'Persistent Info for SyncRepl Consumer' "
                        "AUXILIARY "
                        "MAY syncreplCookie )",
-               0, SLAP_OC_OPERATIONAL|SLAP_OC_HIDE,
+               0, SLAP_OC_SYNCCONSUMERSUBENTRY|SLAP_OC_OPERATIONAL|SLAP_OC_HIDE,
                offsetof(struct slap_internal_schema, si_oc_syncConsumerSubentry) },
        { "syncProviderSubentry", "( 1.3.6.1.4.1.4203.666.3.6 "
                        "NAME 'syncProviderSubentry' "
                        "DESC 'Persistent Info for SyncRepl Producer' "
                        "AUXILIARY "
-                       "MAY syncreplCookie )",
-               0, SLAP_OC_OPERATIONAL|SLAP_OC_HIDE,
+                       "MAY contextCSN )",
+               0, SLAP_OC_SYNCPROVIDERSUBENTRY|SLAP_OC_OPERATIONAL|SLAP_OC_HIDE,
                offsetof(struct slap_internal_schema, si_oc_syncProviderSubentry) },
-#endif
 
        { NULL, NULL, NULL, 0, 0 }
 };
@@ -408,7 +406,6 @@ static struct slap_schema_ad_map {
                NULL, NULL, NULL, NULL, NULL,
                offsetof(struct slap_internal_schema, si_ad_superiorUUID) },
 
-#ifdef LDAP_CACHING 
        /* LDAP cache specific operational attribute */
        { "queryid", "( 1.3.6.1.4.1.4203.666.1.12 NAME 'queryid' "
                        "DESC 'list of queries the entry belongs to' "
@@ -419,9 +416,7 @@ static struct slap_schema_ad_map {
                NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, 
                offsetof(struct slap_internal_schema, si_ad_queryid) },
-#endif /* LDAP_CACHING */
 
-#ifdef LDAP_SYNCREPL
        { "syncreplCookie", "( 1.3.6.1.4.1.4203.666.1.23 "
                        "NAME 'syncreplCookie' "
                        "DESC 'syncrepl Cookie for shadow copy' "
@@ -433,7 +428,18 @@ static struct slap_schema_ad_map {
                NULL, NULL,
                NULL, NULL, NULL, NULL, NULL,
                offsetof(struct slap_internal_schema, si_ad_syncreplCookie) },
-#endif
+
+       { "contextCSN", "( 1.3.6.1.4.1.4203.666.1.25 "
+                       "NAME 'contextCSN' "
+                       "DESC 'the largest committed CSN of a context' "
+                       "EQUALITY octetStringMatch "
+                       "ORDERING octetStringOrderingMatch "
+                       "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{64} "
+                       "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )",
+               NULL, SLAP_AT_HIDE,
+               NULL, NULL,
+               NULL, NULL, NULL, NULL, NULL,
+               offsetof(struct slap_internal_schema, si_ad_contextCSN) },
 
        /* root DSE attributes */
        { "altServer", "( 1.3.6.1.4.1.1466.101.120.6 NAME 'altServer' "
index fbfd93a59bd49d527b0772c356e630b73aacbf47..8eeba03d4d810f56f87bbe2ac25977f4052dcda3 100644 (file)
@@ -214,20 +214,20 @@ oc_usage( void )
 static void
 at_usage( void )
 {
-       fprintf( stderr,
+       fprintf( stderr, "%s%s%s",
                "AttributeTypeDescription = \"(\" whsp\n"
                "  numericoid whsp      ; AttributeType identifier\n"
                "  [ \"NAME\" qdescrs ]             ; name used in AttributeType\n"
                "  [ \"DESC\" qdstring ]            ; description\n"
                "  [ \"OBSOLETE\" whsp ]\n"
                "  [ \"SUP\" woid ]                 ; derived from this other\n"
-               "                                   ; AttributeType\n"
+               "                                   ; AttributeType\n",
                "  [ \"EQUALITY\" woid ]            ; Matching Rule name\n"
                "  [ \"ORDERING\" woid ]            ; Matching Rule name\n"
                "  [ \"SUBSTR\" woid ]              ; Matching Rule name\n"
                "  [ \"SYNTAX\" whsp noidlen whsp ] ; see section 4.3\n"
                "  [ \"SINGLE-VALUE\" whsp ]        ; default multi-valued\n"
-               "  [ \"COLLECTIVE\" whsp ]          ; default not collective\n"
+               "  [ \"COLLECTIVE\" whsp ]          ; default not collective\n",
                "  [ \"NO-USER-MODIFICATION\" whsp ]; default user modifiable\n"
                "  [ \"USAGE\" whsp AttributeUsage ]; default userApplications\n"
                "                                   ; userApplications\n"
index c033b1fe7be8f853182118b66883ad88f3727b63..71c8960611aece6f804d8c6345d578054410cf80 100644 (file)
@@ -212,9 +212,11 @@ do_search(
                char abuf[BUFSIZ/2], *ptr = abuf;
                int len = 0, alen;
 
+               sprintf(abuf, "scope=%d deref=%d", op->ors_scope, op->ors_deref);
                Statslog( LDAP_DEBUG_STATS,
-                       "conn=%lu op=%lu SRCH base=\"%s\" scope=%d filter=\"%s\"\n",
-                       op->o_connid, op->o_opid, op->o_req_dn.bv_val, op->ors_scope, op->ors_filterstr.bv_val );
+                       "conn=%lu op=%lu SRCH base=\"%s\" %s filter=\"%s\"\n",
+                       op->o_connid, op->o_opid, op->o_req_dn.bv_val, abuf,
+                       op->ors_filterstr.bv_val );
 
                for ( i = 0; i<siz; i++ ) {
                        alen = op->ors_attrs[i].an_name.bv_len;
@@ -224,7 +226,7 @@ do_search(
                        if (len && (len + 1 + alen >= sizeof(abuf))) {
                                Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu SRCH attr=%s\n",
                                    op->o_connid, op->o_opid, abuf, 0, 0 );
-                               len = 0;
+                               len = 0;
                                ptr = abuf;
                        }
                        if (len) {
@@ -332,20 +334,12 @@ do_search(
         * if we don't hold it.
         */
 
-       /* Sync / LCUP controls override manageDSAit */
+       /* Sync control overrides manageDSAit */
 
        if ( manageDSAit != SLAP_NO_CONTROL ) {
-#ifdef LDAP_CLIENT_UPDATE
-               if ( op->o_clientupdate_type & SLAP_LCUP_SYNC ) {
-                       be_manageDSAit = SLAP_NO_CONTROL;
-               } else
-#endif
-#ifdef LDAP_SYNC
                if ( op->o_sync_mode & SLAP_SYNC_REFRESH ) {
                        be_manageDSAit = SLAP_NO_CONTROL;
-               } else
-#endif
-               {
+               } else {
                        be_manageDSAit = manageDSAit;
                }
        } else {
@@ -402,17 +396,8 @@ do_search(
 
 return_results:;
 
-#ifdef LDAP_CLIENT_UPDATE
-       if ( ( op->o_clientupdate_type & SLAP_LCUP_PERSIST ) )
-               return rs->sr_err;
-#endif
-#if defined(LDAP_CLIENT_UPDATE) && defined(LDAP_SYNC)
-       else
-#endif
-#ifdef LDAP_SYNC
        if ( ( op->o_sync_mode & SLAP_SYNC_PERSIST ) )
                return rs->sr_err;
-#endif
 
        if( op->o_req_dn.bv_val != NULL) sl_free( op->o_req_dn.bv_val, op->o_tmpmemctx );
        if( op->o_req_ndn.bv_val != NULL) sl_free( op->o_req_ndn.bv_val, op->o_tmpmemctx );
index 1fa5295cf9cb37cadcde1f6a1dccb5d7d63616ec..156ef3a225f4b355125cc310f555802e341f1936 100644 (file)
@@ -37,7 +37,6 @@
 #include "ldap_queue.h"
 
 #define SLAP_EXTENDED_SCHEMA 1
-#define LDAP_CACHING 1
 
 LDAP_BEGIN_DECL
 /*
@@ -76,9 +75,7 @@ LDAP_BEGIN_DECL
 
 #define SLAP_MAX_WORKER_THREADS                (16)
 
-#ifdef LDAP_SYNCREPL
 #define SLAP_MAX_SYNCREPL_THREADS      (8)
-#endif
 
 #define SLAP_SB_MAX_INCOMING_DEFAULT ((1<<18) - 1)
 #define SLAP_SB_MAX_INCOMING_AUTH ((1<<24) - 1)
@@ -141,6 +138,7 @@ LDAP_BEGIN_DECL
 /* must match in schema_init.c */
 #define SLAPD_DN_SYNTAX                        "1.3.6.1.4.1.1466.115.121.1.12"
 #define SLAPD_NAMEUID_SYNTAX   "1.3.6.1.4.1.1466.115.121.1.34"
+#define SLAPD_INTEGER_SYNTAX   "1.3.6.1.4.1.1466.115.121.1.27"
 #define SLAPD_GROUP_ATTR               "member"
 #define SLAPD_GROUP_CLASS              "groupOfNames"
 #define SLAPD_ROLE_ATTR                        "roleOccupant"
@@ -229,10 +227,6 @@ typedef struct slap_ssf_set {
 #define SLAP_SYNTAX_MATCHINGRULEUSES_OID "1.3.6.1.4.1.1466.115.121.1.31"
 #define SLAP_SYNTAX_CONTENTRULE_OID             "1.3.6.1.4.1.1466.115.121.1.16"
 
-#ifdef LDAP_CLIENT_UPDATE
-#define LCUP_COOKIE_OID "1.3.6.1.4.1.4203.666.10.1"
-#endif /* LDAP_CLIENT_UPDATE */
-
 /*
  * represents schema information for a database
  */
@@ -302,7 +296,7 @@ typedef struct slap_syntax {
        LDAPSyntax                      ssyn_syn;
 #define ssyn_oid               ssyn_syn.syn_oid
 #define ssyn_desc              ssyn_syn.syn_desc
-#define ssyn_extensions                ssyn_syn.syn_extensions
+#define ssyn_extensions        ssyn_syn.syn_extensions
        /*
         * Note: the former
        ber_len_t       ssyn_oidlen;
@@ -647,8 +641,11 @@ typedef struct slap_object_class {
 #define        SLAP_OC_SUBENTRY        0x0004
 #define        SLAP_OC_DYNAMICOBJECT   0x0008
 #define        SLAP_OC_COLLECTIVEATTRIBUTESUBENTRY     0x0010
-#define        SLAP_OC__MASK           0x001F
-#define        SLAP_OC__END            0x0020
+#define SLAP_OC_GLUE           0x0020
+#define SLAP_OC_SYNCPROVIDERSUBENTRY           0x0040
+#define SLAP_OC_SYNCCONSUMERSUBENTRY           0x0080
+#define        SLAP_OC__MASK           0x00FF
+#define        SLAP_OC__END            0x0100
 #define SLAP_OC_OPERATIONAL    0x4000
 #ifdef LDAP_DEVEL
 #define SLAP_OC_HIDE           0x0000
@@ -717,11 +714,9 @@ struct slap_internal_schema {
        ObjectClass *si_oc_collectiveAttributeSubentry;
        ObjectClass *si_oc_dynamicObject;
 
-#ifdef LDAP_SYNCREPL
        ObjectClass *si_oc_glue;
        ObjectClass *si_oc_syncConsumerSubentry;
        ObjectClass *si_oc_syncProviderSubentry;
-#endif
 
        /* objectClass attribute descriptions */
        AttributeDescription *si_ad_objectClass;
@@ -741,15 +736,12 @@ struct slap_internal_schema {
        AttributeDescription *si_ad_namingCSN;
        AttributeDescription *si_ad_superiorUUID;
 
-#ifdef LDAP_CACHING
        /* LDAP cache specific operational attribute */
        AttributeDescription *si_ad_queryid;
-#endif /* LDAP_CACHING */
 
-#ifdef LDAP_SYNCREPL
        AttributeDescription *si_ad_dseType;
        AttributeDescription *si_ad_syncreplCookie;
-#endif
+       AttributeDescription *si_ad_contextCSN;
 
        /* root DSE attribute descriptions */
        AttributeDescription *si_ad_altServer;
@@ -1059,7 +1051,7 @@ typedef enum slap_style_e {
        ACL_STYLE_ONE,
        ACL_STYLE_SUBTREE,
        ACL_STYLE_CHILDREN,
-       ACL_STYLE_ATTROF,
+       ACL_STYLE_ATTROF
 } slap_style_t;
 
 typedef struct slap_authz_info {
@@ -1282,7 +1274,6 @@ typedef BackendDB Backend;
 #define nbackends nBackendDB
 #define backends backendDB
 
-#ifdef LDAP_SYNCREPL
 struct nonpresent_entry {
        struct berval *dn;
        struct berval *ndn;
@@ -1296,84 +1287,44 @@ typedef struct syncinfo_s {
         struct slap_conn *conn;
         struct slap_backend_db *be;
         struct slap_entry *e;
-        void            *ctx;
-        int             id;
-        char            *masteruri;
-               struct berval   *master_bv;
-        char            *mastername;
-        int             masterport;
-        int             type;
+        void                   *ctx;
+        int                            id;
+        char                   *provideruri;
+        BerVarray              provideruri_bv;
+#define TLS_OFF                        0
+#define TLS_ON                 1
+#define TLS_CRITICAL   2
+        int                            tls;
                struct berval   updatedn;       
-        char            *binddn;
-        int             bindmethod;
-        char            *passwd;
-        char            *secprops;
-        char            *realm;
-        char            *authcId;
-        char            *authzId;
-        char            *srvtab;
-        char            *saslmech;
+        int                            bindmethod;
+        char                   *binddn;
+        char                   *passwd;
+        char                   *saslmech;
+        char                   *secprops;
+        char                   *realm;
+        char                   *authcId;
+        char                   *authzId;
+        char                   *srvtab;
+               int                             schemachecking;
+        Filter                 *filter;
+        char                   *filterstr;
+        char                   *base;
+        int                            scope;
+        int                            attrsonly;
+        char                   **attrs;
+        int                            type;
         time_t                 interval;
-        char            *base;
-        int             scope;
-        int             deref;
-        int             slimit;
-        int             tlimit;
-        Filter          *filter;
-        char            *filterstr;
-        char            **attrs;
-        int             attrsonly;
-#define LASTMOD_REQ            0
-#define LASTMOD_GEN            1
-#define LASTMOD_NO             2
-       int             lastmod;
-        /* TLS flags */
-#define TLS_OFF                 0
-#define TLS_ON                  1
-#define TLS_CRITICAL            2
-        int             tls;
-        int             found;
-        struct berval   *syncUUID;
+        struct berval  *syncCookie;
+        int                            manageDSAit;
+        int                            slimit;
+               int                             tlimit;
+        struct berval  *syncUUID;
                struct berval   *syncUUID_ndn;
-        struct berval   *syncCookie;
-        Avlnode         *presentlist;
+        Avlnode                        *presentlist;
+               int                             sync_mode;
                LDAP_LIST_HEAD(np, nonpresent_entry) nonpresentlist;
 } syncinfo_t;
 
-#define IDSTR           "id"
-#define MASTERSTR       "master"
-#define SUFFIXSTR       "suffix"
-#define UPDATEDNSTR            "updatedn"
-#define BINDDNSTR       "binddn"
-#define BINDMETHSTR     "bindmethod"
-#define SIMPLESTR       "simple"
-#define SASLSTR         "sasl"
-#define CREDSTR         "credentials"
-#define OLDAUTHCSTR     "bindprincipal"
-#define AUTHCSTR        "authcID"
-#define AUTHZSTR        "authzID"
-#define SRVTABSTR       "srvtab"
-#define SASLMECHSTR     "saslmech"
-#define REALMSTR        "realm"
-#define SECPROPSSTR     "secprops"
-#define TLSSTR          "tls"
-#define TLSCRITICALSTR  "critical"
-
-#define FILTERSTR       "filter"
-#define SEARCHBASESTR   "searchbase"
-#define SCOPESTR        "scope"
-#define ATTRSSTR        "attrs"
-#define ATTRSONLYSTR    "attrsonly"
-#define TYPESTR         "type"
-#define INTERVALSTR     "interval"
-#define COOKIESTR       "cookie"
-#define LASTMODSTR     "lastmod"
-#define LMREQSTR       "req"
-#define LMGENSTR       "gen"
-#define LMNOSTR                "no"
-
-#endif /* LDAP_SYNCREPL */
-
 struct slap_backend_db {
        BackendInfo     *bd_info;       /* pointer to shared backend info */
 
@@ -1422,29 +1373,39 @@ struct slap_backend_db {
 #define                be_entry_get bd_info->bi_tool_entry_get
 #define                be_entry_put bd_info->bi_tool_entry_put
 #define                be_sync bd_info->bi_tool_sync
+#define                be_dn2id_get bd_info->bi_tool_dn2id_get
+#define                be_id2entry_get bd_info->bi_tool_id2entry_get
+#define                be_entry_modify bd_info->bi_tool_entry_modify
 #endif
 
 #define SLAP_BFLAG_NOLASTMOD           0x0001U
+#define SLAP_BFLAG_NO_SCHEMA_CHECK     0x0002U
 #define        SLAP_BFLAG_GLUE_INSTANCE        0x0010U /* a glue backend */
 #define        SLAP_BFLAG_GLUE_SUBORDINATE     0x0020U /* child of a glue hierarchy */
 #define        SLAP_BFLAG_GLUE_LINKED          0x0040U /* child is connected to parent */
-#define SLAP_BFLAG_ALIASES             0x0100U
-#define SLAP_BFLAG_REFERRALS   0x0200U
-#define SLAP_BFLAG_SUBENTRIES  0x0400U
-#define SLAP_BFLAG_MONITOR             0x1000U
-#define SLAP_BFLAG_DYNAMIC             0x2000U
+#define SLAP_BFLAG_MONITOR                     0x0080U /* a monitor backend */
+#define SLAP_BFLAG_INCREMENT           0x0100U
+#define SLAP_BFLAG_ALIASES                     0x1000U
+#define SLAP_BFLAG_REFERRALS           0x2000U
+#define SLAP_BFLAG_SUBENTRIES          0x4000U
+#define SLAP_BFLAG_DYNAMIC                     0x8000U
        slap_mask_t     be_flags;
 #define SLAP_LASTMOD(be)       (!((be)->be_flags & SLAP_BFLAG_NOLASTMOD))
+#define SLAP_NO_SCHEMA_CHECK(be)       (((be)->be_flags & SLAP_BFLAG_NO_SCHEMA_CHECK))
 #define        SLAP_GLUE_INSTANCE(be)  ((be)->be_flags & SLAP_BFLAG_GLUE_INSTANCE)
 #define        SLAP_GLUE_SUBORDINATE(be) \
        ((be)->be_flags & SLAP_BFLAG_GLUE_SUBORDINATE)
 #define        SLAP_GLUE_LINKED(be)    ((be)->be_flags & SLAP_BFLAG_GLUE_LINKED)
+
+#define SLAP_MONITOR(be)       ((be)->be_flags & SLAP_BFLAG_MONITOR)
+#define SLAP_INCREMENT(be)     ((be)->be_flags & SLAP_BFLAG_INCREMENT)
+
 #define SLAP_ALIASES(be)       ((be)->be_flags & SLAP_BFLAG_ALIASES)
 #define SLAP_REFERRALS(be)     ((be)->be_flags & SLAP_BFLAG_REFERRALS)
 #define SLAP_SUBENTRIES(be)    ((be)->be_flags & SLAP_BFLAG_SUBENTRIES)
-#define SLAP_MONITOR(be)       ((be)->be_flags & SLAP_BFLAG_MONITOR)
 #define SLAP_DYNAMIC(be)       ((be)->be_flags & SLAP_BFLAG_DYNAMIC)
 
+
        slap_mask_t     be_restrictops;         /* restriction operations */
 #define SLAP_RESTRICT_OP_ADD           0x0001U
 #define        SLAP_RESTRICT_OP_BIND           0x0002U
@@ -1472,9 +1433,7 @@ struct slap_backend_db {
 
 #define SLAP_DISALLOW_BIND_ANON                0x0001U /* no anonymous */
 #define SLAP_DISALLOW_BIND_SIMPLE      0x0002U /* simple authentication */
-#define SLAP_DISALLOW_BIND_SIMPLE_UNPROTECTED \
-                                                                       0x0004U /* unprotected simple auth */
-#define SLAP_DISALLOW_BIND_KRBV4       0x0008U /* Kerberos V4 authentication */
+#define SLAP_DISALLOW_BIND_KRBV4       0x0004U /* Kerberos V4 authentication */
 
 #define SLAP_DISALLOW_TLS_2_ANON       0x0010U /* StartTLS -> Anonymous */
 #define SLAP_DISALLOW_TLS_AUTHC                0x0020U /* TLS while authenticated */
@@ -1514,9 +1473,11 @@ struct slap_backend_db {
        void    *be_private;    /* anything the backend database needs     */
 
        void    *be_pb;         /* Netscape plugin */
-#ifdef LDAP_SYNCREPL
+       LDAP_TAILQ_HEAD( pcl, slap_csn_entry )  be_pending_csn_list;
+       ldap_pvt_thread_mutex_t                                 be_pcl_mutex;
+       struct berval                                                   be_context_csn;
+       ldap_pvt_thread_mutex_t                                 be_context_csn_mutex;
        syncinfo_t      *syncinfo;      /* For syncrepl */
-#endif
 };
 
 struct slap_conn;
@@ -1668,6 +1629,10 @@ typedef ID (BI_tool_entry_put) LDAP_P(( BackendDB *be, Entry *e,
                        struct berval *text ));
 typedef int (BI_tool_entry_reindex) LDAP_P(( BackendDB *be, ID id ));
 typedef int (BI_tool_sync) LDAP_P(( BackendDB *be ));
+typedef ID (BI_tool_dn2id_get) LDAP_P(( BackendDB *be, struct berval *dn ));
+typedef int (BI_tool_id2entry_get) LDAP_P(( BackendDB *be, ID id, Entry **e ));
+typedef ID (BI_tool_entry_modify) LDAP_P(( BackendDB *be, Entry *e, 
+                       struct berval *text ));
 
 struct slap_backend_info {
        char    *bi_type; /* type of backend */
@@ -1752,14 +1717,17 @@ struct slap_backend_info {
        BI_connection_destroy   *bi_connection_destroy;
 
        /* hooks for slap tools */
-       BI_tool_entry_open      *bi_tool_entry_open;
-       BI_tool_entry_close     *bi_tool_entry_close;
-       BI_tool_entry_first     *bi_tool_entry_first;
-       BI_tool_entry_next      *bi_tool_entry_next;
-       BI_tool_entry_get       *bi_tool_entry_get;
-       BI_tool_entry_put       *bi_tool_entry_put;
+       BI_tool_entry_open              *bi_tool_entry_open;
+       BI_tool_entry_close             *bi_tool_entry_close;
+       BI_tool_entry_first             *bi_tool_entry_first;
+       BI_tool_entry_next              *bi_tool_entry_next;
+       BI_tool_entry_get               *bi_tool_entry_get;
+       BI_tool_entry_put               *bi_tool_entry_put;
        BI_tool_entry_reindex   *bi_tool_entry_reindex;
-       BI_tool_sync            *bi_tool_sync;
+       BI_tool_sync                    *bi_tool_sync;
+       BI_tool_dn2id_get               *bi_tool_dn2id_get;
+       BI_tool_id2entry_get    *bi_tool_id2entry_get;
+       BI_tool_entry_modify    *bi_tool_entry_modify;
 
 #define SLAP_INDEX_ADD_OP              0x0001
 #define SLAP_INDEX_DELETE_OP   0x0002
@@ -1795,6 +1763,24 @@ typedef struct slap_callback {
        void *sc_private;
 } slap_callback;
 
+struct slap_overinfo;
+
+typedef struct slap_overinst {
+       BackendInfo on_bi;
+       slap_response *on_response;
+       struct slap_overinfo *on_info;
+       struct slap_overinst *on_next;
+} slap_overinst;
+
+typedef struct slap_overinfo {
+       BackendInfo oi_bi;
+       BackendDB oi_bd;
+       slap_overinst *oi_list;
+} slap_overinfo;
+
+/* Should successive callbacks in a chain be processed? */
+#define        SLAP_CB_CONTINUE        0x8000
+
 /*
  * Paged Results state
  */
@@ -1806,8 +1792,7 @@ typedef struct slap_paged_state {
 } PagedResultsState;
 
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-#define LDAP_PSEARCH_BY_ADD            0x01
+#define LDAP_PSEARCH_BY_ADD                    0x01
 #define LDAP_PSEARCH_BY_DELETE         0x02
 #define LDAP_PSEARCH_BY_PREMODIFY      0x03
 #define LDAP_PSEARCH_BY_MODIFY         0x04
@@ -1817,8 +1802,16 @@ struct psid_entry {
        struct slap_op *ps_op;
        LDAP_LIST_ENTRY(psid_entry) ps_link;
 };
-#endif
 
+struct slap_csn_entry {
+       struct berval *csn;
+       unsigned long opid;
+       unsigned long connid;
+#define SLAP_CSN_PENDING       1
+#define SLAP_CSN_COMMIT                2
+       long state;
+       LDAP_TAILQ_ENTRY (slap_csn_entry) csn_link;
+};
 
 /*
  * represents an operation pending from an ldap client
@@ -1915,6 +1908,9 @@ typedef struct slap_op {
        char o_subentries_visibility;
 #define get_subentries_visibility(op)  ((int)(op)->o_subentries_visibility)
 
+       char o_assert;
+#define get_assert(op)                                 ((int)(op)->o_assert)
+
        char o_valuesreturnfilter;
 
 #ifdef LDAP_CONTROL_X_PERMISSIVE_MODIFY
@@ -1931,6 +1927,11 @@ typedef struct slap_op {
 #define get_domainScope(op)                            (0)
 #endif
 
+       char o_preread;
+       char o_postread;
+       AttributeName *o_preread_attrs;
+       AttributeName *o_postread_attrs;
+
 #ifdef LDAP_CONTROL_PAGEDRESULTS
        char o_pagedresults;
 #define get_pagedresults(op)                   ((int)(op)->o_pagedresults)
@@ -1940,18 +1941,6 @@ typedef struct slap_op {
 #define get_pagedresults(op)                   (0)
 #endif
 
-#ifdef LDAP_CLIENT_UPDATE
-       char o_clientupdate;
-       char o_clientupdate_type;
-#define SLAP_LCUP_NONE                         (0x0)
-#define SLAP_LCUP_SYNC                                 (0x1)
-#define SLAP_LCUP_PERSIST                      (0x2)
-#define SLAP_LCUP_SYNC_AND_PERSIST             (0x3)
-       ber_int_t o_clientupdate_interval;
-       struct berval o_clientupdate_state;
-#endif
-
-#ifdef LDAP_SYNC
        char o_sync;
        char o_sync_mode;
 #define SLAP_SYNC_NONE                         (0x0)
@@ -1959,22 +1948,16 @@ typedef struct slap_op {
 #define SLAP_SYNC_PERSIST                      (0x2)
 #define SLAP_SYNC_REFRESH_AND_PERSIST          (0x3)
        struct berval o_sync_state;
-#endif
 
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-       int o_ps_protocol;
        int o_ps_entries;
        LDAP_LIST_ENTRY(slap_op) o_ps_link;
        LDAP_LIST_HEAD(pe, psid_entry) o_pm_list;
-#endif
 
        AuthorizationInformation o_authz;
 
-       BerElement      *o_ber;         /* ber of the request             */
-#ifdef LDAP_CONNECTIONLESS
-       BerElement      *o_res_ber;     /* ber of the reply               */
-#endif
-       slap_callback   *o_callback;    /* callback pointers */
+       BerElement      *o_ber;         /* ber of the request */
+       BerElement      *o_res_ber;     /* ber of the CLDAP reply or readback control */
+       slap_callback *o_callback;      /* callback pointers */
        LDAPControl     **o_ctrls;       /* controls */
 
        void    *o_threadctx;           /* thread pool thread context */
@@ -1987,14 +1970,17 @@ typedef struct slap_op {
        void    *o_private;     /* anything the backend needs */
 
        LDAP_STAILQ_ENTRY(slap_op)      o_next; /* next operation in list         */
-       ValuesReturnFilter *vrFilter; /* Structure represents ValuesReturnFilter */
 
-#ifdef LDAP_CACHING 
-       char            o_caching_on; 
-#endif /*LDAP_CACHING */ 
+       Filter *o_assertion; /* Assert control filter */
+#define get_assertion(op)                              ((op)->o_assertion)
+
+       ValuesReturnFilter *o_vrFilter; /* ValuesReturnFilter */
+
+       syncinfo_t*     o_si;
 
 #ifdef LDAP_SLAPI
        void    *o_pb;                  /* NS-SLAPI plugin */
+       void    *o_extensions;          /* NS-SLAPI plugin */
 #endif
 } Operation;
 
@@ -2113,6 +2099,7 @@ typedef struct slap_conn {
        long    c_n_write;              /* num of write calls */
 
        void    *c_pb;                  /* Netscape plugin */
+       void    *c_extensions;          /* Netscape plugin */
 
        /*
         * These are the "callbacks" that are available for back-ends to
@@ -2195,19 +2182,8 @@ enum {
 #define SLAP_LDAPDN_PRETTY 0x1
 #define SLAP_LDAPDN_MAXLEN 8192
 
-/*
- * Macros for LCUP
- */
-#ifdef LDAP_CLIENT_UPDATE
-#define SLAP_LCUP_STATE_UPDATE_TRUE    1
-#define SLAP_LCUP_STATE_UPDATE_FALSE   0
-#define SLAP_LCUP_ENTRY_DELETED_TRUE   1
-#define SLAP_LCUP_ENTRY_DELETED_FALSE  0
-#endif /* LDAP_CLIENT_UPDATE */
-
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-#define SLAP_SEARCH_MAX_CTRLS   10
-#endif
+/* number of response controls supported */
+#define SLAP_MAX_RESPONSE_CONTROLS   6
 
 #ifdef LDAP_DEVEL
 #define SLAP_CTRL_HIDE                         0x00000000U
index 2eddd5362e30e1c14da3e7816a517d7961f13feb..d93f9d9fd2bf0fa7844f04b40a4314f4f8e29f6a 100644 (file)
@@ -12,16 +12,16 @@ LIBRARY = libslapi.la
 #XLIBRARY = libtmpslapd.a
 
 #all-common: $(LIBRARY) $(PROGRAMS)
-#      @touch plugin.c slapi_pblock.c slapi_utils.c slapi_ops.c
+#      @touch plugin.c slapi_pblock.c slapi_utils.c slapi_ops.c slapi_ext.c
 
 NT_SRCS = nt_err.c
 NT_OBJS = nt_err.lo
 
 LIB_DEFS = -DSLAPI_LIBRARY
 
-SRCS=  plugin.c slapi_pblock.c slapi_utils.c printmsg.c slapi_ops.c \
+SRCS=  plugin.c slapi_pblock.c slapi_utils.c printmsg.c slapi_ops.c slapi_ext.c \
        $(@PLAT@_SRCS)
-OBJS=  plugin.lo slapi_pblock.lo slapi_utils.lo printmsg.lo slapi_ops.lo \
+OBJS=  plugin.lo slapi_pblock.lo slapi_utils.lo printmsg.lo slapi_ops.lo slapi_ext.lo \
        $(@PLAT@_SRCS)
 
 XSRCS= version.c
index 5deb32614713af15847a8a8d73f738107918cdeb..b4e99b988446e07952270cf630d1a04d76bff67c 100644 (file)
@@ -637,8 +637,11 @@ doPluginFNs(
                 * failure (confirmed with SLAPI specification).
                 */
                if ( !SLAPI_PLUGIN_IS_POST_FN( funcType ) && rc != 0 ) {
-                       /* make sure errors are negative */
-                       if ( rc > 0 ) rc = 0 - rc;
+                       /*
+                        * Plugins generally return negative error codes
+                        * to indicate failure, although in the case of
+                        * bind plugins they may return SLAPI_BIND_xxx
+                        */
                        break;
                }
        }
@@ -744,6 +747,10 @@ slapi_init(void)
                return -1;
        }
 
+       if ( slapi_x_init_object_extensions() != 0 ) {
+               return -1;
+       }
+
        return 0;
 }
 
index f697d4e1aee0c8aad57da03b170168b02f6b38b2..f607a17d63a6f36b57277d2b5cb275747f652677 100644 (file)
@@ -220,6 +220,8 @@ extern int compute_evaluator(computed_attr_context *c, char *type, Slapi_Entry *
 extern int slapi_x_compute_output_ber(computed_attr_context *c, Slapi_Attr *a, Slapi_Entry *e);
 extern int slapi_x_compute_get_pblock(computed_attr_context *c, Slapi_PBlock **pb);
 
+extern int slapi_x_access_allowed(Operation *op, Entry *entry, AttributeDescription *desc, struct berval *val, slap_access_t access, AccessControlState *state);
+
 extern ldap_pvt_thread_mutex_t slapi_hn_mutex;
 extern ldap_pvt_thread_mutex_t slapi_time_mutex;
 extern ldap_pvt_thread_mutex_t slapi_printmessage_mutex; 
@@ -311,6 +313,11 @@ extern int slapi_modifyrdn_changelog(char *olddn, char *newRdn, int delRdn,
                char *suffix, char *chNum, Operation* op);
 extern Backend * slapi_cl_get_be(char *dn);
 
+int slapi_x_init_object_extensions(void);
+int slapi_x_free_object_extensions(int objecttype, void *object);
+int slapi_x_create_object_extensions(int objecttype, void *object);
+int slapi_x_clear_object_extensions(int objecttype, void *object);
+
 LDAP_END_DECL
 
 #endif /* _PROTO_SLAPI_H */
index 86d44328778732bd60ca0776fdfa4a245df19e9f..7b7c1fedc8e107c59a6b563a4379cf797aa13543 100644 (file)
@@ -112,6 +112,11 @@ struct _computed_attr_context {
 #define SLAPI_TYPE_CMP_BASE    1
 #define SLAPI_TYPE_CMP_SUBTYPE 2
 
+typedef enum slapi_extension_e {
+       SLAPI_X_EXT_CONNECTION = 0,
+       SLAPI_X_EXT_OPERATION = 1,
+       SLAPI_X_EXT_MAX = 2
+} slapi_extension_t;
 
 /*
  * Was: slapi_pblock.h
@@ -268,6 +273,8 @@ extern Backend * slapi_cl_get_be(char *dn);
 #define SLAPI_X_CONN_CLIENTPATH                        1300
 #define SLAPI_X_CONN_SERVERPATH                        1301
 #define SLAPI_X_CONN_IS_UDP                    1302
+#define SLAPI_X_CONN_SSF                       1303
+#define SLAPI_X_CONN_SASL_CONTEXT              1304
 
 #define SLAPD_AUTH_NONE   "none"
 #define SLAPD_AUTH_SIMPLE "simple"
@@ -391,6 +398,12 @@ extern Backend * slapi_cl_get_be(char *dn);
 #define SLAPI_PLUGIN_SYNTAX_FLAGS              707
 #define SLAPI_PLUGIN_SYNTAX_COMPARE            708
 
+#define SLAPI_PLUGIN_ACL_INIT                  730
+#define SLAPI_PLUGIN_ACL_SYNTAX_CHECK          731
+#define SLAPI_PLUGIN_ACL_ALLOW_ACCESS          732
+#define SLAPI_PLUGIN_ACL_MODS_ALLOWED          733
+#define SLAPI_PLUGIN_ACL_MODS_UPDATE           734
+
 #define SLAPI_OPERATION_AUTHTYPE               741
 #define SLAPI_OPERATION_ID                     742
 #define SLAPI_CONN_CERT                                743
diff --git a/servers/slapd/slapi/slapi_ext.c b/servers/slapd/slapi/slapi_ext.c
new file mode 100644 (file)
index 0000000..c73bec5
--- /dev/null
@@ -0,0 +1,355 @@
+/*
+ * (C) Copyright PADL Software Pty Ltd. 2003
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that this notice is preserved
+ * and that due credit is given to PADL Software Pty Ltd. This software
+ * is provided ``as is'' without express or implied warranty.
+ */
+
+#include "portable.h"
+
+#include <ac/string.h>
+#include <ac/stdarg.h>
+#include <ac/ctype.h>
+#include <ac/unistd.h>
+#include <ldap_pvt.h>
+
+#include <slap.h>
+#include <slapi.h>
+
+#ifdef LDAP_SLAPI
+/*
+ * Object extensions
+ *
+ * We only support two types -- connection and operation extensions.
+ * Define more types in slapi.h
+ */
+
+/* global state */
+struct slapi_registered_extension_set {
+       ldap_pvt_thread_mutex_t mutex;
+       struct slapi_registered_extension {
+               int active;
+               int count;
+               slapi_extension_constructor_fnptr *constructors;
+               slapi_extension_destructor_fnptr *destructors;
+       } extensions[SLAPI_X_EXT_MAX];
+} registered_extensions;
+
+/* per-object state */
+struct slapi_extension_block {
+       void **extensions;
+};
+
+static int getExtensionBlock(int objecttype, void *object, struct slapi_extension_block **eblock, void **parent)
+{
+       switch ((slapi_extension_t) objecttype) {
+       case SLAPI_X_EXT_CONNECTION:
+               *eblock = ((Connection *)object)->c_extensions;
+               *parent = NULL;
+               break;  
+       case SLAPI_X_EXT_OPERATION:
+               *eblock = ((Operation *)object)->o_extensions;
+               *parent = ((Operation *)object)->o_conn;
+               break;  
+       default:
+               return -1;
+               break;
+       }
+
+       if ( *eblock == NULL ) {
+               return -1;
+       }
+
+       return 0;
+}
+
+static int mapExtensionType(const char *objectname, slapi_extension_t *type)
+{
+       if ( strcasecmp( objectname, SLAPI_EXT_CONNECTION ) == 0 ) {
+               *type = SLAPI_X_EXT_CONNECTION;
+       } else if ( strcasecmp( objectname, SLAPI_EXT_OPERATION ) == 0 ) {
+               *type = SLAPI_X_EXT_OPERATION;
+       } else {
+               return -1;
+       }
+
+       return 0;
+}
+
+static void newExtension(struct slapi_extension_block *eblock, int objecttype, void *object, void *parent, int extensionhandle )
+{
+       slapi_extension_constructor_fnptr constructor;
+
+       assert( objecttype < SLAPI_X_EXT_MAX );
+       assert( extensionhandle < registered_extensions.extensions[objecttype].count );
+
+       assert( registered_extensions.extensions[objecttype].constructors != NULL );
+       constructor = registered_extensions.extensions[objecttype].constructors[extensionhandle];
+
+       assert( eblock->extensions[extensionhandle] == NULL );
+
+       if ( constructor != NULL ) {
+               eblock->extensions[extensionhandle] = (*constructor)( object, parent );
+       } else {
+               eblock->extensions[extensionhandle] = NULL;
+       }
+}
+
+static void freeExtension(struct slapi_extension_block *eblock, int objecttype, void *object, void *parent, int extensionhandle )
+{
+       slapi_extension_destructor_fnptr destructor;
+
+       assert( objecttype < SLAPI_X_EXT_MAX );
+       assert( extensionhandle < registered_extensions.extensions[objecttype].count );
+
+       if ( eblock->extensions[extensionhandle] != NULL ) {
+               assert( registered_extensions.extensions[objecttype].destructors != NULL );
+               destructor = registered_extensions.extensions[objecttype].destructors[extensionhandle];
+               if ( destructor != NULL ) {
+                       (*destructor)( eblock->extensions[extensionhandle], object, parent );
+               }
+               eblock->extensions[extensionhandle] = NULL;
+       }
+}
+#endif /* LDAP_SLAPI */
+
+void *slapi_get_object_extension(int objecttype, void *object, int extensionhandle)
+{
+#ifdef LDAP_SLAPI
+       struct slapi_extension_block *eblock;
+       void *parent;
+
+       if ( getExtensionBlock( objecttype, object, &eblock, &parent ) != 0 ) {
+               return NULL;
+       }
+
+       if ( extensionhandle < registered_extensions.extensions[objecttype].count ) {
+               return eblock->extensions[extensionhandle];
+       }
+
+       return NULL;
+#else
+       return NULL;
+#endif /* LDAP_SLAPI */
+}
+
+void slapi_set_object_extension(int objecttype, void *object, int extensionhandle, void *extension)
+{
+#ifdef LDAP_SLAPI
+       struct slapi_extension_block *eblock;
+       void *parent;
+
+       if ( getExtensionBlock( objecttype, object, &eblock, &parent ) != 0 ) {
+               return;
+       }
+
+       if ( extensionhandle < registered_extensions.extensions[objecttype].count ) {
+               /* free the old one */
+               freeExtension( eblock, objecttype, object, parent, extensionhandle );
+
+               /* constructed by caller */
+               eblock->extensions[extensionhandle] = extension;
+       }
+#endif /* LDAP_SLAPI */
+}
+
+int slapi_register_object_extension(
+       const char *pluginname,
+       const char *objectname,
+       slapi_extension_constructor_fnptr constructor,
+       slapi_extension_destructor_fnptr destructor,
+       int *objecttype,
+       int *extensionhandle)
+{
+#ifdef LDAP_SLAPI
+       int rc;
+       slapi_extension_t type;
+       struct slapi_registered_extension *re;
+
+       ldap_pvt_thread_mutex_lock( &registered_extensions.mutex );
+
+       rc = mapExtensionType( objectname, &type );
+       if ( rc != 0 ) {
+               ldap_pvt_thread_mutex_unlock( &registered_extensions.mutex );
+               return rc;
+       }
+
+       *objecttype = (int)type;
+
+       re = &registered_extensions.extensions[*objecttype];
+
+       *extensionhandle = re->count;
+
+       if ( re->active ) {
+               /* can't add new extensions after objects have been created */
+               ldap_pvt_thread_mutex_unlock( &registered_extensions.mutex );
+               return -1;
+       }
+
+       re->count++;
+
+       if ( re->constructors == NULL ) {
+               re->constructors = (slapi_extension_constructor_fnptr *)slapi_ch_calloc( re->count,
+                       sizeof( slapi_extension_constructor_fnptr ) );
+       } else {
+               re->constructors = (slapi_extension_constructor_fnptr *)slapi_ch_realloc( (char *)re->constructors,
+                       re->count * sizeof( slapi_extension_constructor_fnptr ) );
+       }
+       re->constructors[*extensionhandle] = constructor;
+
+       if ( re->destructors == NULL ) {
+               re->destructors = (slapi_extension_destructor_fnptr *)slapi_ch_calloc( re->count,
+                       sizeof( slapi_extension_destructor_fnptr ) );
+       } else {
+               re->destructors = (slapi_extension_destructor_fnptr *)slapi_ch_realloc( (char *)re->destructors,
+                       re->count * sizeof( slapi_extension_destructor_fnptr ) );
+       }
+       re->destructors[*extensionhandle] = destructor;
+
+       ldap_pvt_thread_mutex_unlock( &registered_extensions.mutex );
+
+       return 0;
+#else
+       return -1;
+#endif /* LDAP_SLAPI */
+}
+
+int slapi_x_create_object_extensions(int objecttype, void *object)
+{
+#ifdef LDAP_SLAPI
+       int i, rc;
+       struct slapi_extension_block *eblock;
+       void **peblock;
+       void *parent;
+
+       switch ((slapi_extension_t) objecttype) {
+       case SLAPI_X_EXT_CONNECTION:
+               peblock = &(((Connection *)object)->c_extensions);
+               parent = NULL;
+               break;  
+       case SLAPI_X_EXT_OPERATION:
+               peblock = &(((Operation *)object)->o_extensions);
+               parent = ((Operation *)object)->o_conn;
+               break;
+       default:
+               return -1;
+               break;
+       }
+
+       *peblock = NULL;
+
+       ldap_pvt_thread_mutex_lock( &registered_extensions.mutex );
+       if ( registered_extensions.extensions[objecttype].active == 0 ) {
+               /*
+                * once we've created some extensions, no new extensions can
+                * be registered.
+                */
+               registered_extensions.extensions[objecttype].active = 1;
+       }
+       ldap_pvt_thread_mutex_unlock( &registered_extensions.mutex );
+
+       eblock = (struct slapi_extension_block *)slapi_ch_calloc( 1, sizeof(*eblock) );
+
+       if ( registered_extensions.extensions[objecttype].count ) {
+               eblock->extensions = (void **)slapi_ch_calloc( registered_extensions.extensions[objecttype].count, sizeof(void *) );
+               for ( i = 0; i < registered_extensions.extensions[objecttype].count; i++ ) {
+                       newExtension( eblock, objecttype, object, parent, i );
+               }
+       } else {
+               eblock->extensions = NULL;
+       }
+
+       *peblock = eblock;
+
+       return 0;
+#else
+       return -1;
+#endif
+}
+
+int slapi_x_free_object_extensions(int objecttype, void *object)
+{
+#ifdef LDAP_SLAPI
+       int i, rc;
+       struct slapi_extension_block *eblock;
+       void **peblock;
+       void *parent;
+
+       switch ((slapi_extension_t) objecttype) {
+       case SLAPI_X_EXT_CONNECTION:
+               peblock = &(((Connection *)object)->c_extensions);
+               parent = NULL;
+               break;  
+       case SLAPI_X_EXT_OPERATION:
+               peblock = &(((Operation *)object)->o_extensions);
+               parent = ((Operation *)object)->o_conn;
+               break;  
+       default:
+               return -1;
+               break;
+       }
+
+       eblock = (struct slapi_extension_block *)*peblock;
+
+       if ( eblock->extensions != NULL ) {
+               for ( i = registered_extensions.extensions[objecttype].count - 1; i >= 0; --i ) {
+                       freeExtension( eblock, objecttype, object, parent, i );
+               }
+
+               slapi_ch_free( (void **)&eblock->extensions );
+       }
+
+       slapi_ch_free( peblock );
+
+       return 0;
+#else
+       return -1;
+#endif
+}
+
+/* for reusable object types */
+int slapi_x_clear_object_extensions(int objecttype, void *object)
+{
+#ifdef LDAP_SLAPI
+       int i, rc;
+       struct slapi_extension_block *eblock;
+       void *parent;
+
+       if ( getExtensionBlock( objecttype, object, &eblock, &parent ) != 0 ) {
+               return -1;
+       }
+
+       if ( eblock->extensions == NULL ) {
+               /* no extensions */
+               return 0;
+       }
+
+       for ( i = registered_extensions.extensions[objecttype].count - 1; i >= 0; --i ) {
+               freeExtension( eblock, objecttype, object, parent, i );
+       }
+
+       for ( i = 0; i < registered_extensions.extensions[objecttype].count; i++ ) {
+               newExtension( eblock, objecttype, object, parent, i );
+       }
+
+       return 0;
+#else
+       return -1;
+#endif
+}
+
+int slapi_x_init_object_extensions(void)
+{
+#ifdef LDAP_SLAPI
+       memset( &registered_extensions, 0, sizeof( registered_extensions ) );
+
+       if ( ldap_pvt_thread_mutex_init( &registered_extensions.mutex ) != 0 ) {
+               return -1;
+       }
+
+       return 0;
+#else
+       return -1;
+#endif
+}
index 161d152c15202e3af329769a82ebb871a8181354..514f0e33891802cf2b4fec5996fb789e3dee3ba4 100644 (file)
  */
 
 #include "portable.h"
+
+#include <ac/string.h>
+#include <ac/stdarg.h>
+#include <ac/ctype.h>
+#include <ac/unistd.h>
+
 #include <slap.h>
 #include <lber_pvt.h>
 #include <slapi.h>
  * so it can be used in ACLs
  */
 static struct slap_listener slap_unknown_listener = {
-       BER_BVC("unknown"),     /* FIXME: use a URI form? */
+       BER_BVC("unknown"),     /* FIXME: use a URI form? (e.g. slapi://) */
        BER_BVC("UNKNOWN")
 };
 
-int bvptr2obj( struct berval **bvptr, struct berval **bvobj );
-
 static void
 internal_result_v3(
        Operation       *op, 
@@ -258,9 +262,9 @@ static void slapiConnectionDestroy( Connection **pConn )
  * the strings.
  */
 static int
-values2obj(
+values2obj_copy(
        char **ppValue,
-       BerVarray *bvobj)
+       BerVarray *bvobj )
 {
        int i;
        BerVarray tmpberval;
@@ -278,8 +282,11 @@ values2obj(
                return LDAP_NO_MEMORY;
        }
        for ( i = 0; ppValue[i] != NULL; i++ ) {
-               tmpberval[i].bv_val = ppValue[i];
-               tmpberval[i].bv_len = strlen( ppValue[i] );
+               size_t len = strlen( ppValue[i] );
+
+               tmpberval[i].bv_val = slapi_ch_malloc( len + 1 );
+               AC_MEMCPY( tmpberval[i].bv_val, ppValue[i], len + 1 );
+               tmpberval[i].bv_len = len;
        }
        tmpberval[i].bv_val = NULL;
        tmpberval[i].bv_len = 0;
@@ -289,23 +296,41 @@ values2obj(
        return LDAP_SUCCESS;
 }
 
-static void
-freeMods( Modifications *ml )
+static int
+bvptr2obj_copy(
+       struct berval   **bvptr, 
+       BerVarray       *bvobj )
 {
-       /*
-        * Free a modification list whose values have been 
-        * set with bvptr2obj() or values2obj() (ie. they
-        * do not own the pointer to the underlying values)
-        */
-       Modifications *next;
+       int             rc = LDAP_SUCCESS;
+       int             i;
+       BerVarray       tmpberval;
 
-       for ( ; ml != NULL; ml = next ) {
-               next = ml->sml_next;
+       if ( bvptr == NULL || *bvptr == NULL ) {
+               return LDAP_OTHER;
+       }
 
-               slapi_ch_free( (void **)&ml->sml_bvalues );
-               slapi_ch_free( (void **)&ml->sml_nvalues );
-               slapi_ch_free( (void **)&ml );
+       for ( i = 0; bvptr != NULL && bvptr[i] != NULL; i++ ) {
+               ; /* EMPTY */
        }
+
+       tmpberval = (BerVarray)slapi_ch_malloc( (i + 1)*sizeof(struct berval));
+       if ( tmpberval == NULL ) {
+               return LDAP_NO_MEMORY;
+       } 
+
+       for ( i = 0; bvptr[i] != NULL; i++ ) {
+               tmpberval[i].bv_val = slapi_ch_malloc( bvptr[i]->bv_len );
+               tmpberval[i].bv_len = bvptr[i]->bv_len;
+               AC_MEMCPY( tmpberval[i].bv_val, bvptr[i]->bv_val, bvptr[i]->bv_len );
+       }
+       tmpberval[i].bv_val = NULL;
+       tmpberval[i].bv_len = 0;
+
+       if ( rc == LDAP_SUCCESS ) {
+               *bvobj = tmpberval;
+       }
+
+       return rc;
 }
 
 /*
@@ -338,7 +363,7 @@ LDAPModToEntry(
 
 
        op = (Operation *) slapi_ch_calloc(1, sizeof(Operation));
-       if ( pEntry == NULL) {
+       if ( op == NULL) {
                rc = LDAP_NO_MEMORY;
                goto cleanup;
        }  
@@ -354,17 +379,25 @@ LDAPModToEntry(
        dn.bv_len = strlen(ldn);
 
        rc = dnPrettyNormal( NULL, &dn, &pEntry->e_name, &pEntry->e_nname, NULL );
-       if ( rc != LDAP_SUCCESS )
+       if ( rc != LDAP_SUCCESS ) {
                goto cleanup;
+       }
 
        if ( rc == LDAP_SUCCESS ) {
-               for ( i=0, pMod=mods[0]; rc == LDAP_SUCCESS && pMod != NULL; pMod=mods[++i]) {
+               for ( i = 0, pMod = mods[0]; rc == LDAP_SUCCESS && pMod != NULL; pMod = mods[++i]) {
                        Modifications *mod;
+
                        if ( (pMod->mod_op & LDAP_MOD_BVALUES) != 0 ) {
-                               /* attr values are in berval format */
-                               /* convert an array of pointers to bervals to an array of bervals */
-                               rc = bvptr2obj(pMod->mod_bvalues, &bv);
-                               if (rc != LDAP_SUCCESS) goto cleanup;
+                               /*
+                                * Convert an array of pointers to bervals to
+                                * an array of bervals. Note that we need to copy the
+                                * values too, as the slap_mods_check() will free the
+                                * original values after prettying; the modifications
+                                * being passed in may not have been allocated on the
+                                * heap.
+                                */
+                               rc = bvptr2obj_copy( pMod->mod_bvalues, &bv );
+                               if ( rc != LDAP_SUCCESS ) goto cleanup;
                                tmp.sml_type.bv_val = pMod->mod_type;
                                tmp.sml_type.bv_len = strlen( pMod->mod_type );
                                tmp.sml_bvalues = bv;
@@ -388,8 +421,8 @@ LDAPModToEntry(
                                if ( pMod->mod_values == NULL ) {
                                        rc = LDAP_OTHER;
                                } else {
-                                       rc = values2obj( pMod->mod_values, &bv );
-                                       if (rc != LDAP_SUCCESS) goto cleanup;
+                                       rc = values2obj_copy( pMod->mod_values, &bv );
+                                       if ( rc != LDAP_SUCCESS ) goto cleanup;
                                        tmp.sml_type.bv_val = pMod->mod_type;
                                        tmp.sml_type.bv_len = strlen( pMod->mod_type );
                                        tmp.sml_bvalues = bv;
@@ -436,12 +469,8 @@ LDAPModToEntry(
                                }
                        }
 
-                       /*
-                        * FIXME: slap_mods2entry is declared static 
-                        * in servers/slapd/add.c
-                        */
                        rc = slap_mods2entry( modlist, &pEntry, repl_user,
-                                       &text, textbuf, textlen );
+                                             0, &text, textbuf, textlen );
                        if (rc != LDAP_SUCCESS) {
                                goto cleanup;
                        }
@@ -458,7 +487,7 @@ cleanup:
        if ( op )
                slapi_ch_free( (void **)&op );
        if ( modlist != NULL )
-               freeMods( modlist );
+               slap_mods_free( modlist );
        if ( rc != LDAP_SUCCESS ) {
                if ( pEntry != NULL ) {
                        slapi_entry_free( pEntry );
@@ -567,13 +596,13 @@ cleanup:
 #endif /* LDAP_SLAPI */
 }
 
-Slapi_PBlock * 
-slapi_add_entry_internal(
-       Slapi_Entry *e, 
+#ifdef LDAP_SLAPI
+static Slapi_PBlock * 
+slapi_add_entry_internal_locked(
+       Slapi_Entry **e, 
        LDAPControl **controls, 
        int log_changes ) 
 {
-#ifdef LDAP_SLAPI
        Connection              *pConn = NULL;
        Operation               *op = NULL;
        Slapi_PBlock            *pPB = NULL, *pSavePB = NULL;
@@ -582,7 +611,7 @@ slapi_add_entry_internal(
        int                     isCritical;
        SlapReply               rs = { REP_RESULT };
 
-       if ( e == NULL ) {
+       if ( *e == NULL ) {
                rs.sr_err = LDAP_PARAM_ERROR;
                goto cleanup;
        }
@@ -602,7 +631,7 @@ slapi_add_entry_internal(
        pPB = (Slapi_PBlock *)op->o_pb;
        op->o_ctrls = controls;
 
-       op->o_bd = select_backend( &e->e_nname, manageDsaIt, 0 );
+       op->o_bd = select_backend( &((*e)->e_nname), manageDsaIt, 0 );
        if ( op->o_bd == NULL ) {
                rs.sr_err = LDAP_PARTIAL_RESULTS;
                goto cleanup;
@@ -610,15 +639,17 @@ slapi_add_entry_internal(
 
        op->o_dn = pConn->c_dn = op->o_bd->be_rootdn;
        op->o_ndn = pConn->c_ndn = op->o_bd->be_rootndn;
-       op->oq_add.rs_e = e;
+       op->oq_add.rs_e = *e;
 
        if ( op->o_bd->be_add ) {
                int repl_user = be_isupdate( op->o_bd, &op->o_ndn );
-               if ( !op->o_bd->be_update_ndn.bv_len || repl_user ){
+               if ( !op->o_bd->be_update_ndn.bv_len || repl_user ) {
                        if ( (*op->o_bd->be_add)( op, &rs ) == 0 ) {
                                if ( log_changes ) {
                                        replog( op );
                                }
+                               be_entry_release_w( op, *e );
+                               *e = NULL;
                        }
                } else {
                        rs.sr_err = LDAP_REFERRAL;
@@ -640,12 +671,34 @@ cleanup:
        slapiConnectionDestroy( &pConn );
 
        return( pSavePB );
+}
+#endif /* LDAP_SLAPI */
+
+Slapi_PBlock * 
+slapi_add_entry_internal(
+       Slapi_Entry *e, 
+       LDAPControl **controls, 
+       int log_changes ) 
+{
+#ifdef LDAP_SLAPI
+       Slapi_PBlock *pb;
+       Slapi_Entry *entry;
+
+       /*
+        * We make a copy to avoid an entry that may be freed later
+        * by the caller being placed in the cache.
+        */
+       entry = slapi_entry_dup( e );
+       pb = slapi_add_entry_internal_locked( &entry, controls, log_changes );
+       if ( entry != NULL ) {
+               slapi_entry_free( entry );
+       }
+       return pb;
 #else
        return NULL;
-#endif /* LDAP_SLAPI */
+#endif
 }
 
-
 Slapi_PBlock *
 slapi_add_internal(
        char *dn, 
@@ -673,7 +726,8 @@ slapi_add_internal(
        }
 
        if ( rc == LDAP_SUCCESS ) {
-               if((pEntry = LDAPModToEntry( dn, mods )) == NULL) {
+               pEntry = LDAPModToEntry( dn, mods );
+               if ( pEntry == NULL ) {
                        rc = LDAP_OTHER;
                }
        }
@@ -682,10 +736,10 @@ slapi_add_internal(
                pb = slapi_pblock_new();
                slapi_pblock_set( pb, SLAPI_PLUGIN_INTOP_RESULT, (void *)rc );
        } else {
-               pb = slapi_add_entry_internalpEntry, controls, log_changes );
+               pb = slapi_add_entry_internal_locked( &pEntry, controls, log_changes );
        }
 
-       if ( pEntry ) {
+       if ( pEntry != NULL ) {
                slapi_entry_free(pEntry);
        }
 
@@ -909,7 +963,7 @@ slapi_modify_internal(
                         * convert an array of pointers to bervals
                         * to an array of bervals
                         */
-                       rs.sr_err = bvptr2obj( pMod->mod_bvalues, &bv );
+                       rs.sr_err = bvptr2obj_copy( pMod->mod_bvalues, &bv );
                        if ( rs.sr_err != LDAP_SUCCESS )
                                goto cleanup;
                        tmp.sml_type.bv_val = pMod->mod_type;
@@ -926,7 +980,7 @@ slapi_modify_internal(
                        mod->sml_bvalues = tmp.sml_bvalues;
                        mod->sml_nvalues = tmp.sml_nvalues;
                } else { 
-                       rs.sr_err = values2obj( pMod->mod_values, &bv );
+                       rs.sr_err = values2obj_copy( pMod->mod_values, &bv );
                        if ( rs.sr_err != LDAP_SUCCESS )
                                goto cleanup;
                        tmp.sml_type.bv_val = pMod->mod_type;
@@ -1017,7 +1071,7 @@ cleanup:
                slapi_ch_free( (void **)&dn.bv_val );
 
        if ( modlist != NULL )
-               freeMods( modlist );
+               slap_mods_free( modlist );
 
        if ( pConn != NULL ) {
                pSavePB = pPB;
index 5ddd3fb8d8e215696eb0f2bcd56fcc2136005031..546a241581e6a668547ee43c36013708595114de 100644 (file)
@@ -44,6 +44,8 @@ isOkNetscapeParam( int param )
        case SLAPI_X_CONN_IS_UDP:
        case SLAPI_X_CONN_CLIENTPATH:
        case SLAPI_X_CONN_SERVERPATH:
+       case SLAPI_X_CONN_SSF:
+       case SLAPI_X_CONN_SASL_CONTEXT:
        case SLAPI_IBM_CONN_DN_ALT:
        case SLAPI_IBM_CONN_DN_ORIG:
        case SLAPI_IBM_GSSAPI_CONTEXT:
@@ -201,6 +203,7 @@ isOkNetscapeParam( int param )
        case SLAPI_RESULT_MATCHED:
        case SLAPI_PLUGIN_COMPUTE_EVALUATOR_FN:
        case SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN:
+       case SLAPI_PLUGIN_ACL_ALLOW_ACCESS:
                return LDAP_SUCCESS;
        default:
                return INVALID_PARAM;
index 11fac1bb6ff9477ca5a52651257cd21ed58a87fd..1bc731129214ed72a11406509a3e1f6325407085 100644 (file)
@@ -170,26 +170,17 @@ Slapi_Entry *
 slapi_entry_dup( Slapi_Entry *e ) 
 {
 #ifdef LDAP_SLAPI
-       char            *tmp = NULL;
-       Slapi_Entry     *tmpEnt;
-       int             len = 0;
-       
-       tmp = slapi_entry2str( e, &len );
-       if ( tmp == NULL ) {
-               return (Slapi_Entry *)NULL;
-       }
+       Slapi_Entry *ret;
 
-       tmpEnt = (Slapi_Entry *)str2entry( tmp );
-       if ( tmpEnt == NULL ) { 
-               slapi_ch_free( (void **)&tmp );
-               return (Slapi_Entry *)NULL;
-       }
-       
-       if (tmp != NULL) {
-               slapi_ch_free( (void **)&tmp );
-       }
+       ret = (Slapi_Entry *)slapi_ch_calloc( 1, sizeof(*ret) );
 
-       return tmpEnt;
+       ret->e_id = e->e_id;
+       ber_dupbv( &ret->e_name, &e->e_name );
+       ber_dupbv( &ret->e_nname, &e->e_nname );
+       ret->e_attrs = attrs_dup( e->e_attrs );
+       ret->e_ocflags = e->e_ocflags;
+       ber_dupbv( &ret->e_bv, &e->e_bv );
+       ret->e_private = NULL;
 #else /* LDAP_SLAPI */
        return NULL;
 #endif /* LDAP_SLAPI */
@@ -2264,6 +2255,16 @@ static int initConnectionPB( Slapi_PBlock *pb, Connection *conn )
                        return rc;
        }
 
+       rc = slapi_pblock_set(pb, SLAPI_X_CONN_SSF, (void *)conn->c_ssf);
+       if ( rc != LDAP_SUCCESS )
+               return rc;
+
+       rc = slapi_pblock_set(pb, SLAPI_X_CONN_SASL_CONTEXT,
+               ( conn->c_sasl_authctx != NULL ? conn->c_sasl_authctx :
+                                                conn->c_sasl_sockctx ) );
+       if ( rc != LDAP_SUCCESS )
+               return rc;
+
        return rc;
 }
 #endif /* LDAP_SLAPI */
@@ -3083,14 +3084,14 @@ void slapi_valueset_set_valueset(Slapi_ValueSet *vs1, const Slapi_ValueSet *vs2)
 int slapi_access_allowed( Slapi_PBlock *pb, Slapi_Entry *e, char *attr,
        struct berval *val, int access )
 {
-#ifdef LDAPI_SLAPI
+#ifdef LDAP_SLAPI
        Backend *be;
        Connection *conn;
        Operation *op;
        int ret;
        slap_access_t slap_access;
        AttributeDescription *ad = NULL;
-       char *text;
+       const char *text;
 
        ret = slap_str2ad( attr, &ad, &text );
        if ( ret != LDAP_SUCCESS ) {
@@ -3130,7 +3131,7 @@ int slapi_access_allowed( Slapi_PBlock *pb, Slapi_Entry *e, char *attr,
                return LDAP_PARAM_ERROR;
        }
 
-       ret = access_allowed( be, conn, op, e, desc, val, slap_access, NULL );
+       ret = access_allowed( op, e, ad, val, slap_access, NULL );
 
        return ret ? LDAP_SUCCESS : LDAP_INSUFFICIENT_ACCESS;
 #else
@@ -3142,9 +3143,8 @@ int slapi_acl_check_mods(Slapi_PBlock *pb, Slapi_Entry *e, LDAPMod **mods, char
 {
 #ifdef LDAP_SLAPI
        Operation *op;
-       int ret;
-       Modifications *ml;
-        Modifications *next;
+       int rc = LDAP_SUCCESS;
+       Modifications *ml, *mp;
 
        if ( slapi_pblock_get( pb, SLAPI_OPERATION, (void *)&op ) != 0 ) {
                return LDAP_PARAM_ERROR;
@@ -3155,18 +3155,27 @@ int slapi_acl_check_mods(Slapi_PBlock *pb, Slapi_Entry *e, LDAPMod **mods, char
                return LDAP_OTHER;
        }
 
-       ret = acl_check_modlist( op, e, ml );
+       for ( mp = ml; mp != NULL; mp = mp->sml_next ) {
+               rc = slap_bv2ad( &mp->sml_type, &mp->sml_desc, (const char **)errbuf );
+               if ( rc != LDAP_SUCCESS ) {
+                       break;
+               }
+       }
+
+       if ( rc == LDAP_SUCCESS ) {
+               rc = acl_check_modlist( op, e, ml ) ? LDAP_SUCCESS : LDAP_INSUFFICIENT_ACCESS;
+       }
 
        /* Careful when freeing the modlist because it has pointers into the mods array. */
-       for ( ; ml != NULL; ml = next ) {
-               next = ml->sml_next;
+       for ( ; ml != NULL; ml = mp ) {
+               mp = ml->sml_next;
 
                /* just free the containing array */
                slapi_ch_free( (void **)&ml->sml_bvalues );
                slapi_ch_free( (void **)&ml );
        }
 
-       return ret ? LDAP_SUCCESS : LDAP_INSUFFICIENT_ACCESS;
+       return rc;
 #else
        return LDAP_UNWILLING_TO_PERFORM;
 #endif
@@ -3272,7 +3281,7 @@ Modifications *slapi_x_ldapmods2modifications (LDAPMod **mods)
                }
 
                if ( i == 0 ) {
-                        mod->sml_bvalues = NULL;
+                       mod->sml_bvalues = NULL;
                } else {
                        mod->sml_bvalues = (BerVarray) ch_malloc( (i + 1) * sizeof(struct berval) );
 
@@ -3716,3 +3725,66 @@ int slapi_notify_condvar( Slapi_CondVar *cvar, int notify_all )
 #endif
 }
 
+int slapi_x_access_allowed( Operation *op,
+       Entry *entry,
+       AttributeDescription *desc,
+       struct berval *val,
+       slap_access_t access,
+       AccessControlState *state )
+{
+#ifdef LDAP_SLAPI
+       int rc, slap_access = 0;
+       slapi_acl_callback_t *pGetPlugin, *tmpPlugin;
+
+       if ( op->o_pb == NULL ) {
+               /* internal operation */
+               return 1;
+       }
+
+       slapi_x_pblock_set_operation( op->o_pb, op );
+
+       switch ( access ) {
+       case ACL_WRITE:
+               slap_access |= SLAPI_ACL_ADD | SLAPI_ACL_DELETE | SLAPI_ACL_WRITE;
+               break;
+       case ACL_READ:
+               slap_access |= SLAPI_ACL_READ;
+               break;
+       case ACL_SEARCH:
+               slap_access |= SLAPI_ACL_SEARCH;
+               break;
+       case ACL_COMPARE:
+                slap_access = ACL_COMPARE;
+               break;
+       default:
+               break;
+        }
+
+       rc = getAllPluginFuncs( op->o_bd, SLAPI_PLUGIN_ACL_ALLOW_ACCESS, (SLAPI_FUNC **)&tmpPlugin );
+       if ( rc != LDAP_SUCCESS || tmpPlugin == NULL ) {
+               /* nothing to do; allowed access */
+               return 1;
+       }
+
+       rc = 1; /* default allow policy */
+
+       for ( pGetPlugin = tmpPlugin; *pGetPlugin != NULL; pGetPlugin++ ) {
+               /*
+                * 0    access denied
+                * 1    access granted
+                */
+               rc = (*pGetPlugin)( op->o_pb, entry, desc->ad_cname.bv_val,
+                                       val, slap_access, (void *)state );
+               if ( rc == 0 ) {
+                       break;
+               }
+       }
+
+       slapi_ch_free( (void **)&tmpPlugin );
+
+       return rc;
+#else
+       return 1;
+#endif /* LDAP_SLAPI */
+}
+
index 6bc0b045a9af4669344b8fbcca511e0227fbab0e..120c0aad06f0d2f3c9b74dcb8bd6209c96dfb85d 100644 (file)
 #include "slap.h"
 #include "lutil_ldap.h"
 
-#ifdef LDAP_SYNCREPL
-
 #include "ldap_rq.h"
 
-static Entry*
-syncrepl_message_to_entry ( LDAP *, Operation *, LDAPMessage *,
-               Modifications **, int*, struct berval *, struct berval * );
-
-static int
-syncrepl_entry( LDAP *, Operation*, Entry*, Modifications*,
-               int, struct berval*, struct berval*, int );
-
-static int
-syncrepl_del_nonpresent( LDAP *, Operation * );
-
-static void
-syncrepl_add_glue( LDAP *, Operation*, Entry*, Modifications*, int,
-                  struct berval*, struct berval* );
-
 static void
-syncrepl_updateCookie( LDAP *, Operation *, struct berval *, struct berval * );
-
-static int
-slap_mods_check_syncrepl( Operation *, Modifications **,
-                         const char **, char *, size_t, void *ctx );
-
-static int
-slap_mods_opattrs_syncrepl( Operation *, Modifications *, Modifications **,
-                               const char **, char *, size_t );
-
-static int
-slap_mods2entry_syncrepl( Modifications *, Entry **, int,
-                         const char **, char *, size_t );
+syncrepl_del_nonpresent( LDAP *, Operation * );
 
 /* callback functions */
 static int cookie_callback( struct slap_op *, struct slap_rep * );
 static int dn_callback( struct slap_op *, struct slap_rep * );
 static int nonpresent_callback( struct slap_op *, struct slap_rep * );
 static int null_callback( struct slap_op *, struct slap_rep * );
+static int contextcsn_callback( Operation*, SlapReply* );
 
-static AttributeDescription **add_descs;
-static AttributeDescription **add_descs_lastmod;
-static AttributeDescription **del_descs;
-static AttributeDescription **del_descs_lastmod;
+static AttributeDescription **sync_descs;
 
 struct runqueue_s syncrepl_rq;
 
 void
 init_syncrepl()
 {
-       add_descs = ch_malloc( 2 * sizeof( AttributeDescription * ));
-       add_descs[0] = slap_schema.si_ad_objectClass;
-       add_descs[1] = NULL;
-
-       add_descs_lastmod = ch_malloc( 7 * sizeof( AttributeDescription * ));
-       add_descs_lastmod[0] = slap_schema.si_ad_objectClass;
-       add_descs_lastmod[1] = slap_schema.si_ad_creatorsName;
-       add_descs_lastmod[2] = slap_schema.si_ad_modifiersName;
-       add_descs_lastmod[3] = slap_schema.si_ad_createTimestamp;
-       add_descs_lastmod[4] = slap_schema.si_ad_modifyTimestamp;
-       add_descs_lastmod[5] = slap_schema.si_ad_entryCSN;
-       add_descs_lastmod[6] = NULL;
-
-       del_descs = ch_malloc( 9 * sizeof( AttributeDescription * ));
-       del_descs[0] = slap_schema.si_ad_structuralObjectClass;
-       del_descs[1] = slap_schema.si_ad_subschemaSubentry;
-       del_descs[2] = slap_schema.si_ad_hasSubordinates;
-       del_descs[3] = slap_schema.si_ad_creatorsName;
-       del_descs[4] = slap_schema.si_ad_modifiersName;
-       del_descs[5] = slap_schema.si_ad_createTimestamp;
-       del_descs[6] = slap_schema.si_ad_modifyTimestamp;
-       del_descs[7] = slap_schema.si_ad_entryCSN;
-       del_descs[8] = NULL;
-
-       del_descs_lastmod = ch_malloc( 4 * sizeof( AttributeDescription * ));
-       del_descs_lastmod[0] = slap_schema.si_ad_structuralObjectClass;
-       del_descs_lastmod[1] = slap_schema.si_ad_subschemaSubentry;
-       del_descs_lastmod[2] = slap_schema.si_ad_hasSubordinates;
-       del_descs_lastmod[3] = NULL;
+       sync_descs = ch_malloc( 4 * sizeof( AttributeDescription * ));
+       sync_descs[0] = slap_schema.si_ad_objectClass;
+       sync_descs[1] = slap_schema.si_ad_structuralObjectClass;
+       sync_descs[2] = slap_schema.si_ad_entryCSN;
+       sync_descs[3] = NULL;
+}
+
+int
+ldap_sync_search(
+       syncinfo_t *si,
+       LDAP *ld,
+       LDAPControl **sctrls,
+       LDAPControl **cctrls,
+       int *msgidp )
+{
+       BerElement      *ber;
+       int timelimit;
+       ber_int_t id;
+
+       int rc;
+       BerElement      *sync_ber = NULL;
+       struct berval *sync_bvalp = NULL;
+       LDAPControl c[2];
+       LDAPControl **ctrls;
+       int err;
+       struct timeval timeout;
+
+    /* setup LDAP SYNC control */
+    sync_ber = ber_alloc_t( LBER_USE_DER );
+    ber_set_option( sync_ber, LBER_OPT_BER_MEMCTX, NULL );
+
+    if ( si->syncCookie ) {
+        ber_printf( sync_ber, "{eO}", abs(si->type), si->syncCookie );
+    } else {
+        ber_printf( sync_ber, "{e}", abs(si->type) );
+    }
+
+    if ( ber_flatten( sync_ber, &sync_bvalp ) == LBER_ERROR ) {
+        ber_free( sync_ber, 1 );
+        return LBER_ERROR;
+    }
+    ber_free( sync_ber, 1 );
+
+    ctrls = (LDAPControl**) sl_calloc( 3, sizeof(LDAPControl*), NULL );
+
+    c[0].ldctl_oid = LDAP_CONTROL_SYNC;
+    c[0].ldctl_value = (*sync_bvalp);
+    c[0].ldctl_iscritical = si->type < 0;
+    ctrls[0] = &c[0];
+
+    if ( si->authzId ) {
+        c[1].ldctl_oid = LDAP_CONTROL_PROXY_AUTHZ;
+        c[1].ldctl_value.bv_val = si->authzId;
+        c[1].ldctl_value.bv_len = strlen( si->authzId );
+        c[1].ldctl_iscritical = 1;
+        ctrls[1] = &c[1];
+    } else {
+        ctrls[1] = NULL;
+    }
+
+    ctrls[2] = NULL;
+
+    err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
+
+    ber_bvfree( sync_bvalp );
+    ch_free( ctrls );
+
+    if ( err != LDAP_OPT_SUCCESS )
+        fprintf( stderr, "Could not set controls : %d\n", err );
+
+       timeout.tv_sec = si->tlimit > 0 ? si->tlimit : 1;
+
+       rc = ldap_search_ext( ld, si->base, si->scope, si->filterstr,
+                                                 si->attrs, si->attrsonly, sctrls, cctrls,
+                                                 si->tlimit < 0 ? NULL : &timeout,
+                                                 si->slimit, msgidp );
+
+       return rc;
 }
 
 void *
@@ -120,8 +138,8 @@ do_syncrepl(
        void    *arg )
 {
        struct re_s* rtask = arg;
-       Backend *be = rtask->arg;
-       syncinfo_t *si = ( syncinfo_t * ) be->syncinfo;
+       syncinfo_t *si = ( syncinfo_t * ) rtask->arg;
+       Backend *be = si->be;
 
        SlapReply       rs = {REP_RESULT};
 
@@ -154,12 +172,12 @@ do_syncrepl(
        int             syncstate;
        struct berval   syncUUID = { 0, NULL };
        struct berval   syncCookie = { 0, NULL };
+       struct berval   syncCookie_req = { 0, NULL };
 
        int     rc;
        int     err;
        ber_len_t       len;
        int     syncinfo_arrived = 0;
-       int     cancel_response = 0;
 
        char **tmp = NULL;
        AttributeDescription** descs = NULL;
@@ -187,6 +205,12 @@ do_syncrepl(
        Modifications   *ml, *mlnext;
        char *def_filter_str = NULL;
 
+       const char              *text;
+       int                             match;
+
+       struct timeval *tout_p = NULL;
+       struct timeval tout = { 10, 0 };
+
 #ifdef NEW_LOGGING
        LDAP_LOG ( OPERATION, DETAIL1, "do_syncrepl\n", 0, 0, 0 );
 #else
@@ -201,34 +225,21 @@ do_syncrepl(
                return NULL;
        }
 
+       si->sync_mode = LDAP_SYNC_STATE_MODE;
+
        /* Init connection to master */
 
-       if ( ldap_is_ldap_url( si->masteruri )) {
-               rc = ldap_initialize( &ld, si->masteruri );
-               if ( rc != LDAP_SUCCESS ) {
-#ifdef NEW_LOGGING
-                       LDAP_LOG( OPERATION, ERR, "do_syncrepl: "
-                               "ldap_initialize failed (%s)\n",
-                               si->masteruri, 0, 0 );
-#else
-                       Debug( LDAP_DEBUG_ANY, "do_syncrepl: "
-                               "ldap_initialize failed (%s)\n",
-                               si->masteruri, 0, 0 );
-#endif
-               }
-       } else {
-               ld = ldap_init( si->mastername, si->masterport );
-               if ( ld == NULL ) {
+       rc = ldap_initialize( &ld, si->provideruri );
+       if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG( OPERATION, ERR, "do_syncrepl: "
-                               "ldap_init failed (%s:%d)\n",
-                               si->mastername, si->masterport, 0 );
+               LDAP_LOG( OPERATION, ERR, "do_syncrepl: "
+                       "ldap_initialize failed (%s)\n",
+                       si->provideruri, 0, 0 );
 #else
-                       Debug( LDAP_DEBUG_ANY, "do_syncrepl: "
-                               "ldap_init failed (%s:%d)\n",
-                               si->mastername, si->masterport, 0 );
+               Debug( LDAP_DEBUG_ANY, "do_syncrepl: "
+                       "ldap_initialize failed (%s)\n",
+                       si->provideruri, 0, 0 );
 #endif
-               }
        }
 
        op.o_protocol = LDAP_VERSION3;
@@ -267,11 +278,11 @@ do_syncrepl(
 #ifdef NEW_LOGGING
                                LDAP_LOG ( OPERATION, ERR, "do_bind: Error: "
                                        "ldap_set_option(%s,SECPROPS,\"%s\") failed!\n",
-                                       si->mastername, si->secprops, 0 );
+                                       si->provideruri, si->secprops, 0 );
 #else
                                Debug( LDAP_DEBUG_ANY, "Error: ldap_set_option "
                                        "(%s,SECPROPS,\"%s\") failed!\n",
-                                       si->mastername, si->secprops, NULL );
+                                       si->provideruri, si->secprops, NULL );
 #endif
                                return NULL;
                        }
@@ -288,10 +299,14 @@ do_syncrepl(
                                si->binddn,
                                si->saslmech,
                                NULL, NULL,
-                               LDAP_SASL_AUTOMATIC,
+                               LDAP_SASL_QUIET,
                                lutil_sasl_interact,
                                defaults );
 
+               /* FIXME : different error behaviors according to
+                       1) return code
+                       2) on err policy : exit, retry, backoff ...
+               */
                if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
                        LDAP_LOG ( OPERATION, ERR, "do_syncrepl: "
@@ -322,10 +337,17 @@ do_syncrepl(
                }
        }
 
+       /* set thread context in syncinfo */
        si->ctx = ctx;
 
-       op.o_tmpmemctx = NULL; /* FIXME : to use per-thread mem context */
-       op.o_tmpmfuncs = &ch_mfuncs;
+       /* set memory context */
+#define SLAB_SIZE 1048576
+       memsiz = SLAB_SIZE;
+       memctx = sl_mem_create( memsiz, ctx );
+       op.o_tmpmemctx = memctx;
+       op.o_tmpmfuncs = &sl_mfuncs;
+
+       op.o_si = si;
        op.o_tag = LDAP_REQ_SEARCH;
        op.o_dn = si->updatedn;
        op.o_ndn = si->updatedn;
@@ -338,8 +360,8 @@ do_syncrepl(
        op.o_connid = op.o_conn->c_connid;
        op.ors_scope = LDAP_SCOPE_BASE;
        op.ors_deref = LDAP_DEREF_NEVER;
-       op.ors_slimit = -1;
-       op.ors_tlimit = -1;
+       op.ors_slimit = 0;
+       op.ors_tlimit = 0;
        op.ors_attrsonly = 0;
        op.ors_attrs = NULL;
        op.ors_filter = str2filter( def_filter_str = "(objectClass=*)" );
@@ -377,6 +399,8 @@ do_syncrepl(
        si->syncCookie = NULL;
        be->be_search( &op, &rs );
 
+       ber_dupbv( &syncCookie_req, si->syncCookie );
+
        ch_free( op.o_req_dn.bv_val );
        ch_free( op.o_req_ndn.bv_val );
        filter_free( op.ors_filter );
@@ -384,80 +408,32 @@ do_syncrepl(
 
        psub = be->be_nsuffix[0];
 
-       /* setup LDAP SYNC control */
-       sync_ber = ber_alloc_t( LBER_USE_DER );
-       ber_set_option( sync_ber, LBER_OPT_BER_MEMCTX, &op.o_tmpmemctx );
-
-       if ( si->syncCookie ) {
-               ber_printf( sync_ber, "{eO}", abs(si->type), si->syncCookie );
-       } else {
-               ber_printf( sync_ber, "{e}", abs(si->type) );
-       }
-
-       if ( ber_flatten( sync_ber, &sync_bvalp ) == LBER_ERROR ) {
-               ber_free( sync_ber, 1 );
-               return NULL;
-       }
-       ber_free( sync_ber, 1 );
-
-       sctrls = (LDAPControl**) sl_calloc( 3, sizeof(LDAPControl*), op.o_tmpmemctx );
-
-       c[0].ldctl_oid = LDAP_CONTROL_SYNC;
-       c[0].ldctl_value = (*sync_bvalp);
-       c[0].ldctl_iscritical = si->type < 0;
-       sctrls[0] = &c[0];
-
-       if ( si->authzId ) {
-               c[1].ldctl_oid = LDAP_CONTROL_PROXY_AUTHZ;
-               c[1].ldctl_value.bv_val = si->authzId;
-               c[1].ldctl_value.bv_len = strlen( si->authzId );
-               c[1].ldctl_iscritical = 1;
-               sctrls[1] = &c[1];
-       } else {
-               sctrls[1] = NULL;
-       }
-
-       sctrls[2] = NULL;
-
-       err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, sctrls );
-
-       ber_bvfree( sync_bvalp );
-       ch_free( sctrls );
-
-        if ( err != LDAP_OPT_SUCCESS )
-               fprintf( stderr, "Could not set controls : %d\n", err );
-
-       /* Delete Attributes */
-       if ( si->lastmod == LASTMOD_REQ ) {
-               descs = del_descs_lastmod;
-       } else {
-               descs = del_descs;
-       }
+       for ( n = 0; si->attrs[ n ] != NULL; n++ ) ;
 
-       for ( i = 0; descs[i] != NULL; i++ ) {
-               for ( j = 0; si->attrs[j] != NULL; j++ ) {
-                       if ( !strcmp( si->attrs[j], descs[i]->ad_cname.bv_val )) {
-                               ch_free( si->attrs[j] );
-                               for ( k = j; si->attrs[k] != NULL; k++ ) {
-                                       si->attrs[k] = si->attrs[k+1];
+       if ( n != 0 ) {
+               /* Delete Attributes */
+               descs = sync_descs;
+               for ( i = 0; descs[i] != NULL; i++ ) {
+                       for ( j = 0; si->attrs[j] != NULL; j++ ) {
+                               if ( !strcmp( si->attrs[j], descs[i]->ad_cname.bv_val )) {
+                                       ch_free( si->attrs[j] );
+                                       for ( k = j; si->attrs[k] != NULL; k++ ) {
+                                               si->attrs[k] = si->attrs[k+1];
+                                       }
                                }
                        }
                }
-       }
-
-       /* Add Attributes */
-
-       for ( n = 0; si->attrs[ n ] != NULL; n++ ) ;
-       
-       if ( si->lastmod == LASTMOD_REQ ) {
-               descs = add_descs_lastmod;
+               for ( n = 0; si->attrs[ n ] != NULL; n++ );
+               tmp = ( char ** ) ch_realloc( si->attrs, ( n + 4 ) * sizeof( char * ));
+               if ( tmp == NULL ) {
+#ifdef NEW_LOGGING
+                       LDAP_LOG( OPERATION, ERR, "out of memory\n", 0,0,0 );
+#else
+                       Debug( LDAP_DEBUG_ANY, "out of memory\n", 0,0,0 );
+#endif
+               }
        } else {
-               descs = add_descs;
-       }
-
-       for ( i = 0; descs[i] != NULL; i++ ) {
-               tmp = ( char ** ) ch_realloc( si->attrs,
-                               ( n + 2 ) * sizeof( char * ));
+               tmp = ( char ** ) ch_realloc( si->attrs, 5 * sizeof( char * ));
                if ( tmp == NULL ) {
 #ifdef NEW_LOGGING
                        LDAP_LOG( OPERATION, ERR, "out of memory\n", 0,0,0 );
@@ -465,37 +441,55 @@ do_syncrepl(
                        Debug( LDAP_DEBUG_ANY, "out of memory\n", 0,0,0 );
 #endif
                }
-               si->attrs = tmp;
+               tmp[ n++ ] = ch_strdup( "*" );
+       }
+       
+       descs = sync_descs;
+       si->attrs = tmp;
+
+       /* Add Attributes */
+
+       for ( i = 0; descs[ i ] != NULL; i++ ) {
                si->attrs[ n++ ] = ch_strdup ( descs[i]->ad_cname.bv_val );
                si->attrs[ n ] = NULL;
        }
 
-       /* Send LDAP SYNC search */
-
-       rc = ldap_search_ext( ld, si->base, si->scope, si->filterstr,
-                               si->attrs, si->attrsonly, NULL, NULL,
-                               NULL, -1, &msgid );
+       rc = ldap_sync_search( si, ld, NULL, NULL, &msgid );
+       if( rc != LDAP_SUCCESS ) {
+               fprintf( stderr, "syncrepl: ldap_search_ext: %s (%d)\n",
+                                                       ldap_err2string( rc ), rc );
+               return NULL;
+       }
 
-        if( rc != LDAP_SUCCESS ) {
-                fprintf( stderr, "syncrepl: ldap_search_ext: %s (%d)\n",
-                                       ldap_err2string( rc ), rc );
-                return NULL;
+       if ( abs(si->type) == LDAP_SYNC_REFRESH_AND_PERSIST ){
+               tout_p = &tout;
+       } else {
+               tout_p = NULL;
        }
 
-       while (( rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ONE, NULL, &res )) > 0 ) {
+       while (( rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ONE, tout_p, &res )) >= 0 ) {
+
+               if ( rc == 0 ) {
+                       if ( slapd_abrupt_shutdown ) {
+                               break;
+                       } else {
+                               continue;
+                       }
+               }
 
                for ( msg = ldap_first_message( ld, res );
                      msg != NULL;
                      msg = ldap_next_message( ld, msg ) )
                {
+                       syncCookie.bv_len = 0; syncCookie.bv_val = NULL;
                        switch( ldap_msgtype( msg ) ) {
                        case LDAP_RES_SEARCH_ENTRY:
-                               entry = syncrepl_message_to_entry( ld, &op, msg,
+                               entry = syncrepl_message_to_entry( si, ld, &op, msg,
                                        &modlist, &syncstate, &syncUUID, &syncCookie );
-                               rc_efree = syncrepl_entry( ld, &op, entry, modlist,
+                               rc_efree = syncrepl_entry( si, ld, &op, entry, modlist,
                                                syncstate, &syncUUID, &syncCookie, !syncinfo_arrived );
                                if ( syncCookie.bv_len ) {
-                                       syncrepl_updateCookie( ld, &op, &psub, &syncCookie );
+                                       syncrepl_updateCookie( si, ld, &op, &psub, &syncCookie );
                                }
                                if ( rc_efree )
                                        entry_free( entry );
@@ -530,26 +524,32 @@ do_syncrepl(
                                                ber_scanf( ctrl_ber, "o", &syncCookie );
                                        }
                                }
+                               value_match( &match, slap_schema.si_ad_entryCSN,
+                                                       slap_schema.si_ad_entryCSN->ad_type->sat_ordering,
+                                                       SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
+                                                       &syncCookie_req, &syncCookie, &text );
                                if (si->type == LDAP_SYNC_REFRESH_AND_PERSIST) {
-                                       if ( cancel_response ) {
-                                               if ( syncCookie.bv_len ) {
-                                                       ber_bvfree( si->syncCookie );
-                                                       si->syncCookie = ber_dupbv( NULL, &syncCookie );
-                                               }
-                                               if ( ctrl_ber )
-                                                       ber_free( ctrl_ber, 1 );
-                                               goto done;
-                                       }
-                                       else {
-                                               if ( ctrl_ber )
-                                                       ber_free( ctrl_ber, 1 );
-                                               break;
+                                       /* FIXME : different error behaviors according to
+                                               1) err code : LDAP_BUSY ...
+                                               2) on err policy : stop service, stop sync, retry
+                                       */
+                                       if ( syncCookie.bv_len && match < 0) {
+                                               syncrepl_updateCookie( si, ld, &op, &psub, &syncCookie );
                                        }
+                                       if ( ctrl_ber )
+                                               ber_free( ctrl_ber, 1 );
+                                       goto done;
                                } else {
-                                       if ( syncCookie.bv_len ) {
-                                               syncrepl_updateCookie( ld, &op, &psub, &syncCookie );
+                                       /* FIXME : different error behaviors according to
+                                               1) err code : LDAP_BUSY ...
+                                               2) on err policy : stop service, stop sync, retry
+                                       */
+                                       if ( syncCookie.bv_len && match < 0 ) {
+                                               syncrepl_updateCookie( si, ld, &op, &psub, &syncCookie);
+                                       }
+                                       if ( si->sync_mode == LDAP_SYNC_STATE_MODE && match < 0 ) {
+                                                       syncrepl_del_nonpresent( ld, &op );
                                        }
-                                       syncrepl_del_nonpresent( ld, &op );
                                        if ( ctrl_ber )
                                                ber_free( ctrl_ber, 1 );
                                        goto done;
@@ -564,25 +564,9 @@ do_syncrepl(
                                        res_ber = ber_init( retdata );
                                        ber_scanf( res_ber, "{e" /*"}"*/, &syncstate );
 
-                                       if ( syncstate == LDAP_SYNC_REFRESH_DONE ) {
-                                               syncrepl_del_nonpresent( ld, &op );
-                                       } else if ( syncstate != LDAP_SYNC_NEW_COOKIE ) {
-#ifdef NEW_LOGGING
-                                               LDAP_LOG( OPERATION, ERR,
-                                                       "do_syncrepl : unknown sync info\n", 0, 0, 0 );
-#else
-                                               Debug( LDAP_DEBUG_ANY,
-                                                       "do_syncrepl : unknown sync info\n", 0, 0, 0 );
-#endif
-                                       }
-
                                        if ( ber_peek_tag( res_ber, &len )
                                                                == LDAP_SYNC_TAG_COOKIE ) {
                                                ber_scanf( res_ber, /*"{"*/ "o}", &syncCookie );
-                                               if ( syncCookie.bv_len ) {
-                                                       ber_bvfree( si->syncCookie );
-                                                       si->syncCookie = ber_dupbv( NULL, &syncCookie );
-                                               }
                                        } else {
                                                if ( syncstate == LDAP_SYNC_NEW_COOKIE ) {
 #ifdef NEW_LOGGING
@@ -595,6 +579,35 @@ do_syncrepl(
                                                }
                                        }
 
+                                       value_match( &match, slap_schema.si_ad_entryCSN,
+                                                               slap_schema.si_ad_entryCSN->ad_type->sat_ordering,
+                                                               SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
+                                                               &syncCookie_req, &syncCookie, &text );
+
+                                       if ( syncCookie.bv_len && match < 0 ) {
+                                               syncrepl_updateCookie( si, ld, &op, &psub, &syncCookie);
+                                       }
+
+                                       if ( syncstate == LDAP_SYNC_STATE_MODE_DONE ) {
+                                               if ( match < 0 ) {
+                                                       syncrepl_del_nonpresent( ld, &op );
+                                               }
+                                               si->sync_mode = LDAP_SYNC_LOG_MODE;
+                                       } else if ( syncstate == LDAP_SYNC_LOG_MODE_DONE ) {
+                                               si->sync_mode = LDAP_SYNC_PERSIST_MODE;
+                                       } else if ( syncstate == LDAP_SYNC_REFRESH_DONE ) {
+                                               si->sync_mode = LDAP_SYNC_PERSIST_MODE;
+                                       } else if ( syncstate != LDAP_SYNC_NEW_COOKIE ||
+                                                               syncstate != LDAP_SYNC_LOG_MODE_DONE ) {
+#ifdef NEW_LOGGING
+                                               LDAP_LOG( OPERATION, ERR,
+                                                       "do_syncrepl : unknown sync info\n", 0, 0, 0 );
+#else
+                                               Debug( LDAP_DEBUG_ANY,
+                                                       "do_syncrepl : unknown sync info\n", 0, 0, 0 );
+#endif
+                                       }
+
                                        ldap_memfree( retoid );
                                        ber_bvfree( retdata );
                                        ber_free( res_ber, 1 );
@@ -642,11 +655,14 @@ do_syncrepl(
 done:
        if ( syncCookie.bv_val )
                ch_free( syncCookie.bv_val );
+       if ( syncCookie_req.bv_val )
+               ch_free( syncCookie_req.bv_val );
        if ( syncUUID.bv_val )
                ch_free( syncUUID.bv_val );
 
        if ( res )
                ldap_msgfree( res );
+
        ldap_unbind( ld );
 
        ldap_pvt_thread_mutex_lock( &syncrepl_rq.rq_mutex );
@@ -661,8 +677,9 @@ done:
        return NULL;
 }
 
-static Entry*
+Entry*
 syncrepl_message_to_entry(
+       syncinfo_t      *si,
        LDAP            *ld,
        Operation       *op,
        LDAPMessage     *msg,
@@ -693,8 +710,6 @@ syncrepl_message_to_entry(
        int             rc;
        char            *a;
 
-       syncinfo_t *si = ( syncinfo_t * ) be->syncinfo;
-
        ber_len_t       len;
        LDAPControl*    rctrlp;
        LDAPControl**   rctrls = NULL;
@@ -702,6 +717,10 @@ syncrepl_message_to_entry(
 
        ber_tag_t       tag;
 
+       Modifications *ml = NULL;
+       AttributeDescription** descs;
+       int i;
+
        *modlist = NULL;
 
        if ( ldap_msgtype( msg ) != LDAP_RES_SEARCH_ENTRY ) {
@@ -731,7 +750,7 @@ syncrepl_message_to_entry(
        }
 
        e = ( Entry * ) ch_calloc( 1, sizeof( Entry ));
-       dnPrettyNormal( NULL, &bdn, &e->e_name, &e->e_nname, op->o_tmpmemctx );
+       dnPrettyNormal( NULL, &bdn, &e->e_name, &e->e_nname, NULL );
 
        e->e_attrs = NULL;
 
@@ -748,7 +767,7 @@ syncrepl_message_to_entry(
                mod->sml_desc = NULL;
                mod->sml_type = tmp.sml_type;
                mod->sml_bvalues = tmp.sml_bvalues;
-               mod->sml_nvalues = tmp.sml_bvalues;
+               mod->sml_nvalues = NULL;
 
                *modtail = mod;
                modtail = &mod->sml_next;
@@ -822,7 +841,22 @@ syncrepl_message_to_entry(
 #endif
        }
 
-       rc = slap_mods_check_syncrepl( op, modlist, &text, txtbuf, textlen, NULL );
+       ml = *modlist;
+       while ( ml != NULL ) {
+               AttributeDescription *ad = NULL;
+        rc = slap_bv2ad( &ml->sml_type, &ml->sml_desc, &text );
+
+               if( rc != LDAP_SUCCESS ) {
+                       e = NULL;
+                       goto done;
+               }
+
+               ad = ml->sml_desc;
+               ml->sml_desc = NULL;
+               ml = ml->sml_next;
+       }
+
+       rc = slap_mods_check( *modlist, 1, &text, txtbuf, textlen, NULL );
 
        if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
@@ -835,21 +869,7 @@ syncrepl_message_to_entry(
                return NULL;
        }
        
-       rc = slap_mods_opattrs_syncrepl( op, *modlist, modtail,
-                                        &text,txtbuf, textlen );
-       
-       if( rc != LDAP_SUCCESS ) {
-#ifdef NEW_LOGGING
-               LDAP_LOG( OPERATION, ERR,
-                               "syncrepl_message_to_entry: mods opattrs (%s)\n", text, 0, 0 );
-#else
-               Debug( LDAP_DEBUG_ANY, "syncrepl_message_to_entry: mods opattrs (%s)\n",
-                               text, 0, 0 );
-#endif
-               return NULL;
-       }
-
-       rc = slap_mods2entry_syncrepl( *modlist, &e, 1, &text, txtbuf, textlen );
+       rc = slap_mods2entry( *modlist, &e, 1, 1, &text, txtbuf, textlen);
        if( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, ERR,
@@ -877,8 +897,9 @@ syncuuid_cmp( const void* v_uuid1, const void* v_uuid2 )
        return ( strcmp( uuid1->bv_val, uuid2->bv_val ) );
 }
 
-static int
+int
 syncrepl_entry(
+       syncinfo_t* si,
        LDAP *ld,
        Operation *op,
        Entry* e,
@@ -890,7 +911,6 @@ syncrepl_entry(
 )
 {
        Backend *be = op->o_bd;
-       syncinfo_t *si = ( syncinfo_t * ) be->syncinfo;
        slap_callback   cb;
        struct berval   csn_bv = {0, NULL};
        struct berval   *syncuuid_bv = NULL;
@@ -945,7 +965,9 @@ syncrepl_entry(
        cb.sc_response = dn_callback;
        cb.sc_private = si;
 
-       be->be_search( op, &rs );
+       si->syncUUID_ndn = NULL;
+
+       rc = be->be_search( op, &rs );
 
        ch_free( op->o_req_dn.bv_val );
        ch_free( op->o_req_ndn.bv_val );
@@ -953,16 +975,19 @@ syncrepl_entry(
        ch_free( op->ors_filterstr.bv_val );
 
        cb.sc_response = null_callback;
+       cb.sc_private = si;
 
-       rc = LDAP_SUCCESS;
-
-       if ( si->syncUUID_ndn ) {
+       if ( rc == LDAP_SUCCESS && si->syncUUID_ndn && si->sync_mode != LDAP_SYNC_LOG_MODE ) {
                op->o_req_dn = *si->syncUUID_ndn;
                op->o_req_ndn = *si->syncUUID_ndn;
                op->o_tag = LDAP_REQ_DELETE;
                rc = be->be_delete( op, &rs );
        }
 
+       if ( si->syncUUID_ndn ) {
+               ber_bvfree( si->syncUUID_ndn );
+       }
+
        switch ( syncstate ) {
        case LDAP_SYNC_ADD :
        case LDAP_SYNC_MODIFY :
@@ -971,9 +996,8 @@ syncrepl_entry(
                         rc == LDAP_REFERRAL ||
                         rc == LDAP_NO_SUCH_OBJECT ) {
 
-                       if ( !attr_find( e->e_attrs, slap_schema.si_ad_entryUUID )) {
-                               attr_merge_one( e, slap_schema.si_ad_entryUUID, syncUUID, syncUUID );
-                       }
+                       attr_delete( &e->e_attrs, slap_schema.si_ad_entryUUID );
+                       attr_merge_normalize_one( e, slap_schema.si_ad_entryUUID, syncUUID, op->o_tmpmemctx );
 
                        op->o_tag = LDAP_REQ_ADD;
                        op->ora_e = e;
@@ -988,62 +1012,87 @@ syncrepl_entry(
                                        op->o_req_dn = e->e_name;
                                        op->o_req_ndn = e->e_nname;
                                        rc = be->be_modify( op, &rs );
+                                       si->e = NULL;
+                                       if ( rc != LDAP_SUCCESS ) {
+#ifdef NEW_LOGGING
+                                               LDAP_LOG( OPERATION, ERR,
+                                                       "syncrepl_entry : be_modify failed (%d)\n",
+                                                       rc, 0, 0 );
+#else
+                                               Debug( LDAP_DEBUG_ANY,
+                                                       "syncrepl_entry : be_modify failed (%d)\n",
+                                                       rc, 0, 0 );
+#endif
+                                               return 1;
+                                       }
+                                       return 0;
                                } else if ( rc == LDAP_REFERRAL ||
                                                        rc == LDAP_NO_SUCH_OBJECT ) {
-                                       syncrepl_add_glue(ld, op, e,
+                                       syncrepl_add_glue( si, ld, op, e,
                                                modlist, syncstate,
                                                syncUUID, syncCookie);
+                                       si->e = NULL;
+                                       return 0;
                                } else {
 #ifdef NEW_LOGGING
                                        LDAP_LOG( OPERATION, ERR,
-                                               "be_modify failed (%d)\n",
+                                               "syncrepl_entry : be_add failed (%d)\n",
                                                rc, 0, 0 );
 #else
                                        Debug( LDAP_DEBUG_ANY,
-                                               "be_modify failed (%d)\n",
+                                               "syncrepl_entry : be_add failed (%d)\n",
                                                rc, 0, 0 );
 #endif
+                                       si->e = NULL;
+                                       return 1;
                                }
                        } else {
+                               si->e = NULL;
+                               be_entry_release_w( op, e );
                                return 0;
                        }
                } else {
 #ifdef NEW_LOGGING
                        LDAP_LOG( OPERATION, ERR,
-                               "be_modify/be_delete failed (%d)\n", rc, 0, 0 );
+                               "syncrepl_entry : be_search failed (%d)\n", rc, 0, 0 );
 #else
                        Debug( LDAP_DEBUG_ANY,
-                               "be_modify/be_delete failed (%d)\n", rc, 0, 0 );
+                               "syncrepl_entry : be_search failed (%d)\n", rc, 0, 0 );
 #endif
+                       si->e = NULL;
+                       return 1;
                }
 
-               si->e = NULL;
-               return 1;
-
        case LDAP_SYNC_DELETE :
-               /* Already deleted */
+               if ( si->sync_mode == LDAP_SYNC_LOG_MODE ) {
+                       op->o_req_dn = *si->syncUUID_ndn;
+                       op->o_req_ndn = *si->syncUUID_ndn;
+                       op->o_tag = LDAP_REQ_DELETE;
+                       rc = be->be_delete( op, &rs );
+               }
+               /* Already deleted otherwise */
                return 1;
 
        default :
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, ERR,
-                       "unknown syncstate\n", 0, 0, 0 );
+                       "syncrepl_entry : unknown syncstate\n", 0, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ANY,
-                       "unknown syncstate\n", 0, 0, 0 );
+                       "syncrepl_entry : unknown syncstate\n", 0, 0, 0 );
 #endif
                return 1;
        }
 }
 
-static int
+static void
 syncrepl_del_nonpresent(
        LDAP *ld,
        Operation *op
 )
 {
        Backend* be = op->o_bd;
-       syncinfo_t *si = ( syncinfo_t * ) be->syncinfo;
+       syncinfo_t *si = op->o_si;
        slap_callback   cb;
        struct berval   base_bv = {0, NULL};
        Filter *filter;
@@ -1064,8 +1113,8 @@ syncrepl_del_nonpresent(
        op->o_tag = LDAP_REQ_SEARCH;
        op->ors_scope = si->scope;
        op->ors_deref = LDAP_DEREF_NEVER;
-       op->ors_slimit = -1;
-       op->ors_tlimit = -1;
+       op->ors_slimit = 0;
+       op->ors_tlimit = 0;
        op->ors_attrsonly = 0;
        op->ors_attrs = NULL;
        op->ors_filter = filter;
@@ -1100,11 +1149,14 @@ syncrepl_del_nonpresent(
                ch_free( op->o_req_ndn.bv_val );
        filter_free( op->ors_filter );
        ch_free( op->ors_filterstr.bv_val );
+
+       return;
 }
 
 
-static void
+void
 syncrepl_add_glue(
+       syncinfo_t *si,
        LDAP *ld,
        Operation* op,
        Entry *e,
@@ -1115,7 +1167,6 @@ syncrepl_add_glue(
 )
 {
        Backend *be = op->o_bd;
-       syncinfo_t *si = op->o_callback->sc_private;
        struct berval   uuid_bv = {0, NULL};
        slap_callback cb;
        Attribute       *a;
@@ -1130,6 +1181,7 @@ syncrepl_add_glue(
        Entry   *glue;
        SlapReply       rs = {REP_RESULT};
        Connection *conn = op->o_conn;
+       char* ptr;
 
        op->o_tag = LDAP_REQ_ADD;
        op->o_callback = &cb;
@@ -1139,49 +1191,65 @@ syncrepl_add_glue(
        ber_dupbv( &dn, &e->e_nname );
        ber_dupbv( &pdn, &e->e_nname );
 
+       ptr = dn.bv_val;
        while ( !be_issuffix ( be, &pdn )) {
                dnParent( &dn, &pdn );
-               ch_free( dn.bv_val );
-               ber_dupbv( &dn, &pdn );
+               dn.bv_val = pdn.bv_val;
+               dn.bv_len = pdn.bv_len;
                levels++;
        }
+       ch_free( ptr );
 
        for ( i = 0; i <= levels; i++ ) {
                glue = (Entry*) ch_calloc( 1, sizeof(Entry) );
-               ch_free( dn.bv_val );
-               ch_free( pdn.bv_val );
                ber_dupbv( &dn, &e->e_nname );
-               ber_dupbv( &pdn, &e->e_nname );
                j = levels - i;
+
+               ptr = dn.bv_val;
                for ( k = 0; k < j; k++ ) {
                        dnParent( &dn, &pdn );
-                       ch_free( dn.bv_val );
-                       ber_dupbv( &dn, &pdn );
+                       dn.bv_val = pdn.bv_val;
+                       dn.bv_len = pdn.bv_len;
                }
 
                dnPrettyNormal( 0, &dn, &pdn, &ndn, op->o_tmpmemctx );
                ber_dupbv( &glue->e_name, &pdn );
                ber_dupbv( &glue->e_nname, &ndn );
-               ch_free( dn.bv_val );
+               ch_free( ptr );
                ch_free( pdn.bv_val );
                ch_free( ndn.bv_val );
 
                a = ch_calloc( 1, sizeof( Attribute ));
                a->a_desc = slap_schema.si_ad_objectClass;
+
                a->a_vals = ch_calloc( 3, sizeof( struct berval ));
                ber_str2bv( "top", strlen("top"), 1, &a->a_vals[0] );
                ber_str2bv( "glue", strlen("glue"), 1, &a->a_vals[1] );
                a->a_vals[2].bv_len = 0;
                a->a_vals[2].bv_val = NULL;
+
+               a->a_nvals = ch_calloc( 3, sizeof( struct berval ));
+               ber_str2bv( "top", strlen("top"), 1, &a->a_nvals[0] );
+               ber_str2bv( "glue", strlen("glue"), 1, &a->a_nvals[1] );
+               a->a_nvals[2].bv_len = 0;
+               a->a_nvals[2].bv_val = NULL;
+
                a->a_next = glue->e_attrs;
                glue->e_attrs = a;
 
                a = ch_calloc( 1, sizeof( Attribute ));
                a->a_desc = slap_schema.si_ad_structuralObjectClass;
+
                a->a_vals = ch_calloc( 2, sizeof( struct berval ));
                ber_str2bv( "glue", strlen("glue"), 1, &a->a_vals[0] );
                a->a_vals[1].bv_len = 0;
                a->a_vals[1].bv_val = NULL;
+
+               a->a_nvals = ch_calloc( 2, sizeof( struct berval ));
+               ber_str2bv( "glue", strlen("glue"), 1, &a->a_nvals[0] );
+               a->a_nvals[1].bv_len = 0;
+               a->a_nvals[1].bv_val = NULL;
+
                a->a_next = glue->e_attrs;
                glue->e_attrs = a;
 
@@ -1212,8 +1280,9 @@ syncrepl_add_glue(
        return;
 }
 
-static void
+void
 syncrepl_updateCookie(
+       syncinfo_t *si,
        LDAP *ld,
        Operation *op,
        struct berval *pdn,
@@ -1221,7 +1290,6 @@ syncrepl_updateCookie(
 )
 {
        Backend *be = op->o_bd;
-       syncinfo_t *si = ( syncinfo_t * ) be->syncinfo;
        Modifications *ml;
        Modifications *mlnext;
        Modifications *mod;
@@ -1262,16 +1330,10 @@ syncrepl_updateCookie(
        ber_str2bv( "subentry", strlen("subentry"), 1, &ocbva[1] );
        ber_str2bv( "syncConsumerSubentry",
                        strlen("syncConsumerSubentry"), 1, &ocbva[2] );
-       ocbva[3].bv_len = 0;
-       ocbva[3].bv_val = NULL;
-
-       mod = (Modifications *) ch_malloc( sizeof( Modifications ));
+       mod = (Modifications *) ch_calloc( 1, sizeof( Modifications ));
        mod->sml_op = LDAP_MOD_REPLACE;
-       mod->sml_next = NULL;
-       mod->sml_desc = NULL;
        ber_str2bv( "objectClass", strlen("objectClass"), 1, &mod->sml_type );
        mod->sml_bvalues = ocbva;
-       mod->sml_nvalues = ocbva;
        *modtail = mod;
        modtail = &mod->sml_next;
 
@@ -1279,47 +1341,32 @@ syncrepl_updateCookie(
        sprintf( rdnstr, "cn=%s", substr );
        ber_str2bv( substr, strlen( substr ), 1, &cnbva[0] );
        ber_str2bv( rdnstr, strlen( rdnstr ), 1, &psubrdn );
-       cnbva[1].bv_len = 0;
-       cnbva[1].bv_val = NULL;
-       mod = (Modifications *) ch_malloc( sizeof( Modifications ));
+       mod = (Modifications *) ch_calloc( 1, sizeof( Modifications ));
        mod->sml_op = LDAP_MOD_REPLACE;
-       mod->sml_next = NULL;
-       mod->sml_desc = NULL;
        ber_str2bv( "cn", strlen("cn"), 1, &mod->sml_type );
        mod->sml_bvalues = cnbva;
-       mod->sml_nvalues = cnbva;
        *modtail = mod;
        modtail = &mod->sml_next;
 
        ber_dupbv( &scbva[0], si->syncCookie );
-       scbva[1].bv_len = 0;
-       scbva[1].bv_val = NULL;
-       mod = (Modifications *) ch_malloc( sizeof( Modifications ));
+       mod = (Modifications *) ch_calloc( 1, sizeof( Modifications ));
        mod->sml_op = LDAP_MOD_REPLACE;
-       mod->sml_next = NULL;
-       mod->sml_desc = NULL;
        ber_str2bv( "syncreplCookie", strlen("syncreplCookie"),
                                                1, &mod->sml_type );
        mod->sml_bvalues = scbva;
-       mod->sml_nvalues = scbva;
        *modtail = mod;
        modtail = &mod->sml_next;
 
        ber_str2bv( "{}", strlen("{}"), 1, &ssbva[0] );
-       ssbva[1].bv_len = 0;
-       ssbva[1].bv_val = NULL;
-       mod = (Modifications *) ch_malloc( sizeof( Modifications ));
+       mod = (Modifications *) ch_calloc( 1, sizeof( Modifications ));
        mod->sml_op = LDAP_MOD_REPLACE;
-       mod->sml_next = NULL;
-       mod->sml_desc = NULL;
        ber_str2bv( "subtreeSpecification",
                        strlen("subtreeSpecification"), 1, &mod->sml_type );
        mod->sml_bvalues = ssbva;
-       mod->sml_nvalues = ssbva;
        *modtail = mod;
        modtail = &mod->sml_next;
 
-       rc = slap_mods_check_syncrepl( op, &modlist, &text, txtbuf, textlen, NULL );
+       rc = slap_mods_check( modlist, 1, &text, txtbuf, textlen, NULL );
 
        if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
@@ -1332,7 +1379,13 @@ syncrepl_updateCookie(
        }
 
        op->o_tag = LDAP_REQ_ADD;
-       rc = slap_mods_opattrs_syncrepl( op, modlist, modtail, &text,txtbuf, textlen );
+       rc = slap_mods_opattrs( op, modlist, modtail,
+                                                        &text,txtbuf, textlen );
+
+       for ( ml = modlist; ml != NULL; ml = mlnext ) {
+               mlnext = ml->sml_next;
+               ml->sml_op = LDAP_MOD_REPLACE;
+       }
 
        if( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
@@ -1347,13 +1400,13 @@ syncrepl_updateCookie(
        e = ( Entry * ) ch_calloc( 1, sizeof( Entry ));
 
        build_new_dn( &sub_bv, pdn, &psubrdn );
-       dnPrettyNormal( NULL, &sub_bv, &e->e_name, &e->e_nname, op->o_tmpmemctx );
+       dnPrettyNormal( NULL, &sub_bv, &e->e_name, &e->e_nname, NULL );
        ch_free( sub_bv.bv_val );
        ch_free( psubrdn.bv_val );
 
        e->e_attrs = NULL;
 
-       rc = slap_mods2entry_syncrepl( modlist, &e, 1, &text, txtbuf, textlen );
+       rc = slap_mods2entry( modlist, &e, 1, 1, &text, txtbuf, textlen );
 
        if( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
@@ -1377,6 +1430,7 @@ update_cookie_retry:
        op->o_tag = LDAP_REQ_MODIFY;
        op->orm_modlist = modlist;
        rc = be->be_modify( op, &rs );
+
        if ( rc != LDAP_SUCCESS ) {
                if ( rc == LDAP_REFERRAL ||
                         rc == LDAP_NO_SUCH_OBJECT ) {
@@ -1409,6 +1463,7 @@ update_cookie_retry:
 #endif
                                }
                        } else {
+                               be_entry_release_w( op, e );
                                goto done;
                        }
                } else {
@@ -1435,480 +1490,6 @@ done :
        return;
 }
 
-
-static
-int slap_mods_check_syncrepl(
-       Operation *op,
-       Modifications **mlp,
-       const char **text,
-       char *textbuf,
-       size_t textlen,
-       void *ctx )
-{
-       int rc;
-       Backend *be = op->o_bd;
-       syncinfo_t *si = ( syncinfo_t * ) be->syncinfo;
-       AttributeDescription** descs;
-       int i;
-       Modifications *prevml = NULL;
-       Modifications *nextml = NULL;
-       Modifications *ml = *mlp;
-
-       while ( ml != NULL ) {
-               AttributeDescription *ad = NULL;
-
-               /* convert to attribute description */
-               rc = slap_bv2ad( &ml->sml_type, &ml->sml_desc, text );
-
-               if( rc != LDAP_SUCCESS ) {
-                       snprintf( textbuf, textlen, "%s: %s",
-                                               ml->sml_type.bv_val, *text );
-                       *text = textbuf;
-                       return rc;
-               }
-
-               ad = ml->sml_desc;
-
-               if ( si->lastmod == LASTMOD_REQ ) {
-                       descs = del_descs_lastmod;
-               } else {
-                       descs = del_descs;
-               }
-
-               for ( i = 0; descs[i] != NULL; i++ ) {
-                       if ( ad == descs[i] ) {
-                               if ( prevml == NULL ) {
-                                       mlp = &ml->sml_next;
-                                       prevml = NULL;
-                               } else {
-                                       prevml->sml_next = ml->sml_next;
-                               }
-                               slap_mod_free( &ml->sml_mod, 0 );
-                               nextml = ml->sml_next;
-                               free( ml );
-                               ml = nextml;
-                               continue;
-                       }
-               }
-
-               if( slap_syntax_is_binary( ad->ad_type->sat_syntax )
-                               && !slap_ad_is_binary( ad )) {
-                       /* attribute requires binary transfer */
-                       snprintf( textbuf, textlen,
-                                       "%s: requires ;binary transfer",
-                                       ml->sml_type.bv_val );
-                       *text = textbuf;
-                       return LDAP_UNDEFINED_TYPE;
-               }
-
-               if( !slap_syntax_is_binary( ad->ad_type->sat_syntax )
-                                       && slap_ad_is_binary( ad )) {
-                       /* attribute requires binary transfer */
-                       snprintf( textbuf, textlen,
-                                       "%s: disallows ;binary transfer",
-                                       ml->sml_type.bv_val );
-                       *text = textbuf;
-                       return LDAP_UNDEFINED_TYPE;
-               }
-
-               if( slap_ad_is_tag_range( ad )) {
-                       /* attribute requires binary transfer */
-                       snprintf( textbuf, textlen,
-                                       "%s: inappropriate use of tag range option",
-                                       ml->sml_type.bv_val );
-                       *text = textbuf;
-                       return LDAP_UNDEFINED_TYPE;
-               }
-
-               if ( is_at_obsolete( ad->ad_type ) &&
-                               ( ml->sml_op == LDAP_MOD_ADD || ml->sml_values != NULL ) ) {
-                       /*
-                        * attribute is obsolete,
-                        * only allow replace/delete with no values
-                        */
-                       snprintf( textbuf, textlen,
-                                       "%s: attribute is obsolete",
-                                       ml->sml_type.bv_val );
-                       *text = textbuf;
-                       return LDAP_CONSTRAINT_VIOLATION;
-               }
-
-               /*
-                * check values
-                */
-               if( ml->sml_values != NULL ) {
-                       ber_len_t nvals;
-                       slap_syntax_validate_func *validate =
-                       ad->ad_type->sat_syntax->ssyn_validate;
-                       slap_syntax_transform_func *pretty =
-                       ad->ad_type->sat_syntax->ssyn_pretty;
-
-                       if( !pretty && !validate ) {
-                               *text = "no validator for syntax";
-                               snprintf( textbuf, textlen,
-                                               "%s: no validator for syntax %s",
-                                               ml->sml_type.bv_val,
-                                               ad->ad_type->sat_syntax->ssyn_oid );
-                               *text = textbuf;
-                               return LDAP_INVALID_SYNTAX;
-                       }
-
-                       /*
-                        * check that each value is valid per syntax
-                        * and pretty if appropriate
-                        */
-                       for( nvals = 0; ml->sml_values[nvals].bv_val; nvals++ ) {
-                               struct berval pval = {0, NULL};
-                               if( pretty ) {
-                                       rc = pretty( ad->ad_type->sat_syntax,
-                                                       &ml->sml_values[nvals], &pval, ctx );
-                               } else {
-                                       rc = validate( ad->ad_type->sat_syntax,
-                                                       &ml->sml_values[nvals] );
-                               }
-
-                               if( rc != 0 ) {
-                                       snprintf( textbuf, textlen,
-                                                       "%s: value #%ld invalid per syntax",
-                                                       ml->sml_type.bv_val, (long) nvals );
-                                       *text = textbuf;
-                                       return LDAP_INVALID_SYNTAX;
-                               }
-
-                               if( pretty ) {
-                                       ber_memfree( ml->sml_values[nvals].bv_val );
-                                       ml->sml_values[nvals] = pval;
-                               }
-                       }
-
-                       /*
-                        * a rough single value check... an additional check is needed
-                        * to catch add of single value to existing single valued attribute
-                        */
-                       if ((ml->sml_op == LDAP_MOD_ADD || ml->sml_op == LDAP_MOD_REPLACE)
-                                       && nvals > 1 && is_at_single_value( ad->ad_type )) {
-                               snprintf( textbuf, textlen,
-                                               "%s: multiple values provided",
-                                               ml->sml_type.bv_val );
-                               *text = textbuf;
-                               return LDAP_CONSTRAINT_VIOLATION;
-                       }
-
-                       if( nvals && ad->ad_type->sat_equality &&
-                                       ad->ad_type->sat_equality->smr_normalize ) {
-                               ml->sml_nvalues = ch_malloc( (nvals+1)*sizeof(struct berval) );
-                               for( nvals = 0; ml->sml_values[nvals].bv_val; nvals++ ) {
-                                       rc = ad->ad_type->sat_equality->smr_normalize( 0,
-                                                       ad->ad_type->sat_syntax, ad->ad_type->sat_equality,
-                                                       &ml->sml_values[nvals], &ml->sml_nvalues[nvals], ctx );
-                                       if( rc ) {
-#ifdef NEW_LOGGING
-                                               LDAP_LOG( OPERATION, DETAIL1,
-                                                               "str2entry:  NULL (ssyn_normalize %d)\n", rc, 0, 0 );
-#else
-                                               Debug( LDAP_DEBUG_ANY,
-                                                               "<= str2entry NULL (ssyn_normalize %d)\n", rc, 0, 0 );
-#endif
-                                               snprintf( textbuf, textlen,
-                                                               "%s: value #%ld normalization failed",
-                                                               ml->sml_type.bv_val, (long) nvals );
-                                               *text = textbuf;
-                                               return rc;
-                                       }
-                               }
-                               ml->sml_nvalues[nvals].bv_val = NULL;
-                               ml->sml_nvalues[nvals].bv_len = 0;
-                       }
-               }
-               prevml = ml;
-               ml = ml->sml_next;
-       }
-
-       return LDAP_SUCCESS;
-}
-
-static
-int slap_mods_opattrs_syncrepl(
-       Operation *op,
-       Modifications *mods,
-       Modifications **modtail,
-       const char **text,
-       char *textbuf, size_t textlen )
-{
-       struct berval name = {0, NULL};
-       struct berval timestamp = {0, NULL};
-       struct berval csn = {0, NULL};
-       struct berval nname = {0, NULL};
-       char timebuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
-       char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
-       Modifications *mod;
-       Backend *be = op->o_bd;
-       syncinfo_t *si = ( syncinfo_t * ) be->syncinfo;
-
-       int mop = LDAP_MOD_REPLACE;
-
-       assert( modtail != NULL );
-       assert( *modtail == NULL );
-
-       if( si->lastmod == LASTMOD_GEN ) {
-               struct tm *ltm;
-               time_t now = slap_get_time();
-
-               ldap_pvt_thread_mutex_lock( &gmtime_mutex );
-               ltm = gmtime( &now );
-               lutil_gentime( timebuf, sizeof(timebuf), ltm );
-
-               csn.bv_len = lutil_csnstr( csnbuf, sizeof( csnbuf ), 0, 0 );
-               ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
-               csn.bv_val = csnbuf;
-
-               timestamp.bv_val = timebuf;
-               timestamp.bv_len = strlen(timebuf);
-
-               if( op->o_dn.bv_len == 0 ) {
-                       name.bv_val = SLAPD_ANONYMOUS;
-                       name.bv_len = sizeof(SLAPD_ANONYMOUS)-1;
-                       nname = name;
-               } else {
-                       name = op->o_dn;
-                       nname = op->o_ndn;
-               }
-       }
-
-       if( op->o_tag == LDAP_REQ_ADD ) {
-               struct berval tmpval = {0, NULL};
-
-               if( global_schemacheck ) {
-                       int rc = mods_structural_class( mods, &tmpval,
-                                                                       text, textbuf, textlen );
-                       if( rc != LDAP_SUCCESS ) {
-                               return rc;
-                       }
-
-                       mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
-                       mod->sml_op = mop;
-                       mod->sml_type.bv_val = NULL;
-                       mod->sml_desc = slap_schema.si_ad_structuralObjectClass;
-                       mod->sml_values = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-                       ber_dupbv( &mod->sml_values[0], &tmpval );
-                       mod->sml_values[1].bv_len = 0;
-                       mod->sml_values[1].bv_val = NULL;
-                       assert( mod->sml_values[0].bv_val );
-                       mod->sml_nvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-                       ber_dupbv( &mod->sml_nvalues[0], &tmpval );
-                       mod->sml_nvalues[1].bv_len = 0;
-                       mod->sml_nvalues[1].bv_val = NULL;
-                       assert( mod->sml_nvalues[0].bv_val );
-                       *modtail = mod;
-                       modtail = &mod->sml_next;
-               }
-
-               if( si->lastmod == LASTMOD_GEN ) {
-                       mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
-                       mod->sml_op = mop;
-                       mod->sml_type.bv_val = NULL;
-                       mod->sml_desc = slap_schema.si_ad_creatorsName;
-                       mod->sml_values = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-                       ber_dupbv( &mod->sml_values[0], &name );
-                       mod->sml_values[1].bv_len = 0;
-                       mod->sml_values[1].bv_val = NULL;
-                       assert( mod->sml_values[0].bv_val );
-                       mod->sml_nvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-                       ber_dupbv( &mod->sml_nvalues[0], &nname );
-                       mod->sml_nvalues[1].bv_len = 0;
-                       mod->sml_nvalues[1].bv_val = NULL;
-                       assert( mod->sml_nvalues[0].bv_val );
-                       *modtail = mod;
-                       modtail = &mod->sml_next;
-
-                       mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
-                       mod->sml_op = mop;
-                       mod->sml_type.bv_val = NULL;
-                       mod->sml_desc = slap_schema.si_ad_createTimestamp;
-                       mod->sml_values = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-                       ber_dupbv( &mod->sml_values[0], &timestamp );
-                       mod->sml_values[1].bv_len = 0;
-                       mod->sml_values[1].bv_val = NULL;
-                       assert( mod->sml_values[0].bv_val );
-                       mod->sml_nvalues = NULL;
-                       *modtail = mod;
-                       modtail = &mod->sml_next;
-               }
-       }
-
-       if( si->lastmod == LASTMOD_GEN ) {
-               mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
-               mod->sml_op = mop;
-               mod->sml_type.bv_val = NULL;
-               mod->sml_desc = slap_schema.si_ad_entryCSN;
-               mod->sml_values = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-               ber_dupbv( &mod->sml_values[0], &csn );
-               mod->sml_values[1].bv_len = 0;
-               mod->sml_values[1].bv_val = NULL;
-               assert( mod->sml_values[0].bv_val );
-               mod->sml_nvalues = NULL;
-               *modtail = mod;
-               modtail = &mod->sml_next;
-
-               mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
-               mod->sml_op = mop;
-               mod->sml_type.bv_val = NULL;
-               mod->sml_desc = slap_schema.si_ad_modifiersName;
-               mod->sml_values = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-               ber_dupbv( &mod->sml_values[0], &name );
-               mod->sml_values[1].bv_len = 0;
-               mod->sml_values[1].bv_val = NULL;
-               assert( mod->sml_values[0].bv_val );
-               mod->sml_nvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-               ber_dupbv( &mod->sml_nvalues[0], &nname );
-               mod->sml_nvalues[1].bv_len = 0;
-               mod->sml_nvalues[1].bv_val = NULL;
-               assert( mod->sml_nvalues[0].bv_val );
-               *modtail = mod;
-               modtail = &mod->sml_next;
-
-               mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
-               mod->sml_op = mop;
-               mod->sml_type.bv_val = NULL;
-               mod->sml_desc = slap_schema.si_ad_modifyTimestamp;
-               mod->sml_values = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-               ber_dupbv( &mod->sml_values[0], &timestamp );
-               mod->sml_values[1].bv_len = 0;
-               mod->sml_values[1].bv_val = NULL;
-               assert( mod->sml_values[0].bv_val );
-               mod->sml_nvalues = NULL;
-               *modtail = mod;
-               modtail = &mod->sml_next;
-       }
-
-       *modtail = NULL;
-       return LDAP_SUCCESS;
-}
-
-
-static
-int slap_mods2entry_syncrepl(
-       Modifications *mods,
-       Entry **e,
-       int repl_user,
-       const char **text,
-       char *textbuf, size_t textlen )
-{
-       Attribute **tail = &(*e)->e_attrs;
-       assert( *tail == NULL );
-
-       *text = textbuf;
-
-       for( ; mods != NULL; mods = mods->sml_next ) {
-               Attribute *attr;
-
-               assert( mods->sml_desc != NULL );
-
-               attr = attr_find( (*e)->e_attrs, mods->sml_desc );
-
-               if( attr != NULL ) {
-#define SLURPD_FRIENDLY
-#ifdef SLURPD_FRIENDLY
-                       ber_len_t i,j;
-
-                       if( !repl_user ) {
-                               snprintf( textbuf, textlen,
-                                       "attribute '%s' provided more than once",
-                                       mods->sml_desc->ad_cname.bv_val );
-                               return LDAP_TYPE_OR_VALUE_EXISTS;
-                       }
-
-                       for( i=0; attr->a_vals[i].bv_val; i++ ) {
-                               /* count them */
-                       }
-                       for( j=0; mods->sml_values[j].bv_val; j++ ) {
-                               /* count them */
-                       }
-                       j++;    /* NULL */
-                       
-                       attr->a_vals = ch_realloc( attr->a_vals,
-                               sizeof( struct berval ) * (i+j) );
-
-                       /* should check for duplicates */
-
-                       AC_MEMCPY( &attr->a_vals[i], mods->sml_values,
-                               sizeof( struct berval ) * j );
-
-                       if( attr->a_nvals ) {
-                               attr->a_nvals = ch_realloc( attr->a_nvals,
-                                       sizeof( struct berval ) * (i+j) );
-
-                               AC_MEMCPY( &attr->a_nvals[i], mods->sml_nvalues,
-                                       sizeof( struct berval ) * j );
-
-                               /* trim the mods array */
-                               ch_free( mods->sml_nvalues );
-                               mods->sml_nvalues = NULL;
-                       }
-
-                       continue;
-#else
-                       snprintf( textbuf, textlen,
-                               "attribute '%s' provided more than once",
-                               mods->sml_desc->ad_cname.bv_val );
-                       return LDAP_TYPE_OR_VALUE_EXISTS;
-#endif
-               }
-
-               if( mods->sml_values[1].bv_val != NULL ) {
-                       /* check for duplicates */
-                       int             i, j;
-                       MatchingRule *mr = mods->sml_desc->ad_type->sat_equality;
-
-                       /* check if the values we're adding already exist */
-                       if( mr == NULL || !mr->smr_match ) {
-                               for ( i = 0; mods->sml_bvalues[i].bv_val != NULL; i++ ) {
-                                       /* test asserted values against themselves */
-                                       for( j = 0; j < i; j++ ) {
-                                               if ( bvmatch( &mods->sml_bvalues[i],
-                                                       &mods->sml_bvalues[j] ) ) {
-                                                       /* value exists already */
-                                                       snprintf( textbuf, textlen,
-                                                               "%s: value #%d provided more than once",
-                                                               mods->sml_desc->ad_cname.bv_val, j );
-                                                       return LDAP_TYPE_OR_VALUE_EXISTS;
-                                               }
-                                       }
-                               }
-
-                       } else {
-                               int             rc;
-                               const char      *text = NULL;
-                               char            textbuf[ SLAP_TEXT_BUFLEN ]  = { '\0' };
-                               
-                               rc = modify_check_duplicates( mods->sml_desc, mr,
-                                               NULL, mods->sml_bvalues, 0,
-                                               &text, textbuf, sizeof( textbuf ) );
-
-                               if ( rc != LDAP_SUCCESS ) {
-                                       return rc;
-                               }
-                       }
-               }
-
-               attr = ch_calloc( 1, sizeof(Attribute) );
-
-               /* move ad to attr structure */
-               attr->a_desc = mods->sml_desc;
-
-               /* move values to attr structure */
-               /*      should check for duplicates */
-               attr->a_vals = mods->sml_values;
-
-               attr->a_nvals = mods->sml_nvalues;
-
-               *tail = attr;
-               tail = &attr->a_next;
-       }
-
-       return LDAP_SUCCESS;
-}
-
 void
 avl_ber_bvfree( void *bv )
 {
@@ -1949,9 +1530,23 @@ dn_callback(
 )
 {
        syncinfo_t *si = op->o_callback->sc_private;
-       
+
        if ( rs->sr_type == REP_SEARCH ) {
-               si->syncUUID_ndn = &rs->sr_entry->e_nname;
+               if ( si->syncUUID_ndn != NULL ) {
+#ifdef NEW_LOGGING
+                       LDAP_LOG( OPERATION, ERR,
+                               "dn_callback : multiple entries match dn\n", 0, 0, 0 );
+#else
+                       Debug( LDAP_DEBUG_ANY,
+                               "dn_callback : multiple entries match dn\n", 0, 0, 0 );
+#endif
+               } else {
+                       if ( rs->sr_entry == NULL ) {
+                               si->syncUUID_ndn = NULL;
+                       } else {
+                               si->syncUUID_ndn = ber_dupbv( NULL, &rs->sr_entry->e_nname );
+                       }
+               }
        }
 
        return LDAP_SUCCESS;
@@ -1973,6 +1568,7 @@ nonpresent_callback(
 
        if ( rs->sr_type == REP_RESULT ) {
                count = avl_free( si->presentlist, avl_ber_bvfree );
+               si->presentlist = NULL;
                return LDAP_SUCCESS;
        } else if ( rs->sr_type == REP_SEARCH ) {
                a = attr_find( rs->sr_entry->e_attrs, slap_schema.si_ad_entryUUID );
@@ -2005,6 +1601,8 @@ null_callback(
        SlapReply*      rs
 )
 {
+       syncinfo_t *si = op->o_callback->sc_private;
+
        if ( rs->sr_err != LDAP_SUCCESS &&
                 rs->sr_err != LDAP_REFERRAL &&
                 rs->sr_err != LDAP_ALREADY_EXISTS &&
@@ -2024,7 +1622,7 @@ null_callback(
 
 
 char **
-str2clist( char **out, char *in, const char *brkstr )
+str2clist( char ***out, char *in, const char *brkstr )
 {
        char    *str;
        char    *s;
@@ -2034,11 +1632,16 @@ str2clist( char **out, char *in, const char *brkstr )
        char    **new;
 
        /* find last element in list */
-       for (i = 0; out && out[i]; i++);
-       
+       for (i = 0; *out && *out[i]; i++);
+
        /* protect the input string from strtok */
        str = ch_strdup( in );
 
+       if ( *str == '\0' ) {
+               free( str );
+               return( *out );
+       }
+
        /* Count words in string */
        j=1;
        for ( s = str; *s; s++ ) {
@@ -2047,8 +1650,8 @@ str2clist( char **out, char *in, const char *brkstr )
                }
        }
 
-       out = ch_realloc( out, ( i + j + 1 ) * sizeof( char * ) );
-       new = out + i;
+       *out = ch_realloc( *out, ( i + j + 1 ) * sizeof( char * ) );
+       new = *out + i;
        for ( s = ldap_pvt_strtok( str, brkstr, &lasts );
                s != NULL;
                s = ldap_pvt_strtok( NULL, brkstr, &lasts ) )
@@ -2059,7 +1662,5 @@ str2clist( char **out, char *in, const char *brkstr )
 
        *new = NULL;
        free( str );
-       return( out );
+       return( *out );
 }
-
-#endif
index 63635c819fd7424a5cbd43f51160ce8487cbad49..dbddeb02c025d4a1ba3463578fdc0bcba5ca5ce2 100644 (file)
@@ -46,7 +46,7 @@ SLAPD_OBJS = ../globals.o ../config.o ../ch_malloc.o ../cr.o ../backend.o \
                ../init.o ../controls.o ../kerberos.o ../passwd.o \
                ../index.o ../extended.o ../starttls.o ../sets.o ../mra.o \
                ../referral.o ../backglue.o ../oidm.o ../mods.o ../operation.o \
-               ../cancel.o ../sl_malloc.o
+               ../cancel.o ../sl_malloc.o ../backover.o ../ctxcsn.o
 
 SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
 
index 2b45be055ac9573c6bf799cb7f23b6a2c72d2b6e..9f972115e2d5ef030abf500e3d29efede37b247a 100644 (file)
@@ -13,9 +13,7 @@
 
 #include "../slap.h"
 
-#ifdef LDAP_SYNCREPL
 #include "ldap_rq.h"
-#endif
 
 /* needed by WIN32 and back-monitor */
 time_t starttime;
@@ -82,6 +80,17 @@ slap_send_search_reference( Operation *op, SlapReply *rs )
        return -1;
 }
 
+int slap_read_controls(
+       Operation *op,
+       SlapReply *rs,
+       Entry *e,
+       const struct berval *oid,
+       LDAPControl **c )
+{
+       assert(0);
+       return -1;
+}
+
 int slap_sasl_init(void)
 {
        return LDAP_SUCCESS;
@@ -210,17 +219,6 @@ slap_modrdn2mods(
        return 0;
 }
 
-int
-slap_mods2entry(
-       Modifications *mods,
-       Entry **e,
-       int repl_user,
-       const char **text,
-       char *textbuf, size_t textlen )
-{
-       return 0;
-}
-
 int slap_sasl_getdn( Connection *conn, Operation *op, char *id, int len,
        char *user_realm, struct berval *dn, int flags )
 {
@@ -233,25 +231,11 @@ int slap_sasl_authorized( Operation *op,
        return -1;
 }
 
-int slap_mods_check( Modifications *ml, int update, const char **text,
-       char *textbuf, size_t textlen, void *ctx )
-{
-       return -1;
-}
-
-int slap_mods_opattrs( Operation *op, Modifications *mods,
-       Modifications **modtail, const char **text,
-       char *textbuf, size_t textlen )
-{
-       return -1;
-}
-
 int root_dse_info( Connection *conn, Entry **entry, const char **text )
 {
        return -1;
 }
 
-#ifdef LDAP_SYNCREPL
 struct runqueue_s syncrepl_rq;
 
 void init_syncrepl( )
@@ -264,8 +248,19 @@ void* do_syncrepl( void *ctx, void *arg )
        return NULL;
 }
 
-char** str2clist( char **out, char *in, const char *brkstr )
+char** str2clist( char ***out, char *in, const char *brkstr )
 {
        return NULL;
 }
-#endif
+
+void syncrepl_add_glue( syncinfo_t *si, LDAP *ld, Operation *op, Entry *e,
+                               Modifications *modlist, int syncstate, struct berval* syncUUID,
+                               struct berval* syncCookie )
+{
+       return;
+}
+
+int slap_entry2mods( Entry *e, Modifications **mods, const char **text )
+{
+       return -1;
+}
index 50559180d7c7e3fb5f3fa2423ddef4e43f908c6f..87059a57b558b1c796fabc6beeffac39fae5d4af 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "slapcommon.h"
 
+static char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
+
 int
 main( int argc, char **argv )
 {
@@ -32,6 +34,7 @@ main( int argc, char **argv )
        char textbuf[SLAP_TEXT_BUFLEN] = { '\0' };
        size_t textlen = sizeof textbuf;
 
+       struct berval csn;
 #ifdef NEW_LOGGING
        lutil_log_initialize(argc, argv );
 #endif
@@ -161,12 +164,11 @@ main( int argc, char **argv )
                        char uuidbuf[ LDAP_LUTIL_UUIDSTR_BUFSIZE ];
                        struct berval vals[ 2 ];
 
-                       struct berval name, timestamp, csn;
+                       struct berval name, timestamp;
 
                        struct berval nvals[ 2 ];
                        struct berval nname;
                        char timebuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
-                       char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
 
                        vals[1].bv_len = 0;
                        vals[1].bv_val = NULL;
@@ -249,7 +251,7 @@ main( int argc, char **argv )
                                if( continuemode ) continue;
                                break;
                        }
-               
+
                        if ( verbose ) {
                                fprintf( stderr, "added: \"%s\" (%08lx)\n",
                                        e->e_dn, (long) id );
@@ -263,6 +265,54 @@ main( int argc, char **argv )
                entry_free( e );
        }
 
+       if ( SLAP_LASTMOD(be) && update_ctxcsn == SLAP_TOOL_CTXCSN_BATCH && csn.bv_len > 0 ) {
+               Entry *ctxcsn_e;
+               ID      ctxcsn_id;
+               struct berval   ctxcsn_rdn = { 0, NULL };
+               struct berval   ctxcsn_ndn = { 0, NULL };
+               int ret;
+               struct berval bvtext;
+               Attribute *attr;
+
+               bvtext.bv_len = textlen;
+               bvtext.bv_val = textbuf;
+               bvtext.bv_val[0] = '\0';
+
+               ber_str2bv( "cn=ldapsync", strlen( "cn=ldapsync" ), 0, &ctxcsn_rdn );
+               build_new_dn( &ctxcsn_ndn, &be->be_nsuffix[0], &ctxcsn_rdn );
+               ctxcsn_id = be->be_dn2id_get( be, &ctxcsn_ndn );
+               
+               if ( ctxcsn_id == NOID ) {
+                       ctxcsn_e = slap_create_context_csn_entry( be, &csn );
+                       ctxcsn_id = be->be_entry_put( be, ctxcsn_e, &bvtext );
+                       if( ctxcsn_id == NOID ) {
+                               fprintf( stderr, "%s: could not add ctxcsn subentry\n", progname);
+                               rc = EXIT_FAILURE;
+                       }
+                       if ( verbose ) {
+                               fprintf( stderr, "added: \"%s\" (%08lx)\n", ctxcsn_e->e_dn, (long) ctxcsn_id );
+                       }
+                       entry_free( ctxcsn_e );
+               } else {
+                       ret = be->be_id2entry_get( be, ctxcsn_id, &ctxcsn_e );
+                       if ( ret == LDAP_SUCCESS ) {
+                               attr = attr_find( ctxcsn_e->e_attrs, slap_schema.si_ad_contextCSN );
+                               attr->a_vals[0] = csn;
+                               ctxcsn_id = be->be_entry_modify( be, ctxcsn_e, &bvtext );
+                               if( ctxcsn_id == NOID ) {
+                                       fprintf( stderr, "%s: could not modify ctxcsn subentry\n", progname);
+                                       rc = EXIT_FAILURE;
+                               }
+                               if ( verbose ) {
+                                       fprintf( stderr, "modified: \"%s\" (%08lx)\n", ctxcsn_e->e_dn, (long) ctxcsn_id );
+                               }
+                       } else {
+                               fprintf( stderr, "%s: could not modify ctxcsn subentry\n", progname);
+                               rc = EXIT_FAILURE;
+                       }
+               }
+       }
+
        ch_free( buf );
 
        if( be->be_entry_close( be )) rc = EXIT_FAILURE;
index 02130fdaf79aab6e4d298d4bd3c67eaaffe2a8f7..7aa5d0ed445003f9296b62f421a878798399341f 100644 (file)
@@ -54,6 +54,20 @@ main( int argc, char **argv )
                        continue;
                }
 
+               if ( retrieve_ctxcsn == 0 ) {
+                       if ( is_entry_syncProviderSubentry( e ) ) {
+                               be_entry_release_r( &op, e );
+                               continue;
+                       }
+               }
+
+               if ( retrieve_synccookie == 0 ) {
+                       if ( is_entry_syncConsumerSubentry( e ) ) {
+                               be_entry_release_r( &op, e );
+                               continue;
+                       }
+               }
+
                if( verbose ) {
                        printf( "# id=%08lx\n", (long) id );
                }
index 7e8514f277f57b71cd4813b0aaa393496f6d76fb..c0a2d47a9d3c54db41731aafca4f01855c55c62e 100644 (file)
@@ -23,6 +23,9 @@ char  *progname       = NULL;
 char   *conffile       = SLAPD_DEFAULT_CONFIGFILE;
 int            truncatemode = 0;
 int            verbose         = 0;
+int            update_ctxcsn = SLAP_TOOL_CTXCSN_NONE;
+int            retrieve_ctxcsn = 0;
+int            retrieve_synccookie = 0;
 int            continuemode = 0;
 int            nosubordinates = 0;
 int            dryrun = 0;
@@ -48,11 +51,11 @@ usage( int tool )
 
        switch( tool ) {
        case SLAPADD:
-               options = "\t[-l ldiffile] [-u]\n";
+               options = "\t[-l ldiffile] [-u] [-W] [-w]\n";
                break;
 
        case SLAPCAT:
-               options = "\t[-l ldiffile]\n";
+               options = "\t[-l ldiffile] [-m] [-k]\n";
                break;
 
        case SLAPINDEX:
@@ -100,7 +103,7 @@ slap_tool_init(
 
        switch( tool ) {
        case SLAPADD:
-               options = "b:cd:f:l:n:tuv";
+               options = "b:cd:f:l:n:tuvWw";
                break;
 
        case SLAPINDEX:
@@ -109,7 +112,7 @@ slap_tool_init(
                break;
 
        case SLAPCAT:
-               options = "b:cd:f:l:n:s:v";
+               options = "b:cd:f:kl:mn:s:v";
                mode |= SLAP_TOOL_READMAIN | SLAP_TOOL_READONLY;
                break;
 
@@ -141,10 +144,18 @@ slap_tool_init(
                        conffile = strdup( optarg );
                        break;
 
+               case 'k':       /* Retrieve sync cookie entry */
+                       retrieve_synccookie = 1;
+                       break;
+
                case 'l':       /* LDIF file */
                        ldiffile = strdup( optarg );
                        break;
 
+               case 'm':       /* Retrieve ldapsync entry */
+                       retrieve_ctxcsn = 1;
+                       break;
+
                case 'n':       /* which config file db to index */
                        dbnum = atoi( optarg ) - 1;
                        break;
@@ -166,6 +177,15 @@ slap_tool_init(
                        verbose++;
                        break;
 
+               case 'W':       /* write context csn on every entry add */
+                       update_ctxcsn = SLAP_TOOL_CTXCSN_BATCH;
+                       /* FIXME : update_ctxcsn = SLAP_TOOL_CTXCSN_ENTRY; */
+                       break;
+
+               case 'w':       /* write context csn on at the end */
+                       update_ctxcsn = SLAP_TOOL_CTXCSN_BATCH;
+                       break;
+
                default:
                        usage( tool );
                        break;
index 3a1120ba98caac7a7a0669ab1c2e0be8770430b1..925b9976b185f406d91129d9837b4a02153aec70 100644 (file)
@@ -18,12 +18,18 @@ enum slaptool {
        SLAPTEST        /* database testing tool */
 };
 
+#define SLAP_TOOL_CTXCSN_NONE  0
+#define SLAP_TOOL_CTXCSN_ENTRY 1
+#define SLAP_TOOL_CTXCSN_BATCH 2
 
 extern char    *progname;
 extern char    *conffile;
 extern Backend *be;
 extern int             appendmode;
 extern int             verbose;
+extern int             update_ctxcsn;
+extern int             retrieve_ctxcsn;
+extern int             retrieve_synccookie;
 extern int             continuemode;
 extern int             nosubordinates;
 extern int             dryrun;
index 515436f1a27d1c6a2386e0a852a94a62fe5a938a..372377f084da38ebbe7fdb2eedd6f47c9fc26350 100644 (file)
@@ -34,7 +34,7 @@ usage(const char *s)
                "  -c format\tcrypt(3) salt format\n"
                "  -u\t\tgenerate RFC2307 values (default)\n"
                "  -v\t\tincrease verbosity\n"
-               "  -T file\tread password from verbosity\n"
+               "  -T file\tread file for new password\n"
                , s );
 
        exit( EXIT_FAILURE );
index 4c3a285347fcd652a4a507ae1504ccca581650d5..6f3df19a0f95444217954371795a6984a7248d74 100644 (file)
@@ -442,9 +442,16 @@ parse_replica_line(
     int                gots = 0;
     int                i;
     char       *hp, *val;
+    LDAPURLDesc *ludp;
 
     for ( i = 1; i < cargc; i++ ) {
        if ( !strncasecmp( cargv[ i ], HOSTSTR, sizeof( HOSTSTR ) - 1 ) ) {
+               if ( gots & GOT_HOST ) {
+                       fprintf( stderr, "Error: Malformed \"replica\" line in slapd config " );
+                       fprintf( stderr, "file, too many host or uri names specified, line %d\n",
+                               lineno );
+                       return -1;
+               }       
            val = cargv[ i ] + sizeof( HOSTSTR ); /* '\0' string terminator accounts for '=' */
            if (( hp = strchr( val, ':' )) != NULL ) {
                *hp = '\0';
@@ -456,15 +463,46 @@ parse_replica_line(
            }
            ri->ri_hostname = strdup( val );
            gots |= GOT_HOST;
+       } else if ( !strncasecmp( cargv[ i ], URISTR, sizeof( URISTR ) - 1 ) ) {
+               if ( gots & GOT_HOST ) {
+                       fprintf( stderr, "Error: Malformed \"replica\" line in slapd config " );
+                       fprintf( stderr, "file, too many host or uri names specified, line %d\n",
+                               lineno );
+                       return -1;
+               }               
+               if ( ldap_url_parse( cargv[ i ] + sizeof( URISTR ), &ludp ) != LDAP_SUCCESS ) {
+                       fprintf( stderr, "Error: Malformed \"replica\" line in slapd config " );
+                       fprintf( stderr, "file, bad uri format specified, line %d\n",
+                               lineno );
+                       return -1;
+               }
+               if (ludp->lud_host == NULL) {
+                       fprintf( stderr, "Error: Malformed \"replica\" line in slapd config " );
+                       fprintf( stderr, "file, missing uri hostname, line %d\n",
+                               lineno );
+                       return -1;
+               }
+               ri->ri_hostname = strdup ( ludp->lud_host );
+               ri->ri_port = ludp->lud_port;
+               ri->ri_uri = strdup ( cargv[ i ] + sizeof( URISTR ) );          
+               ldap_free_urldesc( ludp );                              
+           gots |= GOT_HOST;
        } else if ( !strncasecmp( cargv[ i ], 
                        ATTRSTR, sizeof( ATTRSTR ) - 1 ) ) {
            /* ignore it */ ;
        } else if ( !strncasecmp( cargv[ i ], 
                        SUFFIXSTR, sizeof( SUFFIXSTR ) - 1 ) ) {
            /* ignore it */ ;
+       } else if ( !strncasecmp( cargv[i], STARTTLSSTR, sizeof(STARTTLSSTR)-1 )) {
+           val = cargv[ i ] + sizeof( STARTTLSSTR );
+               if( !strcasecmp( val, CRITICALSTR ) ) {
+                       ri->ri_tls = TLS_CRITICAL;
+               } else {
+                       ri->ri_tls = TLS_ON;
+               }
        } else if ( !strncasecmp( cargv[ i ], TLSSTR, sizeof( TLSSTR ) - 1 ) ) {
            val = cargv[ i ] + sizeof( TLSSTR );
-               if( !strcasecmp( val, TLSCRITICALSTR ) ) {
+               if( !strcasecmp( val, CRITICALSTR ) ) {
                        ri->ri_tls = TLS_CRITICAL;
                } else {
                        ri->ri_tls = TLS_ON;
index 1a0ba704a5c55d294e129b0ebbe4740dc424bc35..f501a17cf08f7fac7ca924757e715ea3c51d636e 100644 (file)
@@ -331,6 +331,16 @@ op_ldap_modify(
            nvals = 0;
            nops++;
            break;
+       case T_MODOPINCREMENT:
+           state = T_MODOPINCREMENT;
+           ldmarr = ( LDAPMod ** )
+                   ch_realloc(ldmarr, (( nops + 2 ) * ( sizeof( LDAPMod * ))));
+           ldmarr[ nops ] = ldm = alloc_ldapmod();
+           ldm->mod_op = LDAP_MOD_INCREMENT | LDAP_MOD_BVALUES;
+           ldm->mod_type = value;
+           nvals = 0;
+           nops++;
+           break;
        default:
            if ( state == AWAITING_OP ) {
 #ifdef NEW_LOGGING
@@ -696,6 +706,9 @@ char *type )
     if ( !strcmp( type, T_MODOPDELETESTR )) {
        return( T_MODOPDELETE );
     }
+    if ( !strcmp( type, T_MODOPINCREMENTSTR )) {
+       return( T_MODOPINCREMENT );
+    }
     return( T_ERR );
 }
 
@@ -777,7 +790,31 @@ retry:
        }
        ri->ri_ldp = NULL;
     }
+    
+       if ( ri->ri_uri != NULL ) { /* new URI style */
+#ifdef NEW_LOGGING
+               LDAP_LOG ( OPERATION, ARGS, 
+                       "do_bind: Initializing session to %s\n", 
+                   ri->ri_uri, 0, 0);
+#else
+           Debug( LDAP_DEBUG_ARGS, "Initializing session to %s\n",
+                   ri->ri_uri, 0, 0 );
+#endif
+
+               ldrc = ldap_initialize( &(ri->ri_ldp), ri->ri_uri);
 
+               if (ldrc != LDAP_SUCCESS) {
+#ifdef NEW_LOGGING
+               LDAP_LOG ( OPERATION, ERR, 
+                       "do_bind: ldap_initalize (0, %s) failed: %s\n",
+                       ri->ri_uri, ldap_err2string(ldrc), 0 );
+#else
+               Debug( LDAP_DEBUG_ANY, "Error: ldap_initialize(0, %s) failed: %s\n",
+                       ri->ri_uri, ldap_err2string(ldrc), 0 );
+#endif
+               return( BIND_ERR_OPEN );                
+               }
+       } else { /* old HOST style */
 #ifdef NEW_LOGGING
        LDAP_LOG ( OPERATION, ARGS, 
                "do_bind: Initializing session to %s:%d\n", 
@@ -798,6 +835,7 @@ retry:
                        ri->ri_hostname, ri->ri_port, sys_errlist[ errno ] );
 #endif
                return( BIND_ERR_OPEN );
+    }
     }
 
        {       /* set version 3 */
index 7225783c3937faa5044956c347a0aa8f0afbbf18..a614c4e2f66ffc0d74536dd9a5c127463424cf00 100644 (file)
@@ -212,6 +212,7 @@ Ri_init(
 
     /* Initialize private data */
     (*ri)->ri_hostname = NULL;
+    (*ri)->ri_uri = NULL;
     (*ri)->ri_ldp = NULL;
     (*ri)->ri_bind_dn = NULL;
     (*ri)->ri_password = NULL;
index 43f310dc623d0c0cf0274160840de94716264a49..04db465f3e2eb4111e6645f58c127344b69359ae 100644 (file)
 #define        T_MODOPREPLACE          9
 #define        T_MODOPDELETESTR        "delete"
 #define        T_MODOPDELETE           10
+#define        T_MODOPINCREMENTSTR     "increment"
+#define        T_MODOPINCREMENT        11
 #define        T_MODSEPSTR             "-"
-#define        T_MODSEP                11
+#define        T_MODSEP                12
 
 #define        T_NEWRDNSTR             "newrdn"
 #define        T_DELOLDRDNSTR  "deleteoldrdn"
 
 /* Config file keywords */
 #define        HOSTSTR                 "host"
+#define        URISTR                  "uri"
 #define        ATTRSTR                 "attr"
 #define        SUFFIXSTR               "suffix"
 #define        BINDDNSTR               "binddn"
 #define        SASLMECHSTR             "saslmech"
 #define        REALMSTR                "realm"
 #define        SECPROPSSTR             "secprops"
+#define STARTTLSSTR            "starttls"
 #define TLSSTR                 "tls"
-#define TLSCRITICALSTR "critical"
+#define CRITICALSTR            "critical"
 
 #define        REPLICA_SLEEP_TIME      ( 10 )
 
@@ -213,6 +217,7 @@ struct ri {
     /* Private data */
     char       *ri_hostname;           /* canonical hostname of replica */
     int                ri_port;                /* port where slave slapd running */
+    char       *ri_uri;                /* e.g. "ldaps://ldap-1.example.com:636" */
     LDAP       *ri_ldp;                /* LDAP struct for this replica */
     int                ri_tls;                 /* TLS: 0=no, 1=yes, 2=critical */
     int                ri_bind_method;         /* AUTH_SIMPLE or AUTH_KERBEROS */
index a2b48b948a41e3aebc3bd987fc9aa06f799d7eef..17eb1592ca5a9a0b6be13e8ef0cbc6f45c35e2f9 100644 (file)
@@ -8,9 +8,16 @@ BUILD_BDB=@BUILD_BDB@
 BUILD_HDB=@BUILD_HDB@
 BUILD_LDBM=@BUILD_LDBM@
 BUILD_MONITOR=@BUILD_MONITOR@
+BUILD_CACHE=@BUILD_CACHE@
 
 test: tests
-tests: bdb hdb ldbm
+tests: int-bdb
+
+int-bdb: test-bdb
+       @$(MAKE) int-hdb
+int-hdb: test-hdb
+       @$(MAKE) int-ldbm
+int-ldbm: test-ldbm
 
 bdb: test-bdb
 test-bdb:      FORCE
@@ -20,7 +27,7 @@ test-bdb:     FORCE
        @if test "$(BUILD_BDB)" != "no"; then \
                echo "Initiating LDAP tests for BDB..." ; \
                $(MKDIR) test-db test-repl || true; \
-               $(srcdir)/scripts/all $(srcdir) bdb $(BUILD_BDB) $(BUILD_MONITOR) ; \
+               $(srcdir)/scripts/all $(srcdir) bdb $(BUILD_BDB) $(BUILD_MONITOR) $(BUILD_CACHE) ; \
        else \
                echo "run configure with --enable-bdb" ; \
        fi
@@ -33,7 +40,7 @@ test-hdb:     FORCE
        @if test "$(BUILD_HDB)" != "no" ; then \
                echo "Initiating LDAP tests for HDB..." ; \
                $(MKDIR) test-db test-repl || true; \
-               $(srcdir)/scripts/all $(srcdir) hdb $(BUILD_HDB) $(BUILD_MONITOR) ; \
+               $(srcdir)/scripts/all $(srcdir) hdb $(BUILD_HDB) $(BUILD_MONITOR) $(BUILD_CACHE) ; \
        else \
                echo "run configure with --enable-hdb" ; \
        fi
@@ -46,7 +53,7 @@ test-ldbm:    FORCE
        @if test "$(BUILD_LDBM)" != "no"; then \
                echo "Initiating LDAP tests for LDBM..." ; \
                $(MKDIR) test-db test-repl || true; \
-               $(srcdir)/scripts/all $(srcdir) ldbm $(BUILD_LDBM) $(BUILD_MONITOR); \
+               $(srcdir)/scripts/all $(srcdir) ldbm $(BUILD_LDBM) $(BUILD_MONITOR) $(BUILD_CACHE); \
        else \
                echo "run configure with --enable-ldbm" ; \
        fi
@@ -70,9 +77,9 @@ test-nis-schema-ldbm:
        $(srcdir)/scripts/startup_nis_ldap_server.sh $(srcdir) ldbm
 
 clean-local:   FORCE
-       -$(RM) -r test-db/[!C]* test-repl/[!C]* *leak *gmon *core
+       -$(RM) -r test-db/[!C]* test-repl/[!C]* test-cache/[!C]* *leak *gmon *core
 
 veryclean-local: FORCE
        @-$(RM) data schema ucdata
-       -$(RM) -r test-db test-repl
+       -$(RM) -r test-db test-repl test-cache
 
index 1b7d849b0671cfc205d9a90202e27b78d16362e0..60e3f28365f490a34ceb312b3a754c480702691c 100644 (file)
@@ -119,17 +119,16 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectclass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=Univers
- ity of Michigan,c=US
-member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Univ
- ersity of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
+objectclass: groupofuniquenames
+uniquemember: cn=Manager,o=University of Michigan,c=US
+uniquemember: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=U
+ niversity of Michigan,c=US
+uniquemember: cn=James A Jones 2,ou=Information Technology Division,ou=People,
+ o=University of Michigan,c=US
+uniquemember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive
+ rsity of Michigan,c=US
+uniquemember: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University 
  of Michigan,c=US
-member: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Mic
- higan,c=US
-ou: Groups
 
 dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Universi
  ty of Michigan,c=US
@@ -178,7 +177,10 @@ description: Manager of the directory
 
 dn: ou=People,o=University of Michigan,c=US
 objectclass: organizationalUnit
+objectClass: extensibleObject
 ou: People
+uidNumber: 0
+gidNumber: 0
 
 dn: o=University of Michigan,c=US
 objectclass: organization
index 8e348a429c94de2bc59abe71e98735d95b30b4ca..e02147d7831c408a2b5c16e25efedb743a5a1f3e 100644 (file)
@@ -117,14 +117,14 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectclass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
+objectclass: groupofuniquenames
+uniquemember: cn=Manager,o=University of Michigan,c=US
+uniquemember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive
+ rsity of Michigan,c=US
+uniquemember: cn=Dorothy Stevens,ou=Alumni Association,ou=People,o=University 
+ of Michigan,c=US
+uniquemember: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University 
  of Michigan,c=US
-member: cn=Dorothy Stevens,ou=Alumni Association,ou=People,o=University of Mic
- higan,c=US
-member: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Mic
- higan,c=US
 
 dn: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Michiga
  n,c=US
@@ -230,7 +230,10 @@ telephonenumber: +1 313 555 4177
 
 dn: ou=People,o=University of Michigan,c=US
 objectclass: organizationalUnit
+objectclass: extensibleObject
 ou: People
+uidNumber: 1
+gidNumber: -1
 
 dn: o=University of Michigan,c=US
 objectclass: organization
index eb83c1c3c061baab69c39ce3ee274b3e68c4e9eb..ae5444838b1a67c17a2600f8e6820840c812ab17 100644 (file)
@@ -120,14 +120,14 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectclass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=Univers
- ity of Michigan,c=US
-member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Univ
- ersity of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
- of Michigan,c=US
+objectclass: groupofuniquenames
+uniquemember: cn=Manager,o=University of Michigan,c=US
+uniquemember: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=U
niversity of Michigan,c=US
+uniquemember: cn=James A Jones 2,ou=Information Technology Division,ou=People,
o=University of Michigan,c=US
+uniquemember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive
rsity of Michigan,c=US
 
 dn: cn=James A Jones II,ou=Information Technology Division,ou=People,o=Univ
  ersity of Michigan,c=US
@@ -253,7 +253,10 @@ telephonenumber: +1 313 555 4177
 
 dn: ou=People,o=University of Michigan,c=US
 objectclass: organizationalUnit
+objectclass: extensibleObject
 ou: People
+uidNumber: 0
+gidNumber: 0
 
 dn: o=University of Michigan,c=US
 objectclass: organization
index e5ffa8e9cd41d4d997699ea567fa14c8a4a4210f..55ab5dea678979371e0662868a0cbcfe6e042ab0 100644 (file)
@@ -119,14 +119,14 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectclass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=Univers
- ity of Michigan,c=US
-member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Univ
- ersity of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
- of Michigan,c=US
+objectclass: groupofuniquenames
+uniquemember: cn=Manager,o=University of Michigan,c=US
+uniquemember: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=U
niversity of Michigan,c=US
+uniquemember: cn=James A Jones 2,ou=Information Technology Division,ou=People,
o=University of Michigan,c=US
+uniquemember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive
rsity of Michigan,c=US
 
 dn: cn=James A Jones II,ou=Information Technology Division,ou=People,o=Univers
  ity of Michigan,c=US
@@ -251,7 +251,10 @@ telephonenumber: +1 313 555 4177
 
 dn: ou=People,o=University of Michigan,c=US
 objectclass: organizationalUnit
+objectclass: extensibleObject
 ou: People
+uidNumber: 0
+gidNumber: 0
 
 dn: o=University of Michigan,c=US
 objectclass: organization
index 7e409424daff3cb0ddae82c562cab4cc58ac983f..20e2a7e6e7750fd3e353f3d0191e88ae7c9ef490 100644 (file)
@@ -89,14 +89,14 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectclass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=Univers
- ity of Michigan,c=US
-member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Univ
- ersity of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
- of Michigan,c=US
+objectClass: groupOfUniqueNames
+uniqueMember: cn=Manager,o=University of Michigan,c=US
+uniqueMember: cn=Bjorn Jensen,ou=Information Technology Division,ou=PEOPLE,o=U
niversity of Michigan,c=US
+uniqueMember: cn=James A Jones 2,ou=Information Technology Division,ou=PEOPLE,
o=University of Michigan,c=US
+uniqueMember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive
rsity of Michigan,c=US
 
 dn: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Michiga
  n,c=US
@@ -226,14 +226,14 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectclass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=Univers
- ity of Michigan,c=US
-member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Univ
- ersity of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
- of Michigan,c=US
+objectclass: groupofuniquenames
+uniquemember: cn=Manager,o=University of Michigan,c=US
+uniquemember: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=U
niversity of Michigan,c=US
+uniquemember: cn=James A Jones 2,ou=Information Technology Division,ou=People,
o=University of Michigan,c=US
+uniquemember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive
rsity of Michigan,c=US
 
 dn: cn=Manager,o=University of Michigan,c=US
 objectClass: person
@@ -246,7 +246,10 @@ userPassword:: c2VjcmV0
 
 dn: ou=People,o=University of Michigan,c=US
 objectclass: organizationalUnit
+objectclass: extensibleObject
 ou: People
+uidNumber: 0
+gidNumber: 0
 
 dn: o=University of Michigan,c=US
 objectclass: organization
index ddb5fe8409edb4ea111f2216ed9b030999b622f7..43b5585be3789a52005de51f09c8ff232676f748 100644 (file)
@@ -119,14 +119,14 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectClass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=Univers
- ity of Michigan,c=US
-member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Univ
- ersity of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
- of Michigan,c=US
+objectClass: groupOfUniqueNames
+uniqueMember: cn=Manager,o=University of Michigan,c=US
+uniqueMember: cn=Bjorn Jensen,ou=Information Technology Division,ou=PEOPLE,o=U
niversity of Michigan,c=US
+uniqueMember: cn=James A Jones 2,ou=Information Technology Division,ou=PEOPLE,
o=University of Michigan,c=US
+uniqueMember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive
rsity of Michigan,c=US
 
 dn: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Michiga
  n,c=US
@@ -250,7 +250,10 @@ telephoneNumber: +1 313 555 4177
 
 dn: ou=People,o=University of Michigan,c=US
 objectClass: organizationalUnit
+objectClass: extensibleObject
 ou: People
+uidNumber: 0
+gidNumber: 0
 
 dn: o=University of Michigan,c=US
 objectClass: organization
index dfc247fac1ec3f81ce67c8a3ac7d09b3590f8a6e..9c58c0cd27b7c59f9670cef4b18c8336994224ab 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 pidfile     ./test-db/slapd.pid
 argsfile    ./test-db/slapd.args
 
@@ -42,7 +43,7 @@ access to dn.base="" by * read
 access         to attr=objectclass
                by * =rsc stop
 
-access         to filter="(objectclass=person)" attr=userpassword
+access         to filter="(objectclass=person)" attr=userpassword dn.subtree=""
                by anonymous auth
                by self write
 
@@ -51,20 +52,21 @@ access              to dn.children="ou=Alumni Association,ou=People,o=University of Michigan
                by dn.subtree="o=University of Michigan,c=US" +rs continue
                by * stop
 
-access         to attr=member
+access         to attr=member,uniquemember
                by dnattr=member selfwrite
+               by dnattr=uniquemember selfwrite
                by * read
 
-access         to attr=member filter=(mail=*edu)
+access to attr=member,uniquemember filter=(mail=*edu)
                by * read
 
-access         to filter="(objectclass=groupofnames)"
+access to filter="(&(objectclass=groupofnames)(objectClass=groupofuniquenames))"
                by dn.base="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=University of Michigan,c=US" =sc continue
                by dn.regex="^cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=University of Michigan,c=US$" +rw stop
                by * break
 
 access         to dn.children="ou=Information Technology Division,ou=People,o=University of Michigan,c=US"
-               by group.exact="cn=ITD Staff,ou=Groups,o=University of Michigan,c=US" write
+               by group/groupOfUniqueNames/uniqueMember.exact="cn=ITD Staff,ou=Groups,o=University of Michigan,c=US" write
                by * read
 
 access to filter="(name=X*Y*Z)"
diff --git a/tests/data/slapd-cache-master.conf b/tests/data/slapd-cache-master.conf
new file mode 100644 (file)
index 0000000..c6721fc
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# master slapd config -- for proxy cache testing
+#
+ucdata-path    ./ucdata
+include ./schema/core.schema
+include ./schema/cosine.schema
+include ./schema/inetorgperson.schema
+include ./schema/openldap.schema
+include ./schema/nis.schema
+#
+pidfile     ./test-db/slapd.pid
+argsfile    ./test-db/slapd.args
+
+modulepath      ../servers/slapd/back-@BACKEND@/
+@MODULELOAD@
+
+#######################################################################
+# database definitions
+#######################################################################
+
+database       @BACKEND@
+suffix         "o=University of Michigan,c=US"
+directory      ./test-db
+rootdn         "cn=Manager,o=University of Michigan,c=US"
+rootpw         secret
+index          objectClass     eq
+index          cn,sn,uid       pres,eq,sub
+
index 257f75f7e129e604701de3ecd0a30f4de0da782d..e3979d08337c890fd9d87b8c4ffac413c1fd575e 100644 (file)
@@ -8,6 +8,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 pidfile     ./test-db/slapd.pid
 argsfile    ./test-db/slapd.args
 
index a11c45afde9305b63d6bf988d87277df2eb9ec48..f11a4013fedace557ea3961283cad9e551445c0f 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 pidfile     ./test-db/slapd.pid
 argsfile    ./test-db/slapd.args
 
index d6e2dadcb4b42986507f87ede3b39c6bc7f20663..ac3dc41071ae3633da7b97ecf330e0288604f2dc 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 pidfile     ./test-db/slapd.pid
 argsfile    ./test-db/slapd.args
 
diff --git a/tests/data/slapd-proxycache.conf b/tests/data/slapd-proxycache.conf
new file mode 100644 (file)
index 0000000..b0dd36b
--- /dev/null
@@ -0,0 +1,49 @@
+#
+# proxy cache slapd config 
+#
+ucdata-path    ./ucdata
+include ./schema/core.schema
+include ./schema/cosine.schema
+include ./schema/inetorgperson.schema
+include ./schema/openldap.schema
+include ./schema/nis.schema
+
+pidfile     ./test-cache/slapd.pid
+argsfile    ./test-cache/slapd.args
+
+access to * by write
+
+#######################################################################
+# database definitions
+#######################################################################
+
+database @BACKEND@
+
+suffix "o=University of Michigan,c=US,cn=cache" 
+cachesize 20
+directory ./test-cache
+index          objectClass     eq
+index          cn,sn,uid,mail  pres,eq,sub
+
+database       meta
+rewriteEngine on
+rewriteContext cacheResult
+rewriteRule "(.*)o=University of Michigan,c=US" "%1o=University of Michigan,c=US,cn=cache" ":"
+rewriteContext cacheBase
+rewriteRule "(.*)o=University of Michigan,c=US" "%1o=university of michigan,c=us,cn=cache" ":"
+rewriteContext cacheReturn 
+rewriteRule "(.*)o=University of Michigan,c=US,cn=cache" "%1o=University of Michigan,c=US" ":"
+
+suffix          "o=University of Michigan,c=US"
+uri            ldap://127.0.0.1:9009/o=University%20of%20Michigan,c=US
+cacheparams    10000 15000 2 @ENTRY_LIMIT@ @CACHETTL@
+
+attrset 0      sn cn title uid
+attrset 1      mail postaladdress telephonenumber cn uid
+addtemplate    (|(cn=)(sn=)) 0 @CACHETTL@
+addtemplate    (sn=) 0 @CACHETTL@
+addtemplate    (uid=) 1 @CACHETTL@
+addtemplate    (mail=) 0 @CACHETTL@
+       
+
index 8fb5b873e51af38a9413cf6fd0457cbed44513f1..2c6dd4166600dabb2456fb4a04e0a84aa4de4823 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 pidfile     ./test-db/slapd.pid
 argsfile    ./test-db/slapd.args
 
index 109c7632084cd2697c51c340d61e72e4499b3740..c4ae949fdd813a333171d847d9299047c7025e11 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 #
 pidfile     ./test-repl/slapd.pid
 argsfile    ./test-repl/slapd.args
index a523cc030ccba952a8d683d83f8f9edf91e935f9..ed0fb9db32b04f56352c567f11619d6a3614224f 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 pidfile     ./test-db/slapd.pid
 argsfile    ./test-db/slapd.args
 
index 0123ae6a389cc710aea75323a18d5e4edac4aa6d..f2afea37f1ffa55f33e6f0fd4493d88cde04407b 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 #
 pidfile     ./test-db/slapd.pid
 argsfile    ./test-db/slapd.args
index 18c6e1c4e67f10b60786193a94cff8d8798be7fc..569faabb98813f402c0013bd15d9e0e46c0b8d9c 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 #
 pidfile     ./test-repl/slapd.pid
 argsfile    ./test-repl/slapd.args
index f7598665c6942aa87a411174d3a647d3f04a4950..a2d44a5946df06bcc167eec14200e782f0b5588c 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 #
 pidfile     ./test-db/slapd.pid
 argsfile    ./test-db/slapd.args
index c6ba42f792946af019f01b1973dd2377843b6d9a..b67ad304041f204ca09a91f9e01a48300dd74047 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 #
 pidfile     ./test-repl/slapd.pid
 argsfile    ./test-repl/slapd.args
index ba3eb66ab67f61aff8615450fe37bd31658e586f..e9e2b286fd4c3c27363c9af80a215f5e368f82dd 100644 (file)
@@ -7,6 +7,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 #
 pidfile     ./test-db/slapd.pid
 argsfile    ./test-db/slapd.args
@@ -15,11 +16,10 @@ modulepath      ../servers/slapd/back-@BACKEND@/
 @MODULELOAD@
 
 #######################################################################
-# ldbm database definitions
+# master database definitions
 #######################################################################
 
 database       @BACKEND@
-#ldbm#cachesize        0
 suffix         "o=University of Michigan,c=US"
 directory      ./test-db
 rootdn         "cn=Manager,o=University of Michigan,c=US"
diff --git a/tests/data/slapd-syncrepl-slave-persist.conf b/tests/data/slapd-syncrepl-slave-persist.conf
deleted file mode 100644 (file)
index 058f89f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# $OpenLDAP$
-#
-# slave slapd config -- for testing of SYNC replication
-#
-ucdata-path    ./ucdata
-include ./schema/core.schema
-include ./schema/cosine.schema
-include ./schema/inetorgperson.schema
-include ./schema/openldap.schema
-#
-pidfile     ./test-repl/slapd.pid
-argsfile    ./test-repl/slapd.args
-
-modulepath      ../servers/slapd/back-@BACKEND@/
-@MODULELOAD@
-
-#######################################################################
-# ldbm database definitions
-#######################################################################
-
-database       @BACKEND@
-#ldbm#cachesize        0
-suffix         "o=University of Michigan,c=US"
-directory      ./test-repl
-rootdn         "cn=Replica,o=University of Michigan,c=US"
-rootpw         secret
-#ldbm#index            objectClass     eq
-#ldbm#index            cn,sn,uid       pres,eq,sub
-#bdb#index             objectClass     eq
-#bdb#index             cn,sn,uid       pres,eq,sub
-
-# Don't change syncrepl spec yet
-syncrepl id=1
-                master=ldap://localhost:9009
-                updatedn="cn=Replica,o=University of Michigan,c=US"
-                binddn="cn=Manager,o=University of Michigan,c=US"
-                bindmethod=simple
-                credentials=secret
-                searchbase="o=University of Michigan,c=US"
-                filter="objectClass=*"
-                attrs="*"
-                lastmod=req
-                scope=sub
-                type=refreshAndPersist
diff --git a/tests/data/slapd-syncrepl-slave-persist1.conf b/tests/data/slapd-syncrepl-slave-persist1.conf
new file mode 100644 (file)
index 0000000..fb925e4
--- /dev/null
@@ -0,0 +1,44 @@
+# $OpenLDAP$
+#
+# slave slapd config -- for testing of SYNC replication
+#
+ucdata-path    ./ucdata
+include ./schema/core.schema
+include ./schema/cosine.schema
+include ./schema/inetorgperson.schema
+include ./schema/openldap.schema
+include ./schema/nis.schema
+#
+pidfile     ./test-repl/p1/slapd.pid
+argsfile    ./test-repl/p1/slapd.args
+
+modulepath      ../servers/slapd/back-@BACKEND@/
+@MODULELOAD@
+
+#######################################################################
+# consumer database definitions
+#######################################################################
+
+database       @BACKEND@
+suffix         "o=University of Michigan,c=US"
+directory      ./test-repl/p1
+rootdn         "cn=Replica,o=University of Michigan,c=US"
+rootpw         secret
+#ldbm#index            objectClass     eq
+#ldbm#index            cn,sn,uid       pres,eq,sub
+#bdb#index             objectClass     eq
+#bdb#index             cn,sn,uid       pres,eq,sub
+
+# Don't change syncrepl spec yet
+syncrepl id=1
+                provider=ldap://localhost:9009
+                updatedn="cn=Replica,o=University of Michigan,c=US"
+                binddn="cn=Manager,o=University of Michigan,c=US"
+                bindmethod=simple
+                credentials=secret
+                searchbase="o=University of Michigan,c=US"
+                filter="(objectClass=*)"
+                attrs="*"
+                schemachecking=off
+                scope=sub
+                type=refreshAndPersist
diff --git a/tests/data/slapd-syncrepl-slave-persist2.conf b/tests/data/slapd-syncrepl-slave-persist2.conf
new file mode 100644 (file)
index 0000000..3e36b66
--- /dev/null
@@ -0,0 +1,44 @@
+# $OpenLDAP$
+#
+# slave slapd config -- for testing of SYNC replication
+#
+ucdata-path    ./ucdata
+include ./schema/core.schema
+include ./schema/cosine.schema
+include ./schema/inetorgperson.schema
+include ./schema/openldap.schema
+include ./schema/nis.schema
+#
+pidfile     ./test-repl/p2/slapd.pid
+argsfile    ./test-repl/p2/slapd.args
+
+modulepath      ../servers/slapd/back-@BACKEND@/
+@MODULELOAD@
+
+#######################################################################
+# consumer database definitions
+#######################################################################
+
+database       @BACKEND@
+suffix         "o=University of Michigan,c=US"
+directory      ./test-repl/p2
+rootdn         "cn=Replica,o=University of Michigan,c=US"
+rootpw         secret
+#ldbm#index            objectClass     eq
+#ldbm#index            cn,sn,uid       pres,eq,sub
+#bdb#index             objectClass     eq
+#bdb#index             cn,sn,uid       pres,eq,sub
+
+# Don't change syncrepl spec yet
+syncrepl id=1
+                provider=ldap://localhost:9013
+                updatedn="cn=Replica,o=University of Michigan,c=US"
+                binddn="cn=Replica,o=University of Michigan,c=US"
+                bindmethod=simple
+                credentials=secret
+                searchbase="o=University of Michigan,c=US"
+                filter="(objectClass=*)"
+                attrs="*"
+                schemachecking=off
+                scope=sub
+                type=refreshAndPersist
diff --git a/tests/data/slapd-syncrepl-slave-persist3.conf b/tests/data/slapd-syncrepl-slave-persist3.conf
new file mode 100644 (file)
index 0000000..bb3d315
--- /dev/null
@@ -0,0 +1,44 @@
+# $OpenLDAP$
+#
+# slave slapd config -- for testing of SYNC replication
+#
+ucdata-path    ./ucdata
+include ./schema/core.schema
+include ./schema/cosine.schema
+include ./schema/inetorgperson.schema
+include ./schema/openldap.schema
+include ./schema/nis.schema
+#
+pidfile     ./test-repl/p3/slapd.pid
+argsfile    ./test-repl/p3/slapd.args
+
+modulepath      ../servers/slapd/back-@BACKEND@/
+@MODULELOAD@
+
+#######################################################################
+# consumer database definitions
+#######################################################################
+
+database       @BACKEND@
+suffix         "o=University of Michigan,c=US"
+directory      ./test-repl/p3
+rootdn         "cn=Replica,o=University of Michigan,c=US"
+rootpw         secret
+#ldbm#index            objectClass     eq
+#ldbm#index            cn,sn,uid       pres,eq,sub
+#bdb#index             objectClass     eq
+#bdb#index             cn,sn,uid       pres,eq,sub
+
+# Don't change syncrepl spec yet
+syncrepl id=1
+                provider=ldap://localhost:9009
+                updatedn="cn=Replica,o=University of Michigan,c=US"
+                binddn="cn=Manager,o=University of Michigan,c=US"
+                bindmethod=simple
+                credentials=secret
+                searchbase="o=University of Michigan,c=US"
+                filter="(objectClass=*)"
+                attrs="*"
+                schemachecking=off
+                scope=sub
+                type=refreshAndPersist
diff --git a/tests/data/slapd-syncrepl-slave-refresh.conf b/tests/data/slapd-syncrepl-slave-refresh.conf
deleted file mode 100644 (file)
index 82a4a52..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# $OpenLDAP$
-#
-# slave slapd config -- for testing of SYNC replication
-#
-ucdata-path    ./ucdata
-include ./schema/core.schema
-include ./schema/cosine.schema
-include ./schema/inetorgperson.schema
-include ./schema/openldap.schema
-#
-pidfile     ./test-repl/slapd.pid
-argsfile    ./test-repl/slapd.args
-
-modulepath      ../servers/slapd/back-@BACKEND@/
-@MODULELOAD@
-
-#######################################################################
-# ldbm database definitions
-#######################################################################
-
-database       @BACKEND@
-#ldbm#cachesize        0
-suffix         "o=University of Michigan,c=US"
-directory      ./test-repl
-rootdn         "cn=Replica,o=University of Michigan,c=US"
-rootpw         secret
-#ldbm#index            objectClass     eq
-#ldbm#index            cn,sn,uid       pres,eq,sub
-#bdb#index             objectClass     eq
-#bdb#index             cn,sn,uid       pres,eq,sub
-
-# Don't change syncrepl spec yet
-syncrepl id=1
-                master=ldap://localhost:9009
-                updatedn="cn=Replica,o=University of Michigan,c=US"
-                binddn="cn=Manager,o=University of Michigan,c=US"
-                bindmethod=simple
-                credentials=secret
-                searchbase="o=University of Michigan,c=US"
-                filter="objectClass=*"
-                attrs="*"
-                lastmod=req
-                scope=sub
-                type=refreshOnly
-                interval=10
diff --git a/tests/data/slapd-syncrepl-slave-refresh1.conf b/tests/data/slapd-syncrepl-slave-refresh1.conf
new file mode 100644 (file)
index 0000000..5245f1a
--- /dev/null
@@ -0,0 +1,45 @@
+# $OpenLDAP$
+#
+# slave slapd config -- for testing of SYNC replication
+#
+ucdata-path    ./ucdata
+include ./schema/core.schema
+include ./schema/cosine.schema
+include ./schema/inetorgperson.schema
+include ./schema/openldap.schema
+include ./schema/nis.schema
+#
+pidfile     ./test-repl/r1/slapd.pid
+argsfile    ./test-repl/r1/slapd.args
+
+modulepath      ../servers/slapd/back-@BACKEND@/
+@MODULELOAD@
+
+#######################################################################
+# consumer database definitions
+#######################################################################
+
+database       @BACKEND@
+suffix         "o=University of Michigan,c=US"
+directory      ./test-repl/r1
+rootdn         "cn=Replica,o=University of Michigan,c=US"
+rootpw         secret
+#ldbm#index            objectClass     eq
+#ldbm#index            cn,sn,uid       pres,eq,sub
+#bdb#index             objectClass     eq
+#bdb#index             cn,sn,uid       pres,eq,sub
+
+# Don't change syncrepl spec yet
+syncrepl id=1
+                provider=ldap://localhost:9009
+                updatedn="cn=Replica,o=University of Michigan,c=US"
+                binddn="cn=Manager,o=University of Michigan,c=US"
+                bindmethod=simple
+                credentials=secret
+                searchbase="o=University of Michigan,c=US"
+                filter="(objectClass=*)"
+                attrs="*"
+                schemachecking=off
+                scope=sub
+                type=refreshOnly
+                interval=00:00:01
diff --git a/tests/data/slapd-syncrepl-slave-refresh2.conf b/tests/data/slapd-syncrepl-slave-refresh2.conf
new file mode 100644 (file)
index 0000000..5499fcd
--- /dev/null
@@ -0,0 +1,45 @@
+# $OpenLDAP$
+#
+# slave slapd config -- for testing of SYNC replication
+#
+ucdata-path    ./ucdata
+include ./schema/core.schema
+include ./schema/cosine.schema
+include ./schema/inetorgperson.schema
+include ./schema/openldap.schema
+include ./schema/nis.schema
+#
+pidfile     ./test-repl/r2/slapd.pid
+argsfile    ./test-repl/r2/slapd.args
+
+modulepath      ../servers/slapd/back-@BACKEND@/
+@MODULELOAD@
+
+#######################################################################
+# consumer database definitions
+#######################################################################
+
+database       @BACKEND@
+suffix         "o=University of Michigan,c=US"
+directory      ./test-repl/r2
+rootdn         "cn=Replica,o=University of Michigan,c=US"
+rootpw         secret
+#ldbm#index            objectClass     eq
+#ldbm#index            cn,sn,uid       pres,eq,sub
+#bdb#index             objectClass     eq
+#bdb#index             cn,sn,uid       pres,eq,sub
+
+# Don't change syncrepl spec yet
+syncrepl id=1
+                provider=ldap://localhost:9011
+                updatedn="cn=Replica,o=University of Michigan,c=US"
+                binddn="cn=Replica,o=University of Michigan,c=US"
+                bindmethod=simple
+                credentials=secret
+                searchbase="o=University of Michigan,c=US"
+                filter="(objectClass=*)"
+                attrs="*"
+                schemachecking=off
+                scope=sub
+                type=refreshOnly
+                interval=00:00:01
index 5d6f39169c109fee965f59523c3bf3fe5e002e25..5942610de95847fefcfba9ac07915cca593e3db5 100644 (file)
@@ -8,6 +8,7 @@ include ./schema/core.schema
 include ./schema/cosine.schema
 include ./schema/inetorgperson.schema
 include ./schema/openldap.schema
+include ./schema/nis.schema
 pidfile     ./test-db/slapd.pid
 argsfile    ./test-db/slapd.args
 
index b0f4af64e08d6a9f0255a90c0c571531ed7737c0..b0905ef9298dd7a7d946742147d46f064bbc6a36 100644 (file)
@@ -16,7 +16,10 @@ associatedDomain: example.com
 
 dn: ou=People,o=University of Michigan,c=US
 objectClass: organizationalUnit
+objectClass: extensibleObject
 ou: People
+uidNumber: 0
+gidNumber: 0
 
 dn: ou=Alumni Association,ou=People,o=University of Michigan,c=US
 objectClass: organizationalUnit
@@ -275,12 +278,12 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectClass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=Univers
- ity of Michigan,c=US
-member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Univ
- ersity of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
- of Michigan,c=US
+objectclass: groupofuniquenames
+uniquemember: cn=Manager,o=University of Michigan,c=US
+uniquemember: cn=Bjorn Jensen,OU=Information Technology Division,ou=PEOPLE,o=U
niversity of Michigan,c=US
+uniquemember: cn=James A Jones 2,ou=Information Technology Division,ou=PEOPLE,
o=University of Michigan,c=US
+uniquemember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive
rsity of Michigan,c=US
 
index 2564e878a19439bb40076a0d1d9e24c9d5f8139a..6a2b71573b72796dfe90d61fa69891cb2a0fb1a0 100644 (file)
@@ -126,14 +126,14 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectclass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,OU=Information Technology Division,ou=PEOPLE,o=Univers
- ity of Michigan,c=US
-member: cn=James A Jones 2,ou=Information Technology Division,ou=PEOPLE,o=Univ
- ersity of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
- of Michigan,c=US
+objectclass: groupofuniquenames
+uniquemember: cn=Manager,o=University of Michigan,c=US
+uniquemember: cn=Bjorn Jensen,OU=Information Technology Division,ou=PEOPLE,o=U 
+ niversity of Michigan,c=US 
+uniquemember: cn=James A Jones 2,ou=Information Technology Division,ou=PEOPLE, 
+ o=University of Michigan,c=US 
+uniquemember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive 
rsity of Michigan,c=US
 
 dn: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Mich
  igan,c=US
index a6893b6fe02b00aacf2fd573d5f985523dfb4d06..74e479a0a0e64fb6bcecb32da436fda30ef1e5df 100644 (file)
@@ -18,7 +18,10 @@ associateddomain: example.com
 
 dn: ou=People,o=University of Michigan,c=US
 objectclass: organizationalUnit
+objectclass: extensibleObject
 ou: People
+uidNumber: 0
+gidNumber: 0
 
 dn: ou=Groups,o=University of Michigan,c=US
 objectclass: organizationalUnit
@@ -142,14 +145,14 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectclass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,OU=Information Technology Division,ou=PEOPLE,o=Univers
- ity of Michigan,c=US
-member: cn=James A Jones 2,ou=Information Technology Division,ou=PEOPLE,o=Univ
- ersity of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
- of Michigan,c=US
+objectclass: groupofuniquenames
+uniquemember: cn=Manager,o=University of Michigan,c=US
+uniquemember: cn=Bjorn Jensen,OU=Information Technology Division,ou=PEOPLE,o=U
niversity of Michigan,c=US
+uniquemember: cn=James A Jones 2,ou=Information Technology Division,ou=PEOPLE,
o=University of Michigan,c=US
+uniquemember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive
rsity of Michigan,c=US
 
 dn: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Mich
  igan,c=US
index 17c6f4f3ee70b1a1efcff43154ca3f0dd91e42ff..a695e8a9e36696fb302bd19a2b71fdbc582a7333 100644 (file)
@@ -121,14 +121,14 @@ dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 owner: cn=Manager,o=University of Michigan,c=US
 description: All ITD Staff
 cn: ITD Staff
-objectclass: groupofnames
-member: cn=Manager,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=Univers
- ity of Michigan,c=US
-member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Univ
- ersity of Michigan,c=US
-member: cn=John Doe,ou=Information Technology Division,ou=People,o=University 
- of Michigan,c=US
+objectclass: groupofuniquenames
+uniquemember: cn=Manager,o=University of Michigan,c=US
+uniquemember: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=U
niversity of Michigan,c=US
+uniquemember: cn=James A Jones 2,ou=Information Technology Division,ou=People,
o=University of Michigan,c=US
+uniquemember: cn=John Doe,ou=Information Technology Division,ou=People,o=Unive
rsity of Michigan,c=US
 
 dn: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Michiga
  n,c=US
@@ -252,7 +252,10 @@ telephonenumber: +1 313 555 4177
 
 dn: ou=People,o=University of Michigan,c=US
 objectclass: organizationalUnit
+objectclass: extensibleObject
 ou: People
+uidNumber: 0
+gidNumber: 0
 
 dn: o=University of Michigan,c=US
 objectclass: organization
index 1e4a4d1da27b0a5955a3d2f09022285fe028a70d..b0b9a94f990cbcaacbfedb9ebf13b6a340ae1d9d 100755 (executable)
@@ -38,12 +38,18 @@ fi
 
 SHTOOL="$SRCDIR/../build/shtool"
 
+if test $# -eq 0 ; then
+       PROXYCACHE=no
+else
+       PROXYCACHE=$1; shift
+fi
+
 TB=`$SHTOOL echo -e "%B"`
 TN=`$SHTOOL echo -e "%b"`
 
 for CMD in $SRCDIR/scripts/test*; do
        echo ">>>>> Starting ${TB}`basename $CMD`${TN} ..."
-       $CMD $SRCDIR $BACKEND $BACKENDTYPE $MONITOR
+       $CMD $SRCDIR $BACKEND $BACKENDTYPE $MONITOR $PROXYCACHE
        RC=$?
        if test $RC -eq 0 ; then
                echo ">>>>> $CMD completed ${TB}OK${TN}."
index e0c6d653d1f49d11e827fa9ed5fbcc3eb1dae611..bef77b0666f3af8c9ce6b7056259ba0ada88cf49 100755 (executable)
@@ -15,6 +15,11 @@ if test $# -ge 1 ; then
         MONITORDB=$1; shift
 fi
 
+PROXYCACHE=no
+if test $# -ge 1 ; then
+        PROXYCACHE=$1; shift
+fi
+
 WAIT=0
 if test $# -ge 1 ; then
         WAIT=1; shift
index 147a9a2ccb45149f457a9a3004eba96e88a12273..dbc01efdb18a5ea5b77c9c1205154098af189160 100755 (executable)
@@ -13,4 +13,6 @@ sed -e "s/@BACKEND@/${BACKEND}/"      \
        -e "s/^#${BACKEND}#//"                  \
        -e "s/^#${MON}#//"                              \
        -e "s/@PORT@/${PORT}/"                  \
-       -e "s/@SLAVEPORT@/${SLAVEPORT}/"
+       -e "s/@SLAVEPORT@/${SLAVEPORT}/" \
+        -e "s/@CACHETTL@/${CACHETTL}/"   \
+        -e "s/@ENTRY_LIMIT@/${CACHE_ENTRY_LIMIT}/"   
index c45092ccb611e10fd257b4cf4e4fa97cbce56d69..4d3fd7cf931230c4a3c76642e06ac9ac5606df46 100755 (executable)
@@ -5,6 +5,12 @@ DATADIR=$SRCDIR/data
 PROGDIR=./progs
 DBDIR=./test-db
 REPLDIR=./test-repl
+R1REPLDIR=$REPLDIR/r1
+R2REPLDIR=$REPLDIR/r2
+P1REPLDIR=$REPLDIR/p1
+P2REPLDIR=$REPLDIR/p2
+P3REPLDIR=$REPLDIR/p3
+CACHEDIR=./test-cache
 
 CONF=$DATADIR/slapd.conf
 MCONF=$DATADIR/slapd-master.conf
@@ -14,8 +20,13 @@ RCONF=$DATADIR/slapd-referrals.conf
 MASTERCONF=$DATADIR/slapd-repl-master.conf
 SRMASTERCONF=$DATADIR/slapd-syncrepl-master.conf
 SLAVECONF=$DATADIR/slapd-repl-slave.conf
-SRREFSLAVECONF=$DATADIR/slapd-syncrepl-slave-refresh.conf
-SRPERSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist.conf
+PROXYCACHECONF=$DATADIR/slapd-proxycache.conf
+CACHEMASTERCONF=$DATADIR/slapd-cache-master.conf
+R1SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-refresh1.conf
+R2SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-refresh2.conf
+P1SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist1.conf
+P2SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist2.conf
+P3SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist3.conf
 REFSLAVECONF=$DATADIR/slapd-ref-slave.conf
 SUBMASTERCONF=$DATADIR/slapd-repl-submaster.conf
 SUBSLAVECONF=$DATADIR/slapd-repl-subslave.conf
@@ -25,6 +36,12 @@ GLUECONF=$DATADIR/slapd-glue.conf
 DBCONF=$DBDIR/slapd.conf
 ADDCONF=$DBDIR/slapadd.conf
 REPLCONF=$REPLDIR/slapd.conf
+R1REPLCONF=$R1REPLDIR/slapd.conf
+R2REPLCONF=$R2REPLDIR/slapd.conf
+P1REPLCONF=$P1REPLDIR/slapd.conf
+P2REPLCONF=$P2REPLDIR/slapd.conf
+P3REPLCONF=$P3REPLDIR/slapd.conf
+CACHECONF=$CACHEDIR/slapd.conf
 
 TOOLARGS="-x $LDAP_TOOLARGS"
 TOOLPROTO="-P 3"
@@ -63,8 +80,18 @@ LVL=${SLAPD_DEBUG-261}
 LOCALHOST=localhost
 PORT=9009
 SLAVEPORT=9010
+R1SLAVEPORT=9011
+R2SLAVEPORT=9012
+P1SLAVEPORT=9013
+P2SLAVEPORT=9014
+P3SLAVEPORT=9015
 MASTERURI="ldap://${LOCALHOST}:$PORT/"
 SLAVEURI="ldap://${LOCALHOST}:$SLAVEPORT/"
+R1SLAVEURI="ldap://${LOCALHOST}:$R1SLAVEPORT/"
+R2SLAVEURI="ldap://${LOCALHOST}:$R2SLAVEPORT/"
+P1SLAVEURI="ldap://${LOCALHOST}:$P1SLAVEPORT/"
+P2SLAVEURI="ldap://${LOCALHOST}:$P2SLAVEPORT/"
+P3SLAVEURI="ldap://${LOCALHOST}:$P3SLAVEPORT/"
 LDIF=$DATADIR/test.ldif
 LDIFGLUED=$DATADIR/test-glued.ldif
 LDIFORDERED=$DATADIR/test-ordered.ldif
@@ -87,15 +114,30 @@ BJORNSDN="cn=Bjorn Jensen,ou=Information Technology DivisioN,OU=People,o=Univers
 JAJDN="cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Michigan,c=US"
 MASTERLOG=$DBDIR/master.log
 SLAVELOG=$DBDIR/slave.log
+R1SLAVELOG=$DBDIR/r1.log
+R2SLAVELOG=$DBDIR/r2.log
+P1SLAVELOG=$DBDIR/p1.log
+P2SLAVELOG=$DBDIR/p2.log
+P3SLAVELOG=$DBDIR/p3.log
 SLURPLOG=$DBDIR/slurp.log
 SEARCHOUT=$DBDIR/ldapsearch.out
 SEARCHFLT=$DBDIR/ldapsearch.flt
 LDIFFLT=$DBDIR/ldif.flt
+R1LDIFFLT=$DBDIR/r1ldif.flt
+R2LDIFFLT=$DBDIR/r2ldif.flt
+P1LDIFFLT=$DBDIR/p1ldif.flt
+P2LDIFFLT=$DBDIR/p2ldif.flt
+P3LDIFFLT=$DBDIR/p3ldif.flt
 SUBFLT0=$DBDIR/sub0.flt
 SUBFLT1=$DBDIR/sub1.flt
 SUBFLT2=$DBDIR/sub2.flt
 MASTEROUT=$DBDIR/master.out
 SLAVEOUT=$DBDIR/slave.out
+R1SLAVEOUT=$DBDIR/r1.out
+R2SLAVEOUT=$DBDIR/r2.out
+P1SLAVEOUT=$DBDIR/p1.out
+P2SLAVEOUT=$DBDIR/p2.out
+P3SLAVEOUT=$DBDIR/p3.out
 SUBMASTEROUT=$DBDIR/submaster.out
 TESTOUT=$DBDIR/test.out
 INITOUT=$DBDIR/init.out
index 0723ca7d2c7761d677b42d366d0c4d68aa476ad6..bf19615a1fc28211c28e0b5ba3ed34f270d7b6e1 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index 7828edb414925bd5158ba6f8f9b2171a03a69be8..ef97cc734a1e006a347473f0b8ba59506be6e10b 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index acb3384e72be23b9f43aae282140171c2bdc12a8..2485c41759c33d4ea2461e650e2ad6c5acbc1230 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index 51d7fd6ff66df80eeb518a85a2e1c2e4fe0bdf34..af32f905417b0d062d2ad2c8ed912c073b8fe2b1 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
@@ -73,7 +73,7 @@ fi
 
 echo "Testing OR searching..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
-       '(|(givenname=Xx*yY*Z)(cn=)(undef=*)(objectclass=groupofnames)(sn=jones)(member=cn=Manager,o=University of Michigan,c=US))' >> $SEARCHOUT 2>&1
+       '(|(givenname=Xx*yY*Z)(cn=)(undef=*)(objectclass=groupofnames)(sn=jones)(member=cn=Manager,o=University of Michigan,c=US)(uniqueMember=cn=Manager,o=University of Michigan,c=US))' >> $SEARCHOUT 2>&1
 RC=$?
 if test $RC != 0 ; then
        echo "ldapsearch failed ($RC)!"
index 7180318b7657aa577d5a59442fa806f789fcd3e7..a235b93ad9bd04d3da73ee25a47f9b6b6d551410 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
@@ -91,13 +91,17 @@ drink: Mad Dog 20/20
 
 dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
 changetype: modify
-delete: member
-member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=University of Michigan,c=US
-member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=University of Michigan,c=US
+delete: uniquemember
+uniquemember: cn=James A Jones 2,ou=Information Technology Division,
+ ou=People,o=University of Michigan,c=US
+uniquemember: cn=Bjorn Jensen,ou=Information Technology Division,
+ ou=People,o=University of Michigan,c=US
 -
-add: member
-member: cn=Dorothy Stevens,ou=Alumni Association,ou=People,o=University of Michigan,c=US
-member: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Michigan,c=US
+add: uniquemember
+uniquemember: cn=Dorothy Stevens,ou=Alumni Association,
+ ou=People,o=University of Michigan,c=US
+uniquemember: cn=James A Jones 1,ou=Alumni Association,
+ ou=People,o=University of Michigan,c=US
 
 dn: cn=All Staff,ou=Groups,o=University of Michigan,c=US
 changetype: modify
@@ -129,6 +133,14 @@ dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=University
 changetype: delete
 # TRAILING COMMENT AND WHITE SPACE
 
+dn: ou=People,o=University of Michigan,c=US
+changetype: modify
+increment: uidNumber
+uidNumber: 1
+-
+increment: gidNumber
+gidNumber: -1
+
 EOMODS
 
 RC=$?
index 86b7265b0a6b3c03b2b1914a5bdc28dc457f03a6..9a838bf7bf72773981a18562a2b8f32ed3e31147 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index 00560ed238132dc00d9b243b2c25b3b2ad5dc558..70a3636f27b7aaa4ea2835207f3d7072d8106f94 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
@@ -97,8 +97,8 @@ $LDAPMODIFY -D "$JAJDN" -h $LOCALHOST -p $PORT -w jaj > \
 version: 1
 dn: cn=ITD Staff, ou=Groups, o=University of Michigan, c=US
 changetype: modify
-add: member
-member: cn=Barbara Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+add: uniquemember
+uniquemember: cn=Barbara Jensen,ou=Information Technology Division,ou=People,o=University of Michigan,c=US
 
 EOMODS1
 
@@ -108,8 +108,8 @@ version: 1
 
 dn: cn=ITD Staff, ou=Groups, o=University of Michigan, c=US
 changetype: modify
-add: member
-member: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US
+add: uniquemember
+uniquemember: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US
 EOMODS2
 
 #
index a8a7a31f79981b1837eb18941ba5fe1aad085555..0952d067106f34e086ac2b10c8afb5e7a86f025f 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index 21eca2ce60bae66288c573ebced9ccac72743e78..4e0c7af7d246a558acef98e56419a10013695485 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index 0e481649ccfe7ede4cd10489a142ebcbdf7831df..5a77a1ea2df7590aa4ebb0baea7ed7757d3448de 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
@@ -91,7 +91,7 @@ fi
 
 echo "Testing OR searching..."
 $LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
-       '(|(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1
+       '(|(objectclass=groupofnames)(objectClass=groupofuniquenames)(sn=jones))' >> $SEARCHOUT 2>&1
 RC=$?
 if test $RC != 0 ; then
        echo "ldapsearch failed ($RC)!"
index 0fa5021a15cb61e7b3623d1f6d8a8f16b94adc87..f8ed0111c61b22c1f2c34191946abbf874a2105a 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index ce778688a57ed0bdb5f3454cf7de4d32b8f74f4b..d0ba5692f823780a82a0c1c7af245904e23eb561 100755 (executable)
@@ -9,7 +9,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index a163f8f08c8e65f264d298efc37eff881ebfce75..00e1b87a11ce76ade513041f4232fa4d31b4d765 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index a929e2a53cbbada49eb604937c8a42f73a223aa7..eeb61199dbfa1f3cf7911aaa9e6bb308126f7ea1 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index e3deb09b9c1cc2bd3603b6f9952a4bde0d49a6ce..b0028175d4499ccafe076fcc9ca9a024e6141346 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index fb14c7014e960f182d65fee16b61eac60909a9bc..5a7d25a6ba0d398f759d895104b8d040ce7e9fa0 100755 (executable)
@@ -6,7 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
@@ -73,7 +73,7 @@ fi
 
 echo "Testing OR searching..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
-       '(|(givenName=XX*YY*Z)(cn=)(undef=*)(objectclass=groupofnames)(sn:caseExactMatch:=Jones))' >> $SEARCHOUT 2>&1
+       '(|(givenName=XX*YY*Z)(cn=)(undef=*)(objectclass=groupofnames)(objectclass=groupofuniquenames)(sn:caseExactMatch:=Jones))' >> $SEARCHOUT 2>&1
 RC=$?
 if test $RC != 0 ; then
        echo "ldapsearch failed ($RC)!"
@@ -83,7 +83,7 @@ fi
 
 echo "Testing AND matching and ends-with searching..."
 $LDAPSEARCH -S "" -b "ou=groups,$BASEDN" -s one -h $LOCALHOST -p $PORT \
-       '(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1
+       '(&(|(objectclass=groupofnames)(objectclass=groupofuniquenames))(cn=A*))' >> $SEARCHOUT 2>&1
 RC=$?
 if test $RC != 0 ; then
        echo "ldapsearch failed ($RC)!"
index 740f04591b3a2515bfa039007c716447d876f6a5..289f2b71051e6cb7596f20a32056400b63e92071 100755 (executable)
@@ -7,7 +7,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
index 58ee34235cd1e60799075af287c5a463b3bb2cb5..be59b12298236b957414e0b154bf81c9180b944d 100755 (executable)
@@ -6,12 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
-
-if test "$BACKEND" != "bdb" -a "$BACKEND" != "hdb"; then
-       echo "Test only valid for back-bdb"
-       exit 0
-fi
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
@@ -27,9 +22,14 @@ echo "running defines.sh"
 
 echo "Cleaning up in $DBDIR..."
 rm -f $DBDIR/[!C]*
-echo "Cleaning up in $REPLDIR..."
-rm -rf $REPLDIR/[!C]*
+echo "Resetting $R1REPLDIR..."
+rm -rf $R1REPLDIR
+mkdir $R1REPLDIR
 
+SAVE=$BACKEND
+if test $BACKEND = ldbm; then
+       BACKEND=bdb
+fi
 echo "Starting master slapd on TCP/IP port $PORT..."
 . $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $DBCONF
 $SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
@@ -38,6 +38,7 @@ if test $WAIT != 0 ; then
     echo PID $PID
     read foo
 fi
+BACKEND=$SAVE
 
 echo "Waiting 5 seconds to wait for master to start..."
 sleep 5
@@ -64,18 +65,18 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
-. $CONFFILTER $BACKEND $MONITORDB < $SRREFSLAVECONF > $REPLCONF
-$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
-SLAVEPID=$!
+echo "Starting slave slapd on TCP/IP port $R1SLAVEPORT..."
+. $CONFFILTER $BACKEND $MONITORDB < $R1SRSLAVECONF > $R1REPLCONF
+$SLAPD -f $R1REPLCONF -h $R1SLAVEURI -d $LVL $TIMING > $R1SLAVELOG 2>&1 &
+R1SLAVEPID=$!
 if test $WAIT != 0 ; then
-    echo SLAVEPID $SLAVEPID
+    echo SLAVEPID $R1SLAVEPID
     read foo
 fi
 
 echo "Using ldapsearch to check that slave slapd is running..."
 for i in 0 1 2 3 4 5; do
-       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $SLAVEPORT \
+       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $R1SLAVEPORT \
                'objectclass=*' > /dev/null 2>&1
        RC=$?
        if test $RC = 0 ; then
@@ -95,8 +96,8 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-echo "Waiting 30 seconds for syncrepl to receive changes..."
-sleep 30
+echo "Waiting 90 seconds for syncrepl to receive changes..."
+sleep 90
 
 echo "Using ldapmodify to modify master directory..."
 
@@ -177,8 +178,8 @@ changetype: delete
 
 EOMODS
 
-echo "Waiting 30 seconds for syncrepl to receive changes..."
-sleep 30
+echo "Waiting 90 seconds for syncrepl to receive changes..."
+sleep 90
 
 echo "Using ldapsearch to read all the entries from the master..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
@@ -192,28 +193,28 @@ if test $RC != 0 ; then
 fi
 
 echo "Using ldapsearch to read all the entries from the slave..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
-       'objectclass=*' > $SLAVEOUT 2>&1
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $R1SLAVEPORT \
+       'objectclass=*' > $R1SLAVEOUT 2>&1
 RC=$?
 
 if test $RC != 0 ; then
        echo "ldapsearch failed at slave ($RC)!"
-       kill -HUP $PID $SLAVEPID
+       kill -HUP $PID $R1SLAVEPID
        exit $RC
 fi
 
-kill -HUP $PID $SLAVEPID
+kill -HUP $PID $R1SLAVEPID
 
 SEARCHOUT=$MASTEROUT
-LDIF=$SLAVEOUT
+LDIF=$R1SLAVEOUT
 
 echo "Filtering ldapsearch results..."
 . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
 echo "Filtering original ldif used to create database..."
-. $LDIFFILTER < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $R1LDIFFLT
 
 echo "Comparing retrieved entries from master and slave..."
-$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
+$CMP $SEARCHFLT $R1LDIFFLT > $CMPOUT
 
 if test $? != 0 ; then
        echo "test failed - master and slave databases differ"
index dd91d035fcc10afd79988552cbfe29a79899bc3e..66f5637673511218aaf1df6bf5c451e384d6e213 100755 (executable)
@@ -6,12 +6,7 @@ if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
 
-. $SRCDIR/scripts/args.sh
-
-if test "$BACKEND" != "bdb" -a "$BACKEND" != "hdb"; then
-       echo "Test only valid for back-bdb"
-       exit 0
-fi
+. $SRCDIR/scripts/args.sh $*
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
@@ -27,9 +22,14 @@ echo "running defines.sh"
 
 echo "Cleaning up in $DBDIR..."
 rm -f $DBDIR/[!C]*
-echo "Cleaning up in $REPLDIR..."
-rm -rf $REPLDIR/[!C]*
+echo "Resetting $P1REPLDIR..."
+rm -rf $P1REPLDIR
+mkdir $P1REPLDIR
 
+SAVE=$BACKEND
+if test $BACKEND = ldbm; then
+       BACKEND=bdb
+fi
 echo "Starting master slapd on TCP/IP port $PORT..."
 . $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $DBCONF
 $SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
@@ -38,6 +38,7 @@ if test $WAIT != 0 ; then
     echo PID $PID
     read foo
 fi
+BACKEND=$SAVE
 
 echo "Waiting 5 seconds to wait for master to start..."
 sleep 5
@@ -64,18 +65,18 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
-. $CONFFILTER $BACKEND $MONITORDB < $SRPERSLAVECONF > $REPLCONF
-$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
-SLAVEPID=$!
+echo "Starting slave slapd on TCP/IP port $P1SLAVEPORT..."
+. $CONFFILTER $BACKEND $MONITORDB < $P1SRSLAVECONF > $P1REPLCONF
+$SLAPD -f $P1REPLCONF -h $P1SLAVEURI -d $LVL $TIMING > $P1SLAVELOG 2>&1 &
+P1SLAVEPID=$!
 if test $WAIT != 0 ; then
-    echo SLAVEPID $SLAVEPID
+    echo SLAVEPID $P1SLAVEPID
     read foo
 fi
 
 echo "Using ldapsearch to check that slave slapd is running..."
 for i in 0 1 2 3 4 5; do
-       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $SLAVEPORT \
+       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $P1SLAVEPORT \
                'objectclass=*' > /dev/null 2>&1
        RC=$?
        if test $RC = 0 ; then
@@ -95,8 +96,8 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-echo "Waiting 10 seconds for syncrepl to receive changes..."
-sleep 10
+echo "Waiting 20 seconds for syncrepl to receive changes..."
+sleep 20
 
 echo "Using ldapmodify to modify master directory..."
 
@@ -177,8 +178,8 @@ changetype: delete
 
 EOMODS
 
-echo "Waiting 10 seconds for syncrepl to receive changes..."
-sleep 10
+echo "Waiting 20 seconds for syncrepl to receive changes..."
+sleep 20
 
 echo "Using ldapsearch to read all the entries from the master..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
@@ -192,28 +193,28 @@ if test $RC != 0 ; then
 fi
 
 echo "Using ldapsearch to read all the entries from the slave..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
-       'objectclass=*' > $SLAVEOUT 2>&1
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $P1SLAVEPORT \
+       'objectclass=*' > $P1SLAVEOUT 2>&1
 RC=$?
 
 if test $RC != 0 ; then
        echo "ldapsearch failed at slave ($RC)!"
-       kill -HUP $PID $SLAVEPID
+       kill -HUP $PID $P1SLAVEPID
        exit $RC
 fi
 
-kill -HUP $PID $SLAVEPID
+kill -HUP $PID $P1SLAVEPID
 
 SEARCHOUT=$MASTEROUT
-LDIF=$SLAVEOUT
+LDIF=$P1SLAVEOUT
 
 echo "Filtering ldapsearch results..."
 . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
 echo "Filtering original ldif used to create database..."
-. $LDIFFILTER < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $P1LDIFFLT
 
 echo "Comparing retrieved entries from master and slave..."
-$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
+$CMP $SEARCHFLT $P1LDIFFLT > $CMPOUT
 
 if test $? != 0 ; then
        echo "test failed - master and slave databases differ"
diff --git a/tests/scripts/test019-proxycaching b/tests/scripts/test019-proxycaching
new file mode 100755 (executable)
index 0000000..ca9a300
--- /dev/null
@@ -0,0 +1,256 @@
+#! /bin/sh
+# $OpenLDAP$
+
+CACHETTL=60
+CACHE_ENTRY_LIMIT=10
+
+SRCDIR="."
+if test $# -ge 1 ; then
+       SRCDIR=$1; shift
+fi
+
+. $SRCDIR/scripts/args.sh $*
+
+if test $PROXYCACHE = no; then 
+       echo "Proxy caching requires back-meta AND (back-ldbm OR back-bdb)" 
+       exit 0
+fi 
+
+echo "running defines.sh"
+. $SRCDIR/scripts/defines.sh
+
+# Test proxy caching:
+# - start master
+# - start proxy cache
+# - populate master 
+# - perform first set of searches at the proxy
+# - verify cacheability
+# - perform second set of searches at the proxy 
+# - verify answerability
+
+#if test ! -x $SLAPD ; then
+#      echo ">>>>> $SLAPD is not executable or does not exist."
+#      echo ">>>>> Test skipped."
+#      exit 0
+#fi
+
+if test ! -d $DBDIR
+then 
+       mkdir $DBDIR
+fi
+
+if test ! -d $CACHEDIR
+then 
+       mkdir $CACHEDIR
+fi
+
+echo "Cleaning up in $DBDIR..."
+rm -f $DBDIR/[!C]*
+echo "Cleaning up in $CACHEDIR..."
+rm -rf $CACHEDIR/[!C]*
+echo $DBDIR
+
+echo "Starting master slapd on TCP/IP port $PORT..."
+. $CONFFILTER < $CACHEMASTERCONF > $DBCONF
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL > $MASTERLOG 2>&1 &
+PID=$!
+if test $WAIT != 0 ; then
+       echo PID $PID
+       read foo
+fi
+
+sleep 10
+
+echo "Using ldapadd to populate the master directory..."
+$LDAPADD -x -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
+       $LDIFORDERED > /dev/null 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapadd failed ($RC)!"
+       kill -HUP $PID 
+       exit $RC
+fi
+
+echo "Starting proxy cache on TCP/IP port $SLAVEPORT..."
+. $CONFFILTER < $PROXYCACHECONF > $CACHECONF
+$SLAPD -f $CACHECONF -h $SLAVEURI -d $LVL > $SLAVELOG 2>&1 &
+CACHEPID=$!
+if test $WAIT != 0 ; then
+       echo CACHEPID $CACHEPID
+       read foo
+fi
+
+sleep 8
+echo "Making queries on the proxy cache..." 
+echo "Query 1: filter:(sn=Jon) attrs: all" 
+$LDAPSEARCH -x -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       'sn=Jon' > $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+
+echo "Query 2: filter:(|(cn=*Jon*)(sn=Jon*)) attrs:cn sn title uid"  
+$LDAPSEARCH -x -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       '(|(cn=*Jon*)(sn=Jon*))' cn sn title uid >> $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+
+echo "Query 3: filter:(sn=Smith*) attrs:cn sn title uid"  
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       'sn=Smith*' cn sn title uid >> $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+
+echo "Query 4: filter:(sn=Doe*) attrs:cn sn title uid"  
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       'sn=Doe' cn sn title uid >> $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+echo "Query 5: filter:(uid=bjorn) attrs:mail postaladdress telephonenumber cn uid"  
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       'uid=bjorn' mail postaladdress telephonenumber cn uid >> $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+
+echo "Query 6: filter:(mail=*@example.com) cn sn title uid"  
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       'mail=*@mail.alumni.example.com' cn sn title uid >> $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+
+echo "Query 7: filter:(mail=*) cn sn title uid"  
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       'mail=*' cn sn title uid >> $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+# queries 2-6 are cacheable
+CACHEABILITY=0111110
+grep CACHEABLE $SLAVELOG | awk '{ 
+                                 if ($2 == "NOT") 
+                                   printf "Query %d not cacheable\n",NR
+                                 else 
+                                   printf "Query %d cacheable\n",NR
+                               }' 
+CACHED=`grep CACHEABLE $SLAVELOG | awk '{ 
+                                         if ($2 == "NOT") 
+                                           printf "0" 
+                                         else 
+                                           printf "1" 
+                                       }'`
+
+if test $CACHEABILITY = $CACHED
+then
+       echo "successfully verified cacheability"
+else 
+       echo "error in verifying cacheability"
+       kill -HUP $PID $CACHEPID
+       exit 1
+fi
+
+echo "Query 8: filter:(|(cn=*Jones)(sn=Jones)) attrs:cn sn title uid"  
+$LDAPSEARCH -x -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       '(|(cn=*Jones)(sn=Jones))' cn sn title uid >> $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+
+echo "Query 9: filter:(sn=Smith) attrs:cn sn title uid"  
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       'sn=Smith' cn sn title uid >> $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+
+echo "Query 10: filter:(uid=bjorn) attrs:mail postaladdress telephonenumber cn uid"  
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       'uid=bjorn' mail postaladdress telephonenumber cn uid >> $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+
+echo "Query 11: filter:(mail=*@example.com) cn sn title uid"  
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
+       'mail=jaj@mail.alumni.example.com' cn sn title uid >> $SLAVEOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       kill -HUP $PID $CACHEPID
+       exit $RC
+fi
+sleep 3
+#queries 8-11 are answerable
+ANSWERABILITY=1111
+grep ANSWERABLE $SLAVELOG | awk '{ 
+                                   if (NR > 7) { 
+                                     if ($2 == "NOT") 
+                                       printf "Query %d not answerable\n",NR
+                                     else 
+                                       printf "Query %d answerable\n",NR 
+                                    }
+                                 }' 
+ANSWERED=`grep ANSWERABLE $SLAVELOG | awk '{ 
+                                            if (NR > 7) { 
+                                              if ($2 == "NOT") 
+                                                printf "0" 
+                                              else 
+                                                printf "1"
+                                            } 
+                                          }'`
+if test $ANSWERABILITY = $ANSWERED
+then
+       echo "successfully verified answerability"
+else 
+       echo "error in verifying answerability"
+       kill -HUP $PID $CACHEPID
+       exit 1
+fi
+
+echo "Proxy cache successfully tested" 
+kill -HUP $PID $CACHEPID
diff --git a/tests/scripts/test020-syncreplication-cascading b/tests/scripts/test020-syncreplication-cascading
new file mode 100755 (executable)
index 0000000..7fff42e
--- /dev/null
@@ -0,0 +1,426 @@
+#! /bin/sh
+# $OpenLDAP$
+
+SRCDIR="."
+if test $# -ge 1 ; then
+       SRCDIR=$1; shift
+fi
+
+. $SRCDIR/scripts/args.sh $*
+
+echo "running defines.sh"
+. $SRCDIR/scripts/defines.sh
+
+#
+# Test replication:
+# - start master
+# - start slave
+# - populate over ldap
+# - perform some modifies and deleted
+# - retrieve database over ldap and compare against expected results
+#
+
+echo "Cleaning up in $DBDIR..."
+rm -f $DBDIR/[!C]*
+echo "Resetting $R1REPLDIR..."
+rm -rf $R1REPLDIR
+mkdir $R1REPLDIR
+echo "Resetting $R2REPLDIR..."
+rm -rf $R2REPLDIR
+mkdir $R2REPLDIR
+echo "Resetting $P1REPLDIR..."
+rm -rf $P1REPLDIR
+mkdir $P1REPLDIR
+echo "Resetting $P2REPLDIR..."
+rm -rf $P2REPLDIR
+mkdir $P2REPLDIR
+echo "Resetting $P3REPLDIR..."
+rm -rf $P3REPLDIR
+mkdir $P3REPLDIR
+
+SAVE=$BACKEND
+if test $BACKEND = ldbm; then
+       BACKEND=bdb
+fi
+echo "Starting master slapd on TCP/IP port $PORT..."
+. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $DBCONF
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+PID=$!
+if test $WAIT != 0 ; then
+    echo PID $PID
+    read foo
+fi
+BACKEND=$SAVE
+
+echo "Waiting 5 seconds to wait for master to start..."
+sleep 5
+
+echo "Using ldapsearch to check that master slapd is running..."
+for i in 0 1 2 3 4 5; do
+       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
+               'objectclass=*' > /dev/null 2>&1
+       RC=$?
+       if test $RC = 0 ; then
+               break
+       fi
+       echo "Waiting 5 seconds for slapd to start..."
+       sleep 5
+done
+
+echo "Using ldapadd to create the context prefix entry in the master..."
+$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
+       $LDIFORDEREDCP > /dev/null 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapadd failed ($RC)!"
+       kill -HUP $PID
+       exit $RC
+fi
+
+SAVE=$BACKEND
+BACKEND=bdb
+echo "Starting R1 slave slapd on TCP/IP port $R1SLAVEPORT..."
+. $CONFFILTER $BACKEND $MONITORDB < $R1SRSLAVECONF > $R1REPLCONF
+$SLAPD -f $R1REPLCONF -h $R1SLAVEURI -d $LVL $TIMING > $R1SLAVELOG 2>&1 &
+R1SLAVEPID=$!
+if test $WAIT != 0 ; then
+    echo SLAVE R1 PID $R1SLAVEPID
+    read foo
+fi
+BACKEND=$SAVE
+
+echo "Using ldapsearch to check that R1 slave slapd is running..."
+for i in 0 1 2 3 4 5; do
+       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $R1SLAVEPORT \
+               'objectclass=*' > /dev/null 2>&1
+       RC=$?
+       if test $RC = 0 ; then
+               break
+       fi
+       echo "Waiting 5 seconds for R1 slapd to start..."
+       sleep 5
+done
+
+echo "Waiting for the R1 slave to replicate..."
+sleep 10
+
+echo "Starting R2 slave slapd on TCP/IP port $R2SLAVEPORT..."
+. $CONFFILTER $BACKEND $MONITORDB < $R2SRSLAVECONF > $R2REPLCONF
+$SLAPD -f $R2REPLCONF -h $R2SLAVEURI -d $LVL $TIMING > $R2SLAVELOG 2>&1 &
+R2SLAVEPID=$!
+if test $WAIT != 0 ; then
+    echo SLAVE R2 PID $R2SLAVEPID
+    read foo
+fi
+
+echo "Using ldapsearch to check that the R2 slave slapd is running..."
+for i in 0 1 2 3 4 5; do
+       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $R2SLAVEPORT \
+               'objectclass=*' > /dev/null 2>&1
+       RC=$?
+       if test $RC = 0 ; then
+               break
+       fi
+       echo "Waiting 5 seconds for R2 slave slapd to start..."
+       sleep 5
+done
+
+echo "Waiting for the R2 slave to replicate..."
+sleep 10
+
+SAVE=$BACKEND
+BACKEND=bdb
+echo "Starting P1 slave slapd on TCP/IP port $P1SLAVEPORT..."
+. $CONFFILTER $BACKEND $MONITORDB < $P1SRSLAVECONF > $P1REPLCONF
+$SLAPD -f $P1REPLCONF -h $P1SLAVEURI -d $LVL $TIMING > $P1SLAVELOG 2>&1 &
+P1SLAVEPID=$!
+if test $WAIT != 0 ; then
+    echo SLAVE P1 PID $P1SLAVEPID
+    read foo
+fi
+BACKEND=$SAVE
+
+echo "Using ldapsearch to check that the P1 slave slapd is running..."
+for i in 0 1 2 3 4 5; do
+       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $P1SLAVEPORT \
+               'objectclass=*' > /dev/null 2>&1
+       RC=$?
+       if test $RC = 0 ; then
+               break
+       fi
+       echo "Waiting 5 seconds for P1 slave slapd to start..."
+       sleep 5
+done
+
+echo "Waiting for the P1 slave to replicate..."
+sleep 10
+
+echo "Starting P2 slave slapd on TCP/IP port $P2SLAVEPORT..."
+. $CONFFILTER $BACKEND $MONITORDB < $P2SRSLAVECONF > $P2REPLCONF
+$SLAPD -f $P2REPLCONF -h $P2SLAVEURI -d $LVL $TIMING > $P2SLAVELOG 2>&1 &
+P2SLAVEPID=$!
+if test $WAIT != 0 ; then
+    echo SLAVE P2 PID $P2SLAVEPID
+    read foo
+fi
+
+echo "Using ldapsearch to check that the P2 slave slapd is running..."
+for i in 0 1 2 3 4 5; do
+       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $P2SLAVEPORT \
+               'objectclass=*' > /dev/null 2>&1
+       RC=$?
+       if test $RC = 0 ; then
+               break
+       fi
+       echo "Waiting 5 seconds for P2 slave slapd to start..."
+       sleep 5
+done
+
+echo "Starting P3 slave slapd on TCP/IP port $P3SLAVEPORT..."
+. $CONFFILTER $BACKEND $MONITORDB < $P3SRSLAVECONF > $P3REPLCONF
+$SLAPD -f $P3REPLCONF -h $P3SLAVEURI -d $LVL $TIMING > $P3SLAVELOG 2>&1 &
+P3SLAVEPID=$!
+if test $WAIT != 0 ; then
+    echo SLAVE P3 PID $P3SLAVEPID
+    read foo
+fi
+
+echo "Using ldapsearch to check that the P3 slave slapd is running..."
+for i in 0 1 2 3 4 5; do
+       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $P3SLAVEPORT \
+               'objectclass=*' > /dev/null 2>&1
+       RC=$?
+       if test $RC = 0 ; then
+               break
+       fi
+       echo "Waiting 5 seconds for P3 slave slapd to start..."
+       sleep 5
+done
+
+echo "Using ldapadd to populate the master directory..."
+$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
+       $LDIFORDEREDNOCP > /dev/null 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapadd failed ($RC)!"
+       kill -HUP $PID $R1SLAVEPID $R2SLAVEPID $P1SLAVEPID $P2SLAVEPID $P3SLAVEPID
+       exit $RC
+fi
+
+echo "Waiting 90 seconds for syncrepl to receive changes..."
+sleep 90
+
+echo "Using ldapmodify to modify master directory..."
+
+#
+# Do some modifications
+#
+
+$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD > \
+       $TESTOUT 2>&1 << EOMODS
+dn: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US
+changetype: modify
+add: drink
+drink: Orange Juice
+-
+delete: sn
+sn: Jones
+-
+add: sn
+sn: Jones
+
+dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+changetype: modify
+replace: drink
+drink: Iced Tea
+drink: Mad Dog 20/20
+
+dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
+changetype: modify
+delete: member
+member: cn=James A Jones 2, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+member: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+-
+add: member
+member: cn=Dorothy Stevens, ou=Alumni Association, ou=People, o=University of Michigan, c=US
+member: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US
+
+dn: cn=All Staff,ou=Groups,o=University of Michigan,c=US
+changetype: modify
+delete: description
+
+dn: cn=Gern Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+changetype: add
+objectclass: OpenLDAPperson
+cn: Gern Jensen
+sn: Jensen
+uid: gjensen
+title: Chief Investigator, ITD
+postaladdress: ITD $ 535 W. William St $ Ann Arbor, MI 48103
+seealso: cn=All Staff, ou=Groups, o=University of Michigan, c=US
+drink: Coffee
+homepostaladdress: 844 Brown St. Apt. 4 $ Ann Arbor, MI 48104
+description: Very odd
+facsimiletelephonenumber: +1 313 555 7557
+telephonenumber: +1 313 555 8343
+mail: gjensen@mailgw.example.com
+homephone: +1 313 555 8844
+
+dn: ou=Retired, ou=People, o=University of Michigan, c=US
+changetype: add
+objectclass: organizationalUnit
+ou: Retired
+
+dn: cn=Rosco P. Coltrane, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+changetype: add
+objectclass: OpenLDAPperson
+cn: Rosco P. Coltrane
+sn: Coltrane
+uid: rosco
+
+dn: cn=Rosco P. Coltrane, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+changetype: modrdn
+newrdn: cn=Rosco P. Coltrane
+deleteoldrdn: 1
+newsuperior: ou=Retired, ou=People, o=University of Michigan, c=US
+
+dn: cn=James A Jones 2, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+changetype: delete
+
+EOMODS
+
+echo "Waiting 90 seconds for syncrepl to receive changes..."
+sleep 90
+
+echo "Using ldapsearch to read all the entries from the master..."
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
+       'objectclass=*' > $MASTEROUT 2>&1
+RC=$?
+
+if test $RC != 0 ; then
+       echo "ldapsearch failed at master ($RC)!"
+       kill -HUP $PID $R1SLAVEPID $R2SLAVEPID $P1SLAVEPID $P2SLAVEPID $P3SLAVEPID
+       exit $RC
+fi
+
+echo "Using ldapsearch to read all the entries from the R1 slave..."
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $R1SLAVEPORT \
+       'objectclass=*' > $R1SLAVEOUT 2>&1
+RC=$?
+
+if test $RC != 0 ; then
+       echo "ldapsearch failed at R1 slave ($RC)!"
+       kill -HUP $PID $R1SLAVEPID $R2SLAVEPID $P1SLAVEPID $P2SLAVEPID $P3SLAVEPID
+       exit $RC
+fi
+
+echo "Using ldapsearch to read all the entries from the R2 slave..."
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $R2SLAVEPORT \
+       'objectclass=*' > $R2SLAVEOUT 2>&1
+RC=$?
+
+if test $RC != 0 ; then
+       echo "ldapsearch failed at R2 slave ($RC)!"
+       kill -HUP $PID $R1SLAVEPID $R2SLAVEPID $P1SLAVEPID $P2SLAVEPID $P3SLAVEPID
+       exit $RC
+fi
+
+echo "Using ldapsearch to read all the entries from the P1 slave..."
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $P1SLAVEPORT \
+       'objectclass=*' > $P1SLAVEOUT 2>&1
+RC=$?
+
+if test $RC != 0 ; then
+       echo "ldapsearch failed at R1 slave ($RC)!"
+       kill -HUP $PID $R1SLAVEPID $R2SLAVEPID $P1SLAVEPID $P2SLAVEPID $P3SLAVEPID
+       exit $RC
+fi
+
+echo "Using ldapsearch to read all the entries from the P2 slave..."
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $P2SLAVEPORT \
+       'objectclass=*' > $P2SLAVEOUT 2>&1
+RC=$?
+
+if test $RC != 0 ; then
+       echo "ldapsearch failed at R2 slave ($RC)!"
+       kill -HUP $PID $R1SLAVEPID $R2SLAVEPID $P1SLAVEPID $P2SLAVEPID $P3SLAVEPID
+       exit $RC
+fi
+
+echo "Using ldapsearch to read all the entries from the P3 slave..."
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $P3SLAVEPORT \
+       'objectclass=*' > $P3SLAVEOUT 2>&1
+RC=$?
+
+if test $RC != 0 ; then
+       echo "ldapsearch failed at R2 slave ($RC)!"
+       kill -HUP $PID $R1SLAVEPID $R2SLAVEPID $P1SLAVEPID $P2SLAVEPID $P3SLAVEPID
+       exit $RC
+fi
+
+kill -HUP $PID $R1SLAVEPID $R2SLAVEPID $P1SLAVEPID $P2SLAVEPID $P3SLAVEPID
+
+SEARCHOUT=$MASTEROUT
+R1LDIF=$R1SLAVEOUT
+R2LDIF=$R2SLAVEOUT
+P1LDIF=$P1SLAVEOUT
+P2LDIF=$P2SLAVEOUT
+P3LDIF=$P3SLAVEOUT
+
+echo "Filtering master ldapsearch results..."
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+echo "Filtering R1 slave ldapsearch results..."
+. $LDIFFILTER < $R1LDIF > $R1LDIFFLT
+echo "Filtering R2 slave ldapsearch results..."
+. $LDIFFILTER < $R2LDIF > $R2LDIFFLT
+echo "Filtering P1 slave ldapsearch results..."
+. $LDIFFILTER < $P1LDIF > $P1LDIFFLT
+echo "Filtering P2 slave ldapsearch results..."
+. $LDIFFILTER < $P2LDIF > $P2LDIFFLT
+echo "Filtering P3 slave ldapsearch results..."
+. $LDIFFILTER < $P3LDIF > $P3LDIFFLT
+
+echo "Comparing retrieved entries from master and R1 slave..."
+$CMP $SEARCHFLT $R1LDIFFLT > $CMPOUT
+
+if test $? != 0 ; then
+       echo "test failed - master and R1 slave databases differ"
+       exit 1
+fi
+
+echo "Comparing retrieved entries from master and R2 slave..."
+$CMP $SEARCHFLT $R2LDIFFLT > $CMPOUT
+
+if test $? != 0 ; then
+       echo "test failed - master and R2 slave databases differ"
+       exit 1
+fi
+
+echo "Comparing retrieved entries from master and P1 slave..."
+$CMP $SEARCHFLT $P1LDIFFLT > $CMPOUT
+
+if test $? != 0 ; then
+       echo "test failed - master and P1 slave databases differ"
+       exit 1
+fi
+
+echo "Comparing retrieved entries from master and P2 slave..."
+$CMP $SEARCHFLT $P2LDIFFLT > $CMPOUT
+
+if test $? != 0 ; then
+       echo "test failed - master and P2 slave databases differ"
+       exit 1
+fi
+
+echo "Comparing retrieved entries from master and P3 slave..."
+$CMP $SEARCHFLT $P3LDIFFLT > $CMPOUT
+
+if test $? != 0 ; then
+       echo "test failed - master and P3 slave databases differ"
+       exit 1
+fi
+
+echo ">>>>> Test succeeded"
+
+
+exit 0