[PHP4BETA] CVS update: php4/ext/pcre
| From: | andrey | Date: | Thu, 27 May 1999 13:59:39 +0000 |
| Subject: | [PHP4BETA] CVS update: php4/ext/pcre | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-1127@lists.php.net to get a copy of this message | ||
Date: Thursday May 27, 1999 @ 9:59
Author: andrey
Update of /repository/php4/ext/pcre
In directory php:/tmp/cvs-serv30043
Modified Files:
config.h.stub config.m4 pcre.c php_pcre.h
Log Message:
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. :)
Index: php4/ext/pcre/config.h.stub
diff -u php4/ext/pcre/config.h.stub:1.1 php4/ext/pcre/config.h.stub:1.2
--- php4/ext/pcre/config.h.stub:1.1 Fri May 21 09:17:23 1999
+++ php4/ext/pcre/config.h.stub Thu May 27 09:59:39 1999
@@ -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
+
Index: php4/ext/pcre/config.m4
diff -u php4/ext/pcre/config.m4:1.3 php4/ext/pcre/config.m4:1.4
--- php4/ext/pcre/config.m4:1.3 Wed May 26 21:34:17 1999
+++ php4/ext/pcre/config.m4 Thu May 27 09:59:39 1999
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.3 1999/05/27 01:34:17 sas Exp $
+dnl $Id: config.m4,v 1.4 1999/05/27 13:59:39 andrey Exp $
dnl config.m4 for extension pcre
dnl By default we'll compile and link against the bundled PCRE library
@@ -12,17 +12,21 @@
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 @@
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)
])
Index: php4/ext/pcre/pcre.c
diff -u php4/ext/pcre/pcre.c:1.7 php4/ext/pcre/pcre.c:1.8
--- php4/ext/pcre/pcre.c:1.7 Wed May 26 14:59:04 1999
+++ php4/ext/pcre/pcre.c Thu May 27 09:59:39 1999
@@ -27,13 +27,11 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pcre.c,v 1.7 1999/05/26 18:59:04 andrey Exp $ */
+/* $Id: pcre.c,v 1.8 1999/05/27 13:59:39 andrey Exp $ */
-/* 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"
Index: php4/ext/pcre/php_pcre.h
diff -u php4/ext/pcre/php_pcre.h:1.5 php4/ext/pcre/php_pcre.h:1.6
--- php4/ext/pcre/php_pcre.h:1.5 Wed May 26 21:19:00 1999
+++ php4/ext/pcre/php_pcre.h Thu May 27 09:59:39 1999
@@ -27,14 +27,18 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.h,v 1.5 1999/05/27 01:19:00 zeev Exp $ */
+/* $Id: php_pcre.h,v 1.6 1999/05/27 13:59:39 andrey Exp $ */
#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 @@
#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 @@
#define pcre_module_ptr NULL
-#endif /* HAVE_LIBPCRE */
+#endif /* HAVE_PCRE */
#define phpext_pcre_ptr pcre_module_ptr
--
PHP 4 Beta