aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2003-01-26 01:25:49 +0000
committerJason Rumney2003-01-26 01:25:49 +0000
commitaad0eae4eb661f763036e1c3f695f4a1806d448b (patch)
treea44c6a0e06c7384d3b18ce0354023b5a429f0b5b
parentafc390dc508524bae2fc43801a44b7c5b522af73 (diff)
downloademacs-aad0eae4eb661f763036e1c3f695f4a1806d448b.tar.gz
emacs-aad0eae4eb661f763036e1c3f695f4a1806d448b.zip
Automatically detect jpeglib.
-rwxr-xr-xnt/configure.bat30
1 files changed, 30 insertions, 0 deletions
diff --git a/nt/configure.bat b/nt/configure.bat
index 2aa477ca628..f284c6b74ec 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -86,6 +86,7 @@ if "%1" == "--no-cygwin" goto nocygwin
86if "%1" == "--cflags" goto usercflags 86if "%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" == "" goto checkutils 90if "%1" == "" goto checkutils
90:usage 91:usage
91echo Usage: configure [options] 92echo Usage: configure [options]
@@ -99,6 +100,7 @@ echo. --no-cygwin use -mno-cygwin option with GCC
99echo. --cflags FLAG pass FLAG to compiler 100echo. --cflags FLAG pass FLAG to compiler
100echo. --ldflags FLAG pass FLAG to compiler when linking 101echo. --ldflags FLAG pass FLAG to compiler when linking
101echo. --without-png do not use libpng even if it is installed 102echo. --without-png do not use libpng even if it is installed
103echo. --without-jpeg do not use jpeglib even if it is installed
102goto end 104goto end
103rem ---------------------------------------------------------------------- 105rem ----------------------------------------------------------------------
104:setprefix 106:setprefix
@@ -153,6 +155,13 @@ set HAVE_PNG=
153goto again 155goto again
154 156
155rem ---------------------------------------------------------------------- 157rem ----------------------------------------------------------------------
158
159:withoutjpeg
160set jpegsupport=N
161set HAVE_JPEG=
162goto again
163
164rem ----------------------------------------------------------------------
156rem Check that necessary utilities (cp and rm) are present. 165rem Check that necessary utilities (cp and rm) are present.
157:checkutils 166:checkutils
158echo Checking for 'cp'... 167echo Checking for 'cp'...
@@ -273,6 +282,26 @@ set HAVE_PNG=1
273:pngDone 282:pngDone
274rm -f junk.c junk.obj 283rm -f junk.c junk.obj
275 284
285if (%jpegsupport%) == (N) goto jpegDone
286
287echo Checking for jpeg ...
288echo #include "jconfig.h" >junk.c
289echo main (){} >>junk.c
290rem -o option is ignored with cl, but allows result to be consistent.
291%COMPILER% %usercflags% -c junk.c -o junk.obj
292if exist junk.obj goto haveJpeg
293
294echo ...building without JPEG support.
295set HAVE_JPEG=
296goto :jpegDone
297
298:haveJpeg
299echo ...JPEG header available, building with JPEG support.
300set HAVE_JPEG=1
301
302:jpegDone
303rm -f junk.c junk.obj
304
276rem ---------------------------------------------------------------------- 305rem ----------------------------------------------------------------------
277:genmakefiles 306:genmakefiles
278echo Generating makefiles 307echo Generating makefiles
@@ -300,6 +329,7 @@ echo /* Start of settings from configure.bat. */ >>..\src\config.h
300if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>..\src\config.h 329if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>..\src\config.h
301if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>..\src\config.h 330if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>..\src\config.h
302if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h 331if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h
332if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h
303echo /* End of settings from configure.bat. */ >>..\src\config.h 333echo /* End of settings from configure.bat. */ >>..\src\config.h
304 334
305copy paths.h ..\src\epaths.h 335copy paths.h ..\src\epaths.h