mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-20 20:19:32 +00:00
ICU-1211 Better fix for FreeBSD and as/400 on getting the timezone
X-SVN-Rev: 6372
This commit is contained in:
parent
56bb5949d9
commit
7191618976
3 changed files with 51 additions and 40 deletions
|
@ -177,9 +177,12 @@ typedef unsigned short uint16_t;
|
|||
#define U_HAVE_NL_LANGINFO_CODESET @U_HAVE_NL_LANGINFO_CODESET@
|
||||
#define U_NL_LANGINFO_CODESET @U_NL_LANGINFO_CODESET@
|
||||
|
||||
#define U_TZSET @U_TZSET@
|
||||
#define U_TIMEZONE @U_TIMEZONE@
|
||||
#define U_TZNAME @U_TZNAME@
|
||||
#define U_TZSET @U_TZSET@
|
||||
#define U_HAVE_TIMEZONE @U_HAVE_TIMEZONE@
|
||||
#if U_HAVE_TIMEZONE
|
||||
# define U_TIMEZONE @U_TIMEZONE@
|
||||
#endif
|
||||
#define U_TZNAME @U_TZNAME@
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Symbol import-export control */
|
||||
|
|
73
icu4c/source/configure
vendored
73
icu4c/source/configure
vendored
|
@ -3163,17 +3163,18 @@ rm -f conftest*
|
|||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_var_timezone" 1>&6
|
||||
U_TIMEZONE=0
|
||||
U_HAVE_TIMEZONE=0
|
||||
if test $ac_cv_var_timezone = yes; then
|
||||
U_TIMEZONE=timezone
|
||||
U_HAVE_TIMEZONE=1
|
||||
else
|
||||
echo $ac_n "checking for __timezone""... $ac_c" 1>&6
|
||||
echo "configure:3172: checking for __timezone" >&5
|
||||
echo "configure:3173: 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 3177 "configure"
|
||||
#line 3178 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <time.h>
|
||||
|
||||
|
@ -3181,7 +3182,7 @@ int main() {
|
|||
__timezone = 1;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
ac_cv_var___timezone=yes
|
||||
else
|
||||
|
@ -3196,14 +3197,15 @@ fi
|
|||
echo "$ac_t""$ac_cv_var___timezone" 1>&6
|
||||
if test $ac_cv_var___timezone = yes; then
|
||||
U_TIMEZONE=__timezone
|
||||
U_HAVE_TIMEZONE=1
|
||||
else
|
||||
echo $ac_n "checking for _timezone""... $ac_c" 1>&6
|
||||
echo "configure:3202: checking for _timezone" >&5
|
||||
echo "configure:3204: 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 3207 "configure"
|
||||
#line 3209 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <time.h>
|
||||
|
||||
|
@ -3211,7 +3213,7 @@ int main() {
|
|||
_timezone = 1;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
ac_cv_var__timezone=yes
|
||||
else
|
||||
|
@ -3226,14 +3228,16 @@ fi
|
|||
echo "$ac_t""$ac_cv_var__timezone" 1>&6
|
||||
if test $ac_cv_var__timezone = yes; then
|
||||
U_TIMEZONE=_timezone
|
||||
U_HAVE_TIMEZONE=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
ac_default_sizeof_wchar_t=4
|
||||
echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
|
||||
echo "configure:3237: checking size of wchar_t" >&5
|
||||
echo "configure:3241: 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
|
||||
|
@ -3241,7 +3245,7 @@ else
|
|||
ac_cv_sizeof_wchar_t=$ac_default_sizeof_wchar_t
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3245 "configure"
|
||||
#line 3249 "configure"
|
||||
#include "confdefs.h"
|
||||
#if STDC_HEADERS
|
||||
#include <stddef.h>
|
||||
|
@ -3258,7 +3262,7 @@ main()
|
|||
exit(0);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3266: \"$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
|
||||
|
@ -3281,12 +3285,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:3285: checking for ANSI C header files" >&5
|
||||
echo "configure:3289: 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 3290 "configure"
|
||||
#line 3294 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -3294,7 +3298,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:3298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3302: \"$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*
|
||||
|
@ -3311,7 +3315,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 3315 "configure"
|
||||
#line 3319 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -3329,7 +3333,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 3333 "configure"
|
||||
#line 3337 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -3350,7 +3354,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3354 "configure"
|
||||
#line 3358 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -3361,7 +3365,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
|
@ -3385,12 +3389,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for int8_t""... $ac_c" 1>&6
|
||||
echo "configure:3389: checking for int8_t" >&5
|
||||
echo "configure:3393: 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 3394 "configure"
|
||||
#line 3398 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -3418,12 +3422,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for uint8_t""... $ac_c" 1>&6
|
||||
echo "configure:3422: checking for uint8_t" >&5
|
||||
echo "configure:3426: 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 3427 "configure"
|
||||
#line 3431 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -3451,12 +3455,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for int16_t""... $ac_c" 1>&6
|
||||
echo "configure:3455: checking for int16_t" >&5
|
||||
echo "configure:3459: 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 3460 "configure"
|
||||
#line 3464 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -3484,12 +3488,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
|
||||
echo "configure:3488: checking for uint16_t" >&5
|
||||
echo "configure:3492: 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 3493 "configure"
|
||||
#line 3497 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -3517,12 +3521,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for int32_t""... $ac_c" 1>&6
|
||||
echo "configure:3521: checking for int32_t" >&5
|
||||
echo "configure:3525: 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 3526 "configure"
|
||||
#line 3530 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -3550,12 +3554,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
|
||||
echo "configure:3554: checking for uint32_t" >&5
|
||||
echo "configure:3558: 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 3559 "configure"
|
||||
#line 3563 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -3583,12 +3587,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for int64_t""... $ac_c" 1>&6
|
||||
echo "configure:3587: checking for int64_t" >&5
|
||||
echo "configure:3591: checking for int64_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_int64_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3592 "configure"
|
||||
#line 3596 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -3616,12 +3620,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for uint64_t""... $ac_c" 1>&6
|
||||
echo "configure:3620: checking for uint64_t" >&5
|
||||
echo "configure:3624: checking for uint64_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_uint64_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3625 "configure"
|
||||
#line 3629 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -3843,7 +3847,7 @@ esac
|
|||
|
||||
|
||||
echo $ac_n "checking for a library suffix to use""... $ac_c" 1>&6
|
||||
echo "configure:3847: checking for a library suffix to use" >&5
|
||||
echo "configure:3851: checking for a library suffix to use" >&5
|
||||
# Check whether --with-library-suffix or --without-library-suffix was given.
|
||||
if test "${with_library_suffix+set}" = set; then
|
||||
withval="$with_library_suffix"
|
||||
|
@ -4189,6 +4193,7 @@ s%@U_NL_LANGINFO_CODESET@%$U_NL_LANGINFO_CODESET%g
|
|||
s%@U_HAVE_NAMESPACE@%$U_HAVE_NAMESPACE%g
|
||||
s%@U_TZSET@%$U_TZSET%g
|
||||
s%@U_TZNAME@%$U_TZNAME%g
|
||||
s%@U_HAVE_TIMEZONE@%$U_HAVE_TIMEZONE%g
|
||||
s%@U_TIMEZONE@%$U_TIMEZONE%g
|
||||
s%@U_SIZEOF_WCHAR_T@%$U_SIZEOF_WCHAR_T%g
|
||||
s%@HAVE_INT8_T@%$HAVE_INT8_T%g
|
||||
|
|
|
@ -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.126 2001/10/20 00:30:31 schererm Exp $
|
||||
dnl $Id: configure.in,v 1.127 2001/10/22 19:05:28 grhoten-oss Exp $
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script
|
||||
AC_INIT(common/unicode/utypes.h)
|
||||
|
@ -472,10 +472,10 @@ changequote(<<, >>)dnl
|
|||
>>,
|
||||
changequote([, ])dnl
|
||||
[timezone = 1;], ac_cv_var_timezone=yes, ac_cv_var_timezone=no)])
|
||||
dnl Give it a default value
|
||||
U_TIMEZONE=0
|
||||
U_HAVE_TIMEZONE=0
|
||||
if test $ac_cv_var_timezone = yes; then
|
||||
U_TIMEZONE=timezone
|
||||
U_HAVE_TIMEZONE=1
|
||||
else
|
||||
AC_CACHE_CHECK(for __timezone,ac_cv_var___timezone,
|
||||
[AC_TRY_LINK(
|
||||
|
@ -486,6 +486,7 @@ else
|
|||
[__timezone = 1;], ac_cv_var___timezone=yes, ac_cv_var___timezone=no)])
|
||||
if test $ac_cv_var___timezone = yes; then
|
||||
U_TIMEZONE=__timezone
|
||||
U_HAVE_TIMEZONE=1
|
||||
else
|
||||
AC_CACHE_CHECK(for _timezone,ac_cv_var__timezone,
|
||||
[AC_TRY_LINK(
|
||||
|
@ -496,9 +497,11 @@ else
|
|||
[_timezone = 1;], ac_cv_var__timezone=yes, ac_cv_var__timezone=no)])
|
||||
if test $ac_cv_var__timezone = yes; then
|
||||
U_TIMEZONE=_timezone
|
||||
U_HAVE_TIMEZONE=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(U_HAVE_TIMEZONE)
|
||||
AC_SUBST(U_TIMEZONE)
|
||||
|
||||
ac_default_sizeof_wchar_t=4
|
||||
|
|
Loading…
Add table
Reference in a new issue