diff options
| -rwxr-xr-x | nt/configure.bat | 58 |
1 files changed, 45 insertions, 13 deletions
diff --git a/nt/configure.bat b/nt/configure.bat index 8f25217d989..8b7d442a347 100755 --- a/nt/configure.bat +++ b/nt/configure.bat | |||
| @@ -89,6 +89,7 @@ if "%1" == "--without-png" goto withoutpng | |||
| 89 | if "%1" == "--without-jpeg" goto withoutjpeg | 89 | if "%1" == "--without-jpeg" goto withoutjpeg |
| 90 | if "%1" == "--without-gif" goto withoutgif | 90 | if "%1" == "--without-gif" goto withoutgif |
| 91 | if "%1" == "--without-tiff" goto withouttiff | 91 | if "%1" == "--without-tiff" goto withouttiff |
| 92 | if "%1" == "--without-xpm" goto withoutxpm | ||
| 92 | if "%1" == "" goto checkutils | 93 | if "%1" == "" goto checkutils |
| 93 | :usage | 94 | :usage |
| 94 | echo Usage: configure [options] | 95 | echo Usage: configure [options] |
| @@ -102,9 +103,10 @@ echo. --no-cygwin use -mno-cygwin option with GCC | |||
| 102 | echo. --cflags FLAG pass FLAG to compiler | 103 | echo. --cflags FLAG pass FLAG to compiler |
| 103 | echo. --ldflags FLAG pass FLAG to compiler when linking | 104 | echo. --ldflags FLAG pass FLAG to compiler when linking |
| 104 | echo. --without-png do not use libpng even if it is installed | 105 | echo. --without-png do not use libpng even if it is installed |
| 105 | echo. --without-jpeg do not use jpeglib even if it is installed | 106 | echo. --without-jpeg do not use jpeg-6b even if it is installed |
| 106 | echo. --without-gif do not use giflib even if it is installed | 107 | echo. --without-gif do not use libungif even if it is installed |
| 107 | echo. --without-tiff do not use tifflib even if it is installed | 108 | echo. --without-tiff do not use tiff even if it is installed |
| 109 | echo. --without-xpm do not use libXpm even if it is installed | ||
| 108 | goto end | 110 | goto end |
| 109 | rem ---------------------------------------------------------------------- | 111 | rem ---------------------------------------------------------------------- |
| 110 | :setprefix | 112 | :setprefix |
| @@ -184,6 +186,14 @@ shift | |||
| 184 | goto again | 186 | goto again |
| 185 | 187 | ||
| 186 | rem ---------------------------------------------------------------------- | 188 | rem ---------------------------------------------------------------------- |
| 189 | |||
| 190 | :withoutxpm | ||
| 191 | set xpmsupport=N | ||
| 192 | set HAVE_XPM= | ||
| 193 | shift | ||
| 194 | goto again | ||
| 195 | |||
| 196 | rem ---------------------------------------------------------------------- | ||
| 187 | rem Check that necessary utilities (cp and rm) are present. | 197 | rem Check that necessary utilities (cp and rm) are present. |
| 188 | :checkutils | 198 | :checkutils |
| 189 | echo Checking for 'cp'... | 199 | echo Checking for 'cp'... |
| @@ -290,10 +300,10 @@ echo Checking for libpng... | |||
| 290 | echo #include "png.h" >junk.c | 300 | echo #include "png.h" >junk.c |
| 291 | echo main (){} >>junk.c | 301 | echo main (){} >>junk.c |
| 292 | rem -o option is ignored with cl, but allows result to be consistent. | 302 | rem -o option is ignored with cl, but allows result to be consistent. |
| 293 | %COMPILER% %usercflags% -c junk.c -o junk.obj | 303 | %COMPILER% %usercflags% -c junk.c -o junk.obj >junk.out 2>junk.err |
| 294 | if exist junk.obj goto havePng | 304 | if exist junk.obj goto havePng |
| 295 | 305 | ||
| 296 | echo ...building without PNG support. | 306 | echo ...png.h not found, building without PNG support. |
| 297 | set HAVE_PNG= | 307 | set HAVE_PNG= |
| 298 | goto :pngDone | 308 | goto :pngDone |
| 299 | 309 | ||
| @@ -306,14 +316,14 @@ rm -f junk.c junk.obj | |||
| 306 | 316 | ||
| 307 | if (%jpegsupport%) == (N) goto jpegDone | 317 | if (%jpegsupport%) == (N) goto jpegDone |
| 308 | 318 | ||
| 309 | echo Checking for jpeg... | 319 | echo Checking for jpeg-6b... |
| 310 | echo #include "jconfig.h" >junk.c | 320 | echo #include "jconfig.h" >junk.c |
| 311 | echo main (){} >>junk.c | 321 | echo main (){} >>junk.c |
| 312 | rem -o option is ignored with cl, but allows result to be consistent. | 322 | rem -o option is ignored with cl, but allows result to be consistent. |
| 313 | %COMPILER% %usercflags% -c junk.c -o junk.obj | 323 | %COMPILER% %usercflags% -c junk.c -o junk.obj >junk.out 2>junk.err |
| 314 | if exist junk.obj goto haveJpeg | 324 | if exist junk.obj goto haveJpeg |
| 315 | 325 | ||
| 316 | echo ...building without JPEG support. | 326 | echo ...jconfig.h not found, building without JPEG support. |
| 317 | set HAVE_JPEG= | 327 | set HAVE_JPEG= |
| 318 | goto :jpegDone | 328 | goto :jpegDone |
| 319 | 329 | ||
| @@ -326,14 +336,14 @@ rm -f junk.c junk.obj | |||
| 326 | 336 | ||
| 327 | if (%gifsupport%) == (N) goto gifDone | 337 | if (%gifsupport%) == (N) goto gifDone |
| 328 | 338 | ||
| 329 | echo Checking for gif... | 339 | echo Checking for libgif... |
| 330 | echo #include "gif_lib.h" >junk.c | 340 | echo #include "gif_lib.h" >junk.c |
| 331 | echo main (){} >>junk.c | 341 | echo main (){} >>junk.c |
| 332 | rem -o option is ignored with cl, but allows result to be consistent. | 342 | rem -o option is ignored with cl, but allows result to be consistent. |
| 333 | %COMPILER% %usercflags% -c junk.c -o junk.obj | 343 | %COMPILER% %usercflags% -c junk.c -o junk.obj >junk.out 2>junk.err |
| 334 | if exist junk.obj goto haveGif | 344 | if exist junk.obj goto haveGif |
| 335 | 345 | ||
| 336 | echo ...building without GIF support. | 346 | echo ...gif_lib.h not found, building without GIF support. |
| 337 | set HAVE_GIF= | 347 | set HAVE_GIF= |
| 338 | goto :gifDone | 348 | goto :gifDone |
| 339 | 349 | ||
| @@ -350,10 +360,10 @@ echo Checking for tiff... | |||
| 350 | echo #include "tiffio.h" >junk.c | 360 | echo #include "tiffio.h" >junk.c |
| 351 | echo main (){} >>junk.c | 361 | echo main (){} >>junk.c |
| 352 | rem -o option is ignored with cl, but allows result to be consistent. | 362 | rem -o option is ignored with cl, but allows result to be consistent. |
| 353 | %COMPILER% %usercflags% -c junk.c -o junk.obj | 363 | %COMPILER% %usercflags% -c junk.c -o junk.obj >junk.out 2>junk.err |
| 354 | if exist junk.obj goto haveTiff | 364 | if exist junk.obj goto haveTiff |
| 355 | 365 | ||
| 356 | echo ...building without TIFF support. | 366 | echo ...tiffio.h not found, building without TIFF support. |
| 357 | set HAVE_TIFF= | 367 | set HAVE_TIFF= |
| 358 | goto :tiffDone | 368 | goto :tiffDone |
| 359 | 369 | ||
| @@ -364,6 +374,27 @@ set HAVE_TIFF=1 | |||
| 364 | :tiffDone | 374 | :tiffDone |
| 365 | rm -f junk.c junk.obj | 375 | rm -f junk.c junk.obj |
| 366 | 376 | ||
| 377 | if (%xpmsupport%) == (N) goto xpmDone | ||
| 378 | |||
| 379 | echo Checking for libXpm... | ||
| 380 | echo #define FOR_MSW 1 >junk.c | ||
| 381 | echo #include "X11/xpm.h" >>junk.c | ||
| 382 | echo main (){} >>junk.c | ||
| 383 | rem -o option is ignored with cl, but allows result to be consistent. | ||
| 384 | %COMPILER% %usercflags% -c junk.c -o junk.obj >junk.out 2>junk.err | ||
| 385 | if exist junk.obj goto haveXpm | ||
| 386 | |||
| 387 | echo ...X11/xpm.h not found, building without XPM support. | ||
| 388 | set HAVE_XPM= | ||
| 389 | goto :xpmDone | ||
| 390 | |||
| 391 | :haveXpm | ||
| 392 | echo ...XPM header available, building with XPM support. | ||
| 393 | set HAVE_XPM=1 | ||
| 394 | |||
| 395 | :xpmDone | ||
| 396 | rm -f junk.c junk.obj junk.err junk.out | ||
| 397 | |||
| 367 | rem ---------------------------------------------------------------------- | 398 | rem ---------------------------------------------------------------------- |
| 368 | :genmakefiles | 399 | :genmakefiles |
| 369 | echo Generating makefiles | 400 | echo Generating makefiles |
| @@ -394,6 +425,7 @@ if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h | |||
| 394 | if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h | 425 | if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h |
| 395 | if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>..\src\config.h | 426 | if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>..\src\config.h |
| 396 | if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>..\src\config.h | 427 | if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>..\src\config.h |
| 428 | if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>..\src\config.h | ||
| 397 | echo /* End of settings from configure.bat. */ >>..\src\config.h | 429 | echo /* End of settings from configure.bat. */ >>..\src\config.h |
| 398 | 430 | ||
| 399 | copy paths.h ..\src\epaths.h | 431 | copy paths.h ..\src\epaths.h |