diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-12-28 17:16:11 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-12-28 17:16:11 +0000 |
commit | 5e8b286b566d7ec502b80892e5b709025631d58c (patch) | |
tree | c8a6c83ad13e79a9b64718b784fe0126764d98b7 /configure.ac | |
parent | a29cc4dc66d82b59de7616c53517c58271e6e0e8 (diff) | |
download | pcre-5e8b286b566d7ec502b80892e5b709025631d58c.tar.gz |
Merging all the changes from the pcre16 branch into the trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@836 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 137 |
1 files changed, 106 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac index ddee8e8..f2a6b54 100644 --- a/configure.ac +++ b/configure.ac @@ -9,9 +9,9 @@ dnl The PCRE_PRERELEASE feature is for identifying release candidates. It might dnl be defined as -RC2, for example. For real releases, it should be empty. m4_define(pcre_major, [8]) -m4_define(pcre_minor, [21]) -m4_define(pcre_prerelease, [-RC1]) -m4_define(pcre_date, [2011-11-14]) +m4_define(pcre_minor, [30]) +m4_define(pcre_prerelease, [-PT1]) +m4_define(pcre_date, [2012-01-01]) # Libtool shared library interface versions (current:revision:age) m4_define(libpcre_version, [0:1:0]) @@ -104,12 +104,24 @@ then htmldir='${docdir}/html' fi +# Handle --disable-pcre8 (enabled by default) +AC_ARG_ENABLE(pcre8, + AS_HELP_STRING([--disable-pcre8], + [enable 8 bit character support]), + , enable_pcre8=unset) + +# Handle --enable-pcre16 (disabled by default) +AC_ARG_ENABLE(pcre16, + AS_HELP_STRING([--enable-pcre16], + [enable 16 bit character support]), + , enable_pcre16=unset) + # Handle --disable-cpp. The substitution of enable_cpp is needed for use in # pcre-config. AC_ARG_ENABLE(cpp, AS_HELP_STRING([--disable-cpp], [disable C++ support]), - , enable_cpp=yes) + , enable_cpp=unset) AC_SUBST(enable_cpp) # Handle --enable-jit (disabled by default) @@ -133,13 +145,19 @@ AC_ARG_ENABLE(rebuild-chartables, # Handle --enable-utf8 (disabled by default) AC_ARG_ENABLE(utf8, AS_HELP_STRING([--enable-utf8], - [enable UTF-8 support (incompatible with --enable-ebcdic)]), + [another name for --enable-utf. Kept only for compatibility reasons]), , enable_utf8=unset) +# Handle --enable-utf (disabled by default) +AC_ARG_ENABLE(utf, + AS_HELP_STRING([--enable-utf], + [enable UTF-8/16 support (incompatible with --enable-ebcdic)]), + , enable_utf=unset) + # Handle --enable-unicode-properties AC_ARG_ENABLE(unicode-properties, AS_HELP_STRING([--enable-unicode-properties], - [enable Unicode properties support (implies --enable-utf8)]), + [enable Unicode properties support (implies --enable-utf)]), , enable_unicode_properties=no) # Handle --enable-newline=NL @@ -181,7 +199,7 @@ AC_ARG_ENABLE(bsr-anycrlf, # Handle --enable-ebcdic AC_ARG_ENABLE(ebcdic, AS_HELP_STRING([--enable-ebcdic], - [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]), , enable_ebcdic=no) # Handle --disable-stack-for-recursion @@ -245,34 +263,76 @@ AC_ARG_WITH(match-limit-recursion, [default limit on internal recursion (default=MATCH_LIMIT)]), , with_match_limit_recursion=MATCH_LIMIT) -# Make sure that if enable_unicode_properties was set, that UTF-8 support -# is enabled. -# +# Copy enable_utf8 value to enable_utf for compatibility reasons +if test "x$enable_utf8" != "xunset" +then + if test "x$enable_utf" != "xunset" + then + 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.]) + fi + enable_utf=$enable_utf8 +fi + +# Set the default value for pcre8 +if test "x$enable_pcre8" = "xunset" +then + enable_pcre8=yes +fi + +# Set the default value for pcre16 +if test "x$enable_pcre16" = "xunset" +then + enable_pcre16=no +fi + +# Make sure enable_pcre8 or enable_pcre16 was set +if test "x$enable_pcre8$enable_pcre16" = "xnono" +then + AC_MSG_ERROR([Either 8 or 16 bit (or both) pcre library must be enabled]) +fi + +# Make sure that if enable_unicode_properties was set, that UTF support is enabled. if test "x$enable_unicode_properties" = "xyes" then - if test "x$enable_utf8" = "xno" + if test "x$enable_utf" = "xno" then - AC_MSG_ERROR([support for Unicode properties requires UTF-8 support]) + AC_MSG_ERROR([support for Unicode properties requires UTF-8/16 support]) fi - enable_utf8=yes + enable_utf=yes +fi + +# enable_utf is disabled by default. +if test "x$enable_utf" = "xunset" +then + enable_utf=no fi -if test "x$enable_utf8" = "xunset" +# enable_cpp copies the value of enable_pcre8 by default +if test "x$enable_cpp" = "xunset" then - enable_utf8=no + enable_cpp=$enable_pcre8 +fi + +# Make sure that if enable_cpp was set, that enable_pcre8 support is enabled +if test "x$enable_cpp" = "xyes" +then + if test "x$enable_pcre8" = "xno" + then + AC_MSG_ERROR([C++ library requires pcre library with 8 bit characters]) + fi fi # Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled. -# Also check that UTF-8 support is not requested, because PCRE cannot handle -# EBCDIC and UTF-8 in the same build. To do so it would need to use different +# Also check that UTF support is not requested, because PCRE cannot handle +# EBCDIC and UTF in the same build. To do so it would need to use different # character constants depending on the mode. # if test "x$enable_ebcdic" = "xyes" then enable_rebuild_chartables=yes - if test "x$enable_utf8" = "xyes" + if test "x$enable_utf" = "xyes" then - 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]) fi fi @@ -410,10 +470,12 @@ AC_SUBST(pcre_have_type_traits) AC_SUBST(pcre_have_bits_type_traits) # Conditional compilation +AM_CONDITIONAL(WITH_PCRE8, test "x$enable_pcre8" = "xyes") +AM_CONDITIONAL(WITH_PCRE16, test "x$enable_pcre16" = "xyes") AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes") AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes") AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes") -AM_CONDITIONAL(WITH_UTF8, test "x$enable_utf8" = "xyes") +AM_CONDITIONAL(WITH_UTF, test "x$enable_utf" = "xyes") # Checks for typedefs, structures, and compiler characteristics. @@ -482,6 +544,16 @@ AC_SUBST(PCRE_STATIC_CFLAG) # Here is where pcre specific defines are handled +if test "$enable_pcre8" = "yes"; then + AC_DEFINE([SUPPORT_PCRE8], [], [ + Define to enable the 8 bit PCRE library.]) +fi + +if test "$enable_pcre16" = "yes"; then + AC_DEFINE([SUPPORT_PCRE16], [], [ + Define to enable the 16 bit PCRE library.]) +fi + if test "$enable_jit" = "yes"; then AC_DEFINE([SUPPORT_JIT], [], [ Define to enable support for Just-In-Time compiling.]) @@ -494,12 +566,12 @@ if test "$enable_pcregrep_jit" = "yes"; then Define to enable JIT support in pcregrep.]) fi -if test "$enable_utf8" = "yes"; then - AC_DEFINE([SUPPORT_UTF8], [], [ - Define to enable support for the UTF-8 Unicode encoding. This will - work even in an EBCDIC environment, but it is incompatible with - the EBCDIC macro. That is, PCRE can support *either* EBCDIC code - *or* ASCII/UTF-8, but not both at once.]) +if test "$enable_utf" = "yes"; then + AC_DEFINE([SUPPORT_UTF], [], [ + Define to enable support for the UTF-8/16 Unicode encoding. This + will work even in an EBCDIC environment, but it is incompatible + with the EBCDIC macro. That is, PCRE can support *either* EBCDIC + code *or* ASCII/UTF-8/16, but not both at once.]) fi if test "$enable_unicode_properties" = "yes"; then @@ -634,9 +706,9 @@ if test "$enable_ebcdic" = "yes"; then character codes, define this macro as 1. On systems that can use "configure", this can be done via --enable-ebcdic. PCRE will then assume that all input strings are in EBCDIC. If you do not define - this macro, PCRE will assume input strings are ASCII or UTF-8 Unicode. - It is not possible to build a version of PCRE that supports both - EBCDIC and UTF-8.]) + this macro, PCRE will assume input strings are ASCII or UTF-8/16 + Unicode. It is not possible to build a version of PCRE that + supports both EBCDIC and UTF-8/16.]) fi # Platform specific issues @@ -720,7 +792,8 @@ AC_SUBST(LIBREADLINE) AC_CONFIG_FILES( Makefile libpcre.pc - libpcreposix.pc + libpcre16.pc + libpcreposix.pc libpcrecpp.pc pcre-config pcre.h @@ -756,9 +829,11 @@ $PACKAGE-$VERSION configuration summary: Linker flags .................... : ${LDFLAGS} Extra libraries ................. : ${LIBS} + Build 8 bit pcre library ........ : ${enable_pcre8} + Build 16 bit pcre library ....... : ${enable_pcre16} Build C++ library ............... : ${enable_cpp} Enable JIT compiling support .... : ${enable_jit} - Enable UTF-8 support ............ : ${enable_utf8} + Enable UTF-8/16 support ......... : ${enable_utf} Unicode properties .............. : ${enable_unicode_properties} Newline char/sequence ........... : ${enable_newline} \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf} |