mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
zz40-xc-ovr.m4: fix 'wc' detection
- Take into account that 'wc' may return leading spaces. - Set internationalization behavior variables. Tor Arntsen analyzed and reported the issue. URL: http://curl.haxx.se/mail/lib-2013-01/0351.html
This commit is contained in:
parent
c7b6e43ef8
commit
38131d415b
@ -53,6 +53,17 @@ xc_configure_preamble_ver_minor='XC_CONFIGURE_PREAMBLE_VER_MINOR'
|
|||||||
|
|
||||||
xc_configure_preamble_prev_IFS=$IFS
|
xc_configure_preamble_prev_IFS=$IFS
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set internationalization behavior variables
|
||||||
|
#
|
||||||
|
|
||||||
|
LANG='C'
|
||||||
|
LC_ALL='C'
|
||||||
|
LANGUAGE='C'
|
||||||
|
export LANG
|
||||||
|
export LC_ALL
|
||||||
|
export LANGUAGE
|
||||||
|
|
||||||
xc_msg_warn='configure: WARNING:'
|
xc_msg_warn='configure: WARNING:'
|
||||||
xc_msg_abrt='Can not continue.'
|
xc_msg_abrt='Can not continue.'
|
||||||
xc_msg_err='configure: error:'
|
xc_msg_err='configure: error:'
|
||||||
@ -276,14 +287,14 @@ dnl is found within 'PATH', otherwise aborts execution.
|
|||||||
|
|
||||||
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_WC],
|
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_WC],
|
||||||
[dnl
|
[dnl
|
||||||
AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
|
AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
|
||||||
#
|
#
|
||||||
# Verify that 'wc' utility is found within 'PATH', otherwise abort.
|
# Verify that 'wc' utility is found within 'PATH', otherwise abort.
|
||||||
#
|
#
|
||||||
|
|
||||||
xc_tst_str='unknown unknown unknown unknown'
|
xc_tst_str='unknown unknown unknown unknown'
|
||||||
xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
|
xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
|
||||||
| wc -w 2>/dev/null`
|
| wc -w 2>/dev/null | tr -d ' ' 2>/dev/null`
|
||||||
case "x$xc_tst_str" in @%:@ ((
|
case "x$xc_tst_str" in @%:@ ((
|
||||||
x4)
|
x4)
|
||||||
:
|
:
|
||||||
@ -311,7 +322,7 @@ AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
|
|||||||
#
|
#
|
||||||
|
|
||||||
xc_tst_str='unknown'
|
xc_tst_str='unknown'
|
||||||
xc_tst_str=`cat <<_EOT 2>/dev/null | wc -l 2>/dev/null
|
xc_tst_str=`cat <<_EOT 2>/dev/null | wc -l 2>/dev/null | tr -d ' ' 2>/dev/null
|
||||||
unknown
|
unknown
|
||||||
unknown
|
unknown
|
||||||
unknown
|
unknown
|
||||||
|
Loading…
Reference in New Issue
Block a user