[PHP-DEV] CVS update: php3 From: andrey (php-dev <email protected>)
Date: 05/27/99

Date: Thursday May 27, 1999 @ 11:42
Author: andrey

Update of /repository/php3
In directory php:/tmp/cvs-serv28588

Modified Files:
        Makefile.in config.h.in configure.in internal_functions.c
Log Message:
Backported PCRE support from PHP4. Please test.

Index: php3/Makefile.in
diff -u php3/Makefile.in:1.311 php3/Makefile.in:1.312
--- php3/Makefile.in:1.311 Sun May 23 20:02:06 1999
+++ php3/Makefile.in Thu May 27 11:42:50 1999
@@ -24,7 +24,7 @@
 # +----------------------------------------------------------------------+
 
 #
-# $Id: Makefile.in,v 1.311 1999/05/24 00:02:06 jah Exp $
+# $Id: Makefile.in,v 1.312 1999/05/27 15:42:50 andrey Exp $
 #
 
 prefix =  <email protected>@
@@ -96,7 +96,8 @@
        functions/gettext.c functions/php3_mckcrypt.c \
        functions/yp.c functions/dba.c functions/dba_gdbm.c \
            functions/dba_dbm.c functions/dba_ndbm.c functions/dba_cdb.c \
- functions/mcrypt.c functions/dba_db2.c functions/mhash.c
+ functions/mcrypt.c functions/dba_db2.c functions/mhash.c \
+ functions/pcre.c
 
 FUNCTIONS = $(FUNCTIONS_SOURCE:.c=.o)
 
@@ -289,7 +290,7 @@
  functions/php3_sysvsem.h functions/php3_sysvshm.h \
  functions/php3_dav.h functions/php3_gettext.h functions/php3_wddx.h \
  functions/php3_wddx_a.h functions/php3_yp.h functions/fsock.h \
- functions/php3_mckcrypt.h
+ functions/php3_mckcrypt.h functions/php3_pcre.h
 snprintf.o: snprintf.c config.h
 php3_sprintf.o: php3_sprintf.c config.h
 alloc.o: alloc.c alloc.h php.h php_version.h config.h request_info.h \
@@ -708,6 +709,10 @@
  php3_hash.h alloc.h safe_mode.h fopen-wrappers.h \
  mod_php3.h stack.h operators.h token_cache.h variables.h constants.h \
  internal_functions.h modules.h functions/php3_yp.h
+functions/pcre.o: functions/pcre.c php.h php_version.h config.h request_info.h \
+ php3_hash.h alloc.h safe_mode.h fopen-wrappers.h \
+ mod_php3.h stack.h operators.h token_cache.h variables.h constants.h \
+ internal_functions.h modules.h functions/php3_pcre.h
 
 # Local Variables:
 # tab-width: 4
Index: php3/config.h.in
diff -u php3/config.h.in:1.159 php3/config.h.in:1.160
--- php3/config.h.in:1.159 Sun May 23 20:02:06 1999
+++ php3/config.h.in Thu May 27 11:42:50 1999
@@ -71,6 +71,9 @@
 /* Define if you have the libmcrypt library */
 #undef HAVE_LIBMCRYPT
 
+/* Define if you want to have PCRE support */
+#define HAVE_PCRE 0
+
 /* This is the default configuration file to read */
 #define CONFIGURATION_FILE_PATH "php3.ini"
 #define USE_CONFIG_FILE 1
Index: php3/configure.in
diff -u php3/configure.in:1.372 php3/configure.in:1.373
--- php3/configure.in:1.372 Sun May 23 20:02:06 1999
+++ php3/configure.in Thu May 27 11:42:50 1999
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.372 1999/05/24 00:02:06 jah Exp $
+dnl $Id: configure.in,v 1.373 1999/05/27 15:42:50 andrey Exp $
 dnl Process this file with autoconf to produce a configure script.
 
 AC_INIT(main.c)
@@ -2579,6 +2579,38 @@
   fi
 ],[
   AC_MSG_RESULT(no)
+])
+
+AC_MSG_CHECKING(whether to include PCRE support)
+AC_ARG_WITH(pcre-regex,
+[ --with-pcre-regex[=DIR] Include Perl Compatible Regular Expressions support],[
+ case "$withval" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ yes)
+ EXTRA_LIBS="-lpcre $EXTRA_LIBS"
+ AC_DEFINE(HAVE_PCRE, 1)
+ AC_MSG_RESULT(yes)
+ ;;
+ *)
+ 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
+ INCLUDES="$PCRE_INCLUDE $INCLUDES"
+ EXTRA_LIBS="$PCRE_LIB $EXTRA_LIBS"
+ AC_DEFINE(HAVE_PCRE, 1)
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_ERROR(Unable to find pcre.h and libpcre.a in $withval)
+ fi
+ ;;
+ esac
+],[
+ EXTRA_LIBS="-lpcre $EXTRA_LIBS"
+ AC_DEFINE(HAVE_PCRE, 1)
+ AC_MSG_RESULT(yes)
 ])
 
 dnl If we're using gcc and the user hasn't specified CFLAGS, add -O2.
Index: php3/internal_functions.c
diff -u php3/internal_functions.c:1.350 php3/internal_functions.c:1.351
--- php3/internal_functions.c:1.350 Sat May 22 18:34:53 1999
+++ php3/internal_functions.c Thu May 27 11:42:50 1999
@@ -29,7 +29,7 @@
  */
 
 
-/* $Id: internal_functions.c,v 1.350 1999/05/22 22:34:53 sas Exp $ */
+/* $Id: internal_functions.c,v 1.351 1999/05/27 15:42:50 andrey Exp $ */
 
 #ifdef THREAD_SAFE
 #include "tls.h"
@@ -106,6 +106,7 @@
 #include "functions/php3_dba.h"
 #include "functions/php_mcrypt.h"
 #include "functions/php_mhash.h"
+#include "functions/php3_pcre.h"
 
 #ifndef WIN32
 #include <netinet/in.h>
@@ -185,6 +186,7 @@
         {"MCK Crypt", mckcrypt_module_ptr},
     {"YP", yp_module_ptr},
         {"ImageMagick", magick_module_ptr},
+ {"PCRE", pcre_module_ptr},
         {NULL, NULL}
 };
 

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>