From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22368 invoked from network); 1 Mar 2004 14:40:48 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 1 Mar 2004 14:40:48 -0000 Received: (qmail 10702 invoked by alias); 1 Mar 2004 14:40:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19512 Received: (qmail 10691 invoked from network); 1 Mar 2004 14:40:39 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 1 Mar 2004 14:40:39 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.58.19] by sunsite.dk (MessageWall 1.0.8) with SMTP; 1 Mar 2004 14:40:38 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i21Eecv23565 for ; Mon, 1 Mar 2004 14:40:38 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Mon, 1 Mar 2004 14:40:19 +0000 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.5329); Mon, 1 Mar 2004 14:42:10 +0000 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: PATCH: pcre configuration Date: Mon, 01 Mar 2004 14:40:37 +0000 Message-ID: <22501.1078152037@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 01 Mar 2004 14:42:10.0822 (UTC) FILETIME=[60F57A60:01C3FF9B] > You're right, we probably need an explicit --enable for now. Putting > that around the pcre checks and setting a flag to test in the .mdd > file should be good enough. How about this? I could easily have missed something, please check. (Ideally we should test if pcre was actually found in the .mdd file, but I haven't got time. If somebody else did, that would be splendid.) Index: INSTALL =================================================================== RCS file: /cvsroot/zsh/zsh/INSTALL,v retrieving revision 1.12 diff -u -r1.12 INSTALL --- INSTALL 4 Apr 2003 13:22:56 -0000 1.12 +++ INSTALL 1 Mar 2004 14:30:54 -0000 @@ -359,6 +359,20 @@ None of this is relevant for 64-bit systems; zsh should compile and run without problems if (sizeof(long) == 8). +Searching for `pcre' +-------------------- + +Zsh has a module which allows the pcre regular expression library to be +used via shell builtins. Compiling this library into the shell with +dynamic loading (the default where available) produces a dependency on the +library libpcre.so. This is a problem on systems where zsh needs to be +available at boot before the directory containing libpcre.so (for +example /usr/lib or /usr/local/lib) is mounted. For this reason, +pcre support will only be searched for if the option --enable-pcre +is passed to configure. + +(Future versions of the shell may have a better fix for this problem.) + Options For Configure --------------------- Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.10 diff -u -r1.10 configure.ac --- configure.ac 27 Feb 2004 10:17:38 -0000 1.10 +++ configure.ac 1 Mar 2004 14:30:55 -0000 @@ -308,6 +308,11 @@ AC_DEFINE_UNQUOTED(MAX_FUNCTION_DEPTH, $enableval) fi]) +dnl Do you want to look for pcre support? +AC_ARG_ENABLE(pcre, +AC_HELP_STRING([--enable-pcre], +[enable the search for the pcre library (may create run-time library dependencies)])) + dnl ------------------ dnl CHECK THE COMPILER dnl ------------------ @@ -495,6 +500,7 @@ AC_HEADER_SYS_WAIT oldcflags="$CFLAGS" +if test x$enable_pcre = xyes; then AC_CHECK_PROG([PCRECONF], pcre-config, pcre-config) dnl Typically (meaning on this single RedHat 9 box in front of me) dnl pcre-config --cflags produces a -I output which needs to go into @@ -503,6 +509,7 @@ if test "x$ac_cv_prog_PCRECONF" = xpcre-config; then CPPFLAGS="$CPPFLAGS `pcre-config --cflags`" fi +fi AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \ termios.h sys/param.h sys/filio.h string.h memory.h \ @@ -708,8 +715,10 @@ AC_CHECK_LIB(iconv, iconv) +if test x$enable_pcre = xyes; then dnl pcre-config should probably be employed here AC_SEARCH_LIBS(pcre_compile, pcre) +fi dnl --------------------- dnl CHECK TERMCAP LIBRARY Index: Config/version.mk =================================================================== RCS file: /cvsroot/zsh/zsh/Config/version.mk,v retrieving revision 1.39 diff -u -r1.39 version.mk --- Config/version.mk 26 Feb 2004 15:09:11 -0000 1.39 +++ Config/version.mk 1 Mar 2004 14:30:55 -0000 @@ -27,5 +27,5 @@ # This must also serve as a shell script, so do not add spaces around the # `=' signs. -VERSION=4.2.0-pre-1 -VERSION_DATE='February 26, 2004' +VERSION=4.2.0-pre-2 +VERSION_DATE='March 2, 2004' Index: Src/Modules/pcre.mdd =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/pcre.mdd,v retrieving revision 1.2 diff -u -r1.2 pcre.mdd --- Src/Modules/pcre.mdd 6 Jul 2001 08:32:16 -0000 1.2 +++ Src/Modules/pcre.mdd 1 Mar 2004 14:30:55 -0000 @@ -1,5 +1,5 @@ name=zsh/pcre -link=dynamic +link=`if test x$enable_pcre = xyes; then echo dynamic; else echo no; fi` load=no autobins="pcre_compile pcre_study pcre_match" -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************