Commit dca65d5c authored by Matthieu Garrigues's avatar Matthieu Garrigues
Browse files

Improve support for the cfitsio library.

	* build-aux/cfitsio.m4: New.
	Provide the Autoconf macro OLN_WITH_FREEIMAGEPLUS.
	Inspired by Olena 0.11's macros AC_WITH_CXX_ZLIB and
	AC_WITH_CXX_FFTW.
	This macro is used...
	* configure.ac: ...here.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@1590 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent f776afd7
2007-12-04 Matthieu Garrigues <garrigues@lrde.epita.fr>
Improve support for the cfitsio library.
* build-aux/cfitsio.m4: New.
Provide the Autoconf macro OLN_WITH_FREEIMAGEPLUS.
Inspired by Olena 0.11's macros AC_WITH_CXX_ZLIB and
AC_WITH_CXX_FFTW.
This macro is used...
* configure.ac: ...here.
2007-11-27 Roland Levillain <roland@lrde.epita.fr>
* configure.ac: Configure milena/tests/core/Makefile.
......
# -*- Autoconf -*-
# OLN_WITH_CFITSIO
# ----------------------
# Checks whether the Cfitsio library is available from C++
# programs.
#
# This macro sets CFITSIO_CXXFLAGS and CFITSIO_LDFLAGS if
# the library is found and its functions available from C++.
AC_DEFUN([OLN_WITH_CFITSIO],
[dnl
AC_REQUIRE([AC_PROG_CXX])
AC_LANG_PUSH([C++])
AC_ARG_WITH([cfitsio],
[AC_HELP_STRING([--with-cfitsio@<:@=DIR@:>@],
[using FreeImage (DIR = prefix for FreeImage installation)])])
CFITSIO_CXXFLAGS=''
CFITSIO_LDFLAGS=''
if test "x$with_cfitsio" != xno; then
if test -n "$with_cfitsio"; then
CFITSIO_CXXFLAGS="-I${with_cfitsio}/include"
CFITSIO_LDFLAGS="-L${with_cfitsio}/lib"
fi
oln_save_CXXFLAGS=$CXXFLAGS
oln_save_LDFLAGS=$LDFLAGS
CXXFLAGS="$CXXFLAGS $CFITSIO_CXXFLAGS"
LDFLAGS="$LDFLAGS $CFITSIO_LDFLAGS"
oln_have_cfitsio=no
AC_CHECK_HEADER([fitsio.h],
[AC_CHECK_LIB([cfitsio],
[main],
[oln_have_cfitsio=yes
CFITSIO_LDFLAGS="$CFITSIO_LDFLAGS -lcfitsio"
AC_DEFINE([HAVE_CFITSIO], 1,
[Define to 1 if we can use FreeImage])
]
)]
)
CXXFLAGS=$oln_save_CXXFLAGS
LDFLAGS=$oln_save_LDFLAGS
TOOLS_LDFLAGS="$TOOLS_LDFLAGS $CFITSIO_LDFLAGS"
fi
AC_SUBST([CFITSIO_CXXFLAGS])
AC_SUBST([CFITSIO_LDFLAGS])
AC_LANG_POP([C++])
])
......@@ -54,6 +54,10 @@ fi
OLN_WITH_FREEIMAGEPLUS
AM_CONDITIONAL([FREEIMAGEPLUS], [test x$oln_have_freeimageplus = xyes])
# Cfitsio library.
OLN_WITH_CFITSIO
AM_CONDITIONAL([CFITSIO], [test x$oln_have_cfitsio = xyes])
## --------------- ##
## Configuration. ##
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment