+2007-10-20 Eli Zaretskii <eliz@gnu.org>
+
+ * configure.bat (docflags, doldflags): New variables.
+ (genmakefiles): Use them to work around problems with whitespace
+ in arguments of the `if' command.
+
2007-10-18 Jason Rumney <jasonr@gnu.org>
* makefile.w32-in (install): Install COPYING in top-level and bin dirs.
set nocygwin=N\r
set COMPILER=\r
set usercflags=\r
+set docflags=\r
set userldflags=\r
+set doldflags=\r
set sep1=\r
set sep2=\r
\r
if (%noopt%) == (Y) echo NOOPT=1 >>config.settings\r
if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings\r
if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings\r
-if not "(%usercflags%)" == "()" echo USER_CFLAGS=%usercflags%>>config.settings\r
-if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.settings\r
+rem We go thru docflags because usercflags could be "-DFOO=bar" -something\r
+rem and the if command cannot cope with this\r
+for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y\r
+if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings\r
+for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y\r
+if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings\r
echo # End of settings from configure.bat>>config.settings\r
echo. >>config.settings\r
\r
copy config.nt config.tmp\r
echo. >>config.tmp\r
echo /* Start of settings from configure.bat. */ >>config.tmp\r
-if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>config.tmp\r
-if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>config.tmp\r
+if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp\r
+if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp\r
if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp\r
if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp\r
if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp\r