Skip to content
Snippets Groups Projects
Commit bf09a782 authored by Boris Kolpackov's avatar Boris Kolpackov
Browse files

Use character literals instead of ranges; tr on Solaris does not understand ranges.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@695468 13f79535-47bb-0310-9956-ffa450edef68
parent eb4fde91
No related branches found
No related tags found
No related merge requests found
...@@ -85,10 +85,14 @@ AC_DEFUN([XERCES_MSGLOADER_SELECTION], ...@@ -85,10 +85,14 @@ AC_DEFUN([XERCES_MSGLOADER_SELECTION],
# which were not "disable"d (these won't even be in our list). # which were not "disable"d (these won't even be in our list).
###################################################### ######################################################
msgloader= msgloader=
az_lower=abcdefghijklmnopqrstuvwxyz
az_upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
AC_MSG_CHECKING([for which MsgLoader to use (choices:$ml_list)]) AC_MSG_CHECKING([for which MsgLoader to use (choices:$ml_list)])
for i in 1 2; do for i in 1 2; do
# Swap upper/lower case in the ml_list # Swap upper/lower case in the ml_list. Cannot use tr ranges
ml_list=`echo $ml_list | tr '[a-z][A-Z]' '[A-Z][a-z]'` # because of the portability issues.
#
ml_list=`echo $ml_list | tr "$az_lower$az_upper" "$az_upper$az_lower"`
# Check for each msgloader, in implicit rank order # Check for each msgloader, in implicit rank order
case $ml_list in case $ml_list in
......
...@@ -118,10 +118,14 @@ AC_DEFUN([XERCES_NETACCESSOR_SELECTION], ...@@ -118,10 +118,14 @@ AC_DEFUN([XERCES_NETACCESSOR_SELECTION],
# which were not "disable"d (these won't even be in our list). # which were not "disable"d (these won't even be in our list).
###################################################### ######################################################
netaccessor= netaccessor=
az_lower=abcdefghijklmnopqrstuvwxyz
az_upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
AC_MSG_CHECKING([for which NetAccessor to use (choices:$na_list)]) AC_MSG_CHECKING([for which NetAccessor to use (choices:$na_list)])
for i in 1 2; do for i in 1 2; do
# Swap upper/lower case in string: # Swap upper/lower case in the na_list. Cannot use tr ranges
na_list=`echo $na_list | tr '[a-z][A-Z]' '[A-Z][a-z]'` # because of the portability issues.
#
na_list=`echo $na_list | tr "$az_lower$az_upper" "$az_upper$az_lower"`
# Check for each netaccessor, in implicit rank order # Check for each netaccessor, in implicit rank order
case $na_list in case $na_list in
...@@ -177,4 +181,3 @@ AC_DEFUN([XERCES_NETACCESSOR_SELECTION], ...@@ -177,4 +181,3 @@ AC_DEFUN([XERCES_NETACCESSOR_SELECTION],
] ]
) )
...@@ -18,9 +18,9 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION], ...@@ -18,9 +18,9 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION],
# If the transcoder has been explicitly "enable"d, then vote for it strongly, # If the transcoder has been explicitly "enable"d, then vote for it strongly,
# in upper case. # in upper case.
###################################################### ######################################################
tc_list= tc_list=
# Check for GNU iconv support # Check for GNU iconv support
no_GNUiconv=false no_GNUiconv=false
AC_CHECK_HEADERS([iconv.h wchar.h string.h stdlib.h stdio.h ctype.h locale.h errno.h endian.h], [], [no_GNUiconv=true]) AC_CHECK_HEADERS([iconv.h wchar.h string.h stdlib.h stdio.h ctype.h locale.h errno.h endian.h], [], [no_GNUiconv=true])
...@@ -75,8 +75,8 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION], ...@@ -75,8 +75,8 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION],
[tc_list="$tc_list -$list_add-"; AC_MSG_RESULT(yes)], [tc_list="$tc_list -$list_add-"; AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)] [AC_MSG_RESULT(no)]
) )
# Check for platform-specific transcoders # Check for platform-specific transcoders
list_add= list_add=
case $host_os in case $host_os in
...@@ -111,7 +111,7 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION], ...@@ -111,7 +111,7 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION],
esac esac
# TODO: Tests for additional transcoders # TODO: Tests for additional transcoders
###################################################### ######################################################
# Determine which transcoder to use. # Determine which transcoder to use.
# #
...@@ -121,14 +121,18 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION], ...@@ -121,14 +121,18 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION],
# which were not "disable"d (these won't even be in our list). # which were not "disable"d (these won't even be in our list).
###################################################### ######################################################
transcoder= transcoder=
az_lower=abcdefghijklmnopqrstuvwxyz
az_upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
AC_MSG_CHECKING([for which Transcoder to use (choices:$tc_list)]) AC_MSG_CHECKING([for which Transcoder to use (choices:$tc_list)])
for i in 1 2; do for i in 1 2; do
# Swap upper/lower case in the tc_list # Swap upper/lower case in the tc_list. Cannot use tr ranges
tc_list=`echo $tc_list | tr '[a-z][A-Z]' '[A-Z][a-z]'` # because of the portability issues.
#
tc_list=`echo $tc_list | tr "$az_lower$az_upper" "$az_upper$az_lower"`
# Check for each transcoder, in implicit rank order # Check for each transcoder, in implicit rank order
case $tc_list in case $tc_list in
*-icu-*) *-icu-*)
transcoder=icu transcoder=icu
AC_DEFINE([XERCES_USE_TRANSCODER_ICU], 1, [Define to use the ICU-based transcoder]) AC_DEFINE([XERCES_USE_TRANSCODER_ICU], 1, [Define to use the ICU-based transcoder])
...@@ -136,7 +140,7 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION], ...@@ -136,7 +140,7 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION],
LIBS="${LIBS} -L${xerces_cv_icu_prefix}/lib -licuuc -licudata" LIBS="${LIBS} -L${xerces_cv_icu_prefix}/lib -licuuc -licudata"
break break
;; ;;
*-macosunicodeconverter-*) *-macosunicodeconverter-*)
transcoder=macosunicodeconverter transcoder=macosunicodeconverter
AC_DEFINE([XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER], 1, [Define to use the Mac OS UnicodeConverter-based transcoder]) AC_DEFINE([XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER], 1, [Define to use the Mac OS UnicodeConverter-based transcoder])
...@@ -161,7 +165,7 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION], ...@@ -161,7 +165,7 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION],
AC_DEFINE([XERCES_USE_TRANSCODER_ICONV], 1, [Define to use the iconv transcoder]) AC_DEFINE([XERCES_USE_TRANSCODER_ICONV], 1, [Define to use the iconv transcoder])
break break
;; ;;
*) *)
AS_IF([test $i -eq 2], [ AS_IF([test $i -eq 2], [
AC_MSG_RESULT([none]) AC_MSG_RESULT([none])
...@@ -174,7 +178,7 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION], ...@@ -174,7 +178,7 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION],
if test x"$transcoder" != x; then if test x"$transcoder" != x; then
AC_MSG_RESULT($transcoder) AC_MSG_RESULT($transcoder)
fi fi
# Define the auto-make conditionals which determine what actually gets compiled # Define the auto-make conditionals which determine what actually gets compiled
# Note that these macros can't be executed conditionally, which is why they're here, not above. # Note that these macros can't be executed conditionally, which is why they're here, not above.
AM_CONDITIONAL([XERCES_USE_TRANSCODER_ICU], [test x"$transcoder" = xicu]) AM_CONDITIONAL([XERCES_USE_TRANSCODER_ICU], [test x"$transcoder" = xicu])
...@@ -185,4 +189,3 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION], ...@@ -185,4 +189,3 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION],
] ]
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment