Commit ee4603115cb5dd38befb84a290455d04a2462056

Authored by knodlseder
1 parent 66679031

add cfitsio library path for testing

Showing 1 changed file with 33 additions and 0 deletions
configure.ac
... ... @@ -193,6 +193,34 @@ CPPFLAGS="$CPPFLAGS $GammaLib_CFLAGS"
193 193 LDFLAGS="$LDFLAGS $GammaLib_LIBS"
194 194  
195 195  
  196 +dnl ==========================
  197 +dnl Checks for cfitsio library
  198 +dnl ==========================
  199 +
  200 +# Search for cfitsio shared library in a some standard directories
  201 +for i in "$gammalib_prefix" /usr /usr/local /opt/local ; do
  202 + if test -f $i/lib/libcfitsio.so -o -f $i/lib/libcfitsio.dylib -a -f $i/include/fitsio.h; then
  203 + LIBDIR_CFITSIO=$i/lib
  204 + INCDIR_CFITSIO=$i/include
  205 + break
  206 + fi
  207 + if test -f $i/lib64/libcfitsio.so -o -f $i/lib64/libcfitsio.dylib -a -f $i/include/fitsio.h; then
  208 + LIBDIR_CFITSIO=$i/lib64
  209 + INCDIR_CFITSIO=$i/include
  210 + break
  211 + fi
  212 +done
  213 +if test -n "$LIBDIR_CFITSIO" -a -n "$INCDIR_CFITSIO"; then
  214 + has_cfitsio="yes"
  215 + LDFLAGS="$LDFLAGS -L$LIBDIR_CFITSIO"
  216 + CPPFLAGS="$CPPFLAGS -I$INCDIR_CFITSIO"
  217 + AC_SUBST(LIBDIR_CFITSIO)
  218 + AC_SUBST(INCDIR_CFITSIO)
  219 +else
  220 + has_cfitsio="no"
  221 +fi
  222 +
  223 +
196 224 dnl ==================
197 225 dnl Build static code?
198 226 dnl ==================
... ... @@ -243,6 +271,11 @@ if test "x$has_gammalib" = "xyes"; then
243 271 else
244 272 echo " - GammaLib support (no) no gammalib library found"
245 273 fi
  274 +if test "x$has_cfitsio" = "xyes"; then
  275 + echo " * FITS I/O support (yes) $LIBDIR_CFITSIO $INCDIR_CFITSIO"
  276 +else
  277 + echo " - FITS I/O support (no) no cfitsio library found"
  278 +fi
246 279 if test ! "$SWIG"; then
247 280 echo " - swig (no)"
248 281 else
... ...