-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
60 lines (53 loc) · 1.41 KB
/
configure.ac
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
AC_INIT([allframe], [4.1.2], [[email protected]])
AC_CONFIG_SRCDIR([src/daophot.f])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_F77
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],[enable memory debug mode (default=no)]),
[enable_debug=$enableval],
[enable_debug=no])
if test x"$enable_debug" = x"yes"; then
AC_MSG_RESULT([yes])
if test x$F77 = xg77; then
FFLAGS="${FFLAGS} -fbounds-check"
LDFLAGS="${LDFLAGS} --defsym,mem_=0"
fi
fi
# automatically add -lm to all linking steps
AC_CHECK_LIB([m], [cos])
# Checks for cfitsio libraries
# TODO: check fortran bindings
AC_ARG_WITH(fits,
AS_HELP_STRING([--without-fits],[disable FITS i/o capabilities]),
[with_fits=$withval],
[with_fits=yes])
if test x"$with_fits" = x"yes"; then
AX_PKG_LIB(
[cfitsio],
[fitsio.h],
[cfitsio],
[ffopen],
[],
[AC_MSG_ERROR([Could not find cfitsio library with fortran bindings])])
fi
AM_CONDITIONAL([WITH_FITS], [test x$with_fits = xyes])
# Checks for iraf libraries
AC_ARG_WITH(iraf,
AS_HELP_STRING([--with-iraf],[enable IRAF i/o capabilities]),
[with_iraf=$withval],
[with_iraf=no])
if test x"$with_iraf" != x"no"; then
AX_PKG_LIB(
[iraf],
[],
[ftppre],
[],
[AC_MSG_ERROR([Could not find iraf library])])
fi
AM_CONDITIONAL([WITH_IRAF], [test x$with_iraf = xyes])
AC_CONFIG_FILES([Makefile
src/Makefile])
AC_OUTPUT