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