zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: pcre configuration
@ 2004-02-27 10:14 Peter Stephenson
  2004-02-27 10:21 ` DervishD
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2004-02-27 10:14 UTC (permalink / raw)
  To: Zsh hackers list

This seems to remove the warning message if pcre is found.

Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.9
diff -u -r1.9 configure.ac
--- configure.ac	26 Feb 2004 12:40:54 -0000	1.9
+++ configure.ac	27 Feb 2004 10:07:16 -0000
@@ -496,8 +496,12 @@
 
 oldcflags="$CFLAGS"
 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
+dnl CPPFLAGS else configure's preprocessor tests don't pick it up,
+dnl producing a warning.
 if test "x$ac_cv_prog_PCRECONF" = xpcre-config; then
-  CFLAGS="$CFLAGS `pcre-config --cflags`"
+  CPPFLAGS="$CPPFLAGS `pcre-config --cflags`"
 fi
 
 AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \

-- 
Peter Stephenson <pws@csr.com>                  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
**********************************************************************


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: pcre configuration
  2004-02-27 10:14 PATCH: pcre configuration Peter Stephenson
@ 2004-02-27 10:21 ` DervishD
  2004-02-27 14:17   ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: DervishD @ 2004-02-27 10:21 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

    Hi Peter :)

 * Peter Stephenson <pws@csr.com> dixit:
> This seems to remove the warning message if pcre is found.

    Just to make sure: is zsh-4.2.x dependent on PCRE or is it
optional? I don't have PCRE installed (nor intentions to do so) but I
would like to upgrade to 4.2.x (specially if no more 4.0.x releases
will be done).
 
    Thanks :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: pcre configuration
  2004-02-27 10:21 ` DervishD
@ 2004-02-27 14:17   ` Peter Stephenson
  2004-02-27 22:41     ` DervishD
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2004-02-27 14:17 UTC (permalink / raw)
  To: Zsh hackers list

DervishD wrote:
>     Just to make sure: is zsh-4.2.x dependent on PCRE or is it
> optional?

It's optional; the warning message appeared if it found pcre because
the consquent configuration was a bit wayward.  There was no problem
if pcre wasn't found.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited. 
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: pcre configuration
  2004-02-27 14:17   ` Peter Stephenson
@ 2004-02-27 22:41     ` DervishD
  2004-02-28 15:16       ` Clint Adams
  0 siblings, 1 reply; 7+ messages in thread
From: DervishD @ 2004-02-27 22:41 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

    Hi Peter :)

 * Peter Stephenson <pws@csr.com> dixit:
> >     Just to make sure: is zsh-4.2.x dependent on PCRE or is it
> > optional?
> It's optional; the warning message appeared if it found pcre because
> the consquent configuration was a bit wayward.  There was no problem
> if pcre wasn't found.

    Thanks for the explanation :) Just one more question: if PCRE is
optional, what is it used for? I mean, zsh supports regexes without
PCRE, so... is maybe for a module which implements the Perl
Compatible regexes?

    Thanks again for the help :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: pcre configuration
  2004-02-27 22:41     ` DervishD
@ 2004-02-28 15:16       ` Clint Adams
  2004-02-28 20:14         ` DervishD
  0 siblings, 1 reply; 7+ messages in thread
From: Clint Adams @ 2004-02-28 15:16 UTC (permalink / raw)
  To: Zsh hackers list

>     Thanks for the explanation :) Just one more question: if PCRE is
> optional, what is it used for? I mean, zsh supports regexes without
> PCRE, so... is maybe for a module which implements the Perl
> Compatible regexes?

Type "man zshmodules" and search for pcre or
info zsh 'The zsh/pcre Module'


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: pcre configuration
  2004-02-28 15:16       ` Clint Adams
@ 2004-02-28 20:14         ` DervishD
  0 siblings, 0 replies; 7+ messages in thread
From: DervishD @ 2004-02-28 20:14 UTC (permalink / raw)
  To: Clint Adams; +Cc: Zsh hackers list

    Hi Clint :)

 * Clint Adams <clint@zsh.org> dixit:
> >     Thanks for the explanation :) Just one more question: if PCRE is
> > optional, what is it used for? I mean, zsh supports regexes without
> > PCRE, so... is maybe for a module which implements the Perl
> > Compatible regexes?
> Type "man zshmodules" and search for pcre or
> info zsh 'The zsh/pcre Module'

    My zsh (4.0.9) doesn't have a zsh/pcre module, so my surprise
when I saw the first message. I'm not going to use zsh/pcre, but is a
very good idea to add it, because I know some people which only uses
Perl due to its regexes...

    Thanks :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* PATCH: pcre configuration
@ 2004-03-01 14:40 Peter Stephenson
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Stephenson @ 2004-03-01 14:40 UTC (permalink / raw)
  To: Zsh hackers list

> 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 <pws@csr.com>                  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
**********************************************************************


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-03-01 14:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-27 10:14 PATCH: pcre configuration Peter Stephenson
2004-02-27 10:21 ` DervishD
2004-02-27 14:17   ` Peter Stephenson
2004-02-27 22:41     ` DervishD
2004-02-28 15:16       ` Clint Adams
2004-02-28 20:14         ` DervishD
2004-03-01 14:40 Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).