+2011-05-05 Ben Key <bkey76@gmail.com>
+
+ * configure.bat: Added support for --cflags and --ldflags
+ options that include quotes as long as command extensions are
+ enabled. Specifically when -I, -L, and similar flags are used
+ to specify supplementary include and library directories a
+ directory name that includes spaces may now be used if it is
+ enclosed in quotes.
+
+ * INSTALL: Documented the change to configure.bat.
+
2011-05-04 Juanma Barranquero <lekktu@gmail.com>
* INSTALL: Clarify GnuTLS support.
be displayed informing you that "using parameters that include the =
character by enclosing them in quotes will not be supported."
+ You may also use the --cflags and --ldflags options to pass
+ additional parameters to the compiler and linker, respectively; they
+ are frequently used to pass -I and -L flags to specify supplementary
+ include and library directories. If a directory name includes
+ spaces, you will need to enclose it in quotes, as follows
+ -I"C:/Program Files/GnuTLS-2.10.1/include". Note that only the
+ directory name is enclosed in quotes, not the entire argument. Also
+ note that this functionality is only supported if command extensions
+ are available. If command extensions are disabled and you attempt to
+ use this functionality you may see the following warning message
+ "Error in --cflags argument: ... Backslashes and quotes cannot be
+ used with --cflags. Please use forward slashes for filenames and
+ paths (e.g. when passing directories to -I)."
+
N.B. It is normal to see a few error messages output while configure
is running, when gcc support is being tested. These cannot be
suppressed because of limitations in the Windows 9X command.com shell.
set nocygwin=N\r
set COMPILER=\r
set usercflags=\r
+set fusercflags=\r
set docflags=\r
set userldflags=\r
+set fuserldflags=\r
set extrauserlibs=\r
set doldflags=\r
set doextralibs=\r
:ucflagex\r
shift\r
set usercflags=%usercflags%%sep1%%~1\r
+set fusercflags=%usercflags:"=\"%\r
set sep1= %nothing%\r
shift\r
goto again\r
:ucflagne\r
shift\r
set usercflags=%usercflags%%sep1%%1\r
+set fusercflags=%usercflags%\r
set sep1= %nothing%\r
shift\r
goto again\r
:ulflagex\r
shift\r
set userldflags=%userldflags%%sep2%%~1\r
+set fuserldflags=%userldflags:"=\"%\r
set sep2= %nothing%\r
shift\r
goto again\r
:ulflagne\r
shift\r
set userldflags=%userldflags%%sep2%%1\r
+set fuserldflags=%userldflags%\r
set sep2= %nothing%\r
shift\r
goto again\r
:chkuser\r
rm -f junk.o\r
echo int main (int argc, char *argv[]) {>junk.c\r
-echo char *usercflags = "%usercflags%";>>junk.c\r
+echo char *usercflags = "%fusercflags%";>>junk.c\r
echo }>>junk.c\r
echo gcc -Werror -c junk.c >>config.log\r
gcc -Werror -c junk.c >>config.log 2>&1\r
echo /* Start of settings from configure.bat. */ >>config.tmp\r
rem We write USER_CFLAGS and USER_LDFLAGS starting with a space to simplify\r
rem processing of compiler options in w32.c:get_emacs_configuration_options\r
-if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp\r
-if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp\r
+if (%docflags%) == (Y) echo #define USER_CFLAGS " %fusercflags%">>config.tmp\r
+if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %fuserldflags%">>config.tmp\r
if (%profile%) == (Y) echo #define PROFILING 1 >>config.tmp\r
if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp\r
if not "(%HAVE_GNUTLS%)" == "()" echo #define HAVE_GNUTLS 1 >>config.tmp\r