| 9 |
dnl be defined as -RC2, for example. For real releases, it should be empty. |
dnl be defined as -RC2, for example. For real releases, it should be empty. |
| 10 |
|
|
| 11 |
m4_define(pcre_major, [8]) |
m4_define(pcre_major, [8]) |
| 12 |
m4_define(pcre_minor, [20]) |
m4_define(pcre_minor, [30]) |
| 13 |
m4_define(pcre_prerelease, [-RC1]) |
m4_define(pcre_prerelease, [-PT1]) |
| 14 |
m4_define(pcre_date, [2011-08-18]) |
m4_define(pcre_date, [2012-01-01]) |
| 15 |
|
|
| 16 |
# Libtool shared library interface versions (current:revision:age) |
# Libtool shared library interface versions (current:revision:age) |
| 17 |
m4_define(libpcre_version, [0:1:0]) |
m4_define(libpcre_version, [1:0:0]) |
| 18 |
|
m4_define(libpcre16_version, [0:0:0]) |
| 19 |
m4_define(libpcreposix_version, [0:0:0]) |
m4_define(libpcreposix_version, [0:0:0]) |
| 20 |
m4_define(libpcrecpp_version, [0:0:0]) |
m4_define(libpcrecpp_version, [0:0:0]) |
| 21 |
|
|
| 23 |
AC_INIT(PCRE, pcre_major.pcre_minor[]pcre_prerelease, , pcre) |
AC_INIT(PCRE, pcre_major.pcre_minor[]pcre_prerelease, , pcre) |
| 24 |
AC_CONFIG_SRCDIR([pcre.h.in]) |
AC_CONFIG_SRCDIR([pcre.h.in]) |
| 25 |
AM_INIT_AUTOMAKE([dist-bzip2 dist-zip]) |
AM_INIT_AUTOMAKE([dist-bzip2 dist-zip]) |
| 26 |
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 27 |
AC_CONFIG_HEADERS(config.h) |
AC_CONFIG_HEADERS(config.h) |
| 28 |
|
|
| 29 |
# This was added at the suggestion of libtoolize (03-Jan-10) |
# This was added at the suggestion of libtoolize (03-Jan-10) |
| 106 |
htmldir='${docdir}/html' |
htmldir='${docdir}/html' |
| 107 |
fi |
fi |
| 108 |
|
|
| 109 |
|
# Handle --disable-pcre8 (enabled by default) |
| 110 |
|
AC_ARG_ENABLE(pcre8, |
| 111 |
|
AS_HELP_STRING([--disable-pcre8], |
| 112 |
|
[disable 8 bit character support]), |
| 113 |
|
, enable_pcre8=unset) |
| 114 |
|
AC_SUBST(enable_pcre8) |
| 115 |
|
|
| 116 |
|
# Handle --enable-pcre16 (disabled by default) |
| 117 |
|
AC_ARG_ENABLE(pcre16, |
| 118 |
|
AS_HELP_STRING([--enable-pcre16], |
| 119 |
|
[enable 16 bit character support]), |
| 120 |
|
, enable_pcre16=unset) |
| 121 |
|
AC_SUBST(enable_pcre16) |
| 122 |
|
|
| 123 |
# Handle --disable-cpp. The substitution of enable_cpp is needed for use in |
# Handle --disable-cpp. The substitution of enable_cpp is needed for use in |
| 124 |
# pcre-config. |
# pcre-config. |
| 125 |
AC_ARG_ENABLE(cpp, |
AC_ARG_ENABLE(cpp, |
| 126 |
AS_HELP_STRING([--disable-cpp], |
AS_HELP_STRING([--disable-cpp], |
| 127 |
[disable C++ support]), |
[disable C++ support]), |
| 128 |
, enable_cpp=yes) |
, enable_cpp=unset) |
| 129 |
AC_SUBST(enable_cpp) |
AC_SUBST(enable_cpp) |
| 130 |
|
|
| 131 |
# Handle --enable-jit (disabled by default) |
# Handle --enable-jit (disabled by default) |
| 149 |
# Handle --enable-utf8 (disabled by default) |
# Handle --enable-utf8 (disabled by default) |
| 150 |
AC_ARG_ENABLE(utf8, |
AC_ARG_ENABLE(utf8, |
| 151 |
AS_HELP_STRING([--enable-utf8], |
AS_HELP_STRING([--enable-utf8], |
| 152 |
[enable UTF-8 support (incompatible with --enable-ebcdic)]), |
[another name for --enable-utf. Kept only for compatibility reasons]), |
| 153 |
, enable_utf8=unset) |
, enable_utf8=unset) |
| 154 |
|
|
| 155 |
|
# Handle --enable-utf (disabled by default) |
| 156 |
|
AC_ARG_ENABLE(utf, |
| 157 |
|
AS_HELP_STRING([--enable-utf], |
| 158 |
|
[enable UTF-8/16 support (incompatible with --enable-ebcdic)]), |
| 159 |
|
, enable_utf=unset) |
| 160 |
|
|
| 161 |
# Handle --enable-unicode-properties |
# Handle --enable-unicode-properties |
| 162 |
AC_ARG_ENABLE(unicode-properties, |
AC_ARG_ENABLE(unicode-properties, |
| 163 |
AS_HELP_STRING([--enable-unicode-properties], |
AS_HELP_STRING([--enable-unicode-properties], |
| 164 |
[enable Unicode properties support (implies --enable-utf8)]), |
[enable Unicode properties support (implies --enable-utf)]), |
| 165 |
, enable_unicode_properties=no) |
, enable_unicode_properties=no) |
| 166 |
|
|
| 167 |
# Handle --enable-newline=NL |
# Handle --enable-newline=NL |
| 203 |
# Handle --enable-ebcdic |
# Handle --enable-ebcdic |
| 204 |
AC_ARG_ENABLE(ebcdic, |
AC_ARG_ENABLE(ebcdic, |
| 205 |
AS_HELP_STRING([--enable-ebcdic], |
AS_HELP_STRING([--enable-ebcdic], |
| 206 |
[assume EBCDIC coding rather than ASCII; incompatible with --enable-utf8; use only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]), |
[assume EBCDIC coding rather than ASCII; incompatible with --enable-utf; use only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]), |
| 207 |
, enable_ebcdic=no) |
, enable_ebcdic=no) |
| 208 |
|
|
| 209 |
# Handle --disable-stack-for-recursion |
# Handle --disable-stack-for-recursion |
| 267 |
[default limit on internal recursion (default=MATCH_LIMIT)]), |
[default limit on internal recursion (default=MATCH_LIMIT)]), |
| 268 |
, with_match_limit_recursion=MATCH_LIMIT) |
, with_match_limit_recursion=MATCH_LIMIT) |
| 269 |
|
|
| 270 |
# Make sure that if enable_unicode_properties was set, that UTF-8 support |
# Copy enable_utf8 value to enable_utf for compatibility reasons |
| 271 |
# is enabled. |
if test "x$enable_utf8" != "xunset" |
| 272 |
# |
then |
| 273 |
|
if test "x$enable_utf" != "xunset" |
| 274 |
|
then |
| 275 |
|
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.]) |
| 276 |
|
fi |
| 277 |
|
enable_utf=$enable_utf8 |
| 278 |
|
fi |
| 279 |
|
|
| 280 |
|
# Set the default value for pcre8 |
| 281 |
|
if test "x$enable_pcre8" = "xunset" |
| 282 |
|
then |
| 283 |
|
enable_pcre8=yes |
| 284 |
|
fi |
| 285 |
|
|
| 286 |
|
# Set the default value for pcre16 |
| 287 |
|
if test "x$enable_pcre16" = "xunset" |
| 288 |
|
then |
| 289 |
|
enable_pcre16=no |
| 290 |
|
fi |
| 291 |
|
|
| 292 |
|
# Make sure enable_pcre8 or enable_pcre16 was set |
| 293 |
|
if test "x$enable_pcre8$enable_pcre16" = "xnono" |
| 294 |
|
then |
| 295 |
|
AC_MSG_ERROR([Either 8 or 16 bit (or both) pcre library must be enabled]) |
| 296 |
|
fi |
| 297 |
|
|
| 298 |
|
# Make sure that if enable_unicode_properties was set, that UTF support is enabled. |
| 299 |
if test "x$enable_unicode_properties" = "xyes" |
if test "x$enable_unicode_properties" = "xyes" |
| 300 |
then |
then |
| 301 |
if test "x$enable_utf8" = "xno" |
if test "x$enable_utf" = "xno" |
| 302 |
then |
then |
| 303 |
AC_MSG_ERROR([support for Unicode properties requires UTF-8 support]) |
AC_MSG_ERROR([support for Unicode properties requires UTF-8/16 support]) |
| 304 |
fi |
fi |
| 305 |
enable_utf8=yes |
enable_utf=yes |
| 306 |
|
fi |
| 307 |
|
|
| 308 |
|
# enable_utf is disabled by default. |
| 309 |
|
if test "x$enable_utf" = "xunset" |
| 310 |
|
then |
| 311 |
|
enable_utf=no |
| 312 |
fi |
fi |
| 313 |
|
|
| 314 |
if test "x$enable_utf8" = "xunset" |
# enable_cpp copies the value of enable_pcre8 by default |
| 315 |
|
if test "x$enable_cpp" = "xunset" |
| 316 |
then |
then |
| 317 |
enable_utf8=no |
enable_cpp=$enable_pcre8 |
| 318 |
|
fi |
| 319 |
|
|
| 320 |
|
# Make sure that if enable_cpp was set, that enable_pcre8 support is enabled |
| 321 |
|
if test "x$enable_cpp" = "xyes" |
| 322 |
|
then |
| 323 |
|
if test "x$enable_pcre8" = "xno" |
| 324 |
|
then |
| 325 |
|
AC_MSG_ERROR([C++ library requires pcre library with 8 bit characters]) |
| 326 |
|
fi |
| 327 |
fi |
fi |
| 328 |
|
|
| 329 |
# Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled. |
# Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled. |
| 330 |
# Also check that UTF-8 support is not requested, because PCRE cannot handle |
# Also check that UTF support is not requested, because PCRE cannot handle |
| 331 |
# EBCDIC and UTF-8 in the same build. To do so it would need to use different |
# EBCDIC and UTF in the same build. To do so it would need to use different |
| 332 |
# character constants depending on the mode. |
# character constants depending on the mode. |
| 333 |
# |
# |
| 334 |
if test "x$enable_ebcdic" = "xyes" |
if test "x$enable_ebcdic" = "xyes" |
| 335 |
then |
then |
| 336 |
enable_rebuild_chartables=yes |
enable_rebuild_chartables=yes |
| 337 |
if test "x$enable_utf8" = "xyes" |
if test "x$enable_utf" = "xyes" |
| 338 |
then |
then |
| 339 |
AC_MSG_ERROR([support for EBCDIC and UTF-8 cannot be enabled at the same time]) |
AC_MSG_ERROR([support for EBCDIC and UTF-8/16 cannot be enabled at the same time]) |
| 340 |
fi |
fi |
| 341 |
fi |
fi |
| 342 |
|
|
| 474 |
AC_SUBST(pcre_have_bits_type_traits) |
AC_SUBST(pcre_have_bits_type_traits) |
| 475 |
|
|
| 476 |
# Conditional compilation |
# Conditional compilation |
| 477 |
|
AM_CONDITIONAL(WITH_PCRE8, test "x$enable_pcre8" = "xyes") |
| 478 |
|
AM_CONDITIONAL(WITH_PCRE16, test "x$enable_pcre16" = "xyes") |
| 479 |
AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes") |
AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes") |
| 480 |
AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes") |
AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes") |
| 481 |
AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes") |
AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes") |
| 482 |
AM_CONDITIONAL(WITH_UTF8, test "x$enable_utf8" = "xyes") |
AM_CONDITIONAL(WITH_UTF, test "x$enable_utf" = "xyes") |
| 483 |
|
|
| 484 |
# Checks for typedefs, structures, and compiler characteristics. |
# Checks for typedefs, structures, and compiler characteristics. |
| 485 |
|
|
| 548 |
|
|
| 549 |
# Here is where pcre specific defines are handled |
# Here is where pcre specific defines are handled |
| 550 |
|
|
| 551 |
|
if test "$enable_pcre8" = "yes"; then |
| 552 |
|
AC_DEFINE([SUPPORT_PCRE8], [], [ |
| 553 |
|
Define to enable the 8 bit PCRE library.]) |
| 554 |
|
fi |
| 555 |
|
|
| 556 |
|
if test "$enable_pcre16" = "yes"; then |
| 557 |
|
AC_DEFINE([SUPPORT_PCRE16], [], [ |
| 558 |
|
Define to enable the 16 bit PCRE library.]) |
| 559 |
|
fi |
| 560 |
|
|
| 561 |
if test "$enable_jit" = "yes"; then |
if test "$enable_jit" = "yes"; then |
| 562 |
AC_DEFINE([SUPPORT_JIT], [], [ |
AC_DEFINE([SUPPORT_JIT], [], [ |
| 563 |
Define to enable support for Just-In-Time compiling.]) |
Define to enable support for Just-In-Time compiling.]) |
| 567 |
|
|
| 568 |
if test "$enable_pcregrep_jit" = "yes"; then |
if test "$enable_pcregrep_jit" = "yes"; then |
| 569 |
AC_DEFINE([SUPPORT_PCREGREP_JIT], [], [ |
AC_DEFINE([SUPPORT_PCREGREP_JIT], [], [ |
| 570 |
Define to enable JIT support in pcregrep.]) |
Define to enable JIT support in pcregrep.]) |
| 571 |
fi |
fi |
| 572 |
|
|
| 573 |
if test "$enable_utf8" = "yes"; then |
if test "$enable_utf" = "yes"; then |
| 574 |
AC_DEFINE([SUPPORT_UTF8], [], [ |
AC_DEFINE([SUPPORT_UTF], [], [ |
| 575 |
Define to enable support for the UTF-8 Unicode encoding. This will |
Define to enable support for the UTF-8/16 Unicode encoding. This |
| 576 |
work even in an EBCDIC environment, but it is incompatible with |
will work even in an EBCDIC environment, but it is incompatible |
| 577 |
the EBCDIC macro. That is, PCRE can support *either* EBCDIC code |
with the EBCDIC macro. That is, PCRE can support *either* EBCDIC |
| 578 |
*or* ASCII/UTF-8, but not both at once.]) |
code *or* ASCII/UTF-8/16, but not both at once.]) |
| 579 |
fi |
fi |
| 580 |
|
|
| 581 |
if test "$enable_unicode_properties" = "yes"; then |
if test "$enable_unicode_properties" = "yes"; then |
| 710 |
character codes, define this macro as 1. On systems that can use |
character codes, define this macro as 1. On systems that can use |
| 711 |
"configure", this can be done via --enable-ebcdic. PCRE will then |
"configure", this can be done via --enable-ebcdic. PCRE will then |
| 712 |
assume that all input strings are in EBCDIC. If you do not define |
assume that all input strings are in EBCDIC. If you do not define |
| 713 |
this macro, PCRE will assume input strings are ASCII or UTF-8 Unicode. |
this macro, PCRE will assume input strings are ASCII or UTF-8/16 |
| 714 |
It is not possible to build a version of PCRE that supports both |
Unicode. It is not possible to build a version of PCRE that |
| 715 |
EBCDIC and UTF-8.]) |
supports both EBCDIC and UTF-8/16.]) |
| 716 |
fi |
fi |
| 717 |
|
|
| 718 |
# Platform specific issues |
# Platform specific issues |
| 733 |
EXTRA_LIBPCRE_LDFLAGS="$EXTRA_LIBPCRE_LDFLAGS \ |
EXTRA_LIBPCRE_LDFLAGS="$EXTRA_LIBPCRE_LDFLAGS \ |
| 734 |
$NO_UNDEFINED -version-info libpcre_version" |
$NO_UNDEFINED -version-info libpcre_version" |
| 735 |
|
|
| 736 |
|
EXTRA_LIBPCRE16_LDFLAGS="$EXTRA_LIBPCRE16_LDFLAGS \ |
| 737 |
|
$NO_UNDEFINED -version-info libpcre16_version" |
| 738 |
|
|
| 739 |
EXTRA_LIBPCREPOSIX_LDFLAGS="$EXTRA_LIBPCREPOSIX_LDFLAGS \ |
EXTRA_LIBPCREPOSIX_LDFLAGS="$EXTRA_LIBPCREPOSIX_LDFLAGS \ |
| 740 |
$NO_UNDEFINED -version-info libpcreposix_version" |
$NO_UNDEFINED -version-info libpcreposix_version" |
| 741 |
|
|
| 744 |
$EXPORT_ALL_SYMBOLS" |
$EXPORT_ALL_SYMBOLS" |
| 745 |
|
|
| 746 |
AC_SUBST(EXTRA_LIBPCRE_LDFLAGS) |
AC_SUBST(EXTRA_LIBPCRE_LDFLAGS) |
| 747 |
|
AC_SUBST(EXTRA_LIBPCRE16_LDFLAGS) |
| 748 |
AC_SUBST(EXTRA_LIBPCREPOSIX_LDFLAGS) |
AC_SUBST(EXTRA_LIBPCREPOSIX_LDFLAGS) |
| 749 |
AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS) |
AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS) |
| 750 |
|
|
| 751 |
# When we run 'make distcheck', use these arguments. |
# When we run 'make distcheck', use these arguments. |
| 752 |
DISTCHECK_CONFIGURE_FLAGS="--enable-jit --enable-cpp --enable-unicode-properties" |
DISTCHECK_CONFIGURE_FLAGS="--enable-pcre16 --enable-jit --enable-cpp --enable-unicode-properties" |
| 753 |
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) |
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) |
| 754 |
|
|
| 755 |
# Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is |
# Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is |
| 800 |
AC_CONFIG_FILES( |
AC_CONFIG_FILES( |
| 801 |
Makefile |
Makefile |
| 802 |
libpcre.pc |
libpcre.pc |
| 803 |
libpcreposix.pc |
libpcre16.pc |
| 804 |
|
libpcreposix.pc |
| 805 |
libpcrecpp.pc |
libpcrecpp.pc |
| 806 |
pcre-config |
pcre-config |
| 807 |
pcre.h |
pcre.h |
| 837 |
Linker flags .................... : ${LDFLAGS} |
Linker flags .................... : ${LDFLAGS} |
| 838 |
Extra libraries ................. : ${LIBS} |
Extra libraries ................. : ${LIBS} |
| 839 |
|
|
| 840 |
|
Build 8 bit pcre library ........ : ${enable_pcre8} |
| 841 |
|
Build 16 bit pcre library ....... : ${enable_pcre16} |
| 842 |
Build C++ library ............... : ${enable_cpp} |
Build C++ library ............... : ${enable_cpp} |
| 843 |
Enable JIT compiling support .... : ${enable_jit} |
Enable JIT compiling support .... : ${enable_jit} |
| 844 |
Enable UTF-8 support ............ : ${enable_utf8} |
Enable UTF-8/16 support ......... : ${enable_utf} |
| 845 |
Unicode properties .............. : ${enable_unicode_properties} |
Unicode properties .............. : ${enable_unicode_properties} |
| 846 |
Newline char/sequence ........... : ${enable_newline} |
Newline char/sequence ........... : ${enable_newline} |
| 847 |
\R matches only ANYCRLF ......... : ${enable_bsr_anycrlf} |
\R matches only ANYCRLF ......... : ${enable_bsr_anycrlf} |
| 854 |
Match limit recursion ........... : ${with_match_limit_recursion} |
Match limit recursion ........... : ${with_match_limit_recursion} |
| 855 |
Build shared libs ............... : ${enable_shared} |
Build shared libs ............... : ${enable_shared} |
| 856 |
Build static libs ............... : ${enable_static} |
Build static libs ............... : ${enable_static} |
| 857 |
Use JIT in pcregrep ............. : ${enable_pcregrep_jit} |
Use JIT in pcregrep ............. : ${enable_pcregrep_jit} |
| 858 |
Buffer size for pcregrep ........ : ${with_pcregrep_bufsize} |
Buffer size for pcregrep ........ : ${with_pcregrep_bufsize} |
| 859 |
Link pcregrep with libz ......... : ${enable_pcregrep_libz} |
Link pcregrep with libz ......... : ${enable_pcregrep_libz} |
| 860 |
Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2} |
Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2} |