summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/libtiff/libtiff.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests/unix/libtiff/libtiff.cpp')
-rw-r--r--config.tests/unix/libtiff/libtiff.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/config.tests/unix/libtiff/libtiff.cpp b/config.tests/unix/libtiff/libtiff.cpp
new file mode 100644
index 0000000..eac03ab
--- /dev/null
+++ b/config.tests/unix/libtiff/libtiff.cpp
@@ -0,0 +1,19 @@
+#include <tiffio.h>
+
+#if !defined(TIFF_VERSION)
+# error "Required libtiff not found"
+#elif TIFF_VERSION < 42
+# error "unsupported tiff version"
+#endif
+
+int main(int, char **)
+{
+ tdata_t buffer = _TIFFmalloc(128);
+ _TIFFfree(buffer);
+
+ // some libtiff implementations where TIFF_VERSION >= 42 do not
+ // have TIFFReadRGBAImageOriented(), so let's check for it
+ TIFFReadRGBAImageOriented(0, 0, 0, 0, 0, 0);
+
+ return 0;
+}