diff options
| author | Juanma Barranquero | 2003-01-31 11:03:11 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2003-01-31 11:03:11 +0000 |
| commit | 47c01e802a27c4d7937b2b1ce5b913952f02b95f (patch) | |
| tree | 0a47654d4368a5cfc0d1f8b3615d07acb93aa1e6 | |
| parent | 12b918b2e33eb1c113ed8962fac5a78d591dccbf (diff) | |
| download | emacs-47c01e802a27c4d7937b2b1ce5b913952f02b95f.tar.gz emacs-47c01e802a27c4d7937b2b1ce5b913952f02b95f.zip | |
Automatically detect tifflib.
| -rwxr-xr-x | nt/configure.bat | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nt/configure.bat b/nt/configure.bat index 384c37641ac..8f25217d989 100755 --- a/nt/configure.bat +++ b/nt/configure.bat | |||
| @@ -88,6 +88,7 @@ if "%1" == "--ldflags" goto userldflags | |||
| 88 | if "%1" == "--without-png" goto withoutpng | 88 | 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" == "" goto checkutils | 92 | if "%1" == "" goto checkutils |
| 92 | :usage | 93 | :usage |
| 93 | echo Usage: configure [options] | 94 | echo Usage: configure [options] |
| @@ -103,6 +104,7 @@ echo. --ldflags FLAG pass FLAG to compiler when linking | |||
| 103 | echo. --without-png do not use libpng even if it is installed | 104 | echo. --without-png do not use libpng even if it is installed |
| 104 | echo. --without-jpeg do not use jpeglib even if it is installed | 105 | echo. --without-jpeg do not use jpeglib even if it is installed |
| 105 | echo. --without-gif do not use giflib even if it is installed | 106 | echo. --without-gif do not use giflib even if it is installed |
| 107 | echo. --without-tiff do not use tifflib even if it is installed | ||
| 106 | goto end | 108 | goto end |
| 107 | rem ---------------------------------------------------------------------- | 109 | rem ---------------------------------------------------------------------- |
| 108 | :setprefix | 110 | :setprefix |
| @@ -174,6 +176,14 @@ shift | |||
| 174 | goto again | 176 | goto again |
| 175 | 177 | ||
| 176 | rem ---------------------------------------------------------------------- | 178 | rem ---------------------------------------------------------------------- |
| 179 | |||
| 180 | :withouttiff | ||
| 181 | set tiffsupport=N | ||
| 182 | set HAVE_TIFF= | ||
| 183 | shift | ||
| 184 | goto again | ||
| 185 | |||
| 186 | rem ---------------------------------------------------------------------- | ||
| 177 | rem Check that necessary utilities (cp and rm) are present. | 187 | rem Check that necessary utilities (cp and rm) are present. |
| 178 | :checkutils | 188 | :checkutils |
| 179 | echo Checking for 'cp'... | 189 | echo Checking for 'cp'... |
| @@ -334,6 +344,26 @@ set HAVE_GIF=1 | |||
| 334 | :gifDone | 344 | :gifDone |
| 335 | rm -f junk.c junk.obj | 345 | rm -f junk.c junk.obj |
| 336 | 346 | ||
| 347 | if (%tiffsupport%) == (N) goto tiffDone | ||
| 348 | |||
| 349 | echo Checking for tiff... | ||
| 350 | echo #include "tiffio.h" >junk.c | ||
| 351 | echo main (){} >>junk.c | ||
| 352 | rem -o option is ignored with cl, but allows result to be consistent. | ||
| 353 | %COMPILER% %usercflags% -c junk.c -o junk.obj | ||
| 354 | if exist junk.obj goto haveTiff | ||
| 355 | |||
| 356 | echo ...building without TIFF support. | ||
| 357 | set HAVE_TIFF= | ||
| 358 | goto :tiffDone | ||
| 359 | |||
| 360 | :haveTiff | ||
| 361 | echo ...TIFF header available, building with TIFF support. | ||
| 362 | set HAVE_TIFF=1 | ||
| 363 | |||
| 364 | :tiffDone | ||
| 365 | rm -f junk.c junk.obj | ||
| 366 | |||
| 337 | rem ---------------------------------------------------------------------- | 367 | rem ---------------------------------------------------------------------- |
| 338 | :genmakefiles | 368 | :genmakefiles |
| 339 | echo Generating makefiles | 369 | echo Generating makefiles |
| @@ -363,6 +393,7 @@ if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>..\ | |||
| 363 | if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h | 393 | if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h |
| 364 | if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h | 394 | if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h |
| 365 | if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>..\src\config.h | 395 | 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 | ||
| 366 | echo /* End of settings from configure.bat. */ >>..\src\config.h | 397 | echo /* End of settings from configure.bat. */ >>..\src\config.h |
| 367 | 398 | ||
| 368 | copy paths.h ..\src\epaths.h | 399 | copy paths.h ..\src\epaths.h |