* mono/configure.in: Correct host regexes for FreeBSD. Fix TLS issue with
authorJohn Merryweather Cooper <jmerry@mono-cvs.ximian.com>
Wed, 28 Jul 2004 16:28:17 +0000 (16:28 -0000)
committerJohn Merryweather Cooper <jmerry@mono-cvs.ximian.com>
Wed, 28 Jul 2004 16:28:17 +0000 (16:28 -0000)
-CURRENT.  Fix library detection for FreeBSD in both -STABLE and -CURRENT.

svn path=/trunk/mono/; revision=31565

ChangeLog
configure.in

index b3976aaec278b8f62a55393cd32d285123f8eb50..46e87dfdc20616ff5940db7733498c0e7b9cbdc9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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
index 62675cb37cfc5ea5e2d8b17d30441acfd61537d5..9e5f7d431e812c3f9ba95f920a2d752b2dcb8e46 100644 (file)
@@ -69,7 +69,7 @@ case "$host" in
                ;;
 # 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"
@@ -91,11 +91,12 @@ case "$host" in
                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"
@@ -119,6 +120,7 @@ case "$host" in
 # but NOT library support)
 #
                with_nptl=no
+               with_tls=pthread
                ;;
        *-*-*openbsd*)
                platform_win32=no
@@ -706,7 +708,17 @@ if test x$platform_win32 = xno; then
        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)