[PATCH] fix of including /usr/local/include/gc.h problem
KISHIMOTO, Makoto
ksmakoto at dd.iij4u.or.jp
Fri Jan 13 11:07:15 UTC 2012
Hello,
This patch is to fix my problem that I reported.
( http://permalink.gmane.org/gmane.comp.gnome.mono.devel/37788 )
If there is /usr/local/include/gc.h, some compiles in buiding mono
failed by including /usr/local/include/gc.h instead of
$(top_srcdir)/libgc/include/gc.h .
Changes are:
* some files: rename LIBGC_CFLAGS to LIBGC_INCLUDES
* mono/mini/Makefile.am: add setting of INCLUDES, and move
libgc-include flag from mono_CFLAGS
-------------- next part --------------
diff --git a/configure.in b/configure.in
index a22871e..2efedda 100644
--- a/configure.in
+++ b/configure.in
@@ -879,7 +879,7 @@ AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
dnl
dnl Boehm GC configuration
dnl
-LIBGC_CFLAGS=
+LIBGC_INCLUDES=
LIBGC_LIBS=
LIBGC_STATIC_LIBS=
libgc_dir=
@@ -928,7 +928,7 @@ case "x$gc" in
use_included_gc=yes
libgc_dir=libgc
- LIBGC_CFLAGS='-I$(top_srcdir)/libgc/include'
+ LIBGC_INCLUDES='-I$(top_srcdir)/libgc/include'
LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
LIBGC_STATIC_LIBS='$(top_builddir)/libgc/libmonogc-static.la'
@@ -963,7 +963,7 @@ if test "x$large_heap" = "xyes"; then
fi
AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
-AC_SUBST(LIBGC_CFLAGS)
+AC_SUBST(LIBGC_INCLUDES)
AC_SUBST(LIBGC_LIBS)
AC_SUBST(LIBGC_STATIC_LIBS)
AC_SUBST(libgc_dir)
diff --git a/mono/interpreter/Makefile.am b/mono/interpreter/Makefile.am
index 4b21cbb..ba477b8 100644
--- a/mono/interpreter/Makefile.am
+++ b/mono/interpreter/Makefile.am
@@ -1,6 +1,6 @@
INCLUDES = \
-I$(top_srcdir) \
- $(LIBGC_CFLAGS) \
+ $(LIBGC_INCLUDES) \
$(GLIB_CFLAGS)
if HOST_WIN32
diff --git a/mono/io-layer/Makefile.am b/mono/io-layer/Makefile.am
index 31680d2..dedb2f6 100644
--- a/mono/io-layer/Makefile.am
+++ b/mono/io-layer/Makefile.am
@@ -3,7 +3,7 @@ noinst_LTLIBRARIES = libwapi.la
INCLUDES = \
$(GLIB_CFLAGS) \
- $(LIBGC_CFLAGS) \
+ $(LIBGC_INCLUDES) \
-DMONO_BINDIR=\""$(bindir)"\" \
-I$(top_srcdir)
diff --git a/mono/metadata/Makefile.am b/mono/metadata/Makefile.am
index 3ce5dcf..134e1a7 100644
--- a/mono/metadata/Makefile.am
+++ b/mono/metadata/Makefile.am
@@ -60,7 +60,7 @@ endif
endif
noinst_LTLIBRARIES = $(shared_libraries) libmonoruntime-static.la $(sgen_libraries) $(moonlight_libraries)
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_INCLUDES) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
#
# Make sure any prefix changes are updated in the binaries too.
diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am
index 54adb84..edc4909 100644
--- a/mono/mini/Makefile.am
+++ b/mono/mini/Makefile.am
@@ -139,7 +139,9 @@ endif
mono_SOURCES = \
main.c
-mono_CFLAGS = $(AM_CFLAGS) $(BOEHM_DEFINES) $(LIBGC_CFLAGS)
+mono_CFLAGS = $(AM_CFLAGS) $(BOEHM_DEFINES)
+
+INCLUDES = $(LIBGC_INCLUDES)
mono_sgen_SOURCES = $(mono_SOURCES)
mono_sgen_CFLAGS = $(SGEN_DEFINES) $(AM_CFLAGS)
diff --git a/mono/utils/Makefile.am b/mono/utils/Makefile.am
index d49c5d6..2f69800 100644
--- a/mono/utils/Makefile.am
+++ b/mono/utils/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libmonoutils.la
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS)
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_INCLUDES) $(GLIB_CFLAGS)
if ENABLE_DTRACE
More information about the freebsd-mono
mailing list