mirror of
https://github.com/php/php-src.git
synced 2026-04-26 17:38:14 +02:00
Really fix the configuration now so that it's possible to compile both
against the bundled PCRE library and the one external to the source tree. Crossing my fingers while Zeev compiles this. :)
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
/* define if you want to use the pcre extension */
|
||||
#define HAVE_LIBPCRE 0
|
||||
/* define if you want to use the PCRE extension */
|
||||
#define HAVE_PCRE 0
|
||||
|
||||
/* define if you want to use the bundled PCRE library */
|
||||
#define HAVE_BUNDLED_PCRE 0
|
||||
|
||||
|
||||
+13
-8
@@ -12,17 +12,21 @@ AC_ARG_WITH(pcre-regex,
|
||||
AC_MSG_RESULT(no) ;;
|
||||
yes)
|
||||
EXTRA_LIBS="-Lext/pcre/pcrelib -lpcre $EXTRA_LIBS"
|
||||
INCLUDES="-Ipcrelib $INCLUDES"
|
||||
dnl INCLUDES="-Iext/pcre/pcrelib $INCLUDES"
|
||||
PCRE_SUBDIR="pcrelib"
|
||||
AC_DEFINE(HAVE_LIBPCRE, 1)
|
||||
AC_DEFINE(HAVE_PCRE, 1)
|
||||
AC_DEFINE(HAVE_BUNDLED_PCRE, 1)
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_EXTENSION(pcre) ;;
|
||||
PHP_EXTENSION(pcre) ;;
|
||||
*)
|
||||
test -f $withval/pcre.h && INCLUDES="-I$withval $INCLUDES"
|
||||
test -f $withval/libpcre.a && EXTRA_LIBS="-L$withval -lpcre $EXTRA_LIBS"
|
||||
test -f $withval/pcre.h && PCRE_INCLUDE="-I$withval"
|
||||
test -f $withval/libpcre.a && PCRE_LIB="-L$withval -lpcre"
|
||||
|
||||
if test -n "$PCRE_INCLUDE" && test -n "$PCRE_LIB" ; then
|
||||
AC_DEFINE(HAVE_LIBPCRE, 1)
|
||||
INCLUDES="$PCRE_INCLUDE $INCLUDES"
|
||||
EXTRA_LIBS="$PCRE_LIB $EXTRA_LIBS"
|
||||
AC_DEFINE(HAVE_PCRE, 1)
|
||||
AC_DEFINE(HAVE_BUNDLED_PCRE, 0)
|
||||
PCRE_SUBDIR=
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_EXTENSION(pcre)
|
||||
@@ -32,9 +36,10 @@ AC_ARG_WITH(pcre-regex,
|
||||
esac
|
||||
],[
|
||||
EXTRA_LIBS="-Lext/pcre/pcrelib -lpcre $EXTRA_LIBS"
|
||||
INCLUDES="-Ipcrelib $INCLUDES"
|
||||
dnl INCLUDES="-Iext/pcre/pcrelib $INCLUDES"
|
||||
PCRE_SUBDIR="pcrelib"
|
||||
AC_DEFINE(HAVE_LIBPCRE, 1)
|
||||
AC_DEFINE(HAVE_PCRE, 1)
|
||||
AC_DEFINE(HAVE_BUNDLED_PCRE, 1)
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_EXTENSION(pcre)
|
||||
])
|
||||
|
||||
+13
-8
@@ -12,17 +12,21 @@ AC_ARG_WITH(pcre-regex,
|
||||
AC_MSG_RESULT(no) ;;
|
||||
yes)
|
||||
EXTRA_LIBS="-Lext/pcre/pcrelib -lpcre $EXTRA_LIBS"
|
||||
INCLUDES="-Ipcrelib $INCLUDES"
|
||||
dnl INCLUDES="-Iext/pcre/pcrelib $INCLUDES"
|
||||
PCRE_SUBDIR="pcrelib"
|
||||
AC_DEFINE(HAVE_LIBPCRE, 1)
|
||||
AC_DEFINE(HAVE_PCRE, 1)
|
||||
AC_DEFINE(HAVE_BUNDLED_PCRE, 1)
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_EXTENSION(pcre) ;;
|
||||
PHP_EXTENSION(pcre) ;;
|
||||
*)
|
||||
test -f $withval/pcre.h && INCLUDES="-I$withval $INCLUDES"
|
||||
test -f $withval/libpcre.a && EXTRA_LIBS="-L$withval -lpcre $EXTRA_LIBS"
|
||||
test -f $withval/pcre.h && PCRE_INCLUDE="-I$withval"
|
||||
test -f $withval/libpcre.a && PCRE_LIB="-L$withval -lpcre"
|
||||
|
||||
if test -n "$PCRE_INCLUDE" && test -n "$PCRE_LIB" ; then
|
||||
AC_DEFINE(HAVE_LIBPCRE, 1)
|
||||
INCLUDES="$PCRE_INCLUDE $INCLUDES"
|
||||
EXTRA_LIBS="$PCRE_LIB $EXTRA_LIBS"
|
||||
AC_DEFINE(HAVE_PCRE, 1)
|
||||
AC_DEFINE(HAVE_BUNDLED_PCRE, 0)
|
||||
PCRE_SUBDIR=
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_EXTENSION(pcre)
|
||||
@@ -32,9 +36,10 @@ AC_ARG_WITH(pcre-regex,
|
||||
esac
|
||||
],[
|
||||
EXTRA_LIBS="-Lext/pcre/pcrelib -lpcre $EXTRA_LIBS"
|
||||
INCLUDES="-Ipcrelib $INCLUDES"
|
||||
dnl INCLUDES="-Iext/pcre/pcrelib $INCLUDES"
|
||||
PCRE_SUBDIR="pcrelib"
|
||||
AC_DEFINE(HAVE_LIBPCRE, 1)
|
||||
AC_DEFINE(HAVE_PCRE, 1)
|
||||
AC_DEFINE(HAVE_BUNDLED_PCRE, 1)
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_EXTENSION(pcre)
|
||||
])
|
||||
|
||||
+1
-3
@@ -29,11 +29,9 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Get PCRE library from ftp://ftp.cus.cam.ac.uk/pub/software/programs/pcre/ */
|
||||
|
||||
#include "php.h"
|
||||
|
||||
#if HAVE_LIBPCRE
|
||||
#if HAVE_PCRE
|
||||
|
||||
#include "php_pcre.h"
|
||||
|
||||
|
||||
+8
-4
@@ -32,9 +32,13 @@
|
||||
#ifndef _PHP_PCRE_H
|
||||
#define _PHP_PCRE_H
|
||||
|
||||
#if HAVE_LIBPCRE
|
||||
#if HAVE_PCRE
|
||||
|
||||
#if HAVE_BUNDLED_PCRE
|
||||
#include "pcrelib/pcre.h"
|
||||
#else
|
||||
#include "pcre.h"
|
||||
#endif
|
||||
|
||||
extern void php_info_pcre(ZEND_MODULE_INFO_FUNC_ARGS);
|
||||
extern int php_minit_pcre(INIT_FUNC_ARGS);
|
||||
@@ -50,8 +54,8 @@ extern zend_module_entry pcre_module_entry;
|
||||
#define pcre_module_ptr &pcre_module_entry
|
||||
|
||||
typedef struct {
|
||||
pcre *re;
|
||||
pcre_extra *extra;
|
||||
pcre *re;
|
||||
pcre_extra *extra;
|
||||
} pcre_cache_entry;
|
||||
|
||||
typedef struct {
|
||||
@@ -79,7 +83,7 @@ extern ZEND_API php_pcre_globals pcre_globals;
|
||||
|
||||
#define pcre_module_ptr NULL
|
||||
|
||||
#endif /* HAVE_LIBPCRE */
|
||||
#endif /* HAVE_PCRE */
|
||||
|
||||
#define phpext_pcre_ptr pcre_module_ptr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user