
AC_PREREQ([2.69])
AC_INIT([Rawtran],[1.1],[hroch@physics.muni.cz],
	[rawtran],[http://integral.physics.muni.cz/rawtran/])
AM_INIT_AUTOMAKE

AC_PROG_CC
AC_PROG_INSTALL
AC_C_BIGENDIAN
AC_FUNC_MALLOC

AC_CHECK_HEADERS([stdlib.h string.h])

AC_CHECK_HEADERS([pthread.h])
AC_CHECK_LIB([pthread], [pthread_create])

AC_CHECK_LIB([m], [sqrt])

dnl check for FITSIO library
AC_CHECK_HEADERS([fitsio.h])
AC_CHECK_LIB([cfitsio],[ffopen],[],[
    echo "configure: no cfitsio library found"
    echo
    echo "Please check installation of cfitsio and try again."
    echo "Look at http://heasarc.gsfc.nasa.gov/fitsio for more information."
    echo
    echo "If you have cfitsio already included in your software, check that"
    echo "a development flavour (libcfitsio-dev, cfitsio-devel,..) is"
    echo "available by setting environment variables (./configure --help)."
    echo
    exit 1],[-lm])

AC_CONFIG_FILES([Makefile] [doc/Makefile])
AC_OUTPUT
