Subject: Re: bug#6820: 24.0.50; Corrupt system-configuration-options variable when using forward slashes
From: Juanma Barranquero <[email-masked]>
To: Christoph <[email-masked]>
Cc: [email-masked]
Date: Thu, 23 Sep 2010 01:22:45 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> On Windows, the following warning appears when specifying compiler flags for
> configure.bat with forward slashes:
>
> gcc -I. -c -gdwarf-2 -g3 -mno-cygwin -mtune=pentium4 -O2 -DENABLE_CHECKING
> -DXASSERTS -fno-crossjumping -IC:\Progra~2\GnuWin32\include
> -ID:\devel\emacs\libXpm-3.5.8\include -ID:\devel\emacs\libXpm-3.5.8\src
> -Demacs=1 -DHAVE_CONFIG_H -I../nt/inc -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1 -o
> oo-spd/i386/w32.o w32.c

You mean backslashes. :-)

Currently we don't support passing backslashes or quotes in arguments
to the --cflags configure.bat option, because as you point out they
break compilation of w32.c:get_emacs_configuration_options.

There's no easy way to fix that from configure.bat in a simple and
portable way; the next best fix is just err out with a clear message
when running configure.bat so the user can react immediately, instead
of getting a not-so-clear error or warning during compilation.

I've implemented the check only for GCC because I don't have access to
MSVC; but it should be trivial to add if MSVC has some command option
similar to GCC's -Werror (turn any warning into an error).

    Juanma