forked from igmhub/cosmo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
63 lines (50 loc) · 1.98 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
61
62
63
#################################################################################
## Created 8-Aug-2011 by David Kirkby <dkirkby@uci.edu>
## Run autoreconf after making any change here.
#################################################################################
# This could probably be relaxed to an older version.
AC_PREREQ([2.68])
# Our package info.
AC_INIT([cosmo], [dev], [dkirkby@uci.edu])
# Checks for programs
AC_PROG_CXX
# Initialize libtool, which adds --enable/disable-shared configure options.
# The boost.m4 macros used below also need this.
LT_INIT
# Checks for libraries (there is no portable way to check for C++ classes in
# the library, so we just check that the linker can find the library using 'main')
AC_CHECK_LIB([m],[cos],,
AC_MSG_ERROR([Cannot find the math library.]))
# We don't use PKG_CHECK_MODULES here for a variety of reasons
AC_CHECK_LIB([likely],[main],,
AC_MSG_ERROR([Cannot find the likely library.]))
# Use 'configure --without-fftw3' if no FFTW3 library is available.
AC_ARG_WITH([fftw3],
AS_HELP_STRING([--without-fftw3], [Build without the FFTW3 library.]))
AS_IF([test "x$with_fftw3" != "xno"], [
AC_CHECK_LIB([fftw3f],[fftwf_malloc],,
AC_MSG_ERROR([Cannot find the FFTW3 single-precision library.]))
])
AS_IF([test "x$with_fftw3" != "xno"], [
AC_CHECK_LIB([fftw3],[fftw_malloc],,
AC_MSG_ERROR([Cannot find the FFTW3 double-precision library.]))
])
# We need a recent version of boost
BOOST_REQUIRE([1.49])
# Required header-only boost packages
BOOST_BIND
BOOST_FOREACH
BOOST_FUNCTION
BOOST_UTILITY
BOOST_SMART_PTR
# Required boost libraries
BOOST_PROGRAM_OPTIONS
# Configure automake
AC_CONFIG_FILES([Makefile cosmo.pc])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
# See http://www.gnu.org/s/hello/manual/automake/maintainer_002dmode.html
AM_MAINTAINER_MODE
AC_CONFIG_HEADERS([config.h])
# Define automake variables that flag whether optional libraries should be used.
AM_CONDITIONAL([USE_FFTW3], [test "x$ac_cv_lib_fftw3_fftw_malloc" = "xyes"])
AC_OUTPUT