+2004-07-27 John Merryweather Cooper <john_m_cooper@yahoo.com>
+ * configure.in: Disable __thread test (TLS) for FreeBSD as
+ it succeeds on FreeBSD 5.x when it should fail. Fix pthread
+ library detection for FreeBSD 4.x since pthread is embedded
+ in libc_r on this platform. Fix some typos in my host
+ regexes for freebsd.
+
2004-07-23 Dick Porter <dick@ximian.com>
* configure.in: Changes for FreeBSD thread support by John
;;
# these flags will work for all versions of -STABLE
#
- *-*-*freebsd4)
+ *-*-*freebsd4*)
platform_win32=no
if test "x$PTHREAD_CFLAGS" = "x"; then
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
libgc_threads=pthreads
# TLS isn't implemented at all on -STABLE
with_nptl=no
+ with_tls=pthread
;;
# older versions of -CURRENT will break with these flags but testing
# indicates these older versions won't run Mono anyway
#
- *-*-*freebsd5)
+ *-*-*freebsd5*)
platform_win32=no
if test "x$PTHREAD_CFLAGS" = "x"; then
CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
# but NOT library support)
#
with_nptl=no
+ with_tls=pthread
;;
*-*-*openbsd*)
platform_win32=no
dnl *****************************
dnl *** Checks for libpthread ***
dnl *****************************
- AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
+# on FreeBSD -STABLE, the pthreads functions all reside in libc_r
+# and libpthread does not exist
+#
+ case "${host}" in
+ *-*-*freebsd4*)
+ AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread")
+ ;;
+ *)
+ AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
+ ;;
+ esac
AC_CHECK_HEADERS(pthread.h)
AC_CHECK_FUNCS(pthread_mutex_timedlock)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np)