* mln/io/all.hh [HAVE_CFITSIO]: Include mln/io/fits/all.hh.
* tests/io/Makefile.am (SUBDIRS) [HAVE_CFITSIO]: Add fits.
* tests/io/fits/Makefile.am: Remove CFITSIO conditional.
(fits_CPPFLAGS, fits_LDFLAGS): Remove.
(AM_CPPFLAGS): Add $(CFITSIO_CPPFLAGS).
(AM_LDFLAGS): New. Add $(CFITSIO_LDFLAGS).
---
milena/ChangeLog | 11 +++++++++++
milena/mln/io/all.hh | 9 ++++++++-
milena/tests/io/Makefile.am | 13 ++++++++++++-
milena/tests/io/fits/Makefile.am | 14 ++++++--------
4 files changed, 37 insertions(+), 10 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 6a0eb69..fccc066 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,16 @@
2009-06-01 Roland Levillain <roland(a)lrde.epita.fr>
+ Improve conditional support for CFITSIO.
+
+ * mln/io/all.hh [HAVE_CFITSIO]: Include mln/io/fits/all.hh.
+ * tests/io/Makefile.am (SUBDIRS) [HAVE_CFITSIO]: Add fits.
+ * tests/io/fits/Makefile.am: Remove CFITSIO conditional.
+ (fits_CPPFLAGS, fits_LDFLAGS): Remove.
+ (AM_CPPFLAGS): Add $(CFITSIO_CPPFLAGS).
+ (AM_LDFLAGS): New. Add $(CFITSIO_LDFLAGS).
+
+2009-06-01 Roland Levillain <roland(a)lrde.epita.fr>
+
* mln/io/all.hh: Reenable support for OFF I/O routines.
2009-06-03 Roland Levillain <roland(a)lrde.epita.fr>
diff --git a/milena/mln/io/all.hh b/milena/mln/io/all.hh
index 409c4aa..0e081b5 100644
--- a/milena/mln/io/all.hh
+++ b/milena/mln/io/all.hh
@@ -63,6 +63,13 @@ namespace mln
# include <mln/io/tiff/all.hh>
# include <mln/io/txt/all.hh>
# include <mln/io/off/all.hh>
-//# include <mln/io/fits/all.hh>
+
+/*--------------------------------------------------.
+| I/O routines depending on a third-party library. |
+`--------------------------------------------------*/
+
+# ifdef HAVE_CFITSIO
+# include <mln/io/fits/all.hh>
+# endif // ! HAVE_CFITSIO
#endif // ! MLN_IO_ALL_HH
diff --git a/milena/tests/io/Makefile.am b/milena/tests/io/Makefile.am
index 52b6750..6ebcd67 100644
--- a/milena/tests/io/Makefile.am
+++ b/milena/tests/io/Makefile.am
@@ -2,10 +2,13 @@
include $(top_srcdir)/milena/tests/tests.mk
+## ---------------------- ##
+## Built-in I/O support. ##
+## ---------------------- ##
+
SUBDIRS = \
dicom \
dump \
- fits \
magick \
off \
pbm \
@@ -14,3 +17,11 @@ SUBDIRS = \
pnm \
ppm \
tiff
+
+## ------------------------------------------------- ##
+## I/O routines depending on a third-party library. ##
+## ------------------------------------------------- ##
+
+if HAVE_CFITSIO
+ SUBDIRS += fits
+endif HAVE_CFITSIO
diff --git a/milena/tests/io/fits/Makefile.am b/milena/tests/io/fits/Makefile.am
index b463de4..9e72389 100644
--- a/milena/tests/io/fits/Makefile.am
+++ b/milena/tests/io/fits/Makefile.am
@@ -2,13 +2,11 @@
include $(top_srcdir)/milena/tests/tests.mk
-check_PROGRAMS =
-
-if CFITSIO
- check_PROGRAMS += fits
- fits_SOURCES = fits.cc
- fits_CPPFLAGS = $(AM_CPPFLAGS) $(CFITSIO_CPPFLAGS)
- fits_LDFLAGS = $(AM_LDFLAGS) $(CFITSIO_LDFLAGS)
-endif CFITSIO
+AM_CPPFLAGS += $(CFITSIO_CPPFLAGS)
+AM_LDFLAGS = $(CFITSIO_LDFLAGS)
+
+check_PROGRAMS = fits
+
+fits_SOURCES = fits.cc
TESTS = $(check_PROGRAMS)
--
1.6.1.2