#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
#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
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"
#include <ldap.h>
#include "lutil_ldap.h"
+#include "ldap_defaults.h"
+#include "ldap_pvt.h"
#include "common.h"
#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;
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
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"),
*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 );
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 );
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 ) {
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;
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++;
}
#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;
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"),
tool_bind( ld );
- if ( authzid || manageDSAit || noop )
+ if ( assertion || authzid || manageDSAit || noop ) {
tool_server_controls( ld, NULL, 0 );
+ }
retval = rc = 0;
#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"
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 );
}
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;
}
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 );
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 ) {
tool_bind( ld );
- if ( authzid || manageDSAit || noop )
+ if ( assertion || authzid || manageDSAit || noop ) {
tool_server_controls( ld, NULL, 0 );
+ }
retval = rc = 0;
if (havedn)
}
if( oldpwfile ) {
- rc = lutil_get_filed_password( prog, &oldpw );
+ rc = lutil_get_filed_password( oldpwfile, &oldpw );
if( rc ) return EXIT_FAILURE;
}
}
if( newpwfile ) {
- rc = lutil_get_filed_password( prog, &newpw );
+ rc = lutil_get_filed_password( newpwfile, &newpw );
if( rc ) return EXIT_FAILURE;
}
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 */
#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"));
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;
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;
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"));
exit( EXIT_FAILURE );
}
if ( crit ) ldapsync *= -1;
-#endif
} else {
fprintf( stderr, _("Invalid control name: %s\n"), control );
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();
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];
}
#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;
c[i].ldctl_iscritical = ldapsync < 0;
i++;
}
-#endif
if ( valuesReturnFilter ) {
if (( vrber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
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 ) );
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:
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:
}
#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 );
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;
msgidvalp, NULL, NULL, &cancel_msgid);
nresponses_psearch = -1;
}
-#endif
-
}
ldap_msgfree( res );
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 );
#! /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.
#
BUILD_LDBM=no
BUILD_META=no
BUILD_MONITOR=no
+BUILD_CACHE=no
BUILD_NULL=no
BUILD_PASSWD=no
BUILD_PERL=no
# 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
# 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
# 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
# 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
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() {
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
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
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
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=
# 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
:
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
:
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
:
# 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
# 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
# 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
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.
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
{ 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
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
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
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
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
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
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
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
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
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
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
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) ;;
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
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) ;;
# 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
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"
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"
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*
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
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
# 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
# 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
# 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
# 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
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"
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
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
# 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
# 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
# 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
# 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
# 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
# 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
# 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() {
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
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
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
# 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
# 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*)
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
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
# 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
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
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
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
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
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
# 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=
# 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
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"
# 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=
# 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
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
*)
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. */
; 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
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
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
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
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. */
; 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
# 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
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
# 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
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
# 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
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=
# 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
:
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
:
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
:
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() {
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
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
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
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) ;;
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) ;;
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
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
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
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
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>
; 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
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
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
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
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
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
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*
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
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
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
# 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)
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*
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>
#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*
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
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
:
else
cat > conftest.$ac_ext <<EOF
-#line 8517 "configure"
+#line 8518 "configure"
#include "confdefs.h"
#include <ctype.h>
#ifndef HAVE_EBCDIC
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
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>
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
# 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
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
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
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
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
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
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>
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
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>
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
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
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>
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>
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*
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. */
; 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
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
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
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
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
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
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
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();
; 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
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. */
; 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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. */
; 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
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
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>
; 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
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*
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
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
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
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
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
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>
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
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*
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
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
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
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
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();
; 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
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. */
; 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
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. */
; 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
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
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
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
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
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
__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
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
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
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
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
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
__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. */
; 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
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>
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>
; 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
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*
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*
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*
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
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
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
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
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
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
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
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
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*
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
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
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
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
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
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>
; 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
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*
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
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
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*
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
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
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
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
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
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
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
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
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
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. */
; 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
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*
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>
; 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
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 11398 "configure"
+#line 11399 "configure"
#include "confdefs.h"
# include <pthread.h>
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 11415 "configure"
+#line 11416 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 11427 "configure"
+#line 11428 "configure"
#include "confdefs.h"
# include <pthread.h>
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
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
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*
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 11666 "configure"
+#line 11667 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 11853 "configure"
+#line 11854 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 12045 "configure"
+#line 12046 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 12237 "configure"
+#line 12238 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 12429 "configure"
+#line 12430 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 12621 "configure"
+#line 12622 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 12814 "configure"
+#line 12815 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 13006 "configure"
+#line 13007 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 13199 "configure"
+#line 13200 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 13392 "configure"
+#line 13393 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 13584 "configure"
+#line 13585 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 13777 "configure"
+#line 13778 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 13970 "configure"
+#line 13971 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 14162 "configure"
+#line 14163 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 14354 "configure"
+#line 14355 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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
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
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>
; 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
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 14547 "configure"
+#line 14548 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
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. */
; 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
$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
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
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. */
; 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
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>
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
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. */
; 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
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. */
; 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
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
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
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
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>
}
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
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
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>
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
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*
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. */
; 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
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
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() {
; 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
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. */
; 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
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*
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
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
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
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*
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
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
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
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. */
; 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
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*
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
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
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
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*
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. */
; 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
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
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*
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*
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*
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
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. */
; 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
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>
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
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>
&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>
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
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>
&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
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*
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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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*
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
; 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
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
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
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
{ 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. */
; 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
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
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
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
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*
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. */
; 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
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
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
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
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*
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. */
; 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
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
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
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
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
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
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
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*
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
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*
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>
; 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
LIBS="$LIBS -lnsl"
cat > conftest.$ac_ext <<EOF
-#line 19805 "configure"
+#line 19806 "configure"
#include "confdefs.h"
#include <tcpd.h>
; 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. */
; 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
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*
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
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
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
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
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
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
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*
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
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
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
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
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
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
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*
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
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
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
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
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
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
#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
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. */
; 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
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>
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
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. */
; 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
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
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
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. */
; 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
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
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
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
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*
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
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
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
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>
#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*
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
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
:
else
cat > conftest.$ac_ext <<EOF
-#line 20931 "configure"
+#line 20965 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
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
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
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
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
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
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>
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
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
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
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
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>
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
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>
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
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>
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
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
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
# 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() {
; 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() {
; 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
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
ol_cv_c_upper_lower=safe
else
cat > conftest.$ac_ext <<EOF
-#line 21564 "configure"
+#line 21598 "configure"
#include "confdefs.h"
#include <ctype.h>
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
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() {
; 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
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() {
*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
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>
#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>
#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
{ 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. */
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>
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
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>
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
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>
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
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
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 21963 "configure"
+#line 21997 "configure"
#include "confdefs.h"
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
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. */
; 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
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
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
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
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
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. */
; 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. */
; 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. */
; 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. */
; 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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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>
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
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
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*
{ 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
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
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
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
+
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
BUILD_LDBM=no
BUILD_META=no
BUILD_MONITOR=no
+BUILD_CACHE=no
BUILD_NULL=no
BUILD_PASSWD=no
BUILD_PERL=no
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
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])
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)
##
-# 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
-# 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.
# (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 \
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"; \
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.
-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
alias in your environment])
fi
- test "[$]2" = conftestfile
+ test "$[2]" = conftest.file
)
then
# Ok.
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
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
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"
])
+# 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
# [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'
# 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
# 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
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
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"
*-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)])
#
# 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' &&
# _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
# 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
# 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.
# 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*)
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.
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*)
# 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
# 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=
# 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;
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`;
# 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
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
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
;;
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
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
;;
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'
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
;;
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
;;
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'
# 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
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*)
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~
$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'
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=
;;
*)
# 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,
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*)
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
# 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 \
# 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.
OBJDUMP="$OBJDUMP"
# Used on cygwin: assembler.
-AS="$AS"
+AS=$lt_AS
# The name of the directory that contains temporary libtool files.
objdir=$objdir
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.
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
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
# 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=
# `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.
;;
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
;;
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.*`
;;
;;
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"
;;
*) 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*`
# 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
;;
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)
;;
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
# 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
])
# 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.
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.
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
# 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])
+])
+
#! /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.
*-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}
#
# 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' &&
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,
# 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.
# 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=
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
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 \
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
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
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=..
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
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]...
-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]
--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
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
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
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`
/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
"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
# 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
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
# 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;;
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
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
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
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
# 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
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}.
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"
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
# 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
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}.
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
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
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
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
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 ()
}
_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;;
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 ()
}
_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 ()
}
_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 ()
}
_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
'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
}
_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 ()
}
_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
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
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
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
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'
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
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
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
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
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
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
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
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
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
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
# 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
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
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
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
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
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 ()
}
_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 ()
}
_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
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
#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 \
''\
'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
}
_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 ()
}
_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
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
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"
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*)
;;
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
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
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
# 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
# `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.
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"
;;
# 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 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
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]'
;;
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
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"
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
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
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
:
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
# 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
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
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
:
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
# 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
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
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
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
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
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
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
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
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
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
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=":"
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
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
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
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
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=":"
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
STRIP="$ac_cv_prog_STRIP"
fi
+
enable_dlopen=no
enable_win32_dll=no
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*)
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'
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 ()
}
_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
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
fi
;;
+
esac
# Sed substitution that helps us do robust quoting. It backslashifies
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
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"
# 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
# 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*)
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.
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*)
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
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 ()
}
_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*)
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
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
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
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 ()
}
_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"
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
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
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
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 ()
}
_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
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"
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
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*
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
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 ()
}
_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
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
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=
# 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=
# 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;
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`;
# 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
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
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
;;
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
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
;;
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'
;;
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
;;
;;
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" || \
# 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
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'
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'
# 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
fi
shlibpath_var=LIBPATH
fi
+ hardcode_into_libs=yes
;;
amigaos*)
;;
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'
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=
;;
*)
# 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,
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*)
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
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
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
;;
*)
- 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
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
}
_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
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
}
_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
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
}
_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
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
}
_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
;;
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
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
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=$?
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
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
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=$?
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
esac
fi
+
if test "$enable_shared" = yes && test "$GCC" = yes; then
case $archive_cmds in
*'~'*)
# 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
$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
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
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
# 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 \
# 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.
OBJDUMP="$OBJDUMP"
# Used on cygwin: assembler.
-AS="$AS"
+AS=$lt_AS
# The name of the directory that contains temporary libtool files.
objdir=$objdir
chmod +x "$ofile"
fi
+
+
+
+
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
# 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"
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"
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
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 ()
}
_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
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
}
_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
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
-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
}
_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
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>
}
_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
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
:
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
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
:
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
# 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.
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
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.
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.
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
-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]
$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
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=:
--*=*)
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;}
--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;}
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
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 ||
{
}
# 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.
sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@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
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
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
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
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
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\(/\)' \| \
/^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.
-) 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;;
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
fi
done
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_HEADER section.
* ) 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
-) 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;;
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;;
# 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
# `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.
# 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
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
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\(/\)' \| \
/^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
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.
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
# 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.
-dnl Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
+dnl Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
dnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file
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)
dnl Checks for library functions.
-AC_OUTPUT(Makefile src/Makefile)
+AC_OUTPUT(Makefile src/Makefile examples/Makefile)
--- /dev/null
+#! /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
--- /dev/null
+##
+# 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
--- /dev/null
+# 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:
--- /dev/null
+/*
+ * 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();
+ */
+}
+
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(){
LDAPAsynConnection::~LDAPAsynConnection(){
DEBUG(LDAP_DEBUG_DESTROY,
"LDAPAsynConnection::~LDAPAsynConnection()" << endl);
- if (cur_session){
- ldap_destroy_cache(cur_session);
- }
unbind();
//delete m_constr;
}
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);
- }
-}
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.
--- /dev/null
+/*
+ * 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());
+}
--- /dev/null
+/*
+ * 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
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();
-}
-
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
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(){
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(){
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(){
--- /dev/null
+/*
+ * 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());
+}
--- /dev/null
+/*
+ * 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
--- /dev/null
+/*
+ * 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];
+}
--- /dev/null
+/*
+ * 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
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 \
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 \
libldapcpp_la_LIBADD = -lldap -llber
libldapcpp_la_LDFLAGS = -version-info 0:1:0
-
-noinst_PROGRAMS = main
-
-main_SOURCES = main.cpp
-main_LDADD = ./libldapcpp.la
-
-# 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
-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.
-/* 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 */
+++ /dev/null
-/*
- * 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();
- */
-}
-
{
ldapctx tmp, *p;
const char *s;
+ unsigned len;
if(!out_version || !plug) return SASL_BADPARAM;
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;
---------------
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
.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.
.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.
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
.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.
.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.
.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.
.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
.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:
.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.
.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.
.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.
ber = ber_alloc_t( LBER_USE_DER );
if ( ber == NULL ) {
- /* error */
+ /* error */
}
rc = ber_printf( ber, "{siiiib{v}}", dn, scope, ali,
.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.
.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.
.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.
.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
.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.
.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.
.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.
.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.
.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.
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()
.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.
.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.
.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.
.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.
.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.
.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.
.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.
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;
.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.
.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.
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;
.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.
.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
.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.
.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,
.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.
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()
.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.
.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.
.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.
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
.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.
.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.
.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
.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
.LP
.nf
.ft tt
- cn: Barbara J Jensen
- cn: Babs Jensen
+ cn: Barbara J Jensen
+ cn: Babs Jensen
.ft
.fi
.LP
.LP
.nf
.ft tt
- cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
+ cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
.ft
.fi
.LP
.LP
.nf
.ft tt
- cn:< file:///tmp/value
+ cn:< file:///tmp/value
.ft
.fi
Other URI schemes (ftp,http) may be supported as well.
.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
.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.
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
.BR slapadd (8),
.BR slapcat (8),
.BR slapindex (8),
-.BR Berkeley DB documentation .
+Berkeley DB documentation.
.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
.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.
.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
.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
.LP
.RS
.nf
-database monitor
+database monitor
.fi
.RE
.TP
.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
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
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
# 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
...
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
.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
.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
.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
.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
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>]
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
.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:
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
.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),
.BR slapd-tcl (5),
.BR slapd.replog (5),
.BR slapd.access (5),
-.BR locale (5),
.BR slapd (8),
.BR slapadd (8),
.BR slapcat (8),
.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.
.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.
.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.
.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.
.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,
.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.
.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.
.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.
#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
#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)
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
/* 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
#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)
/*
} 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"
#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"
#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
#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 */
#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 */
#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.
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!
*/
/* 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 */
#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)\
(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 ));
#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); \
/* 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
/* 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
#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"
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 */
/*
#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"
#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
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 );
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 );
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] = '.';
}
}
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] = '.';
}
}
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);
int lutil_set_debug_level( const char* subsys, int level )
{
- return( addSubsys( subsys, level ) );
+ return( addSubsys( subsys, level ) );
}
int lutil_debug_file( FILE *file )
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 */
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 );
}
* 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 ",
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, ... )
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 );
}
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 ) {
* 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);
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;
if ( rlen ) *rlen = i;
- if ( i == 0 )
- {
+ if ( i == 0 ) {
*b->res.c = NULL;
return 0;
}
/* 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;
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) {
}
}
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;
}
}
}
}
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;
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;
}
}
--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;
}
#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 );
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;
/* format should be good */
assert( 0 );
}
- }
+ }
- va_end( ap );
+ va_end( ap );
}
return rc;
* 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;
}
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);
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++ ) {
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 */
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;
}
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 );
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;
}
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;
} 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;
return;
}
- if( freebuf )
- ber_free_buf( ber );
+ if( freebuf ) ber_free_buf( ber );
ber_memfree_x( (char *) ber, ber->ber_memctx );
}
ber->ber_rwptr += rc;
}
- if ( freeit )
- ber_free( ber, 1 );
+ if ( freeit ) ber_free( ber, 1 );
return( 0 );
}
#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 {
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;
}
}
AC_MEMCPY( p, s, len );
- p[ len ] = '\0';
+ p[len] = '\0';
return p;
}
char *ber_pvt_wsa_err2string( int err )
{
- switch( err )
- {
+ switch( err ) {
LBER_RETSTR( WSAEINTR )
LBER_RETSTR( WSAEBADF )
LBER_RETSTR( WSAEACCES )
LBER_RETSTR( WSANO_DATA )
}
return "unknown WSA error";
-}
\ No newline at end of file
+}
#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 };
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;
}
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;
}
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;
* 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__ )
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;
}
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;
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;
}
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;
}
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;
}
va_end( ap );
return res;
}
-#endif /* !HAVE_VSNPRINTF */
+#endif /* !HAVE_SNPRINTF */
#ifdef HAVE_EBCDIC
/* stdio replacements with ASCII/EBCDIC translation for OS/390.
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;
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') {
} else {
s2 += sprintf(s2, fm2, ss);
}
- } else
+ } else {
s2 += sprintf(s2, fm2, va_arg(ap, int));
+ }
}
ptr = pct + 1;
}
*
* 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:
*
* 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:
*
* bind.c
*/
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
/*
* BindRequest ::= SEQUENCE {
*
* 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 {
* 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)
*
};
#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;
}
}
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;
*
* 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:
* 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"
{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")},
* 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
*
* 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"
*
* kbind.c
*/
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
/*
* BindRequest ::= SEQUENCE {
#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"
*
* 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"
* 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 );
* modifications SEQUENCE OF SEQUENCE {
* operation ENUMERATED {
* add (0),
- * delete (1),
- * replace (2)
+ * delete (1),
+ * replace (2),
+ * increment (3) -- extension
* },
* modification SEQUENCE {
* type AttributeType,
* 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 );
* 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:
* 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)
{
/* 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)
{
#include "ldap-int.h"
/*
- * LDAP Password Modify (Extended) Operation <RFC 3???>
+ * LDAP Password Modify (Extended) Operation <RFC 3062>
*/
int ldap_parse_passwd(
* 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)
* 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 {
* 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
} 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
}
*
* sbind.c
*/
+/*
+ * Portions Copyright (C) The Internet Society (1997)
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
+ */
/*
* BindRequest ::= SEQUENCE {
/*
* 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 ) {
* 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"
*
* 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:
*
* 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
* 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"
#include <ac/bytes.h>
-#include <lber.h>
+#include "lber_pvt.h"
#include "ucdata.h"
/**************************************************************************
#include <ac/string.h>
#include <ac/stdlib.h>
-#include <lber.h>
+#include <lber_pvt.h>
#include <ldap_utf8.h>
#include <ldap_pvt_uc.h>
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;
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 */
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);
}
/* 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++;
}
*p = uctolower( *p );
}
p++;
- }
+ }
/* normalize ucs of length p - ucs */
uccompatdecomp( ucs, p - ucs, &ucsout, &ucsoutlen, ctx );
if ( approx ) {
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 );
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;
}
if (casefold) {
char c1 = TOLOWER(*s1);
char c2 = TOLOWER(*s2);
- res = c1 - c2;
+ res = c1 - c2;
} else {
res = *s1 - *s2;
}
break;
}
} else if (((len < l1) && !LDAP_UTF8_ISASCII(s1)) ||
- ((len < l2) && !LDAP_UTF8_ISASCII(s2))) {
+ ((len < l2) && !LDAP_UTF8_ISASCII(s2)))
+ {
break;
}
return res;
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??? */
/* 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 );
}
/* 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 );
}
* 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"
}
#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 */
{
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,
}
/* 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
}
#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,
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++) {
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 );
*/
#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>
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
#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
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
}
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 \
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
*/
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"),
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(
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];
goto vd_access;
} else {
+ if ( state ) state->as_vi_acl = NULL;
a = NULL;
ACL_INIT(mask);
count = 0;
Access *b;
#ifdef LDAP_DEBUG
char accessmaskbuf[ACCESSMASK_MAXLEN];
+ char accessmaskbuf1[ACCESSMASK_MAXLEN];
#endif
const char *attr;
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
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;
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;
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);
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);
}
} 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;
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"
"<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"
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;
}
}
- 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;
e = NULL;
}
-#if defined(LDAP_SYNCREPL) || !defined(SLAPD_MULTIMASTER)
+#ifndef SLAPD_MULTIMASTER
} else {
BerVarray defref = NULL;
#ifdef LDAP_SLAPI
}
#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;
}
#endif /* LDAP_SLAPI */
done:
+
+ slap_graduate_commit_csn( op );
+
if( modlist != NULL ) {
slap_mods_free( modlist );
}
Modifications *mods,
Entry **e,
int repl_user,
+ int dup,
const char **text,
char *textbuf, size_t textlen )
{
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 );
/* 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;
}
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 )
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,
error_return:;
if ( nvals != NULL ) {
- ber_bvarray_free( nvals );
+ ber_bvarray_free_x( nvals, memctx );
}
return rc;
}
rc = attr_merge_one( e, desc, val, nvalp );
if ( nvalp != NULL ) {
- ch_free( nval.bv_val );
+ sl_free( nval.bv_val, memctx );
}
return rc;
}
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
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 );
"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";
rs->sr_text = "internal error";
goto return_results;
}
+ bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
}
#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 );
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;
}
}
"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 );
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, <2,
bdb->bi_db_opflags );
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 {
} else {
struct berval nrdn;
+ struct berval ctx_nrdn;
if (pdn.bv_len) {
nrdn.bv_val = op->ora_e->e_nname.bv_val;
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";
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();
}
done:
-
if( ltid != NULL ) {
TXN_ABORT( ltid );
op->o_private = NULL;
return ( ( rs->sr_err == LDAP_SUCCESS ) ? noop : rs->sr_err );
}
-
LDAP_BEGIN_DECL
-#ifdef LDAP_SYNCREPL
#define BDB_SUBENTRIES 1
-#endif
#define DN_BASE_PREFIX SLAP_INDEX_EQUALITY_PREFIX
#define DN_ONE_PREFIX '%'
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;
#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"
}
/* Atomically release and reacquire a lock */
-static int
+int
bdb_cache_entry_db_relock(
DB_ENV *env,
u_int32_t locker,
*/
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 )) {
{
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;
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
/* 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;
/* 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 );
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
}
}
/* 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 );
/* 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 );
}
Entry *e
)
{
+ bdb_cache_entryinfo_unlock( BEI(e) );
bdb_cache_entryinfo_destroy( e->e_private );
e->e_private = NULL;
bdb_entry_return( e );
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;
--- /dev/null
+/* $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, <id, 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;
+}
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;
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 );
rs->sr_text = "internal error";
goto return_results;
}
+ bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
}
}
}
- 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);
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;
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 );
"<=- 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;
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, <2,
bdb->bi_db_opflags );
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";
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;
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();
#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
}
/* checkit == 2. do the fix. */
free( e->e_name.bv_val );
+ free( e->e_nname.bv_val );
}
e->e_name.bv_len = rlen - 1;
#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;
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
f->f_result == LDAP_SUCCESS ) {
continue;
}
+ BDB_IDL_ZERO( save );
rc = bdb_filter_candidates( op, f, save, tmp,
save+BDB_IDL_UM_SIZE );
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 );
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;
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;
}
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;
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;
}
AttributeType *type,
struct berval *tags,
BerVarray vals,
+ BerVarray xvals,
ID id,
int opid )
{
/* recurse */
rc = index_at_values( op, txn, NULL,
type->sat_sup, tags,
- vals, id, opid );
+ vals, xvals, id, opid );
if( rc ) return rc;
}
if( mask ) {
rc = indexer( op, txn, ad, &type->sat_cname,
- vals, id, opid,
+ vals, xvals, id, opid,
mask );
if( rc ) return rc;
if( mask ) {
rc = indexer( op, txn, desc, &desc->ad_cname,
- vals, id, opid,
+ vals, xvals, id, opid,
mask );
if( rc ) {
DB_TXN *txn,
AttributeDescription *desc,
BerVarray vals,
+ BerVarray xvals,
ID id,
int opid )
{
rc = index_at_values( op, txn, desc,
desc->ad_type, &desc->ad_tags,
- vals, id, opid );
+ vals, xvals, id, opid );
return rc;
}
/* 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
/* indicate system schema supported */
be->be_flags |=
+ SLAP_BFLAG_INCREMENT |
#ifdef BDB_SUBENTRIES
SLAP_BFLAG_SUBENTRIES |
#endif
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 );
#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;
}
#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) );
)
{
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
};
{
#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
}
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;
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;
}
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,
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;
}
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;
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;
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 );
"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 );
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
ch_free( pm_prev );
}
-#endif
rs->sr_err = TXN_ABORT( ltid );
ltid = NULL;
rs->sr_text = "internal error";
goto return_results;
}
+ bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
}
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 )
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;
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, <2,
bdb->bi_db_opflags );
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 ) {
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";
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;
#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",
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 ) {
ch_free( pm_prev );
}
}
-#endif
if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp ) {
ldap_pvt_thread_yield();
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_NEXT ( pm_list, ps_link );
ch_free( pm_prev );
}
-#endif
TXN_ABORT( ltid );
op->o_private = NULL;
}
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",
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;
rs->sr_text = "internal error";
goto return_results;
}
+ bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
}
}
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 )
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;
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:
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 );
}
}
+ 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, <2,
bdb->bi_db_opflags );
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,
}
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 ) {
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";
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 {
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 );
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 ) {
ch_free( pm_prev );
}
}
-#endif
if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp ) {
ldap_pvt_thread_yield();
}
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;
}
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,
rs->sr_text = "internal error";
goto done;
}
+ bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
}
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;
goto done;
}
#endif
+
#ifdef BDB_ALIASES
if( is_entry_alias( e ) ) {
/* entry is an alias, don't allow operation */
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",
rs->sr_text = "internal error";
goto done;
}
+
{
Modifications ml;
struct berval vals[2];
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
*/
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
);
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)
* 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)
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)
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(
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
BackendDB *be,
Entry *e,
ID *ids );
+
static int search_candidates(
Operation *stackop, /* op with the current threadctx/slab cache */
Operation *sop, /* search op */
u_int32_t locker,
ID *ids,
ID *scopes );
+
static void send_pagerequest_response(
Operation *op,
SlapReply *rs,
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)
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 );
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;
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;
#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;
}
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 */
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 );
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;
} 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;
}
} 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;
}
}
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 );
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 );
candidates[0] = 1;
candidates[1] = ps_e->e_id;
}
-#endif
if ( candidates[0] == 0 ) {
#ifdef NEW_LOGGING
#endif
rs->sr_err = LDAP_SUCCESS;
+ rs->sr_entry = NULL;
send_ldap_result( sop, rs );
- rs->sr_err = 1;
goto done;
}
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;
}
}
#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;
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;
loop_begin:
/* check for abandon */
if ( sop->o_abandon ) {
- rs->sr_err = 0;
+ rs->sr_err = LDAP_SUCCESS;
goto done;
}
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
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;
goto id2entry_retry;
}
- if ( ei && rs->sr_err == 0 ) {
+ if ( ei && rs->sr_err == LDAP_SUCCESS ) {
e = ei->bei_e;
} else {
e = NULL;
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 )) {
/* only subentries are visible */
goto loop_continue;
}
+ /*
}
+ */
#endif
/* Does this candidate actually satisfy the search scope?
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 );
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;
}
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 ||
&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 ) {
} 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;
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;
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 );
}
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;
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;
}
#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;
BerElement *ber = (BerElement *)berbuf;
struct berval entryuuid_bv = { 0, NULL };
- struct berval entrycsn_bv = { 0, NULL };
ber_init2( ber, 0, LBER_USE_DER );
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;
LDAPControl **ctrls,
int num_ctrls,
int send_cookie,
- struct berval *latest_entrycsn_bv )
+ struct berval *csn )
{
int ret;
char berbuf[LBER_ELEMENT_SIZEOF];
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}" );
}
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" );
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" );
return LDAP_SUCCESS;
}
-#endif
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;
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;
}
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 ) {
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;
+}
--- /dev/null
+/* 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 );
+}
#ifdef SLAPD_DNSSRV_DYNAMIC
-int back_dnssrv_LTX_init_module(int argc, char *argv[])
+int init_module(int argc, char *argv[])
{
BackendInfo bi;
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
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
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 */
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;
#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;
}
--- /dev/null
+/* 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 );
+}
#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) );
bi->bi_connection_init = 0;
bi->bi_connection_destroy = ldap_back_conn_destroy;
+ ldap_chain_setup();
+
return 0;
}
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 );
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
#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 ) )
{
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);
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;
}
/*
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;
ber_bvarray_free( rs->sr_ref );
free( (char *)rs->sr_matched );
- return -1;
+ return rs->sr_err;
}
if ( ! access_allowed( op, p,
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 */
send_ldap_error( op, rs, LDAP_ALIAS_PROBLEM,
"parent is an alias" );
- return -1;
+ return LDAP_ALIAS_PROBLEM;
}
if ( is_entry_referral( p ) ) {
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;
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
#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 ) ) {
send_ldap_error( op, rs, LDAP_OTHER,
"next_id add failed" );
- return( -1 );
+ return LDAP_OTHER;
}
/*
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;
LDAP_BEGIN_DECL
+#define LDBM_SUBENTRIES 1
+
#define DEFAULT_CACHE_SIZE 1000
#if defined(HAVE_BERKELEY_DB) && DB_VERSION_MAJOR >= 2
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 */
send_ldap_error( op, rs, LDAP_ALIAS_PROBLEM,
"entry is alias" );
- rc = 1;
+ rc = LDAP_ALIAS_PROBLEM;
goto return_results;
}
ber_bvarray_free( rs->sr_ref );
- rc = 1;
+ rc = rs->sr_err;
goto return_results;
}
password, NULL, ACL_AUTH, NULL ) )
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
- rc = 1;
+ rc = LDAP_INSUFFICIENT_ACCESS;
goto return_results;
}
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;
}
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;
}
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS,
NULL );
- rc = 1;
+ rc = LDAP_INSUFFICIENT_ACCESS;
goto return_results;
}
break;
}
send_ldap_error( op, rs, LDAP_INAPPROPRIATE_AUTH, NULL );
- rc = 1;
+ rc = LDAP_INAPPROPRIATE_AUTH;
goto return_results;
} else { /* look for krbname match */
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;
}
}
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;
}
#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
#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
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 );
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);
}
/* 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 ) )
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS,
"no write access to entry" );
- rc = 1;
+ rc = LDAP_INSUFFICIENT_ACCESS;
goto return_results;
}
if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );
- rc = 1;
+ rc = LDAP_REFERRAL;
goto return_results;
}
}
}
}
-#ifdef LDAP_CACHING
- }
-#endif /* LDAP_CACHING */
/* delete from dn2id mapping */
if ( dn2id_delete( op->o_bd, &e->e_nname, e->e_id ) != 0 ) {
rs->sr_err = LDAP_SUCCESS;
send_ldap_result( op, rs );
- rc = 0;
+ rc = LDAP_SUCCESS;
return_results:;
if( p != NULL ) {
/* 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;
}
}
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
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
}
#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,
/* 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,
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,
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,
}
#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",
#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) );
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;
/* indicate system schema supported */
be->be_flags |=
+ SLAP_BFLAG_INCREMENT |
+#ifdef LDBM_SUBENTRIES
+ SLAP_BFLAG_SUBENTRIES |
+#endif
SLAP_BFLAG_ALIASES |
SLAP_BFLAG_REFERRALS;
}
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,
}
/* 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
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 )
: 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);
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 */
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;
}
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;
}
/* 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);
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 */
#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;
}
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";
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;
/* 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;
/* 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) );
ber_bvarray_free( rs->sr_ref );
ber_memfree( matched_dn.bv_val );
- return 1;
+ return LDAP_REFERRAL;
}
if (!manageDSAit && is_entry_referral( e ) ) {
}
ber_memfree( matched_dn.bv_val );
- return 1;
+ return LDAP_OTHER;
}
if ( is_entry_alias( e ) ) {
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
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;
}
}
send_ldap_error( op, rs,
LDAP_ADMINLIMIT_EXCEEDED,
NULL );
- rc = 0;
+ rc = LDAP_SUCCESS;
goto done;
}
send_ldap_error( op, rs,
LDAP_ADMINLIMIT_EXCEEDED,
NULL );
- rc = 0;
+ rc = LDAP_SUCCESS;
goto done;
}
/* check for abandon */
if ( op->o_abandon ) {
- rc = 0;
+ rc = LDAP_SUCCESS;
goto done;
}
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;
}
}
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;
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 );
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;
break;
case -1: /* connection closed */
cache_return_entry_r( &li->li_cache, e );
- rc = 0;
+ rc = LDAP_SUCCESS;
goto done;
}
}
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();
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);
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,
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 );
#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;
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",
#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 );
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 );
}
return result;
}
-#endif
#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,
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,
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,
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,
return LDAP_SUCCESS;
}
-
-#endif /* LDAP_CACHING */
#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,
}
}
switch (fs->f_choice) {
+ case LDAP_FILTER_OR:
case LDAP_FILTER_AND:
fs = fs->f_and;
fi = fi->f_and;
fs=fs->f_next;
fi=fi->f_next;
break;
+ case LDAP_FILTER_NOT:
+ res=0;
+ break;
default:
break;
}
template->no_of_queries--;
}
-#endif
#include "../../../libraries/libldap/ldap-int.h"
#include <sys/time.h>
-#ifdef LDAP_CACHING
static int
remove_func (
Operation *op,
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];
return 0;
}
-
-#endif /* LDAP_CACHING */
#include "ldap_log.h"
#include "../../../libraries/libldap/ldap-int.h"
-#ifdef LDAP_CACHING
static Entry*
meta_create_entry(
Backend *be,
cache_manager* cm = li->cm;
query_manager* qm = cm->qm;
+ Operation *oper;
+
time_t curr_time;
int count, rc = 0, *msgid = NULL;
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);
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);
attrs[ count ].an_name.bv_len = 0;
}
-
result->type = SUCCESS;
result->rc = 0;
ldap_pvt_thread_mutex_lock(&cm->cache_mutex);
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);
}
}
+ 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;
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);
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 );
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;
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;
/*
* 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;
*/
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 ) {
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",
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 */
}
}
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;
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 )
;
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
*attrp = attr;
attrp = &attr->a_next;
}
+
return ent;
}
static struct metaconn*
metaConnect(
- Operation *op,
+ Operation* op,
SlapReply *rs,
int op_type,
struct berval *nbase,
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;
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);
}
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)));
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++ )
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;
QueryTemplate* templ;
- op.o_bd = li->glue_be;
+ op->o_bd = li->glue_be;
for(;;) {
ldap_pvt_thread_sleep(cm->cc_period);
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",
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
#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);
*/
return rc;
}
-#endif
#undef ldap_debug /* silence a warning in ldap-int.h */
#include "../../../libraries/libldap/ldap-int.h"
-#ifdef LDAP_CACHING
void
filter2template(
Filter *f,
return;
}
}
-#endif /* LDAP_CACHING */
#define META_CACHE_H
#include "slap.h"
-#ifdef LDAP_CACHING
/* cache specific errors */
enum type_of_result
{
struct exception* result
);
#endif
-#endif
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,
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"
#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 ) );
{
struct metainfo *li;
-#ifdef LDAP_CACHING
struct rewrite_info *rwinfo;
cache_manager *cm;
query_manager *qm;
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;
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 ) {
* 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 );
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()
#ifdef SLAPD_MONITOR_DYNAMIC
int
-back_monitor_LTX_init_module( int argc, char *argv[] )
+init_module( int argc, char *argv[] )
{
BackendInfo bi;
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;
#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) );
* 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"
* 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 */
* 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"
* 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"
* 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"
* 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"
* 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"
* 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"
#ifdef SLAPD_PERL_DYNAMIC
-int back_perl_LTX_init_module(int argc, char *argv[])
+int init_module(int argc, char *argv[])
{
BackendInfo bi;
* 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"
*
*/
-#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"
* 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"
## 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
+++ /dev/null
-/* 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;
-}
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 );
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 );
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 );
}
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,
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 );
extern BI_op_delete shell_back_delete;
-extern BI_op_abandon shell_back_abandon;
-
LDAP_END_DECL
#endif /* _SHELL_EXTERNAL_H */
#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) );
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;
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 );
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 );
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 );
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;
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;
}
#ifdef SLAPD_SQL_DYNAMIC
int
-backsql_LTX_init_module(
+init_module(
int argc,
char *argv[] )
{
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;
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 );
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 */
int i;
int rc = 0;
-#ifdef LDAP_SYNCREPL
init_syncrepl();
-#endif
if( ! ( nBackendDB > 0 ) ) {
/* no databases */
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 );
}
}
-#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] );
}
}
-#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;
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++ ) {
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;
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;
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;
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) +
--- /dev/null
+/* 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;
+}
+
* 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( "" );
}
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;
}
* 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,
#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
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;
}
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;
{
/* 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 */
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;
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 );
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",
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);
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 );
}
/* 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);
} 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 ) {
}
if ( !found ) {
-#ifdef LDAP_SYNC
for ( i = 0; i < nbackends; i++ ) {
op->o_bd = &backends[i];
if( !op->o_bd->be_cancel ) continue;
}
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;
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 )
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;
"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
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;
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
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;
#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 "
acl_destroy( global_acl, NULL );
}
-#ifdef LDAP_SYNCREPL
-static void
+static int
add_syncrepl(
Backend *be,
char **cargv,
{
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 ) {
#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
#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(
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;
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 );
} 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 );
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 )) {
} 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 {
} 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",
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"
);
return 0;
}
-#endif /* LDAP_SYNCREPL */
#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;
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
}
}
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;
}
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 )
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:
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,
* 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;
#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;
#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;
*/
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) },
{ 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) },
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,
}
#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,
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 ) {
} 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
}
#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 )
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;
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 );
return LDAP_SUCCESS;
}
-#endif
--- /dev/null
+/* $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;
+}
#include "lutil.h"
#include "slap.h"
-#ifdef LDAP_SYNCREPL
#include "ldap_rq.h"
-#endif
#ifdef HAVE_TCPD
#include <tcpd.h>
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;
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;
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;
"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++;
/* 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
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 ) &&
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 ) {
tvp = &tv;
}
}
-#endif
for ( l = 0; slap_listeners[l] != NULL; l++ ) {
if ( slap_listeners[l]->sl_sd == AC_SOCKET_INVALID ||
slap_listeners = NULL;
if( !slapd_gentle_shutdown ) {
+ slapd_abrupt_shutdown = 1;
connections_shutdown();
}
* 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;
#include "ldap_pvt.h"
#include "slap.h"
+#include "lutil.h"
+
#ifdef LDAP_SLAPI
#include "slapi.h"
#endif
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 )
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;
}
#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;
}
}
+#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;
}
#ifdef HAVE_TLS
{ &slap_EXOP_START_TLS, 0, starttls_extop },
#endif
- { NULL, NULL }
+ { NULL, 0, NULL }
};
#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 ) {
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;
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");
#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
if( rc == 0 ) {
rc = backend_init( );
}
+
break;
default:
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,
/* 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;
}
}
#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 );
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 );
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
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 );
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
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 );
#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",
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;
}
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 );
* 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 ) */
/*
/* 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;
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;
}
}
#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 "
#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 );
}
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,
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
*/
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 )
{
ml->sml_nvalues[nvals].bv_val = NULL;
ml->sml_nvalues[nvals].bv_len = 0;
-
- } else {
}
}
}
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();
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);
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;
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 ) );
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;
}
}
- 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;
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;
) {
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;
}
#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 );
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;
}
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;
#include "portable.h"
+#include <ac/string.h>
+
#include "slap.h"
int
Modification *mod,
int permissive,
const char **text,
- char *textbuf, size_t textlen
-)
+ char *textbuf, size_t textlen )
{
int i, j;
int matched;
} 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;
}
/* 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,
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 ) {
break;
}
-
if ( found == 0 ) {
*text = textbuf;
snprintf( textbuf, textlen,
}
/* 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 );
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 );
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;
void
slap_mods_free(
- Modifications *ml
-)
+ Modifications *ml )
{
Modifications *next;
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
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 );
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) {
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
#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",
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));
}
/* 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();
}
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) );
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 );
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 );
}
* 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
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
*/
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
*/
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
*/
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
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 );
(((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 );
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 ));
* 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
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;
}
}
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;
return rc;
}
-static void
+void
send_ldap_response(
Operation *op,
SlapReply *rs )
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
#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
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;
}
#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 );
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",
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;
}
#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 ) {
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;
}
* 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;
}
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;
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;
}
}
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;
}
continue;
}
- if ( op->vrFilter && e_flags[j][i] == 0 ){
+ if ( op->o_vrFilter && e_flags[j][i] == 0 ){
continue;
}
"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;
}
}
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;
* 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,
"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;
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;
}
}
continue;
}
} else {
- if (!userattrs && !ad_inlist( desc, rs->sr_attrs ) )
- {
+ if (!userattrs && !ad_inlist( desc, rs->sr_attrs ) ) {
continue;
}
}
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;
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;
}
continue;
}
- if ( op->vrFilter && e_flags[j][i] == 0 ){
+ if ( op->o_vrFilter && e_flags[j][i] == 0 ){
continue;
}
"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;
}
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;
}
*/
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;
}
* 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;
}
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 ) {
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 );
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 );
#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",
}
#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 );
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;
+}
#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}
};
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;
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;
}
}
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;
}
}
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;
}
}
}
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;
}
}
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;
}
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;
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;
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;
};
#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;
}
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 )
{
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 */
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;
}
*/
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;
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 */
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;
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;
goto FINISHED;
}
- rc = slap_parseURI( opx, ®out, &op.o_req_ndn, &op.oq_search.rs_scope, &op.oq_search.rs_filter );
+ rc = slap_parseURI( opx, ®out,
+ &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;
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;
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 );
}
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 */
#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 */
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,
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
if( normalized->bv_len == 0 ) {
sl_free( normalized->bv_val, ctx );
+ normalized->bv_val = NULL;
return LDAP_INVALID_SYNTAX;
}
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;
}
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);
*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
#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,
{
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;
}
return LDAP_SUCCESS;
}
+#endif /* 0 */
static int
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(
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
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;
}
return rc;
}
+
#define X_BINARY "X-BINARY-TRANSFER-REQUIRED 'TRUE' "
#define X_NOT_H_R "X-NOT-HUMAN-READABLE 'TRUE' "
{"( 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' )",
{"( 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" },
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 }
};
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' "
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' "
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' "
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"
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;
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) {
* 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 {
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 );
#include "ldap_queue.h"
#define SLAP_EXTENDED_SCHEMA 1
-#define LDAP_CACHING 1
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)
/* 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"
#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
*/
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;
#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
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;
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;
ACL_STYLE_ONE,
ACL_STYLE_SUBTREE,
ACL_STYLE_CHILDREN,
- ACL_STYLE_ATTROF,
+ ACL_STYLE_ATTROF
} slap_style_t;
typedef struct slap_authz_info {
#define nbackends nBackendDB
#define backends backendDB
-#ifdef LDAP_SYNCREPL
struct nonpresent_entry {
struct berval *dn;
struct berval *ndn;
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 */
#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
#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 */
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;
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 */
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
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
*/
} 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
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
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
#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)
#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)
#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 */
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;
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
#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
#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
* 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;
}
}
return -1;
}
+ if ( slapi_x_init_object_extensions() != 0 ) {
+ return -1;
+ }
+
return 0;
}
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;
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 */
#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
#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"
#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
--- /dev/null
+/*
+ * (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( ®istered_extensions.mutex );
+
+ rc = mapExtensionType( objectname, &type );
+ if ( rc != 0 ) {
+ ldap_pvt_thread_mutex_unlock( ®istered_extensions.mutex );
+ return rc;
+ }
+
+ *objecttype = (int)type;
+
+ re = ®istered_extensions.extensions[*objecttype];
+
+ *extensionhandle = re->count;
+
+ if ( re->active ) {
+ /* can't add new extensions after objects have been created */
+ ldap_pvt_thread_mutex_unlock( ®istered_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( ®istered_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( ®istered_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( ®istered_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( ®istered_extensions, 0, sizeof( registered_extensions ) );
+
+ if ( ldap_pvt_thread_mutex_init( ®istered_extensions.mutex ) != 0 ) {
+ return -1;
+ }
+
+ return 0;
+#else
+ return -1;
+#endif
+}
*/
#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,
* the strings.
*/
static int
-values2obj(
+values2obj_copy(
char **ppValue,
- BerVarray *bvobj)
+ BerVarray *bvobj )
{
int i;
BerVarray tmpberval;
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;
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;
}
/*
op = (Operation *) slapi_ch_calloc(1, sizeof(Operation));
- if ( pEntry == NULL) {
+ if ( op == NULL) {
rc = LDAP_NO_MEMORY;
goto cleanup;
}
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;
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;
}
}
- /*
- * 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;
}
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 );
#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;
int isCritical;
SlapReply rs = { REP_RESULT };
- if ( e == NULL ) {
+ if ( *e == NULL ) {
rs.sr_err = LDAP_PARAM_ERROR;
goto cleanup;
}
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;
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;
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,
}
if ( rc == LDAP_SUCCESS ) {
- if((pEntry = LDAPModToEntry( dn, mods )) == NULL) {
+ pEntry = LDAPModToEntry( dn, mods );
+ if ( pEntry == NULL ) {
rc = LDAP_OTHER;
}
}
pb = slapi_pblock_new();
slapi_pblock_set( pb, SLAPI_PLUGIN_INTOP_RESULT, (void *)rc );
} else {
- pb = slapi_add_entry_internal( pEntry, controls, log_changes );
+ pb = slapi_add_entry_internal_locked( &pEntry, controls, log_changes );
}
- if ( pEntry ) {
+ if ( pEntry != NULL ) {
slapi_entry_free(pEntry);
}
* 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;
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;
slapi_ch_free( (void **)&dn.bv_val );
if ( modlist != NULL )
- freeMods( modlist );
+ slap_mods_free( modlist );
if ( pConn != NULL ) {
pSavePB = pPB;
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:
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;
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 */
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 */
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 ) {
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
{
#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;
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
}
if ( i == 0 ) {
- mod->sml_bvalues = NULL;
+ mod->sml_bvalues = NULL;
} else {
mod->sml_bvalues = (BerVarray) ch_malloc( (i + 1) * sizeof(struct berval) );
#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 */
+}
+
#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 *
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};
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;
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
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;
#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;
}
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: "
}
}
+ /* 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;
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=*)" );
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 );
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 );
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 );
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;
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
}
}
+ 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 );
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 );
return NULL;
}
-static Entry*
+Entry*
syncrepl_message_to_entry(
+ syncinfo_t *si,
LDAP *ld,
Operation *op,
LDAPMessage *msg,
int rc;
char *a;
- syncinfo_t *si = ( syncinfo_t * ) be->syncinfo;
-
ber_len_t len;
LDAPControl* rctrlp;
LDAPControl** rctrls = NULL;
ber_tag_t tag;
+ Modifications *ml = NULL;
+ AttributeDescription** descs;
+ int i;
+
*modlist = NULL;
if ( ldap_msgtype( msg ) != LDAP_RES_SEARCH_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;
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;
#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
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,
return ( strcmp( uuid1->bv_val, uuid2->bv_val ) );
}
-static int
+int
syncrepl_entry(
+ syncinfo_t* si,
LDAP *ld,
Operation *op,
Entry* e,
)
{
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;
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 );
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 :
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;
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;
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;
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,
)
{
Backend *be = op->o_bd;
- syncinfo_t *si = op->o_callback->sc_private;
struct berval uuid_bv = {0, NULL};
slap_callback cb;
Attribute *a;
Entry *glue;
SlapReply rs = {REP_RESULT};
Connection *conn = op->o_conn;
+ char* ptr;
op->o_tag = LDAP_REQ_ADD;
op->o_callback = &cb;
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;
return;
}
-static void
+void
syncrepl_updateCookie(
+ syncinfo_t *si,
LDAP *ld,
Operation *op,
struct berval *pdn,
)
{
Backend *be = op->o_bd;
- syncinfo_t *si = ( syncinfo_t * ) be->syncinfo;
Modifications *ml;
Modifications *mlnext;
Modifications *mod;
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;
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
}
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
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
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 ) {
#endif
}
} else {
+ be_entry_release_w( op, e );
goto done;
}
} else {
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], ×tamp );
- 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], ×tamp );
- 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 )
{
)
{
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;
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 );
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 &&
char **
-str2clist( char **out, char *in, const char *brkstr )
+str2clist( char ***out, char *in, const char *brkstr )
{
char *str;
char *s;
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++ ) {
}
}
- 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 ) )
*new = NULL;
free( str );
- return( out );
+ return( *out );
}
-
-#endif
../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
#include "../slap.h"
-#ifdef LDAP_SYNCREPL
#include "ldap_rq.h"
-#endif
/* needed by WIN32 and back-monitor */
time_t starttime;
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;
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 )
{
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( )
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;
+}
#include "slapcommon.h"
+static char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
+
int
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
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;
if( continuemode ) continue;
break;
}
-
+
if ( verbose ) {
fprintf( stderr, "added: \"%s\" (%08lx)\n",
e->e_dn, (long) id );
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;
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 );
}
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;
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:
switch( tool ) {
case SLAPADD:
- options = "b:cd:f:l:n:tuv";
+ options = "b:cd:f:l:n:tuvWw";
break;
case SLAPINDEX:
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;
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;
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;
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;
" -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 );
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';
}
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;
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
if ( !strcmp( type, T_MODOPDELETESTR )) {
return( T_MODOPDELETE );
}
+ if ( !strcmp( type, T_MODOPINCREMENTSTR )) {
+ return( T_MODOPINCREMENT );
+ }
return( T_ERR );
}
}
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",
ri->ri_hostname, ri->ri_port, sys_errlist[ errno ] );
#endif
return( BIND_ERR_OPEN );
+ }
}
{ /* set version 3 */
/* Initialize private data */
(*ri)->ri_hostname = NULL;
+ (*ri)->ri_uri = NULL;
(*ri)->ri_ldp = NULL;
(*ri)->ri_bind_dn = NULL;
(*ri)->ri_password = NULL;
#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 )
/* 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 */
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
@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
@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
@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
$(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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)"
--- /dev/null
+#
+# 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
+
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
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
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
--- /dev/null
+#
+# 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@
+
+
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
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
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
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
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
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
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
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
@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"
+++ /dev/null
-# $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
--- /dev/null
+# $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
--- /dev/null
+# $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
--- /dev/null
+# $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
+++ /dev/null
-# $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
--- /dev/null
+# $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
--- /dev/null
+# $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
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
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
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
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
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
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
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
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
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}."
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
-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}/"
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
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
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"
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
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
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
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)!"
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
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
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=$?
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
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
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
#
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
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)!"
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
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)!"
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)!"
SRCDIR=$1; shift
fi
-. $SRCDIR/scripts/args.sh
+. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
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
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 &
echo PID $PID
read foo
fi
+BACKEND=$SAVE
echo "Waiting 5 seconds to wait for master to start..."
sleep 5
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
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..."
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 \
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"
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
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 &
echo PID $PID
read foo
fi
+BACKEND=$SAVE
echo "Waiting 5 seconds to wait for master to start..."
sleep 5
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
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..."
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 \
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"
--- /dev/null
+#! /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
--- /dev/null
+#! /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