Mercurial > emacs
changeset 49544:fdc002872212
Automatically detect tifflib.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 31 Jan 2003 11:03:11 +0000 |
parents | 954b23b1037b |
children | 64c0c06b6191 |
files | nt/configure.bat |
diffstat | 1 files changed, 31 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/nt/configure.bat Fri Jan 31 10:59:13 2003 +0000 +++ b/nt/configure.bat Fri Jan 31 11:03:11 2003 +0000 @@ -88,6 +88,7 @@ if "%1" == "--without-png" goto withoutpng if "%1" == "--without-jpeg" goto withoutjpeg if "%1" == "--without-gif" goto withoutgif +if "%1" == "--without-tiff" goto withouttiff if "%1" == "" goto checkutils :usage echo Usage: configure [options] @@ -103,6 +104,7 @@ echo. --without-png do not use libpng even if it is installed echo. --without-jpeg do not use jpeglib even if it is installed echo. --without-gif do not use giflib even if it is installed +echo. --without-tiff do not use tifflib even if it is installed goto end rem ---------------------------------------------------------------------- :setprefix @@ -174,6 +176,14 @@ goto again rem ---------------------------------------------------------------------- + +:withouttiff +set tiffsupport=N +set HAVE_TIFF= +shift +goto again + +rem ---------------------------------------------------------------------- rem Check that necessary utilities (cp and rm) are present. :checkutils echo Checking for 'cp'... @@ -334,6 +344,26 @@ :gifDone rm -f junk.c junk.obj +if (%tiffsupport%) == (N) goto tiffDone + +echo Checking for tiff... +echo #include "tiffio.h" >junk.c +echo main (){} >>junk.c +rem -o option is ignored with cl, but allows result to be consistent. +%COMPILER% %usercflags% -c junk.c -o junk.obj +if exist junk.obj goto haveTiff + +echo ...building without TIFF support. +set HAVE_TIFF= +goto :tiffDone + +:haveTiff +echo ...TIFF header available, building with TIFF support. +set HAVE_TIFF=1 + +:tiffDone +rm -f junk.c junk.obj + rem ---------------------------------------------------------------------- :genmakefiles echo Generating makefiles @@ -363,6 +393,7 @@ if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>..\src\config.h +if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>..\src\config.h echo /* End of settings from configure.bat. */ >>..\src\config.h copy paths.h ..\src\epaths.h