ICU-640 revamped looking up for pthread_create in libpthread,
libpthreads (old FreeBSD), libc_r (newer FreeBSD) and cma in a single check X-SVN-Rev: 2586
This commit is contained in:
parent
b22c7793b5
commit
5f926de34e
22
icu4c/source/aclocal.m4
vendored
22
icu4c/source/aclocal.m4
vendored
@ -58,28 +58,6 @@ else
|
||||
$1_FALSE=
|
||||
fi])
|
||||
|
||||
dnl FreeBSD -pthread check - Jonathan McDowell <noodles@earth.li>
|
||||
AC_DEFUN(AC_PTHREAD_FREEBSD,
|
||||
[AC_MSG_CHECKING([if we need -pthread for threads])
|
||||
AC_CACHE_VAL(ac_ldflag_pthread,
|
||||
[ac_save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="-pthread $LDFLAGS"
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
char pthread_create();
|
||||
],
|
||||
pthread_create();,
|
||||
eval "ac_ldflag_pthread=yes",
|
||||
eval "ac_ldflag_pthread=no"),
|
||||
LDFLAGS="$ac_save_LDFLAGS"
|
||||
])
|
||||
if eval "test \"`echo $ac_ldflag_pthread`\" = yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ICU_USE_THREADS=1
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi])
|
||||
|
||||
dnl Strict compilation options.
|
||||
AC_DEFUN(AC_CHECK_STRICT_COMPILE,
|
||||
[
|
||||
|
430
icu4c/source/configure
vendored
430
icu4c/source/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -165,9 +165,9 @@ if test $threads = true; then
|
||||
dnl special pthread handling
|
||||
dnl AIX uses pthreads instead of pthread, and HP/UX uses cma
|
||||
dnl FreeBSD users -pthread
|
||||
AC_CHECK_LIB(pthread, pthread_create)
|
||||
AC_SEARCH_LIBS(pthread_create, pthread pthreads c_r cma)
|
||||
|
||||
if test $ac_cv_lib_pthread_pthread_create = yes; then
|
||||
if test "$ac_cv_search_pthread_create" != no; then
|
||||
ICU_USE_THREADS=1
|
||||
else
|
||||
dnl For HP 11
|
||||
@ -177,26 +177,6 @@ if test $threads = true; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test $ICU_USE_THREADS = 0; then
|
||||
AC_CHECK_LIB(pthreads, pthread_create)
|
||||
if test $ac_cv_lib_pthreads_pthread_create = yes; then
|
||||
ICU_USE_THREADS=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $ICU_USE_THREADS = 0; then
|
||||
AC_CHECK_LIB(cma, pthread_create)
|
||||
if test $ac_cv_lib_cma_pthread_create = yes; then
|
||||
ICU_USE_THREADS=1
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If all other thread tests fail, try BSD's -pthread
|
||||
if test $ICU_USE_THREADS = 0; then
|
||||
AC_PTHREAD_FREEBSD
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNC(pthread_mutex_lock)
|
||||
|
||||
if test $ac_cv_func_pthread_mutex_lock = yes; then
|
||||
|
Loading…
Reference in New Issue
Block a user