ICU-480 fixed test on unknown.

X-SVN-Rev: 2709
This commit is contained in:
Yves Arrouye 2000-10-17 16:31:36 +00:00
parent 4ec1e451f5
commit fb83b2be8e
2 changed files with 58 additions and 56 deletions

107
icu4c/source/configure vendored
View file

@ -2734,14 +2734,15 @@ fi
U_NL_LANGINFO_CODESET=0
U_HAVE_NL_LANGINFO_CODESET=0
U_NL_LANGINFO_CODESET=-1
echo $ac_n "checking for nl_langinfo""... $ac_c" 1>&6
echo "configure:2740: checking for nl_langinfo" >&5
echo "configure:2741: checking for nl_langinfo" >&5
if eval "test \"`echo '$''{'ac_cv_func_nl_langinfo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2745 "configure"
#line 2746 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char nl_langinfo(); below. */
@ -2764,7 +2765,7 @@ nl_langinfo();
; return 0; }
EOF
if { (eval echo configure:2768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_nl_langinfo=yes"
else
@ -2787,21 +2788,21 @@ fi
if test $U_HAVE_NL_LANGINFO -eq 1; then
echo $ac_n "checking for nl_langinfo's argument to obtain the codeset""... $ac_c" 1>&6
echo "configure:2791: checking for nl_langinfo's argument to obtain the codeset" >&5
echo "configure:2792: checking for nl_langinfo's argument to obtain the codeset" >&5
if eval "test \"`echo '$''{'ac_cv_nl_langinfo_codeset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_nl_langinfo_codeset="unknown"
for a in CODESET _NL_CTYPE_CODESET_NAME; do
cat > conftest.$ac_ext <<EOF
#line 2798 "configure"
#line 2799 "configure"
#include "confdefs.h"
#include <langinfo.h>
int main() {
nl_langinfo($a);
; return 0; }
EOF
if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_nl_langinfo_codeset="$a"; break
else
@ -2813,7 +2814,7 @@ rm -f conftest*
fi
echo "$ac_t""$ac_cv_nl_langinfo_codeset" 1>&6
if test x$ac_cv_nl_langinfo_codeset != unknown
if test x$ac_cv_nl_langinfo_codeset != xunknown
then
U_HAVE_NL_LANGINFO_CODESET=1
U_NL_LANGINFO_CODESET=$ac_cv_nl_langinfo_codeset
@ -2822,12 +2823,12 @@ fi
echo $ac_n "checking for tzset""... $ac_c" 1>&6
echo "configure:2826: checking for tzset" >&5
echo "configure:2827: checking for tzset" >&5
if eval "test \"`echo '$''{'ac_cv_func_tzset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2831 "configure"
#line 2832 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char tzset(); below. */
@ -2850,7 +2851,7 @@ tzset();
; return 0; }
EOF
if { (eval echo configure:2854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_tzset=yes"
else
@ -2874,12 +2875,12 @@ then
U_TZSET=tzset
else
echo $ac_n "checking for _tzset""... $ac_c" 1>&6
echo "configure:2878: checking for _tzset" >&5
echo "configure:2879: checking for _tzset" >&5
if eval "test \"`echo '$''{'ac_cv_func__tzset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2883 "configure"
#line 2884 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _tzset(); below. */
@ -2902,7 +2903,7 @@ _tzset();
; return 0; }
EOF
if { (eval echo configure:2906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__tzset=yes"
else
@ -2928,12 +2929,12 @@ fi
fi
echo $ac_n "checking for tzname""... $ac_c" 1>&6
echo "configure:2932: checking for tzname" >&5
echo "configure:2933: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2937 "configure"
#line 2938 "configure"
#include "confdefs.h"
#ifndef __USE_POSIX
#define __USE_POSIX
@ -2946,7 +2947,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@ -2963,12 +2964,12 @@ if test $ac_cv_var_tzname = yes; then
U_TZNAME=tzname
else
echo $ac_n "checking for _tzname""... $ac_c" 1>&6
echo "configure:2967: checking for _tzname" >&5
echo "configure:2968: checking for _tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var__tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2972 "configure"
#line 2973 "configure"
#include "confdefs.h"
#include <time.h>
extern char *_tzname[];
@ -2977,7 +2978,7 @@ int main() {
atoi(*_tzname);
; return 0; }
EOF
if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var__tzname=yes
else
@ -2996,12 +2997,12 @@ echo "$ac_t""$ac_cv_var__tzname" 1>&6
fi
echo $ac_n "checking for timezone""... $ac_c" 1>&6
echo "configure:3000: checking for timezone" >&5
echo "configure:3001: checking for timezone" >&5
if eval "test \"`echo '$''{'ac_cv_var_timezone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3005 "configure"
#line 3006 "configure"
#include "confdefs.h"
#ifndef __USE_POSIX
#define __USE_POSIX
@ -3015,7 +3016,7 @@ int main() {
timezone = 1;
; return 0; }
EOF
if { (eval echo configure:3019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_timezone=yes
else
@ -3032,12 +3033,12 @@ if test $ac_cv_var_timezone = yes; then
U_TIMEZONE=timezone
else
echo $ac_n "checking for __timezone""... $ac_c" 1>&6
echo "configure:3036: checking for __timezone" >&5
echo "configure:3037: checking for __timezone" >&5
if eval "test \"`echo '$''{'ac_cv_var___timezone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3041 "configure"
#line 3042 "configure"
#include "confdefs.h"
#include <time.h>
@ -3045,7 +3046,7 @@ int main() {
__timezone = 1;
; return 0; }
EOF
if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var___timezone=yes
else
@ -3062,12 +3063,12 @@ echo "$ac_t""$ac_cv_var___timezone" 1>&6
U_TIMEZONE=__timezone
else
echo $ac_n "checking for _timezone""... $ac_c" 1>&6
echo "configure:3066: checking for _timezone" >&5
echo "configure:3067: checking for _timezone" >&5
if eval "test \"`echo '$''{'ac_cv_var__timezone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3071 "configure"
#line 3072 "configure"
#include "confdefs.h"
#include <time.h>
@ -3075,7 +3076,7 @@ int main() {
_timezone = 1;
; return 0; }
EOF
if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var__timezone=yes
else
@ -3097,7 +3098,7 @@ fi
ac_default_sizeof_wchar_t=4
echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
echo "configure:3101: checking size of wchar_t" >&5
echo "configure:3102: checking size of wchar_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3105,7 +3106,7 @@ else
ac_cv_sizeof_wchar_t=$ac_default_sizeof_wchar_t
else
cat > conftest.$ac_ext <<EOF
#line 3109 "configure"
#line 3110 "configure"
#include "confdefs.h"
#if STDC_HEADERS
#include <stddef.h>
@ -3122,7 +3123,7 @@ main()
exit(0);
}
EOF
if { (eval echo configure:3126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_wchar_t=`cat conftestval`
else
@ -3145,12 +3146,12 @@ U_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:3149: checking for ANSI C header files" >&5
echo "configure:3150: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3154 "configure"
#line 3155 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -3158,7 +3159,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3175,7 +3176,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3179 "configure"
#line 3180 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -3193,7 +3194,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3197 "configure"
#line 3198 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -3214,7 +3215,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 3218 "configure"
#line 3219 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -3225,7 +3226,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@ -3249,12 +3250,12 @@ EOF
fi
echo $ac_n "checking for int8_t""... $ac_c" 1>&6
echo "configure:3253: checking for int8_t" >&5
echo "configure:3254: checking for int8_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int8_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3258 "configure"
#line 3259 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3282,12 +3283,12 @@ EOF
fi
echo $ac_n "checking for uint8_t""... $ac_c" 1>&6
echo "configure:3286: checking for uint8_t" >&5
echo "configure:3287: checking for uint8_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3291 "configure"
#line 3292 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3315,12 +3316,12 @@ EOF
fi
echo $ac_n "checking for int16_t""... $ac_c" 1>&6
echo "configure:3319: checking for int16_t" >&5
echo "configure:3320: checking for int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3324 "configure"
#line 3325 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3348,12 +3349,12 @@ EOF
fi
echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
echo "configure:3352: checking for uint16_t" >&5
echo "configure:3353: checking for uint16_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3357 "configure"
#line 3358 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3381,12 +3382,12 @@ EOF
fi
echo $ac_n "checking for int32_t""... $ac_c" 1>&6
echo "configure:3385: checking for int32_t" >&5
echo "configure:3386: checking for int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3390 "configure"
#line 3391 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3414,12 +3415,12 @@ EOF
fi
echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
echo "configure:3418: checking for uint32_t" >&5
echo "configure:3419: checking for uint32_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3423 "configure"
#line 3424 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3447,12 +3448,12 @@ EOF
fi
echo $ac_n "checking for bool_t""... $ac_c" 1>&6
echo "configure:3451: checking for bool_t" >&5
echo "configure:3452: checking for bool_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_bool_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3456 "configure"
#line 3457 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS

View file

@ -4,7 +4,7 @@ dnl Copyright (c) 1999-2000, International Business Machines Corporation and
dnl others. All Rights Reserved.
dnl Stephen F. Booth, heavily modified by Yves and others
dnl $Id: configure.in,v 1.82 2000/10/16 18:31:29 yves Exp $
dnl $Id: configure.in,v 1.83 2000/10/17 16:31:36 yves Exp $
dnl Process this file with autoconf to produce a configure script
AC_INIT(common/unicode/utypes.h)
@ -329,7 +329,8 @@ AC_SUBST(U_HAVE_WCHAR_H)
AC_SUBST(U_HAVE_WCSCPY)
dnl Do various POSIX related checks
U_NL_LANGINFO_CODESET=0
U_HAVE_NL_LANGINFO_CODESET=0
U_NL_LANGINFO_CODESET=-1
AC_CHECK_FUNC(nl_langinfo,[U_HAVE_NL_LANGINFO=1],[U_HAVE_NL_LANGINFO=0])
AC_SUBST(U_HAVE_NL_LANGINFO)
if test $U_HAVE_NL_LANGINFO -eq 1; then
@ -339,7 +340,7 @@ if test $U_HAVE_NL_LANGINFO -eq 1; then
for a in CODESET _NL_CTYPE_CODESET_NAME; do
AC_TRY_LINK([#include <langinfo.h>],[nl_langinfo($a);],[ac_cv_nl_langinfo_codeset="$a"; break])]
done)
if test x$ac_cv_nl_langinfo_codeset != unknown
if test x$ac_cv_nl_langinfo_codeset != xunknown
then
U_HAVE_NL_LANGINFO_CODESET=1
U_NL_LANGINFO_CODESET=$ac_cv_nl_langinfo_codeset