comparison nt/configure.bat @ 49456:8511f51a1d4f

Automatically detect jpeglib.
author Jason Rumney <jasonr@gnu.org>
date Sun, 26 Jan 2003 01:25:49 +0000
parents a2e59f9d34b1
children 4e26b69ee15d
comparison
equal deleted inserted replaced
49455:a6825c5c7ce7 49456:8511f51a1d4f
84 if "%1" == "--no-opt" goto noopt 84 if "%1" == "--no-opt" goto noopt
85 if "%1" == "--no-cygwin" goto nocygwin 85 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]
92 echo Options: 93 echo Options:
93 echo. --prefix PREFIX install Emacs in directory PREFIX 94 echo. --prefix PREFIX install Emacs in directory PREFIX
97 echo. --no-opt disable optimization 98 echo. --no-opt disable optimization
98 echo. --no-cygwin use -mno-cygwin option with GCC 99 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
105 shift 107 shift
106 set prefix=%1 108 set prefix=%1
148 rem ---------------------------------------------------------------------- 150 rem ----------------------------------------------------------------------
149 151
150 :withoutpng 152 :withoutpng
151 set pngsupport=N 153 set pngsupport=N
152 set HAVE_PNG= 154 set HAVE_PNG=
155 goto again
156
157 rem ----------------------------------------------------------------------
158
159 :withoutjpeg
160 set jpegsupport=N
161 set HAVE_JPEG=
153 goto again 162 goto again
154 163
155 rem ---------------------------------------------------------------------- 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
271 set HAVE_PNG=1 280 set HAVE_PNG=1
272 281
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
279 if %COMPILER% == gcc set MAKECMD=gmake 308 if %COMPILER% == gcc set MAKECMD=gmake
280 if %COMPILER% == cl set MAKECMD=nmake 309 if %COMPILER% == cl set MAKECMD=nmake
298 echo. >>..\src\config.h 327 echo. >>..\src\config.h
299 echo /* Start of settings from configure.bat. */ >>..\src\config.h 328 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
306 336
307 copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile 337 copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile