aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-09 16:24:27 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:19 +0100
commit6b67dc7ba7301274167519d5fcc38161b1a791a9 (patch)
tree51eafbd2a92cbf5b005eeba2629d5327d44c63ce /configure
parente33dac04453ee0b759af5560dd4758f6cfc7eb67 (diff)
Better libTIFF test
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure55
1 files changed, 53 insertions, 2 deletions
diff --git a/configure b/configure
index 1b502c5e..9f06a509 100755
--- a/configure
+++ b/configure
@@ -7002,15 +7002,59 @@ if test "${with_libtiff+set}" = set; then :
withval=$with_libtiff;
LIBTIFF_CFLAGS="-I$withval/include"
LIBTIFF_LIBS="-L$withval/lib -ltiff"
+ have_libtiff=true
else
- LIBTIFF_LIBS="-ltiff"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
+$as_echo_n "checking for TIFFOpen in -ltiff... " >&6; }
+if test "${ac_cv_lib_tiff_TIFFOpen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltiff $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char TIFFOpen ();
+int
+main ()
+{
+return TIFFOpen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_tiff_TIFFOpen=yes
+else
+ ac_cv_lib_tiff_TIFFOpen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5
+$as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; }
+if test "x$ac_cv_lib_tiff_TIFFOpen" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBTIFF 1
+_ACEOF
+
+ LIBS="-ltiff $LIBS"
+else
+ have_libtiff=true
fi
-$as_echo "#define HAVE_TIFF 1" >>confdefs.h
+fi
else
@@ -7019,6 +7063,13 @@ else
$as_echo "no" >&6; }
fi
+if test x$have_libtiff = xtrue; then :
+
+
+$as_echo "#define HAVE_TIFF 1" >>confdefs.h
+
+
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use Cairo" >&5