| 154 |
[don't use stack recursion when matching]), |
[don't use stack recursion when matching]), |
| 155 |
, enable_stack_for_recursion=yes) |
, enable_stack_for_recursion=yes) |
| 156 |
|
|
| 157 |
|
# Handle --enable-pcregrep-libz |
| 158 |
|
AC_ARG_ENABLE(pcregrep-libz, |
| 159 |
|
AS_HELP_STRING([--enable-pcregrep-libz], |
| 160 |
|
[link pcregrep with libz to handle .gz files]), |
| 161 |
|
, enable_pcregrep_libz=no) |
| 162 |
|
|
| 163 |
|
# Handle --enable-pcregrep-libbz2 |
| 164 |
|
AC_ARG_ENABLE(pcregrep-libbz2, |
| 165 |
|
AS_HELP_STRING([--enable-pcregrep-libbz2], |
| 166 |
|
[link pcregrep with libbz2 to handle .bz2 files]), |
| 167 |
|
, enable_pcregrep_libbz2=no) |
| 168 |
|
|
| 169 |
# Handle --with-posix-malloc-threshold=NBYTES |
# Handle --with-posix-malloc-threshold=NBYTES |
| 170 |
AC_ARG_WITH(posix-malloc-threshold, |
AC_ARG_WITH(posix-malloc-threshold, |
| 171 |
AS_HELP_STRING([--with-posix-malloc-threshold=NBYTES], |
AS_HELP_STRING([--with-posix-malloc-threshold=NBYTES], |
| 308 |
|
|
| 309 |
AC_CHECK_FUNCS(bcopy memmove strerror strtoq strtoll _strtoi64) |
AC_CHECK_FUNCS(bcopy memmove strerror strtoq strtoll _strtoi64) |
| 310 |
|
|
| 311 |
|
# Check for the availability of libz (aka zlib) |
| 312 |
|
|
| 313 |
|
AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H=1]) |
| 314 |
|
AC_CHECK_LIB([z], [gzopen], [HAVE_LIBZ=1]) |
| 315 |
|
|
| 316 |
|
# Check for the availability of libbz2 |
| 317 |
|
|
| 318 |
|
AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_H=1]) |
| 319 |
|
AC_CHECK_LIB([bz2], [BZ2_bzopen], [HAVE_LIBBZ2=1]) |
| 320 |
|
|
| 321 |
# This facilitates -ansi builds under Linux |
# This facilitates -ansi builds under Linux |
| 322 |
dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc]) |
dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc]) |
| 323 |
|
|
| 351 |
(use --disable-stack-for-recursion).]) |
(use --disable-stack-for-recursion).]) |
| 352 |
fi |
fi |
| 353 |
|
|
| 354 |
|
if test "$enable_pcregrep_libz" = "yes"; then |
| 355 |
|
AC_DEFINE([SUPPORT_LIBZ], [], [ |
| 356 |
|
Define to allow pcregrep to be linked with libz, so that it is |
| 357 |
|
able to handle .gz files.]) |
| 358 |
|
fi |
| 359 |
|
|
| 360 |
|
if test "$enable_pcregrep_libbz2" = "yes"; then |
| 361 |
|
AC_DEFINE([SUPPORT_LIBBZ2], [], [ |
| 362 |
|
Define to allow pcregrep to be linked with libbz2, so that it is |
| 363 |
|
able to handle .bz2 files.]) |
| 364 |
|
fi |
| 365 |
|
|
| 366 |
AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [ |
AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [ |
| 367 |
The value of NEWLINE determines the newline character sequence. On |
The value of NEWLINE determines the newline character sequence. On |
| 368 |
systems that support it, "configure" can be used to override the |
systems that support it, "configure" can be used to override the |
| 478 |
DISTCHECK_CONFIGURE_FLAGS="--enable-cpp --enable-unicode-properties" |
DISTCHECK_CONFIGURE_FLAGS="--enable-cpp --enable-unicode-properties" |
| 479 |
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) |
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) |
| 480 |
|
|
| 481 |
|
# Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is |
| 482 |
|
# specified, the relevant library is available. If so, add it to LIBS. |
| 483 |
|
|
| 484 |
|
if test "$enable_pcregrep_libz" = "yes"; then |
| 485 |
|
if test "$HAVE_ZLIB_H" != "1"; then |
| 486 |
|
echo "** Cannot --enable-pcregrep-libz because zlib.h was not found" |
| 487 |
|
exit 1 |
| 488 |
|
fi |
| 489 |
|
if test "$HAVE_LIBZ" != "1"; then |
| 490 |
|
echo "** Cannot --enable-pcregrep-libz because libz was not found" |
| 491 |
|
exit 1 |
| 492 |
|
fi |
| 493 |
|
if test "$LIBS" = ""; then LIBS=-lz; else LIBS="$LIBS -lz"; fi |
| 494 |
|
fi |
| 495 |
|
|
| 496 |
|
if test "$enable_pcregrep_libbz2" = "yes"; then |
| 497 |
|
if test "$HAVE_BZLIB_H" != "1"; then |
| 498 |
|
echo "** Cannot --enable-pcregrep-libbz2 because bzlib.h was not found" |
| 499 |
|
exit 1 |
| 500 |
|
fi |
| 501 |
|
if test "$HAVE_LIBBZ2" != "1"; then |
| 502 |
|
echo "** Cannot --enable-pcregrep-libbz2 because libbz2 was not found" |
| 503 |
|
exit 1 |
| 504 |
|
fi |
| 505 |
|
if test "$LIBS" = ""; then LIBS=-lbz2; else LIBS="$LIBS -lbz2"; fi |
| 506 |
|
fi |
| 507 |
|
|
| 508 |
# Produce these files, in addition to config.h. |
# Produce these files, in addition to config.h. |
| 509 |
AC_CONFIG_FILES( |
AC_CONFIG_FILES( |
| 510 |
Makefile |
Makefile |
| 527 |
|
|
| 528 |
# Print out a nice little message after configure is run displaying your |
# Print out a nice little message after configure is run displaying your |
| 529 |
# chosen options. |
# chosen options. |
| 530 |
# |
|
| 531 |
cat <<EOF |
cat <<EOF |
| 532 |
|
|
| 533 |
$PACKAGE-$VERSION configuration summary: |
$PACKAGE-$VERSION configuration summary: |
| 534 |
|
|
| 535 |
Install prefix ........... : ${prefix} |
Install prefix ............. : ${prefix} |
| 536 |
C preprocessor ........... : ${CPP} |
C preprocessor ............. : ${CPP} |
| 537 |
C compiler ............... : ${CC} |
C compiler ................. : ${CC} |
| 538 |
C++ preprocessor ......... : ${CXXCPP} |
C++ preprocessor ........... : ${CXXCPP} |
| 539 |
C++ compiler ............. : ${CXX} |
C++ compiler ............... : ${CXX} |
| 540 |
Linker ................... : ${LD} |
Linker ..................... : ${LD} |
| 541 |
C preprocessor flags ..... : ${CPPFLAGS} |
C preprocessor flags ....... : ${CPPFLAGS} |
| 542 |
C compiler flags ......... : ${CFLAGS} |
C compiler flags ........... : ${CFLAGS} |
| 543 |
C++ compiler flags ....... : ${CXXFLAGS} |
C++ compiler flags ......... : ${CXXFLAGS} |
| 544 |
Linker flags ............. : ${LDFLAGS} |
Linker flags ............... : ${LDFLAGS} |
| 545 |
Extra libraries .......... : ${LIBS} |
Extra libraries ............ : ${LIBS} |
| 546 |
|
|
| 547 |
Build C++ library ........ : ${enable_cpp} |
Build C++ library .......... : ${enable_cpp} |
| 548 |
Enable UTF-8 support ..... : ${enable_utf8} |
Enable UTF-8 support ....... : ${enable_utf8} |
| 549 |
Unicode properties ....... : ${enable_unicode_properties} |
Unicode properties ......... : ${enable_unicode_properties} |
| 550 |
Newline char/sequence .... : ${enable_newline} |
Newline char/sequence ...... : ${enable_newline} |
| 551 |
\R matches only ANYCRLF .. : ${enable_bsr_anycrlf} |
\R matches only ANYCRLF .... : ${enable_bsr_anycrlf} |
| 552 |
EBCDIC coding ............ : ${enable_ebcdic} |
EBCDIC coding .............. : ${enable_ebcdic} |
| 553 |
Rebuild char tables ...... : ${enable_rebuild_chartables} |
Rebuild char tables ........ : ${enable_rebuild_chartables} |
| 554 |
Use stack recursion ...... : ${enable_stack_for_recursion} |
Use stack recursion ........ : ${enable_stack_for_recursion} |
| 555 |
POSIX mem threshold ...... : ${with_posix_malloc_threshold} |
POSIX mem threshold ........ : ${with_posix_malloc_threshold} |
| 556 |
Internal link size ....... : ${with_link_size} |
Internal link size ......... : ${with_link_size} |
| 557 |
Match limit .............. : ${with_match_limit} |
Match limit ................ : ${with_match_limit} |
| 558 |
Match limit recursion .... : ${with_match_limit_recursion} |
Match limit recursion ...... : ${with_match_limit_recursion} |
| 559 |
Build shared libs ........ : ${enable_shared} |
Build shared libs .......... : ${enable_shared} |
| 560 |
Build static libs ........ : ${enable_static} |
Build static libs .......... : ${enable_static} |
| 561 |
|
Link pcregrep with libz .... : ${enable_pcregrep_libz} |
| 562 |
|
Link pcregrep with libbz2 .. : ${enable_pcregrep_libbz2} |
| 563 |
|
|
| 564 |
EOF |
EOF |
| 565 |
|
|