Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] (PR#11320) [C++] Support for CXXFLAGS in configure.ac
Home

[Freeciv-Dev] (PR#11320) [C++] Support for CXXFLAGS in configure.ac

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#11320) [C++] Support for CXXFLAGS in configure.ac
From: "Frédéric Brière" <fbriere@xxxxxxxxxxx>
Date: Fri, 3 Dec 2004 11:34:56 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11320 >

Here's a patch that adds support for CXX, CXXFLAGS and the like to
configure.ac, as well as CLIENT_CXXFLAGS.


-- 
             Frédéric Brière    <*>    fbriere@xxxxxxxxxxx

 =>  <fbriere@xxxxxxxxxx> IS NO MORE:  <http://www.abacomsucks.com>  <=

Index: configure.ac
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.ac,v
retrieving revision 1.87
diff -u -r1.87 configure.ac
--- configure.ac        2 Dec 2004 09:51:22 -0000       1.87
+++ configure.ac        3 Dec 2004 19:28:22 -0000
@@ -136,6 +136,7 @@
 AC_PROG_AWK
 AC_PROG_CC
 AC_PROG_CPP
+AC_PROG_CXX
 AC_PROG_LN_S
 AC_PROG_RANLIB
 AC_CHECK_TOOL(AR, ar)
@@ -256,10 +257,13 @@
 fi
 
 EXTRA_GCC_DEBUG_CFLAGS=""
+EXTRA_GCC_DEBUG_CXXFLAGS=""
 
 if test -n "$GCC"; then
    EXTRA_GCC_DEBUG_CFLAGS="$CFLAGS"
+   EXTRA_GCC_DEBUG_CXXFLAGS="$CXXFLAGS"
    CFLAGS="-Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes 
-Wmissing-declarations"
+   CXXFLAGS="-Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes"
 fi
 
 FC_DEBUG
@@ -419,6 +423,7 @@
 
 AC_SUBST(gui_sources)
 AC_SUBST(CLIENT_CFLAGS)
+AC_SUBST(CLIENT_CXXFLAGS)
 AC_SUBST(CLIENT_LIBS)
 AC_SUBST(CLIENT_LDFLAGS)
 AC_SUBST(SOUND_CFLAGS)
@@ -632,18 +637,20 @@
 
 if test -n "$GCC"; then
   CFLAGS="$EXTRA_GCC_DEBUG_CFLAGS $CFLAGS"
+  CXXFLAGS="$EXTRA_GCC_DEBUG_CXXFLAGS $CXXFLAGS"
 fi
 
 dnl Rebuild 'configure' whenever version.in changes, if maintainer mode 
enabled.
 AC_SUBST([CONFIGURE_DEPENDENCIES], ["$CONFIGURE_DEPENDENCIES 
\$(top_srcdir)/version.in"])
 
-dnl Make sure that config.h changes when ever CPPFLAGS or CFLAGS
+dnl Make sure that config.h changes when ever CPPFLAGS, CFLAGS or CXXFLAGS
 dnl change so everything gets rebuilt. LDFLAGS is not handled here
 dnl since change in it should not cause recompilation, only relinking.
 dnl Note: Variables are named FC_STORE_* instead of FC_*_STORE in order to 
make them
 dnl       appear next to each other in config.h.
 AC_DEFINE_UNQUOTED([FC_STORE_CPPFLAGS], ["$CPPFLAGS"], [These are the CPPFLAGS 
used in compilation])
 AC_DEFINE_UNQUOTED([FC_STORE_CFLAGS], ["$CFLAGS"], [These are the CFLAGS used 
in compilation])
+AC_DEFINE_UNQUOTED([FC_STORE_CXXFLAGS], ["$CXXFLAGS"], [These are the CXXFLAGS 
used in compilation])
 
 AC_CONFIG_FILES([Makefile
           data/Makefile 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#11320) [C++] Support for CXXFLAGS in configure.ac, Frédéric Brière <=