From b008a626f8337a45b1445b9f287ec47ac685501e Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Fri, 4 May 2012 22:20:14 +0100 Subject: [PATCH] glib: don't modify Makefile.am The new -define flag DISABLE_GTHREAD_CHECK can be added at configure time to already existing $CSFLAGS, as Mike Kestner pointed out. --- configure.ac | 9 +++++---- glib/Makefile.am | 8 +------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index b90e5af31..c7611abaf 100644 --- a/configure.ac +++ b/configure.ac @@ -82,9 +82,6 @@ AC_ARG_ENABLE(debug, [ --enable-debug Build debugger (.mdb) files for ) fi -CSFLAGS="$DEBUG_FLAGS $WIN64DEFINES" -AC_SUBST(CSFLAGS) - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "x$PKG_CONFIG" = "xno"; then AC_MSG_ERROR([You need to install pkg-config]) @@ -176,10 +173,14 @@ PKG_CHECK_MODULES(GIO, gio-2.0 >= $GLIB_REQUIRED_VERSION) AC_SUBST(GIO_CFLAGS) AC_SUBST(GIO_LIBS) +CSFLAGS="$DEBUG_FLAGS $WIN64DEFINES" PKG_CHECK_MODULES(GLIB_2_31, glib-2.0 >= 2.31, HAVE_GLIB_2_31_OR_HIGHER=yes, HAVE_GLIB_2_31_OR_HIGHER=no) -AM_CONDITIONAL(DISABLE_GTHREAD_CHECK, test "x$HAVE_GLIB_2_31_OR_HIGHER" = "xyes") +if test "x$HAVE_GLIB_2_31_OR_HIGHER" = "xyes" ; then + CSFLAGS="$CSFLAGS -define:DISABLE_GTHREAD_CHECK" +fi +AC_SUBST(CSFLAGS) PKG_CHECK_MODULES(PANGO, pango) AC_SUBST(PANGO_CFLAGS) diff --git a/glib/Makefile.am b/glib/Makefile.am index c1f82f4b8..d10c3ba20 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -81,15 +81,9 @@ EXTRA_DIST = \ glib-sharp-3.0.pc.in \ glib-api.xml -if DISABLE_GTHREAD_CHECK -BUILD_DEFINES=-define:DISABLE_GTHREAD_CHECK -else -BUILD_DEFINES= -endif - $(ASSEMBLY): $(build_sources) $(SNK) @rm -f $(ASSEMBLY).mdb - $(CSC) $(CSFLAGS) -keyfile:$(SNK) -unsafe -out:$(ASSEMBLY) -target:library $(references) $(build_sources) $(BUILD_DEFINES) + $(CSC) $(CSFLAGS) -keyfile:$(SNK) -unsafe -out:$(ASSEMBLY) -target:library $(references) $(build_sources) policy.%.config: $(top_builddir)/policy.config sed -e "s/@ASSEMBLY_NAME@/$(ASSEMBLY_NAME)/" -e "s/@POLICY@/$*/" $(top_builddir)/policy.config > $@