<URL: http://bugs.freeciv.org/Ticket/Display.html?id=25944 >

> [dmarks - So 26. Nov 2006, 01:52:17]:
> 
> On 11/26/06, Jason Dorje Short <[EMAIL PROTECTED]> wrote:
> >
> > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=25944 >
> >
> > Daniel Markstedt wrote:
> > > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=25944 >
> > >
> > > Make fails on a recent dev snapshot with:
> > >
> > > In file included from intl-compat.c:20:
> > > ../config.h:29:96: missing terminating " character
> > > make[2]: *** [intl-compat.o] Error 1
> > > make[1]: *** [all-recursive] Error 1
> > > make: *** [all] Error 2
> > >
> > > The failing line in config.h is:
> > >
> > > #define FC_STORE_CPPFLAGS "
> > > -DDEFAULT_DATA_PATH="\".:data:~/.freeciv:${prefix}/share/freeciv\"""
> > >
> > > By removing the very last quote ("), the snapshot compiles cleanly.
> > > However, the problem is repeated every time config.h is regenerated.
> >
> > There is nothing wrong with that code.  What compiler are you using that
> > fails on it?
> >
> 
> gcc 3.3
> 
> > Also, using --with-included-gettext is a very bad idea.  I'd remove it
> > if I knew how to do so safely.
> >
> > -jason
> >
> 
> I don't, anymore. See http://rt.freeciv.org/Ticket/Display.html?id=15928
> 
> --Daniel
> 

I guess the problem is the additional quotes in FC_STORE_CPPFLAGS. Now
the line is probably interpreted as multi-line definition:

#define FC_STORE_CPPFLAGS " -DDEFAULT_DATA_PATH="\
                          ".:data:~/.freeciv:${datarootdir}/freeciv\"" "

But this doesn't seem to happen with all compiler versions. 

A possible solution would be to use single quotes for the FC_STORE_*
definitions:

AC_DEFINE_UNQUOTED([FC_STORE_CPPFLAGS], ['$CPPFLAGS'], [These are the
CPPFLAGS used in compilation])

These definitions are never used in Freeciv code, so single quotes
shouldn't be a problem in this case.

Index: configure.ac
===================================================================
--- configure.ac	(Revision 12401)
+++ configure.ac	(Arbeitskopie)
@@ -695,9 +695,9 @@
 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_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
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to