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