Welcome! Log In Create A New Profile

Advanced

[PATCH 3 of 4] Configure: simplified PCRE compilation

Maxim Dounin
December 12, 2021 09:32PM
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1639235686 -10800
# Sat Dec 11 18:14:46 2021 +0300
# Node ID 84fae18c1b1e9d5cfafe10e0e9754f1d7ba628e1
# Parent c03ed58d70b6bd37acf289621d514a7497c8815e
Configure: simplified PCRE compilation.

Removed ICC-specific PCRE optimizations which tried to link with PCRE
object files instead of the library. Made compiler-specific code
minimal.

diff --git a/auto/lib/pcre/conf b/auto/lib/pcre/conf
--- a/auto/lib/pcre/conf
+++ b/auto/lib/pcre/conf
@@ -4,81 +4,24 @@


if [ $PCRE != NONE ]; then
+
+ have=NGX_PCRE . auto/have
+
+ if [ "$NGX_PLATFORM" = win32 ]; then
+ have=PCRE_STATIC . auto/have
+ fi
+
CORE_INCS="$CORE_INCS $PCRE"
+ CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"

case "$NGX_CC_NAME" in

msvc | owc | bcc)
- have=NGX_PCRE . auto/have
- have=PCRE_STATIC . auto/have
- CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib"
CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
;;

- icc)
- have=NGX_PCRE . auto/have
- CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
-
- LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
-
- echo $ngx_n "checking for PCRE library ...$ngx_c"
-
- if [ -f $PCRE/pcre.h ]; then
- ngx_pcre_ver=`grep PCRE_MAJOR $PCRE/pcre.h \
- | sed -e 's/^.*PCRE_MAJOR.* \(.*\)$/\1/'`
-
- else if [ -f $PCRE/configure.in ]; then
- ngx_pcre_ver=`grep PCRE_MAJOR= $PCRE/configure.in \
- | sed -e 's/^.*=\(.*\)$/\1/'`
-
- else
- ngx_pcre_ver=`grep pcre_major, $PCRE/configure.ac \
- | sed -e 's/^.*pcre_major,.*\[\(.*\)\].*$/\1/'`
- fi
- fi
-
- echo " $ngx_pcre_ver major version found"
-
- # to allow -ipo optimization we link with the *.o but not library
-
- case "$ngx_pcre_ver" in
- 4|5)
- CORE_LIBS="$CORE_LIBS $PCRE/pcre.o"
- ;;
-
- 6)
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_chartables.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_compile.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_exec.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_fullinfo.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_globals.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_tables.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_try_flipped.o"
- ;;
-
- *)
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_chartables.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_compile.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_exec.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_fullinfo.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_globals.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_tables.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_try_flipped.o"
- CORE_LIBS="$CORE_LIBS $PCRE/pcre_newline.o"
- ;;
-
- esac
- ;;
-
*)
- have=NGX_PCRE . auto/have
-
- if [ "$NGX_PLATFORM" = win32 ]; then
- have=PCRE_STATIC . auto/have
- fi
-
- CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a"
;;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 0 of 4] PCRE2 support

Maxim Dounin 440 December 12, 2021 09:32PM

[PATCH 3 of 4] Configure: simplified PCRE compilation

Maxim Dounin 150 December 12, 2021 09:32PM

[PATCH 2 of 4] Core: ngx_regex.c style cleanup

Maxim Dounin 173 December 12, 2021 09:32PM

[PATCH 1 of 4] Core: fixed ngx_pcre_studies cleanup

Maxim Dounin 160 December 12, 2021 09:34PM

[PATCH 4 of 4] PCRE2 library support

Maxim Dounin 213 December 12, 2021 09:34PM

Re: [PATCH 0 of 4] PCRE2 support

cubicdaiya 127 December 14, 2021 01:12AM

Re: [PATCH 0 of 4] PCRE2 support

Maxim Dounin 205 December 14, 2021 11:10AM

Re: [PATCH 0 of 4] PCRE2 support

cubicdaiya 180 December 14, 2021 07:44PM

Re: [PATCH 0 of 4] PCRE2 support

Maxim Dounin 186 December 16, 2021 02:08PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 169
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready