Annotation of embedaddon/nginx/auto/lib/pcre/conf, revision 1.1
1.1 ! misho 1:
! 2: # Copyright (C) Igor Sysoev
! 3: # Copyright (C) Nginx, Inc.
! 4:
! 5:
! 6: if [ $PCRE != NONE ]; then
! 7: CORE_INCS="$CORE_INCS $PCRE"
! 8:
! 9: case "$NGX_CC_NAME" in
! 10:
! 11: msvc* | owc* | bcc)
! 12: have=NGX_PCRE . auto/have
! 13: have=PCRE_STATIC . auto/have
! 14: CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
! 15: LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib"
! 16: CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
! 17: ;;
! 18:
! 19: icc* )
! 20: have=NGX_PCRE . auto/have
! 21: CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
! 22:
! 23: LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
! 24:
! 25: echo $ngx_n "checking for PCRE library ...$ngx_c"
! 26:
! 27: if [ -f $PCRE/pcre.h ]; then
! 28: ngx_pcre_ver=`grep PCRE_MAJOR $PCRE/pcre.h \
! 29: | sed -e 's/^.*PCRE_MAJOR.* \(.*\)$/\1/'`
! 30:
! 31: else if [ -f $PCRE/configure.in ]; then
! 32: ngx_pcre_ver=`grep PCRE_MAJOR= $PCRE/configure.in \
! 33: | sed -e 's/^.*=\(.*\)$/\1/'`
! 34:
! 35: else
! 36: ngx_pcre_ver=`grep pcre_major, $PCRE/configure.ac \
! 37: | sed -e 's/^.*pcre_major,.*\[\(.*\)\].*$/\1/'`
! 38: fi
! 39: fi
! 40:
! 41: echo " $ngx_pcre_ver major version found"
! 42:
! 43: # to allow -ipo optimization we link with the *.o but not library
! 44:
! 45: case "$ngx_pcre_ver" in
! 46: 4|5)
! 47: CORE_LIBS="$CORE_LIBS $PCRE/pcre.o"
! 48: ;;
! 49:
! 50: 6)
! 51: CORE_LIBS="$CORE_LIBS $PCRE/pcre_chartables.o"
! 52: CORE_LIBS="$CORE_LIBS $PCRE/pcre_compile.o"
! 53: CORE_LIBS="$CORE_LIBS $PCRE/pcre_exec.o"
! 54: CORE_LIBS="$CORE_LIBS $PCRE/pcre_fullinfo.o"
! 55: CORE_LIBS="$CORE_LIBS $PCRE/pcre_globals.o"
! 56: CORE_LIBS="$CORE_LIBS $PCRE/pcre_tables.o"
! 57: CORE_LIBS="$CORE_LIBS $PCRE/pcre_try_flipped.o"
! 58: ;;
! 59:
! 60: *)
! 61: CORE_LIBS="$CORE_LIBS $PCRE/pcre_chartables.o"
! 62: CORE_LIBS="$CORE_LIBS $PCRE/pcre_compile.o"
! 63: CORE_LIBS="$CORE_LIBS $PCRE/pcre_exec.o"
! 64: CORE_LIBS="$CORE_LIBS $PCRE/pcre_fullinfo.o"
! 65: CORE_LIBS="$CORE_LIBS $PCRE/pcre_globals.o"
! 66: CORE_LIBS="$CORE_LIBS $PCRE/pcre_tables.o"
! 67: CORE_LIBS="$CORE_LIBS $PCRE/pcre_try_flipped.o"
! 68: CORE_LIBS="$CORE_LIBS $PCRE/pcre_newline.o"
! 69: ;;
! 70:
! 71: esac
! 72: ;;
! 73:
! 74: *)
! 75: have=NGX_PCRE . auto/have
! 76: CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
! 77: LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
! 78: CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a"
! 79: ;;
! 80:
! 81: esac
! 82:
! 83:
! 84: if [ $PCRE_JIT = YES ]; then
! 85: have=NGX_HAVE_PCRE_JIT . auto/have
! 86: PCRE_CONF_OPT="$PCRE_CONF_OPT --enable-jit"
! 87: fi
! 88:
! 89: else
! 90:
! 91: if [ "$NGX_PLATFORM" != win32 ]; then
! 92:
! 93: PCRE=NO
! 94:
! 95: ngx_feature="PCRE library"
! 96: ngx_feature_name="NGX_PCRE"
! 97: ngx_feature_run=no
! 98: ngx_feature_incs="#include <pcre.h>"
! 99: ngx_feature_path=
! 100: ngx_feature_libs="-lpcre"
! 101: ngx_feature_test="pcre *re;
! 102: re = pcre_compile(NULL, 0, NULL, 0, NULL);
! 103: if (re == NULL) return 1"
! 104: . auto/feature
! 105:
! 106: if [ $ngx_found = no ]; then
! 107:
! 108: # FreeBSD port
! 109:
! 110: ngx_feature="PCRE library in /usr/local/"
! 111: ngx_feature_path="/usr/local/include"
! 112:
! 113: if [ $NGX_RPATH = YES ]; then
! 114: ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lpcre"
! 115: else
! 116: ngx_feature_libs="-L/usr/local/lib -lpcre"
! 117: fi
! 118:
! 119: . auto/feature
! 120: fi
! 121:
! 122: if [ $ngx_found = no ]; then
! 123:
! 124: # RedHat RPM, Solaris package
! 125:
! 126: ngx_feature="PCRE library in /usr/include/pcre/"
! 127: ngx_feature_path="/usr/include/pcre"
! 128: ngx_feature_libs="-lpcre"
! 129:
! 130: . auto/feature
! 131: fi
! 132:
! 133: if [ $ngx_found = no ]; then
! 134:
! 135: # NetBSD port
! 136:
! 137: ngx_feature="PCRE library in /usr/pkg/"
! 138: ngx_feature_path="/usr/pkg/include"
! 139:
! 140: if [ $NGX_RPATH = YES ]; then
! 141: ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lpcre"
! 142: else
! 143: ngx_feature_libs="-L/usr/pkg/lib -lpcre"
! 144: fi
! 145:
! 146: . auto/feature
! 147: fi
! 148:
! 149: if [ $ngx_found = no ]; then
! 150:
! 151: # MacPorts
! 152:
! 153: ngx_feature="PCRE library in /opt/local/"
! 154: ngx_feature_path="/opt/local/include"
! 155:
! 156: if [ $NGX_RPATH = YES ]; then
! 157: ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lpcre"
! 158: else
! 159: ngx_feature_libs="-L/opt/local/lib -lpcre"
! 160: fi
! 161:
! 162: . auto/feature
! 163: fi
! 164:
! 165: if [ $ngx_found = yes ]; then
! 166: CORE_INCS="$CORE_INCS $ngx_feature_path"
! 167: CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
! 168: PCRE=YES
! 169: fi
! 170:
! 171: if [ $PCRE = YES ]; then
! 172: ngx_feature="PCRE JIT support"
! 173: ngx_feature_name="NGX_HAVE_PCRE_JIT"
! 174: ngx_feature_test="int jit = 0;
! 175: pcre_free_study(NULL);
! 176: pcre_config(PCRE_CONFIG_JIT, &jit);
! 177: if (jit != 1) return 1;"
! 178: . auto/feature
! 179:
! 180: if [ $ngx_found = yes ]; then
! 181: PCRE_JIT=YES
! 182: fi
! 183: fi
! 184: fi
! 185:
! 186: if [ $PCRE != YES ]; then
! 187: cat << END
! 188:
! 189: $0: error: the HTTP rewrite module requires the PCRE library.
! 190: You can either disable the module by using --without-http_rewrite_module
! 191: option, or install the PCRE library into the system, or build the PCRE library
! 192: statically from the source with nginx by using --with-pcre=<path> option.
! 193:
! 194: END
! 195: exit 1
! 196: fi
! 197:
! 198: fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>