Autoconf cannot find threads anymore?!
Hi,
After an update today from the unstable dist, my ICU build doesn't recognize
that Linux supports threads anymore:
checking for pthread_create in -lpthread... no
checking for pthread_mutex_init in -lpthread... no
checking for pthread_create in -lpthreads... no
checking for pthread_create in -lcma... no
checking if we need -pthread for threads... no
checking for pthread_mutex_lock... no
The autoconf code is included below. It always worked so far. Any idea in
what changed that could cause this problem?
Thanks!
YA
dnl Autoconf snippet
ICU_USE_THREADS=0
dnl Test for HPUX cma threads first..
if test $hpuxcma = true; then
dnl HPUX cma case
if test $threads = true; then
AC_CHECK_LIB(cma, pthread_create)
if test $ac_cv_lib_cma_pthread_create = yes; then
ICU_USE_THREADS=1
fi
fi
else
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)
if test $ac_cv_lib_pthread_pthread_create = yes; then
ICU_USE_THREADS=1
else
dnl For HP 11
AC_CHECK_LIB(pthread, pthread_mutex_init)
if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
ICU_USE_THREADS=1
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
ICU_USE_THREADS=1
fi
fi
fi
AC_SUBST(ICU_USE_THREADS)
Reply to: