From 0ab7078847ec607578c0e7ef707d9263def5f964 Mon Sep 17 00:00:00 2001 From: kkuznetsov Date: Tue, 20 Dec 2005 20:36:32 +0000 Subject: [PATCH] reflect changes to configure.in for sun threading --- extern/icu/source/configure | 238 +++++++++++++++++++++++++++--------- 1 file changed, 183 insertions(+), 55 deletions(-) diff --git a/extern/icu/source/configure b/extern/icu/source/configure index 72827bd967..5f5136bb51 100644 --- a/extern/icu/source/configure +++ b/extern/icu/source/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.56. +# Generated by GNU Autoconf 2.57. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. @@ -971,7 +971,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.56. Invocation command line was +generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ @@ -3608,6 +3608,76 @@ ICU_USE_THREADS=0 if test $threads = true; then + case "${host}" in + *solaris*) + +echo "$as_me:$LINENO: checking for mutex_init in -lthread" >&5 +echo $ECHO_N "checking for mutex_init in -lthread... $ECHO_C" >&6 +if test "${ac_cv_lib_thread_mutex_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char mutex_init (); +int +main () +{ +mutex_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_thread_mutex_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_thread_mutex_init=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_thread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_thread_mutex_init" >&6 +if test $ac_cv_lib_thread_mutex_init = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBTHREAD 1 +_ACEOF + + LIBS="-lthread $LIBS" + +fi + + ICU_USE_THREADS=1 + ;; + *) + echo "$as_me:$LINENO: checking for pthread_attr_init in -lpthread" >&5 echo $ECHO_N "checking for pthread_attr_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_attr_init+set}" = set; then @@ -3671,9 +3741,9 @@ _ACEOF fi - if test $ac_cv_lib_pthread_pthread_attr_init = yes; then - ICU_USE_THREADS=1 - else + if test $ac_cv_lib_pthread_pthread_attr_init = yes; then + ICU_USE_THREADS=1 + else echo "$as_me:$LINENO: checking for library containing pthread_mutex_destroy" >&5 @@ -3784,9 +3854,9 @@ else : fi - if test "$ac_cv_search_pthread_mutex_destroy" != no; then - ICU_USE_THREADS=1 - else + if test "$ac_cv_search_pthread_mutex_destroy" != no; then + ICU_USE_THREADS=1 + else echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 @@ -3851,12 +3921,12 @@ _ACEOF fi - if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then - ICU_USE_THREADS=1 - fi - fi + if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then + ICU_USE_THREADS=1 + fi + fi - echo "$as_me:$LINENO: checking for pthread_mutex_lock" >&5 + echo "$as_me:$LINENO: checking for pthread_mutex_lock" >&5 echo $ECHO_N "checking for pthread_mutex_lock... $ECHO_C" >&6 if test "${ac_cv_func_pthread_mutex_lock+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3869,8 +3939,14 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char pthread_mutex_lock (); below. */ -#include + which can conflict with char pthread_mutex_lock (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -3894,7 +3970,7 @@ char (*f) () = pthread_mutex_lock; int main () { - +return f != pthread_mutex_lock; ; return 0; } @@ -3924,32 +4000,36 @@ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_mutex_lock" >&5 echo "${ECHO_T}$ac_cv_func_pthread_mutex_lock" >&6 - if test $ac_cv_func_pthread_mutex_lock = yes; then - ICU_USE_THREADS=1 - fi - case "${host}" in - *-pc-cygwin*|*-pc-mingw*) - if test "$ac_cv_c_compiler_gnu" = no; then - ICU_USE_THREADS=1 - fi ;; - *-*-hpux*) - 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 - ;; - esac - fi + if test $ac_cv_func_pthread_mutex_lock = yes; then + ICU_USE_THREADS=1 + fi + case "${host}" in + *-pc-cygwin*|*-pc-mingw*) + if test "$ac_cv_c_compiler_gnu" = no; then + ICU_USE_THREADS=1 + fi ;; + *-*-hpux*) + 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 + ;; + esac + fi + ;; + esac fi + + # The AC_FUNC_MMAP macro doesn't work properly. It seems to be too specific. # Do this check instead. HAVE_MMAP=0 @@ -4042,6 +4122,8 @@ 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 >conftest.$ac_ext <<_ACEOF @@ -4051,7 +4133,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -4143,6 +4229,8 @@ 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 >conftest.$ac_ext <<_ACEOF @@ -4152,7 +4240,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -4740,6 +4832,8 @@ for ac_cxx_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 >conftest.$ac_ext <<_ACEOF @@ -4749,7 +4843,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -4841,6 +4939,8 @@ for ac_cxx_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 >conftest.$ac_ext <<_ACEOF @@ -4850,7 +4950,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -5378,8 +5482,14 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char nl_langinfo (); below. */ -#include + which can conflict with char nl_langinfo (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -5403,7 +5513,7 @@ char (*f) () = nl_langinfo; int main () { - +return f != nl_langinfo; ; return 0; } @@ -5693,8 +5803,14 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char popen (); below. */ -#include + which can conflict with char popen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -5718,7 +5834,7 @@ char (*f) () = popen; int main () { - +return f != popen; ; return 0; } @@ -5768,8 +5884,14 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char tzset (); below. */ -#include + which can conflict with char tzset (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -5793,7 +5915,7 @@ char (*f) () = tzset; int main () { - +return f != tzset; ; return 0; } @@ -5839,8 +5961,14 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _tzset (); below. */ -#include + which can conflict with char _tzset (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -5864,7 +5992,7 @@ char (*f) () = _tzset; int main () { - +return f != _tzset; ; return 0; } @@ -7670,7 +7798,7 @@ _ASBOX cat >&5 <<_CSEOF This file was extended by $as_me, which was -generated by GNU Autoconf 2.56. Invocation command line was +generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7730,7 +7858,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.56, +configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001