mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-06 11:21:22 +02:00
19512: --enable-pcre option
This commit is contained in:
parent
10ffd20771
commit
5138a42995
3 changed files with 24 additions and 1 deletions
14
INSTALL
14
INSTALL
|
@ -359,6 +359,20 @@ correct handling of these types.
|
||||||
None of this is relevant for 64-bit systems; zsh should compile and run
|
None of this is relevant for 64-bit systems; zsh should compile and run
|
||||||
without problems if (sizeof(long) == 8).
|
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
|
Options For Configure
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name=zsh/pcre
|
name=zsh/pcre
|
||||||
link=dynamic
|
link=`if test x$enable_pcre = xyes; then echo dynamic; else echo no; fi`
|
||||||
load=no
|
load=no
|
||||||
|
|
||||||
autobins="pcre_compile pcre_study pcre_match"
|
autobins="pcre_compile pcre_study pcre_match"
|
||||||
|
|
|
@ -308,6 +308,11 @@ else
|
||||||
AC_DEFINE_UNQUOTED(MAX_FUNCTION_DEPTH, $enableval)
|
AC_DEFINE_UNQUOTED(MAX_FUNCTION_DEPTH, $enableval)
|
||||||
fi])
|
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 ------------------
|
||||||
dnl CHECK THE COMPILER
|
dnl CHECK THE COMPILER
|
||||||
dnl ------------------
|
dnl ------------------
|
||||||
|
@ -495,6 +500,7 @@ AC_HEADER_STAT
|
||||||
AC_HEADER_SYS_WAIT
|
AC_HEADER_SYS_WAIT
|
||||||
|
|
||||||
oldcflags="$CFLAGS"
|
oldcflags="$CFLAGS"
|
||||||
|
if test x$enable_pcre = xyes; then
|
||||||
AC_CHECK_PROG([PCRECONF], pcre-config, pcre-config)
|
AC_CHECK_PROG([PCRECONF], pcre-config, pcre-config)
|
||||||
dnl Typically (meaning on this single RedHat 9 box in front of me)
|
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 pcre-config --cflags produces a -I output which needs to go into
|
||||||
|
@ -503,6 +509,7 @@ dnl producing a warning.
|
||||||
if test "x$ac_cv_prog_PCRECONF" = xpcre-config; then
|
if test "x$ac_cv_prog_PCRECONF" = xpcre-config; then
|
||||||
CPPFLAGS="$CPPFLAGS `pcre-config --cflags`"
|
CPPFLAGS="$CPPFLAGS `pcre-config --cflags`"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \
|
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 \
|
termios.h sys/param.h sys/filio.h string.h memory.h \
|
||||||
|
@ -708,8 +715,10 @@ AC_CHECK_LIB(socket, socket)
|
||||||
|
|
||||||
AC_CHECK_LIB(iconv, iconv)
|
AC_CHECK_LIB(iconv, iconv)
|
||||||
|
|
||||||
|
if test x$enable_pcre = xyes; then
|
||||||
dnl pcre-config should probably be employed here
|
dnl pcre-config should probably be employed here
|
||||||
AC_SEARCH_LIBS(pcre_compile, pcre)
|
AC_SEARCH_LIBS(pcre_compile, pcre)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ---------------------
|
dnl ---------------------
|
||||||
dnl CHECK TERMCAP LIBRARY
|
dnl CHECK TERMCAP LIBRARY
|
||||||
|
|
Loading…
Reference in a new issue