summaryrefslogtreecommitdiff
path: root/nt/configure.bat
diff options
context:
space:
mode:
authorBen Key <bkey76@gmail.com>2011-05-04 21:56:16 -0500
committerBen Key <bkey76@gmail.com>2011-05-04 21:56:16 -0500
commitd429d8e9c3212f87077777dc94f72f33c726cade (patch)
treee4ce9ccbf37c457297a6a0bacb933cffb1128a7c /nt/configure.bat
parent520cf78a0f22ba25630f2541e7191bc62b43c6f1 (diff)
downloademacs-d429d8e9c3212f87077777dc94f72f33c726cade.tar.gz
* 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.
Diffstat (limited to 'nt/configure.bat')
-rwxr-xr-xnt/configure.bat12
1 files changed, 9 insertions, 3 deletions
diff --git a/nt/configure.bat b/nt/configure.bat
index 7642d8244f8..63d94972d81 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -97,8 +97,10 @@ set profile=N
set nocygwin=N
set COMPILER=
set usercflags=
+set fusercflags=
set docflags=
set userldflags=
+set fuserldflags=
set extrauserlibs=
set doldflags=
set doextralibs=
@@ -238,6 +240,7 @@ goto ucflagne
:ucflagex
shift
set usercflags=%usercflags%%sep1%%~1
+set fusercflags=%usercflags:"=\"%
set sep1= %nothing%
shift
goto again
@@ -245,6 +248,7 @@ goto again
:ucflagne
shift
set usercflags=%usercflags%%sep1%%1
+set fusercflags=%usercflags%
set sep1= %nothing%
shift
goto again
@@ -266,6 +270,7 @@ goto ulflagne
:ulflagex
shift
set userldflags=%userldflags%%sep2%%~1
+set fuserldflags=%userldflags:"=\"%
set sep2= %nothing%
shift
goto again
@@ -273,6 +278,7 @@ goto again
:ulflagne
shift
set userldflags=%userldflags%%sep2%%1
+set fuserldflags=%userldflags%
set sep2= %nothing%
shift
goto again
@@ -437,7 +443,7 @@ goto nocompiler
:chkuser
rm -f junk.o
echo int main (int argc, char *argv[]) {>junk.c
-echo char *usercflags = "%usercflags%";>>junk.c
+echo char *usercflags = "%fusercflags%";>>junk.c
echo }>>junk.c
echo gcc -Werror -c junk.c >>config.log
gcc -Werror -c junk.c >>config.log 2>&1
@@ -745,8 +751,8 @@ echo. >>config.tmp
echo /* Start of settings from configure.bat. */ >>config.tmp
rem We write USER_CFLAGS and USER_LDFLAGS starting with a space to simplify
rem processing of compiler options in w32.c:get_emacs_configuration_options
-if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp
-if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp
+if (%docflags%) == (Y) echo #define USER_CFLAGS " %fusercflags%">>config.tmp
+if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %fuserldflags%">>config.tmp
if (%profile%) == (Y) echo #define PROFILING 1 >>config.tmp
if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp
if not "(%HAVE_GNUTLS%)" == "()" echo #define HAVE_GNUTLS 1 >>config.tmp