Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-03-09 22:47:07 +0300
committerIgor Sysoev <igor@sysoev.ru>2004-03-09 22:47:07 +0300
commitfc5a10aedcdd8cf261ecc164941562bc52fe415d (patch)
treedc6ad97805a315afca82e852717f84debb30eb54 /auto/lib/pcre
parent833823cbb89482710779c59206b77c197c3747d2 (diff)
nginx-0.0.2-2004-03-09-22:47:07 import
Diffstat (limited to 'auto/lib/pcre')
-rw-r--r--auto/lib/pcre/conf63
-rw-r--r--auto/lib/pcre/make50
-rw-r--r--auto/lib/pcre/makefile.msvc14
-rw-r--r--auto/lib/pcre/makefile.owc14
-rw-r--r--auto/lib/pcre/patch.config11
-rw-r--r--auto/lib/pcre/patch.pcre15
6 files changed, 132 insertions, 35 deletions
diff --git a/auto/lib/pcre/conf b/auto/lib/pcre/conf
index 436bee2dd..6d4b53806 100644
--- a/auto/lib/pcre/conf
+++ b/auto/lib/pcre/conf
@@ -4,37 +4,54 @@ if [ $PCRE != NONE ]; then
CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
- if [ "$PLATFORM" = "win32" ]; then
- have=HAVE_PCRE . auto/have
- have=PCRE_STATIC . auto/have
- CORE_LIBS="$CORE_LIBS pcre.lib"
- CORE_LINK="$CORE_LINK -libpath:$PCRE"
- else
- have=HAVE_PCRE . auto/have
- CORE_DEPS="$CORE_DEPS $PCRE/.libs/libpcre.a"
- CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre"
- fi
+ case $CC in
+
+ cl)
+ have=HAVE_PCRE . auto/have
+ have=PCRE_STATIC . auto/have
+ CORE_DEPS="$CORE_DEPS $PCRE/pcre.lib"
+ #CORE_DEPS="$PCRE/pcre.lib $CORE_DEPS"
+ CORE_LIBS="$CORE_LIBS pcre.lib"
+ CORE_LINK="$CORE_LINK -libpath:$PCRE"
+ ;;
+
+ wcl386)
+ have=HAVE_PCRE . auto/have
+ have=PCRE_STATIC . auto/have
+ CORE_DEPS="$CORE_DEPS $PCRE/pcre.lib"
+ CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
+ ;;
+
+ *)
+ have=HAVE_PCRE . auto/have
+ CORE_DEPS="$CORE_DEPS $PCRE/.libs/libpcre.a"
+ CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre"
+ ;;
+
+ esac
else
- ngx_lib_inc="#include <pcre.h>"
+ if [ $PLATFORM != win32 ]; then
+ ngx_lib_inc="#include <pcre.h>"
- ngx_lib="PCRE"
- ngx_lib_test="pcre *re; pcre_compile(re, 0, NULL, 0, NULL)"
- ngx_libs=-lpcre
- . auto/lib/test
+ ngx_lib="PCRE"
+ ngx_lib_test="pcre *re; pcre_compile(re, 0, NULL, 0, NULL)"
+ ngx_libs=-lpcre
+ . auto/lib/test
- if [ $ngx_found = yes ]; then
- have=HAVE_PCRE . auto/have
+ if [ $ngx_found = yes ]; then
+ have=HAVE_PCRE . auto/have
- CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
- CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
- CORE_LIBS="$CORE_LIBS $ngx_libs"
+ CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
+ CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
+ CORE_LIBS="$CORE_LIBS $ngx_libs"
- PCRE=YES
- else
- PCRE=NO
+ PCRE=YES
+ else
+ PCRE=NO
+ fi
fi
fi
diff --git a/auto/lib/pcre/make b/auto/lib/pcre/make
index 836668619..6ea086da6 100644
--- a/auto/lib/pcre/make
+++ b/auto/lib/pcre/make
@@ -1,7 +1,47 @@
-echo "$PCRE/.libs/libpcre.a:" >> $MAKEFILE
-echo " cd $PCRE \\" >> $MAKEFILE
-echo " && ./configure --disable-shared \\" >> $MAKEFILE
-echo " && \$(MAKE)" >> $MAKEFILE
-echo >> $MAKEFILE
+case $CC in
+ cl)
+ makefile=makefile.msvc
+ ;;
+
+ wcl386)
+ makefile=makefile.owc
+ ;;
+
+esac
+
+
+case $PLATFORM in
+
+ win32)
+ echo "$PCRE/pcre.lib:" >> $MAKEFILE
+ ;;
+
+ *)
+ echo "$PCRE/.libs/libpcre.a:" >> $MAKEFILE
+ ;;
+
+esac
+
+
+case $PLATFORM in
+
+ win32)
+ cp auto/lib/pcre/patch.pcre $PCRE
+ cp auto/lib/pcre/patch.config $PCRE
+ cp auto/lib/pcre/$makefile $PCRE
+ echo " cd $PCRE" >> $MAKEFILE
+ echo " \$(MAKE) -f $makefile OWC_OPT=$OWC_OPT" >> $MAKEFILE
+ echo " cd ..\\..\\.." >> $MAKEFILE
+ ;;
+
+ *)
+ echo " cd $PCRE \\" >> $MAKEFILE
+ echo " && ./configure --disable-shared \\" >> $MAKEFILE
+ echo " && \$(MAKE)" >> $MAKEFILE
+ ;;
+
+esac
+
+echo >> $MAKEFILE
diff --git a/auto/lib/pcre/makefile.msvc b/auto/lib/pcre/makefile.msvc
index e5c2aec29..0eeb310ab 100644
--- a/auto/lib/pcre/makefile.msvc
+++ b/auto/lib/pcre/makefile.msvc
@@ -1,18 +1,18 @@
-CC = cl
CFLAGS = -O2 -Ob1 -Oi -Gs -MT
-LINK = link
-
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
-all:
- $(CC) -Fedftables dftables.c
+pcre.lib:
+ patch -o pcre.h pcre.in patch.pcre
+ patch -o config.h config.in patch.config
+
+ cl -Fedftables dftables.c
dftables > chartables.c
- $(CC) -nologo -c $(CFLAGS) $(PCREFLAGS) \
+ cl -nologo -c $(CFLAGS) $(PCREFLAGS) \
maketables.c get.c study.c pcre.c
- $(LINK) -lib -out:pcre.lib -verbose:lib \
+ link -lib -out:pcre.lib -verbose:lib \
maketables.obj get.obj study.obj pcre.obj
diff --git a/auto/lib/pcre/makefile.owc b/auto/lib/pcre/makefile.owc
new file mode 100644
index 000000000..f4244a6c0
--- /dev/null
+++ b/auto/lib/pcre/makefile.owc
@@ -0,0 +1,14 @@
+
+CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(OWC_OPT)
+PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
+
+
+pcre.lib:
+ patch -o pcre.h pcre.in patch.pcre
+ patch -o config.h config.in patch.config
+
+ wcl386 -zq -bt=nt -l=nt -fe=dftables dftables.c
+ dftables > chartables.c
+
+ wcl386 $(CFLAGS) $(PCREFLAGS) maketables.c get.c study.c pcre.c
+ wlib -n pcre.lib maketables.obj get.obj study.obj pcre.obj
diff --git a/auto/lib/pcre/patch.config b/auto/lib/pcre/patch.config
new file mode 100644
index 000000000..f2c48c281
--- /dev/null
+++ b/auto/lib/pcre/patch.config
@@ -0,0 +1,11 @@
+--- config.in.orig Thu Aug 21 14:43:07 2003
++++ config.in Sun Mar 7 02:37:24 2004
+@@ -28,7 +28,7 @@
+ found. */
+
+ #define HAVE_STRERROR 0
+-#define HAVE_MEMMOVE 0
++#define HAVE_MEMMOVE 1
+
+ /* There are some non-Unix systems that don't even have bcopy(). If this macro
+ is false, an emulation is used. If HAVE_MEMMOVE is set to 1, the value of
diff --git a/auto/lib/pcre/patch.pcre b/auto/lib/pcre/patch.pcre
new file mode 100644
index 000000000..3406548b5
--- /dev/null
+++ b/auto/lib/pcre/patch.pcre
@@ -0,0 +1,15 @@
+--- pcre.in.orig Thu Aug 21 14:43:07 2003
++++ pcre.in Sun Mar 7 02:10:11 2004
+@@ -10,9 +10,9 @@
+ /* The file pcre.h is build by "configure". Do not edit it; instead
+ make changes to pcre.in. */
+
+-#define PCRE_MAJOR @PCRE_MAJOR@
+-#define PCRE_MINOR @PCRE_MINOR@
+-#define PCRE_DATE @PCRE_DATE@
++#define PCRE_MAJOR 4
++#define PCRE_MINOR 4
++#define PCRE_DATE 21-August-2003
+
+ /* Win32 uses DLL by default */
+