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 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
|
# Process this file with autoconf to produce a configure script.
AC_INIT([X-shooter Instrument Pipeline], [2.8.4], [usd-help@eso.org],
[xshoo])
AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_AUX_DIR([admin])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AC_CONFIG_SUBDIRS([hdrl])
AC_CONFIG_HEADERS([config.h])
AC_MSG_RESULT([])
AC_MSG_RESULT([*********** Configuring: $PACKAGE $VERSION **********])
AC_MSG_RESULT([])
AM_MAINTAINER_MODE([enable])
XSH_SET_PREFIX(${PIPE_HOME:-/usr/local})
# Immediately before every release do:
#-------------------------------------
# if (the interface is totally unchanged from previous release)
# REVISION++;
# else {
# /* interfaces have been added, removed or changed */
# REVISION = 0;
# CURRENT++;
# if (any interfaces have been _added_ since last release)
# AGE++;
# if (any interfaces have been _removed_ or incompatibly changed)
# AGE = 0;
# }
XSH_SET_VERSION_INFO([$VERSION])
# Checks for programs.
AC_MSG_RESULT([])
AC_MSG_RESULT([*********** Checking programs ************************])
AC_MSG_RESULT([])
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LN_S
AC_MSG_RESULT([*********** Checking ESO *****************************])
ESO_ENABLE_DEBUG(no)
ESO_ENABLE_STRICT(no)
ESO_PROG_CC_FLAG([fno-builtin], [CFLAGS="$CFLAGS -fno-builtin"])
ESO_PROG_CC_FLAG([std=c99], [CFLAGS="$CFLAGS -std=c99"])
ESO_PROG_CC_FLAG([Wall], [CFLAGS="$CFLAGS -Wall"])
ESO_PROG_CC_FLAG([Werror=implicit-function-declaration],
[CFLAGS="-Werror=implicit-function-declaration $CFLAGS"])
AC_MSG_RESULT([*********** Checking doc *****************************])
ESO_CHECK_DOCTOOLS
AC_ENABLE_STATIC(no)
AC_ENABLE_SHARED(yes)
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
# Checks for libraries.
AC_MSG_RESULT([])
AC_MSG_RESULT([*********** Checking libraries ***********************])
AC_MSG_RESULT([])
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"], AC_MSG_ERROR([Library math not found]))
#AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])
#AC_CHECK_LIB(nsl, inet_ntoa, [LIBS="$LIBS -lnsl"])
#AC_CHECK_LIB(gslcblas, main, [LIBS="$LIBS -lgslcblas"], AC_MSG_ERROR([Library gslcblas not found]))
#AC_CHECK_LIB(main, [LIBS="$LIBS"], AC_MSG_ERROR([Library gslcblas not found]))
GSL_CHECK_LIBS
# Checks for header files.
AC_MSG_RESULT([*********** Checking headers *************************])
AC_HEADER_STDC
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GSL_INCLUDES"
AC_CHECK_HEADERS(gsl/gsl_multifit.h, ,
AC_MSG_ERROR(gsl/gsl_multifit.h not found. This GSL header file is required to build))
AC_CHECK_HEADERS(gsl/gsl_bspline.h, ,
AC_MSG_ERROR(gsl/gsl_bspline.h not found. This GSL header file is required to build))
# Checks for typedefs, structures, and compiler characteristics.
CPPFLAGS="$save_CPPFLAGS"
AC_C_CONST
AC_C_INLINE
# Checks for library functions.
AC_MSG_RESULT([*********** Checking functions ***********************])
AC_CHECK_FUNCS([floor pow sqrt])
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GSL_INCLUDES"
save_LIBS="$LIBS"
LIBS="$LIBS $GSL_LIBS"
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $GSL_LDFLAGS"
AC_CHECK_FUNCS([gsl_multifit_wlinear],,
AC_MSG_ERROR(gsl_multifit_wlinear not found. This GSL function is required to build))
AC_CHECK_FUNCS([gsl_bspline_eval],,
AC_MSG_ERROR(gsl_bspline not found. This GSL function is required to build))
LIBS="$save_LIBS"
LDFLAGS="$save_LDFLAGS"
CPPFLAGS="$save_CPPFLAGS"
ESO_FUNC_STRDUP
#Defining HDRL within the source tree
HDRL_CHECK([hdrl])
# Check for functions needed for plotting with irplib
#AC_CHECK_FUNCS([popen])
#AC_CHECK_FUNCS([pclose])
#AC_CHECK_DECLS([popen])
#AC_CHECK_DECLS([pclose])
# Check for CPL presence and usability
CPL_CHECK_CFITSIO
CPL_CHECK_LIBS
XSH_SET_PATHS
XSH_CREATE_SYMBOLS
CHECK_PURIFY
ESO_ENABLE_PROFILE(no)
AM_WITH_DMALLOC
AC_CONFIG_FILES(Makefile
Makefile.purify
doxygen/Doxyfile
xsh/Makefile
recipes/Makefile
xsh/tests/Makefile
irplib/Makefile
irplib/tests/Makefile
reflex/Makefile
reflex/xshooter.xml
regtests/Makefile
regtests/tests/Makefile)
# recipes/tests/Makefile
# reflex/Xshooter.xml
AC_OUTPUT
|