Commit 99398ea1 authored by Ewout Helmich's avatar Ewout Helmich
Browse files

Autoconf configure

parent 76ddc292
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT(vodia, 1.0)
# Check source dir
AC_CONFIG_SRCDIR([aga/main.c])
#AC_CONFIG_HEADER([config.h])
# Check headers
#AC_CHECK_HEADERS([cfitsio/fitsio.h wcslib/cel.h])
AM_INIT_AUTOMAKE
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
# Check for user supplied cfitsio directory.
AC_ARG_WITH([cfitsio],
[AC_HELP_STRING(
[--with-cfitsio=prefix],
[prefix for the cfitsio-library install directory])],
[LIBCFITSIO="-L$with_cfitsio -lcfitsio"],
[LIBCFITSIO="-lcfitsio"]
)
# Check whether cfitsio library exists and can be linked with.
TMPLIBS=$LIBS
LIBS="$LIBCFITSIO -lm $LIBS"
AC_CHECK_LIB([cfitsio], [ffopen],
[AC_SUBST([LIBCFITSIO], [$LIBCFITSIO])],
[AC_MSG_FAILURE(
[cfitsio library not found! Try 'configure --help'.])]
)
LIBS=$TMPLIBS
# Check for user supplied wcs directory.
AC_ARG_WITH([wcs],
[AC_HELP_STRING(
[--with-wcs=prefix],
[prefix for the wcs-library install directory])],
[LIBWCS="-L$with_wcs -lwcs"],
[LIBWCS="-lwcs"]
)
# Check whether wcs library exists and can be linked with.
TMPLIBS=$LIBS
LIBS="$LIBWCS -lm $LIBS"
AC_CHECK_LIB([wcs], [wcsunits],
[AC_SUBST([LIBWCS], [$LIBWCS])],
[AC_MSG_FAILURE(
[wcs library not found! Try 'configure --help'.])]
)
LIBS=$TMPLIBS
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([floor memset pow sqrt strrchr strstr])
AC_CONFIG_FILES([Makefile
aga/Makefile
float2ushort/Makefile
getpsf/Makefile
getvar.wcs/Makefile
mstack/Makefile
phot/Makefile
psw/Makefile
wcs2pix/Makefile])
AC_OUTPUT
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment