From: Steven R. Loomis Date: Thu, 29 Sep 2011 19:22:56 +0000 (+0000) Subject: ICU-8732 merge from branch X-Git-Tag: milestone-59-0-1~4467 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4db19f5629e3bf288a255b6c7e2057dff722ad37;p=icu ICU-8732 merge from branch X-SVN-Rev: 30750 --- diff --git a/icu4c/source/common/icucfg.h.in b/icu4c/source/common/icucfg.h.in deleted file mode 100644 index 5e2a6ea562a..00000000000 --- a/icu4c/source/common/icucfg.h.in +++ /dev/null @@ -1,115 +0,0 @@ -/* common/icucfg.h.in. Generated from configure.in by autoheader. */ - -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - -/* Define to 1 if you have the header file. */ -#undef HAVE_DIRENT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the `dlopen' function. */ -#undef HAVE_DLOPEN - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM - -/* Define to 1 if you have the `pthread' library (-lpthread). */ -#undef HAVE_LIBPTHREAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* wchar.h was found. */ -#undef HAVE_WCHAR_H - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* The size of `void *', as computed by sizeof. */ -#undef SIZEOF_VOID_P - -/* The size of `wchar_t', as computed by sizeof. */ -#undef SIZEOF_WCHAR_T - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - -/* Define to `signed short' if does not define. */ -#undef int16_t - -/* Define to `signed long' if does not define. */ -#undef int32_t - -/* Define to `signed long long' if does not define. */ -#undef int64_t - -/* Define to `signed char' if does not define. */ -#undef int8_t - -/* Define to `unsigned short' if does not define. */ -#undef uint16_t - -/* Define to `unsigned long' if does not define. */ -#undef uint32_t - -/* Define to `unsigned long long' if does not define. */ -#undef uint64_t - -/* Define to `unsigned char' if does not define. */ -#undef uint8_t diff --git a/icu4c/source/common/putil.cpp b/icu4c/source/common/putil.cpp index f0b0d46c902..dcb48e21e3c 100644 --- a/icu4c/source/common/putil.cpp +++ b/icu4c/source/common/putil.cpp @@ -131,21 +131,25 @@ * Simple things (presence of functions, etc) should just go in configure.in and be added to * icucfg.h via autoheader. */ -#if defined(U_HAVE_ICUCFG) -# include "icucfg.h" -#elif U_PLATFORM_IMPLEMENTS_POSIX +#if U_PLATFORM_IMPLEMENTS_POSIX # if U_PLATFORM == U_PF_OS400 -# undef HAVE_DLFCN_H 1 -# undef HAVE_DLOPEN 1 +# define HAVE_DLFCN_H 0 +# define HAVE_DLOPEN 0 # else +# ifndef HAVE_DLFCN_H # define HAVE_DLFCN_H 1 +# endif +# ifndef HAVE_DLOPEN # define HAVE_DLOPEN 1 # endif -# define HAVE_GETTIMEOFDAY 1 +# endif +# ifndef HAVE_GETTIMEOFDAY +# define HAVE_GETTIMEOFDAY 1 +# endif #else -# undef HAVE_DLFCN_H -# undef HAVE_DLOPEN -# undef HAVE_GETTIMEOFDAY +# define HAVE_DLFCN_H 0 +# define HAVE_DLOPEN 0 +# define HAVE_GETTIMEOFDAY 0 #endif #define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) @@ -317,7 +321,7 @@ uprv_getRawUTCtime() return (UDate)((winTime.int64 - EPOCH_BIAS) / HECTONANOSECOND_PER_MILLISECOND); #else -#if defined(HAVE_GETTIMEOFDAY) +#if HAVE_GETTIMEOFDAY struct timeval posixTime; gettimeofday(&posixTime, NULL); return (UDate)(((int64_t)posixTime.tv_sec * U_MILLIS_PER_SECOND) + (posixTime.tv_usec/1000)); @@ -2083,11 +2087,9 @@ u_getVersion(UVersionInfo versionArray) { #if U_ENABLE_DYLOAD -#if defined(U_CHECK_DYLOAD) - -#if defined(HAVE_DLOPEN) && !U_PLATFORM_HAS_WIN32_API +#if HAVE_DLOPEN && !U_PLATFORM_HAS_WIN32_API -#ifdef HAVE_DLFCN_H +#if HAVE_DLFCN_H #ifdef __MVS__ #ifndef __SUSV3 @@ -2240,9 +2242,6 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) { return (UVoidFunction*)NULL; } - -#endif - #endif /* U_ENABLE_DYLOAD */ /* diff --git a/icu4c/source/common/unicode/platform.h b/icu4c/source/common/unicode/platform.h index f1bf8b4c07e..e1b815b777b 100644 --- a/icu4c/source/common/unicode/platform.h +++ b/icu4c/source/common/unicode/platform.h @@ -683,17 +683,4 @@ /* @} */ -/*===========================================================================*/ -/* Custom icu entry point renaming */ -/*===========================================================================*/ - -#if U_HAVE_LIB_SUFFIX -# ifndef U_ICU_ENTRY_POINT_RENAME -/* Renaming pattern: u_strcpy_41_suffix */ -# define U_ICU_ENTRY_POINT_RENAME(x) x ## _ ## U_ICU_VERSION_MAJOR_NUM ## U_LIB_SUFFIX_C_NAME -# define U_DEF_ICUDATA_ENTRY_POINT(major) icudt ## U_LIB_SUFFIX_C_NAME ## major ##_dat - -# endif -#endif - #endif diff --git a/icu4c/source/common/unicode/uconfig.h b/icu4c/source/common/unicode/uconfig.h index 177747aadf2..1049cd0c276 100644 --- a/icu4c/source/common/unicode/uconfig.h +++ b/icu4c/source/common/unicode/uconfig.h @@ -192,10 +192,8 @@ */ #ifdef U_HAVE_LIB_SUFFIX /* Use the predefined value. */ -#elif defined(U_LIB_SUFFIX_C_NAME) || defined(U_LIB_SUFFIX_C_NAME_STRING) +#elif defined(U_LIB_SUFFIX_C_NAME) # define U_HAVE_LIB_SUFFIX 1 -#else -# define U_HAVE_LIB_SUFFIX 0 #endif /** @@ -211,17 +209,6 @@ # define U_LIB_SUFFIX_C_NAME_STRING "" #endif -/** - * \def U_LIB_SUFFIX_C_NAME - * Defines the library suffix with C syntax. - * @internal - */ -#ifdef U_LIB_SUFFIX_C_NAME - /* Use the predefined value. */ -#else -# define U_LIB_SUFFIX_C_NAME -#endif - /* common/i18n library switches --------------------------------------------- */ /** diff --git a/icu4c/source/common/unicode/urename.h b/icu4c/source/common/unicode/urename.h index dee402f28fd..7189713689a 100644 --- a/icu4c/source/common/unicode/urename.h +++ b/icu4c/source/common/unicode/urename.h @@ -31,6 +31,10 @@ the platform a chance to define it first. Normally (if utypes.h or umachine.h was included first) this will not be necessary as it will already be defined. */ +#ifndef U_ICU_ENTRY_POINT_RENAME +#include "unicode/uconfig.h" +#endif + #ifndef U_ICU_ENTRY_POINT_RENAME #include "unicode/umachine.h" #endif diff --git a/icu4c/source/common/unicode/utypes.h b/icu4c/source/common/unicode/utypes.h index 0503bbcac94..866b796d6aa 100644 --- a/icu4c/source/common/unicode/utypes.h +++ b/icu4c/source/common/unicode/utypes.h @@ -151,21 +151,26 @@ * \#define U_ICU_ENTRY_POINT icudt19_dat * @stable ICU 2.4 */ -#define U_ICUDATA_ENTRY_POINT U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM) +#define U_ICUDATA_ENTRY_POINT U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM,U_LIB_SUFFIX_C_NAME) #ifndef U_HIDE_INTERNAL_API /** - * Do not use. + * Do not use. Note that it's OK for the 2nd argument to be undefined (literal). * @internal */ -#define U_DEF2_ICUDATA_ENTRY_POINT(major) U_DEF_ICUDATA_ENTRY_POINT(major) +#define U_DEF2_ICUDATA_ENTRY_POINT(major,suff) U_DEF_ICUDATA_ENTRY_POINT(major,suff) + /** * Do not use. * @internal */ #ifndef U_DEF_ICUDATA_ENTRY_POINT /* affected by symbol renaming. See platform.h */ -#define U_DEF_ICUDATA_ENTRY_POINT(major) icudt##major##_dat +#ifndef U_LIB_SUFFIX_C_NAME +#define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##major##_dat +#else +#define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##suff ## major##_dat +#endif #endif #endif /* U_HIDE_INTERNAL_API */ diff --git a/icu4c/source/common/unicode/uvernum.h b/icu4c/source/common/unicode/uvernum.h index bbd570bda1f..58d92a1020e 100644 --- a/icu4c/source/common/unicode/uvernum.h +++ b/icu4c/source/common/unicode/uvernum.h @@ -80,10 +80,19 @@ * This value will change in the subsequent releases of ICU. * If a custom suffix (such as matching library suffixes) is desired, this can be modified. * Note that if present, platform.h may contain an earlier definition of this macro. + * \def U_ICU_ENTRY_POINT_RENAME * @stable ICU 4.2 */ #ifndef U_ICU_ENTRY_POINT_RENAME -#define U_ICU_ENTRY_POINT_RENAME(x) x ## _49 +#ifdef U_HAVE_LIB_SUFFIX +#define U_DEF_ICU_ENTRY_POINT_RENAME(x,y,z) x ## y ## z +#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y,z) U_DEF_ICU_ENTRY_POINT_RENAME(x,y,z) +#define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX,U_LIB_SUFFIX_C_NAME) +#else +#define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y +#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y) +#define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX) +#endif #endif /** The current ICU library version as a dotted-decimal string. The patchlevel diff --git a/icu4c/source/configure b/icu4c/source/configure index 424456b537b..ecf82a3605e 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67. +# Generated by GNU Autoconf 2.68. # # Copyright (c) 1999-2011, International Business Machines Corporation and others. All Rights Reserved. # @@ -91,6 +91,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -216,11 +217,18 @@ IFS=$as_save_IFS # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -596,7 +604,8 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS -U_USING_CYGWIN_MSVC +LIBCXXFLAGS +LIBCFLAGS platform_make_fragment platform_make_fragment_name platform @@ -614,17 +623,8 @@ ICUIO_TRUE EXTRAS_TRUE U_CHECK_UTF16_STRING U_CHECK_GNUC_UTF16_STRING -U_SIZEOF_WCHAR_T U_HAVE_WCSCPY U_HAVE_WCHAR_H -HAVE_UINT64_T -HAVE_INT64_T -HAVE_UINT32_T -HAVE_INT32_T -HAVE_UINT16_T -HAVE_INT16_T -HAVE_UINT8_T -HAVE_INT8_T U_TIMEZONE U_HAVE_TIMEZONE U_TZNAME @@ -632,14 +632,12 @@ U_HAVE_TZNAME U_TZSET U_HAVE_TZSET U_HAVE_POPEN -U_HAVE_GCC_ATOMICS U_HAVE_PLACEMENT_NEW U_OVERRIDE_CXX_ALLOCATION U_HAVE_NAMESPACE U_NL_LANGINFO_CODESET U_HAVE_NL_LANGINFO_CODESET U_IS_BIG_ENDIAN -U_IOSTREAM_SOURCE U_HAVE_DIRENT_H U_HAVE_INTTYPES_H GENCCODE_ASSEMBLY @@ -648,17 +646,12 @@ LIB_THREAD ICU_USE_THREADS THREADS_TRUE U_HAVE_STD_STRING -U_INLINE ENABLE_RPATH -U_CHECK_DYLOAD U_ENABLE_DYLOAD U_ENABLE_TRACING U_DISABLE_RENAMING AR RANLIB -LIBCXXFLAGS -LIBCFLAGS -U_USE_GCC_VISIBILITY_ATTRIBUTE U_DEFAULT_SHOW_DRAFT UCLN_NO_AUTO_CLEANUP ENABLE_STATIC @@ -765,7 +758,6 @@ enable_dyload enable_rpath enable_threads enable_weak_threads -with_iostream enable_extras enable_icuio enable_layout @@ -1190,7 +1182,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1428,7 +1420,6 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-cross-build=dir specify an absolute path to the build directory of an ICU built for the current platform default=no cross dir --with-library-bits=bits specify how many bits to use for the library (32, 64, 64else32, nochange) default=nochange - --with-iostream=version specify the version of iostream to use (none, old, std, auto) default=auto --with-data-packaging=type specify how to package ICU data (files, archive, library, static, auto) default=auto --with-library-suffix=suffix tag a suffix to the library names default= @@ -1511,7 +1502,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1559,7 +1550,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1597,7 +1588,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -1634,7 +1625,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1680,7 +1671,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link @@ -1722,7 +1713,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1900,7 +1891,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -1914,7 +1905,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1932,7 +1923,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1977,7 +1968,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1990,10 +1981,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2056,7 +2047,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2065,7 +2056,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -2077,7 +2068,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2132,7 +2123,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2145,7 +2136,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2186,7 +2177,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF @@ -2194,7 +2185,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2551,8 +2542,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_headers="$ac_config_headers common/icucfg.h" - PACKAGE="icu" @@ -2648,7 +2637,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -2682,7 +2671,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -2715,7 +2704,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then : +if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then @@ -2809,7 +2798,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2849,7 +2838,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2902,7 +2891,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2942,7 +2931,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3001,7 +2990,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3045,7 +3034,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3328,7 +3317,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3379,7 +3368,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3416,7 +3405,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3494,7 +3483,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3605,7 +3594,7 @@ if test -z "$CXX"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -3649,7 +3638,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -3727,7 +3716,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3764,7 +3753,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -3880,7 +3869,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4023,7 +4012,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4150,7 +4139,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_U_MAKE+set}" = set; then : +if ${ac_cv_path_U_MAKE+:} false; then : $as_echo_n "(cached) " >&6 else case $U_MAKE in @@ -4225,7 +4214,7 @@ fi set dummy doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DOXYGEN+set}" = set; then : +if ${ac_cv_path_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $DOXYGEN in @@ -4356,7 +4345,7 @@ $as_echo "$ac_use_strict_options" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4419,7 +4408,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4486,7 +4475,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4652,7 +4641,7 @@ fi # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } -if test "${ac_cv_sizeof_void_p+set}" = set; then : +if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : @@ -5082,7 +5071,7 @@ $as_echo "$BITS_RUN_32" >&6; }; { $as_echo "$as_me:${as_lineno-$LINENO}: checking which Makefile fragment to use for ${host}" >&5 $as_echo_n "checking which Makefile fragment to use for ${host}... " >&6; } -if test "${icu_cv_host_frag+set}" = set; then : +if ${icu_cv_host_frag+:} false; then : $as_echo_n "(cached) " >&6 else @@ -5171,7 +5160,7 @@ $as_echo "$icu_cv_host_frag" >&6; } case "${host}" in *-*-hpux*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5 $as_echo_n "checking for floor in -lm... " >&6; } -if test "${ac_cv_lib_m_floor+set}" = set; then : +if ${ac_cv_lib_m_floor+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5205,14 +5194,14 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5 $as_echo "$ac_cv_lib_m_floor" >&6; } -if test "x$ac_cv_lib_m_floor" = x""yes; then : +if test "x$ac_cv_lib_m_floor" = xyes; then : LIB_M="-lm" fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5 $as_echo_n "checking for floor in -lm... " >&6; } -if test "${ac_cv_lib_m_floor+set}" = set; then : +if ${ac_cv_lib_m_floor+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5246,7 +5235,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5 $as_echo "$ac_cv_lib_m_floor" >&6; } -if test "x$ac_cv_lib_m_floor" = x""yes; then : +if test "x$ac_cv_lib_m_floor" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -5318,24 +5307,13 @@ $as_echo_n "checking whether we can use static library optimization option... " ;; esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO"; then : CHECK_STATIC_OPT_FLAG=yes else CHECK_STATIC_OPT_FLAG=no fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_STATIC_OPT_FLAG" >&5 $as_echo "$CHECK_STATIC_OPT_FLAG" >&6; } if test "$CHECK_STATIC_OPT_FLAG" = no; then @@ -5346,6 +5324,9 @@ $as_echo "$CHECK_STATIC_OPT_FLAG" >&6; } fi fi +# Accumulate #defines +CONFIG_CPPFLAGS="" + # Check whether to enable auto cleanup of libraries { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable auto cleanup of libraries" >&5 $as_echo_n "checking whether to enable auto cleanup of libraries... " >&6; } @@ -5354,7 +5335,10 @@ UCLN_NO_AUTO_CLEANUP=1 # Check whether --enable-auto-cleanup was given. if test "${enable_auto_cleanup+set}" = set; then : enableval=$enable_auto_cleanup; case "${enableval}" in - yes) enabled=yes; UCLN_NO_AUTO_CLEANUP=0 ;; + yes) enabled=yes; + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DUCLN_NO_AUTO_CLEANUP=0"; + UCLN_NO_AUTO_CLEANUP=0 + ;; *) ;; esac fi @@ -5405,7 +5389,9 @@ U_DEFAULT_SHOW_DRAFT=1 # Check whether --enable-draft was given. if test "${enable_draft+set}" = set; then : enableval=$enable_draft; case "${enableval}" in - no) enabled=no; U_DEFAULT_SHOW_DRAFT=0 ;; + no) enabled=no; U_DEFAULT_SHOW_DRAFT=0; + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEFAULT_SHOW_DRAFT=0" + ;; *) ;; esac fi @@ -5414,99 +5400,8 @@ fi $as_echo "$enabled" >&6; } # Make sure that we can use draft API in ICU. if test "$U_DEFAULT_SHOW_DRAFT" = 0; then - CPPFLAGS="$CPPFLAGS -DU_SHOW_DRAFT_API" -fi - - -# Check if we can hide variables from -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library API export" >&5 -$as_echo_n "checking for library API export... " >&6; } -SHAREDLIBEXPORT=no -U_USE_GCC_VISIBILITY_ATTRIBUTE=0 -OLD_CFLAGS="${CFLAGS}" -OLD_CXXFLAGS="${CXXFLAGS}" -if test "$ac_cv_c_compiler_gnu" = yes; then - case "${host}" in - *-pc-cygwin*|*-pc-mingw*|*-*-aix*) - # Cygwin and AIX GCC does not have the visibility attribute - ;; - *) - LIBCFLAGS="-fvisibility=hidden" - LIBCXXFLAGS="-fvisibility=hidden" - CFLAGS="${CFLAGS} ${LIBCFLAGS}" - CXXFLAGS="${CXXFLAGS} ${LIBCXXFLAGS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -__attribute__ ((visibility ("default"))) void f(void); - #include -int -main () -{ -exit(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - SHAREDLIBEXPORT=yes -else - SHAREDLIBEXPORT=no + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_SHOW_DRAFT_API" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$SHAREDLIBEXPORT" = no; then - LIBCFLAGS= - LIBCXXFLAGS= - else - U_USE_GCC_VISIBILITY_ATTRIBUTE=1 - fi - esac -else - case "${host}" in - *-*-solaris*) - LIBCFLAGS="-xldscope=hidden" - LIBCXXFLAGS="-xldscope=hidden" - CFLAGS="${CFLAGS} ${LIBCFLAGS}" - CXXFLAGS="${CXXFLAGS} ${LIBCXXFLAGS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -__global void f(void); -#include -int -main () -{ -exit(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - SHAREDLIBEXPORT=yes -else - SHAREDLIBEXPORT=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$SHAREDLIBEXPORT" = no; then - LIBCFLAGS= - LIBCXXFLAGS= - fi - ;; - *-*-hpux*) - # ICU isn't set up to follow the HP syntax yet. - ;; - *) - esac -fi -# Restore to their original state because the Intel compiler chokes -# on this option when checking for the wchar_t size, but the -# option otherwise works. -CFLAGS="${OLD_CFLAGS}" -CXXFLAGS="${OLD_CXXFLAGS}" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHAREDLIBEXPORT" >&5 -$as_echo "$SHAREDLIBEXPORT" >&6; } - - if test -n "$ac_tool_prefix"; then @@ -5514,7 +5409,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -5554,7 +5449,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -5603,13 +5498,12 @@ fi # look for 'ar' the proper way -#AC_PATH_PROG(AR,ar,[echo archiver ar not found re-run configure ; false],$PATH:/bin:/usr/bin:/usr/ccs/bin) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -5649,7 +5543,7 @@ if test -z "$ac_cv_prog_AR"; then set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -5700,7 +5594,6 @@ if test "x$AR" = "x"; then as_fn_error $? "Archiver ar not found. Set AR= or fix PATH" "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable renaming of symbols" >&5 $as_echo_n "checking whether to enable renaming of symbols... " >&6; } enabled=yes @@ -5709,7 +5602,9 @@ U_DISABLE_RENAMING=0 if test "${enable_renaming+set}" = set; then : enableval=$enable_renaming; case "${enableval}" in yes|"") enabled=yes ;; - no) enabled=no; U_DISABLE_RENAMING=1 ;; + no) enabled=no; U_DISABLE_RENAMING=1; + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_DISABLE_RENAMING=1" + ;; *) ;; esac fi @@ -5725,7 +5620,9 @@ U_ENABLE_TRACING=0 # Check whether --enable-tracing was given. if test "${enable_tracing+set}" = set; then : enableval=$enable_tracing; case "${enableval}" in - yes|"") enabled=yes; U_ENABLE_TRACING=1 ;; + yes|"") enabled=yes; + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_TRACING=1"; + U_ENABLE_TRACING=1 ;; no) enabled=no; U_ENABLE_TRACING=0 ;; *) ;; esac @@ -5737,29 +5634,34 @@ $as_echo "$enabled" >&6; } U_ENABLE_DYLOAD=1 +enable=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable dynamic loading of plugins" >&5 $as_echo_n "checking whether to enable dynamic loading of plugins... " >&6; } -enabled=check # Check whether --enable-dyload was given. if test "${enable_dyload+set}" = set; then : enableval=$enable_dyload; case "${enableval}" in yes|"") U_ENABLE_DYLOAD=1 - enabled=check ;; + enable=yes + ;; no) U_ENABLE_DYLOAD=0; - enabled=disabled ;; + enable=no; + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_DYLOAD=0"; + ;; *) ;; esac fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable" >&5 +$as_echo "$enable" >&6; } -# goes into icucfg.h -for ac_header in dlfcn.h +if test "$enable" = "yes"; then + for ac_header in dlfcn.h do : ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF @@ -5768,12 +5670,10 @@ fi done -U_CHECK_DYLOAD=0 -#AC_MSG_RESULT($enabled) -if test "$enabled" = "check"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 + #AC_MSG_RESULT($enabled) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } -if test "${ac_cv_search_dlopen+set}" = set; then : +if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -5807,11 +5707,11 @@ for ac_lib in '' dl; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_dlopen+set}" = set; then : + if ${ac_cv_search_dlopen+:} false; then : break fi done -if test "${ac_cv_search_dlopen+set}" = set; then : +if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no @@ -5827,10 +5727,10 @@ if test "$ac_res" != no; then : fi - for ac_func in dlopen + for ac_func in dlopen do : ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLOPEN 1 _ACEOF @@ -5838,19 +5738,19 @@ _ACEOF fi done - U_CHECK_DYLOAD=1 -fi + if test "x$ac_cv_func_dlopen" != xyes; then + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DHAVE_DLOPEN=0" + fi +fi # Check for miscellanous functions. -# These only go into common/icucfg.h and are NOT exported with ICU builds. # So, use for putil / tools only. # Note that this will generate HAVE_GETTIMEOFDAY, not U_HAVE_GETTIMEOFDAY -# rerun 'autoheader' to regenerate icucfg.h.in for ac_func in gettimeofday do : ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = x""yes; then : +if test "x$ac_cv_func_gettimeofday" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETTIMEOFDAY 1 _ACEOF @@ -5859,6 +5759,7 @@ fi done + # Check whether to use the evil rpath or not # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : @@ -5875,82 +5776,13 @@ fi -# set up U_INLINE. -# Copy the definition of AC_C_INLINE, with slight mods. -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for definition of U_INLINE for C" >&5 -$as_echo_n "checking for definition of U_INLINE for C... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -return 0;} $ac_kw int foo() { - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } -case "$ac_cv_c_inline" in - yes) U_INLINE= "inline" ;; - no ) U_INLINE= ;; - *) U_INLINE=$ac_cv_c_inline ;; -esac - -# set up U_HAVE_STD_STRING. -# Copy the definition of AC_C_INLINE, with slight mods. -# -U_HAVE_STD_STRING=0 ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have a C++ compiler" >&5 -$as_echo_n "checking if we have a C++ compiler... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - cxx_okay=yes -else - cxx_okay=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $cxx_okay = yes -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: congratulations" >&5 -$as_echo "congratulations" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "C++ compiler $CXX does not work or no compiler found" "$LINENO" 5 -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if #include works" >&5 $as_echo_n "checking if #include works... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5975,6 +5807,9 @@ $as_echo "$ac_cv_header_stdstring" >&6; } if test $ac_cv_header_stdstring = yes then U_HAVE_STD_STRING=1 +else + U_HAVE_STD_STRING=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STD_STRING=0" fi ac_ext=c @@ -6017,7 +5852,7 @@ if test $threads = true; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_init in -lpthread" >&5 $as_echo_n "checking for pthread_attr_init in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_attr_init+set}" = set; then : +if ${ac_cv_lib_pthread_pthread_attr_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -6051,7 +5886,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_attr_init" >&6; } -if test "x$ac_cv_lib_pthread_pthread_attr_init" = x""yes; then : +if test "x$ac_cv_lib_pthread_pthread_attr_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF @@ -6072,7 +5907,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_destroy" >&5 $as_echo_n "checking for library containing pthread_mutex_destroy... " >&6; } -if test "${ac_cv_search_pthread_mutex_destroy+set}" = set; then : +if ${ac_cv_search_pthread_mutex_destroy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS="$LIBS" @@ -6146,7 +5981,7 @@ fi # For HP 11 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then : +if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -6180,7 +6015,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } -if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""yes; then : +if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF @@ -6195,7 +6030,7 @@ fi fi ac_fn_c_check_func "$LINENO" "pthread_mutex_lock" "ac_cv_func_pthread_mutex_lock" -if test "x$ac_cv_func_pthread_mutex_lock" = x""yes; then : +if test "x$ac_cv_func_pthread_mutex_lock" = xyes; then : fi @@ -6256,7 +6091,7 @@ fi HAVE_MMAP=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mmap" >&5 $as_echo_n "checking for mmap... " >&6; } -if test "${ac_cv_func_mmap_ok+set}" = set; then : +if ${ac_cv_func_mmap_ok+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6287,6 +6122,8 @@ $as_echo "$ac_cv_func_mmap_ok" >&6; } if test $ac_cv_func_mmap_ok = yes then HAVE_MMAP=1 +else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_MMAP=0" fi @@ -6331,7 +6168,7 @@ $as_echo "$GENCCODE_ASSEMBLY" >&6; } for ac_header in inttypes.h do : ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" -if test "x$ac_cv_header_inttypes_h" = x""yes; then : +if test "x$ac_cv_header_inttypes_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H 1 _ACEOF @@ -6342,6 +6179,7 @@ done if test $ac_cv_header_inttypes_h = no; then U_HAVE_INTTYPES_H=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0" else U_HAVE_INTTYPES_H=1 fi @@ -6350,6 +6188,7 @@ if test "$CC" = ccc; then $as_echo "\"C compiler set to CCC ${CC}\" " >&6; } case "${host}" in alpha*-*-*) U_HAVE_INTTYPES_H=0; + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0" esac fi @@ -6358,7 +6197,7 @@ fi for ac_header in dirent.h do : ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" -if test "x$ac_cv_header_dirent_h" = x""yes; then : +if test "x$ac_cv_header_dirent_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DIRENT_H 1 _ACEOF @@ -6369,137 +6208,17 @@ done if test $ac_cv_header_dirent_h = no; then U_HAVE_DIRENT_H=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_DIRENT_H=0" else U_HAVE_DIRENT_H=1 fi - - -# Check whether --with-iostream was given. -if test "${with_iostream+set}" = set; then : - withval=$with_iostream; case "${withval}" in - none) streams=none ;; - old) streams=198506 ;; - std) streams=199711 ;; - auto) streams= ;; - *) as_fn_error $? "bad value ${withval} for --with-iostream" "$LINENO" 5 ;; - esac -else - streams= -fi - - -U_IOSTREAM_SOURCE=0 -if test x$streams != xnone -then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - OLD_CXXFLAGS="${CXXFLAGS}" - case "${icu_cv_host_frag}" in - mh-hpux-acc) - CXXFLAGS="${CXXFLAGS} -AA" - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iostream usability" >&5 -$as_echo_n "checking for iostream usability... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_header_iostream=yes -else - ac_cv_header_iostream=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $icu_cv_host_frag = mh-cygwin-msvc - then - # is always there on Windows. - # We do this to prevent the C++ preprocessor from being used because - # autoconf can't deal with the Windows C++ preprocessor - ac_cv_header_iostream=yes - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_iostream" >&5 -$as_echo "$ac_cv_header_iostream" >&6; } - if test $ac_cv_header_iostream = yes - then - U_IOSTREAM_SOURCE=199711 - else - CXXFLAGS="${OLD_CXXFLAGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ostream in iostream.h is really defined" >&5 -$as_echo_n "checking whether ostream in iostream.h is really defined... " >&6; } - if test "${ac_cv_iostream_ok+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -ostream &testout = cout; testout << "test" << endl; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_iostream_ok=yes -else - ac_cv_iostream_ok=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_iostream_ok" >&5 -$as_echo "$ac_cv_iostream_ok" >&6; } - if test $ac_cv_iostream_ok = yes - then - U_IOSTREAM_SOURCE=198506 - fi - fi - if test x$streams != x - then - if test $U_IOSTREAM_SOURCE -ge $streams - then - U_IOSTREAM_SOURCE=$streams - case "${icu_cv_host_frag}" in - mh-hpux-acc) - if test $U_IOSTREAM_SOURCE -lt 199711; then - CXXFLAGS=${OLD_CXXFLAGS} - fi - ;; - esac - else - as_fn_error $? "${withval} iostream is not available" "$LINENO" 5 - fi - fi -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # Check for endianness { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -6734,7 +6453,7 @@ fi U_HAVE_NL_LANGINFO_CODESET=0 U_NL_LANGINFO_CODESET=-1 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" -if test "x$ac_cv_func_nl_langinfo" = x""yes; then : +if test "x$ac_cv_func_nl_langinfo" = xyes; then : U_HAVE_NL_LANGINFO=1 else U_HAVE_NL_LANGINFO=0 @@ -6743,7 +6462,7 @@ fi if test $U_HAVE_NL_LANGINFO -eq 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo's argument to obtain the codeset" >&5 $as_echo_n "checking for nl_langinfo's argument to obtain the codeset... " >&6; } -if test "${ac_cv_nl_langinfo_codeset+set}" = set; then : +if ${ac_cv_nl_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_nl_langinfo_codeset="unknown" @@ -6772,6 +6491,12 @@ $as_echo "$ac_cv_nl_langinfo_codeset" >&6; } then U_HAVE_NL_LANGINFO_CODESET=1 U_NL_LANGINFO_CODESET=$ac_cv_nl_langinfo_codeset + if test "x${ac_cv_nl_langinfo_codeset}" != "xCODESET" + then + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DNL_LANGINFO_CODESET=${ac_cv_nl_langinfo_codeset}" + fi + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_NL_LANGINFO_CODESET=0" fi fi @@ -6786,7 +6511,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for namespace support" >&5 $as_echo_n "checking for namespace support... " >&6; } -if test "${ac_cv_namespace_ok+set}" = set; then : +if ${ac_cv_namespace_ok+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6817,6 +6542,7 @@ $as_echo "$ac_cv_namespace_ok" >&6; } U_HAVE_NAMESPACE=1 if test $ac_cv_namespace_ok = no then + as_fn_error $? "Namespace support is required to build ICU." "$LINENO" 5 U_HAVE_NAMESPACE=0 fi @@ -6825,7 +6551,7 @@ fi $as_echo_n "checking for properly overriding new and delete... " >&6; } U_OVERRIDE_CXX_ALLOCATION=0 U_HAVE_PLACEMENT_NEW=0 -if test "${ac_cv_override_cxx_allocation_ok+set}" = set; then : +if ${ac_cv_override_cxx_allocation_ok+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6863,7 +6589,7 @@ then U_OVERRIDE_CXX_ALLOCATION=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for placement new and delete" >&5 $as_echo_n "checking for placement new and delete... " >&6; } - if test "${ac_cv_override_placement_new_ok+set}" = set; then : + if ${ac_cv_override_placement_new_ok+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6901,49 +6627,13 @@ $as_echo "$ac_cv_override_placement_new_ok" >&6; } if test $ac_cv_override_placement_new_ok = yes then U_HAVE_PLACEMENT_NEW=1 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_PLACEMENT_NEW=0" fi -fi - - - -# gcc atomic built-in functions check -# AC_TRY_LINK([], [int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);],, -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc atomic functions" >&5 -$as_echo_n "checking for gcc atomic functions... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - void *p; - int i; - -int -main () -{ - - __sync_fetch_and_add(&i, 1); - __sync_fetch_and_sub(&i, 1); - __sync_val_compare_and_swap(&p, 0, 0); - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - U_HAVE_GCC_ATOMICS=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } else - U_HAVE_GCC_ATOMICS=0; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_OVERRIDE_CXX_ALLOCATION=0" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + ac_ext=c @@ -6953,7 +6643,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_fn_c_check_func "$LINENO" "popen" "ac_cv_func_popen" -if test "x$ac_cv_func_popen" = x""yes; then : +if test "x$ac_cv_func_popen" = xyes; then : fi @@ -6961,12 +6651,13 @@ if test x$ac_cv_func_popen = xyes then U_HAVE_POPEN=1 else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_POPEN=0" U_HAVE_POPEN=0 fi ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" -if test "x$ac_cv_func_tzset" = x""yes; then : +if test "x$ac_cv_func_tzset" = xyes; then : fi @@ -6977,7 +6668,7 @@ then U_HAVE_TZSET=1 else ac_fn_c_check_func "$LINENO" "_tzset" "ac_cv_func__tzset" -if test "x$ac_cv_func__tzset" = x""yes; then : +if test "x$ac_cv_func__tzset" = xyes; then : fi @@ -6985,6 +6676,8 @@ fi then U_TZSET=_tzset U_HAVE_TZSET=1 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0" fi fi @@ -6993,7 +6686,7 @@ fi U_HAVE_TZNAME=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } -if test "${ac_cv_var_tzname+set}" = set; then : +if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7030,7 +6723,7 @@ if test $ac_cv_var_tzname = yes; then else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _tzname" >&5 $as_echo_n "checking for _tzname... " >&6; } -if test "${ac_cv_var__tzname+set}" = set; then : +if ${ac_cv_var__tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7059,6 +6752,8 @@ $as_echo "$ac_cv_var__tzname" >&6; } if test $ac_cv_var__tzname = yes; then U_TZNAME=_tzname U_HAVE_TZNAME=1 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZNAME=0" fi fi @@ -7066,7 +6761,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timezone" >&5 $as_echo_n "checking for timezone... " >&6; } -if test "${ac_cv_var_timezone+set}" = set; then : +if ${ac_cv_var_timezone+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7104,7 +6799,7 @@ if test $ac_cv_var_timezone = yes; then else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __timezone" >&5 $as_echo_n "checking for __timezone... " >&6; } -if test "${ac_cv_var___timezone+set}" = set; then : +if ${ac_cv_var___timezone+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7134,7 +6829,7 @@ $as_echo "$ac_cv_var___timezone" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _timezone" >&5 $as_echo_n "checking for _timezone... " >&6; } -if test "${ac_cv_var__timezone+set}" = set; then : +if ${ac_cv_var__timezone+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7161,6 +6856,8 @@ $as_echo "$ac_cv_var__timezone" >&6; } if test $ac_cv_var__timezone = yes; then U_TIMEZONE=_timezone U_HAVE_TIMEZONE=1 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TIMEZONE=0" fi fi fi @@ -7169,7 +6866,7 @@ fi # Checks for typedefs ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default" -if test "x$ac_cv_type_int8_t" = x""yes; then : +if test "x$ac_cv_type_int8_t" = xyes; then : else @@ -7180,7 +6877,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default" -if test "x$ac_cv_type_uint8_t" = x""yes; then : +if test "x$ac_cv_type_uint8_t" = xyes; then : else @@ -7191,7 +6888,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default" -if test "x$ac_cv_type_int16_t" = x""yes; then : +if test "x$ac_cv_type_int16_t" = xyes; then : else @@ -7202,7 +6899,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default" -if test "x$ac_cv_type_uint16_t" = x""yes; then : +if test "x$ac_cv_type_uint16_t" = xyes; then : else @@ -7213,7 +6910,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default" -if test "x$ac_cv_type_int32_t" = x""yes; then : +if test "x$ac_cv_type_int32_t" = xyes; then : else @@ -7224,7 +6921,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default" -if test "x$ac_cv_type_uint32_t" = x""yes; then : +if test "x$ac_cv_type_uint32_t" = xyes; then : else @@ -7235,7 +6932,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" -if test "x$ac_cv_type_int64_t" = x""yes; then : +if test "x$ac_cv_type_int64_t" = xyes; then : else @@ -7246,7 +6943,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" -if test "x$ac_cv_type_uint64_t" = x""yes; then : +if test "x$ac_cv_type_uint64_t" = xyes; then : else @@ -7258,64 +6955,40 @@ fi if test $ac_cv_type_int8_t = no; then -HAVE_INT8_T=0 -else -HAVE_INT8_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT8_T=0" fi - if test $ac_cv_type_uint8_t = no; then -HAVE_UINT8_T=0 -else -HAVE_UINT8_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT8_T=0" fi - if test $ac_cv_type_int16_t = no; then -HAVE_INT16_T=0 -else -HAVE_INT16_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT16_T=0" fi - if test $ac_cv_type_uint16_t = no; then -HAVE_UINT16_T=0 -else -HAVE_UINT16_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT16_T=0" fi - if test $ac_cv_type_int32_t = no; then -HAVE_INT32_T=0 -else -HAVE_INT32_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT32_T=0" fi - if test $ac_cv_type_uint32_t = no; then -HAVE_UINT32_T=0 -else -HAVE_UINT32_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT32_T=0" fi - if test $ac_cv_type_int64_t = no; then -HAVE_INT64_T=0 -else -HAVE_INT64_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT64_T=0" fi - if test $ac_cv_type_uint64_t = no; then -HAVE_UINT64_T=0 -else -HAVE_UINT64_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT64_T=0" fi - # Do various wchar_t related checks ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" -if test "x$ac_cv_header_wchar_h" = x""yes; then : +if test "x$ac_cv_header_wchar_h" = xyes; then : fi @@ -7324,6 +6997,7 @@ if test "$ac_cv_header_wchar_h" = no then U_HAVE_WCHAR_H=0 U_HAVE_WCSCPY=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCHAR_H=0 -DU_HAVE_WCSCPY=0" else $as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h @@ -7332,7 +7006,7 @@ $as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h # Some broken systems have wchar.h but not some of its functions... { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing wcscpy" >&5 $as_echo_n "checking for library containing wcscpy... " >&6; } -if test "${ac_cv_search_wcscpy+set}" = set; then : +if ${ac_cv_search_wcscpy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -7366,11 +7040,11 @@ for ac_lib in '' wcs w; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_wcscpy+set}" = set; then : + if ${ac_cv_search_wcscpy+:} false; then : break fi done -if test "${ac_cv_search_wcscpy+set}" = set; then : +if ${ac_cv_search_wcscpy+:} false; then : else ac_cv_search_wcscpy=no @@ -7390,6 +7064,7 @@ fi U_HAVE_WCSCPY=1 else U_HAVE_WCSCPY=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCSCPY=0" fi fi @@ -7401,7 +7076,7 @@ fi # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 $as_echo_n "checking size of wchar_t... " >&6; } -if test "${ac_cv_sizeof_wchar_t+set}" = set; then : +if ${ac_cv_sizeof_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" " @@ -7445,7 +7120,6 @@ if test $U_SIZEOF_WCHAR_T = 0; then fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UTF-16 string literal support" >&5 $as_echo_n "checking for UTF-16 string literal support... " >&6; } U_CHECK_UTF16_STRING=1 @@ -7517,7 +7191,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Since we can't ensure ICU users use -xustr=ascii_utf16_ushort, # we only use this macro within ICU. # If an ICU user uses icu-config, this feature will be enabled. - CPPFLAGS="${CPPFLAGS} -DU_CHECK_UTF16_STRING=1" + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_CHECK_UTF16_STRING=1" U_CHECK_UTF16_STRING=0 fi fi @@ -7737,6 +7411,7 @@ if test "$ICULIBSUFFIX" != "" then U_HAVE_LIB_SUFFIX=1 ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/^A-Za-z0-9_/_/g'` + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} " else U_HAVE_LIB_SUFFIX=0 fi @@ -7816,18 +7491,11 @@ platform_make_fragment='$(top_srcdir)/config/'"$platform_make_fragment_name" -U_USING_CYGWIN_MSVC=0 -if test "${icu_cv_host_frag}" = "mh-cygwin-msvc"; then -U_USING_CYGWIN_MSVC=1 -fi - - if test "${FORCE_LIBS}" != ""; then echo " *** Overriding automatically chosen LIBS=$LIBS, using instead FORCE_LIBS=${FORCE_LIBS}" 1>&6 LIBS=${FORCE_LIBS} fi - # Now that we're done using CPPFLAGS etc. for tests, we can change it # for build. @@ -7836,8 +7504,21 @@ then CPPFLAGS="$CPPFLAGS \$(THREADSCPPFLAGS)" CFLAGS="$CFLAGS \$(THREADSCFLAGS)" CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS)" +else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DICU_USE_THREADS=0" fi + + + +# append all config cppflags +CPPFLAGS="$CPPFLAGS $CONFIG_CPPFLAGS" + +echo "CPPFLAGS=$CPPFLAGS" +echo "CFLAGS=$CFLAGS" +echo "CXXFLAGS=$CXXFLAGS" + + # output the Makefiles ac_config_files="$ac_config_files icudefs.mk Makefile data/pkgdataMakefile config/Makefile.inc config/icu.pc config/pkgdataMakefile data/Makefile stubdata/Makefile common/Makefile i18n/Makefile layout/Makefile layoutex/Makefile io/Makefile extra/Makefile extra/uconv/Makefile extra/uconv/pkgdataMakefile extra/scrptrun/Makefile tools/Makefile tools/ctestfw/Makefile tools/toolutil/Makefile tools/makeconv/Makefile tools/genrb/Makefile tools/genccode/Makefile tools/gencmn/Makefile tools/gencnval/Makefile tools/genctd/Makefile tools/gentest/Makefile tools/gennorm2/Makefile tools/genbrk/Makefile tools/gensprep/Makefile tools/icuinfo/Makefile tools/icupkg/Makefile tools/icuswap/Makefile tools/pkgdata/Makefile tools/tzcode/Makefile tools/gencfu/Makefile test/Makefile test/compat/Makefile test/testdata/Makefile test/testdata/pkgdataMakefile test/hdrtst/Makefile test/intltest/Makefile test/cintltst/Makefile test/iotest/Makefile test/letest/Makefile test/perf/Makefile test/perf/collationperf/Makefile test/perf/dicttrieperf/Makefile test/perf/ubrkperf/Makefile test/perf/charperf/Makefile test/perf/convperf/Makefile test/perf/normperf/Makefile test/perf/DateFmtPerf/Makefile test/perf/strsrchperf/Makefile test/perf/unisetperf/Makefile test/perf/usetperf/Makefile test/perf/ustrperf/Makefile test/perf/utfperf/Makefile test/perf/utrie2perf/Makefile samples/Makefile samples/date/Makefile samples/cal/Makefile samples/layout/Makefile" @@ -7905,10 +7586,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -7920,7 +7612,43 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -DEFS=-DHAVE_CONFIG_H +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + ac_libobjs= ac_ltlibobjs= @@ -7941,7 +7669,7 @@ LTLIBOBJS=$ac_ltlibobjs -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -8042,6 +7770,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8349,7 +8078,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -8366,15 +8095,11 @@ case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" -config_headers="$ac_config_headers" _ACEOF @@ -8395,15 +8120,10 @@ Usage: $0 [OPTION]... [TAG]... --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE Configuration files: $config_files -Configuration headers: -$config_headers - Report bugs to the package provider." _ACEOF @@ -8411,7 +8131,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.67, +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. @@ -8465,18 +8185,7 @@ do esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) + --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) @@ -8532,7 +8241,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in - "common/icucfg.h") CONFIG_HEADERS="$CONFIG_HEADERS common/icucfg.h" ;; "icudefs.mk") CONFIG_FILES="$CONFIG_FILES icudefs.mk" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "data/pkgdataMakefile") CONFIG_FILES="$CONFIG_FILES data/pkgdataMakefile" ;; @@ -8608,7 +8316,6 @@ done # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -8619,9 +8326,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -8629,12 +8337,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -8656,7 +8365,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -8684,7 +8393,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -8732,7 +8441,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -8764,7 +8473,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -8794,116 +8503,8 @@ fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +eval set X " :F $CONFIG_FILES " shift for ac_tag do @@ -8931,7 +8532,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -8966,7 +8567,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ + *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; @@ -9097,48 +8698,26 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi - ;; + esac diff --git a/icu4c/source/configure.in b/icu4c/source/configure.in index 47ee4fa2e31..51c80b5427a 100644 --- a/icu4c/source/configure.in +++ b/icu4c/source/configure.in @@ -4,7 +4,7 @@ AC_COPYRIGHT([ Copyright (c) 1999-2011, International Business Machines Corporat # Stephen F. Booth, heavily modified by Yves and others # Check for autoconf version -AC_PREREQ(2.67) +AC_PREREQ(2.68) # Process this file with autoconf to produce a configure script AC_INIT([ICU]) @@ -18,7 +18,6 @@ AC_INIT([ICU]) AC_CONFIG_SRCDIR([common/unicode/utypes.h]) -AC_CONFIG_HEADERS(common/icucfg.h) PACKAGE="icu" AC_SUBST(PACKAGE) @@ -282,7 +281,7 @@ if test "$ENABLE_STATIC" = "YES"; then ;; esac - AC_LINK_IFELSE(AC_LANG_PROGRAM, CHECK_STATIC_OPT_FLAG=yes, CHECK_STATIC_OPT_FLAG=no, ) + AC_LINK_IFELSE(AC_LANG_SOURCE, CHECK_STATIC_OPT_FLAG=yes, CHECK_STATIC_OPT_FLAG=no, ) AC_MSG_RESULT($CHECK_STATIC_OPT_FLAG) if test "$CHECK_STATIC_OPT_FLAG" = no; then CPPFLAGS="${OLD_CPPFLAGS}" @@ -292,6 +291,9 @@ if test "$ENABLE_STATIC" = "YES"; then fi fi +# Accumulate #defines +CONFIG_CPPFLAGS="" + # Check whether to enable auto cleanup of libraries AC_MSG_CHECKING([whether to enable auto cleanup of libraries]) enabled=no @@ -299,7 +301,10 @@ UCLN_NO_AUTO_CLEANUP=1 AC_ARG_ENABLE(auto-cleanup, [ --enable-auto-cleanup enable auto cleanup of libraries [default=no]], [ case "${enableval}" in - yes) enabled=yes; UCLN_NO_AUTO_CLEANUP=0 ;; + yes) enabled=yes; + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DUCLN_NO_AUTO_CLEANUP=0"; + UCLN_NO_AUTO_CLEANUP=0 + ;; *) ;; esac], ) @@ -331,82 +336,27 @@ U_DEFAULT_SHOW_DRAFT=1 AC_ARG_ENABLE(draft, [ --enable-draft enable draft APIs (and internal APIs) [default=yes]], [ case "${enableval}" in - no) enabled=no; U_DEFAULT_SHOW_DRAFT=0 ;; + no) enabled=no; U_DEFAULT_SHOW_DRAFT=0; + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEFAULT_SHOW_DRAFT=0" + ;; *) ;; esac], ) AC_MSG_RESULT($enabled) # Make sure that we can use draft API in ICU. if test "$U_DEFAULT_SHOW_DRAFT" = 0; then - CPPFLAGS="$CPPFLAGS -DU_SHOW_DRAFT_API" + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_SHOW_DRAFT_API" fi AC_SUBST(U_DEFAULT_SHOW_DRAFT) -# Check if we can hide variables from -AC_MSG_CHECKING([for library API export]) -SHAREDLIBEXPORT=no -U_USE_GCC_VISIBILITY_ATTRIBUTE=0 -OLD_CFLAGS="${CFLAGS}" -OLD_CXXFLAGS="${CXXFLAGS}" -if test "$ac_cv_c_compiler_gnu" = yes; then - case "${host}" in - *-pc-cygwin*|*-pc-mingw*|*-*-aix*) - # Cygwin and AIX GCC does not have the visibility attribute - ;; - *) - LIBCFLAGS="-fvisibility=hidden" - LIBCXXFLAGS="-fvisibility=hidden" - CFLAGS="${CFLAGS} ${LIBCFLAGS}" - CXXFLAGS="${CXXFLAGS} ${LIBCXXFLAGS}" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((visibility ("default"))) void f(void); - #include ]], [[exit(0);]])],[SHAREDLIBEXPORT=yes],[SHAREDLIBEXPORT=no]) - if test "$SHAREDLIBEXPORT" = no; then - LIBCFLAGS= - LIBCXXFLAGS= - else - U_USE_GCC_VISIBILITY_ATTRIBUTE=1 - fi - esac -else - case "${host}" in - *-*-solaris*) - LIBCFLAGS="-xldscope=hidden" - LIBCXXFLAGS="-xldscope=hidden" - CFLAGS="${CFLAGS} ${LIBCFLAGS}" - CXXFLAGS="${CXXFLAGS} ${LIBCXXFLAGS}" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[__global void f(void); -#include ]], [[exit(0);]])],[SHAREDLIBEXPORT=yes],[SHAREDLIBEXPORT=no]) - if test "$SHAREDLIBEXPORT" = no; then - LIBCFLAGS= - LIBCXXFLAGS= - fi - ;; - *-*-hpux*) - # ICU isn't set up to follow the HP syntax yet. - ;; - *) - esac -fi -# Restore to their original state because the Intel compiler chokes -# on this option when checking for the wchar_t size, but the -# option otherwise works. -CFLAGS="${OLD_CFLAGS}" -CXXFLAGS="${OLD_CXXFLAGS}" -AC_MSG_RESULT($SHAREDLIBEXPORT) -AC_SUBST(U_USE_GCC_VISIBILITY_ATTRIBUTE) -AC_SUBST(LIBCFLAGS) -AC_SUBST(LIBCXXFLAGS) - AC_PROG_RANLIB # look for 'ar' the proper way -#AC_PATH_PROG(AR,ar,[echo archiver ar not found re-run configure ; false],$PATH:/bin:/usr/bin:/usr/ccs/bin) AC_CHECK_TOOL(AR, ar) if test "x$AR" = "x"; then AC_MSG_ERROR(Archiver ar not found. Set AR= or fix PATH) fi - AC_MSG_CHECKING([whether to enable renaming of symbols]) enabled=yes U_DISABLE_RENAMING=0 @@ -414,7 +364,9 @@ AC_ARG_ENABLE(renaming, [ --enable-renaming add a version suffix to symbols [default=yes]], [ case "${enableval}" in yes|"") enabled=yes ;; - no) enabled=no; U_DISABLE_RENAMING=1 ;; + no) enabled=no; U_DISABLE_RENAMING=1; + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_DISABLE_RENAMING=1" + ;; *) ;; esac], ) @@ -427,7 +379,9 @@ U_ENABLE_TRACING=0 AC_ARG_ENABLE(tracing, [ --enable-tracing enable function and data tracing [default=no]], [ case "${enableval}" in - yes|"") enabled=yes; U_ENABLE_TRACING=1 ;; + yes|"") enabled=yes; + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_TRACING=1"; + U_ENABLE_TRACING=1 ;; no) enabled=no; U_ENABLE_TRACING=0 ;; *) ;; esac], @@ -437,40 +391,43 @@ AC_SUBST(U_ENABLE_TRACING) U_ENABLE_DYLOAD=1 +enable=yes AC_MSG_CHECKING([whether to enable dynamic loading of plugins]) -enabled=check AC_ARG_ENABLE(dyload, [ --disable-dyload disable dynamic loading [default=no]], [ case "${enableval}" in yes|"") U_ENABLE_DYLOAD=1 - enabled=check ;; + enable=yes + ;; no) U_ENABLE_DYLOAD=0; - enabled=disabled ;; + enable=no; + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_DYLOAD=0"; + ;; *) ;; esac], ) +AC_MSG_RESULT($enable) AC_SUBST(U_ENABLE_DYLOAD) -# goes into icucfg.h -AC_CHECK_HEADERS([dlfcn.h]) -U_CHECK_DYLOAD=0 -#AC_MSG_RESULT($enabled) -if test "$enabled" = "check"; then - AC_SEARCH_LIBS([dlopen], [dl]) - AC_CHECK_FUNCS([dlopen]) - U_CHECK_DYLOAD=1 +if test "$enable" = "yes"; then + AC_CHECK_HEADERS([dlfcn.h]) + #AC_MSG_RESULT($enabled) + AC_SEARCH_LIBS([dlopen], [dl]) + AC_CHECK_FUNCS([dlopen]) + + if test "x$ac_cv_func_dlopen" != xyes; then + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DHAVE_DLOPEN=0" + fi fi -AC_SUBST(U_CHECK_DYLOAD) # Check for miscellanous functions. -# These only go into common/icucfg.h and are NOT exported with ICU builds. # So, use for putil / tools only. # Note that this will generate HAVE_GETTIMEOFDAY, not U_HAVE_GETTIMEOFDAY -# rerun 'autoheader' to regenerate icucfg.h.in AC_CHECK_FUNCS([gettimeofday]) + # Check whether to use the evil rpath or not AC_ARG_ENABLE(rpath, [ --enable-rpath use rpath when linking [default is only if necessary]], @@ -484,43 +441,17 @@ AC_ARG_ENABLE(rpath, AC_SUBST(ENABLE_RPATH) -# set up U_INLINE. -# Copy the definition of AC_C_INLINE, with slight mods. -# -AC_CACHE_CHECK([for definition of U_INLINE for C], ac_cv_c_inline, -[ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;} $ac_kw int foo() {]])],[ac_cv_c_inline=$ac_kw; break],[]) - done - ]) -case "$ac_cv_c_inline" in - yes) U_INLINE= "inline" ;; - no ) U_INLINE= ;; - *) U_INLINE=$ac_cv_c_inline ;; -esac -AC_SUBST(U_INLINE) -# set up U_HAVE_STD_STRING. -# Copy the definition of AC_C_INLINE, with slight mods. -# -U_HAVE_STD_STRING=0 AC_LANG_PUSH([C++]) -AC_MSG_CHECKING([[if we have a C++ compiler]]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx_okay=yes],[cxx_okay=no]) -if test $cxx_okay = yes -then - AC_MSG_RESULT([[congratulations]]) -else - AC_MSG_RESULT([[no]]) - AC_MSG_ERROR([[C++ compiler $CXX does not work or no compiler found]]) -fi - AC_MSG_CHECKING([[if #include works]]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [ac_cv_header_stdstring=yes], [ac_cv_header_stdstring=no]) AC_MSG_RESULT($ac_cv_header_stdstring) if test $ac_cv_header_stdstring = yes then U_HAVE_STD_STRING=1 +else + U_HAVE_STD_STRING=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STD_STRING=0" fi AC_SUBST(U_HAVE_STD_STRING) AC_LANG_POP([C++]) @@ -634,6 +565,8 @@ AC_MSG_RESULT($ac_cv_func_mmap_ok) if test $ac_cv_func_mmap_ok = yes then HAVE_MMAP=1 +else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_MMAP=0" fi AC_SUBST(HAVE_MMAP) @@ -676,6 +609,7 @@ AC_MSG_RESULT($GENCCODE_ASSEMBLY) AC_CHECK_HEADERS(inttypes.h) if test $ac_cv_header_inttypes_h = no; then U_HAVE_INTTYPES_H=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0" else U_HAVE_INTTYPES_H=1 fi @@ -683,6 +617,7 @@ if test "$CC" = ccc; then AC_MSG_RESULT("C compiler set to CCC ${CC}" ) case "${host}" in alpha*-*-*) U_HAVE_INTTYPES_H=0; + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0" esac fi @@ -690,79 +625,14 @@ AC_SUBST(U_HAVE_INTTYPES_H) AC_CHECK_HEADERS(dirent.h) if test $ac_cv_header_dirent_h = no; then - U_HAVE_DIRENT_H=0 + U_HAVE_DIRENT_H=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_DIRENT_H=0" else U_HAVE_DIRENT_H=1 fi AC_SUBST(U_HAVE_DIRENT_H) - -AC_ARG_WITH(iostream, - [ --with-iostream=version specify the version of iostream to use (none, old, std, auto) [default=auto]], - [case "${withval}" in - none) streams=none ;; - old) streams=198506 ;; - std) streams=199711 ;; - auto) streams= ;; - *) AC_MSG_ERROR(bad value ${withval} for --with-iostream) ;; - esac], - [streams=]) - -U_IOSTREAM_SOURCE=0 -if test x$streams != xnone -then - AC_LANG_PUSH(C++) - OLD_CXXFLAGS="${CXXFLAGS}" - case "${icu_cv_host_frag}" in - mh-hpux-acc) - CXXFLAGS="${CXXFLAGS} -AA" - ;; - esac - AC_MSG_CHECKING([for iostream usability]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])],[ac_cv_header_iostream=yes],[ac_cv_header_iostream=no]) - if test $icu_cv_host_frag = mh-cygwin-msvc - then - # is always there on Windows. - # We do this to prevent the C++ preprocessor from being used because - # autoconf can't deal with the Windows C++ preprocessor - ac_cv_header_iostream=yes - fi - AC_MSG_RESULT($ac_cv_header_iostream) - if test $ac_cv_header_iostream = yes - then - U_IOSTREAM_SOURCE=199711 - else - CXXFLAGS="${OLD_CXXFLAGS}" - AC_MSG_CHECKING([whether ostream in iostream.h is really defined]) - AC_CACHE_VAL(ac_cv_iostream_ok, - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ostream &testout = cout; testout << "test" << endl;]])],[ac_cv_iostream_ok=yes],[ac_cv_iostream_ok=no])) - AC_MSG_RESULT($ac_cv_iostream_ok) - if test $ac_cv_iostream_ok = yes - then - U_IOSTREAM_SOURCE=198506 - fi - fi - if test x$streams != x - then - if test $U_IOSTREAM_SOURCE -ge $streams - then - U_IOSTREAM_SOURCE=$streams - case "${icu_cv_host_frag}" in - mh-hpux-acc) - if test $U_IOSTREAM_SOURCE -lt 199711; then - CXXFLAGS=${OLD_CXXFLAGS} - fi - ;; - esac - else - AC_MSG_ERROR(${withval} iostream is not available) - fi - fi -fi -AC_SUBST(U_IOSTREAM_SOURCE) -AC_LANG_POP - # Check for endianness AC_C_BIGENDIAN() if test $ac_cv_c_bigendian = no; then @@ -790,6 +660,12 @@ if test $U_HAVE_NL_LANGINFO -eq 1; then then U_HAVE_NL_LANGINFO_CODESET=1 U_NL_LANGINFO_CODESET=$ac_cv_nl_langinfo_codeset + if test "x${ac_cv_nl_langinfo_codeset}" != "xCODESET" + then + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DNL_LANGINFO_CODESET=${ac_cv_nl_langinfo_codeset}" + fi + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_NL_LANGINFO_CODESET=0" fi fi AC_SUBST(U_HAVE_NL_LANGINFO_CODESET) @@ -807,6 +683,7 @@ AC_MSG_RESULT($ac_cv_namespace_ok) U_HAVE_NAMESPACE=1 if test $ac_cv_namespace_ok = no then + AC_MSG_ERROR(Namespace support is required to build ICU.) U_HAVE_NAMESPACE=0 fi AC_SUBST(U_HAVE_NAMESPACE) @@ -845,36 +722,22 @@ then if test $ac_cv_override_placement_new_ok = yes then U_HAVE_PLACEMENT_NEW=1 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_PLACEMENT_NEW=0" fi +else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_OVERRIDE_CXX_ALLOCATION=0" fi AC_SUBST(U_OVERRIDE_CXX_ALLOCATION) AC_SUBST(U_HAVE_PLACEMENT_NEW) -# gcc atomic built-in functions check -# AC_TRY_LINK([], [int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);],, -AC_LANG(C) -AC_MSG_CHECKING([for gcc atomic functions]) -AC_LINK_IFELSE([AC_LANG_PROGRAM( - [[ - void *p; - int i; - ]], - [[ - __sync_fetch_and_add(&i, 1); - __sync_fetch_and_sub(&i, 1); - __sync_val_compare_and_swap(&p, 0, 0); - ]] -)], -[U_HAVE_GCC_ATOMICS=1; AC_MSG_RESULT([yes])], -[U_HAVE_GCC_ATOMICS=0; AC_MSG_RESULT([no])]) -AC_SUBST(U_HAVE_GCC_ATOMICS) - AC_LANG(C) AC_CHECK_FUNC(popen) if test x$ac_cv_func_popen = xyes then U_HAVE_POPEN=1 else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_POPEN=0" U_HAVE_POPEN=0 fi AC_SUBST(U_HAVE_POPEN) @@ -891,6 +754,8 @@ else then U_TZSET=_tzset U_HAVE_TZSET=1 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0" fi fi AC_SUBST(U_HAVE_TZSET) @@ -917,6 +782,8 @@ else if test $ac_cv_var__tzname = yes; then U_TZNAME=_tzname U_HAVE_TZNAME=1 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZNAME=0" fi fi AC_SUBST(U_HAVE_TZNAME) @@ -947,6 +814,8 @@ else if test $ac_cv_var__timezone = yes; then U_TIMEZONE=_timezone U_HAVE_TIMEZONE=1 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TIMEZONE=0" fi fi fi @@ -964,60 +833,36 @@ AC_CHECK_TYPE(int64_t,signed long long) AC_CHECK_TYPE(uint64_t,unsigned long long) if test $ac_cv_type_int8_t = no; then -HAVE_INT8_T=0 -else -HAVE_INT8_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT8_T=0" fi -AC_SUBST(HAVE_INT8_T) if test $ac_cv_type_uint8_t = no; then -HAVE_UINT8_T=0 -else -HAVE_UINT8_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT8_T=0" fi -AC_SUBST(HAVE_UINT8_T) if test $ac_cv_type_int16_t = no; then -HAVE_INT16_T=0 -else -HAVE_INT16_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT16_T=0" fi -AC_SUBST(HAVE_INT16_T) if test $ac_cv_type_uint16_t = no; then -HAVE_UINT16_T=0 -else -HAVE_UINT16_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT16_T=0" fi -AC_SUBST(HAVE_UINT16_T) if test $ac_cv_type_int32_t = no; then -HAVE_INT32_T=0 -else -HAVE_INT32_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT32_T=0" fi -AC_SUBST(HAVE_INT32_T) if test $ac_cv_type_uint32_t = no; then -HAVE_UINT32_T=0 -else -HAVE_UINT32_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT32_T=0" fi -AC_SUBST(HAVE_UINT32_T) if test $ac_cv_type_int64_t = no; then -HAVE_INT64_T=0 -else -HAVE_INT64_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT64_T=0" fi -AC_SUBST(HAVE_INT64_T) if test $ac_cv_type_uint64_t = no; then -HAVE_UINT64_T=0 -else -HAVE_UINT64_T=1 +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT64_T=0" fi -AC_SUBST(HAVE_UINT64_T) # Do various wchar_t related checks AC_CHECK_HEADER(wchar.h) @@ -1025,6 +870,7 @@ if test "$ac_cv_header_wchar_h" = no then U_HAVE_WCHAR_H=0 U_HAVE_WCSCPY=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCHAR_H=0 -DU_HAVE_WCSCPY=0" else AC_DEFINE([HAVE_WCHAR_H], [1], [wchar.h was found.]) U_HAVE_WCHAR_H=1 @@ -1034,6 +880,7 @@ else U_HAVE_WCSCPY=1 else U_HAVE_WCSCPY=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCSCPY=0" fi fi AC_SUBST(U_HAVE_WCHAR_H) @@ -1055,7 +902,6 @@ if test $U_SIZEOF_WCHAR_T = 0; then AC_MSG_ERROR(There is wchar.h but the size of wchar_t is 0) fi fi -AC_SUBST(U_SIZEOF_WCHAR_T) AC_MSG_CHECKING([for UTF-16 string literal support]) U_CHECK_UTF16_STRING=1 @@ -1095,7 +941,7 @@ case "${host}" in # Since we can't ensure ICU users use -xustr=ascii_utf16_ushort, # we only use this macro within ICU. # If an ICU user uses icu-config, this feature will be enabled. - CPPFLAGS="${CPPFLAGS} -DU_CHECK_UTF16_STRING=1" + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_CHECK_UTF16_STRING=1" U_CHECK_UTF16_STRING=0 fi fi @@ -1269,6 +1115,7 @@ if test "$ICULIBSUFFIX" != "" then U_HAVE_LIB_SUFFIX=1 ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/[^A-Za-z0-9_]/_/g'` + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} " else U_HAVE_LIB_SUFFIX=0 fi @@ -1335,18 +1182,11 @@ platform_make_fragment='$(top_srcdir)/config/'"$platform_make_fragment_name" AC_SUBST(platform_make_fragment_name) AC_SUBST(platform_make_fragment) -U_USING_CYGWIN_MSVC=0 -if test "${icu_cv_host_frag}" = "mh-cygwin-msvc"; then -U_USING_CYGWIN_MSVC=1 -fi -AC_SUBST(U_USING_CYGWIN_MSVC) - if test "${FORCE_LIBS}" != ""; then echo " *** Overriding automatically chosen [LIBS=$LIBS], using instead [FORCE_LIBS=${FORCE_LIBS}]" 1>&6 LIBS=${FORCE_LIBS} fi - # Now that we're done using CPPFLAGS etc. for tests, we can change it # for build. @@ -1355,8 +1195,21 @@ then CPPFLAGS="$CPPFLAGS \$(THREADSCPPFLAGS)" CFLAGS="$CFLAGS \$(THREADSCFLAGS)" CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS)" +else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DICU_USE_THREADS=0" fi +AC_SUBST(LIBCFLAGS) +AC_SUBST(LIBCXXFLAGS) + +# append all config cppflags +CPPFLAGS="$CPPFLAGS $CONFIG_CPPFLAGS" + +echo "CPPFLAGS=$CPPFLAGS" +echo "CFLAGS=$CFLAGS" +echo "CXXFLAGS=$CXXFLAGS" + + # output the Makefiles AC_CONFIG_FILES([icudefs.mk \ Makefile \