-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
91 lines (73 loc) · 2.17 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
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
AC_INIT([Artifastring], [2.4], [graham@percival-music.ca], [artifastring],
[http://percival-music.ca/artifastring/])
# override flags from AC_INIT, but keeps any flags the user sets
: ${CXXFLAGS=""}
# directories
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([libtool-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile artifastring.pc monowav.pc doc/doxyfile])
AC_PREREQ([2.59])
AM_INIT_AUTOMAKE([1.10 no-define foreign -Wall -Werror])
AM_PROG_AR
### libraries
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_HEADER_STDC
#AC_LANG([C++])
AC_CHECK_LIB(stdc++, main,, AC_MSG_ERROR(requires libstdc++))
AC_CHECK_LIB(m, main,, AC_MSG_ERROR(requires libm (math)))
AC_CHECK_LIB(fftw3f, main,, AC_MSG_ERROR(requires libfftw3))
AC_ARG_ENABLE([debug],
[AS_HELP_STRING(--enable-debug,[Compile with debug support])],
[],
[enable_debug="no"])
AM_CONDITIONAL([HAS_DEBUG], [test "x$enable_debug" != xno])
### swig stuff
AC_ARG_WITH(swig,
[AS_HELP_STRING(--with-swig,[Python bindings with swig])],
[],
[with_swig="no"])
AM_CONDITIONAL([HAS_SWIG], [test "x$with_swig" != xno])
AS_IF([test "x$with_swig" != xno],
[
AM_PATH_PYTHON
AX_PYTHON_DEVEL
AX_PKG_SWIG()
AX_SWIG_ENABLE_CXX
AX_SWIG_PYTHON
], [])
### play nice with other fftw users
AC_ARG_ENABLE([fftw-cleanup-elsewhere],
[AS_HELP_STRING(--enable-fftw-cleanup-elsewhere,
[Other code will call fftw_cleanup()])],
[AC_DEFINE(FFTW_CLEANUP_ELSEWHERE, 1,
[Other code will call fftw_cleanup((])],
[AC_DEFINE(FFTW_CLEANUP_ELSEWHERE, 0,
[Other code will call fftw_cleanup((])]
)
### doc stuff
DX_INIT_DOXYGEN(artifastring, doc/doxygen, [out-www/])
AM_CONDITIONAL([HAS_DOXYGEN], [test "x$DX_DOXYGEN" != 'x'])
### blender stuff
AC_ARG_ENABLE([blender],
[AS_HELP_STRING(--enable-blender,[Install blender animation support.])],
[],
[enable_blender="no"])
AM_CONDITIONAL([HAS_BLENDER], [test "x$enable_blender" != xno])
AS_IF([test "x$enable_blender" != xno],
[
AC_CHECK_PROG(BLENDER, blender, [yes],
[Blender 2.5+ is required to generate animations])
], [])
AC_CANONICAL_HOST
case "$host_os" in
darwin* )
DARWIN=yes
;;
*)
DARWIN=no
;;
esac
AM_CONDITIONAL([IS_DARWIN], [test "x$DARWIN" != xno])
AC_OUTPUT