[gtk+] configure: use CFLAGS, etc. _FOR_BUILD as well



commit 14c7b268649ce0c643fcd3009fc81b888ad65b4a
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Jan 2 12:00:10 2014 -0500

    configure: use CFLAGS, etc. _FOR_BUILD as well
    
    When not doing cross-builds, use the values of CFLAGS, CPPFLAGS and
    LDFLAGS as the default value for CFLAGS_FOR_BUILD, CPPFLAGS_FOR_BUILD
    and LDFLAGS_FOR_BUILD, respectively.
    
    This avoids having to manually specify these variables in order to get
    extract-strings to build properly.
    
    This should really be handled by ax_prog_cc_for_build.m4.  That has been
    reported upstream.  This is a workaround for now.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721346

 configure.ac |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 04c8f64..97b1cab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,6 +123,19 @@ m4_define([gail_lt_current_minus_age],[m4_eval(gail_lt_current - gail_lt_age)])
 AC_SUBST([GAIL_LT_VERSION_INFO],[gail_lt_version_info])
 AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
 
+# Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=721346 until fixed upstream in autoconf-archive
+if test "$cross_compiling" = "no"; then
+  if test -n "$CFLAGS"; then
+    CFLAGS_FOR_BUILD=$CFLAGS
+  fi
+  if test -n "$CPPFLAGS"; then
+    CPPFLAGS_FOR_BUILD=$CPPFLAGS
+  fi
+  if test -n "$LDFLAGS"; then
+    LDFLAGS_FOR_BUILD=$LDFLAGS
+  fi
+fi
+
 # Checks for programs.
 AC_PROG_CC
 AX_PROG_CC_FOR_BUILD


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]