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