[Epiphany] patch: don't clobber CXXFLAGS



The configure sets stuff in CXXFLAGS, which is liable to be clobbered by
the user overriding these for whatever reason.  It should use
AM_CXXFLAGS.   Here's a patch, which appears to work OK.  This fixes the
problems with this I encountered while packaging Epiphany for Debian.

-- Edd
 
Index: configure.in
===================================================================
RCS file: /cvs/gnome/epiphany/configure.in,v
retrieving revision 1.34
diff -u -r1.34 configure.in
--- configure.in	15 Apr 2003 06:51:59 -0000	1.34
+++ configure.in	3 May 2003 14:41:52 -0000
@@ -43,6 +43,8 @@
 AC_PROG_INTLTOOL
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
 
+AC_SUBST(AM_CXXFLAGS)
+
 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
 
 GNOME_DEBUG_CHECK
@@ -121,14 +123,14 @@
 dnl whether to build with DEBUG defined
 AC_ARG_WITH(mozilla-debug,
 	[  --with-mozilla-debug        Use a debug mozilla build],
-	CXXFLAGS="-DDEBUG $CXXFLAGS",)
+	AM_CXXFLAGS="-DDEBUG $AM_CXXFLAGS",)
 
 AC_ARG_ENABLE(cpp-rtti,
         [  --enable-cpp-rtti       Enable C++ RTTI (for cvs gcc)],,
         enable_cpp_rtti=no)
 
 if test "x$enable_cpp_rtti" = "xno"; then
-  CXXFLAGS="-fno-rtti $CXXFLAGS"
+  AM_CXXFLAGS="-fno-rtti $AM_CXXFLAGS"
 fi
 
 dnl Specify the gconf configuration source, 
@@ -152,7 +154,9 @@
 dnl only have short-wchar support for c++.
 AC_LANG_PUSH(C++)
 _SAVE_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="$CXXFLAGS -fshort-wchar"
+_SAVE_AM_CXXFLAGS=$AM_CXXFLAGS
+AM_CXXFLAGS="$AM_CXXFLAGS -fshort-wchar"
+CXXFLAGS="$CXXFLAGS $AM_CXXFLAGS"
 
 AC_CACHE_CHECK(for compiler -fshort-wchar option,
     ac_cv_have_usable_wchar_option,
@@ -165,8 +169,9 @@
                 ac_cv_have_usable_wchar_option="maybe")])
 
 if test "$ac_cv_have_usable_wchar_option" != "yes"; then
-    CXXFLAGS=$_SAVE_CXXFLAGS
+    AM_CXXFLAGS=$_SAVE_AM_CXXFLAGS
 fi
+CXXFLAGS=$_SAVE_CXXFLAGS
 AC_LANG_POP(C++)
 
 AC_MSG_CHECKING(for mozilla version)


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