aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-07-05 17:33:53 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:52 +0100
commit6aee185fbdaa5c5bb1216066e53ed343f468b4ae (patch)
tree9e510b640538be738d941b6208d258ff790e1424
parent27bfe46fbf64db47e53204f4dc60e0f6820cb9bf (diff)
Update documentation and conditional TIFF/PNG compilation
-rw-r--r--README5
-rw-r--r--src/render.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/README b/README
index 309017a0..10196a79 100644
--- a/README
+++ b/README
@@ -73,6 +73,11 @@ $ ./configure --with-libtiff=/some/strange/location
$ ./configure --with-gsl=/some/strange/location
$ ./configure --disable-gtk
+If you're compiling on Mac OS X, where GTK, libPNG and libTIFF seem to be much
+harder to come by, disable lots of things:
+
+$ ./configure --disable-gtk --disable-png --disable-libtiff
+
A note on data orientation
--------------------------
diff --git a/src/render.c b/src/render.c
index 72d0d8f0..df2e288f 100644
--- a/src/render.c
+++ b/src/render.c
@@ -476,6 +476,7 @@ int render_png(DisplayWindow *dw, const char *filename)
int render_tiff_fp(DisplayWindow *dw, const char *filename)
{
+#ifdef HAVE_TIFF
TIFF *th;
struct image *image;
float *line;
@@ -514,12 +515,16 @@ int render_tiff_fp(DisplayWindow *dw, const char *filename)
TIFFClose(th);
+#else
+ STATUS("No TIFF support.\n");
+#endif
return 0;
}
int render_tiff_int16(DisplayWindow *dw, const char *filename)
{
+#ifdef HAVE_TIFF
TIFF *th;
struct image *image;
int16_t *line;
@@ -583,6 +588,8 @@ int render_tiff_int16(DisplayWindow *dw, const char *filename)
_TIFFfree(line);
TIFFClose(th);
-
+#else
+ STATUS("No TIFF support.\n");
+#endif
return 0;
}