88 |
if "%1" == "--without-png" goto withoutpng |
if "%1" == "--without-png" goto withoutpng |
89 |
if "%1" == "--without-jpeg" goto withoutjpeg |
if "%1" == "--without-jpeg" goto withoutjpeg |
90 |
if "%1" == "--without-gif" goto withoutgif |
if "%1" == "--without-gif" goto withoutgif |
91 |
|
if "%1" == "--without-tiff" goto withouttiff |
92 |
if "%1" == "" goto checkutils |
if "%1" == "" goto checkutils |
93 |
:usage |
:usage |
94 |
echo Usage: configure [options] |
echo Usage: configure [options] |
104 |
echo. --without-png do not use libpng even if it is installed |
echo. --without-png do not use libpng even if it is installed |
105 |
echo. --without-jpeg do not use jpeglib even if it is installed |
echo. --without-jpeg do not use jpeglib even if it is installed |
106 |
echo. --without-gif do not use giflib even if it is installed |
echo. --without-gif do not use giflib even if it is installed |
107 |
|
echo. --without-tiff do not use tifflib even if it is installed |
108 |
goto end |
goto end |
109 |
rem ---------------------------------------------------------------------- |
rem ---------------------------------------------------------------------- |
110 |
:setprefix |
:setprefix |
176 |
goto again |
goto again |
177 |
|
|
178 |
rem ---------------------------------------------------------------------- |
rem ---------------------------------------------------------------------- |
179 |
|
|
180 |
|
:withouttiff |
181 |
|
set tiffsupport=N |
182 |
|
set HAVE_TIFF= |
183 |
|
shift |
184 |
|
goto again |
185 |
|
|
186 |
|
rem ---------------------------------------------------------------------- |
187 |
rem Check that necessary utilities (cp and rm) are present. |
rem Check that necessary utilities (cp and rm) are present. |
188 |
:checkutils |
:checkutils |
189 |
echo Checking for 'cp'... |
echo Checking for 'cp'... |
344 |
:gifDone |
:gifDone |
345 |
rm -f junk.c junk.obj |
rm -f junk.c junk.obj |
346 |
|
|
347 |
|
if (%tiffsupport%) == (N) goto tiffDone |
348 |
|
|
349 |
|
echo Checking for tiff... |
350 |
|
echo #include "tiffio.h" >junk.c |
351 |
|
echo main (){} >>junk.c |
352 |
|
rem -o option is ignored with cl, but allows result to be consistent. |
353 |
|
%COMPILER% %usercflags% -c junk.c -o junk.obj |
354 |
|
if exist junk.obj goto haveTiff |
355 |
|
|
356 |
|
echo ...building without TIFF support. |
357 |
|
set HAVE_TIFF= |
358 |
|
goto :tiffDone |
359 |
|
|
360 |
|
:haveTiff |
361 |
|
echo ...TIFF header available, building with TIFF support. |
362 |
|
set HAVE_TIFF=1 |
363 |
|
|
364 |
|
:tiffDone |
365 |
|
rm -f junk.c junk.obj |
366 |
|
|
367 |
rem ---------------------------------------------------------------------- |
rem ---------------------------------------------------------------------- |
368 |
:genmakefiles |
:genmakefiles |
369 |
echo Generating makefiles |
echo Generating makefiles |
393 |
if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h |
if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h |
394 |
if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h |
if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h |
395 |
if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>..\src\config.h |
if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>..\src\config.h |
396 |
|
if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>..\src\config.h |
397 |
echo /* End of settings from configure.bat. */ >>..\src\config.h |
echo /* End of settings from configure.bat. */ >>..\src\config.h |
398 |
|
|
399 |
copy paths.h ..\src\epaths.h |
copy paths.h ..\src\epaths.h |