/[pcre]/code/branches/pcre16/configure.ac
ViewVC logotype

Diff of /code/branches/pcre16/configure.ac

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

revision 793 by ph10, Mon Nov 21 11:44:55 2011 UTC revision 794 by zherczeg, Thu Dec 8 07:36:41 2011 UTC
# Line 121  AC_ARG_ENABLE(pcre16, Line 121  AC_ARG_ENABLE(pcre16,
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 145  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-utf16 (disabled by default)  # Handle --enable-utf (disabled by default)
152  AC_ARG_ENABLE(utf16,  AC_ARG_ENABLE(utf,
153                AS_HELP_STRING([--enable-utf16],                AS_HELP_STRING([--enable-utf],
154                               [enable UTF-16 support (incompatible with --enable-ebcdic)]),                               [enable UTF-8/16 support (incompatible with --enable-ebcdic)]),
155                , enable_utf16=unset)                , 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 and --enable-utf16)]),                               [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 199  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 263  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_utf8 was set, that enable_pcre8 support is enabled  # Copy enable_utf8 value to enable_utf for compatibility reasons
267  if test "x$enable_utf8" = "xyes"  if test "x$enable_utf8" != "xunset"
268  then  then
269    if test "x$enable_pcre8" = "xno"    if test "x$enable_utf" != "xunset"
270    then    then
271      AC_MSG_ERROR([support for UTF-8 requires pcre library with 8 bit characters])      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    fi
273    enable_pcre8=yes    enable_utf=$enable_utf8
 fi  
   
 # Make sure that if enable_utf16 was set, that enable_pcre16 support is enabled  
 if test "x$enable_utf16" = "xyes"  
 then  
   if test "x$enable_pcre16" = "xno"  
   then  
     AC_MSG_ERROR([support for UTF-16 requires pcre library with 16 bit characters])  
   fi  
   enable_pcre16=yes  
274  fi  fi
275    
276  # Set the default value for pcre8  # Set the default value for pcre8
# Line 301  then Line 291  then
291    AC_MSG_ERROR([Either 8 or 16 bit (or both) pcre library must be enabled])    AC_MSG_ERROR([Either 8 or 16 bit (or both) pcre library must be enabled])
292  fi  fi
293    
294  # Make sure that if enable_unicode_properties was set, that UTF-8 or UTF-16  # Make sure that if enable_unicode_properties was set, that UTF support is enabled.
 # support 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"
   then  
     AC_MSG_ERROR([support for Unicode properties requires UTF-8 support])  
   fi  
   if test "x$enable_utf16" = "xno"  
   then  
     AC_MSG_ERROR([support for Unicode properties requires UTF-16 support])  
   fi  
   if test "x$enable_pcre8" = "xyes"  
   then  
     enable_utf8=yes  
   fi  
   if test "x$enable_pcre16" = "xyes"  
298    then    then
299      enable_utf16=yes      AC_MSG_ERROR([support for Unicode properties requires UTF-8/16 support])
300    fi    fi
301      enable_utf=yes
302  fi  fi
303    
304  # enable_utf8 is disabled by default.  # enable_utf is disabled by default.
305  if test "x$enable_utf8" = "xunset"  if test "x$enable_utf" = "xunset"
306  then  then
307    enable_utf8=no    enable_utf=no
308  fi  fi
309    
310  # enable_utf16 is disabled by default.  # enable_cpp copies the value of enable_pcre8 by default
311  if test "x$enable_utf16" = "xunset"  if test "x$enable_cpp" = "xunset"
312  then  then
313    enable_utf16=no    enable_cpp=$enable_pcre8
314  fi  fi
315    
316  # Make sure that if enable_cpp was set, that enable_pcre8 support is enabled  # Make sure that if enable_cpp was set, that enable_pcre8 support is enabled
# Line 346  then Line 323  then
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 or UTF-16 support is not requested, because PCRE cannot  # Also check that UTF support is not requested, because PCRE cannot handle
327  # handle EBCDIC and UTF 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])
   fi  
   if test "x$enable_utf16" = "xyes"  
   then  
     AC_MSG_ERROR([support for EBCDIC and UTF-16 cannot be enabled at the same time])  
336    fi    fi
337  fi  fi
338    
# Line 502  AM_CONDITIONAL(WITH_PCRE16, test "x$enab Line 475  AM_CONDITIONAL(WITH_PCRE16, test "x$enab
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")
 AM_CONDITIONAL(WITH_UTF16, test "x$enable_utf16" = "xyes")  
479    
480  # Checks for typedefs, structures, and compiler characteristics.  # Checks for typedefs, structures, and compiler characteristics.
481    
# Line 594  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.])
 fi  
   
 if test "$enable_utf16" = "yes"; then  
   AC_DEFINE([SUPPORT_UTF16], [], [  
     Define to enable support for the UTF-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-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 742  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 869  $PACKAGE-$VERSION configuration summary: Line 833  $PACKAGE-$VERSION configuration summary:
833      Build 16 bit pcre library ....... : ${enable_pcre16}      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}
     Enable UTF-16 support ........... : ${enable_utf16}  
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.793  
changed lines
  Added in v.794

  ViewVC Help
Powered by ViewVC 1.1.5