1 |
# Process this file with autoconf to produce a configure script. |
# Process this file with autoconf to produce a configure script. |
2 |
AC_INIT(Qsampler, 0.1.3.4, rncbc@rncbc.org, qsampler) |
AC_INIT(Qsampler, 0.1.4.4, rncbc@rncbc.org, qsampler) |
3 |
AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui.h) |
AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui.h) |
4 |
AC_CONFIG_HEADERS(config.h) |
AC_CONFIG_HEADERS(config.h) |
5 |
AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec) |
AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec qsampler.desktop) |
6 |
|
|
7 |
# Set default installation prefix. |
# Set default installation prefix. |
8 |
AC_PREFIX_DEFAULT(/usr/local) |
AC_PREFIX_DEFAULT(/usr/local) |
16 |
# Enable debugging argument option. |
# Enable debugging argument option. |
17 |
AC_ARG_ENABLE(debug, |
AC_ARG_ENABLE(debug, |
18 |
AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]), |
AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]), |
19 |
[ac_debug="debug"], |
[ac_debug="$enableval"]) |
|
[ac_debug="release"]) |
|
|
AC_SUBST(ac_debug) |
|
20 |
|
|
21 |
if test "x$ac_debug" = "xdebug"; then |
if test "x$ac_debug" = "xyes"; then |
22 |
AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) |
AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) |
23 |
|
ac_debug="debug" |
24 |
|
else |
25 |
|
ac_debug="release" |
26 |
fi |
fi |
27 |
|
AC_SUBST(ac_debug) |
28 |
|
|
29 |
# Enable libgig availability. |
# Enable libgig availability. |
30 |
AC_ARG_ENABLE(libgig, |
AC_ARG_ENABLE(libgig, |
31 |
AC_HELP_STRING([--disable-libgig], [disable libgig interface (default=no)]), |
AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]), |
32 |
[ac_libgig="no"], |
[ac_libgig="$enableval"], |
33 |
[ac_libgig="yes"]) |
[ac_libgig="yes"]) |
34 |
|
|
35 |
|
# Standard installation base dirs. |
36 |
|
ac_with_paths="/usr /usr/local" |
37 |
|
|
38 |
|
# Some a-la-debian alternatives... |
39 |
|
for X in /usr/lib /usr/share; do |
40 |
|
for Y in qt qt3; do |
41 |
|
if test -d $X/$Y/bin; then |
42 |
|
ac_with_paths="$ac_with_paths $X/$Y" |
43 |
|
fi |
44 |
|
done |
45 |
|
done |
46 |
|
|
47 |
# Set for alternate liblscp installation dir. |
# Set for alternate liblscp installation dir. |
48 |
AC_ARG_WITH(liblscp, |
AC_ARG_WITH(liblscp, |
49 |
AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]), |
AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]), |
65 |
AC_LANG_C |
AC_LANG_C |
66 |
AC_LANG_CPLUSPLUS |
AC_LANG_CPLUSPLUS |
67 |
|
|
68 |
|
# Check for QTDIR environment variable. |
69 |
|
AC_MSG_CHECKING([whether QTDIR environment variable is set]) |
70 |
|
if test "x$QTDIR" = "x"; then |
71 |
|
AC_MSG_RESULT([no]) |
72 |
|
else |
73 |
|
AC_MSG_RESULT([$QTDIR]) |
74 |
|
ac_with_paths="$ac_with_paths $QTDIR" |
75 |
|
fi |
76 |
|
|
77 |
# Prepend alternate dependencies paths. |
# Prepend alternate dependencies paths. |
78 |
|
ac_path=$PATH |
79 |
for X in $ac_with_paths; do |
for X in $ac_with_paths; do |
80 |
|
if test -d $X/bin; then |
81 |
|
ac_path="$X/bin:$ac_path" |
82 |
|
fi |
83 |
if test -d $X/include; then |
if test -d $X/include; then |
84 |
CFLAGS="$CFLAGS -I$X/include" |
for Y in qt qt3; do |
85 |
CPPFLAGS="$CPPFLAGS -I$X/include" |
if test -d $X/include/$Y; then |
86 |
|
CFLAGS="-I$X/include/$Y $CFLAGS" |
87 |
|
CPPFLAGS="-I$X/include/$Y $CPPFLAGS" |
88 |
|
ac_incpath="$X/include/$Y $ac_incpath" |
89 |
|
fi |
90 |
|
done |
91 |
|
CFLAGS="-I$X/include $CFLAGS" |
92 |
|
CPPFLAGS="-I$X/include $CPPFLAGS" |
93 |
ac_incpath="$X/include $ac_incpath" |
ac_incpath="$X/include $ac_incpath" |
94 |
fi |
fi |
95 |
if test -d $X/lib64; then |
if test -d $X/lib64; then |
96 |
LIBS="$LIBS -L$X/lib64" |
LIBS="-L$X/lib64 $LIBS" |
97 |
ac_libs="$ac_libs -L$X/lib64" |
ac_libs="-L$X/lib64 $ac_libs" |
98 |
fi |
fi |
99 |
if test -d $X/lib; then |
if test -d $X/lib; then |
100 |
LIBS="$LIBS -L$X/lib" |
LIBS="-L$X/lib $LIBS" |
101 |
ac_libs="-L$X/lib $ac_libs" |
ac_libs="-L$X/lib $ac_libs" |
102 |
fi |
fi |
103 |
done |
done |
104 |
|
|
|
# Check for QTDIR environment variable. |
|
|
AC_MSG_CHECKING([whether QTDIR environment variable is set]) |
|
|
if test "x$QTDIR" = "x"; then |
|
|
AC_MSG_RESULT([no]) |
|
|
AC_MSG_ERROR([QTDIR must be properly set.]) |
|
|
else |
|
|
AC_MSG_RESULT([$QTDIR]) |
|
|
fi |
|
|
|
|
|
CFLAGS="$CFLAGS -I$QTDIR/include" |
|
|
CPPFLAGS="$CPPFLAGS -I$QTDIR/include" |
|
|
if test -d $QTDIR/lib64; then |
|
|
LIBS="$LIBS -L$QTDIR/lib64" |
|
|
else |
|
|
LIBS="$LIBS -L$QTDIR/lib" |
|
|
fi |
|
|
for X in qt qt3; do |
|
|
if test -d $QTDIR/include/$X; then |
|
|
CFLAGS="$CFLAGS -I$QTDIR/include/$X" |
|
|
CPPFLAGS="$CPPFLAGS -I$QTDIR/include/$X" |
|
|
fi |
|
|
done |
|
|
|
|
105 |
# Checks for Qt library. |
# Checks for Qt library. |
106 |
for X in qt-mt qt; do |
for X in qt-mt qt; do |
107 |
if test "x$ac_qtlib" = "x"; then |
if test "x$ac_qtlib" = "x"; then |
136 |
ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt3-devel)." |
ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt3-devel)." |
137 |
|
|
138 |
# Check for Qt qmake utility. |
# Check for Qt qmake utility. |
139 |
AC_PATH_PROG(ac_qmake, qmake, [no], $QTDIR/bin:${PATH}) |
AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path) |
140 |
if test "x$ac_qmake" = "xno"; then |
if test "x$ac_qmake" = "xno"; then |
141 |
AC_MSG_ERROR([qmake $ac_qtdir_errmsg]) |
AC_MSG_ERROR([qmake $ac_qtdir_errmsg]) |
142 |
fi |
fi |
143 |
AC_SUBST(ac_qmake) |
AC_SUBST(ac_qmake) |
144 |
|
|
145 |
# Check for Qt moc utility. |
# Check for Qt moc utility. |
146 |
AC_PATH_PROG(ac_moc, moc, [no], $QTDIR/bin:${PATH}) |
AC_PATH_PROG(ac_moc, moc, [no], $ac_path) |
147 |
if test "x$ac_moc" = "xno"; then |
if test "x$ac_moc" = "xno"; then |
148 |
AC_MSG_ERROR([moc $ac_qtdir_errmsg]) |
AC_MSG_ERROR([moc $ac_qtdir_errmsg]) |
149 |
fi |
fi |
150 |
AC_SUBST(ac_moc) |
AC_SUBST(ac_moc) |
151 |
|
|
152 |
# Check for Qt uic utility. |
# Check for Qt uic utility. |
153 |
AC_PATH_PROG(ac_uic, uic, [no], $QTDIR/bin:${PATH}) |
AC_PATH_PROG(ac_uic, uic, [no], $ac_path) |
154 |
if test "x$ac_uic" = "xno"; then |
if test "x$ac_uic" = "xno"; then |
155 |
AC_MSG_ERROR([uic $ac_qtdir_errmsg]) |
AC_MSG_ERROR([uic $ac_qtdir_errmsg]) |
156 |
fi |
fi |
209 |
AC_DEFINE(CONFIG_MIDI_INSTRUMENT, 1, [Define if MIDI instrument mapping is available.]) |
AC_DEFINE(CONFIG_MIDI_INSTRUMENT, 1, [Define if MIDI instrument mapping is available.]) |
210 |
fi |
fi |
211 |
|
|
212 |
|
AC_CHECK_LIB(lscp, lscp_create_fxsend, [ac_fxsend="yes"], [ac_fxsend="no"]) |
213 |
|
if test "x$ac_fxsend" = "xyes"; then |
214 |
|
AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.]) |
215 |
|
AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t], |
216 |
|
ac_fxsend_level, [ |
217 |
|
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
218 |
|
lscp_fxsend_info_t info; |
219 |
|
info.level = 0.0f; |
220 |
|
], ac_fxsend_level="yes", ac_fxsend_level="no") |
221 |
|
]) |
222 |
|
if test "x$ac_fxsend_level" = "xyes"; then |
223 |
|
AC_DEFINE(CONFIG_FXSEND_LEVEL, 1, [Define if FX send level is available.]) |
224 |
|
fi |
225 |
|
fi |
226 |
|
|
227 |
|
AC_CACHE_CHECK([for audio_routing array type], |
228 |
|
ac_audio_routing, [ |
229 |
|
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
230 |
|
lscp_channel_info_t info; |
231 |
|
char ch = info.audio_routing[0][0]; |
232 |
|
], ac_audio_routing="no", ac_audio_routing="yes") |
233 |
|
]) |
234 |
|
if test "x$ac_audio_routing" = "xyes"; then |
235 |
|
AC_DEFINE(CONFIG_AUDIO_ROUTING, 1, [Define if audio_routing is an integer array.]) |
236 |
|
fi |
237 |
|
|
238 |
|
AC_CHECK_LIB(lscp, lscp_set_volume, [ac_volume="yes"], [ac_volume="no"]) |
239 |
|
if test "x$ac_volume" = "xyes"; then |
240 |
|
AC_DEFINE(CONFIG_VOLUME, 1, [Define if global volume is available.]) |
241 |
|
fi |
242 |
|
|
243 |
# Check for optional libraries. |
# Check for optional libraries. |
244 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
245 |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
249 |
fi |
fi |
250 |
fi |
fi |
251 |
|
|
252 |
|
# Check for round math function. |
253 |
|
AC_CHECK_LIB(m, lroundf, [ac_round="yes"], [ac_round="no"]) |
254 |
|
if test "x$ac_round" = "xyes"; then |
255 |
|
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
256 |
|
fi |
257 |
|
|
258 |
AC_SUBST(ac_libs) |
AC_SUBST(ac_libs) |
259 |
AC_SUBST(ac_incpath) |
AC_SUBST(ac_incpath) |
260 |
|
|