X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/efa1e6592fb03ce23b15276b2b91d885a3ee7da5..57a6839dcb3bba09e8228b822b290604668416fe:/icuSources/configure?ds=sidebyside diff --git a/icuSources/configure b/icuSources/configure index 1a20f41d..dd98833e 100755 --- a/icuSources/configure +++ b/icuSources/configure @@ -2,7 +2,7 @@ # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68. # -# Copyright (c) 1999-2012, International Business Machines Corporation and others. All Rights Reserved. +# Copyright (c) 1999-2013, International Business Machines Corporation and others. All Rights Reserved. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -602,7 +602,10 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='LTLIBOBJS +ac_subst_vars='UCONFIG_CXXFLAGS +UCONFIG_CFLAGS +UCONFIG_CPPFLAGS +LTLIBOBJS LIBOBJS LIBCXXFLAGS LIBCFLAGS @@ -618,6 +621,7 @@ ICULIBSUFFIX DATA_PACKAGING_MODE thepkgicudatadir pkgicudatadir +TOOLS_TRUE LAYOUT_TRUE ICUIO_TRUE EXTRAS_TRUE @@ -640,6 +644,7 @@ U_HAVE_INTTYPES_H GENCCODE_ASSEMBLY HAVE_MMAP LIB_THREAD +U_HAVE_ATOMIC U_HAVE_STD_STRING ENABLE_RPATH U_ENABLE_DYLOAD @@ -751,6 +756,7 @@ enable_weak_threads enable_extras enable_icuio enable_layout +enable_tools with_data_packaging with_library_suffix enable_tests @@ -1397,6 +1403,7 @@ Optional Features: --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-tools build ICU's tools default=yes --enable-tests build ICU tests default=yes --enable-samples build ICU samples default=yes @@ -1496,7 +1503,7 @@ Copyright (C) 2010 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-2012, International Business Machines Corporation and others. All Rights Reserved. + Copyright (c) 1999-2013, International Business Machines Corporation and others. All Rights Reserved. _ACEOF exit fi @@ -2698,8 +2705,19 @@ _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 @@ -4064,9 +4082,18 @@ $as_echo "$ac_use_strict_options" >&6; } then if test "$GCC" = yes then - # 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 -Wall -std=c99 -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" + case "${host}" in + *-*-solaris*) + # Don't use -std=c99 option on Solaris/GCC + ;; + *) + # 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) @@ -5408,6 +5435,22 @@ 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 U_ENABLE_DYLOAD=1 enable=yes @@ -5588,6 +5631,43 @@ $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 @@ -5617,6 +5697,39 @@ else CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STD_STRING=0" 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 +/* end confdefs.h. */ +#include +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_header_atomic=yes +else + ac_cv_header_atomic=no +fi +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 + U_HAVE_ATOMIC=0 +fi +# Make this available via CPPFLAGS +CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_ATOMIC=${U_HAVE_ATOMIC}" + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5840,7 +5953,9 @@ fi CXXFLAGS="${CXXFLAGS} -mt" if test x"`${CXX} ${CXXFLAGS} 2>&1`" != x""; then CXXFLAGS="${OLD_CXXFLAGS}" - fi + else + UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -mt" + fi ;; esac ;; @@ -6934,6 +7049,7 @@ 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 @@ -6966,7 +7082,8 @@ 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, @@ -7016,15 +7133,14 @@ else fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$CC_UTF16_STRING" = 1; then + UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -std=gnu99" CHECK_UTF16_STRING_RESULT="C only"; else CFLAGS="${OLD_CFLAGS}" fi fi if test "$GXX" = yes; then - OLD_CXXFLAGS="${CXXFLAGS}" # -Wno-return-type-c-linkage is desired so that stable ICU API is not warned about. - CXXFLAGS="${CXXFLAGS} -std=c++11" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7062,8 +7178,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu else CHECK_UTF16_STRING_RESULT="C++ only"; fi - else - CXXFLAGS="${OLD_CXXFLAGS}" fi fi fi @@ -7125,6 +7239,25 @@ else LAYOUT_TRUE='#' 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= +else + TOOLS_TRUE='#' +fi + # Check whether --with-data-packaging was given. if test "${with_data_packaging+set}" = set; then : @@ -7309,9 +7442,21 @@ fi # Now that we're done using CPPFLAGS etc. for tests, we can change it # for build. +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)" -CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS)" +CFLAGS="$CFLAGS \$(THREADSCFLAGS) $CLANGCFLAGS" +CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS) $CLANGCXXFLAGS" @@ -7325,7 +7470,7 @@ 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/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/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 samples/Makefile samples/date/Makefile samples/cal/Makefile samples/layout/Makefile" +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 @@ -8094,6 +8239,7 @@ do "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" ;; @@ -8107,6 +8253,7 @@ do "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" ;; @@ -8595,6 +8742,7 @@ 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:" @@ -8632,4 +8780,19 @@ if test -n "$UCONFIG_CPPFLAGS"; then 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