diff options
| author | Juanma Barranquero | 2003-01-31 07:23:20 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2003-01-31 07:23:20 +0000 |
| commit | 12ff2dc5df0a90aa462803505d7cc3b2df98c39a (patch) | |
| tree | 78e5d16b853ed466780816b2681edc5de77ae1f2 | |
| parent | 1ffb278b0dbe207495f5b2fc08fb5cf4f1bc0fb2 (diff) | |
| download | emacs-12ff2dc5df0a90aa462803505d7cc3b2df98c39a.tar.gz emacs-12ff2dc5df0a90aa462803505d7cc3b2df98c39a.zip | |
Automatically detect giflib.
| -rwxr-xr-x | nt/configure.bat | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/nt/configure.bat b/nt/configure.bat index ea0486cf5cf..384c37641ac 100755 --- a/nt/configure.bat +++ b/nt/configure.bat | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | rem ---------------------------------------------------------------------- | 2 | rem ---------------------------------------------------------------------- |
| 3 | rem Configuration script for MS Windows 95/98 and NT/2000 | 3 | rem Configuration script for MS Windows 95/98/Me and NT/2000/XP |
| 4 | rem Copyright (C) 1999-2001 Free Software Foundation, Inc. | 4 | rem Copyright (C) 1999-2003 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | rem This file is part of GNU Emacs. | 6 | rem This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -22,7 +22,7 @@ rem Boston, MA 02111-1307, USA. | |||
| 22 | rem ---------------------------------------------------------------------- | 22 | rem ---------------------------------------------------------------------- |
| 23 | rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: | 23 | rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: |
| 24 | rem | 24 | rem |
| 25 | rem + MS Windows 95/98 or NT/2000 | 25 | rem + MS Windows 95/98/Me or NT/2000/XP |
| 26 | rem + either MSVC 2.x or later, or gcc-2.95 or later (with gmake 3.75 | 26 | rem + either MSVC 2.x or later, or gcc-2.95 or later (with gmake 3.75 |
| 27 | rem or later) and the Mingw32 and W32 API headers and libraries | 27 | rem or later) and the Mingw32 and W32 API headers and libraries |
| 28 | rem | 28 | rem |
| @@ -87,6 +87,7 @@ if "%1" == "--cflags" goto usercflags | |||
| 87 | if "%1" == "--ldflags" goto userldflags | 87 | 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" == "" goto checkutils | 91 | if "%1" == "" goto checkutils |
| 91 | :usage | 92 | :usage |
| 92 | echo Usage: configure [options] | 93 | echo Usage: configure [options] |
| @@ -101,6 +102,7 @@ echo. --cflags FLAG pass FLAG to compiler | |||
| 101 | echo. --ldflags FLAG pass FLAG to compiler when linking | 102 | echo. --ldflags FLAG pass FLAG to compiler when linking |
| 102 | echo. --without-png do not use libpng even if it is installed | 103 | echo. --without-png do not use libpng even if it is installed |
| 103 | echo. --without-jpeg do not use jpeglib even if it is installed | 104 | 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 | ||
| 104 | goto end | 106 | goto end |
| 105 | rem ---------------------------------------------------------------------- | 107 | rem ---------------------------------------------------------------------- |
| 106 | :setprefix | 108 | :setprefix |
| @@ -164,6 +166,14 @@ shift | |||
| 164 | goto again | 166 | goto again |
| 165 | 167 | ||
| 166 | rem ---------------------------------------------------------------------- | 168 | rem ---------------------------------------------------------------------- |
| 169 | |||
| 170 | :withoutgif | ||
| 171 | set gifsupport=N | ||
| 172 | set HAVE_GIF= | ||
| 173 | shift | ||
| 174 | goto again | ||
| 175 | |||
| 176 | rem ---------------------------------------------------------------------- | ||
| 167 | rem Check that necessary utilities (cp and rm) are present. | 177 | rem Check that necessary utilities (cp and rm) are present. |
| 168 | :checkutils | 178 | :checkutils |
| 169 | echo Checking for 'cp'... | 179 | echo Checking for 'cp'... |
| @@ -286,7 +296,7 @@ rm -f junk.c junk.obj | |||
| 286 | 296 | ||
| 287 | if (%jpegsupport%) == (N) goto jpegDone | 297 | if (%jpegsupport%) == (N) goto jpegDone |
| 288 | 298 | ||
| 289 | echo Checking for jpeg ... | 299 | echo Checking for jpeg... |
| 290 | echo #include "jconfig.h" >junk.c | 300 | echo #include "jconfig.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. |
| @@ -304,6 +314,26 @@ set HAVE_JPEG=1 | |||
| 304 | :jpegDone | 314 | :jpegDone |
| 305 | rm -f junk.c junk.obj | 315 | rm -f junk.c junk.obj |
| 306 | 316 | ||
| 317 | if (%gifsupport%) == (N) goto gifDone | ||
| 318 | |||
| 319 | echo Checking for gif... | ||
| 320 | echo #include "gif_lib.h" >junk.c | ||
| 321 | echo main (){} >>junk.c | ||
| 322 | rem -o option is ignored with cl, but allows result to be consistent. | ||
| 323 | %COMPILER% %usercflags% -c junk.c -o junk.obj | ||
| 324 | if exist junk.obj goto haveGif | ||
| 325 | |||
| 326 | echo ...building without GIF support. | ||
| 327 | set HAVE_GIF= | ||
| 328 | goto :gifDone | ||
| 329 | |||
| 330 | :haveGif | ||
| 331 | echo ...GIF header available, building with GIF support. | ||
| 332 | set HAVE_GIF=1 | ||
| 333 | |||
| 334 | :gifDone | ||
| 335 | rm -f junk.c junk.obj | ||
| 336 | |||
| 307 | rem ---------------------------------------------------------------------- | 337 | rem ---------------------------------------------------------------------- |
| 308 | :genmakefiles | 338 | :genmakefiles |
| 309 | echo Generating makefiles | 339 | echo Generating makefiles |
| @@ -332,6 +362,7 @@ if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>..\src | |||
| 332 | if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>..\src\config.h | 362 | if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>..\src\config.h |
| 333 | if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h | 363 | if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h |
| 334 | if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h | 364 | 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 | ||
| 335 | echo /* End of settings from configure.bat. */ >>..\src\config.h | 366 | echo /* End of settings from configure.bat. */ >>..\src\config.h |
| 336 | 367 | ||
| 337 | copy paths.h ..\src\epaths.h | 368 | copy paths.h ..\src\epaths.h |