libmudflap: PR 21724, mf-runtime.h install path

Frank Ch. Eigler fche@redhat.com
Wed Jun 21 16:56:00 GMT 2006


Hi -

I just realized that this old installation bug that some described as
a regression wasn't fixed yet.  Committed to mainline.

- FChE

+2006-06-21  Frank Ch. Eigler  <fche@redhat.com>
+
+	PR 21274
+	mf-runtime.h installation based on ssp patch for PR 26473 from
+	Mark Mitchell  <mark@codesourcery.com>.
+	* configure.ac (ACX_NONCANONICAL_TARGET): Use it.
+	* Makefile.am (target_noncanonical): Define.
+	(libsubincludedir): New variable.
+	(nobase_libsubinclude_HEADERS): Add mf-runtime.h.
+	(include_HEADERS): Remove.
+	* configure, aclocal.m4, config.h.in: Regenerated.
+	* Makefile.in, testsuite/Makefile.in: Likewise.
+	* mf-runtime.h: Add #ifndef protection for conflicting _REENTRANT
+	and _THREAD_SAFE redefinition values.
+

Index: configure.ac
===================================================================
--- configure.ac	(revision 114852)
+++ configure.ac	(working copy)
@@ -1,10 +1,11 @@
 # Process this file with autoconf to produce a configure script, like so:
-# aclocal && autoconf && autoheader && automake
+# aclocal -I .. -I ../config && autoconf && autoheader && automake
 
 AC_PREREQ(2.59)
 AC_INIT(libmudflap, 1.0)
 AC_CONFIG_SRCDIR(mf-runtime.c)
 AC_CANONICAL_SYSTEM
+ACX_NONCANONICAL_TARGET
 
 AM_INIT_AUTOMAKE
 
@@ -175,6 +176,9 @@
 AC_SUBST(toolexecdir)
 AC_SUBST(toolexeclibdir)
 
+includedir=${toolexecdir}/include
+AC_SUBST(includedir)
+
 pthread_create_version='""'
 if test "x$enable_shared" = "xyes" && test "x$posix_threads" != "x"; then
   # NB: don't check for -lpthread here, because then it would be
Index: mf-runtime.h
===================================================================
--- mf-runtime.h	(revision 114852)
+++ mf-runtime.h	(working copy)
@@ -55,9 +55,13 @@
 /* Multithreading support.  */
 #ifdef _MUDFLAPTH
 /* extern pthread_mutex_t __mf_biglock; */
+#ifndef _REENTRANT
 #define _REENTRANT
+#endif
+#ifndef _THREAD_SAFE
 #define _THREAD_SAFE
 #endif
+#endif
 
 /* Codes to describe the type of access to check: __mf_check arg 3 */
 
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 114852)
+++ Makefile.am	(working copy)
@@ -22,7 +22,9 @@
 endif
 
 toolexeclib_LTLIBRARIES = libmudflap.la $(libmudflapth)
-include_HEADERS = mf-runtime.h
+target_noncanonical = @target_noncanonical@
+libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
+nobase_libsubinclude_HEADERS = mf-runtime.h
 
 
 libmudflap_la_SOURCES = \



More information about the Gcc-patches mailing list