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