[mono-list] Patch to Mono HEAD for approval -- configure.in

John Merryweather Cooper john_m_cooper@yahoo.com
Tue, 27 Jul 2004 18:49:46 -0700


--v9Ux+11Zm5mwPlX6
Content-Type: multipart/mixed; boundary="a8Wt8u1KmwUX3Y2C"
Content-Disposition: inline


--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline

See Changelog patch (attached) for details.

jmc

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="file.diff.Yq8SZD"
Content-Transfer-Encoding: quoted-printable

Index: ChangeLog
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/mono/ChangeLog,v
retrieving revision 1.385
diff -u -r1.385 ChangeLog
--- ChangeLog	23 Jul 2004 19:32:10 -0000	1.385
+++ ChangeLog	28 Jul 2004 00:45:44 -0000
@@ -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>
=20
 	* configure.in: Changes for FreeBSD thread support by John
Index: configure.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/mono/configure.in,v
retrieving revision 1.269
diff -u -r1.269 configure.in
--- configure.in	23 Jul 2004 19:32:10 -0000	1.269
+++ configure.in	28 Jul 2004 00:45:44 -0000
@@ -69,7 +69,7 @@
 		;;
 # these flags will work for all versions of -STABLE
 #
-	*-*-*freebsd4)
+	*-*-*freebsd4*)
 		platform_win32=3Dno
 		if test "x$PTHREAD_CFLAGS" =3D "x"; then
 			CPPFLAGS=3D"$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
@@ -91,11 +91,12 @@
 		libgc_threads=3Dpthreads
 # TLS isn't implemented at all on -STABLE
 		with_nptl=3Dno
+		with_tls=3Dpthread
 		;;
 # older versions of -CURRENT will break with these flags but testing
 # indicates these older versions won't run Mono anyway
 #
-	*-*-*freebsd5)
+	*-*-*freebsd5*)
 		platform_win32=3Dno
 		if test "x$PTHREAD_CFLAGS" =3D "x"; then
 			CPPFLAGS=3D"$CPPFLAGS -DGC_FREEBSD_THREADS"
@@ -119,6 +120,7 @@
 # but NOT library support)
 #
 		with_nptl=3Dno
+		with_tls=3Dpthread
 		;;
 	*-*-*openbsd*)
 		platform_win32=3Dno
@@ -706,7 +708,17 @@
 	dnl *****************************
 	dnl *** Checks for libpthread ***
 	dnl *****************************
-	AC_CHECK_LIB(pthread, main, LIBS=3D"$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=3D"$LIBS -pthread")
+		;;
+		*)
+			AC_CHECK_LIB(pthread, main, LIBS=3D"$LIBS -lpthread")
+		;;
+	esac
 	AC_CHECK_HEADERS(pthread.h)
 	AC_CHECK_FUNCS(pthread_mutex_timedlock)
 	AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np)

--a8Wt8u1KmwUX3Y2C--

--v9Ux+11Zm5mwPlX6
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFBBwY5vBSBfjNhsrIRAtw6AJ93ONkeleoRSxY2w48P08YRYux2NgCeJSac
TWtlxOQHt4iOVZ/p7xggv84=
=vBfE
-----END PGP SIGNATURE-----

--v9Ux+11Zm5mwPlX6--