--- /boot/home/Unzipped/libxml2-2.6.2/configure.in Tue Nov 4 10:34:51 2003 +++ /BeStorage/Sources/Apps/LibPak/src_current/libxml2-2.6.2/configure.in Thu Nov 6 10:38:48 2003 @@ -459,7 +459,7 @@ TEST_THREADS="" AC_ARG_WITH(threads, -[ --with-threads add multithread support(on)]) +[ --with-threads[[=TYPE]] add multithread support(on=pthread, set it =native to use platform specific support)]) if test "$with_minimum" = "yes" -a "$with_threads" = "" then with_threads=no @@ -469,12 +469,30 @@ else echo Enabling multithreaded support - AC_CHECK_HEADER(pthread.h, - AC_CHECK_LIB(pthread, pthread_join,[ - THREAD_LIBS="-lpthread" - AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)]) - AC_DEFINE([HAVE_PTHREAD_H], [], [Define if is there]) - WITH_THREADS="1"])) + if test "$with_threads" = "native" ; then + case "$host" in + *-*-beos) + AC_DEFINE([HAVE_BEOS_THREADS],1,[Use BeOS TLC and semaphore based xmlMutex]) + WITH_THREADS="1" + ;; + *-*-mingw*) + AC_DEFINE([HAVE_WIN32_THREADS],1,[Use Win32 multithread support]) + WITH_THREADS="1" + *) + echo "Native multithread is not supported on $host, trying pthread" + with_threads="pthread" + ;; + esac + fi + + if test "$with_threads" = "pthread" -o "$with_threads" = "yes" ; then + AC_CHECK_HEADER(pthread.h, + AC_CHECK_LIB(pthread, pthread_join,[ + THREAD_LIBS="-lpthread" + AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)]) + AC_DEFINE([HAVE_PTHREAD_H], [], [Define if is there]) + WITH_THREADS="1"])) + fi if test "$WITH_THREADS" = "1" ; then THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT" @@ -887,7 +905,16 @@ LIBS="${_libs}" LDFLAGS="${_ldflags}"])])) fi -M_LIBS="-lm" + +case "$host" in + *-*-beos) + M_LIBS="" + ;; + *) + M_LIBS="-lm" + ;; +esac + XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS" XML_LIBTOOLLIBS="libxml2.la" AC_SUBST(WITH_ICONV)