diff --git a/test/pdiff/CompareArgs.cpp b/test/pdiff/CompareArgs.cpp index 25925f805..aa69a7d14 100644 --- a/test/pdiff/CompareArgs.cpp +++ b/test/pdiff/CompareArgs.cpp @@ -67,8 +67,10 @@ bool CompareArgs::Parse_Args(int argc, char **argv) } for (int i = 0; i < argc; i++) { if (i == 1) { +#if HAVE_LIBTIFF ImgA = RGBAImage::ReadTiff(argv[1]); if (!ImgA) { +#endif /* HAVE_LIBTIFF */ ImgA = RGBAImage::ReadPNG(argv[1]); if (!ImgA) { @@ -77,10 +79,14 @@ bool CompareArgs::Parse_Args(int argc, char **argv) ErrorStr += "\n"; return false; } +#if HAVE_LIBTIFF } +#endif /* HAVE_LIBTIFF */ } else if (i == 2) { +#if HAVE_LIBTIFF ImgB = RGBAImage::ReadTiff(argv[2]); if (!ImgB) { +#endif /* HAVE_LIBTIFF */ ImgB = RGBAImage::ReadPNG(argv[2]); if (!ImgB) { @@ -89,7 +95,9 @@ bool CompareArgs::Parse_Args(int argc, char **argv) ErrorStr += "\n"; return false; } +#if HAVE_LIBTIFF } +#endif /* HAVE_LIBTIFF */ } else { if (strstr(argv[i], "-fov")) { if (i + 1 < argc) { diff --git a/test/pdiff/RGBAImage.cpp b/test/pdiff/RGBAImage.cpp index 1c38ab45f..a39195fe0 100644 --- a/test/pdiff/RGBAImage.cpp +++ b/test/pdiff/RGBAImage.cpp @@ -16,6 +16,8 @@ if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, #include "RGBAImage.h" #include "png.h" + +#if HAVE_LIBTIFF #include "tiff.h" #include "tiffio.h" @@ -53,6 +55,7 @@ RGBAImage* RGBAImage::ReadTiff(char *filename) } return fimg; } +#endif /* HAVE_LIBTIFF */ // This portion was written by Scott Corley RGBAImage* RGBAImage::ReadPNG(char *filename)