/[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 1019 by ph10, Mon Aug 27 13:15:02 2012 UTC revision 1028 by ph10, Thu Sep 6 16:55:38 2012 UTC
# Line 209  AC_ARG_ENABLE(ebcdic, Line 209  AC_ARG_ENABLE(ebcdic,
209                               [assume EBCDIC coding rather than ASCII; incompatible with --enable-utf; 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]),
210                , enable_ebcdic=no)                , enable_ebcdic=no)
211    
212    # Handle --enable-ebcdic-nl25
213    AC_ARG_ENABLE(ebcdic-nl25,
214                  AS_HELP_STRING([--enable-ebcdic-nl25],
215                                 [set EBCDIC code for NL to 0x25 instead of 0x15; it implies --enable-ebcdic]),
216                  , enable_ebcdic_nl25=no)
217    
218  # Handle --disable-stack-for-recursion  # Handle --disable-stack-for-recursion
219  AC_ARG_ENABLE(stack-for-recursion,  AC_ARG_ENABLE(stack-for-recursion,
220                AS_HELP_STRING([--disable-stack-for-recursion],                AS_HELP_STRING([--disable-stack-for-recursion],
# Line 335  then Line 341  then
341    fi    fi
342  fi  fi
343    
344  # Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled.  # Convert the newline identifier into the appropriate integer value. The first
345  # Also check that UTF support is not requested, because PCRE cannot handle  # three are ASCII values 0x0a, 0x0d, and 0x0d0a, but if EBCDIC is enabled, they
346  # EBCDIC and UTF in the same build. To do so it would need to use different  # are changed below.
 # character constants depending on the mode.  
 #  
 if test "x$enable_ebcdic" = "xyes"  
 then  
   enable_rebuild_chartables=yes  
   if test "x$enable_utf" = "xyes"  
   then  
     AC_MSG_ERROR([support for EBCDIC and UTF-8/16 cannot be enabled at the same time])  
   fi  
 fi  
347    
 # Convert the newline identifier into the appropriate integer value.  
348  case "$enable_newline" in  case "$enable_newline" in
349    lf)      ac_pcre_newline_value=10   ;;    lf)      ac_pcre_newline_value=10   ;;
350    cr)      ac_pcre_newline_value=13   ;;    cr)      ac_pcre_newline_value=13   ;;
# Line 361  case "$enable_newline" in Line 356  case "$enable_newline" in
356    ;;    ;;
357  esac  esac
358    
359    # --enable-ebcdic-nl25 implies --enable-ebcdic
360    if test "x$enable_ebcdic_nl25" = "xyes"; then
361      enable_ebcdic=yes
362    fi
363    
364    # Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled,
365    # and the newline value is adjusted appropriately (CR is still 13, but LF is
366    # 21 or 37). Also check that UTF support is not requested, because PCRE cannot
367    # handle EBCDIC and UTF in the same build. To do so it would need to use
368    # different character constants depending on the mode.
369    #
370    if test "x$enable_ebcdic" = "xyes"; then
371      enable_rebuild_chartables=yes
372    
373      if test "x$enable_utf" = "xyes"; then
374        AC_MSG_ERROR([support for EBCDIC and UTF-8/16 cannot be enabled at the same time])
375      fi
376    
377      if test "x$enable_ebcdic_nl25" = "xno"; then
378        case "$ac_pcre_newline_value" in
379          10)   ac_pcre_newline_value=21 ;;
380          3338) ac_pcre_newline_value=3349 ;;
381        esac
382      else
383        case "$ac_pcre_newline_value" in
384          10)   ac_pcre_newline_value=37 ;;
385          3338) ac_pcre_newline_value=3365 ;;
386        esac
387      fi
388    fi
389    
390  # Check argument to --with-link-size  # Check argument to --with-link-size
391  case "$with_link_size" in  case "$with_link_size" in
392    2|3|4) ;;    2|3|4) ;;
# Line 681  fi Line 707  fi
707  AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [  AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [
708    The value of NEWLINE determines the newline character sequence. On    The value of NEWLINE determines the newline character sequence. On
709    systems that support it, "configure" can be used to override the    systems that support it, "configure" can be used to override the
710    default, which is 10. The possible values are 10 (LF), 13 (CR),    default, which is LF. In ASCII environments, the value can be 10 (LF),
711    3338 (CRLF), -1 (ANY), or -2 (ANYCRLF).])    13 (CR), or 3338 (CRLF); in EBCDIC environments the value can be 21 or 37
712      (LF), 13 (CR), or 3349 or 3365 (CRLF) because there are two alternative
713      codepoints (0x15 and 0x25) that are used as the NL line terminator that is
714      equivalent to ASCII LF. In both ASCII and EBCDIC environments the value can
715      also be -1 (ANY), or -2 (ANYCRLF).])
716    
717  if test "$enable_bsr_anycrlf" = "yes"; then  if test "$enable_bsr_anycrlf" = "yes"; then
718    AC_DEFINE([BSR_ANYCRLF], [], [    AC_DEFINE([BSR_ANYCRLF], [], [
# Line 768  if test "$enable_ebcdic" = "yes"; then Line 798  if test "$enable_ebcdic" = "yes"; then
798      supports both EBCDIC and UTF-8/16.])      supports both EBCDIC and UTF-8/16.])
799  fi  fi
800    
801    if test "$enable_ebcdic_nl25" = "yes"; then
802      AC_DEFINE_UNQUOTED([EBCDIC_NL25], [], [
803        In an EBCDIC environment, define this macro to any value to arrange for
804        the NL character to be 0x25 instead of the default 0x15. NL plays the role
805        that LF does in an ASCII/Unicode environment.])
806    fi
807    
808  # Platform specific issues  # Platform specific issues
809  NO_UNDEFINED=  NO_UNDEFINED=
810  EXPORT_ALL_SYMBOLS=  EXPORT_ALL_SYMBOLS=
# Line 891  AC_CONFIG_COMMANDS([delete-old-chartable Line 928  AC_CONFIG_COMMANDS([delete-old-chartable
928    
929  AC_OUTPUT  AC_OUTPUT
930    
931  # Print out a nice little message after configure is run displaying your  # Print out a nice little message after configure is run displaying the
932  # chosen options.  # chosen options.
933    
934    ebcdic_nl_code=n/a
935    if test "$enable_ebcdic_nl25" = "yes"; then
936      ebcdic_nl_code=0x25
937    elif test "$enable_ebcdic" = "yes"; then
938      ebcdic_nl_code=0x15
939    fi
940    
941  cat <<EOF  cat <<EOF
942    
943  $PACKAGE-$VERSION configuration summary:  $PACKAGE-$VERSION configuration summary:
# Line 919  $PACKAGE-$VERSION configuration summary: Line 963  $PACKAGE-$VERSION configuration summary:
963      Newline char/sequence ........... : ${enable_newline}      Newline char/sequence ........... : ${enable_newline}
964      \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}      \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}
965      EBCDIC coding ................... : ${enable_ebcdic}      EBCDIC coding ................... : ${enable_ebcdic}
966        EBCDIC code for NL .............. : ${ebcdic_nl_code}
967      Rebuild char tables ............. : ${enable_rebuild_chartables}      Rebuild char tables ............. : ${enable_rebuild_chartables}
968      Use stack recursion ............. : ${enable_stack_for_recursion}      Use stack recursion ............. : ${enable_stack_for_recursion}
969      POSIX mem threshold ............. : ${with_posix_malloc_threshold}      POSIX mem threshold ............. : ${with_posix_malloc_threshold}

Legend:
Removed from v.1019  
changed lines
  Added in v.1028

  ViewVC Help
Powered by ViewVC 1.1.5