File: configure.ac

package info (click to toggle)
fmit 0.97.7-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,656 kB
  • ctags: 1,066
  • sloc: cpp: 9,100; sh: 787; makefile: 128
file content (190 lines) | stat: -rw-r--r-- 4,902 bytes parent folder | download | duplicates (2)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(fmit, 0.97.7)
AM_CONFIG_HEADER(config.h)
AC_PREFIX_DEFAULT(/usr/local/)
AM_INIT_AUTOMAKE([no-define dist-bzip2])

AC_MSG_CHECKING(whether to enable debugging)
AC_ARG_ENABLE(debug,		[  --enable-debug	turn on debugging (default=no)])
if test "x$enable_debug" = "xyes"; then
	CXXFLAGS="$CPPFLAGS -g -DDEBUG"
	AC_MSG_RESULT(yes)
else
	CXXFLAGS="$CPPFLAGS -O3 -ffast-math"
	AC_MSG_RESULT(no)
fi

# Set default installation prefix.
AC_PREFIX_DEFAULT(/usr/local)
ac_prefix=$prefix
if test "x$ac_prefix" = "xNONE"; then
	ac_prefix=$ac_default_prefix
fi
AC_SUBST(ac_prefix)
AC_DEFINE_UNQUOTED(PREFIX, ["$ac_prefix"], [Installation prefix.])

# Checks for programs.
AC_PROG_RANLIB
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL

# Checks for languages.
AC_LANG_C
AC_LANG_CPLUSPLUS

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
AC_TYPE_SIZE_T
AC_CXX_NAMESPACES
AC_CXX_HAVE_STL
AC_CXX_HAVE_NUMERIC_LIMITS
AC_CXX_HAVE_SSTREAM
AC_CXX_TEMPLATES
AC_CXX_EXCEPTIONS
AC_CXX_HAVE_COMPLEX

# Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([pow sqrt])

AC_CHECK_HEADERS([fftw3.h])
AC_CHECK_LIB(fftw3, fftw_plan_dft_1d)

# --- Qt ---
BNV_HAVE_QT

QTDIR="$QT_DIR"
CFLAGS="$CFLAGS $QT_CXXFLAGS"
CPPFLAGS="$CPPFLAGS $QT_CXXFLAGS"
LIBS="$LIBS $QT_LIBS"

dnl AC_CACHE_CHECK([for Qt library version >= 3.2],
dnl   ac_qtlib_version, [
dnl   AC_TRY_LINK([#include "qglobal.h"], [
dnl #if QT_VERSION < 0x030200
dnl #error Qt library 3.2 or greater required.
dnl #endif
dnl     ],
dnl     ac_qtlib_version="yes", [
dnl       echo "no; Qt 3.2 or greater is required"
dnl       exit
dnl     ])
dnl ])

# --- OpenGL ---
MDL_HAVE_OPENGL
AC_MSG_CHECKING(for GL)
if test "x$have_GL" = "xyes"; then
	AC_MSG_RESULT(yes)
else
	AC_MSG_RESULT(no)
	AC_MSG_ERROR(no GL library found)
fi
AC_MSG_CHECKING(for GLU)
if test "x$have_GLU" = "xyes"; then
	AC_MSG_RESULT(yes)
else
	AC_MSG_RESULT(no)
	AC_MSG_ERROR(no GLU library found)
fi
AC_MSG_CHECKING(for glut)
if test "x$have_glut" = "xyes"; then
	AC_MSG_RESULT(yes)
else
	AC_MSG_RESULT(no)
	AC_MSG_ERROR(no glut library found)
fi


# Checks for features
# --- ALSA ---
AC_MSG_CHECKING(whether to enable ALSA)
AC_ARG_ENABLE(alsa,
			  AC_HELP_STRING([--enable-alsa],[turn on ALSA support (default=yes)]),
			  [enable_alsa=$enableval],[enable_alsa=yes])
if test "x$enable_alsa" = "xyes"; then
	AC_MSG_RESULT(yes)
	AM_PATH_ALSA(0.9,[CXXFLAGS="$CXXFLAGS -DCAPTURE_ALSA"])
else
	AC_MSG_RESULT(no)
fi

# --- OSS ---
AC_MSG_CHECKING(whether to enable OSS)
AC_ARG_ENABLE(oss,
			  AC_HELP_STRING([--enable-oss],[turn on OSS support (default=yes)]),
			  [enable_oss=$enableval],[enable_oss=yes])
if test "x$enable_oss" = "xyes"; then
	AC_MSG_RESULT(yes)
	CXXFLAGS="$CXXFLAGS -DCAPTURE_OSS"
	AC_CHECK_HEADER(sys/soundcard.h,,AC_MSG_ERROR([OSS header not found.]))
else
	AC_MSG_RESULT(no)
fi

# --- JACK ---
AC_MSG_CHECKING(whether to enable JACK)
AC_ARG_ENABLE(jack,
			  AC_HELP_STRING([--enable-jack],[turn on JACK support (default=yes)]),
			  [enable_jack=$enableval],[enable_jack=yes])
if test "x$enable_jack" = "xyes"; then
	AC_MSG_RESULT(yes)
	CXXFLAGS="$CXXFLAGS -DCAPTURE_JACK"
	AC_CHECK_HEADER(jack/jack.h,,AC_MSG_ERROR([JACK headers not found.]))
	AC_CHECK_LIB(jack, main,,AC_MSG_ERROR([JACK library not found.]))
else
	AC_MSG_RESULT(no)
fi

# --- PortAudio ---
AC_MSG_CHECKING(whether to enable PortAudio)
AC_ARG_ENABLE(portaudio,
			  AC_HELP_STRING([--enable-portaudio],[turn on PortAudio support (default=no)]),
			  [enable_portaudio=$enableval],[enable_portaudio=no])
if test "x$enable_portaudio" = "xyes"; then
	AC_MSG_RESULT(yes)
	CXXFLAGS="$CXXFLAGS -DCAPTURE_PORTAUDIO"
	AC_CHECK_HEADER(portaudio.h,,AC_MSG_ERROR([PortAudio header not found.]))
	AC_CHECK_LIB(portaudio, main,,AC_MSG_ERROR([PortAudio library not found.]))
else
	AC_MSG_RESULT(no)
fi

AC_CONFIG_FILES([Makefile m4/Makefile libs/Makefile libs/CppAddons/Makefile
				 libs/Music/Makefile ui/Makefile src/Makefile src/modules/Makefile
				 tr/Makefile])

dnl CFLAGS="$CFLAGS -pg"
dnl CPPFLAGS="$CPPFLAGS -pg"

AC_MSG_CHECKING(packager string)
AC_ARG_ENABLE(packager-string,
			  AC_HELP_STRING([--enable-packager-string=NAME],[add references of the packager in the about box]),
			  [enable_packager_string=$enableval],[enable_packager_string=""])
if test -n "$enable_packager_string"; then
	AC_MSG_RESULT($enable_packager_string)
	AC_DEFINE_UNQUOTED(PACKAGER_STRING,"${enable_packager_string}",[References of the packager in the about box])
else
	AC_MSG_RESULT(no)
fi

AC_OUTPUT

echo ""
echo "Now type 'make', followed by 'make install' as root."
echo ""