X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..f59164e3d128c7675a4d3934206346a3384e53a5:/icuSources/configure diff --git a/icuSources/configure b/icuSources/configure index 89fddbe2..b4052837 100755 --- a/icuSources/configure +++ b/icuSources/configure @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67. +# Generated by GNU Autoconf 2.69 for ICU 57.1. # -# Copyright (c) 1999-2010, International Business Machines Corporation and others. All Rights Reserved. +# Report bugs to . # +# Copyright (c) 1999-2015, International Business Machines Corporation and others. All Rights Reserved. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -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 @@ -135,6 +136,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # 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 +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+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -168,7 +194,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -213,14 +240,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # 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. - 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+"$@"} + export CONFIG_SHELL + # 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 +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+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -230,7 +268,8 @@ fi $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: http://icu-project.org/bugs about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." @@ -322,6 +361,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -443,6 +490,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -477,16 +528,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -498,28 +549,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -549,12 +580,12 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= +PACKAGE_NAME='ICU' +PACKAGE_TARNAME='International Components for Unicode' +PACKAGE_VERSION='57.1' +PACKAGE_STRING='ICU 57.1' +PACKAGE_BUGREPORT='http://icu-project.org/bugs' +PACKAGE_URL='http://icu-project.org' ac_unique_file="common/unicode/utypes.h" # Factoring default headers for most tests. @@ -593,13 +624,20 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='LTLIBOBJS +ac_subst_vars='UCONFIG_CXXFLAGS +UCONFIG_CFLAGS +UCONFIG_CPPFLAGS +LTLIBOBJS LIBOBJS +LIBCXXFLAGS +LIBCFLAGS platform_make_fragment platform_make_fragment_name platform ICUDATA_CHAR +U_HAVE_SAMPLES SAMPLES_TRUE +U_HAVE_TESTS TESTS_TRUE ICULIBSUFFIXCNAME U_HAVE_LIB_SUFFIX @@ -607,22 +645,18 @@ ICULIBSUFFIX DATA_PACKAGING_MODE thepkgicudatadir pkgicudatadir +U_HAVE_TOOLS +TOOLS_TRUE +U_HAVE_LAYOUTEX +LAYOUTEX_TRUE +U_HAVE_LAYOUT LAYOUT_TRUE +U_HAVE_ICUIO ICUIO_TRUE +U_HAVE_EXTRAS 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 @@ -630,33 +664,26 @@ 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 HAVE_MMAP LIB_THREAD -ICU_USE_THREADS -THREADS_TRUE +U_HAVE_ATOMIC U_HAVE_STD_STRING -U_INLINE ENABLE_RPATH -U_CHECK_DYLOAD U_ENABLE_DYLOAD +U_HAVE_PLUGINS +PLUGINS_TRUE 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 @@ -674,6 +701,11 @@ INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM CPP +ICULEHB_LIBS +ICULEHB_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG ac_ct_CXX CXXFLAGS CXX @@ -686,10 +718,6 @@ CC ENABLE_RELEASE ENABLE_DEBUG CPPFLAGS -target_os -target_vendor -target_cpu -target host_os host_vendor host_cpu @@ -759,14 +787,15 @@ enable_auto_cleanup enable_draft enable_renaming enable_tracing +enable_plugins enable_dyload enable_rpath -enable_threads enable_weak_threads -with_iostream enable_extras enable_icuio enable_layout +enable_layoutex +enable_tools with_data_packaging with_library_suffix enable_tests @@ -783,6 +812,11 @@ CPPFLAGS CXX CXXFLAGS CCC +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +ICULEHB_CFLAGS +ICULEHB_LIBS CPP' @@ -824,7 +858,7 @@ sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' @@ -1188,7 +1222,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 @@ -1239,8 +1273,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1326,7 +1358,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. +\`configure' configures ICU 57.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1374,7 +1406,8 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --docdir=DIR documentation root [DATAROOTDIR/doc/International + Components for Unicode] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1386,19 +1419,20 @@ _ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then - + case $ac_init_help in + short | recursive ) echo "Configuration of ICU 57.1:";; + esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-debug build debug libraries default=no + --enable-debug build debug libraries and enable the U_DEBUG define default=no --enable-release build release libraries default=yes --enable-strict compile with strict compiler options default=yes --enable-64bit-libs (deprecated, use --with-library-bits) build 64-bit libraries default= platform default @@ -1408,13 +1442,17 @@ Optional Features: --enable-draft enable draft APIs (and internal APIs) default=yes --enable-renaming add a version suffix to symbols default=yes --enable-tracing enable function and data tracing default=no + --enable-plugins enable plugins default=no --disable-dyload disable dynamic loading default=no --enable-rpath use rpath when linking default is only if necessary - --enable-threads build ICU with thread safety default=yes --enable-weak-threads weakly reference the threading library default=no --enable-extras build ICU extras default=yes --enable-icuio build ICU's icuio library default=yes - --enable-layout build ICU's layout library default=yes + --enable-layout build ICU's DEPRECATED layout library default=yes + --enable-layoutex build ICU's Paragraph Layout library default=same-as-layout. + If not building with the ICU Layout library, then icu-le-hb must be installed via pkg-config. + See http://harfbuzz.org + --enable-tools build ICU's tools default=yes --enable-tests build ICU tests default=yes --enable-samples build ICU samples default=yes @@ -1426,8 +1464,13 @@ 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-data-packaging specify how to package ICU data. Possible values: + files raw files (.res, etc) + archive build a single icudtXX.dat file + library shared library (.dll/.so/etc.) + static static library (.a/.lib/etc.) + auto build shared if possible (default) + See http://userguide.icu-project.org/icudata for more info. --with-library-suffix=suffix tag a suffix to the library names default= Some influential environment variables: @@ -1440,12 +1483,22 @@ Some influential environment variables: you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + ICULEHB_CFLAGS + C compiler flags for ICULEHB, overriding pkg-config + ICULEHB_LIBS + linker flags for ICULEHB, overriding pkg-config CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to the package provider. +Report bugs to . +ICU home page: . _ACEOF ac_status=$? fi @@ -1508,14 +1561,14 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -configure -generated by GNU Autoconf 2.67 +ICU configure 57.1 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. - Copyright (c) 1999-2010, International Business Machines Corporation and others. All Rights Reserved. + Copyright (c) 1999-2015, International Business Machines Corporation and others. All Rights Reserved. _ACEOF exit fi @@ -1557,7 +1610,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 @@ -1595,7 +1648,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 @@ -1632,7 +1685,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 @@ -1664,7 +1717,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1678,7 +1731,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 @@ -1720,7 +1773,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 @@ -1742,7 +1795,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1758,7 +1812,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1784,7 +1839,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1800,7 +1856,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1834,7 +1891,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1898,7 +1956,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 @@ -1912,7 +1970,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 @@ -1930,7 +1988,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 @@ -1961,7 +2019,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1975,7 +2033,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 @@ -1988,10 +2046,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 @@ -2050,11 +2108,15 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------------ ## +## Report this to http://icu-project.org/bugs ## +## ------------------------------------------ ##" + ) | sed "s/^/$as_me: WARNING: /" >&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" @@ -2063,7 +2125,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 @@ -2075,7 +2137,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 @@ -2130,7 +2192,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 @@ -2143,7 +2205,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" @@ -2184,15 +2246,15 @@ 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 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 +It was created by ICU $as_me 57.1, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2541,7 +2603,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_headers="$ac_config_headers common/icucfg.h" + PACKAGE="icu" @@ -2576,23 +2638,23 @@ getuversion() { } VERSION=`geticuversion $srcdir/common/unicode/uvernum.h` if test x"$VERSION" = x; then - VERSION=`geticuversion $srcdir/common/unicode/*.h` - if test x"$VERSION" = x; then - as_fn_error $? "Cannot determine ICU version number from uvernum.h header file" "$LINENO" 5 - fi + as_fn_error $? "Cannot determine ICU version number from uvernum.h header file" "$LINENO" 5 fi +#TODO: IcuBug:8502 +#if test "$VERSION" != "$PACKAGE_VERSION"; then +# AC_MSG_ERROR([configure was generated for $PACKAGE_VERSION but uvernum.h has $VERSION - please rerun autoconf]) +#fi + UNICODE_VERSION=`getuversion $srcdir/common/unicode/uchar.h` if test x"$UNICODE_VERSION" = x; then - UNICODE_VERSION=`getuversion $srcdir/common/unicode/*.h` - if test x"$UNICODE_VERSION" = x; then - as_fn_error $? "Cannot determine Unicode version number from uchar.h header file" "$LINENO" 5 - fi + as_fn_error $? "Cannot determine Unicode version number from uchar.h header file" "$LINENO" 5 fi # Compute a reasonable library version from the release version. This is # very bad, but that's wanted... We want to make sure that the LIB_VERSION # has at least a dot in it, so we'll add a .0 if needed. -LIB_VERSION=`echo $VERSION | sed -e 's/\.//' -e 's/^\([^.]*\)$/\1.0/'` +#[LIB_VERSION=`echo $VERSION | sed -e 's/\.//' -e 's/^\([^.]*\)$/\1.0/'`] +LIB_VERSION=$VERSION LIB_VERSION_MAJOR=`echo $LIB_VERSION | sed 's/\..*//'` @@ -2638,7 +2700,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 @@ -2672,7 +2734,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 @@ -2703,46 +2765,6 @@ IFS=$ac_save_IFS 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 : - $as_echo_n "(cached) " >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - @@ -2750,6 +2772,21 @@ test -n "$target_alias" && _CXX_CXXSUFFIX=cpp export _CXX_CXXSUFFIX +# Accumulate #defines + +# CONFIG_CPPFLAGS: These are defines that are set for ICU Build time only. +# They are only needed for building ICU itself. Example: platform stuff +CONFIG_CPPFLAGS="" +# UCONFIG_CPPFLAGS: These are defines which are set for ICU build time, +# and also a notice is output that they need to be set +# for end-users of ICU also. uconfig.h.prepend is generated +# with, for example, "#define U_DISABLE_RENAMING 1" +# Example: ICU configuration stuff +UCONFIG_CPPFLAGS="" +# UCONFIG_CFLAGS: contains a copy of anything that needs to be set by end users +# such as -std +UCONFIG_CFLAGS="" + # Check whether to build debug libraries { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build debug libraries" >&5 $as_echo_n "checking whether to build debug libraries... " >&6; } @@ -2758,7 +2795,7 @@ ENABLE_DEBUG=0 # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; case "${enableval}" in - yes|"") enabled=yes; ENABLE_DEBUG=1 ;; + yes|"") enabled=yes; ENABLE_DEBUG=1; CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEBUG=1" ;; *) ;; esac fi @@ -2788,210 +2825,20 @@ $as_echo "$enabled" >&6; } : ${CFLAGS=""} : ${CXXFLAGS=""} -# Checks for programs +# Checks for compilers 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 if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -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 : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -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 : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -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 : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -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 : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in clang gcc cc c99 c89 xlc_r xlc cl.exe icc do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 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 @@ -3003,7 +2850,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3029,13 +2876,13 @@ fi fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in clang gcc cc c99 c89 xlc_r xlc cl.exe icc do # Extract the first word of "$ac_prog", so it can be a program name with args. 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 @@ -3047,7 +2894,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3084,8 +2931,6 @@ esac fi fi -fi - test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -3318,7 +3163,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 @@ -3369,7 +3214,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 @@ -3406,7 +3251,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 @@ -3484,7 +3329,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 @@ -3493,8 +3338,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3579,6 +3423,8 @@ 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 +# Make sure that we try clang++ first, which provides C++11 support. +# The g++ compiler is less likely to support C++11. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3589,13 +3435,13 @@ if test -z "$CXX"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RCC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 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 @@ -3607,7 +3453,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3633,13 +3479,13 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RCC do # Extract the first word of "$ac_prog", so it can be a program name with args. 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 @@ -3651,7 +3497,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3717,7 +3563,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 @@ -3754,7 +3600,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 @@ -3837,57 +3683,250 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option -# The release mode use is the default one for autoconf -if test "$GCC" = yes; then - if test "$CFLAGS" = ""; then - if test "$ENABLE_DEBUG" = 1; then - CFLAGS=-g - fi - if test "$ENABLE_RELEASE" = 1; then - CFLAGS="$CFLAGS -O2" - fi - fi - if test "$CXXFLAGS" = ""; then - if test "$ENABLE_DEBUG" = 1; then - CXXFLAGS=-g - fi - if test "$ENABLE_RELEASE" = 1; then - CXXFLAGS="$CXXFLAGS -O2" - fi - fi -fi +# pkg-config is needed for harfbuzz support -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 how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -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 test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.20 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICULEHB" >&5 +$as_echo_n "checking for ICULEHB... " >&6; } + +if test -n "$ICULEHB_CFLAGS"; then + pkg_cv_ICULEHB_CFLAGS="$ICULEHB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-le-hb\""; } >&5 + ($PKG_CONFIG --exists --print-errors "icu-le-hb") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ICULEHB_CFLAGS=`$PKG_CONFIG --cflags "icu-le-hb" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$ICULEHB_LIBS"; then + pkg_cv_ICULEHB_LIBS="$ICULEHB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-le-hb\""; } >&5 + ($PKG_CONFIG --exists --print-errors "icu-le-hb") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ICULEHB_LIBS=`$PKG_CONFIG --libs "icu-le-hb" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + ICULEHB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-le-hb" 2>&1` + else + ICULEHB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-le-hb" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$ICULEHB_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + ICULEHB_CFLAGS=$pkg_cv_ICULEHB_CFLAGS + ICULEHB_LIBS=$pkg_cv_ICULEHB_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_icu_le_hb=true +fi + +# Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option +# The release mode use is the default one for autoconf +if test "$GCC" = yes; then + if test "$CFLAGS" = ""; then + if test "$ENABLE_DEBUG" = 1; then + CFLAGS=-g + fi + if test "$ENABLE_RELEASE" = 1; then + CFLAGS="$CFLAGS -O2" + fi + fi + if test "$CXXFLAGS" = ""; then + if test "$ENABLE_DEBUG" = 1; then + CXXFLAGS=-g + fi + if test "$ENABLE_RELEASE" = 1; then + CXXFLAGS="$CXXFLAGS -O2" + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ # include #else # include @@ -4013,7 +4052,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 @@ -4033,7 +4072,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -4140,7 +4179,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 @@ -4154,7 +4193,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_U_MAKE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4215,7 +4254,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 @@ -4230,7 +4269,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4303,34 +4342,38 @@ $as_echo "$ac_use_strict_options" >&6; } then if test "$GCC" = yes then - CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long" case "${host}" in - *-*-solaris*) - CFLAGS="$CFLAGS -D__STDC__=0";; + *) + # Do not use -ansi. It limits us to C90, and it breaks some platforms. + # We use -std=c99 to disable the gnu99 defaults and its associated warnings + CFLAGS="$CFLAGS -std=c99" + ;; esac + + CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" else case "${host}" in *-*-cygwin) if test "`$CC /help 2>&1 | head -c9`" = "Microsoft" then CFLAGS="$CFLAGS /W4" - fi + fi ;; + *-*-mingw*) + CFLAGS="$CFLAGS -W4" ;; esac fi if test "$GXX" = yes then - CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" - case "${host}" in - *-*-solaris*) - CXXFLAGS="$CXXFLAGS -D__STDC__=0";; - esac + CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" else case "${host}" in *-*-cygwin) if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft" then CXXFLAGS="$CXXFLAGS /W4" - fi + fi ;; + *-*-mingw*) + CFLAGS="$CFLAGS -W4" ;; esac fi fi @@ -4341,7 +4384,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 @@ -4355,7 +4398,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4404,7 +4447,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 @@ -4421,7 +4464,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4471,7 +4514,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 @@ -4637,7 +4680,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 : @@ -4777,20 +4820,26 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # 1. try -m64 CFLAGS="${CFLAGS} -m64" CXXFLAGS="${CXXFLAGS} -m64" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then : + CAN_BUILD_64=unknown +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void) {return (sizeof(void*)*8==64)?0:1;} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_run "$LINENO"; then : CAN_BUILD_64=yes else CAN_BUILD_64=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + if test "$CAN_BUILD_64" != yes; then # Nope. back out changes. CFLAGS="${CFLAGS_OLD}" - CXXFLAGS="${CFLAGS_OLD}" + CXXFLAGS="${CXXFLAGS_OLD}" # 2. try xarch=v9 [deprecated] ## TODO: cross compile: the following won't work. SPARCV9=`isainfo -n 2>&1 | grep sparcv9` @@ -4808,22 +4857,29 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # 1. try -m64 CFLAGS="${CFLAGS} -m64" CXXFLAGS="${CXXFLAGS} -m64" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then : + CAN_BUILD_64=unknown +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void) {return (sizeof(void*)*8==64)?0:1;} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_run "$LINENO"; then : CAN_BUILD_64=yes else CAN_BUILD_64=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + if test "$CAN_BUILD_64" != yes; then # Nope. back out changes. CFLAGS="${CFLAGS_OLD}" CXXFLAGS="${CXXFLAGS_OLD}" # 2. try the older compiler option ## TODO: cross compile problem + AMD64=`isainfo -n 2>&1 | grep amd64` SOL64=`$CXX -xtarget=generic64 2>&1 && $CC -xtarget=generic64 2>&1 | grep -v usage:` if test -z "$SOL64" && test -n "$AMD64"; then CFLAGS="${CFLAGS} -xtarget=generic64" @@ -5054,7 +5110,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 @@ -5078,13 +5134,25 @@ powerpc*-*-linux*) icu_cv_host_frag=mh-linux-va fi ;; *-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) icu_cv_host_frag=mh-linux ;; -*-*-cygwin|*-*-mingw32) +i[34567]86-*-cygwin) + if test "$GCC" = yes; then + icu_cv_host_frag=mh-cygwin + else + icu_cv_host_frag=mh-cygwin-msvc + fi ;; +x86_64-*-cygwin) + if test "$GCC" = yes; then + icu_cv_host_frag=mh-cygwin64 + else + icu_cv_host_frag=mh-cygwin-msvc + fi ;; +*-*-mingw*) if test "$GCC" = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifndef __MINGW32__ -#error This is not MinGW +#ifndef __MINGW64__ +#error This is not MinGW64 #endif int main () @@ -5095,13 +5163,16 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - icu_cv_host_frag=mh-mingw + icu_cv_host_frag=mh-mingw64 else - icu_cv_host_frag=mh-cygwin + icu_cv_host_frag=mh-mingw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - icu_cv_host_frag=mh-cygwin-msvc + case "${host}" in + *-*-mingw*) icu_cv_host_frag=mh-msys-msvc ;; + *-*-cygwin) icu_cv_host_frag=mh-cygwin-msvc ;; + esac fi ;; *-*-*bsd*|*-*-dragonfly*) icu_cv_host_frag=mh-bsd-gcc ;; *-*-aix*) @@ -5143,7 +5214,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 @@ -5177,14 +5248,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 @@ -5218,7 +5289,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 @@ -5268,6 +5339,57 @@ fi $as_echo "$enabled" >&6; } +# When building release static library, there might be some optimization flags we can use +if test "$ENABLE_STATIC" = "YES"; then + if test "$ENABLE_SHARED" != "YES"; then + if test "$ENABLE_RELEASE" = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use static library optimization option" >&5 +$as_echo_n "checking whether we can use static library optimization option... " >&6; } + CHECK_STATIC_OPT_FLAG=no + + OLD_CPPFLAGS="${CPPFLAGS}" + OLD_LDFLAGS="${LDFLAGS}" + + case "${host}" in + *-linux*|i*86-*-*bsd*|i*86-pc-gnu) + if test "$GCC" = yes; then + CPPFLAGS="${CPPFLAGS} -ffunction-sections -fdata-sections" + LDFLAGS="${LDFLAGS} -Wl,--gc-sections" + fi + ;; + *) + ;; + esac + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 + { $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 + CPPFLAGS="${OLD_CPPFLAGS}" + LDFLAGS="${OLD_LDFLAGS}" + fi + fi + fi +fi + + # 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; } @@ -5276,7 +5398,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 @@ -5289,7 +5414,7 @@ $as_echo "$enabled" >&6; } MSVC_RELEASE_FLAG="" if test $enabled = yes then - if test $icu_cv_host_frag = mh-cygwin-msvc + if test $icu_cv_host_frag = mh-cygwin-msvc -o $icu_cv_host_frag = mh-msys-msvc then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5327,7 +5452,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 @@ -5336,93 +5463,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 - 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 -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 -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 + 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= - 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 @@ -5430,7 +5472,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 @@ -5442,7 +5484,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5470,7 +5512,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 @@ -5482,7 +5524,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5519,13 +5561,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 @@ -5537,7 +5578,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5565,7 +5606,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 @@ -5577,7 +5618,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5598,7 +5639,7 @@ $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then - AR="" + AR="false" else case $cross_compiling:$ac_tool_warned in yes:) @@ -5612,10 +5653,6 @@ else AR="$ac_cv_prog_AR" fi -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; } @@ -5625,7 +5662,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; + UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_DISABLE_RENAMING=1" + ;; *) ;; esac fi @@ -5641,7 +5680,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 @@ -5651,31 +5692,79 @@ fi $as_echo "$enabled" >&6; } +# check if elf.h is present. +for ac_header in elf.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default" +if test "x$ac_cv_header_elf_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ELF_H 1 +_ACEOF + +fi + +done + +if test "x$ac_cv_header_elf_h" = "xyes"; then + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_ELF_H=1"; +fi + +# Enable/disable plugins +# Check whether --enable-plugins was given. +if test "${enable_plugins+set}" = set; then : + enableval=$enable_plugins; case "${enableval}" in + yes) plugins=true ;; + no) plugins=false ;; + *) as_fn_error $? "bad value ${enableval} for --enable-plugins" "$LINENO" 5 ;; + esac +else + plugins=false +fi + + + +if test "$plugins" = true; then + PLUGINS_TRUE= + U_HAVE_PLUGINS=1 +else + PLUGINS_TRUE='#' + U_HAVE_PLUGINS=0 +fi + +if test "x$plugins" = "xtrue"; then + UCONFIG_CPPFLAGS="$UCONFIG_CPPFLAGS -DUCONFIG_ENABLE_PLUGINS=1" +fi + U_ENABLE_DYLOAD=1 -{ $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 +enable=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable dynamic loading of plugins. Ignored if plugins disabled." >&5 +$as_echo_n "checking whether to enable dynamic loading of plugins. Ignored if plugins disabled.... " >&6; } # 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 @@ -5684,12 +5773,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 @@ -5723,11 +5810,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 @@ -5743,10 +5830,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 @@ -5754,19 +5841,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 @@ -5775,6 +5862,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 : @@ -5791,47 +5879,7 @@ 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' @@ -5859,14 +5907,51 @@ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Good" >&5 +$as_echo "Good" >&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 +if [ "$GXX" = yes ]; then + # if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++0x, + # and check that the compiler still works. + if ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1; then + OLD_CXXFLAGS="${CXXFLAGS}" + CXXFLAGS="$CXXFLAGS --std=c++0x" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have a C++11 compiler" >&5 +$as_echo_n "checking if we have a C++11 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 : + cxx11_okay=yes +else + cxx11_okay=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cxx11_okay" >&5 +$as_echo "$cxx11_okay" >&6; } + if [ $cxx11_okay = yes ]; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Adding CXXFLAGS option --std=c++0x" >&5 +$as_echo "$as_me: Adding CXXFLAGS option --std=c++0x" >&6;} + UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} --std=c++0x" + else + CXXFLAGS="$OLD_CXXFLAGS" + fi + fi +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 @@ -5891,49 +5976,63 @@ $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 -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 -threads=true +{ $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 +/* end confdefs.h. */ +#include +int +main () +{ -# Enable/disable threads -# Check whether --enable-threads was given. -if test "${enable_threads+set}" = set; then : - enableval=$enable_threads; case "${enableval}" in - yes) threads=true ;; - no) threads=false ;; - *) as_fn_error $? "bad value ${enableval} for --enable-threads" "$LINENO" 5 ;; - esac + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_header_atomic=yes else - threads=true + ac_cv_header_atomic=no fi - - -if test "$threads" = true; then - THREADS_TRUE= +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_atomic" >&5 +$as_echo "$ac_cv_header_atomic" >&6; } +if test $ac_cv_header_atomic = yes +then + U_HAVE_ATOMIC=1 else - THREADS_TRUE='#' + U_HAVE_ATOMIC=0 fi +# Make this available via CPPFLAGS +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_ATOMIC=${U_HAVE_ATOMIC}" -ICU_USE_THREADS=0 + +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 + + +# Always build ICU with multi-threading support. OLD_LIBS=${LIBS} -if test $threads = true; then - # For Compaq Tru64 (OSF1), we must look for pthread_attr_init - # and must do this before seaching for pthread_mutex_destroy, or - # we will pick up libpthreads.so not libpthread.so - # If this fails, then we must test for HPUX specials, before - # moving on to a more generic test +# For Compaq Tru64 (OSF1), we must look for pthread_attr_init +# and must do this before seaching for pthread_mutex_destroy, or +# we will pick up libpthreads.so not libpthread.so +# If this fails, then we must test for HPUX specials, before +# moving on to a more generic test - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_init in -lpthread" >&5 +{ $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 @@ -5967,7 +6066,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 @@ -5976,19 +6075,19 @@ _ACEOF fi - if test $ac_cv_lib_pthread_pthread_attr_init = yes; then - ICU_USE_THREADS=1 - else - # Locate the right library for POSIX threads. We look for the - # symbols in the libraries first, because on Solaris libc provides - # pthread_create but libpthread has the real code :( - # AIX uses libpthreads instead of libpthread, and HP/UX uses libpthread - # FreeBSD users may need libpthread if they do not have libc_r. +if test $ac_cv_lib_pthread_pthread_attr_init = yes; then + : +else + # Locate the right library for POSIX threads. We look for the + # symbols in the libraries first, because on Solaris libc provides + # pthread_create but libpthread has the real code :( + # AIX uses libpthreads instead of libpthread, and HP/UX uses libpthread + # FreeBSD users may need libpthread if they do not have libc_r. { $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" @@ -6056,13 +6155,13 @@ else : fi - if test "$ac_cv_search_pthread_mutex_destroy" != no; then - ICU_USE_THREADS=1 - else - # For HP 11 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 + if test "$ac_cv_search_pthread_mutex_destroy" != no; then + : + else + # 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 @@ -6096,7 +6195,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 @@ -6105,51 +6204,50 @@ _ACEOF fi - if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then - ICU_USE_THREADS=1 - fi + if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then + : 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 : + ac_fn_c_check_func "$LINENO" "pthread_mutex_lock" "ac_cv_func_pthread_mutex_lock" +if test "x$ac_cv_func_pthread_mutex_lock" = xyes; then : fi - if test $ac_cv_func_pthread_mutex_lock = yes; then - ICU_USE_THREADS=1 - fi + if test $ac_cv_func_pthread_mutex_lock = yes; then + : fi - # Check to see if we are using CygWin with MSVC - case "${host}" in - *-pc-cygwin*|*-pc-mingw*) - # For gcc, the thread options are set by mh-mingw/mh-cygwin - # For msvc, the thread options are set by runConfigureICU - ICU_USE_THREADS=1 - ;; - *-*-hpux*) - # Add -mt because it does several nice things on newer compilers. - case "${icu_cv_host_frag}" in - mh-hpux-acc) - OLD_CXXFLAGS="${CXXFLAGS}" - CXXFLAGS="${CXXFLAGS} -mt" - if test x"`${CXX} ${CXXFLAGS} 2>&1`" != x""; then - CXXFLAGS="${OLD_CXXFLAGS}" - fi - ;; - esac +fi +# Check to see if we are using CygWin with MSVC +case "${host}" in +*-pc-cygwin*|*-pc-mingw*) + # For gcc, the thread options are set by mh-mingw/mh-cygwin + # For msvc, the thread options are set by runConfigureICU + : + ;; +*-*-hpux*) + # Add -mt because it does several nice things on newer compilers. + case "${icu_cv_host_frag}" in + mh-hpux-acc) + OLD_CXXFLAGS="${CXXFLAGS}" + CXXFLAGS="${CXXFLAGS} -mt" + if test x"`${CXX} ${CXXFLAGS} 2>&1`" != x""; then + CXXFLAGS="${OLD_CXXFLAGS}" + else + UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -mt" + fi ;; - *-*-solaris*) - case "${icu_cv_host_frag}" in - mh-solaris) - LIBS="${LIBS} -mt" - ;; - esac + esac + ;; +*-*-solaris*) + case "${icu_cv_host_frag}" in + mh-solaris) + LIBS="${LIBS} -mt" ;; esac -fi - - + ;; +esac # Check whether --enable-weak-threads was given. if test "${enable_weak_threads+set}" = set; then : @@ -6172,7 +6270,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 @@ -6203,6 +6301,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 @@ -6212,7 +6312,7 @@ $as_echo_n "checking for genccode assembly... " >&6; } # Check to see if genccode can generate simple assembly. GENCCODE_ASSEMBLY= case "${host}" in -*-linux*|i*86-*-*bsd*|i*86-pc-gnu) +*-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu) if test "$GCC" = yes; then # We're using gcc, and the simple -a gcc command line works for genccode GENCCODE_ASSEMBLY="-a gcc" @@ -6235,7 +6335,10 @@ sparc-*-solaris*) GENCCODE_ASSEMBLY="-a sun" ;; ia64-*-hpux*) - GENCCODE_ASSEMBLY="-a aCC-ia64" +# There has been some issues with building ICU data on HPUX ia64 aCC +# when using the assemble code setting below. For now, build without +# assemble code for this platform. This will increase the build time. +# GENCCODE_ASSEMBLY="-a aCC-ia64" ;; esac @@ -6247,7 +6350,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 @@ -6255,167 +6358,49 @@ _ACEOF fi done - -if test $ac_cv_header_inttypes_h = no; then - U_HAVE_INTTYPES_H=0 -else - U_HAVE_INTTYPES_H=1 -fi -if test "$CC" = ccc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"C compiler set to CCC ${CC}\" " >&5 -$as_echo "\"C compiler set to CCC ${CC}\" " >&6; } - case "${host}" in - alpha*-*-*) U_HAVE_INTTYPES_H=0; - esac -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 : - cat >>confdefs.h <<_ACEOF -#define HAVE_DIRENT_H 1 -_ACEOF - -fi - -done - -if test $ac_cv_header_dirent_h = no; then - U_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 + +if test $ac_cv_header_inttypes_h = no; then + U_HAVE_INTTYPES_H=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0" else - ac_cv_iostream_ok=no + U_HAVE_INTTYPES_H=1 fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +if test "$CC" = ccc; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"C compiler set to CCC ${CC}\" " >&5 +$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 - { $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 + + +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" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DIRENT_H 1 +_ACEOF + +fi + +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 -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 @@ -6650,7 +6635,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 @@ -6659,7 +6644,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" @@ -6688,6 +6673,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 @@ -6702,7 +6693,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 @@ -6730,18 +6721,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_namespace_ok" >&5 $as_echo "$ac_cv_namespace_ok" >&6; } -U_HAVE_NAMESPACE=1 if test $ac_cv_namespace_ok = no then - U_HAVE_NAMESPACE=0 + as_fn_error $? "Namespace support is required to build ICU." "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for properly overriding new and delete" >&5 $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 @@ -6779,7 +6768,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 @@ -6817,49 +6806,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 @@ -6869,7 +6822,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 @@ -6877,12 +6830,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 @@ -6893,7 +6847,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 @@ -6901,6 +6855,8 @@ fi then U_TZSET=_tzset U_HAVE_TZSET=1 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0" fi fi @@ -6909,7 +6865,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 @@ -6946,7 +6902,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 @@ -6975,6 +6931,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 @@ -6982,7 +6940,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 @@ -7020,7 +6978,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 @@ -7050,7 +7008,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 @@ -7077,6 +7035,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 @@ -7085,7 +7045,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 @@ -7096,7 +7056,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 @@ -7107,7 +7067,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 @@ -7118,7 +7078,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 @@ -7129,7 +7089,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 @@ -7140,7 +7100,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 @@ -7151,7 +7111,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 @@ -7162,7 +7122,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 @@ -7174,64 +7134,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 @@ -7240,6 +7176,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 @@ -7248,7 +7185,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 @@ -7282,11 +7219,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 @@ -7306,6 +7243,7 @@ fi U_HAVE_WCSCPY=1 else U_HAVE_WCSCPY=0 + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCSCPY=0" fi fi @@ -7317,7 +7255,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" " @@ -7361,7 +7299,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 @@ -7369,7 +7306,7 @@ CHECK_UTF16_STRING_RESULT="unknown" case "${host}" in *-*-aix*|powerpc64-*-linux*) - if test "$ac_cv_c_compiler_gnu" = no; then + if test "$GCC" = no; then OLD_CFLAGS="${CFLAGS}" OLD_CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS} -qutf" @@ -7395,12 +7332,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="${OLD_CFLAGS}" CXXFLAGS="${OLD_CXXFLAGS}" else + UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -qutf" CHECK_UTF16_STRING_RESULT="-qutf" fi fi ;; *-*-solaris*) - if test "$ac_cv_c_compiler_gnu" = no; then + if test "$GCC" = no; then OLD_CFLAGS="${CFLAGS}" OLD_CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS} -xustr=ascii_utf16_ushort" @@ -7427,19 +7365,20 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS="${OLD_CXXFLAGS}" else CHECK_UTF16_STRING_RESULT="-xustr=ascii_utf16_ushort" - + UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -xustr=ascii_utf16_ushort" + UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -xustr=ascii_utf16_ushort" # Since we can't detect the availability of this UTF-16 syntax at compile time, # we depend on configure telling us that we can use it. # 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 ;; *-*-hpux*) - if test "$ac_cv_c_compiler_gnu" = no; then + if test "$GCC" = no; then # The option will be detected at compile time without additional compiler options. CHECK_UTF16_STRING_RESULT="available" fi @@ -7453,25 +7392,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext esac # GCC >= 4.4 supports UTF16 string literals. The CFLAGS and CXXFLAGS may change in the future. -# Since we have to use a different standard, if strict is enable, don't enable UTF16 string literals. -U_CHECK_GNUC_UTF16_STRING=0 -if test "$ac_use_strict_options" = no && test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then - if test "$ac_cv_c_compiler_gnu" = yes; then +if test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then + if test "$GCC" = yes; then OLD_CFLAGS="${CFLAGS}" - OLD_CXXFLAGS="${CXXFLAGS}" - CFLAGS="${CFLAGS} -std=gnu99 -D_GCC_" - CXXFLAGS="${CXXFLAGS} -std=c++0x" + CFLAGS="${CFLAGS} -std=gnu99" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -#ifdef _GCC_ -typedef __CHAR16_TYPE__ char16_t; -#endif -char16_t test[] = u"This is a UTF16 literal string."; -#else -GCC IS TOO OLD! -#endif +static const char16_t test[] = u"This is a UTF16 literal string."; int main () @@ -7482,26 +7410,63 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - U_CHECK_UTF16_STRING=1 + CC_UTF16_STRING=1 else - U_CHECK_UTF16_STRING=0 + CC_UTF16_STRING=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$U_CHECK_UTF16_STRING" = 1; then - CHECK_UTF16_STRING_RESULT="available"; - U_CHECK_GNUC_UTF16_STRING=1 + if test "$CC_UTF16_STRING" = 1; then + UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -std=gnu99" + CHECK_UTF16_STRING_RESULT="C only"; else CFLAGS="${OLD_CFLAGS}" - CXXFLAGS="${OLD_CXXFLAGS}" fi fi -fi + if test "$GXX" = yes; then + # -Wno-return-type-c-linkage is desired so that stable ICU API is not warned about. + 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 + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +static const char16_t test[] = u"This is a UTF16 literal string."; + +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + CXX_UTF16_STRING=1 +else + CXX_UTF16_STRING=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + 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 + if test "$CXX_UTF16_STRING" = 1; then + if test "$CC_UTF16_STRING" = 1; then + CHECK_UTF16_STRING_RESULT="available"; + else + CHECK_UTF16_STRING_RESULT="C++ only"; + fi + fi + fi +fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_UTF16_STRING_RESULT" >&5 $as_echo "$CHECK_UTF16_STRING_RESULT" >&6; } - # Enable/disable extras # Check whether --enable-extras was given. if test "${enable_extras+set}" = set; then : @@ -7515,10 +7480,13 @@ else fi + if test "$extras" = true; then EXTRAS_TRUE= + U_HAVE_EXTRAS=1 else EXTRAS_TRUE='#' + U_HAVE_EXTRAS=0 fi # Check whether --enable-icuio was given. if test "${enable_icuio+set}" = set; then : @@ -7532,10 +7500,13 @@ else fi + if test "$icuio" = true; then ICUIO_TRUE= + U_HAVE_ICUIO=1 else ICUIO_TRUE='#' + U_HAVE_ICUIO=0 fi # Enable/disable layout @@ -7551,10 +7522,57 @@ else fi + if test "$layout" = true; then LAYOUT_TRUE= + U_HAVE_LAYOUT=1 else LAYOUT_TRUE='#' + U_HAVE_LAYOUT=0 +fi + +# Enable/disable layoutex +# Check whether --enable-layoutex was given. +if test "${enable_layoutex+set}" = set; then : + enableval=$enable_layoutex; case "${enableval}" in + yes) layoutex=true ;; + no) layoutex=false ;; + *) as_fn_error $? "bad value ${enableval} for --enable-layoutex" "$LINENO" 5 ;; + esac +else + layoutex=$layout +fi + + + +if test "$layoutex" = true; then + LAYOUTEX_TRUE= + U_HAVE_LAYOUTEX=1 +else + LAYOUTEX_TRUE='#' + U_HAVE_LAYOUTEX=0 +fi + +# Enable/disable tools +# Check whether --enable-tools was given. +if test "${enable_tools+set}" = set; then : + enableval=$enable_tools; case "${enableval}" in + yes) tools=true ;; + no) tools=false ;; + *) as_fn_error $? "bad value ${enableval} for --enable-tools" "$LINENO" 5 ;; + esac +else + tools=true +fi + + + +if test "$tools" = true; then + TOOLS_TRUE= + U_HAVE_TOOLS=1 +else + TOOLS_TRUE='#' + U_HAVE_TOOLS=0 fi @@ -7653,6 +7671,7 @@ if test "$ICULIBSUFFIX" != "" then U_HAVE_LIB_SUFFIX=1 ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/^A-Za-z0-9_/_/g'` + UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} " else U_HAVE_LIB_SUFFIX=0 fi @@ -7672,10 +7691,13 @@ else fi + if test "$tests" = true; then TESTS_TRUE= + U_HAVE_TESTS=1 else TESTS_TRUE='#' + U_HAVE_TESTS=0 fi # Enable/disable samples @@ -7691,10 +7713,13 @@ else fi + if test "$samples" = true; then SAMPLES_TRUE= + U_HAVE_SAMPLES=1 else SAMPLES_TRUE='#' + U_HAVE_SAMPLES=0 fi ICUDATA_CHAR=$U_ENDIAN_CHAR @@ -7708,7 +7733,8 @@ case "${host}" in *-*-aix*) platform=U_AIX ;; *-*-hpux*) platform=U_HPUX ;; *-apple-darwin*|*-apple-rhapsody*) platform=U_DARWIN ;; - *-*-cygwin*|*-*-mingw*) platform=U_CYGWIN ;; + *-*-cygwin*) platform=U_CYGWIN ;; + *-*-mingw*) platform=U_MINGW ;; *-*ibm-openedition*|*-*-os390*) platform=OS390 if test "${ICU_ENABLE_ASCII_STRINGS}" != "1"; then ICUDATA_CHAR="e" @@ -7736,19 +7762,38 @@ if test "${FORCE_LIBS}" != ""; then LIBS=${FORCE_LIBS} fi - # Now that we're done using CPPFLAGS etc. for tests, we can change it # for build. -if test $ICU_USE_THREADS -ne 0 -then - CPPFLAGS="$CPPFLAGS \$(THREADSCPPFLAGS)" - CFLAGS="$CFLAGS \$(THREADSCFLAGS)" - CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS)" +if test "${CC}" == "clang"; then + CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality" +else + CLANGCFLAGS="" +fi + +if test "${CXX}" == "clang++"; then + CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality" +else + CLANGCXXFLAGS="" fi +CPPFLAGS="$CPPFLAGS \$(THREADSCPPFLAGS)" +CFLAGS="$CFLAGS \$(THREADSCFLAGS) $CLANGCFLAGS" +CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS) $CLANGCXXFLAGS" + + + + +# append all config cppflags +CPPFLAGS="$CPPFLAGS $CONFIG_CPPFLAGS $UCONFIG_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/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 common/unicode/platform.h" +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/gendict/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/collperf/Makefile test/perf/collperf2/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/howExpensiveIs/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 test/perf/leperf/Makefile samples/Makefile samples/date/Makefile samples/cal/Makefile samples/layout/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -7814,10 +7859,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;} @@ -7829,7 +7885,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= @@ -7850,7 +7942,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" @@ -7951,6 +8043,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 @@ -8146,16 +8239,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -8215,28 +8308,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -8257,8 +8338,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # 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 +This file was extended by ICU $as_me 57.1, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -8275,15 +8356,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 @@ -8304,26 +8381,22 @@ 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." +Report bugs to . +ICU home page: ." _ACEOF 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, +ICU config.status 57.1 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -8374,18 +8447,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) @@ -8412,7 +8474,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -8441,7 +8503,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" ;; @@ -8467,7 +8528,7 @@ do "tools/genccode/Makefile") CONFIG_FILES="$CONFIG_FILES tools/genccode/Makefile" ;; "tools/gencmn/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gencmn/Makefile" ;; "tools/gencnval/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gencnval/Makefile" ;; - "tools/genctd/Makefile") CONFIG_FILES="$CONFIG_FILES tools/genctd/Makefile" ;; + "tools/gendict/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gendict/Makefile" ;; "tools/gentest/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gentest/Makefile" ;; "tools/gennorm2/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gennorm2/Makefile" ;; "tools/genbrk/Makefile") CONFIG_FILES="$CONFIG_FILES tools/genbrk/Makefile" ;; @@ -8489,22 +8550,26 @@ do "test/letest/Makefile") CONFIG_FILES="$CONFIG_FILES test/letest/Makefile" ;; "test/perf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/Makefile" ;; "test/perf/collationperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/collationperf/Makefile" ;; + "test/perf/collperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/collperf/Makefile" ;; + "test/perf/collperf2/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/collperf2/Makefile" ;; + "test/perf/dicttrieperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/dicttrieperf/Makefile" ;; "test/perf/ubrkperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/ubrkperf/Makefile" ;; "test/perf/charperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/charperf/Makefile" ;; "test/perf/convperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/convperf/Makefile" ;; "test/perf/normperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/normperf/Makefile" ;; "test/perf/DateFmtPerf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/DateFmtPerf/Makefile" ;; + "test/perf/howExpensiveIs/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/howExpensiveIs/Makefile" ;; "test/perf/strsrchperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/strsrchperf/Makefile" ;; "test/perf/unisetperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/unisetperf/Makefile" ;; "test/perf/usetperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/usetperf/Makefile" ;; "test/perf/ustrperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/ustrperf/Makefile" ;; "test/perf/utfperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/utfperf/Makefile" ;; "test/perf/utrie2perf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/utrie2perf/Makefile" ;; + "test/perf/leperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/leperf/Makefile" ;; "samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; "samples/date/Makefile") CONFIG_FILES="$CONFIG_FILES samples/date/Makefile" ;; "samples/cal/Makefile") CONFIG_FILES="$CONFIG_FILES samples/cal/Makefile" ;; "samples/layout/Makefile") CONFIG_FILES="$CONFIG_FILES samples/layout/Makefile" ;; - "common/unicode/platform.h") CONFIG_FILES="$CONFIG_FILES common/unicode/platform.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -8517,7 +8582,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 @@ -8528,9 +8592,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 } @@ -8538,12 +8603,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. @@ -8565,7 +8631,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -8593,7 +8659,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 @@ -8641,7 +8707,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 = "" @@ -8673,7 +8739,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 @@ -8703,116 +8769,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 @@ -8840,7 +8798,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 `:'. @@ -8875,7 +8833,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 ;; @@ -9006,48 +8964,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 @@ -9093,12 +9029,6 @@ echo echo "ICU for C/C++ $VERSION is ready to be built." echo "=== Important Notes: ===" -if test $ICU_USE_THREADS = 0; then - echo - echo "** ICU was configured without mutex or thread support. Multithread-safe operation will not be tested. If this is unexpected, then run configure with --enable-threads=yes or check the messages above to see why thread support was not found." 1>&6 - echo -fi - echo "Data Packaging: $datapackaging" echo " This means: $datapackaging_msg" echo " To locate data: $datapackaging_howfound" @@ -9110,6 +9040,9 @@ echo "** WARNING: $U_MAKE may not be GNU make." echo "This may cause ICU to fail to build. Please make sure that GNU make" echo "is in your PATH so that the configure script can detect its location." fi +if test "x$AR" = "xfalse"; then + echo "*** WARNING: Archiver ar not found. Set AR= or fix PATH. Some builds (such as static) may fail." +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking the version of \"$U_MAKE\"" >&5 $as_echo_n "checking the version of \"$U_MAKE\"... " >&6; } @@ -9121,4 +9054,57 @@ else $as_echo "too old or test failed - try upgrading GNU Make" >&6; } fi + +if test -n "$UCONFIG_CPPFLAGS"; then + HDRFILE="uconfig.h.prepend" + echo "*** WARNING: You must set the following flags before code compiled against this ICU will function properly:" + echo + echo " ${UCONFIG_CPPFLAGS}" + echo + echo 'The recommended way to do this is to prepend the following lines to source/common/unicode/uconfig.h or #include them near the top of that file.' + echo "Creating the file ${HDRFILE}" + echo + echo '--------------- ' "${HDRFILE}" + echo > "${HDRFILE}" + echo '/* ICU customizations: put these lines at the top of uconfig.h */' >> "${HDRFILE}" + echo >> "${HDRFILE}" + for flag in ${UCONFIG_CPPFLAGS}; + do + echo " /* $flag */" >> "${HDRFILE}" + case "${flag}" in + -D*=*) + \echo "${flag}" | sed -n 's%-D\([^=]*\)=%#define \1 %p' >> "${HDRFILE}" + \echo >> "${HDRFILE}" + ;; + -D*) + \echo "${flag}" | sed -n 's%-D\([^=]*\)%#define \1 %p' >> "${HDRFILE}" + \echo >> "${HDRFILE}" + ;; + *) + \echo "/* Not sure how to handle this argument: ${flag} */" >> "${HDRFILE}" + \echo >> "${HDRFILE}" + ;; + esac + done + cat "${HDRFILE}" + \echo "/* End of ${HDRFILE} ------------ */" >> "${HDRFILE}" + echo >> "${HDRFILE}" + echo '--------------- end ' "${HDRFILE}" +fi + + +if test -n "$UCONFIG_CFLAGS"; then + echo "C apps may want to build with CFLAGS = ${UCONFIG_CFLAGS}" +fi + +if test -n "$UCONFIG_CXXFLAGS"; then + echo "C++ apps may want to build with CXXFLAGS = ${UCONFIG_CXXFLAGS}" +fi + +if test "$tools" = false; +then + echo "## Note: you have disabled ICU's tools. This ICU cannot build its own data or tests." + echo "## Expect build failures in the 'data', 'test', and other directories." +fi + $as_unset _CXX_CXXSUFFIX