|
29 | 29 | # Perl-compatible regular expressions instead of standard or extended |
30 | 30 | # POSIX regular expressions. |
31 | 31 | # |
32 | | -# Define LIBPCREDIR=/foo/bar if your libpcre header and library files are in |
33 | | -# /foo/bar/include and /foo/bar/lib directories. |
| 32 | +# Currently USE_LIBPCRE is a synonym for USE_LIBPCRE1, define |
| 33 | +# USE_LIBPCRE2 instead if you'd like to use version 2 of the PCRE |
| 34 | +# library. The USE_LIBPCRE flag will likely be changed to mean v2 by |
| 35 | +# default in future releases. |
| 36 | +# |
| 37 | +# When using USE_LIBPCRE1, define NO_LIBPCRE1_JIT if the PCRE v1 |
| 38 | +# library is compiled without --enable-jit. We will auto-detect |
| 39 | +# whether the version of the PCRE v1 library in use has JIT support at |
| 40 | +# all, but we unfortunately can't auto-detect whether JIT support |
| 41 | +# hasn't been compiled in in an otherwise JIT-supporting version. If |
| 42 | +# you have link-time errors about a missing `pcre_jit_exec` define |
| 43 | +# this, or recompile PCRE v1 with --enable-jit. |
| 44 | +# |
| 45 | +# Define LIBPCREDIR=/foo/bar if your PCRE header and library files are |
| 46 | +# in /foo/bar/include and /foo/bar/lib directories. Which version of |
| 47 | +# PCRE this points to determined by the USE_LIBPCRE1 and USE_LIBPCRE2 |
| 48 | +# variables. |
34 | 49 | # |
35 | 50 | # Define HAVE_ALLOCA_H if you have working alloca(3) defined in that header. |
36 | 51 | # |
@@ -1089,13 +1104,29 @@ ifdef NO_LIBGEN_H |
1089 | 1104 | COMPAT_OBJS += compat/basename.o |
1090 | 1105 | endif |
1091 | 1106 |
|
1092 | | -ifdef USE_LIBPCRE |
1093 | | - BASIC_CFLAGS += -DUSE_LIBPCRE1 |
1094 | | - ifdef LIBPCREDIR |
1095 | | - BASIC_CFLAGS += -I$(LIBPCREDIR)/include |
1096 | | - EXTLIBS += -L$(LIBPCREDIR)/$(lib) $(CC_LD_DYNPATH)$(LIBPCREDIR)/$(lib) |
| 1107 | +USE_LIBPCRE1 ?= $(USE_LIBPCRE) |
| 1108 | + |
| 1109 | +ifneq (,$(USE_LIBPCRE1)) |
| 1110 | + ifdef USE_LIBPCRE2 |
| 1111 | +$(error Only set USE_LIBPCRE1 (or its alias USE_LIBPCRE) or USE_LIBPCRE2, not both!) |
1097 | 1112 | endif |
| 1113 | + |
| 1114 | + BASIC_CFLAGS += -DUSE_LIBPCRE1 |
1098 | 1115 | EXTLIBS += -lpcre |
| 1116 | + |
| 1117 | +ifdef NO_LIBPCRE1_JIT |
| 1118 | + BASIC_CFLAGS += -DNO_LIBPCRE1_JIT |
| 1119 | +endif |
| 1120 | +endif |
| 1121 | + |
| 1122 | +ifdef USE_LIBPCRE2 |
| 1123 | + BASIC_CFLAGS += -DUSE_LIBPCRE2 |
| 1124 | + EXTLIBS += -lpcre2-8 |
| 1125 | +endif |
| 1126 | + |
| 1127 | +ifdef LIBPCREDIR |
| 1128 | + BASIC_CFLAGS += -I$(LIBPCREDIR)/include |
| 1129 | + EXTLIBS += -L$(LIBPCREDIR)/$(lib) $(CC_LD_DYNPATH)$(LIBPCREDIR)/$(lib) |
1099 | 1130 | endif |
1100 | 1131 |
|
1101 | 1132 | ifdef HAVE_ALLOCA_H |
@@ -2249,7 +2280,9 @@ GIT-BUILD-OPTIONS: FORCE |
2249 | 2280 | @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@+ |
2250 | 2281 | @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@+ |
2251 | 2282 | @echo NO_EXPAT=\''$(subst ','\'',$(subst ','\'',$(NO_EXPAT)))'\' >>$@+ |
2252 | | - @echo USE_LIBPCRE1=\''$(subst ','\'',$(subst ','\'',$(USE_LIBPCRE)))'\' >>$@+ |
| 2283 | + @echo USE_LIBPCRE1=\''$(subst ','\'',$(subst ','\'',$(USE_LIBPCRE1)))'\' >>$@+ |
| 2284 | + @echo USE_LIBPCRE2=\''$(subst ','\'',$(subst ','\'',$(USE_LIBPCRE2)))'\' >>$@+ |
| 2285 | + @echo NO_LIBPCRE1_JIT=\''$(subst ','\'',$(subst ','\'',$(NO_LIBPCRE1_JIT)))'\' >>$@+ |
2253 | 2286 | @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@+ |
2254 | 2287 | @echo NO_PTHREADS=\''$(subst ','\'',$(subst ','\'',$(NO_PTHREADS)))'\' >>$@+ |
2255 | 2288 | @echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@+ |
|
0 commit comments