• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl Process this file with autoconf to produce a configure script.
2
3dnl NOTE FOR MAINTAINERS: Do not use minor version numbers 08 or 09 because
4dnl the leading zeros may cause them to be treated as invalid octal constants
5dnl if a PCRE2 user writes code that uses PCRE2_MINOR as a number. There is now
6dnl a check further down that throws an error if 08 or 09 are used.
7
8dnl The PCRE2_PRERELEASE feature is for identifying release candidates. It might
9dnl be defined as -RC2, for example. For real releases, it should be empty.
10
11m4_define(pcre2_major, [10])
12m4_define(pcre2_minor, [33])
13m4_define(pcre2_prerelease, [])
14m4_define(pcre2_date, [2019-04-16])
15
16# NOTE: The CMakeLists.txt file searches for the above variables in the first
17# 50 lines of this file. Please update that if the variables above are moved.
18
19# Libtool shared library interface versions (current:revision:age)
20m4_define(libpcre2_8_version,     [8:0:8])
21m4_define(libpcre2_16_version,    [8:0:8])
22m4_define(libpcre2_32_version,    [8:0:8])
23m4_define(libpcre2_posix_version, [2:2:0])
24
25AC_PREREQ(2.57)
26AC_INIT(PCRE2, pcre2_major.pcre2_minor[]pcre2_prerelease, , pcre2)
27AC_CONFIG_SRCDIR([src/pcre2.h.in])
28AM_INIT_AUTOMAKE([dist-bzip2 dist-zip])
29m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
30AC_CONFIG_HEADERS(src/config.h)
31
32# This was added at the suggestion of libtoolize (03-Jan-10)
33AC_CONFIG_MACRO_DIR([m4])
34
35# The default CFLAGS in Autoconf are "-g -O2" for gcc and just "-g" for any
36# other compiler. There doesn't seem to be a standard way of getting rid of the
37# -g (which I don't think is needed for a production library). This fudge seems
38# to achieve the necessary. First, we remember the externally set values of
39# CFLAGS. Then call the AC_PROG_CC macro to find the compiler - if CFLAGS is
40# not set, it will be set to Autoconf's defaults. Afterwards, if the original
41# values were not set, remove the -g from the Autoconf defaults.
42
43remember_set_CFLAGS="$CFLAGS"
44
45AC_PROG_CC
46AM_PROG_CC_C_O
47AC_USE_SYSTEM_EXTENSIONS
48
49if test "x$remember_set_CFLAGS" = "x"
50then
51  if test "$CFLAGS" = "-g -O2"
52  then
53    CFLAGS="-O2"
54  elif test "$CFLAGS" = "-g"
55  then
56    CFLAGS=""
57  fi
58fi
59
60# This is a new thing required to stop a warning from automake 1.12
61m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
62
63# Check for a 64-bit integer type
64AC_TYPE_INT64_T
65
66AC_PROG_INSTALL
67AC_LIBTOOL_WIN32_DLL
68LT_INIT
69AC_PROG_LN_S
70
71# Check for GCC visibility feature
72
73PCRE2_VISIBILITY
74
75# Check for Clang __attribute__((uninitialized)) feature
76
77AC_MSG_CHECKING([for __attribute__((uninitialized))])
78AC_LANG_PUSH([C])
79tmp_CFLAGS=$CFLAGS
80CFLAGS="$CFLAGS -Werror"
81AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,
82                   [[char buf[128] __attribute__((uninitialized));(void)buf]])],
83                   [pcre2_cc_cv_attribute_uninitialized=yes],
84                   [pcre2_cc_cv_attribute_uninitialized=no])
85AC_MSG_RESULT([$pcre2_cc_cv_attribute_uninitialized])
86if test "$pcre2_cc_cv_attribute_uninitialized" = yes; then
87  AC_DEFINE([HAVE_ATTRIBUTE_UNINITIALIZED], 1, [Define this if your compiler
88             supports __attribute__((uninitialized))])
89fi
90CFLAGS=$tmp_CFLAGS
91AC_LANG_POP([C])
92
93# Versioning
94
95PCRE2_MAJOR="pcre2_major"
96PCRE2_MINOR="pcre2_minor"
97PCRE2_PRERELEASE="pcre2_prerelease"
98PCRE2_DATE="pcre2_date"
99
100if test "$PCRE2_MINOR" = "08" -o "$PCRE2_MINOR" = "09"
101then
102  echo "***"
103  echo "*** Minor version number $PCRE2_MINOR must not be used. ***"
104  echo "*** Use only 00 to 07 or 10 onwards, to avoid octal issues. ***"
105  echo "***"
106  exit 1
107fi
108
109AC_SUBST(PCRE2_MAJOR)
110AC_SUBST(PCRE2_MINOR)
111AC_SUBST(PCRE2_PRERELEASE)
112AC_SUBST(PCRE2_DATE)
113
114# Set a more sensible default value for $(htmldir).
115if test "x$htmldir" = 'x${docdir}'
116then
117  htmldir='${docdir}/html'
118fi
119
120# Force an error for PCRE1 size options
121AC_ARG_ENABLE(pcre8,,,enable_pcre8=no)
122AC_ARG_ENABLE(pcre16,,,enable_pcre16=no)
123AC_ARG_ENABLE(pcre32,,,enable_pcre32=no)
124
125if test "$enable_pcre8$enable_pcre16$enable_pcre32" != "nonono"
126then
127  echo "** ERROR: Use --[[en|dis]]able-pcre2-[[8|16|32]], not --[[en|dis]]able-pcre[[8|16|32]]"
128  exit 1
129fi
130
131# Handle --disable-pcre2-8 (enabled by default)
132AC_ARG_ENABLE(pcre2-8,
133              AS_HELP_STRING([--disable-pcre2-8],
134                             [disable 8 bit character support]),
135              , enable_pcre2_8=unset)
136AC_SUBST(enable_pcre2_8)
137
138# Handle --enable-pcre2-16 (disabled by default)
139AC_ARG_ENABLE(pcre2-16,
140              AS_HELP_STRING([--enable-pcre2-16],
141                             [enable 16 bit character support]),
142              , enable_pcre2_16=unset)
143AC_SUBST(enable_pcre2_16)
144
145# Handle --enable-pcre2-32 (disabled by default)
146AC_ARG_ENABLE(pcre2-32,
147              AS_HELP_STRING([--enable-pcre2-32],
148                             [enable 32 bit character support]),
149              , enable_pcre2_32=unset)
150AC_SUBST(enable_pcre2_32)
151
152# Handle --enable-debug (disabled by default)
153AC_ARG_ENABLE(debug,
154              AS_HELP_STRING([--enable-debug],
155                             [enable debugging code]),
156              , enable_debug=no)
157
158# Handle --enable-jit (disabled by default)
159AC_ARG_ENABLE(jit,
160              AS_HELP_STRING([--enable-jit],
161                             [enable Just-In-Time compiling support]),
162              , enable_jit=no)
163
164# This code enables JIT if the hardware supports it.
165if test "$enable_jit" = "auto"; then
166  AC_LANG(C)
167  SAVE_CPPFLAGS=$CPPFLAGS
168  CPPFLAGS=-I$srcdir
169  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
170  #define SLJIT_CONFIG_AUTO 1
171  #include "src/sljit/sljitConfigInternal.h"
172  #if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
173  #error unsupported
174  #endif]])], enable_jit=yes, enable_jit=no)
175  CPPFLAGS=$SAVE_CPPFLAGS
176  echo checking for JIT support on this hardware... $enable_jit
177fi
178
179# Handle --enable-jit-sealloc (disabled by default)
180AC_ARG_ENABLE(jit-sealloc,
181              AS_HELP_STRING([--enable-jit-sealloc],
182                             [enable SELinux compatible execmem allocator in JIT]),
183              , enable_jit_sealloc=no)
184
185# Handle --disable-pcre2grep-jit (enabled by default)
186AC_ARG_ENABLE(pcre2grep-jit,
187              AS_HELP_STRING([--disable-pcre2grep-jit],
188                             [disable JIT support in pcre2grep]),
189              , enable_pcre2grep_jit=yes)
190
191# Handle --disable-pcre2grep-callout (enabled by default)
192AC_ARG_ENABLE(pcre2grep-callout,
193              AS_HELP_STRING([--disable-pcre2grep-callout],
194                             [disable callout script support in pcre2grep]),
195              , enable_pcre2grep_callout=yes)
196
197# Handle --disable-pcre2grep-callout-fork (enabled by default)
198AC_ARG_ENABLE(pcre2grep-callout-fork,
199              AS_HELP_STRING([--disable-pcre2grep-callout-fork],
200                             [disable callout script fork support in pcre2grep]),
201              , enable_pcre2grep_callout_fork=yes)
202
203# Handle --enable-rebuild-chartables
204AC_ARG_ENABLE(rebuild-chartables,
205              AS_HELP_STRING([--enable-rebuild-chartables],
206                             [rebuild character tables in current locale]),
207              , enable_rebuild_chartables=no)
208
209# Handle --disable-unicode (enabled by default)
210AC_ARG_ENABLE(unicode,
211              AS_HELP_STRING([--disable-unicode],
212                             [disable Unicode support]),
213              , enable_unicode=unset)
214
215# Handle newline options
216ac_pcre2_newline=lf
217AC_ARG_ENABLE(newline-is-cr,
218              AS_HELP_STRING([--enable-newline-is-cr],
219                             [use CR as newline character]),
220              ac_pcre2_newline=cr)
221AC_ARG_ENABLE(newline-is-lf,
222              AS_HELP_STRING([--enable-newline-is-lf],
223                             [use LF as newline character (default)]),
224              ac_pcre2_newline=lf)
225AC_ARG_ENABLE(newline-is-crlf,
226              AS_HELP_STRING([--enable-newline-is-crlf],
227                             [use CRLF as newline sequence]),
228              ac_pcre2_newline=crlf)
229AC_ARG_ENABLE(newline-is-anycrlf,
230              AS_HELP_STRING([--enable-newline-is-anycrlf],
231                             [use CR, LF, or CRLF as newline sequence]),
232              ac_pcre2_newline=anycrlf)
233AC_ARG_ENABLE(newline-is-any,
234              AS_HELP_STRING([--enable-newline-is-any],
235                             [use any valid Unicode newline sequence]),
236              ac_pcre2_newline=any)
237AC_ARG_ENABLE(newline-is-nul,
238              AS_HELP_STRING([--enable-newline-is-nul],
239                             [use NUL (binary zero) as newline character]),
240              ac_pcre2_newline=nul)
241enable_newline="$ac_pcre2_newline"
242
243# Handle --enable-bsr-anycrlf
244AC_ARG_ENABLE(bsr-anycrlf,
245              AS_HELP_STRING([--enable-bsr-anycrlf],
246                             [\R matches only CR, LF, CRLF by default]),
247              , enable_bsr_anycrlf=no)
248
249# Handle --enable-never-backslash-C
250AC_ARG_ENABLE(never-backslash-C,
251              AS_HELP_STRING([--enable-never-backslash-C],
252                             [use of \C causes an error]),
253              , enable_never_backslash_C=no)
254
255# Handle --enable-ebcdic
256AC_ARG_ENABLE(ebcdic,
257              AS_HELP_STRING([--enable-ebcdic],
258                             [assume EBCDIC coding rather than ASCII; incompatible with --enable-utf; use only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]),
259              , enable_ebcdic=no)
260
261# Handle --enable-ebcdic-nl25
262AC_ARG_ENABLE(ebcdic-nl25,
263              AS_HELP_STRING([--enable-ebcdic-nl25],
264                             [set EBCDIC code for NL to 0x25 instead of 0x15; it implies --enable-ebcdic]),
265              , enable_ebcdic_nl25=no)
266
267# Handle --enable-pcre2grep-libz
268AC_ARG_ENABLE(pcre2grep-libz,
269              AS_HELP_STRING([--enable-pcre2grep-libz],
270                             [link pcre2grep with libz to handle .gz files]),
271              , enable_pcre2grep_libz=no)
272
273# Handle --enable-pcre2grep-libbz2
274AC_ARG_ENABLE(pcre2grep-libbz2,
275              AS_HELP_STRING([--enable-pcre2grep-libbz2],
276                             [link pcre2grep with libbz2 to handle .bz2 files]),
277              , enable_pcre2grep_libbz2=no)
278
279# Handle --with-pcre2grep-bufsize=N
280AC_ARG_WITH(pcre2grep-bufsize,
281              AS_HELP_STRING([--with-pcre2grep-bufsize=N],
282                             [pcre2grep initial buffer size (default=20480, minimum=8192)]),
283              , with_pcre2grep_bufsize=20480)
284
285# Handle --with-pcre2grep-max-bufsize=N
286AC_ARG_WITH(pcre2grep-max-bufsize,
287              AS_HELP_STRING([--with-pcre2grep-max-bufsize=N],
288                             [pcre2grep maximum buffer size (default=1048576, minimum=8192)]),
289              , with_pcre2grep_max_bufsize=1048576)
290
291# Handle --enable-pcre2test-libedit
292AC_ARG_ENABLE(pcre2test-libedit,
293              AS_HELP_STRING([--enable-pcre2test-libedit],
294                             [link pcre2test with libedit]),
295              , enable_pcre2test_libedit=no)
296
297# Handle --enable-pcre2test-libreadline
298AC_ARG_ENABLE(pcre2test-libreadline,
299              AS_HELP_STRING([--enable-pcre2test-libreadline],
300                             [link pcre2test with libreadline]),
301              , enable_pcre2test_libreadline=no)
302
303# Handle --with-link-size=N
304AC_ARG_WITH(link-size,
305            AS_HELP_STRING([--with-link-size=N],
306                           [internal link size (2, 3, or 4 allowed; default=2)]),
307            , with_link_size=2)
308
309# Handle --with-parens-nest-limit=N
310AC_ARG_WITH(parens-nest-limit,
311            AS_HELP_STRING([--with-parens-nest-limit=N],
312                           [nested parentheses limit (default=250)]),
313            , with_parens_nest_limit=250)
314
315# Handle --with-heap-limit
316AC_ARG_WITH(heap-limit,
317            AS_HELP_STRING([--with-heap-limit=N],
318                           [default limit on heap memory (kibibytes, default=20000000)]),
319            , with_heap_limit=20000000)
320
321# Handle --with-match-limit=N
322AC_ARG_WITH(match-limit,
323            AS_HELP_STRING([--with-match-limit=N],
324                           [default limit on internal looping (default=10000000)]),
325            , with_match_limit=10000000)
326
327# Handle --with-match-limit-depth=N
328# Recognize old synonym --with-match-limit-recursion
329#
330# Note: In config.h, the default is to define MATCH_LIMIT_DEPTH symbolically as
331# MATCH_LIMIT, which in turn is defined to be some numeric value (e.g.
332# 10000000). MATCH_LIMIT_DEPTH can otherwise be set to some different numeric
333# value (or even the same numeric value as MATCH_LIMIT, though no longer
334# defined in terms of the latter).
335#
336AC_ARG_WITH(match-limit-depth,
337            AS_HELP_STRING([--with-match-limit-depth=N],
338                           [default limit on match tree depth (default=MATCH_LIMIT)]),
339            , with_match_limit_depth=MATCH_LIMIT)
340
341AC_ARG_WITH(match-limit-recursion,,
342            , with_match_limit_recursion=UNSET)
343
344# Handle --enable-valgrind
345AC_ARG_ENABLE(valgrind,
346              AS_HELP_STRING([--enable-valgrind],
347                             [enable valgrind support]),
348              , enable_valgrind=no)
349
350# Enable code coverage reports using gcov
351AC_ARG_ENABLE(coverage,
352              AS_HELP_STRING([--enable-coverage],
353                             [enable code coverage reports using gcov]),
354              , enable_coverage=no)
355
356# Handle --enable-fuzz-support
357AC_ARG_ENABLE(fuzz_support,
358              AS_HELP_STRING([--enable-fuzz-support],
359                             [enable fuzzer support]),
360              , enable_fuzz_support=no)
361
362# Handle --disable-stack-for-recursion
363# This option became obsolete at release 10.30.
364AC_ARG_ENABLE(stack-for-recursion,,
365              , enable_stack_for_recursion=yes)
366
367# Original code
368# AC_ARG_ENABLE(stack-for-recursion,
369#               AS_HELP_STRING([--disable-stack-for-recursion],
370#                              [don't use stack recursion when matching]),
371#               , enable_stack_for_recursion=yes)
372
373# Handle --disable-percent_zt (set as "auto" by default)
374AC_ARG_ENABLE(percent-zt,
375              AS_HELP_STRING([--disable-percent-zt],
376                             [disable the use of z and t formatting modifiers]),
377              , enable_percent_zt=auto)
378
379# Set the default value for pcre2-8
380if test "x$enable_pcre2_8" = "xunset"
381then
382  enable_pcre2_8=yes
383fi
384
385# Set the default value for pcre2-16
386if test "x$enable_pcre2_16" = "xunset"
387then
388  enable_pcre2_16=no
389fi
390
391# Set the default value for pcre2-32
392if test "x$enable_pcre2_32" = "xunset"
393then
394  enable_pcre2_32=no
395fi
396
397# Make sure at least one library is selected
398if test "x$enable_pcre2_8$enable_pcre2_16$enable_pcre2_32" = "xnonono"
399then
400  AC_MSG_ERROR([At least one of the 8, 16 or 32 bit libraries must be enabled])
401fi
402
403# Unicode is enabled by default.
404if test "x$enable_unicode" = "xunset"
405then
406  enable_unicode=yes
407fi
408
409# Convert the newline identifier into the appropriate integer value. These must
410# agree with the PCRE2_NEWLINE_xxx values in pcre2.h.
411
412case "$enable_newline" in
413  cr)      ac_pcre2_newline_value=1 ;;
414  lf)      ac_pcre2_newline_value=2 ;;
415  crlf)    ac_pcre2_newline_value=3 ;;
416  any)     ac_pcre2_newline_value=4 ;;
417  anycrlf) ac_pcre2_newline_value=5 ;;
418  nul)     ac_pcre2_newline_value=6 ;;
419  *)
420  AC_MSG_ERROR([invalid argument \"$enable_newline\" to --enable-newline option])
421  ;;
422esac
423
424# --enable-ebcdic-nl25 implies --enable-ebcdic
425if test "x$enable_ebcdic_nl25" = "xyes"; then
426  enable_ebcdic=yes
427fi
428
429# Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled.
430# Also check that UTF support is not requested, because PCRE2 cannot handle
431# EBCDIC and UTF in the same build. To do so it would need to use different
432# character constants depending on the mode. Also, EBCDIC cannot be used with
433# 16-bit and 32-bit libraries.
434#
435if test "x$enable_ebcdic" = "xyes"; then
436  enable_rebuild_chartables=yes
437  if test "x$enable_unicode" = "xyes"; then
438    AC_MSG_ERROR([support for EBCDIC and Unicode cannot be enabled at the same time])
439  fi
440  if test "x$enable_pcre2_16" = "xyes" -o "x$enable_pcre2_32" = "xyes"; then
441    AC_MSG_ERROR([EBCDIC support is available only for the 8-bit library])
442  fi
443fi
444
445# Check argument to --with-link-size
446case "$with_link_size" in
447  2|3|4) ;;
448  *)
449  AC_MSG_ERROR([invalid argument \"$with_link_size\" to --with-link-size option])
450  ;;
451esac
452
453AH_TOP([
454/* PCRE2 is written in Standard C, but there are a few non-standard things it
455can cope with, allowing it to run on SunOS4 and other "close to standard"
456systems.
457
458In environments that support the GNU autotools, config.h.in is converted into
459config.h by the "configure" script. In environments that use CMake,
460config-cmake.in is converted into config.h. If you are going to build PCRE2 "by
461hand" without using "configure" or CMake, you should copy the distributed
462config.h.generic to config.h, and edit the macro definitions to be the way you
463need them. You must then add -DHAVE_CONFIG_H to all of your compile commands,
464so that config.h is included at the start of every source.
465
466Alternatively, you can avoid editing by using -D on the compiler command line
467to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H,
468but if you do, default values will be taken from config.h for non-boolean
469macros that are not defined on the command line.
470
471Boolean macros such as HAVE_STDLIB_H and SUPPORT_PCRE2_8 should either be
472defined (conventionally to 1) for TRUE, and not defined at all for FALSE. All
473such macros are listed as a commented #undef in config.h.generic. Macros such
474as MATCH_LIMIT, whose actual value is relevant, have defaults defined, but are
475surrounded by #ifndef/#endif lines so that the value can be overridden by -D.
476
477PCRE2 uses memmove() if HAVE_MEMMOVE is defined; otherwise it uses bcopy() if
478HAVE_BCOPY is defined. If your system has neither bcopy() nor memmove(), make
479sure both macros are undefined; an emulation function will then be used. */])
480
481# Checks for header files.
482AC_HEADER_STDC
483AC_CHECK_HEADERS(limits.h sys/types.h sys/stat.h dirent.h)
484AC_CHECK_HEADERS([windows.h], [HAVE_WINDOWS_H=1])
485AC_CHECK_HEADERS([sys/wait.h], [HAVE_SYS_WAIT_H=1])
486
487# Conditional compilation
488AM_CONDITIONAL(WITH_PCRE2_8, test "x$enable_pcre2_8" = "xyes")
489AM_CONDITIONAL(WITH_PCRE2_16, test "x$enable_pcre2_16" = "xyes")
490AM_CONDITIONAL(WITH_PCRE2_32, test "x$enable_pcre2_32" = "xyes")
491AM_CONDITIONAL(WITH_DEBUG, test "x$enable_debug" = "xyes")
492AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
493AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
494AM_CONDITIONAL(WITH_UNICODE, test "x$enable_unicode" = "xyes")
495AM_CONDITIONAL(WITH_VALGRIND, test "x$enable_valgrind" = "xyes")
496AM_CONDITIONAL(WITH_FUZZ_SUPPORT, test "x$enable_fuzz_support" = "xyes")
497
498if test "$enable_fuzz_support" = "yes" -a "$enable_pcre2_8" = "no"; then
499  echo "** ERROR: Fuzzer support requires the 8-bit library"
500  exit 1
501fi
502
503# Checks for typedefs, structures, and compiler characteristics.
504
505AC_C_CONST
506AC_TYPE_SIZE_T
507
508# Checks for library functions.
509
510AC_CHECK_FUNCS(bcopy memmove strerror mkostemp secure_getenv)
511
512# Check for the availability of libz (aka zlib)
513
514AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H=1])
515AC_CHECK_LIB([z], [gzopen], [HAVE_LIBZ=1])
516
517# Check for the availability of libbz2. Originally we just used AC_CHECK_LIB,
518# as for libz. However, this had the following problem, diagnosed and fixed by
519# a user:
520#
521#   - libbz2 uses the Pascal calling convention (WINAPI) for the functions
522#     under Win32.
523#   - The standard autoconf AC_CHECK_LIB fails to include "bzlib.h",
524#     therefore missing the function definition.
525#   - The compiler thus generates a "C" signature for the test function.
526#   - The linker fails to find the "C" function.
527#   - PCRE2 fails to configure if asked to do so against libbz2.
528#
529# Solution:
530#
531#   - Replace the AC_CHECK_LIB test with a custom test.
532
533AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_H=1])
534# Original test
535# AC_CHECK_LIB([bz2], [BZ2_bzopen], [HAVE_LIBBZ2=1])
536#
537# Custom test follows
538
539AC_MSG_CHECKING([for libbz2])
540OLD_LIBS="$LIBS"
541LIBS="$LIBS -lbz2"
542AC_LINK_IFELSE([AC_LANG_PROGRAM([[
543#ifdef HAVE_BZLIB_H
544#include <bzlib.h>
545#endif]],
546[[return (int)BZ2_bzopen("conftest", "rb");]])],
547[AC_MSG_RESULT([yes]);HAVE_LIBBZ2=1; break;],
548AC_MSG_RESULT([no]))
549LIBS="$OLD_LIBS"
550
551# Check for the availabiity of libreadline
552
553if test "$enable_pcre2test_libreadline" = "yes"; then
554 AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_H=1])
555 AC_CHECK_HEADERS([readline/history.h], [HAVE_HISTORY_H=1])
556 AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lreadline"],
557   [unset ac_cv_lib_readline_readline;
558    AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltinfo"],
559     [unset ac_cv_lib_readline_readline;
560      AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lcurses"],
561       [unset ac_cv_lib_readline_readline;
562        AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncurses"],
563         [unset ac_cv_lib_readline_readline;
564	  AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncursesw"],
565           [unset ac_cv_lib_readline_readline;
566	    AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltermcap"],
567             [LIBREADLINE=""],
568             [-ltermcap])],
569           [-lncursesw])],
570         [-lncurses])],
571       [-lcurses])],
572     [-ltinfo])])
573 AC_SUBST(LIBREADLINE)
574 if test -n "$LIBREADLINE"; then
575   if test "$LIBREADLINE" != "-lreadline"; then
576     echo "-lreadline needs $LIBREADLINE"
577     LIBREADLINE="-lreadline $LIBREADLINE"
578   fi
579 fi
580fi
581
582
583# Check for the availability of libedit. Different distributions put its
584# headers in different places. Try to cover the most common ones.
585
586if test "$enable_pcre2test_libedit" = "yes"; then
587  AC_CHECK_HEADERS([editline/readline.h], [HAVE_EDITLINE_READLINE_H=1],
588    [AC_CHECK_HEADERS([edit/readline/readline.h], [HAVE_READLINE_READLINE_H=1],
589      [AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_READLINE_H=1])])])
590  AC_CHECK_LIB([edit], [readline], [LIBEDIT="-ledit"])
591fi
592
593PCRE2_STATIC_CFLAG=""
594if test "x$enable_shared" = "xno" ; then
595  AC_DEFINE([PCRE2_STATIC], [1], [
596    Define to any value if linking statically (TODO: make nice with Libtool)])
597  PCRE2_STATIC_CFLAG="-DPCRE2_STATIC"
598fi
599AC_SUBST(PCRE2_STATIC_CFLAG)
600
601# Here is where PCRE2-specific defines are handled
602
603if test "$enable_pcre2_8" = "yes"; then
604  AC_DEFINE([SUPPORT_PCRE2_8], [], [
605    Define to any value to enable the 8 bit PCRE2 library.])
606fi
607
608if test "$enable_pcre2_16" = "yes"; then
609  AC_DEFINE([SUPPORT_PCRE2_16], [], [
610    Define to any value to enable the 16 bit PCRE2 library.])
611fi
612
613if test "$enable_pcre2_32" = "yes"; then
614  AC_DEFINE([SUPPORT_PCRE2_32], [], [
615    Define to any value to enable the 32 bit PCRE2 library.])
616fi
617
618if test "$enable_debug" = "yes"; then
619  AC_DEFINE([PCRE2_DEBUG], [], [
620    Define to any value to include debugging code.])
621fi
622
623if test "$enable_percent_zt" = "no"; then
624  AC_DEFINE([DISABLE_PERCENT_ZT], [], [
625    Define to any value to disable the use of the z and t modifiers in
626    formatting settings such as %zu or %td (this is rarely needed).])
627else
628  enable_percent_zt=auto
629fi
630
631# Unless running under Windows, JIT support requires pthreads.
632
633if test "$enable_jit" = "yes"; then
634  if test "$HAVE_WINDOWS_H" != "1"; then
635    AX_PTHREAD([], [AC_MSG_ERROR([JIT support requires pthreads])])
636    CC="$PTHREAD_CC"
637    CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
638    LIBS="$PTHREAD_LIBS $LIBS"
639  fi
640  AC_DEFINE([SUPPORT_JIT], [], [
641    Define to any value to enable support for Just-In-Time compiling.])
642else
643  enable_pcre2grep_jit="no"
644fi
645
646if test "$enable_jit_sealloc" = "yes"; then
647  AC_DEFINE([SLJIT_PROT_EXECUTABLE_ALLOCATOR], [1], [
648    Define to any non-zero number to enable support for SELinux
649    compatible executable memory allocator in JIT. Note that this
650    will have no effect unless SUPPORT_JIT is also defined.])
651fi
652
653if test "$enable_pcre2grep_jit" = "yes"; then
654  AC_DEFINE([SUPPORT_PCRE2GREP_JIT], [], [
655    Define to any value to enable JIT support in pcre2grep. Note that this will
656    have no effect unless SUPPORT_JIT is also defined.])
657fi
658
659if test "$enable_pcre2grep_callout" = "yes"; then
660  if test "$enable_pcre2grep_callout_fork" = "yes"; then
661    if test "$HAVE_WINDOWS_H" != "1"; then
662      if test "$HAVE_SYS_WAIT_H" != "1"; then
663        AC_MSG_ERROR([Callout script support needs sys/wait.h.])
664      fi
665    fi
666    AC_DEFINE([SUPPORT_PCRE2GREP_CALLOUT_FORK], [], [
667      Define to any value to enable fork support in pcre2grep callout scripts.
668      This will have no effect unless SUPPORT_PCRE2GREP_CALLOUT is also
669      defined.])
670  fi
671  AC_DEFINE([SUPPORT_PCRE2GREP_CALLOUT], [], [
672    Define to any value to enable callout script support in pcre2grep.])
673else
674  enable_pcre2grep_callout_fork="no"
675fi
676
677if test "$enable_unicode" = "yes"; then
678  AC_DEFINE([SUPPORT_UNICODE], [], [
679    Define to any value to enable support for Unicode and UTF encoding.
680    This will work even in an EBCDIC environment, but it is incompatible
681    with the EBCDIC macro. That is, PCRE2 can support *either* EBCDIC
682    code *or* ASCII/Unicode, but not both at once.])
683fi
684
685if test "$enable_pcre2grep_libz" = "yes"; then
686  AC_DEFINE([SUPPORT_LIBZ], [], [
687    Define to any value to allow pcre2grep to be linked with libz, so that it is
688    able to handle .gz files.])
689fi
690
691if test "$enable_pcre2grep_libbz2" = "yes"; then
692  AC_DEFINE([SUPPORT_LIBBZ2], [], [
693    Define to any value to allow pcre2grep to be linked with libbz2, so that it
694    is able to handle .bz2 files.])
695fi
696
697if test $with_pcre2grep_bufsize -lt 8192 ; then
698  AC_MSG_WARN([$with_pcre2grep_bufsize is too small for --with-pcre2grep-bufsize; using 8192])
699  with_pcre2grep_bufsize="8192"
700else
701  if test $? -gt 1 ; then
702  AC_MSG_ERROR([Bad value for --with-pcre2grep-bufsize])
703  fi
704fi
705
706if test $with_pcre2grep_max_bufsize -lt $with_pcre2grep_bufsize ; then
707  with_pcre2grep_max_bufsize="$with_pcre2grep_bufsize"
708else
709  if test $? -gt 1 ; then
710  AC_MSG_ERROR([Bad value for --with-pcre2grep-max-bufsize])
711  fi
712fi
713
714AC_DEFINE_UNQUOTED([PCRE2GREP_BUFSIZE], [$with_pcre2grep_bufsize], [
715  The value of PCRE2GREP_BUFSIZE is the starting size of the buffer used by
716  pcre2grep to hold parts of the file it is searching. The buffer will be
717  expanded up to PCRE2GREP_MAX_BUFSIZE if necessary, for files containing very
718  long lines. The actual amount of memory used by pcre2grep is three times this
719  number, because it allows for the buffering of "before" and "after" lines.])
720
721AC_DEFINE_UNQUOTED([PCRE2GREP_MAX_BUFSIZE], [$with_pcre2grep_max_bufsize], [
722  The value of PCRE2GREP_MAX_BUFSIZE specifies the maximum size of the buffer
723  used by pcre2grep to hold parts of the file it is searching. The actual
724  amount of memory used by pcre2grep is three times this number, because it
725  allows for the buffering of "before" and "after" lines.])
726
727if test "$enable_pcre2test_libedit" = "yes"; then
728  AC_DEFINE([SUPPORT_LIBEDIT], [], [
729    Define to any value to allow pcre2test to be linked with libedit.])
730  LIBREADLINE="$LIBEDIT"
731elif test "$enable_pcre2test_libreadline" = "yes"; then
732  AC_DEFINE([SUPPORT_LIBREADLINE], [], [
733    Define to any value to allow pcre2test to be linked with libreadline.])
734fi
735
736AC_DEFINE_UNQUOTED([NEWLINE_DEFAULT], [$ac_pcre2_newline_value], [
737  The value of NEWLINE_DEFAULT determines the default newline character
738  sequence. PCRE2 client programs can override this by selecting other values
739  at run time. The valid values are 1 (CR), 2 (LF), 3 (CRLF), 4 (ANY),
740  5 (ANYCRLF), and 6 (NUL).])
741
742if test "$enable_bsr_anycrlf" = "yes"; then
743  AC_DEFINE([BSR_ANYCRLF], [], [
744    By default, the \R escape sequence matches any Unicode line ending
745    character or sequence of characters. If BSR_ANYCRLF is defined (to any
746    value), this is changed so that backslash-R matches only CR, LF, or CRLF.
747    The build-time default can be overridden by the user of PCRE2 at runtime.])
748fi
749
750if test "$enable_never_backslash_C" = "yes"; then
751  AC_DEFINE([NEVER_BACKSLASH_C], [], [
752    Defining NEVER_BACKSLASH_C locks out the use of \C in all patterns.])
753fi
754
755AC_DEFINE_UNQUOTED([LINK_SIZE], [$with_link_size], [
756  The value of LINK_SIZE determines the number of bytes used to store
757  links as offsets within the compiled regex. The default is 2, which
758  allows for compiled patterns up to 65535 code units long. This covers the
759  vast majority of cases. However, PCRE2 can also be compiled to use 3 or 4
760  bytes instead. This allows for longer patterns in extreme cases.])
761
762AC_DEFINE_UNQUOTED([PARENS_NEST_LIMIT], [$with_parens_nest_limit], [
763  The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
764  parentheses (of any kind) in a pattern. This limits the amount of system
765  stack that is used while compiling a pattern.])
766
767AC_DEFINE_UNQUOTED([MATCH_LIMIT], [$with_match_limit], [
768  The value of MATCH_LIMIT determines the default number of times the
769  pcre2_match() function can record a backtrack position during a single
770  matching attempt. The value is also used to limit a loop counter in
771  pcre2_dfa_match(). There is a runtime interface for setting a different
772  limit. The limit exists in order to catch runaway regular expressions that
773  take for ever to determine that they do not match. The default is set very
774  large so that it does not accidentally catch legitimate cases.])
775
776# --with-match-limit-recursion is an obsolete synonym for --with-match-limit-depth
777
778if test "$with_match_limit_recursion" != "UNSET"; then
779cat <<EOF
780
781WARNING: --with-match-limit-recursion is an obsolete option. Please use
782  --with-match-limit-depth in future. If both are set, --with-match-limit-depth
783  will be used. See also --with-heap-limit.
784
785EOF
786if test "$with_match_limit_depth" = "MATCH_LIMIT"; then
787  with_match_limit_depth=$with_match_limit_recursion
788fi
789fi
790
791AC_DEFINE_UNQUOTED([MATCH_LIMIT_DEPTH], [$with_match_limit_depth], [
792  The above limit applies to all backtracks, whether or not they are nested. In
793  some environments it is desirable to limit the nesting of backtracking (that
794  is, the depth of tree that is searched) more strictly, in order to restrict
795  the maximum amount of heap memory that is used. The value of
796  MATCH_LIMIT_DEPTH provides this facility. To have any useful effect, it must
797  be less than the value of MATCH_LIMIT. The default is to use the same value
798  as MATCH_LIMIT. There is a runtime method for setting a different limit. In
799  the case of pcre2_dfa_match(), this limit controls the depth of the internal
800  nested function calls that are used for pattern recursions, lookarounds, and
801  atomic groups.])
802
803AC_DEFINE_UNQUOTED([HEAP_LIMIT], [$with_heap_limit], [
804  This limits the amount of memory that may be used while matching
805  a pattern. It applies to both pcre2_match() and pcre2_dfa_match(). It does
806  not apply to JIT matching. The value is in kibibytes (units of 1024 bytes).])
807
808AC_DEFINE([MAX_NAME_SIZE], [32], [
809  This limit is parameterized just in case anybody ever wants to
810  change it. Care must be taken if it is increased, because it guards
811  against integer overflow caused by enormously large patterns.])
812
813AC_DEFINE([MAX_NAME_COUNT], [10000], [
814  This limit is parameterized just in case anybody ever wants to
815  change it. Care must be taken if it is increased, because it guards
816  against integer overflow caused by enormously large patterns.])
817
818AH_VERBATIM([PCRE2_EXP_DEFN], [
819/* If you are compiling for a system other than a Unix-like system or
820   Win32, and it needs some magic to be inserted before the definition
821   of a function that is exported by the library, define this macro to
822   contain the relevant magic. If you do not define this macro, a suitable
823    __declspec value is used for Windows systems; in other environments
824   "extern" is used for a C compiler and "extern C" for a C++ compiler.
825   This macro apears at the start of every exported function that is part
826   of the external API. It does not appear on functions that are "external"
827   in the C sense, but which are internal to the library. */
828#undef PCRE2_EXP_DEFN])
829
830if test "$enable_ebcdic" = "yes"; then
831  AC_DEFINE_UNQUOTED([EBCDIC], [], [
832    If you are compiling for a system that uses EBCDIC instead of ASCII
833    character codes, define this macro to any value. When EBCDIC is set, PCRE2
834    assumes that all input strings are in EBCDIC. If you do not define this
835    macro, PCRE2 will assume input strings are ASCII or UTF-8/16/32 Unicode. It
836    is not possible to build a version of PCRE2 that supports both EBCDIC and
837    UTF-8/16/32.])
838fi
839
840if test "$enable_ebcdic_nl25" = "yes"; then
841  AC_DEFINE_UNQUOTED([EBCDIC_NL25], [], [
842    In an EBCDIC environment, define this macro to any value to arrange for
843    the NL character to be 0x25 instead of the default 0x15. NL plays the role
844    that LF does in an ASCII/Unicode environment.])
845fi
846
847if test "$enable_valgrind" = "yes"; then
848  AC_DEFINE_UNQUOTED([SUPPORT_VALGRIND], [], [
849     Define to any value for valgrind support to find invalid memory reads.])
850fi
851
852# Platform specific issues
853NO_UNDEFINED=
854EXPORT_ALL_SYMBOLS=
855case $host_os in
856  cygwin* | mingw* )
857    if test X"$enable_shared" = Xyes; then
858      NO_UNDEFINED="-no-undefined"
859      EXPORT_ALL_SYMBOLS="-Wl,--export-all-symbols"
860    fi
861    ;;
862esac
863
864# The extra LDFLAGS for each particular library. The libpcre2*_version values
865# are m4 variables, assigned above.
866
867EXTRA_LIBPCRE2_8_LDFLAGS="$EXTRA_LIBPCRE2_8_LDFLAGS \
868  $NO_UNDEFINED -version-info libpcre2_8_version"
869
870EXTRA_LIBPCRE2_16_LDFLAGS="$EXTRA_LIBPCRE2_16_LDFLAGS \
871  $NO_UNDEFINED -version-info libpcre2_16_version"
872
873EXTRA_LIBPCRE2_32_LDFLAGS="$EXTRA_LIBPCRE2_32_LDFLAGS \
874  $NO_UNDEFINED -version-info libpcre2_32_version"
875
876EXTRA_LIBPCRE2_POSIX_LDFLAGS="$EXTRA_LIBPCRE2_POSIX_LDFLAGS \
877  $NO_UNDEFINED -version-info libpcre2_posix_version"
878
879AC_SUBST(EXTRA_LIBPCRE2_8_LDFLAGS)
880AC_SUBST(EXTRA_LIBPCRE2_16_LDFLAGS)
881AC_SUBST(EXTRA_LIBPCRE2_32_LDFLAGS)
882AC_SUBST(EXTRA_LIBPCRE2_POSIX_LDFLAGS)
883
884# When we run 'make distcheck', use these arguments. Turning off compiler
885# optimization makes it run faster.
886DISTCHECK_CONFIGURE_FLAGS="CFLAGS='' CXXFLAGS='' --enable-pcre2-16 --enable-pcre2-32 --enable-jit"
887AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
888
889# Check that, if --enable-pcre2grep-libz or --enable-pcre2grep-libbz2 is
890# specified, the relevant library is available.
891
892if test "$enable_pcre2grep_libz" = "yes"; then
893  if test "$HAVE_ZLIB_H" != "1"; then
894    echo "** Cannot --enable-pcre2grep-libz because zlib.h was not found"
895    exit 1
896  fi
897  if test "$HAVE_LIBZ" != "1"; then
898    echo "** Cannot --enable-pcre2grep-libz because libz was not found"
899    exit 1
900  fi
901  LIBZ="-lz"
902fi
903AC_SUBST(LIBZ)
904
905if test "$enable_pcre2grep_libbz2" = "yes"; then
906  if test "$HAVE_BZLIB_H" != "1"; then
907    echo "** Cannot --enable-pcre2grep-libbz2 because bzlib.h was not found"
908    exit 1
909  fi
910  if test "$HAVE_LIBBZ2" != "1"; then
911    echo "** Cannot --enable-pcre2grep-libbz2 because libbz2 was not found"
912    exit 1
913  fi
914  LIBBZ2="-lbz2"
915fi
916AC_SUBST(LIBBZ2)
917
918# Similarly for --enable-pcre2test-readline
919
920if test "$enable_pcre2test_libedit" = "yes"; then
921  if test "$enable_pcre2test_libreadline" = "yes"; then
922    echo "** Cannot use both --enable-pcre2test-libedit and --enable-pcre2test-readline"
923    exit 1
924  fi
925  if test "$HAVE_EDITLINE_READLINE_H" != "1" -a \
926          "$HAVE_READLINE_READLINE_H" != "1"; then
927    echo "** Cannot --enable-pcre2test-libedit because neither editline/readline.h"
928    echo "** nor readline/readline.h was found."
929    exit 1
930  fi
931  if test -z "$LIBEDIT"; then
932    echo "** Cannot --enable-pcre2test-libedit because libedit library was not found."
933    exit 1
934  fi
935fi
936
937if test "$enable_pcre2test_libreadline" = "yes"; then
938  if test "$HAVE_READLINE_H" != "1"; then
939    echo "** Cannot --enable-pcre2test-readline because readline/readline.h was not found."
940    exit 1
941  fi
942  if test "$HAVE_HISTORY_H" != "1"; then
943    echo "** Cannot --enable-pcre2test-readline because readline/history.h was not found."
944    exit 1
945  fi
946  if test -z "$LIBREADLINE"; then
947    echo "** Cannot --enable-pcre2test-readline because readline library was not found."
948    exit 1
949  fi
950fi
951
952# Handle valgrind support
953
954if test "$enable_valgrind" = "yes"; then
955  m4_ifdef([PKG_CHECK_MODULES],
956           [PKG_CHECK_MODULES([VALGRIND],[valgrind])],
957           [AC_MSG_ERROR([pkg-config not supported])])
958fi
959
960# Handle code coverage reporting support
961if test "$enable_coverage" = "yes"; then
962  if test "x$GCC" != "xyes"; then
963    AC_MSG_ERROR([Code coverage reports can only be generated when using GCC])
964  fi
965
966  # ccache is incompatible with gcov
967  AC_PATH_PROG([SHTOOL],[shtool],[false])
968  case `$SHTOOL path $CC` in
969    *ccache*) cc_ccache=yes;;
970    *) cc_ccache=no;;
971  esac
972
973  if test "$cc_ccache" = "yes"; then
974    if test -z "$CCACHE_DISABLE" -o "$CCACHE_DISABLE" != "1"; then
975      AC_MSG_ERROR([must export CCACHE_DISABLE=1 to disable ccache for code coverage])
976    fi
977  fi
978
979  AC_ARG_VAR([LCOV],[the ltp lcov program])
980  AC_PATH_PROG([LCOV],[lcov],[false])
981  if test "x$LCOV" = "xfalse"; then
982    AC_MSG_ERROR([lcov not found])
983  fi
984
985  AC_ARG_VAR([GENHTML],[the ltp genhtml program])
986  AC_PATH_PROG([GENHTML],[genhtml],[false])
987  if test "x$GENHTML" = "xfalse"; then
988    AC_MSG_ERROR([genhtml not found])
989  fi
990
991  # Set flags needed for gcov
992  GCOV_CFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage"
993  GCOV_CXXFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage"
994  GCOV_LIBS="-lgcov"
995  AC_SUBST([GCOV_CFLAGS])
996  AC_SUBST([GCOV_CXXFLAGS])
997  AC_SUBST([GCOV_LIBS])
998fi # enable_coverage
999
1000AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"])
1001
1002# Produce these files, in addition to config.h.
1003AC_CONFIG_FILES(
1004	Makefile
1005	libpcre2-8.pc
1006	libpcre2-16.pc
1007	libpcre2-32.pc
1008	libpcre2-posix.pc
1009	pcre2-config
1010	src/pcre2.h
1011)
1012
1013# Make the generated script files executable.
1014AC_CONFIG_COMMANDS([script-chmod], [chmod a+x pcre2-config])
1015
1016# Make sure that pcre2_chartables.c is removed in case the method for
1017# creating it was changed by reconfiguration.
1018AC_CONFIG_COMMANDS([delete-old-chartables], [rm -f pcre2_chartables.c])
1019
1020AC_OUTPUT
1021
1022# --disable-stack-for-recursion is obsolete and has no effect.
1023
1024if test "$enable_stack_for_recursion" = "no"; then
1025cat <<EOF
1026
1027WARNING: --disable-stack-for-recursion is obsolete and has no effect.
1028EOF
1029fi
1030
1031# Print out a nice little message after configure is run displaying the
1032# chosen options.
1033
1034ebcdic_nl_code=n/a
1035if test "$enable_ebcdic_nl25" = "yes"; then
1036  ebcdic_nl_code=0x25
1037elif test "$enable_ebcdic" = "yes"; then
1038  ebcdic_nl_code=0x15
1039fi
1040
1041cat <<EOF
1042
1043$PACKAGE-$VERSION configuration summary:
1044
1045    Install prefix ..................... : ${prefix}
1046    C preprocessor ..................... : ${CPP}
1047    C compiler ......................... : ${CC}
1048    Linker ............................. : ${LD}
1049    C preprocessor flags ............... : ${CPPFLAGS}
1050    C compiler flags ................... : ${CFLAGS} ${VISIBILITY_CFLAGS}
1051    Linker flags ....................... : ${LDFLAGS}
1052    Extra libraries .................... : ${LIBS}
1053
1054    Build 8-bit pcre2 library .......... : ${enable_pcre2_8}
1055    Build 16-bit pcre2 library ......... : ${enable_pcre2_16}
1056    Build 32-bit pcre2 library ......... : ${enable_pcre2_32}
1057    Include debugging code ............. : ${enable_debug}
1058    Enable JIT compiling support ....... : ${enable_jit}
1059    Use SELinux allocator in JIT ....... : ${enable_jit_sealloc}
1060    Enable Unicode support ............. : ${enable_unicode}
1061    Newline char/sequence .............. : ${enable_newline}
1062    \R matches only ANYCRLF ............ : ${enable_bsr_anycrlf}
1063    \C is disabled ..................... : ${enable_never_backslash_C}
1064    EBCDIC coding ...................... : ${enable_ebcdic}
1065    EBCDIC code for NL ................. : ${ebcdic_nl_code}
1066    Rebuild char tables ................ : ${enable_rebuild_chartables}
1067    Internal link size ................. : ${with_link_size}
1068    Nested parentheses limit ........... : ${with_parens_nest_limit}
1069    Heap limit ......................... : ${with_heap_limit} kibibytes
1070    Match limit ........................ : ${with_match_limit}
1071    Match depth limit .................. : ${with_match_limit_depth}
1072    Build shared libs .................. : ${enable_shared}
1073    Build static libs .................. : ${enable_static}
1074    Use JIT in pcre2grep ............... : ${enable_pcre2grep_jit}
1075    Enable callouts in pcre2grep ....... : ${enable_pcre2grep_callout}
1076    Enable fork in pcre2grep callouts .. : ${enable_pcre2grep_callout_fork}
1077    Initial buffer size for pcre2grep .. : ${with_pcre2grep_bufsize}
1078    Maximum buffer size for pcre2grep .. : ${with_pcre2grep_max_bufsize}
1079    Link pcre2grep with libz ........... : ${enable_pcre2grep_libz}
1080    Link pcre2grep with libbz2 ......... : ${enable_pcre2grep_libbz2}
1081    Link pcre2test with libedit ........ : ${enable_pcre2test_libedit}
1082    Link pcre2test with libreadline .... : ${enable_pcre2test_libreadline}
1083    Valgrind support ................... : ${enable_valgrind}
1084    Code coverage ...................... : ${enable_coverage}
1085    Fuzzer support ..................... : ${enable_fuzz_support}
1086    Use %zu and %td .................... : ${enable_percent_zt}
1087
1088EOF
1089
1090dnl end configure.ac
1091