1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Author: Paul_Kunz@slac.stanford.edu
AC_REVISION($Revision: 3.24 $)
AC_INIT(FITS.cxx)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIR([config/m4])
AM_INIT_AUTOMAKE(CCfits, 2.5)
AC_LANG_CPLUSPLUS
dnl Checks for programs.
AC_PROG_CXX
dnl Force libtool to use C++ compiler when checking for PIC
CC=$CXX
dnl Depending on target, we may need extra libraries in link command
dnl also set LD before doing libtool macros.
case "$target" in
*-*-solaris*)
dnl Use the C++ compiler for the linker
LD=$CXX
LIBS="-lm -lsocket -lgen -lnsl";;
*) ;;
esac
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
dnl Get the path to the standard C++ library
PFK_CXX_LIB_PATH
dnl Turn on -Wall if compiling with gcc
AC_COMPILE_WARNINGS
dnl Turn on -ansi if compiling with gcc
AC_COMPILE_ANSI
dnl Check for gmake and use it
AC_CHECK_PROG(GMAKE, gmake, gmake, make)
AC_SUBST(GMAKE)
dnl check STD C++ library
AC_CHECK_LIB(stdc++, main, LIBSTDCPP="lstdc++", LIBSTDCPP=)
AC_SUBST(LIBSTDCPP)
dnl check where the cfitsio library and include files are at.
dnl NOTE: do this before checking sstream, else it fails.
AC_CHECK_PACKAGE(cfitsio, ffpss, cfitsio, fitsio.h,
AC_MSG_RESULT([cfitsio found.]),
AC_MSG_ERROR([cfitsio NOT found]) )
dnl check for valarray which is not available with egcs 1.1.2
dnl which is default compiler for many Linux distributions
AC_CXX_HAVE_VALARRAY
if test "$ac_cv_cxx_have_valarray" != yes; then
AC_MSG_ERROR( [
valarray<T> is missing and required.
Try upgrading to gcc 2.95.2 or higher.] )
fi
dnl Use standard <sstream> if found; otherwise it uses the older <strstream>.
AC_CHECK_HEADER(sstream,
[],
[AC_CHECK_HEADER(strstream,
AC_DEFINE(SSTREAM_DEFECT, 1,
Define to 1 if you have the <strstream> header file instead of <sstream>),
AC_MSG_ERROR(You have neither the <sstream> or <strstream> header file)
)])
dnl Enables testing of alternate code dealing with MS VC++ workarounds.
AC_ARG_ENABLE(msvc-code,
[ --enable-msvc-code compile alternate code dealing ]
[ with MS VC++ workarounds],
AC_DEFINE(ITERATORBASE_DEFECT, 1,
Define if IteratorBase does not work with some STL functions.)
AC_DEFINE(SPEC_TEMPLATE_DECL_DEFECT, 1,
Define partical template specializtion can not be declared.)
AC_DEFINE(TEMPLATE_AMBIG7_DEFECT, 1,
Define if compile can not resolve ambiguity in overloaded template functions.)
)
dnl check where the STLport library and include files are at.
dnl AC_ARG_WITH(stlport, --with-stlport=DIR (prefix to stlport),
dnl STLPORT=$withval, STLPORT=$prefix/include/stlport)
dnl AC_MSG_RESULT( using stlport at $STLPORT)
AC_SUBST(STLPORT)
AC_OUTPUT(Makefile Doxyfile CCfits.pc \
vs.net/Makefile )
AC_MSG_RESULT([
CCFits project now configured.
])
|