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