From 484f05fa887c8712927e945c34634157cc6af6bd Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 20 Jan 2000 21:31:01 +0000 Subject: [PATCH] ICU-227 Fix some pthreads checks for OS390, fix a date.. X-SVN-Rev: 666 --- icu4c/readme.html | 4 +- icu4c/source/aclocal.m4 | 2 +- icu4c/source/configure | 121 ++++++++++++++++++++------------------ icu4c/source/configure.in | 7 ++- 4 files changed, 72 insertions(+), 62 deletions(-) diff --git a/icu4c/readme.html b/icu4c/readme.html index c6b7762ed3..2524bfd287 100644 --- a/icu4c/readme.html +++ b/icu4c/readme.html @@ -12,13 +12,13 @@

ReadMe: IBM Classes For Unicode

-

Version: 12/28/2000
+

Version: 12/28/1999


COPYRIGHT:
-Copyright © 1997-2000 International Business Machines Corporation an others. All Rights +Copyright (c) 1997-2000 International Business Machines Corporation an others. All Rights Reserved.


diff --git a/icu4c/source/aclocal.m4 b/icu4c/source/aclocal.m4 index cf9e20aebf..fdf10ce42a 100644 --- a/icu4c/source/aclocal.m4 +++ b/icu4c/source/aclocal.m4 @@ -59,7 +59,7 @@ char pthread_create(); pthread_create();, eval "ac_ldflag_pthread=yes", eval "ac_ldflag_pthread=no"), -LIBS="$ac_save_LDFLAGS" +LDFLAGS="$ac_save_LDFLAGS" ]) if eval "test \"`echo $ac_ldflag_pthread`\" = yes"; then AC_MSG_RESULT(yes) diff --git a/icu4c/source/configure b/icu4c/source/configure index fe43dac628..8ec6d7c1c3 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -1602,7 +1602,7 @@ else eval "ac_ldflag_pthread=no" fi rm -f conftest*, -LIBS="$ac_save_LDFLAGS" +LDFLAGS="$ac_save_LDFLAGS" fi @@ -1614,61 +1614,66 @@ else fi fi - echo $ac_n "checking for pthread_mutex_create""... $ac_c" 1>&6 -echo "configure:1619: checking for pthread_mutex_create" >&5 -if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_create'+set}'`\" = set"; then + echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6 +echo "configure:1619: checking for pthread_mutex_lock" >&5 +if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char pthread_mutex_create(); +char pthread_mutex_lock(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_mutex_create) || defined (__stub___pthread_mutex_create) +#if defined (__stub_pthread_mutex_lock) || defined (__stub___pthread_mutex_lock) choke me #else -pthread_mutex_create(); +pthread_mutex_lock(); #endif ; return 0; } EOF if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_pthread_mutex_create=yes" + eval "ac_cv_func_pthread_mutex_lock=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_pthread_mutex_create=no" + eval "ac_cv_func_pthread_mutex_lock=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'pthread_mutex_create`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'pthread_mutex_lock`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi + + if test $ac_cv_func_pthread_mutex_lock = yes; then + ICU_USE_THREADS=1 + fi + fi fi echo $ac_n "checking for wcscpy in -lwcs""... $ac_c" 1>&6 -echo "configure:1672: checking for wcscpy in -lwcs" >&5 +echo "configure:1677: checking for wcscpy in -lwcs" >&5 ac_lib_var=`echo wcs'_'wcscpy | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1676,7 +1681,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwcs $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1721,7 +1726,7 @@ HAVE_DLOPEN=0 #add more libs here.. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1725: checking for dlopen in -ldl" >&5 +echo "configure:1730: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1729,7 +1734,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1774,7 +1779,7 @@ fi if test $HAVE_DLOPEN = 0; then echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:1778: checking for shl_load in -ldld" >&5 +echo "configure:1783: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1782,7 +1787,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1830,7 +1835,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1834: checking how to run the C preprocessor" >&5 +echo "configure:1839: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1845,13 +1850,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1862,13 +1867,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1879,13 +1884,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1913,17 +1918,17 @@ for ac_hdr in inttypes.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1917: checking for $ac_hdr" >&5 +echo "configure:1922: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1957,14 +1962,14 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1961: checking whether byte ordering is bigendian" >&5 +echo "configure:1966: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1975,11 +1980,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1990,7 +1995,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2010,7 +2015,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -2055,12 +2060,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2059: checking for ANSI C header files" >&5 +echo "configure:2064: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2068,7 +2073,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2085,7 +2090,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2103,7 +2108,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2124,7 +2129,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2135,7 +2140,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2159,12 +2164,12 @@ EOF fi echo $ac_n "checking for int8_t""... $ac_c" 1>&6 -echo "configure:2163: checking for int8_t" >&5 +echo "configure:2168: checking for int8_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_int8_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2192,12 +2197,12 @@ EOF fi echo $ac_n "checking for uint8_t""... $ac_c" 1>&6 -echo "configure:2196: checking for uint8_t" >&5 +echo "configure:2201: checking for uint8_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2225,12 +2230,12 @@ EOF fi echo $ac_n "checking for int16_t""... $ac_c" 1>&6 -echo "configure:2229: checking for int16_t" >&5 +echo "configure:2234: checking for int16_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2258,12 +2263,12 @@ EOF fi echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 -echo "configure:2262: checking for uint16_t" >&5 +echo "configure:2267: checking for uint16_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2291,12 +2296,12 @@ EOF fi echo $ac_n "checking for int32_t""... $ac_c" 1>&6 -echo "configure:2295: checking for int32_t" >&5 +echo "configure:2300: checking for int32_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2324,12 +2329,12 @@ EOF fi echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 -echo "configure:2328: checking for uint32_t" >&5 +echo "configure:2333: checking for uint32_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2357,12 +2362,12 @@ EOF fi echo $ac_n "checking for bool_t""... $ac_c" 1>&6 -echo "configure:2361: checking for bool_t" >&5 +echo "configure:2366: checking for bool_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_bool_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS diff --git a/icu4c/source/configure.in b/icu4c/source/configure.in index f114b7c774..e584bc5e9f 100644 --- a/icu4c/source/configure.in +++ b/icu4c/source/configure.in @@ -131,7 +131,12 @@ if test $threads = true; then AC_PTHREAD_FREEBSD fi - AC_CHECK_FUNC(pthread_mutex_create) + AC_CHECK_FUNC(pthread_mutex_lock) + + if test $ac_cv_func_pthread_mutex_lock = yes; then + ICU_USE_THREADS=1 + fi + fi fi