/[pcre]/code/trunk/configure.ac
ViewVC logotype

Contents of /code/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1750 - (show annotations)
Fri Mar 1 16:24:05 2019 UTC (8 months, 1 week ago) by ph10
File size: 42068 byte(s)
Error occurred while calculating annotation data.
Fix --enable-jit=auto for out-of-tree builds.
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 PCRE user writes code that uses PCRE_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 PCRE_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(pcre_major, [8])
12 m4_define(pcre_minor, [44])
13 m4_define(pcre_prerelease, [-RC1])
14 m4_define(pcre_date, [2019-03-01])
15
16 # NOTE: The CMakeLists.txt file searches for the above variables in the first
17 # 50 lines of this file. Please update that if the variables above are moved.
18
19 # Libtool shared library interface versions (current:revision:age)
20 m4_define(libpcre_version, [3:11:2])
21 m4_define(libpcre16_version, [2:11:2])
22 m4_define(libpcre32_version, [0:11:0])
23 m4_define(libpcreposix_version, [0:6:0])
24 m4_define(libpcrecpp_version, [0:1:0])
25
26 AC_PREREQ(2.57)
27 AC_INIT(PCRE, pcre_major.pcre_minor[]pcre_prerelease, , pcre)
28 AC_CONFIG_SRCDIR([pcre.h.in])
29 AM_INIT_AUTOMAKE([dist-bzip2 dist-zip])
30 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
31 AC_CONFIG_HEADERS(config.h)
32
33 # This is a new thing required to stop a warning from automake 1.12
34 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
35
36 # This was added at the suggestion of libtoolize (03-Jan-10)
37 AC_CONFIG_MACRO_DIR([m4])
38
39 # The default CFLAGS and CXXFLAGS in Autoconf are "-g -O2" for gcc and just
40 # "-g" for any other compiler. There doesn't seem to be a standard way of
41 # getting rid of the -g (which I don't think is needed for a production
42 # library). This fudge seems to achieve the necessary. First, we remember the
43 # externally set values of CFLAGS and CXXFLAGS. Then call the AC_PROG_CC and
44 # AC_PROG_CXX macros to find the compilers - if CFLAGS and CXXFLAGS are not
45 # set, they will be set to Autoconf's defaults. Afterwards, if the original
46 # values were not set, remove the -g from the Autoconf defaults.
47 # (PH 02-May-07)
48
49 remember_set_CFLAGS="$CFLAGS"
50 remember_set_CXXFLAGS="$CXXFLAGS"
51
52 AC_PROG_CC
53 AC_PROG_CXX
54 AM_PROG_CC_C_O
55
56 if test "x$remember_set_CFLAGS" = "x"
57 then
58 if test "$CFLAGS" = "-g -O2"
59 then
60 CFLAGS="-O2"
61 elif test "$CFLAGS" = "-g"
62 then
63 CFLAGS=""
64 fi
65 fi
66
67 if test "x$remember_set_CXXFLAGS" = "x"
68 then
69 if test "$CXXFLAGS" = "-g -O2"
70 then
71 CXXFLAGS="-O2"
72 elif test "$CXXFLAGS" = "-g"
73 then
74 CXXFLAGS=""
75 fi
76 fi
77
78 # AC_PROG_CXX will return "g++" even if no c++ compiler is installed.
79 # Check for that case, and just disable c++ code if g++ doesn't run.
80 AC_LANG_PUSH(C++)
81 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],, CXX=""; CXXCP=""; CXXFLAGS="")
82 AC_LANG_POP
83
84 # Check for a 64-bit integer type
85 AC_TYPE_INT64_T
86
87 AC_PROG_INSTALL
88 AC_LIBTOOL_WIN32_DLL
89 LT_INIT
90 AC_PROG_LN_S
91
92 # Check for GCC visibility feature
93
94 PCRE_VISIBILITY
95
96 # Versioning
97
98 PCRE_MAJOR="pcre_major"
99 PCRE_MINOR="pcre_minor"
100 PCRE_PRERELEASE="pcre_prerelease"
101 PCRE_DATE="pcre_date"
102
103 if test "$PCRE_MINOR" = "08" -o "$PCRE_MINOR" = "09"
104 then
105 echo "***"
106 echo "*** Minor version number $PCRE_MINOR must not be used. ***"
107 echo "*** Use only 01 to 07 or 10 onwards, to avoid octal issues. ***"
108 echo "***"
109 exit 1
110 fi
111
112 AC_SUBST(PCRE_MAJOR)
113 AC_SUBST(PCRE_MINOR)
114 AC_SUBST(PCRE_PRERELEASE)
115 AC_SUBST(PCRE_DATE)
116
117 # Set a more sensible default value for $(htmldir).
118 if test "x$htmldir" = 'x${docdir}'
119 then
120 htmldir='${docdir}/html'
121 fi
122
123 # Handle --disable-pcre8 (enabled by default)
124 AC_ARG_ENABLE(pcre8,
125 AS_HELP_STRING([--disable-pcre8],
126 [disable 8 bit character support]),
127 , enable_pcre8=unset)
128 AC_SUBST(enable_pcre8)
129
130 # Handle --enable-pcre16 (disabled by default)
131 AC_ARG_ENABLE(pcre16,
132 AS_HELP_STRING([--enable-pcre16],
133 [enable 16 bit character support]),
134 , enable_pcre16=unset)
135 AC_SUBST(enable_pcre16)
136
137 # Handle --enable-pcre32 (disabled by default)
138 AC_ARG_ENABLE(pcre32,
139 AS_HELP_STRING([--enable-pcre32],
140 [enable 32 bit character support]),
141 , enable_pcre32=unset)
142 AC_SUBST(enable_pcre32)
143
144 # Handle --disable-cpp. The substitution of enable_cpp is needed for use in
145 # pcre-config.
146 AC_ARG_ENABLE(cpp,
147 AS_HELP_STRING([--disable-cpp],
148 [disable C++ support]),
149 , enable_cpp=unset)
150 AC_SUBST(enable_cpp)
151
152 # Handle --enable-jit (disabled by default)
153 AC_ARG_ENABLE(jit,
154 AS_HELP_STRING([--enable-jit],
155 [enable Just-In-Time compiling support]),
156 , enable_jit=no)
157
158 # This code enables JIT if the hardware supports it.
159
160 if test "$enable_jit" = "auto"; then
161 AC_LANG(C)
162 SAVE_CPPFLAGS=$CPPFLAGS
163 CPPFLAGS=-I$srcdir
164 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
165 #define SLJIT_CONFIG_AUTO 1
166 #include "sljit/sljitConfigInternal.h"
167 #if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
168 #error unsupported
169 #endif]])], enable_jit=yes, enable_jit=no)
170 CPPFLAGS=$SAVE_CPPFLAGS
171 fi
172
173 # Handle --disable-pcregrep-jit (enabled by default)
174 AC_ARG_ENABLE(pcregrep-jit,
175 AS_HELP_STRING([--disable-pcregrep-jit],
176 [disable JIT support in pcregrep]),
177 , enable_pcregrep_jit=yes)
178
179 # Handle --enable-rebuild-chartables
180 AC_ARG_ENABLE(rebuild-chartables,
181 AS_HELP_STRING([--enable-rebuild-chartables],
182 [rebuild character tables in current locale]),
183 , enable_rebuild_chartables=no)
184
185 # Handle --enable-utf8 (disabled by default)
186 AC_ARG_ENABLE(utf8,
187 AS_HELP_STRING([--enable-utf8],
188 [another name for --enable-utf. Kept only for compatibility reasons]),
189 , enable_utf8=unset)
190
191 # Handle --enable-utf (disabled by default)
192 AC_ARG_ENABLE(utf,
193 AS_HELP_STRING([--enable-utf],
194 [enable UTF-8/16/32 support (incompatible with --enable-ebcdic)]),
195 , enable_utf=unset)
196
197 # Handle --enable-unicode-properties
198 AC_ARG_ENABLE(unicode-properties,
199 AS_HELP_STRING([--enable-unicode-properties],
200 [enable Unicode properties support (implies --enable-utf)]),
201 , enable_unicode_properties=no)
202
203 # Handle newline options
204 ac_pcre_newline=lf
205 AC_ARG_ENABLE(newline-is-cr,
206 AS_HELP_STRING([--enable-newline-is-cr],
207 [use CR as newline character]),
208 ac_pcre_newline=cr)
209 AC_ARG_ENABLE(newline-is-lf,
210 AS_HELP_STRING([--enable-newline-is-lf],
211 [use LF as newline character (default)]),
212 ac_pcre_newline=lf)
213 AC_ARG_ENABLE(newline-is-crlf,
214 AS_HELP_STRING([--enable-newline-is-crlf],
215 [use CRLF as newline sequence]),
216 ac_pcre_newline=crlf)
217 AC_ARG_ENABLE(newline-is-anycrlf,
218 AS_HELP_STRING([--enable-newline-is-anycrlf],
219 [use CR, LF, or CRLF as newline sequence]),
220 ac_pcre_newline=anycrlf)
221 AC_ARG_ENABLE(newline-is-any,
222 AS_HELP_STRING([--enable-newline-is-any],
223 [use any valid Unicode newline sequence]),
224 ac_pcre_newline=any)
225 enable_newline="$ac_pcre_newline"
226
227 # Handle --enable-bsr-anycrlf
228 AC_ARG_ENABLE(bsr-anycrlf,
229 AS_HELP_STRING([--enable-bsr-anycrlf],
230 [\R matches only CR, LF, CRLF by default]),
231 , enable_bsr_anycrlf=no)
232
233 # Handle --enable-ebcdic
234 AC_ARG_ENABLE(ebcdic,
235 AS_HELP_STRING([--enable-ebcdic],
236 [assume EBCDIC coding rather than ASCII; incompatible with --enable-utf; use only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]),
237 , enable_ebcdic=no)
238
239 # Handle --enable-ebcdic-nl25
240 AC_ARG_ENABLE(ebcdic-nl25,
241 AS_HELP_STRING([--enable-ebcdic-nl25],
242 [set EBCDIC code for NL to 0x25 instead of 0x15; it implies --enable-ebcdic]),
243 , enable_ebcdic_nl25=no)
244
245 # Handle --disable-stack-for-recursion
246 AC_ARG_ENABLE(stack-for-recursion,
247 AS_HELP_STRING([--disable-stack-for-recursion],
248 [don't use stack recursion when matching]),
249 , enable_stack_for_recursion=yes)
250
251 # Handle --enable-pcregrep-libz
252 AC_ARG_ENABLE(pcregrep-libz,
253 AS_HELP_STRING([--enable-pcregrep-libz],
254 [link pcregrep with libz to handle .gz files]),
255 , enable_pcregrep_libz=no)
256
257 # Handle --enable-pcregrep-libbz2
258 AC_ARG_ENABLE(pcregrep-libbz2,
259 AS_HELP_STRING([--enable-pcregrep-libbz2],
260 [link pcregrep with libbz2 to handle .bz2 files]),
261 , enable_pcregrep_libbz2=no)
262
263 # Handle --with-pcregrep-bufsize=N
264 AC_ARG_WITH(pcregrep-bufsize,
265 AS_HELP_STRING([--with-pcregrep-bufsize=N],
266 [pcregrep buffer size (default=20480, minimum=8192)]),
267 , with_pcregrep_bufsize=20480)
268
269 # Handle --enable-pcretest-libedit
270 AC_ARG_ENABLE(pcretest-libedit,
271 AS_HELP_STRING([--enable-pcretest-libedit],
272 [link pcretest with libedit]),
273 , enable_pcretest_libedit=no)
274
275 # Handle --enable-pcretest-libreadline
276 AC_ARG_ENABLE(pcretest-libreadline,
277 AS_HELP_STRING([--enable-pcretest-libreadline],
278 [link pcretest with libreadline]),
279 , enable_pcretest_libreadline=no)
280
281 # Handle --with-posix-malloc-threshold=NBYTES
282 AC_ARG_WITH(posix-malloc-threshold,
283 AS_HELP_STRING([--with-posix-malloc-threshold=NBYTES],
284 [threshold for POSIX malloc usage (default=10)]),
285 , with_posix_malloc_threshold=10)
286
287 # Handle --with-link-size=N
288 AC_ARG_WITH(link-size,
289 AS_HELP_STRING([--with-link-size=N],
290 [internal link size (2, 3, or 4 allowed; default=2)]),
291 , with_link_size=2)
292
293 # Handle --with-parens-nest-limit=N
294 AC_ARG_WITH(parens-nest-limit,
295 AS_HELP_STRING([--with-parens-nest-limit=N],
296 [nested parentheses limit (default=250)]),
297 , with_parens_nest_limit=250)
298
299 # Handle --with-match-limit=N
300 AC_ARG_WITH(match-limit,
301 AS_HELP_STRING([--with-match-limit=N],
302 [default limit on internal looping (default=10000000)]),
303 , with_match_limit=10000000)
304
305 # Handle --with-match-limit_recursion=N
306 #
307 # Note: In config.h, the default is to define MATCH_LIMIT_RECURSION
308 # symbolically as MATCH_LIMIT, which in turn is defined to be some numeric
309 # value (e.g. 10000000). MATCH_LIMIT_RECURSION can otherwise be set to some
310 # different numeric value (or even the same numeric value as MATCH_LIMIT,
311 # though no longer defined in terms of the latter).
312 #
313 AC_ARG_WITH(match-limit-recursion,
314 AS_HELP_STRING([--with-match-limit-recursion=N],
315 [default limit on internal recursion (default=MATCH_LIMIT)]),
316 , with_match_limit_recursion=MATCH_LIMIT)
317
318 # Handle --enable-valgrind
319 AC_ARG_ENABLE(valgrind,
320 AS_HELP_STRING([--enable-valgrind],
321 [valgrind support]),
322 , enable_valgrind=no)
323
324 # Enable code coverage reports using gcov
325 AC_ARG_ENABLE(coverage,
326 AS_HELP_STRING([--enable-coverage],
327 [enable code coverage reports using gcov]),
328 , enable_coverage=no)
329
330 # Copy enable_utf8 value to enable_utf for compatibility reasons
331 if test "x$enable_utf8" != "xunset"
332 then
333 if test "x$enable_utf" != "xunset"
334 then
335 AC_MSG_ERROR([--enable/disable-utf8 is kept only for compatibility reasons and its value is copied to --enable/disable-utf. Newer code must use --enable/disable-utf alone.])
336 fi
337 enable_utf=$enable_utf8
338 fi
339
340 # Set the default value for pcre8
341 if test "x$enable_pcre8" = "xunset"
342 then
343 enable_pcre8=yes
344 fi
345
346 # Set the default value for pcre16
347 if test "x$enable_pcre16" = "xunset"
348 then
349 enable_pcre16=no
350 fi
351
352 # Set the default value for pcre32
353 if test "x$enable_pcre32" = "xunset"
354 then
355 enable_pcre32=no
356 fi
357
358 # Make sure enable_pcre8 or enable_pcre16 was set
359 if test "x$enable_pcre8$enable_pcre16$enable_pcre32" = "xnonono"
360 then
361 AC_MSG_ERROR([At least one of 8, 16 or 32 bit pcre library must be enabled])
362 fi
363
364 # Make sure that if enable_unicode_properties was set, that UTF support is enabled.
365 if test "x$enable_unicode_properties" = "xyes"
366 then
367 if test "x$enable_utf" = "xno"
368 then
369 AC_MSG_ERROR([support for Unicode properties requires UTF-8/16/32 support])
370 fi
371 enable_utf=yes
372 fi
373
374 # enable_utf is disabled by default.
375 if test "x$enable_utf" = "xunset"
376 then
377 enable_utf=no
378 fi
379
380 # enable_cpp copies the value of enable_pcre8 by default
381 if test "x$enable_cpp" = "xunset"
382 then
383 enable_cpp=$enable_pcre8
384 fi
385
386 # Make sure that if enable_cpp was set, that enable_pcre8 support is enabled
387 if test "x$enable_cpp" = "xyes"
388 then
389 if test "x$enable_pcre8" = "xno"
390 then
391 AC_MSG_ERROR([C++ library requires pcre library with 8 bit characters])
392 fi
393 fi
394
395 # Convert the newline identifier into the appropriate integer value. The first
396 # three are ASCII values 0x0a, 0x0d, and 0x0d0a, but if EBCDIC is enabled, they
397 # are changed below.
398
399 case "$enable_newline" in
400 lf) ac_pcre_newline_value=10 ;;
401 cr) ac_pcre_newline_value=13 ;;
402 crlf) ac_pcre_newline_value=3338 ;;
403 anycrlf) ac_pcre_newline_value=-2 ;;
404 any) ac_pcre_newline_value=-1 ;;
405 *)
406 AC_MSG_ERROR([invalid argument \"$enable_newline\" to --enable-newline option])
407 ;;
408 esac
409
410 # --enable-ebcdic-nl25 implies --enable-ebcdic
411 if test "x$enable_ebcdic_nl25" = "xyes"; then
412 enable_ebcdic=yes
413 fi
414
415 # Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled,
416 # and the newline value is adjusted appropriately (CR is still 13, but LF is
417 # 21 or 37). Also check that UTF support is not requested, because PCRE cannot
418 # handle EBCDIC and UTF in the same build. To do so it would need to use
419 # different character constants depending on the mode.
420 #
421 if test "x$enable_ebcdic" = "xyes"; then
422 enable_rebuild_chartables=yes
423
424 if test "x$enable_utf" = "xyes"; then
425 AC_MSG_ERROR([support for EBCDIC and UTF-8/16/32 cannot be enabled at the same time])
426 fi
427
428 if test "x$enable_ebcdic_nl25" = "xno"; then
429 case "$ac_pcre_newline_value" in
430 10) ac_pcre_newline_value=21 ;;
431 3338) ac_pcre_newline_value=3349 ;;
432 esac
433 else
434 case "$ac_pcre_newline_value" in
435 10) ac_pcre_newline_value=37 ;;
436 3338) ac_pcre_newline_value=3365 ;;
437 esac
438 fi
439 fi
440
441 # Check argument to --with-link-size
442 case "$with_link_size" in
443 2|3|4) ;;
444 *)
445 AC_MSG_ERROR([invalid argument \"$with_link_size\" to --with-link-size option])
446 ;;
447 esac
448
449 AH_TOP([
450 /* PCRE is written in Standard C, but there are a few non-standard things it
451 can cope with, allowing it to run on SunOS4 and other "close to standard"
452 systems.
453
454 In environments that support the GNU autotools, config.h.in is converted into
455 config.h by the "configure" script. In environments that use CMake,
456 config-cmake.in is converted into config.h. If you are going to build PCRE "by
457 hand" without using "configure" or CMake, you should copy the distributed
458 config.h.generic to config.h, and edit the macro definitions to be the way you
459 need them. You must then add -DHAVE_CONFIG_H to all of your compile commands,
460 so that config.h is included at the start of every source.
461
462 Alternatively, you can avoid editing by using -D on the compiler command line
463 to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H,
464 but if you do, default values will be taken from config.h for non-boolean
465 macros that are not defined on the command line.
466
467 Boolean macros such as HAVE_STDLIB_H and SUPPORT_PCRE8 should either be defined
468 (conventionally to 1) for TRUE, and not defined at all for FALSE. All such
469 macros are listed as a commented #undef in config.h.generic. Macros such as
470 MATCH_LIMIT, whose actual value is relevant, have defaults defined, but are
471 surrounded by #ifndef/#endif lines so that the value can be overridden by -D.
472
473 PCRE uses memmove() if HAVE_MEMMOVE is defined; otherwise it uses bcopy() if
474 HAVE_BCOPY is defined. If your system has neither bcopy() nor memmove(), make
475 sure both macros are undefined; an emulation function will then be used. */])
476
477 # Checks for header files.
478 AC_HEADER_STDC
479 AC_CHECK_HEADERS(limits.h sys/types.h sys/stat.h dirent.h)
480 AC_CHECK_HEADERS([windows.h], [HAVE_WINDOWS_H=1])
481
482 # The files below are C++ header files.
483 pcre_have_type_traits="0"
484 pcre_have_bits_type_traits="0"
485
486 if test "x$enable_cpp" = "xyes" -a -z "$CXX"; then
487 AC_MSG_ERROR([Invalid C++ compiler or C++ compiler flags])
488 fi
489
490 if test "x$enable_cpp" = "xyes" -a -n "$CXX"
491 then
492 AC_LANG_PUSH(C++)
493
494 # Older versions of pcre defined pcrecpp::no_arg, but in new versions
495 # it's called pcrecpp::RE::no_arg. For backwards ABI compatibility,
496 # we want to make one an alias for the other. Different systems do
497 # this in different ways. Some systems, for instance, can do it via
498 # a linker flag: -alias (for os x 10.5) or -i (for os x <=10.4).
499 OLD_LDFLAGS="$LDFLAGS"
500 for flag in "-alias,__ZN7pcrecpp2RE6no_argE,__ZN7pcrecpp6no_argE" \
501 "-i__ZN7pcrecpp6no_argE:__ZN7pcrecpp2RE6no_argE"; do
502 AC_MSG_CHECKING([for alias support in the linker])
503 LDFLAGS="$OLD_LDFLAGS -Wl,$flag"
504 # We try to run the linker with this new ld flag. If the link fails,
505 # we give up and remove the new flag from LDFLAGS.
506 AC_LINK_IFELSE([AC_LANG_PROGRAM([namespace pcrecpp {
507 class RE { static int no_arg; };
508 int RE::no_arg;
509 }],
510 [])],
511 [AC_MSG_RESULT([yes]);
512 EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag";
513 break;],
514 AC_MSG_RESULT([no]))
515 done
516 LDFLAGS="$OLD_LDFLAGS"
517
518 # We could be more clever here, given we're doing AC_SUBST with this
519 # (eg set a var to be the name of the include file we want). But we're not
520 # so it's easy to change back to 'regular' autoconf vars if we needed to.
521 AC_CHECK_HEADERS(string, [pcre_have_cpp_headers="1"],
522 [pcre_have_cpp_headers="0"])
523 AC_CHECK_HEADERS(bits/type_traits.h, [pcre_have_bits_type_traits="1"],
524 [pcre_have_bits_type_traits="0"])
525 AC_CHECK_HEADERS(type_traits.h, [pcre_have_type_traits="1"],
526 [pcre_have_type_traits="0"])
527
528 # (This isn't c++-specific, but is only used in pcrecpp.cc, so try this
529 # in a c++ context. This matters becuase strtoimax is C99 and may not
530 # be supported by the C++ compiler.)
531 # Figure out how to create a longlong from a string: strtoll and
532 # equiv. It's not enough to call AC_CHECK_FUNCS: hpux has a
533 # strtoll, for instance, but it only takes 2 args instead of 3!
534 # We have to call AH_TEMPLATE since AC_DEFINE_UNQUOTED below is complex.
535 AH_TEMPLATE(HAVE_STRTOQ, [Define to 1 if you have `strtoq'.])
536 AH_TEMPLATE(HAVE_STRTOLL, [Define to 1 if you have `strtoll'.])
537 AH_TEMPLATE(HAVE__STRTOI64, [Define to 1 if you have `_strtoi64'.])
538 AH_TEMPLATE(HAVE_STRTOIMAX, [Define to 1 if you have `strtoimax'.])
539 have_strto_fn=0
540 for fn in strtoq strtoll _strtoi64 strtoimax; do
541 AC_MSG_CHECKING([for $fn])
542 if test "$fn" = strtoimax; then
543 include=stdint.h
544 else
545 include=stdlib.h
546 fi
547 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <$include>],
548 [char* e; return $fn("100", &e, 10)])],
549 [AC_MSG_RESULT(yes)
550 AC_DEFINE_UNQUOTED(HAVE_`echo $fn | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`, 1,
551 [Define to 1 if you have `$fn'.])
552 have_strto_fn=1
553 break],
554 [AC_MSG_RESULT(no)])
555 done
556
557 if test "$have_strto_fn" = 1; then
558 AC_CHECK_TYPES([long long],
559 [pcre_have_long_long="1"],
560 [pcre_have_long_long="0"])
561 AC_CHECK_TYPES([unsigned long long],
562 [pcre_have_ulong_long="1"],
563 [pcre_have_ulong_long="0"])
564 else
565 pcre_have_long_long="0"
566 pcre_have_ulong_long="0"
567 fi
568 AC_SUBST(pcre_have_long_long)
569 AC_SUBST(pcre_have_ulong_long)
570
571 AC_LANG_POP
572 fi
573 # Using AC_SUBST eliminates the need to include config.h in a public .h file
574 AC_SUBST(pcre_have_type_traits)
575 AC_SUBST(pcre_have_bits_type_traits)
576
577 # Conditional compilation
578 AM_CONDITIONAL(WITH_PCRE8, test "x$enable_pcre8" = "xyes")
579 AM_CONDITIONAL(WITH_PCRE16, test "x$enable_pcre16" = "xyes")
580 AM_CONDITIONAL(WITH_PCRE32, test "x$enable_pcre32" = "xyes")
581 AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")
582 AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
583 AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
584 AM_CONDITIONAL(WITH_UTF, test "x$enable_utf" = "xyes")
585 AM_CONDITIONAL(WITH_VALGRIND, test "x$enable_valgrind" = "xyes")
586
587 # Checks for typedefs, structures, and compiler characteristics.
588
589 AC_C_CONST
590 AC_TYPE_SIZE_T
591
592 # Checks for library functions.
593
594 AC_CHECK_FUNCS(bcopy memmove strerror)
595
596 # Check for the availability of libz (aka zlib)
597
598 AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H=1])
599 AC_CHECK_LIB([z], [gzopen], [HAVE_LIBZ=1])
600
601 # Check for the availability of libbz2. Originally we just used AC_CHECK_LIB,
602 # as for libz. However, this had the following problem, diagnosed and fixed by
603 # a user:
604 #
605 # - libbz2 uses the Pascal calling convention (WINAPI) for the functions
606 # under Win32.
607 # - The standard autoconf AC_CHECK_LIB fails to include "bzlib.h",
608 # therefore missing the function definition.
609 # - The compiler thus generates a "C" signature for the test function.
610 # - The linker fails to find the "C" function.
611 # - PCRE fails to configure if asked to do so against libbz2.
612 #
613 # Solution:
614 #
615 # - Replace the AC_CHECK_LIB test with a custom test.
616
617 AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_H=1])
618 # Original test
619 # AC_CHECK_LIB([bz2], [BZ2_bzopen], [HAVE_LIBBZ2=1])
620 #
621 # Custom test follows
622
623 AC_MSG_CHECKING([for libbz2])
624 OLD_LIBS="$LIBS"
625 LIBS="$LIBS -lbz2"
626 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
627 #ifdef HAVE_BZLIB_H
628 #include <bzlib.h>
629 #endif]],
630 [[return (int)BZ2_bzopen("conftest", "rb");]])],
631 [AC_MSG_RESULT([yes]);HAVE_LIBBZ2=1; break;],
632 AC_MSG_RESULT([no]))
633 LIBS="$OLD_LIBS"
634
635 # Check for the availabiity of libreadline
636
637 if test "$enable_pcretest_libreadline" = "yes"; then
638 AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_H=1])
639 AC_CHECK_HEADERS([readline/history.h], [HAVE_HISTORY_H=1])
640 AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lreadline"],
641 [unset ac_cv_lib_readline_readline;
642 AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltinfo"],
643 [unset ac_cv_lib_readline_readline;
644 AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lcurses"],
645 [unset ac_cv_lib_readline_readline;
646 AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncurses"],
647 [unset ac_cv_lib_readline_readline;
648 AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncursesw"],
649 [unset ac_cv_lib_readline_readline;
650 AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltermcap"],
651 [LIBREADLINE=""],
652 [-ltermcap])],
653 [-lncursesw])],
654 [-lncurses])],
655 [-lcurses])],
656 [-ltinfo])])
657 AC_SUBST(LIBREADLINE)
658 if test -n "$LIBREADLINE"; then
659 if test "$LIBREADLINE" != "-lreadline"; then
660 echo "-lreadline needs $LIBREADLINE"
661 LIBREADLINE="-lreadline $LIBREADLINE"
662 fi
663 fi
664 fi
665
666
667 # Check for the availability of libedit. Different distributions put its
668 # headers in different places. Try to cover the most common ones.
669
670 if test "$enable_pcretest_libedit" = "yes"; then
671 AC_CHECK_HEADERS([editline/readline.h], [HAVE_EDITLINE_READLINE_H=1],
672 [AC_CHECK_HEADERS([edit/readline/readline.h], [HAVE_READLINE_READLINE_H=1],
673 [AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_READLINE_H=1])])])
674 AC_CHECK_LIB([edit], [readline], [LIBEDIT="-ledit"])
675 fi
676
677 # This facilitates -ansi builds under Linux
678 dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc])
679
680 PCRE_STATIC_CFLAG=""
681 if test "x$enable_shared" = "xno" ; then
682 AC_DEFINE([PCRE_STATIC], [1], [
683 Define to any value if linking statically (TODO: make nice with Libtool)])
684 PCRE_STATIC_CFLAG="-DPCRE_STATIC"
685 fi
686 AC_SUBST(PCRE_STATIC_CFLAG)
687
688 # Here is where pcre specific defines are handled
689
690 if test "$enable_pcre8" = "yes"; then
691 AC_DEFINE([SUPPORT_PCRE8], [], [
692 Define to any value to enable the 8 bit PCRE library.])
693 fi
694
695 if test "$enable_pcre16" = "yes"; then
696 AC_DEFINE([SUPPORT_PCRE16], [], [
697 Define to any value to enable the 16 bit PCRE library.])
698 fi
699
700 if test "$enable_pcre32" = "yes"; then
701 AC_DEFINE([SUPPORT_PCRE32], [], [
702 Define to any value to enable the 32 bit PCRE library.])
703 fi
704
705 # Unless running under Windows, JIT support requires pthreads.
706
707 if test "$enable_jit" = "yes"; then
708 if test "$HAVE_WINDOWS_H" != "1"; then
709 AX_PTHREAD([], [AC_MSG_ERROR([JIT support requires pthreads])])
710 CC="$PTHREAD_CC"
711 CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
712 LIBS="$PTHREAD_LIBS $LIBS"
713 fi
714 AC_DEFINE([SUPPORT_JIT], [], [
715 Define to any value to enable support for Just-In-Time compiling.])
716 else
717 enable_pcregrep_jit="no"
718 fi
719
720 if test "$enable_pcregrep_jit" = "yes"; then
721 AC_DEFINE([SUPPORT_PCREGREP_JIT], [], [
722 Define to any value to enable JIT support in pcregrep.])
723 fi
724
725 if test "$enable_utf" = "yes"; then
726 AC_DEFINE([SUPPORT_UTF], [], [
727 Define to any value to enable support for the UTF-8/16/32 Unicode encoding.
728 This will work even in an EBCDIC environment, but it is incompatible
729 with the EBCDIC macro. That is, PCRE can support *either* EBCDIC
730 code *or* ASCII/UTF-8/16/32, but not both at once.])
731 fi
732
733 if test "$enable_unicode_properties" = "yes"; then
734 AC_DEFINE([SUPPORT_UCP], [], [
735 Define to any value to enable support for Unicode properties.])
736 fi
737
738 if test "$enable_stack_for_recursion" = "no"; then
739 AC_DEFINE([NO_RECURSE], [], [
740 PCRE uses recursive function calls to handle backtracking while
741 matching. This can sometimes be a problem on systems that have
742 stacks of limited size. Define NO_RECURSE to any value to get a
743 version that doesn't use recursion in the match() function; instead
744 it creates its own stack by steam using pcre_recurse_malloc() to obtain
745 memory from the heap. For more detail, see the comments and other stuff
746 just above the match() function.])
747 fi
748
749 if test "$enable_pcregrep_libz" = "yes"; then
750 AC_DEFINE([SUPPORT_LIBZ], [], [
751 Define to any value to allow pcregrep to be linked with libz, so that it is
752 able to handle .gz files.])
753 fi
754
755 if test "$enable_pcregrep_libbz2" = "yes"; then
756 AC_DEFINE([SUPPORT_LIBBZ2], [], [
757 Define to any value to allow pcregrep to be linked with libbz2, so that it
758 is able to handle .bz2 files.])
759 fi
760
761 if test $with_pcregrep_bufsize -lt 8192 ; then
762 AC_MSG_WARN([$with_pcregrep_bufsize is too small for --with-pcregrep-bufsize; using 8192])
763 with_pcregrep_bufsize="8192"
764 else
765 if test $? -gt 1 ; then
766 AC_MSG_ERROR([Bad value for --with-pcregrep-bufsize])
767 fi
768 fi
769
770 AC_DEFINE_UNQUOTED([PCREGREP_BUFSIZE], [$with_pcregrep_bufsize], [
771 The value of PCREGREP_BUFSIZE determines the size of buffer used by pcregrep
772 to hold parts of the file it is searching. This is also the minimum value.
773 The actual amount of memory used by pcregrep is three times this number,
774 because it allows for the buffering of "before" and "after" lines.])
775
776 if test "$enable_pcretest_libedit" = "yes"; then
777 AC_DEFINE([SUPPORT_LIBEDIT], [], [
778 Define to any value to allow pcretest to be linked with libedit.])
779 LIBREADLINE="$LIBEDIT"
780 elif test "$enable_pcretest_libreadline" = "yes"; then
781 AC_DEFINE([SUPPORT_LIBREADLINE], [], [
782 Define to any value to allow pcretest to be linked with libreadline.])
783 fi
784
785 AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [
786 The value of NEWLINE determines the default newline character sequence. PCRE
787 client programs can override this by selecting other values at run time. In
788 ASCII environments, the value can be 10 (LF), 13 (CR), or 3338 (CRLF); in
789 EBCDIC environments the value can be 21 or 37 (LF), 13 (CR), or 3349 or 3365
790 (CRLF) because there are two alternative codepoints (0x15 and 0x25) that are
791 used as the NL line terminator that is equivalent to ASCII LF. In both ASCII
792 and EBCDIC environments the value can also be -1 (ANY), or -2 (ANYCRLF).])
793
794 if test "$enable_bsr_anycrlf" = "yes"; then
795 AC_DEFINE([BSR_ANYCRLF], [], [
796 By default, the \R escape sequence matches any Unicode line ending
797 character or sequence of characters. If BSR_ANYCRLF is defined (to any
798 value), this is changed so that backslash-R matches only CR, LF, or CRLF.
799 The build-time default can be overridden by the user of PCRE at runtime.])
800 fi
801
802 AC_DEFINE_UNQUOTED([LINK_SIZE], [$with_link_size], [
803 The value of LINK_SIZE determines the number of bytes used to store
804 links as offsets within the compiled regex. The default is 2, which
805 allows for compiled patterns up to 64K long. This covers the vast
806 majority of cases. However, PCRE can also be compiled to use 3 or 4
807 bytes instead. This allows for longer patterns in extreme cases.])
808
809 AC_DEFINE_UNQUOTED([POSIX_MALLOC_THRESHOLD], [$with_posix_malloc_threshold], [
810 When calling PCRE via the POSIX interface, additional working storage
811 is required for holding the pointers to capturing substrings because
812 PCRE requires three integers per substring, whereas the POSIX
813 interface provides only two. If the number of expected substrings is
814 small, the wrapper function uses space on the stack, because this is
815 faster than using malloc() for each call. The threshold above which
816 the stack is no longer used is defined by POSIX_MALLOC_THRESHOLD.])
817
818 AC_DEFINE_UNQUOTED([PARENS_NEST_LIMIT], [$with_parens_nest_limit], [
819 The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
820 parentheses (of any kind) in a pattern. This limits the amount of system
821 stack that is used while compiling a pattern.])
822
823 AC_DEFINE_UNQUOTED([MATCH_LIMIT], [$with_match_limit], [
824 The value of MATCH_LIMIT determines the default number of times the
825 internal match() function can be called during a single execution of
826 pcre_exec(). There is a runtime interface for setting a different
827 limit. The limit exists in order to catch runaway regular
828 expressions that take for ever to determine that they do not match.
829 The default is set very large so that it does not accidentally catch
830 legitimate cases.])
831
832 AC_DEFINE_UNQUOTED([MATCH_LIMIT_RECURSION], [$with_match_limit_recursion], [
833 The above limit applies to all calls of match(), whether or not they
834 increase the recursion depth. In some environments it is desirable
835 to limit the depth of recursive calls of match() more strictly, in
836 order to restrict the maximum amount of stack (or heap, if
837 NO_RECURSE is defined) that is used. The value of
838 MATCH_LIMIT_RECURSION applies only to recursive calls of match(). To
839 have any useful effect, it must be less than the value of
840 MATCH_LIMIT. The default is to use the same value as MATCH_LIMIT.
841 There is a runtime method for setting a different limit.])
842
843 AC_DEFINE([MAX_NAME_SIZE], [32], [
844 This limit is parameterized just in case anybody ever wants to
845 change it. Care must be taken if it is increased, because it guards
846 against integer overflow caused by enormously large patterns.])
847
848 AC_DEFINE([MAX_NAME_COUNT], [10000], [
849 This limit is parameterized just in case anybody ever wants to
850 change it. Care must be taken if it is increased, because it guards
851 against integer overflow caused by enormously large patterns.])
852
853 AH_VERBATIM([PCRE_EXP_DEFN], [
854 /* If you are compiling for a system other than a Unix-like system or
855 Win32, and it needs some magic to be inserted before the definition
856 of a function that is exported by the library, define this macro to
857 contain the relevant magic. If you do not define this macro, a suitable
858 __declspec value is used for Windows systems; in other environments
859 "extern" is used for a C compiler and "extern C" for a C++ compiler.
860 This macro apears at the start of every exported function that is part
861 of the external API. It does not appear on functions that are "external"
862 in the C sense, but which are internal to the library. */
863 #undef PCRE_EXP_DEFN])
864
865 if test "$enable_ebcdic" = "yes"; then
866 AC_DEFINE_UNQUOTED([EBCDIC], [], [
867 If you are compiling for a system that uses EBCDIC instead of ASCII
868 character codes, define this macro to any value. You must also edit the
869 NEWLINE macro below to set a suitable EBCDIC newline, commonly 21 (0x15).
870 On systems that can use "configure" or CMake to set EBCDIC, NEWLINE is
871 automatically adjusted. When EBCDIC is set, PCRE assumes that all input
872 strings are in EBCDIC. If you do not define this macro, PCRE will assume
873 input strings are ASCII or UTF-8/16/32 Unicode. It is not possible to build
874 a version of PCRE that supports both EBCDIC and UTF-8/16/32.])
875 fi
876
877 if test "$enable_ebcdic_nl25" = "yes"; then
878 AC_DEFINE_UNQUOTED([EBCDIC_NL25], [], [
879 In an EBCDIC environment, define this macro to any value to arrange for
880 the NL character to be 0x25 instead of the default 0x15. NL plays the role
881 that LF does in an ASCII/Unicode environment. The value must also be set in
882 the NEWLINE macro below. On systems that can use "configure" or CMake to
883 set EBCDIC_NL25, the adjustment of NEWLINE is automatic.])
884 fi
885
886 if test "$enable_valgrind" = "yes"; then
887 AC_DEFINE_UNQUOTED([SUPPORT_VALGRIND], [], [
888 Define to any value for valgrind support to find invalid memory reads.])
889 fi
890
891 # Platform specific issues
892 NO_UNDEFINED=
893 EXPORT_ALL_SYMBOLS=
894 case $host_os in
895 cygwin* | mingw* )
896 if test X"$enable_shared" = Xyes; then
897 NO_UNDEFINED="-no-undefined"
898 EXPORT_ALL_SYMBOLS="-Wl,--export-all-symbols"
899 fi
900 ;;
901 esac
902
903 # The extra LDFLAGS for each particular library
904 # (Note: The libpcre*_version bits are m4 variables, assigned above)
905
906 EXTRA_LIBPCRE_LDFLAGS="$EXTRA_LIBPCRE_LDFLAGS \
907 $NO_UNDEFINED -version-info libpcre_version"
908
909 EXTRA_LIBPCRE16_LDFLAGS="$EXTRA_LIBPCRE16_LDFLAGS \
910 $NO_UNDEFINED -version-info libpcre16_version"
911
912 EXTRA_LIBPCRE32_LDFLAGS="$EXTRA_LIBPCRE32_LDFLAGS \
913 $NO_UNDEFINED -version-info libpcre32_version"
914
915 EXTRA_LIBPCREPOSIX_LDFLAGS="$EXTRA_LIBPCREPOSIX_LDFLAGS \
916 $NO_UNDEFINED -version-info libpcreposix_version"
917
918 EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS \
919 $NO_UNDEFINED -version-info libpcrecpp_version \
920 $EXPORT_ALL_SYMBOLS"
921
922 AC_SUBST(EXTRA_LIBPCRE_LDFLAGS)
923 AC_SUBST(EXTRA_LIBPCRE16_LDFLAGS)
924 AC_SUBST(EXTRA_LIBPCRE32_LDFLAGS)
925 AC_SUBST(EXTRA_LIBPCREPOSIX_LDFLAGS)
926 AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS)
927
928 # When we run 'make distcheck', use these arguments. Turning off compiler
929 # optimization makes it run faster.
930 DISTCHECK_CONFIGURE_FLAGS="CFLAGS='' CXXFLAGS='' --enable-pcre16 --enable-pcre32 --enable-jit --enable-cpp --enable-unicode-properties"
931 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
932
933 # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is
934 # specified, the relevant library is available.
935
936 if test "$enable_pcregrep_libz" = "yes"; then
937 if test "$HAVE_ZLIB_H" != "1"; then
938 echo "** Cannot --enable-pcregrep-libz because zlib.h was not found"
939 exit 1
940 fi
941 if test "$HAVE_LIBZ" != "1"; then
942 echo "** Cannot --enable-pcregrep-libz because libz was not found"
943 exit 1
944 fi
945 LIBZ="-lz"
946 fi
947 AC_SUBST(LIBZ)
948
949 if test "$enable_pcregrep_libbz2" = "yes"; then
950 if test "$HAVE_BZLIB_H" != "1"; then
951 echo "** Cannot --enable-pcregrep-libbz2 because bzlib.h was not found"
952 exit 1
953 fi
954 if test "$HAVE_LIBBZ2" != "1"; then
955 echo "** Cannot --enable-pcregrep-libbz2 because libbz2 was not found"
956 exit 1
957 fi
958 LIBBZ2="-lbz2"
959 fi
960 AC_SUBST(LIBBZ2)
961
962 # Similarly for --enable-pcretest-readline
963
964 if test "$enable_pcretest_libedit" = "yes"; then
965 if test "$enable_pcretest_libreadline" = "yes"; then
966 echo "** Cannot use both --enable-pcretest-libedit and --enable-pcretest-readline"
967 exit 1
968 fi
969 if test "$HAVE_EDITLINE_READLINE_H" != "1" -a \
970 "$HAVE_READLINE_READLINE_H" != "1"; then
971 echo "** Cannot --enable-pcretest-libedit because neither editline/readline.h"
972 echo "** nor readline/readline.h was found."
973 exit 1
974 fi
975 if test -z "$LIBEDIT"; then
976 echo "** Cannot --enable-pcretest-libedit because libedit library was not found."
977 exit 1
978 fi
979 fi
980
981 if test "$enable_pcretest_libreadline" = "yes"; then
982 if test "$HAVE_READLINE_H" != "1"; then
983 echo "** Cannot --enable-pcretest-readline because readline/readline.h was not found."
984 exit 1
985 fi
986 if test "$HAVE_HISTORY_H" != "1"; then
987 echo "** Cannot --enable-pcretest-readline because readline/history.h was not found."
988 exit 1
989 fi
990 if test -z "$LIBREADLINE"; then
991 echo "** Cannot --enable-pcretest-readline because readline library was not found."
992 exit 1
993 fi
994 fi
995
996 # Handle valgrind support
997
998 if test "$enable_valgrind" = "yes"; then
999 m4_ifdef([PKG_CHECK_MODULES],
1000 [PKG_CHECK_MODULES([VALGRIND],[valgrind])],
1001 [AC_MSG_ERROR([pkg-config not supported])])
1002 fi
1003
1004 # Handle code coverage reporting support
1005 if test "$enable_coverage" = "yes"; then
1006 if test "x$GCC" != "xyes"; then
1007 AC_MSG_ERROR([Code coverage reports can only be generated when using GCC])
1008 fi
1009
1010 # ccache is incompatible with gcov
1011 AC_PATH_PROG([SHTOOL],[shtool],[false])
1012 case `$SHTOOL path $CC` in
1013 *ccache*) cc_ccache=yes;;
1014 *) cc_ccache=no;;
1015 esac
1016
1017 if test "$cc_ccache" = "yes"; then
1018 if test -z "$CCACHE_DISABLE" -o "$CCACHE_DISABLE" != "1"; then
1019 AC_MSG_ERROR([must export CCACHE_DISABLE=1 to disable ccache for code coverage])
1020 fi
1021 fi
1022
1023 AC_ARG_VAR([LCOV],[the ltp lcov program])
1024 AC_PATH_PROG([LCOV],[lcov],[false])
1025 if test "x$LCOV" = "xfalse"; then
1026 AC_MSG_ERROR([lcov not found])
1027 fi
1028
1029 AC_ARG_VAR([GENHTML],[the ltp genhtml program])
1030 AC_PATH_PROG([GENHTML],[genhtml],[false])
1031 if test "x$GENHTML" = "xfalse"; then
1032 AC_MSG_ERROR([genhtml not found])
1033 fi
1034
1035 # Set flags needed for gcov
1036 GCOV_CFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage"
1037 GCOV_CXXFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage"
1038 GCOV_LIBS="-lgcov"
1039 AC_SUBST([GCOV_CFLAGS])
1040 AC_SUBST([GCOV_CXXFLAGS])
1041 AC_SUBST([GCOV_LIBS])
1042 fi # enable_coverage
1043
1044 AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"])
1045
1046 # Produce these files, in addition to config.h.
1047 AC_CONFIG_FILES(
1048 Makefile
1049 libpcre.pc
1050 libpcre16.pc
1051 libpcre32.pc
1052 libpcreposix.pc
1053 libpcrecpp.pc
1054 pcre-config
1055 pcre.h
1056 pcre_stringpiece.h
1057 pcrecpparg.h
1058 )
1059
1060 # Make the generated script files executable.
1061 AC_CONFIG_COMMANDS([script-chmod], [chmod a+x pcre-config])
1062
1063 # Make sure that pcre_chartables.c is removed in case the method for
1064 # creating it was changed by reconfiguration.
1065 AC_CONFIG_COMMANDS([delete-old-chartables], [rm -f pcre_chartables.c])
1066
1067 AC_OUTPUT
1068
1069 # Print out a nice little message after configure is run displaying the
1070 # chosen options.
1071
1072 ebcdic_nl_code=n/a
1073 if test "$enable_ebcdic_nl25" = "yes"; then
1074 ebcdic_nl_code=0x25
1075 elif test "$enable_ebcdic" = "yes"; then
1076 ebcdic_nl_code=0x15
1077 fi
1078
1079 cat <<EOF
1080
1081 $PACKAGE-$VERSION configuration summary:
1082
1083 Install prefix .................. : ${prefix}
1084 C preprocessor .................. : ${CPP}
1085 C compiler ...................... : ${CC}
1086 C++ preprocessor ................ : ${CXXCPP}
1087 C++ compiler .................... : ${CXX}
1088 Linker .......................... : ${LD}
1089 C preprocessor flags ............ : ${CPPFLAGS}
1090 C compiler flags ................ : ${CFLAGS} ${VISIBILITY_CFLAGS}
1091 C++ compiler flags .............. : ${CXXFLAGS} ${VISIBILITY_CXXFLAGS}
1092 Linker flags .................... : ${LDFLAGS}
1093 Extra libraries ................. : ${LIBS}
1094
1095 Build 8 bit pcre library ........ : ${enable_pcre8}
1096 Build 16 bit pcre library ....... : ${enable_pcre16}
1097 Build 32 bit pcre library ....... : ${enable_pcre32}
1098 Build C++ library ............... : ${enable_cpp}
1099 Enable JIT compiling support .... : ${enable_jit}
1100 Enable UTF-8/16/32 support ...... : ${enable_utf}
1101 Unicode properties .............. : ${enable_unicode_properties}
1102 Newline char/sequence ........... : ${enable_newline}
1103 \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}
1104 EBCDIC coding ................... : ${enable_ebcdic}
1105 EBCDIC code for NL .............. : ${ebcdic_nl_code}
1106 Rebuild char tables ............. : ${enable_rebuild_chartables}
1107 Use stack recursion ............. : ${enable_stack_for_recursion}
1108 POSIX mem threshold ............. : ${with_posix_malloc_threshold}
1109 Internal link size .............. : ${with_link_size}
1110 Nested parentheses limit ........ : ${with_parens_nest_limit}
1111 Match limit ..................... : ${with_match_limit}
1112 Match limit recursion ........... : ${with_match_limit_recursion}
1113 Build shared libs ............... : ${enable_shared}
1114 Build static libs ............... : ${enable_static}
1115 Use JIT in pcregrep ............. : ${enable_pcregrep_jit}
1116 Buffer size for pcregrep ........ : ${with_pcregrep_bufsize}
1117 Link pcregrep with libz ......... : ${enable_pcregrep_libz}
1118 Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}
1119 Link pcretest with libedit ...... : ${enable_pcretest_libedit}
1120 Link pcretest with libreadline .. : ${enable_pcretest_libreadline}
1121 Valgrind support ................ : ${enable_valgrind}
1122 Code coverage ................... : ${enable_coverage}
1123
1124 EOF
1125
1126 dnl end configure.ac

Properties

Name Value
svn:eol-style native
svn:keywords "Author Date Id Revision Url"

  ViewVC Help
Powered by ViewVC 1.1.5