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

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


--Pd0ReVV5GZGQvF3a
Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi"
Content-Disposition: inline


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

See changelog patch (attached) for details.

jmc

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

Index: mono/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.377.2.4
diff -u -r1.377.2.4 ChangeLog
--- mono/ChangeLog	23 Jul 2004 19:32:12 -0000	1.377.2.4
+++ mono/ChangeLog	28 Jul 2004 00:51:58 -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.
+=09
 2004-07-23  Dick Porter  <dick@ximian.com>
=20
 	* configure.in: Changes for FreeBSD thread support by John
Index: mono/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.266.2.3
diff -u -r1.266.2.3 configure.in
--- mono/configure.in	23 Jul 2004 19:32:12 -0000	1.266.2.3
+++ mono/configure.in	28 Jul 2004 00:51:59 -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)

--6c2NcOVqGQ03X4Wi--

--Pd0ReVV5GZGQvF3a
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFBBwdDvBSBfjNhsrIRAojFAKCQsdfCrGJ4/3iySW6/XM7H9xkUSwCgiDu8
DtxFTaPycMG8GgCVPYhlkDQ=
=H+Y1
-----END PGP SIGNATURE-----

--Pd0ReVV5GZGQvF3a--