From fedora-directory-commits at redhat.com Wed Jan 4 22:13:39 2006 From: fedora-directory-commits at redhat.com (Robert Crittenden (rcritten)) Date: Wed, 4 Jan 2006 17:13:39 -0500 Subject: [Fedora-directory-commits] mod_nss LICENSE,1.1,1.2 Message-ID: <200601042213.k04MDdmg019063@cvs-int.fedora.redhat.com> Author: rcritten Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19046 Modified Files: LICENSE Log Message: This file was copied directly from the Apache distribution. Remove the extra per-module stuff that doesn't apply. Index: LICENSE =================================================================== RCS file: /cvs/dirsec/mod_nss/LICENSE,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- LICENSE 16 Sep 2005 12:59:33 -0000 1.1 +++ LICENSE 4 Jan 2006 22:13:32 -0000 1.2 @@ -199,480 +199,3 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - - -APACHE HTTP SERVER SUBCOMPONENTS: - -The Apache HTTP Server includes a number of subcomponents with -separate copyright notices and license terms. Your use of the source -code for the these subcomponents is subject to the terms and -conditions of the following licenses. - -For the mod_mime_magic component: - -/* - * mod_mime_magic: MIME type lookup via file magic numbers - * Copyright (c) 1996-1997 Cisco Systems, Inc. - * - * This software was submitted by Cisco Systems to the Apache Group in July - * 1997. Future revisions and derivatives of this source code must - * acknowledge Cisco Systems as the original contributor of this module. - * All other licensing and usage conditions are those of the Apache Group. - * - * Some of this code is derived from the free version of the file command - * originally posted to comp.sources.unix. Copyright info for that program - * is included below as required. - * --------------------------------------------------------------------------- - * - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin. - * - * This software is not subject to any license of the American Telephone and - * Telegraph Company or of the Regents of the University of California. - * - * Permission is granted to anyone to use this software for any purpose on any - * computer system, and to alter it and redistribute it freely, 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 - * must 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 must appear in the documentation. - * - * 4. This notice may not be removed or altered. - * ------------------------------------------------------------------------- - * - */ - - -For the modules\mappers\mod_imap.c component: - - "macmartinized" polygon code copyright 1992 by Eric Haines, erich at eye.com - -For the server\util_md5.c component: - -/************************************************************************ - * NCSA HTTPd Server - * Software Development Group - * National Center for Supercomputing Applications - * University of Illinois at Urbana-Champaign - * 605 E. Springfield, Champaign, IL 61820 - * httpd at ncsa.uiuc.edu - * - * Copyright (C) 1995, Board of Trustees of the University of Illinois - * - ************************************************************************ - * - * md5.c: NCSA HTTPd code which uses the md5c.c RSA Code - * - * Original Code Copyright (C) 1994, Jeff Hostetler, Spyglass, Inc. - * Portions of Content-MD5 code Copyright (C) 1993, 1994 by Carnegie Mellon - * University (see Copyright below). - * Portions of Content-MD5 code Copyright (C) 1991 Bell Communications - * Research, Inc. (Bellcore) (see Copyright below). - * Portions extracted from mpack, John G. Myers - jgm+ at cmu.edu - * Content-MD5 Code contributed by Martin Hamilton (martin at net.lut.ac.uk) - * - */ - - -/* these portions extracted from mpack, John G. Myers - jgm+ at cmu.edu */ -/* (C) Copyright 1993,1994 by Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without - * fee, provided that the above copyright notice appear in all copies - * and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of Carnegie - * Mellon University not be used in advertising or publicity - * pertaining to distribution of the software without specific, - * written prior permission. Carnegie Mellon University makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied - * warranty. - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) - * - * Permission to use, copy, modify, and distribute this material - * for any purpose and without fee is hereby granted, provided - * that the above copyright notice and this permission notice - * appear in all copies, and that the name of Bellcore not be - * used in advertising or publicity pertaining to this - * material without the specific, prior written permission - * of an authorized representative of Bellcore. BELLCORE - * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY - * OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", - * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. - */ - -For the srclib\apr\include\apr_md5.h component: -/* - * This is work is derived from material Copyright RSA Data Security, Inc. - * - * The RSA copyright statement and Licence for that original material is - * included below. This is followed by the Apache copyright statement and - * licence for the modifications made to that material. - */ - -/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ - -For the srclib\apr\passwd\apr_md5.c component: - -/* - * This is work is derived from material Copyright RSA Data Security, Inc. - * - * The RSA copyright statement and Licence for that original material is - * included below. This is followed by the Apache copyright statement and - * licence for the modifications made to that material. - */ - -/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm - */ - -/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ -/* - * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0 - * MD5 crypt() function, which is licenced as follows: - * ---------------------------------------------------------------------------- - * "THE BEER-WARE LICENSE" (Revision 42): - * wrote this file. As long as you retain this notice you - * can do whatever you want with this stuff. If we meet some day, and you think - * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp - * ---------------------------------------------------------------------------- - */ - -For the srclib\apr-util\crypto\apr_md4.c component: - - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD4 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD4 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -For the srclib\apr-util\include\apr_md4.h component: - - * - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD4 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD4 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - - -For the srclib\apr-util\test\testdbm.c component: - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache at apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * This file came from the SDBM package (written by oz at nexus.yorku.ca). - * That package was under public domain. This file has been ported to - * APR, updated to ANSI C and other, newer idioms, and added to the Apache - * codebase under the above copyright and license. - */ - - -For the srclib\apr-util\test\testmd4.c component: - - * - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All - * rights reserved. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -For the srclib\apr-util\xml\expat\conftools\install-sh component: - -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# - -For the srclib\pcre\install-sh component: - -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. - -For the pcre component: - -PCRE LICENCE ------------- - -PCRE is a library of functions to support regular expressions whose syntax -and semantics are as close as possible to those of the Perl 5 language. - -Written by: Philip Hazel - -University of Cambridge Computing Service, -Cambridge, England. Phone: +44 1223 334714. - -Copyright (c) 1997-2001 University of Cambridge - -Permission is granted to anyone to use this software for any purpose on any -computer system, and to redistribute it freely, subject to the following -restrictions: - -1. This software 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. - -2. The origin of this software must not be misrepresented, either by - explicit claim or by omission. In practice, this means that if you use - PCRE in software which you distribute to others, commercially or - otherwise, you must put a sentence like this - - Regular expression support is provided by the PCRE library package, - which is open source software, written by Philip Hazel, and copyright - by the University of Cambridge, England. - - somewhere reasonably visible in your documentation and in any relevant - files or online help data or similar. A reference to the ftp site for - the source, that is, to - - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ - - should also be given in the documentation. - -3. Altered versions must be plainly marked as such, and must not be - misrepresented as being the original software. - -4. If PCRE is embedded in any software that is released under the GNU - General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL), - then the terms of that licence shall supersede any condition above with - which it is incompatible. - -The documentation for PCRE, supplied in the "doc" directory, is distributed -under the same terms as the software itself. - -End PCRE LICENCE - - -For the test\zb.c component: - -/* ZeusBench V1.01 - =============== - -This program is Copyright (C) Zeus Technology Limited 1996. - -This program may be used and copied freely providing this copyright notice -is not removed. - -This software is provided "as is" and any express or implied waranties, -including but not limited to, the implied warranties of merchantability and -fitness for a particular purpose are disclaimed. In no event shall -Zeus Technology Ltd. be liable for any direct, indirect, incidental, special, -exemplary, or consequential damaged (including, but not limited to, -procurement of substitute good or services; loss of use, data, or profits; -or business interruption) however caused and on theory of liability. Whether -in contract, strict liability or tort (including negligence or otherwise) -arising in any way out of the use of this software, even if advised of the -possibility of such damage. - - Written by Adam Twiss (adam at zeus.co.uk). March 1996 - -Thanks to the following people for their input: - Mike Belshe (mbelshe at netscape.com) - Michael Campanella (campanella at stevms.enet.dec.com) - -*/ - -For the expat xml parser component: - -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - and Clark Cooper - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==================================================================== From fedora-directory-commits at redhat.com Wed Jan 4 22:08:24 2006 From: fedora-directory-commits at redhat.com (Robert Crittenden (rcritten)) Date: Wed, 4 Jan 2006 17:08:24 -0500 Subject: [Fedora-directory-commits] mod_nss Makefile.am, 1.7, 1.8 Makefile.in, 1.12, 1.13 configure, 1.9, 1.10 configure.in, 1.6, 1.7 mod_nss.c, 1.9, 1.10 mod_nss.h, 1.8, 1.9 nss_engine_pphrase.c, 1.3, 1.4 nss_engine_vars.c, 1.3, 1.4 nss_expr_eval.c, 1.2, 1.3 nss_expr_parse.c, 1.1, 1.2 nss_expr_parse.h, 1.1, 1.2 nss_expr_parse.y, 1.1, 1.2 nss_expr_scan.c, 1.1, 1.2 Message-ID: <200601042208.k04M8OXo018977@cvs-int.fedora.redhat.com> Author: rcritten Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18945 Modified Files: Makefile.am Makefile.in configure configure.in mod_nss.c mod_nss.h nss_engine_pphrase.c nss_engine_vars.c nss_expr_eval.c nss_expr_parse.c nss_expr_parse.h nss_expr_parse.y nss_expr_scan.c Log Message: Changes to allow the mod_nss to work in Apache 2.2.0. Based on a patch from Oden Eriksson. The conditional to determine which API to use is a bit weak at the moment but it works with Apache 2.0.54 and 2.2.0. Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/mod_nss/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Makefile.am 3 Oct 2005 14:59:26 -0000 1.7 +++ Makefile.am 4 Jan 2006 22:07:57 -0000 1.8 @@ -7,11 +7,13 @@ ## Define the source file for the module libmodnss_la_SOURCES = mod_nss.c nss_engine_config.c nss_engine_init.c nss_engine_io.c nss_engine_kernel.c nss_engine_log.c nss_engine_pphrase.c nss_engine_vars.c nss_expr.c nss_expr_eval.c nss_expr_parse.y nss_expr_scan.l nss_util.c nss_engine_rand.c +libmodnss_la_LDFLAGS = -module -avoid-version ## Set the includes and libraries needed INCLUDES = -I at apache_inc@ @nspr_inc@ @nss_inc@ @apr_inc@ LIBS = @nspr_lib@ @nss_lib@ -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lplc4 -lplds4 -lnspr4 @SSL2_TRUE at AM_CFLAGS=-DWANT_SSL2 +EXTRA_CPPFLAGS=@extra_cppflags@ install-libLTLIBRARIES: libmodnss.la @APXS@ -i -a -n nss libmodnss.la @@ -65,7 +67,7 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) + $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/mod_nss/Makefile.in,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Makefile.in 3 Nov 2005 19:46:24 -0000 1.12 +++ Makefile.in 4 Jan 2006 22:07:57 -0000 1.13 @@ -94,6 +94,7 @@ apache_inc = @apache_inc@ apache_prefix = @apache_prefix@ apr_inc = @apr_inc@ +extra_cppflags = @extra_cppflags@ install_sh = @install_sh@ nspr_dir = @nspr_dir@ nspr_inc = @nspr_inc@ @@ -108,14 +109,16 @@ nss_pcache_SOURCES = nss_pcache.c libmodnss_la_SOURCES = mod_nss.c nss_engine_config.c nss_engine_init.c nss_engine_io.c nss_engine_kernel.c nss_engine_log.c nss_engine_pphrase.c nss_engine_vars.c nss_expr.c nss_expr_eval.c nss_expr_parse.y nss_expr_scan.l nss_util.c nss_engine_rand.c +libmodnss_la_LDFLAGS = -module -avoid-version INCLUDES = -I at apache_inc@ @nspr_inc@ @nss_inc@ @apr_inc@ LIBS = @nspr_lib@ @nss_lib@ -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lplc4 -lplds4 -lnspr4 @SSL2_TRUE at AM_CFLAGS = -DWANT_SSL2 +EXTRA_CPPFLAGS = @extra_cppflags@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) + $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -127,7 +130,6 @@ CONFIG_CLEAN_FILES = nss.conf gencert LTLIBRARIES = $(lib_LTLIBRARIES) -libmodnss_la_LDFLAGS = libmodnss_la_LIBADD = am_libmodnss_la_OBJECTS = mod_nss.lo nss_engine_config.lo \ nss_engine_init.lo nss_engine_io.lo nss_engine_kernel.lo \ Index: configure =================================================================== RCS file: /cvs/dirsec/mod_nss/configure,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- configure 3 Nov 2005 19:46:24 -0000 1.9 +++ configure 4 Jan 2006 22:07:57 -0000 1.10 @@ -466,7 +466,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL YACC LEX LEXLIB LEX_OUTPUT_ROOT SSL2_TRUE SSL2_FALSE APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc nspr_lib nss_inc nss_lib nspr_dir nss_dir LIBOBJS LTLIBOBJS' +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 PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL YACC LEX LEXLIB LEX_OUTPUT_ROOT SSL2_TRUE SSL2_FALSE APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc nspr_lib nss_inc nss_lib nspr_dir nss_dir extra_cppflags LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -8452,7 +8452,7 @@ enableval="$enable_ssl2" ssl2=$enableval else - ssl2=yes + ssl2=no fi; if test $ssl2 = yes; then echo "$as_me:$LINENO: result: yes" >&5 @@ -8649,6 +8649,7 @@ apache_conf=`$APXS -q SYSCONFDIR` apache_prefix=`$APXS -q PREFIX` apache_bin=`$APXS -q SBINDIR` +extra_cppflags=`$APXS -q EXTRA_CPPFLAGS` if ! test -f "$apache_inc/apr.h"; then if test -z "$apr_inc"; then @@ -8949,6 +8950,7 @@ + # Write config.status and the Makefile ac_config_files="$ac_config_files Makefile nss.conf gencert" cat >confcache <<\_ACEOF @@ -9679,6 +9681,7 @@ s, at nss_lib@,$nss_lib,;t t s, at nspr_dir@,$nspr_dir,;t t s, at nss_dir@,$nss_dir,;t t +s, at extra_cppflags@,$extra_cppflags,;t t s, at LIBOBJS@,$LIBOBJS,;t t s, at LTLIBOBJS@,$LTLIBOBJS,;t t CEOF Index: configure.in =================================================================== RCS file: /cvs/dirsec/mod_nss/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- configure.in 26 Sep 2005 19:38:52 -0000 1.6 +++ configure.in 4 Jan 2006 22:07:58 -0000 1.7 @@ -25,7 +25,7 @@ AC_MSG_CHECKING(for SSL2) AC_ARG_ENABLE(ssl2, [ --enable-ssl2 enable SSLv2 (default=no)], - ssl2=$enableval, ssl2=yes) + ssl2=$enableval, ssl2=no) if test $ssl2 = yes; then AC_MSG_RESULT(yes) else @@ -104,6 +104,7 @@ apache_conf=`$APXS -q SYSCONFDIR` apache_prefix=`$APXS -q PREFIX` apache_bin=`$APXS -q SBINDIR` +extra_cppflags=`$APXS -q EXTRA_CPPFLAGS` if ! test -f "$apache_inc/apr.h"; then if test -z "$apr_inc"; then @@ -257,6 +258,7 @@ AC_SUBST(nss_lib) AC_SUBST(nspr_dir) AC_SUBST(nss_dir) +AC_SUBST(extra_cppflags) # Write config.status and the Makefile AC_OUTPUT(Makefile nss.conf gencert) Index: mod_nss.c =================================================================== RCS file: /cvs/dirsec/mod_nss/mod_nss.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- mod_nss.c 3 Oct 2005 14:59:26 -0000 1.9 +++ mod_nss.c 4 Jan 2006 22:07:58 -0000 1.10 @@ -362,7 +362,7 @@ return APR_SUCCESS; } -static const char *nss_hook_http_method(const request_rec *r) +static const char *nss_hook_http_scheme(const request_rec *r) { SSLSrvConfigRec *sc = mySrvConfig(r->server); @@ -394,7 +394,11 @@ ap_hook_pre_connection(nss_hook_pre_connection,NULL,NULL, APR_HOOK_MIDDLE); ap_hook_post_config (nss_init_Module, NULL,NULL, APR_HOOK_MIDDLE); - ap_hook_http_method (nss_hook_http_method, NULL,NULL, APR_HOOK_MIDDLE); +#ifndef AP_SERVER_MAJORVERSION_NUMBER + ap_hook_http_method (nss_hook_http_scheme, NULL,NULL, APR_HOOK_MIDDLE); +#else + ap_hook_http_scheme (nss_hook_http_scheme, NULL,NULL, APR_HOOK_MIDDLE); +#endif ap_hook_default_port (nss_hook_default_port, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_pre_config (nss_hook_pre_config, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_child_init (nss_init_Child, NULL,NULL, APR_HOOK_MIDDLE); Index: mod_nss.h =================================================================== RCS file: /cvs/dirsec/mod_nss/mod_nss.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_nss.h 3 Oct 2005 14:59:26 -0000 1.8 +++ mod_nss.h 4 Jan 2006 22:07:58 -0000 1.9 @@ -316,6 +316,15 @@ int fortezza_only; PRInt32 version; // protocol version valid for this cipher } cipher_properties; + +/* Compatibility between Apache 2.0.x and 2.2.x. The numeric version of + * the version first appeared in Apache 2.2.0 */ +#ifndef AP_SERVER_MAJORVERSION_NUMBER +typedef struct regex_t ap_regex_t; +#define AP_REG_EXTENDED REG_EXTENDED +#define AP_REG_NOSUB REG_NOSUB +#define AP_REG_ICASE REG_ICASE +#endif enum sslversion { SSL2=1, SSL3=2, TLS=4}; Index: nss_engine_pphrase.c =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_engine_pphrase.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- nss_engine_pphrase.c 4 Aug 2005 16:18:49 -0000 1.3 +++ nss_engine_pphrase.c 4 Jan 2006 22:07:58 -0000 1.4 @@ -125,7 +125,7 @@ snprintf(buf, 1024, "STOR\t%s\t%s", PK11_GetTokenName(slot), passwd); rv = apr_file_write_full(parg->mc->proc.in, buf, strlen(buf), NULL); - if (!APR_STATUS_IS_SUCCESS(rv)) { + if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Unable to write to pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv); nss_die(); @@ -139,9 +139,9 @@ memset(buf, 0, sizeof(buf)); rv = apr_file_read(parg->mc->proc.out, buf, &nBytes); - if (APR_STATUS_IS_SUCCESS(rv)) + if (rv = APR_SUCCESS) res = atoi(buf); - if (!APR_STATUS_IS_SUCCESS(rv) || + if (rv != APR_SUCCESS || (res != PIN_SUCCESS && res != PIN_INCORRECTPW)) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Unable to read from pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv); @@ -245,7 +245,7 @@ snprintf(buf, 1024, "RETR\t%s", token_name); rv = apr_file_write_full(parg->mc->proc.in, buf, strlen(buf), NULL); - if (!APR_STATUS_IS_SUCCESS(rv)) { + if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Unable to write to pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv); nss_die(); @@ -256,7 +256,7 @@ */ memset(buf, 0, sizeof(buf)); rv = apr_file_read(parg->mc->proc.out, buf, &nBytes); - if (!APR_STATUS_IS_SUCCESS(rv)) { + if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Unable to read from pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv); nss_die(); Index: nss_engine_vars.c =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_engine_vars.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- nss_engine_vars.c 31 May 2005 14:32:42 -0000 1.3 +++ nss_engine_vars.c 4 Jan 2006 22:07:58 -0000 1.4 @@ -100,7 +100,11 @@ else if (strcEQ(var, "REQUEST_METHOD")) result = (char *)(r->method); else if (strcEQ(var, "REQUEST_SCHEME")) +#ifndef AP_SERVER_MAJORVERSION_NUMBER result = (char *)ap_http_method(r); +#else + result = (char *)ap_http_scheme(r); +#endif else if (strcEQ(var, "REQUEST_URI")) result = r->uri; else if (strcEQ(var, "SCRIPT_FILENAME") || Index: nss_expr_eval.c =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_expr_eval.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- nss_expr_eval.c 31 May 2005 14:32:42 -0000 1.2 +++ nss_expr_eval.c 4 Jan 2006 22:07:58 -0000 1.3 @@ -113,24 +113,24 @@ nss_expr *e1; nss_expr *e2; char *word; - regex_t *regex; + ap_regex_t *regex; e1 = (nss_expr *)node->node_arg1; e2 = (nss_expr *)node->node_arg2; word = nss_expr_eval_word(r, e1); - regex = (regex_t *)(e2->node_arg1); + regex = (ap_regex_t *)(e2->node_arg1); return (ap_regexec(regex, word, 0, NULL, 0) == 0); } case op_NRE: { nss_expr *e1; nss_expr *e2; char *word; - regex_t *regex; + ap_regex_t *regex; e1 = (nss_expr *)node->node_arg1; e2 = (nss_expr *)node->node_arg2; word = nss_expr_eval_word(r, e1); - regex = (regex_t *)(e2->node_arg1); + regex = (ap_regex_t *)(e2->node_arg1); return !(ap_regexec(regex, word, 0, NULL, 0) == 0); } default: { View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2 nss_expr_parse.c Index: nss_expr_parse.c =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_expr_parse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- nss_expr_parse.c 31 May 2005 14:32:42 -0000 1.1 +++ nss_expr_parse.c 4 Jan 2006 22:07:58 -0000 1.2 @@ -1,479 +1,856 @@ +/* A Bison parser, made by GNU Bison 1.875c. */ -/* A Bison parser, made from nss_expr_parse.y - by GNU Bison version 1.28 */ +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -#define YYBISON 1 /* Identify Bison output. */ + 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, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ -#define T_TRUE 257 -#define T_FALSE 258 -#define T_DIGIT 259 -#define T_ID 260 -#define T_STRING 261 -#define T_REGEX 262 -#define T_REGEX_I 263 -#define T_FUNC_FILE 264 -#define T_OP_EQ 265 -#define T_OP_NE 266 -#define T_OP_LT 267 -#define T_OP_LE 268 -#define T_OP_GT 269 -#define T_OP_GE 270 -#define T_OP_REG 271 -#define T_OP_NRE 272 -#define T_OP_IN 273 -#define T_OP_OR 274 -#define T_OP_AND 275 -#define T_OP_NOT 276 +/* All symbols defined below should begin with nss_expr_yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum nss_expr_yytokentype { + T_TRUE = 258, + T_FALSE = 259, + T_DIGIT = 260, + T_ID = 261, + T_STRING = 262, + T_REGEX = 263, + T_REGEX_I = 264, + T_FUNC_FILE = 265, + T_OP_EQ = 266, + T_OP_NE = 267, + T_OP_LT = 268, + T_OP_LE = 269, + T_OP_GT = 270, + T_OP_GE = 271, + T_OP_REG = 272, + T_OP_NRE = 273, + T_OP_IN = 274, + T_OP_OR = 275, + T_OP_AND = 276, + T_OP_NOT = 277 + }; +#endif +#define T_TRUE 258 +#define T_FALSE 259 +#define T_DIGIT 260 +#define T_ID 261 +#define T_STRING 262 +#define T_REGEX 263 +#define T_REGEX_I 264 +#define T_FUNC_FILE 265 +#define T_OP_EQ 266 +#define T_OP_NE 267 +#define T_OP_LT 268 +#define T_OP_LE 269 +#define T_OP_GT 270 +#define T_OP_GE 271 +#define T_OP_REG 272 +#define T_OP_NRE 273 +#define T_OP_IN 274 +#define T_OP_OR 275 +#define T_OP_AND 276 +#define T_OP_NOT 277 + + + +/* Copy the first part of user declarations. */ #line 22 "nss_expr_parse.y" #include "mod_nss.h" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #line 26 "nss_expr_parse.y" -typedef union { +typedef union YYSTYPE { char *cpVal; nss_expr *exVal; } YYSTYPE; -#include - -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif +/* Line 191 of yacc.c. */ +#line 129 "y.tab.c" +# define nss_expr_yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif -#define YYFINAL 53 -#define YYFLAG -32768 -#define YYNTBASE 29 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 276 ? nss_expr_yytranslate[x] : 36) - -static const char nss_expr_yytranslate[] = { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 28, 2, 2, 23, - 24, 2, 2, 27, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 25, 2, 26, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, [...1792 lines suppressed...] + if (nss_expr_yychar == YYEOF) + for (;;) + { + YYPOPSTACK; + if (nss_expr_yyssp == nss_expr_yyss) + YYABORT; + YYDSYMPRINTF ("Error: popping", nss_expr_yystos[*nss_expr_yyssp], nss_expr_yyvsp, nss_expr_yylsp); + nss_expr_yydestruct (nss_expr_yystos[*nss_expr_yyssp], nss_expr_yyvsp); + } + } + else + { + YYDSYMPRINTF ("Error: discarding", nss_expr_yytoken, &nss_expr_yylval, &nss_expr_yylloc); + nss_expr_yydestruct (nss_expr_yytoken, &nss_expr_yylval); + nss_expr_yychar = YYEMPTY; - nss_expr_yychar = YYEMPTY; + } } - /* Else will try to reuse lookahead token - after shifting the error token. */ - - nss_expr_yyerrstatus = 3; /* Each real token shifted decrements this */ + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto nss_expr_yyerrlab1; - goto nss_expr_yyerrhandle; -nss_expr_yyerrdefault: /* current state does not do anything special for the error token. */ +/*---------------------------------------------------. +| nss_expr_yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +nss_expr_yyerrorlab: -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - nss_expr_yyn = nss_expr_yydefact[nss_expr_yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ - if (nss_expr_yyn) goto nss_expr_yydefault; +#ifdef __GNUC__ + /* Pacify GCC when the user code never invokes YYERROR and the label + nss_expr_yyerrorlab therefore never appears in user code. */ + if (0) + goto nss_expr_yyerrorlab; #endif -nss_expr_yyerrpop: /* pop the current state because it cannot handle the error token */ - - if (nss_expr_yyssp == nss_expr_yyss) YYABORT; - nss_expr_yyvsp--; - nss_expr_yystate = *--nss_expr_yyssp; -#ifdef YYLSP_NEEDED - nss_expr_yylsp--; -#endif + nss_expr_yyvsp -= nss_expr_yylen; + nss_expr_yyssp -= nss_expr_yylen; + nss_expr_yystate = *nss_expr_yyssp; + goto nss_expr_yyerrlab1; -#if YYDEBUG != 0 - if (nss_expr_yydebug) - { - short *ssp1 = nss_expr_yyss - 1; - fprintf (stderr, "Error: state stack now"); - while (ssp1 != nss_expr_yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif -nss_expr_yyerrhandle: +/*-------------------------------------------------------------. +| nss_expr_yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +nss_expr_yyerrlab1: + nss_expr_yyerrstatus = 3; /* Each real token shifted decrements this. */ - nss_expr_yyn = nss_expr_yypact[nss_expr_yystate]; - if (nss_expr_yyn == YYFLAG) - goto nss_expr_yyerrdefault; + for (;;) + { + nss_expr_yyn = nss_expr_yypact[nss_expr_yystate]; + if (nss_expr_yyn != YYPACT_NINF) + { + nss_expr_yyn += YYTERROR; + if (0 <= nss_expr_yyn && nss_expr_yyn <= YYLAST && nss_expr_yycheck[nss_expr_yyn] == YYTERROR) + { + nss_expr_yyn = nss_expr_yytable[nss_expr_yyn]; + if (0 < nss_expr_yyn) + break; + } + } - nss_expr_yyn += YYTERROR; - if (nss_expr_yyn < 0 || nss_expr_yyn > YYLAST || nss_expr_yycheck[nss_expr_yyn] != YYTERROR) - goto nss_expr_yyerrdefault; + /* Pop the current state because it cannot handle the error token. */ + if (nss_expr_yyssp == nss_expr_yyss) + YYABORT; - nss_expr_yyn = nss_expr_yytable[nss_expr_yyn]; - if (nss_expr_yyn < 0) - { - if (nss_expr_yyn == YYFLAG) - goto nss_expr_yyerrpop; - nss_expr_yyn = -nss_expr_yyn; - goto nss_expr_yyreduce; + YYDSYMPRINTF ("Error: popping", nss_expr_yystos[*nss_expr_yyssp], nss_expr_yyvsp, nss_expr_yylsp); + nss_expr_yydestruct (nss_expr_yystos[nss_expr_yystate], nss_expr_yyvsp); + YYPOPSTACK; + nss_expr_yystate = *nss_expr_yyssp; + YY_STACK_PRINT (nss_expr_yyss, nss_expr_yyssp); } - else if (nss_expr_yyn == 0) - goto nss_expr_yyerrpop; if (nss_expr_yyn == YYFINAL) YYACCEPT; -#if YYDEBUG != 0 - if (nss_expr_yydebug) - fprintf(stderr, "Shifting error token, "); -#endif + YYDPRINTF ((stderr, "Shifting error token, ")); *++nss_expr_yyvsp = nss_expr_yylval; -#ifdef YYLSP_NEEDED - *++nss_expr_yylsp = nss_expr_yylloc; -#endif + nss_expr_yystate = nss_expr_yyn; goto nss_expr_yynewstate; - nss_expr_yyacceptlab: - /* YYACCEPT comes here. */ - if (nss_expr_yyfree_stacks) - { - free (nss_expr_yyss); - free (nss_expr_yyvs); -#ifdef YYLSP_NEEDED - free (nss_expr_yyls); -#endif - } - return 0; - nss_expr_yyabortlab: - /* YYABORT comes here. */ - if (nss_expr_yyfree_stacks) - { - free (nss_expr_yyss); - free (nss_expr_yyvs); -#ifdef YYLSP_NEEDED - free (nss_expr_yyls); +/*-------------------------------------. +| nss_expr_yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +nss_expr_yyacceptlab: + nss_expr_yyresult = 0; + goto nss_expr_yyreturn; + +/*-----------------------------------. +| nss_expr_yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +nss_expr_yyabortlab: + nss_expr_yyresult = 1; + goto nss_expr_yyreturn; + +#ifndef nss_expr_yyoverflow +/*----------------------------------------------. +| nss_expr_yyoverflowlab -- parser overflow comes here. | +`----------------------------------------------*/ +nss_expr_yyoverflowlab: + nss_expr_yyerror ("parser stack overflow"); + nss_expr_yyresult = 2; + /* Fall through. */ +#endif + +nss_expr_yyreturn: +#ifndef nss_expr_yyoverflow + if (nss_expr_yyss != nss_expr_yyssa) + YYSTACK_FREE (nss_expr_yyss); #endif - } - return 1; + return nss_expr_yyresult; } + + #line 128 "nss_expr_parse.y" @@ -1077,3 +1437,4 @@ return 2; } + Index: nss_expr_parse.h =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_expr_parse.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- nss_expr_parse.h 31 May 2005 14:32:42 -0000 1.1 +++ nss_expr_parse.h 4 Jan 2006 22:07:58 -0000 1.2 @@ -1,27 +1,94 @@ -typedef union { +/* A Bison parser, made by GNU Bison 1.875c. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 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, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum nss_expr_yytokentype { + T_TRUE = 258, + T_FALSE = 259, + T_DIGIT = 260, + T_ID = 261, + T_STRING = 262, + T_REGEX = 263, + T_REGEX_I = 264, + T_FUNC_FILE = 265, + T_OP_EQ = 266, + T_OP_NE = 267, + T_OP_LT = 268, + T_OP_LE = 269, + T_OP_GT = 270, + T_OP_GE = 271, + T_OP_REG = 272, + T_OP_NRE = 273, + T_OP_IN = 274, + T_OP_OR = 275, + T_OP_AND = 276, + T_OP_NOT = 277 + }; +#endif +#define T_TRUE 258 +#define T_FALSE 259 +#define T_DIGIT 260 +#define T_ID 261 +#define T_STRING 262 +#define T_REGEX 263 +#define T_REGEX_I 264 +#define T_FUNC_FILE 265 +#define T_OP_EQ 266 +#define T_OP_NE 267 +#define T_OP_LT 268 +#define T_OP_LE 269 +#define T_OP_GT 270 +#define T_OP_GE 271 +#define T_OP_REG 272 +#define T_OP_NRE 273 +#define T_OP_IN 274 +#define T_OP_OR 275 +#define T_OP_AND 276 +#define T_OP_NOT 277 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 26 "nss_expr_parse.y" +typedef union YYSTYPE { char *cpVal; nss_expr *exVal; } YYSTYPE; -#define T_TRUE 257 -#define T_FALSE 258 -#define T_DIGIT 259 -#define T_ID 260 -#define T_STRING 261 -#define T_REGEX 262 -#define T_REGEX_I 263 -#define T_FUNC_FILE 264 -#define T_OP_EQ 265 -#define T_OP_NE 266 -#define T_OP_LT 267 -#define T_OP_LE 268 -#define T_OP_GT 269 -#define T_OP_GE 270 -#define T_OP_REG 271 -#define T_OP_NRE 272 -#define T_OP_IN 273 -#define T_OP_OR 274 -#define T_OP_AND 275 -#define T_OP_NOT 276 - +/* Line 1275 of yacc.c. */ +#line 86 "y.tab.h" +# define nss_expr_yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif extern YYSTYPE nss_expr_yylval; + + + Index: nss_expr_parse.y =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_expr_parse.y,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- nss_expr_parse.y 31 May 2005 14:32:42 -0000 1.1 +++ nss_expr_parse.y 4 Jan 2006 22:07:58 -0000 1.2 @@ -100,18 +100,18 @@ ; regex : T_REGEX { - regex_t *regex; + ap_regex_t *regex; if ((regex = ap_pregcomp(nss_expr_info.pool, $1, - REG_EXTENDED|REG_NOSUB)) == NULL) { + AP_REG_EXTENDED|AP_REG_NOSUB)) == NULL) { nss_expr_error = "Failed to compile regular expression"; YYERROR; } $$ = nss_expr_make(op_Regex, regex, NULL); } | T_REGEX_I { - regex_t *regex; + ap_regex_t *regex; if ((regex = ap_pregcomp(nss_expr_info.pool, $1, - REG_EXTENDED|REG_NOSUB|REG_ICASE)) == NULL) { + AP_REG_EXTENDED|AP_REG_NOSUB|AP_REG_ICASE)) == NULL) { nss_expr_error = "Failed to compile regular expression"; YYERROR; } Index: nss_expr_scan.c =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_expr_scan.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- nss_expr_scan.c 31 May 2005 14:32:42 -0000 1.1 +++ nss_expr_scan.c 4 Jan 2006 22:07:58 -0000 1.2 @@ -1432,6 +1432,7 @@ #endif /* ifndef YY_NO_UNPUT */ +#ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else @@ -1503,7 +1504,7 @@ return c; } - +#endif /* YY_NO_INPUT */ #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) From fedora-directory-commits at redhat.com Thu Jan 5 17:56:22 2006 From: fedora-directory-commits at redhat.com (Pete Rowley (prowley)) Date: Thu, 5 Jan 2006 12:56:22 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/views views.c, 1.7, 1.8 Message-ID: <200601051756.k05HuMfL027846@cvs-int.fedora.redhat.com> Author: prowley Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/views In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27829 Modified Files: views.c Log Message: 172683: Search filter does not work on physical entries within views Index: views.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/views/views.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- views.c 22 Nov 2005 03:40:14 -0000 1.7 +++ views.c 5 Jan 2006 17:56:14 -0000 1.8 @@ -899,10 +899,12 @@ */ pDescendentSubFilter = views_cache_create_descendent_filter(currentChild, useEntryID); if(pDescendentSubFilter) + { if(pOrSubFilter) pOrSubFilter = slapi_filter_join_ex( LDAP_FILTER_OR, pOrSubFilter, pDescendentSubFilter, 0 ); else pOrSubFilter = pDescendentSubFilter; + } if(useEntryID) { @@ -1016,7 +1018,7 @@ pView->includeChildViewsFilter = views_cache_create_descendent_filter(pView, PR_TRUE); /* add this view */ - view_filter_str = PR_smprintf("(parentid=%lu)", pView->entryid); + view_filter_str = PR_smprintf("(|(parentid=%lu)(entryid=%lu))", pView->entryid, pView->entryid); if(pView->includeChildViewsFilter) { @@ -1674,7 +1676,7 @@ theView = views_cache_find_view(base); /* if the view is disabled (we service subtree searches in this case) */ - if(!theView || !theView->viewfilter && scope == LDAP_SCOPE_ONELEVEL) + if(!theView || (!theView->viewfilter && scope == LDAP_SCOPE_ONELEVEL)) { /* unlock the cache */ views_unlock(); @@ -1696,8 +1698,10 @@ #endif } - - includeChildViewsFilter = slapi_filter_dup(theView->includeChildViewsFilter); + else + { + includeChildViewsFilter = slapi_filter_dup(theView->includeChildViewsFilter); + } #ifdef _VIEW_DEBUG_FILTERS slapi_filter_to_string(includeChildViewsFilter, includeChildViewsFilter_str, sizeof(includeChildViewsFilter_str)); @@ -1727,28 +1731,38 @@ #ifdef _VIEW_DEBUG_FILTERS slapi_filter_to_string(clientFilter, clientFilter_str, sizeof(clientFilter_str)); #endif + /* There are two major clauses in a views filter, one looks + for entries that match the view filters themselves plus + the presented client filter, and the other looks for entries + that exist in the view hierarchy that also match the client + presented filter + */ - /* client supplied filter AND inclusion filter - make sure we can see views */ + /* client supplied filter AND views inclusion filter + - make sure we can see entries in the view tree */ if(scope == LDAP_SCOPE_ONELEVEL) { - Slapi_Filter *clientSeeViewsFilter = 0; /* view filter to see views */ - - clientSeeViewsFilter = slapi_filter_dup(clientFilter); + /* this filter is to lock our view to the onelevel search */ if(excludeGrandChildViewsFilter) - seeViewsFilter = slapi_filter_join_ex( LDAP_FILTER_AND, excludeGrandChildViewsFilter, clientSeeViewsFilter, 0 ); - else - seeViewsFilter = clientSeeViewsFilter; + { + seeViewsFilter = excludeGrandChildViewsFilter; + } } - - /* this filter is to lock our view to the subtree at hand */ - if(seeViewsFilter && includeChildViewsFilter) - seeViewsFilter = slapi_filter_join_ex( LDAP_FILTER_AND, includeChildViewsFilter, seeViewsFilter, 0 ); else { + /* this filter is to lock our view to the subtree search */ if(includeChildViewsFilter) + { seeViewsFilter = includeChildViewsFilter; + } } - + + /* but only view tree entries that match the client filter */ + if(seeViewsFilter) + { + seeViewsFilter = slapi_filter_join_ex( LDAP_FILTER_AND, slapi_filter_dup(clientFilter), seeViewsFilter, 0 ); + } + /* create target filter */ if(includeAncestorFiltersFilter) outFilter = slapi_filter_join_ex( LDAP_FILTER_AND, includeAncestorFiltersFilter, clientFilter, 0 ); From fedora-directory-commits at redhat.com Fri Jan 6 00:50:00 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 5 Jan 2006 19:50:00 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/rsearch - New directory Message-ID: <200601060050.k060o09W012031@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12016/rsearch Log Message: Directory /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch added to the repository From fedora-directory-commits at redhat.com Fri Jan 6 00:50:55 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 5 Jan 2006 19:50:55 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/rsearch/scripts - New directory Message-ID: <200601060050.k060ot0S012056@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12041/scripts Log Message: Directory /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/scripts added to the repository From fedora-directory-commits at redhat.com Fri Jan 6 00:53:31 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 5 Jan 2006 19:53:31 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/rsearch Makefile, NONE, 1.1 addthread.c, NONE, 1.1 addthread.h, NONE, 1.1 infadd.c, NONE, 1.1 infadd.h, NONE, 1.1 main.c, NONE, 1.1 nametable.c, NONE, 1.1 nametable.h, NONE, 1.1 rsearch.c, NONE, 1.1 rsearch.h, NONE, 1.1 sdattable.c, NONE, 1.1 sdattable.h, NONE, 1.1 searchthread.c, NONE, 1.1 searchthread.h, NONE, 1.1 Message-ID: <200601060053.k060rVVT012149@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12072/rsearch Added Files: Makefile addthread.c addthread.h infadd.c infadd.h main.c nametable.c nametable.h rsearch.c rsearch.h sdattable.c sdattable.h searchthread.c searchthread.h Log Message: [170348] RSEARCH needs to be updated Integrating rsearch and infadd source codes from DSRK into the Directory Server build tree. --- NEW FILE Makefile --- # # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # # # gnu makefile for LDAP Server tools. # LDAP_SRC = ../../../.. BUILD_ROOT = ../../../../.. NOSTDCLEAN=true # don't let nsconfig.mk define target clean NOSTDSTRIP=true # don't let nsconfig.mk define target strip NSPR20=true # probably should be defined somewhere else (not sure where) OBJDEST = $(OBJDIR)/servers/tools/obj BINDIR = $(RELDIR)/shared/bin DATDIR = $(RELDIR)/shared/data SLAPD_OBJDIR = $(LDAP_OBJDIR) include $(BUILD_ROOT)/nsdefs.mk include $(BUILD_ROOT)/nsconfig.mk include $(LDAP_SRC)/nsldap.mk INCLUDES+=-I$(DB_INCLUDE) SLAPDHDIR = ../ ifeq ($(ARCH), OSF1) PLATFORM_SPECIFIC_EXTRA_LIBRARY = -lcxx else # OSF1 # oems might need to edit this for their platform PLATFORM_SPECIFIC_EXTRA_LIBRARY = endif # OSF1 INCLUDES += $(SSLINCLUDE) DEFS += $(SSL) CFLAGS += $(ARCH_CFLAGS) INCLUDES += -I$(SLAPDHDIR) -I$(LDAP_ADMINCDIR) INCLUDES += -I$(ACLINC) INCLUDES += -I ../../plugins/rever LDFLAGS += $(EXLDFLAGS) $(SSLLIBFLAG) DEPLIBS= EXTRA_LIBS_DEP = $(LDAPSDK_DEP) $(DB_LIB_DEP) $(LDAP_COMMON_LIBS_DEP) EXTRA_LIBS += $(LDAPLINK) $(DB_LIB) \ $(PLATFORM_SPECIFIC_EXTRA_LIBRARY) \ $(ALIBS) $(NSPRLINK) $(SECURITYLINK) \ $(THREADSLIB) $(LDAP_COMMON_LIBS) ifeq ($(ARCH), Linux) EXTRA_LIBS += -lcrypt endif KEYUPG_LIBS_DEP= KEYUPG_LIBS=$(LDAP_LIBLITEKEY) # It looks like all of the latest versions of Unix that we ship on # have a good enough heap implementations that they don't need # SmartHeap. We still need it on NT. ifneq ($(ARCH), WINNT) LDAP_DONT_USE_SMARTHEAP=1 endif # Don't use smartheap for debug builds on NT ifeq ($(ARCH), WINNT) ifeq ($(DEBUG), full) LDAP_DONT_USE_SMARTHEAP=1 endif endif ifndef LDAP_DONT_USE_SMARTHEAP include $(BUILD_ROOT)/ns_usesh.mk _smartheap_depend = $(SH_LIB_DEP) else CFLAGS+=-DLDAP_DONT_USE_SMARTHEAP endif RSEARCHSRC := nametable.c sdattable.c searchthread.c rsearch.c INFADDSRC := nametable.c addthread.c infadd.c DATAFILES := scripts/dbgen-GivenNames scripts/dbgen-FamilyNames scripts/dbgen-OrgUnits DBGEN := scripts/dbgen.pl ifeq ($(OS_ARCH), WINNT) OBJEXT :=.obj else OBJEXT :=.o endif RSEARCHOBJS = $(addprefix $(OBJDEST)/, $(RSEARCHSRC:.c=$(OBJEXT))) INFADDOBJS = $(addprefix $(OBJDEST)/, $(INFADDSRC:.c=$(OBJEXT))) HDIR = $(LDAP_SRC)/include ALL_OBJS = $(RSEARCHOBJS) $(INFADDOBJS) RSEARCH = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, rsearch)) INFADD = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, infadd)) DBGEN = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, dbgen.pl)) BINS= $(RSEARCH) $(INFADD) $(DBGEN) all: $(OBJDEST) $(BINDIR) $(BINS) $(DATDIR) $(RSEARCH): $(RSEARCHOBJS) $(BINDIR) $(LINK_EXE) $(RSEARCHOBJS) $(LDAP_LIBLDIF) -chmod 755 $(RSEARCH) $(INFADD): $(INFADDOBJS) $(BINDIR) $(LINK_EXE) $(INFADDOBJS) $(LDAP_LIBLDIF) -chmod 755 $(INFADD) $(DBGEN): scripts/dbgen.pl $(BINDIR) cp scripts/dbgen.pl $(BINDIR) -chmod 755 $(DBGEN) $(OBJDEST): if [ ! -d $(OBJDEST) ]; then \ $(MKDIR) $(OBJDEST); \ fi $(BINDIR): if [ ! -d $(BINDIR) ]; then \ $(MKDIR) $(BINDIR); \ fi $(DATDIR): -$(RM) -r $(DATDIR) -$(MKDIR) $(DATDIR) cp scripts/dbgen-* $(DATDIR) clean: -$(RM) $(ALL_OBJS) -$(RM) -r $(BINS) $(DATDIR) --- NEW FILE addthread.c --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ #include #include #include #ifdef XP_UNIX #include #endif #include "nspr.h" #include /* for TCP_NODELAY */ #include "ldap.h" #include "addthread.h" #include "infadd.h" /* local data for a search thread */ struct _addthread { PRUint32 addCount; PRUint32 addTotal; PRUint32 failCount; double mintime; double maxtime; LDAP *ld; PRThread *tid; PRLock *lock; int id; int alive; char *blob; int retry; }; /*** unique id generator ***/ static unsigned long uniqueid = 0; void at_initID(unsigned long i) { uniqueid = i; /* before threading */ } unsigned long getID(void) { static PRLock *lock = NULL; unsigned long ret; if (!lock) { /* initialize */ lock = PR_NewLock(); } PR_Lock(lock); ret = uniqueid++; PR_Unlock(lock); return ret; } /* new addthread */ AddThread *at_new(void) { AddThread *at = (AddThread *)malloc(sizeof(AddThread)); if (!at) return NULL; at->addCount = at->failCount = at->addTotal = 0; at->mintime = 10000; at->maxtime = 0; at->ld = NULL; at->tid = NULL; at->id = 0; at->alive = 1; at->retry = 0; at->lock = PR_NewLock(); at->blob = NULL; /* make sure the id generator has initialized */ getID(); return at; } static void at_bail(AddThread *at) { PR_Lock(at->lock); at->alive = -10; PR_Unlock(at->lock); } void at_setThread(AddThread *at, PRThread *tid, int id) { at->tid = tid; at->id = id; } int at_getThread(AddThread *at, PRThread **tid) { if (tid) *tid = at->tid; return at->id; } static void at_enableTCPnodelay(AddThread *at) { LBER_SOCKET s = 0; int val = 1; if (ldap_get_option(at->ld, LDAP_OPT_DESC, (void *)&s) != LDAP_SUCCESS) { fprintf(stderr, "T%d: failed on ldap_get_option\n", at->id); return; } if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val))) fprintf(stderr, "T%d: failed in setsockopt\n", at->id); } /* NOTE: currently these are unused */ #if 0 /* abruptly disconnect an LDAP connection without unbinding */ static void at_disconnect(AddThread *at) { LBER_SOCKET s = 0; if (ldap_get_option(at->ld, LDAP_OPT_DESC, (void *)&s) != LDAP_SUCCESS) { fprintf(stderr, "T%d: failed on ldap_get_option\n", at->id); return; } #ifdef XP_WIN if (closesocket(s)) fprintf(stderr, "T%d: failed to disconnect\n", at->id); #else if (close(s)) fprintf(stderr, "T%d: failed to disconnect\n", at->id); #endif } #endif static void at_bind(AddThread *at) { int ret; int retry = 0; at->ld = ldap_init(hostname, port); if (! at->ld) { fprintf(stderr, "T%d: failed to init: %s port %d\n", at->id, hostname, port); return; } while (retry < 10) { ret = ldap_simple_bind_s(at->ld, strlen(username) ? username : NULL, strlen(password) ? password : NULL); if (LDAP_SUCCESS == ret) { return; /* ok */ } else if (LDAP_CONNECT_ERROR == ret) { retry++; } else { break; } } fprintf(stderr, "T%d: failed to bind, ldap_simple_bind_s returned %d\n", at->id, ret); } #if 0 static void at_unbind(AddThread *at) { if (ldap_unbind(at->ld) != LDAP_SUCCESS) fprintf(stderr, "T%d: failed to unbind\n", at->id); } #endif /* 0 */ static void at_random_tel_number(char *s) { static char *areaCode[] = { "303", "408", "415", "423", "510", "650", "714", "803", "864", "901" }; int index = rand() % 10; sprintf(s, "+1 %s %03d %04d", areaCode[index], rand()%1000, rand()%10000); } static int at_add(AddThread *at) { LDAPMod *attrs[10]; LDAPMod attr_cn, attr_sn, attr_givenname, attr_objectclass, attr_uid, attr_mail, attr_telephonenumber, attr_audio, attr_password; struct berval audio_berval; struct berval *audio_values[2]; char dn[100], uid[10], telno[20], *sn, *givenname, cn[50], mail[50]; char *cn_values[2], *sn_values[2], *givenname_values[2]; char *uid_values[2], *mail_values[2], *telno_values[2]; #if 1 char *objectclass_values[] = { "top", "person", "organizationalPerson", "inetOrgPerson", NULL }; #else char *objectclass_values[] = { "inetOrgPerson", NULL }; #endif int ret; /* make up the strings */ sprintf(uid, "%lu", getID()); at_random_tel_number(telno); sn = nt_getrand(family_names); givenname = nt_getrand(given_names); sprintf(cn, "%s %s %s", givenname, sn, uid); sprintf(mail, "%s%s at example.com", givenname, uid); sprintf(dn, "cn=%s,%s", cn, suffix); cn_values[0] = cn; cn_values[1] = NULL; sn_values[0] = sn; sn_values[1] = NULL; givenname_values[0] = givenname; givenname_values[1] = NULL; uid_values[0] = uid; uid_values[1] = NULL; mail_values[0] = mail; mail_values[1] = NULL; telno_values[0] = telno; telno_values[1] = NULL; attrs[0] = &attr_objectclass; attrs[1] = &attr_cn; attrs[2] = &attr_sn; attrs[3] = &attr_givenname; attrs[4] = &attr_uid; attrs[5] = &attr_password; attrs[6] = &attr_mail; attrs[7] = &attr_telephonenumber; if (blobsize > 0) { audio_values[0] = &audio_berval; audio_values[1] = 0; audio_berval.bv_len = (blobsize > 32000) ? ((long)rand() * 1039) % blobsize : (rand() % blobsize); audio_berval.bv_val = at->blob; attr_audio.mod_op = LDAP_MOD_BVALUES; attr_audio.mod_type = "audio"; attr_audio.mod_values = (char **)&audio_values; attrs[8] = &attr_audio; attrs[9] = 0; } else attrs[8] = 0; attr_cn.mod_op = LDAP_MOD_ADD; attr_cn.mod_type = "cn"; attr_cn.mod_values = cn_values; attr_sn.mod_op = LDAP_MOD_ADD; attr_sn.mod_type = "sn"; attr_sn.mod_values = sn_values; attr_givenname.mod_op = LDAP_MOD_ADD; attr_givenname.mod_type = "givenname"; attr_givenname.mod_values = givenname_values; attr_objectclass.mod_op = LDAP_MOD_ADD; attr_objectclass.mod_type = "objectClass"; attr_objectclass.mod_values = objectclass_values; attr_uid.mod_op = LDAP_MOD_ADD; attr_uid.mod_type = "uid"; attr_uid.mod_values = uid_values; attr_password.mod_op = LDAP_MOD_ADD; attr_password.mod_type = "userpassword"; attr_password.mod_values = uid_values; attr_mail.mod_op = LDAP_MOD_ADD; attr_mail.mod_type = "mail"; attr_mail.mod_values = mail_values; attr_telephonenumber.mod_op = LDAP_MOD_ADD; attr_telephonenumber.mod_type = "telephonenumber"; attr_telephonenumber.mod_values = telno_values; #if 0 for (i = 0; attrs[i]; i++) { fprintf(stderr, "attr '%s': ", attrs[i]->mod_type); if (strcasecmp(attrs[i]->mod_type, "audio") == 0) fprintf(stderr, "binary data len=%lu\n", ((struct berval **)(attrs[i]->mod_values))[0]->bv_len); else fprintf(stderr, "'%s'\n", attrs[i]->mod_values[0]); } #endif ret = ldap_add_s(at->ld, dn, attrs); if (ret != LDAP_SUCCESS) { fprintf(stderr, "T%d: failed to add, error = %d\n", at->id, ret); } return ret; } /* the main thread */ void infadd_start(void *v) { AddThread *at = (AddThread *)v; PRIntervalTime timer; PRUint32 span, i; int notBound = 1; int ret; /* make the blob if necessary */ if (blobsize > 0) { at->blob = (char *)malloc(blobsize); if (! at->blob) { fprintf(stderr, "T%d: can't allocate blob!\n", at->id); return; } for (i = 0; i < blobsize; i++) at->blob[i] = (char)(rand() & 0xff); } at->alive = 1; while (1) { timer = PR_IntervalNow(); /* bind if we need to */ if (notBound) { at_bind(at); if (noDelay) at_enableTCPnodelay(at); notBound = 0; } ret = at_add(at); if (LDAP_SUCCESS == ret) { span = PR_IntervalToMilliseconds(PR_IntervalNow()-timer); /* update data */ PR_Lock(at->lock); at->addCount++; at->addTotal++; if (at->mintime > span) at->mintime = span; if (at->maxtime < span) at->maxtime = span; at->alive = 1; at->retry = 0; PR_Unlock(at->lock); } else if (LDAP_CONNECT_ERROR == ret && at->retry < 10) { PR_Lock(at->lock); at->retry++; PR_Unlock(at->lock); } else { at_bail(at); return; } } } /* fetches the current min/max times and the search count, and clears them */ void at_getCountMinMax(AddThread *at, PRUint32 *count, PRUint32 *min, PRUint32 *max, PRUint32 *total) { PR_Lock(at->lock); if (count) { *count = at->addCount; at->addCount = 0; } if (min) { *min = at->mintime; at->mintime = 10000; } if (max) { *max = at->maxtime; at->maxtime = 0; } if (total) *total = at->addTotal; at->alive--; PR_Unlock(at->lock); } int at_alive(AddThread *at) { int alive; PR_Lock(at->lock); alive = at->alive; PR_Unlock(at->lock); return alive; } --- NEW FILE addthread.h --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifndef _ADDTHREAD_H #define _ADDTHREAD_H typedef struct _addthread AddThread; AddThread *at_new(void); void at_setThread(AddThread *at, PRThread *tid, int id); int at_getThread(AddThread *at, PRThread **tid); void infadd_start(void *v); void at_getCountMinMax(AddThread *at, PRUint32 *count, PRUint32 *min, PRUint32 *max, PRUint32 *total); int at_alive(AddThread *at); void at_initID(unsigned long i); #endif --- NEW FILE infadd.c --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ /* * XP port of dboreham's NT tool "infinite_add" * robey, june 1998 * * note: i didn't really port this one, i just wrote a quick version * from scratch. */ #ifdef LINUX #include #include #include #endif #include #include #include #include #include #include "nspr.h" #include "nametable.h" #include "addthread.h" #define DEFAULT_HOSTNAME "localhost" #define DEFAULT_PORT 389 #define DEFAULT_THREADS 1 #define DEFAULT_INTERVAL 10000 /* global data for the threads to share */ char *hostname = DEFAULT_HOSTNAME; PRUint16 port = DEFAULT_PORT; int thread_count = DEFAULT_THREADS; char *suffix = NULL; char *username = NULL; char *password = NULL; PRUint32 blobsize = 0; PRUint32 sampleInterval = DEFAULT_INTERVAL; int noDelay = 0; int quiet = 0; int verbose = 0; int saveQuit = 0; int lmtCount = 0; unsigned long firstUID = 0; NameTable *given_names = NULL, *family_names = NULL; void usage() { fprintf(stdout, "Usage: infadd -s suffix -u bindDN -w password [options]\n" "\nOptions:\n" "-h hostname (default: %s)\n" "-p port (default: %d)\n" "-t threads -- number of threads to spin (default: %d)\n" "-d -- use TCP no-delay\n" "-q -- quiet mode (no status updates)\n" "-v -- verbose mode (give per-thread statistics)\n" "-I num -- first uid (default: 0)\n" "-l count -- limit count; stops when the total count exceeds \n" "-i msec -- sample interval in milliseconds (default: %u)\n" "-R size -- generate random names instead of using\n" " data files\n" "-z size -- add binary blob of average size of bytes\n" "\n", DEFAULT_HOSTNAME, DEFAULT_PORT, DEFAULT_THREADS, DEFAULT_INTERVAL); } /* generate a random name * this generates 'names' like "Gxuvbnrc" but hey, there are Bosnian towns * with less pronouncable names... */ char *randName(void) { char *x; int i, len = (rand() % 7) + 5; x = (char *)malloc(len+1); if (!x) return NULL; x[0] = (rand() % 26)+'A'; for (i = 1; i < len; i++) x[i] = (rand() % 26)+'a'; x[len] = 0; return x; } int fill_table(NameTable *nt, PRUint32 size) { PRUint32 i; char *x; int ret; fprintf(stdout, "Generating random names: 0 "); for (i = 0; i < size; i++) { x = randName(); /* check for duplicates */ while (nt_cis_check(nt, x)) { free(x); x = randName(); } ret = nt_push(nt, x); if ((i % 100) == 0) { fprintf(stdout, "\b\b\b\b\b\b\b%-7d", i); } } fprintf(stdout, "\b\b\b\b\b\b\b%d. Done.\n", size); return ret; } int main(int argc, char **argv) { int ch, index, numThreads, numDead; PRUint32 use_random = 0; AddThread **threads; PRUint32 total = 0, ntotal = 0; int counter; char familynames[35], givennames[35]; srand(time(NULL)); if (argc < 2) { usage(); exit(1); } while ((ch = getopt(argc, argv, "h:p:s:u:w:z:dR:t:i:I:l:qvS")) != EOF) switch (ch) { case 'h': hostname = optarg; break; case 'p': port = (PRUint16)atoi(optarg); break; case 's': suffix = optarg; break; case 'u': username = optarg; break; case 'w': password = optarg; break; case 'z': blobsize = atoi(optarg); break; case 'R': use_random = (PRUint32)atol(optarg); break; case 't': thread_count = atoi(optarg); break; case 'i': sampleInterval = (PRUint32)atol(optarg); break; case 'd': noDelay = 1; break; case 'q': quiet = 1; break; case 'v': verbose = 1; break; case 'S': saveQuit = 1; break; case 'l': lmtCount = atoi(optarg); break; case 'I': firstUID = atoi(optarg); break; default: usage(); exit(1); } if (!suffix || !username || !password) { printf("infadd: missing option\n"); usage(); exit(1); } if (use_random < 0 || sampleInterval <= 0 || thread_count <= 0 || lmtCount < 0 || blobsize < 0 || firstUID < 0) { printf("infadd: invalid option value\n"); usage(); exit(-1); } argc -= optind; argv += optind; PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 0); given_names = nt_new(0); family_names = nt_new(0); if (use_random) { fill_table(given_names, use_random); fill_table(family_names, use_random); } else { if (!access("../data/dbgen-FamilyNames", R_OK)) { strcpy(familynames, "../data/dbgen-FamilyNames"); strcpy(givennames, "../data/dbgen-GivenNames"); } else { strcpy(familynames, "../../data/dbgen-FamilyNames"); strcpy(givennames, "../../data/dbgen-GivenNames"); } fprintf(stdout, "Loading Given-Names ...\n"); if (!nt_load(given_names, givennames)) { fprintf(stdout, "*** Failed to read name table\n"); exit(1); } fprintf(stdout, "Loading Family-Names ...\n"); if (!nt_load(family_names, familynames)) { fprintf(stdout, "*** Failed to read name table\n"); exit(1); } } if (saveQuit) { fprintf(stdout, "Saving Given-Names ...\n"); nt_save(given_names, givennames); fprintf(stdout, "Saving Family-Names ...\n"); nt_save(family_names, familynames); exit(0); } if (firstUID) { at_initID(firstUID); } /* start up threads */ threads = (AddThread **)malloc(thread_count * sizeof(AddThread *)); index = 0; while (thread_count--) { AddThread *at; PRThread *thr; at = at_new(); thr = PR_CreateThread(PR_SYSTEM_THREAD, infadd_start, (void *)at, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0); at_setThread(at, thr, index+1); threads[index++] = at; } numThreads = index; fprintf(stdout, "infadd: %d thread%s launched.\n\n", numThreads, numThreads == 1 ? "" : "s"); numDead = 0; counter = 0; while (numThreads) { int x, alive; double tmpv; PR_Sleep(PR_MillisecondsToInterval(sampleInterval)); counter++; /* now check for deadies */ for (x = 0; x < numThreads; x++) { alive = at_alive(threads[x]); if (alive < 1) { int y; PRThread *tid; fprintf(stdout, "T%d DEAD", at_getThread(threads[x], &tid)); if (alive <= -4) { fprintf(stdout, " -- Dead thread being reaped.\n"); PR_JoinThread(tid); for (y = x+1; y < numThreads; y++) threads[y-1] = threads[y]; numThreads--; numDead++; x--; } else fprintf(stdout, " (waiting)\n"); } } /* check the total count */ ntotal = 0; total = 0; for (x = 0; x < numThreads; x++) { PRUint32 count, min, max, ntot; at_getCountMinMax(threads[x], &count, &min, &max, &ntot); total += count; ntotal += ntot; if (!quiet && verbose) fprintf(stdout, "T%d min:%5ums, max:%5ums, count: %3u, total: %u\n", at_getThread(threads[x], NULL), min, max, count, ntot); } if (!quiet && (numThreads > 1 || !verbose)) { fprintf(stdout, "Average rate:%7.2f, total: %u\n", (double)total/(double)numThreads, ntotal); } if (lmtCount && ntotal >= lmtCount) { if (!quiet) { fprintf(stdout, "Total added records: %d, Average rate: %7.2f/thrd, " "%6.2f/sec = %6.4fmsec/op\n", ntotal, (double)ntotal/(double)numThreads, (tmpv = (double)ntotal*1000.0/(counter*sampleInterval)), (double)1000.0/tmpv); } exit(1); } /* watchdogs were reset when we fetched the min/max counters */ } fprintf(stdout, "All threads died. :(\n"); exit(1); } --- NEW FILE infadd.h --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifndef _INFADD_H #define _INFADD_H #include "nametable.h" /* global data for the threads to share */ extern char *hostname; extern PRUint16 port; extern char *suffix; extern char *username; extern char *password; extern PRUint32 blobsize; extern NameTable *given_names; extern NameTable *family_names; extern int noDelay; #endif --- NEW FILE main.c --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ /* * this was just easier to start from scratch. windows is too different * from nspr. */ #include #include #ifdef XP_UNIX #include #endif #include "nspr.h" #include "rsearch.h" #include "nametable.h" #include "searchthread.h" void usage() { printf("\nUsage: rsearch -h host -p port -s suffix -D bindDN -w password\n" "-b -- bind before every operation\n" "-u -- don't unbind---just close the connection\n" "-f filter -- Filter\n" "-v -- verbose\n" "-y -- nodelay\n" "-q -- quiet\n" "-l -- logging\n" "-m -- Operaton: Modify. -i required\n" "-d -- Operaton: Delete. -i required\n" "-c -- Operaton: Compare. -i required\n" "-i file -- name file\n" "-A attrs -- Attribute List\n" "-n number -- Reserved for future use\n" "-j number -- Sample interval, in seconds\n" "-t number -- Threads\n\n"); } /* * Convert a string of the form "foo bar baz" * into an array of strings. Returns a pointer * to allocated memory. Array contains pointers * to the string passed in. So the array needs freed, * but the pointers don't. */ char **string_to_list(char* s) { int string_count = 0; int in_space = 1; char *p; for (p = s; *p != '\0'; p++) { if (in_space) { if (' ' != *p) { /* We just found the beginning of a string */ string_count++; in_space = 0; } } else if (' ' == *p) { /* Back in space again */ in_space = 1; } } /* Now we have the suckers counted */ if (string_count > 0) { char **return_array = (char **)malloc((string_count+1)*sizeof(char *)); int index = 0; in_space = 1; for (p = s; *p != '\0'; p++) { if (in_space) { if (' ' != *p) { /* We just found the beginning of a string */ return_array[index++] = p; in_space = 0; } } else if (' ' == *p) { /* Back in space again */ in_space = 1; *p = '\0'; } } return_array[index] = 0; return return_array; } else return 0; } /* global data for the threads to share */ char *hostname = "localhost"; int port = 389; int numeric = 0; int threadCount = 1; int verbose = 0; int logging = 0; int doBind = 0; int cool = 0; int quiet = 0; int noDelay = 0; int noUnBind = 0; char *suffix = "o=Ace Industry,c=us"; char *filter = "cn=*jones*"; char *nameFile = 0; char *bindDN = "cn=Directory Manager"; char *bindPW = "unrestricted"; char **attrToReturn = 0; char *attrList = 0; Operation opType = op_search; NameTable *ntable = NULL; int sampleInterval = 10000; void main(int argc, char** argv) { int index = 0, numThreads, numDead = 0; int ch; SearchThread **threads; while ((ch = getopt(argc, argv, "j:i:h:s:f:p:t:D:w:n:A:bvlyqmcdu")) != EOF) switch (ch) { case 'h': hostname = optarg; break; case 's': suffix = optarg; break; case 'f': filter = optarg; break; case 'i': nameFile = optarg; break; case 'D': bindDN = optarg; break; case 'w': bindPW = optarg; break; case 'A': attrList = optarg; break; case 'p': port = atoi(optarg); break; case 'b': doBind = 1; break; case 'u': noUnBind = 1; break; case 'n': numeric = atoi(optarg); break; case 't': threadCount = atoi(optarg); break; case 'j': sampleInterval = atoi(optarg) * 1000; break; case 'v': verbose = 1; break; case 'q': quiet = 1; break; case 'l': logging = 1; break; case 'y': noDelay = 1; break; case 'm': opType = op_modify; break; case 'd': opType = op_delete; break; case 'c': opType = op_compare; break; case '?': usage(); exit(1); break; default: break; } argc -= optind; argv += optind; PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 0); ntable = nt_new(0); if (nameFile) { if (!nt_load(ntable, nameFile)) { printf("Failed to read name table\n"); exit(1); } } if (attrList) attrToReturn = string_to_list(attrList); /* a "vector" */ threads = (SearchThread **)malloc(threadCount * sizeof(SearchThread *)); while (threadCount--) { SearchThread *st; PRThread *thr; st = st_new(); thr = PR_CreateThread(PR_SYSTEM_THREAD, search_start, (void *)st, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0); st_setThread(st, thr, index+1); threads[index++] = st; } numThreads = index; printf("rsearch: %d threads launched.\n\n", numThreads); while (numThreads != numDead) { int x; PR_Sleep(PR_MillisecondsToInterval(sampleInterval)); /* now check for deadies */ for (x = 0; x < numThreads; x++) { if (!st_alive(threads[x])) { int y; PRThread *tid; printf("T%d DEAD.\n", st_getThread(threads[x], &tid)); PR_JoinThread(tid); for (y = x+1; y < numThreads; y++) threads[y-1] = threads[y]; numThreads--; numDead++; x--; } } /* print out stats */ if (!quiet) { PRUint32 total = 0; for (x = 0; x < numThreads; x++) { PRUint32 count, min, max; st_getCountMinMax(threads[x], &count, &min, &max); total += count; printf("T%d min=%4ums, max=%4ums, count = %u\n", st_getThread(threads[x], NULL), min, max, count); } if (numThreads > 1) printf("Average rate = %.2f\n", (double)total/(double)numThreads); } /* watchdogs were reset when we fetched the min/max counters */ } printf("All threads died. (?)\n"); exit(1); } --- NEW FILE nametable.c --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ #include #include #include #include "nspr.h" #include "nametable.h" struct _nametable { char **data; PRUint32 capacity; PRUint32 size; }; int get_large_random_number() { #ifdef _WIN32 return rand(); #else return random(); #endif } /* * replacement for fgets * This isn't like the real fgets. It fills in 's' but strips off any * trailing linefeed character(s). The return value is 0 if it went * okay. */ int PR_GetLine(PRFileDesc *fd, char *s, unsigned int n) { PRInt32 start, newstart; int x; char *p; /* grab current location in file */ start = PR_Seek(fd, 0, PR_SEEK_CUR); x = PR_Read(fd, s, n-1); if (x <= 0) return 1; /* EOF or other error */ s[x] = 0; p = strchr(s, '\n'); if (p == NULL) p = strchr(s, '\r'); if (p == NULL) { /* assume there was one anyway */ return 0; } *p = 0; newstart = start+strlen(s)+1; if ((p != s) && (*(p-1) == '\r')) *(p-1) = 0; PR_Seek(fd, newstart, PR_SEEK_SET); return 0; } /* new nametable */ NameTable *nt_new(int capacity) { NameTable *nt = (NameTable *)malloc(sizeof(NameTable)); if (!nt) return NULL; if (capacity > 0) { nt->data = (char **)malloc(sizeof(char *) * capacity); if (! nt->data) { free(nt); return NULL; } } else { nt->data = NULL; } nt->capacity = capacity; nt->size = 0; return nt; } /* destroy nametable */ void nt_destroy(NameTable *nt) { int i; if (nt->size) { for (i = 0; i < nt->size; i++) free(nt->data[i]); } free(nt->data); free(nt); } /* push a string into the nametable */ int nt_push(NameTable *nt, char *s) { char **ndata; if (nt->size >= nt->capacity) { /* expando! */ nt->capacity += NT_STEP; ndata = (char **)realloc(nt->data, sizeof(char *) * nt->capacity); if (!ndata) return 0; nt->data = ndata; } nt->data[nt->size++] = s; return nt->size; } /* push the contents of a file into the nt, one line per entry */ int nt_load(NameTable *nt, const char *filename) { PRFileDesc *fd; fd = PR_Open(filename, PR_RDONLY, 0); if (!fd) return 0; while (PR_Available(fd) > 0) { char temp[256], *s; if (PR_GetLine(fd, temp, 256)) break; s = strdup(temp); if (!s) break; if (!nt_push(nt, s)) break; } PR_Close(fd); return nt->size; } /* write a nametable out into a file */ int nt_save(NameTable *nt, const char *filename) { PRFileDesc *fd; int i; fd = PR_Open(filename, PR_WRONLY|PR_CREATE_FILE, 0644); if (!fd) return 0; for (i = 0; i < nt->size; i++) { PR_Write(fd, nt->data[i], strlen(nt->data[i])); PR_Write(fd, "\n", 1); } PR_Close(fd); return 1; } /* painstakingly determine if a given entry is already in the list */ int nt_cis_check(NameTable *nt, const char *name) { int i; for (i = 0; i < nt->size; i++) if (strcasecmp(nt->data[i], name) == 0) return 1; return 0; } /* select a specific entry */ char *nt_get(NameTable *nt, int entry) { return nt->data[entry]; } char *nt_getrand(NameTable *nt) { if (! nt->size) return NULL; /* FIXME: rand() on NT will never return a number >32k */ return nt->data[get_large_random_number() % nt->size]; } /* get all entries */ char **nt_get_all(NameTable *nt ) { return nt->data ; } --- NEW FILE nametable.h --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifndef _NAMETABLE_H #define _NAMETABLE_H /* * a NameTable is a block that just holds an array of (dynamically allocated) * strings. you can read them all in from a file, and then fetch a specific * entry, or just a random one. */ typedef struct _nametable NameTable; /* size that the array should grow by when it fills up */ #define NT_STEP 32 NameTable *nt_new(int capacity); void nt_destroy(NameTable *nt); int nt_push(NameTable *nt, char *s); int nt_load(NameTable *nt, const char *filename); int nt_save(NameTable *nt, const char *filename); int nt_cis_check(NameTable *nt, const char *name); char *nt_get(NameTable *nt, int entry); char **nt_get_all(NameTable *nt ); char *nt_getrand(NameTable *nt); int PR_GetLine(PRFileDesc *fd, char *s, unsigned int n); int get_large_random_number(); #endif --- NEW FILE rsearch.c --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ /* * XP port of dboreham's NT tool "repeated_search" * robey, march 1998 */ #ifdef LINUX #include #include #include #endif #include #include #ifdef XP_UNIX #include #endif #include "nspr.h" #include "rsearch.h" #include "nametable.h" #include "searchthread.h" #include "ldap.h" #define DEFAULT_HOSTNAME "localhost" #define DEFAULT_PORT 389 #define DEFAULT_THREADS 1 #define DEFAULT_INTERVAL 10000 void usage() { printf("\nUsage: rsearch -D binddn -w bindpw -s suffix -f filter [options]\n" "-\\? -- print Usage (this message)\n" "-H -- print Usage (this message)\n" "-h host -- ldap server host (default: %s)\n" "-p port -- ldap server port (default: %d)\n" "-S scope -- search SCOPE [%d,%d,or %d] (default: %d)\n" "-b -- bind before every operation\n" "-u -- don't unbind -- just close the connection\n" "-L -- set linger -- connection discarded when closed\n" "-N -- No operation -- just bind (ignore mdc)\n" "-v -- verbose\n" "-y -- nodelay\n" "-q -- quiet\n" #ifndef NDSRK "-l -- logging\n" #endif /* NDSRK */ "-m -- operaton: modify non-indexed attr (description). -B required\n" "-M -- operaton: modify indexed attr (telephonenumber). -B required\n" "-d -- operaton: delete. -B required\n" "-c -- operaton: compare. -B required\n" "-i file -- name file; used for the search filter\n" "-B file -- [DN and] UID file (use '-B \\?' to see the format)\n" "-A attrs -- list of attributes for search request\n" "-a file -- list of attributes for search request in a file\n" " -- (use '-a \\?' to see the format ; -a & -A are mutually exclusive)\n" "-n number -- (reserved for future use)\n" "-j number -- sample interval, in seconds (default: %u)\n" "-t number -- threads (default: %d)\n" "-T number -- Time limit, in seconds; cmd stops when exceeds \n" "-V -- show running average\n" "-C num -- take num samples, then stop\n" "-R num -- drop connection & reconnect every num searches\n" "-x -- Use -B file for binding; ignored if -B is not given\n" "\n", DEFAULT_HOSTNAME, DEFAULT_PORT, LDAP_SCOPE_BASE, LDAP_SCOPE_ONELEVEL, LDAP_SCOPE_SUBTREE, LDAP_SCOPE_SUBTREE, (DEFAULT_INTERVAL/1000), DEFAULT_THREADS); exit(1); } void usage_B() { printf("\nFormat of the file for the '-B ' option:\n" "(Assuming each passwd is identical to its corresponding UID.)\n" "\n" "Format 1.\n" "=========\n" "UID: \n" "...\n" "\n" "Format 2.\n" "=========\n" "DN: \n" "UID: \n" "...\n" "\n"); } void usage_A() { printf("\nNote: -A and -a are mutually exclusive options\n"); printf("\nFormat of the file for the '-a ' option:\n" "\n" "Format :\n" "=========\n" "\n" "\n" "...\n" "\n"); } /* * Convert a string of the form "foo bar baz" * into an array of strings. Returns a pointer * to allocated memory. Array contains pointers * to the string passed in. So the array needs freed, * but the pointers don't. */ char **string_to_list(char* s) { int string_count = 0; int in_space = 1; char *p; for (p = s; *p != '\0'; p++) { if (in_space) { if (' ' != *p) { /* We just found the beginning of a string */ string_count++; in_space = 0; } } else if (' ' == *p) { /* Back in space again */ in_space = 1; } } /* Now we have the suckers counted */ if (string_count > 0) { char **return_array = (char **)malloc((string_count+1)*sizeof(char *)); int index = 0; in_space = 1; for (p = s; *p != '\0'; p++) { if (in_space) { if (' ' != *p) { /* We just found the beginning of a string */ return_array[index++] = p; in_space = 0; } } else if (' ' == *p) { /* Back in space again */ in_space = 1; *p = '\0'; } } return_array[index] = 0; return return_array; } else return 0; } /* global data for the threads to share */ char *hostname = DEFAULT_HOSTNAME; int port = DEFAULT_PORT; int numeric = 0; int threadCount = DEFAULT_THREADS; int verbose = 0; int logging = 0; int doBind = 0; int cool = 0; int quiet = 0; int noDelay = 0; int noUnBind = 0; int noOp = 0; int showRunningAvg = 0; int countLimit = 0; int reconnect = 0; char *suffix = NULL; char *filter = NULL; char *nameFile = 0; char *searchDatFile = 0; char *attrFile = 0; char *bindDN = NULL; char *bindPW = NULL; char **attrToReturn = 0; char *attrList = 0; Operation opType = op_search; NameTable *ntable = NULL; NameTable *attrTable = NULL; SDatTable *sdattable = NULL; int sampleInterval = DEFAULT_INTERVAL; int timeLimit = 0; int setLinger = 0; int useBFile = 0; int myScope = LDAP_SCOPE_SUBTREE; int main(int argc, char** argv) { int index = 0, numThreads, numDead = 0; int ch; int lifeTime; SearchThread **threads; PRUint32 total; double rate, val, cumrate; double sumVal; int counter; if (argc == 1) { usage(); exit(1); } while ((ch = getopt(argc, argv, "B:a:j:i:h:s:f:p:t:T:D:w:n:A:S:C:R:bvlyqmMcduNLHx?V")) != EOF) switch (ch) { case 'h': hostname = optarg; break; case 's': suffix = optarg; break; case 'f': filter = optarg; break; case 'i': nameFile = optarg; break; case 'B': if (optarg[0] == '?') { usage_B(); exit(1); } searchDatFile = optarg; break; case 'D': bindDN = optarg; break; case 'w': bindPW = optarg; break; case 'A': if (!attrFile) attrList = optarg; else usage(); break; case 'p': port = atoi(optarg); break; case 'S': myScope = atoi(optarg); if (myScope < LDAP_SCOPE_BASE || myScope > LDAP_SCOPE_SUBTREE) myScope = LDAP_SCOPE_SUBTREE; break; case 'C': countLimit = atoi(optarg); break; case 'b': doBind = 1; break; case 'u': noUnBind = 1; break; case 'L': setLinger = 1; break; case 'n': numeric = atoi(optarg); break; case 't': threadCount = atoi(optarg); break; case 'j': sampleInterval = atoi(optarg) * 1000; break; case 'v': verbose = 1; break; case 'q': quiet = 1; break; case 'l': logging = 1; break; case 'y': noDelay = 1; break; case 'm': opType = op_modify; break; case 'M': opType = op_idxmodify; break; case 'd': opType = op_delete; break; case 'c': opType = op_compare; break; case 'N': noOp = 1; doBind = 1; /* no use w/o this */ break; case 'T': timeLimit = atoi(optarg); break; case 'V': showRunningAvg = 1; break; case 'R': reconnect = atoi(optarg); break; case 'x': useBFile = 1; break; case 'a': if (optarg[0] == '?') { usage_A(); exit(1); } if (!attrList) attrFile = optarg; else usage(); break; case '?': case 'H': default : usage(); } if ( !suffix || !filter || !bindDN || !bindPW ) { printf("rsearch: missing option\n"); usage(); } if ( timeLimit < 0 || threadCount <= 0 || sampleInterval <= 0 ) { printf("rsearch: invalid option value\n"); usage(); } argc -= optind; argv += optind; PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 0); ntable = nt_new(0); if (nameFile) { if (!nt_load(ntable, nameFile)) { printf("Failed to read name table\n"); exit(1); } } attrTable = nt_new(0); if (attrFile) { if (!nt_load(attrTable , attrFile)) { printf ("Failed to read attr name table\n"); exit(1); } } sdattable = sdt_new(0); if (searchDatFile) { if (!sdt_load(sdattable, searchDatFile)) { printf("Failed to read search data table: %s\n", searchDatFile); exit(1); } } if (attrList) attrToReturn = string_to_list(attrList); /* a "vector" */ threads = (SearchThread **)malloc(threadCount * sizeof(SearchThread *)); while (threadCount--) { SearchThread *st; PRThread *thr; st = st_new(); thr = PR_CreateThread(PR_SYSTEM_THREAD, search_start, (void *)st, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0); st_setThread(st, thr, index+1); threads[index++] = st; } numThreads = index; printf("rsearch: %d threads launched.\n\n", numThreads); lifeTime = 0; counter = 0; sumVal = 0; cumrate = 0.0; while (numThreads) { int x, alive; PR_Sleep(PR_MillisecondsToInterval(sampleInterval)); counter++; lifeTime += sampleInterval/1000; /* now check for deadies */ for (x = 0; x < numThreads; x++) { alive = st_alive(threads[x]); if (alive < 1) { int y; PRThread *tid; printf("T%d no heartbeat", st_getThread(threads[x], &tid)); if (alive <= -4) { printf(" -- Dead thread being reaped.\n"); PR_JoinThread(tid); for (y = x+1; y < numThreads; y++) threads[y-1] = threads[y]; numThreads--; numDead++; x--; } else printf(" (waiting)\n"); } } /* print out stats */ total = 0; for (x = 0; x < numThreads; x++) { PRUint32 count, min, max; st_getCountMinMax(threads[x], &count, &min, &max); total += count; if (!quiet && verbose) printf("T%d min=%4ums, max=%4ums, count = %u\n", st_getThread(threads[x], NULL), min, max, count); } rate = (double)total / (double)numThreads; val = 1000.0 * (double)total / (double)sampleInterval; cumrate += rate; if ((numThreads > 1) || (!verbose)) { if (!quiet) { if (showRunningAvg) printf("Rate: %7.2f/thr (cumul rate: %7.2f/thr)\n", rate, cumrate/(double)counter); else printf("Rate: %7.2f/thr (%6.2f/sec =%7.4fms/op), " "total:%6u (%d thr)\n", rate, val, (double)1000.0/val, total, numThreads); } } if (countLimit && (counter >= countLimit)) { printf("Thank you, and good night.\n"); exit(0); } if (timeLimit && (lifeTime >= timeLimit)) { double tmpv; if (verbose) printf("%d sec >= %d\n", lifeTime, timeLimit); printf("Final Average rate: " "%6.2f/sec = %6.4fmsec/op, total:%6u\n", (tmpv = (val + sumVal)/counter), (double)1000.0/tmpv, total); exit(0); } sumVal += val; /* watchdogs were reset when we fetched the min/max counters */ } printf("All threads died. (?)\n"); exit(1); } --- NEW FILE rsearch.h --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifndef _RSEARCH_H #define _RSEARCH_H typedef enum { op_search, op_modify, op_idxmodify, op_add, op_delete, op_compare } Operation; #include "nametable.h" #include "sdattable.h" /* global data for the threads to share */ extern char *hostname; extern int port; extern int numeric; /**/ extern int threadCount; /**/ extern int verbose; /**/ extern int logging; extern int doBind; extern int setLinger; /**/ extern int cool; /**/ extern int quiet; extern int noDelay; extern int noUnBind; extern int noOp; extern int myScope; extern char *suffix; extern char *filter; /**/ extern char *nameFile; extern char *bindDN; extern char *bindPW; extern char **attrToReturn; /**/ extern char *attrList; extern Operation opType; extern NameTable *ntable; extern NameTable *attrTable; extern SDatTable *sdattable; /**/ extern int sampleInterval; extern int reconnect; extern int useBFile; #endif --- NEW FILE sdattable.c --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ #include #include #include #include "nspr.h" #include "nametable.h" #include "sdattable.h" struct _sdattable { char **dns; char **uids; PRUint32 capacity; PRUint32 size; }; /* new searchdata table */ SDatTable *sdt_new(int capacity) { SDatTable *sdt = (SDatTable *)malloc(sizeof(SDatTable)); if (!sdt) return NULL; if (capacity > 0) { sdt->dns = (char **)malloc(sizeof(char *) * capacity); if (! sdt->dns) { free(sdt); return NULL; } sdt->uids = (char **)malloc(sizeof(char *) * capacity); if (! sdt->uids) { free(sdt->dns); free(sdt); return NULL; } } else { sdt->dns = NULL; sdt->uids = NULL; } sdt->capacity = capacity; sdt->size = 0; return sdt; } /* destroy searchdata table */ void sdt_destroy(SDatTable *sdt) { int i; if (sdt->size) { for (i = 0; i < sdt->size; i++) { if (sdt->dns[i]) free(sdt->dns[i]); if (sdt->uids[i]) free(sdt->uids[i]); } } if (sdt->dns); free(sdt->dns); if (sdt->uids); free(sdt->uids); free(sdt); } /* push a string into the searchdata table */ int sdt_push(SDatTable *sdt, char *dn, char *uid) { char **sddns, **sddns0; char **sduids; if (!dn && !uid) return sdt->size; if (sdt->size >= sdt->capacity) { /* expando! */ sdt->capacity += SDT_STEP; sddns = (char **)realloc(sdt->dns, sizeof(char *) * sdt->capacity); if (!sddns) return 0; sddns0 = sdt->dns; sdt->dns = sddns; sduids = (char **)realloc(sdt->uids, sizeof(char *) * sdt->capacity); if (!sduids) { sdt->dns = sddns0; /* restore */ return 0; } sdt->uids = sduids; } sdt->dns[sdt->size] = dn; /* might be null */ sdt->uids[sdt->size] = uid; /* never be null */ return ++sdt->size; } /* push the contents of a file into the sdt, one line per entry */ int sdt_load(SDatTable *sdt, const char *filename) { PRFileDesc *fd; fd = PR_Open(filename, PR_RDONLY, 0); if (!fd) return 0; while (PR_Available(fd) > 0) { int rval; char temp[256]; char *dn = NULL; char *uid = NULL; while (!(rval = PR_GetLine(fd, temp, 256))) { char *p; if (!strncasecmp(temp, "dn:", 3)) { for (p = temp + 4; *p == ' ' || *p == '\t'; p++) ; dn = strdup(p); if (!dn) break; } else if (!strncasecmp(temp, "uid:", 4)) { for (p = temp + 5; *p == ' ' || *p == '\t'; p++) ; uid = strdup(p); if (!uid) break; } if (uid) { /* dn should come earlier than uid */ if (!sdt_push(sdt, dn, uid)) goto out; break; } } if (rval) break; /* PR_GetLine failed */ } out: PR_Close(fd); return sdt->size; } /* write a searchdata table out into a file */ int sdt_save(SDatTable *sdt, const char *filename) { PRFileDesc *fd; int i; fd = PR_Open(filename, PR_WRONLY|PR_CREATE_FILE, 0644); if (!fd) return 0; for (i = 0; i < sdt->size; i++) { if (sdt->dns[i]) { PR_Write(fd, "dn: ", 4); PR_Write(fd, sdt->dns[i], strlen(sdt->dns[i])); PR_Write(fd, "\n", 1); } if (sdt->dns[i]) { PR_Write(fd, "uid: ", 5); PR_Write(fd, sdt->uids[i], strlen(sdt->uids[i])); PR_Write(fd, "\n", 1); } } PR_Close(fd); return 1; } /* painstakingly determine if a given entry is already in the list */ int sdt_cis_check(SDatTable *sdt, const char *name) { int i; for (i = 0; i < sdt->size; i++) { if (strcasecmp(sdt->dns[i], name) == 0) return 1; if (strcasecmp(sdt->uids[i], name) == 0) return 1; } return 0; } /* select a specific entry */ char *sdt_dn_get(SDatTable *sdt, int entry) { return sdt->dns[entry]; } void sdt_dn_set(SDatTable *sdt, int entry, char *dn) { sdt->dns[entry] = strdup(dn); } char *sdt_uid_get(SDatTable *sdt, int entry) { return sdt->uids[entry]; } int sdt_getrand(SDatTable *sdt) { if (! sdt->size) return -1; /* FIXME: rand() on NT will never return a number >32k */ return get_large_random_number() % sdt->size; } int sdt_getlen(SDatTable *sdt) { return sdt->size; } --- NEW FILE sdattable.h --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifndef _SDATTABLE_H #define _SDATTABLE_H /* * a SDatTable is a block that just holds an array of (dynamically allocated) * dn & uid pair (dn might be empty). you can read them all in from a file, * and then fetch a specific entry, or just a random one. */ typedef struct _sdattable SDatTable; /* size that the array should grow by when it fills up */ #define SDT_STEP 32 SDatTable *sdt_new(int capacity); void sdt_destroy(SDatTable *sdt); int sdt_push(SDatTable *sdt, char *dn, char *uid); int sdt_load(SDatTable *sdt, const char *filename); int sdt_save(SDatTable *sdt, const char *filename); int sdt_cis_check(SDatTable *sdt, const char *name); char *sdt_dn_get(SDatTable *sdt, int entry); void sdt_dn_set(SDatTable *sdt, int entry, char *dn); char *sdt_uid_get(SDatTable *sdt, int entry); int sdt_getrand(SDatTable *sdt); int sdt_getlen(SDatTable *sdt); #endif --- NEW FILE searchthread.c --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ #include #include #include #ifdef XP_UNIX #include #endif #include #include #include "nspr.h" #include #include #include /* for TCP_NODELAY */ #include "ldap.h" #include "rsearch.h" #include "searchthread.h" /* local data for a search thread */ struct _searchthread { PRUint32 searchCount; PRUint32 failCount; double mintime; double maxtime; LDAP *ld; LDAP *ld2; /* aux LDAP handle */ LBER_SOCKET soc; PRThread *tid; PRLock *lock; int id; int alive; int retry; }; /* new searchthread */ SearchThread *st_new(void) { SearchThread *st = (SearchThread *)malloc(sizeof(SearchThread)); if (!st) return NULL; st->searchCount = st->failCount = 0; st->mintime = 10000; st->maxtime = 0; st->ld = NULL; st->ld2 = NULL; st->soc = -1; st->tid = NULL; st->id = 0; st->alive = 1; st->lock = PR_NewLock(); st->retry = 0; srand(time(0)); return st; } void st_setThread(SearchThread *st, PRThread *tid, int id) { st->tid = tid; st->id = id; } int st_getThread(SearchThread *st, PRThread **tid) { if (tid) *tid = st->tid; return st->id; } static void st_enableTCPnodelay(SearchThread *st) { int val = 1; if (st->soc < 0) { if (ldap_get_option(st->ld, LDAP_OPT_DESC, (void *)&st->soc) != LDAP_SUCCESS) { fprintf(stderr, "T%d: failed on ldap_get_option\n", st->id); return; } } if (setsockopt(st->soc, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val))) fprintf(stderr, "T%d: failed in setsockopt 1\n", st->id); } /* abruptly disconnect an LDAP connection without unbinding */ static void st_disconnect(SearchThread *st) { if (st->soc < 0) { if (ldap_get_option(st->ld, LDAP_OPT_DESC, (void *)&st->soc) != LDAP_SUCCESS) { fprintf(stderr, "T%d: failed on ldap_get_option\n", st->id); return; } } #ifdef XP_WIN if (closesocket(st->soc)) fprintf(stderr, "T%d: failed to disconnect\n", st->id); #else if (close(st->soc)) fprintf(stderr, "T%d: failed to disconnect\n", st->id); #endif st->soc = -1; } static int st_bind_core(SearchThread *st, LDAP **ld, char *dn, char *uid) { int ret = 0; int retry = 0; while (1) { ret = ldap_simple_bind_s(*ld, dn, uid); if (LDAP_SUCCESS == ret) { break; } else if (LDAP_CONNECT_ERROR == ret && retry < 10) { retry++; } else { fprintf(stderr, "T%d: failed to bind, ldap_simple_bind_s" "(%s, %s) returned 0x%x (errno %d)\n", st->id, dn, uid, ret, errno); *ld = NULL; return 0; } } return 1; } static int st_bind(SearchThread *st) { if (!st->ld) { st->ld = ldap_init(hostname, port); if (!st->ld) { fprintf(stderr, "T%d: failed to init\n", st->id); return 0; } } if (!st->ld2) { /* aux LDAP handle */ st->ld2 = ldap_init(hostname, port); if (!st->ld2) { fprintf(stderr, "T%d: failed to init 2\n", st->id); return 0; } if (0 == st_bind_core(st, &(st->ld2), strlen(bindDN) ? bindDN : NULL, strlen(bindPW) ? bindPW : NULL)) { return 0; } } if (opType != op_delete && opType != op_modify && opType != op_idxmodify && sdattable && sdt_getlen(sdattable) > 0) { int e; char *dn, *uid; do { e = sdt_getrand(sdattable); } while (e < 0); dn = sdt_dn_get(sdattable, e); uid = sdt_uid_get(sdattable, e); if (useBFile) { /* in this test, assuming uid == password */ if (dn) { if (0 == st_bind_core(st, &(st->ld), dn, uid)) { return 0; } } else if (uid) { char filterBuffer[100]; char *pFilter; struct timeval timeout; int scope = LDAP_SCOPE_SUBTREE, attrsOnly = 0; LDAPMessage *result; int retry = 0; pFilter = filterBuffer; sprintf(filterBuffer, "(uid=%s)", uid); timeout.tv_sec = 3600; timeout.tv_usec = 0; while (1) { int ret = ldap_search_st(st->ld2, suffix, scope, pFilter, NULL, attrsOnly, &timeout, &result); if (LDAP_SUCCESS == ret) { break; } else if ((LDAP_CONNECT_ERROR == ret || (LDAP_TIMEOUT == ret)) && retry < 10) { retry++; } else { fprintf(stderr, "T%d: failed to search 1, error=0x%x\n", st->id, ret); return 0; } } dn = ldap_get_dn(st->ld2, result); if (0 == st_bind_core(st, &(st->ld), dn, uid)) { return 0; } } else { fprintf(stderr, "T%d: no data found, dn: %p, uid: %p\n", st->id, dn, uid); return 0; } } else { if (0 == st_bind_core(st, &(st->ld), dn, uid)) { return 0; } } } else { if (0 == st_bind_core(st, &(st->ld), strlen(bindDN) ? bindDN : NULL, strlen(bindPW) ? bindPW : NULL)) { return 0; } } if (st->soc < 0) { if (ldap_get_option(st->ld, LDAP_OPT_DESC, (void *)&st->soc) != LDAP_SUCCESS) { fprintf(stderr, "T%d: failed on ldap_get_option\n", st->id); return 0; } } if (setLinger) { int val; struct linger l; val = sizeof(struct linger); l.l_onoff = 1; l.l_linger = 0; if (setsockopt(st->soc, SOL_SOCKET, SO_LINGER, (char *)&l, val) < 0) { fprintf(stderr, "T%d: failed in setsockopt 2, errno %d (%d)\n", st->id, errno, st->soc); st->soc = -1; return 0; } } return 1; } static void st_unbind(SearchThread *st) { if (ldap_unbind(st->ld) != LDAP_SUCCESS) fprintf(stderr, "T%d: failed to unbind\n", st->id); st->ld = NULL; st->soc = -1; } static int st_search(SearchThread *st) { char filterBuffer[100]; char *pFilter; struct timeval timeout; int scope, attrsOnly = 0; LDAPMessage *result; int ret; scope = myScope; if (ntable || numeric) { char *s = NULL; char num[8]; if (! numeric) { do { s = nt_getrand(ntable); } while ((s) && (strlen(s) < 1)); } else { sprintf(num, "%d", get_large_random_number() % numeric); s = num; } sprintf(filterBuffer, filter, s); pFilter = filterBuffer; } else { pFilter = filter; } /* Try to get attributes from the attrNameTable */ if (!attrToReturn) attrToReturn = nt_get_all(attrTable); timeout.tv_sec = 30; timeout.tv_usec = 0; ret = ldap_search_st(st->ld, suffix, scope, pFilter, attrToReturn, attrsOnly, &timeout, &result); if (ret != LDAP_SUCCESS) { fprintf(stderr, "T%d: failed to search 2, error=0x%02X\n", st->id, ret); } ldap_msgfree(result); return ret; } static void st_make_random_tel_number(char *pstr) { static char *area_codes[] = {"303", "415", "408", "650", "216", "580", 0}; int idx = rand() % 6; sprintf(pstr, "+1 %s %03d %04d", area_codes[idx], rand() % 1000, rand() % 10000); } static int st_modify_nonidx(SearchThread *st) { LDAPMod *attrs[2]; LDAPMod attr_description; int e; int rval; char *dn = NULL; char description[256]; char *description_values[2]; /* Decide what entry to modify, for this we need a table */ if (NULL == sdattable || sdt_getlen(sdattable) == 0) { fprintf(stderr, "-m option requires a DN file. Use -B file.\n"); return 0; } /* Get the target dn */ do { e = sdt_getrand(sdattable); } while (e < 0); dn = sdt_dn_get(sdattable, e); sprintf(description, "%s modified at %lu", dn, time(NULL)); description_values[0] = description; description_values[1] = NULL; attrs[0] = &attr_description; attrs[1] = NULL; attr_description.mod_op = LDAP_MOD_REPLACE; attr_description.mod_type = "description"; attr_description.mod_values = description_values; rval = ldap_modify_s(st->ld, dn, attrs); if (rval != LDAP_SUCCESS) { fprintf(stderr, "T%d: Failed to modify error=0x%x\n", st->id, rval); fprintf(stderr, "dn: %s\n", dn); } return rval; } static int st_modify_idx(SearchThread *st) { LDAPMod *attrs[2]; LDAPMod attr_telephonenumber; int e; int rval; char *dn = NULL; char telno[32]; char *telephonenumber_values[2]; /* Decide what entry to modify, for this we need a table */ if (NULL == sdattable || sdt_getlen(sdattable) == 0) { fprintf(stderr, "-m option requires a DN file. Use -B file.\n"); return 0; } /* Get the target dn */ do { e = sdt_getrand(sdattable); } while (e < 0); dn = sdt_dn_get(sdattable, e); /* Make new mod values */ st_make_random_tel_number(telno); telephonenumber_values[0] = telno; telephonenumber_values[1] = NULL; attrs[0] = &attr_telephonenumber; attrs[1] = NULL; attr_telephonenumber.mod_op = LDAP_MOD_REPLACE; attr_telephonenumber.mod_type = "telephonenumber"; attr_telephonenumber.mod_values = telephonenumber_values; rval = ldap_modify_s(st->ld, dn, attrs); if (rval != LDAP_SUCCESS) { fprintf(stderr, "T%d: Failed to modify error=0x%x\n", st->id, rval); fprintf(stderr, "dn: %s\n", dn); } return rval; } static int st_compare(SearchThread *st) { int rval; int compare_true; int correct_answer; int e; char *dn = NULL; char *uid = NULL; char uid0[100]; /* Decide what entry to modify, for this we need a table */ if (NULL == sdattable || sdt_getlen(sdattable) == 0) { fprintf(stderr, "-c option requires a DN file. Use -B file.\n"); return 0; } /* Get the target dn */ do { e = sdt_getrand(sdattable); } while (e < 0); dn = sdt_dn_get(sdattable, e); uid = sdt_uid_get(sdattable, e); compare_true = ( (rand() % 5) < 2 ); if (!compare_true) { strcpy(uid0, uid); uid0[0] = '@'; /* make it not matched */ uid = uid0; } rval = ldap_compare_s(st->ld, dn, "uid", uid); correct_answer = compare_true ? LDAP_COMPARE_TRUE : LDAP_COMPARE_FALSE; if (rval == correct_answer) { rval = LDAP_SUCCESS; } else { fprintf(stderr, "T%d: Failed to compare error=0x%x (%d)\n", st->id, rval, correct_answer); fprintf(stderr, "dn: %s, uid: %s\n", dn, uid); } return rval; } static int st_delete(SearchThread *st) { char *dn = NULL; int rval; int e; /* Decide what entry to modify, for this we need a table */ if (NULL == sdattable || sdt_getlen(sdattable) == 0) { fprintf(stderr, "-d option requires a DN file. Use -B file.\n"); return 0; } /* Get the target dn */ do { e = sdt_getrand(sdattable); } while (e < 0); dn = sdt_dn_get(sdattable, e); rval = ldap_delete_s(st->ld, dn); if (rval != LDAP_SUCCESS) { if (rval == LDAP_NO_SUCH_OBJECT) { rval = LDAP_SUCCESS; } else { fprintf(stderr, "T%d: Failed to delete error=0x%x\n", st->id, rval); fprintf(stderr, "dn: %s\n", dn); } } return rval; } /* the main thread */ void search_start(void *v) { SearchThread *st = (SearchThread *)v; PRIntervalTime timer; int notBound = 1, res, searches = 0; PRUint32 span; st->alive = 1; st->ld = 0; while (1) { timer = PR_IntervalNow(); /* bind if we need to */ if (doBind || notBound) { res = st_bind(st); if (noDelay) st_enableTCPnodelay(st); if (!res) { st_unbind(st); continue; /* error */ } notBound = 0; } /* do the operation */ if (!noOp) { switch(opType) { case op_modify: res = st_modify_nonidx(st); break; case op_idxmodify: res = st_modify_idx(st); break; case op_search: res = st_search(st); break; case op_compare: res = st_compare(st); break; case op_delete: res = st_delete(st); break; default: fprintf(stderr, "Illegal operation type specified.\n"); return; } } if (LDAP_SUCCESS == res) { st->retry = 0; } else if (LDAP_CONNECT_ERROR == res && st->retry < 10) { st->retry++; } else { break; /* error */ } if (doBind) { if (noUnBind) st_disconnect(st); st_unbind(st); } else if (reconnect) { searches++; if (searches >= reconnect) { /* unceremoniously disconnect, reconnect next cycle */ st_disconnect(st); st_unbind(st); notBound = 1; searches = 0; } } span = PR_IntervalToMilliseconds(PR_IntervalNow()-timer); /* update data */ PR_Lock(st->lock); if (0 == st->retry) { /* only when succeeded */ st->searchCount++; if (st->mintime > span) st->mintime = span; if (st->maxtime < span) st->maxtime = span; } st->alive = 1; PR_Unlock(st->lock); } } /* fetches the current min/max times and the search count, and clears them */ void st_getCountMinMax(SearchThread *st, PRUint32 *count, PRUint32 *min, PRUint32 *max) { PR_Lock(st->lock); if (count) { *count = st->searchCount; st->searchCount = 0; } if (min) { *min = st->mintime; st->mintime = 10000; } if (max) { *max = st->maxtime; st->maxtime = 0; } st->alive--; PR_Unlock(st->lock); } int st_alive(SearchThread *st) { int alive; PR_Lock(st->lock); alive = st->alive; PR_Unlock(st->lock); return alive; } --- NEW FILE searchthread.h --- /** BEGIN COPYRIGHT BLOCK * Copyright 2001 Sun Microsystems, Inc. * Portions copyright 1999, 2001 Netscape Communications Corporation. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifndef _SEARCHTHREAD_H #define _SEARCHTHREAD_H typedef struct _searchthread SearchThread; SearchThread *st_new(void); void st_setThread(SearchThread *st, PRThread *tid, int id); int st_getThread(SearchThread *st, PRThread **tid); void search_start(void *v); void st_getCountMinMax(SearchThread *st, PRUint32 *count, PRUint32 *min, PRUint32 *max); int st_alive(SearchThread *st); #endif From fedora-directory-commits at redhat.com Fri Jan 6 00:53:37 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 5 Jan 2006 19:53:37 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/rsearch/scripts dbgen-FamilyNames, NONE, 1.1 dbgen-GivenNames, NONE, 1.1 dbgen-OrgUnits, NONE, 1.1 dbgen.pl, NONE, 1.1 Message-ID: <200601060053.k060rb3E012162@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12072/rsearch/scripts Added Files: dbgen-FamilyNames dbgen-GivenNames dbgen-OrgUnits dbgen.pl Log Message: [170348] RSEARCH needs to be updated Integrating rsearch and infadd source codes from DSRK into the Directory Server build tree. --- NEW FILE dbgen-FamilyNames --- Amar Atp Atpco Atrc Aalders Aasen Abadines Abazari Abbatantuono Abbate Abbie Abbott Abdalla Abdo Abdollahi Abdou Abdul-Nour Abdulla Abdullah Abe Abedi Abel Abell Abella Abello Abelow Abernathy Abernethy Abi-Aad Abou-Arrage Abou-Ezze Aboul-Magd Aboussouan Abovyan Abraham Abrahim Abrams Absi Acelvari Acharyya Achcar Achille Achkar Ackaouy Acker Acklin Ackwood Acree Acres Acs Actionteam Acton Aczel Adair Adam Adamczyk Adamkowski Adamo Adamowicz Adams Adamski Adamson Adamyk Adcock Adcox Addetia Addison Addona Adeney Aderhold Adey Adhem Adimari Adjangba Adkinson Adler Admin Admin-mtv Administration Administrator Adolfie Adolph Adornato Adorno Adriaansen Aery Afkham Afkham-ebrahimi Agarwal Aggarwal Aghi Aghili Agily Agnew Agnihotri Agostino Aguiar Aguilar Aguinsky Aguirre Ahad Ahdieh Ahlberg Ahlers Ahluwalia Ahmad Ahmadi Ahmed Aidarous Aiken Aimone Ainsworth Aitken Ajersch Akai Akbas Akens Akers Akhavan Akhtar Akita Akkermans Akrawi Aksel Akyurekli Al Al Bud Al-Basi Al-Tarabichi Aladangady Alanis Alanoly Alary Alavi Albea Albers Alberse Albert Alberts Alberty Albery Albrecht Albright Albritton Albtentac Alburger Alcock Alcott Alderdice Aldhizer Aldridge Alegre Aleksic Aleong Alexan Alexander Alexson Alfaro Alford Alfred Algie Algood Alguire Ali Alidina Alie Alikhan Alink Alkire Allahdin Allahyari Allam Allaman Allan Allard Allaway Allaye-Chan Allen Alles Alleva Alleyne Allgood Allison Allman Allwork Almeddahim Almon Alms Aloi Alomari Alperovich Alred Alsaleh Alshabout Alsop Alspaugh Alston Alswiti Altadonna [...13020 lines suppressed...] Yokeley Yong Yonk York Yorke Yoshikawa Yoshioka Yoshiyama Yost Youel Younan Younes Youngblood Younger Younglove Youngman Youngs Younkin Yount Yousefpour Yousuf Yowell Yu Yuan Yudin Yue Yuen Yuengling Yuhanna Yuhn Yuill Yum Yumurtaci Yun Yundt Yung Yurach Yurchuk Yuste Yvon Yzerman Zabek Zabokrzycki Zabransky Zaccari Zacharias Zack Zadeh Zadorozny Zadow Zafarano Zafarullah Zagorsek Zagorski Zagrodney Zaharychuk Zahn Zaia Zaid Zaidi Zajac Zakarow Zalameda Zaleski Zalite Zalokar Zaloker Zalzale Zaman Zampino Zander Zanet Zanetti Zanga Zani Zantiris Zapach Zarate Zaretsky Zargham Zarkel Zarlenga Zatkovic Zattiero Zatylny Zauhar Zauner Zavadiuk Zawadka Zaydan Zazulak Zbib Zbuda Zee Zeggil Zegray Zeidler Zeiger Zeigler Zeimet Zeisler Zeitler Zelenka Zeller Zelsmann Zemanek Zen Zenar Zeng Zenisek Zenkevicius Zenkner Zerriffi Zetterlund-Clark Zetts Zhang Zhao Zhelka Zhong Zhou Ziai Ziebarth Zieber Ziegler Ziehn Zielinski Ziemba Zigrand Zilaie Zimmer Zimmerer Zimmerly Zimmerman Zimmermann Zingale Zingeler Zinkie Zinn Zirko Zisu Zitko Zito Zitzmann Zivilik Zivkovic Zlatin Znack Zoehner Zoellner Zoerb Zollman Zolmer Zonner Zonoun Zoppel Zoratti Zork Zorony Zorzi Zottola Zou Zrobok Zubans Zubricki Zuccarelli Zug Zuk Zukas Zukosky Zukovsky Zumhagen Zumpf Zunuzi Zurawlev Zureik Zurl Zvonar Zwick Zwicker Zwierzchowski Zybala Zylstra Zywiel cprs de Belen de Buda de CHABERT de Elizalde de Grace de Hoog de Salis de Wilton de Witte deMontluzin deRosenroll deVette fpsched livinston van Leeuwen von Ende --- NEW FILE dbgen-GivenNames --- Aaccf Aaren Aarika Aaron Aartjan Abagael Abagail Abahri Abbas Abbe Abbey Abbi Abbie Abby Abbye Abdalla Abdallah Abdul Abdullah Abe Abel Abigael Abigail Abigale Abra Abraham Abu Access Accounting Achal Achamma Action Ada Adah Adaline Adam Adan Adara Adda Addi Addia Addie Addons Addy Adel Adela Adelaida Adelaide Adele Adelheid Adelia Adelice Adelina Adelind Adeline Adella Adelle Adena Adeniyi Adey Adi Adiana Adie Adina Aditya Admin Adnan Adora Adore Adoree Adorne Adrea Adri Adria Adriaens Adrian Adriana Adriane Adrianna Adrianne Adrie Adrien Adriena Adrienne Advance Aeriel Aeriela Aeriell Afif Afke Afton Afzal Ag Agace Agata Agatha Agathe Agenia Aggi Aggie Aggy Agna Agnella Agnes Agnese Agnesse Agneta Agnola Agretha Ahmad Ahmed Ahmet Aida Aidan Aideen Aiden Aigneis Aila Aile Ailee Aileen Ailene Ailey Aili Ailina Ailis Ailsun Ailyn Aime Aimee Aimil Aindrea Ainslee Ainsley Ainslie Air Ajay Ajit Ajmal Ajoy Akemi Akihiko Akin Akio Akira Akram Akshay Al Aladin Alain Alaine Alameda Alan Alana Alanah Alane Alanna Alasdair Alastair Alayne Alb Albert Alberta Albertina Albertine Albina Albrecht Aldo Alec Alecia Aleda Aleece Aleen Alejandra Alejandrina Alena Alene Alese Alessandra Aleta Alethea Alev Alex Alexa Alexander Alexandra Alexandrina Alexandru Alexi Alexia Alexina Alexine Alexis Alf Alfi Alfie Alfons Alfonso Alfonzo [...8207 lines suppressed...] Wojciech Wolfgang Wonda Wong Woodline Woodson Woody Woon Wray Wren Wrennie Wylma Wylo Wynn Wynne Wynnie Wynny Xantippe Xavier Xaviera Xena Xenia Xi-Nam Xiao-Ming Xiaofeng Xiaojing Xiaomei Xu Xuan-Lien Xuong Xylia Xylina Yalcin Yalonda Yan-Zhen Yannick Yannis Yao Yarlanda Yasar Yaser Yasmeen Yasmin Yate Yatish Yau-Fun Yavar Yavuz Yawar Yc Yee-Ning Yehuda Yeirnie Yelena Yen Yetta Yettie Yetty Yeung Yevette Yih Yihban YikHon Ying Ylaine Ynes Ynez Yoda Yodha Yogesh Yogi Yokan Yoke Yoke-Kee Yoko Yolanda Yolande Yolane Yolanthe Yong Yongli Yonik Yoram Yoshi Yoshiaki Yoshiko Yoshimitsu Yosuf Youji Young-June Yousef Youssef Youwen Yovonnda Ysabel Yu Yu-Chung Yu-Hung Yu-Kai Yuan Yudy Yue-Min Yueh Yueli Yuen Yuen-Pui Yueping Yuji Yuk-Wha Yukihiko Yukinaga Yukinobu Yuko Yuksel Yukuo Yumi Yung Yuri Yussuf Yutaka Yvan Yves Yvet Yvette Yvon Yvonne Zabrina Zack Zafar Zafer Zahara Zahid Zahir Zahirul Zahra Zaihua Zainab Zalee Zan Zandra Zaneta Zanni Zara Zarah Zarella Zaria Zarla Zarrin Zaven Zbignew Zbigniew Zdenek Zdenka Zdenko Zea Zeb Zehir-Charlie Zehra Zein Zeina Zelda Zeljko Zelma Zena Zenia Zere Zero Zhanna Zhengyu Zia Ziad Zilvia Zino Zita Zitella Zoe Zoel Zoenka Zofia Zohar Zola Zoltan Zonda Zondra Zongyi Zonnya Zora Zorah Zorana Zorina Zorine Zouheir Zsa zsa Zsazsa Zuben Zulema Zulfikar Zuzana Zyg Zygmunt --- NEW FILE dbgen-OrgUnits --- Accounting Product Development Product Testing Human Resources Payroll --- NEW FILE dbgen.pl --- #!/usr/bin/perl #------------------------------------------------------------------------ ## Copyright 1997 - Netscape Communications Corporation ## ## NAME ## dbgen ## ## DESCRIPTION ## Random LDIF database creator, specially modified from DirectoryMark ## Original weibe done by David Boreham in C++. ## ## Fixed random seed generator for uniqueness ## Updated function MakeRandomName: ## Changed default RDN type to UID and ## added -c option to enable CN type naming ## Added personal_title and generationQualifier data ## Added function to create randon SSN's if needed ## Updated generation output to show total entries created regardless of -v option ## Changed userPassword to be the same as UID. ## Now, dc style namingcontext can be used. #------------------------------------------------------------------------ sub PrintUsage { print STDERR "Usage: $0 [options] -o output_file -n number\n", "\t Where options are:\n", "\t -s suffix, default is 'dc=example,dc=com'\n", "\t -c for CN naming style RDN's : default is UID\n", "\t -O for organizationalPersons, default is inetOrgPerson\n", "\t -p for piranha style aci's, default is barracuda\n", "\t -r seed---seed number for random number generator\n", "\t -g print extra entries for orgchart\n", "\t -x suppress printing pre amble\n", "\t -y suppress printing organizational units\n", "\t -v verbose\n", "\t -q quiet\n", "\n"; exit; } &PrintUsage if ($#ARGV == -1); @EmployeeTypes = ("Manager", "Normal", "Peon"); @personal_title = ("Mr", "Mrs", "Miss", "Senior", "Junior", "III", "Cool"); @generationQ = ("I", "II", "III", "IV", "V", "VI", "VII"); @title_ranks = ("Senior", "Master", "Associate", "Junior", "Chief", "Supreme", "Elite"); @positions =("Accountant", "Admin", "Architect", "Assistant", "Artist", "Consultant", "Czar", "Dictator", "Director", "Diva", "Dreamer", "Evangelist", "Engineer", "Figurehead", "Fellow", "Grunt", "Guru", "Janitor", "Madonna", "Manager", "Pinhead", "President", "Punk", "Sales Rep", "Stooge", "Visionary", "Vice President", "Writer", "Warrior", "Yahoo"); @localities = ("Mountain View", "Redmond", "Redwood Shores", "Armonk", "Cambridge", "Santa Clara", "Sunnyvale", "Alameda", "Cupertino", "Menlo Park", "Palo Alto", "Orem", "San Jose", "San Francisco", "Milpitas", "Hartford", "Windsor", "Boston", "New York", "Detroit", "Dallas", "Denver"); @area_codes = ("303", "415", "408", "510", "804", "818", "213", "206", "714"); my $mycert = "usercertificate;binary:: MIIBvjCCASegAwIBAgIBAjANBgkqhkiG9w0BAQQFADAnMQ8wDQYD\n VQQDEwZjb25maWcxFDASBgNVBAMTC01NUiBDQSBDZXJ0MB4XDTAxMDQwNTE1NTEwNloXDTExMDcw\n NTE1NTEwNlowIzELMAkGA1UEChMCZnIxFDASBgNVBAMTC01NUiBTMSBDZXJ0MIGfMA0GCSqGSIb3\n DQEBAQUAA4GNADCBiQKBgQDNlmsKEaPD+o3mAUwmW4E40MPs7aiui1YhorST3KzVngMqe5PbObUH\n MeJN7CLbq9SjXvdB3y2AoVl/s5UkgGz8krmJ8ELfUCU95AQls321RwBdLRjioiQ3MGJiFjxwYRIV\n j1CUTuX1y8dC7BWvZ1/EB0yv0QDtp2oVMUeoK9/9sQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBADev\n hxY6QyDMK3Mnr7vLGe/HWEZCObF+qEo2zWScGH0Q+dAmhkCCkNeHJoqGN4NWjTdnBcGaAr5Y85k1\n o/vOAMBsZePbYx4SrywL0b/OkOmQX+mQwieC2IQzvaBRyaNMh309vrF4w5kExReKfjR/gXpHiWQz\n GSxC5LeQG4k3IP34\n"; %ceo = ( "uid" => "ceo", "givenname" => "John", "sn" => "Budd", "title" => "CEO", "cn" => "", "dn" => "" ); %ep0 = ( "uid" => "exec_president0", "givenname" => "Paul", "sn" => "Grant", "title" => "Exective President", "cn" => "", "dn" => "" ); %ep1 = ( "uid" => "exec_president1", "givenname" => "Jill", "sn" => "Peterson", "title" => "Exective President", "cn" => "", "dn" => "" ); @exective_presidents = (\%ep0, \%ep1); %p0 = ( "uid" => "president0", "givenname" => "Pete", "sn" => "Dunne", "title" => "President", "cn" => "", "dn" => "" ); %p1 = ( "uid" => "president1", "givenname" => "Jannet", "sn" => "Keys", "title" => "President", "cn" => "", "dn" => "" ); %p2 = ( "uid" => "president2", "givenname" => "Kathy", "sn" => "Yang", "title" => "President", "cn" => "", "dn" => "" ); %p3 = ( "uid" => "president3", "givenname" => "Anne", "sn" => "Meissner", "title" => "President", "cn" => "", "dn" => "" ); @presidents = (\%p0, \%p1, \%p2, \%p3); %vp0 = ( "uid" => "vice_president0", "givenname" => "Jack", "sn" => "Cho", "title" => "Vice President", "cn" => "", "dn" => "" ); %vp1 = ( "uid" => "vice_president1", "givenname" => "Diane", "sn" => "Smith", "title" => "Vice President", "cn" => "", "dn" => "" ); %vp2 = ( "uid" => "vice_president2", "givenname" => "Alex", "sn" => "Merrells", "title" => "Vice President", "cn" => "", "dn" => "" ); %vp3 = ( "uid" => "vice_president3", "givenname" => "Yumi", "sn" => "Mehta", "title" => "Vice President", "cn" => "", "dn" => "" ); %vp4 = ( "uid" => "vice_president4", "givenname" => "Michael", "sn" => "Natkovich", "title" => "Vice President", "cn" => "", "dn" => "" ); %vp5 = ( "uid" => "vice_president5", "givenname" => "Keith", "sn" => "Lucus", "title" => "Vice President", "cn" => "", "dn" => "" ); @vice_presidents = (\%vp0, \%vp1, \%vp2, \%vp3, \%vp4, \%vp5); %d0 = ( "uid" => "director0", "givenname" => "Chris", "sn" => "Harrison", "title" => "Director", "cn" => "", "dn" => "" ), %d1 = ( "uid" => "director1", "givenname" => "Jane", "sn" => "Baker", "title" => "Director", "cn" => "", "dn" => "" ); %d2 = ( "uid" => "director2", "givenname" => "Ed", "sn" => "Becket", "title" => "Director", "cn" => "", "dn" => "" ); %d3 = ( "uid" => "director3", "givenname" => "Will", "sn" => "Stevenson", "title" => "Director", "cn" => "", "dn" => "" ); %d4 = ( "uid" => "director4", "givenname" => "Kieran", "sn" => "Beckham", "title" => "Director", "cn" => "", "dn" => "" ); %d5 = ( "uid" => "director5", "givenname" => "Greg", "sn" => "Emerson", "title" => "Director", "cn" => "", "dn" => "" ); %d6 = ( "uid" => "director6", "givenname" => "Ian", "sn" => "Parker", "title" => "Director", "cn" => "", "dn" => "" ); %d7 = ( "uid" => "director7", "givenname" => "Liem", "sn" => "Olson", "title" => "Director", "cn" => "", "dn" => "" ); %d8 = ( "uid" => "director8", "givenname" => "George", "sn" => "Cruise", "title" => "Director", "cn" => "", "dn" => "" ); %d9 = ( "uid" => "director9", "givenname" => "Yoshiko", "sn" => "Tucker", "title" => "Director", "cn" => "", "dn" => "" ); @directors = (\%d0, \%d1, \%d2, \%d3, \%d4, \%d5, \%d6, \%d7, \%d8, \%d9); %m0 = ( "uid" => "manager0", "givenname" => "Teresa", "sn" => "Chan", "title" => "Manager", "cn" => "", "dn" => "" ); %m1 = ( "uid" => "manager1", "givenname" => "Tom", "sn" => "Anderson", "title" => "Manager", "cn" => "", "dn" => "" ); %m2 = ( "uid" => "manager2", "givenname" => "Olga", "sn" => "Young", "title" => "Manager", "cn" => "", "dn" => "" ); %m3 = ( "uid" => "manager3", "givenname" => "Bill", "sn" => "Graham", "title" => "Manager", "cn" => "", "dn" => "" ); %m4 = ( "uid" => "manager4", "givenname" => "Todd", "sn" => "Hoover", "title" => "Manager", "cn" => "", "dn" => "" ); %m5 = ( "uid" => "manager5", "givenname" => "Ken", "sn" => "Hamilton", "title" => "Manager", "cn" => "", "dn" => "" ); %m6 = ( "uid" => "manager6", "givenname" => "Christine", "sn" => "Jobs", "title" => "Manager", "cn" => "", "dn" => "" ); %m7 = ( "uid" => "manager7", "givenname" => "Joanna", "sn" => "Lake", "title" => "Manager", "cn" => "", "dn" => "" ); %m8 = ( "uid" => "manager8", "givenname" => "Kim", "sn" => "Remley", "title" => "Manager", "cn" => "", "dn" => "" ); %m9 = ( "uid" => "manager9", "givenname" => "Nick", "sn" => "Pennebaker", "title" => "Manager", "cn" => "", "dn" => "" ); %m10 = ( "uid" => "manager10", "givenname" => "Ted", "sn" => "Hardy", "title" => "Manager", "cn" => "", "dn" => "" ); %m11 = ( "uid" => "manager11", "givenname" => "Tanya", "sn" => "Nielsen", "title" => "Manager", "cn" => "", "dn" => "" ); %m12 = ( "uid" => "manager12", "givenname" => "Sam", "sn" => "Madams", "title" => "Manager", "cn" => "", "dn" => "" ); %m13 = ( "uid" => "manager13", "givenname" => "Judy", "sn" => "Stewart", "title" => "Manager", "cn" => "", "dn" => "" ); %m14 = ( "uid" => "manager14", "givenname" => "Martha", "sn" => "Kidman", "title" => "Manager", "cn" => "", "dn" => "" ); %m15 = ( "uid" => "manager15", "givenname" => "Leo", "sn" => "Knuth", "title" => "Manager", "cn" => "", "dn" => "" ); %m16 = ( "uid" => "manager16", "givenname" => "Cecil", "sn" => "Guibas", "title" => "Manager", "cn" => "", "dn" => "" ); %m17 = ( "uid" => "manager17", "givenname" => "Jay", "sn" => "Hows", "title" => "Manager", "cn" => "", "dn" => "" ); @managers = (\%m0, \%m1, \%m2, \%m3, \%m4, \%m5, \%m6, \%m7, \%m8, \%m9, \%m10, \%m11, \%m12, \%m13, \%m14, \%m15, \%m16, \%m17); require "flush.pl"; require "getopts.pl"; &Getopts('n:o:s:r:cOvpqgxy'); $Number_To_Generate = $opt_n; $Verbose = $opt_v; $Quiet = $opt_q; $Output_File_Name = $opt_o; $Random_Seed = $opt_r || 0xdbdbdbdb; $TargetServer = $opt_t; $debug = $opt_d; $Suffix = $opt_s || 'dc=example,dc=com'; $NamingType = "cn" if ($opt_c); $NamingType = "uid" if (!$opt_c); $inetOrgPerson = "objectClass: inetOrgPerson\n" if (!$opt_O); $PrintOrgChartDat = $opt_g; $printpreamble = 1; if ("" != $opt_x) { $printpreamble = 0; } $printorgunit = 1; if ("" != $opt_y) { $printorgunit = 0; } if ($Suffix =~ /o=/) { ($Organization) = $Suffix =~ /o=([^,]+)/; $objectvalue = "organization"; $line = "o: $Organization"; if ($Organization =~ /\s+/) { ($Organization) = $Organization =~ /([^\s]+)/; $Organization .= ".com"; } elsif ($Organization !~ /\.com|\.net|\.org/) { $Organization .= ".com"; } } elsif ($Suffix =~ /dc=/) { $Organization = $Suffix; $Organization =~ s/,\s*dc=/./g; ($domain) = $Organization =~ /dc=([^\.]+)/; $Organization =~ s/dc=//; $objectvalue = "domain"; $line = "dc: $domain"; } # Print help message if user doesn't know how many entries to make # or no output file specified if ( (!$Number_To_Generate) || (!$Output_File_Name)) { &PrintUsage; } srand($Random_Seed); print "Loading Name Data...\n" if $Verbose; $DATADIR = "../data"; $GivenNamesFile = "$DATADIR/dbgen-GivenNames"; $FamilyNamesFile = "$DATADIR/dbgen-FamilyNames"; $OrgUnitsFile = "$DATADIR/dbgen-OrgUnits"; &ReadGivenNames; &ReadFamilyNames; &ReadOrgUnits; print "Done\n" if $Verbose; if ($printpreamble) { if ($piranha) { &PrintPreAmblePiranha($Output_File_Name); } else { &PrintPreAmbleBarracuda($Output_File_Name); } } open (OUTPUT_FILE, ">>$Output_File_Name") || die "Error---Can't open output file $Output_File_Name\n"; if ($printorgunit) { &PrintOrganizationalUnits; } if ($PrintOrgChartDat) { # CEO &PrintManagers(\%ceo, "", $ceo{"dn"}); for (my $j = 0; $j < @exective_presidents; $j++) { &PrintManagers($exective_presidents[$j], &MakeRandomOrgUnit, $ceo{"dn"}); } # Presidents for (my $j = 0; $j < @presidents; $j++) { my $who = int rand @exective_presidents; &PrintManagers($presidents[$j], &MakeRandomOrgUnit, $exective_presidents[$who]{"dn"}); } # Vice Presidents for (my $j = 0; $j < @vice_presidents; $j++) { my $who = int rand @presidents; &PrintManagers($vice_presidents[$j], &MakeRandomOrgUnit, $presidents[$who]{"dn"}); } # Directors for (my $j = 0; $j < @directors; $j++) { my $who = int rand @vice_presidents; &PrintManagers($directors[$j], &MakeRandomOrgUnit, $vice_presidents[$who]{"dn"}); } # Managers for (my $j = 0; $j < @managers; $j++) { my $who = int rand @directors; &PrintManagers($managers[$j], &MakeRandomOrgUnit, $directors[$who]{"dn"}); } } print "Generating $Number_To_Generate entries, please wait\n"; print "Progress: "; # We don't want people with duplicate names, so for each name generated, # add it to "TheMap", which is an associative array with the # name as the key. If there's a duplicate, throw the name out and # try again. $dups = 0; # Generate Number_To_Generate distinct entries. If a duplicate # is created, toss it out and try again. # CHANGED: updated to allow for uid naming style or cn style. Check the RDN for uniqueness for ($x= 0; $x < $Number_To_Generate; $x++) { ($givenName, $sn, $cn, $uid, $rdn,) = &MakeRandomName; if (&AddAndCheck($rdn)) { print "Duplicate: $rdn...\n" if $debug; &flush(STDOUT); $dups++; $x--; next; } $OrgUnit = &MakeRandomOrgUnit; $facsimileTelephoneNumber = &MakeRandomTelephone; $postalAddress = &MakeRandomPostalAddress ( int rand 1000, int rand 1000, $OrgUnit); $postOfficeBox = int rand 10000; $telephoneNumber = &MakeRandomTelephone; $title = &MakeRandomTitle($OrgUnit); # $userPassword = reverse ($cn); # $userPassword =~ s/\s//g; # $userPassword = substr($userPassword, 0, 10); $locality = &MakeRandomLocality; # $desc = "[0] This is $cn" . "'s description."; $fourdigit = int rand 10000; $desc = "2;$fourdigit;CN=Red Hat CS 71GA Demo,O=Red Hat CS 71GA Demo,C=US;CN=RHCS Agent - admin01,UID=admin01,O=redhat,C=US"; my $z = 1; # for (; $z < 1024; $z++) for (; $z < 2; $z++) { $desc = $desc . " [$z] This is $cn" . "'s description."; } $description = $desc; $mail = &MakeMailAddress($givenName, $sn, $Organization); if ($inetOrgPerson) { $carLicense = "carLicense: " . &MakeRandomCarLicense . "\n"; $departmentNumber = "departmentNumber: " . (int rand 10000) . "\n"; $employeeType = "employeeType: " . &MakeRandomEmployeeType . "\n"; $homePhone = "homePhone: " . &MakeRandomTelephone . "\n"; $initials = "initials: " . &MakeInitials ($givenName, $sn) . "\n"; $mobile = "mobile: " . &MakeRandomTelephone . "\n"; $pager = "pager: " . &MakeRandomTelephone . "\n"; if ($PrintOrgChartDat) { $managerCn = $managers[int rand @managers]{"dn"}; } else { $managerCn = $managers[int rand @managers]{"givenname"} . " " . $managers[int rand @managers]{"sn"}; } ($junk, $junk, $secretary_cn) = &MakeRandomName; $manager = "manager: $managerCn " . "\n"; $secretary = "secretary: $secretary_cn" . "\n"; $roomNumber = "roomNumber: " . (int rand 10000) . "\n"; $userPassword = "$uid\n"; } if ($PrintOrgChartDat) { $dnstr = "dn: $NamingType=$rdn, ou=People, $Suffix\n", } else { $dnstr = "dn: $NamingType=$rdn, ou=$OrgUnit, $Suffix\n"; } print OUTPUT_FILE $dnstr, "objectClass: top\n", "objectClass: person\n", "objectClass: organizationalPerson\n", $inetOrgPerson, "cn: $cn\n", "sn: $sn\n", "uid: $uid\n", "givenName: $givenName\n", "description: $description\n", "userPassword: $userPassword", $departmentNumber, $employeeType, $homePhone, $initials, "telephoneNumber: $telephoneNumber\n", "facsimileTelephoneNumber: $facsimileTelephoneNumber\n", $mobile, $pager, $manager, $secretary, $roomNumber, $carLicense, "l: $locality\n", "ou: $OrgUnit\n", "mail: $mail\n", "postalAddress: $postalAddress\n", "title: $title\n", $mycert, "\n"; if (!$Quiet) { if ($x % 1000 == 0) { print "."; &flush(STDOUT); } } } print "\n"; print "Generated $x entries\n"; if ($Verbose) { print "$dups duplicates skipped\n"; } exit 0; sub ReadOrgUnits { open (ORG_UNITS, $OrgUnitsFile) || die "Bad news, failed to open Org Units, $OrgUnitsFile: $!\n"; while() { chop; push (@OrganizationalUnits, $_); } close ORG_UNITS; } sub ReadGivenNames { open (GIVEN_NAMES, $GivenNamesFile) || die "Bad News, failed to load given names. $GivenNamesFile\n"; $i = 0; while () { chop; $given_names[$i++] = $_; } close GIVEN_NAMES; } sub ReadFamilyNames { open (FAMILY_NAMES, $FamilyNamesFile) || die "Bad News, failed to load Family Names. $FamilyNamesFile\n"; $i = 0; while () { chop; $family_names[$i++] = $_; } close FAMILY_NAMES; } sub PrintPreAmblePiranha { local($output_file) = @_; open (OUTPUT_FILE, ">$output_file") || die "Can't open $output_file for writing $!\n"; print OUTPUT_FILE<$output_file") || die "Can't open $output_file for writing $!\n"; print OUTPUT_FILE<$output_file") || die "Can't open $output_file for writing $!\n"; print OUTPUT_FILE< 9) ? $rand_char_index + 55 : $rand_char_index + 48; $license .= pack ("c", $ascii_value); } return $license; } # All entries are added to TheMap which checks to see # if the name is already there sub AddAndCheck { local($RDN) = @_; # now isn't this better than STL? if ($TheMap{$RDN}) { return 1; } else { $TheMap{$RDN} = 1; return 0; } } sub MakeMailAddress { local($given_name, $sur_name, $Organization) = @_; return "$given_name". "_$sur_name\@$Organization"; } sub MakeRandomPostalAddress { local ($org, $departmentNumber,$roomNumber, $OrgUnit) = @_; return "$org, $OrgUnit Dept \#$departmentNumber, Room\#$roomNumber"; } sub MakeInitials { local ($givenName, $sn) = @_; local ($first, $last); ($first) = $givenName =~ /^(\w).*/; ($last) = $sn =~ /^(\w).*/; return "$first" . ". " . "$last" . "."; } From fedora-directory-commits at redhat.com Fri Jan 6 00:53:26 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 5 Jan 2006 19:53:26 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools Makefile, 1.8, 1.9 Message-ID: <200601060053.k060rurb012167@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12072 Modified Files: Makefile Log Message: [170348] RSEARCH needs to be updated Integrating rsearch and infadd source codes from DSRK into the Directory Server build tree. Index: Makefile =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Makefile 19 Apr 2005 22:07:42 -0000 1.8 +++ Makefile 6 Jan 2006 00:53:18 -0000 1.9 @@ -85,6 +85,7 @@ endif endif +CFLAGS += $(ARCH_CFLAGS) INCLUDES += -I$(SLAPDHDIR) -I$(LDAP_ADMINCDIR) INCLUDES += -I$(ACLINC) @@ -170,8 +171,8 @@ BINS= $(LDIF) $(PWDHASH) $(KEYUPG) $(MMLDIF) $(MIGRATECRED) $(DBSCAN) EXTRABINS= $(EGGENCODE) -all: $(OBJDEST) $(BINDIR) $(LDAP_ADMIN_BIN_RELDIR) $(BINS) - +all: $(OBJDEST) $(BINDIR) $(LDAP_ADMIN_BIN_RELDIR) $(BINS) buildRsearch + extras: $(OBJDEST) $(BINDIR) $(EGGENCODE) $(LDIF): $(OBJDEST)/ldif.o $(LDAP_LIBLDIF_DEP) @@ -198,7 +199,11 @@ $(OBJDEST): $(MKDIR) $(OBJDEST) +buildRsearch: + cd rsearch; $(MAKE) + clean: -$(RM) $(ALL_OBJS) -$(RM) $(BINS) $(EXTRABINS) + cd rsearch; $(MAKE) clean From fedora-directory-commits at redhat.com Fri Jan 6 21:50:01 2006 From: fedora-directory-commits at redhat.com (Pete Rowley (prowley)) Date: Fri, 6 Jan 2006 16:50:01 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/collation collate.c, 1.6, 1.7 Message-ID: <200601062150.k06Lo1mi025869@cvs-int.fedora.redhat.com> Author: prowley Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/collation In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25844 Modified Files: collate.c Log Message: 173375: Problems with schema matching rules Index: collate.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/collation/collate.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- collate.c 19 Apr 2005 22:07:29 -0000 1.6 +++ collate.c 6 Jan 2006 21:49:53 -0000 1.7 @@ -132,19 +132,34 @@ strcpy(nameOrder,"caseExactOrderingMatch"); strcpy(nameSubstring,"caseExactSubstringMatch"); } - + + /* PAR: this looks broken + the "extra" text based oids that are actually used + to form the name and description are always derived + from the language and country fields so there should + be no need to have two separate code paths to + set the name and description fields of the schema + as language is always available, and if country is + not, it is not in the name anyway. + + Is it safe to assume all matching rules will follow + this convention? The answer, or lack of it, probably + explains the reasoning for doing things the way they + are currently. + */ + if(cargc > 7) { - strcpy(nameOrder,"-"); + PL_strcatn(nameOrder,sizeof(nameOrder),"-"); PL_strcatn(nameOrder,sizeof(nameOrder),cargv[7]); - strcpy(nameSubstring,"-"); + PL_strcatn(nameSubstring,sizeof(nameSubstring),"-"); PL_strcatn(nameSubstring,sizeof(nameSubstring),cargv[7]); slapi_matchingrule_set(mrentry,SLAPI_MATCHINGRULE_NAME, (void *)slapi_ch_strdup(nameOrder)); } - else { + else { if(0 != cargv[1][0]) { - strcpy(nameOrder,"-"); - strcpy(nameSubstring,"-"); + PL_strcatn(nameOrder,sizeof(nameOrder),"-"); + PL_strcatn(nameSubstring,sizeof(nameSubstring),"-"); } else { nameOrder[0] = 0; nameSubstring[0] = 0; From fedora-directory-commits at redhat.com Tue Jan 10 19:30:20 2006 From: fedora-directory-commits at redhat.com (Pete Rowley (prowley)) Date: Tue, 10 Jan 2006 14:30:20 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd control.c, 1.4, 1.5 Message-ID: <200601101930.k0AJUKpu027600@cvs-int.fedora.redhat.com> Author: prowley Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27583 Modified Files: control.c Log Message: 177444: duplicate password policy oids in root DSE Index: control.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/control.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- control.c 19 Apr 2005 22:07:36 -0000 1.4 +++ control.c 10 Jan 2006 19:30:12 -0000 1.5 @@ -95,10 +95,16 @@ SLAPI_OPERATION_SEARCH | SLAPI_OPERATION_COMPARE | SLAPI_OPERATION_ADD | SLAPI_OPERATION_DELETE | SLAPI_OPERATION_MODIFY | SLAPI_OPERATION_MODDN ); +/* + We do not register the password policy response because it has + the same oid as the request (and it was being reported twice in + in the root DSE supportedControls attribute) + slapi_register_supported_control( LDAP_X_CONTROL_PWPOLICY_RESPONSE, SLAPI_OPERATION_SEARCH | SLAPI_OPERATION_COMPARE | SLAPI_OPERATION_ADD | SLAPI_OPERATION_DELETE | SLAPI_OPERATION_MODIFY | SLAPI_OPERATION_MODDN ); +*/ slapi_register_supported_control( LDAP_CONTROL_GET_EFFECTIVE_RIGHTS, SLAPI_OPERATION_SEARCH ); } From fedora-directory-commits at redhat.com Tue Jan 10 23:53:16 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 18:53:16 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm dblayer.c, 1.8, 1.9 Message-ID: <200601102353.k0ANrGbJ004249@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4197/back-ldbm Modified Files: dblayer.c Log Message: [174776] Multiple restores from a non-existant directory could wipe out database If the specified backup dir does not exist, does not contain necessary files (including the directory is not accessible), is not a directory, or is identical to the path to the db dir, issues an error and stops restoring before wiping out the database. Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- dblayer.c 25 Apr 2005 16:24:23 -0000 1.8 +++ dblayer.c 10 Jan 2006 23:53:08 -0000 1.9 @@ -799,16 +799,12 @@ #if defined ( hpux ) { struct pst_static pst; - struct pst_dynamic pst_dyn; int rval = pstat_getstatic(&pst, sizeof(pst), (size_t)1, 0); if (rval < 0) /* pstat_getstatic failed */ return; *pagesize = pst.page_size; *pages = pst.physical_memory; *availpages = dblayer_getvirtualmemsize() / *pagesize; - rval = pstat_getdynamic(&pst_dyn, sizeof(pst_dyn), (size_t)1, 0); - if (rval < 0) /* pstat_getdynamic failed */ - return; if (procpages) { #define BURST (size_t)32 /* get BURST proc info at one time... */ @@ -2386,6 +2382,7 @@ priv->dblayer_env = NULL; /* pEnv is now garbage */ +#if 0 /* DBDB do NOT remove the environment: bad, bad idea */ if (return_value == 0) { DB_ENV *env = 0; return_value = db_env_create(&env, 0); @@ -2397,9 +2394,7 @@ if (return_value == 0) { char *home_dir = dblayer_get_home_dir(li, NULL); if (home_dir) - /* DBDB do NOT remove the environment: bad, bad idea - * return_value = env->remove(env, home_dir, 0); - */ + return_value = env->remove(env, home_dir, 0); if (0 == return_value && !((DBLAYER_ARCHIVE_MODE|DBLAYER_EXPORT_MODE) & dbmode) && !priv->dblayer_bad_stuff_happened) { @@ -2415,6 +2410,7 @@ } } } +#endif return return_value; } @@ -4451,7 +4447,7 @@ int *cnt, int instance_dir_flag, int indexonly, - int resetlsns) + int resetlsns) { dblayer_private *priv = NULL; char *new_src_dir = NULL; @@ -4593,14 +4589,14 @@ } /* copy filename1 to filename2 */ - /* If the file is a database file, and resetlsns is set, then we need to do a key by key copy */ - if (strcmp(LDBM_FILENAME_SUFFIX, last_four_chars(filename1)) == 0 && resetlsns) { - return_value = dblayer_copy_file_resetlsns(src_dir, filename1, filename2, + /* If the file is a database file, and resetlsns is set, then we need to do a key by key copy */ + if (strcmp(LDBM_FILENAME_SUFFIX, last_four_chars(filename1)) == 0 && resetlsns) { + return_value = dblayer_copy_file_resetlsns(src_dir, filename1, filename2, 0, priv); - } else { - return_value = dblayer_copyfile(filename1, filename2, + } else { + return_value = dblayer_copyfile(filename1, filename2, 0, priv->dblayer_file_mode); - } + } slapi_ch_free((void**)&filename1); slapi_ch_free((void**)&filename2); if (0 > return_value) @@ -4751,11 +4747,13 @@ /* compare: make sure everything in list A is still in list B */ ok = 1; - for (listi = listA; *listi && ok; listi++) { + for (listi = listA; listi && *listi && ok; listi++) { int found = 0; - for (listj = listB; *listj && !found; listj++) { - if (strcmp(*listi, *listj) == 0) + for (listj = listB; listj && *listj && !found; listj++) { + if (strcmp(*listi, *listj) == 0) { found = 1; + break; + } } if (! found) { ok = 0; /* missing log: start over */ @@ -4775,7 +4773,7 @@ } if (ok) { - size_t p1len, p2len; + size_t p1len, p2len; char **listptr; prefix = NULL; @@ -4786,12 +4784,12 @@ prefix = home_dir; } /* log files have the same filename len(100 is a safety net:) */ - p1len = strlen(prefix) + strlen(*listB) + 100; + p1len = strlen(prefix) + strlen(*listB) + 100; pathname1 = (char *)slapi_ch_malloc(p1len); - p2len = strlen(dest_dir) + strlen(*listB) + 100; + p2len = strlen(dest_dir) + strlen(*listB) + 100; pathname2 = (char *)slapi_ch_malloc(p2len); /* We copy those over */ - for (listptr = listB; (*listptr) && ok; ++listptr) { + for (listptr = listB; listptr && *listptr && ok; ++listptr) { PR_snprintf(pathname1, p1len, "%s/%s", prefix, *listptr); PR_snprintf(pathname2, p2len, "%s/%s", dest_dir, *listptr); LDAPDebug(LDAP_DEBUG_ANY, "Backing up file %d (%s)\n", @@ -5172,8 +5170,9 @@ int dbmode; int action = 0; char *home_dir = NULL; - char *real_src_dir = NULL; - int frirestore = 0; /* Is a an FRI/single instance restore. 0 for no, 1 for yes */ + char *real_src_dir = NULL; + int frirestore = 0; /* Is a an FRI/single instance restore. 0 for no, 1 for yes */ + struct stat sbuf; PR_ASSERT(NULL != li); priv = (dblayer_private*)li->li_dblayer_private; @@ -5188,7 +5187,7 @@ PR_Unlock(li->li_config_mutex); home_dir = dblayer_get_home_dir(li, NULL); - + if (NULL == home_dir) { LDAPDebug(LDAP_DEBUG_ANY, @@ -5200,54 +5199,82 @@ /* If it is, we fail */ /* We check on the source staging area, no point in going further if it * isn't there */ + if (stat(src_dir, &sbuf) < 0) { + LDAPDebug(LDAP_DEBUG_ANY, "restore: backup directory %s does not " + "exist.\n", src_dir, 0, 0); + if (task) { + slapi_task_log_notice(task, + "Backup directory %s does not exist.\n", src_dir); + } + return LDAP_UNWILLING_TO_PERFORM; + } else if (!S_ISDIR(sbuf.st_mode)) { + LDAPDebug(LDAP_DEBUG_ANY, "restore: backup directory %s is not " + "a directory.\n", src_dir, 0, 0); + if (task) { + slapi_task_log_notice(task, + "Backup directory %s is not a directory.\n", src_dir); + } + return LDAP_UNWILLING_TO_PERFORM; + } if (!dbversion_exists(li, src_dir)) { - LDAPDebug(LDAP_DEBUG_ANY, "restore: source directory %s does not " + LDAPDebug(LDAP_DEBUG_ANY, "restore: backup directory %s does not " "contain a complete backup\n", src_dir, 0, 0); - - if (task) { - slapi_task_log_notice(task, "Source directory %s does not " + slapi_task_log_notice(task, "Backup directory %s does not " "contain a complete backup", src_dir ); } + return LDAP_UNWILLING_TO_PERFORM; } - /* If this is a FRI restore, the bename will be non-NULL */ - if (bename != NULL) - frirestore = 1; - - /* - * Check if the target is a superset of the backup. - * If not don't restore any db at all, otherwise - * the target will be crippled. - */ - dirhandle = PR_OpenDir(src_dir); - if (NULL != dirhandle) - { - while ((direntry = PR_ReadDir(dirhandle, PR_SKIP_DOT | PR_SKIP_DOT_DOT)) - && direntry->name) - { + /* If this is a FRI restore, the bename will be non-NULL */ + if (bename != NULL) + frirestore = 1; + + /* + * Check if the target is a superset of the backup. + * If not don't restore any db at all, otherwise + * the target will be crippled. + */ + dirhandle = PR_OpenDir(src_dir); + if (NULL != dirhandle) + { + while ((direntry = PR_ReadDir(dirhandle, PR_SKIP_DOT | PR_SKIP_DOT_DOT)) + && direntry->name) + { PR_snprintf(filename1, MAXPATHLEN, "%s/%s", src_dir, direntry->name); - if(!frirestore || strcmp(direntry->name,bename)==0) - { + if(!frirestore || strcmp(direntry->name,bename)==0) + { tmp_rval = PR_GetFileInfo(filename1, &info); if (tmp_rval == PR_SUCCESS && PR_FILE_DIRECTORY == info.type) { - inst = ldbm_instance_find_by_name(li, (char *)direntry->name); - if ( inst == NULL) - { - LDAPDebug(LDAP_DEBUG_ANY, - "ERROR: target server has no %s configured\n", direntry->name, 0, 0); - if (task) { - slapi_task_log_notice(task, - "ERROR: target server has no %s configured\n", direntry->name); - } - PR_CloseDir(dirhandle); - return LDAP_UNWILLING_TO_PERFORM; - } - } - } - } - PR_CloseDir(dirhandle); - } + inst = ldbm_instance_find_by_name(li, (char *)direntry->name); + if ( inst == NULL) + { + LDAPDebug(LDAP_DEBUG_ANY, + "ERROR: target server has no %s configured\n", direntry->name, 0, 0); + if (task) { + slapi_task_log_notice(task, + "ERROR: target server has no %s configured\n", direntry->name); + } + PR_CloseDir(dirhandle); + return LDAP_UNWILLING_TO_PERFORM; + } + + if (slapd_comp_path(src_dir, inst->inst_parent_dir_name) + == 0) { + LDAPDebug(LDAP_DEBUG_ANY, + "ERROR: backup dir %s and target dir %s are identical\n", src_dir, inst->inst_parent_dir_name, 0); + if (task) { + slapi_task_log_notice(task, + "ERROR: backup dir %s and target dir %s are identical\n", src_dir, inst->inst_parent_dir_name); + } + PR_CloseDir(dirhandle); + return LDAP_UNWILLING_TO_PERFORM; + } + } + } + } + PR_CloseDir(dirhandle); + } /* We delete the existing database */ @@ -5256,20 +5283,20 @@ return return_value; } - if (frirestore) /*if we are restoring a single backend*/ - { - char *new_src_dir = NULL; - return_value = dblayer_fri_restore(home_dir,src_dir,priv,task,&new_src_dir,bename); - if (return_value) { - return return_value; - } - /* Now modify the src_dir to point to our recovery area and carry on as if nothing had happened... */ - real_src_dir = new_src_dir; - } else - { - /* Otherwise use the src_dir from the caller */ - real_src_dir = src_dir; - } + if (frirestore) /*if we are restoring a single backend*/ + { + char *new_src_dir = NULL; + return_value = dblayer_fri_restore(home_dir,src_dir,priv,task,&new_src_dir,bename); + if (return_value) { + return return_value; + } + /* Now modify the src_dir to point to our recovery area and carry on as if nothing had happened... */ + real_src_dir = new_src_dir; + } else + { + /* Otherwise use the src_dir from the caller */ + real_src_dir = src_dir; + } /* We copy the files over from the staging area */ /* We want to treat the logfiles specially: if there's @@ -5300,14 +5327,14 @@ * directory is located. */ - inst = ldbm_instance_find_by_name(li, (char *)direntry->name); - if (inst == NULL) - continue; + inst = ldbm_instance_find_by_name(li, (char *)direntry->name); + if (inst == NULL) + continue; restore_dir = inst->inst_parent_dir_name; - /* If we're doing a partial restore, we need to reset the LSNs on the data files */ + /* If we're doing a partial restore, we need to reset the LSNs on the data files */ if (dblayer_copy_directory(li, task, filename1, - restore_dir, 1 /* restore */, &cnt, 0, 0, (bename) ? 1 : 0) == 0) + restore_dir, 1 /* restore */, &cnt, 0, 0, (bename) ? 1 : 0) == 0) continue; else { @@ -5418,7 +5445,7 @@ slapi_task_log_notice(task, "Failed to init database"); } return_value = tmp_rval; - goto error_out; + goto error_out; } if (0 == return_value) { /* only when the copyfile succeeded */ @@ -5443,21 +5470,21 @@ return_value = tmp_rval?tmp_rval:return_value; error_out: - /* Free the restore src dir, but only if we allocated it above */ - if (real_src_dir != src_dir) { - /* If this was an FRI restore and the staging area exists, go ahead and remove it */ - if (frirestore && PR_Access(real_src_dir, PR_ACCESS_EXISTS) == PR_SUCCESS) - { - int ret1 = 0; - LDAPDebug(LDAP_DEBUG_ANY, "dblayer_restore: Removing staging area %s.\n",real_src_dir, 0, 0); - ret1 = ldbm_delete_dirs(real_src_dir); - if (ret1) - { - LDAPDebug(LDAP_DEBUG_ANY, "dblayer_restore: Removal of staging area %s failed!\n", real_src_dir, 0, 0); - } - } - slapi_ch_free((void**)&real_src_dir); - } + /* Free the restore src dir, but only if we allocated it above */ + if (real_src_dir != src_dir) { + /* If this was an FRI restore and the staging area exists, go ahead and remove it */ + if (frirestore && PR_Access(real_src_dir, PR_ACCESS_EXISTS) == PR_SUCCESS) + { + int ret1 = 0; + LDAPDebug(LDAP_DEBUG_ANY, "dblayer_restore: Removing staging area %s.\n",real_src_dir, 0, 0); + ret1 = ldbm_delete_dirs(real_src_dir); + if (ret1) + { + LDAPDebug(LDAP_DEBUG_ANY, "dblayer_restore: Removal of staging area %s failed!\n", real_src_dir, 0, 0); + } + } + slapi_ch_free((void**)&real_src_dir); + } return return_value; } From fedora-directory-commits at redhat.com Tue Jan 10 23:53:10 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 18:53:10 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd proto-slap.h, 1.13, 1.14 util.c, 1.7, 1.8 Message-ID: <200601102353.k0ANreka004264@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4197 Modified Files: proto-slap.h util.c Log Message: [174776] Multiple restores from a non-existant directory could wipe out database If the specified backup dir does not exist, does not contain necessary files (including the directory is not accessible), is not a directory, or is identical to the path to the db dir, issues an error and stops restoring before wiping out the database. Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- proto-slap.h 3 Dec 2005 01:45:34 -0000 1.13 +++ proto-slap.h 10 Jan 2006 23:53:02 -0000 1.14 @@ -589,6 +589,8 @@ void slapd_nasty(char* str, int c, int err); int strarray2str( char **a, char *buf, size_t buflen, int include_quotes ); int slapd_chown_if_not_owner(const char *filename, uid_t uid, gid_t gid); +int slapd_comp_path(char *p0, char *p1); + /* * modify.c Index: util.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/util.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- util.c 23 Nov 2005 17:58:01 -0000 1.7 +++ util.c 10 Jan 2006 23:53:02 -0000 1.8 @@ -44,6 +44,7 @@ #include #include #endif +#include #include #include "slap.h" #include "prtime.h" @@ -53,6 +54,14 @@ #define UTIL_ESCAPE_HEX 1 #define UTIL_ESCAPE_BACKSLASH 2 +#if defined( _WIN32 ) +#define _PSEP "\\" +#define _CSEP '\\' +#else +#define _PSEP "/" +#define _CSEP '/' +#endif + static int special_np(unsigned char c) { if(c < 32 || c > 126) { @@ -383,6 +392,60 @@ return 0; /* not an abs path */ } +static void +clean_path(char **norm_path) +{ + char **np; + + for (np = norm_path; np && *np; np++) + slapi_ch_free((void **)np); + slapi_ch_free((void **)&norm_path); +} + +static char ** +normalize_path(char *path) +{ + char *dname = slapi_ch_strdup(path); + char *dnamep = dname; + char *bnamep = NULL; + char **dirs = (char **)slapi_ch_calloc(strlen(path), 1); + char **rdirs = (char **)slapi_ch_calloc(strlen(path), 1); + char **dp = dirs; + char **rdp; + do { + bnamep = basename(dnamep); + if (0 != strcmp(bnamep, ".")) { + *dp++ = slapi_ch_strdup(bnamep); /* remove "/./" in the path */ + } + dnamep = dirname(dnamep); + } while (strcmp(dnamep, _PSEP) && + !(0 == strcmp(dnamep, ".") && 0 == strcmp(bnamep, "."))); + + /* remove "xxx/.." in the path */ + for (dp = dirs, rdp = rdirs; dp && *dp; dp++) { + while (*dp && 0 == strcmp(*dp, "..")) { + dp++; + if (rdp > rdirs) + rdp--; + } + if (*dp) + *rdp++ = slapi_ch_strdup(*dp); + } + for (--dp, rdp = rdirs; dp >= dirs; dp--) { + while (*dp && 0 == strcmp(*dp, "..")) { + dp--; + if (rdp > rdirs) + rdp--; + } + if (*dp) + *rdp++ = slapi_ch_strdup(*dp); + } + + clean_path(dirs); + slapi_ch_free_string(&dname); + + return rdirs; +} /* * Take "relpath" and prepend the current working directory to it @@ -399,13 +462,10 @@ CHAR szDir[_MAX_DIR]; CHAR szFname[_MAX_FNAME]; CHAR szExt[_MAX_EXT]; -#define _PSEP "\\" -#else -#define _PSEP "/" #endif if ( relpath == NULL ) { - return NULL; + return NULL; } #if defined( _WIN32 ) @@ -413,41 +473,51 @@ memset (&szDir, 0, sizeof (szDir)); memset (&szFname, 0, sizeof (szFname)); memset (&szExt, 0, sizeof (szExt)); - _splitpath( relpath, szDrive, szDir, szFname, szExt ); - if( szDrive[0] && szDir[0] ) - return( slapi_ch_strdup( relpath )); - if ( relpath[ 0 ] == '/' || relpath[ 0 ] == '\\' ) { - return( slapi_ch_strdup( relpath )); -#else - if ( relpath[ 0 ] == '/' ) { - return( slapi_ch_strdup( relpath )); - } + _splitpath( relpath, szDrive, szDir, szFname, szExt ); + if( szDrive[0] && szDir[0] ) + return( slapi_ch_strdup( relpath )); #endif - - if ( getcwd( abspath, MAXPATHLEN ) == NULL ) { - perror( "getcwd" ); - LDAPDebug( LDAP_DEBUG_ANY, "Cannot determine current directory\n", - 0, 0, 0 ); - exit( 1 ); - } - - if ( strlen( relpath ) + strlen( abspath ) + 1 > MAXPATHLEN ) { - LDAPDebug( LDAP_DEBUG_ANY, "Pathname \"%s" _PSEP "%s\" too long\n", - abspath, relpath, 0 ); - exit( 1 ); + if ( relpath[ 0 ] == _CSEP ) { /* absolute path */ + PR_snprintf(abspath, sizeof(abspath), "%s", relpath); + } else { /* relative path */ + if ( getcwd( abspath, MAXPATHLEN ) == NULL ) { + perror( "getcwd" ); + LDAPDebug( LDAP_DEBUG_ANY, "Cannot determine current directory\n", + 0, 0, 0 ); + exit( 1 ); + } + + if ( strlen( relpath ) + strlen( abspath ) + 1 > MAXPATHLEN ) { + LDAPDebug( LDAP_DEBUG_ANY, "Pathname \"%s" _PSEP "%s\" too long\n", + abspath, relpath, 0 ); + exit( 1 ); + } + + if ( strcmp( relpath, "." )) { + if ( abspath[ 0 ] != '\0' && + abspath[ strlen( abspath ) - 1 ] != _CSEP ) + { + PL_strcatn( abspath, sizeof(abspath), "/" ); + } + PL_strcatn( abspath, sizeof(abspath), relpath ); + } } - - if ( strcmp( relpath, "." )) { -#if defined( _WIN32 ) - if ( abspath[ 0 ] != '\0' && abspath[ strlen( abspath ) - 1 ] != '/' && abspath[ strlen( abspath ) - 1 ] != '\\' ) -#else - if ( abspath[ 0 ] != '\0' && abspath[ strlen( abspath ) - 1 ] != '/' ) { -#endif - PL_strcatn( abspath, sizeof(abspath), "/" ); - } - PL_strcatn( abspath, sizeof(abspath), relpath ); + { + char **norm_path = normalize_path(abspath); + char *retpath = slapi_ch_strdup(abspath); /* size is long enough */ + char **np, *rp; + int pathlen = strlen(abspath) + 1; + int usedlen = 0; + for (np = norm_path, rp = retpath; np && *np; np++) { + int thislen = strlen(*np) + 1; + if (0 != strcmp(*np, _PSEP)) + PR_snprintf(rp, pathlen - usedlen, "%c%s", _CSEP, *np); + rp += thislen; + usedlen += thislen; + } + clean_path(norm_path); + return retpath; } - return( slapi_ch_strdup( abspath )); } @@ -658,3 +728,20 @@ return result; } +/* + * Compare 2 pathes + * Paths could contain ".", "..", "//" in the path, thus normalize them first. + * One or two of the paths could be a relative path. + */ +int +slapd_comp_path(char *p0, char *p1) +{ + int rval = 0; + char *norm_p0 = rel2abspath(p0); + char *norm_p1 = rel2abspath(p1); + + rval = strcmp(norm_p0, norm_p1); + slapi_ch_free_string(&norm_p0); + slapi_ch_free_string(&norm_p1); + return rval; +} From fedora-directory-commits at redhat.com Wed Jan 11 00:37:46 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 19:37:46 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt - New directory Message-ID: <200601110037.k0B0bkpN006057@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6042/ldclt Log Message: Directory /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt added to the repository From fedora-directory-commits at redhat.com Wed Jan 11 00:38:42 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 19:38:42 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt/examples - New directory Message-ID: <200601110038.k0B0cgL1006083@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/examples In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6068/examples Log Message: Directory /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/examples added to the repository From fedora-directory-commits at redhat.com Wed Jan 11 00:39:00 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 19:39:00 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt/examples/001 - New directory Message-ID: <200601110039.k0B0d0ME006107@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/examples/001 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6089/001 Log Message: Directory /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/examples/001 added to the repository From fedora-directory-commits at redhat.com Wed Jan 11 00:39:05 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 19:39:05 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt/examples/002 - New directory Message-ID: <200601110039.k0B0d5gU006120@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/examples/002 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6089/002 Log Message: Directory /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/examples/002 added to the repository From fedora-directory-commits at redhat.com Wed Jan 11 01:54:43 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 20:54:43 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt/examples README, NONE, 1.1 Message-ID: <200601110154.k0B1shMw008748@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/examples In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8602/ldclt/examples Added Files: README Log Message: [164596] LDCLT distributed with Directory Server integrated ldclt from DSRK into the DS source tree. --- NEW FILE README --- #ident "ldclt @(#)README 1.1 01/04/11" ldclt examples README Introduction The examples provided in this directory are delivered "as it" and may not be 100% accurate from the last releases of ldclt. They have been tested when added to the package, but are not meant to be maintained. Compatibility or stability of the examples from one version to another is not a target : examples may be removed or changed in any way at any time. To know when they were introduced or updated, please read the release notes in the file ../History Please report any comment, suggestion, error, new example, whatever to ldclt at france.sun.com. 001 This one is a very basic example of use of ldclt. It is based for the configuration part, on iPlanet DS 5.0 but should work with any kind of ldap server. - env.ksh Environment and parameters. - config.ksh Configure the server (create user and aci). - add.ksh Add random entries. - add_incr.ksh Add sequentialy numbered entries. - delete.ksh Delete random entries. - search.ksh Search random entries. 002 Using the advanced feature of ldclt allowing to specify very complex objects, we will generate ldif files or add/search complex objects. * Use the name files delivered with ldclt. - env.ksh Environment and parameters. - config.ksh Configure the server (create user and aci, modify schema). - ofile Description of the object that will be created. - ldif01.ksh Create ldif file with incremental strings from file, one entry per line in the file Lastname.txt - ldif02.ksh Create ldif file with incremental strings from file, 150k entries in total. - ldif03.ksh Create ldif file with random strings from file, 150k entries in total. - add.ksh Add 500 entries with random strings from file. # End of file From fedora-directory-commits at redhat.com Wed Jan 11 01:54:38 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 20:54:38 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt Makefile, NONE, 1.1 README, NONE, 1.1 data.c, NONE, 1.1 ldap-private.h, NONE, 1.1 ldapfct.c, NONE, 1.1 ldclt.c, NONE, 1.1 ldclt.h, NONE, 1.1 ldclt.man, NONE, 1.1 ldclt.use, NONE, 1.1 ldcltU.c, NONE, 1.1 opCheck.c, NONE, 1.1 parser.c, NONE, 1.1 port.c, NONE, 1.1 port.h, NONE, 1.1 remote.h, NONE, 1.1 repcheck.c, NONE, 1.1 repslave.c, NONE, 1.1 scalab01.c, NONE, 1.1 scalab01.h, NONE, 1.1 srv.c, NONE, 1.1 threadMain.c, NONE, 1.1 utils.c, NONE, 1.1 utils.h, NONE, 1.1 version.c, NONE, 1.1 workarounds.c, NONE, 1.1 Message-ID: <200601110154.k0B1sca6008726@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8602/ldclt Added Files: Makefile README data.c ldap-private.h ldapfct.c ldclt.c ldclt.h ldclt.man ldclt.use ldcltU.c opCheck.c parser.c port.c port.h remote.h repcheck.c repslave.c scalab01.c scalab01.h srv.c threadMain.c utils.c utils.h version.c workarounds.c Log Message: [164596] LDCLT distributed with Directory Server integrated ldclt from DSRK into the DS source tree. --- NEW FILE Makefile --- # # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # # # This Makefile is targetted to build the ldclt tool. This tool is a # multithreaded ldap client, specially targetted to ensure good # reliability of the product under test. # # ----------------------------------------------------------------------------- LDAP_SRC = ../../../.. BUILD_ROOT = ../../../../.. OBJDEST = $(OBJDIR)/servers/tools/obj BINDIR = $(RELDIR)/shared/bin DATDIR = $(RELDIR)/shared/data include $(BUILD_ROOT)/nsdefs.mk include $(BUILD_ROOT)/nsconfig.mk include $(LDAP_SRC)/nsldap.mk ifeq ($(OS_ARCH), WINNT) OBJEXT =.obj else OBJEXT =.o endif EXTRA_LIBS_DEP = $(LDAPSDK_DEP) $(DB_LIB_DEP) $(LDAP_COMMON_LIBS_DEP) EXTRA_LIBS += $(LDAPLINK) $(DB_LIB) \ $(PLATFORM_SPECIFIC_EXTRA_LIBRARY) \ $(ALIBS) $(NSPRLINK) $(SECURITYLINK) \ $(THREADSLIB) $(LDAP_COMMON_LIBS) LDCLTSRC = \ data.c \ ldapfct.c \ ldclt.c \ ldcltU.c \ parser.c \ port.c \ scalab01.c \ threadMain.c \ utils.c \ version.c \ workarounds.c #ifdef SUN_DS_3_X_SUPPORT LDCLTSRC += opCheck.c #endif LDCLTOBJS = $(addprefix $(OBJDEST)/, $(LDCLTSRC:.c=$(OBJEXT))) HDIR = $(LDAP_SRC)/include LDCLTBIN = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldclt)) INC_FILES = \ ldclt.h \ port.h \ utils.h \ remote.h INC_PLUGINS = \ scalab01.h ADDLIBS = $(LDAPLIBS) $(SPEC_LIBS) $(SYSTEM_LIBS) $(END) CFLAGS+=-DLDAP_DONT_USE_SMARTHEAP EXTRA_LIBS_DEP = $(LDAPSDK_DEP) $(DB_LIB_DEP) $(LDAP_COMMON_LIBS_DEP) EXTRA_LIBS += $(LDAPLINK) $(DB_LIB) \ $(PLATFORM_SPECIFIC_EXTRA_LIBRARY) \ $(ALIBS) $(NSPRLINK) $(SECURITYLINK) \ $(THREADSLIB) $(LDAP_COMMON_LIBS) ########################################################################## all: $(OBJDEST) $(BINDIR) $(LDCLTBIN) clean: -$(RM) $(LDCLTOBJS) $(LDCLTBIN) $(OBJDEST): if [ ! -d $(OBJDEST) ]; then \ $(MKDIR) $(OBJDEST); \ fi $(BINDIR): if [ ! -d $(BINDIR) ]; then \ $(MKDIR) $(BINDIR); \ fi $(LDCLTBIN): $(LDCLTOBJS) $(LINK_EXE) $(LDCLTOBJS) $(EXTRA_LIBS) -chmod 755 $(LDCLTBIN) --- NEW FILE README --- CVS snapshot in sync with ldclt 4.23 --- NEW FILE data.c --- #ident "ldclt @(#)data.c 1.8 01/03/23" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : data.c AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 11 January 1999 DESCRIPTION : This file implements the management of the data that are manipulated by ldclt. It is targetted to contain all the functions needed for the images, etc... LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 11/01/99 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 06/03/00 | JL Schwing | 1.2 : Test malloc() return value. ---------+--------------+------------------------------------------------------ 28/11/00 | JL Schwing | 1.3 : Port on NT 4. ---------+--------------+------------------------------------------------------ 30/11/00 | JL Schwing | 1.4 : Implement loadImages for NT. ---------+--------------+------------------------------------------------------ 30/11/00 | JL Schwing | 1.5 : Port on OSF1. ---------+--------------+------------------------------------------------------ 01/12/00 | JL Schwing | 1.6 : Port on Linux. ---------+--------------+------------------------------------------------------ 06/03/01 | JL Schwing | 1.7 : Better error messages if images not found. ---------+--------------+------------------------------------------------------ 23/03/01 | JL Schwing | 1.8 : Implements data file list support in variants. ---------+--------------+------------------------------------------------------ */ #include /* printf(), etc... */ #include /* realloc(), etc... */ #include /* strlen(), etc... */ #include /* errno, etc... */ /*JLS 06-03-00*/ #include /* Misc types... */ #include /* stat(), etc... */ #include /* open(), etc... */ #include /* ldap C-API BER declarations */ #include /* ldap C-API declarations */ #ifndef _WIN32 /*JLS 28-11-00*/ #include /* close(), etc... */ #include /* opendir(), etc... */ #include /* pthreads(), etc... */ #include /* mmap(), etc... */ #endif /*JLS 28-11-00*/ #include "port.h" /* Portability definitions */ /*JLS 28-11-00*/ #include "ldclt.h" /* This tool's include file */ /* **************************************************************************** FUNCTION : getExtend PURPOSE : Get the extension of the given string, i.e. the part that is after the last '.' INPUT : str = string to process OUTPUT : None. RETURN : The extension. DESCRIPTION : *****************************************************************************/ char *getExtend ( char *str) { int i; for (i=strlen(str)-1; (i>=0) && (str[i]!='.') ; i--); return (&(str[i+1])); } /* **************************************************************************** FUNCTION : loadImages PURPOSE : Load the images from the given directory. INPUT : dirpath = directory where the images are located. OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int loadImages ( char *dirpath) { #ifdef _WIN32 WIN32_FIND_DATA fileData; /* Current file */ HANDLE dirContext; /* Directory context */ char *findPath; /* To build the find path */ char *pt; /* To read the images */ #else /* _WIN32 */ DIR *dirp; /* Directory data */ struct dirent *direntp; /* Directory entry */ #endif /* _WIN32 */ char *fileName; /* As read from the system */ char name [1024]; /* To build the full path */ struct stat stat_buf; /* To read the image size */ int fd; /* To open the image */ int ret; /* Return value */ /* * Initialization */ mctx.images = NULL; mctx.imagesNb = 0; mctx.imagesLast = -1; if ((ret = ldclt_mutex_init(&(mctx.imagesLast_mutex))) != 0) { fprintf (stderr, "ldclt: %s\n", strerror (ret)); fprintf (stderr, "Error: cannot initiate imagesLast_mutex\n"); fflush (stderr); return (-1); } /* * Open the directory */ #ifdef _WIN32 findPath = (char *) malloc (strlen (dirpath) + 5); strcpy (findPath, dirpath); strcat (findPath, "/*.*"); dirContext = FindFirstFile (findPath, &fileData); if (dirContext == INVALID_HANDLE_VALUE) { fprintf (stderr, "ldlct: cannot load images from %s\n", dirpath); fprintf (stderr, "ldclt: try using -e imagesdir=path\n"); /*JLS 06-03-01*/ fflush (stderr); free (findPath); return (-1); } #else /* _WIN32 */ dirp = opendir (dirpath); if (dirp == NULL) { perror (dirpath); fprintf (stderr, "ldlct: cannot load images from %s\n", dirpath); fprintf (stderr, "ldclt: try using -e imagesdir=path\n"); /*JLS 06-03-01*/ fflush (stderr); return (-1); } #endif /* _WIN32 */ /* * Process the directory. * We will only accept the .jpg files, as stated by the RFC. */ #ifdef _WIN32 fileName = fileData.cFileName; do { #else while ((direntp = readdir (dirp)) != NULL) { fileName = direntp->d_name; #endif if (!strcmp (getExtend (fileName), "jpg")) { /* * Allocate a new image, and initiates with its name. */ mctx.imagesNb++; mctx.images = (image *) realloc (mctx.images, mctx.imagesNb * sizeof (image)); if (mctx.images == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("Error: cannot realloc(mctx.images), error=%d (%s)\n", errno, strerror (errno)); /*JLS 06-03-00*/ return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ mctx.images[mctx.imagesNb-1].name = (char *) malloc (strlen(fileName) + 1); if (mctx.images[mctx.imagesNb-1].name == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("Error: cannot malloc(mctx.images[%d]).name, error=%d (%s)\n", mctx.imagesNb-1, errno, strerror (errno)); /*JLS 06-03-00*/ return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ strcpy (mctx.images[mctx.imagesNb-1].name, fileName); /* * Read the image size */ strcpy (name, dirpath); strcat (name, "/"); strcat (name, fileName); if (stat (name, &stat_buf) < 0) { perror (name); fprintf (stderr, "Cannot stat(%s)\n", name); fflush (stderr); return (-1); } mctx.images[mctx.imagesNb-1].length = stat_buf.st_size; /* * Open the image */ fd = open (name, O_RDONLY); if (fd < 0) { perror (name); fprintf (stderr, "Cannot open(%s)\n", name); fflush (stderr); return (-1); } #ifdef _WIN32 /* * Allocate buffer and read the data :-( */ mctx.images[mctx.imagesNb-1].data = (char *) malloc (stat_buf.st_size); if (mctx.images[mctx.imagesNb-1].data == NULL) { fprintf (stderr, "Cannot malloc(%d) to load %s\n", stat_buf.st_size, name); fflush (stderr); return (-1); } if (read (fd, mctx.images[mctx.imagesNb-1].data, stat_buf.st_size) < 0) { perror (name); fprintf (stderr, "Cannot read(%s)\n", name); fflush (stderr); return (-1); } #else /* _WIN32 */ /* * mmap() the image */ mctx.images[mctx.imagesNb-1].data = mmap (0, stat_buf.st_size, PROT_READ, MAP_SHARED, fd, 0); if (mctx.images[mctx.imagesNb-1].data == (char *)MAP_FAILED) { perror (name); fprintf (stderr, "Cannot mmap(%s)\n", name); fflush (stderr); return (-1); } #endif /* _WIN32 */ /* * Close the image. The mmap() will remain available, and this * close() will save file descriptors. */ if (close (fd) < 0) { perror (name); fprintf (stderr, "Cannot close(%s)\n", name); fflush (stderr); return (-1); } } #ifdef _WIN32 } while (FindNextFile(dirContext, &fileData) == TRUE); #else } /* while ((direntp = readdir (dirp)) != NULL) */ #endif /* * Close the directory */ #ifndef _WIN32 if (closedir (dirp) < 0) { perror (dirpath); fprintf (stderr, "Cannot closedir(%s)\n", dirpath); fflush (stderr); return (-1); } #endif /* * Normal end */ #ifdef _WIN32 free (findPath); #endif return (0); } /* **************************************************************************** FUNCTION : getImage PURPOSE : Add a random image to the given attribute. INPUT : None. OUTPUT : attribute = the attribute where the image should be added. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int getImage ( LDAPMod *attribute) { int imageNumber; /* The image we will select */ int ret; /* Return value */ /* * Select the next image */ if ((ret = ldclt_mutex_lock (&(mctx.imagesLast_mutex))) != 0) /*JLS 29-11-00*/ { fprintf (stderr, "Cannot mutex_lock(imagesLast_mutex), error=%d (%s)\n", ret, strerror (ret)); fflush (stderr); return (-1); } mctx.imagesLast++; if (mctx.imagesLast == mctx.imagesNb) mctx.imagesLast = 0; imageNumber = mctx.imagesLast; if ((ret = ldclt_mutex_unlock (&(mctx.imagesLast_mutex))) != 0) { fprintf (stderr, "Cannot mutex_unlock(imagesLast_mutex), error=%d (%s)\n", ret, strerror (ret)); fflush (stderr); return (-1); } /* * Create the data structure required */ attribute->mod_bvalues = (struct berval **) malloc (2 * sizeof (struct berval *)); if (attribute->mod_bvalues == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("Error: cannot malloc(attribute->mod_bvalues), error=%d (%s)\n", errno, strerror (errno)); /*JLS 06-03-00*/ return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ attribute->mod_bvalues[0] = (struct berval *) malloc (sizeof (struct berval)); if (attribute->mod_bvalues[0] == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("Error: cannot malloc(attribute->mod_bvalues[0]), error=%d (%s)\n", errno, strerror (errno)); /*JLS 06-03-00*/ return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ attribute->mod_bvalues[1] = NULL; /* * Fill the bvalue with the image data */ attribute->mod_bvalues[0]->bv_len = mctx.images[imageNumber].length; attribute->mod_bvalues[0]->bv_val = mctx.images[imageNumber].data; /* * Normal end */ return (0); } /* New */ /*JLS 23-03-01*/ /* **************************************************************************** FUNCTION : loadDataListFile PURPOSE : Load the data list file given in argument. INPUT : dlf->fname = file to process OUTPUT : dlf = file read RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int loadDataListFile ( data_list_file *dlf) { FILE *ifile; /* Input file */ char line[MAX_FILTER]; /* To read ifile */ /* * Open the file */ ifile = fopen (dlf->fname, "r"); if (ifile == NULL) { perror (dlf->fname); fprintf (stderr, "Error: cannot open file \"%s\"\n", dlf->fname); return (-1); } /* * Count the entries. * Allocate the array. * Rewind the file. */ for (dlf->strNb=0 ; fgets(line, MAX_FILTER, ifile) != NULL ; dlf->strNb++); dlf->str = (char **) malloc (dlf->strNb * sizeof (char *)); if (fseek (ifile, 0, SEEK_SET) != 0) { perror (dlf->fname); fprintf (stderr, "Error: cannot rewind file \"%s\"\n", dlf->fname); return (-1); } /* * Read all the entries from this file */ dlf->strNb=0; while (fgets(line, MAX_FILTER, ifile) != NULL) { if ((strlen (line) > 0) && (line[strlen(line)-1]=='\n')) line[strlen(line)-1] = '\0'; dlf->str[dlf->strNb] = strdup (line); dlf->strNb++; } /* * Close the file */ if (fclose (ifile) != 0) { perror (dlf->fname); fprintf (stderr, "Error: cannot fclose file \"%s\"\n", dlf->fname); return (-1); } return (0); } /* New */ /*JLS 23-03-01*/ /* **************************************************************************** FUNCTION : dataListFile PURPOSE : Find the given data_list_file either in the list of files already loaded, either load it. INPUT : fname = file name. OUTPUT : None. RETURN : NULL if error, else the requested file. DESCRIPTION : *****************************************************************************/ data_list_file * dataListFile ( char *fname) { data_list_file *dlf; /* To process the request */ /* * Maybe we already have loaded this file ? */ for (dlf=mctx.dlf ; dlf != NULL ; dlf=dlf->next) if (!strcmp (fname, dlf->fname)) return (dlf); /* * Well, it looks like we should load a new file ;-) * Allocate a new data structure, chain it in mctx and load the file. */ dlf = (data_list_file *) malloc (sizeof (data_list_file)); dlf->next = mctx.dlf; mctx.dlf = dlf; dlf->fname = strdup (fname); if (loadDataListFile (dlf) < 0) return (NULL); /* * Loaded... */ return (dlf); } /* End of file */ --- NEW FILE ldap-private.h --- #ident "@(#)ldap-private.h 1.6 06/10/98 SMI" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifndef _LDAP_PRIVATE_H #define _LDAP_PRIVATE_H #ifdef _REENTRANT #ifndef MAX_THREAD_ID #define MAX_THREAD_ID 500 #endif /* MAX_THREAD_ID */ #else /* _REENTRANT */ #ifndef MAX_THREAD_ID #define MAX_THREAD_ID 1 #endif /* MAX_THREAD_ID */ #endif /* _REENTRANT */ #define COMPAT20 #define COMPAT30 #if defined(COMPAT20) || defined(COMPAT30) #define COMPAT #endif #ifdef LDAP_DNS #define LDAP_OPT_DNS 0x00000001 /* use DN & DNS */ #endif /* LDAP_DNS */ /* #define DBG_LOCK1(st) printf("%d> %s %d:%s\n", _thr_self(), st, __LINE__, __FILE__); #define DBG_LOCK2(ld,st) printf("%d> %s ld_lockcount=%d %d:%s\n", _thr_self(), st, (ld)->ld_lockcount, __LINE__, __FILE__); */ #define DBG_LOCK1(st) #define DBG_LOCK2(ld,st) #define LOCK_RESPONSE(ld) \ if ((ld)->ld_response_lockthread != _thr_self()) { \ DBG_LOCK1("waiting for response lock") \ pthread_mutex_lock( &((ld)->ld_response_mutex) ); \ DBG_LOCK1("got response lock") \ (ld)->ld_response_lockthread = _thr_self(); \ } else { \ (ld)->ld_response_lockcount++; \ DBG_LOCK2(ld, "fake ldap lock") \ } #define UNLOCK_RESPONSE(ld) \ if ((ld)->ld_response_lockcount==0) { \ (ld)->ld_response_lockthread = 0; \ pthread_mutex_unlock( &((ld)->ld_response_mutex) ); \ DBG_LOCK1("freed response lock") \ } else { \ (ld)->ld_response_lockcount--; \ DBG_LOCK2(ld, "fake ldap unlock") \ } #define LOCK_LDAP(ld) \ if ((ld)->ld_lockthread != _thr_self()) { \ DBG_LOCK1("waiting for ldap lock") \ pthread_mutex_lock( &((ld)->ld_ldap_mutex) ); \ DBG_LOCK1("got ldap lock") \ (ld)->ld_lockthread = _thr_self(); \ } else { \ (ld)->ld_lockcount++; \ DBG_LOCK2(ld, "fake ldap lock") \ } #define UNLOCK_LDAP(ld) \ if ((ld)->ld_lockcount==0) { \ (ld)->ld_lockthread = 0; \ pthread_mutex_unlock( &((ld)->ld_ldap_mutex) ); \ DBG_LOCK1("freed ldap lock") \ } else { \ (ld)->ld_lockcount--; \ DBG_LOCK2(ld, "fake ldap unlock") \ } #define LOCK_POLL(ld) pthread_mutex_lock( &ld->ld_poll_mutex ) #define UNLOCK_POLL(ld) pthread_mutex_unlock( &ld->ld_poll_mutex ) /* * This structure represents both ldap messages and ldap responses. * These are really the same, except in the case of search responses, * where a response has multiple messages. */ typedef struct ldapmsg { int lm_msgid; /* the message id */ int lm_msgtype; /* the message type */ BerElement *lm_ber; /* the ber encoded message contents */ struct ldapmsg *lm_chain; /* for search - next msg in the resp */ struct ldapmsg *lm_next; /* next response */ unsigned long lm_time; /* used to maintain cache */ } _struct_LDAPMessage; typedef struct ldap_filt_list { char *lfl_tag; char *lfl_pattern; char *lfl_delims; LDAPFiltInfo *lfl_ilist; struct ldap_filt_list *lfl_next; } _struct_FiltList; typedef struct ldap_filt_desc { LDAPFiltList *lfd_filtlist; LDAPFiltInfo *lfd_curfip; LDAPFiltInfo lfd_retfi; char lfd_filter[ LDAP_FILT_MAXSIZ ]; char *lfd_curval; char *lfd_curvalcopy; char **lfd_curvalwords; char *lfd_filtprefix; char *lfd_filtsuffix; } _struct_FiltDesc; /* * structure for tracking LDAP server host, ports, DNs, etc. */ typedef struct ldap_server { char *lsrv_host; char *lsrv_dn; /* if NULL, use default */ int lsrv_port; struct ldap_server *lsrv_next; } LDAPServer; /* * structure for representing an LDAP server connection */ typedef struct ldap_conn { Sockbuf *lconn_sb; int lconn_refcnt; unsigned long lconn_lastused; /* time */ int lconn_status; #define LDAP_CONNST_NEEDSOCKET 1 #define LDAP_CONNST_CONNECTING 2 #define LDAP_CONNST_CONNECTED 3 LDAPServer *lconn_server; char *lconn_krbinstance; struct ldap_conn *lconn_next; } LDAPConn; /* * Structure used to keep track of search references */ typedef struct ldap_reference { char ** lref_refs; struct ldap_reference *lref_next; } LDAPRef; /* * structure used to track outstanding requests */ typedef struct ldapreq { int lr_msgid; /* the message id */ int lr_status; /* status of request */ #define LDAP_REQST_INPROGRESS 1 #define LDAP_REQST_CHASINGREFS 2 #define LDAP_REQST_NOTCONNECTED 3 #define LDAP_REQST_WRITING 4 int lr_outrefcnt; /* count of outstanding referrals */ int lr_origid; /* original request's message id */ int lr_parentcnt; /* count of parent requests */ int lr_res_msgtype; /* result message type */ int lr_res_errno; /* result LDAP errno */ char *lr_res_error; /* result error string */ char *lr_res_matched;/* result matched DN string */ BerElement *lr_ber; /* ber encoded request contents */ LDAPConn *lr_conn; /* connection used to send request */ LDAPRef *lr_references; char **lr_ref_followed; /* referral being followed */ char **lr_ref_unfollowed; /* Not being followed */ char **lr_ref_tofollow; /* referral to follow if the one being followed fails. */ struct ldapreq *lr_parent; /* request that spawned this referral */ struct ldapreq *lr_refnext; /* next referral spawned */ struct ldapreq *lr_prev; /* previous request */ struct ldapreq *lr_next; /* next request */ } LDAPRequest; /* * structure for client cache */ #define LDAP_CACHE_BUCKETS 31 /* cache hash table size */ typedef struct ldapcache { LDAPMessage *lc_buckets[LDAP_CACHE_BUCKETS];/* hash table */ LDAPMessage *lc_requests; /* unfulfilled reqs */ long lc_timeout; /* request timeout */ long lc_maxmem; /* memory to use */ long lc_memused; /* memory in use */ int lc_enabled; /* enabled? */ unsigned long lc_options; /* options */ #define LDAP_CACHE_OPT_CACHENOERRS 0x00000001 #define LDAP_CACHE_OPT_CACHEALLERRS 0x00000002 } LDAPCache; #define NULLLDCACHE ((LDAPCache *)NULL) /* * structure representing an ldap connection */ typedef struct ldap { Sockbuf ld_sb; /* socket descriptor & buffer */ char *ld_host; int ld_version; char ld_lberoptions; int ld_deref; int ld_timelimit; int ld_sizelimit; LDAPFiltDesc *ld_filtd; /* from getfilter for ufn searches */ char *ld_ufnprefix; /* for incomplete ufn's */ int ld_errno[MAX_THREAD_ID]; /* thread-specific */ #define ld_errno ld_errno[ldap_thr_index()] char *ld_error[MAX_THREAD_ID]; /* thread-specific */ #define ld_error ld_error[ldap_thr_index()] char *ld_matched[MAX_THREAD_ID]; /* thread-specific */ #define ld_matched ld_matched[ldap_thr_index()] char **ld_referrals[MAX_THREAD_ID]; /* thread-specific */ #define ld_referrals ld_referrals[ldap_thr_index()] LDAPControl **ld_ret_ctrls[MAX_THREAD_ID]; /* thread-specific */ #define ld_ret_ctrls ld_ret_ctrls[ldap_thr_index()] int ld_msgid; int ld_follow_referral; /* flag set to true if lib follow referrals */ LDAPRequest *ld_requests; /* list of outstanding requests -- referrals*/ LDAPMessage *ld_responses; /* list of outstanding responses */ int *ld_abandoned; /* array of abandoned requests */ pthread_mutex_t ld_response_mutex; /* mutex for responses part of structure */ pthread_t ld_response_lockthread; /* thread which currently holds the response lock */ int ld_response_lockcount; /* response lock depth */ char *ld_attrbuffer[MAX_THREAD_ID]; #define ld_attrbuffer ld_attrbuffer[ldap_thr_index()] LDAPCache *ld_cache; /* non-null if cache is initialized */ char *ld_cldapdn; /* DN used in connectionless search */ /* it is OK to change these next four values directly */ int ld_cldaptries; /* connectionless search retry count */ int ld_cldaptimeout;/* time between retries */ int ld_refhoplimit; /* limit on referral nesting */ int ld_restart; /* Decide if continue after interruption */ #ifdef LDAP_SSL int ld_use_ssl; char *ld_ssl_key; #endif unsigned long ld_options; /* boolean options */ /* do not mess with the rest though */ char *ld_defhost; /* full name of default server */ int ld_defport; /* port of default server */ BERTranslateProc ld_lber_encode_translate_proc; BERTranslateProc ld_lber_decode_translate_proc; LDAPConn *ld_defconn; /* default connection */ LDAPConn *ld_conns; /* list of server connections */ void *ld_selectinfo; /* platform specifics for select */ LDAP_REBIND_FUNCTION *ld_rebindproc; void *ld_rebind_extra_arg; /* int (*ld_rebindproc)( struct ldap *ld, char **dnp, */ /* char **passwdp, int *authmethodp, int freeit ); */ /* routine to get info needed for re-bind */ pthread_mutex_t ld_ldap_mutex; /* mutex for thread dependent part of struct */ pthread_t ld_lockthread; /* thread which currently holds the lock */ int ld_lockcount; /* lock depth */ pthread_mutex_t ld_poll_mutex; /* a seperate lock for polling */ LDAPControl **ld_srvctrls; /* Controls used by ldap and server */ LDAPControl **ld_cltctrls; /* Client side controls */ /* KE: Lists of unsolicited notifications */ LDAPMessage *ld_notifs[MAX_THREAD_ID]; #define ld_notifs ld_notifs[ldap_thr_index()] } _struct_LDAP; /* * handy macro to check whether LDAP struct is set up for CLDAP or not */ #define LDAP_IS_CLDAP( ld ) ( ld->ld_sb.sb_naddr > 0 ) #endif /* _LDAP_PRIVATE_H */ --- NEW FILE ldapfct.c --- #ident "ldclt @(#)ldapfct.c 1.68 01/05/04" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : ldapfct.c AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 04 December 1998 DESCRIPTION : This file contains the ldap part of this tool. LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 04/12/98 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 09/12/98 | JL Schwing | 1.2 : Forget to free ldap returned data. ---------+--------------+------------------------------------------------------ 10/12/98 | JL Schwing | 1.3 : Add nb of errors statistics. ---------+--------------+------------------------------------------------------ 10/12/98 | JL Schwing | 1.4 : Implement asynchronous mode. ---------+--------------+------------------------------------------------------ 11/12/98 | JL Schwing | 1.5 : fflush(stdout) after each printf. ---------+--------------+------------------------------------------------------ 14/12/98 | JL Schwing | 1.6 : Implement "-e close". | New function my_ldap_err2string() to prevent crashes. ---------+--------------+------------------------------------------------------ 16/12/98 | JL Schwing | 1.7 : Implement "-e add" and "-e delete". | Create separate functions for connection operations. ---------+--------------+------------------------------------------------------ 23/12/98 | JL Schwing | 1.8 : Factorise the doXxxx() functions. | Fix SIGSEGV in ldap_parse_result(). | Implement result decoding in doAddEntry(). ---------+--------------+------------------------------------------------------ 24/12/98 | JL Schwing | 1.9 : Bug fix - should support no message in async. | Bug fix - forget to check mctx.asyncMax !!! | Modify the getPending() algorythm to empty the queue | (if possible). ---------+--------------+------------------------------------------------------ 29/12/98 | JL Schwing | 1.10: Implement -Q. | Bug fix mode -q when asynchronous. ---------+--------------+------------------------------------------------------ 11/01/99 | JL Schwing | 1.11: Implement "-e emailPerson". | Bug fix - bad building of rdn in buildNewEntry(). ---------+--------------+------------------------------------------------------ 13/01/99 | JL Schwing | 1.12: Implement "-e string". ---------+--------------+------------------------------------------------------ 14/01/99 | JL Schwing | 1.13: Implement "-s ". ---------+--------------+------------------------------------------------------ 15/01/99 | JL Schwing | 1.14: Create automatically the missing nodes. ---------+--------------+------------------------------------------------------ 18/01/99 | JL Schwing | 1.15: Implements "-e randombase". ---------+--------------+------------------------------------------------------ 18/01/99 | JL Schwing | 1.16: Implements "-e v2". ---------+--------------+------------------------------------------------------ 20/01/99 | JL Schwing | 1.17: Bug fix - should'nt fail in createMissingNodes() | if error 68 (Already exists). | Increment counter for intermediate node(s) too. ---------+--------------+------------------------------------------------------ 23/01/99 | JL Schwing | 1.18: Improve traces. | Bug fix - remove leading spaces from rdn. ---------+--------------+------------------------------------------------------ 26/01/99 | JL Schwing | 1.19: Implement "-e noloop". ---------+--------------+------------------------------------------------------ 01/02/99 | JL Schwing | 1.20: Create *all* the nodes in createMissingNodes() ---------+--------------+------------------------------------------------------ 03/02/99 | JL Schwing | 1.21: Create the leaf entry after createMissingNodes() ---------+--------------+------------------------------------------------------ 26/02/99 | JL Schwing | 1.22: Detect "\," in createMissingNodes(). ---------+--------------+------------------------------------------------------ 04/05/99 | JL Schwing | 1.23: Add call to opAdd(). ---------+--------------+------------------------------------------------------ 04/05/99 | JL Schwing | 1.24: Forget some calls to opAdd(). ---------+--------------+------------------------------------------------------ 04/05/99 | JL Schwing | 1.25: Too many calls to opAdd() !!! ---------+--------------+------------------------------------------------------ 19/05/99 | JL Schwing | 1.27: Implements doRename(). | Do not print messages about intermediate nodes created | in quiet mode. | MOdify getPending()to support rename operations. ---------+--------------+------------------------------------------------------ 06/03/00 | JL Schwing | 1.28: Test malloc() return value. ---------+--------------+------------------------------------------------------ 06/03/00 | A. Hornik | 1.29: Bug fix - SEGV if no passwd provided. ---------+--------------+------------------------------------------------------ 03/08/00 | JL Schwing | 1.30: Improve errors decoding. This improvement | is to retrieve the additional error string that | is returned by the server. This is implemented for | the asynchronous operations and for the synchronous | search only, because for the other synchronous ops | we should use ldap_get_lderrno() that is not | implement in Solaris's libldap. | Add new function printErrorFromLdap(). ---------+--------------+------------------------------------------------------ 03/08/00 | JL Schwing | 1.31: Fix SIGSEGV in printErrorFromLdap(). ---------+--------------+------------------------------------------------------ 11/08/00 | JL Schwing | 1.32: Improve error decoding. ---------+--------------+------------------------------------------------------ 18/08/00 | JL Schwing | 1.33: Print begin and end dates. ---------+--------------+------------------------------------------------------ 25/08/00 | JL Schwing | 1.34: Implement consistent exit status... ---------+--------------+------------------------------------------------------ 11/10/00 | B Kolics | 1.35: Added SSL connection initialization to | | connectToServer, createMissingNodes ---------+--------------+------------------------------------------------------ 26/10/00 | B Kolics | 1.36: Moved SSL client initialization to basicInit ------------------------------------------------------------------------------- 07/11/00 | JL Schwing | 1.37: Implements dynamic load of ssl-related | functions. ---------+--------------+------------------------------------------------------ 07/11/00 | JL Schwing | 1.38: Implement "-e inetOrgPerson". | Add new error message in createMissingNodes(). ---------+--------------+------------------------------------------------------ 13/11/00 | JL Schwing | 1.39: Add new options "-e randombaselow and ...high" ---------+--------------+------------------------------------------------------ 14/11/00 | JL Schwing | 1.40: Will now use utils.c functions. ---------+--------------+------------------------------------------------------ 14/11/00 | JL Schwing | 1.41 : Port on AIX. ---------+--------------+------------------------------------------------------ 21/11/00 | JL Schwing | 1.42: Implement "-e attreplace=name:mask" | Add new function buildNewModAttrib(). ---------+--------------+------------------------------------------------------ 24/11/00 | B Kolics | 1.43: Added SSL client authentication ---------+--------------+------------------------------------------------------ 29/11/00 | JL Schwing | 1.44: Port on NT 4. ---------+--------------+------------------------------------------------------ 01/12/00 | JL Schwing | 1.45: Port on Linux. ---------+--------------+------------------------------------------------------ 14/12/00 | JL Schwing | 1.46: Add more trace in VERY_VERBOSE mode. | Fix some trace messages. | Add new function dnFromMessage(). ---------+--------------+------------------------------------------------------ 15/12/00 | JL Schwing | 1.47: Implement "-e counteach". | Implement "-e withnewparent" - cf bug Scopus 526148 ---------+--------------+------------------------------------------------------ 18/12/00 | JL Schwing | 1.48: Add new exit status EXIT_RESSOURCE. ---------+--------------+------------------------------------------------------ 18/12/00 | JL Schwing | 1.49: Bug fix when -e rename,counteach ---------+--------------+------------------------------------------------------ 18/12/00 | JL Schwing | 1.50: Bug fix - support errors the user wants to | ignore in connectToServer(). | Also a bug fix in tttctx->exitStatus management. ---------+--------------+------------------------------------------------------ 03/01/01 | JL Schwing | 1.51: Implement "-e attrsonly=value". ---------+--------------+------------------------------------------------------ 05/01/01 | JL Schwing | 1.52: Implement "-e randombinddn" and associated | "-e randombinddnlow/high" | Add new function buildNewBindDN(). ---------+--------------+------------------------------------------------------ 05/03/01 | JL Schwing | 1.53: Fix the "anonymous" mode. ---------+--------------+------------------------------------------------------ 08/03/01 | JL Schwing | 1.54: Change referrals handling. | Add new functions refRebindProc() and referralSetup(). ---------+--------------+------------------------------------------------------ 14/03/01 | JL Schwing | 1.55: Implement "-e commoncounter" ---------+--------------+------------------------------------------------------ 14/03/01 | JL Schwing | 1.56: Lint cleanup. | Port on _WIN32. ---------+--------------+------------------------------------------------------ 15/03/01 | JL Schwing | 1.57: Implement "-e attrlist=name:name:name" | Implement "-e randomattrlist=name:name:name" [...3107 lines suppressed...] * disconnection, bind/unbind/close etc... requested by the user. * The cost is one more function call in this application, but the * resulting source code will be much more easiest to maintain. */ if (connectToServer (tttctx) < 0) /*JLS 18-12-00*/ return (-1); /*JLS 18-12-00*/ if (!(tttctx->binded)) /*JLS 18-12-00*/ return (0); /*JLS 18-12-00*/ /* * Build the filter */ if (buildRandomRdnOrFilter (tttctx) < 0) return (-1); /* * Prepear the attribute list */ if (mctx.attrlistNb == 0) /*JLS 15-03-01*/ attrlist = NULL; /*JLS 15-03-01*/ else /*JLS 15-03-01*/ if (mctx.mode & RANDOM_ATTRLIST) /*JLS 15-03-01*/ attrlist = selectRandomAttrList (tttctx); /*JLS 15-03-01*/ else /*JLS 15-03-01*/ attrlist = mctx.attrlist; /*JLS 15-03-01*/ /* * Do the search * Maybe we are in synchronous mode ? I hope so, it is really * much simple ;-) */ if (!(mctx.mode & ASYNC)) { ret = ldap_search_s (tttctx->ldapCtx, tttctx->bufBaseDN, mctx.scope, tttctx->bufFilter, attrlist, /*JLS 15-03-01*/ mctx.attrsonly, &res); /*JLS 03-01-01*/ if (ret != LDAP_SUCCESS) { if (!((mctx.mode & QUIET) && ignoreError (ret))) (void) printErrorFromLdap (tttctx, res, ret, /*JLS 03-08-00*/ "Cannot ldap_search()"); /*JLS 03-08-00*/ if (addErrorStat (ret) < 0) return (-1); if ((ret == LDAP_NO_SUCH_OBJECT) && /*JLS 15-12-00*/ (mctx.mode & COUNT_EACH)) /*JLS 15-12-00*/ { /*JLS 15-12-00*/ if (incrementNbOpers (tttctx) < 0) /*JLS 15-12-00*/ return (-1); /*JLS 15-12-00*/ } /*JLS 15-12-00*/ } else { if (incrementNbOpers (tttctx) < 0)/* Memorize operation */ return (-1); /* * Don't forget to free the returned message ! */ if ((ret = ldap_msgfree (res)) < 0) { if (!((mctx.mode & QUIET) && ignoreError (ret))) { printf ("ldclt[%d]: T%03d: Cannot ldap_msgfree(), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, my_ldap_err2string (ret)); fflush (stdout); } if (addErrorStat (ret) < 0) return (-1); } } /* * End of synchronous operation */ return (0); } /* * Here, we are in asynchronous mode... * Too bad, lot of things to do here. * First, let's see if we are above the reading threshold. */ if (tttctx->pendingNb >= mctx.asyncMin) { /* * Retrieve the next pending request */ ret = ldap_result (tttctx->ldapCtx, LDAP_RES_ANY, 1, &(mctx.timeval), &res); if (ret < 0) { if (!((mctx.mode & QUIET) && ignoreError (ret))) (void) printErrorFromLdap (tttctx, res, ret, /*JLS 03-08-00*/ "Cannot ldap_result()"); /*JLS 03-08-00*/ if (addErrorStat (ret) < 0) return (-1); } else { tttctx->pendingNb--; /* * Don't forget to free the returned message ! */ if ((ret = ldap_msgfree (res)) < 0) { if (!((mctx.mode & QUIET) && ignoreError (ret))) { printf ("ldclt[%d]: T%03d: Cannot ldap_msgfree(), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, my_ldap_err2string (ret)); fflush (stdout); } if (addErrorStat (ret) < 0) return (-1); } } } /* * Maybe we may send another request ? * Well... there is no proper way to retrieve the error number for * this, so I guess I may use direct access to the ldap context * to read the field ld_errno. */ if (tttctx->pendingNb > mctx.asyncMax) { if ((mctx.mode & VERBOSE) && (tttctx->asyncHit == 1) && (!(mctx.mode & SUPER_QUIET))) { tttctx->asyncHit = 1; printf ("ldclt[%d]: T%03d: Max pending request hit.\n", mctx.pid, tttctx->thrdNum); fflush (stdout); } } else { if ((mctx.mode & VERBOSE) && (tttctx->asyncHit == 1) && (!(mctx.mode & SUPER_QUIET))) { tttctx->asyncHit = 0; printf ("ldclt[%d]: T%03d: Restart sending.\n", mctx.pid, tttctx->thrdNum); fflush (stdout); } ret = ldap_search (tttctx->ldapCtx, tttctx->bufBaseDN, mctx.scope, tttctx->bufFilter, attrlist, /*JLS 15-03-01*/ mctx.attrsonly); /*JLS 03-01-01*/ if (ret < 0) { if (ldap_get_option (tttctx->ldapCtx, LDAP_OPT_ERROR_NUMBER, &ret) < 0) { printf ("ldclt[%d]: T%03d: Cannot ldap_get_option(LDAP_OPT_ERROR_NUMBER)\n", mctx.pid, tttctx->thrdNum); fflush (stdout); return (-1); } else { if (!((mctx.mode & QUIET) && ignoreError (ret))) { printf ("ldclt[%d]: T%03d: Cannot ldap_search(), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, my_ldap_err2string (ret)); fflush (stdout); } if (addErrorStat (ret) < 0) return (-1); if ((ret == LDAP_NO_SUCH_OBJECT) && /*JLS 15-12-00*/ (mctx.mode & COUNT_EACH)) /*JLS 15-12-00*/ { /*JLS 15-12-00*/ if (incrementNbOpers (tttctx) < 0) /*JLS 15-12-00*/ return (-1); /*JLS 15-12-00*/ } /*JLS 15-12-00*/ } } else { /* * Memorize the operation */ if (incrementNbOpers (tttctx) < 0) return (-1); tttctx->pendingNb++; } } if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: T%03d: pendingNb=%d\n", mctx.pid, tttctx->thrdNum, tttctx->pendingNb); /* * End of asynchronous operation... and also end of function. */ return (0); } /* End of file */ --- NEW FILE ldclt.c --- #ident "ldclt @(#)ldclt.c 1.89 01/06/19" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : ldclt.c AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 03 December 1998 DESCRIPTION : This file is the main file of the ldclt tool. This tool is targetted to be a multi-threaded ldap client, specially designed to ensure good reliability of both the basic ldap server purpose, and the replication processes. It is *not* targetted against the functionnality aspect of the product, but rather on the stress and long-term operation. LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 03/12/98 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 10/12/98 | JL Schwing | 1.2 : Add statistics report when exiting. ---------+--------------+------------------------------------------------------ 10/12/98 | JL Schwing | 1.3 : Trap SIGQUIL to issue statistics without exit. | Bug fix - call ldap_err2string() to decode ldap errs. ---------+--------------+------------------------------------------------------ 11/12/98 | JL Schwing | 1.4 : Implement max errors threshold. | fflush(stdout) after each printf. | Will exit(0) on SIGINT ---------+--------------+------------------------------------------------------ 14/12/98 | JL Schwing | 1.5 : Implement "-e close". | Ensure thread not dead prior to issue "no activity" | Add statts for the number of dead threads. ---------+--------------+------------------------------------------------------ 16/12/98 | JL Schwing | 1.6 : Implement "-e add" and "-e delete". | Improve printout of options. ---------+--------------+------------------------------------------------------ 24/12/98 | JL Schwing | 1.7 : Fix memory problem. ---------+--------------+------------------------------------------------------ 28/12/98 | JL Schwing | 1.8 : Add more statistics. ---------+--------------+------------------------------------------------------ 29/12/98 | JL Schwing | 1.9 : Implement -Q. ---------+--------------+------------------------------------------------------ 29/12/98 | JL Schwing | 1.10: Don't print pending stats if not asynchronous. ---------+--------------+------------------------------------------------------ 29/12/98 | JL Schwing | 1.11: Fix typo. ---------+--------------+------------------------------------------------------ 30/12/98 | JL Schwing | 1.12: Protect messages "no activity for %d seconds" | by SUPER_QUIET mode. ---------+--------------+------------------------------------------------------ 11/01/99 | JL Schwing | 1.13: Implement "-e emailPerson". ---------+--------------+------------------------------------------------------ 13/01/99 | JL Schwing | 1.14: Implement "-e string". ---------+--------------+------------------------------------------------------ 14/01/99 | JL Schwing | 1.15: Implement "-s ". ---------+--------------+------------------------------------------------------ 18/01/99 | JL Schwing | 1.16: Implement "-e randombase". ---------+--------------+------------------------------------------------------ 18/01/99 | JL Schwing | 1.17: Implement "-e v2". ---------+--------------+------------------------------------------------------ 21/01/99 | JL Schwing | 1.18: Implement "-e ascii". ---------+--------------+------------------------------------------------------ 26/01/99 | JL Schwing | 1.19: Implement "-e noloop". ---------+--------------+------------------------------------------------------ 28/01/99 | JL Schwing | 1.20: Implement "-T ". ---------+--------------+------------------------------------------------------ 04/05/99 | JL Schwing | 1.21: Implement operations list. ---------+--------------+------------------------------------------------------ 06/05/99 | JL Schwing | 1.25: Add proper shutdwon (wait for check threads). | Implement "-P ". ---------+--------------+------------------------------------------------------ 06/05/99 | JL Schwing | 1.26: Implement "-e modrdn". ---------+--------------+------------------------------------------------------ 06/05/99 | F. Pistolesi | 1.27: Some fixes. ---------+--------------+------------------------------------------------------ 07/05/99 | JL Schwing | 1.28: Some fixes. ---------+--------------+------------------------------------------------------ 19/05/99 | JL Schwing | 1.30: Implement "-e rename". | Set the threads status to DEAD when nb of opers done. | Lint-cleanup. ---------+--------------+------------------------------------------------------ 21/05/99 | JL Schwing | 1.31: Fix Unitialized Memory Read for head's mutex. ---------+--------------+------------------------------------------------------ 27/05/99 | JL Schwing | 1.32 : Add statistics to check threads. ---------+--------------+------------------------------------------------------ 28/05/99 | JL Schwing | 1.33 : Add new option -W (wait). ---------+--------------+------------------------------------------------------ 02/06/99 | JL Schwing | 1.34 : Add flag in main ctx to know if slave was | connected or not. | Add counter of operations received in check threads. ---------+--------------+------------------------------------------------------ 06/03/00 | JL Schwing | 1.35: Test malloc() and strdup() return value. ---------+--------------+------------------------------------------------------ 04/08/00 | JL Schwing | 1.36: Add stats on nb inactivity per thread. ---------+--------------+------------------------------------------------------ 08/08/00 | JL Schwing | 1.37: Print global statistics every 1000 loops. ---------+--------------+------------------------------------------------------ 18/08/00 | JL Schwing | 1.38: Print global statistics every 90 loops. | Bug fix in this new feature. | Print ldclt version. | Print date of begin and of end. | Add new function ldcltExit(). ---------+--------------+------------------------------------------------------ 25/08/00 | JL Schwing | 1.39: Implement consistent exit status... ---------+--------------+------------------------------------------------------ 25/08/00 | JL Schwing | 1.40: Will only load images if -e emailPerson ---------+--------------+------------------------------------------------------ 11/10/00 | B Kolics | 1.41: Implement "-Z certfile". ---------+--------------+------------------------------------------------------ 26/10/00 | B Kolics | 1.42: Move SSL client initialization to basicInit() ------------------------------------------------------------------------------- 07/11/00 | JL Schwing | 1.43: Add handlers for dynamic load of ssl-related | functions. | Add new function sslDynLoadInit(). ----------------------------------------------------------------------------- 07/11/00 | JL Schwing | 1.44: Implement "-e inetOrgPerson". ---------+--------------+------------------------------------------------------ 08/11/00 | JL Schwing | 1.45: Improve error message when initiating ssl. ---------+--------------+------------------------------------------------------ 13/11/00 | JL Schwing | 1.46: Add new options "-e randombaselow and ...high" | Made use of exit (EXIT_PARAMS) in main(). ---------+--------------+------------------------------------------------------ 14/11/00 | JL Schwing | 1.47: Port on AIX. ---------+--------------+------------------------------------------------------ 16/11/00 | JL Schwing | 1.48: Implement "-e imagesdir=path". ---------+--------------+------------------------------------------------------ 17/11/00 | JL Schwing | 1.49: Implement "-e smoothshutdown". | Forget to add mode decoding. | Add new function shutdownThreads(). ---------+--------------+------------------------------------------------------ 21/11/00 | JL Schwing | 1.50: Implement "-e attreplace=name:mask" | Add new function parseFilter(). ---------+--------------+------------------------------------------------------ 22/11/00 | JL Schwing | 1.51: Will now use LD_LIBRARY_PATH to load libssl. ---------+--------------+------------------------------------------------------ 24/11/00 | B Kolics | 1.52: Added SSL client authentication ---------+--------------+------------------------------------------------------ 29/11/00 | JL Schwing | 1.53: Port on NT 4. ---------+--------------+------------------------------------------------------ 30/11/00 | JL Schwing | 1.54: Bug fix - bad error message if -eimagesdir=path ---------+--------------+------------------------------------------------------ 01/12/00 | JL Schwing | 1.55: Port on Linux. ---------+--------------+------------------------------------------------------ 01/12/00 | JL Schwing | 1.56: Port on HP-UX. ---------+--------------+------------------------------------------------------ 07/12/00 | JL Schwing | 1.57: Bug fix - crash SIGBUS in main:1840 if no | filter is provided to the tool. | Build the argv list before parsing. ---------+--------------+------------------------------------------------------ 15/12/00 | JL Schwing | 1.58: Implement "-e counteach". | Implement "-e withnewparent". ---------+--------------+------------------------------------------------------ 18/12/00 | JL Schwing | 1.59: Fix an exit status problem. ---------+--------------+------------------------------------------------------ 18/12/00 | JL Schwing | 1.60: Minor fix/improvement in -I management. ---------+--------------+------------------------------------------------------ 19/12/00 | JL Schwing | 1.61: Implement "-e noglobalstats". ---------+--------------+------------------------------------------------------ 19/12/00 | JL Schwing | 1.62: Add comments. ---------+--------------+------------------------------------------------------ [...2667 lines suppressed...] s1ctx.cnxduration); /*JLS 12-01-01*/ ldcltExit (EXIT_PARAMS); /*JLS 12-01-01*/ } /*JLS 12-01-01*/ if (s1ctx.maxcnxnb <= 0) /*JLS 12-01-01*/ { /*JLS 12-01-01*/ fprintf (stderr, "Error : -e scalab01_maxcnxnb=%d <= 0\n",/*JLS 12-01-01*/ s1ctx.maxcnxnb); /*JLS 12-01-01*/ ldcltExit (EXIT_PARAMS); /*JLS 12-01-01*/ } /*JLS 12-01-01*/ if (s1ctx.wait <= 0) /*JLS 12-01-01*/ { /*JLS 12-01-01*/ fprintf (stderr, "Error : -e scalab01_wait=%d <= 0\n", /*JLS 12-01-01*/ s1ctx.wait); /*JLS 12-01-01*/ ldcltExit (EXIT_PARAMS); /*JLS 12-01-01*/ } /*JLS 12-01-01*/ } /*JLS 12-01-01*/ if ((mctx.referral == REFERRAL_REBIND) && /*JLS 14-03-01*/ ((mctx.bindDN == NULL) || (mctx.passwd == NULL))) /*JLS 14-03-01*/ { /*JLS 14-03-01*/ fprintf (stderr, "Error: -e referral=rebind needs -D and -w\n");/*14-03-01*/ ldcltExit (EXIT_PARAMS); /*JLS 14-03-01*/ } /*JLS 14-03-01*/ if ((mctx.mode & COMMON_COUNTER) && /*JLS 14-03-01*/ (!((mctx.mode & INCREMENTAL) || (mctx.mod2 & M2_OBJECT))))/*JLS 28-03-01*/ { /*JLS 14-03-01*/ fprintf (stderr, "Error: -e commoncounter needs -e incr or -e object\n"); ldcltExit (EXIT_PARAMS); /*JLS 14-03-01*/ } /*JLS 14-03-01*/ if ((mctx.attrlistNb != 0) && (!(mctx.mode & EXACT_SEARCH))) /*JLS 15-03-01*/ { /*JLS 15-03-01*/ fprintf(stderr,"Error : -e attrlist requires -e esearch\n");/*JLS 15-03-01*/ ldcltExit (EXIT_PARAMS); /*JLS 15-03-01*/ } /*JLS 15-03-01*/ if ((mctx.mod2 & M2_GENLDIF) && (mctx.mode & VALID_OPERS)) /*JLS 19-03-01*/ { /*JLS 19-03-01*/ fprintf(stderr,"Error : -e genldif is exclusive.\n"); /*JLS 19-03-01*/ ldcltExit (EXIT_PARAMS); /*JLS 19-03-01*/ } /*JLS 19-03-01*/ if ((mctx.mod2 & M2_RDN_VALUE) && (!(mctx.mod2 & M2_OBJECT))) /*JLS 23-03-01*/ { /*JLS 23-03-01*/ fprintf(stderr,"Error : -e rdn needs -e object.\n"); /*JLS 23-03-01*/ ldcltExit (EXIT_PARAMS); /*JLS 23-03-01*/ } /*JLS 23-03-01*/ /* * Maybe we should load ssl library ? */ if (mctx.mode & SSL) /*JLS 07-11-00*/ if (sslDynLoadInit() < 0) /*JLS 07-11-00*/ ldcltExit (EXIT_LOADSSL); /*JLS 07-11-00*/ /* * Basic initialization from the user's parameters/options */ if (basicInit() < 0) ldcltExit (EXIT_INIT); /*JLS 18-12-00*/ /* * What are we doing now... */ if (mctx.mode & VERBOSE) { printf ("%s\n", argvList); /*JLS 07-12-00*/ printf ("Process ID = %d\n", mctx.pid); printf ("Host to connect = %s\n", mctx.hostname); printf ("Port number = %d\n", mctx.port); if (mctx.bindDN == NULL) printf ("Bind DN = NULL\n"); else printf ("Bind DN = %s\n", mctx.bindDN); if (mctx.passwd == NULL) printf ("Passwd = NULL\n"); else printf ("Passwd = %s\n", mctx.passwd); switch (mctx.referral) /*JLS 08-03-01*/ { /*JLS 08-03-01*/ case REFERRAL_OFF: /*JLS 08-03-01*/ printf ("Referral = off\n"); /*JLS 08-03-01*/ break; /*JLS 08-03-01*/ case REFERRAL_ON: /*JLS 08-03-01*/ printf ("Referral = on\n"); /*JLS 08-03-01*/ break; /*JLS 08-03-01*/ case REFERRAL_REBIND: /*JLS 08-03-01*/ printf ("Referral = rebind\n"); /*JLS 08-03-01*/ break; /*JLS 08-03-01*/ } /*JLS 08-03-01*/ printf ("Base DN = %s\n", mctx.baseDN); if (mctx.filter == NULL) printf ("Filter = NULL\n"); else printf ("Filter = \"%s\"\n", mctx.filter); if (mctx.attrlistNb > 0) /*JLS 15-03-01*/ { /*JLS 15-03-01*/ printf ("Attributes list ="); /*JLS 15-03-01*/ for (i=0 ; i= 0)) /*JLS 28-03-01*/ printf ("Values range = [%d , %d]\n", mctx.randomLow, mctx.randomHigh); if ((mctx.mode & (RANDOM | INCREMENTAL)) && (!(mctx.mod2 & M2_RDN_VALUE))) /*JLS 23-03-01*/ { printf ("Filter's head = \"%s\"\n", mctx.randomHead); printf ("Filter's tail = \"%s\"\n", mctx.randomTail); } if (mctx.mode & RANDOM_BASE) { printf ("Base DN's head = \"%s\"\n", mctx.baseDNHead); printf ("Base DN's tail = \"%s\"\n", mctx.baseDNTail); printf ("Base DN's range = [%d , %d]\n", /*JLS 13-11-00*/ mctx.baseDNLow, mctx.baseDNHigh); /*JLS 13-11-00*/ } if (mctx.mode & RANDOM_BINDDN) /*JLS 05-01-01*/ { /*JLS 05-01-01*/ printf ("Bind DN's head = \"%s\"\n", mctx.bindDNHead);/*JLS 05-01-01*/ printf ("Bind DN's tail = \"%s\"\n", mctx.bindDNTail);/*JLS 05-01-01*/ printf ("Bind DN's range = [%d , %d]\n", /*JLS 05-01-01*/ mctx.bindDNLow, mctx.bindDNHigh); /*JLS 05-01-01*/ printf ("Bind passwd's head = \"%s\"\n", mctx.passwdHead);/*JLS 05-01-01*/ printf ("Bind passwd's tail = \"%s\"\n", mctx.passwdTail);/*JLS 05-01-01*/ } /*JLS 05-01-01*/ if (mctx.mode & ATTR_REPLACE) /*JLS 21-11-00*/ { /*JLS 21-11-00*/ printf ("Attribute's head = \"%s\"\n", mctx.attrplHead);/*JLS 21-11-00*/ printf ("Attribute's tail = \"%s\"\n", mctx.attrplTail);/*JLS 21-11-00*/ } /*JLS 21-11-00*/ if (mctx.mode & ASYNC) { printf ("Async max pending = %d\n", mctx.asyncMax); printf ("Async min pending = %d\n", mctx.asyncMin); } for (i=0 ; i 0) { printf ("Slave(s) to check ="); for (i=0 ; i". ---------+--------------+------------------------------------------------------ 18/01/99 | JL Schwing | 1.12: Implement "-e randombase". ---------+--------------+------------------------------------------------------ 18/01/99 | JL Schwing | 1.13: Implement "-e v2". ---------+--------------+------------------------------------------------------ 21/01/99 | JL Schwing | 1.14: Implement "-e ascii". ---------+--------------+------------------------------------------------------ 26/01/99 | JL Schwing | 1.15: Implement "-e noloop". ---------+--------------+------------------------------------------------------ 28/01/99 | JL Schwing | 1.16: Implement "-T ". ---------+--------------+------------------------------------------------------ 04/05/99 | JL Schwing | 1.17: Implement operations list. ---------+--------------+------------------------------------------------------ 06/05/99 | JL Schwing | 1.22: Implement "-e modrdn". ---------+--------------+------------------------------------------------------ 19/05/99 | JL Schwing | 1.25: Implement "-e rename". ---------+--------------+------------------------------------------------------ 27/05/99 | JL Schwing | 1.26 : Add statistics to check threads. ---------+--------------+------------------------------------------------------ 28/05/99 | JL Schwing | 1.27 : Add new option -W (wait). ---------+--------------+------------------------------------------------------ 02/06/99 | JL Schwing | 1.28 : Add flag in main ctx to know if slave was | connected or not. | Add counter of operations received in check threads. ---------+--------------+------------------------------------------------------ 04/08/00 | JL Schwing | 1.29: Add stats on nb inactivity per thread. ---------+--------------+------------------------------------------------------ 08/08/00 | JL Schwing | 1.30: Print global statistics every 1000 loops. ---------+--------------+------------------------------------------------------ 18/08/00 | JL Schwing | 1.31: Print global statistics every 15' | Print begin and end dates. ---------+--------------+------------------------------------------------------ 25/08/00 | JL Schwing | 1.32: Implement consistent exit status... ---------+--------------+------------------------------------------------------ 19/09/00 | JL Schwing | 1.33: Port on Netscape's libldap. This is realized in | such a way that this library become the default | way so a ifdef for Solaris will be used... ---------+--------------+---------------------------------------------------- 11/10/00 | B Kolics | 1.34: Added 'SSL' to the list of running modes and | | certfile to main_context structure ---------+--------------+------------------------------------------------------ 07/11/00 | JL Schwing | 1.35: Add handlers for dynamic load of ssl-related | functions. ----------------------------------------------------------------------------- 07/11/00 | JL Schwing | 1.36: Implement "-e inetOrgPerson". ---------+--------------+------------------------------------------------------ 13/11/00 | JL Schwing | 1.37: Add new options "-e randombaselow and ...high" ---------+--------------+------------------------------------------------------ 16/11/00 | JL Schwing | 1.38: Implement "-e imagesdir=path". | lint-cleanup. ---------+--------------+------------------------------------------------------ 17/11/00 | JL Schwing | 1.39: Implement "-e smoothshutdown". ---------+--------------+------------------------------------------------------ 21/11/00 | JL Schwing | 1.40: Implement "-e attreplace=name:mask" | Increase max number of threads from 512 to 1000. ---------+--------------+------------------------------------------------------ 22/11/00 | JL Schwing | 1.41: Will now use LD_LIBRARY_PATH to load libssl. ---------+--------------+------------------------------------------------------ 24/11/00 | JL Schwing | 1.41: Added SSL client authentication ---------+--------------+------------------------------------------------------ 28/11/00 | JL Schwing | 1.43: Port on NT 4. ---------+--------------+------------------------------------------------------ 15/12/00 | JL Schwing | 1.44: Add more trace in VERY_VERBOSE mode. ---------+--------------+------------------------------------------------------ 15/12/00 | JL Schwing | 1.45: Implement "-e counteach". | Implement "-e withnewparent". ---------+--------------+------------------------------------------------------ 18/12/00 | JL Schwing | 1.46: Add exit status EXIT_INIT and EXIT_RESSOURCE. ---------+--------------+------------------------------------------------------ 03/01/01 | JL Schwing | 1.47: Implement "-e attrsonly=value". ---------+--------------+------------------------------------------------------ 05/01/01 | JL Schwing | 1.48: Implement "-e randombinddn" and associated | "-e randombinddnlow/high" ---------+--------------+------------------------------------------------------ 08/01/01 | JL Schwing | 1.49: Implement "-e scalab01". ---------+--------------+------------------------------------------------------ 12/01/01 | JL Schwing | 1.50: Second set of options for -e scalab01 ---------+--------------+------------------------------------------------------ 06/03/01 | JL Schwing | 1.51: Change DEF_ATTRSONLY from 1 to 0 ---------+--------------+------------------------------------------------------ 08/03/01 | JL Schwing | 1.52: Change referrals handling. ---------+--------------+------------------------------------------------------ 14/03/01 | JL Schwing | 1.53: Implement "-e commoncounter" ---------+--------------+------------------------------------------------------ 14/03/01 | JL Schwing | 1.54: Implement "-e dontsleeponserverdown". ---------+--------------+------------------------------------------------------ 14/03/01 | JL Schwing | 1.55: Lint cleanup. ---------+--------------+------------------------------------------------------ 15/03/01 | JL Schwing | 1.56: Implement "-e attrlist=name:name:name" | Implement "-e randomattrlist=name:name:name" ---------+--------------+------------------------------------------------------ 19/03/01 | JL Schwing | 1.57: Implement "-e object=filename" | Implement "-e genldif=filename" ---------+--------------+------------------------------------------------------ 21/03/01 | JL Schwing | 1.58: Implements variables in "-e object=filename" ---------+--------------+------------------------------------------------------ 23/03/01 | JL Schwing | 1.59: Implements data file list support in variants. | Implements "-e rdn=value". ---------+--------------+------------------------------------------------------ 28/03/01 | JL Schwing | 1.60: Update options checking for "-e rdn=value". ---------+--------------+------------------------------------------------------ 28/03/01 | JL Schwing | 1.61: Support -e commoncounter with -e rdn/object | Increase MAX_ATTRIBS from 20 to 40 | Remove MAX_ATTRLIST - use MAX_ATTRIBS. ---------+--------------+------------------------------------------------------ 02/04/01 | JL Schwing | 1.62: Bug fix : large files support for -e genldif. ---------+--------------+------------------------------------------------------ 05/04/01 | JL Schwing | 1.63: Implement -e append. ---------+--------------+------------------------------------------------------ 11/04/01 | JL Schwing | 1.64: Implement [INCRFROMFILE(myfile)] ---------+--------------+------------------------------------------------------ 03/05/01 | JL Schwing | 1.64: Implement -e randombinddnfromfile=filename. ---------+--------------+------------------------------------------------------ 04/05/01 | JL Schwing | 1.65: Implement -e bindonly. ---------+--------------+------------------------------------------------------ */ #ifndef LDCLT_H #define LDCLT_H /* * Misc constant definitions */ #define DEF_ATTRSONLY 0 /* ldap_search() default */ /*JLS 06-03-01*/ #define DEF_GLOBAL_NB 90 /* Prt glob stats every 15' */ /*JLS 18-08-00*/ #define DEF_INACTIV_MAX 3 /* Inactivity max nb times */ #define DEF_MAX_ERRORS 1000 /* Max errors before exit */ #define DEF_NB_THREADS 10 /* Nb client threads */ #define DEF_PORT 389 /* Ldap server port */ #define DEF_SAMPLING 10 /* Default sampling rate */ #define DEF_TIMEOUT 30 /* Ldap operations timeout */ #define DEF_PORT_CHECK 16000 /* Port used for check processing */ #define MAX_ATTRIBS 40 /* Max number of attributes */ /*JLS 28-03-01*/ #define MAX_DN_LENGTH 1024 /* Max length for a DN */ #define MAX_ERROR_NB 0x62 /* Max ldap err number + 1 */ #define MAX_IGN_ERRORS 20 /* Max errors ignored */ #define MAX_FILTER 512 /* Max filters length */ #define MAX_THREADS 1000 /* Max number of threads */ /*JLS 21-11-00*/ #define MAX_SLAVES 20 /* Max number of slaves */ #define DEF_IMAGES_PATH "../../data/ldclt/images" #define DEF_REFERRAL REFERRAL_ON /*JLS 08-03-01*/ #define DEF_SCOPE LDAP_SCOPE_SUBTREE /* Default for -s */ #ifndef SSL_LIB #define SSL_LIB "libldapssl41.so" #endif #ifndef SSL_LIB_PATH #define SSL_LIB_PATH "/qa/ldap/tools/ldclt/src/lib-sparc/ldapcsdk" #endif /* * Referral choices... */ #define REFERRAL_OFF 0 /*JLS 08-03-01*/ #define REFERRAL_ON 1 /*JLS 08-03-01*/ #define REFERRAL_REBIND 2 /*JLS 08-03-01*/ /* * Running modes * Will be used as well for main_context and for thread_context * Don't forget to update dumpModeValues(). */ #define NOTHING 0x00000000 /* Nothing special */ #define VERBOSE 0x00000001 /* -v : verbose */ #define VERY_VERBOSE 0x00000002 /* -V : very verbose */ #define ASYNC 0x00000004 /* -a : asynchonous mode */ #define QUIET 0x00000008 /* -q : quiet */ #define SUPER_QUIET 0x00000010 /* -Q : super quiet */ #define SSL 0x00000020 /* -Z certfile :SSL enabled *//*BK 11-10-00*/ #define CLTAUTH 0x00000040 /* .... */ /* BK 23-11-00*/ /**/ #define RANDOM_ATTRLIST 0x00000080 /* -e randomattrlist*/ /*JLS 15-03-01*/ #define DONT_SLEEP_DOWN 0x00000100 /* -e dontsleeponserverdown*//*JLS 14-03-01*/ #define COMMON_COUNTER 0x00000200 /* -e commoncounter */ /*JLS 14-03-01*/ #define SCALAB01 0x00000400 /* -e scalab01 */ /*JLS 08-01-01*/ #define RANDOM_BINDDN 0x00000800 /* -e randombinddn */ /*JLS 05-01-01*/ #define WITH_NEWPARENT 0x00001000 /* -e withnewparent */ /*JLS 15-12-00*/ #define COUNT_EACH 0x00002000 /* -e counteach */ /*JLS 15-12-00*/ #define ATTR_REPLACE 0x00004000 /* -e attreplace */ /*JLS 21-11-00*/ #define SMOOTHSHUTDOWN 0x00008000 /* -e smoothshutdown */ /*JLS 17-11-00*/ #define OC_INETORGPRSON 0x00010000 /* -e inetOrgPerson : oc= */ /*JLS 07-11-00*/ #define RENAME_ENTRIES 0x00020000 /* -e rename : rename entries */ #define NOLOOP 0x00040000 /* -e noloop : don't loop nb */ #define ASCII_7BITS 0x00080000 /* -e ascii : ascii 7bits */ #define LDAP_V2 0x00100000 /* -e v2 : ldap v2 */ #define RANDOM_BASE 0x00200000 /* -e randombase : string mode */ #define STRING 0x00400000 /* -e string : string mode */ #define OC_EMAILPERSON 0x00800000 /* -e emailPerson : oc = person */ #define DELETE_ENTRIES 0x01000000 /* -e delete : delete */ #define OC_PERSON 0x02000000 /* -e person : oc = person */ #define ADD_ENTRIES 0x04000000 /* -e add : add entries */ #define INCREMENTAL 0x08000000 /* -e incr : incremental */ #define CLOSE_FD 0x10000000 /* -e close : close fd */ #define RANDOM 0x20000000 /* -e random : rnd values */ #define BIND_EACH_OPER 0x40000000 /* -e bindeach : bnd each op */ #define EXACT_SEARCH 0x80000000 /* -e esearch : exact srch */ #define M2_OBJECT 0x00000001 /* -e object */ /*JLS 19-03-01*/ #define M2_GENLDIF 0x00000002 /* -e genldif */ /*JLS 19-03-01*/ #define M2_RDN_VALUE 0x00000004 /* -e rdn */ /*JLS 23-03-01*/ #define M2_APPEND 0x00000008 /* -e append */ /*JLS 05-04-01*/ #define M2_RNDBINDFILE 0x00000010 /* -e randombinddnfromfile *//*JLS 03-05-01*/ #define M2_BINDONLY 0x00000020 /* -e bindonly */ /*JLS 04-05-01*/ /* * Combinatory defines * - NEED_FILTER : filter required * - NEED_RANGE : -r and -R required * - NEED_RND_INCR : need entry generator * - VALID_OPERS : valid operations */ #define NEED_FILTER (ADD_ENTRIES|DELETE_ENTRIES|EXACT_SEARCH|RENAME_ENTRIES|ATTR_REPLACE|SCALAB01) #define NEED_RANGE (INCREMENTAL|RANDOM) #define NEED_RND_INCR (ADD_ENTRIES|DELETE_ENTRIES|RENAME_ENTRIES) #define VALID_OPERS (ADD_ENTRIES|DELETE_ENTRIES|EXACT_SEARCH|RENAME_ENTRIES|ATTR_REPLACE|SCALAB01) #define M2_VALID_OPERS (M2_GENLDIF|M2_BINDONLY) #define NEED_CLASSES (ADD_ENTRIES) #define THE_CLASSES (OC_PERSON|OC_EMAILPERSON|OC_INETORGPRSON) /* * The threads status - check thread_context.status */ #define FREE -1 /* Slot is free */ #define CREATED 0 /* Just created */ #define INITIATED 1 /* Initiated */ #define RUNNING 2 /* Doing it's job */ #define DEAD 9 /* Thread is dead */ #define MUST_SHUTDOWN 10 /* Monitor command this */ /*JLS 17-11-00*/ /* * Exit status * The biggest is the number, the higher priority is. * Cf the end of monitorThem(). */ #define EXIT_OK 0 /* No problem during execution */ /*JLS 25-08-00*/ #define EXIT_PARAMS 2 /* Error in parameters */ /*JLS 25-08-00*/ #define EXIT_MAX_ERRORS 3 /* Max errors reached */ /*JLS 25-08-00*/ #define EXIT_NOBIND 4 /* Cannot bind */ /*JLS 25-08-00*/ #define EXIT_LOADSSL 5 /* Cannot load libssl */ /*JLS 07-11-00*/ #define EXIT_MUTEX 6 /* Mutex error */ /*JLS 17-11-00*/ #define EXIT_INIT 7 /* Initialization error */ /*JLS 18-12-00*/ #define EXIT_RESSOURCE 8 /* Ressource limitation */ /*JLS 18-12-00*/ #define EXIT_OTHER 99 /* Other kind of error */ /*JLS 25-08-00*/ /* * Some constants from Sun's ldap.h are not provided by * Netscape implementation... */ #ifdef SOLARIS_LIBLDAP /*JLS 19-09-00*/ #define WORKAROUND_4197228 1 /*JLS 19-09-00*/ #else /*JLS 19-09-00*/ #define LDAP_REQ_BIND 0x60 /*JLS 19-09-00*/ #define LDAP_REQ_UNBIND 0x42 /*JLS 19-09-00*/ #define LDAP_REQ_SEARCH 0x63 /*JLS 19-09-00*/ #define LDAP_REQ_MODIFY 0x66 /*JLS 19-09-00*/ #define LDAP_REQ_ADD 0x68 /*JLS 19-09-00*/ #define LDAP_REQ_DELETE 0x4a /*JLS 19-09-00*/ #define LDAP_REQ_MODRDN 0x6c /*JLS 19-09-00*/ #define LDAP_REQ_COMPARE 0x6e /*JLS 19-09-00*/ #define LDAP_REQ_ABANDON 0x50 /*JLS 19-09-00*/ #define LDAP_REQ_EXTENDED 0x77 /*JLS 19-09-00*/ #define LDAP_REQ_UNBIND_30 0x62 /*JLS 19-09-00*/ #define LDAP_REQ_DELETE_30 0x6a /*JLS 19-09-00*/ #define LDAP_REQ_ABANDON_30 0x70 /*JLS 19-09-00*/ #endif /*JLS 19-09-00*/ /* * This structure is the internal representation of an image */ typedef struct image { char *name; int length; char *data; } image; /* * Internal representation of a data list file */ typedef struct data_list_file { /*JLS 23-03-01*/ char *fname; /* File name */ char **str; /* Strings array */ int strNb; /* Nb of strings */ struct data_list_file *next; /* Next file */ } data_list_file; /* * This structure is the internal representation of an LDAP attribute */ typedef struct { char *type; /* e.g. "objectclass" or "cn" */ int length; /* Length of the value */ char *value; /* The attribute value */ int dontFree; /* Don't free the value */ } attribute; /* * This structure is used to memorize an operation successfully * performed by the tool in order to be checked later on. * The operation type is a LDAP constant LDAP_REQ_ADD, etc... * ATTENTION: don't forget to maintain in sync with the struct thoper below. */ typedef struct oper { int type; /* Operation type */ char *dn; /* Target's DN */ attribute attribs[MAX_ATTRIBS]; /* Attributes to check */ /* attribs[i].type == NULL marks the */ /* end of the attributes */ char *newRdn; /* For rename operation */ char *newParent; /* For rename operation */ int skipped; /* Thread that skipped it */ ldclt_mutex_t skipped_mutex; /* Protect skipped */ /*JLS 28-11-00*/ struct oper *next; /* Next operation */ } oper; /* * Same as before, but this is a per thread "lost" operation list */ typedef struct _simpl_op { int type; int first; /* Keeps in order replies */ char *dn; attribute attribs[MAX_ATTRIBS]; char *newRdn; char *newParent; struct _simpl_op *next; } thoper; /* * This structure will allow to manage the handlers for ssl-related * dynamic loaded functions. */ typedef struct ssl_context { /*JLS 07-11-00*/ #ifndef _WIN32 void *libssl; /* lib ssl handler */ /*JLS 07-11-00*/ LDAP *(*ldapssl_init)(const char *, int, int); /*JLS 07-11-00*/ int (*ldapssl_client_init)(const char*, void*); /*JLS 07-11-00*/ int (*ldapssl_clientauth_init)(char *, void *, int, char *, void*); /* BK 23-11-00*/ int (*ldapssl_enable_clientauth)(LDAP *, char *, char *, char *); /* BK 22-11-00*/ #else /* _WIN32 */ LDAP * (LDAP_CALL *ldapssl_init)(const char *, int, int); int (LDAP_CALL *ldapssl_client_init)(const char*, void*); int (LDAP_CALL *ldapssl_clientauth_init)(char *, void *, int, char *, void*); int (LDAP_CALL *ldapssl_enable_clientauth)(LDAP *, char *, char *, char *); #endif /* _WIN32 */ } ssl_context; /*JLS 07-11-00*/ /* * Versatile object attribute's field * - If ldclt should use a common counter, then this counter will * be in the mctx structure and will be found by the commonField * pointer. */ #define HOW_CONSTANT 0 /* Constant value */ #define HOW_INCR_FROM_FILE 1 /* Increment string from file *//*JLS 11-04-01*/ #define HOW_INCR_FROM_FILE_NL 2 /* Incr string file noloop*/ /*JLS 11-04-01*/ #define HOW_INCR_NB 3 /* Increment number */ /*JLS 23-03-01*/ #define HOW_INCR_NB_NOLOOP 4 /* Increment number no loop */ /*JLS 23-03-01*/ #define HOW_RND_FROM_FILE 5 /* Random string from file */ /*JLS 23-03-01*/ #define HOW_RND_NUMBER 6 /* Random number */ #define HOW_RND_STRING 7 /* Random string */ #define HOW_VARIABLE 8 /* Retrieve variable value */ /*JLS 21-03-01*/ typedef struct vers_field { /*JLS 21-03-01*/ int how; /* How to build this field */ int cnt; /* Counter */ /*JLS 23-03-01*/ ldclt_mutex_t cnt_mutex; /* Protect cnt */ /*JLS 28-03-01*/ struct vers_field *commonField; /* Common field */ /*JLS 28-03-01*/ char *cst; /* Constant field */ data_list_file *dlf; /* Data list file */ /*JLS 23-03-01*/ int high; /* High value */ int low; /* Low value */ int nb; /* Number of items */ int var; /* Variable number */ struct vers_field *next; /* Next field */ } vers_field; /* * Versatile object's attribute */ typedef struct vers_attribute { /*JLS 19-03-01*/ char *buf; /* Store the generated value */ /*JLS 21-03-01*/ char *name; /* Attribute name */ char *src; /* Source line */ vers_field *field; /* First field */ /*JLS 21-03-01*/ } vers_attribute; /* * This structure contains the definitions related to the versatile * object classes managed by ldclt. * The field 'rdn' of vers_object is a trick we will use to be * able to support the same random mechanism for the entry's rdn * generation than for the attributes themselves. */ #define VAR_MIN 'A' /*JLS 21-03-01*/ #define VAR_MAX 'H' /*JLS 21-03-01*/ typedef struct vers_object { /*JLS 19-03-01*/ vers_attribute attribs[MAX_ATTRIBS]; int attribsNb; vers_attribute *rdn; /* Object's rdn */ /*JLS 23-03-01*/ char *rdnName; /* Attrib. name */ /*JLS 23-03-01*/ char *var[VAR_MAX-VAR_MIN]; /*JLS 21-03-01*/ char *fname; /* Object definition */ } vers_object; /* * This structure contain the *process* context, used only by the * main thread(s). * Another dedicated structure is used by each test thread. */ typedef struct main_context { int asyncMin; /* Min pend for read */ int asyncMax; /* Max async pending */ char *attrlist[MAX_ATTRIBS]; /*JLS 15-03-01*/ int attrlistNb; /* Nb attrib in list */ /*JLS 15-03-01*/ char *attrpl; /* Attrib argument */ /*JLS 21-11-00*/ char *attrplHead; /* Attrib value head */ /*JLS 21-11-00*/ char *attrplName; /* Attrib name */ /*JLS 21-11-00*/ int attrplNbDigit; /* Attrib nb digits */ /*JLS 21-11-00*/ char *attrplTail; /* Attrib value tail */ /*JLS 21-11-00*/ int attrsonly; /* search() param. */ /*JLS 03-01-01*/ char *baseDN; /* Base DN to use */ int baseDNLow; /* Base DN's low val */ /*JLS 13-11-00*/ int baseDNHigh; /* Base DN's high val *//*JLS 13-11-00*/ int baseDNNbDigit; /* Base DN's nb of digits */ char *baseDNHead; /* Base DN's head string */ char *baseDNTail; /* Base DN's tail string */ char *bindDN; /* Bind DN */ int bindDNLow; /* Bind DN's low val */ /*JLS 05-01-01*/ int bindDNHigh; /* Bind DN's high val *//*JLS 05-01-01*/ int bindDNNbDigit; /* Bind DN's ndigits */ /*JLS 05-01-01*/ char *bindDNHead; /* Bind DN's head */ /*JLS 05-01-01*/ char *bindDNTail; /* Bind DN's tail */ /*JLS 05-01-01*/ char *certfile; /* certificate file */ /* BK 11-10-00 */ char *cltcertname; /* client cert name */ /* BK 23 11-00 */ data_list_file *dlf; /* Data list files */ /*JLS 23-03-01*/ int errors[MAX_ERROR_NB]; /* Err stats */ int errorsBad; /* Bad errors */ ldclt_mutex_t errors_mutex; /* Protect errors */ /*JLS 28-11-00*/ int exitStatus; /* Exit status */ /*JLS 25-08-00*/ char *filter; /* Filter for req. */ char *genldifName; /* Where to put ldif */ /*JLS 19-03-01*/ int genldifFile; /* Where to put ldif */ /*JLS 19-03-01*/ char *hostname; /* Host to connect */ int globStatsCnt; /* Global stats loop */ /*JLS 08-08-00*/ int ignErr[MAX_IGN_ERRORS]; /* Err ignor */ int ignErrNb; /* Nb err ignored */ image *images; /* The images */ char *imagesDir; /* Where are images */ /*JLS 16-11-00*/ int imagesNb; /* Nb of images */ int imagesLast; /* Last selected image */ ldclt_mutex_t imagesLast_mutex; /* Protect imagesLast */ int inactivMax; /* Allowed inactivity */ char *keydbfile; /* key DB file */ /* BK 23-11-00*/ char *keydbpin; /* key DB password */ /* BK 23-11-00*/ int lastVal; /* To build filters */ /*JLS 14-03-01*/ ldclt_mutex_t lastVal_mutex; /* Protect lastVal */ /*JLS 14-03-01*/ int maxErrors; /* Max allowed errors */ unsigned int mode; /* Running mode */ unsigned int mod2; /* Running mode - 2 */ /*JLS 19-03-01*/ int nbNoActivity; /* Nb times no activ. */ int nbSamples; /* Samples to get */ int nbThreads; /* Nb of client */ vers_object object; /* Object to generate *//*JLS 19-03-01*/ oper *opListTail; /* Tail of operation list */ ldclt_mutex_t opListTail_mutex; /* Protect opListTail */ char *passwd; /* Bind passwd */ int passwdNbDigit; /* Passwd's ndigits */ /*JLS 05-01-01*/ char *passwdHead; /* Passwd's head */ /*JLS 05-01-01*/ char *passwdTail; /* Passwd's tail */ /*JLS 05-01-01*/ int pid; /* Process ID */ int port; /* Port to use */ int randomLow; /* Rnd's low value */ int randomHigh; /* Rnd's high val */ int randomNbDigit; /* Rnd's nb of digits */ char *randomHead; /* Rnd's head string */ char *randomTail; /* Rnd's tail string */ data_list_file *rndBindDlf; /* Rnd bind file data *//*JLS 03-05-01*/ char *rndBindFname; /* Rnd bind file name *//*JLS 03-05-01*/ int referral; /* Referral followed */ /*JLS 08-03-01*/ int sampling; /* Sampling frequency */ int scope; /* Searches scope */ int slaveConn; /* Slave has connected */ char *slaves[MAX_SLAVES]; /* Slaves list */ int slavesNb; /* Number of slaves */ ssl_context sslctx; /* SSL dyn. load ctx */ /*JSL 07-11-00*/ int timeout; /* LDAP op. t.o. */ struct timeval timeval; /* Timeval structure */ struct timeval timevalZero; /* Timeout of zero */ int totalReq; /* Total requested */ int totNbOpers; /* Total opers number */ int totNbSamples; /* Total samples nb */ int waitSec; /* Wait between two operations */ } main_context; /* * This structure is aimed to ease the managing of asynchronous * operations, keeping in memory the msgid returned by the library and * a free string meaning something for the user. * It is targetted that this string is something like a DN, and is * locally managed by the list functions. */ typedef struct msgid_cell { LDAPMod **attribs; /* Attributes */ char dn[MAX_DN_LENGTH]; /* entry's dn */ int msgid; /* msg id */ char str[MAX_DN_LENGTH]; /* free str */ struct msgid_cell *next; /* next cell */ } msgid_cell; /* * This structure contain the context associated with each thread. * It is targetted to be initiated by the main thread, and maintained * by each thread. */ typedef struct thread_context { int active; /* thread is active */ int asyncHit; /* async max hit */ char *attrlist[MAX_ATTRIBS]; /*JLS 15-03-01*/ int binded; /* thread is binded */ int exitStatus; /* Exit status */ /*JLS 25-08-00*/ int fd; /* fd to the server */ int lastVal; /* To build filters */ LDAP *ldapCtx; /* LDAP context */ unsigned int mode; /* Running mode */ int nbInactRow; /* Nb inactive in row *//*JLS 04-08-00*/ int nbInactTot; /* Nb inactive total */ /*JLS 04-08-00*/ int nbOpers; /* Nb of operations */ ldclt_mutex_t nbOpers_mutex; /* Protect nbOpers */ /*JLS 28-11-00*/ vers_object *object; /* Template */ /*JLS 21-03-01*/ int pendingNb; /* Pending opers */ int status; /* Status */ ldclt_mutex_t status_mutex; /* Protect status */ /*JLS 28-11-00*/ ldclt_tid tid; /* Thread's id */ /*JLS 28-11-00*/ char thrdId[8]; /* This thread ident */ /*JLS 08-01-01*/ int thrdNum; /* This thread number */ int totOpers; /* Total nb operations */ int totalReq; /* Total nb operations requested */ /* * Now some convenient buffers ;-) */ char buf2 [MAX_FILTER]; char *bufObject1; /*JLS 19-03-01*/ char *bufAttrpl; /* Attribute replace */ /*JLS 21-11-00*/ char *bufBaseDN; /* Base DN to use */ char *bufBindDN; /* Bind DN to use */ /*JLS 05-01-01*/ char *bufFilter; /* Filter to use */ char *bufPasswd; /* Bind passwd to use *//*JLS 05-01-01*/ /* * Note about matcheddnp management. This pointer is managed by the * function dnFromMessage() that need it to free or remember the string * returned by the library. DO NOT manage this field another way. */ char *matcheddnp; /* See above */ /*JLS 15-12-00*/ int startAttrpl; /* Insert random here *//*JLS 21-11-00*/ int startBaseDN; /* Insert random here */ int startBindDN; /* Insert random here *//*JLS 05-01-01*/ int startPasswd; /* Insert random here *//*JLS 05-01-01*/ int startRandom; /* Insert random here */ msgid_cell *firstMsgId; /* pending messages */ msgid_cell *lastMsgId; /* last one */ } thread_context; /* * This structure gather the information used by a check thread */ typedef struct check_context { oper *headListOp; /* Head list of operation */ thoper *dcOper; /* Double check operation list */ char *slaveName; /* Name of the slave */ int sockfd; /* Socket fd after accept() */ int status; /* Status */ int thrdNum; /* Thread number */ int calls; /* Number of timeouts */ ldclt_tid tid; /* Thread's id */ /*JLS 28-11-00*/ int nbEarly; /* err = Early */ int nbLate; /* err = Late replica */ int nbLostOp; /* err = Lost op */ int nbNotOnList; /* err = Not on list */ int nbOpRecv; /* Nb operations received */ int nbRepFail32; /* err = Replica failed err=32 */ int nbRepFail68; /* err = Replica failed err=68 */ int nbRepFailX; /* err = Replica failed err=X */ int nbStillOnQ; /* err = still on Queue */ } check_context; /* * Extern declarations of global variables. */ extern main_context mctx; /* Main context */ extern thread_context tctx[]; /* Thread contextes */ extern check_context cctx[]; /* Check thread contextes */ /* * Extern functions prototypes (for exported functions) */ /* From ldclt.c */ extern void ldcltExit (int status); /*JLS 18-08-00*/ extern int printGlobalStatistics (void); /*JLS 16-11-00*/ /* From ldcltU.c */ extern void usage (void); /* From threadMain.c */ extern int addErrorStat (int err); extern int getThreadStatus (thread_context *tttctx, /*JLS 17-11-00*/ int *status); /*JLS 17-11-00*/ extern int ignoreError (int err); extern int incrementCommonCounter (thread_context *tttctx); /*14-03-01*/ extern int incrementCommonCounterObject ( /*JLS 28-03-01*/ thread_context *tttctx, /*JLS 28-03-01*/ vers_field *field); /*JLS 28-03-01*/ extern int incrementNbOpers (thread_context *tttctx); extern int msgIdAdd (thread_context *tttctx, int msgid, char *str, char *dn, LDAPMod **attribs); extern LDAPMod **msgIdAttribs (thread_context *tttctx, int msgid); extern int msgIdDel (thread_context *tttctx, int msgid, int freeAttr); extern char *msgIdDN (thread_context *tttctx, int msgid); extern char *msgIdStr (thread_context *tttctx, int msgid); extern int randomString (thread_context *tttctx, int nbDigits); extern char **selectRandomAttrList (thread_context *tttctx); /*JLS 15-03-01*/ extern int setThreadStatus (thread_context *tttctx, /*JLS 17-11-00*/ int status); /*JLS 17-11-00*/ extern void *threadMain (void *); /* From ldapfct.c */ extern int connectToServer (thread_context *tttctx); /*JLS 14-03-01*/ extern char *dnFromMessage (thread_context *tttctx, LDAPMessage *res); extern int doAddEntry (thread_context *tttctx); extern int doAttrReplace (thread_context *tttctx); /*JLS 21-11-00*/ extern int doBindOnly (thread_context *tttctx); /*JLS 04-05-01*/ extern int doDeleteEntry (thread_context *tttctx); extern int doExactSearch (thread_context *tttctx); extern int doGenldif (thread_context *tttctx); /*JLS 19-03-01*/ extern int doRename (thread_context *tttctx); extern int freeAttrib (LDAPMod **attrs); extern void ldclt_flush_genldif (void); /*JLS 02-04-01*/ extern char *my_ldap_err2string (int err); extern char **strList1 (char *str1); /*JLS 08-01-01*/ /* From data.c */ extern data_list_file *dataListFile (char *fname); /*JLS 23-03-01*/ extern int getImage (LDAPMod *attribute); extern int loadImages (char *dirpath); /* From workarounds.c */ extern int getFdFromLdapSession (LDAP *ld, int *fd); /* From opCheck.c */ extern int opAdd (thread_context *tttctx, int type, char *dn, LDAPMod **attribs, char *newRdn, char *newParent); extern void *opCheckMain (void *); extern void *opCheckLoop (void *); extern int opNext (check_context *ctctx, oper **op); extern int opRead (check_context *ctctx, int num, oper **op); /* From parser.c */ extern int parseAttribValue (char *fname, /*JLS 23-03-01*/ vers_object *obj, char *line, /*JLS 23-03-01*/ vers_attribute *attrib); /*JLS 23-03-01*/ extern int readObject (vers_object *obj); /*JLS 19-03-01*/ #endif /* LDCLT_H */ /* End of file */ --- NEW FILE ldclt.man --- #ident "ldclt @(#)ldclt.man 1.56 01/05/04" ldclt(1) SUNQAldap ldclt(1) NAME ldclt - ldap client for stress and reliability testing. SYNOPSIS ldclt [-qQvV] [-e ] [-t ] [-b ] [-h ] [-p ] [-D ] [-w ] [-n ] [-i ] [-N ] [-r -R ] [-a ] [-E ] [-I ] [-T ] [-f ] [-s ] [-S ] [-P] [-W ] [-Z ] AVAILABILITY SUNQAldap DESCRIPTION ldclt is a multi-threaded test tool targetted to stress a ldap server with multiple simultaneous requests. The tool automatically set its ulimit parameters to fit with the options. The tool uses a minimum of 16Mo of memory, and maybe more depending on the operations requested. A summary of global statistics regarding the operations performed, and the errors that occurs, is printed at the exit of the tool, as well as every 90 loops (15 minutes). http://www-icnc.france/~jls/icnc_qa_lab_faq_05.html#ldclt Mailing list : ldclt at france.sun.com Referrals By default, ldclt will let the ldap library try to follow referrals as anonymous. The option "-e referral=value" allows to change this behaviour : on : (default) follow as anonymous. off : do not follow. rebind : try to rebind with the same binDN and passwd. Search operation The option -e attrsonly=value is used to request or not the attributes values. It is recommanded to use ldclt with the the default value (== 0) of this option. Extract from the C-SDK documentation : 0 : both attribute types and attribute values are returned. 1 : only attribute types are returned. The options -e attrlist=name:name:name and similar option -e randomattrlist=name:name:name allows to specify which attributes are retrieved from the server. Error decoding The tool try to decode the error as much as possible, but sometimes not enough information is send back to the client. This happen if chaining the backend feature of DS 5.0 or more is used, when one of the farm servers is stopped. The error returned is "Operations error" without any more information in synchronous mode (except for the search). This is a problem resides in the libldap implementation of Solaris. Implementation note : This improvement is to retrieve the additional error string that is returned by the server. This is implemented for the asynchronous operations and for the synchronous search only, because for the other synchronous ops we should use ldap_get_lderrno() that is not implement in Solaris's libldap. Missing nodes The tool automatically create the missing nodes. These nodes are created using the DN and passwd given in argu- ments to ldclt, and thus it may be possible that the tool cannot initiate an empty database if it is not cn=admin, because only cn=admin may create the root entry. Note that when it occurs, the tool doesn't retry to create the original entry IF running *asynchronously*. Special consideration about rename entries : from the c-sdk function description, if the parent node of the new dn doesn't exist, the error returned LDAP_PROTOCOL_ERROR may report as well three other problems : - BER problem, unlike to happen - newrdn is invalid, also unlike to happen - ldclt is not running ldap v3 - ok, we could leave with this issue. - the newparent is invalid. I thing that we could take this for "doesn't exist"... The current version of this tool recognize the following naming attributes: cn organizationalRole o organization ou organizationalUnit Close(fd) vs ldap_unbind(ld) The option "-e bindeach" made the tool to release the connection to the server after each operation being processed. This is intended to simulate many clients doing quick operations. Without any other option, the connection is properly released with a ldap_unbind(ld), but if the additional option "-e close" is used, the socket with the server is close() simulating a suddent exit of the client process. Random This feature is activated by the option "-e random". When used with filters, the tool will seek the given filters for the first sequence of 'X' and will take this as the place where the random numbers should be put. The span of the random numbers generated is given by the options -r and -R. For example, if the tool is called with the options: -f mail=a0000XXXXXX at sympatico.ca -e random -r0 \ -R 9000000 the following filters will be generated: mail=a0000492027 at sympatico.ca mail=a0000001941 at sympatico.ca mail=a0000075117 at sympatico.ca mail=a0000589623 at sympatico.ca mail=a0000283543 at sympatico.ca mail=a0000051688 at sympatico.ca etc... The same feature may be applied to the base DN, and is activated by the options "-e randombase", "-e randombaselow=value" and "-e randombasehigh=value". The same feature may be applied to the bind DN, and is activated by the options "-e randombinddn", "-e randombinddnlow=value", "-e randombinddnhigh=value". Incremental This feature is activated by the option "-e incr", and is similar to the "Random" feature described above. It will replace the 'X' partern by incremental numbers starting by the value of "-r" and ending with "-R". When the top value is reached, return back to the lower value. The option "-e noloop" will prevent ldclt from looping the numbers: when the -R value is reached, the thread dies. The option "-e commoncounter" will made all the threads use the same counter rather than each thread having its own private counter. This may be used for example to have many threads adding entries without "collisions". String This feature is activated by the option "-e string", and will make this tool generates random strings for the 'X' partern rather than random numbers. This option is only valid with the mode "-e random", and will be applied as well to the base DN if "-e randombase" is set, and to the bind DN and bind password if the option "-e randombinddn" is set. The option "-e ascii" will produce characters less than 0x7f, otherwise UTF-8 will be produced. Signals The signal SIGINT (^C or kill -2) is trapped to perform a smooth exit of the tool, with statistics report. The signal SIGQUIT (^\ or kill -3) is trapped to issue the current statistics numbers, but without exiting the tool. Entry generator If you do not want to use the hard-coded object classes person/emailPerson/inetOrgPerson (see below), you may use the option "-e object=filename" to give ldclt a template to build the entries. The same syntax may be used for the option "-e rdn=value" including variables. The RDN is build first and you may retrieve the variables you defined in it for the object. You could use the option -e commoncounter with the entry generator. When used, all the variants INCRNNOLOOP or INCRN will share the same counter (if you are using three times one of these variants, three different counters will be used). The option -e commoncounter is also compatible with the variants INCRFROMFILE and INCRFROMFILENOLOOP. File grammar : # Comment start with a '#' # LINE = ATTRIBUTE_NAME: FIELD+ ATTRIBUTE_NAME = constant_string FIELD = constant_string | VARIANT VARIANT = [VAR=VDEF] | [VAR] | [VDEF] VAR = letter A to H VDEF = see below The keywords and associated args are listed below. Note that the separator is ';' and not ','. INCRFROMFILE(file_name) Will select each entry of file_name in sequence. After the last entry, will reset the index for to process again the first entry. INCRFROMFILENOLOOP(file_name) Will select each entry of file_name in sequence. After the last entry, the thread will exit. INCRN(low;hign;nb) Increment a counter that will go from low to high, and will loop to restart with low. This counter is VARIANT-specific. Similar to "-e incr". INCRNNOLOOP(low;high;nb) Same as INCRN, except that the thread will exit when reaching the value high (after processing of this value). Similar to "-e incr,noloop". RNDFROMFILE(file_name) Select a random string from the file. One entry per line is expected. RNDN(low;high;length) Build a random number of length digits, value selected from low to high. RNDS(lenght) Build a random string. Here is an example of template file : # Example. # objectclass: person sn: mr [RNDS(12)] final description: blob [RNDN(1,5,6)] blib Resulting entries : dn: cn=mr00000,ou=object,o=test.com cn: mr00000 objectclass: person sn: mr 2[kK-:9)_(qv final description: blob 000005 blib dn: cn=mr00001,ou=object,o=test.com cn: mr00001 objectclass: person sn: mr Jwf01XrZs.mt final description: blob 000002 blib Person Activated by "-e person" and valid only for the "-e add" feature, the new entries are of the objectclass=person as described here: EmailPerson Activated by "-e emailPerson" and valid only for the "-e add" feature, the new entries are of the objectclass= emailPerson as described here. These entries contain a jpegPhoto attribute, and thus are very big entries. The jpeg image itself is randomly (in fact: sequencially) selected from /opt/SUNQA/ldap/lib/images/*.jpg or in the directory specified by -e imagesdir=path. InetOrgPerson Activated by "-e inetOrgPerson", it is the Netscape version of emailPerson. Scalab01 scenario This scenario is activated by the "-e scalab01" and is a special evolution of ldclt for the purpose of the system tests "scalab01". This scenario simulates a modem pool that uses LDAP to store information about users, as well as to autheticate them by binding. The associated options are : -e scalab01 Activate this scenario. -e scalab01_cnxduration Specifies the maximum cnx duration in seconds. Default value is 3600 seconds. -e scalab01_maxcnxnb Modem pool size. Default size if 5000. -e scalab01_wait Sleep() in seconds while to attempts to connect. Default value is 10 seconds. OPTIONS The valid options are: -a Asynchronous mode. When used, the tool will issue asynchronous requests, with a maximum number of pending requests (aka results non-read). There is a threshold at "max pending / 2" giving the minimum number of pending operations needed to read the answers from the server. Each thread will process with the same algorythm, each having the same thresholds. -b Specify the base DN to use. Default "o=sun,c=us". -D Bind DN. See -w for the password. You could use the option "-e randombinddn" to randomize the bind DN. Read below in -e options for the details. -e Execution parameters. This option is used to select the kind of tests that should be run. It is possible to specify more than one value (see example below). The valid values are: add Add entries. append Append new entries to genldif file. See also -e genldif. ascii Ascii 7-bits strings. attreplace=name:mask Will replace the attribute "name" with a random string value build using the mask i.e. : attreplace=sn:"mr XXXX Jr" Note : You DO NOT need to use -e random nor -e string with this option. attrlist=name:name:name Specify the list of attributes to retrieve. See also -e randomattrlist. attrsonly=0|1 This ldap_search() parameter means : 0 specifies that both attribute types and attribute values are returned and 1 specifies that only attribute types are returned. Default value : 0 bindeach Bind for each operation. bindonly ldclt will only perform ldap_bind() and ldap_unbind() or close() depending on the options. See also -e close. close Will disconnect from the server by a close() on the fd, rather than by a ldap_unbind(). cltcertname=certificate_name Use certificate_name for SSL client authentication. The certificate database is specified with the -Z option. SSL client authentication requires the option -Z and cltcertname, keydbfile, keydbpin execution parameters to be specified. commoncounter Valid only with -e incr or -e object. All the threads will use the same counter, i.e. T000 will process entry n, T001 entry n+1, etc... When used with an object (-e object) or within a rdn (-e rdn), a common counter will be used for each variant field INCRN or INCRNNOLOOP. Each field will have its own common counter. counteach To count each operation, and not only the ones that succeed. Without this option, an add request with result 68==LDAP_ALREADY_EXISTS is not counted, that may mislead the statistics about the thread's activity. The changes are that we will count as a valid request : - add ==> LDAP_ALREADY_EXISTS - delete ==> LDAP_NO_SUCH_OBJECT - rename ==> LDAP_ALREADY_EXISTS LDAP_NO_SUCH_OBJECT LDAP_PROTOCOL_ERROR - search ==> LDAP_NO_SUCH_OBJECT delete ldap_delete() entries. dontsleeponserverdown By default, ldclt sleep 1 second when occurs an error like 81 or 91 (i.e. server down). This should avoid ldclt looping when server is down, otherwise it may take 100% of all 10 CPUs of a E6000. Basically, the client machine is down if this happen. emailPerson The new entries objectclass is emailPerson. See details above in DESCRIPTION. esearch Exact search. No wildcards expected in the filter. genldif=filename Create a ldif file using ldclt entry generator. See also -e append. imagesdir= The images are taken from the given path rather than from the default directory : /opt/SUNQA/ldap/lib/images incr Incremental values, from -r to -R values When -R is reached, go back to -r. See also -e commoncounter. inetOrgPerson The new entries objectclass is inetOrgPerson. See details above in DESCRIPTION. keydbfile=key_DB_filename The file name of the key database. SSL client authentication requires the option -Z and cltcertname, keydbfile, keydbpin execution parameters to be specified. keydbpin=key_DB_password Password required for accessing the key database specified in keydbfile execution parameter. SSL client authentication requires the option -Z and cltcertname, keydbfile, keydbpin execution parameters to be specified. noglobalstats Don't print the periodical global stats (by default : every 90 loops). noloop Does not loop the numbers. Cf the option "-e incr". object=filename Entries will be created using template from the given file. See details above in DESCRIPTION. See "-e rdn=attrname:value". person The new entries objectclass is person. See details in DESCRIPTION. random Random filters, etc... generation. See details above in this tool description. randomattrlist=name:name:name Specify the list of attributes from which ldclt will randomly select one to be retrieved. See also -e attrlist. randombase Random base DN generation. randombaselow= Low value range for random base DN. randombasehigh= High value range for random base DN. randombinddn Random bind DN and bind password generation. When used, this option will produce a random value that will be used to randomize the bind DN and password with the same random value. e.g. cn=m123 and passwd123 will be generated. If you want to have fix password (the same password) for each bind DN, just no 'X' in the password. randombinddnfromfile=filename A bind DN and its corresponding password will be randomly selected from the given file. Each line must contain the bind DN and password, separated by one or more tabs. Leading & trailing spaces are not ignored. Exclusive with -e randombinddn and with -D / -w. randombinddnlow= Low value range for random bind DN. randombinddnhigh= High value range for random bind DN. rdn=attrname:value Similar to the option "-f filterspec", this feature allow to use the full power of the entry generator (see DESCRIPTION) to build the rdn of the entry that will be processed. Requires "-e object=". Exclusive with -f. referral=value Change referral behaviour. See details above in the DESCRIPTION section. rename Rename entries (aka modrdn). See also -e withnewparent. scalab01 Activates the scalab01 scenario. Please read the corresponding section above for the other associated options and behaviour. string Will generate random strings rather than numbers. See details above in the string sub-section. v2 Ldap v2 mode. withnewparent The ldap_rename() will be called with a newparent argument. By default, only the new rdn is specified. This option is valid only with -e rename. -E Specify the maximum number of times one error may occur. It is usefull to detect a big problem on the server side, and to exit the tool. The default value is 1000. -f Filter for searches. The syntax is the same as specified in ldap's RFCs. See option "-e rdn=attrname:value". -h Host to connect. Default "localhost". -i Number of times inactivity allowed. The tool ensure that no thread is starving, i.e. expect that all the threads should perform at least one operation every 10 seconds. This parameter gives the number of times a thread may be starving before releasing an alert message. The default value is 3 (30 seconds). -I The tool will ignore the errors the same number as the ones specified with -I. These errors may be for example: 32 : No such object - when -e random,delete 68 : Already exists - when -e random,add When used, this option will configure ldclt to ignore/support these errors during the ldap_bind to the server. Otherwise, any error that happen during the connection is a fatal error for the thread where it occurs. Note that although ldclt support a certain level of errors during connection, any error that happen while creating missing nodes is a fatal error. -n Number of threads. Each thread is a ldap client for the ldap server under test. The maximum number of threads is system-dependand, and is of 1000 threads. The default number is 10 threads. -N Number of samples (10 seconds each). It is the time the tool should run. A value of 360 means 360 samples of 10 seconds, i.e. 3600 seconds of testing (one hour). Default infinite. -p Server port. Default port 389. -P This is the port used to communicate with the slaves in order to check the replication. -q Quiet mode. When used, the errors of the option -I are not printed. The messages "Intermediate nodes created for xxx" are not printed either. -Q Super quiet mode. In addition to -q, the following messages are not printed: Max pending request hit. No activity for %d seconds. Restart sending. -r Range's low value. -R Range's high value. -s Valid only for searches. May be base, subtree or one. The default value is subtree. -S The slave host given in argument will be under monitoring to ensure that the operations performed on the server are well realized on the given slave. This option may be used more than one time to indicate more than one slave. -t LDAP operations timeout. Default 30 seconds. -T Total number of operations requested per thread before exit. When used, this parameter will cause each thread to exit when this number of operations is reached. -v Verbose. -V Very verbose. -w Bind passwd. See option -D. -W Wait between two operations. Default=0 seconds. -Z Establish secure communication with the server over SSL using certfile as the certificate database. EXIT STATUS ldclt exit status may be : 0 : no problem during execution. 1 : please report this to me - shouldn't happen !! 2 : error in parameters. 3 : max errors reached. 4 : cannot bind. 5 : cannot load libssl. 6 : mutex error. 7 : initialization problem. 8 : ressource limitation (malloc, etc...). 99 : other kind of error - please report to me. EXAMPLES jls at chronos$ ldclt -v \ -h aegir -e esearch,random \ -r0 -R900000 \ -bo=Sympatico,c=CA \ -fmail=a0000XXXXXX at sympatico.ca \ -ebindeach -n230 -i6 Host to connect = aegir Port number = 389 Bind DN = NULL Passwd = NULL Base DN = o=Sympatico,c=CA Filter = mail=a0000XXXXXX at sympatico.ca Max times inactive = 6 Number of samples = 20 Number of threads = 5 Running mode = 0x0000001d Sampling interval = 10 sec Random range = [0 , 900000] Filter's head = mail=a0000 Filter's tail = @sympatico.ca Average rate: 9.98/thr (229.50/sec), total: 2295 Average rate: 10.13/thr (233.00/sec), total: 2330 Average rate: 10.05/thr (231.10/sec), total: 2311 Average rate: 10.17/thr (233.80/sec), total: 2338 Average rate: 9.99/thr (229.80/sec), total: 2298 ^CCatch SIGINT - exit... jls at chronos$ NOTES This tool doesn't retry to create the original entry when the creation of the missing nodes is activated. This is a known missing feature of the asynchronous mode. Please read the file "History" delivered with this tool for more information about new features, todo list, etc. IMPORTANT NOTE : you may specify a filter that return lot of entries (e.g. : -f "cn=*") but you should then know that such filters leads to retrieve a lot of data from the server. These data are malloc() and free() by ldclt and the ldap C library, but as you may have many threads running at the same time in ldclt, you will have many times these data allocated, leading to a *very) big ldclt process, even more than 1Gb. It is not a memory leak but rather allocation of lot of data. If you want the server to retrieve a lot of data from its database and however limit the ressources required by ldclt, use the option "-e attrsonly=1". AUTHORS Jean-Luc Schwing Fabio Pistolesi : replication check. Bertold Kolics : SSL. --- NEW FILE ldclt.use --- usage: ldclt [-qQvV] [-E ] [-b ] [-h ] [-p ] [-t ] [-D ] [-w ] [-e ] [-a ] [-n ] [-i ] [-N ] [-I ] [-T ] [-r -R ] [-f ] [-s ] [-S ] [-P] [-W ] [-Z ] This tool is a ldap client targetted to validate the reliability of the product under test under hard use. The valid options are: -a Asynchronous mode, with max pending operations. -b Give the base DN to use. Default "o=sun,c=us". -D Bind DN. See -w -E Max errors allowed. Default 1000. -e Execution parameters: add : ldap_add() entries. append : append entries to the genldif file. ascii : ascii 7-bits strings. attreplace=name:mask : replace attribute of existing entry. attrlist=name:name:name : specify list of attribs to retrieve attrsonly=0|1 : ldap_search() parameter. Set 0 to read values. bindeach : ldap_bind() for each operation. bindonly : only bind/unbind, no other operation is performed. close : will close() the fd, rather than ldap_unbind(). cltcertname=name : name of the SSL client certificate commoncounter : all threads share the same counter. counteach : count each operation not only successful ones. delete : ldap_delete() entries. dontsleeponserverdown : will loop very fast if server down. emailPerson : objectclass=emailPerson (-e add only). esearch : exact search. genldif=filename : generates a ldif file imagesdir=path : specify where are the images. incr : incremental values. inetOrgPerson : objectclass=inetOrgPerson (-e add only). keydbfile=file : filename of the key database keydbpin=password : password for accessing the key database noglobalstats : don't print periodical global statistics noloop : does not loop the incremental numbers. object=filename : build object from input file person : objectclass=person (-e add only). random : random filters, etc... randomattrlist=name:name:name : random select attrib in the list randombase : random base DN. randombaselow=value : low value for random generator. randombasehigh=value : high value for random generator. randombinddn : random bind DN. randombinddnfromfile=fine : retrieve bind DN & passwd from file randombinddnlow=value : low value for random generator. randombinddnhigh=value : high value for random generator. rdn=attrname:value : alternate for -f. referral=on|off|rebind : change referral behaviour. scalab01 : activates scalab01 scenario. scalab01_cnxduration : maximum connection duration. scalab01_maxcnxnb : modem pool size. scalab01_wait : sleep() between 2 attempts to connect. string : create random strings rather than random numbers. v2 : ldap v2. withnewparent : rename with newparent specified as argument. -f Filter for searches. -h Host to connect. Default "localhost". -i Number of times inactivity allowed. Default 3 (30 seconds) -I Ignore errors (cf. -E). Default none. -n Number of threads. Default 10. -N Number of samples (10 seconds each). Default infinite. -p Server port. Default 389. -P Master port (to check replication). Default 16000. -q Quiet mode. See option -I. -Q Super quiet mode. -r Range's low value. -R Range's high value. -s Scope. May be base, subtree or one. Default subtree. -S Slave to check. -t LDAP operations timeout. Default 30 seconds. -T Total number of operations per thread. Default infinite. -v Verbose. -V Very verbose. -w Bind passwd. See -D. -W Wait between two operations. Default 0 seconds. -Z certfile. Turn on SSL and use certfile as the certificate DB --- NEW FILE ldcltU.c --- /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #include /* * usage: ldclt [-qQvV] [-E ] * [-b ] [-h ] [-p ] [-t ] * [-D ] [-w ] * [-e ] [-a ] * [-n ] [-i ] [-N ] * [-I ] [-T ] * [-r -R ] * [-f ] [-s ] * [-S ] [-P] * [-W ] [-Z ] * * This tool is a ldap client targetted to validate the reliability of * the product under test under hard use. * * The valid options are: * -a Asynchronous mode, with max pending operations. * -b Give the base DN to use. Default "o=sun,c=us". * -D Bind DN. See -w * -E Max errors allowed. Default 1000. * -e Execution parameters: * add : ldap_add() entries. * append : append entries to the genldif file. * ascii : ascii 7-bits strings. * attreplace=name:mask : replace attribute of existing entry. * attrlist=name:name:name : specify list of attribs to retrieve * attrsonly=0|1 : ldap_search() parameter. Set 0 to read values. * bindeach : ldap_bind() for each operation. * bindonly : only bind/unbind, no other operation is performed. * close : will close() the fd, rather than ldap_unbind(). * cltcertname=name : name of the SSL client certificate * commoncounter : all threads share the same counter. * counteach : count each operation not only successful ones. * delete : ldap_delete() entries. * dontsleeponserverdown : will loop very fast if server down. * emailPerson : objectclass=emailPerson (-e add only). * esearch : exact search. * genldif=filename : generates a ldif file * imagesdir=path : specify where are the images. * incr : incremental values. * inetOrgPerson : objectclass=inetOrgPerson (-e add only). * keydbfile=file : filename of the key database * keydbpin=password : password for accessing the key database * noglobalstats : don't print periodical global statistics * noloop : does not loop the incremental numbers. * object=filename : build object from input file * person : objectclass=person (-e add only). * random : random filters, etc... * randomattrlist=name:name:name : random select attrib in the list * randombase : random base DN. * randombaselow=value : low value for random generator. * randombasehigh=value : high value for random generator. * randombinddn : random bind DN. * randombinddnfromfile=fine : retrieve bind DN & passwd from file * randombinddnlow=value : low value for random generator. * randombinddnhigh=value : high value for random generator. * rdn=attrname:value : alternate for -f. * referral=on|off|rebind : change referral behaviour. * scalab01 : activates scalab01 scenario. * scalab01_cnxduration : maximum connection duration. * scalab01_maxcnxnb : modem pool size. * scalab01_wait : sleep() between 2 attempts to connect. * smoothshutdown : main thread waits till the worker threads exit. * string : create random strings rather than random numbers. * v2 : ldap v2. * withnewparent : rename with newparent specified as argument. * -f Filter for searches. * -h Host to connect. Default "localhost". * -i Number of times inactivity allowed. Default 3 (30 seconds) * -I Ignore errors (cf. -E). Default none. * -n Number of threads. Default 10. * -N Number of samples (10 seconds each). Default infinite. * -p Server port. Default 389. * -P Master port (to check replication). Default 16000. * -q Quiet mode. See option -I. * -Q Super quiet mode. * -r Range's low value. * -R Range's high value. * -s Scope. May be base, subtree or one. Default subtree. * -S Slave to check. * -t LDAP operations timeout. Default 30 seconds. * -T Total number of operations per thread. Default infinite. * -v Verbose. * -V Very verbose. * -w Bind passwd. See -D. * -W Wait between two operations. Default 0 seconds. * -Z certfile. Turn on SSL and use certfile as the certificate DB */ void usage () { (void) printf ("\n"); (void) printf ("usage: ldclt [-qQvV] [-E ]\n"); (void) printf (" [-b ] [-h ] [-p ] [-t ]\n"); (void) printf (" [-D ] [-w ]\n"); (void) printf (" [-e ] [-a ]\n"); (void) printf (" [-n ] [-i ] [-N ]\n"); (void) printf (" [-I ] [-T ]\n"); (void) printf (" [-r -R ]\n"); (void) printf (" [-f ] [-s ]\n"); (void) printf (" [-S ] [-P]\n"); (void) printf (" [-W ] [-Z ]\n"); (void) printf ("\n"); (void) printf (" This tool is a ldap client targetted to validate the reliability of\n"); (void) printf (" the product under test under hard use.\n"); (void) printf ("\n"); (void) printf (" The valid options are:\n"); (void) printf (" -a Asynchronous mode, with max pending operations.\n"); (void) printf (" -b Give the base DN to use. Default \"o=sun,c=us\".\n"); (void) printf (" -D Bind DN. See -w\n"); (void) printf (" -E Max errors allowed. Default 1000.\n"); (void) printf (" -e Execution parameters:\n"); (void) printf (" add : ldap_add() entries.\n"); (void) printf (" append : append entries to the genldif file.\n"); (void) printf (" ascii : ascii 7-bits strings.\n"); (void) printf (" attreplace=name:mask : replace attribute of existing entry.\n"); (void) printf (" attrlist=name:name:name : specify list of attribs to retrieve\n"); (void) printf (" attrsonly=0|1 : ldap_search() parameter. Set 0 to read values.\n"); (void) printf (" bindeach : ldap_bind() for each operation.\n"); (void) printf (" bindonly : only bind/unbind, no other operation is performed.\n"); (void) printf (" close : will close() the fd, rather than ldap_unbind().\n"); (void) printf (" cltcertname=name : name of the SSL client certificate\n"); (void) printf (" commoncounter : all threads share the same counter.\n"); (void) printf (" counteach : count each operation not only successful ones.\n"); (void) printf (" delete : ldap_delete() entries.\n"); (void) printf (" dontsleeponserverdown : will loop very fast if server down.\n"); (void) printf (" emailPerson : objectclass=emailPerson (-e add only).\n"); (void) printf (" esearch : exact search.\n"); (void) printf (" genldif=filename : generates a ldif file\n"); (void) printf (" imagesdir=path : specify where are the images.\n"); (void) printf (" incr : incremental values.\n"); (void) printf (" inetOrgPerson : objectclass=inetOrgPerson (-e add only).\n"); (void) printf (" keydbfile=file : filename of the key database\n"); (void) printf (" keydbpin=password : password for accessing the key database\n"); (void) printf (" noglobalstats : don't print periodical global statistics\n"); (void) printf (" noloop : does not loop the incremental numbers.\n"); (void) printf (" object=filename : build object from input file\n"); (void) printf (" person : objectclass=person (-e add only).\n"); (void) printf (" random : random filters, etc...\n"); (void) printf (" randomattrlist=name:name:name : random select attrib in the list\n"); (void) printf (" randombase : random base DN.\n"); (void) printf (" randombaselow=value : low value for random generator.\n"); (void) printf (" randombasehigh=value : high value for random generator.\n"); (void) printf (" randombinddn : random bind DN.\n"); (void) printf (" randombinddnfromfile=fine : retrieve bind DN & passwd from file\n"); (void) printf (" randombinddnlow=value : low value for random generator.\n"); (void) printf (" randombinddnhigh=value : high value for random generator.\n"); (void) printf (" rdn=attrname:value : alternate for -f.\n"); (void) printf (" referral=on|off|rebind : change referral behaviour.\n"); (void) printf (" scalab01 : activates scalab01 scenario.\n"); (void) printf (" scalab01_cnxduration : maximum connection duration.\n"); (void) printf (" scalab01_maxcnxnb : modem pool size.\n"); (void) printf (" scalab01_wait : sleep() between 2 attempts to connect.\n"); (void) printf (" smoothshutdown : main thread waits till the worker threads exit.\n"); (void) printf (" string : create random strings rather than random numbers.\n"); (void) printf (" v2 : ldap v2.\n"); (void) printf (" withnewparent : rename with newparent specified as argument.\n"); (void) printf (" -f Filter for searches.\n"); (void) printf (" -h Host to connect. Default \"localhost\".\n"); (void) printf (" -i Number of times inactivity allowed. Default 3 (30 seconds)\n"); (void) printf (" -I Ignore errors (cf. -E). Default none.\n"); (void) printf (" -n Number of threads. Default 10.\n"); (void) printf (" -N Number of samples (10 seconds each). Default infinite.\n"); (void) printf (" -p Server port. Default 389.\n"); (void) printf (" -P Master port (to check replication). Default 16000.\n"); (void) printf (" -q Quiet mode. See option -I.\n"); (void) printf (" -Q Super quiet mode.\n"); (void) printf (" -r Range's low value.\n"); (void) printf (" -R Range's high value.\n"); (void) printf (" -s Scope. May be base, subtree or one. Default subtree.\n"); (void) printf (" -S Slave to check.\n"); (void) printf (" -t LDAP operations timeout. Default 30 seconds.\n"); (void) printf (" -T Total number of operations per thread. Default infinite.\n"); (void) printf (" -v Verbose.\n"); (void) printf (" -V Very verbose.\n"); (void) printf (" -w Bind passwd. See -D.\n"); (void) printf (" -W Wait between two operations. Default 0 seconds.\n"); (void) printf (" -Z certfile. Turn on SSL and use certfile as the certificate DB\n"); (void) printf ("\n"); } /* usage() */ /* End of file */ --- NEW FILE opCheck.c --- /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : opCheck.c AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 04 May 1999 DESCRIPTION : This file contains the functions used to manage and check the operations performed by the tool. These functions manages the operation list "mctx.opListTail", match an entry retrieved from the server to the attributes memorized for one operation, etc... LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 04/05/99 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 05/05/99 | F. Pistolesi | 1.8 : Add communication with remote host. | Implement operations check. ---------+--------------+------------------------------------------------------ 06/05/99 | JL Schwing | 1.10: Implements opDecOper(). | Add more traces in VERY_VERBOSE ---------+--------------+------------------------------------------------------ 20/05/99 | JL Schwing | 1.18: Add params (newRdn and newParent) to opAdd() | Decode operations in Cnnn messages. | No more exit on EINTR in accept() | Fix memory leak in thOperFree() ---------+--------------+------------------------------------------------------ 21/05/99 | JL Schwing | 1.19: Minor fixes in messages. | Purify cleanup - Free memory read in opCheckLoop() | Fix thOperFree() - pb when head of list to delete | Fix memory leak in opNext(). ---------+--------------+------------------------------------------------------ 26/05/99 | JL Schwing | 1.21: Bug fix - return(-1) bad place in opNext(). | Minor fixes in messages. ---------+--------------+------------------------------------------------------ 27/05/99 | JL Schwing | 1.22 : Add statistics to check threads. ---------+--------------+------------------------------------------------------ 27/05/99 | F. Pistolesi | 1.23 : Fix statistics and other algorythms. ---------+--------------+------------------------------------------------------ 31/05/99 | JL Schwing | 1.25 : Bug fix - should test opRead() returned pointer ---------+--------------+------------------------------------------------------ 02/06/99 | JL Schwing | 1.26 : Add flag in main ctx to know if slave was | connected or not. | Add counter of operations received in check threads. ---------+--------------+------------------------------------------------------ 06/03/00 | JL Schwing | 1.27: Test malloc() return value. ---------+--------------+------------------------------------------------------ 18/08/00 | JL Schwing | 1.28: Print begin and end dates. ---------+--------------+------------------------------------------------------ 17/11/00 | JL Schwing | 1.29: Implement "-e smoothshutdown". ---------+--------------+------------------------------------------------------ 29/11/00 | JL Schwing | 1.30: Port on NT 4. ---------+--------------+------------------------------------------------------ */ #include /* Posix threads */ #include /* errno, etc... */ #include /* exit(), etc... */ #include /* sleep(), etc... */ #include /* printf(), etc... */ #include /* sigset(), etc... */ #include /* strerror(), etc... */ #include /* setrlimit(), etc... */ #include /* ldap C-API BER decl. */ #include /* ldap C-API decl. */ #include /* djani : while porting */ #include /* djani : while porting */ #include /* djani : while porting */ #include /* djani : while porting */ #include /* djani : while porting */ #ifdef LDAP_H_FROM_QA_WKA #include /* ldap C-API prototypes */ #endif #include "port.h" /* Portability definitions */ /*JLS 29-11-00*/ #include "ldclt.h" /* This tool's include file */ #include "remote.h" /* Definitions common with the slave */ enum {SINGLE=0,FIRST,MIDDLE,LAST}; /* **************************************************************************** FUNCTION : opDecOper PURPOSE : This function decodes an LDAP operation and return a printable string. INPUT : op = operation to decode OUTPUT : None. RETURN : The decoded string. DESCRIPTION : *****************************************************************************/ char * opDecOper ( int op) { switch (op) { case LDAP_REQ_MODIFY: return ("modify"); break; case LDAP_REQ_ADD: return ("add"); break; case LDAP_REQ_DELETE: return ("delete"); break; case LDAP_REQ_MODRDN: return ("modrdn"); break; default: return ("??unknown??"); break; } } /* **************************************************************************** FUNCTION : LDAPMod2attributes PURPOSE : Convert a LDAPMod-like array of attributes to the internal attributes array. INPUT : mods = LDAPMod array. If NULL, attribs[] is initiated as an empty array. OUTPUT : attribs = struct attribute array. This array is of MAX_ATTRIBS length. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int LDAPMod2attributes ( LDAPMod **mods, attribute *attribs) { int i; /* For the loop */ /* * Maybe there is no mods ?? This occurs for rename operation, for example. */ if (mods == NULL) { attribs[0].type = NULL; return (0); } /* * Process each entry */ for (i=0 ; i< MAX_ATTRIBS && mods[i] != NULL ; i++) { attribs[i].type = strdup (mods[i]->mod_type); if (attribs[i].type == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("Error: cannot strdup(attribs[%d].type), error=%d (%s)\n", i, errno, strerror (errno)); /*JLS 06-03-00*/ return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ /* * Well, if it is a binary value, it is most likely an image * that is read by mmap and always available. Thus there is no reason * to copy it, just modify the pointers. */ if (mods[i]->mod_op & LDAP_MOD_BVALUES) { attribs[i].dontFree = 1; attribs[i].length = mods[i]->mod_bvalues[0]->bv_len; attribs[i].value = mods[i]->mod_bvalues[0]->bv_val; } else { attribs[i].dontFree = 0; attribs[i].length = strlen (mods[i]->mod_values[0]); attribs[i].value = strdup (mods[i]->mod_values[0]); if (attribs[i].value == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("Error: cannot strdup(attribs[%d].value), error=%d (%s)\n", i, errno, strerror (errno)); /*JLS 06-03-00*/ return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ } } /* * Don't forget to mark the end ! */ if (ithrdNum, opDecOper(type), dn); /* * Go to protected section. This will enforce the correct sequencing * of the operations performed because the whole function is lock * for the threads. * Note: Maybe reduce the size of this section ? To be checked. */ if ((ret = pthread_mutex_lock (&(mctx.opListTail_mutex))) != 0) { fprintf (stderr, "T%03d: cannot pthread_mutex_lock(opListTail), error=%d (%s)\n", tttctx->thrdNum, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Create the new cell */ newOper = (oper *) malloc (sizeof (oper)); if (newOper == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("T%03d: cannot malloc(newOper), error=%d (%s)\n", /*JLS 06-03-00*/ tttctx->thrdNum, errno, strerror (errno)); /*JLS 06-03-00*/ return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ newOper->next = NULL; newOper->type = type; newOper->skipped = mctx.slavesNb; newOper->dn = strdup (dn); if (newOper->dn == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf("T%03d: cannot strdup(newOper->dn), error=%d (%s)\n",/*JLS 06-03-00*/ tttctx->thrdNum, errno, strerror (errno)); /*JLS 06-03-00*/ return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ newOper->newRdn = (newRdn == NULL ? NULL : strdup (newRdn)); if (newOper->newRdn == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("T%03d: cannot strdup(newOper->newRdn), error=%d (%s)\n", tttctx->thrdNum, errno, strerror (errno)); /*JLS 06-03-00*/ return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ newOper->newParent = (newParent == NULL ? NULL : strdup (newParent)); if (newOper->newParent == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("T%03d: cannot strdup(newOper->newParent), error=%d (%s)\n", tttctx->thrdNum, errno, strerror (errno)); /*JLS 06-03-00*/ return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ if (LDAPMod2attributes (attribs, newOper->attribs) < 0) return (-1); /* * Don't forget to initiate this cell's mutex ! */ if ((ret = pthread_mutex_init(&(newOper->skipped_mutex), NULL)) != 0) { fprintf (stderr, "T%03d: cannot initiate skipped_mutex error=%d (%s)\n", tttctx->thrdNum, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Link the cell */ mctx.opListTail->next = newOper; mctx.opListTail = newOper; /* * Release the mutex */ if ((ret = pthread_mutex_unlock (&(mctx.opListTail_mutex))) != 0) { fprintf (stderr, "T%03d: cannot pthread_mutex_unlock(opListTail), error=%d (%s)\n", tttctx->thrdNum, ret, strerror (ret)); fflush (stderr); return (-1); } return (0); } /* **************************************************************************** FUNCTION : opNext PURPOSE : Return the next available operation. May return NULL if no operation available. INPUT : ctctx = thread context OUTPUT : op = next operation. May be NULL. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int opNext ( check_context *ctctx, oper **op) { int ret; /* Return value */ oper *newHead; /* The new head operation */ /* * Maybe there is no new operation ? */ if (ctctx->headListOp->next == NULL) { *op = NULL; if (mctx.mode & VERY_VERBOSE) printf ("C%03d: opNext --> NULL\n", ctctx->thrdNum); return (0); } /* * Ok, there is one new operation. Let's skip the head and * go to the new operation... */ if ((ret = pthread_mutex_lock (&(ctctx->headListOp->skipped_mutex))) != 0) { fprintf (stderr, "C%03d: cannot pthread_mutex_lock(skipped_mutex), error=%d (%s)\n", ctctx->thrdNum, ret, strerror (ret)); fflush (stderr); return (-1); } newHead = ctctx->headListOp->next; ctctx->headListOp->skipped--; /* * If there is another thread that has not skipped, let's move to the * next operation and unlock the counter. */ if (ctctx->headListOp->skipped != 0) { if ((ret = pthread_mutex_unlock (&(ctctx->headListOp->skipped_mutex))) != 0) { fprintf (stderr, "C%03d: cannot pthread_mutex_unlock(skipped_mutex), error=%d (%s)\n", ctctx->thrdNum, ret, strerror (ret)); fflush (stderr); return (-1); } } else { /* * Well, looks like we are the last thread to skip.... Let's free this * operation. BTW, there is no reason to unlock/release the mutex because * it will be destroyed ! * Note: may be NULL when LDAP_REQ_DELETE for example. */ if (ctctx->headListOp->attribs != NULL) if (freeAttributesArray (ctctx->headListOp->attribs) < 0) return (-1); if (ctctx->headListOp->dn != NULL) free (ctctx->headListOp->dn); if (ctctx->headListOp->newRdn != NULL) free (ctctx->headListOp->newRdn); if (ctctx->headListOp->newParent != NULL) free (ctctx->headListOp->newParent); free (ctctx->headListOp); } /* * End of function */ *op = ctctx->headListOp = newHead; if (mctx.mode & VERY_VERBOSE) printf ("C%03d: opNext --> (%s, %s)\n", ctctx->thrdNum, opDecOper ((*op)->type), (*op)->dn); return (0); } /* **************************************************************************** FUNCTION : opRead PURPOSE : Read the n'th operation from the head. INPUT : ctctx = thread context num = number of the operation to retrieve OUTPUT : op = returned operation. May be NULL. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int opRead ( check_context *ctctx, int num, oper **op) { *op = ctctx->headListOp; while (num != 0) { /* * Maybe not enough entries in the list ? */ if (*op == NULL) return (0); *op = (*op)->next; num--; } /* * If there, we got it :-) */ return (0); } /* **************************************************************************** FUNCTION : thOperAdd PURPOSE : This function copies an operation to the late operation list INPUT : head list and operation to copy OUTPUT : None. RETURN : New head DESCRIPTION : *****************************************************************************/ thoper * thOperAdd ( thoper *head, oper *elem, int f) { thoper *new,*t=head; int i; new=malloc(sizeof(thoper)); if (new == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("Txxx: cannot malloc(new), error=%d (%s)\n", /*JLS 06-03-00*/ errno, strerror (errno)); /*JLS 06-03-00*/ ldcltExit (1); /*JLS 18-08-00*/ } /*JLS 06-03-00*/ new->next=NULL; new->first=f; new->type=elem->type; new->dn=strdup(elem->dn); if (elem->newRdn != NULL) new->newRdn=strdup(elem->newRdn); if (elem->newParent != NULL) new->newParent=strdup(elem->newParent); for(i=0;iattribs[i].type;i++) { new->attribs[i].type=strdup(elem->attribs[i].type); if (new->attribs[i].type == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("Txxx: cannot strdup(new->attribs[%d].type), error=%d (%s)\n", errno, i, strerror (errno)); /*JLS 06-03-00*/ ldcltExit (1); /*JLS 18-08-00*/ } /*JLS 06-03-00*/ new->attribs[i].length = elem->attribs[i].length; if((new->attribs[i].dontFree=elem->attribs[i].dontFree)) new->attribs[i].value = elem->attribs[i].value; else { new->attribs[i].value = strdup(elem->attribs[i].value); if (new->attribs[i].value == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("Txxx: cannot strdup(new->attribs[%d].value), error=%d (%s)\n", errno, i, strerror (errno)); /*JLS 06-03-00*/ ldcltExit (1); /*JLS 18-08-00*/ } /*JLS 06-03-00*/ } } if(iattribs[i].type=NULL; if(head==NULL) return new; for(t=head;t->next;) t=t->next; t->next=new; return head; } /* **************************************************************************** FUNCTION : thOperFree PURPOSE : This function frees memory for a late operation INPUT : Head of list and operation to delete OUTPUT : None. RETURN : new head DESCRIPTION : *****************************************************************************/ thoper * thOperFree (thoper *head, thoper *elem) { thoper *t; freeAttributesArray(elem->attribs); free (elem->dn); if (elem->newRdn != NULL) free (elem->newRdn); if (elem->newParent != NULL) free (elem->newParent); if(head!=elem) { for(t=head;t->next!=elem;) t=t->next; t->next=t->next->next; } else head = head->next; free(elem); return head; } /* **************************************************************************** FUNCTION : opCheckLoop PURPOSE : This function is the per slave check function INPUT : arg = this check thread's check_context OUTPUT : None. RETURN : None. DESCRIPTION : *****************************************************************************/ void * opCheckLoop ( void* arg) { struct check_context *cctx=(struct check_context *)arg; struct pollfd pfd; repconfirm *recOper; oper *myop; thoper *t; unsigned char recbuf[1500]; int ret,i,timeout; int cnt; /* To count loops for timeout purpose */ int fndlt; /* Found late operation */ int nbRead; /* Nb char read() */ int status; /* Thread status */ /*JLS 17-11-00*/ recOper=(repconfirm*)recbuf; pfd.fd=cctx->sockfd; pfd.events=(POLLIN|POLLPRI); pfd.revents=0; cctx->status=INITIATED; if((timeout=mctx.timeout)<30) timeout=30; /* * First time in here? */ if(cctx->calls==1) cctx->dcOper=NULL; while((ret=poll(&pfd,1,500))>=0) { if(ret) { /* * Exit if read error on the net */ if ((nbRead = read (pfd.fd,recOper,sizeof(repconfirm)))<0) break; if (nbRead != sizeof(repconfirm)) printf ("C%03d(%s): Partial header read %d - expected %d\n",cctx->thrdNum, cctx->slaveName, nbRead, sizeof(repconfirm)); recOper->type=ntohl(recOper->type); recOper->res=ntohl(recOper->res); recOper->dnSize=ntohl(recOper->dnSize); /* * Beware of structure alignment */ if((nbRead=read(pfd.fd,recOper->dn+sizeof(recOper->dn),recOper->dnSize))<0) break; if (nbRead != recOper->dnSize) printf ("C%03d(%s): Partial dn read %d - expected %d\n",cctx->thrdNum, cctx->slaveName, nbRead, recOper->dnSize); if (nbRead > (1500 - sizeof(repconfirm))) printf ("C%03d(%s): Read too much %d - expected %d\n",cctx->thrdNum, cctx->slaveName, nbRead, 1500 - sizeof(repconfirm)); cnt=0; cctx->nbOpRecv++; if(mctx.mode&VERY_VERBOSE) { printf("C%03d(%s): Rec %s\n",cctx->thrdNum,cctx->slaveName,recOper->dn); for(myop=cctx->headListOp->next;myop;myop=myop->next) printf("C%03d(%s): IN : %s\n",cctx->thrdNum,cctx->slaveName,myop->dn); for(t=cctx->dcOper;t;t=t->next) printf("C%03d(%s): LATE : %s\n",cctx->thrdNum,cctx->slaveName,t->dn); } /* * Do not tell me there was an error during replica... */ if(recOper->res) { printf("C%03d(%s): Replica failed, op:%d(%s), dn=\"%s\" res=%d\n", cctx->thrdNum, cctx->slaveName, recOper->type, opDecOper(recOper->type), recOper->dn, recOper->res ); switch (recOper->res) { case 32: cctx->nbRepFail32++ ; break; case 68: cctx->nbRepFail68++ ; break; default: cctx->nbRepFailX++ ; break; } } /* * Is this a late operation? */ fndlt=0; if(cctx->dcOper) { for (i=1,t = cctx->dcOper;t;i++) if ((recOper->type!=t->type) || strcmp(recOper->dn,t->dn)) t = t->next; else { /* * if this is a single operation: 132456 */ if(t->first==SINGLE) { /* * error. */ printf("C%03d(%s): Late replica: op:%d(%s), dn=\"%s\"\n", cctx->thrdNum, cctx->slaveName, t->type, opDecOper(t->type), t->dn ); cctx->nbLate++; } else if (t->first==MIDDLE) { /* * Middle of a series : 23546 */ printf("C%03d(%s): Early (%3d) op:%d(%s), dn=\"%s\"\n", cctx->thrdNum, cctx->slaveName,i, t->type, opDecOper(t->type), t->dn ); cctx->nbEarly++; } else if(t->next) { /* * else maybe we are in a re-corrected situation. * we should receive the next one, now. */ if(t->next->first!=LAST) t->next->first=FIRST; } cctx->dcOper = thOperFree (cctx->dcOper, t); fndlt=1; break; } } if(!fndlt) { /* * See if the operation we received is the same as the head */ opRead(cctx,1,&myop); if (myop != NULL && recOper->type==myop->type && strcmp(recOper->dn,myop->dn) == 0) opNext(cctx,&myop); else { /* * Nope, look for it */ for(i=2;opRead(cctx,i,&myop)==0;i++) if(myop) { if(recOper->type==myop->type && strcmp(recOper->dn,myop->dn) == 0) { /* * Skip all between current head and this one */ printf("C%03d(%s): Early (%3d) op:%d(%s), dn=\"%s\"\n", cctx->thrdNum,cctx->slaveName, i-1, recOper->type, opDecOper(recOper->type), recOper->dn ); cctx->nbEarly++; opNext(cctx,&myop); /* * mark the first of the series as leader */ cctx->dcOper=thOperAdd(cctx->dcOper,myop, i==2?SINGLE:FIRST); for(;i>2;i--) { opNext(cctx,&myop); /* * copy up until one before last */ if(myop) thOperAdd(cctx->dcOper,myop, i==3?LAST:MIDDLE); } opNext(cctx,&myop); break; } } else break; if(!myop) { printf("C%03d(%s): Not on list op:%d(%s), dn=\"%s\"\n", cctx->thrdNum,cctx->slaveName, recOper->type, opDecOper(recOper->type), recOper->dn ); cctx->nbNotOnList++; } } } } pfd.events=(POLLIN|POLLPRI); pfd.revents=0; /* * operations threads still running? */ for(i=0;itimeout*2) break; } if(mctx.mode&VERY_VERBOSE) printf("C%03d(%s): Exiting\n",cctx->thrdNum,cctx->slaveName); /* * Any operation left? */ for(opNext(cctx,&myop);myop;opNext(cctx,&myop)) { printf("Operation %d(%s) still on Queue for %s (%s)\n",myop->type,opDecOper(myop->type),cctx->slaveName,myop->dn); cctx->nbStillOnQ++; } for(t=cctx->dcOper;t;t=t->next) { printf("Lost op %d(%s) on %s (%s)\n",t->type,opDecOper(t->type),cctx->slaveName,t->dn); cctx->nbLostOp++; } close(cctx->sockfd); cctx->status=DEAD; pthread_exit(NULL); } /* **************************************************************************** FUNCTION : opCheckMain PURPOSE : This function is the main function of the check operation threads, INPUT : arg = NULL OUTPUT : None. RETURN : None. DESCRIPTION : *****************************************************************************/ void * opCheckMain ( void *arg) { struct sockaddr_in srvsaddr,claddr; struct hostent cltaddr; #ifdef LINUX struct hostent *stupidlinux=NULL; #endif #ifdef AIX struct hostent_data stupidaix; #endif struct linger lopt; uint32_t ipaddr; int newfd,sockfd,ncctx,i,err; char buffer[128]; int retry; /* To retry on EINTR */ /* * Initialization */ srvsaddr.sin_addr.s_addr=htonl(INADDR_ANY); srvsaddr.sin_family=AF_INET; srvsaddr.sin_port=htons(masterPort); /* * Let's go !!! */ if((sockfd=socket(AF_INET,SOCK_STREAM,0))==-1) { perror("Socket"); ldcltExit(1); /*JLS 18-08-00*/ } i=1; if(setsockopt(sockfd,SOL_SOCKET,SO_REUSEADDR,(void *)&i,sizeof(int))!=0) perror("Sockopt"); if(bind(sockfd,(struct sockaddr*)&srvsaddr,sizeof(struct sockaddr))!=0) { perror("Bind"); ldcltExit(1); /*JLS 18-08-00*/ } if(listen(sockfd,1)!=0) perror("listen"); for(ncctx=0;;) { i=sizeof(claddr); retry = 1; while (retry) { #ifdef AIX if ((newfd=accept(sockfd,(struct sockaddr *)&claddr,(unsigned long *)&i))>=0) #else if ((newfd=accept(sockfd,(struct sockaddr *)&claddr,&i))>=0) #endif retry = 0; else if (errno != EINTR) { perror("Accept"); ldcltExit(1); /*JLS 18-08-00*/ } } /* * get client's name */ ipaddr=ntohl(claddr.sin_addr.s_addr); #ifdef AIX gethostbyaddr_r((char*)&ipaddr,sizeof(ipaddr),AF_INET,&cltaddr, &stupidaix); #else #ifdef LINUX gethostbyaddr_r((char*)&ipaddr,sizeof(ipaddr),AF_INET,&cltaddr, buffer,128, &stupidlinux, &err); #else #if defined(HPUX) && defined(__LP64__) gethostbyaddr((char*)&ipaddr,sizeof(ipaddr),AF_INET); #else gethostbyaddr_r((char*)&ipaddr,sizeof(ipaddr),AF_INET,&cltaddr, buffer,128,&err); #endif #endif #endif i=1; if(setsockopt(newfd,IPPROTO_TCP, TCP_NODELAY,(void *)&i,sizeof(int))!=0) perror("Nagle"); /* * Linger: when connection ends, send an RST instead of a FIN * This way the client will have a fail on the first write instead of * the second */ lopt.l_onoff=1; lopt.l_linger=0; if(setsockopt(newfd,SOL_SOCKET,SO_LINGER,(void*)&lopt,sizeof(struct linger))<0) perror("Linger"); /* * Search for an empty client slot. If a client reconnects, use the * same slot */ for(i=0;i=mctx.slavesNb) { fprintf (stderr, "ldclt: Too many slaves %s\n",cltaddr.h_name); close(newfd); continue; } cctx[i].sockfd=newfd; cctx[i].calls++; cctx[i].slaveName=strdup(cltaddr.h_name); if ((err = pthread_create (&(cctx[i].tid), NULL, opCheckLoop, (void *)&(cctx[i]))) != 0) { fprintf (stderr, "ldclt: %s\n", strerror (err)); fprintf (stderr, "Error: cannot create thread opCheck for %s\n", cltaddr.h_name); fflush (stderr); } else mctx.slaveConn = 1; } close(sockfd); } /* End of file */ --- NEW FILE parser.c --- #ident "@(#)parser.c 1.5 01/04/11" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : parser.c AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 19 March 2001 DESCRIPTION : This file contains the parser functions of ldclt LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 19/03/01 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 21/03/01 | JL Schwing | 1.2 : Implements variables in "-e object=filename" ---------+--------------+------------------------------------------------------ 23/03/01 | JL Schwing | 1.3 : Implements data file list support in variants. | Bug fix : close the file ! | Implements "-e rdn=value". ---------+--------------+------------------------------------------------------ 28/03/01 | JL Schwing | 1.4 : Support -e commoncounter with -e rdn/object ---------+--------------+------------------------------------------------------ 11/04/01 | JL Schwing | 1.5 : Implement [INCRFROMFILE(myfile)] | Improved error message. ---------+--------------+------------------------------------------------------ */ #include /* printf(), etc... */ #include /* strcpy(), etc... */ #include /* errno, etc... */ #include /* malloc(), etc... */ #include /* ldap C-API BER declarations */ #include /* ldap C-API declarations */ #ifdef LDAP_H_FROM_QA_WKA #include /* ldap C-API prototypes */ #endif #ifndef _WIN32 #include /* close(), etc... */ #include /* pthreads(), etc... */ #endif #include "port.h" /* Portability definitions */ #include "ldclt.h" /* This tool's include file */ #include "utils.h" /* Utilities functions */ /* **************************************************************************** FUNCTION : decodeHow PURPOSE : Decode the how field INPUT : how = field to decode OUTPUT : None. RETURN : -1 if error, how value else. DESCRIPTION : *****************************************************************************/ int decodeHow ( char *how) { if (mctx.mode & VERY_VERBOSE) printf ("decodeHow: how=\"%s\"\n", how); if (!strcmp (how, "INCRFROMFILE")) return (HOW_INCR_FROM_FILE); if (!strcmp (how, "INCRFROMFILENOLOOP")) return (HOW_INCR_FROM_FILE_NL); if (!strcmp (how, "INCRN")) return (HOW_INCR_NB); if (!strcmp (how, "INCRNNOLOOP")) return (HOW_INCR_NB_NOLOOP); if (!strcmp (how, "RNDFROMFILE")) return (HOW_RND_FROM_FILE); if (!strcmp (how, "RNDN")) return (HOW_RND_NUMBER); if (!strcmp (how, "RNDS")) return (HOW_RND_STRING); return (-1); } /* **************************************************************************** FUNCTION : parseVariant PURPOSE : Parse a variant definition. INPUT : variant = string to parse fname = file name line = source line obj = object we are parsing and building OUTPUT : field = field parsed RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int parseVariant ( char *variant, char *fname, char *line, vers_object *obj, vers_field *field) { int start, end; /* For the loops */ char how[MAX_FILTER]; /* To parse the variant : */ char first[MAX_FILTER]; /* how(first) */ char second[MAX_FILTER]; /* how(first,second) */ char third[MAX_FILTER]; /* how(first,second,third) */ int ret; /* ldclt_mutex_init() return value */ if (mctx.mode & VERY_VERBOSE) printf ("parseVariant: variant=\"%s\"\n", variant); /* * Maybe a variable ? */ if (variant[1] == '\0') { if ((variant[0] < VAR_MIN) || (variant[0] > VAR_MAX)) { fprintf (stderr, "Error: bad variable in %s : \"%s\"\n", fname, line); fprintf (stderr, "Error: must be in [%c-%c]\n", VAR_MIN, VAR_MAX); return (-1); } field->how = HOW_VARIABLE; field->var = variant[0] - VAR_MIN; return (0); } /* * Maybe a variable definition ? */ if (variant[1] != '=') field->var = -1; else { if ((variant[0] < VAR_MIN) || (variant[0] > VAR_MAX)) { fprintf (stderr, "Error: bad variable in %s : \"%s\"\n", fname, line); fprintf (stderr, "Error: must be in [%c-%c]\n", VAR_MIN, VAR_MAX); return (-1); } field->var = variant[0] - VAR_MIN; variant++; /* Skip variable name */ variant++; /* Skip '=' */ /* * We need a variable ! */ if (obj->var[field->var] == NULL) obj->var[field->var] = (char *) malloc (MAX_FILTER); } /* * Find how definition */ for (end=0 ; (variant[end]!='\0') && (variant[end]!='(') ; end++); if (variant[end]=='\0') { fprintf (stderr, "Error: bad variant in %s : \"%s\"\n", fname, line); fprintf (stderr, "Error: missing '('\n"); return (-1); } strncpy (how, variant, end); how[end] = '\0'; /* * Parse the first parameter */ end++; /* Skip '(' */ for (start=end ; (variant[end]!='\0') && (variant[end]!=';') && (variant[end]!=')') ; end++); if (variant[end]=='\0') { fprintf (stderr, "Error: bad variant in %s : \"%s\"\n", fname, line); fprintf (stderr, "Error: missing ')'\n"); return (-1); } strncpy (first, variant+start, end-start); first[end-start] = '\0'; /* * Parse the second parameter */ if (variant[end] == ')') second[0] = '\0'; else { end++; /* Skip ';' */ for (start=end ; (variant[end]!='\0') && (variant[end]!=';') && (variant[end]!=')') ; end++); if (variant[end]=='\0') { fprintf (stderr, "Error: bad variant in %s : \"%s\"\n", fname, line); fprintf (stderr, "Error: missing ')'\n"); return (-1); } strncpy (second, variant+start, end-start); second[end-start] = '\0'; } /* * Parse the third parameter */ if (variant[end]==')') third[0]='\0'; else { end++; /* Skip ';' */ for (start=end ; (variant[end]!='\0') && (variant[end]!=')') ; end++); if (variant[end]=='\0') { fprintf (stderr, "Error: bad variant in %s : \"%s\"\n", fname, line); fprintf (stderr, "Error: missing ')'\n"); return (-1); } strncpy (third, variant+start, end-start); third[end-start] = '\0'; } /* * Analyse it * Note : first parameter always exist (detected when parsing) while * second and third may not have been provided by the user. */ switch (field->how = decodeHow (how)) { case HOW_INCR_FROM_FILE: case HOW_INCR_FROM_FILE_NL: case HOW_RND_FROM_FILE: if ((field->dlf = dataListFile (first)) == NULL) { fprintf (stderr, "Error : bad file in %s : \"%s\"\n", fname, line); return (-1); } /* * Useless for HOW_RND_FROM_FILE */ field->cnt = 0; field->low = 0; field->high = field->dlf->strNb - 1; /* * Maybe common counter ? */ if ((mctx.mode & COMMON_COUNTER) && ((field->how == HOW_INCR_FROM_FILE) || (field->how == HOW_INCR_FROM_FILE_NL))) { if ((ret = ldclt_mutex_init (&(field->cnt_mutex))) != 0) { fprintf (stderr, "ldclt: %s\n", strerror (ret)); fprintf (stderr, "Error: cannot initiate cnt_mutex in %s for %s\n", fname, line); fflush (stderr); return (-1); } } break; case HOW_INCR_NB: case HOW_INCR_NB_NOLOOP: case HOW_RND_NUMBER: if (third[0] == '\0') { fprintf (stderr, "Error : missing parameters in %s : \"%s\"\n", fname, line); return (-1); } field->cnt = atoi (first); field->low = atoi (first); field->high = atoi (second); field->nb = atoi (third); /* * Maybe common counter ? */ if ((mctx.mode & COMMON_COUNTER) && ((field->how == HOW_INCR_NB) || (field->how == HOW_INCR_NB_NOLOOP))) { if ((ret = ldclt_mutex_init (&(field->cnt_mutex))) != 0) { fprintf (stderr, "ldclt: %s\n", strerror (ret)); fprintf (stderr, "Error: cannot initiate cnt_mutex in %s for %s\n", fname, line); fflush (stderr); return (-1); } } break; case HOW_RND_STRING: field->nb = atoi (first); break; case -1: fprintf (stderr, "Error: illegal keyword \"%s\" in %s : \"%s\"\n", how, fname, line); return (-1); break; } return (0); } /* **************************************************************************** FUNCTION : parseAttribValue PURPOSE : Parse the right part of attribname: attribvalue. INPUT : fname = file name obj = object where variables are. line = value to parse. OUTPUT : attrib = attribute where the value should be stored RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int parseAttribValue ( char *fname, vers_object *obj, char *line, vers_attribute *attrib) { char variant[MAX_FILTER]; /* To process the variant */ int start, end; /* For the loops */ vers_field *field; /* To build the fields */ if (mctx.mode & VERY_VERBOSE) printf ("parseAttribValue: line=\"%s\"\n", line); /* * We will now parse this line for the different fields. */ field = NULL; end = start = 0; while (line[end]!='\0') { /* * Allocate a new field */ if (field == NULL) { field = (vers_field *) malloc (sizeof (vers_field)); field->next = NULL; attrib->field = field; } else { field->next = (vers_field *) malloc (sizeof (vers_field)); field = field->next; field->next = NULL; } /* * Is it a variant field ? */ if (line[end] == '[') { /* * Extract the variant definition */ end++; /* Skip '[' */ for (start=end ; (line[end]!='\0') && (line[end]!=']') ; end++); strncpy (variant, line+start, end-start); variant[end-start] = '\0'; if (line[end]=='\0') { fprintf (stderr, "Error: missing ']' in %s : \"%s\"\n", fname, line); return (-1); } if (parseVariant (variant, fname, line, obj, field) < 0) return (-1); end++; /* Skip ']' */ /* * We need to allocate a buffer in this attribute ! */ if (attrib->buf == NULL) { attrib->buf = (char *) malloc (MAX_FILTER); if (mctx.mode & VERY_VERBOSE) printf ("parseAttribValue: buffer allocated\n"); } } else { /* * It is a constant field. Find the end : [ or \0 */ for (start=end ; (line[end]!='\0') && (line[end]!='[') ; end++); field->how = HOW_CONSTANT; field->cst = (char *) malloc (1+end-start); strncpy (field->cst, line+start, end-start); field->cst[end-start] = '\0'; } } /* * Attribute value is parsed ! */ return (0); } /* **************************************************************************** FUNCTION : parseLine PURPOSE : Parse the given line to find an attribute definition. INPUT : line = line to parse fname = file name OUTPUT : obj = object where the attribute should be added RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int parseLine ( char *line, char *fname, vers_object *obj) { int end; /* For the loops */ if (mctx.mode & VERY_VERBOSE) printf ("parseLine: line=\"%s\"\n", line); /* * Empty line ? Comment ? * No more place for new attributes ? */ if ((line[0]=='\0') || (line[0]=='#')) return (0); if (obj->attribsNb == MAX_ATTRIBS) { fprintf (stderr, "Error: too many attributes in %s, max is %d\n", fname, MAX_ATTRIBS); return (-1); } /* * Find the attribute name * name: */ for (end=0 ; (line[end]!='\0') && (line[end]!=':') ; end++); if (line[end]!=':') { fprintf (stderr, "Error: can't find attribute name in %s : \"%s\"\n", fname, line); return (-1); } /* * Initiate the attribute */ obj->attribs[obj->attribsNb].buf = NULL; obj->attribs[obj->attribsNb].src = strdup (line); obj->attribs[obj->attribsNb].name = (char *) malloc (1+end); strncpy (obj->attribs[obj->attribsNb].name, line, end); obj->attribs[obj->attribsNb].name[end] = '\0'; for (end++ ; line[end]==' ' ; end++); /* Skip the leading ' ' */ /* * We will now parse the value of this attribute */ if (parseAttribValue(fname,obj, line+end, &(obj->attribs[obj->attribsNb]))<0) return (-1); /* * Do not forget to increment attributes number ! */ obj->attribsNb++; return (0); } /* **************************************************************************** FUNCTION : readObject PURPOSE : This function will read an object description from the file given in argument. The object should be already initiated !!! INPUT : None. OUTPUT : obj = parsed object. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int readObject ( vers_object *obj) { FILE *ifile; /* The file that contains the object to read */ char line[MAX_FILTER]; /* To read ifile */ /* * Open the file */ ifile = fopen (obj->fname, "r"); if (ifile == NULL) { perror (obj->fname); fprintf (stderr, "Error: cannot open file \"%s\"\n", obj->fname); return (-1); } /* * Process each line of the input file. * Reminder : the object is initiated by the calling function ! */ while (fgets (line, MAX_FILTER, ifile) != NULL) { if ((strlen (line) > 0) && (line[strlen(line)-1]=='\n')) line[strlen(line)-1] = '\0'; if (parseLine (line, obj->fname, obj) < 0) return (-1); } /* * Do not forget to close the file ! */ if (fclose (ifile) != 0) { perror (obj->fname); fprintf (stderr, "Error: cannot fclose file \"%s\"\n", obj->fname); return (-1); } /* * End of function */ if (obj->attribsNb == 0) { fprintf (stderr, "Error: no object found in \"%s\"\n", obj->fname); return (-1); } return (0); } /* End of file */ --- NEW FILE port.c --- #ident "ldclt @(#)port.c 1.2 01/03/14" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : port.c AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 28 November 2000 DESCRIPTION : This file contains platform-independant version of common (unix) functions in order to have portable source code for either unix and windows platforms. It is greatly inspired from iPlanet DS 5.0 workspace. LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 28/11/00 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 14/03/01 | JL Schwing | 1.2 : Lint cleanup. ---------+--------------+------------------------------------------------------ */ #include /* EOF, etc... */ #ifdef _WIN32 #include #include #else #include /* sleep(), etc... */ /*JLS 14-03-01*/ #include /* pthreads(), etc... */ #endif #include "port.h" /************************************************************************/ /************************************************************************/ /**************** NT section ***********************/ /************************************************************************/ /************************************************************************/ #ifdef _WIN32 int ldclt_mutex_init ( ldclt_mutex_t *mutex) { InitializeCriticalSection (mutex); return (0); } int ldclt_mutex_lock ( ldclt_mutex_t *mutex) { EnterCriticalSection(mutex); return (0); } int ldclt_mutex_unlock ( ldclt_mutex_t *mutex) { LeaveCriticalSection (mutex); return (0); } void ldclt_sleep ( int nseconds) { Sleep (1000 * nseconds); } int ldclt_thread_create ( ldclt_tid *tid, void *fct, void *param) { CreateThread (NULL, 0, fct, param, 0, tid); return (0); } long lrand48 (void) { return ((rand()<<8)+rand()); } /* * Implements the Unix getopt function for NT systems */ char *optarg; int optind; int getopt ( int argc, char **argv, char *optstring) { static char **prevArgv = NULL; /* Memorize argv to parse */ static int inOption; /* In option parsing ? */ static int cNum; /* Current char num */ int c; /* Current char */ int i; /* Loops */ /* * Initialization - maybe the first time this function is called ? */ if (prevArgv != argv) { prevArgv = argv; optind = 0; inOption = 0; } /* * Maybe we processed the last chars of the option in the previous call */ if (inOption) { if (argv[optind][cNum] == '\0') inOption = 0; } /* * Maybe we should look for '-' */ if (!inOption) { optind++; /* Next option */ if (optind == argc) /* No more option */ return (EOF); if (argv[optind][0] != '-') /* Not an option */ return (EOF); if (argv[optind][1] == '\0') /* Only '-' */ return (EOF); cNum = 1; /* Next char to process */ inOption = 0; /* We are in an option */ } /* * See if this is a valid option */ c = argv[optind][cNum]; for (i=0 ; (i #include #include #ifdef OSF1 #ifndef _UINT32_T #define _UINT32_T typedef unsigned long uint32_t; #endif /* _UINT32_T */ #else /* OS_RELEASE */ #include #endif /* OS_RELEASE */ #include #include #include #include typedef struct { uint32_t type,res,dnSize; char dn[sizeof(uint32_t)]; } repconfirm; extern int masterPort; /* End of file */ --- NEW FILE repcheck.c --- /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #include #include #include #include #include "remote.h" #include "lber.h" #include "ldap.h" enum {ADD,DELETE,MODRDN,MODIFY,RESULT}; typedef struct { int conn,op,type; char *dn; } Optype; Optype *pendops; int npend,maxop,connected; char *ldap_ops[]={"ADD","DEL","MODRDN","MOD ","RESULT",NULL}; int ldap_val[]={LDAP_REQ_ADD,LDAP_REQ_DELETE,LDAP_REQ_MODRDN,LDAP_REQ_MODIFY}; get_op_par(char *s,Optype *op) { char *t; int i; t=strstr(s,"conn="); for(t+=5,op->conn=0;isdigit(*t);t++) op->conn=op->conn*10+*t-'0'; t=strstr(s,"op="); for(t+=3,op->op=0;isdigit(*t);t++) op->op=op->op*10+*t-'0'; if(t=strstr(s,"dn=")) op->dn=strdup(t+3); } send_op(char* s,int sfd) { int sz,i; Optype tmp; repconfirm *result; char *t; get_op_par(s,&tmp); for(i=0;ires=0;isdigit(*t);t++) result->res=result->res*10+*t-'0'; result->type=htonl(ldap_val[pendops[i].type]); strcpy(result->dn,pendops[i].dn); result->dnSize=htonl(sz); result->res=htonl(result->res); if(write(sfd,result,sizeof(repconfirm)+sz)<=0){ close(sfd); memset(pendops,0,maxop*sizeof(Optype)); maxop=npend=connected=0; return; } if(i!=maxop) pendops[i]=pendops[maxop]; else memset(pendops+i,0,sizeof(Optype)); return; } } main(int argc, char**argv) { int i,port=16000; int sockfd; static char logline[512]; char **tmp; struct hostent *serveraddr; struct sockaddr_in srvsaddr; while((i=getopt(argc,argv,"p:"))!=EOF){ switch(i){ case 'p': port=atoi(optarg); break; } } serveraddr=gethostbyname(argv[optind]); srvsaddr.sin_addr.s_addr=htonl(*((u_long*)(serveraddr->h_addr_list[0]))); srvsaddr.sin_family=AF_INET; srvsaddr.sin_port=htons(port); maxop=npend=0; pendops=(Optype*)malloc(sizeof(Optype)*20); sigset(SIGPIPE,SIG_IGN); while(gets(logline)){ if(!connected){ if((sockfd=socket(AF_INET,SOCK_STREAM,0))==-1){ perror(argv[0]); exit(1); } i=1; if(setsockopt(sockfd,IPPROTO_TCP, TCP_NODELAY,&i,sizeof(int))!=0) perror("Nagle"); if(connect(sockfd,(struct sockaddr*)&srvsaddr,sizeof(struct sockaddr))!=-1) connected=1; else { close(sockfd); continue; } } for(tmp=ldap_ops,i=0;tmp[i];i++) if(strstr(logline,tmp[i])) break; if(inpend) npend=maxop; if(!(npend%20)){ pendops=(Optype*)realloc(pendops,sizeof(Optype)*(npend+20)); memset(pendops+npend,0,sizeof(Optype)*20); } } if(i==RESULT) send_op(logline,sockfd); } close(sockfd); } --- NEW FILE repslave.c --- #ident "@(#)repslave.c 1.15 99/06/09" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : repslave.c AUTHOR : Fabio Pistolesi VERSION : 1.0 DATE : 05 May 1999 DESCRIPTION : This file contains the implementation of the slave part of ldclt tool. This slave is intended to scan the logs of the ldap server and to communicate the operations logged to the master ldclt, to be checked against the memorized operations performed on the master ldap server. LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 05/05/99 | F. Pistolesi | Creation ---------+--------------+------------------------------------------------------ 06/05/99 | JL Schwing | 1.2 : Port on Solaris 2.5.1 ---------+--------------+------------------------------------------------------ 10/05/99 | F. Pistolesi | Added multiple filtered servers to send results to. ---------+--------------+------------------------------------------------------ 18/05/99 | JL Schwing | 1.8 : Port on 2.5.1 ---------+--------------+------------------------------------------------------ 26/05/99 | F. Pistolesi | 1.10: Bug fix - missing free() ---------+--------------+------------------------------------------------------ 27/05/99 | F. Pistolesi | 1.11: Add new option -d (debug) ---------+--------------+------------------------------------------------------ 29/05/99 | F. Pistolesi | 1.12: Add new option -t (log) ---------+--------------+------------------------------------------------------ 09/06/99 | JL Schwing | 1.14: Bug fix - crash in send_op() if tmp.dn==NULL ---------+--------------+------------------------------------------------------ 09/06/99 | F. Pistolesi | 1.15: Fix the fix above. ---------+--------------+------------------------------------------------------ */ #include #include #include #include #include #if OS_RELEASE == 551 #include #endif #include "remote.h" #include "lber.h" #include "ldap.h" /* * Enumeration for internal list */ enum {ADD,DELETE,MODRDN,MODIFY,RESULT,LAST}; /* * internal list */ typedef struct { int conn,op,type; char *dn; } Optype; typedef struct { int fd; char *filter,*hname; struct sockaddr_in addr; } Towho; Optype *pendops; Towho *srvlist; int npend,maxop,connected,nsrv,debug; char *ldap_ops[]={"ADD","DEL","MODRDN","MOD ","RESULT","NONE",NULL}; /* * To map internal values to LDAP_REQ */ int ldap_val[]={LDAP_REQ_ADD,LDAP_REQ_DELETE,LDAP_REQ_MODRDN,LDAP_REQ_MODIFY}; get_op_par(char *s,Optype *op) { char *t; int i; /* * Provided they do not change dsservd's log format, this should work * Magic numbers are the length of the lookup string */ t=strstr(s,"conn="); for(t+=5,op->conn=0;isdigit(*t);t++) op->conn=op->conn*10+*t-'0'; t=strstr(s,"op="); for(t+=3,op->op=0;isdigit(*t);t++) op->op=op->op*10+*t-'0'; if(t=strstr(s,"dn=")) op->dn=strdup(t+3); } open_cnx(struct sockaddr *srv) { int i,sockfd; if((sockfd=socket(AF_INET,SOCK_STREAM,0))==-1) { perror("Slave"); exit(1); } i=1; /* * Disable TCP's Nagle algorithm */ if(setsockopt(sockfd,IPPROTO_TCP, TCP_NODELAY,(void *)&i,sizeof(int))!=0) perror("Nagle"); if(connect(sockfd,srv,sizeof(struct sockaddr))!=-1) return sockfd; else close(sockfd); return -1; } send_op(char* s) { int sz,i,j,ret; Optype tmp; repconfirm *result; char *t; struct pollfd pfd; get_op_par(s,&tmp); for(i=0;ires=0;isdigit(*t);t++) result->res=result->res*10+*t-'0'; /* * Build packet */ result->type=htonl(ldap_val[pendops[i].type]); strcpy(result->dn,pendops[i].dn+1); sz-=2; result->dn[sz]='\0'; result->dnSize=htonl(sz); if(debug) printf("Sending %d %d %s\n",ntohl(result->type),result->res,result->dn); result->res=htonl(result->res); /* * find which filter applies. Note that if no filter applies, no * packets are sent */ for(j=0;jdn)==NULL) continue; /* * try to write. This works if server set SO_LINGER option * with parameters l_onoff=1,l_linger=0. This means terminate * the connection sending an RST instead of FIN, so that * write() will fail on first attempt instead of second. */ if(write(srvlist[j].fd,result,sizeof(repconfirm)+sz)<=0) { /* * socket was closed by peer. try again */ close(srvlist[j].fd); if((srvlist[j].fd=connected=open_cnx((struct sockaddr*)&srvlist[j].addr))==-1) /* * OK, server disconnected for good */ continue; if((ret=write(srvlist[j].fd,result,sizeof(repconfirm)+sz))<=0) puts("Porc!"); } } /* * Copy over the operation at the end */ free(pendops[i].dn); maxop--; pendops[i]=pendops[maxop]; free(result); break; } if (tmp.dn != NULL) free(tmp.dn); } main(int argc, char**argv) { int i,port=16000; int sockfd,log=0; static char logline[512]; char **tmp,*hn,*hp,*hf; struct hostent *serveraddr; while((i=getopt(argc,argv,"tdP:s:"))!=EOF) { switch(i) { case 't': log=1; break; case 'd': debug=1; break; case 'P': port=atoi(optarg); break; case 's': /* * pointers to hostname, host port, filter */ hn=strtok(optarg,","); hp=strtok(NULL,","); hf=strtok(NULL,","); if(hf==NULL&&hp) if(*hp<'0' || *hp >'9') hf=hp; if(hn==NULL||hf==NULL) { puts("Missing parameter\n"); break; } /* * Get master address, just the first. */ if((serveraddr=gethostbyname(hn))==NULL) { printf("Unknown host %s\n",hn); break; } srvlist=(Towho*)realloc(srvlist,(nsrv+1)*sizeof(Towho)); srvlist[nsrv].addr.sin_addr.s_addr=htonl(*((u_long*)(serveraddr->h_addr_list[0]))); srvlist[nsrv].addr.sin_family=AF_INET; srvlist[nsrv].addr.sin_port=htonl((hp==hf?port:atoi(hp))); if((srvlist[nsrv].filter=regcmp(hf,NULL))==NULL) printf("Wrong REX: %s\n",hf); srvlist[nsrv].fd=open_cnx((struct sockaddr*)&srvlist[nsrv].addr); srvlist[nsrv].hname=strdup(hn); nsrv++; break; } } if(!nsrv) { if(!argv[optind]) { printf("Usage: %s [-td] -P port \n\tor %s [-td] -s ,[,]\n",argv[0],argv[0]); printf("\t-t\tprints input on stdout.\n\t-d\tdebug mode.\n"); exit(1); } srvlist=(Towho*)malloc(sizeof(Towho)); if((serveraddr=gethostbyname(argv[optind]))==NULL) { printf("Unknown host %s\n",argv[optind]); exit(1); } srvlist[nsrv].addr.sin_addr.s_addr=htonl(*((u_long*)(serveraddr->h_addr_list[0]))); srvlist[nsrv].addr.sin_family=AF_INET; srvlist[nsrv].addr.sin_port=htons(port); srvlist[nsrv].filter=NULL; srvlist[nsrv].fd=open_cnx((struct sockaddr*)&srvlist[nsrv].addr); srvlist[nsrv].hname=strdup(argv[optind]); nsrv++; } maxop=npend=0; pendops=(Optype*)malloc(sizeof(Optype)*20); /* * Ignore SIGPIPE during write() */ sigset(SIGPIPE,SIG_IGN); while(gets(logline)) { if(log) puts(logline); for(tmp=ldap_ops,i=0;tmp[i];i++) if(strstr(logline,tmp[i])) break; if(inpend) npend=maxop; if(!(npend%20)) { pendops=(Optype*)realloc(pendops,sizeof(Optype)*(npend+20)); memset(pendops+npend,0,sizeof(Optype)*20); } } if(i==RESULT) send_op(logline); } } /* End of file */ --- NEW FILE scalab01.c --- #ident "ldclt @(#)scalab01.c 1.8 01/05/03" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : scalab01.c AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 08 January 2001 DESCRIPTION : This file contains the implmentation of the specific scenario scalab01 of ldclt. I implement this set of functions in a separate file to reduce the interconnection(s) between the main ldclt and the add-ons, keeping in mind the possibility to use a dynamic load of plugins for a future release. LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 08/01/01 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 12/01/01 | JL Schwing | 1.2 : Second set of options for -e scalab01 ---------+--------------+------------------------------------------------------ 29/01/01 | B Kolics | 1.3 : readAttrValue() uses filter of requested attr ---------+--------------+------------------------------------------------------ 01/02/01 | JL Schwing | 1.4 : Protect against multiple choice of same user. ---------+--------------+------------------------------------------------------ 26/02/01 | JL Schwing | 1.5 : Port on non-solaris platforms... ---------+--------------+------------------------------------------------------ 14/03/01 | JL Schwing | 1.6 : Lint cleanup. | Bug fix : forget to set ldap protocol version. ---------+--------------+------------------------------------------------------ 26/04/01 | B Kolics | 1.7 : in case of lock failure, thread is not aborted ---------+--------------+------------------------------------------------------ 03/05/01 | B Kolics | 1.8 : bug fix - forget to release more line. ---------+--------------+------------------------------------------------------ */ #include /* printf(), etc... */ #include /* malloc(), etc... */ #include /* strcpy(), etc... */ #include /* perror(), etc... */ #ifndef _WIN32 #include /* pthreads(), etc... */ #endif #include /* ldap C-API BER declarations */ #include /* ldap C-API declarations */ #include "port.h" /* Portability definitions */ #include "ldclt.h" /* This tool's include file */ #include "utils.h" /* Utilities functions */ #include "scalab01.h" /* Scalab01 specific definitions */ /* * Private data structures. */ scalab01_context s1ctx; /* **************************************************************************** FUNCTION : scalab01_init PURPOSE : Initiates the scalab01 scenario. INPUT : None. OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int scalab01_init (void) { int ret; /* Return value */ s1ctx.nbcnx = 0; /* No connection yet */ s1ctx.list = NULL; /* No record yet */ s1ctx.lockingMax = 0; /* No locking yet */ /* * Initiates mutexes */ if ((ret = ldclt_mutex_init (&(s1ctx.list_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s\n", mctx.pid, strerror (ret)); fprintf (stderr, "ldclt[%d]: Error: cannot initiate s1ctx.list_mutex\n", mctx.pid); fflush (stderr); return (-1); } if ((ret = ldclt_mutex_init (&(s1ctx.locking_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s\n", mctx.pid, strerror (ret)); fprintf (stderr, "ldclt[%d]: Error: cannot initiate s1ctx.locking_mutex\n", mctx.pid); fflush (stderr); return (-1); } if ((ret = ldclt_mutex_init (&(s1ctx.nbcnx_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s\n", mctx.pid, strerror (ret)); fprintf (stderr, "ldclt[%d]: Error: cannot initiate s1ctx.nbcnx_mutex\n", mctx.pid); fflush (stderr); return (-1); } /* * No error */ return (0); } /* **************************************************************************** FUNCTION : scalab01Lock PURPOSE : Lock for single user trying to connect. INPUT : tttctx = thread context. OUTPUT : None. RETURN : -1 if error, 0 cannot lock, 1 if could lock. DESCRIPTION : *****************************************************************************/ int scalab01Lock ( thread_context *tttctx) { int i; /* For the loop */ int ret; /* Return code */ int res; /* Result of this function */ /* * Get secure access to the common data structure. */ if ((ret = ldclt_mutex_lock (&(s1ctx.locking_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_lock(), error=%d (%s)\n", mctx.pid, tttctx->thrdId, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Is it locked ? */ res = 1; for (i=0 ; ibufBindDN))) { res = 0; break; } if (res == 1) { for (i=0 ; (ibufBindDN; } /* * Free mutex */ if ((ret = ldclt_mutex_unlock (&(s1ctx.locking_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_unlock(), error=%d (%s)\n", mctx.pid, tttctx->thrdId, ret, strerror (ret)); fflush (stderr); return (-1); } return (res); } /* **************************************************************************** FUNCTION : scalab01Unlock PURPOSE : Unlock for single user trying to connect. INPUT : tttctx = thread context. OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int scalab01Unlock ( thread_context *tttctx) { int i; /* For the loop */ int ret; /* Return code */ /* * Get secure access to the common data structure. */ if ((ret = ldclt_mutex_lock (&(s1ctx.locking_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_lock(), error=%d (%s)\n", mctx.pid, tttctx->thrdId, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Find the entry and unlock it. */ for (i=0 ; ibufBindDN))) { s1ctx.locking[i] = NULL; break; } /* * Free mutex */ if ((ret = ldclt_mutex_unlock (&(s1ctx.locking_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_unlock(), error=%d (%s)\n", mctx.pid, tttctx->thrdId, ret, strerror (ret)); fflush (stderr); return (-1); } return (0); } /* **************************************************************************** FUNCTION : scalab01_modemIncr PURPOSE : Increments the modem nb of cnx INPUT : ident = thread identifier OUTPUT : None. RETURN : -1 if error 0 if no modem available 1 if modem available DESCRIPTION : *****************************************************************************/ int scalab01_modemIncr ( char *ident) { int ret; /* Return value */ int res; /* Result of this function */ /* * Get secure access to the common data structure. */ if ((ret = ldclt_mutex_lock (&(s1ctx.nbcnx_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_lock(), error=%d (%s)\n", mctx.pid, ident, ret, strerror (ret)); fflush (stderr); return (-1); } if (s1ctx.nbcnx >= s1ctx.maxcnxnb) res = 0; else { res = 1; s1ctx.nbcnx++; } /* * Free mutex */ if ((ret = ldclt_mutex_unlock (&(s1ctx.nbcnx_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_unlock(), error=%d (%s)\n", mctx.pid, ident, ret, strerror (ret)); fflush (stderr); return (-1); } return (res); } /* **************************************************************************** FUNCTION : scalab01_modemDecr PURPOSE : Decrements the modem nb of cnx INPUT : ident = thread identifier OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int scalab01_modemDecr ( char *ident) { int ret; /* Return value */ /* * Get secure access to the common data structure. */ if ((ret = ldclt_mutex_lock (&(s1ctx.nbcnx_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_lock(), error=%d (%s)\n", mctx.pid, ident, ret, strerror (ret)); fflush (stderr); return (-1); } s1ctx.nbcnx--; /* * Free mutex */ if ((ret = ldclt_mutex_unlock (&(s1ctx.nbcnx_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_unlock(), error=%d (%s)\n", mctx.pid, ident, ret, strerror (ret)); fflush (stderr); return (-1); } return (0); } /* **************************************************************************** FUNCTION : scalab01_addLogin PURPOSE : Add a new user login to the s1ctx structure. INPUT : tttctx = thread context. dn = user's dn. duration = duration of the connection. OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int scalab01_addLogin ( thread_context *tttctx, char *dn, int duration) { int ret; /* Return value */ isp_user *new; /* New entry */ isp_user *cur; /* Current entry */ /* * Create the new record. */ new = (isp_user *) malloc (sizeof (isp_user)); strcpy (new->dn, dn); new->cost = new->counter = duration; new->next = NULL; /* * Get secure access to the common data structure. * Note : it should be possible to reduce the "size" of this critical * section but I am not 100% certain this won't mess up all things. */ if ((ret = ldclt_mutex_lock (&(s1ctx.list_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_lock(), error=%d (%s)\n", mctx.pid, tttctx->thrdId, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Maybe this is the first entry of the list ? */ if (s1ctx.list == NULL) s1ctx.list = new; else { /* * Check with the list's head */ if (s1ctx.list->counter >= duration) { new->next = s1ctx.list; s1ctx.list = new; } else { cur = s1ctx.list; while (cur != NULL) { if (cur->next == NULL) { cur->next = new; cur = NULL; /* Exit loop */ } else if (cur->next->counter >= duration) { new->next = cur->next; cur->next = new; cur = NULL; /* Exit loop */ } else cur = cur->next; } } } /* * Free mutex */ if ((ret = ldclt_mutex_unlock (&(s1ctx.list_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_unlock(), error=%d (%s)\n", mctx.pid, tttctx->thrdId, ret, strerror (ret)); fflush (stderr); return (-1); } return (0); } /* **************************************************************************** FUNCTION : scalab01_connectSuperuser PURPOSE : Purpose of the fct INPUT : None. OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int scalab01_connectSuperuser (void) { int ret; /* Return value */ int v2v3; /* LDAP version used */ char bindDN [MAX_DN_LENGTH]; /* To bind */ /* * Create the LDAP context */ #ifdef LDCLTSSL /* * SSL is enabled ? */ if (mctx.mode & SSL) { /* * LDAP session initialization in SSL mode */ s1ctx.ldapCtx = (LDAP *)(*(mctx.sslctx.ldapssl_init)) (mctx.hostname, mctx.port, 1); if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: ctrl: ldapssl_init (%s, %d), ldapCtx=0x%08x\n", mctx.pid, mctx.hostname, mctx.port, (unsigned int)s1ctx.ldapCtx); if (s1ctx.ldapCtx == NULL) { printf ("ldclt[%d]: ctrl: Cannot ldapssl_init (%s, %d), errno=%d\n", mctx.pid, mctx.hostname, mctx.port, errno); fflush (stdout); return (-1); } /* * Client authentication is used ? */ if (mctx.mode & CLTAUTH) { ret = (int)(*(mctx.sslctx.ldapssl_enable_clientauth)) (s1ctx.ldapCtx, "", mctx.keydbpin, mctx.cltcertname); if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: ctrl: After ldapssl_enable_clientauth (ldapCtx=0x%08x, %s, %s)", mctx.pid, (unsigned int)s1ctx.ldapCtx, mctx.keydbpin, mctx.cltcertname); if (ret < 0) { printf ("ldclt[%d]: ctrl: Cannot ldapssl_enable_clientauth (ldapCtx=0x%08x, %s, %s)", mctx.pid, (unsigned int)s1ctx.ldapCtx, mctx.keydbpin, mctx.cltcertname); ldap_perror(s1ctx.ldapCtx, "ldapssl_enable_clientauth"); fflush (stdout); return (-1); } } } else { #endif /* * Connection initialization in normal, unencrypted mode */ s1ctx.ldapCtx = ldap_init (mctx.hostname, mctx.port); if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: ctrl: After ldap_init (%s, %d), ldapCtx=0x%08x\n", mctx.pid, mctx.hostname, mctx.port, (unsigned int)s1ctx.ldapCtx); if (s1ctx.ldapCtx == NULL) { printf ("ldclt[%d]: ctrl: Cannot ldap_init (%s, %d), errno=%d\n", mctx.pid, mctx.hostname, mctx.port, errno); fflush (stdout); return (-1); } #ifdef LDCLTSSL } #endif /* * Set the LDAP version and other options... */ if (mctx.mode & LDAP_V2) v2v3 = LDAP_VERSION2; else v2v3 = LDAP_VERSION3; ret = ldap_set_option (s1ctx.ldapCtx, LDAP_OPT_PROTOCOL_VERSION, &v2v3); if (ret < 0) /*JLS 14-03-01*/ { /*JLS 14-03-01*/ printf ("ldclt[%d]: ctrl: Cannot ldap_set_option(LDAP_OPT_PROTOCOL_VERSION)\n", mctx.pid); fflush (stdout); /*JLS 14-03-01*/ return (-1); /*JLS 14-03-01*/ } /*JLS 14-03-01*/ /* * Now we could bind */ #ifdef LDCLTSSL /* * for SSL client authentication, SASL BIND is used */ if (mctx.mode & CLTAUTH) { if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: ctrl: Before ldap_sasl_bind_s\n", mctx.pid); ret = ldap_sasl_bind_s (s1ctx.ldapCtx, "", "EXTERNAL", NULL, NULL, NULL, NULL); if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: ctrl: After ldap_sasl_bind_s\n", mctx.pid); if (ret != LDAP_SUCCESS) { printf ("ldclt[%d]: ctrl: Cannot ldap_sasl_bind_s, error=%d (%s)\n", mctx.pid, ret, my_ldap_err2string (ret)); fflush (stdout); return (-1); } } else { #endif /* LDCLTSSL */ strcpy (bindDN, SCALAB01_SUPER_USER_RDN); strcat (bindDN, ","); strcat (bindDN, mctx.baseDN); if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: ctrl: Before ldap_simple_bind_s (%s , %s)\n", mctx.pid, bindDN, SCALAB01_SUPER_USER_PASSWORD); ret = ldap_simple_bind_s (s1ctx.ldapCtx, bindDN, SCALAB01_SUPER_USER_PASSWORD); if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: ctrl: After ldap_simple_bind_s (%s, %s)\n", mctx.pid, bindDN, SCALAB01_SUPER_USER_PASSWORD); if (ret != LDAP_SUCCESS) { printf("ldclt[%d]: ctrl: Cannot ldap_simple_bind_s (%s, %s), error=%d (%s)\n", mctx.pid, bindDN, SCALAB01_SUPER_USER_PASSWORD, ret, my_ldap_err2string (ret)); fflush (stdout); return (-1); } #ifdef LDCLTSSL } #endif /* * Normal end... */ return (0); } /* **************************************************************************** FUNCTION : readAttrValue PURPOSE : This function will ldap_search the given entry for the value of the given attribute. INPUT : ident = thread identifier ldapCtx = LDAP context dn = dn of the entry to process attname = attribute name OUTPUT : value = attribute value. This buffer must be initiated with enough memory. value[0] == '\0' if not find. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int readAttrValue ( LDAP *ldapCtx, char *ident, char *dn, char *attname, char *value) { int ret; /* Return value */ char *attrs[2]; /* Attribute to retrieve */ LDAPMessage *res; /* LDAP responses */ LDAPMessage *cur; /* Current message */ BerElement *ber; /* To decode the response */ char *aname; /* Current attribute name */ char **vals; /* Attribute value returned */ char *filter; /* Filter used for searching */ /* * First, ldap_search() the entry. */ attrs[0] = attname; attrs[1] = NULL; filter = (char *)malloc((4+strlen(attname))*sizeof(char)); sprintf(filter, "(%s=*)", attname); ret = ldap_search_s (ldapCtx, dn, LDAP_SCOPE_BASE, filter, attrs, 0, &res); if (filter != NULL) free(filter); if (ret != LDAP_SUCCESS) { printf ("ldclt[%d]: %s: Cannot ldap_search (%s in %s), error=%d (%s)\n", mctx.pid, ident, attname, dn, ret, my_ldap_err2string (ret)); fflush (stdout); return (-1); } /* * Decode the response */ value[0] = '\0'; /* Not find yet */ cur = ldap_first_entry (ldapCtx, res); while ((!value[0]) && (cur != NULL)) { aname = ldap_first_attribute (ldapCtx, cur, &ber); while ((!value[0]) && (aname != NULL)) { /* * We expect this attribute to be single-valued. */ if (!strcmp (aname, attname)) { vals = ldap_get_values (ldapCtx, cur, aname); if (vals == NULL) { printf ("ldclt[%d]: %s: no value for %s in %s\n", mctx.pid, ident, dn, attname); fflush (stdout); return (-1); } strcpy (value, vals[0]); ldap_value_free (vals); } /* * Next attribute */ ldap_memfree (aname); if (!value[0]) aname = ldap_next_attribute (ldapCtx, cur, ber); } /* * Next entry - shouldn't happen in theory */ if (ber != NULL) ldap_ber_free (ber, 0); cur = ldap_next_entry (ldapCtx, cur); } ldap_msgfree (res); /* Free the response */ return (0); } /* **************************************************************************** FUNCTION : writeAttrValue PURPOSE : This function will ldap_modify the given entry to replace the value of the given attribute. INPUT : ident = thread identifier ldapCtx = LDAP context dn = dn of the entry to process attname = attribute name value = attribute value OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int writeAttrValue ( LDAP *ldapCtx, char *ident, char *dn, char *attname, char *value) { int ret; /* Return value */ LDAPMod attribute; /* To build the attributes */ LDAPMod *attrsmod[2]; /* Modify attributes */ char *pvalues[2]; /* To build the values list */ /* * Prepear the data to be written */ pvalues[0] = value; pvalues[1] = NULL; attribute.mod_op = LDAP_MOD_REPLACE; attribute.mod_type = attname; attribute.mod_values = pvalues; attrsmod[0] = &attribute; attrsmod[1] = NULL; /* * Store the data in the directory. */ ret = ldap_modify_ext_s (ldapCtx, dn, attrsmod, NULL, NULL); if (ret != LDAP_SUCCESS) { printf ("ldclt[%d]: %s: Cannot ldap_modify_ext_s (%s in %s), error=%d (%s)\n", mctx.pid, ident, attname, dn, ret, my_ldap_err2string (ret)); fflush (stdout); return (-1); } return (0); } /* **************************************************************************** FUNCTION : scalab01_unlock PURPOSE : Unlock the user given in argument. INPUT : entry = entry to unlock. OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int scalab01_unlock ( isp_user *user) { int account; /* Accounting value */ char buf[20]; /* To read/write attribute */ /* * Increment accounting counters * First, read the current value. */ if (readAttrValue (s1ctx.ldapCtx,"ctrl",user->dn,SCALAB01_ACC_ATTRIB,buf) < 0) { printf ("ldclt[%d]: ctrl: Cannot read accounting attribute of %s\n", mctx.pid, user->dn); fflush (stdout); return (-1); } /* * If this attribute has no value (doesn't exist) we assume it is 0. */ if (buf[0] != '\0') account = atoi (buf); else { printf ("ldclt[%d]: ctrl: No accounting attribute for %s - assume it is 0\n", mctx.pid, user->dn); fflush (stdout); account = 0; } /* * Compute the new value and store it in the directory. */ sprintf (buf, "%d", account + user->cost); if (writeAttrValue (s1ctx.ldapCtx,"ctrl",user->dn,SCALAB01_ACC_ATTRIB,buf) <0) { printf ("ldclt[%d]: ctrl: Cannot write accounting attribute of %s\n", mctx.pid, user->dn); fflush (stdout); return (-1); } /* * Unlock the user */ if (writeAttrValue (s1ctx.ldapCtx, "ctrl", user->dn, SCALAB01_LOCK_ATTRIB, SCALAB01_VAL_UNLOCKED) < 0) { printf ("ldclt[%d]: ctrl: Cannot write lock (unlock) attribute of %s\n", mctx.pid, user->dn); fflush (stdout); return (-1); } if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: ctrl: entry %s unlocked\n", mctx.pid, user->dn); /* * Decrement modem pool usage... */ if (scalab01_modemDecr ("ctrl") < 0) return (-1); /* * Normal end */ return (0); } /* **************************************************************************** FUNCTION : scalab01_control PURPOSE : This function implements the control loop/thread of the scalab01 scenario. Its main target is to manage the counters of each "connection" and to unlock the entry when time is reached. INPUT : None. OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ void * scalab01_control ( void *arg) { isp_user *cur; /* Current entry */ isp_user *head; /* Head of entries to process */ int ret; /* Return value */ int nbTot; /* Total nb entries locked */ int nbU; /* Number unlocked */ /* * Initialization * Failure to connect is a critical error... */ if (scalab01_connectSuperuser () < 0) ldcltExit (EXIT_NOBIND); /* * Main loop */ while (1 /*CONSTCOND*/) /*JLS 14-03-01*/ { ldclt_sleep (1); /* Poll the connections every second */ nbTot = nbU = 0; /* No entries processed yet */ /* * Get protected access to the entries */ if ((ret = ldclt_mutex_lock (&(s1ctx.list_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: ctrl: cannot mutex_lock(), error=%d (%s)\n", mctx.pid, ret, strerror (ret)); fflush (stderr); ldcltExit (EXIT_OTHER); } /* * Decrement all counters */ for (cur=s1ctx.list ; cur!=NULL ; cur=cur->next) { cur->counter--; nbTot++; } /* * Find the entries to process. */ if ((s1ctx.list == NULL) || (s1ctx.list->counter > 0)) head = NULL; else { head = cur = s1ctx.list; while ((cur != NULL) && (cur->counter == 0)) cur = cur->next; s1ctx.list = cur; } /* * Release mutex */ if ((ret = ldclt_mutex_unlock (&(s1ctx.list_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: ctrl: cannot mutex_unlock(), error=%d (%s)\n", mctx.pid, ret, strerror (ret)); fflush (stderr); ldcltExit (EXIT_OTHER); } /* * Now, we have "head" that points either to NULL or to a list of * entries to process. * Attention, this list of entries is not terminated by NULL, but * we must rather check the field head->next->counter" for the last * entry... * * NOTE : implements this section as a separate thread to keep the * general timer working... */ while (head != NULL) { if (scalab01_unlock (head) < 0) { printf ("ldclt[%d]: ctrl: cannot unlock %s\n", mctx.pid, head->dn); ldcltExit (EXIT_OTHER); } nbU++; /* One more entry unlocked */ /* * Next entry... */ cur = head; if (head->next == NULL) head = NULL; else if (head->next->counter != 0) head = NULL; else head = head->next; free (cur); } /* while (head =! NULL) */ /* * Print some stats... */ if (mctx.mode & VERBOSE) printf ("ldclt[%d]: ctrl: nb entries unlocked / total : %3d / %5d\n", mctx.pid, nbU, nbTot); } /* Main loop */ /* * End of thread */ return (arg); } /* **************************************************************************** FUNCTION : doScalab01 PURPOSE : Implements the client part of the scalab01 scenario. INPUT : tttctx = this thread context OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int doScalab01 ( thread_context *tttctx) { char buf[32]; /* To read attributes value */ int duration; /* Use a variable for trace purpose */ int res; /* Result of cnx to modem pool */ int doloop; /* To know if we should loop */ /* * Simulate connection to the modem pool. */ while ((res = scalab01_modemIncr(tttctx->thrdId)) != 1) switch (res) { case 0: ldclt_sleep (s1ctx.wait==0?SCALAB01_DEF_WAIT_TIME:rndlim(0,s1ctx.wait)); break; case -1: return (-1); break; } /* * Connection to the server * The function connectToServer() will take care of the various connection/ * disconnection, bind/unbind/close etc... requested by the user. * The cost is one more function call in this application, but the * resulting source code will be much more easiest to maintain. */ if (connectToServer (tttctx) < 0) return (-1); if (!(tttctx->binded)) return (0); /* * Check that no other thread is using the same identity... */ doloop = 1; while (doloop) { switch (scalab01Lock (tttctx)) { case 0: ldclt_sleep (1); break; case 1: doloop = 0; break; case -1: return (-1); break; } } /* * Ok, we are now binded. Great ;-) * The DN we used to bind is available in tttctx->bufBindDN * Read lock attribute */ if (readAttrValue (tttctx->ldapCtx, tttctx->thrdId, tttctx->bufBindDN, SCALAB01_LOCK_ATTRIB, buf) < 0) { printf ("ldclt[%d]: %s: Cannot read lock attribute of %s\n", mctx.pid, tttctx->thrdId, tttctx->bufBindDN); fflush (stdout); (void) scalab01_modemDecr (tttctx->thrdId); return (-1); } if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: %s: entry %s lock read\n", mctx.pid, tttctx->thrdId, tttctx->bufBindDN); /* * If locked, then we cannot login now... */ if (!strcmp (buf, SCALAB01_VAL_LOCKED)) { if (scalab01_modemDecr (tttctx->thrdId) < 0) return (-1); return (0); } /* * If not locked : * - lock the user * - decide how many times will be connected * - add information to the list of connected */ if (writeAttrValue (tttctx->ldapCtx, tttctx->thrdId, tttctx->bufBindDN, SCALAB01_LOCK_ATTRIB, SCALAB01_VAL_LOCKED) < 0) { printf ("ldclt[%d]: %s: Cannot write lock attribute of %s\n", mctx.pid, tttctx->thrdId, tttctx->bufBindDN); fflush (stdout); /* * It can still happen that two threads write this attribute at the same * time, so there can be failure in one of the threads * in this case just return */ if (scalab01_modemDecr (tttctx->thrdId) < 0) /*JLS 03-05-01*/ return (-1); /*JLS 03-05-01*/ return (0); /*BK 26-04-01*/ } if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: %s: entry %s lock written\n", mctx.pid, tttctx->thrdId, tttctx->bufBindDN); if (scalab01Unlock (tttctx) < 0) return (-1); duration = rndlim (1, s1ctx.cnxduration); if (scalab01_addLogin (tttctx, tttctx->bufBindDN, duration) < 0) { printf ("ldclt[%d]: %s: Cannot memorize new login of %s\n", mctx.pid, tttctx->thrdId, tttctx->bufBindDN); fflush (stdout); return (-1); } if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: %s: entry %s login added duration %6d\n", mctx.pid, tttctx->thrdId, tttctx->bufBindDN, duration); /* * Memorize the operation */ if (incrementNbOpers (tttctx) < 0) return (-1); /* * Wait before next operation... */ if (s1ctx.wait > 0) ldclt_sleep (rndlim (0,s1ctx.wait)); /* * Unbind */ /* TBC - this is done in the next loop... - cf connectToServer() */ return (0); } /* End of file */ --- NEW FILE scalab01.h --- #ident "ldclt @(#)scalab01.h 1.3 01/03/14" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : scalab01.h AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 12 January 2001 DESCRIPTION : This file contains the definitions related to the scenario scalab01 of ldclt. LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 12/01/01 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 01/02/01 | JL Schwing | 1.2 : Protect against multiple choice of same user. ---------+--------------+------------------------------------------------------ 14/03/01 | JL Schwing | 1.3 : Lint cleanup. ---------+--------------+------------------------------------------------------ */ #ifndef SCALAB01_H #define SCALAB01_H /* * Default values for scalab01 */ #define SCALAB01_ACC_ATTRIB "ntUserUnitsPerWeek" #define SCALAB01_DEF_MAX_CNX 5000 #define SCALAB01_DEF_CNX_DURATION 3600 #define SCALAB01_DEF_WAIT_TIME 10 #define SCALAB01_LOCK_ATTRIB "ntUserFlags" #define SCALAB01_SUPER_USER_RDN "cn=super user" #define SCALAB01_SUPER_USER_PASSWORD "super user password" #define SCALAB01_VAL_LOCKED "1" #define SCALAB01_VAL_UNLOCKED "0" #define SCALAB01_MAX_LOCKING 4096 /* * This structure is intended to memorize the information about * the "ISP" users connected. * Uses mainly static size data to save malloc()/free() calls. */ typedef struct isp_user { char dn[MAX_DN_LENGTH]; /* User's DN */ int cost; /* Cnx cost */ int counter; /* To free it */ struct isp_user *next; /* Next entry */ } isp_user; /* * This is the scalab01 context structure. */ typedef struct scalab01_context { int cnxduration; /* Max cnx duration */ LDAP *ldapCtx; /* LDAP context */ isp_user *list; /* ISP users list */ ldclt_mutex_t list_mutex; /* Protect list */ char *locking[SCALAB01_MAX_LOCKING]; ldclt_mutex_t locking_mutex; int lockingMax; int maxcnxnb; /* Modem pool size */ int nbcnx; /* Nb cnx to the modem */ ldclt_mutex_t nbcnx_mutex; /* Protect nbcnx */ int wait; /* Retry every this time */ } scalab01_context; /* * Exported functions and structures */ extern int doScalab01 (thread_context *tttctx); extern scalab01_context s1ctx; extern void *scalab01_control (void *); extern int scalab01_init (void); /*JLS 14-03-01*/ #endif /* SCALAB01_H */ /* End of file */ --- NEW FILE srv.c --- /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #include #include #include #include #include #include #include #include #include #include #include #include #include "remote.h" #include "lber.h" #include "ldap.h" enum {ADD,DELETE,MODRDN,MODIFY,RESULT}; typedef struct { int conn,op,type; char *dn; } Optype; Optype *pendops; int npend=-1,maxop; char *ldap_ops[]={"ADD","DEL","MODRDN","MOD ","RESULT",NULL}; int ldap_val[]={LDAP_REQ_ADD,LDAP_REQ_DELETE,LDAP_REQ_MODRDN,LDAP_REQ_MODIFY}; print_packet(repconfirm *op) { int i; printf("type=%d, res=%d, dnlen=%d, dN: %s\n",op->type,op->res,op->dnSize,op->dn); } main(int argc, char**argv) { int i,port=16000; int sockfd,newfd; static char buff[512]; char **tmp; struct sockaddr_in srvsaddr,claddr; struct hostent *cltaddr; uint32_t ipaddr; while((i=getopt(argc,argv,"p:"))!=EOF){ switch(i){ case 'p': port=atoi(optarg); break; } } srvsaddr.sin_addr.s_addr=htonl(INADDR_ANY); srvsaddr.sin_family=AF_INET; srvsaddr.sin_port=htons(port); if((sockfd=socket(AF_INET,SOCK_STREAM,0))==-1){ perror("Socket"); exit(1); } i=1; if(setsockopt(sockfd,SOL_SOCKET,SO_REUSEADDR,&i,sizeof(int))!=0) perror("Sockopt"); if(bind(sockfd,(struct sockaddr*)&srvsaddr,sizeof(struct sockaddr))!=0){ perror("Bind"); exit(1); } if(listen(sockfd,1)!=0) perror("listen"); for(;;){ i=sizeof(claddr); if((newfd=accept(sockfd,(struct sockaddr *)&claddr,&i))<0){ perror("Accept"); exit(1); } ipaddr=ntohl(claddr.sin_addr.s_addr); cltaddr=gethostbyaddr((char*)&ipaddr,sizeof(ipaddr),AF_INET); printf("Accepting from %s\n",cltaddr->h_name); while(read(newfd,buff,512)>0){ print_packet((repconfirm*) buff); memset(buff,0,512); } close(newfd); } close(sockfd); } --- NEW FILE threadMain.c --- #ident "ldclt @(#)threadMain.c 1.40 01/05/04" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : threadMain.c AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 04 December 1998 DESCRIPTION : This file implements the main/core part of the threads. The ldap part is in another source file. LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 04/12/98 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 10/12/98 | JL Schwing | 1.2 : Add nb of errors statistics. ---------+--------------+------------------------------------------------------ 10/12/98 | JL Schwing | 1.3 : Implement asynchronous mode. ---------+--------------+------------------------------------------------------ 11/12/98 | JL Schwing | 1.4 : Implement max errors threshold. | fflush(stdout) after each printf. ---------+--------------+------------------------------------------------------ 14/12/98 | JL Schwing | 1.5 : Implement "-e close". | Add "thread is dead" message. ---------+--------------+------------------------------------------------------ 16/12/98 | JL Schwing | 1.6 : Implement "-e add" and "-e delete". ---------+--------------+------------------------------------------------------ 23/12/98 | JL Schwing | 1.7 : bug fix - crash in msgIdDel(). ---------+--------------+------------------------------------------------------ 28/12/98 | JL Schwing | 1.8 : Add tag asyncHit. ---------+--------------+------------------------------------------------------ 13/01/99 | JL Schwing | 1.9 : Implement "-e string". ---------+--------------+------------------------------------------------------ 18/01/99 | JL Schwing | 1.10: Implement "-e randombase". ---------+--------------+------------------------------------------------------ 21/01/99 | JL Schwing | 1.11: Implement "-e ascii". ---------+--------------+------------------------------------------------------ 26/02/99 | JL Schwing | 1.12: Improve strict ascii: reject more characters. ---------+--------------+------------------------------------------------------ 26/02/99 | JL Schwing | 1.13: Quote (aka \) characters rather than reject. ---------+--------------+------------------------------------------------------ 04/05/99 | JL Schwing | 1.14: Modify msgId*() to memorize attribs as well. ---------+--------------+------------------------------------------------------ 19/05/99 | JL Schwing | 1.15: Implement "-e rename". | Exit the thread if status==DEAD ---------+--------------+------------------------------------------------------ 28/05/99 | JL Schwing | 1.16: Add new option -W (wait). ---------+--------------+------------------------------------------------------ 06/03/00 | JL Schwing | 1.17: Test malloc() return value. ---------+--------------+------------------------------------------------------ 18/08/00 | JL Schwing | 1.18: Print begin and end dates. ---------+--------------+------------------------------------------------------ 25/08/00 | JL Schwing | 1.19: Implement consistent exit status... | Fix some old legacy code. ---------+--------------+------------------------------------------------------ 14/11/00 | JL Schwing | 1.20: Will now use utils.c functions. ---------+--------------+------------------------------------------------------ 17/11/00 | JL Schwing | 1.21: Implement "-e smoothshutdown". | Add new functions setThreadStatus() getThreadStatus(). ---------+--------------+------------------------------------------------------ 21/11/00 | JL Schwing | 1.22: Implement "-e attreplace=name:mask" ---------+--------------+------------------------------------------------------ 29/11/00 | JL Schwing | 1.23: Port on NT 4. ---------+--------------+------------------------------------------------------ 01/12/00 | JL Schwing | 1.24: Port on Linux. ---------+--------------+------------------------------------------------------ 15/12/00 | JL Schwing | 1.25: Add more trace in VERY_VERBOSE mode. ---------+--------------+------------------------------------------------------ 18/12/00 | JL Schwing | 1.26: Add new exit status EXIT_INIT. ---------+--------------+------------------------------------------------------ 05/01/01 | JL Schwing | 1.27: Implement "-e randombinddn" and associated | "-e randombinddnlow/high" ---------+--------------+------------------------------------------------------ 08/01/01 | JL Schwing | 1.28: Implement "-e scalab01". ---------+--------------+------------------------------------------------------ 12/01/01 | JL Schwing | 1.29: Include scalab01.h ---------+--------------+------------------------------------------------------ 05/03/01 | JL Schwing | 1.30: Bug fix - crash SIGSEGV if no binDN provided. ---------+--------------+------------------------------------------------------ 14/03/01 | JL Schwing | 1.31: Implement "-e commoncounter" | Add new function incrementCommonCounter(). ---------+--------------+------------------------------------------------------ 14/03/01 | JL Schwing | 1.32: Implement "-e dontsleeponserverdown". ---------+--------------+------------------------------------------------------ 15/03/01 | JL Schwing | 1.33: Implement "-e randomattrlist=name:name:name" | Add new function selectRandomAttrList(). ---------+--------------+------------------------------------------------------ 19/03/01 | JL Schwing | 1.34: Implement "-e genldif=filename" ---------+--------------+------------------------------------------------------ 23/03/01 | JL Schwing | 1.35: Implements "-e rdn=value". ---------+--------------+------------------------------------------------------ 28/03/01 | JL Schwing | 1.36: Support -e commoncounter with -e rdn/object | Add new function incrementCommonCounterObject(). ---------+--------------+------------------------------------------------------ 02/04/01 | JL Schwing | 1.37: Bug fix : large files support for -e genldif. ---------+--------------+------------------------------------------------------ 11/04/01 | JL Schwing | 1.38: Implement [INCRFROMFILE(myfile)] ---------+--------------+------------------------------------------------------ 03/05/01 | JL Schwing | 1.39: Implement -e randombinddnfromfile=filename. ---------+--------------+------------------------------------------------------ 04/05/01 | JL Schwing | 1.40: Implement -e bindonly. ---------+--------------+------------------------------------------------------ */ #include /* printf(), etc... */ #include /* strerror(), etc... */ #include /* exit(), etc... */ #include /* isascii(), etc... */ #include /* errno, etc... */ /*JLS 06-03-00*/ #include /* ldap C-API BER declarations */ #include /* ldap C-API declarations */ #ifndef _WIN32 /*JLS 29-11-00*/ #include /* close(), etc... */ #include /* pthreads(), etc... */ #include /* sigfillset(), etc... */ #endif /*JLS 29-11-00*/ #include "port.h" /* Portability definitions */ /*JLS 29-11-00*/ #include "ldclt.h" /* This tool's include file */ #include "utils.h" /* Utilities functions */ /*JLS 14-11-00*/ #include "scalab01.h" /* Scalab01 specific */ /*JLS 12-01-01*/ /* New */ /*JLS 15-03-01*/ /* **************************************************************************** FUNCTION : selectRandomAttrList PURPOSE : Select a random attr list. INPUT : tttctx = this thread context OUTPUT : None. RETURN : The random list. DESCRIPTION : *****************************************************************************/ char ** selectRandomAttrList ( thread_context *tttctx) { tttctx->attrlist[0] = mctx.attrlist[rndlim(0,mctx.attrlistNb-1)]; return (tttctx->attrlist); } /* **************************************************************************** FUNCTION : randomString PURPOSE : Return a random string, of length nbDigits. The string is returned in tttctx->buf2. INPUT : tttctx = thread context. nbDigits = number of digits required. OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int randomString ( thread_context *tttctx, int nbDigits) { rndstr (tttctx->buf2, nbDigits); /*JLS 14-11-00*/ return (0); } /* New */ /*JLS 28-03-01*/ /* **************************************************************************** FUNCTION : incrementCommonCounterObject PURPOSE : Purpose of the fct INPUT : tttctx = thread context field = field to process OUTPUT : None. RETURN : -1 if error or end of loop (no_loop), new value else. DESCRIPTION : *****************************************************************************/ int incrementCommonCounterObject ( thread_context *tttctx, vers_field *field) { int ret; /* Return value */ int val; /* New value */ /* * Get mutex */ if ((ret = ldclt_mutex_lock (&(field->cnt_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: %s: cannot mutex_lock(field->cnt_mutex), error=%d (%s)\n", mctx.pid, tttctx->thrdId, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Compute next value */ switch (field->how) { case HOW_INCR_FROM_FILE: case HOW_INCR_NB: if (field->cnt <= field->high) /* Limit not reached */ { val = field->cnt; field->cnt++; } else { val = field->low; field->cnt = field->low + 1; } break; case HOW_INCR_FROM_FILE_NL: case HOW_INCR_NB_NOLOOP: if (field->cnt <= field->high) /* Limit not reached */ { val = field->cnt; field->cnt++; } else val = -1; /* Exit thread */ break; default: printf ("ldclt[%d]: %s: Illegal how=%d in incrementCommonCounterObject()\n", mctx.pid, tttctx->thrdId, field->how); val = -1; break; } /* * Free mutex */ if ((ret = ldclt_mutex_unlock (&(field->cnt_mutex))) != 0) { fprintf(stderr,"ldclt[%d]: %s: cannot mutex_unlock(field->cnt_mutex), error=%d (%s)\n", mctx.pid, tttctx->thrdId, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Maybe a message to print ? */ if (val < 0) printf ("ldclt[%d]: %s: Hit top incrementeal value\n", mctx.pid, tttctx->thrdId); return (val); } /* New */ /*JLS 14-03-01*/ /* **************************************************************************** FUNCTION : incrementCommonCounter PURPOSE : Purpose of the fct INPUT : tttctx = thread context OUTPUT : None. RETURN : -1 if error or end of loop (no_loop), new value else. DESCRIPTION : *****************************************************************************/ int incrementCommonCounter ( thread_context *tttctx) { int ret; /* Return value */ int val; /* New value */ /* * Get mutex */ if ((ret = ldclt_mutex_lock (&(mctx.lastVal_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: T%03d: cannot mutex_lock(lastVal_mutex), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Compute next value */ if ((mctx.mode & NOLOOP) && (mctx.lastVal == mctx.randomHigh)) val = -1; else { mctx.lastVal++; if (mctx.lastVal > mctx.randomHigh) { if (mctx.mode & NOLOOP) val = -1; else mctx.lastVal = mctx.randomLow; } val = mctx.lastVal; } /* * Free mutex */ if ((ret = ldclt_mutex_unlock (&(mctx.lastVal_mutex))) != 0) { fprintf(stderr,"ldclt[%d]: T%03d: cannot mutex_unlock(lastVal_mutex), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Maybe a message to print ? */ if (val < 0) printf ("ldclt[%d]: T%03d: Hit top incrementeal value\n", mctx.pid, tttctx->thrdNum); return (val); } /* **************************************************************************** FUNCTION : incrementNbOpers PURPOSE : Increment the counters tttctx->nbOpers and tttctx->totOpers of the given thread. INPUT : tttctx = thread context. OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int incrementNbOpers ( thread_context *tttctx) { int ret; /* Return value */ /* * Get mutex */ if ((ret = ldclt_mutex_lock (&(tttctx->nbOpers_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: T%03d: cannot mutex_lock(), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Increment counter */ tttctx->nbOpers++; /* * Free mutex */ if ((ret = ldclt_mutex_unlock (&(tttctx->nbOpers_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: T%03d: cannot mutex_unlock(), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Increment total and check if max value reached */ tttctx->totOpers++; if(tttctx->totalReq > -1) { if (tttctx->totOpers >= tttctx->totalReq) { if (setThreadStatus(tttctx, MUST_SHUTDOWN) < 0) { tttctx->status = DEAD; /* Force thread to die! */ } } } return (0); } /* **************************************************************************** FUNCTION : ignoreError PURPOSE : Returns true or false depending on the given error should be ignored or not (option -I). We will sleep() if an error about server down is to be ignored. INPUT : err = error number OUTPUT : None. RETURN : 1 if should be ignored, 0 else. DESCRIPTION : *****************************************************************************/ int ignoreError ( int err) { int i; for (i=0 ; i= MAX_ERROR_NB)) { fprintf (stderr, "ldclt[%d]: Illegal error number %d\n", mctx.pid, err); fflush (stderr); mctx.errorsBad++; } else mctx.errors[err]++; /* * Release the mutex */ if ((ret = ldclt_mutex_unlock (&(mctx.errors_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: Cannot mutex_unlock(errors_mutex), error=%d (%s)\n", mctx.pid, ret, strerror (ret)); fflush (stderr); return (-1); } /* * Maybe we should ignore this error ? */ if (!(ignoreError (err))) { /* * Ok, we should not ignore this error... * Maybe the limit is reached ? */ if ((err <= 0) || (err >= MAX_ERROR_NB)) { if (mctx.errorsBad > mctx.maxErrors) { printf ("ldclt[%d]: Max error limit reached - exiting.\n", mctx.pid); (void) printGlobalStatistics(); /*JLS 25-08-00*/ fflush (stdout); ldclt_sleep (5); ldcltExit (EXIT_MAX_ERRORS); /*JLS 25-08-00*/ } } else if (mctx.errors[err] > mctx.maxErrors) { printf ("ldclt[%d]: Max error limit reached - exiting.\n", mctx.pid); (void) printGlobalStatistics(); /*JLS 25-08-00*/ fflush (stdout); ldclt_sleep (5); ldcltExit (EXIT_MAX_ERRORS); /*JLS 25-08-00*/ } } /* * Normal end */ return (0); } /* **************************************************************************** FUNCTION : msgIdAdd PURPOSE : Add a new message id to the pending ones. INPUT : tttctx = thread's context. msgid = message id. str = free string. dn = dn of the entry attribs = attributes OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int msgIdAdd ( thread_context *tttctx, int msgid, char *str, char *dn, LDAPMod **attribs) { if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: T%03d: msgIdAdd (%d, %s)\n", mctx.pid, tttctx->thrdNum, msgid, str); /* * Add the new cell */ if (tttctx->firstMsgId == NULL) { tttctx->firstMsgId = (msgid_cell *) malloc (sizeof (msgid_cell)); if (tttctx->firstMsgId == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("ldclt[%d]: T%03d: cannot malloc(tttctx->firstMsgId), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, errno, strerror (errno)); return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ tttctx->lastMsgId = tttctx->firstMsgId; } else { tttctx->lastMsgId->next = (msgid_cell *) malloc (sizeof (msgid_cell)); if (tttctx->lastMsgId->next == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("ldclt[%d]: T%03d: cannot malloc(tttctx->lastMsgId->next), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, errno, strerror (errno)); return (-1); /*JLS 06-03-00*/ } /*JLS 06-03-00*/ tttctx->lastMsgId = tttctx->lastMsgId->next; } /* * Memorize the information */ tttctx->lastMsgId->next = NULL; tttctx->lastMsgId->msgid = msgid; strcpy (tttctx->lastMsgId->str, str); strcpy (tttctx->lastMsgId->dn, dn); tttctx->lastMsgId->attribs = attribs; return (0); } /* **************************************************************************** FUNCTION : msgIdAttribs PURPOSE : Found the requested message id in the pending list. INPUT : tttctx = thread's context msgid = message id OUTPUT : None RETURN : The associated attributes, or NULL. DESCRIPTION : *****************************************************************************/ LDAPMod ** msgIdAttribs ( thread_context *tttctx, int msgid) { msgid_cell *pt; if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: T%03d: msgIdAttribs (%d)\n", mctx.pid, tttctx->thrdNum, msgid); for (pt = tttctx->firstMsgId ; pt != NULL ; pt = pt->next) if (pt->msgid == msgid) return (pt->attribs); return (NULL); } /* **************************************************************************** FUNCTION : msgIdDN PURPOSE : Found the requested message id in the pending list. INPUT : tttctx = thread's context msgid = message id OUTPUT : None RETURN : The associated DN, or NULL. DESCRIPTION : *****************************************************************************/ char * msgIdDN ( thread_context *tttctx, int msgid) { msgid_cell *pt; if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: T%03d: msgIdDN (%d)\n", mctx.pid, tttctx->thrdNum, msgid); for (pt = tttctx->firstMsgId ; pt != NULL ; pt = pt->next) if (pt->msgid == msgid) return (pt->dn); return (NULL); } /* **************************************************************************** FUNCTION : msgIdStr PURPOSE : Found the requested message id in the pending list. INPUT : tttctx = thread's context msgid = message id OUTPUT : None RETURN : The associated str, or an error message string. DESCRIPTION : *****************************************************************************/ char * msgIdStr ( thread_context *tttctx, int msgid) { msgid_cell *pt; if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: T%03d: msgIdStr (%d)\n", mctx.pid, tttctx->thrdNum, msgid); for (pt = tttctx->firstMsgId ; pt != NULL ; pt = pt->next) if (pt->msgid == msgid) return (pt->str); return ("Error: msgid not found"); } /* **************************************************************************** FUNCTION : msgIdDel PURPOSE : Delete a message id from the pending ones. INPUT : tttctx = thread's context msgid = message id. freeAttr= true or false depending on freing the attribs OUTPUT : None. RETURN : -1 if not found, 0 else. DESCRIPTION : *****************************************************************************/ int msgIdDel ( thread_context *tttctx, int msgid, int freeAttr) { msgid_cell *pt; /* For the loop */ msgid_cell *ptToFree; /* The cell to free */ if (mctx.mode & VERY_VERBOSE) printf ("ldclt[%d]: T%03d: msgIdDel (%d)\n", mctx.pid, tttctx->thrdNum, msgid); /* * Make sure there is a list ! */ if (tttctx->firstMsgId != NULL) { /* * Maybe it is the first one ? */ if (tttctx->firstMsgId->msgid == msgid) { ptToFree = tttctx->firstMsgId; tttctx->firstMsgId = tttctx->firstMsgId->next; if (tttctx->firstMsgId == NULL) tttctx->lastMsgId = NULL; free (ptToFree); return (0); } /* * Let's go through the whole list */ for (pt = tttctx->firstMsgId ; pt->next != NULL ; pt = pt->next) if (pt->next->msgid == msgid) { /* * Be carrefull if it is the last element of the list */ if (pt->next->next == NULL) tttctx->lastMsgId = pt; ptToFree = pt->next; pt->next = ptToFree->next; if (freeAttr) if (freeAttrib (ptToFree->attribs) < 0) return (-1); /* * Free the pointer itself */ free (ptToFree); return (0); } } /* * Not found */ printf ("ldclt[%d]: T%03d: message %d not found.\n", mctx.pid, tttctx->thrdNum, msgid); fflush (stdout); return (-1); } /* New function */ /*JLS 17-11-00*/ /* **************************************************************************** FUNCTION : getThreadStatus PURPOSE : Get the value of a given thread's status. INPUT : tttctx = thread context OUTPUT : status = the thread's status RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int getThreadStatus ( thread_context *tttctx, int *status) { int ret; /* Return code */ if ((ret = ldclt_mutex_lock (&(tttctx->status_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: Cannot mutex_lock(T%03d), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, strerror (ret)); fprintf (stderr, "ldclt[%d]: Problem in getThreadStatus()\n", mctx.pid); fflush (stderr); return (-1); } *status = tttctx->status; if ((ret = ldclt_mutex_unlock (&(tttctx->status_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: Cannot mutex_unlock(T%03d), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, strerror (ret)); fprintf (stderr, "ldclt[%d]: Problem in getThreadStatus()\n", mctx.pid); fflush (stderr); return (-1); } return (0); } /* New function */ /*JLS 17-11-00*/ /* **************************************************************************** FUNCTION : setThreadStatus PURPOSE : Set the value of a given thread's status. INPUT : tttctx = thread context status = new status OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int setThreadStatus ( thread_context *tttctx, int status) { int ret; /* Return code */ if ((ret = ldclt_mutex_lock (&(tttctx->status_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: Cannot mutex_lock(T%03d), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, strerror (ret)); fprintf (stderr, "ldclt[%d]: Problem in setThreadStatus()\n", mctx.pid); fflush (stderr); return (-1); } tttctx->status = status; if ((ret = ldclt_mutex_unlock (&(tttctx->status_mutex))) != 0) { fprintf (stderr, "ldclt[%d]: Cannot mutex_unlock(T%03d), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, ret, strerror (ret)); fprintf (stderr, "ldclt[%d]: Problem in setThreadStatus()\n", mctx.pid); fflush (stderr); return (-1); } return (0); } /* **************************************************************************** FUNCTION : threadMain PURPOSE : This function is the main function of the client threads part of this tool. INPUT : arg = this thread's thread_context OUTPUT : None. RETURN : None. DESCRIPTION : *****************************************************************************/ void * threadMain ( void *arg) { thread_context *tttctx; /* This thread's context */ int go = 1; /* Thread must continue */ int status; /* Thread's status */ /*JLS 17-11-00*/ /* * Initialization */ tttctx = (thread_context *) arg; if (setThreadStatus (tttctx, CREATED) < 0) /*JLS 17-11-00*/ { /*JLS 17-11-00*/ tttctx->status = DEAD; /*JLS 17-11-00*/ return NULL; /*JLS 17-11-00*/ } /*JLS 17-11-00*/ tttctx->asyncHit = 0; tttctx->binded = 0; tttctx->fd = -1; tttctx->lastVal = mctx.randomLow-1; tttctx->ldapCtx = NULL; tttctx->matcheddnp = NULL; /*JLS 15-12-00*/ tttctx->nbOpers = 0; tttctx->totOpers = 0; tttctx->pendingNb = 0; tttctx->firstMsgId = NULL; tttctx->lastMsgId = NULL; /* * Don't forget the buffers !! * This should save time while redoing random values */ if ((mctx.mode & NEED_FILTER) || (mctx.mod2 & M2_GENLDIF)) /*JLS 19-03-01*/ { if (mctx.mod2 & M2_RDN_VALUE) /*JLS 23-03-01*/ tttctx->bufFilter = (char *) malloc (MAX_FILTER); /*JLS 23-03-01*/ else /*JLS 23-03-01*/ { /*JLS 23-03-01*/ /* * Variable filter ? */ tttctx->bufFilter = (char *) malloc (strlen (mctx.filter) + 1); if (tttctx->bufFilter == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("ldclt[%d]: %s: cannot malloc(tttctx->bufFilter), error=%d (%s)\n", mctx.pid, tttctx->thrdId, errno, strerror (errno)); ldcltExit (EXIT_INIT); /*JLS 18-12-00*/ } /*JLS 06-03-00*/ if (!(mctx.mode & (RANDOM | INCREMENTAL))) strcpy (tttctx->bufFilter, mctx.filter); else { tttctx->startRandom = strlen (mctx.randomHead); strcpy (tttctx->bufFilter, mctx.randomHead); strcpy (&(tttctx->bufFilter[tttctx->startRandom+mctx.randomNbDigit]), mctx.randomTail); if (mctx.mode & VERY_VERBOSE) { printf ("ldclt[%d]: %s: startRandom = %d\n", mctx.pid, tttctx->thrdId, tttctx->startRandom); printf ("ldclt[%d]: %s: randomHead = \"%s\", randomTail = \"%s\"\n", mctx.pid, tttctx->thrdId, mctx.randomHead, mctx.randomTail); } } } /*JLS 23-03-01*/ /* * Variable base DN ? */ tttctx->bufBaseDN = (char *) malloc (strlen (mctx.baseDN) + 1); if (tttctx->bufBaseDN == NULL) /*JLS 06-03-00*/ { /*JLS 06-03-00*/ printf ("ldclt[%d]: T%03d: cannot malloc(tttctx->bufBaseDN), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, errno, strerror (errno)); ldcltExit (EXIT_INIT); /*JLS 18-12-00*/ } /*JLS 06-03-00*/ if (!(mctx.mode & RANDOM_BASE)) strcpy (tttctx->bufBaseDN, mctx.baseDN); else { tttctx->startBaseDN = strlen (mctx.baseDNHead); strcpy (tttctx->bufBaseDN, mctx.baseDNHead); strcpy (&(tttctx->bufBaseDN[tttctx->startBaseDN+mctx.baseDNNbDigit]), mctx.baseDNTail); } /* * Variable bind DN ? * Do not forget the random bind password below that is activated * at the same time as the random bind DN. */ if (mctx.bindDN != NULL) /*JLS 05-03-01*/ { /*JLS 05-03-01*/ tttctx->bufBindDN = (char *) malloc (strlen (mctx.bindDN) + 1); if (tttctx->bufBindDN == NULL) { printf ("ldclt[%d]: T%03d: cannot malloc(tttctx->bufBindDN), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, errno, strerror (errno)); ldcltExit (EXIT_INIT); } if (!(mctx.mode & RANDOM_BINDDN)) strcpy (tttctx->bufBindDN, mctx.bindDN); else { tttctx->startBindDN = strlen (mctx.bindDNHead); strcpy (tttctx->bufBindDN, mctx.bindDNHead); strcpy (&(tttctx->bufBindDN[tttctx->startBindDN+mctx.bindDNNbDigit]), mctx.bindDNTail); } } /*JLS 05-03-01*/ /* * Variable bind password ? * Remember that the random bind password feature is activated * by the same option as the random bind DN, but has here its own * code section for the ease of coding. */ if (mctx.passwd != NULL) /*JLS 05-03-01*/ { /*JLS 05-03-01*/ tttctx->bufPasswd = (char *) malloc (strlen (mctx.passwd) + 1); if (tttctx->bufPasswd == NULL) { printf ("ldclt[%d]: T%03d: cannot malloc(tttctx->bufPasswd), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, errno, strerror (errno)); ldcltExit (EXIT_INIT); } if (!(mctx.mode & RANDOM_BINDDN)) strcpy (tttctx->bufPasswd, mctx.passwd); else { tttctx->startPasswd = strlen (mctx.passwdHead); strcpy (tttctx->bufPasswd, mctx.passwdHead); strcpy (&(tttctx->bufPasswd[tttctx->startPasswd+mctx.passwdNbDigit]), mctx.passwdTail); } } } /*JLS 05-03-01*/ /* * Bind DN from a file ? * The trick (mctx.passwd = "foo bar"; ) is needed to * simplify the code, because in many places we check * if mctx.passwd exist before sending password. */ if (mctx.mod2 & M2_RNDBINDFILE) /*JLS 03-05-01*/ { /*JLS 03-05-01*/ tttctx->bufBindDN = (char *) malloc (MAX_DN_LENGTH); /*JLS 03-05-01*/ tttctx->bufPasswd = (char *) malloc (MAX_DN_LENGTH); /*JLS 03-05-01*/ mctx.passwd = "foo bar"; /* trick... */ /*JLS 03-05-01*/ } /*JLS 03-05-01*/ /* * Initiates the attribute replace buffers */ if (mctx.mode & ATTR_REPLACE) /* New */ /*JLS 21-11-00*/ { tttctx->bufAttrpl = (char *) malloc (strlen (mctx.attrpl) + 1); if (tttctx->bufAttrpl == NULL) { printf ("ldclt[%d]: T%03d: cannot malloc(tttctx->bufAttrpl), error=%d (%s)\n", mctx.pid, tttctx->thrdNum, errno, strerror (errno)); ldcltExit (EXIT_INIT); /*JLS 18-12-00*/ } tttctx->startAttrpl = strlen (mctx.attrplHead); strcpy (tttctx->bufAttrpl, mctx.attrplHead); strcpy (&(tttctx->bufAttrpl[tttctx->startAttrpl+mctx.attrplNbDigit]), mctx.attrplTail); } /* * We are ready to go ! */ status = RUNNING; /*JLS 17-11-00*/ if (setThreadStatus (tttctx, RUNNING) < 0) /*JLS 17-11-00*/ status = DEAD; /*JLS 17-11-00*/ /* * Let's go ! */ while (go && (status != DEAD) && (status != MUST_SHUTDOWN)) /*JLS 17-11-00*/ { if (mctx.waitSec > 0) { /*JLS 17-11-00*/ ldclt_sleep (mctx.waitSec); /* * Maybe we should shutdown ? */ if (getThreadStatus (tttctx, &status) < 0) /*JLS 17-11-00*/ break; /*JLS 17-11-00*/ if (status == MUST_SHUTDOWN) /*JLS 17-11-00*/ break; /*JLS 17-11-00*/ } /*JLS 17-11-00*/ /* * Do a LDAP request */ if (tttctx->mode & ADD_ENTRIES) if (doAddEntry (tttctx) < 0) { go = 0; continue; } if (tttctx->mode & ATTR_REPLACE) /*JLS 21-11-00*/ if (doAttrReplace (tttctx) < 0) /*JLS 21-11-00*/ { /*JLS 21-11-00*/ go = 0; /*JLS 21-11-00*/ continue; /*JLS 21-11-00*/ } /*JLS 21-11-00*/ if (tttctx->mode & DELETE_ENTRIES) if (doDeleteEntry (tttctx) < 0) { go = 0; continue; } if (mctx.mod2 & M2_BINDONLY) /*JLS 04-05-01*/ if (doBindOnly (tttctx) < 0) /*JLS 04-05-01*/ { /*JLS 04-05-01*/ go = 0; /*JLS 04-05-01*/ continue; /*JLS 04-05-01*/ } /*JLS 04-05-01*/ if (tttctx->mode & EXACT_SEARCH) if (doExactSearch (tttctx) < 0) { go = 0; continue; } if (tttctx->mode & RENAME_ENTRIES) if (doRename (tttctx) < 0) { go = 0; continue; } /* * Maybe a specific scenario ? */ if (tttctx->mode & SCALAB01) /*JLS 08-01-01*/ if (doScalab01 (tttctx) < 0) /*JLS 08-01-01*/ { /*JLS 08-01-01*/ go = 0; /*JLS 08-01-01*/ continue; /*JLS 08-01-01*/ } /*JLS 08-01-01*/ /* * Maybe genldif mode ? */ if (mctx.mod2 & M2_GENLDIF) /*JLS 19-03-01*/ if (doGenldif (tttctx) < 0) /*JLS 19-03-01*/ { /*JLS 19-03-01*/ ldclt_flush_genldif(); /*JLS 02-04-01*/ go = 0; /*JLS 19-03-01*/ continue; /*JLS 19-03-01*/ } /*JLS 19-03-01*/ /* * Check the thread's status */ if (getThreadStatus (tttctx, &status) < 0) /*JLS 17-11-00*/ break; /*JLS 17-11-00*/ } /* * End of thread */ /* [156984] once setting "DEAD", nothing should be done in the context */ /* moved the dead message above setThreadStatus(DEAD) */ printf ("ldclt[%d]: T%03d: thread is dead.\n", mctx.pid, tttctx->thrdNum); fflush (stdout); if (setThreadStatus (tttctx, DEAD) < 0) /*JLS 17-11-00*/ { /*JLS 17-11-00*/ ldclt_sleep (1); /*JLS 17-11-00*/ tttctx->status = DEAD; /* Force it !!! */ /*JLS 17-11-00*/ } /*JLS 17-11-00*/ return (arg); } /* End of file */ --- NEW FILE utils.c --- #ident "ldclt @(#)utils.c 1.4 01/01/11" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : utils.c AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 14 November 2000 DESCRIPTION : This file contains the utilities functions that will be used as well by ldclt and by the genldif command, e.g. the random generator functions, etc... The main target/reason for creating this file is to be able to easely separate these functions from ldclt's framework and data structures, and thus to provide a kind of library suitable for any command. LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 14/11/00 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 14/11/00 | JL Schwing | 1.2 : Port on AIX. ---------+--------------+------------------------------------------------------ 16/11/00 | JL Schwing | 1.3 : lint cleanup. ---------+--------------+------------------------------------------------------ 11/01/01 | JL Schwing | 1.4 : Add new function rndlim(). ---------+--------------+------------------------------------------------------ */ #include "utils.h" /* Basic definitions for this file */ #include /* sprintf(), etc... */ #include /* lrand48(), etc... */ #include /* isascii(), etc... */ /*JLS 16-11-00*/ #include /* strerror(), etc... */ /*JLS 14-11-00*/ /* * Some global variables... */ #ifdef AIX pthread_mutex_t ldcltrand48_mutex; /* ldcltrand48() */ /*JLS 14-11-00*/ #endif #ifdef AIX /* New */ /*JLS 14-11-00*/ /* **************************************************************************** FUNCTION : ldcltrand48 PURPOSE : Implement a thread-save version of lrand48() INPUT : None. OUTPUT : None. RETURN : A random value. DESCRIPTION : *****************************************************************************/ long int ldcltrand48 (void) { long int val; int ret; if ((ret = pthread_mutex_lock (&ldcltrand48_mutex)) != 0) { fprintf (stderr, "Cannot pthread_mutex_lock(ldcltrand48_mutex), error=%d (%s)\n", ret, strerror (ret)); fflush (stderr); ldcltExit (99); } val = lrand48(); if ((ret = pthread_mutex_unlock (&ldcltrand48_mutex)) != 0) { fprintf (stderr, "Cannot pthread_mutex_unlock(ldcltrand48_mutex), error=%d (%s)\n", ret, strerror (ret)); fflush (stderr); ldcltExit (99); } return (val); } #else /* AIX */ #define ldcltrand48() lrand48() #endif /* AIX */ /* **************************************************************************** FUNCTION : utilsInit PURPOSE : Initiates the utilities functions. INPUT : None. OUTPUT : None. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int utilsInit (void) { #ifdef AIX /*JLS 14-11-00*/ int ret; /*JLS 14-11-00*/ /* * Initiate the mutex that protect ldcltrand48() */ if ((ret = pthread_mutex_init(&ldcltrand48_mutex, NULL)) != 0)/*JLS 14-11-00*/ { /*JLS 14-11-00*/ fprintf (stderr, "ldclt: %s\n", strerror (ret)); /*JLS 14-11-00*/ fprintf (stderr, /*JLS 14-11-00*/ "Error: cannot initiate ldcltrand48_mutex\n"); /*JLS 14-11-00*/ fflush (stderr); /*JLS 14-11-00*/ return (-1); /*JLS 14-11-00*/ } /*JLS 14-11-00*/ #endif /*JLS 14-11-00*/ /* * No error */ return (0); } /* **************************************************************************** FUNCTION : rndlim PURPOSE : Returns a random number between the given limits. INPUT : low = low limit high = high limit OUTPUT : None. RETURN : The random value. DESCRIPTION : *****************************************************************************/ int rndlim ( int low, int high) { return (low + ldcltrand48() % (high-low+1)); } /* **************************************************************************** FUNCTION : rnd PURPOSE : Creates a random number string between the given arguments. The string is returned in the buffer. INPUT : low = low limit high = high limit ndigits = number of digits OUTPUT : buf = buffer to write the random string. Note that it is generated with fixed number of digits, completed with leading '0'. RETURN : None. DESCRIPTION : *****************************************************************************/ void rnd ( char *buf, int low, int high, int ndigits) { sprintf (buf, "%0*d", ndigits, (int)(low + (ldcltrand48() % (high-low+1)))); /*JLS 14-11-00*/ } /* **************************************************************************** FUNCTION : rndstr PURPOSE : Return a random string, of length ndigits. The string is returned in the buf. INPUT : ndigits = number of digits required. OUTPUT : buf = the buf must be long enough to contain the requested string. RETURN : None. DESCRIPTION : *****************************************************************************/ void rndstr ( char *buf, int ndigits) { unsigned int rndNum; /* The random value */ int charNum; /* Random char in buf */ int byteNum; /* Byte in rndNum */ char newChar; /* The new byte as a char */ char *rndArray; /* To cast the rndNum into chars */ charNum = 0; byteNum = 4; rndArray = (char *)(&rndNum); while (charNum < ndigits) { /* * Maybe we should generate a new random number ? */ if (byteNum == 4) { rndNum = ldcltrand48(); /*JLS 14-11-00*/ byteNum = 0; } /* * Is it a valid char ? */ newChar = rndArray[byteNum]; /* * The last char must not be a '\' nor a space. */ if (!(((charNum+1) == ndigits) && ((newChar == '\\') || (newChar == ' ')))) { /* * First, there are some special characters that have a meaning for * LDAP, and thus that must be quoted. What LDAP's rfc1779 means by * "to quote" may be translated by "to antislash" * Note: we do not check the \ because in this way, it leads to randomly * quote some valid characters. */ if ((newChar == '=') || (newChar == ';') || (newChar == ',') || (newChar == '+') || (newChar == '"') || (newChar == '<') || (newChar == '>') || (newChar == '#')) { /* * Ensure that the previous char is *not* a \ otherwise * it will result in a \\, rather than a \, * If it is the case, add one more \ to have \\\, */ if ((charNum > 0) && (buf[charNum-1] == '\\')) { if ((charNum+3) < ndigits) { buf[charNum++] = '\\'; buf[charNum++] = '\\'; buf[charNum++] = newChar; } } else { if ((charNum+2) < ndigits) { buf[charNum++] = '\\'; buf[charNum++] = newChar; } } } else { /* * Maybe strict ascii required ? */ if (1) { if (isascii (newChar) && !iscntrl(newChar)) buf[charNum++] = newChar; } else { if (((newChar >= 0x30) && (newChar <= 0x7a)) || ((newChar >= 0xc0) && (newChar <= 0xf6))) buf[charNum++] = newChar; } } } /* * Next byte of the random value. */ byteNum++; } /* * End of function */ buf[charNum] = '\0'; } /* End of file */ --- NEW FILE utils.h --- #ident "ldclt @(#)utils.h 1.3 01/01/11" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : utils.h AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 14 November 2000 DESCRIPTION : This files contians the prototypes and other definitions related to utils.c, utilities functions that will be used as well by ldclt and by the genldif command. LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 14/11/00 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 16/11/00 | JL Schwing | 1.2 : Fix typo. ---------+--------------+------------------------------------------------------ 11/01/01 | JL Schwing | 1.3 : Add new function rndlim(). ---------+--------------+------------------------------------------------------ */ /* * Functions exported by utils.c */ extern void rnd (char *buf, int low, int high, int ndigits); extern int rndlim (int low, int high); extern void rndstr (char *buf, int ndigits); extern int utilsInit (void); /* End of file */ --- NEW FILE version.c --- char *ldcltVersion="4.23"; --- NEW FILE workarounds.c --- #ident "ldclt @(#)workarounds.c 1.5 00/12/01" /** BEGIN COPYRIGHT BLOCK * 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; version 2 of the License. * * 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. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ /* FILE : workarounds.c AUTHOR : Jean-Luc SCHWING VERSION : 1.0 DATE : 15 December 1998 DESCRIPTION : This file contains special work-arounds targetted to fix, or work-around, the various bugs that may appear in Solaris 2.7 libldap. LOCAL : None. HISTORY : ---------+--------------+------------------------------------------------------ dd/mm/yy | Author | Comments ---------+--------------+------------------------------------------------------ 15/12/98 | JL Schwing | Creation ---------+--------------+------------------------------------------------------ 19/09/00 | JL Schwing | 1.2: Port on Netscape's libldap. This is realized in | such a way that this library become the default | way so a ifdef for Solaris will be used... ---------+--------------+------------------------------------------------------ 16/11/00 | JL Schwing | 1.3 : lint cleanup. ----------------------------------------------------------------------------- 29/11/00 | JL Schwing | 1.4 : Port on NT 4. ---------+--------------+------------------------------------------------------ 01/12/00 | JL Schwing | 1.5 : Port on Linux. ---------+--------------+------------------------------------------------------ */ #include #include #include /* exit(), ... */ /*JLS 16-11-00*/ #include "lber.h" #include "ldap.h" #ifdef SOLARIS_LIBLDAP /*JLS 19-09-00*/ #include "ldap-private.h" #else /*JLS 19-09-00*/ #ifndef _WIN32 /*JLS 01-12-00*/ #include /*JLS 01-12-00*/ #endif /*JLS 01-12-00*/ #include "port.h" /* Portability definitions */ /*JLS 29-11-00*/ #include "ldclt.h" /*JLS 19-09-00*/ #endif /*JLS 19-09-00*/ /* **************************************************************************** FUNCTION : getFdFromLdapSession PURPOSE : This function is a work-around for the bug 4197228 that is not expected to be fixed soon... INPUT : ld = ldap session to process. OUTPUT : fd = the corresponding fd. RETURN : -1 if error, 0 else. DESCRIPTION : *****************************************************************************/ int getFdFromLdapSession ( LDAP *ld, int *fd) { #ifdef SOLARIS_LIBLDAP /*JLS 19-09-00*/ *fd = ld->ld_sb.sb_sd; return (0); #else /*JLS 19-09-00*/ printf("Error : getFdFromLdapSession() not implemented...\n");/*JLS 19-09-00*/ exit (EXIT_OTHER); /*JLS 19-09-00*/ #endif /*JLS 19-09-00*/ } /* End of file */ From fedora-directory-commits at redhat.com Wed Jan 11 01:54:49 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 20:54:49 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt/examples/001 add.ksh, NONE, 1.1 add_incr.ksh, NONE, 1.1 config.ksh, NONE, 1.1 delete.ksh, NONE, 1.1 env.ksh, NONE, 1.1 search.ksh, NONE, 1.1 Message-ID: <200601110154.k0B1snXc008771@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/examples/001 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8602/ldclt/examples/001 Added Files: add.ksh add_incr.ksh config.ksh delete.ksh env.ksh search.ksh Log Message: [164596] LDCLT distributed with Directory Server integrated ldclt from DSRK into the DS source tree. --- NEW FILE add.ksh --- #!/bin/ksh -p #ident "ldclt @(#)add.ksh 1.2 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # This script will add random entries in the database. . env.ksh ldclt \ -h $Host -p $Port \ -D "$UserDN" -w "$UserPassword" \ -e add,person,random \ -e imagedir=../../../data/ldclt/images \ -r0 -R1000000 \ -I68 \ -n50 \ -f cn=mrXXXXXXXXX -b o=data,$BaseDN \ -v -q --- NEW FILE add_incr.ksh --- #!/bin/ksh -p #ident "ldclt @(#)add_incr.ksh 1.2 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # Sequential add of entries. # This script will add entries from 0 to 1000000 and exit. All the # threads will share the same counter, i.e. each entry will be added # only one time. . env.ksh ldclt \ -h $Host -p $Port \ -D "$UserDN" -w "$UserPassword" \ -e add,person,incr,commoncounter,noloop \ -e imagedir=../../../data/ldclt/images \ -r0 -R1000000 \ -I68 \ -n5 \ -f cn=mrXXXXXXXXX -b o=data,$BaseDN \ -v -q --- NEW FILE config.ksh --- #!/bin/ksh -p #ident "ldclt @(#)config.ksh 1.2 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK . env.ksh ldapmodify -D"$RootDN" -w"$RootPasswd" -h$Host -p$Port <<-EOD dn: $UserDN changetype: add objectclass: person sn: test user userpassword: $UserPassword dn: $BaseDN changetype: modify add : aci aci: (targetattr = "*") (version 3.0;acl "test user";allow (all)(userdn = "ldap:///$UserDN");) EOD --- NEW FILE delete.ksh --- #!/bin/ksh -p #ident "ldclt @(#)delete.ksh 1.2 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # This script will delete random entries in the database. . env.ksh ldclt \ -h $Host -p $Port \ -D "$UserDN" -w "$UserPassword" \ -e delete,random \ -e imagedir=../../../data/ldclt/images \ -r0 -R1000000 \ -I32 \ -n50 \ -f cn=mrXXXXXXXXX -b o=data,$BaseDN \ -v -q --- NEW FILE env.ksh --- #ident "ldclt @(#)env.ksh 1.2 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK Host=localhost Port=1389 BaseDN=o=test.com RootDN="cn=directory manager" RootPasswd=secret12 UserRDN="cn=test" UserDN="$UserRDN,$BaseDN" UserPassword=testpassword --- NEW FILE search.ksh --- #!/bin/ksh -p #ident "ldclt @(#)search.ksh 1.2 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # This script will search random entries in the database. . env.ksh ldclt \ -h $Host -p $Port \ -D "$UserDN" -w "$UserPassword" \ -e esearch,random \ -e imagedir=../../../data/ldclt/images \ -r0 -R1000000 \ -I32 \ -n200 \ -f cn=mrXXXXXXXXX -b o=data,$BaseDN \ -v -q From fedora-directory-commits at redhat.com Wed Jan 11 01:54:55 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 20:54:55 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt/examples/002 add.ksh, NONE, 1.1 config.ksh, NONE, 1.1 env.ksh, NONE, 1.1 ldif01.ksh, NONE, 1.1 ldif02.ksh, NONE, 1.1 ldif03.ksh, NONE, 1.1 ofile, NONE, 1.1 Message-ID: <200601110154.k0B1stSo008784@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/examples/002 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8602/ldclt/examples/002 Added Files: add.ksh config.ksh env.ksh ldif01.ksh ldif02.ksh ldif03.ksh ofile Log Message: [164596] LDCLT distributed with Directory Server integrated ldclt from DSRK into the DS source tree. --- NEW FILE add.ksh --- #!/bin/ksh -p #ident "ldclt @(#)add.ksh 1.1 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # Add 500 entries with strings randomly selected from Lastname.txt # . env.ksh echo "dn: $BaseDN objectclass: organization " > /tmp/ldif01.ldif ldclt \ -h $Host -p $Port \ -D "$UserDN" -w "$UserPassword" \ -q -v -n10 \ -e object=ofile \ -e add,commoncounter \ -e -e imagedir=../../../data/ldclt/images \ -b $BaseDN -e rdn='cn:blob [C=RNDFROMFILE(../../../data/ldclt/names/Lastname.txt)] [D=RNDN(3;11;5)] [E=INCRNNOLOOP(1;500;3)]' --- NEW FILE config.ksh --- #!/bin/ksh -p #ident "ldclt @(#)config.ksh 1.1 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK . env.ksh ldapmodify -D"$RootDN" -w"$RootPasswd" -h$Host -p$Port <<-EOD dn: $UserDN changetype: add objectclass: person sn: test user userpassword: $UserPassword dn: $BaseDN changetype: modify add : aci aci: (targetattr = "*") (version 3.0;acl "test user";allow (all)(userdn = "ldap:///$UserDN");) EOD --- NEW FILE env.ksh --- #ident "ldclt @(#)env.ksh 1.1 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK Host=localhost Port=1389 BaseDN=o=test.com RootDN="cn=directory manager" RootPasswd=secret12 UserRDN="cn=test" UserDN="$UserRDN,$BaseDN" UserPassword=testpassword --- NEW FILE ldif01.ksh --- #!/bin/ksh -p #ident "ldclt @(#)ldif01.ksh 1.1 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # Create ldif file with incremental strings from file. # Will create one entry for each line in Lastname.txt # . env.ksh echo "dn: $BaseDN objectclass: organization " > /tmp/ldif01.ldif ldclt \ -h $Host -p $Port \ -D "$UserDN" -w "$UserPassword" \ -q -v -n1 \ -e object=ofile \ -e append,genldif=/tmp/ldif01.ldif \ -e imagedir=../../../data/ldclt/images \ -b $BaseDN -e rdn='cn:blob [C=INCRFROMFILENOLOOP(../../../data/ldclt/names/Lastname.txt)] [D=RNDN(3;11;5)] [E=INCRNNOLOOP(1;150000;6)]' --- NEW FILE ldif02.ksh --- #!/bin/ksh -p #ident "ldclt @(#)ldif02.ksh 1.1 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # Create ldif file with incremental strings from file. # Will create 150k entries # . env.ksh echo "dn: $BaseDN objectclass: organization " > /tmp/ldif02.ldif ldclt \ -h $Host -p $Port \ -D "$UserDN" -w "$UserPassword" \ -q -v -n1 \ -e object=ofile \ -e append,genldif=/tmp/ldif02.ldif \ -e imagedir=../../../data/ldclt/images \ -b $BaseDN -e rdn='cn:blob [C=INCRFROMFILE(../../../data/ldclt/names/Lastname.txt)] [D=RNDN(3;11;5)] [E=INCRNNOLOOP(1;150000;6)]' --- NEW FILE ldif03.ksh --- #!/bin/ksh -p #ident "ldclt @(#)ldif03.ksh 1.1 01/04/11" # BEGIN COPYRIGHT BLOCK # 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; version 2 of the License. # # 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. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # Create ldif file with random strings from file. # Will create 150k entries # . env.ksh echo "dn: $BaseDN objectclass: organization " > /tmp/ldif03.ldif ldclt \ -h $Host -p $Port \ -D "$UserDN" -w "$UserPassword" \ -q -v -n1 \ -e object=ofile \ -e append,genldif=/tmp/ldif03.ldif \ -e imagedir=../../../data/ldclt/images \ -b $BaseDN -e rdn='cn:blob [C=RNDFROMFILE(../../../data/ldclt/names/Lastname.txt)] [D=RNDN(3;11;5)] [E=INCRNNOLOOP(1;150000;6)]' --- NEW FILE ofile --- #ident "ldclt @(#)ofile 1.1 01/04/11" # objectclass: person sn: mr [A=RNDS(12)] final [RNDN(1;5;6)] description: blob [RNDN(1;5;6)] blib description: [A] description: [A=RNDFROMFILE(../../../data/ldclt/names/Firstname.txt)].[B=RNDFROMFILE(../../../data/ldclt/names/Lastname.txt)] description: A = [A] description: B = [B] description: C = [C] description: D = [D] description: E = [E] From fedora-directory-commits at redhat.com Wed Jan 11 01:54:32 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 20:54:32 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools Makefile, 1.9, 1.10 Message-ID: <200601110155.k0B1t2rr008787@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8602 Modified Files: Makefile Log Message: [164596] LDCLT distributed with Directory Server integrated ldclt from DSRK into the DS source tree. Index: Makefile =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Makefile 6 Jan 2006 00:53:18 -0000 1.9 +++ Makefile 11 Jan 2006 01:54:24 -0000 1.10 @@ -171,7 +171,7 @@ BINS= $(LDIF) $(PWDHASH) $(KEYUPG) $(MMLDIF) $(MIGRATECRED) $(DBSCAN) EXTRABINS= $(EGGENCODE) -all: $(OBJDEST) $(BINDIR) $(LDAP_ADMIN_BIN_RELDIR) $(BINS) buildRsearch +all: $(OBJDEST) $(BINDIR) $(LDAP_ADMIN_BIN_RELDIR) $(BINS) buildRsearch buildLdclt extras: $(OBJDEST) $(BINDIR) $(EGGENCODE) @@ -202,6 +202,9 @@ buildRsearch: cd rsearch; $(MAKE) +buildLdclt: + cd ldclt; $(MAKE) + clean: -$(RM) $(ALL_OBJS) -$(RM) $(BINS) $(EXTRABINS) From fedora-directory-commits at redhat.com Wed Jan 11 02:00:39 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jan 2006 21:00:39 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/rsearch Makefile, 1.1, 1.2 addthread.c, 1.1, 1.2 addthread.h, 1.1, 1.2 infadd.c, 1.1, 1.2 infadd.h, 1.1, 1.2 main.c, 1.1, 1.2 nametable.c, 1.1, 1.2 nametable.h, 1.1, 1.2 rsearch.c, 1.1, 1.2 rsearch.h, 1.1, 1.2 sdattable.c, 1.1, 1.2 sdattable.h, 1.1, 1.2 searchthread.c, 1.1, 1.2 searchthread.h, 1.1, 1.2 Message-ID: <200601110200.k0B20dwv008850@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8808/rsearch Modified Files: Makefile addthread.c addthread.h infadd.c infadd.h main.c nametable.c nametable.h rsearch.c rsearch.h sdattable.c sdattable.h searchthread.c searchthread.h Log Message: Added copyrights. Index: Makefile =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 6 Jan 2006 00:53:24 -0000 1.1 +++ Makefile 11 Jan 2006 02:00:32 -0000 1.2 @@ -33,7 +33,7 @@ # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. -# Copyright (C) 2005 Red Hat, Inc. +# Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # @@ -52,14 +52,9 @@ BINDIR = $(RELDIR)/shared/bin DATDIR = $(RELDIR)/shared/data -SLAPD_OBJDIR = $(LDAP_OBJDIR) - include $(BUILD_ROOT)/nsdefs.mk include $(BUILD_ROOT)/nsconfig.mk include $(LDAP_SRC)/nsldap.mk -INCLUDES+=-I$(DB_INCLUDE) - -SLAPDHDIR = ../ ifeq ($(ARCH), OSF1) PLATFORM_SPECIFIC_EXTRA_LIBRARY = -lcxx @@ -68,18 +63,6 @@ PLATFORM_SPECIFIC_EXTRA_LIBRARY = endif # OSF1 -INCLUDES += $(SSLINCLUDE) -DEFS += $(SSL) - -CFLAGS += $(ARCH_CFLAGS) - -INCLUDES += -I$(SLAPDHDIR) -I$(LDAP_ADMINCDIR) -INCLUDES += -I$(ACLINC) -INCLUDES += -I ../../plugins/rever -LDFLAGS += $(EXLDFLAGS) $(SSLLIBFLAG) - -DEPLIBS= - EXTRA_LIBS_DEP = $(LDAPSDK_DEP) $(DB_LIB_DEP) $(LDAP_COMMON_LIBS_DEP) EXTRA_LIBS += $(LDAPLINK) $(DB_LIB) \ @@ -91,9 +74,6 @@ EXTRA_LIBS += -lcrypt endif -KEYUPG_LIBS_DEP= -KEYUPG_LIBS=$(LDAP_LIBLITEKEY) - # It looks like all of the latest versions of Unix that we ship on # have a good enough heap implementations that they don't need # SmartHeap. We still need it on NT. Index: addthread.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/addthread.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- addthread.c 6 Jan 2006 00:53:24 -0000 1.1 +++ addthread.c 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: addthread.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/addthread.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- addthread.h 6 Jan 2006 00:53:24 -0000 1.1 +++ addthread.h 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: infadd.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/infadd.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- infadd.c 6 Jan 2006 00:53:24 -0000 1.1 +++ infadd.c 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: infadd.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/infadd.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- infadd.h 6 Jan 2006 00:53:24 -0000 1.1 +++ infadd.h 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: main.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/main.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- main.c 6 Jan 2006 00:53:24 -0000 1.1 +++ main.c 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: nametable.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/nametable.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- nametable.c 6 Jan 2006 00:53:24 -0000 1.1 +++ nametable.c 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: nametable.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/nametable.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- nametable.h 6 Jan 2006 00:53:24 -0000 1.1 +++ nametable.h 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: rsearch.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/rsearch.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- rsearch.c 6 Jan 2006 00:53:24 -0000 1.1 +++ rsearch.c 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: rsearch.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/rsearch.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- rsearch.h 6 Jan 2006 00:53:24 -0000 1.1 +++ rsearch.h 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: sdattable.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/sdattable.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sdattable.c 6 Jan 2006 00:53:24 -0000 1.1 +++ sdattable.c 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: sdattable.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/sdattable.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sdattable.h 6 Jan 2006 00:53:24 -0000 1.1 +++ sdattable.h 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: searchthread.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/searchthread.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- searchthread.c 6 Jan 2006 00:53:24 -0000 1.1 +++ searchthread.c 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ Index: searchthread.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/searchthread.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- searchthread.h 6 Jan 2006 00:53:24 -0000 1.1 +++ searchthread.h 11 Jan 2006 02:00:32 -0000 1.2 @@ -1,6 +1,38 @@ /** BEGIN COPYRIGHT BLOCK - * Copyright 2001 Sun Microsystems, Inc. - * Portions copyright 1999, 2001 Netscape Communications Corporation. + * 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; version 2 of the License. + * + * 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. + * + * In addition, as a special exception, Red Hat, Inc. gives You the additional + * right to link the code of this Program with code not covered under the GNU + * General Public License ("Non-GPL Code") and to distribute linked combinations + * including the two, subject to the limitations in this paragraph. Non-GPL Code + * permitted under this exception must only link to the code of this Program + * through those well defined interfaces identified in the file named EXCEPTION + * found in the source code files (the "Approved Interfaces"). The files of + * Non-GPL Code may instantiate templates or use macros or inline functions from + * the Approved Interfaces without causing the resulting work to be covered by + * the GNU General Public License. Only Red Hat, Inc. may make changes or + * additions to the list of Approved Interfaces. You must obey the GNU General + * Public License in all respects for all of the Program code and other code used + * in conjunction with the Program except the Non-GPL Code covered by this + * exception. If you modify this file, you may extend this exception to your + * version of the file, but you are not obligated to do so. If you do not wish to + * provide this exception without modification, you must delete this exception + * statement from your version and license this file solely under the GPL without + * exception. + * + * + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2006 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ From fedora-directory-commits at redhat.com Thu Jan 12 00:29:14 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 11 Jan 2006 19:29:14 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm archive.c, 1.7, 1.8 Message-ID: <200601120029.k0C0TEFo022561@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22527/back-ldbm Modified Files: archive.c Log Message: [174774] Backup does not clear the backup directory prior to performing backup; Restore tries to restore all the fles from the backupdir 1) if the specified backup directory exists, rename it to .bak 2) support relative dir for the backup/restore dir, e.g., "bak2db bak/mybak" Index: archive.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/archive.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- archive.c 25 Apr 2005 16:24:23 -0000 1.7 +++ archive.c 12 Jan 2006 00:29:04 -0000 1.8 @@ -42,8 +42,10 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb ) { struct ldbminfo *li; + char *instancedir = NULL; + char *orig_dir = NULL; char *directory = NULL; - char *backendname = NULL; + char *backendname = NULL; int return_value = -1; int task_flags = 0; int run_from_cmdline = 0; @@ -51,12 +53,20 @@ int is_old_to_new = 0; slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li ); - slapi_pblock_get( pb, SLAPI_SEQ_VAL, &directory ); - slapi_pblock_get( pb, SLAPI_BACKEND_INSTANCE_NAME, &backendname); + slapi_pblock_get( pb, SLAPI_SEQ_VAL, &orig_dir ); + slapi_pblock_get( pb, SLAPI_BACKEND_INSTANCE_NAME, &backendname); slapi_pblock_get( pb, SLAPI_BACKEND_TASK, &task ); slapi_pblock_get( pb, SLAPI_TASK_FLAGS, &task_flags ); li->li_flags = run_from_cmdline = (task_flags & TASK_RUNNING_FROM_COMMANDLINE); + if ( !orig_dir || !*orig_dir ) { + LDAPDebug( LDAP_DEBUG_ANY, "archive2db: no archive name\n", + 0, 0, 0 ); + return( -1 ); + } + instancedir = config_get_instancedir(); + directory = rel2abspath_ext(orig_dir, instancedir); + /* check the current idl format vs backup DB version */ if (idl_get_idl_new()) { @@ -99,7 +109,7 @@ "to restore old formated backup onto the new server, " "please use command line utility \"bak2db\" .\n"); } - return -1; + goto out; } /* server is up -- mark all backends busy */ for (inst_obj = objset_first_obj(li->li_instance_set); inst_obj; @@ -131,7 +141,7 @@ } object_release(inst_obj2); object_release(inst_obj); - return -1; + goto out; } } @@ -237,26 +247,97 @@ } } } - +out: + slapi_ch_free_string(&directory); return return_value; } int ldbm_back_ldbm2archive( Slapi_PBlock *pb ) { struct ldbminfo *li; + char *orig_dir = NULL; char *directory = NULL; + char *dir_bak = NULL; + char *instancedir = NULL; int return_value = -1; int task_flags = 0; int run_from_cmdline = 0; Slapi_Task *task; + struct stat sbuf; slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li ); - slapi_pblock_get( pb, SLAPI_SEQ_VAL, &directory ); + slapi_pblock_get( pb, SLAPI_SEQ_VAL, &orig_dir ); slapi_pblock_get( pb, SLAPI_TASK_FLAGS, &task_flags ); li->li_flags = run_from_cmdline = (task_flags & TASK_RUNNING_FROM_COMMANDLINE); slapi_pblock_get( pb, SLAPI_BACKEND_TASK, &task ); + if ( !orig_dir || !*orig_dir ) { + LDAPDebug( LDAP_DEBUG_ANY, "db2archive: no archive name\n", + 0, 0, 0 ); + return( -1 ); + } + instancedir = config_get_instancedir(); + directory = rel2abspath_ext(orig_dir, instancedir); + if (stat(directory, &sbuf) == 0) { + int baklen = strlen(directory) + 5; /* ".bak\0" */ + dir_bak = slapi_ch_malloc(baklen); + PR_snprintf(dir_bak, baklen, "%s.bak", directory); + LDAPDebug(LDAP_DEBUG_ANY, "db2archive: %s exists. Renaming to %s\n", + directory, dir_bak, 0); + if (task) { + slapi_task_log_notice(task, "%s exists. Renaming to %s\n", + directory, dir_bak); + } + if (stat(dir_bak, &sbuf) == 0) { + return_value = ldbm_delete_dirs(dir_bak); + if (0 != return_value) { + LDAPDebug(LDAP_DEBUG_ANY, + "db2archive: %s exists and failed to delete it.\n", + dir_bak, 0, 0); + if (task) { + slapi_task_log_notice(task, + "%s exists and failed to delete it.\n", dir_bak); + } + return_value = -1; + goto out; + } + } + return_value = PR_Rename(directory, dir_bak); + if (return_value != PR_SUCCESS) { + PRErrorCode prerr = PR_GetError(); + LDAPDebug(LDAP_DEBUG_ANY, + "db2archive: Failed to rename \"%s\" to \"%s\".", + directory, dir_bak, 0); + LDAPDebug(LDAP_DEBUG_ANY, + SLAPI_COMPONENT_NAME_NSPR " error %d (%s)", + prerr, slapd_pr_strerror(prerr), 0); + if (task) { + slapi_task_log_notice(task, + "Failed to rename \"%s\" to \"%s\".", + directory, dir_bak, 0); + slapi_task_log_notice(task, + SLAPI_COMPONENT_NAME_NSPR " error %d (%s)", + prerr, slapd_pr_strerror(prerr), 0); + } + return_value = -1; + goto out; + } + } + if (0 != MKDIR(directory,SLAPD_DEFAULT_DIR_MODE) && EEXIST != errno) { + char *msg = dblayer_strerror(errno); + + LDAPDebug(LDAP_DEBUG_ANY, + "db2archive: mkdir(%s) failed; errno %i (%s)\n", + directory, errno, msg ? msg : "unknown"); + if (task) { + slapi_task_log_notice(task, + "mkdir(%s) failed; errno %i (%s)", + directory, errno, msg ? msg : "unknown"); + } + goto err; + } + /* No ldbm be's exist until we process the config information. */ if (run_from_cmdline) { mapping_tree_init(); @@ -297,43 +378,36 @@ } object_release(inst_obj2); object_release(inst_obj); - return -1; + goto err; } } } - if ( !directory || !*directory ) { - LDAPDebug( LDAP_DEBUG_ANY, "db2archive: no archive name\n", - 0, 0, 0 ); - return( -1 ); - } - if (0 != MKDIR(directory,SLAPD_DEFAULT_DIR_MODE) && EEXIST != errno) { - char *msg = dblayer_strerror(errno); - - LDAPDebug(LDAP_DEBUG_ANY, - "db2archive: mkdir(%s) failed; errno %i (%s)\n", - directory, errno, msg ? msg : "unknown"); - if (task) { - slapi_task_log_notice(task, - "mkdir(%s) failed; errno %i (%s)", - directory, errno, msg ? msg : "unknown"); - } - } - /* start the database code up, do not attempt to perform recovery */ if (run_from_cmdline && - 0 != dblayer_start(li,DBLAYER_ARCHIVE_MODE|DBLAYER_NO_DBTHREADS_MODE)) { + 0 != (return_value = dblayer_start(li,DBLAYER_ARCHIVE_MODE|DBLAYER_NO_DBTHREADS_MODE))) { LDAPDebug(LDAP_DEBUG_ANY, "db2archive: Failed to init database\n", 0, 0, 0); if (task) { slapi_task_log_notice(task, "Failed to init database"); } - return( -1 ); + goto rel_err; + } + + if (slapd_comp_path(directory, li->li_directory) == 0) { + LDAPDebug(LDAP_DEBUG_ANY, + "db2archive: Cannot archive to the db directory.\n", 0, 0, 0); + if (task) { + slapi_task_log_notice(task, "Cannot archive to the db directory.\n"); + } + return_value = -1; + goto rel_err; } /* tell it to archive */ return_value = dblayer_backup(li, directory, task); +rel_err: /* close the database down again */ if (run_from_cmdline && 0 != dblayer_close(li,DBLAYER_ARCHIVE_MODE|DBLAYER_NO_DBTHREADS_MODE)) { @@ -359,6 +433,19 @@ instance_set_not_busy(inst); } } - +err: + if (return_value != 0) { + LDAPDebug(LDAP_DEBUG_ANY, "db2archive: Rename %s back to %s\n", + dir_bak, directory, 0); + if (task) { + slapi_task_log_notice(task, "Rename %s back to %s\n", + dir_bak, directory); + } + ldbm_delete_dirs(directory); + PR_Rename(dir_bak, directory); + } +out: + slapi_ch_free_string(&dir_bak); + slapi_ch_free_string(&directory); return return_value; } From fedora-directory-commits at redhat.com Thu Jan 12 00:29:06 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 11 Jan 2006 19:29:06 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd proto-slap.h, 1.14, 1.15 util.c, 1.8, 1.9 Message-ID: <200601120029.k0C0TckQ022565@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22527 Modified Files: proto-slap.h util.c Log Message: [174774] Backup does not clear the backup directory prior to performing backup; Restore tries to restore all the fles from the backupdir 1) if the specified backup directory exists, rename it to .bak 2) support relative dir for the backup/restore dir, e.g., "bak2db bak/mybak" Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- proto-slap.h 10 Jan 2006 23:53:02 -0000 1.14 +++ proto-slap.h 12 Jan 2006 00:28:57 -0000 1.15 @@ -390,6 +390,7 @@ int config_get_csnlogging(); int is_abspath(const char *); char* rel2abspath( char * ); +char* rel2abspath_ext( char *, char * ); /* * configdse.c Index: util.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/util.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- util.c 10 Jan 2006 23:53:02 -0000 1.8 +++ util.c 12 Jan 2006 00:28:57 -0000 1.9 @@ -455,6 +455,12 @@ char * rel2abspath( char *relpath ) { + return rel2abspath_ext( relpath, NULL ); +} + +char * +rel2abspath_ext( char *relpath, char *cwd ) +{ char abspath[ MAXPATHLEN + 1 ]; #if defined( _WIN32 ) @@ -480,11 +486,15 @@ if ( relpath[ 0 ] == _CSEP ) { /* absolute path */ PR_snprintf(abspath, sizeof(abspath), "%s", relpath); } else { /* relative path */ - if ( getcwd( abspath, MAXPATHLEN ) == NULL ) { - perror( "getcwd" ); - LDAPDebug( LDAP_DEBUG_ANY, "Cannot determine current directory\n", - 0, 0, 0 ); - exit( 1 ); + if ( NULL == cwd ) { + if ( getcwd( abspath, MAXPATHLEN ) == NULL ) { + perror( "getcwd" ); + LDAPDebug( LDAP_DEBUG_ANY, "Cannot determine current directory\n", + 0, 0, 0 ); + exit( 1 ); + } + } else { + PR_snprintf(abspath, sizeof(abspath), "%s", cwd); } if ( strlen( relpath ) + strlen( abspath ) + 1 > MAXPATHLEN ) { From fedora-directory-commits at redhat.com Thu Jan 12 17:26:54 2006 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 12 Jan 2006 12:26:54 -0500 Subject: [Fedora-directory-commits] setuputil/installer/unix product.cc, 1.2, 1.3 Message-ID: <200601121726.k0CHQsrv025578@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/setuputil/installer/unix In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25561 Modified Files: product.cc Log Message: 174749 - Uninstall should not follow symlinks Index: product.cc =================================================================== RCS file: /cvs/dirsec/setuputil/installer/unix/product.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- product.cc 13 Dec 2005 20:58:22 -0000 1.2 +++ product.cc 12 Jan 2006 17:26:46 -0000 1.3 @@ -27,6 +27,9 @@ ** ** HISTORY: ** $Log$ +** Revision 1.3 2006/01/12 17:26:46 nkinder +** 174749 - Uninstall should not follow symlinks +** ** Revision 1.2 2005/12/13 20:58:22 nhosoi ** [175418] Admin Server ns-update crashes if necessary attribute-value is not given ** 1) Although Admin Server's PostInstall program ns-update expects it, PostInstall @@ -369,6 +372,11 @@ DIR *dirp; struct dirent *dir; int ret = 0; + struct stat fi; + + // Just return if directory is a symlink + if (lstat(input, &fi) == 0 && S_ISLNK(fi.st_mode)) + return ret; //Open the directory to read its contents dirp = opendir(input); From fedora-directory-commits at redhat.com Fri Jan 13 19:31:20 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 13 Jan 2006 14:31:20 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm dblayer.c, 1.9, 1.10 Message-ID: <200601131931.k0DJVKSd012990@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12951 Modified Files: dblayer.c Log Message: Previous checkin cleaned up too much; restoring commit_good_database. Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- dblayer.c 10 Jan 2006 23:53:08 -0000 1.9 +++ dblayer.c 13 Jan 2006 19:31:11 -0000 1.10 @@ -2411,6 +2411,7 @@ } } #endif + commit_good_database(priv); return return_value; } From fedora-directory-commits at redhat.com Fri Jan 13 22:53:27 2006 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 13 Jan 2006 17:53:27 -0500 Subject: [Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/propedit ChooseObjectClassDialog.java, 1.1.1.1, 1.2 Message-ID: <200601132253.k0DMrRu8019155@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/propedit In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19117/src/com/netscape/admin/dirserv/propedit Modified Files: ChooseObjectClassDialog.java Log Message: 177696 - Changed usage of enum keyword as a variable name for Java 1.5 compatibility Index: ChooseObjectClassDialog.java =================================================================== RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/propedit/ChooseObjectClassDialog.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ChooseObjectClassDialog.java 18 Jul 2005 00:56:13 -0000 1.1.1.1 +++ ChooseObjectClassDialog.java 13 Jan 2006 22:53:19 -0000 1.2 @@ -45,9 +45,9 @@ // Extract the list of classes from the schema Vector v = new Vector(); - Enumeration enum = schema.getObjectClassNames(); - while (enum.hasMoreElements()) { - String objectclass = (String)enum.nextElement(); + Enumeration enumObjclasses = schema.getObjectClassNames(); + while (enumObjclasses.hasMoreElements()) { + String objectclass = (String)enumObjclasses.nextElement(); /* Check that the objectclass is not a forbidden objectclass */ boolean isForbidden = false; for (int i=0; i Author: nkinder Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19117/src/com/netscape/admin/dirserv/panel Modified Files: DefaultIndexManagementPanel.java IndexManagementPanel.java ObjectClassDialog.java PluginPanel.java SchemaObjectClassesPanel.java Log Message: 177696 - Changed usage of enum keyword as a variable name for Java 1.5 compatibility Index: DefaultIndexManagementPanel.java =================================================================== RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/DefaultIndexManagementPanel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- DefaultIndexManagementPanel.java 18 Jul 2005 00:55:57 -0000 1.1.1.1 +++ DefaultIndexManagementPanel.java 13 Jan 2006 22:53:13 -0000 1.2 @@ -902,9 +902,9 @@ LDAPAttribute findAttr = res.getAttribute( "objectclass"); if( (findAttr != null ) && (findAttr.size() > 0) ) { - Enumeration enum = findAttr.getStringValues(); - while (!mybool && (enum.hasMoreElements())) { - String v = (String) enum.nextElement(); + Enumeration enumVals = findAttr.getStringValues(); + while (!mybool && (enumVals.hasMoreElements())) { + String v = (String) enumVals.nextElement(); Debug.println( "****** IndexManagementPanel.isPluginEntry() value :" + v); mybool = ((v != null) && (v.compareToIgnoreCase("nsSlapdPlugin") == 0 )) ; } Index: IndexManagementPanel.java =================================================================== RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/IndexManagementPanel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- IndexManagementPanel.java 18 Jul 2005 00:55:58 -0000 1.1.1.1 +++ IndexManagementPanel.java 13 Jan 2006 22:53:13 -0000 1.2 @@ -1074,9 +1074,9 @@ LDAPAttribute findAttr = res.getAttribute( "objectclass"); if( (findAttr != null ) && (findAttr.size() > 0) ) { - Enumeration enum = findAttr.getStringValues(); - while (!mybool && (enum.hasMoreElements())) { - String v = (String) enum.nextElement(); + Enumeration enumVals = findAttr.getStringValues(); + while (!mybool && (enumVals.hasMoreElements())) { + String v = (String) enumVals.nextElement(); Debug.println( "****** IndexManagementPanel.isPluginEntry() value :" + v); mybool = ((v != null) && (v.compareToIgnoreCase("nsSlapdPlugin") == 0 )) ; } Index: ObjectClassDialog.java =================================================================== RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/ObjectClassDialog.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ObjectClassDialog.java 18 Jul 2005 00:56:02 -0000 1.1.1.1 +++ ObjectClassDialog.java 13 Jan 2006 22:53:13 -0000 1.2 @@ -128,9 +128,9 @@ private void updateAvailAttrList() { if (_availModel.size() != 0) _availModel.removeAllElements(); - Enumeration enum = _schema.getAttributeNames(); - while (enum.hasMoreElements()) { - String attr = (String)enum.nextElement(); + Enumeration enumAttrs = _schema.getAttributeNames(); + while (enumAttrs.hasMoreElements()) { + String attr = (String)enumAttrs.nextElement(); if (!attr.equals("dncomp") && !attr.equals("entrydn")&& !attr.equals("entryid") && !attr.equals("parentid")) { SchemaUtility.InsertElement(_availModel, attr); Index: PluginPanel.java =================================================================== RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/PluginPanel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- PluginPanel.java 18 Jul 2005 00:56:03 -0000 1.1.1.1 +++ PluginPanel.java 13 Jan 2006 22:53:13 -0000 1.2 @@ -1072,10 +1072,10 @@ } } - Enumeration enum = _dsEntryFields.keys(); + Enumeration enumAttrs = _dsEntryFields.keys(); - while (enum.hasMoreElements()) { - String attributeName = (String)enum.nextElement(); + while (enumAttrs.hasMoreElements()) { + String attributeName = (String)enumAttrs.nextElement(); ((DSEntryTextStrict)_dsEntryFields.get(attributeName)).show(); } } @@ -1116,10 +1116,10 @@ if (_dsEnableState.isModified()) return true; - Enumeration enum = _dsEntryFields.keys(); + Enumeration enumAttrs = _dsEntryFields.keys(); - while (enum.hasMoreElements()) { - String attributeName = (String)enum.nextElement(); + while (enumAttrs.hasMoreElements()) { + String attributeName = (String)enumAttrs.nextElement(); if (((DSEntryTextStrict)_dsEntryFields.get(attributeName)).isModified()) return true; } Index: SchemaObjectClassesPanel.java =================================================================== RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/SchemaObjectClassesPanel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- SchemaObjectClassesPanel.java 18 Jul 2005 00:56:04 -0000 1.1.1.1 +++ SchemaObjectClassesPanel.java 13 Jan 2006 22:53:13 -0000 1.2 @@ -202,9 +202,9 @@ return; } _ocModel.removeAllElements(); - Enumeration enum = schema.getObjectClassNames(); - while (enum.hasMoreElements()) { - SchemaUtility.InsertElement(_ocModel, enum.nextElement()); + Enumeration enumObjclasses = schema.getObjectClassNames(); + while (enumObjclasses.hasMoreElements()) { + SchemaUtility.InsertElement(_ocModel, enumObjclasses.nextElement()); } } From fedora-directory-commits at redhat.com Mon Jan 16 19:06:31 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 16 Jan 2006 14:06:31 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication replutil.c, 1.6, 1.7 Message-ID: <200601161906.k0GJ6VLM005851@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5781 Modified Files: replutil.c Log Message: [176293] repl_chain_on_update() logs a message for every modify operation Checking in Ulf's proposal; should not get connid from pid if the op is internal. (plus the value is just for debug print which is disabled now) Index: replutil.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/replutil.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- replutil.c 19 Apr 2005 22:07:33 -0000 1.6 +++ replutil.c 16 Jan 2006 19:06:03 -0000 1.7 @@ -827,9 +827,19 @@ PRBool local_online = PR_FALSE; /* true if the local db is online */ PRBool chain_online = PR_FALSE; /* true if the chain db is online */ int ii; - int opid, connid; + int opid; +#ifdef DEBUG_CHAIN_ON_UPDATE + int connid; +#endif + slapi_pblock_get(pb, SLAPI_OPERATION, &op); +#ifdef DEBUG_CHAIN_ON_UPDATE + if (operation_is_flag_set(op, OP_FLAG_INTERNAL)) { + connid=-1; /* -1: internal op in a log msg */ + } else { + slapi_pblock_get(pb, SLAPI_CONN_ID, &connid); + } +#endif - slapi_pblock_get(pb, SLAPI_CONN_ID, &connid); slapi_pblock_get(pb, SLAPI_OPERATION_ID, &opid); /* first, we have to decide which backend is the local backend * and which is the chaining one @@ -854,13 +864,13 @@ local_online = PR_TRUE; } } -/* +#ifdef DEBUG_CHAIN_ON_UPDATE slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d be " - "%s is the %s backend and is %s\n", - connid, opid, - mtn_be_names[ii], (chaining_backend == ii) ? "chaining" : "local", - (mtn_be_states[ii] == SLAPI_BE_STATE_ON) ? "online" : "offline"); -*/ + "%s is the %s backend and is %s\n", + connid, opid, + mtn_be_names[ii], (chaining_backend == ii) ? "chaining" : "local", + (mtn_be_states[ii] == SLAPI_BE_STATE_ON) ? "online" : "offline"); +#endif } /* if no chaining backends are defined, just use the local one */ @@ -868,8 +878,6 @@ return local_backend; } - slapi_pblock_get(pb, SLAPI_OPERATION, &op); - /* All internal operations go to the local backend */ if (operation_is_flag_set(op, OP_FLAG_INTERNAL)) { return local_backend; @@ -884,11 +892,11 @@ (op_type == SLAPI_OPERATION_BIND) || (op_type == SLAPI_OPERATION_UNBIND) || (op_type == SLAPI_OPERATION_COMPARE))) { -/* +#ifdef DEBUG_CHAIN_ON_UPDATE slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d op is " "%d: using local backend\n", connid, opid, op_type); -*/ +#endif return local_backend; } @@ -903,10 +911,10 @@ */ slapi_pblock_get(pb, SLAPI_REQUESTOR_DN, &requestor_dn); if (slapi_dn_isroot(requestor_dn)) { -/* +#ifdef DEBUG_CHAIN_ON_UPDATE slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d requestor " "is root: using local backend\n", connid, opid); -*/ +#endif return local_backend; } @@ -915,10 +923,10 @@ */ slapi_pblock_get(pb, SLAPI_IS_REPLICATED_OPERATION, &repl_op); if (repl_op) { -/* +#ifdef DEBUG_CHAIN_ON_UPDATE slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d op is " "replicated: using local backend\n", connid, opid); -*/ +#endif return local_backend; } @@ -926,10 +934,10 @@ * or any normal non replicated client operation while local is disabled (import) : * use the chaining backend */ -/* +#ifdef DEBUG_CHAIN_ON_UPDATE slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d using " "chaining backend\n", connid, opid); -*/ +#endif return chaining_backend; } From fedora-directory-commits at redhat.com Tue Jan 17 01:01:12 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 16 Jan 2006 20:01:12 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm start.c, 1.4, 1.5 Message-ID: <200601170101.k0H11C6e020756@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19083 Modified Files: start.c Log Message: [173871] added more precise error message for the dbcache allocation failure. Index: start.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/start.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- start.c 19 Apr 2005 22:07:38 -0000 1.4 +++ start.c 17 Jan 2006 01:01:02 -0000 1.5 @@ -103,7 +103,7 @@ Object *inst_obj; ldbm_instance *inst; /* autosizing dbCache and entryCache */ - if (li->li_cache_autosize) { + if (li->li_cache_autosize > 0) { zone_pages = (li->li_cache_autosize * pages) / 100; /* now split it according to user prefs */ db_pages = (li->li_cache_autosize_split * zone_pages) / 100; @@ -135,7 +135,7 @@ } } /* autosizing importCache */ - if (li->li_import_cache_autosize) { + if (li->li_import_cache_autosize > 0) { /* For some reason, -1 means 50 ... */ if (li->li_import_cache_autosize == -1) { li->li_import_cache_autosize = 50; @@ -181,7 +181,18 @@ LDAPDebug( LDAP_DEBUG_ANY, "start: Failed to start databases, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); if (LDBM_OS_ERR_IS_DISKFULL(retval)) return return_on_disk_full(li); - else return SLAPI_FAIL_GENERAL; + else { + if ((li->li_cache_autosize > 0) && (li->li_cache_autosize <= 100)) { + LDAPDebug( LDAP_DEBUG_ANY, "Failed to allocate %d byte dbcache. " + "Please reduce the value of %s and restart the server.\n", + li->li_dbcachesize, CONFIG_CACHE_AUTOSIZE, 0); + } else { + LDAPDebug( LDAP_DEBUG_ANY, "Failed to allocate %d byte dbcache. " + "Please reduce %s and Restart the server.\n", + li->li_dbcachesize, CONFIG_CACHE_AUTOSIZE, 0); + } + return SLAPI_FAIL_GENERAL; + } } /* write DBVERSION file if one does not exist */ From fedora-directory-commits at redhat.com Wed Jan 18 02:26:34 2006 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 17 Jan 2006 21:26:34 -0500 Subject: [Fedora-directory-commits] mod_admserv mod_admserv.c,1.18,1.19 Message-ID: <200601180226.k0I2QYhu013205@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/mod_admserv In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13185 Modified Files: mod_admserv.c Log Message: Bug(s) fixed: 175170 Bug Description: Directory Server Admin Server Dies after Secure Bind to Directory Server Reviewed by: Rob C. (Thanks!) Files: mod_admserv.c Branch: HEAD Fix Description: This fix makes the assumption that mod_nss will always be used. It is possible to use mod_admserv without mod_nss - this would mean that the admin server accepts http, but uses ldaps to communicate with the DS. However, I don't forsee that happening, so in order to simplify things, this fix makes mod_nss resposible for initializing NSS and shutting it down properly. Another problem was the memory and resource leaks. pset's have to be disposed of after use. This appears to have been a problem in the old NES libAdmservPlugin as well since most of the code was just copied/pasted. There were also a couple of other memory leaks. NOTE: This is only part of the total fix, which will involve changes to mod_nss, ldap sdk, and admin server components. Platforms tested: FC4 Flag Day: no Doc impact: no Index: mod_admserv.c =================================================================== RCS file: /cvs/dirsec/mod_admserv/mod_admserv.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- mod_admserv.c 18 Nov 2005 21:18:42 -0000 1.18 +++ mod_admserv.c 18 Jan 2006 02:26:25 -0000 1.19 @@ -16,7 +16,11 @@ /* * mod_admserv.c: Provides communication link between Console and Directory. * + * Authors (in alphabetical order) * Rob Crittenden + * Miodrag Kekic + * Rich Megginson + * Adam Prishtina * */ @@ -736,76 +740,19 @@ return TRUE; } -static int onlyOnceSwitch = 0; - -#if defined(WINNT) -static char const prefixMask[] = "\\alias\\%s-"; -static char const secmodName[] = "\\alias\\secmod.db"; -#else -static char const prefixMask[] = "/alias/%s-"; -static char const secmodName[] = "/alias/secmod.db"; -#endif - static int -sslinit(AdmldapInfo info, char const * svrroot, int forceInit) +sslinit() { - int rc = PR_FALSE; - - if (onlyOnceSwitch) { - rc = PR_TRUE; + if (!NSS_IsInitialized()) { + ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, NULL, + "sslinit: mod_nss has not been started and initialized: cannot start server"); + exit(1); } else { - char * x; - /* - * Usually one would find that the path to the cert and key db - * is alias/admin-serv-hostname- but one can not assume that - * to be the case. Thus we must disassemble the SIEDN to find - * the instance's actual name. - */ - x = admldapGetSIEDN(info); - if (x) { - if (x[0]) { - int i; - for (i=1; x[i] && !(x[i] == '=' && x[i-1] != '\\'); ++i); /* scan past attr name */ - if (x[i] == '=') { - char * sie; - for (++i; x[i] && x[i] == ' '; ++i); /* drop value's leading spaces */ - sie = &x[i]; - for ( ; x[i] && !(x[i] == ',' && x[i-1] != '\\'); ++i); /* till end of value */ - if (x[i] == ',') { - char * scratch; - for (x[i--] = 0; x[i] == ' '; --i) x[i] = 0; /* drop value's trailing spaces */ - scratch = (char *) malloc(sizeof(prefixMask) + strlen(sie)); - if (scratch) { - sprintf(scratch, prefixMask, sie); - if (SECSuccess == NSS_Initialize(serverroot, scratch, scratch, secmodName, 0)) { - if (SSL_OptionSetDefault(SSL_ENABLE_SSL2, PR_FALSE) - || SSL_OptionSetDefault(SSL_ENABLE_SSL3, PR_TRUE)) { - ap_log_error(APLOG_MARK, APLOG_ERR, 0 /* status */, NULL, - "Failed to enable SSL3 and disable SSL2"); - } else { - if (SSLPLCY_Install() == PR_SUCCESS) { - onlyOnceSwitch = 1; - rc = PR_TRUE; - } else { - ap_log_error(APLOG_MARK, APLOG_ERR, 0 /* status */, NULL, - "SSLPLCY_Install() failed."); - } - } - } else { - ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, NULL, - "Failed to do NSS_Initialize using path %s and prefix %s", - serverroot, scratch); - } - free((void *) scratch); - } - } - } - } - free((void *) x); - } + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, + "sslinit: mod_nss has been started and initialized"); } - return rc; + return 1; } static int @@ -838,7 +785,7 @@ } if (admldapGetSecurity(info)) { - sslinit(info, serverroot, PR_FALSE); + sslinit(); if (admldapBuildInfoSSL(info, &error)) { } else { char *host = admldapGetHost(info); @@ -1109,6 +1056,9 @@ int errorcode; char* serverid = psetGetAttrSingleValue(tmp, SERVER_ID_ATTRIBUTE, &errorcode); + psetDelete(tmp); + tmp = NULL; + if (!serverid) { ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "sync_task_sie_data: Unable to find serverid for dn=\"%s\" (error code = %d)", @@ -1117,6 +1067,7 @@ } task_register_server(serverid, serverlist[i]); + PL_strfree(serverid); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "sync_task_sie_data: registered server [%s] dn [%s]", serverid, serverlist[i]); @@ -1127,6 +1078,7 @@ serverlist[i], errorCode); } } + deleteAttrNameList(serverlist); } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "sync_task_sie_data: no servers found"); @@ -1146,6 +1098,7 @@ productID, productDN); ii++; } + deleteAttributeList(installlist); } destroyAdmldap(ldapInfo); @@ -1342,9 +1295,11 @@ } if (admldapGetSecurity(ldapInfo)) { - sslinit(ldapInfo, serverroot, PR_FALSE); + sslinit(); } + destroyAdmldap(ldapInfo); + binddn = apr_table_get(r->notes, RQ_NOTES_USERDN); bindpw = apr_table_get(r->notes, RQ_NOTES_USERPW); @@ -1363,15 +1318,15 @@ } errorCode = psetSetSingleValueAttr(pset, (char*)"userpassword", pwd); + psetDelete(pset); + pset = NULL; if (errorCode) { - psetDelete(pset); ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, "PSET Set Failed for attribute userpassword, err=%d", errorCode); return 0; } - psetDelete(pset); return 1; } @@ -1977,16 +1932,18 @@ } if (admldapGetSecurity(info)) { - sslinit(info, serverroot, PR_FALSE); + sslinit(); if (admldapBuildInfoSSL(info, &error)) { } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, "host_ip_init(): unable to create secure AdmldapInfo (error code = %d)", error); + destroyAdmldap(info); return DONE; } } + destroyAdmldap(info); #ifdef CHANGE_EUID /* make sure pset creates the cache file owned by the server uid, not root */ if (geteuid() == 0) { @@ -2021,12 +1978,15 @@ ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, "host_ip_init(): PSET failure: Could not retrieve access hosts attribute (pset error = %s)", psetErrorString(error, NULL)); + psetDelete(pset); return DONE; } accessHosts = apr_pstrdup(module_pool, val); val = psetGetAttrSingleValue(pset, NS_ADMIN_ACCESS_ADDRESSES, &error); + psetDelete(pset); + pset = NULL; if(val) { } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, @@ -2121,6 +2081,17 @@ } /* + * NSS caches SSL client session information - this cache must be cleared, otherwise + * NSS_Shutdown will give an error. mod_nss also does this (along with the NSS_Shutdown) + * It is ok to call SSL_ClearSessionCache multiple times. + */ +static +apr_status_t mod_admserv_unload(void *data) +{ + SSL_ClearSessionCache(); +} + +/* * This is where we do the rest of our initialization, that depends * on configuration settings */ @@ -2141,6 +2112,12 @@ auth_users = HashTableCreate(); auth_tasks = HashTableCreate(); + /* + * Let us cleanup on restarts and exists + */ + apr_pool_cleanup_register(p, base_server, + mod_admserv_unload, + apr_pool_cleanup_null); /* if nsroot was not set in the config, get from the environment */ srv_cfg = our_sconfig(base_server); @@ -2482,17 +2459,6 @@ apr_table_set(r->notes, RQ_NOTES_USERDN, userdn); apr_table_set(r->notes, AUTHENTICATION_LDAP_URL, ldapURL = formLdapURL(data, r->pool)); apr_table_set(r->notes, RQ_NOTES_USERPW, pw); -#if 0 - pblock_nvinsert("userdn", userdn, rq->vars); - pblock_nvinsert("auth-type", "basic", rq->vars); - pblock_nvinsert("auth-password", pw, rq->vars); - if (uid) pblock_nvinsert("auth-user", uid, rq->vars); - pblock_nvinsert(AUTHENTICATION_LDAP_URL, ldapURL = formLdapURL(data, r->p), rq->vars); - if (pw_expiring >= 0) { - sprintf(pw_expiring_str, "%d", pw_expiring); - pblock_nvinsert("auth-password-expire", pw_expiring_str, rq->vars); - } -#endif create_auth_users_cache_entry(user, userdn, pw, ldapURL); @@ -2562,15 +2528,7 @@ /* That failed too. The last resort is to fall back to the standard * Apache basic-auth using admpw. - */ - -#if 0 - ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r, - "dn is %s", dn); - apr_table_set(r->notes, RQ_NOTES_USERDN, dn); - apr_table_set(r->notes, RQ_NOTES_USERPW, sent_pw); -#endif - + */ return DECLINED; } @@ -2644,7 +2602,7 @@ * be set in admserv.conf (or httpd.conf) */ if (!string) { -#define ADMSERV_VERSION_STRING "Fedora-Administrator/7.0" +#define ADMSERV_VERSION_STRING "Fedora-Administrator/1.0" string = ADMSERV_VERSION_STRING; } apr_table_setn(r->headers_out, "Admin-Server", string); @@ -2700,13 +2658,15 @@ { /* Do basic auth after our own auth */ static const char * const aszPost[] = { "mod_auth.c", NULL }; + /* Make sure mod_nss has been configured before us */ + static const char * const aszPre[] = { "mod_nss.c", NULL }; /* handler for /admin-serv/authenticate requests */ ap_hook_handler(userauth, NULL, NULL, APR_HOOK_MIDDLE); /* handler for /admin-serv/commands */ ap_hook_handler(admserv_command_handler, NULL, NULL, APR_HOOK_MIDDLE); - ap_hook_pre_config(mod_admserv_pre_config, NULL, NULL, APR_HOOK_MIDDLE); - ap_hook_post_config(mod_admserv_post_config, NULL, NULL, APR_HOOK_MIDDLE); + ap_hook_pre_config(mod_admserv_pre_config, aszPre, NULL, APR_HOOK_MIDDLE); + ap_hook_post_config(mod_admserv_post_config, aszPre, NULL, APR_HOOK_MIDDLE); /* called at read_request phase to block clients from disallowed hosts */ ap_hook_post_read_request(admserv_host_ip_check, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_check_user_id(admserv_check_user_id, NULL, aszPost, APR_HOOK_MIDDLE); From fedora-directory-commits at redhat.com Wed Jan 18 16:58:44 2006 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 18 Jan 2006 11:58:44 -0500 Subject: [Fedora-directory-commits] adminserver/admserv/cfgstuff httpd.conf, 1.7, 1.8 Message-ID: <200601181658.k0IGwiYB012856@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/cfgstuff In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12838 Modified Files: httpd.conf Log Message: bug 175170 mod_nss needs to be loaded before mod_admserv so it can complete NSS_Initialize before mod_admserv needs to use NSS and SSL. This also means mod_nss will be unloaded after mod_admserv, which means it can clear the caches and do the NSS_Shutdown after mod_admserv is unloaded. Index: httpd.conf =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/httpd.conf,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- httpd.conf 7 Dec 2005 20:46:06 -0000 1.7 +++ httpd.conf 18 Jan 2006 16:58:37 -0000 1.8 @@ -148,8 +148,8 @@ LoadModule mem_cache_module %%%module_dir%%%/modules/mod_mem_cache.so LoadModule cgi_module %%%module_dir%%%/modules/mod_cgi.so LoadModule restartd_module %%%sroot%%%/bin/admin/lib/libmodrestartd.so -LoadModule admserv_module %%%sroot%%%/bin/admin/lib/libmodadmserv.so LoadModule nss_module %%%sroot%%%/bin/admin/lib/libmodnss.so +LoadModule admserv_module %%%sroot%%%/bin/admin/lib/libmodadmserv.so ### Section 2: 'Main' server configuration # From fedora-directory-commits at redhat.com Wed Jan 18 18:24:33 2006 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 18 Jan 2006 13:24:33 -0500 Subject: [Fedora-directory-commits] adminserver/base Makefile,1.16,1.17 Message-ID: <200601181824.k0IIOXfL016945@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/base In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16896/adminserver/base Modified Files: Makefile Log Message: It's a little bit tricky. The base package is a dependency of both the main admin server package and the directory server package. However, it works if you just create a zero length .zip file for the base archive - you get a warning when running setup, but everything installs correctly. While it's not perfect (it will be addressed for the next major release) it will at least allow those developers who do not want to use java at all to build and install. You must use "make NOJAVA=1 ..." to build and package admin server without java. Index: Makefile =================================================================== RCS file: /cvs/dirsec/adminserver/base/Makefile,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Makefile 18 Nov 2005 21:16:39 -0000 1.16 +++ Makefile 18 Jan 2006 18:24:25 -0000 1.17 @@ -149,13 +149,14 @@ cd $(PKGTOP); $(TAR) cvfX $(RELTOP)/base.tar $(RELTOP)/base.ex base -rm $(RELTOP)/base.tar.gz $(RELTOP)/base.ex cd $(RELTOP); gzip -f base.tar -endif +endif pkguxClient: rm -rf $(CLIENT_DIR) rm -f $(BASEDIR)/ns$(BASE_CLIENT).zip +ifndef NOJAVA -$(MKDIR) $(CLIENT_DIR)/$(JAVA_DIR) -$(MKDIR) $(CONSOLE_HELP) -$(CHMOD) 0777 $(CLIENT_DIR)/$(JAVA_DIR) @@ -211,6 +212,11 @@ cd $(CLIENT_DIR) ; \ $(IZIP) $(BASEDIR)/ns$(BASE_CLIENT).zip * ; +else # NOJAVA + -$(MKDIR) $(BASEDIR) + touch $(BASEDIR)/ns$(BASE_CLIENT).zip +endif # NOJAVA + ifeq ($(ARCH), Linux) $(PERL) fixPI.pl SETUP_BASE ../include/version.h ../$(NSPLATFORM_DIR)/buildnum.dat $(BUILD_SECURITY) base.inf $(BASEDIR)/base.inf else From fedora-directory-commits at redhat.com Wed Jan 18 18:24:22 2006 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 18 Jan 2006 13:24:22 -0500 Subject: [Fedora-directory-commits] adminserver Makefile,1.16,1.17 Message-ID: <200601181824.k0IIOq9M016948@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16896/adminserver Modified Files: Makefile Log Message: It's a little bit tricky. The base package is a dependency of both the main admin server package and the directory server package. However, it works if you just create a zero length .zip file for the base archive - you get a warning when running setup, but everything installs correctly. While it's not perfect (it will be addressed for the next major release) it will at least allow those developers who do not want to use java at all to build and install. You must use "make NOJAVA=1 ..." to build and package admin server without java. Index: Makefile =================================================================== RCS file: /cvs/dirsec/adminserver/Makefile,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Makefile 3 Nov 2005 23:20:38 -0000 1.16 +++ Makefile 18 Jan 2006 18:24:14 -0000 1.17 @@ -30,6 +30,14 @@ include nsconfig.mk include components.mk +PACKAGEDEPS = start_time + +ifndef NOJAVA +PACKAGEDEPS += ldapjdk nmcjdk jsssdk jsslib +endif + +PACKAGEDEPS += pkgBase pkgAdmin pkgMcc end_time + all: buildAndPkgAdmin buildAndPkgAdmin: buildOxygen pkgOxygen @@ -38,16 +46,18 @@ @echo @echo The following are build targets that you can choose from: @echo - @echo " gmake buildAndPkgAdmin (the default if no targets are given)" - @echo " gmake buildAdmin" - @echo " gmake buildOxygen" - @echo " gmake buildConsole" - @echo " gmake pkgAdmin" - @echo " gmake pkgOxygen" - @echo " gmake pkgConsole" - @echo " gmake pkgL10NOxygen" - @echo " gmake docConsole" - @echo " gmake acceptAdmin" + @echo " $(MAKE) buildAndPkgAdmin (the default if no targets are given)" + @echo " $(MAKE) buildAdmin" + @echo " $(MAKE) buildOxygen" + @echo " $(MAKE) buildConsole" + @echo " $(MAKE) pkgAdmin" + @echo " $(MAKE) pkgOxygen" + @echo " $(MAKE) pkgConsole" + @echo " $(MAKE) pkgL10NOxygen" + @echo " $(MAKE) docConsole" + @echo " $(MAKE) acceptAdmin" + @echo "" + @echo Use $(MAKE) NOJAVA=1 to skip building/packaging any Java (console or command line) code pumpkin: $(PERL) pumpkin.pl $(PUMPKIN_AGE) pumpkin.dat @@ -211,7 +221,7 @@ @echo @echo ============== Finished ============================ -pkgOxygen:start_time ldapjdk nmcjdk jsssdk jsslib pkgBase pkgAdmin pkgMcc end_time +pkgOxygen: $(PACKAGEDEPS) @echo @echo @echo From fedora-directory-commits at redhat.com Wed Jan 18 18:24:27 2006 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 18 Jan 2006 13:24:27 -0500 Subject: [Fedora-directory-commits] adminserver/admserv Makefile, 1.6, 1.7 pkgadmin.mk, 1.34, 1.35 Message-ID: <200601181825.k0IIPKhT016954@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16896/adminserver/admserv Modified Files: Makefile pkgadmin.mk Log Message: It's a little bit tricky. The base package is a dependency of both the main admin server package and the directory server package. However, it works if you just create a zero length .zip file for the base archive - you get a warning when running setup, but everything installs correctly. While it's not perfect (it will be addressed for the next major release) it will at least allow those developers who do not want to use java at all to build and install. You must use "make NOJAVA=1 ..." to build and package admin server without java. Index: Makefile =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Makefile 29 Sep 2005 22:11:58 -0000 1.6 +++ Makefile 18 Jan 2006 18:24:20 -0000 1.7 @@ -33,12 +33,21 @@ MFLAGS := endif +ALLTARGETS = do-src do-cgi-src do-html +ifndef NOJAVA +ALLTARGETS += do-console +endif + +ALLTARGETS += do-cfg + ifeq ($(ARCH), WINNT) -all: do-src do-cgi-src do-html do-console do-cfg do-viewurl do-inst do-ldap-stuffs do-icons -else -all: do-src do-cgi-src do-html do-console do-cfg do-inst do-ldap-stuffs do-icons +ALLTARGETS += do-viewurl endif +ALLTARGETS += do-inst do-ldap-stuffs do-icons + +all: $(ALLTARGETS) + do-src: # cd src; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS) mkdir -p $(OBJDIR)/admin-lib Index: pkgadmin.mk =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/pkgadmin.mk,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- pkgadmin.mk 8 Dec 2005 02:37:25 -0000 1.34 +++ pkgadmin.mk 18 Jan 2006 18:24:20 -0000 1.35 @@ -139,6 +139,11 @@ endif endif +ifndef NOJAVA +ALLTARGETS = pkguxClient +endif +ALLTARGETS += pkguxAdmin pkgSetup pkgSBC + ifneq ($(strip $(ADM_VERSION)),) all: -if [ ! -d $(PKGTOP) ]; then \ @@ -150,7 +155,7 @@ cd $(PKGTOP); $(TAR) xf $(ADM_RELEASE)/admserv.tar else -all: pkguxClient pkguxAdmin pkgSetup pkgSBC +all: $(ALLTARGETS) endif @@ -185,8 +190,10 @@ # Note: need to do admin-nickname rather than admin-serv --MLM -$(MKDIR) $(ADMIN_DIR)/dist +ifndef NOJAVA -$(MKDIR) $(ADMIN_DIR)/java/jars -$(MKDIR) $(ADMIN_DIR)/java/html/en +endif # NOJAVA -$(MKDIR) $(ADMIN_DIR)/admin-serv -$(MKDIR) $(ADMIN_DIR)/admin-serv/config @@ -262,6 +269,7 @@ cp -p $(ADMINUTIL_LIBPATH)/adminutil-properties/* $(ADMIN_DIR)/bin/admin/lib/adminutil-properties ; \ fi +ifndef NOJAVA cd $(ADMSERV_OBJDIR)/cmdln; \ cp -p admconfig $(ADMIN_DIR)/bin/admin; @@ -269,6 +277,7 @@ find *.html *.gif *.jpg | $(CPIO) $(ADMIN_DIR)/java/html cd $(ADMIN_JARS)/.. ; \ find *.html | $(CPIO) $(ADMIN_DIR)/java/html/en +endif # NOJAVA cp $(BUILD_ROOT)/lib/ldaputil/certmap.conf $(ADMIN_DIR)/shared/config cp -p $(BUILD_ROOT)/admserv/cfgstuff/httpd.conf $(ADMIN_DIR)/shared/config/template/httpd.conf.tmpl From fedora-directory-commits at redhat.com Thu Jan 19 22:06:07 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 19 Jan 2006 17:06:07 -0500 Subject: [Fedora-directory-commits] adminutil nsarch, 1.3, 1.4 nsconfig.mk, 1.5, 1.6 Message-ID: <200601192206.k0JM67QB010631@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/adminutil In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10606 Modified Files: nsarch nsconfig.mk Log Message: [172166] Admin Util build (IPF) Supporting build on HP-UX IPF. Index: nsarch =================================================================== RCS file: /cvs/dirsec/adminutil/nsarch,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- nsarch 16 Dec 2005 18:15:59 -0000 1.3 +++ nsarch 19 Jan 2006 22:05:52 -0000 1.4 @@ -451,6 +451,14 @@ NS_RELEASE="${HPUX_REV}" ns_printf exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + GNU_NAME="${UNAME_MACHINE}-hp-hpux${HPUX_REV}" + NS_NAME="HPUX" + NS_PRETTY_NAME="HP-UX" + NS_RELEASE="${HPUX_REV}" + ns_printf + exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >dummy.c #include Index: nsconfig.mk =================================================================== RCS file: /cvs/dirsec/adminutil/nsconfig.mk,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- nsconfig.mk 15 Dec 2005 21:06:22 -0000 1.5 +++ nsconfig.mk 19 Jan 2006 22:05:52 -0000 1.6 @@ -175,15 +175,26 @@ ifeq ($(NSOS_RELEASE), B.11.11) MODERNHP=1 endif +ifeq ($(NSOS_RELEASE), B.11.23) + MODERNHP=1 +endif ifeq ($(MODERNHP), 1) CC=cc -Ae +ESlit CXX=/opt/aCC/bin/aCC -ifeq ($(USE_64), 1) -BIT_SWITCH=+DA2.0W +DS2.0 -else -BIT_SWITCH=+DAportable +DS1.1 -endif +ifeq ($(NSOS_RELEASE), B.11.23) + ifeq ($(USE_64), 1) + BIT_SWITCH=+DD64 + else + BIT_SWITCH=+DD32 + endif +else # 11.11 or earlier + ifeq ($(USE_64), 1) + BIT_SWITCH=+DA2.0W +DS2.0 + else + BIT_SWITCH=+DAportable +DS1.1 + endif +endif # B.11.23 ARCH_CFLAGS=$(BIT_SWITCH) -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D__STDC_EXT__ +z -DHPUX11 EXTRA_LIBS= -ldld -lm -lpthread else From fedora-directory-commits at redhat.com Thu Jan 19 23:10:21 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 19 Jan 2006 18:10:21 -0500 Subject: [Fedora-directory-commits] setuputil/installer/unix/lib Makefile, 1.1.1.1, 1.2 Message-ID: <200601192310.k0JNALta013563@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/setuputil/installer/unix/lib In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13522/installer/unix/lib Modified Files: Makefile Log Message: Supporting build on HP-UX IPF. Index: Makefile =================================================================== RCS file: /cvs/dirsec/setuputil/installer/unix/lib/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile 29 Jul 2005 22:16:32 -0000 1.1.1.1 +++ Makefile 19 Jan 2006 23:10:11 -0000 1.2 @@ -87,9 +87,9 @@ $(DISTINC): mkdir -p $(DISTINC) -$(LIBS): $(OBJS) $(CURSES) +$(LIBS): $(OBJS) $(AR) $? - $(RANLIB) $@ + $(RANLIB) $@ $(CURSES) $(STAGE): $(DISTINC) cp $(INCS) $(DISTINC) From fedora-directory-commits at redhat.com Thu Jan 19 23:10:13 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 19 Jan 2006 18:10:13 -0500 Subject: [Fedora-directory-commits] setuputil nsarch, 1.3, 1.4 nsconfig.mk, 1.3, 1.4 Message-ID: <200601192310.k0JNAhn3013567@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/setuputil In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13522 Modified Files: nsarch nsconfig.mk Log Message: Supporting build on HP-UX IPF. Index: nsarch =================================================================== RCS file: /cvs/dirsec/setuputil/nsarch,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- nsarch 16 Dec 2005 18:14:26 -0000 1.3 +++ nsarch 19 Jan 2006 23:10:03 -0000 1.4 @@ -451,6 +451,14 @@ NS_RELEASE="${HPUX_REV}" ns_printf exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + GNU_NAME="${UNAME_MACHINE}-hp-hpux${HPUX_REV}" + NS_NAME="HPUX" + NS_PRETTY_NAME="HP-UX" + NS_RELEASE="${HPUX_REV}" + ns_printf + exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >dummy.c #include Index: nsconfig.mk =================================================================== RCS file: /cvs/dirsec/setuputil/nsconfig.mk,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- nsconfig.mk 16 Dec 2005 01:07:52 -0000 1.3 +++ nsconfig.mk 19 Jan 2006 23:10:03 -0000 1.4 @@ -206,7 +206,12 @@ #------------------- ifeq ($(ARCH), HPUX) #------------------- -DLL_SUFFIX=sl +HPUX_ARCH = $(shell uname -m) +ifeq ($(HPUX_ARCH), ia64) + DLL_SUFFIX=so +else + DLL_SUFFIX=sl +endif LDAP_DLL_SUFFIX=$(DLL_SUFFIX) ifeq ($(NSOS_RELEASE), B.11.00) @@ -215,16 +220,27 @@ ifeq ($(NSOS_RELEASE), B.11.11) MODERNHP=1 endif +ifeq ($(NSOS_RELEASE), B.11.23) + MODERNHP=1 +endif ifdef MODERNHP CC=cc -Ae +ESlit CXX=aCC -ifeq ($(USE_64), 1) -BIT_SWITCH=+DA2.0W +DS2.0 -DHPUX_64 -Wl,+s -else -BIT_SWITCH=+DAportable +DS1.1 -Wl,+s -endif -ARCH_CFLAGS=$(BIT_SWITCH) -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D__STDC_EXT__ +z -DHPUX11 +ifeq ($(NSOS_RELEASE), B.11.23) + ifeq ($(USE_64), 1) + BIT_SWITCH=+DD64 + else + BIT_SWITCH=+DD32 + endif +else # 11.11 or earlier + ifeq ($(USE_64), 1) + BIT_SWITCH=+DA2.0W +DS2.0 + else + BIT_SWITCH=+DAportable +DS1.1 + endif +endif # B.11.23 +ARCH_CFLAGS=$(BIT_SWITCH) -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D__STDC_EXT__ +z -DHPUX11 EXTRA_LIBS= -ldld -lm -lpthread else CC=cc @@ -232,6 +248,10 @@ EXTRA_LIBS= -ldld -lm -ldce endif +ifeq ($(USE_64), 1) + ARCH_CFLAGS+=-DHPUX_64 +endif + CCC=$(CXX) ARCH_DEBUG=-g From fedora-directory-commits at redhat.com Wed Jan 25 16:51:47 2006 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 25 Jan 2006 11:51:47 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd libglobs.c, 1.6, 1.7 libslapd.def, 1.14, 1.15 modify.c, 1.7, 1.8 proto-slap.h, 1.15, 1.16 pw.c, 1.8, 1.9 slap.h, 1.9, 1.10 Message-ID: <200601251651.k0PGplLc019482@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19454 Modified Files: libglobs.c libslapd.def modify.c proto-slap.h pw.c slap.h Log Message: 178867 - Enhanced password syntax checking Index: libglobs.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- libglobs.c 19 Apr 2005 22:07:36 -0000 1.6 +++ libglobs.c 25 Jan 2006 16:51:39 -0000 1.7 @@ -277,6 +277,33 @@ {CONFIG_PW_MINLENGTH_ATTRIBUTE, config_set_pw_minlength, NULL, 0, (void**)&global_slapdFrontendConfig.pw_policy.pw_minlength, CONFIG_INT, NULL}, + {CONFIG_PW_MINDIGITS_ATTRIBUTE, config_set_pw_mindigits, + NULL, 0, + (void**)&global_slapdFrontendConfig.pw_policy.pw_mindigits, CONFIG_INT, NULL}, + {CONFIG_PW_MINALPHAS_ATTRIBUTE, config_set_pw_minalphas, + NULL, 0, + (void**)&global_slapdFrontendConfig.pw_policy.pw_minalphas, CONFIG_INT, NULL}, + {CONFIG_PW_MINUPPERS_ATTRIBUTE, config_set_pw_minuppers, + NULL, 0, + (void**)&global_slapdFrontendConfig.pw_policy.pw_minuppers, CONFIG_INT, NULL}, + {CONFIG_PW_MINLOWERS_ATTRIBUTE, config_set_pw_minlowers, + NULL, 0, + (void**)&global_slapdFrontendConfig.pw_policy.pw_minlowers, CONFIG_INT, NULL}, + {CONFIG_PW_MINSPECIALS_ATTRIBUTE, config_set_pw_minspecials, + NULL, 0, + (void**)&global_slapdFrontendConfig.pw_policy.pw_minspecials, CONFIG_INT, NULL}, + {CONFIG_PW_MIN8BIT_ATTRIBUTE, config_set_pw_min8bit, + NULL, 0, + (void**)&global_slapdFrontendConfig.pw_policy.pw_min8bit, CONFIG_INT, NULL}, + {CONFIG_PW_MAXREPEATS_ATTRIBUTE, config_set_pw_maxrepeats, + NULL, 0, + (void**)&global_slapdFrontendConfig.pw_policy.pw_maxrepeats, CONFIG_INT, NULL}, + {CONFIG_PW_MINCATEGORIES_ATTRIBUTE, config_set_pw_mincategories, + NULL, 0, + (void**)&global_slapdFrontendConfig.pw_policy.pw_mincategories, CONFIG_INT, NULL}, + {CONFIG_PW_MINTOKENLENGTH_ATTRIBUTE, config_set_pw_mintokenlength, + NULL, 0, + (void**)&global_slapdFrontendConfig.pw_policy.pw_mintokenlength, CONFIG_INT, NULL}, {CONFIG_ERRORLOG_ATTRIBUTE, config_set_errorlog, NULL, 0, (void**)&global_slapdFrontendConfig.errorlog, CONFIG_STRING_OR_EMPTY, NULL}, @@ -751,7 +778,16 @@ cfg->pw_policy.pw_must_change = LDAP_OFF; cfg->pw_policy.pw_syntax = LDAP_OFF; cfg->pw_policy.pw_exp = LDAP_OFF; - cfg->pw_policy.pw_minlength = 6; + cfg->pw_policy.pw_minlength = 8; + cfg->pw_policy.pw_mindigits = 0; + cfg->pw_policy.pw_minalphas = 0; + cfg->pw_policy.pw_minuppers = 0; + cfg->pw_policy.pw_minlowers = 0; + cfg->pw_policy.pw_minspecials = 0; + cfg->pw_policy.pw_min8bit = 0; + cfg->pw_policy.pw_maxrepeats = 0; + cfg->pw_policy.pw_mincategories = 3; + cfg->pw_policy.pw_mintokenlength = 3; cfg->pw_policy.pw_maxage = 8640000; /* 100 days */ cfg->pw_policy.pw_minage = 0; cfg->pw_policy.pw_warning = 86400; /* 1 day */ @@ -1340,6 +1376,276 @@ } int +config_set_pw_mindigits( const char *attrname, char *value, char *errorbuf, int apply ) { + int retVal = LDAP_SUCCESS, minDigits = 0; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + + minDigits = atoi(value); + if ( minDigits < 0 || minDigits > 64 ) { + PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + "password minimum number of digits \"%s\" is invalid. " + "The minimum number of digits must range from 0 to 64.", + value ); + retVal = LDAP_OPERATIONS_ERROR; + return retVal; + } + + if ( apply ) { + CFG_LOCK_WRITE(slapdFrontendConfig); + + slapdFrontendConfig->pw_policy.pw_mindigits = minDigits; + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + } + + return retVal; +} + +int +config_set_pw_minalphas( const char *attrname, char *value, char *errorbuf, int apply ) { + int retVal = LDAP_SUCCESS, minAlphas = 0; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + + minAlphas = atoi(value); + if ( minAlphas < 0 || minAlphas > 64 ) { + PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + "password minimum number of alphas \"%s\" is invalid. " + "The minimum number of alphas must range from 0 to 64.", + value ); + retVal = LDAP_OPERATIONS_ERROR; + return retVal; + } + + if ( apply ) { + CFG_LOCK_WRITE(slapdFrontendConfig); + + slapdFrontendConfig->pw_policy.pw_minalphas = minAlphas; + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + } + + return retVal; +} + +int +config_set_pw_minuppers( const char *attrname, char *value, char *errorbuf, int apply ) { + int retVal = LDAP_SUCCESS, minUppers = 0; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + + minUppers = atoi(value); + if ( minUppers < 0 || minUppers > 64 ) { + PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + "password minimum number of uppercase characters \"%s\" is invalid. " + "The minimum number of uppercase characters must range from 0 to 64.", + value ); + retVal = LDAP_OPERATIONS_ERROR; + return retVal; + } + + if ( apply ) { + CFG_LOCK_WRITE(slapdFrontendConfig); + + slapdFrontendConfig->pw_policy.pw_minuppers = minUppers; + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + } + + return retVal; +} + +int +config_set_pw_minlowers( const char *attrname, char *value, char *errorbuf, int apply ) { + int retVal = LDAP_SUCCESS, minLowers = 0; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + + minLowers = atoi(value); + if ( minLowers < 0 || minLowers > 64 ) { + PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + "password minimum number of lowercase characters \"%s\" is invalid. " + "The minimum number of lowercase characters must range from 0 to 64.", + value ); + retVal = LDAP_OPERATIONS_ERROR; + return retVal; + } + + if ( apply ) { + CFG_LOCK_WRITE(slapdFrontendConfig); + + slapdFrontendConfig->pw_policy.pw_minlowers = minLowers; + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + } + + return retVal; +} + +int +config_set_pw_minspecials( const char *attrname, char *value, char *errorbuf, int apply ) { + int retVal = LDAP_SUCCESS, minSpecials = 0; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + + minSpecials = atoi(value); + if ( minSpecials < 0 || minSpecials > 64 ) { + PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + "password minimum number of special characters \"%s\" is invalid. " + "The minimum number of special characters must range from 0 to 64.", + value ); + retVal = LDAP_OPERATIONS_ERROR; + return retVal; + } + + if ( apply ) { + CFG_LOCK_WRITE(slapdFrontendConfig); + + slapdFrontendConfig->pw_policy.pw_minspecials = minSpecials; + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + } + + return retVal; +} + +int +config_set_pw_min8bit( const char *attrname, char *value, char *errorbuf, int apply ) { + int retVal = LDAP_SUCCESS, min8bit = 0; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + + min8bit = atoi(value); + if ( min8bit < 0 || min8bit > 64 ) { + PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + "password minimum number of 8-bit characters \"%s\" is invalid. " + "The minimum number of 8-bit characters must range from 0 to 64.", + value ); + retVal = LDAP_OPERATIONS_ERROR; + return retVal; + } + + if ( apply ) { + CFG_LOCK_WRITE(slapdFrontendConfig); + + slapdFrontendConfig->pw_policy.pw_min8bit = min8bit; + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + } + + return retVal; +} + +int +config_set_pw_maxrepeats( const char *attrname, char *value, char *errorbuf, int apply ) { + int retVal = LDAP_SUCCESS, maxRepeats = 0; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + + maxRepeats = atoi(value); + if ( maxRepeats < 0 || maxRepeats > 64 ) { + PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + "password maximum number of repeated characters \"%s\" is invalid. " + "The maximum number of repeated characters must range from 0 to 64.", + value ); + retVal = LDAP_OPERATIONS_ERROR; + return retVal; + } + + if ( apply ) { + CFG_LOCK_WRITE(slapdFrontendConfig); + + slapdFrontendConfig->pw_policy.pw_maxrepeats = maxRepeats; + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + } + + return retVal; +} + +int +config_set_pw_mincategories( const char *attrname, char *value, char *errorbuf, int apply ) { + int retVal = LDAP_SUCCESS, minCategories = 0; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + + minCategories = atoi(value); + if ( minCategories < 1 || minCategories > 5 ) { + PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + "password minimum number of categories \"%s\" is invalid. " + "The minimum number of categories must range from 1 to 5.", + value ); + retVal = LDAP_OPERATIONS_ERROR; + return retVal; + } + + if ( apply ) { + CFG_LOCK_WRITE(slapdFrontendConfig); + + slapdFrontendConfig->pw_policy.pw_mincategories = minCategories; + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + } + + return retVal; +} + +int +config_set_pw_mintokenlength( const char *attrname, char *value, char *errorbuf, int apply ) { + int retVal = LDAP_SUCCESS, minTokenLength = 0; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + + minTokenLength = atoi(value); + if ( minTokenLength < 1 || minTokenLength > 64 ) { + PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + "password minimum token length \"%s\" is invalid. " + "The minimum token length must range from 1 to 64.", + value ); + retVal = LDAP_OPERATIONS_ERROR; + return retVal; + } + + if ( apply ) { + CFG_LOCK_WRITE(slapdFrontendConfig); + + slapdFrontendConfig->pw_policy.pw_mintokenlength = minTokenLength; + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + } + + return retVal; +} + +int config_set_pw_maxfailure( const char *attrname, char *value, char *errorbuf, int apply ) { int retVal = LDAP_SUCCESS, maxFailure = 0; slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); @@ -2793,6 +3099,114 @@ return retVal; } +int +config_get_pw_mindigits() { + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + int retVal; + + CFG_LOCK_READ(slapdFrontendConfig); + retVal = slapdFrontendConfig->pw_policy.pw_mindigits; + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + +int +config_get_pw_minalphas() { + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + int retVal; + + CFG_LOCK_READ(slapdFrontendConfig); + retVal = slapdFrontendConfig->pw_policy.pw_minalphas; + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + +int +config_get_pw_minuppers() { + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + int retVal; + + CFG_LOCK_READ(slapdFrontendConfig); + retVal = slapdFrontendConfig->pw_policy.pw_minuppers; + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + +int +config_get_pw_minlowers() { + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + int retVal; + + CFG_LOCK_READ(slapdFrontendConfig); + retVal = slapdFrontendConfig->pw_policy.pw_minlowers; + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + +int +config_get_pw_minspecials() { + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + int retVal; + + CFG_LOCK_READ(slapdFrontendConfig); + retVal = slapdFrontendConfig->pw_policy.pw_minspecials; + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + +int +config_get_pw_min8bit() { + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + int retVal; + + CFG_LOCK_READ(slapdFrontendConfig); + retVal = slapdFrontendConfig->pw_policy.pw_min8bit; + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + +int +config_get_pw_maxrepeats() { + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + int retVal; + + CFG_LOCK_READ(slapdFrontendConfig); + retVal = slapdFrontendConfig->pw_policy.pw_maxrepeats; + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + +int +config_get_pw_mincategories() { + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + int retVal; + + CFG_LOCK_READ(slapdFrontendConfig); + retVal = slapdFrontendConfig->pw_policy.pw_mincategories; + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + +int +config_get_pw_mintokenlength() { + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + int retVal; + + CFG_LOCK_READ(slapdFrontendConfig); + retVal = slapdFrontendConfig->pw_policy.pw_mintokenlength; + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + int config_get_pw_maxfailure() { slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); Index: libslapd.def =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libslapd.def,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- libslapd.def 29 Oct 2005 02:28:07 -0000 1.14 +++ libslapd.def 25 Jan 2006 16:51:39 -0000 1.15 @@ -1179,3 +1179,22 @@ sasl_map_done @1179 slapd_SECITEM_FreeItem @1180 slapi_op_type_to_string @1181 +; password syntax functions + config_set_pw_mindigits @1190 + config_set_pw_minalphas @1191 + config_set_pw_minuppers @1192 + config_set_pw_minlowers @1193 + config_set_pw_minspecials @1194 + config_set_pw_min8bit @1195 + config_set_pw_maxrepeats @1196 + config_set_pw_mincategories @1197 + config_set_pw_mintokenlength @1198 + config_get_pw_mindigits @1199 + config_get_pw_minalphas @1200 + config_get_pw_minuppers @1201 + config_get_pw_minlowers @1202 + config_get_pw_minspecials @1203 + config_get_pw_min8bit @1204 + config_get_pw_maxrepeats @1205 + config_get_pw_mincategories @1206 + config_get_pw_mintokenlength @1207 Index: modify.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/modify.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- modify.c 19 Apr 2005 22:07:36 -0000 1.7 +++ modify.c 25 Jan 2006 16:51:39 -0000 1.8 @@ -65,7 +65,7 @@ static int modify_internal_pb (Slapi_PBlock *pb); static void op_shared_modify (Slapi_PBlock *pb, int pw_change, char *old_pw); static void remove_mod (Slapi_Mods *smods, const char *type, Slapi_Mods *smod_unhashed); -static int op_shared_allow_pw_change (Slapi_PBlock *pb, LDAPMod *mod, char **old_pw); +static int op_shared_allow_pw_change (Slapi_PBlock *pb, LDAPMod *mod, char **old_pw, Slapi_Mods *smods); #ifdef LDAP_DEBUG static const char* @@ -279,7 +279,7 @@ strcasecmp( mod->mod_type, SLAPI_USERPWD_ATTR ) == 0 ) { /* assumes controls have already been decoded and placed in the pblock */ - pw_change = op_shared_allow_pw_change (pb, mod, &old_pw); + pw_change = op_shared_allow_pw_change (pb, mod, &old_pw, &smods); if (pw_change == -1) { goto free_and_return; } @@ -432,7 +432,8 @@ int opresult = 0; LDAPMod **normalized_mods = NULL; LDAPMod **mods; - LDAPMod **mod; + LDAPMod **mod; + Slapi_Mods smods; int pw_change = 0; char *old_pw = NULL; @@ -469,7 +470,8 @@ { if ((*mod)->mod_bvalues != NULL && strcasecmp((*mod)->mod_type, SLAPI_USERPWD_ATTR) == 0) { - pw_change = op_shared_allow_pw_change (pb, *mod, &old_pw); + slapi_mods_init_passin(&smods, mods); + pw_change = op_shared_allow_pw_change (pb, *mod, &old_pw, &smods); if (pw_change == -1) { /* The internal result code will already have been set by op_shared_allow_pw_change() */ @@ -865,7 +867,7 @@ } } -static int op_shared_allow_pw_change (Slapi_PBlock *pb, LDAPMod *mod, char **old_pw) +static int op_shared_allow_pw_change (Slapi_PBlock *pb, LDAPMod *mod, char **old_pw, Slapi_Mods *smods) { int isroot, internal_op, repl_op, pwresponse_req = 0; char *dn; @@ -953,7 +955,7 @@ /* check password syntax; remember the old password; error sent directly from check_pw_syntax function */ valuearray_init_bervalarray(mod->mod_bvalues, &values); - switch (check_pw_syntax (pb, &sdn, values, old_pw, NULL, 1)) + switch (check_pw_syntax_ext (pb, &sdn, values, old_pw, NULL, 1, smods)) { case 0: /* success */ rc = 1; Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- proto-slap.h 12 Jan 2006 00:28:57 -0000 1.15 +++ proto-slap.h 25 Jan 2006 16:51:39 -0000 1.16 @@ -268,6 +268,15 @@ int config_set_pwpolicy_local(const char *attrname, char *value, char *errorbuf, int apply ); int config_set_pw_syntax(const char *attrname, char *value, char *errorbuf, int apply ); int config_set_pw_minlength(const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_pw_mindigits(const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_pw_minalphas(const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_pw_minuppers(const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_pw_minlowers(const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_pw_minspecials(const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_pw_min8bit(const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_pw_maxrepeats(const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_pw_mincategories(const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_pw_mintokenlength(const char *attrname, char *value, char *errorbuf, int apply ); int config_set_pw_exp(const char *attrname, char *value, char *errorbuf, int apply ); int config_set_pw_maxage(const char *attrname, char *value, char *errorbuf, int apply ); int config_set_pw_minage(const char *attrname, char *value, char *errorbuf, int apply ); @@ -322,6 +331,15 @@ int config_get_pw_must_change(); int config_get_pw_syntax(); int config_get_pw_minlength(); +int config_get_pw_mindigits(); +int config_get_pw_minalphas(); +int config_get_pw_minuppers(); +int config_get_pw_minlowers(); +int config_get_pw_minspecials(); +int config_get_pw_min8bit(); +int config_get_pw_maxrepeats(); +int config_get_pw_mincategories(); +int config_get_pw_mintokenlength(); int config_get_pw_maxfailure(); int config_get_pw_inhistory(); long config_get_pw_lockduration(); @@ -694,6 +712,8 @@ int update_pw_info( Slapi_PBlock *pb , char *old_pw ); int check_pw_syntax( Slapi_PBlock *pb, const Slapi_DN *sdn, Slapi_Value **vals, char **old_pw, Slapi_Entry *e, int mod_op ); +int check_pw_syntax_ext( Slapi_PBlock *pb, const Slapi_DN *sdn, Slapi_Value **vals, + char **old_pw, Slapi_Entry *e, int mod_op, Slapi_Mods *smods ); int check_account_lock( Slapi_PBlock *pb, Slapi_Entry * bind_target_entry, int pwresponse_req); int check_pw_minage( Slapi_PBlock *pb, const Slapi_DN *sdn, struct berval **vals) ; void add_password_attrs( Slapi_PBlock *pb, Operation *op, Slapi_Entry *e ); Index: pw.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pw.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- pw.c 19 Apr 2005 22:07:36 -0000 1.8 +++ pw.c 25 Jan 2006 16:51:39 -0000 1.9 @@ -62,7 +62,8 @@ static int pw_in_history(Slapi_Value **history_vals, const Slapi_Value *pw_val); static int update_pw_history( Slapi_PBlock *pb, char *dn, char *old_pw ); -static int check_trivial_words (Slapi_PBlock *, Slapi_Entry *, Slapi_Value **, char *attrtype ); +static int check_trivial_words (Slapi_PBlock *, Slapi_Entry *, Slapi_Value **, + char *attrtype, int toklen, Slapi_Mods *smods ); static int pw_boolean_str2value (const char *str); /* static LDAPMod* pw_malloc_mod (char* name, char* value, int mod_op); */ @@ -715,19 +716,39 @@ check_pw_syntax ( Slapi_PBlock *pb, const Slapi_DN *sdn, Slapi_Value **vals, char **old_pw, Slapi_Entry *e, int mod_op) { + return ( check_pw_syntax_ext(pb, sdn, vals, old_pw, e, mod_op, NULL) ); +} + +int +check_pw_syntax_ext ( Slapi_PBlock *pb, const Slapi_DN *sdn, Slapi_Value **vals, + char **old_pw, Slapi_Entry *e, int mod_op, Slapi_Mods *smods) +{ Slapi_Attr* attr; - int i, pwresponse_req = 0; + int i, pwresponse_req = 0; char *dn= (char*)slapi_sdn_get_ndn(sdn); /* jcm - Had to cast away const */ + char *pwd = NULL; + char *p = NULL; passwdPolicy *pwpolicy = NULL; pwpolicy = new_passwdPolicy(pb, dn); slapi_pblock_get ( pb, SLAPI_PWPOLICY, &pwresponse_req ); if ( pwpolicy->pw_syntax == 1 ) { - /* check for the minimum password lenght */ for ( i = 0; vals[ i ] != NULL; ++i ) { - if ( pwpolicy->pw_minlength - > (int)slapi_value_get_length(vals[ i ]) ) { /* jcm: had to cast unsigned int to signed int */ + int num_digits = 0; + int num_alphas = 0; + int num_uppers = 0; + int num_lowers = 0; + int num_specials = 0; + int num_8bit = 0; + int num_repeated = 0; + int max_repeated = 0; + int num_categories = 0; + + /* check for the minimum password length */ + if ( pwpolicy->pw_minlength > + ldap_utf8characters((char *)slapi_value_get_string( vals[i] )) ) + { if ( pwresponse_req == 1 ) { slapi_pwpolicy_make_response_control ( pb, -1, -1, LDAP_PWPOLICY_PWDTOOSHORT ); @@ -738,10 +759,95 @@ delete_passwdPolicy(&pwpolicy); return ( 1 ); } + + /* check character types */ + pwd = (char *)slapi_value_get_string( vals[i] ); + p = pwd; + /* + pwdlen = slapi_value_get_length( vals[i] ); + for ( j = 0; j < pwdlen; j++ ) { + */ + while ( p && *p ) + { + if ( ldap_utf8isdigit( p ) ) { + num_digits++; + } else if ( ldap_utf8isalpha( p ) ) { + num_alphas++; + if ( slapi_utf8isLower( p ) ) { + num_lowers++; + } else { + num_uppers++; + } + } else { + /* check if this is an 8-bit char */ + if ( *p & 128 ) { + num_8bit++; + } else { + num_specials++; + } + } + + /* check for repeating characters. If this is the + first char of the password, no need to check */ + if ( pwd != p ) { + int len = ldap_utf8len( p ); + char *prev_p = ldap_utf8prev( p ); + + if ( len == ldap_utf8len( prev_p ) ) + { + if ( memcmp( p, prev_p, len ) == 0 ) + { + num_repeated++; + if ( max_repeated < num_repeated ) { + max_repeated = num_repeated; + } + } else { + num_repeated = 0; + } + } else { + num_repeated = 0; + } + } + + p = ldap_utf8next( p ); + } + + /* tally up the number of character categories */ + if ( num_digits > 0 ) + ++num_categories; + if ( num_uppers > 0 ) + ++num_categories; + if ( num_lowers > 0 ) + ++num_categories; + if ( num_specials > 0 ) + ++num_categories; + if ( num_8bit > 0 ) + ++num_categories; + + /* check for character based syntax limits */ + if ( ( pwpolicy->pw_mindigits > num_digits ) || + ( pwpolicy->pw_minalphas > num_alphas ) || + ( pwpolicy->pw_minuppers > num_uppers ) || + ( pwpolicy->pw_minlowers > num_lowers ) || + ( pwpolicy->pw_minspecials > num_specials ) || + ( pwpolicy->pw_min8bit > num_8bit ) || + ( (pwpolicy->pw_maxrepeats != 0) && (pwpolicy->pw_maxrepeats < (max_repeated + 1)) ) || + ( pwpolicy->pw_mincategories > num_categories ) ) + { + if ( pwresponse_req == 1 ) { + slapi_pwpolicy_make_response_control ( pb, -1, -1, + LDAP_PWPOLICY_INVALIDPWDSYNTAX ); + } + pw_send_ldap_result ( pb, + LDAP_CONSTRAINT_VIOLATION, NULL, + "invalid password syntax", 0, NULL ); + delete_passwdPolicy(&pwpolicy); + return ( 1 ); + } } } - /* get the entry and check for the password history and syntax if this is called by a modify operation */ + /* get the entry and check for the password history if this is called by a modify operation */ if ( mod_op ) { /* retrieve the entry */ e = get_entry ( pb, dn ); @@ -808,19 +914,24 @@ *old_pw = NULL; } } + } - if ( pwpolicy->pw_syntax == 1 ) { - /* check for trivial words */ - if ( check_trivial_words ( pb, e, vals, "uid" ) == 1 || - check_trivial_words ( pb, e, vals, "cn" ) == 1 || - check_trivial_words ( pb, e, vals, "sn" ) == 1 || - check_trivial_words ( pb, e, vals, "givenname" ) == 1 || - check_trivial_words ( pb, e, vals, "ou" ) == 1 || - check_trivial_words ( pb, e, vals, "mail" ) == 1) { - slapi_entry_free( e ); - delete_passwdPolicy(&pwpolicy); - return 1; + /* check for trivial words if syntax checking is enabled */ + if ( pwpolicy->pw_syntax == 1 ) { + /* e is null if this is an add operation*/ + if ( check_trivial_words ( pb, e, vals, "uid", pwpolicy->pw_mintokenlength, smods ) == 1 || + check_trivial_words ( pb, e, vals, "cn", pwpolicy->pw_mintokenlength, smods ) == 1 || + check_trivial_words ( pb, e, vals, "sn", pwpolicy->pw_mintokenlength, smods ) == 1 || + check_trivial_words ( pb, e, vals, "givenname", pwpolicy->pw_mintokenlength, smods ) == 1 || + check_trivial_words ( pb, e, vals, "ou", pwpolicy->pw_mintokenlength, smods ) == 1 || + check_trivial_words ( pb, e, vals, "mail", pwpolicy->pw_mintokenlength, smods ) == 1) + { + if ( mod_op ) { + slapi_entry_free( e ); } + + delete_passwdPolicy(&pwpolicy); + return 1; } } @@ -1122,33 +1233,91 @@ } static int -check_trivial_words (Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Value **vals, char *attrtype ) +check_trivial_words (Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Value **vals, char *attrtype, + int toklen, Slapi_Mods *smods ) { - Slapi_Attr *attr; - int i, pwresponse_req = 0; + Slapi_Attr *attr = NULL; + Slapi_Mod *smodp = NULL, *smod = NULL; + Slapi_ValueSet *vs = NULL; + Slapi_Value *valp = NULL; + struct berval *bvp = NULL; + int i, pwresponse_req = 0; + + vs = slapi_valueset_new(); slapi_pblock_get ( pb, SLAPI_PWPOLICY, &pwresponse_req ); - attr = attrlist_find(e->e_attrs, attrtype); - if (attr && !valueset_isempty(&attr->a_present_values)) + + /* Get a list of present values for attrtype in the existing entry, if there is one */ + if (e != NULL ) { - Slapi_Value **va= attr_get_present_values(attr); - for ( i = 0; va[i] != NULL; i++ ) + if ( (attr = attrlist_find(e->e_attrs, attrtype)) && + (!valueset_isempty(&attr->a_present_values)) ) { - if( strcasecmp( slapi_value_get_string(va[i]), slapi_value_get_string(vals[0])) == 0) /* JCM Innards */ + /* Add present values to valueset */ + slapi_attr_get_valueset( attr, &vs ); + } + } + + /* Get a list of new values for attrtype from the operation */ + if ( (smod = slapi_mod_new()) && smods ) + { + for (smodp = slapi_mods_get_first_smod(smods, smod); + smodp != NULL; smodp = slapi_mods_get_next_smod(smods, smod) ) + { + /* Operation has new values for attrtype */ + if ( PL_strcasecmp(attrtype, slapi_mod_get_type(smodp)) == 0 ) { - if ( pwresponse_req == 1 ) { + /* iterate through smodp values and add them if they don't exist */ + for ( bvp = slapi_mod_get_first_value( smodp ); bvp != NULL; + bvp = slapi_mod_get_next_value( smodp ) ) + { + /* Add new value to valueset */ + valp = slapi_value_new_berval( bvp ); + slapi_valueset_add_value_ext( vs, valp, SLAPI_VALUE_FLAG_PASSIN ); + valp = NULL; + } + } + } + /* Free smod */ + slapi_mod_free(&smod); + smod = NULL; + smodp = NULL; + } + + /* If valueset isn't empty, we need to check if the password contains the values */ + if ( slapi_valueset_count(vs) != 0 ) + { + for ( i = slapi_valueset_first_value( vs, &valp); + (i != -1) && (valp != NULL); + i = slapi_valueset_next_value( vs, i, &valp) ) + { + /* If the value is smaller than the max token length, + * we don't need to check the password */ + if ( ldap_utf8characters(slapi_value_get_string( valp )) < toklen ) + continue; + + /* See if the password contains the value */ + if ( PL_strcasestr( slapi_value_get_string( vals[0] ), + slapi_value_get_string( valp ) ) ) + { + if ( pwresponse_req == 1 ) + { slapi_pwpolicy_make_response_control ( pb, -1, -1, LDAP_PWPOLICY_INVALIDPWDSYNTAX ); } pw_send_ldap_result ( pb, LDAP_CONSTRAINT_VIOLATION, NULL, - "Password failed triviality check." - " Please choose a different password.", - 0, NULL ); - return ( 1 ); + "invalid password syntax", 0, NULL ); + + /* Free valueset */ + slapi_valueset_free( vs ); + return ( 1 ); } - } + } } + + /* Free valueset */ + slapi_valueset_free( vs ); return ( 0 ); } @@ -1361,6 +1530,60 @@ } } else + if (!strcasecmp(attr_name, "passwordmindigits")) { + if ((sval = attr_get_present_values(attr))) { + pwdpolicy->pw_mindigits = slapi_value_get_int(*sval); + } + } + else + if (!strcasecmp(attr_name, "passwordminalphas")) { + if ((sval = attr_get_present_values(attr))) { + pwdpolicy->pw_minalphas = slapi_value_get_int(*sval); + } + } + else + if (!strcasecmp(attr_name, "passwordminuppers")) { + if ((sval = attr_get_present_values(attr))) { + pwdpolicy->pw_minuppers = slapi_value_get_int(*sval); + } + } + else + if (!strcasecmp(attr_name, "passwordminlowers")) { + if ((sval = attr_get_present_values(attr))) { + pwdpolicy->pw_minlowers = slapi_value_get_int(*sval); + } + } + else + if (!strcasecmp(attr_name, "passwordminspecials")) { + if ((sval = attr_get_present_values(attr))) { + pwdpolicy->pw_minspecials = slapi_value_get_int(*sval); + } + } + else + if (!strcasecmp(attr_name, "passwordmin8bit")) { + if ((sval = attr_get_present_values(attr))) { + pwdpolicy->pw_min8bit = slapi_value_get_int(*sval); + } + } + else + if (!strcasecmp(attr_name, "passwordmaxrepeats")) { + if ((sval = attr_get_present_values(attr))) { + pwdpolicy->pw_maxrepeats = slapi_value_get_int(*sval); + } + } + else + if (!strcasecmp(attr_name, "passwordmincategories")) { + if ((sval = attr_get_present_values(attr))) { + pwdpolicy->pw_mincategories = slapi_value_get_int(*sval); + } + } + else + if (!strcasecmp(attr_name, "passwordmintokenlength")) { + if ((sval = attr_get_present_values(attr))) { + pwdpolicy->pw_mintokenlength = slapi_value_get_int(*sval); + } + } + else if (!strcasecmp(attr_name, "passwordexp")) { if ((sval = attr_get_present_values(attr))) { pwdpolicy->pw_exp = Index: slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- slap.h 19 Apr 2005 22:07:37 -0000 1.9 +++ slap.h 25 Jan 2006 16:51:39 -0000 1.10 @@ -1661,6 +1661,15 @@ #define CONFIG_PW_MUSTCHANGE_ATTRIBUTE "passwordMustChange" #define CONFIG_PW_SYNTAX_ATTRIBUTE "passwordCheckSyntax" #define CONFIG_PW_MINLENGTH_ATTRIBUTE "passwordMinLength" +#define CONFIG_PW_MINDIGITS_ATTRIBUTE "passwordMinDigits" +#define CONFIG_PW_MINALPHAS_ATTRIBUTE "passwordMinAlphas" +#define CONFIG_PW_MINUPPERS_ATTRIBUTE "passwordMinUppers" +#define CONFIG_PW_MINLOWERS_ATTRIBUTE "passwordMinLowers" +#define CONFIG_PW_MINSPECIALS_ATTRIBUTE "passwordMinSpecials" +#define CONFIG_PW_MIN8BIT_ATTRIBUTE "passwordMin8Bit" +#define CONFIG_PW_MAXREPEATS_ATTRIBUTE "passwordMaxRepeats" +#define CONFIG_PW_MINCATEGORIES_ATTRIBUTE "passwordMinCategories" +#define CONFIG_PW_MINTOKENLENGTH_ATTRIBUTE "passwordMinTokenLength" #define CONFIG_PW_EXP_ATTRIBUTE "passwordExp" #define CONFIG_PW_MAXAGE_ATTRIBUTE "passwordMaxAge" #define CONFIG_PW_MINAGE_ATTRIBUTE "passwordMinAge" @@ -1715,6 +1724,15 @@ int pw_must_change; /* 1 - indicates that users must change pwd upon reset */ int pw_syntax; int pw_minlength; + int pw_mindigits; + int pw_minalphas; + int pw_minuppers; + int pw_minlowers; + int pw_minspecials; + int pw_min8bit; + int pw_maxrepeats; + int pw_mincategories; + int pw_mintokenlength; int pw_exp; long pw_maxage; long pw_minage; From fedora-directory-commits at redhat.com Fri Jan 27 03:05:24 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Thu, 26 Jan 2006 22:05:24 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt Makefile, 1.1, 1.2 port.h, 1.1, 1.2 Message-ID: <200601270305.k0R35Orr029098@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29079 Modified Files: Makefile port.h Log Message: [164596] LDCLT distributed with Directory Server Fixed broken build on Solaris. 1) removed redeclared getsubopt in port.h 2) defined _XOPEN_SOURCE 500 for Linux Index: Makefile =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 11 Jan 2006 01:54:30 -0000 1.1 +++ Makefile 27 Jan 2006 03:05:12 -0000 1.2 @@ -102,7 +102,11 @@ ADDLIBS = $(LDAPLIBS) $(SPEC_LIBS) $(SYSTEM_LIBS) $(END) -CFLAGS+=-DLDAP_DONT_USE_SMARTHEAP +CFLAGS+=-DLDAP_DONT_USE_SMARTHEAP + +ifeq ($(ARCH), Linux) +CFLAGS+=-D_XOPEN_SOURCE=500 +endif EXTRA_LIBS_DEP = $(LDAPSDK_DEP) $(DB_LIB_DEP) $(LDAP_COMMON_LIBS_DEP) Index: port.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/port.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- port.h 11 Jan 2006 01:54:30 -0000 1.1 +++ port.h 27 Jan 2006 03:05:12 -0000 1.2 @@ -104,8 +104,6 @@ #else /* _WIN32 */ -extern int getsubopt(char **optionp, char **tokens, char **valuep); - /************************************************************************/ /************************************************************************/ /**************** Unix section ***********************/ From fedora-directory-commits at redhat.com Sat Jan 28 02:26:14 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jan 2006 21:26:14 -0500 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools Makefile, 1.10, 1.11 Message-ID: <200601280226.k0S2QE13014173@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14139 Modified Files: Makefile Log Message: [170348] RSEARCH needs to be updated Fixed the broken build (64-bit). LDFLAG (set in the tools/Makefile) was not passed to rsearch and ldclt. Index: Makefile =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Makefile 11 Jan 2006 01:54:24 -0000 1.10 +++ Makefile 28 Jan 2006 02:26:06 -0000 1.11 @@ -77,12 +77,16 @@ OBJS1 += $(OBJDEST)/pwenc.o ifeq ($(USE_64), 1) -ifeq ($(ARCH), HPUX) -LDFLAGS += -lpthread +DA2.0W +DS2.0 +Z -endif -ifeq ($(ARCH), SOLARIS) -LDFLAGS += -xarch=v9 -endif + ifeq ($(ARCH), HPUX) + ifeq ($(NSOS_RELEASE),B.11.23) + LDFLAGS += -lpthread +DD64 + else + LDFLAGS += -lpthread +DA2.0W +DS2.0 +Z + endif + endif + ifeq ($(ARCH), SOLARIS) + LDFLAGS += -xarch=v9 + endif endif CFLAGS += $(ARCH_CFLAGS) @@ -200,10 +204,10 @@ $(MKDIR) $(OBJDEST) buildRsearch: - cd rsearch; $(MAKE) + cd rsearch; $(MAKE) LDFLAGS="$(LDFLAGS)" buildLdclt: - cd ldclt; $(MAKE) + cd ldclt; $(MAKE) LDFLAGS="$(LDFLAGS)" clean: -$(RM) $(ALL_OBJS) From fedora-directory-commits at redhat.com Sat Jan 28 02:30:11 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jan 2006 21:30:11 -0500 Subject: [Fedora-directory-commits] adminutil/lib/libadmsslutil Makefile, 1.2, 1.3 Message-ID: <200601280230.k0S2UBOW014242@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/adminutil/lib/libadmsslutil In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14188/lib/libadmsslutil Modified Files: Makefile Log Message: [Bug 172166] Admin Util build (IPF) 1) Ported onto HP-UX IPF (B.11.23). 2) Upgraded ICU version from 2.4 to 3.4. Index: Makefile =================================================================== RCS file: /cvs/dirsec/adminutil/lib/libadmsslutil/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile 6 Dec 2005 18:38:42 -0000 1.2 +++ Makefile 28 Jan 2006 02:30:03 -0000 1.3 @@ -58,7 +58,7 @@ ADM_EXPORT_FILE=$(OBJLIBDIR)/$(SO_NAME)$(DLL_PRESUF).exp endif -DEPLIBS += $(ADMSDKLINK) $(ICULINK) $(LDAPLINK) $(SVRCORELINK) $(SECURITYLINK) $(NSPRLINK) +DEPLIBS += $(ADMSDKLINK) $(ICULINK) $(LDAPLINK) $(SVRCORELINK) $(SECURITYLINK) $(NSPRLINK) $(EXTRA_LIBS) # # Don't build sslpset.c since the open-source SVRCORE doesn't have everything it needs From fedora-directory-commits at redhat.com Sat Jan 28 02:30:00 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jan 2006 21:30:00 -0500 Subject: [Fedora-directory-commits] adminutil component_versions.mk, 1.1.1.1, 1.2 components.mk, 1.1.1.1, 1.2 nsconfig.mk, 1.6, 1.7 pkgadminutil.mk, 1.5, 1.6 Message-ID: <200601280230.k0S2UUWK014248@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/adminutil In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14188 Modified Files: component_versions.mk components.mk nsconfig.mk pkgadminutil.mk Log Message: [Bug 172166] Admin Util build (IPF) 1) Ported onto HP-UX IPF (B.11.23). 2) Upgraded ICU version from 2.4 to 3.4. Index: component_versions.mk =================================================================== RCS file: /cvs/dirsec/adminutil/component_versions.mk,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- component_versions.mk 20 Jul 2005 22:51:30 -0000 1.1.1.1 +++ component_versions.mk 28 Jan 2006 02:29:52 -0000 1.2 @@ -60,7 +60,7 @@ # ICU ifndef ICU_VERSDIR - ICU_VERSDIR=libicu_2_4 + ICU_VERSDIR=libicu_3_4 endif ifndef ICU_RELDATE ICU_RELDATE=20040820 Index: components.mk =================================================================== RCS file: /cvs/dirsec/adminutil/components.mk,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- components.mk 20 Jul 2005 22:51:30 -0000 1.1.1.1 +++ components.mk 28 Jan 2006 02:29:52 -0000 1.2 @@ -228,7 +228,7 @@ ### ICU package ########################################## -ICU_LIB_VERSION = 24 +ICU_LIB_VERSION = 34 ifdef ICU_SOURCE_ROOT ICU_LIBPATH = $(ICU_SOURCE_ROOT)/built/lib ICU_BINPATH = $(ICU_SOURCE_ROOT)/built/bin Index: nsconfig.mk =================================================================== RCS file: /cvs/dirsec/adminutil/nsconfig.mk,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- nsconfig.mk 19 Jan 2006 22:05:52 -0000 1.6 +++ nsconfig.mk 28 Jan 2006 02:29:52 -0000 1.7 @@ -180,22 +180,26 @@ endif ifeq ($(MODERNHP), 1) -CC=cc -Ae +ESlit CXX=/opt/aCC/bin/aCC +CC=cc -Ae ifeq ($(NSOS_RELEASE), B.11.23) + CC+=+Olit=all ifeq ($(USE_64), 1) BIT_SWITCH=+DD64 else BIT_SWITCH=+DD32 endif + IPF_CFLAGS=-DPIC else # 11.11 or earlier + CC+=+ESlit ifeq ($(USE_64), 1) BIT_SWITCH=+DA2.0W +DS2.0 else BIT_SWITCH=+DAportable +DS1.1 endif + IPF_CFLAGS= endif # B.11.23 -ARCH_CFLAGS=$(BIT_SWITCH) -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D__STDC_EXT__ +z -DHPUX11 +ARCH_CFLAGS=$(BIT_SWITCH) -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D__STDC_EXT__ +z -DHPUX11 $(IPF_CFLAGS) EXTRA_LIBS= -ldld -lm -lpthread else CC=cc Index: pkgadminutil.mk =================================================================== RCS file: /cvs/dirsec/adminutil/pkgadminutil.mk,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- pkgadminutil.mk 6 Dec 2005 18:38:20 -0000 1.5 +++ pkgadminutil.mk 28 Jan 2006 02:29:52 -0000 1.6 @@ -88,7 +88,7 @@ cp -p $(ABS_ROOT)/include/libadmsslutil/*.h $(PKGDIR)/include/$(INCL_ADMINUTIL)/libadmsslutil # Don't package sslpset.h rm -f $(PKGDIR)/include/$(INCL_ADMINUTIL)/libadmsslutil/sslpset.h - cd $(ADMSERV_OBJDIR)/lib; tar cf - *.* | (cd $(PKGDIR)/lib; tar xf -) + @cd $(ADMSERV_OBJDIR)/lib; tar cf - *.* | (cd $(PKGDIR)/lib; tar xvf -) cp -p $(ADMSERV_OBJDIR)/lib/libadminutil/lib*.res $(PKGDIR)/lib/$(PROP_ADMINUTIL) pkgSBC: From fedora-directory-commits at redhat.com Sat Jan 28 02:30:05 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jan 2006 21:30:05 -0500 Subject: [Fedora-directory-commits] adminutil/lib/libadminutil Makefile, 1.5, 1.6 Message-ID: <200601280230.k0S2UaBN014251@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/adminutil/lib/libadminutil In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14188/lib/libadminutil Modified Files: Makefile Log Message: [Bug 172166] Admin Util build (IPF) 1) Ported onto HP-UX IPF (B.11.23). 2) Upgraded ICU version from 2.4 to 3.4. Index: Makefile =================================================================== RCS file: /cvs/dirsec/adminutil/lib/libadminutil/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile 15 Dec 2005 21:07:44 -0000 1.5 +++ Makefile 28 Jan 2006 02:29:58 -0000 1.6 @@ -26,7 +26,7 @@ MODULE=LibAdminUtil MODULE_CFLAGS= -include ../../nsdefs.mk +include ../../nsconfig.mk OBJLIBDIR=$(OBJDIR)/lib OBJDEST=$(OBJLIBDIR)/libadminutil @@ -58,7 +58,7 @@ LDAPLINK=-L$(LDAP_LIBPATH) $(addprefix -l, $(LDAP_SOLIB_NAMES)) $(addprefix -l, $(LDAP_SSLLIB_NAMES)) endif -DEPLIBS += $(NSPRLINK) $(LDAP_NOSSL_LINK) $(ICULINK) +DEPLIBS += $(NSPRLINK) $(LDAP_NOSSL_LINK) $(ICULINK) $(EXTRA_LIBS) ifeq ($(ARCH), SOLARIS) ifeq ($(NS_USE_NATIVE), 1) From fedora-directory-commits at redhat.com Sat Jan 28 02:33:33 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jan 2006 21:33:33 -0500 Subject: [Fedora-directory-commits] setuputil/installer/unix/lib Makefile, 1.2, 1.3 Message-ID: <200601280233.k0S2XXGZ014308@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/setuputil/installer/unix/lib In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14258/installer/unix/lib Modified Files: Makefile Log Message: [175900] SetupUtil build (IPF) Ported onto HP-UX IPF (B.11.23) Index: Makefile =================================================================== RCS file: /cvs/dirsec/setuputil/installer/unix/lib/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile 19 Jan 2006 23:10:11 -0000 1.2 +++ Makefile 28 Jan 2006 02:33:25 -0000 1.3 @@ -54,26 +54,27 @@ endif ifeq ($(ARCH), HPUX) -ifeq ($(NSOS_RELEASE),B.11.00) -MODERNHP=1 -endif -ifeq ($(NSOS_RELEASE), B.11.11) -MODERNHP=1 -endif - -ifdef MODERNHP -ifeq ($(USE_64), 1) -CURSES=-lHcurses + ifeq ($(NSOS_RELEASE),B.11.00) + OLDHP:=1 + endif + ifeq ($(NSOS_RELEASE), B.11.11) + OLDHP:=1 + endif + +ifdef OLDHP + ifeq ($(USE_64), 1) + CURSES=-lHcurses + else + CFLAGS += -D__HP_CURSES + CURSES=-lHcurses + EXTRA_LIBS+= -ld4r + endif else -CFLAGS += -D__HP_CURSES -CURSES=-lHcurses -EXTRA_LIBS+= -ld4r -endif -else -CURSES=/usr/lib/libcurses.a + CURSES=-lcurses endif + else -CURSES=-lcurses -ltermcap + CURSES=-lcurses -ltermcap endif all: $(LIBDEST) $(OBJDEST) $(OBJS) $(LIBS) $(STAGE) From fedora-directory-commits at redhat.com Sat Jan 28 02:33:22 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jan 2006 21:33:22 -0500 Subject: [Fedora-directory-commits] setuputil nsconfig.mk, 1.4, 1.5 nsdefs.mk, 1.4, 1.5 Message-ID: <200601280233.k0S2XqIR014312@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/setuputil In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14258 Modified Files: nsconfig.mk nsdefs.mk Log Message: [175900] SetupUtil build (IPF) Ported onto HP-UX IPF (B.11.23) Index: nsconfig.mk =================================================================== RCS file: /cvs/dirsec/setuputil/nsconfig.mk,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- nsconfig.mk 19 Jan 2006 23:10:03 -0000 1.4 +++ nsconfig.mk 28 Jan 2006 02:33:14 -0000 1.5 @@ -82,9 +82,13 @@ ifeq ($(NSOS_TEST1),i86pc) NSCONFIG = $(NSOS_ARCH)$(NSOS_RELEASE)_$(NSOS_TEST1) NSCONFIG_NOTAG = $(NSOS_ARCH)$(NSOS_RELEASE_NOTAG)_$(NSOS_TEST1) + endif + ifeq ($(NSOS_ARCH),HP-UX) + NSCONFIG = $(NSOS_ARCH)$(NSOS_RELEASE)_$(NSOS_TEST1) + NSCONFIG_NOTAG = $(NSOS_ARCH)$(NSOS_RELEASE_NOTAG)_$(NSOS_TEST1) else - NSCONFIG = $(NSOS_ARCH)$(NSOS_RELEASE) - NSCONFIG_NOTAG = $(NSOS_ARCH)$(NSOS_RELEASE_NOTAG) + NSCONFIG = $(NSOS_ARCH)$(NSOS_RELEASE) + NSCONFIG_NOTAG = $(NSOS_ARCH)$(NSOS_RELEASE_NOTAG) endif ifeq ($(NSOS_ARCH),WINNT) ifeq ($(DEBUG), fulld) Index: nsdefs.mk =================================================================== RCS file: /cvs/dirsec/setuputil/nsdefs.mk,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- nsdefs.mk 9 Nov 2005 01:56:12 -0000 1.4 +++ nsdefs.mk 28 Jan 2006 02:33:14 -0000 1.5 @@ -61,21 +61,24 @@ BUILD_PTHREADS= endif -ifeq ($(USE_64), 1) - NS64TAG = _64 -else - ifeq ($(BUILD_ARCH), HPUX) - ifeq ($(NSOS_TEST1),ia64) - NS64TAG=_32 - endif - endif -endif - PRETTY_ARCH := $(shell uname -s) NSOS_ARCH := $(subst /,_,$(shell uname -s)) NSOS_TEST1 := $(shell uname -m) +ifeq ($(USE_64), 1) + NS64TAG:=_64 +endif + +ifeq ($(BUILD_ARCH), HPUX) + ifeq ($(NSOS_TEST1),ia64) + ARCHTYPE=_ia64 + ifneq ($(USE_64), 1) + NS64TAG:=_32 + endif + endif +endif + ifeq ($(TMP_ARCH), SunOS) ifeq ($(NSOS_TEST1), i86pc) ARCHTYPE= _i86pc From fedora-directory-commits at redhat.com Sat Jan 28 02:33:27 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jan 2006 21:33:27 -0500 Subject: [Fedora-directory-commits] setuputil/installer/unix Makefile, 1.1.1.1, 1.2 Message-ID: <200601280233.k0S2Xw5h014315@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/setuputil/installer/unix In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14258/installer/unix Modified Files: Makefile Log Message: [175900] SetupUtil build (IPF) Ported onto HP-UX IPF (B.11.23) Index: Makefile =================================================================== RCS file: /cvs/dirsec/setuputil/installer/unix/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile 29 Jul 2005 22:16:30 -0000 1.1.1.1 +++ Makefile 28 Jan 2006 02:33:20 -0000 1.2 @@ -94,26 +94,27 @@ ifeq ($(ARCH), HPUX) -ifeq ($(NSOS_RELEASE),B.11.00) -MODERNHP=1 -endif -ifeq ($(NSOS_RELEASE), B.11.11) -MODERNHP=1 -endif - -ifdef MODERNHP -ifeq ($(USE_64), 1) -CURSES=-lcurses + ifeq ($(NSOS_RELEASE),B.11.00) + OLDHP:=1 + endif + ifeq ($(NSOS_RELEASE), B.11.11) + OLDHP:=1 + endif + +ifdef OLDHP + ifeq ($(USE_64), 1) + CURSES=-lcurses + else + CFLAGS += -D__HP_CURSES + CURSES=-lHcurses + EXTRA_LIBS+= -ld4r + endif else -CFLAGS += -D__HP_CURSES -CURSES=-lHcurses -EXTRA_LIBS+= -ld4r -endif -else -CURSES=/usr/lib/libcurses.a + CURSES:=-lcurses endif + else -CURSES=-lcurses -ltermcap + CURSES:=-lcurses -ltermcap endif From fedora-directory-commits at redhat.com Mon Jan 30 21:53:16 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 16:53:16 -0500 Subject: [Fedora-directory-commits] mod_admserv Makefile.in,1.12,1.13 Message-ID: <200601302153.k0ULrGqf001279@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_admserv In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1207 Modified Files: Makefile.in Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/mod_admserv/Makefile.in,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Makefile.in 7 Dec 2005 02:04:52 -0000 1.12 +++ Makefile.in 30 Jan 2006 21:53:08 -0000 1.13 @@ -68,12 +68,19 @@ AMTAR = @AMTAR@ APR_CONFIG = @APR_CONFIG@ APXS = @APXS@ +AR = @AR@ AS = @AS@ AWK = @AWK@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ +EGREP = @EGREP@ +F77 = @F77@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ @@ -81,6 +88,7 @@ PACKAGE = @PACKAGE@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +RC = @RC@ STRIP = @STRIP@ VERSION = @VERSION@ adminutil_inc = @adminutil_inc@ From fedora-directory-commits at redhat.com Mon Jan 30 21:53:58 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 16:53:58 -0500 Subject: [Fedora-directory-commits] mod_nss Makefile.in,1.13,1.14 Message-ID: <200601302153.k0ULrwQ8001307@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1288 Modified Files: Makefile.in Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/mod_nss/Makefile.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Makefile.in 4 Jan 2006 22:07:57 -0000 1.13 +++ Makefile.in 30 Jan 2006 21:53:51 -0000 1.14 @@ -68,12 +68,19 @@ AMTAR = @AMTAR@ APR_CONFIG = @APR_CONFIG@ APXS = @APXS@ +AR = @AR@ AS = @AS@ AWK = @AWK@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ +EGREP = @EGREP@ +F77 = @F77@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -84,6 +91,7 @@ PACKAGE = @PACKAGE@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +RC = @RC@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ From fedora-directory-commits at redhat.com Mon Jan 30 21:56:13 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 16:56:13 -0500 Subject: [Fedora-directory-commits] mod_restartd Makefile.in,1.5,1.6 Message-ID: <200601302156.k0ULuDaQ001410@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_restartd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1387 Modified Files: Makefile.in Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/mod_restartd/Makefile.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile.in 1 Nov 2005 03:34:20 -0000 1.5 +++ Makefile.in 30 Jan 2006 21:56:05 -0000 1.6 @@ -68,18 +68,26 @@ AMTAR = @AMTAR@ APR_CONFIG = @APR_CONFIG@ APXS = @APXS@ +AR = @AR@ AS = @AS@ AWK = @AWK@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ +EGREP = @EGREP@ +F77 = @F77@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ +RC = @RC@ STRIP = @STRIP@ VERSION = @VERSION@ am__include = @am__include@ From fedora-directory-commits at redhat.com Mon Jan 30 21:57:23 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 16:57:23 -0500 Subject: [Fedora-directory-commits] mod_admserv ltmain.sh,1.1.1.1,1.2 Message-ID: <200601302157.k0ULvNd3001447@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_admserv In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1423 Modified Files: ltmain.sh Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.1.1.1 -r 1.2 ltmain.sh Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/mod_admserv/ltmain.sh,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ltmain.sh 20 Jun 2005 19:26:08 -0000 1.1.1.1 +++ ltmain.sh 30 Jan 2006 21:57:15 -0000 1.2 @@ -1,7 +1,7 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # @@ -17,13 +17,41 @@ # # 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. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.5.23a +TIMESTAMP=" (1.1220.2.375 2006/01/23 18:34:25)" + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. @@ -36,7 +64,7 @@ : else # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$0" --no-reexec ${1+"$@"} + exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then @@ -45,19 +73,9 @@ cat <&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 + $echo "$modename: not configured to build any kind of library" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE fi # Global variables. @@ -99,11 +132,274 @@ show="$echo" show_help= execute_dlfiles= +duplicate_deps=no +preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then [...5571 lines suppressed...] IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then + if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done @@ -4684,40 +6543,72 @@ if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then + if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. - fi + ;; + esac fi ;; *.lo) - if test "$build_old_libs" = yes; then - oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` - rmfiles="$rmfiles $dir/$oldobj" + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi fi ;; *) - # Do a test to see if this is a libtool program. - if test $mode = clean && - (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$file + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi fi fi ;; @@ -4725,6 +6616,7 @@ $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done + objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do @@ -4740,15 +6632,22 @@ "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi fi # test -z "$show_help" +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + # We need to display help for each of the modes. case $mode in "") $echo \ @@ -4765,6 +6664,7 @@ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: @@ -4778,8 +6678,10 @@ uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE." - exit 0 +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS ;; clean) @@ -4890,6 +6792,9 @@ -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries @@ -4931,14 +6836,33 @@ *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac -echo +$echo $echo "Try \`$modename --help' for more information about other modes." -exit 0 +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script From fedora-directory-commits at redhat.com Mon Jan 30 21:57:57 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 16:57:57 -0500 Subject: [Fedora-directory-commits] mod_nss ltmain.sh,1.1.1.1,1.2 Message-ID: <200601302157.k0ULvvv6001475@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1455 Modified Files: ltmain.sh Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.1.1.1 -r 1.2 ltmain.sh Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/mod_nss/ltmain.sh,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ltmain.sh 17 May 2005 14:50:10 -0000 1.1.1.1 +++ ltmain.sh 30 Jan 2006 21:57:49 -0000 1.2 @@ -1,7 +1,7 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # @@ -17,13 +17,41 @@ # # 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. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.5.23a +TIMESTAMP=" (1.1220.2.375 2006/01/23 18:34:25)" + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. @@ -36,7 +64,7 @@ : else # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$0" --no-reexec ${1+"$@"} + exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then @@ -45,19 +73,9 @@ cat <&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 + $echo "$modename: not configured to build any kind of library" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE fi # Global variables. @@ -99,11 +132,274 @@ show="$echo" show_help= execute_dlfiles= +duplicate_deps=no +preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then [...5571 lines suppressed...] IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then + if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done @@ -4684,40 +6543,72 @@ if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then + if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. - fi + ;; + esac fi ;; *.lo) - if test "$build_old_libs" = yes; then - oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` - rmfiles="$rmfiles $dir/$oldobj" + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi fi ;; *) - # Do a test to see if this is a libtool program. - if test $mode = clean && - (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$file + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi fi fi ;; @@ -4725,6 +6616,7 @@ $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done + objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do @@ -4740,15 +6632,22 @@ "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi fi # test -z "$show_help" +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + # We need to display help for each of the modes. case $mode in "") $echo \ @@ -4765,6 +6664,7 @@ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: @@ -4778,8 +6678,10 @@ uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE." - exit 0 +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS ;; clean) @@ -4890,6 +6792,9 @@ -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries @@ -4931,14 +6836,33 @@ *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac -echo +$echo $echo "Try \`$modename --help' for more information about other modes." -exit 0 +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script From fedora-directory-commits at redhat.com Mon Jan 30 21:58:30 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 16:58:30 -0500 Subject: [Fedora-directory-commits] mod_restartd ltmain.sh,1.1,1.2 Message-ID: <200601302158.k0ULwUaM001498@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_restartd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1481 Modified Files: ltmain.sh Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2 ltmain.sh Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/mod_restartd/ltmain.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ltmain.sh 1 Nov 2005 00:58:18 -0000 1.1 +++ ltmain.sh 30 Jan 2006 21:58:23 -0000 1.2 @@ -1,7 +1,7 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # @@ -17,13 +17,41 @@ # # 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. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.5.23a +TIMESTAMP=" (1.1220.2.375 2006/01/23 18:34:25)" + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. @@ -36,7 +64,7 @@ : else # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$0" --no-reexec ${1+"$@"} + exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then @@ -45,19 +73,9 @@ cat <&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 + $echo "$modename: not configured to build any kind of library" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE fi # Global variables. @@ -99,11 +132,274 @@ show="$echo" show_help= execute_dlfiles= +duplicate_deps=no +preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then [...5571 lines suppressed...] IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then + if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done @@ -4684,40 +6543,72 @@ if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" + eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then + if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. - fi + ;; + esac fi ;; *.lo) - if test "$build_old_libs" = yes; then - oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` - rmfiles="$rmfiles $dir/$oldobj" + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi fi ;; *) - # Do a test to see if this is a libtool program. - if test $mode = clean && - (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$file + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi fi fi ;; @@ -4725,6 +6616,7 @@ $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done + objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do @@ -4740,15 +6632,22 @@ "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi fi # test -z "$show_help" +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + # We need to display help for each of the modes. case $mode in "") $echo \ @@ -4765,6 +6664,7 @@ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: @@ -4778,8 +6678,10 @@ uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE." - exit 0 +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS ;; clean) @@ -4890,6 +6792,9 @@ -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries @@ -4931,14 +6836,33 @@ *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac -echo +$echo $echo "Try \`$modename --help' for more information about other modes." -exit 0 +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script From fedora-directory-commits at redhat.com Mon Jan 30 21:59:19 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 16:59:19 -0500 Subject: [Fedora-directory-commits] mod_admserv aclocal.m4,1.5,1.6 Message-ID: <200601302159.k0ULxJw4001531@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_admserv In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1514 Modified Files: aclocal.m4 Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.5 -r 1.6 aclocal.m4 Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/mod_admserv/aclocal.m4,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- aclocal.m4 28 Oct 2005 01:57:54 -0000 1.5 +++ aclocal.m4 30 Jan 2006 21:59:12 -0000 1.6 @@ -756,12 +756,63 @@ Usually this means the macro was only invoked conditionally.]) fi])]) -# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 46 AC_PROG_LIBTOOL +# serial 47 AC_PROG_LIBTOOL + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" @@ -772,10 +823,13 @@ # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) -]) +])# _AC_PROG_LIBTOOL + +# AC_LIBTOOL_SETUP +# ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.13)dnl +[AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl @@ -785,382 +839,221 @@ 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 +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH -# 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 - AC_PATH_MAGIC + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES fi ;; esac -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) +# 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'] -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_SAVE - AC_LANG_C - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_RESTORE]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; +# Constants: +rm="rm -f" -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a [...8046 lines suppressed...] -# top_srcdir appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - 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 - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -]) +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) @@ -4308,6 +6610,16 @@ # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + # 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 # @@ -4321,79 +6633,51 @@ 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 lt_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" + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_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 +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && break + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed 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" +done +SED=$lt_cv_path_SED ]) -if test "X$SED" != "X"; then - lt_cv_path_SED=$SED -else - SED=$lt_cv_path_SED -fi AC_MSG_RESULT([$SED]) ]) From fedora-directory-commits at redhat.com Mon Jan 30 21:59:42 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 16:59:42 -0500 Subject: [Fedora-directory-commits] mod_nss aclocal.m4,1.5,1.6 Message-ID: <200601302159.k0ULxg41001554@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1537 Modified Files: aclocal.m4 Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.5 -r 1.6 aclocal.m4 Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/mod_nss/aclocal.m4,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- aclocal.m4 3 Nov 2005 19:46:24 -0000 1.5 +++ aclocal.m4 30 Jan 2006 21:59:34 -0000 1.6 @@ -756,12 +756,63 @@ Usually this means the macro was only invoked conditionally.]) fi])]) -# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 46 AC_PROG_LIBTOOL +# serial 47 AC_PROG_LIBTOOL + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" @@ -772,10 +823,13 @@ # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) -]) +])# _AC_PROG_LIBTOOL + +# AC_LIBTOOL_SETUP +# ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.13)dnl +[AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl @@ -785,382 +839,221 @@ 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 +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH -# 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 - AC_PATH_MAGIC + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES fi ;; esac -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) +# 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'] -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_SAVE - AC_LANG_C - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_RESTORE]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; +# Constants: +rm="rm -f" -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a [...8046 lines suppressed...] -# top_srcdir appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - 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 - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -]) +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) @@ -4308,6 +6610,16 @@ # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + # 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 # @@ -4321,79 +6633,51 @@ 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 lt_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" + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_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 +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && break + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed 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" +done +SED=$lt_cv_path_SED ]) -if test "X$SED" != "X"; then - lt_cv_path_SED=$SED -else - SED=$lt_cv_path_SED -fi AC_MSG_RESULT([$SED]) ]) From fedora-directory-commits at redhat.com Mon Jan 30 22:00:26 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 17:00:26 -0500 Subject: [Fedora-directory-commits] mod_restartd aclocal.m4,1.4,1.5 Message-ID: <200601302200.k0UM0QQ3001589@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_restartd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1568 Modified Files: aclocal.m4 Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.4 -r 1.5 aclocal.m4 Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/mod_restartd/aclocal.m4,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- aclocal.m4 1 Nov 2005 03:34:20 -0000 1.4 +++ aclocal.m4 30 Jan 2006 22:00:19 -0000 1.5 @@ -756,12 +756,63 @@ Usually this means the macro was only invoked conditionally.]) fi])]) -# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 46 AC_PROG_LIBTOOL +# serial 47 AC_PROG_LIBTOOL + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" @@ -772,10 +823,13 @@ # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) -]) +])# _AC_PROG_LIBTOOL + +# AC_LIBTOOL_SETUP +# ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.13)dnl +[AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl @@ -785,382 +839,221 @@ 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 +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH -# 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 - AC_PATH_MAGIC + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES fi ;; esac -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) +# 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'] -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_SAVE - AC_LANG_C - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_RESTORE]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; +# Constants: +rm="rm -f" -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a [...8046 lines suppressed...] -# top_srcdir appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - 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 - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -]) +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) @@ -4308,6 +6610,16 @@ # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + # 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 # @@ -4321,79 +6633,51 @@ 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 lt_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" + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_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 +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && break + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed 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" +done +SED=$lt_cv_path_SED ]) -if test "X$SED" != "X"; then - lt_cv_path_SED=$SED -else - SED=$lt_cv_path_SED -fi AC_MSG_RESULT([$SED]) ]) From fedora-directory-commits at redhat.com Mon Jan 30 23:11:29 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 18:11:29 -0500 Subject: [Fedora-directory-commits] mod_admserv configure,1.13,1.14 Message-ID: <200601302311.k0UNBUGS006178@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_admserv In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6161 Modified Files: configure Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.13 -r 1.14 configure Index: configure =================================================================== RCS file: /cvs/dirsec/mod_admserv/configure,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- configure 7 Dec 2005 02:04:54 -0000 1.13 +++ configure 30 Jan 2006 23:11:22 -0000 1.14 @@ -1,9 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. +# Generated by GNU Autoconf 2.59. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -20,9 +19,10 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -41,7 +41,7 @@ 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 + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var @@ -218,16 +218,17 @@ if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p 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" +as_tr_cpp="eval 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" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -240,17 +241,6 @@ $as_unset CDPATH -# 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 that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} @@ -269,7 +259,7 @@ elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else @@ -281,7 +271,7 @@ # used as fallback echo shift cat </dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && @@ -325,7 +316,7 @@ break fi done - IFS="$save_ifs" + IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. @@ -399,6 +390,11 @@ + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. @@ -466,7 +462,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc ldapsdk_inc ldapsdk_lib adminutil_inc adminutil_lib adminutil_ver nss_inc nss_lib LIBOBJS LTLIBOBJS' +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 PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc ldapsdk_inc ldapsdk_lib adminutil_inc adminutil_lib adm! inutil_ver nss_inc nss_lib LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -825,7 +821,7 @@ # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir + localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in @@ -865,10 +861,10 @@ # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -927,6 +923,26 @@ ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS # # Report the --help message. @@ -960,9 +976,9 @@ cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in [...19960 lines suppressed...] +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac case $INSTALL in @@ -9632,7 +20949,7 @@ configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -9641,24 +20958,24 @@ case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } _ACEOF @@ -9700,16 +21017,41 @@ 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 || + 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'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. if test "$ac_dir" != .; then @@ -9735,12 +21077,45 @@ 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` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 @@ -9758,10 +21133,10 @@ 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 || + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -9797,10 +21172,10 @@ 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 || + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -9816,10 +21191,10 @@ 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 || + 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; } From fedora-directory-commits at redhat.com Mon Jan 30 23:12:58 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 18:12:58 -0500 Subject: [Fedora-directory-commits] mod_nss configure,1.10,1.11 Message-ID: <200601302312.k0UNCwfH006214@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6197 Modified Files: configure Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.10 -r 1.11 configure Index: configure =================================================================== RCS file: /cvs/dirsec/mod_nss/configure,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- configure 4 Jan 2006 22:07:57 -0000 1.10 +++ configure 30 Jan 2006 23:12:50 -0000 1.11 @@ -1,9 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. +# Generated by GNU Autoconf 2.59. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -20,9 +19,10 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -41,7 +41,7 @@ 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 + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var @@ -218,16 +218,17 @@ if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p 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" +as_tr_cpp="eval 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" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -240,17 +241,6 @@ $as_unset CDPATH -# 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 that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} @@ -269,7 +259,7 @@ elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else @@ -281,7 +271,7 @@ # used as fallback echo shift cat </dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && @@ -325,7 +316,7 @@ break fi done - IFS="$save_ifs" + IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. @@ -399,6 +390,11 @@ + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. @@ -466,7 +462,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL YACC LEX LEXLIB LEX_OUTPUT_ROOT SSL2_TRUE SSL2_FALSE APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc nspr_lib nss_inc nss_lib nspr_dir nss_dir extra_cppflags LIBOBJS LTLIBOBJS' +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 PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL YACC LEX LEXLIB LEX_OUTPUT_ROOT SSL2_TRUE SSL2_FALSE APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc ns! pr_lib nss_inc nss_lib nspr_dir nss_dir extra_cppflags LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -825,7 +821,7 @@ # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir + localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in @@ -865,10 +861,10 @@ # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -927,6 +923,26 @@ ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS # # Report the --help message. @@ -960,9 +976,9 @@ cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in [...19089 lines suppressed...] +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac case $INSTALL in @@ -9831,7 +21179,7 @@ configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -9840,24 +21188,24 @@ case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } _ACEOF @@ -9899,16 +21247,41 @@ 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 || + 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'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. if test "$ac_dir" != .; then @@ -9934,12 +21307,45 @@ 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` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 @@ -9957,10 +21363,10 @@ 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 || + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -9996,10 +21402,10 @@ 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 || + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -10015,10 +21421,10 @@ 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 || + 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; } From fedora-directory-commits at redhat.com Mon Jan 30 23:14:41 2006 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jan 2006 18:14:41 -0500 Subject: [Fedora-directory-commits] mod_restartd configure,1.4,1.5 Message-ID: <200601302314.k0UNEfYM006256@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/mod_restartd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6227 Modified Files: configure Log Message: [179394] HP-UX IPF support autoconf 2.59/libtool 1.5 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.4 -r 1.5 configure Index: configure =================================================================== RCS file: /cvs/dirsec/mod_restartd/configure,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- configure 1 Nov 2005 03:34:20 -0000 1.4 +++ configure 30 Jan 2006 23:14:17 -0000 1.5 @@ -1,9 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. +# Generated by GNU Autoconf 2.59. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -20,9 +19,10 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -41,7 +41,7 @@ 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 + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var @@ -218,16 +218,17 @@ if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p 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" +as_tr_cpp="eval 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" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -240,17 +241,6 @@ $as_unset CDPATH -# 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 that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} @@ -269,7 +259,7 @@ elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else @@ -281,7 +271,7 @@ # used as fallback echo shift cat </dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && @@ -325,7 +316,7 @@ break fi done - IFS="$save_ifs" + IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. @@ -399,6 +390,11 @@ + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. @@ -466,7 +462,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL APR_CONFIG APXS apr_inc apache_inc apache_conf apache_prefix apache_bin LIBOBJS LTLIBOBJS' +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 PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL APR_CONFIG APXS apr_inc apache_inc apache_conf apache_prefix apache_bin LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -825,7 +821,7 @@ # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir + localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in @@ -865,10 +861,10 @@ # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -927,6 +923,26 @@ ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS # # Report the --help message. @@ -960,9 +976,9 @@ cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in [...19960 lines suppressed...] +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac case $INSTALL in @@ -9202,7 +20519,7 @@ configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -9211,24 +20528,24 @@ case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } _ACEOF @@ -9270,16 +20587,41 @@ 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 || + 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'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. if test "$ac_dir" != .; then @@ -9305,12 +20647,45 @@ 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` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 @@ -9328,10 +20703,10 @@ 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 || + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -9367,10 +20742,10 @@ 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 || + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -9386,10 +20761,10 @@ 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 || + 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; } From fedora-directory-commits at redhat.com Tue Jan 31 22:20:59 2006 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 31 Jan 2006 17:20:59 -0500 Subject: [Fedora-directory-commits] mod_admserv Makefile.am, 1.9, 1.10 Makefile.in, 1.13, 1.14 configure.in, 1.11, 1.12 configure, 1.14, 1.15 Message-ID: <200601312220.k0VMKxh5026523@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/mod_admserv In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26504 Modified Files: Makefile.am Makefile.in configure.in configure Log Message: # generated automatically by aclocal 1.9.5 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 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. # 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. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 47 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # 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 AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _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. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string="`eval $cmd`") 2>/dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; 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" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for *BSD fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # -------------------- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _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_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && 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 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) 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" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; 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}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH 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 need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 dll's AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- #- set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [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]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool at gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case "$host_cpu" in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) 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_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link 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 LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will # 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. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link 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 LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If # DIRECTORY is not provided and an installed libltdl is not found, it is # assumed to be `libltdl'. LIBLTDL will 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. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) 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 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # --------------- AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # -------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # # Check for any special shared library compilation flags. # _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= if test "$GCC" = no; then case $host_os in sco3.2v5*) _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' ;; esac fi if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : else AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no fi fi # # Check to make sure the static flag actually works. # AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) # Report which librarie types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cc # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case "$host_cpu" in ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sco*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) symcode='[[BDRT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; sco3.2v5*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= ;; pgf77* | pgf90* ) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= tmp_addflag=' -fpic -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do 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 aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; sco3.2v5*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4.2uw2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv5*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # 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_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) # Copyright (C) 2002, 2003, 2005 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. # 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.9"]) # 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.9.5])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 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. # 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. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # 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. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl 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])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # 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. # 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... # _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 # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub 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 # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # 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. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/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=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi 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], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --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 (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # 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. #serial 3 # _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 # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. 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 " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # 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. # serial 12 # 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. # 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_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 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 # 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_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # 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 AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _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], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. 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)]) # Copyright (C) 2003, 2005 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. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 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. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit 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 ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # 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. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [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 am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 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. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 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. # serial 3 # _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. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # 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. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 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 conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi 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". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_STRIP # --------------------- # 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])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/mod_admserv/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Makefile.am 7 Dec 2005 02:04:52 -0000 1.9 +++ Makefile.am 31 Jan 2006 22:20:52 -0000 1.10 @@ -3,17 +3,21 @@ ## Define the source file for the module libmodadmserv_la_SOURCES = mod_admserv.c +#libmodadmserv_la_LDFLAGS = -module -avoid-version ## Set the includes and libraries needed INCLUDES = -I at apache_inc@ @apr_inc@ @adminutil_inc@ @nspr_inc@ @ldapsdk_inc@ @nss_inc@ -LIBS = @adminutil_lib@ -ladminutil -ladmsslutil @ldapsdk_lib@ -lssldap50 -lprldap50 -lldap50 @nss_lib@ -lssl3 -lnss3 + +LIBS = @adminutil_lib@ -ladminutil at adminutil_ver@ -ladmsslutil at adminutil_ver@ @ldapsdk_lib@ -lssldap50 -lprldap50 -lldap50 @nss_lib@ -lssl3 -lnss3 + +EXTRA_CPPFLAGS=@extra_cppflags@ install-libLTLIBRARIES: libmodadmserv.la @APXS@ -i -a -n admserv libmodadmserv.la LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) + $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/mod_admserv/Makefile.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Makefile.in 30 Jan 2006 21:53:08 -0000 1.13 +++ Makefile.in 31 Jan 2006 22:20:52 -0000 1.14 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.6.3 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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. @@ -13,178 +13,254 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -SHELL = @SHELL@ + +SOURCES = $(libmodadmserv_la_SOURCES) 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 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@ -INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c -INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) -transform = @program_transform_name@ +transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -host_alias = @host_alias@ +build_triplet = @build@ host_triplet = @host@ - -EXEEXT = @EXEEXT@ -OBJEXT = @OBJEXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + install-sh ltmain.sh missing mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libmodadmserv_la_LIBADD = +am_libmodadmserv_la_OBJECTS = mod_admserv.lo +libmodadmserv_la_OBJECTS = $(am_libmodadmserv_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +SOURCES = $(libmodadmserv_la_SOURCES) +DIST_SOURCES = $(libmodadmserv_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ APR_CONFIG = @APR_CONFIG@ APXS = @APXS@ AR = @AR@ -AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ EGREP = @EGREP@ +EXEEXT = @EXEEXT@ F77 = @F77@ -GCJ = @GCJ@ -GCJFLAGS = @GCJFLAGS@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @adminutil_lib@ -ladminutil at adminutil_ver@ -ladmsslutil at adminutil_ver@ @ldapsdk_lib@ -lssldap50 -lprldap50 -lldap50 @nss_lib@ -lssl3 -lnss3 LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ -OBJDUMP = @OBJDUMP@ +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@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ -RC = @RC@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ adminutil_inc = @adminutil_inc@ adminutil_lib = @adminutil_lib@ adminutil_ver = @adminutil_ver@ +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__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ apache_bin = @apache_bin@ apache_conf = @apache_conf@ apache_inc = @apache_inc@ apache_prefix = @apache_prefix@ apr_inc = @apr_inc@ +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@ +extra_cppflags = @extra_cppflags@ +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@ ldapsdk_inc = @ldapsdk_inc@ ldapsdk_lib = @ldapsdk_lib@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ nspr_inc = @nspr_inc@ +nspr_lib = @nspr_lib@ nss_inc = @nss_inc@ nss_lib = @nss_lib@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ lib_LTLIBRARIES = libmodadmserv.la - libmodadmserv_la_SOURCES = mod_admserv.c - +#libmodadmserv_la_LDFLAGS = -module -avoid-version INCLUDES = -I at apache_inc@ @apr_inc@ @adminutil_inc@ @nspr_inc@ @ldapsdk_inc@ @nss_inc@ -LIBS = @adminutil_lib@ -ladminutil -ladmsslutil @ldapsdk_lib@ -lssldap50 -lprldap50 -lldap50 @nss_lib@ -lssl3 -lnss3 - +EXTRA_CPPFLAGS = @extra_cppflags@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) - + $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(lib_LTLIBRARIES) - -libmodadmserv_la_LDFLAGS = -libmodadmserv_la_LIBADD = -am_libmodadmserv_la_OBJECTS = mod_admserv.lo -libmodadmserv_la_OBJECTS = $(am_libmodadmserv_la_OBJECTS) - -DEFS = @DEFS@ -DEFAULT_INCLUDES = -I. -I$(srcdir) -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles - at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/mod_admserv.Plo -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -CFLAGS = @CFLAGS@ -DIST_SOURCES = $(libmodadmserv_la_SOURCES) -DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ - Makefile.in NEWS aclocal.m4 config.guess config.sub configure \ - configure.in depcomp install-sh ltmain.sh missing mkinstalldirs -SOURCES = $(libmodadmserv_la_SOURCES) - all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj - -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; -$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): configure.in +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -libLTLIBRARIES_INSTALL = $(INSTALL) uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @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; \ + @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done 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 -z "$dir" && dir=.; \ + test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done @@ -192,34 +268,33 @@ $(LINK) -rpath $(libdir) $(libmodadmserv_la_LDFLAGS) $(libmodadmserv_la_OBJECTS) $(libmodadmserv_la_LIBADD) $(LIBS) mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mod_admserv.Plo at am__quote@ -distclean-depend: - -rm -rf ./$(DEPDIR) - .c.o: - at AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ - at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + at am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: - at AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ - at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(COMPILE) -c `cygpath -w $<` + at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: - at AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ - at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ - at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< -CCDEPMODE = @CCDEPMODE@ + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + at am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -231,11 +306,6 @@ -rm -f libtool uninstall-info-am: -ETAGS = etags -ETAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -244,6 +314,7 @@ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -255,8 +326,24 @@ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +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: @@ -265,29 +352,23 @@ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = . -distdir = $(PACKAGE)-$(VERSION) - -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } - -GZIP_ENV = --best -distcleancheck_listfiles = find . -type f -print + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - @list='$(DISTFILES)'; for file in $$list; do \ + @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"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -308,26 +389,54 @@ ! -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 + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | 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 - + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/=build - mkdir $(distdir)/=inst + mkdir $(distdir)/_build + mkdir $(distdir)/_inst chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ - && cd $(distdir)/=build \ - && ../configure --srcdir=.. --prefix=$$dc_install_base \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && 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 \ @@ -335,32 +444,49 @@ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - find $$dc_install_base -type f -print ; \ - exit 1; } >&2 ) \ - && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ - && rm -f $(distdir).tar.gz \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$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 \ + && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) - @echo "$(distdir).tar.gz is ready for distribution" | \ - sed 'h;s/./=/g;p;x;p;x' + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${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 \ + @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 after distclean:" ; \ + @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-am all-am: Makefile $(LTLIBRARIES) - installdirs: - $(mkinstalldirs) $(DESTDIR)$(libdir) - + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -372,7 +498,7 @@ installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -380,7 +506,7 @@ clean-generic: distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -392,13 +518,17 @@ distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -distclean-am: clean-am distclean-compile distclean-depend \ - distclean-generic distclean-libtool distclean-tags + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -415,7 +545,9 @@ maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf autom4te.cache + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am @@ -423,20 +555,30 @@ mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES -.PHONY: GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool dist dist-all dist-gzip \ - distcheck distclean distclean-compile distclean-depend \ - distclean-generic distclean-libtool distclean-tags \ - distcleancheck distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \ + dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ install-exec-am 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 tags uninstall \ - uninstall-am uninstall-info-am uninstall-libLTLIBRARIES + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-libLTLIBRARIES install-libLTLIBRARIES: libmodadmserv.la Index: configure.in =================================================================== RCS file: /cvs/dirsec/mod_admserv/configure.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- configure.in 7 Dec 2005 02:04:54 -0000 1.11 +++ configure.in 31 Jan 2006 22:20:52 -0000 1.12 @@ -26,17 +26,22 @@ then AC_MSG_RESULT([using $withval]) APR_CONFIG=$withval - else - AC_PATH_PROG(APR_CONFIG, apr-config) - fi - if test -n "$APR_CONFIG"; then - apr_inc=`$APR_CONFIG --includes` - else - AC_MSG_ERROR([apr-config not found]) fi ], AC_MSG_RESULT(no)) +if test -z "$APR_CONFIG" ; then + AC_MSG_CHECKING(for apr-1-config and apr-config) + AC_PATH_PROGS(APR_CONFIG, apr-1-config apr-config, NO_APR_CONFIG, [$PATH:/usr/local/apache/sbin:/usr/sbin]) +fi + +if test -n "$APR_CONFIG"; then + AC_MSG_RESULT([using $APR_CONFIG. Use --with-apr-config to specify another.]) + apr_inc=`$APR_CONFIG --includes` +else + AC_MSG_ERROR([neither apr-config nor apr-1-config were not found. use --with-apr-config to specify it.]) +fi + AC_CHECKING(for apxs) # check for --with-apxs @@ -58,29 +63,17 @@ # since it's the default Apache location if test -z "$APXS"; then AC_MSG_CHECKING(for apxs in /usr/local/apache/sbin and /usr/sbin) - if test -x /usr/local/apache/sbin/apxs; then - APXS=/usr/local/apache/sbin/apxs - AC_MSG_RESULT([found $APXS. Use --with-apxs to specify another.]) - elif test -x /usr/sbin/apxs; then - APXS=/usr/sbin/apxs + AC_PATH_PROG(APXS, apxs, NO_APXS, [/usr/local/apache/sbin:/usr/sbin:$PATH]) + if test -x $APXS; then AC_MSG_RESULT([found $APXS. Use --with-apxs to specify another.]) else AC_MSG_RESULT(no) fi fi -# last resort -if test -z "$APXS"; then - AC_MSG_CHECKING(for apxs in your PATH) - AC_PATH_PROG(APXS, apxs) - if test -n "$APXS"; then - AC_MSG_RESULT([found $APXS. Use --with-apxs to specify another.]) - fi -fi - # and finally if test -z "$APXS"; then - AC_MSG_ERROR([apxs was not found. use --with-apxs to specifiy it.]) + AC_MSG_ERROR([apxs was not found. use --with-apxs to specify it.]) fi # Get some variables we need for Makefile.in @@ -88,6 +81,7 @@ apache_conf=`$APXS -q SYSCONFDIR` apache_prefix=`$APXS -q PREFIX` apache_bin=`$APXS -q SBINDIR` +extra_cppflags=`$APXS -q EXTRA_CPPFLAGS` if ! test -f "$apache_inc/apr.h"; then if test -z "$apr_inc"; then @@ -209,6 +203,21 @@ ], AC_MSG_RESULT(no)) +# if LDAPSDK is not found yet, try pkg-config + +# last resort +if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib"; then + AC_MSG_CHECKING(for mozldap with pkg-config) + AC_PATH_PROG(PKG_CONFIG, pkg-config) + if test -n "$PKG_CONFIG"; then + if $PKG_CONFIG --exists mozldap; then + nspr_inc=`$PKG_CONFIG --cflags-only-I mozldap` + nspr_lib=`$PKG_CONFIG --libs-only-L mozldap` + else + AC_MSG_ERROR([LDAPSDK not found, specify with --with-ldapsdk[-inc|-lib].]) + fi + fi +fi if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib"; then AC_MSG_ERROR([LDAPSDK not found, specify with --with-ldapsdk[-inc|-lib].]) fi @@ -219,19 +228,24 @@ AC_MSG_CHECKING(for --with-adminutil) AC_ARG_WITH(adminutil, [ --with-adminutil=PATH Adminutil directory], [ - if test -e "$withval"/include/*/libadminutil/admutil.h -a -d "$withval"/lib + if test -d "$withval"/include -a -d "$withval"/lib then AC_MSG_RESULT([using $withval]) ADMINUTILDIR=$withval adminutil_lib="-L$ADMINUTILDIR/lib" + # check for version - only needed for older adminutil versions for file in $ADMINUTILDIR/lib/* ; do - echo $file | grep 'libadminutil[0-9][0-9]' && adminutil_ver=`echo $file | sed -e 's/.*libadminutil\..*\.\([0-9]*\.[0-9]*\).*/\1/'` ; break + echo $file | grep 'libadminutil[[0-9][0-9]]' && adminutil_ver=`echo $file | sed -e 's/.*libadminutil\([[0-9][0-9]]\).*/\1/'` ; break done - if test -z "$adminutil_ver" - then - adminutil_ver=1.0 + # use the latest one + adminutil_incdir=`ls -1d $ADMINUTILDIR/include/adminutil-* | sort -n | tail -1` + if ! test -n "$adminutil_incdir" -a -d "$adminutil_incdir" ; then + adminutil_incdir=$ADMINUTILDIR/include fi - adminutil_inc="-I$ADMINUTILDIR/include/adminutil-$adminutil_ver" + if ! test -e "$adminutil_incdir/libadminutil/admutil.h" ; then + AC_MSG_ERROR([$withval include dir not found]) + fi + adminutil_inc="-I$adminutil_incdir" else echo AC_MSG_ERROR([$withval not found]) @@ -239,7 +253,23 @@ ], AC_MSG_RESULT(no)) -if test -z "$ADMINUTILDIR"; then +# if ADMINUTIL is not found yet, try pkg-config + +# last resort +if test -z "$adminutil_inc" -o -z "$adminutil_lib"; then + AC_MSG_CHECKING(for adminutil with pkg-config) + AC_PATH_PROG(PKG_CONFIG, pkg-config) + if test -n "$PKG_CONFIG"; then + if $PKG_CONFIG --exists adminutil; then + adminutil_inc=`$PKG_CONFIG --cflags-only-I adminutil` + adminutil_lib=`$PKG_CONFIG --libs-only-L adminutil` + else + AC_MSG_ERROR([ADMINUTIL not found, specify with --with-adminutil.]) + fi + fi +fi + +if test -z "$adminutil_inc" -o -z "$adminutil_lib"; then AC_MSG_ERROR([ADMINUTIL not found, specify with --with-adminutil.]) fi @@ -316,6 +346,7 @@ AC_SUBST(apache_prefix) AC_SUBST(apache_bin) AC_SUBST(nspr_inc) +AC_SUBST(nspr_lib) AC_SUBST(ldapsdk_inc) AC_SUBST(ldapsdk_lib) AC_SUBST(adminutil_inc) @@ -323,6 +354,7 @@ AC_SUBST(adminutil_ver) AC_SUBST(nss_inc) AC_SUBST(nss_lib) +AC_SUBST(extra_cppflags) # Write config.status and the Makefile AC_OUTPUT(Makefile) View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.14 -r 1.15 configure Index: configure =================================================================== RCS file: /cvs/dirsec/mod_admserv/configure,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- configure 30 Jan 2006 23:11:22 -0000 1.14 +++ configure 31 Jan 2006 22:20:52 -0000 1.15 @@ -278,7 +278,7 @@ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then @@ -462,7 +462,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc ldapsdk_inc ldapsdk_lib adminutil_inc adminutil_lib adm! inutil_ver nss_inc nss_lib LIBOBJS LTLIBOBJS' +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 install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL APR_CONFIG APXS! PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc nspr_lib ldapsdk_inc ldapsdk_lib adminutil_inc adminutil_lib adminutil_ver nss_inc nss_lib extra_cppflags LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1022,8 +1022,8 @@ 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 + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] @@ -1507,7 +1507,7 @@ # Automake initialization -am__api_version="1.6" +am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1670,7 +1670,6 @@ program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed - # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -1684,6 +1683,39 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +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. @@ -1753,7 +1785,16 @@ SET_MAKE="MAKE=${MAKE-make}" fi - # test to see if srcdir already configured +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# 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 @@ -1761,6 +1802,16 @@ { (exit 1); exit 1; }; } fi +# 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=mod_admserv VERSION=1.0 @@ -1791,9 +1842,6 @@ 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 @@ -1886,6 +1934,13 @@ # We need awk for the "check" target. The system "awk" is bad on # some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + @@ -2820,24 +2875,16 @@ 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 - +DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' -doit: +am__doit: @echo done +.PHONY: am__doit 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 @@ -2852,7 +2899,7 @@ # 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 | fgrep -v 'ing directory'`" = "done"; then +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU @@ -2912,18 +2959,34 @@ # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. [...3446 lines suppressed...] echo { { echo "$as_me:$LINENO: error: $withval not found" >&5 @@ -19880,7 +20559,64 @@ echo "${ECHO_T}no" >&6 fi; -if test -z "$ADMINUTILDIR"; then +# if ADMINUTIL is not found yet, try pkg-config + +# last resort +if test -z "$adminutil_inc" -o -z "$adminutil_lib"; then + echo "$as_me:$LINENO: checking for adminutil with pkg-config" >&5 +echo $ECHO_N "checking for adminutil with pkg-config... $ECHO_C" >&6 + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test -n "$PKG_CONFIG"; then + if $PKG_CONFIG --exists adminutil; then + adminutil_inc=`$PKG_CONFIG --cflags-only-I adminutil` + adminutil_lib=`$PKG_CONFIG --libs-only-L adminutil` + else + { { echo "$as_me:$LINENO: error: ADMINUTIL not found, specify with --with-adminutil." >&5 +echo "$as_me: error: ADMINUTIL not found, specify with --with-adminutil." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi + +if test -z "$adminutil_inc" -o -z "$adminutil_lib"; then { { echo "$as_me:$LINENO: error: ADMINUTIL not found, specify with --with-adminutil." >&5 echo "$as_me: error: ADMINUTIL not found, specify with --with-adminutil." >&2;} { (exit 1); exit 1; }; } @@ -20039,6 +20775,8 @@ + + # Write config.status and the Makefile ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF @@ -20170,6 +20908,20 @@ 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 +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 : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -20698,6 +21450,7 @@ s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s, at INSTALL_DATA@,$INSTALL_DATA,;t t +s, at CYGPATH_W@,$CYGPATH_W,;t t s, at PACKAGE@,$PACKAGE,;t t s, at VERSION@,$VERSION,;t t s, at ACLOCAL@,$ACLOCAL,;t t @@ -20705,13 +21458,17 @@ s, at AUTOMAKE@,$AUTOMAKE,;t t s, at AUTOHEADER@,$AUTOHEADER,;t t s, at MAKEINFO@,$MAKEINFO,;t t -s, at AMTAR@,$AMTAR,;t t s, at install_sh@,$install_sh,;t t s, at STRIP@,$STRIP,;t t s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s, at mkdir_p@,$mkdir_p,;t t s, at AWK@,$AWK,;t t s, at SET_MAKE@,$SET_MAKE,;t t +s, at am__leading_dot@,$am__leading_dot,;t t +s, at AMTAR@,$AMTAR,;t t +s, at am__tar@,$am__tar,;t t +s, at am__untar@,$am__untar,;t t s, at CC@,$CC,;t t s, at CFLAGS@,$CFLAGS,;t t s, at LDFLAGS@,$LDFLAGS,;t t @@ -20726,6 +21483,8 @@ s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s, at CCDEPMODE@,$CCDEPMODE,;t t +s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s, at build@,$build,;t t s, at build_cpu@,$build_cpu,;t t s, at build_vendor@,$build_vendor,;t t @@ -20746,6 +21505,8 @@ s, at CXXFLAGS@,$CXXFLAGS,;t t s, at ac_ct_CXX@,$ac_ct_CXX,;t t s, at CXXDEPMODE@,$CXXDEPMODE,;t t +s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s, at CXXCPP@,$CXXCPP,;t t s, at F77@,$F77,;t t s, at FFLAGS@,$FFLAGS,;t t @@ -20760,6 +21521,7 @@ s, at apache_prefix@,$apache_prefix,;t t s, at apache_bin@,$apache_bin,;t t s, at nspr_inc@,$nspr_inc,;t t +s, at nspr_lib@,$nspr_lib,;t t s, at ldapsdk_inc@,$ldapsdk_inc,;t t s, at ldapsdk_lib@,$ldapsdk_lib,;t t s, at adminutil_inc@,$adminutil_inc,;t t @@ -20767,6 +21529,7 @@ s, at adminutil_ver@,$adminutil_ver,;t t s, at nss_inc@,$nss_inc,;t t s, at nss_lib@,$nss_lib,;t t +s, at extra_cppflags@,$extra_cppflags,;t t s, at LIBOBJS@,$LIBOBJS,;t t s, at LTLIBOBJS@,$LTLIBOBJS,;t t CEOF @@ -21146,27 +21909,21 @@ 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"` + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # 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" | \ + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. 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 " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue From fedora-directory-commits at redhat.com Tue Jan 31 22:23:30 2006 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 31 Jan 2006 17:23:30 -0500 Subject: [Fedora-directory-commits] mod_admserv aclocal.m4, 1.6, 1.7 Makefile.am, 1.10, 1.11 Makefile.in, 1.14, 1.15 configure.in, 1.12, 1.13 configure, 1.15, 1.16 Message-ID: <200601312223.k0VMNUe5026563@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/mod_admserv In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26538 Modified Files: aclocal.m4 Makefile.am Makefile.in configure.in configure Log Message: Bug(s) fixed: 178818 Bug Description: Admin Server modules must support Apache 2.2 Reviewed by: Noriko, Pete, Nathan (Thanks!) Fix Description: We needed to get the extra_cppflags from apxs to pass to the compiler in order to build with Apache 2.2. Rob already did this for mod_nss so I just ported his changes to mod_admserv and mod_restartd. Apache 2.2 uses apr-1-config, not apr-config (let's hope they don't change apr versions too often . . .) so I changed configure.in look first for apr-1-config then apr-config. Finally, you no longer have to specify --with-apxs or --with-apr-config to configure - configure will attempt to find them automatically, and this should just work on almost any linux system. The biggest change is with mod_restartd - I had to take mod_cgid.c from Apache 2.2 and merge it with mod_restartd.c to create a new mod_restartd-2.2.c. I also copied over mod_suexec.h and mod_include.h to mod_suexec-2.2.h and mod_include-2.2.h. I changed the configure.in to assume if the user is using apr 1.x, this is Apache 2.2, if apr 0.9.x, this is Apache 2.0, and anything else is not supported. Platforms tested: Fedora Core 4 (Need a Fedora Core 5 machine) Flag Day: no Doc impact: no View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.6 -r 1.7 aclocal.m4 Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/mod_admserv/aclocal.m4,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- aclocal.m4 30 Jan 2006 21:59:12 -0000 1.6 +++ aclocal.m4 31 Jan 2006 22:23:22 -0000 1.7 @@ -1,7 +1,7 @@ -# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- +# generated automatically by aclocal 1.9.5 -*- Autoconf -*- -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 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. @@ -11,2470 +11,1809 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Do all the work for Automake. -*- Autoconf -*- - -# 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. - -# 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. +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# 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. +# serial 47 AC_PROG_LIBTOOL -# 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 +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) -# 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_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) -AC_PREREQ([2.52]) +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL -# 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([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 +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl -# 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 +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)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 +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL -_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 -]) -]) -# Copyright 2002 Free Software Foundation, Inc. +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl -# 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. +AC_REQUIRE([AC_PROG_LN_S])dnl [...7698 lines suppressed...] +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 conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + 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". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 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. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# 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])]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 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. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break done - done -done -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done done -SED=$lt_cv_path_SED -]) -AC_MSG_RESULT([$SED]) -]) +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR From fedora-directory-commits at redhat.com Tue Jan 31 22:27:17 2006 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 31 Jan 2006 17:27:17 -0500 Subject: [Fedora-directory-commits] mod_nss aclocal.m4, 1.6, 1.7 configure, 1.11, 1.12 Makefile.in, 1.14, 1.15 configure.in, 1.7, 1.8 Message-ID: <200601312227.k0VMRHlS026648@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26626 Modified Files: aclocal.m4 configure Makefile.in configure.in Log Message: Make configure automatically find the correct versions of apr-config and apxs View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.6 -r 1.7 aclocal.m4 Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/mod_nss/aclocal.m4,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- aclocal.m4 30 Jan 2006 21:59:34 -0000 1.6 +++ aclocal.m4 31 Jan 2006 22:27:09 -0000 1.7 @@ -1,7 +1,7 @@ -# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- +# generated automatically by aclocal 1.9.5 -*- Autoconf -*- -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 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. @@ -11,2470 +11,1809 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Do all the work for Automake. -*- Autoconf -*- - -# 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. - -# 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. +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# 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. +# serial 47 AC_PROG_LIBTOOL -# 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 +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) -# 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_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) -AC_PREREQ([2.52]) +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL -# 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([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 +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl -# 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 +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)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 +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL -_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 -]) -]) -# Copyright 2002 Free Software Foundation, Inc. +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl -# 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. +AC_REQUIRE([AC_PROG_LN_S])dnl [...7698 lines suppressed...] +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 conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + 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". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 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. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# 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])]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 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. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break done - done -done -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done done -SED=$lt_cv_path_SED -]) -AC_MSG_RESULT([$SED]) -]) +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.11 -r 1.12 configure Index: configure =================================================================== RCS file: /cvs/dirsec/mod_nss/configure,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- configure 30 Jan 2006 23:12:50 -0000 1.11 +++ configure 31 Jan 2006 22:27:09 -0000 1.12 @@ -278,7 +278,7 @@ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then @@ -462,7 +462,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL YACC LEX LEXLIB LEX_OUTPUT_ROOT SSL2_TRUE SSL2_FALSE APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc ns! pr_lib nss_inc nss_lib nspr_dir nss_dir extra_cppflags LIBOBJS LTLIBOBJS' +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 install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL YACC LEX LEXLIB! LEX_OUTPUT_ROOT SSL2_TRUE SSL2_FALSE APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc nspr_lib nss_inc nss_lib nspr_dir nss_dir extra_cppflags LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1022,8 +1022,8 @@ 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 + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] @@ -1041,8 +1041,8 @@ both] --with-tags[=TAGS] include additional configurations [automatic] - --with-apr-config Use apr-config to determine the APR directory - --with-apxs=PATH Path to apxs + --with-apr-config Use apr-config to determine the APR directory + --with-apxs=PATH Path to apxs --with-nspr=PATH Netscape Portable Runtime (NSPR) directory --with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include file directory --with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory @@ -1504,7 +1504,7 @@ # Automake initialization -am__api_version="1.6" +am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1667,7 +1667,6 @@ program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed - # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -1681,6 +1680,39 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +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. @@ -1750,7 +1782,16 @@ SET_MAKE="MAKE=${MAKE-make}" fi - # test to see if srcdir already configured +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# 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 @@ -1758,6 +1799,16 @@ { (exit 1); exit 1; }; } fi +# 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=mod_nss VERSION=1.0 @@ -1788,9 +1839,6 @@ 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 @@ -1883,6 +1931,13 @@ # We need awk for the "check" target. The system "awk" is bad on # some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + @@ -2817,24 +2872,16 @@ 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 - +DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' -doit: +am__doit: @echo done +.PHONY: am__doit 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 @@ -2849,7 +2896,7 @@ # 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 | fgrep -v 'ing directory'`" = "done"; then +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= [...3250 lines suppressed...] - apr_inc=`$APR_CONFIG --includes` - else - { { echo "$as_me:$LINENO: error: apr-config not found" >&5 -echo "$as_me: error: apr-config not found" >&2;} - { (exit 1); exit 1; }; } - fi + test -n "$APR_CONFIG" && break +done +test -n "$APR_CONFIG" || APR_CONFIG="NO_APR_CONFIG" + +fi +if test -n "$APR_CONFIG"; then + echo "$as_me:$LINENO: result: using $APR_CONFIG. Use --with-apr-config to specify another." >&5 +echo "${ECHO_T}using $APR_CONFIG. Use --with-apr-config to specify another." >&6 + apr_inc=`$APR_CONFIG --includes` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi; + { { echo "$as_me:$LINENO: error: neither apr-config nor apr-1-config were not found. use --with-apr-config to specify it." >&5 +echo "$as_me: error: neither apr-config nor apr-1-config were not found. use --with-apr-config to specify it." >&2;} + { (exit 1); exit 1; }; } +fi { echo "$as_me:$LINENO: checking for apxs..." >&5 echo "$as_me: checking for apxs..." >&6;} @@ -19878,24 +20506,6 @@ if test -z "$APXS"; then echo "$as_me:$LINENO: checking for apxs in /usr/local/apache/sbin and /usr/sbin" >&5 echo $ECHO_N "checking for apxs in /usr/local/apache/sbin and /usr/sbin... $ECHO_C" >&6 - if test -x /usr/local/apache/sbin/apxs; then - APXS=/usr/local/apache/sbin/apxs - echo "$as_me:$LINENO: result: found $APXS. Use --with-apxs to specify another." >&5 -echo "${ECHO_T}found $APXS. Use --with-apxs to specify another." >&6 - elif test -x /usr/sbin/apxs; then - APXS=/usr/sbin/apxs - echo "$as_me:$LINENO: result: found $APXS. Use --with-apxs to specify another." >&5 -echo "${ECHO_T}found $APXS. Use --with-apxs to specify another." >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi -fi - -# last resort -if test -z "$APXS"; then - echo "$as_me:$LINENO: checking for apxs in your PATH" >&5 -echo $ECHO_N "checking for apxs in your PATH... $ECHO_C" >&6 # Extract the first word of "apxs", so it can be a program name with args. set dummy apxs; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -19909,7 +20519,8 @@ ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH +as_dummy="/usr/local/apache/sbin:/usr/sbin:$PATH" +for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -19922,6 +20533,7 @@ done done + test -z "$ac_cv_path_APXS" && ac_cv_path_APXS="NO_APXS" ;; esac fi @@ -19935,16 +20547,19 @@ echo "${ECHO_T}no" >&6 fi - if test -n "$APXS"; then + if test -x $APXS; then echo "$as_me:$LINENO: result: found $APXS. Use --with-apxs to specify another." >&5 echo "${ECHO_T}found $APXS. Use --with-apxs to specify another." >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi # and finally if test -z "$APXS"; then - { { echo "$as_me:$LINENO: error: apxs was not found. use --with-apxs to specifiy it." >&5 -echo "$as_me: error: apxs was not found. use --with-apxs to specifiy it." >&2;} + { { echo "$as_me:$LINENO: error: apxs was not found. use --with-apxs to specify it." >&5 +echo "$as_me: error: apxs was not found. use --with-apxs to specify it." >&2;} { (exit 1); exit 1; }; } fi @@ -20386,6 +21001,20 @@ 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 +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 "${SSL2_TRUE}" && test -z "${SSL2_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SSL2\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -20923,6 +21552,7 @@ s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s, at INSTALL_DATA@,$INSTALL_DATA,;t t +s, at CYGPATH_W@,$CYGPATH_W,;t t s, at PACKAGE@,$PACKAGE,;t t s, at VERSION@,$VERSION,;t t s, at ACLOCAL@,$ACLOCAL,;t t @@ -20930,13 +21560,17 @@ s, at AUTOMAKE@,$AUTOMAKE,;t t s, at AUTOHEADER@,$AUTOHEADER,;t t s, at MAKEINFO@,$MAKEINFO,;t t -s, at AMTAR@,$AMTAR,;t t s, at install_sh@,$install_sh,;t t s, at STRIP@,$STRIP,;t t s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s, at mkdir_p@,$mkdir_p,;t t s, at AWK@,$AWK,;t t s, at SET_MAKE@,$SET_MAKE,;t t +s, at am__leading_dot@,$am__leading_dot,;t t +s, at AMTAR@,$AMTAR,;t t +s, at am__tar@,$am__tar,;t t +s, at am__untar@,$am__untar,;t t s, at CC@,$CC,;t t s, at CFLAGS@,$CFLAGS,;t t s, at LDFLAGS@,$LDFLAGS,;t t @@ -20951,6 +21585,8 @@ s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s, at CCDEPMODE@,$CCDEPMODE,;t t +s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s, at build@,$build,;t t s, at build_cpu@,$build_cpu,;t t s, at build_vendor@,$build_vendor,;t t @@ -20971,6 +21607,8 @@ s, at CXXFLAGS@,$CXXFLAGS,;t t s, at ac_ct_CXX@,$ac_ct_CXX,;t t s, at CXXDEPMODE@,$CXXDEPMODE,;t t +s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s, at CXXCPP@,$CXXCPP,;t t s, at F77@,$F77,;t t s, at FFLAGS@,$FFLAGS,;t t @@ -21376,27 +22014,21 @@ 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"` + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # 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" | \ + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. 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 " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/mod_nss/Makefile.in,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Makefile.in 30 Jan 2006 21:53:51 -0000 1.14 +++ Makefile.in 31 Jan 2006 22:27:09 -0000 1.15 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.6.3 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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. @@ -13,235 +13,293 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -SHELL = @SHELL@ + + +SOURCES = $(libmodnss_la_SOURCES) $(nss_pcache_SOURCES) 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 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@ -INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c -INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) -transform = @program_transform_name@ +transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -host_alias = @host_alias@ +build_triplet = @build@ host_triplet = @host@ - -EXEEXT = @EXEEXT@ -OBJEXT = @OBJEXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ +bin_PROGRAMS = nss_pcache$(EXEEXT) +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/gencert.in \ + $(srcdir)/nss.conf.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS TODO config.guess config.sub depcomp \ + install-sh ltmain.sh missing mkinstalldirs nss_expr_parse.c \ + nss_expr_scan.c +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = nss.conf gencert +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libmodnss_la_LIBADD = +am_libmodnss_la_OBJECTS = mod_nss.lo nss_engine_config.lo \ + nss_engine_init.lo nss_engine_io.lo nss_engine_kernel.lo \ + nss_engine_log.lo nss_engine_pphrase.lo nss_engine_vars.lo \ + nss_expr.lo nss_expr_eval.lo nss_expr_parse.lo \ + nss_expr_scan.lo nss_util.lo nss_engine_rand.lo +libmodnss_la_OBJECTS = $(am_libmodnss_la_OBJECTS) +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_nss_pcache_OBJECTS = nss_pcache.$(OBJEXT) +nss_pcache_OBJECTS = $(am_nss_pcache_OBJECTS) +nss_pcache_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I. -I$(srcdir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) +YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ + $(AM_YFLAGS) +SOURCES = $(libmodnss_la_SOURCES) $(nss_pcache_SOURCES) +DIST_SOURCES = $(libmodnss_la_SOURCES) $(nss_pcache_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ APR_CONFIG = @APR_CONFIG@ APXS = @APXS@ AR = @AR@ -AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ EGREP = @EGREP@ +EXEEXT = @EXEEXT@ F77 = @F77@ -GCJ = @GCJ@ -GCJFLAGS = @GCJFLAGS@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @nspr_lib@ @nss_lib@ -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lplc4 -lplds4 -lnspr4 LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ -OBJDUMP = @OBJDUMP@ +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@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ -RC = @RC@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SSL2_FALSE = @SSL2_FALSE@ +SSL2_TRUE = @SSL2_TRUE@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ apache_bin = @apache_bin@ apache_conf = @apache_conf@ apache_inc = @apache_inc@ apache_prefix = @apache_prefix@ apr_inc = @apr_inc@ +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@ extra_cppflags = @extra_cppflags@ +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@ +mkdir_p = @mkdir_p@ nspr_dir = @nspr_dir@ nspr_inc = @nspr_inc@ nspr_lib = @nspr_lib@ nss_dir = @nss_dir@ nss_inc = @nss_inc@ nss_lib = @nss_lib@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ lib_LTLIBRARIES = libmodnss.la - -bin_PROGRAMS = nss_pcache - nss_pcache_SOURCES = nss_pcache.c - libmodnss_la_SOURCES = mod_nss.c nss_engine_config.c nss_engine_init.c nss_engine_io.c nss_engine_kernel.c nss_engine_log.c nss_engine_pphrase.c nss_engine_vars.c nss_expr.c nss_expr_eval.c nss_expr_parse.y nss_expr_scan.l nss_util.c nss_engine_rand.c libmodnss_la_LDFLAGS = -module -avoid-version - INCLUDES = -I at apache_inc@ @nspr_inc@ @nss_inc@ @apr_inc@ -LIBS = @nspr_lib@ @nss_lib@ -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lplc4 -lplds4 -lnspr4 @SSL2_TRUE at AM_CFLAGS = -DWANT_SSL2 EXTRA_CPPFLAGS = @extra_cppflags@ - LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) - LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = nss.conf gencert -LTLIBRARIES = $(lib_LTLIBRARIES) - -libmodnss_la_LIBADD = -am_libmodnss_la_OBJECTS = mod_nss.lo nss_engine_config.lo \ - nss_engine_init.lo nss_engine_io.lo nss_engine_kernel.lo \ - nss_engine_log.lo nss_engine_pphrase.lo nss_engine_vars.lo \ - nss_expr.lo nss_expr_eval.lo nss_expr_parse.lo nss_expr_scan.lo \ - nss_util.lo nss_engine_rand.lo -libmodnss_la_OBJECTS = $(am_libmodnss_la_OBJECTS) -bin_PROGRAMS = nss_pcache$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) - -am_nss_pcache_OBJECTS = nss_pcache.$(OBJEXT) -nss_pcache_OBJECTS = $(am_nss_pcache_OBJECTS) -nss_pcache_LDADD = $(LDADD) -nss_pcache_DEPENDENCIES = -nss_pcache_LDFLAGS = - -DEFS = @DEFS@ -DEFAULT_INCLUDES = -I. -I$(srcdir) -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles - at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/mod_nss.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_engine_config.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_engine_init.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_engine_io.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_engine_kernel.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_engine_log.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_engine_pphrase.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_engine_rand.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_engine_vars.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_expr.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_expr_eval.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_expr_parse.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_expr_scan.Plo \ - at AMDEP_TRUE@ ./$(DEPDIR)/nss_pcache.Po ./$(DEPDIR)/nss_util.Plo -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -CFLAGS = @CFLAGS@ -LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) -LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS) -DIST_SOURCES = $(libmodnss_la_SOURCES) $(nss_pcache_SOURCES) -DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ - Makefile.in NEWS TODO aclocal.m4 config.guess config.sub \ - configure configure.in depcomp gencert.in install-sh ltmain.sh \ - missing mkinstalldirs nss.conf.in nss_expr_parse.c \ - nss_expr_scan.c -SOURCES = $(libmodnss_la_SOURCES) $(nss_pcache_SOURCES) - all: all-am .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj .y - -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; -$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): configure.in +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -nss.conf: $(top_builddir)/config.status nss.conf.in +nss.conf: $(top_builddir)/config.status $(srcdir)/nss.conf.in cd $(top_builddir) && $(SHELL) ./config.status $@ -gencert: $(top_builddir)/config.status gencert.in +gencert: $(top_builddir)/config.status $(srcdir)/gencert.in cd $(top_builddir) && $(SHELL) ./config.status $@ -libLTLIBRARIES_INSTALL = $(INSTALL) uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @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; \ + @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done 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 -z "$dir" && dir=.; \ + test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmodnss.la: $(libmodnss_la_OBJECTS) $(libmodnss_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libmodnss_la_LDFLAGS) $(libmodnss_la_OBJECTS) $(libmodnss_la_LIBADD) $(LIBS) -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ - rm -f $(DESTDIR)$(bindir)/$$f; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @@ -255,7 +313,7 @@ $(LINK) $(nss_pcache_LDFLAGS) $(nss_pcache_OBJECTS) $(nss_pcache_LDADD) $(LIBS) mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -276,42 +334,40 @@ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nss_pcache.Po at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nss_util.Plo at am__quote@ -distclean-depend: - -rm -rf ./$(DEPDIR) - .c.o: - at AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ - at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + at am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: - at AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ - at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(COMPILE) -c `cygpath -w $<` + at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: - at AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ - at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ - at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< -CCDEPMODE = @CCDEPMODE@ + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + at am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .l.c: - $(LEXCOMPILE) `test -f $< || echo '$(srcdir)/'`$< + $(LEXCOMPILE) $< sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@ rm -f $(LEX_OUTPUT_ROOT).c .y.c: - $(YACCCOMPILE) `test -f '$<' || echo '$(srcdir)/'`$< - sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@ - rm -f y.tab.c + $(YACCCOMPILE) $< if test -f y.tab.h; then \ to=`echo "$*_H" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ - sed "/^#/ s/Y_TAB_H/$$to/g" y.tab.h >$*.ht; \ + sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \ + y.tab.h >$*.ht; \ rm -f y.tab.h; \ if cmp -s $*.ht $*.h; then \ rm -f $*.ht ;\ @@ -322,6 +378,8 @@ if test -f y.output; then \ mv y.output $*.output; \ fi + sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@ + rm -f y.tab.c mostlyclean-libtool: -rm -f *.lo @@ -333,11 +391,6 @@ -rm -f libtool uninstall-info-am: -ETAGS = etags -ETAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -346,6 +399,7 @@ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -357,8 +411,24 @@ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +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: @@ -367,30 +437,24 @@ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = . -distdir = $(PACKAGE)-$(VERSION) - -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } - -GZIP_ENV = --best -distcleancheck_listfiles = find . -type f -print + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkinstalldirs) $(distdir)/. - @list='$(DISTFILES)'; for file in $$list; do \ + $(mkdir_p) $(distdir)/. + @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"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -411,26 +475,54 @@ ! -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 + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | 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 - + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/=build - mkdir $(distdir)/=inst + mkdir $(distdir)/_build + mkdir $(distdir)/_inst chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ - && cd $(distdir)/=build \ - && ../configure --srcdir=.. --prefix=$$dc_install_base \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && 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 \ @@ -438,23 +530,40 @@ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - find $$dc_install_base -type f -print ; \ - exit 1; } >&2 ) \ - && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ - && rm -f $(distdir).tar.gz \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$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 \ + && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) - @echo "$(distdir).tar.gz is ready for distribution" | \ - sed 'h;s/./=/g;p;x;p;x' + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${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 \ + @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 after distclean:" ; \ + @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 @@ -462,10 +571,10 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) install-binPROGRAMS: install-libLTLIBRARIES - installdirs: - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) - + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -477,7 +586,7 @@ installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -485,12 +594,13 @@ clean-generic: distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(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." - -test -z "nss_expr_parse.cnss_expr_scan.c" || rm -f nss_expr_parse.c nss_expr_scan.c + -rm -f nss_expr_parse.c + -rm -f nss_expr_scan.c clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ @@ -498,13 +608,17 @@ distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -distclean-am: clean-am distclean-compile distclean-depend \ - distclean-generic distclean-libtool distclean-tags + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -521,7 +635,9 @@ maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf autom4te.cache + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am @@ -529,20 +645,30 @@ mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + uninstall-am: uninstall-binPROGRAMS uninstall-info-am \ uninstall-libLTLIBRARIES -.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool dist dist-all \ - dist-gzip distcheck distclean distclean-compile \ - distclean-depend distclean-generic distclean-libtool \ - distclean-tags distcleancheck distdir dvi dvi-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-exec install-exec-am 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 \ +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-exec \ + install-exec-am 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-binPROGRAMS \ uninstall-info-am uninstall-libLTLIBRARIES Index: configure.in =================================================================== RCS file: /cvs/dirsec/mod_nss/configure.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- configure.in 4 Jan 2006 22:07:58 -0000 1.7 +++ configure.in 31 Jan 2006 22:27:09 -0000 1.8 @@ -36,28 +36,33 @@ AC_CHECKING(for apr-config) # check for --with-apr-config AC_MSG_CHECKING(for --with-apr-config) -AC_ARG_WITH(apr-config, [ --with-apr-config Use apr-config to determine the APR directory], +AC_ARG_WITH(apr-config, [ --with-apr-config Use apr-config to determine the APR directory], [ if test -x "$withval" then AC_MSG_RESULT([using $withval]) APR_CONFIG=$withval - else - AC_PATH_PROG(APR_CONFIG, apr-config) - fi - if test -n "$APR_CONFIG"; then - apr_inc=`$APR_CONFIG --includes` - else - AC_MSG_ERROR([apr-config not found]) fi ], AC_MSG_RESULT(no)) +if test -z "$APR_CONFIG" ; then + AC_MSG_CHECKING(for apr-1-config and apr-config) + AC_PATH_PROGS(APR_CONFIG, apr-1-config apr-config, NO_APR_CONFIG, [$PATH:/usr/local/apache/sbin:/usr/sbin]) +fi + +if test -n "$APR_CONFIG"; then + AC_MSG_RESULT([using $APR_CONFIG. Use --with-apr-config to specify another.]) + apr_inc=`$APR_CONFIG --includes` +else + AC_MSG_ERROR([neither apr-config nor apr-1-config were not found. use --with-apr-config to specify it.]) +fi + AC_CHECKING(for apxs) # check for --with-apxs AC_MSG_CHECKING(for --with-apxs) -AC_ARG_WITH(apxs, [ --with-apxs=PATH Path to apxs], +AC_ARG_WITH(apxs, [ --with-apxs=PATH Path to apxs], [ if test -x "$withval" then @@ -74,29 +79,17 @@ # since it's the default Apache location if test -z "$APXS"; then AC_MSG_CHECKING(for apxs in /usr/local/apache/sbin and /usr/sbin) - if test -x /usr/local/apache/sbin/apxs; then - APXS=/usr/local/apache/sbin/apxs - AC_MSG_RESULT([found $APXS. Use --with-apxs to specify another.]) - elif test -x /usr/sbin/apxs; then - APXS=/usr/sbin/apxs + AC_PATH_PROG(APXS, apxs, NO_APXS, [/usr/local/apache/sbin:/usr/sbin:$PATH]) + if test -x $APXS; then AC_MSG_RESULT([found $APXS. Use --with-apxs to specify another.]) else AC_MSG_RESULT(no) fi fi -# last resort -if test -z "$APXS"; then - AC_MSG_CHECKING(for apxs in your PATH) - AC_PATH_PROG(APXS, apxs) - if test -n "$APXS"; then - AC_MSG_RESULT([found $APXS. Use --with-apxs to specify another.]) - fi -fi - # and finally if test -z "$APXS"; then - AC_MSG_ERROR([apxs was not found. use --with-apxs to specifiy it.]) + AC_MSG_ERROR([apxs was not found. use --with-apxs to specify it.]) fi # Get some variables we need for Makefile.in From fedora-directory-commits at redhat.com Tue Jan 31 22:39:05 2006 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 31 Jan 2006 17:39:05 -0500 Subject: [Fedora-directory-commits] mod_restartd mod_include-2.2.h, NONE, 1.1 mod_restartd-2.2.c, NONE, 1.1 mod_suexec-2.2.h, NONE, 1.1 Makefile.am, 1.6, 1.7 Makefile.in, 1.6, 1.7 aclocal.m4, 1.5, 1.6 configure, 1.5, 1.6 configure.in, 1.4, 1.5 Message-ID: <200601312239.k0VMd5cF026711@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/mod_restartd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26688 Modified Files: Makefile.am Makefile.in aclocal.m4 configure configure.in Added Files: mod_include-2.2.h mod_restartd-2.2.c mod_suexec-2.2.h Log Message: Bug(s) fixed: 178818 Bug Description: Admin Server modules must support Apache 2.2 Reviewed by: Noriko, Pete, Nathan (Thanks!) Fix Description: We needed to get the extra_cppflags from apxs to pass to the compiler in order to build with Apache 2.2. Rob already did this for mod_nss so I just ported his changes to mod_admserv and mod_restartd. Apache 2.2 uses apr-1-config, not apr-config (let's hope they don't change apr versions too often . . .) so I changed configure.in look first for apr-1-config then apr-config. Finally, you no longer have to specify --with-apxs or --with-apr-config to configure - configure will attempt to find them automatically, and this should just work on almost any linux system. The biggest change is with mod_restartd - I had to take mod_cgid.c from Apache 2.2 and merge it with mod_restartd.c to create a new mod_restartd-2.2.c. I also copied over mod_suexec.h and mod_include.h to mod_suexec-2.2.h and mod_include-2.2.h. I changed the configure.in to assume if the user is using apr 1.x, this is Apache 2.2, if apr 0.9.x, this is Apache 2.0, and anything else is not supported. Platforms tested: Fedora Core 4 (Need a Fedora Core 5 machine) Flag Day: no Doc impact: no --- NEW FILE mod_include-2.2.h --- /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file mod_include.h * @brief Server Side Include Filter Extension Module for Apache * * @defgroup MOD_INCLUDE mod_include * @ingroup APACHE_MODS * @{ */ #ifndef _MOD_INCLUDE_H #define _MOD_INCLUDE_H 1 #include "apr_pools.h" #include "apr_optional.h" /* * Constants used for ap_ssi_get_tag_and_value's decode parameter */ #define SSI_VALUE_DECODED 1 #define SSI_VALUE_RAW 0 /* * Constants used for ap_ssi_parse_string's leave_name parameter */ #define SSI_EXPAND_LEAVE_NAME 1 #define SSI_EXPAND_DROP_NAME 0 /* * This macro creates a bucket which contains an error message and appends it * to the current pass brigade */ #define SSI_CREATE_ERROR_BUCKET(ctx, f, bb) APR_BRIGADE_INSERT_TAIL((bb), \ apr_bucket_pool_create(apr_pstrdup((ctx)->pool, (ctx)->error_str), \ strlen((ctx)->error_str), (ctx)->pool, \ (f)->c->bucket_alloc)) /* * These constants are used to set or clear flag bits. */ #define SSI_FLAG_PRINTING (1<<0) /* Printing conditional lines. */ #define SSI_FLAG_COND_TRUE (1<<1) /* Conditional eval'd to true. */ #define SSI_FLAG_SIZE_IN_BYTES (1<<2) /* Sizes displayed in bytes. */ #define SSI_FLAG_NO_EXEC (1<<3) /* No Exec in current context. */ #define SSI_FLAG_SIZE_ABBREV (~(SSI_FLAG_SIZE_IN_BYTES)) #define SSI_FLAG_CLEAR_PRINT_COND (~((SSI_FLAG_PRINTING) | \ (SSI_FLAG_COND_TRUE))) #define SSI_FLAG_CLEAR_PRINTING (~(SSI_FLAG_PRINTING)) /* * The public SSI context structure */ typedef struct { /* permanent pool, use this for creating bucket data */ apr_pool_t *pool; /* temp pool; will be cleared after the execution of every directive */ apr_pool_t *dpool; /* See the SSI_FLAG_XXXXX definitions. */ int flags; /* nesting of *invisible* ifs */ int if_nesting_level; /* if true, the current buffer will be passed down the filter chain before * continuing with next input bucket and the variable will be reset to * false. */ int flush_now; /* argument counter (of the current directive) */ unsigned argc; /* currently configured error string */ const char *error_str; /* currently configured time format */ const char *time_str; /* pointer to internal (non-public) data, don't touch */ struct ssi_internal_ctx *intern; } include_ctx_t; typedef apr_status_t (include_handler_fn_t)(include_ctx_t *, ap_filter_t *, apr_bucket_brigade *); APR_DECLARE_OPTIONAL_FN(void, ap_ssi_get_tag_and_value, (include_ctx_t *ctx, char **tag, char **tag_val, int dodecode)); APR_DECLARE_OPTIONAL_FN(char*, ap_ssi_parse_string, (include_ctx_t *ctx, const char *in, char *out, apr_size_t length, int leave_name)); APR_DECLARE_OPTIONAL_FN(void, ap_register_include_handler, (char *tag, include_handler_fn_t *func)); #endif /* MOD_INCLUDE */ /** @} */ --- NEW FILE mod_restartd-2.2.c --- /* Copyright 1999-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * http_script: keeps all script-related ramblings together. * * Compliant to cgi/1.1 spec * * Adapted by rst from original NCSA code by Rob McCool * * Apache adds some new env vars; REDIRECT_URL and REDIRECT_QUERY_STRING for * custom error responses, and DOCUMENT_ROOT because we found it useful. * It also adds SERVER_ADMIN - useful for scripts to know who to mail when * they fail. */ /* See the mod_restartd README for important information about this file */ #include "apr_lib.h" #include "apr_strings.h" #include "apr_general.h" #include "apr_file_io.h" #include "apr_portable.h" #include "apr_buckets.h" #include "apr_optional.h" #include "apr_signal.h" #define APR_WANT_STRFUNC #include "apr_want.h" #if APR_HAVE_SYS_SOCKET_H #include #endif #if APR_HAVE_UNISTD_H #include #endif #if APR_HAVE_SYS_TYPES_H #include #endif #define CORE_PRIVATE #include "util_filter.h" #include "httpd.h" #include "http_config.h" #include "http_request.h" #include "http_core.h" #include "http_protocol.h" #include "http_main.h" #include "http_log.h" #include "util_script.h" #include "ap_mpm.h" #include "unixd.h" #include "mod_suexec-2.2.h" #include "mod_include-2.2.h" #include "mod_core.h" #include "ap_regex.h" /* ### should be tossed in favor of APR */ #include #include /* for sockaddr_un */ module AP_MODULE_DECLARE_DATA restartd_module; static int cgid_start(apr_pool_t *p, server_rec *main_server, apr_proc_t *procnew); static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server); static int handle_exec(include_ctx_t *ctx, ap_filter_t *f, apr_bucket_brigade *bb); static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *cgid_pfn_reg_with_ssi; static APR_OPTIONAL_FN_TYPE(ap_ssi_get_tag_and_value) *cgid_pfn_gtv; static APR_OPTIONAL_FN_TYPE(ap_ssi_parse_string) *cgid_pfn_ps; static apr_pool_t *pcgi = NULL; static int total_modules = 0; static pid_t daemon_pid; static int daemon_should_exit = 0; static ap_regex_t uriPat; static server_rec *root_server = NULL; static apr_pool_t *root_pool = NULL; static const char *sockname; static pid_t parent_pid; static ap_unix_identity_t empty_ugid = { (uid_t)-1, (gid_t)-1, -1 }; /* Read and discard the data in the brigade produced by a CGI script */ static void discard_script_output(apr_bucket_brigade *bb); /* This doer will only ever be called when we are sure that we have * a valid ugid. */ static ap_unix_identity_t *cgid_suexec_id_doer(const request_rec *r) { return (ap_unix_identity_t *) ap_get_module_config(r->request_config, &restartd_module); } /* KLUDGE --- for back-combatibility, we don't have to check ExecCGI * in ScriptAliased directories, which means we need to know if this * request came through ScriptAlias or not... so the Alias module * leaves a note for us. */ static int is_scriptaliased(request_rec *r) { const char *t = apr_table_get(r->notes, "alias-forced-type"); return t && (!strcasecmp(t, "cgi-script")); } /* Configuration stuff */ #define DEFAULT_LOGBYTES 10385760 #define DEFAULT_BUFBYTES 1024 #define DEFAULT_SOCKET DEFAULT_REL_RUNTIMEDIR "/cgisock" #define CGI_REQ 1 #define SSI_REQ 2 #define GETPID_REQ 3 /* get the pid of script created for prior request */ #define ERRFN_USERDATA_KEY "CGIDCHILDERRFN" /* DEFAULT_CGID_LISTENBACKLOG controls the max depth on the unix socket's * pending connection queue. If a bunch of cgi requests arrive at about * the same time, connections from httpd threads/processes will back up * in the queue while the cgid process slowly forks off a child to process * each connection on the unix socket. If the queue is too short, the * httpd process will get ECONNREFUSED when trying to connect. */ #ifndef DEFAULT_CGID_LISTENBACKLOG #define DEFAULT_CGID_LISTENBACKLOG 100 #endif /* DEFAULT_CONNECT_ATTEMPTS controls how many times we'll try to connect * to the cgi daemon from the thread/process handling the cgi request. * Generally we want to retry when we get ECONNREFUSED since it is * probably because the listen queue is full. We need to try harder so * the client doesn't see it as a 503 error. * * Set this to 0 to continually retry until the connect works or Apache * terminates. */ #ifndef DEFAULT_CONNECT_ATTEMPTS #define DEFAULT_CONNECT_ATTEMPTS 15 #endif typedef struct { const char *logname; long logbytes; int bufbytes; } cgid_server_conf; typedef struct { int retainperms; } cgid_dir_conf; typedef struct { int req_type; /* request type (CGI_REQ, SSI_REQ, etc.) */ unsigned long conn_id; /* connection id; daemon uses this as a hash value * to find the script pid when it is time for that * process to be cleaned up */ pid_t ppid; /* sanity check for config problems leading to * wrong cgid socket use */ int core_module_index; int env_count; ap_unix_identity_t ugid; apr_size_t filename_len; apr_size_t argv0_len; apr_size_t uri_len; apr_size_t args_len; int loglevel; /* to stuff in server_rec */ } cgid_req_t; /* This routine is called to create the argument list to be passed * to the CGI script. When suexec is enabled, the suexec path, user, and * group are the first three arguments to be passed; if not, all three * must be NULL. The query info is split into separate arguments, where * "+" is the separator between keyword arguments. * * Do not process the args if they containing an '=' assignment. */ static char **create_argv(apr_pool_t *p, char *path, char *user, char *group, char *av0, const char *args) { int x, numwords; char **av; char *w; int idx = 0; if (ap_strchr_c(args, '=')) { numwords = 0; } else { /* count the number of keywords */ for (x = 0, numwords = 1; args[x]; x++) { if (args[x] == '+') { ++numwords; } } } if (numwords > APACHE_ARG_MAX - 5) { numwords = APACHE_ARG_MAX - 5; /* Truncate args to prevent overrun */ } av = (char **) apr_pcalloc(p, (numwords + 5) * sizeof(char *)); if (path) { av[idx++] = path; } if (user) { av[idx++] = user; } if (group) { av[idx++] = group; } av[idx++] = apr_pstrdup(p, av0); for (x = 1; x <= numwords; x++) { w = ap_getword_nulls(p, &args, '+'); if (strcmp(w, "")) { ap_unescape_url(w); av[idx++] = ap_escape_shell_cmd(p, w); } } av[idx] = NULL; return av; } #if APR_HAS_OTHER_CHILD static void cgid_maint(int reason, void *data, apr_wait_t status) { apr_proc_t *proc = data; int mpm_state; int stopping; switch (reason) { case APR_OC_REASON_DEATH: apr_proc_other_child_unregister(data); /* If apache is not terminating or restarting, * restart the cgid daemon */ stopping = 1; /* if MPM doesn't support query, * assume we shouldn't restart daemon */ if (ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state) == APR_SUCCESS && mpm_state != AP_MPMQ_STOPPING) { stopping = 0; } if (!stopping) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "restartd daemon process died, restarting"); cgid_start(root_pool, root_server, proc); } break; case APR_OC_REASON_RESTART: /* don't do anything; server is stopping or restarting */ apr_proc_other_child_unregister(data); break; case APR_OC_REASON_LOST: /* Restart the child cgid daemon process */ apr_proc_other_child_unregister(data); cgid_start(root_pool, root_server, proc); break; case APR_OC_REASON_UNREGISTER: /* we get here when pcgi is cleaned up; pcgi gets cleaned * up when pconf gets cleaned up */ kill(proc->pid, SIGHUP); /* send signal to daemon telling it to die */ /* Remove the cgi socket, we must do it here in order to try and * guarantee the same permissions as when the socket was created. */ if (unlink(sockname) < 0 && errno != ENOENT) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, NULL, "Couldn't unlink unix domain socket %s", sockname); } break; } } #endif /* deal with incomplete reads and signals * assume you really have to read buf_size bytes */ static apr_status_t sock_read(int fd, void *vbuf, size_t buf_size) { char *buf = vbuf; int rc; size_t bytes_read = 0; do { do { rc = read(fd, buf + bytes_read, buf_size - bytes_read); } while (rc < 0 && errno == EINTR); switch(rc) { case -1: return errno; case 0: /* unexpected */ return ECONNRESET; default: bytes_read += rc; } } while (bytes_read < buf_size); return APR_SUCCESS; } /* deal with signals */ static apr_status_t sock_write(int fd, const void *buf, size_t buf_size) { int rc; do { rc = write(fd, buf, buf_size); } while (rc < 0 && errno == EINTR); if (rc < 0) { return errno; } return APR_SUCCESS; } static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env, cgid_req_t *req) { int i; char **environ; core_request_config *temp_core; void **rconf; apr_status_t stat; r->server = apr_pcalloc(r->pool, sizeof(server_rec)); /* read the request header */ stat = sock_read(fd, req, sizeof(*req)); if (stat != APR_SUCCESS) { return stat; } r->server->loglevel = req->loglevel; if (req->req_type == GETPID_REQ) { /* no more data sent for this request */ return APR_SUCCESS; } /* handle module indexes and such */ rconf = (void **) apr_pcalloc(r->pool, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT)); temp_core = (core_request_config *)apr_palloc(r->pool, sizeof(core_module)); rconf[req->core_module_index] = (void *)temp_core; r->request_config = (ap_conf_vector_t *)rconf; ap_set_module_config(r->request_config, &restartd_module, (void *)&req->ugid); /* Read the filename, argv0, uri, and args */ r->filename = apr_pcalloc(r->pool, req->filename_len + 1); *argv0 = apr_pcalloc(r->pool, req->argv0_len + 1); r->uri = apr_pcalloc(r->pool, req->uri_len + 1); if ((stat = sock_read(fd, r->filename, req->filename_len)) != APR_SUCCESS || (stat = sock_read(fd, *argv0, req->argv0_len)) != APR_SUCCESS || (stat = sock_read(fd, r->uri, req->uri_len)) != APR_SUCCESS) { return stat; } r->args = apr_pcalloc(r->pool, req->args_len + 1); /* empty string if no args */ if (req->args_len) { if ((stat = sock_read(fd, r->args, req->args_len)) != APR_SUCCESS) { return stat; } } /* read the environment variables */ environ = apr_pcalloc(r->pool, (req->env_count + 2) *sizeof(char *)); for (i = 0; i < req->env_count; i++) { apr_size_t curlen; if ((stat = sock_read(fd, &curlen, sizeof(curlen))) != APR_SUCCESS) { return stat; } environ[i] = apr_pcalloc(r->pool, curlen + 1); if ((stat = sock_read(fd, environ[i], curlen)) != APR_SUCCESS) { return stat; } } *env = environ; #if 0 #ifdef RLIMIT_CPU sock_read(fd, &j, sizeof(int)); if (j) { temp_core->limit_cpu = (struct rlimit *)apr_palloc (sizeof(struct rlimit)); sock_read(fd, temp_core->limit_cpu, sizeof(struct rlimit)); } else { temp_core->limit_cpu = NULL; } #endif #if defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) sock_read(fd, &j, sizeof(int)); if (j) { temp_core->limit_mem = (struct rlimit *)apr_palloc(r->pool, sizeof(struct rlimit)); sock_read(fd, temp_core->limit_mem, sizeof(struct rlimit)); } else { temp_core->limit_mem = NULL; } #endif #ifdef RLIMIT_NPROC sock_read(fd, &j, sizeof(int)); if (j) { temp_core->limit_nproc = (struct rlimit *)apr_palloc(r->pool, sizeof(struct rlimit)); sock_read(fd, temp_core->limit_nproc, sizeof(struct rlimit)); } else { temp_core->limit_nproc = NULL; } #endif #endif return APR_SUCCESS; } static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, int req_type) { int i; cgid_req_t req = {0}; apr_status_t stat; ap_unix_identity_t * ugid = ap_run_get_suexec_identity(r); if (ugid == NULL) { req.ugid = empty_ugid; } else { memcpy(&req.ugid, ugid, sizeof(ap_unix_identity_t)); } req.req_type = req_type; req.ppid = parent_pid; req.conn_id = r->connection->id; req.core_module_index = core_module.module_index; for (req.env_count = 0; env[req.env_count]; req.env_count++) { continue; } req.filename_len = strlen(r->filename); req.argv0_len = strlen(argv0); req.uri_len = strlen(r->uri); req.args_len = r->args ? strlen(r->args) : 0; req.loglevel = r->server->loglevel; /* Write the request header */ if ((stat = sock_write(fd, &req, sizeof(req))) != APR_SUCCESS) { return stat; } /* Write filename, argv0, uri, and args */ if ((stat = sock_write(fd, r->filename, req.filename_len)) != APR_SUCCESS || (stat = sock_write(fd, argv0, req.argv0_len)) != APR_SUCCESS || (stat = sock_write(fd, r->uri, req.uri_len)) != APR_SUCCESS) { return stat; } if (req.args_len) { if ((stat = sock_write(fd, r->args, req.args_len)) != APR_SUCCESS) { return stat; } } /* write the environment variables */ for (i = 0; i < req.env_count; i++) { apr_size_t curlen = strlen(env[i]); if ((stat = sock_write(fd, &curlen, sizeof(curlen))) != APR_SUCCESS) { return stat; } if ((stat = sock_write(fd, env[i], curlen)) != APR_SUCCESS) { return stat; } } #if 0 #ifdef RLIMIT_CPU if (conf->limit_cpu) { len = 1; stat = sock_write(fd, &len, sizeof(int)); stat = sock_write(fd, conf->limit_cpu, sizeof(struct rlimit)); } else { len = 0; stat = sock_write(fd, &len, sizeof(int)); } #endif #if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) if (conf->limit_mem) { len = 1; stat = sock_write(fd, &len, sizeof(int)); stat = sock_write(fd, conf->limit_mem, sizeof(struct rlimit)); } else { len = 0; stat = sock_write(fd, &len, sizeof(int)); } #endif #ifdef RLIMIT_NPROC if (conf->limit_nproc) { len = 1; stat = sock_write(fd, &len, sizeof(int)); stat = sock_write(fd, conf->limit_nproc, sizeof(struct rlimit)); } else { len = 0; stat = sock_write(fd, &len, sizeof(int)); } #endif #endif return APR_SUCCESS; } static void daemon_signal_handler(int sig) { if (sig == SIGHUP) { ++daemon_should_exit; } } static void cgid_child_errfn(apr_pool_t *pool, apr_status_t err, const char *description) { request_rec *r; void *vr; apr_pool_userdata_get(&vr, ERRFN_USERDATA_KEY, pool); r = vr; /* sure we got r, but don't call ap_log_rerror() because we don't * have r->headers_in and possibly other storage referenced by * ap_log_rerror() */ ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, "%s", description); } static int cgid_server(void *data) { struct sockaddr_un unix_addr; int sd, sd2, rc; mode_t omask; apr_socklen_t len; apr_pool_t *ptrans; server_rec *main_server = data; apr_hash_t *script_hash = apr_hash_make(pcgi); apr_pool_create(&ptrans, pcgi); apr_signal(SIGCHLD, SIG_IGN); apr_signal(SIGHUP, daemon_signal_handler); /* Close our copy of the listening sockets */ ap_close_listeners(); /* cgid should use its own suexec doer */ ap_hook_get_suexec_identity(cgid_suexec_id_doer, NULL, NULL, APR_HOOK_REALLY_FIRST); apr_hook_sort_all(); if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't create unix domain socket"); return errno; } memset(&unix_addr, 0, sizeof(unix_addr)); unix_addr.sun_family = AF_UNIX; apr_cpystrn(unix_addr.sun_path, sockname, sizeof unix_addr.sun_path); omask = umask(0077); /* so that only Apache can use socket */ rc = bind(sd, (struct sockaddr *)&unix_addr, sizeof(unix_addr)); umask(omask); /* can't fail, so can't clobber errno */ if (rc < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't bind unix domain socket %s", sockname); return errno; } if (listen(sd, DEFAULT_CGID_LISTENBACKLOG) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't listen on unix domain socket"); return errno; } if (!geteuid()) { if (chown(sockname, unixd_config.user_id, -1) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't change owner of unix domain socket %s", sockname); return errno; } } #if 0 unixd_setup_child(); /* if running as root, switch to configured user/group */ #endif while (!daemon_should_exit) { int errfileno = STDERR_FILENO; char *argv0; char **env; const char * const *argv; apr_int32_t in_pipe; apr_int32_t out_pipe; apr_int32_t err_pipe; apr_cmdtype_e cmd_type; request_rec *r; apr_procattr_t *procattr = NULL; apr_proc_t *procnew = NULL; apr_file_t *inout; cgid_req_t cgid_req; apr_status_t stat; apr_pool_clear(ptrans); len = sizeof(unix_addr); sd2 = accept(sd, (struct sockaddr *)&unix_addr, &len); if (sd2 < 0) { #if defined(ENETDOWN) if (errno == ENETDOWN) { /* The network has been shut down, no need to continue. Die gracefully */ ++daemon_should_exit; } #endif if (errno != EINTR) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, (server_rec *)data, "Error accepting on restartd socket"); } continue; } r = apr_pcalloc(ptrans, sizeof(request_rec)); procnew = apr_pcalloc(ptrans, sizeof(*procnew)); r->pool = ptrans; stat = get_req(sd2, r, &argv0, &env, &cgid_req); if (stat != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, stat, main_server, "Error reading request on cgid socket"); close(sd2); continue; } if (cgid_req.ppid != parent_pid) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, main_server, "CGI request received from wrong server instance; " "see ScriptSock directive"); close(sd2); continue; } if (cgid_req.req_type == GETPID_REQ) { pid_t pid; pid = (pid_t)((long)apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id))); if (write(sd2, &pid, sizeof(pid)) != sizeof(pid)) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, "Error writing pid %" APR_PID_T_FMT " to handler", pid); } close(sd2); continue; } apr_os_file_put(&r->server->error_log, &errfileno, 0, r->pool); apr_os_file_put(&inout, &sd2, 0, r->pool); if (cgid_req.req_type == SSI_REQ) { in_pipe = APR_NO_PIPE; out_pipe = APR_FULL_BLOCK; err_pipe = APR_NO_PIPE; cmd_type = APR_SHELLCMD; } else { in_pipe = APR_CHILD_BLOCK; out_pipe = APR_CHILD_BLOCK; err_pipe = APR_CHILD_BLOCK; cmd_type = APR_PROGRAM; } if (((rc = apr_procattr_create(&procattr, ptrans)) != APR_SUCCESS) || ((cgid_req.req_type == CGI_REQ) && (((rc = apr_procattr_io_set(procattr, in_pipe, out_pipe, err_pipe)) != APR_SUCCESS) || /* XXX apr_procattr_child_*_set() is creating an unnecessary * pipe between this process and the child being created... * It is cleaned up with the temporary pool for this request. */ ((rc = apr_procattr_child_err_set(procattr, r->server->error_log, NULL)) != APR_SUCCESS) || ((rc = apr_procattr_child_in_set(procattr, inout, NULL)) != APR_SUCCESS))) || ((rc = apr_procattr_child_out_set(procattr, inout, NULL)) != APR_SUCCESS) || ((rc = apr_procattr_dir_set(procattr, ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS) || ((rc = apr_procattr_cmdtype_set(procattr, cmd_type)) != APR_SUCCESS) || ((rc = apr_procattr_child_errfn_set(procattr, cgid_child_errfn)) != APR_SUCCESS)) { /* Something bad happened, tell the world. * ap_log_rerror() won't work because the header table used by * ap_log_rerror() hasn't been replicated in the phony r */ ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, "couldn't set child process attributes: %s", r->filename); } else { apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans); argv = (const char * const *)create_argv(r->pool, NULL, NULL, NULL, argv0, r->args); /* We want to close sd2 for the new CGI process too. * If it is left open it'll make ap_pass_brigade() block * waiting for EOF if CGI forked something running long. * close(sd2) here should be okay, as CGI channel * is already dup()ed by apr_procattr_child_{in,out}_set() * above. */ close(sd2); if (memcmp(&empty_ugid, &cgid_req.ugid, sizeof(empty_ugid))) { /* We have a valid identity, and can be sure that * cgid_suexec_id_doer will return a valid ugid */ rc = ap_os_create_privileged_process(r, procnew, argv0, argv, (const char * const *)env, procattr, ptrans); } else { rc = apr_proc_create(procnew, argv0, argv, (const char * const *)env, procattr, ptrans); } if (rc != APR_SUCCESS) { /* Bad things happened. Everyone should have cleaned up. * ap_log_rerror() won't work because the header table used by * ap_log_rerror() hasn't been replicated in the phony r */ ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, "couldn't create child process: %d: %s", rc, apr_filepath_name_get(r->filename)); } else { /* We don't want to leak storage for the key, so only allocate * a key if the key doesn't exist yet in the hash; there are * only a limited number of possible keys (one for each * possible thread in the server), so we can allocate a copy * of the key the first time a thread has a cgid request. * Note that apr_hash_set() only uses the storage passed in * for the key if it is adding the key to the hash for the * first time; new key storage isn't needed for replacing the * existing value of a key. */ void *key; if (apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id))) { key = &cgid_req.conn_id; } else { key = apr_pcalloc(pcgi, sizeof(cgid_req.conn_id)); memcpy(key, &cgid_req.conn_id, sizeof(cgid_req.conn_id)); } apr_hash_set(script_hash, key, sizeof(cgid_req.conn_id), (void *)((long)procnew->pid)); } } } return -1; } static int cgid_start(apr_pool_t *p, server_rec *main_server, apr_proc_t *procnew) { daemon_should_exit = 0; /* clear setting from previous generation */ if ((daemon_pid = fork()) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "mod_restartd: Couldn't spawn restartd daemon process"); return DECLINED; } else if (daemon_pid == 0) { if (pcgi == NULL) { apr_pool_create(&pcgi, p); } cgid_server(main_server); exit(-1); } procnew->pid = daemon_pid; procnew->err = procnew->in = procnew->out = NULL; apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT); #if APR_HAS_OTHER_CHILD apr_proc_other_child_register(procnew, cgid_maint, procnew, NULL, p); #endif return OK; } static int cgid_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) { sockname = ap_append_pid(pconf, DEFAULT_SOCKET, "."); return OK; } static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server) { apr_proc_t *procnew = NULL; int first_time = 0; const char *userdata_key = "restartd_init"; module **m; int ret = OK; void *data; root_server = main_server; root_pool = p; apr_pool_userdata_get(&data, userdata_key, main_server->process->pool); if (!data) { first_time = 1; procnew = apr_pcalloc(main_server->process->pool, sizeof(*procnew)); procnew->pid = -1; procnew->err = procnew->in = procnew->out = NULL; apr_pool_userdata_set((const void *)procnew, userdata_key, apr_pool_cleanup_null, main_server->process->pool); } else { procnew = data; } if (!first_time) { total_modules = 0; for (m = ap_preloaded_modules; *m != NULL; m++) total_modules++; parent_pid = getpid(); sockname = ap_server_root_relative(p, sockname); ret = cgid_start(p, main_server, procnew); if (ret != OK ) { return ret; } cgid_pfn_reg_with_ssi = APR_RETRIEVE_OPTIONAL_FN(ap_register_include_handler); cgid_pfn_gtv = APR_RETRIEVE_OPTIONAL_FN(ap_ssi_get_tag_and_value); cgid_pfn_ps = APR_RETRIEVE_OPTIONAL_FN(ap_ssi_parse_string); if ((cgid_pfn_reg_with_ssi) && (cgid_pfn_gtv) && (cgid_pfn_ps)) { /* Required by mod_include filter. This is how mod_cgid registers * with mod_include to provide processing of the exec directive. */ cgid_pfn_reg_with_ssi("exec", handle_exec); } } ap_regcomp(&uriPat, "/.*/tasks/operation/(start|restart|stop|startconfigds|create)$", AP_REG_ICASE); return ret; } static void *create_cgid_config(apr_pool_t *p, server_rec *s) { cgid_server_conf *c = (cgid_server_conf *) apr_pcalloc(p, sizeof(cgid_server_conf)); c->logname = NULL; c->logbytes = DEFAULT_LOGBYTES; c->bufbytes = DEFAULT_BUFBYTES; return c; } static void *merge_cgid_config(apr_pool_t *p, void *basev, void *overridesv) { cgid_server_conf *base = (cgid_server_conf *) basev, *overrides = (cgid_server_conf *) overridesv; return overrides->logname ? overrides : base; } static void *create_cgid_dir_config(apr_pool_t *p, char *d) { cgid_dir_conf * c = (cgid_dir_conf *)apr_pcalloc(p, sizeof(cgid_dir_conf)); c->retainperms = 0; return (void *) c; } static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = ap_get_module_config(s->module_config, &restartd_module); conf->logname = ap_server_root_relative(cmd->pool, arg); if (!conf->logname) { return apr_pstrcat(cmd->pool, "Invalid ScriptLog path ", arg, NULL); } return NULL; } static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = ap_get_module_config(s->module_config, &restartd_module); conf->logbytes = atol(arg); return NULL; } static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = ap_get_module_config(s->module_config, &restartd_module); conf->bufbytes = atoi(arg); return NULL; } static const char *set_script_socket(cmd_parms *cmd, void *dummy, const char *arg) { const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); if (err != NULL) { return err; } /* Make sure the pid is appended to the sockname */ sockname = ap_append_pid(cmd->pool, arg, "."); sockname = ap_server_root_relative(cmd->pool, sockname); if (!sockname) { return apr_pstrcat(cmd->pool, "Invalid ScriptSock path", arg, NULL); } return NULL; } static const char *set_retainperms(cmd_parms *cmd, void *dconf, int arg) { cgid_dir_conf *c = (cgid_dir_conf *) dconf; c->retainperms = arg; return NULL; } static const command_rec cgid_cmds[] = { AP_INIT_TAKE1("ScriptLog", set_scriptlog, NULL, RSRC_CONF, "the name of a log for script debugging info"), AP_INIT_TAKE1("ScriptLogLength", set_scriptlog_length, NULL, RSRC_CONF, "the maximum length (in bytes) of the script debug log"), AP_INIT_TAKE1("ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF, "the maximum size (in bytes) to record of a POST request"), AP_INIT_TAKE1("ScriptSock", set_script_socket, NULL, RSRC_CONF, "the name of the socket to use for communication with " "the cgi daemon."), AP_INIT_FLAG("RetainPerms", set_retainperms, NULL, OR_AUTHCFG, "Don't drop permissions when running the CGI."), {NULL} }; static int log_scripterror(request_rec *r, cgid_server_conf * conf, int ret, apr_status_t rv, char *error) { apr_file_t *f = NULL; struct stat finfo; char time_str[APR_CTIME_LEN]; int log_flags = rv ? APLOG_ERR : APLOG_ERR; ap_log_rerror(APLOG_MARK, log_flags, rv, r, "%s: %s", error, r->filename); /* XXX Very expensive mainline case! Open, then getfileinfo! */ if (!conf->logname || ((stat(conf->logname, &finfo) == 0) && (finfo.st_size > conf->logbytes)) || (apr_file_open(&f, conf->logname, APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) { return ret; } /* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */ apr_ctime(time_str, apr_time_now()); apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri, r->args ? "?" : "", r->args ? r->args : "", r->protocol); /* "%% 500 /usr/local/apache/cgid-bin */ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename); apr_file_printf(f, "%%error\n%s\n", error); apr_file_close(f); return ret; } static int log_script(request_rec *r, cgid_server_conf * conf, int ret, char *dbuf, const char *sbuf, apr_bucket_brigade *bb, apr_file_t *script_err) { const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in); const apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts; char argsbuffer[HUGE_STRING_LEN]; apr_file_t *f = NULL; apr_bucket *e; const char *buf; apr_size_t len; apr_status_t rv; int first; int i; struct stat finfo; char time_str[APR_CTIME_LEN]; /* XXX Very expensive mainline case! Open, then getfileinfo! */ if (!conf->logname || ((stat(conf->logname, &finfo) == 0) && (finfo.st_size > conf->logbytes)) || (apr_file_open(&f, conf->logname, APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) { /* Soak up script output */ discard_script_output(bb); if (script_err) { while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == APR_SUCCESS) continue; } return ret; } /* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */ apr_ctime(time_str, apr_time_now()); apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri, r->args ? "?" : "", r->args ? r->args : "", r->protocol); /* "%% 500 /usr/local/apache/cgid-bin" */ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename); apr_file_puts("%request\n", f); for (i = 0; i < hdrs_arr->nelts; ++i) { if (!hdrs[i].key) continue; apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val); } if ((r->method_number == M_POST || r->method_number == M_PUT) && *dbuf) { apr_file_printf(f, "\n%s\n", dbuf); } apr_file_puts("%response\n", f); hdrs_arr = apr_table_elts(r->err_headers_out); hdrs = (const apr_table_entry_t *) hdrs_arr->elts; for (i = 0; i < hdrs_arr->nelts; ++i) { if (!hdrs[i].key) continue; apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val); } if (sbuf && *sbuf) apr_file_printf(f, "%s\n", sbuf); first = 1; for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) { if (APR_BUCKET_IS_EOS(e)) { break; } rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ); if (rv != APR_SUCCESS || (len == 0)) { break; } if (first) { apr_file_puts("%stdout\n", f); first = 0; } apr_file_write(f, buf, &len); apr_file_puts("\n", f); } if (script_err) { if (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == APR_SUCCESS) { apr_file_puts("%stderr\n", f); apr_file_puts(argsbuffer, f); while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == APR_SUCCESS) apr_file_puts(argsbuffer, f); apr_file_puts("\n", f); } } if (script_err) { apr_file_close(script_err); } apr_file_close(f); return ret; } static apr_status_t close_unix_socket(void *thefd) { int fd = (int)((long)thefd); return close(fd); } static int connect_to_daemon(int *sdptr, request_rec *r, cgid_server_conf *conf) { struct sockaddr_un unix_addr; int sd; int connect_tries; apr_interval_time_t sliding_timer; memset(&unix_addr, 0, sizeof(unix_addr)); unix_addr.sun_family = AF_UNIX; apr_cpystrn(unix_addr.sun_path, sockname, sizeof unix_addr.sun_path); connect_tries = 0; sliding_timer = 100000; /* 100 milliseconds */ while (1) { ++connect_tries; if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { return log_scripterror(r, conf, HTTP_INTERNAL_SERVER_ERROR, errno, "unable to create socket to cgi daemon"); } if (connect(sd, (struct sockaddr *)&unix_addr, sizeof(unix_addr)) < 0) { if (errno == ECONNREFUSED && connect_tries < DEFAULT_CONNECT_ATTEMPTS) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, errno, r, "connect #%d to cgi daemon failed, sleeping before retry", connect_tries); close(sd); apr_sleep(sliding_timer); if (sliding_timer < apr_time_from_sec(2)) { sliding_timer *= 2; } } else { close(sd); return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno, "unable to connect to cgi daemon after multiple tries"); } } else { apr_pool_cleanup_register(r->pool, (void *)((long)sd), close_unix_socket, apr_pool_cleanup_null); break; /* we got connected! */ } /* gotta try again, but make sure the cgid daemon is still around */ if (kill(daemon_pid, 0) != 0) { return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno, "restartd daemon is gone; is Apache terminating?"); } } *sdptr = sd; return OK; } static void discard_script_output(apr_bucket_brigade *bb) { apr_bucket *e; const char *buf; apr_size_t len; apr_status_t rv; for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) { if (APR_BUCKET_IS_EOS(e)) { break; } rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ); if (rv != APR_SUCCESS) { break; } } } /**************************************************************** * * Actual cgid handling... */ struct cleanup_script_info { request_rec *r; unsigned long conn_id; cgid_server_conf *conf; }; static apr_status_t dead_yet(pid_t pid, apr_interval_time_t max_wait) { apr_interval_time_t interval = 10000; /* 10 ms */ apr_interval_time_t total = 0; do { #ifdef _AIX /* On AIX, for processes like mod_cgid's script children where * SIGCHLD is ignored, kill(pid,0) returns success for up to * one second after the script child exits, based on when a * daemon runs to clean up unnecessary process table entries. * getpgid() can report the proper info (-1/ESRCH) immediately. */ if (getpgid(pid) < 0) { #else if (kill(pid, 0) < 0) { #endif return APR_SUCCESS; } apr_sleep(interval); total = total + interval; if (interval < 500000) { interval *= 2; } } while (total < max_wait); return APR_EGENERAL; } static apr_status_t cleanup_nonchild_process(request_rec *r, pid_t pid) { kill(pid, SIGTERM); /* in case it isn't dead yet */ if (dead_yet(pid, apr_time_from_sec(3)) == APR_SUCCESS) { return APR_SUCCESS; } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "CGI process %" APR_PID_T_FMT " didn't exit, sending SIGKILL", pid); kill(pid, SIGKILL); if (dead_yet(pid, apr_time_from_sec(3)) == APR_SUCCESS) { return APR_SUCCESS; } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "CGI process %" APR_PID_T_FMT " didn't exit, sending SIGKILL again", pid); kill(pid, SIGKILL); return APR_EGENERAL; } static apr_status_t cleanup_script(void *vptr) { struct cleanup_script_info *info = vptr; int sd; int rc; cgid_req_t req = {0}; pid_t pid; apr_status_t stat; rc = connect_to_daemon(&sd, info->r, info->conf); if (rc != OK) { return APR_EGENERAL; } /* we got a socket, and there is already a cleanup registered for it */ req.req_type = GETPID_REQ; req.ppid = parent_pid; req.conn_id = info->r->connection->id; stat = sock_write(sd, &req, sizeof(req)); if (stat != APR_SUCCESS) { return stat; } /* wait for pid of script */ stat = sock_read(sd, &pid, sizeof(pid)); if (stat != APR_SUCCESS) { return stat; } if (pid == 0) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, info->r, "daemon couldn't find CGI process for connection %lu", info->conn_id); return APR_EGENERAL; } return cleanup_nonchild_process(info->r, pid); } static int cgid_handler(request_rec *r) { conn_rec *c = r->connection; int retval, nph, dbpos = 0; char *argv0, *dbuf = NULL; apr_bucket_brigade *bb; apr_bucket *b; cgid_server_conf *conf; int is_included; int seen_eos, child_stopped_reading; int sd; char **env; apr_file_t *tempsock; struct cleanup_script_info *info; apr_status_t rv; cgid_dir_conf *mc = (cgid_dir_conf *)ap_get_module_config(r->per_dir_config, &restartd_module); if (strcmp(r->handler,CGI_MAGIC_TYPE) && strcmp(r->handler,"cgi-script")) return DECLINED; /* It is a CGI but we shouldn't handle it, let mod_cgi do it */ if (!mc->retainperms) return DECLINED; /* One final check. We only want to run Start/Stop/Restart */ if ((ap_regexec(&uriPat, r->uri, 0, NULL,0) != 0)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "mod_restartd: attempt to run unknown program at %s. Bailing out.", r->uri); return DECLINED; } conf = ap_get_module_config(r->server->module_config, &restartd_module); is_included = !strcmp(r->protocol, "INCLUDED"); if ((argv0 = strrchr(r->filename, '/')) != NULL) argv0++; else argv0 = r->filename; nph = !(strncmp(argv0, "nph-", 4)); argv0 = r->filename; if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r)) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "Options ExecCGI is off in this directory"); if (nph && is_included) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "attempt to include NPH CGI script"); #if defined(OS2) || defined(WIN32) #error mod_restartd does not work on this platform. If you teach it to, look #error at mod_cgid.c for required code in this path. #else if (r->finfo.filetype == 0) return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, "script not found or unable to stat"); #endif if (r->finfo.filetype == APR_DIR) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "attempt to invoke directory as script"); if ((r->used_path_info == AP_REQ_REJECT_PATH_INFO) && r->path_info && *r->path_info) { /* default to accept */ return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, "AcceptPathInfo off disallows user's path"); } /* if (!ap_suexec_enabled) { if (!ap_can_exec(&r->finfo)) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "file permissions deny server execution"); } */ ap_add_common_vars(r); ap_add_cgi_vars(r); env = ap_create_environment(r->pool, r->subprocess_env); if ((retval = connect_to_daemon(&sd, r, conf)) != OK) { return retval; } rv = send_req(sd, r, argv0, env, CGI_REQ); if (rv != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "write to cgi daemon process"); } info = apr_palloc(r->pool, sizeof(struct cleanup_script_info)); info->r = r; info->conn_id = r->connection->id; info->conf = conf; apr_pool_cleanup_register(r->pool, info, cleanup_script, apr_pool_cleanup_null); /* We are putting the socket discriptor into an apr_file_t so that we can * use a pipe bucket to send the data to the client. APR will create * a cleanup for the apr_file_t which will close the socket, so we'll * get rid of the cleanup we registered when we created the socket. */ apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool); apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket); if ((argv0 = strrchr(r->filename, '/')) != NULL) argv0++; else argv0 = r->filename; /* Transfer any put/post args, CERN style... * Note that we already ignore SIGPIPE in the core server. */ bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); seen_eos = 0; child_stopped_reading = 0; if (conf->logname) { dbuf = apr_palloc(r->pool, conf->bufbytes + 1); dbpos = 0; } do { apr_bucket *bucket; rv = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES, APR_BLOCK_READ, HUGE_STRING_LEN); if (rv != APR_SUCCESS) { return rv; } for (bucket = APR_BRIGADE_FIRST(bb); bucket != APR_BRIGADE_SENTINEL(bb); bucket = APR_BUCKET_NEXT(bucket)) { const char *data; apr_size_t len; if (APR_BUCKET_IS_EOS(bucket)) { seen_eos = 1; break; } /* We can't do much with this. */ if (APR_BUCKET_IS_FLUSH(bucket)) { continue; } /* If the child stopped, we still must read to EOS. */ if (child_stopped_reading) { continue; } /* read */ apr_bucket_read(bucket, &data, &len, APR_BLOCK_READ); if (conf->logname && dbpos < conf->bufbytes) { int cursize; if ((dbpos + len) > conf->bufbytes) { cursize = conf->bufbytes - dbpos; } else { cursize = len; } memcpy(dbuf + dbpos, data, cursize); dbpos += cursize; } /* Keep writing data to the child until done or too much time * elapses with no progress or an error occurs. */ rv = apr_file_write_full(tempsock, data, len, NULL); if (rv != APR_SUCCESS) { /* silly script stopped reading, soak up remaining message */ child_stopped_reading = 1; } } apr_brigade_cleanup(bb); } while (!seen_eos); if (conf->logname) { dbuf[dbpos] = '\0'; } /* we're done writing, or maybe we didn't write at all; * force EOF on child's stdin so that the cgi detects end (or * absence) of data */ shutdown(sd, 1); /* Handle script return... */ if (!nph) { const char *location; char sbuf[MAX_STRING_LEN]; int ret; bb = apr_brigade_create(r->pool, c->bucket_alloc); b = apr_bucket_pipe_create(tempsock, c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); if ((ret = ap_scan_script_header_err_brigade(r, bb, sbuf))) { return log_script(r, conf, ret, dbuf, sbuf, bb, NULL); } location = apr_table_get(r->headers_out, "Location"); if (location && location[0] == '/' && r->status == 200) { /* Soak up all the script output */ discard_script_output(bb); apr_brigade_destroy(bb); /* This redirect needs to be a GET no matter what the original * method was. */ r->method = apr_pstrdup(r->pool, "GET"); r->method_number = M_GET; /* We already read the message body (if any), so don't allow * the redirected request to think it has one. We can ignore * Transfer-Encoding, since we used REQUEST_CHUNKED_ERROR. */ apr_table_unset(r->headers_in, "Content-Length"); ap_internal_redirect_handler(location, r); return OK; } else if (location && r->status == 200) { /* XX Note that if a script wants to produce its own Redirect * body, it now has to explicitly *say* "Status: 302" */ discard_script_output(bb); apr_brigade_destroy(bb); return HTTP_MOVED_TEMPORARILY; } ap_pass_brigade(r->output_filters, bb); } if (nph) { struct ap_filter_t *cur; /* get rid of all filters up through protocol... since we * haven't parsed off the headers, there is no way they can * work */ cur = r->proto_output_filters; while (cur && cur->frec->ftype < AP_FTYPE_CONNECTION) { cur = cur->next; } r->output_filters = r->proto_output_filters = cur; bb = apr_brigade_create(r->pool, c->bucket_alloc); b = apr_bucket_pipe_create(tempsock, c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); ap_pass_brigade(r->output_filters, bb); } return OK; /* NOT r->status, even if it has changed. */ } /*============================================================================ *============================================================================ * This is the beginning of the cgi filter code moved from mod_include. This * is the code required to handle the "exec" SSI directive. *============================================================================ *============================================================================*/ static apr_status_t include_cgi(include_ctx_t *ctx, ap_filter_t *f, apr_bucket_brigade *bb, char *s) { request_rec *r = f->r; request_rec *rr = ap_sub_req_lookup_uri(s, r, f->next); int rr_status; if (rr->status != HTTP_OK) { ap_destroy_sub_req(rr); return APR_EGENERAL; } /* No hardwired path info or query allowed */ if ((rr->path_info && rr->path_info[0]) || rr->args) { ap_destroy_sub_req(rr); return APR_EGENERAL; } if (rr->finfo.filetype != APR_REG) { ap_destroy_sub_req(rr); return APR_EGENERAL; } /* Script gets parameters of the *document*, for back compatibility */ rr->path_info = r->path_info; /* hard to get right; see mod_cgi.c */ rr->args = r->args; /* Force sub_req to be treated as a CGI request, even if ordinary * typing rules would have called it something else. */ ap_set_content_type(rr, CGI_MAGIC_TYPE); /* Run it. */ rr_status = ap_run_sub_req(rr); if (ap_is_HTTP_REDIRECT(rr_status)) { const char *location = apr_table_get(rr->headers_out, "Location"); if (location) { char *buffer; location = ap_escape_html(rr->pool, location); buffer = apr_pstrcat(ctx->pool, "", location, "", NULL); APR_BRIGADE_INSERT_TAIL(bb, apr_bucket_pool_create(buffer, strlen(buffer), ctx->pool, f->c->bucket_alloc)); } } ap_destroy_sub_req(rr); return APR_SUCCESS; } /* This is the special environment used for running the "exec cmd=" * variety of SSI directives. */ static void add_ssi_vars(request_rec *r) { apr_table_t *e = r->subprocess_env; if (r->path_info && r->path_info[0] != '\0') { request_rec *pa_req; apr_table_setn(e, "PATH_INFO", ap_escape_shell_cmd(r->pool, r->path_info)); pa_req = ap_sub_req_lookup_uri(ap_escape_uri(r->pool, r->path_info), r, NULL); if (pa_req->filename) { apr_table_setn(e, "PATH_TRANSLATED", apr_pstrcat(r->pool, pa_req->filename, pa_req->path_info, NULL)); } ap_destroy_sub_req(pa_req); } if (r->args) { char *arg_copy = apr_pstrdup(r->pool, r->args); apr_table_setn(e, "QUERY_STRING", r->args); ap_unescape_url(arg_copy); apr_table_setn(e, "QUERY_STRING_UNESCAPED", ap_escape_shell_cmd(r->pool, arg_copy)); } } static int include_cmd(include_ctx_t *ctx, ap_filter_t *f, apr_bucket_brigade *bb, char *command) { char **env; int sd; int retval; apr_file_t *tempsock = NULL; request_rec *r = f->r; cgid_server_conf *conf = ap_get_module_config(r->server->module_config, &restartd_module); struct cleanup_script_info *info; add_ssi_vars(r); env = ap_create_environment(r->pool, r->subprocess_env); if ((retval = connect_to_daemon(&sd, r, conf)) != OK) { return retval; } send_req(sd, r, command, env, SSI_REQ); info = apr_palloc(r->pool, sizeof(struct cleanup_script_info)); info->r = r; info->conn_id = r->connection->id; info->conf = conf; /* for this type of request, the script is invoked through an * intermediate shell process... cleanup_script is only able * to knock out the shell process, not the actual script */ apr_pool_cleanup_register(r->pool, info, cleanup_script, apr_pool_cleanup_null); /* We are putting the socket discriptor into an apr_file_t so that we can * use a pipe bucket to send the data to the client. APR will create * a cleanup for the apr_file_t which will close the socket, so we'll * get rid of the cleanup we registered when we created the socket. */ apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool); apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket); APR_BRIGADE_INSERT_TAIL(bb, apr_bucket_pipe_create(tempsock, f->c->bucket_alloc)); ctx->flush_now = 1; return APR_SUCCESS; } static apr_status_t handle_exec(include_ctx_t *ctx, ap_filter_t *f, apr_bucket_brigade *bb) { char *tag = NULL; char *tag_val = NULL; request_rec *r = f->r; char *file = r->filename; char parsed_string[MAX_STRING_LEN]; if (!ctx->argc) { ap_log_rerror(APLOG_MARK, (ctx->flags & SSI_FLAG_PRINTING) ? APLOG_ERR : APLOG_WARNING, 0, r, "missing argument for exec element in %s", r->filename); } if (!(ctx->flags & SSI_FLAG_PRINTING)) { return APR_SUCCESS; } if (!ctx->argc) { SSI_CREATE_ERROR_BUCKET(ctx, f, bb); return APR_SUCCESS; } if (ctx->flags & SSI_FLAG_NO_EXEC) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "exec used but not allowed " "in %s", r->filename); SSI_CREATE_ERROR_BUCKET(ctx, f, bb); return APR_SUCCESS; } while (1) { cgid_pfn_gtv(ctx, &tag, &tag_val, SSI_VALUE_DECODED); if (!tag || !tag_val) { break; } if (!strcmp(tag, "cmd")) { apr_status_t rv; cgid_pfn_ps(ctx, tag_val, parsed_string, sizeof(parsed_string), SSI_EXPAND_LEAVE_NAME); rv = include_cmd(ctx, f, bb, parsed_string); if (rv != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "execution failure for parameter \"%s\" " "to tag exec in file %s", tag, r->filename); SSI_CREATE_ERROR_BUCKET(ctx, f, bb); break; } } else if (!strcmp(tag, "cgi")) { apr_status_t rv; cgid_pfn_ps(ctx, tag_val, parsed_string, sizeof(parsed_string), SSI_EXPAND_DROP_NAME); rv = include_cgi(ctx, f, bb, parsed_string); if (rv != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "invalid CGI ref " "\"%s\" in %s", tag_val, file); SSI_CREATE_ERROR_BUCKET(ctx, f, bb); break; } } else { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter " "\"%s\" to tag exec in %s", tag, file); SSI_CREATE_ERROR_BUCKET(ctx, f, bb); break; } } return APR_SUCCESS; } /*============================================================================ *============================================================================ * This is the end of the cgi filter code moved from mod_include. *============================================================================ *============================================================================*/ static void register_hook(apr_pool_t *p) { static const char * const aszPre[] = { "mod_include.c", NULL }; static const char * const aszPostHandler[] = { "mod_cgi.c", NULL }; ap_hook_pre_config(cgid_pre_config, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_config(cgid_init, aszPre, NULL, APR_HOOK_MIDDLE); ap_hook_handler(cgid_handler, NULL, aszPostHandler, APR_HOOK_MIDDLE); } module AP_MODULE_DECLARE_DATA restartd_module = { STANDARD20_MODULE_STUFF, create_cgid_dir_config, /* dir config creater */ NULL, /* dir merger --- default is to override */ create_cgid_config, /* server config */ merge_cgid_config, /* merge server config */ cgid_cmds, /* command table */ register_hook /* register_handlers */ }; --- NEW FILE mod_suexec-2.2.h --- /* Copyright 2001-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file mod_suexec.h * @brief SuExec Extension Module for Apache * * @defgroup MOD_SUEXEC mod_suexec * @ingroup APACHE_MODS * @{ */ #include "unixd.h" typedef struct { ap_unix_identity_t ugid; int active; } suexec_config_t; /** @}*/ Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/mod_restartd/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Makefile.am 1 Nov 2005 03:34:20 -0000 1.6 +++ Makefile.am 31 Jan 2006 22:38:56 -0000 1.7 @@ -2,17 +2,20 @@ lib_LTLIBRARIES = libmodrestartd.la ## Define the source file for the module -libmodrestartd_la_SOURCES = mod_restartd.c +# the version suffix is -2.2 for Apache 2.2 - it is empty for 2.0 +libmodrestartd_la_SOURCES = mod_restartd at ap_ver_suf@.c ## Set the includes and libraries needed INCLUDES = @apr_inc@ -I at apache_inc@ +EXTRA_CPPFLAGS=@extra_cppflags@ + install-libLTLIBRARIES: libmodrestartd.la @APXS@ -i -a -n restartd libmodrestartd.la LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) + $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/mod_restartd/Makefile.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Makefile.in 30 Jan 2006 21:56:05 -0000 1.6 +++ Makefile.in 31 Jan 2006 22:38:56 -0000 1.7 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.6.3 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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. @@ -13,169 +13,246 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -SHELL = @SHELL@ + +SOURCES = $(libmodrestartd_la_SOURCES) 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 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@ -INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c -INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) -transform = @program_transform_name@ +transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -host_alias = @host_alias@ +build_triplet = @build@ host_triplet = @host@ - -EXEEXT = @EXEEXT@ -OBJEXT = @OBJEXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + install-sh ltmain.sh missing mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libmodrestartd_la_LIBADD = +am_libmodrestartd_la_OBJECTS = mod_restartd at ap_ver_suf@.lo +libmodrestartd_la_OBJECTS = $(am_libmodrestartd_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +SOURCES = $(libmodrestartd_la_SOURCES) +DIST_SOURCES = $(libmodrestartd_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ APR_CONFIG = @APR_CONFIG@ APXS = @APXS@ AR = @AR@ -AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ EGREP = @EGREP@ +EXEEXT = @EXEEXT@ F77 = @F77@ -GCJ = @GCJ@ -GCJFLAGS = @GCJFLAGS@ +FFLAGS = @FFLAGS@ +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@ -OBJDUMP = @OBJDUMP@ +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@ -RC = @RC@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ap_ver_suf = @ap_ver_suf@ apache_bin = @apache_bin@ apache_conf = @apache_conf@ apache_inc = @apache_inc@ apache_prefix = @apache_prefix@ apr_inc = @apr_inc@ +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@ +extra_cppflags = @extra_cppflags@ +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@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ lib_LTLIBRARIES = libmodrestartd.la -libmodrestartd_la_SOURCES = mod_restartd.c - +# the version suffix is -2.2 for Apache 2.2 - it is empty for 2.0 +libmodrestartd_la_SOURCES = mod_restartd at ap_ver_suf@.c INCLUDES = @apr_inc@ -I at apache_inc@ - +EXTRA_CPPFLAGS = @extra_cppflags@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) - + $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(lib_LTLIBRARIES) - -libmodrestartd_la_LDFLAGS = -libmodrestartd_la_LIBADD = -am_libmodrestartd_la_OBJECTS = mod_restartd.lo -libmodrestartd_la_OBJECTS = $(am_libmodrestartd_la_OBJECTS) - -DEFS = @DEFS@ -DEFAULT_INCLUDES = -I. -I$(srcdir) -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles - at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/mod_restartd.Plo -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -CFLAGS = @CFLAGS@ -DIST_SOURCES = $(libmodrestartd_la_SOURCES) -DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ - Makefile.in NEWS aclocal.m4 config.guess config.sub configure \ - configure.in depcomp install-sh ltmain.sh missing mkinstalldirs -SOURCES = $(libmodrestartd_la_SOURCES) - all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj - -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; -$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): configure.in +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -libLTLIBRARIES_INSTALL = $(INSTALL) uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @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; \ + @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done 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 -z "$dir" && dir=.; \ + test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done @@ -183,34 +260,33 @@ $(LINK) -rpath $(libdir) $(libmodrestartd_la_LDFLAGS) $(libmodrestartd_la_OBJECTS) $(libmodrestartd_la_LIBADD) $(LIBS) mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c - at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mod_restartd.Plo at am__quote@ - -distclean-depend: - -rm -rf ./$(DEPDIR) + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mod_restartd at ap_ver_suf@.Plo at am__quote@ .c.o: - at AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ - at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + at am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: - at AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ - at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(COMPILE) -c `cygpath -w $<` + at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: - at AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ - at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ - at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< -CCDEPMODE = @CCDEPMODE@ + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + at am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -222,11 +298,6 @@ -rm -f libtool uninstall-info-am: -ETAGS = etags -ETAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -235,6 +306,7 @@ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -246,8 +318,24 @@ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +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: @@ -256,29 +344,23 @@ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = . -distdir = $(PACKAGE)-$(VERSION) - -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } - -GZIP_ENV = --best -distcleancheck_listfiles = find . -type f -print + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - @list='$(DISTFILES)'; for file in $$list; do \ + @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"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -299,26 +381,54 @@ ! -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 + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | 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 - + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/=build - mkdir $(distdir)/=inst + mkdir $(distdir)/_build + mkdir $(distdir)/_inst chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ - && cd $(distdir)/=build \ - && ../configure --srcdir=.. --prefix=$$dc_install_base \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && 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 \ @@ -326,32 +436,49 @@ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - find $$dc_install_base -type f -print ; \ - exit 1; } >&2 ) \ - && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ - && rm -f $(distdir).tar.gz \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$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 \ + && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) - @echo "$(distdir).tar.gz is ready for distribution" | \ - sed 'h;s/./=/g;p;x;p;x' + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${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 \ + @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 after distclean:" ; \ + @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-am all-am: Makefile $(LTLIBRARIES) - installdirs: - $(mkinstalldirs) $(DESTDIR)$(libdir) - + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -363,7 +490,7 @@ installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -371,7 +498,7 @@ clean-generic: distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -383,13 +510,17 @@ distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -distclean-am: clean-am distclean-compile distclean-depend \ - distclean-generic distclean-libtool distclean-tags + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -406,7 +537,9 @@ maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf autom4te.cache + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am @@ -414,20 +547,30 @@ mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES -.PHONY: GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool dist dist-all dist-gzip \ - distcheck distclean distclean-compile distclean-depend \ - distclean-generic distclean-libtool distclean-tags \ - distcleancheck distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \ + dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ install-exec-am 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 tags uninstall \ - uninstall-am uninstall-info-am uninstall-libLTLIBRARIES + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-libLTLIBRARIES install-libLTLIBRARIES: libmodrestartd.la View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.5 -r 1.6 aclocal.m4 Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/mod_restartd/aclocal.m4,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- aclocal.m4 30 Jan 2006 22:00:19 -0000 1.5 +++ aclocal.m4 31 Jan 2006 22:38:56 -0000 1.6 @@ -1,7 +1,7 @@ -# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- +# generated automatically by aclocal 1.9.5 -*- Autoconf -*- -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 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. @@ -11,3693 +11,3471 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Do all the work for Automake. -*- Autoconf -*- - -# 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. - -# 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. +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# 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. +# serial 47 AC_PROG_LIBTOOL -# 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 +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) -# 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_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) -AC_PREREQ([2.52]) +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL -# 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([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 +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl -# 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 +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)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 +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL -_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 -]) -]) -# Copyright 2002 Free Software Foundation, Inc. +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl -# 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. +AC_REQUIRE([AC_PROG_LN_S])dnl [...10755 lines suppressed...] +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 conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + 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". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 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. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# 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])]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 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. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break done - done -done -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done done -SED=$lt_cv_path_SED -]) -AC_MSG_RESULT([$SED]) -]) +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.5 -r 1.6 configure Index: configure =================================================================== RCS file: /cvs/dirsec/mod_restartd/configure,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- configure 30 Jan 2006 23:14:17 -0000 1.5 +++ configure 31 Jan 2006 22:38:57 -0000 1.6 @@ -278,7 +278,7 @@ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then @@ -462,7 +462,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL APR_CONFIG APXS apr_inc apache_inc apache_conf apache_prefix apache_bin LIBOBJS LTLIBOBJS' +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 install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL APR_CONFIG APXS! apr_inc apache_inc apache_conf apache_prefix apache_bin extra_cppflags ap_ver_suf LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1022,8 +1022,8 @@ 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 + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] @@ -1497,7 +1497,7 @@ # Automake initialization -am__api_version="1.6" +am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1660,7 +1660,6 @@ program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed - # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -1674,6 +1673,39 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +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. @@ -1743,7 +1775,16 @@ SET_MAKE="MAKE=${MAKE-make}" fi - # test to see if srcdir already configured +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# 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 @@ -1751,6 +1792,16 @@ { (exit 1); exit 1; }; } fi +# 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=mod_restartd VERSION=1.0 @@ -1781,9 +1832,6 @@ 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 @@ -1876,6 +1924,13 @@ # We need awk for the "check" target. The system "awk" is bad on # some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + @@ -2810,24 +2865,16 @@ 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 - +DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' -doit: +am__doit: @echo done +.PHONY: am__doit 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 @@ -2842,7 +2889,7 @@ # 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 | fgrep -v 'ing directory'`" = "done"; then +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU @@ -2902,18 +2949,34 @@ # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. [...4608 lines suppressed...] - APXS=/usr/sbin/apxs - echo "$as_me:$LINENO: result: found $APXS. Use --with-apxs to specify another." >&5 -echo "${ECHO_T}found $APXS. Use --with-apxs to specify another." >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi -fi - -# last resort -if test -z "$APXS"; then - echo "$as_me:$LINENO: checking for apxs in your PATH" >&5 -echo $ECHO_N "checking for apxs in your PATH... $ECHO_C" >&6 # Extract the first word of "apxs", so it can be a program name with args. set dummy apxs; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -19557,7 +20167,8 @@ ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH +as_dummy="/usr/local/apache/sbin:/usr/sbin:$PATH" +for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -19570,6 +20181,7 @@ done done + test -z "$ac_cv_path_APXS" && ac_cv_path_APXS="NO_APXS" ;; esac fi @@ -19583,16 +20195,19 @@ echo "${ECHO_T}no" >&6 fi - if test -n "$APXS"; then + if test -x $APXS; then echo "$as_me:$LINENO: result: found $APXS. Use --with-apxs to specify another." >&5 echo "${ECHO_T}found $APXS. Use --with-apxs to specify another." >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi # and finally if test -z "$APXS"; then - { { echo "$as_me:$LINENO: error: apxs was not found. use --with-apxs to specifiy it." >&5 -echo "$as_me: error: apxs was not found. use --with-apxs to specifiy it." >&2;} + { { echo "$as_me:$LINENO: error: apxs was not found. use --with-apxs to specify it." >&5 +echo "$as_me: error: apxs was not found. use --with-apxs to specify it." >&2;} { (exit 1); exit 1; }; } fi @@ -19601,6 +20216,17 @@ apache_conf=`$APXS -q SYSCONFDIR` apache_prefix=`$APXS -q PREFIX` apache_bin=`$APXS -q SBINDIR` +extra_cppflags=`$APXS -q EXTRA_CPPFLAGS` + +# figure out which version of mod_restartd.c to use +apr_version=`$APR_CONFIG --version` +case $apr_version in +1.*) ap_ver_suf="-2.2" ;; +0.9*) ap_ver_suf= ;; +*) { { echo "$as_me:$LINENO: error: APR version $apr_version is not supported by this module" >&5 +echo "$as_me: error: APR version $apr_version is not supported by this module" >&2;} + { (exit 1); exit 1; }; } ;; +esac if ! test -f "$apache_inc/apr.h"; then if test -z "$apr_inc"; then @@ -19618,6 +20244,8 @@ + + # Write config.status and the Makefile ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF @@ -19749,6 +20377,20 @@ 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 +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 : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -20277,6 +20919,7 @@ s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s, at INSTALL_DATA@,$INSTALL_DATA,;t t +s, at CYGPATH_W@,$CYGPATH_W,;t t s, at PACKAGE@,$PACKAGE,;t t s, at VERSION@,$VERSION,;t t s, at ACLOCAL@,$ACLOCAL,;t t @@ -20284,13 +20927,17 @@ s, at AUTOMAKE@,$AUTOMAKE,;t t s, at AUTOHEADER@,$AUTOHEADER,;t t s, at MAKEINFO@,$MAKEINFO,;t t -s, at AMTAR@,$AMTAR,;t t s, at install_sh@,$install_sh,;t t s, at STRIP@,$STRIP,;t t s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s, at mkdir_p@,$mkdir_p,;t t s, at AWK@,$AWK,;t t s, at SET_MAKE@,$SET_MAKE,;t t +s, at am__leading_dot@,$am__leading_dot,;t t +s, at AMTAR@,$AMTAR,;t t +s, at am__tar@,$am__tar,;t t +s, at am__untar@,$am__untar,;t t s, at CC@,$CC,;t t s, at CFLAGS@,$CFLAGS,;t t s, at LDFLAGS@,$LDFLAGS,;t t @@ -20305,6 +20952,8 @@ s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s, at CCDEPMODE@,$CCDEPMODE,;t t +s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s, at build@,$build,;t t s, at build_cpu@,$build_cpu,;t t s, at build_vendor@,$build_vendor,;t t @@ -20325,6 +20974,8 @@ s, at CXXFLAGS@,$CXXFLAGS,;t t s, at ac_ct_CXX@,$ac_ct_CXX,;t t s, at CXXDEPMODE@,$CXXDEPMODE,;t t +s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s, at CXXCPP@,$CXXCPP,;t t s, at F77@,$F77,;t t s, at FFLAGS@,$FFLAGS,;t t @@ -20337,6 +20988,8 @@ s, at apache_conf@,$apache_conf,;t t s, at apache_prefix@,$apache_prefix,;t t s, at apache_bin@,$apache_bin,;t t +s, at extra_cppflags@,$extra_cppflags,;t t +s, at ap_ver_suf@,$ap_ver_suf,;t t s, at LIBOBJS@,$LIBOBJS,;t t s, at LTLIBOBJS@,$LTLIBOBJS,;t t CEOF @@ -20716,27 +21369,21 @@ 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"` + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # 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" | \ + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. 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 " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue Index: configure.in =================================================================== RCS file: /cvs/dirsec/mod_restartd/configure.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- configure.in 1 Nov 2005 03:34:19 -0000 1.4 +++ configure.in 31 Jan 2006 22:38:57 -0000 1.5 @@ -26,17 +26,22 @@ then AC_MSG_RESULT([using $withval]) APR_CONFIG=$withval - else - AC_PATH_PROG(APR_CONFIG, apr-config) - fi - if test -n "$APR_CONFIG"; then - apr_inc=`$APR_CONFIG --includes` - else - AC_MSG_ERROR([apr-config not found]) fi ], AC_MSG_RESULT(no)) +if test -z "$APR_CONFIG" ; then + AC_MSG_CHECKING(for apr-1-config and apr-config) + AC_PATH_PROGS(APR_CONFIG, apr-1-config apr-config, NO_APR_CONFIG, [$PATH:/usr/local/apache/sbin:/usr/sbin]) +fi + +if test -n "$APR_CONFIG"; then + AC_MSG_RESULT([using $APR_CONFIG. Use --with-apr-config to specify another.]) + apr_inc=`$APR_CONFIG --includes` +else + AC_MSG_ERROR([neither apr-config nor apr-1-config were not found. use --with-apr-config to specify it.]) +fi + AC_CHECKING(for apxs) # check for --with-apxs @@ -58,29 +63,17 @@ # since it's the default Apache location if test -z "$APXS"; then AC_MSG_CHECKING(for apxs in /usr/local/apache/sbin and /usr/sbin) - if test -x /usr/local/apache/sbin/apxs; then - APXS=/usr/local/apache/sbin/apxs - AC_MSG_RESULT([found $APXS. Use --with-apxs to specify another.]) - elif test -x /usr/sbin/apxs; then - APXS=/usr/sbin/apxs + AC_PATH_PROG(APXS, apxs, NO_APXS, [/usr/local/apache/sbin:/usr/sbin:$PATH]) + if test -x $APXS; then AC_MSG_RESULT([found $APXS. Use --with-apxs to specify another.]) else AC_MSG_RESULT(no) fi fi -# last resort -if test -z "$APXS"; then - AC_MSG_CHECKING(for apxs in your PATH) - AC_PATH_PROG(APXS, apxs) - if test -n "$APXS"; then - AC_MSG_RESULT([found $APXS. Use --with-apxs to specify another.]) - fi -fi - # and finally if test -z "$APXS"; then - AC_MSG_ERROR([apxs was not found. use --with-apxs to specifiy it.]) + AC_MSG_ERROR([apxs was not found. use --with-apxs to specify it.]) fi # Get some variables we need for Makefile.in @@ -88,6 +81,15 @@ apache_conf=`$APXS -q SYSCONFDIR` apache_prefix=`$APXS -q PREFIX` apache_bin=`$APXS -q SBINDIR` +extra_cppflags=`$APXS -q EXTRA_CPPFLAGS` + +# figure out which version of mod_restartd.c to use +apr_version=`$APR_CONFIG --version` +case $apr_version in +1.*) ap_ver_suf="-2.2" ;; +0.9*) ap_ver_suf= ;; +*) AC_MSG_ERROR(APR version $apr_version is not supported by this module) ;; +esac if ! test -f "$apache_inc/apr.h"; then if test -z "$apr_inc"; then @@ -102,6 +104,8 @@ AC_SUBST(apache_conf) AC_SUBST(apache_prefix) AC_SUBST(apache_bin) +AC_SUBST(extra_cppflags) +AC_SUBST(ap_ver_suf) # Write config.status and the Makefile AC_OUTPUT(Makefile)