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

Diff of /code/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 835 by ph10, Wed Dec 28 16:10:09 2011 UTC revision 836 by ph10, Wed Dec 28 17:16:11 2011 UTC
# Line 9  dnl The PCRE_PRERELEASE feature is for i Line 9  dnl The PCRE_PRERELEASE feature is for i
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, [21])  m4_define(pcre_minor, [30])
13  m4_define(pcre_prerelease, [-RC1])  m4_define(pcre_prerelease, [-PT1])
14  m4_define(pcre_date, [2011-11-14])  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, [0:1:0])
# Line 104  then Line 104  then
104    htmldir='${docdir}/html'    htmldir='${docdir}/html'
105  fi  fi
106    
107    # Handle --disable-pcre8 (enabled by default)
108    AC_ARG_ENABLE(pcre8,
109                  AS_HELP_STRING([--disable-pcre8],
110                                 [enable 8 bit character support]),
111                  , enable_pcre8=unset)
112    
113    # Handle --enable-pcre16 (disabled by default)
114    AC_ARG_ENABLE(pcre16,
115                  AS_HELP_STRING([--enable-pcre16],
116                                 [enable 16 bit character support]),
117                  , enable_pcre16=unset)
118    
119  # 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
120  # pcre-config.  # pcre-config.
121  AC_ARG_ENABLE(cpp,  AC_ARG_ENABLE(cpp,
122                AS_HELP_STRING([--disable-cpp],                AS_HELP_STRING([--disable-cpp],
123                               [disable C++ support]),                               [disable C++ support]),
124                , enable_cpp=yes)                , enable_cpp=unset)
125  AC_SUBST(enable_cpp)  AC_SUBST(enable_cpp)
126    
127  # Handle --enable-jit (disabled by default)  # Handle --enable-jit (disabled by default)
# Line 133  AC_ARG_ENABLE(rebuild-chartables, Line 145  AC_ARG_ENABLE(rebuild-chartables,
145  # Handle --enable-utf8 (disabled by default)  # Handle --enable-utf8 (disabled by default)
146  AC_ARG_ENABLE(utf8,  AC_ARG_ENABLE(utf8,
147                AS_HELP_STRING([--enable-utf8],                AS_HELP_STRING([--enable-utf8],
148                               [enable UTF-8 support (incompatible with --enable-ebcdic)]),                               [another name for --enable-utf. Kept only for compatibility reasons]),
149                , enable_utf8=unset)                , enable_utf8=unset)
150    
151    # Handle --enable-utf (disabled by default)
152    AC_ARG_ENABLE(utf,
153                  AS_HELP_STRING([--enable-utf],
154                                 [enable UTF-8/16 support (incompatible with --enable-ebcdic)]),
155                  , enable_utf=unset)
156    
157  # Handle --enable-unicode-properties  # Handle --enable-unicode-properties
158  AC_ARG_ENABLE(unicode-properties,  AC_ARG_ENABLE(unicode-properties,
159                AS_HELP_STRING([--enable-unicode-properties],                AS_HELP_STRING([--enable-unicode-properties],
160                               [enable Unicode properties support (implies --enable-utf8)]),                               [enable Unicode properties support (implies --enable-utf)]),
161                , enable_unicode_properties=no)                , enable_unicode_properties=no)
162    
163  # Handle --enable-newline=NL  # Handle --enable-newline=NL
# Line 181  AC_ARG_ENABLE(bsr-anycrlf, Line 199  AC_ARG_ENABLE(bsr-anycrlf,
199  # Handle --enable-ebcdic  # Handle --enable-ebcdic
200  AC_ARG_ENABLE(ebcdic,  AC_ARG_ENABLE(ebcdic,
201                AS_HELP_STRING([--enable-ebcdic],                AS_HELP_STRING([--enable-ebcdic],
202                               [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]),
203                , enable_ebcdic=no)                , enable_ebcdic=no)
204    
205  # Handle --disable-stack-for-recursion  # Handle --disable-stack-for-recursion
# Line 245  AC_ARG_WITH(match-limit-recursion, Line 263  AC_ARG_WITH(match-limit-recursion,
263                             [default limit on internal recursion (default=MATCH_LIMIT)]),                             [default limit on internal recursion (default=MATCH_LIMIT)]),
264              , with_match_limit_recursion=MATCH_LIMIT)              , with_match_limit_recursion=MATCH_LIMIT)
265    
266  # Make sure that if enable_unicode_properties was set, that UTF-8 support  # Copy enable_utf8 value to enable_utf for compatibility reasons
267  # is enabled.  if test "x$enable_utf8" != "xunset"
268  #  then
269      if test "x$enable_utf" != "xunset"
270      then
271        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.])
272      fi
273      enable_utf=$enable_utf8
274    fi
275    
276    # Set the default value for pcre8
277    if test "x$enable_pcre8" = "xunset"
278    then
279      enable_pcre8=yes
280    fi
281    
282    # Set the default value for pcre16
283    if test "x$enable_pcre16" = "xunset"
284    then
285      enable_pcre16=no
286    fi
287    
288    # Make sure enable_pcre8 or enable_pcre16 was set
289    if test "x$enable_pcre8$enable_pcre16" = "xnono"
290    then
291      AC_MSG_ERROR([Either 8 or 16 bit (or both) pcre library must be enabled])
292    fi
293    
294    # Make sure that if enable_unicode_properties was set, that UTF support is enabled.
295  if test "x$enable_unicode_properties" = "xyes"  if test "x$enable_unicode_properties" = "xyes"
296  then  then
297    if test "x$enable_utf8" = "xno"    if test "x$enable_utf" = "xno"
298    then    then
299      AC_MSG_ERROR([support for Unicode properties requires UTF-8 support])      AC_MSG_ERROR([support for Unicode properties requires UTF-8/16 support])
300    fi    fi
301    enable_utf8=yes    enable_utf=yes
302    fi
303    
304    # enable_utf is disabled by default.
305    if test "x$enable_utf" = "xunset"
306    then
307      enable_utf=no
308    fi
309    
310    # enable_cpp copies the value of enable_pcre8 by default
311    if test "x$enable_cpp" = "xunset"
312    then
313      enable_cpp=$enable_pcre8
314  fi  fi
315    
316  if test "x$enable_utf8" = "xunset"  # Make sure that if enable_cpp was set, that enable_pcre8 support is enabled
317    if test "x$enable_cpp" = "xyes"
318  then  then
319    enable_utf8=no    if test "x$enable_pcre8" = "xno"
320      then
321        AC_MSG_ERROR([C++ library requires pcre library with 8 bit characters])
322      fi
323  fi  fi
324    
325  # 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.
326  # 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
327  # 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
328  # character constants depending on the mode.  # character constants depending on the mode.
329  #  #
330  if test "x$enable_ebcdic" = "xyes"  if test "x$enable_ebcdic" = "xyes"
331  then  then
332    enable_rebuild_chartables=yes    enable_rebuild_chartables=yes
333    if test "x$enable_utf8" = "xyes"    if test "x$enable_utf" = "xyes"
334    then    then
335      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])
336    fi    fi
337  fi  fi
338    
# Line 410  AC_SUBST(pcre_have_type_traits) Line 470  AC_SUBST(pcre_have_type_traits)
470  AC_SUBST(pcre_have_bits_type_traits)  AC_SUBST(pcre_have_bits_type_traits)
471    
472  # Conditional compilation  # Conditional compilation
473    AM_CONDITIONAL(WITH_PCRE8, test "x$enable_pcre8" = "xyes")
474    AM_CONDITIONAL(WITH_PCRE16, test "x$enable_pcre16" = "xyes")
475  AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")  AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")
476  AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")  AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
477  AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")  AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
478  AM_CONDITIONAL(WITH_UTF8, test "x$enable_utf8" = "xyes")  AM_CONDITIONAL(WITH_UTF, test "x$enable_utf" = "xyes")
479    
480  # Checks for typedefs, structures, and compiler characteristics.  # Checks for typedefs, structures, and compiler characteristics.
481    
# Line 482  AC_SUBST(PCRE_STATIC_CFLAG) Line 544  AC_SUBST(PCRE_STATIC_CFLAG)
544    
545  # Here is where pcre specific defines are handled  # Here is where pcre specific defines are handled
546    
547    if test "$enable_pcre8" = "yes"; then
548      AC_DEFINE([SUPPORT_PCRE8], [], [
549        Define to enable the 8 bit PCRE library.])
550    fi
551    
552    if test "$enable_pcre16" = "yes"; then
553      AC_DEFINE([SUPPORT_PCRE16], [], [
554        Define to enable the 16 bit PCRE library.])
555    fi
556    
557  if test "$enable_jit" = "yes"; then  if test "$enable_jit" = "yes"; then
558    AC_DEFINE([SUPPORT_JIT], [], [    AC_DEFINE([SUPPORT_JIT], [], [
559      Define to enable support for Just-In-Time compiling.])      Define to enable support for Just-In-Time compiling.])
# Line 494  if test "$enable_pcregrep_jit" = "yes"; Line 566  if test "$enable_pcregrep_jit" = "yes";
566      Define to enable JIT support in pcregrep.])      Define to enable JIT support in pcregrep.])
567  fi  fi
568    
569  if test "$enable_utf8" = "yes"; then  if test "$enable_utf" = "yes"; then
570    AC_DEFINE([SUPPORT_UTF8], [], [    AC_DEFINE([SUPPORT_UTF], [], [
571      Define to enable support for the UTF-8 Unicode encoding. This will      Define to enable support for the UTF-8/16 Unicode encoding. This
572      work even in an EBCDIC environment, but it is incompatible with      will work even in an EBCDIC environment, but it is incompatible
573      the EBCDIC macro. That is, PCRE can support *either* EBCDIC code      with the EBCDIC macro. That is, PCRE can support *either* EBCDIC
574      *or* ASCII/UTF-8, but not both at once.])      code *or* ASCII/UTF-8/16, but not both at once.])
575  fi  fi
576    
577  if test "$enable_unicode_properties" = "yes"; then  if test "$enable_unicode_properties" = "yes"; then
# Line 634  if test "$enable_ebcdic" = "yes"; then Line 706  if test "$enable_ebcdic" = "yes"; then
706      character codes, define this macro as 1. On systems that can use      character codes, define this macro as 1. On systems that can use
707      "configure", this can be done via --enable-ebcdic. PCRE will then      "configure", this can be done via --enable-ebcdic. PCRE will then
708      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
709      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
710      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
711      EBCDIC and UTF-8.])      supports both EBCDIC and UTF-8/16.])
712  fi  fi
713    
714  # Platform specific issues  # Platform specific issues
# Line 720  AC_SUBST(LIBREADLINE) Line 792  AC_SUBST(LIBREADLINE)
792  AC_CONFIG_FILES(  AC_CONFIG_FILES(
793          Makefile          Makefile
794          libpcre.pc          libpcre.pc
795          libpcreposix.pc          libpcre16.pc
796            libpcreposix.pc
797          libpcrecpp.pc          libpcrecpp.pc
798          pcre-config          pcre-config
799          pcre.h          pcre.h
# Line 756  $PACKAGE-$VERSION configuration summary: Line 829  $PACKAGE-$VERSION configuration summary:
829      Linker flags .................... : ${LDFLAGS}      Linker flags .................... : ${LDFLAGS}
830      Extra libraries ................. : ${LIBS}      Extra libraries ................. : ${LIBS}
831    
832        Build 8 bit pcre library ........ : ${enable_pcre8}
833        Build 16 bit pcre library ....... : ${enable_pcre16}
834      Build C++ library ............... : ${enable_cpp}      Build C++ library ............... : ${enable_cpp}
835      Enable JIT compiling support .... : ${enable_jit}      Enable JIT compiling support .... : ${enable_jit}
836      Enable UTF-8 support ............ : ${enable_utf8}      Enable UTF-8/16 support ......... : ${enable_utf}
837      Unicode properties .............. : ${enable_unicode_properties}      Unicode properties .............. : ${enable_unicode_properties}
838      Newline char/sequence ........... : ${enable_newline}      Newline char/sequence ........... : ${enable_newline}
839      \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}      \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}

Legend:
Removed from v.835  
changed lines
  Added in v.836

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12