aboutsummaryrefslogtreecommitdiff
path: root/configure.in
blob: 0b80ff5d5ae6df4bc031a32734e5888241a7d70e (plain)
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
AC_PREREQ(2.13)
AC_INIT([libxtract], [0.10], [bugs@postlude.co.uk])

AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_INSTALL
AC_ENABLE_STATIC(no)
AC_ENABLE_SHARED(yes)
AC_PROG_LIBTOOL
#AC_ARG_WITH(fftw, AC_HELP_STRING([--with-vector], [build vector features]),
#            [ if test $withval = "yes"; then with_vector=yes ;
#                           else with_vector=no ; fi ], with_vector=no)

AC_CHECK_HEADERS([math.h])
AC_CHECK_PROG([DOXYGEN], [doxygen], [doc], [])
AC_SUBST(DOXYGEN)

AC_ARG_ENABLE(vector, 
              [  --enable-vector    Turn fft-based vector processing on],
              [case "${enableval}" in
               yes) vector=true ;;
               no)  vector=false ;;
               *) AC_MSG_ERROR(bad value ${enableval} for --enable-vector) ;;
           esac],[vector=false])

XTRACT_SO_VERSION=0:0:0
CFLAGS="-pedantic -ansi"
LDFLAGS="-lm"

dnl Are we building with fftw?
#if [[ "$with_vector" = "yes" ]] ; then
if [[ "$vector" = "true" ]] ; then
    LDFLAGS="$LDFLAGS -lfftw3f"
    AC_DEFINE([BUILD_VECTOR], [1], [Build the vector functions])
fi

AM_CONDITIONAL(BUILD_VECTOR, test "x${vector}" = 'xtrue')

AC_CONFIG_FILES([doc/documentation.doxygen])

AC_OUTPUT(Makefile src/Makefile xtract/Makefile doc/Makefile)