Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: pcre configuration

> 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.)

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 @@
+dnl Do you want to look for pcre support?
+[enable the search for the pcre library (may create run-time library dependencies)]))
 dnl ------------------
 dnl ------------------
@@ -495,6 +500,7 @@
+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`"
 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)
 dnl ---------------------
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_DATE='February 26, 2004'
+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 @@
+link=`if test x$enable_pcre = xyes; then echo dynamic; else echo no; fi`
 autobins="pcre_compile pcre_study pcre_match"

Peter Stephenson <pws@xxxxxxx>                  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.


Messages sorted by: Reverse Date, Date, Thread, Author