aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xnt/configure.bat63
1 files changed, 53 insertions, 10 deletions
diff --git a/nt/configure.bat b/nt/configure.bat
index 216420873c7..40a1e64eab3 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -1,7 +1,8 @@
1@echo off 1@echo off
2rem ---------------------------------------------------------------------- 2rem ----------------------------------------------------------------------
3rem Configuration script for MS Windows 95/98/Me and NT/2000/XP 3rem Configuration script for MS Windows 95/98/Me and NT/2000/XP
4rem Copyright (C) 1999-2003 Free Software Foundation, Inc. 4rem Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
5rem Free Software Foundation, Inc.
5 6
6rem This file is part of GNU Emacs. 7rem This file is part of GNU Emacs.
7 8
@@ -47,6 +48,8 @@ rem [3] requires LC_MESSAGES support to build; maybe 2.95.x update to
47rem cygwin provides this? 48rem cygwin provides this?
48rem 49rem
49 50
51if exist config.log del config.log
52
50rem ---------------------------------------------------------------------- 53rem ----------------------------------------------------------------------
51rem See if the environment is large enough. We need 43 (?) bytes. 54rem See if the environment is large enough. We need 43 (?) bytes.
52set $foo$=123456789_123456789_123456789_123456789_123 55set $foo$=123456789_123456789_123456789_123456789_123
@@ -236,13 +239,17 @@ if (%nocygwin%) == (Y) goto chkapi
236echo Checking whether gcc requires '-mno-cygwin'... 239echo Checking whether gcc requires '-mno-cygwin'...
237echo #include "cygwin/version.h" >junk.c 240echo #include "cygwin/version.h" >junk.c
238echo main(){} >>junk.c 241echo main(){} >>junk.c
239gcc -c junk.c 242echo gcc -c junk.c >>config.log
243gcc -c junk.c >>config.log 2>&1
240if not exist junk.o goto chkapi 244if not exist junk.o goto chkapi
241gcc -mno-cygwin -c junk.c 245echo gcc -mno-cygwin -c junk.c >>config.log
246gcc -mno-cygwin -c junk.c >>config.log 2>&1
242if exist junk.o set nocygwin=Y 247if exist junk.o set nocygwin=Y
243rm -f junk.c junk.o 248rm -f junk.c junk.o
244 249
245:chkapi 250:chkapi
251echo The failed program was: >>config.log
252type junk.c >>config.log
246rem ---------------------------------------------------------------------- 253rem ----------------------------------------------------------------------
247rem Older versions of the Windows API headers either don't have any of 254rem Older versions of the Windows API headers either don't have any of
248rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1 255rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1
@@ -263,9 +270,13 @@ set cf=%usercflags% -mno-cygwin
263:chkapi2 270:chkapi2
264echo on 271echo on
265gcc %cf% -c junk.c 272gcc %cf% -c junk.c
266echo off 273@echo off
274@echo gcc %cf% -c junk.c >>config.log
275gcc %cf% -c junk.c >>config.log 2>&1
267set cf= 276set cf=
268if exist junk.o goto gccOk 277if exist junk.o goto gccOk
278echo The failed program was: >>config.log
279type junk.c >>config.log
269 280
270:nocompiler 281:nocompiler
271echo. 282echo.
@@ -278,8 +289,23 @@ goto end
278 289
279:gccOk 290:gccOk
280set COMPILER=gcc 291set COMPILER=gcc
281rm -f junk.c junk.o
282echo Using 'gcc' 292echo Using 'gcc'
293rm -f junk.c junk.o
294Rem It is not clear what GCC version began supporting -mtune
295Rem and pentium4 on x86, so check this explicitly.
296echo main(){} >junk.c
297echo gcc -c -O2 -mtune=pentium4 junk.c >>config.log
298gcc -c -O2 -mtune=pentium4 junk.c >>config.log 2>&1
299if not errorlevel 1 goto gccMtuneOk
300echo The failed program was: >>config.log
301type junk.c >>config.log
302set mf=-mcpu=i686
303rm -f junk.c junk.o
304goto compilercheckdone
305:gccMtuneOk
306echo GCC supports -mtune=pentium4 >>config.log
307set mf=-mtune=pentium4
308rm -f junk.c junk.o
283goto compilercheckdone 309goto compilercheckdone
284 310
285:clOk 311:clOk
@@ -307,10 +333,13 @@ echo Checking for libpng...
307echo #include "png.h" >junk.c 333echo #include "png.h" >junk.c
308echo main (){} >>junk.c 334echo main (){} >>junk.c
309rem -o option is ignored with cl, but allows result to be consistent. 335rem -o option is ignored with cl, but allows result to be consistent.
310%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err 336echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
337%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log
311if exist junk.obj goto havePng 338if exist junk.obj goto havePng
312 339
313echo ...png.h not found, building without PNG support. 340echo ...png.h not found, building without PNG support.
341echo The failed program was: >>config.log
342type junk.c >>config.log
314set HAVE_PNG= 343set HAVE_PNG=
315goto :pngDone 344goto :pngDone
316 345
@@ -327,10 +356,13 @@ echo Checking for jpeg-6b...
327echo #include "jconfig.h" >junk.c 356echo #include "jconfig.h" >junk.c
328echo main (){} >>junk.c 357echo main (){} >>junk.c
329rem -o option is ignored with cl, but allows result to be consistent. 358rem -o option is ignored with cl, but allows result to be consistent.
330%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err 359echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
360%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log
331if exist junk.obj goto haveJpeg 361if exist junk.obj goto haveJpeg
332 362
333echo ...jconfig.h not found, building without JPEG support. 363echo ...jconfig.h not found, building without JPEG support.
364echo The failed program was: >>config.log
365type junk.c >>config.log
334set HAVE_JPEG= 366set HAVE_JPEG=
335goto :jpegDone 367goto :jpegDone
336 368
@@ -347,10 +379,13 @@ echo Checking for libgif...
347echo #include "gif_lib.h" >junk.c 379echo #include "gif_lib.h" >junk.c
348echo main (){} >>junk.c 380echo main (){} >>junk.c
349rem -o option is ignored with cl, but allows result to be consistent. 381rem -o option is ignored with cl, but allows result to be consistent.
350%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err 382echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
383%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log
351if exist junk.obj goto haveGif 384if exist junk.obj goto haveGif
352 385
353echo ...gif_lib.h not found, building without GIF support. 386echo ...gif_lib.h not found, building without GIF support.
387echo The failed program was: >>config.log
388type junk.c >>config.log
354set HAVE_GIF= 389set HAVE_GIF=
355goto :gifDone 390goto :gifDone
356 391
@@ -367,10 +402,13 @@ echo Checking for tiff...
367echo #include "tiffio.h" >junk.c 402echo #include "tiffio.h" >junk.c
368echo main (){} >>junk.c 403echo main (){} >>junk.c
369rem -o option is ignored with cl, but allows result to be consistent. 404rem -o option is ignored with cl, but allows result to be consistent.
370%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err 405echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
406%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log
371if exist junk.obj goto haveTiff 407if exist junk.obj goto haveTiff
372 408
373echo ...tiffio.h not found, building without TIFF support. 409echo ...tiffio.h not found, building without TIFF support.
410echo The failed program was: >>config.log
411type junk.c >>config.log
374set HAVE_TIFF= 412set HAVE_TIFF=
375goto :tiffDone 413goto :tiffDone
376 414
@@ -388,10 +426,13 @@ echo #define FOR_MSW 1 >junk.c
388echo #include "X11/xpm.h" >>junk.c 426echo #include "X11/xpm.h" >>junk.c
389echo main (){} >>junk.c 427echo main (){} >>junk.c
390rem -o option is ignored with cl, but allows result to be consistent. 428rem -o option is ignored with cl, but allows result to be consistent.
391%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err 429echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
430%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log
392if exist junk.obj goto haveXpm 431if exist junk.obj goto haveXpm
393 432
394echo ...X11/xpm.h not found, building without XPM support. 433echo ...X11/xpm.h not found, building without XPM support.
434echo The failed program was: >>config.log
435type junk.c >>config.log
395set HAVE_XPM= 436set HAVE_XPM=
396goto :xpmDone 437goto :xpmDone
397 438
@@ -414,6 +455,7 @@ rem except when there is a preceding digit, when a space is required.
414rem 455rem
415echo # Start of settings from configure.bat >config.settings 456echo # Start of settings from configure.bat >config.settings
416echo COMPILER=%COMPILER%>>config.settings 457echo COMPILER=%COMPILER%>>config.settings
458if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>config.settings
417if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings 459if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings
418if (%noopt%) == (Y) echo NOOPT=1 >>config.settings 460if (%noopt%) == (Y) echo NOOPT=1 >>config.settings
419if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings 461if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings
@@ -474,6 +516,7 @@ set MAKECMD=
474set usercflags= 516set usercflags=
475set userldflags= 517set userldflags=
476set mingwflag= 518set mingwflag=
519set mf=
477 520
478goto skipArchTag 521goto skipArchTag
479 arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c 522 arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c