/[svn]/qsampler/trunk/configure.ac
ViewVC logotype

Annotation of /qsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3873 - (hide annotations) (download)
Thu Apr 15 13:28:01 2021 UTC (2 months, 1 week ago) by capela
File size: 19725 byte(s)
- Probable fix to git-tag / build-version extraction.
1 capela 753 # Process this file with autoconf to produce a configure script.
2 capela 3867 AC_INIT(Qsampler, 0.9.3, rncbc@rncbc.org, qsampler)
3 capela 1463
4 capela 2074 AC_CONFIG_SRCDIR(src/qsampler.cpp)
5     AC_CONFIG_HEADERS(src/config.h)
6 capela 3347 AC_CONFIG_FILES(Makefile qsampler.spec src/src.pri)
7 capela 753
8 capela 3038 # Build version string.
9     AC_CACHE_VAL([ac_cv_build_version], [
10 capela 3049 ac_cv_build_version=$(git describe --tags --dirty --abbrev=6 2>/dev/null)
11 capela 3038 if test -n "$ac_cv_build_version"; then
12 capela 3824 ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/^[[^0-9]]\+//')
13 capela 3873 ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/^1_//')
14     ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/^[[_vV]]\+//')
15 capela 3133 ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/-g/git./')
16 capela 3873 ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/[[_|-]]/./g')
17 capela 3122 ac_cv_build_version_extra=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
18     if test "x$ac_cv_build_version_extra" != "xmaster"; then
19     ac_cv_build_version="$ac_cv_build_version [[$ac_cv_build_version_extra]]"
20     fi
21 capela 3038 else
22     ac_cv_build_version=$PACKAGE_VERSION
23     fi
24     ])
25     ac_build_version="$ac_cv_build_version"
26     AC_DEFINE_UNQUOTED(CONFIG_BUILD_VERSION, ["$ac_build_version"], [Build version string.])
27    
28     # Sanitized version string.
29     AC_CACHE_VAL([ac_cv_version], [
30 capela 3313 ac_cv_version=$(echo $PACKAGE_VERSION | sed -r 's/^([[0-9|\.]]+).*$/\1/')
31 capela 3038 ])
32     ac_version="$ac_cv_version"
33     AC_DEFINE_UNQUOTED(CONFIG_VERSION, ["$ac_version"], [Version string.])
34 capela 2987 AC_SUBST(ac_version)
35    
36 capela 753 # Set default installation prefix.
37     AC_PREFIX_DEFAULT(/usr/local)
38 capela 2987 if test "x$prefix" = "xNONE"; then
39     prefix=$ac_default_prefix
40 capela 753 fi
41 capela 2987 if test "x$exec_prefix" = "xNONE"; then
42     exec_prefix=$prefix
43     fi
44     eval ac_prefix=$prefix
45 capela 753 AC_SUBST(ac_prefix)
46     AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.])
47    
48 capela 2987 # Set default installation directories.
49     eval ac_bindir=$bindir
50     AC_SUBST(ac_bindir)
51     AC_DEFINE_UNQUOTED(CONFIG_BINDIR, ["$ac_bindir"], [Default executable binary path.])
52    
53     eval ac_libdir=$libdir
54     AC_SUBST(ac_libdir)
55     AC_DEFINE_UNQUOTED(CONFIG_LIBDIR, ["$ac_libdir"], [Default object library path.])
56    
57     eval datarootdir=$datarootdir
58     eval ac_datadir=$datadir
59     AC_SUBST(ac_datadir)
60     AC_DEFINE_UNQUOTED(CONFIG_DATADIR, ["$ac_datadir"], [Default arch-idependent data path.])
61    
62     eval ac_mandir=$mandir
63     AC_SUBST(ac_mandir)
64     AC_DEFINE_UNQUOTED(CONFIG_MANDIR, ["$ac_mandir"], [Default man page path.])
65    
66    
67 capela 753 # Enable debugging argument option.
68     AC_ARG_ENABLE(debug,
69 capela 3404 AS_HELP_STRING([--enable-debug], [enable debugging (default=no)]),
70 capela 1166 [ac_debug="$enableval"])
71 capela 753
72 capela 3869 # Enable Qt6 build preference.
73     AC_ARG_ENABLE(qt6,
74     AS_HELP_STRING([--enable-qt6], [enable Qt6 build (default=no)]),
75     [ac_qt6="$enableval"],
76     [ac_qt6="no"])
77    
78    
79 capela 1166 if test "x$ac_debug" = "xyes"; then
80 capela 753 AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])
81 capela 2065 ac_stacktrace="yes"
82 capela 1166 ac_debug="debug"
83     else
84 capela 2065 ac_stacktrace="no"
85 capela 1166 ac_debug="release"
86 capela 753 fi
87 capela 1166 AC_SUBST(ac_debug)
88 capela 753
89 capela 2481
90 capela 753 # Enable libgig availability.
91     AC_ARG_ENABLE(libgig,
92 capela 3404 AS_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]),
93 capela 1166 [ac_libgig="$enableval"],
94 capela 753 [ac_libgig="yes"])
95    
96 capela 3496 # Enable unique/single instance.
97 capela 2839 AC_ARG_ENABLE(xunique,
98 capela 3496 AS_HELP_STRING([--enable-xunique], [enable unique/single instance (default=yes)]),
99 capela 2839 [ac_xunique="$enableval"],
100     [ac_xunique="yes"])
101    
102 capela 2065 # Enable debugger stack-trace option (assumes --enable-debug).
103     AC_ARG_ENABLE(stacktrace,
104 capela 3404 AS_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]),
105 capela 2065 [ac_stacktrace="$enableval"])
106    
107    
108 capela 1166 # Standard installation base dirs.
109 capela 3404 ac_path=$PATH
110 capela 3634 ac_pkg_config_path=$PKG_CONFIG_PATH
111 capela 2924 ac_with_paths=""
112 capela 1166
113 capela 3434 # Set for alternate Qt installation dir.
114 capela 3404 AC_ARG_WITH(qt,
115     AS_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]),
116     [ac_qt_path="$withval"], [ac_qt_path="no"])
117    
118     if test "x$ac_qt_path" != "xno"; then
119     ac_path="$ac_qt_path/bin:$ac_path"
120 capela 3634 ac_pkg_config_path="$ac_qt_path/lib/pkgconfig:$ac_pkg_config_path"
121 capela 3404 fi
122    
123 capela 825 # Set for alternate liblscp installation dir.
124     AC_ARG_WITH(liblscp,
125 capela 3404 AS_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]),
126 capela 825 [ac_with_paths="$ac_with_paths $withval"])
127    
128     # Set for alternate libgig installation dir.
129     AC_ARG_WITH(libgig,
130 capela 3404 AS_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]),
131 capela 825 [ac_with_paths="$ac_with_paths $withval"])
132    
133 capela 2545
134     # Honor user specified flags.
135     ac_cflags=$CFLAGS
136     ac_ldflags=$LDFLAGS
137    
138    
139 capela 753 # Checks for programs.
140     AC_PROG_CPP
141     AC_PROG_CXX
142     AC_PROG_CXXCPP
143    
144 capela 3407 # Checks for languages.
145     AC_LANG_CPLUSPLUS
146    
147 capela 2988 # Check for pkg-config.
148 schoenebeck 2591 PKG_PROG_PKG_CONFIG
149 capela 2511
150 capela 3025 # Check whether -std=c++11 support is necessary (4 < g++ version < 6).
151 capela 3037 AC_CACHE_CHECK([for g++ major version], [ac_cv_gxx_version_major], [
152     ac_cv_gxx_version_major=$($CC -dumpversion)
153     if test -n "$ac_cv_gxx_version_major"; then
154     ac_cv_gxx_version_major=$(echo $ac_cv_gxx_version_major | cut -d'.' -f1);
155 capela 3025 fi
156 capela 3037 ac_gxx_version_major=$(($ac_cv_gxx_version_major + 0))
157 capela 3025 ])
158 capela 3037 ac_gxx_version_major=$ac_cv_gxx_version_major
159 capela 3281 if test $ac_gxx_version_major -ge 4 -a $ac_gxx_version_major -lt 6; then
160 capela 3820 CXXFLAGS="-std=c++11 $CXXFLAGS"
161 capela 3523 ac_cflags="-std=c++11 $ac_cflags"
162 capela 3820 elif test $ac_gxx_version_major -ge 6 -a $ac_gxx_version_major -lt 11; then
163     CXXFLAGS="-std=c++17 $CXXFLAGS"
164     ac_cflags="-std=c++17 $ac_cflags"
165 capela 3025 fi
166    
167 capela 2511 # Check for proper flags.
168 capela 3014 ac_arch=$(uname -m)
169 capela 2511
170 capela 2830 # Check for install paths and alternatives...
171 capela 2829 ac_libdirs="lib"
172 capela 2511
173     if test "x$ac_arch" = "xx86_64"; then
174 capela 2829 ac_libdirs="$ac_libdirs lib64"
175 capela 2765 fi
176    
177 capela 3407 CFLAGS="-fPIC $CFLAGS"
178     CPPFLAGS="-fPIC $CPPFLAGS"
179    
180 capela 825 # Prepend alternate dependencies paths.
181     for X in $ac_with_paths; do
182 capela 1166 if test -d $X/bin; then
183 capela 3407 ac_path="$X/bin:$ac_path"
184 capela 1166 fi
185 capela 825 if test -d $X/include; then
186 capela 3407 CFLAGS="-I$X/include $CFLAGS "
187     CPPFLAGS="-I$X/include $CPPFLAGS"
188     ac_incpath="$X/include $ac_incpath"
189 capela 825 fi
190 capela 2830 for Y in $ac_libdirs; do
191 capela 3407 if test -d $X/$Y; then
192     LIBS="-L$X/$Y $LIBS"
193     ac_libs="-L$X/$Y $ac_libs"
194 capela 3634 if test -d $X/$Y/pkgconfig; then
195     ac_pkg_config_path="$X/$Y/pkgconfig:$ac_pkg_config_path"
196     fi
197 capela 3407 fi
198 capela 2766 done
199 capela 825 done
200    
201 capela 3634 # Set pkg-config path.
202     if test -n "$ac_pkg_config_path"; then
203     export PKG_CONFIG_PATH=$ac_pkg_config_path
204     fi
205    
206    
207 capela 2830 # A common error message:
208     ac_errmsg="not found in current PATH. Maybe QT development environment isn't available."
209    
210 capela 3516 # Check for qtchooser availability.
211     AC_PATH_TOOL(ac_qtchooser, qtchooser, [no], $ac_path)
212     if test -x $ac_qtchooser; then
213 capela 3869 if test "x$ac_qt6" = "xyes"; then
214     export QT_SELECT=6
215     else
216     export QT_SELECT=5
217     fi
218 capela 3516 fi
219    
220 capela 3407 # Check for proper qmake path/version alternatives.
221     AC_PATH_TOOL(ac_qmake, qmake, [no], $ac_path)
222 capela 2830 if test "x$ac_qmake" = "xno"; then
223 capela 3869 if test "x$ac_qt6" = "xyes"; then
224     AC_PATH_TOOL(ac_cv_qmake, qmake-qt6, [no], $ac_path)
225     ac_qmake=$ac_cv_qmake
226     else
227     AC_PATH_TOOL(ac_cv_qmake, qmake-qt5, [no], $ac_path)
228     ac_qmake=$ac_cv_qmake
229     fi
230 capela 2830 fi
231    
232 capela 3037 # Check for proper Qt major version.
233     AC_CACHE_CHECK([for Qt major version], [ac_cv_qt_version_major], [
234 capela 3868 ac_cv_qt_version=$($ac_qmake -query QT_VERSION)
235     ac_cv_qt_version_major=$(echo $ac_cv_qt_version | cut -d'.' -f1)
236 capela 3037 ac_cv_qt_version_major=$(($ac_cv_qt_version_major + 0))
237     ])
238 capela 3868 ac_qt_version=$ac_cv_qt_version
239 capela 3037 ac_qt_version_major=$ac_cv_qt_version_major
240 capela 3407 if test "x$ac_qmake" = "xno"; then
241 capela 3833 if test $ac_qt_version_major -lt 6; then
242     AC_MSG_ERROR([qmake-qt5 $ac_errmsg (qt5-devel)])
243     else
244     AC_MSG_ERROR([qmake-qt6 $ac_errmsg (qt6-devel)])
245     fi
246 capela 2830 fi
247    
248 capela 3037 # Check for proper Qt install path.
249     AC_CACHE_CHECK([for Qt install path], [ac_cv_qt_install_path], [
250     ac_cv_qt_install_path=$($ac_qmake -query QT_INSTALL_BINS)
251     ])
252     ac_qt_install_path=$ac_cv_qt_install_path
253     if test -d $ac_qt_install_path; then
254     ac_path="$ac_qt_install_path:$ac_path"
255 capela 2830 fi
256    
257     # Check it again, now with updated PATH, just in case...
258 capela 3404 AC_PATH_TOOL(ac_cv_qmake, qmake, [no], $ac_path)
259 capela 2830 ac_qmake=$ac_cv_qmake
260     if test "x$ac_qmake" = "xno"; then
261     AC_MSG_ERROR([qmake $ac_errmsg])
262     fi
263    
264     AC_SUBST(ac_qmake)
265    
266 capela 3037 AC_CACHE_CHECK([for Qt install headers], [ac_cv_qt_install_headers], [
267     ac_cv_qt_install_headers=$($ac_qmake -query QT_INSTALL_HEADERS)
268     ])
269     ac_qt_install_headers=$ac_cv_qt_install_headers
270 capela 2830 if test -d $ac_qt_install_headers; then
271     CFLAGS="-I$ac_qt_install_headers $CFLAGS "
272     CPPFLAGS="-I$ac_qt_install_headers $CPPFLAGS"
273     ac_incpath="$ac_qt_install_headers $ac_incpath"
274     fi
275    
276 capela 3037 AC_CACHE_CHECK([for Qt install libraries], [ac_cv_qt_install_libs], [
277     ac_cv_qt_install_libs=$($ac_qmake -query QT_INSTALL_LIBS)
278     ])
279     ac_qt_install_libs=$ac_cv_qt_install_libs
280 capela 2830 if test -d $ac_qt_install_libs; then
281     LIBS="-L$ac_qt_install_libs $LIBS"
282     ac_libs="-L$ac_qt_install_libs $ac_libs"
283     fi
284    
285 capela 3434 # Finally, check for proper Qt version.
286     AC_CACHE_CHECK([for Qt library version >= 5.1],
287     ac_cv_qtversion, [
288     AC_TRY_COMPILE([#include "QtCore/qglobal.h"], [
289     #if QT_VERSION < 0x050100
290     #error Qt library 5.1 or greater required.
291     #endif
292     ], ac_cv_qtversion="yes", [
293     echo "no; Qt 5.1 or greater is required"
294     exit 1
295 capela 2718 ])
296 capela 3434 ])
297 capela 2480
298 capela 753 # Check for Qt moc utility.
299 capela 3404 AC_PATH_TOOL(ac_moc, moc, [no], $ac_path)
300 capela 753 if test "x$ac_moc" = "xno"; then
301 capela 1463 AC_MSG_ERROR([moc $ac_errmsg])
302 capela 753 fi
303     AC_SUBST(ac_moc)
304    
305     # Check for Qt uic utility.
306 capela 3404 AC_PATH_TOOL(ac_uic, uic, [no], $ac_path)
307 capela 753 if test "x$ac_uic" = "xno"; then
308 capela 1463 AC_MSG_ERROR([uic $ac_errmsg])
309 capela 753 fi
310     AC_SUBST(ac_uic)
311    
312 capela 3613
313 capela 1873 # Check for Qt lupdate utility.
314 capela 3404 AC_PATH_TOOL(ac_lupdate, lupdate, [no], $ac_path)
315 capela 1873 if test "x$ac_lupdate" = "xno"; then
316 capela 3833 if test $ac_qt_version_major -lt 6; then
317     AC_PATH_TOOL(ac_cv_lupdate, lupdate-qt5, [no], $ac_path)
318     else
319     AC_PATH_TOOL(ac_cv_lupdate, lupdate-qt6, [no], $ac_path)
320     fi
321 capela 3613 if test "x$ac_cv_lupdate" = "xno"; then
322 capela 3833 if test $ac_qt_version_major -lt 6; then
323     AC_MSG_ERROR([lupdate $ac_errmsg (qt5-linguist)])
324     else
325     AC_MSG_ERROR([lupdate $ac_errmsg (qt6-linguist)])
326     fi
327 capela 3613 else
328     ac_lupdate=$ac_cv_lupdate;
329     fi
330 capela 1873 fi
331     AC_SUBST(ac_lupdate)
332    
333     # Check for Qt lrelease utility.
334 capela 3404 AC_PATH_TOOL(ac_lrelease, lrelease, [no], $ac_path)
335 capela 3613 if test "x$ac_lrelease" = "xno"; then
336 capela 3833 if test $ac_qt_version_major -lt 6; then
337     AC_PATH_TOOL(ac_cv_lrelease, lrelease-qt5, [no], $ac_path)
338     else
339     AC_PATH_TOOL(ac_cv_lrelease, lrelease-qt6, [no], $ac_path)
340     fi
341 capela 3613 if test "x$ac_cv_lrelease" = "xno"; then
342 capela 3833 if test $ac_qt_version_major -lt 6; then
343     AC_MSG_ERROR([lrelease $ac_errmsg (qt5-linguist)])
344     else
345     AC_MSG_ERROR([lrelease $ac_errmsg (qt6-linguist)])
346     fi
347 capela 3613 else
348     ac_lrelease=$ac_cv_lrelease;
349     fi
350 capela 1873 fi
351     AC_SUBST(ac_lrelease)
352    
353 capela 2830
354 capela 753 # Checks for libraries.
355     AC_CHECK_LIB(m, main)
356     AC_CHECK_LIB(X11, main)
357     AC_CHECK_LIB(Xext, main)
358    
359     # Check for round math function.
360     AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"])
361     if test "x$ac_round" = "xyes"; then
362     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
363     fi
364    
365     # Check for mandatory libraries.
366 capela 2988 PKG_CHECK_MODULES([LSCP], [lscp], [ac_liblscp="yes"], [ac_liblscp="no"])
367     if test "x$ac_liblscp" = "xyes"; then
368     AC_DEFINE(CONFIG_LIBLSCP, 1, [Define if liblscp is available.])
369     ac_cflags="$ac_cflags $LSCP_CFLAGS"
370     ac_libs="$ac_libs $LSCP_LIBS"
371 capela 3086 CFLAGS="$CFLAGS $LSCP_CFLAGS"
372     CPPFLAGS="$CPPFLAGS $LSCP_CFLAGS"
373     LIBS="$LIBS $LSCP_LIBS"
374 capela 2988 else
375     AC_MSG_ERROR([*** LSCP library not found (liblscp).])
376 capela 753 fi
377 capela 2988
378 persson 2144 case "{$host}" in
379 capela 2988 *mingw*)
380     ac_libs="$ac_libs -lws2_32"
381     LIBS="$LIBS -lws2_32"
382     ;;
383 persson 2144 esac
384 capela 753
385     AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],
386 capela 1820 ac_cv_instrument_name, [
387 capela 753 AC_TRY_COMPILE([#include "lscp/client.h"], [
388     lscp_channel_info_t info;
389     info.instrument_name = 0;
390 capela 1820 ], ac_cv_instrument_name="yes", ac_cv_instrument_name="no")
391 capela 753 ])
392 capela 1820 ac_instrument_name=$ac_cv_instrument_name
393 capela 753 if test "x$ac_instrument_name" = "xyes"; then
394     AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.])
395     fi
396    
397     AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t],
398 capela 1820 ac_cv_mute_solo, [
399 capela 753 AC_TRY_COMPILE([#include "lscp/client.h"], [
400     lscp_channel_info_t info;
401     info.mute = 0;
402     info.solo = 0;
403 capela 1820 ], ac_cv_mute_solo="yes", ac_cv_mute_solo="no")
404 capela 753 ])
405 capela 1820 ac_mute_solo=$ac_cv_mute_solo
406 capela 753 if test "x$ac_mute_solo" = "xyes"; then
407     AC_CHECK_LIB(lscp, lscp_set_channel_mute, [ac_mute_solo="yes"], [ac_mute_solo="no"])
408     fi
409     if test "x$ac_mute_solo" = "xyes"; then
410     AC_CHECK_LIB(lscp, lscp_set_channel_solo, [ac_mute_solo="yes"], [ac_mute_solo="no"])
411     fi
412     if test "x$ac_mute_solo" = "xyes"; then
413     AC_DEFINE(CONFIG_MUTE_SOLO, 1, [Define if mute/solo is available.])
414     fi
415    
416 capela 957 AC_CHECK_LIB(lscp, lscp_map_midi_instrument, [ac_midi_instrument="yes"], [ac_midi_instrument="no"])
417     if test "x$ac_midi_instrument" = "xyes"; then
418     AC_DEFINE(CONFIG_MIDI_INSTRUMENT, 1, [Define if MIDI instrument mapping is available.])
419     fi
420    
421 capela 1022 AC_CHECK_LIB(lscp, lscp_create_fxsend, [ac_fxsend="yes"], [ac_fxsend="no"])
422     if test "x$ac_fxsend" = "xyes"; then
423     AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.])
424 capela 1033 AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t],
425 capela 1820 ac_cv_fxsend_level, [
426 capela 1033 AC_TRY_COMPILE([#include "lscp/client.h"], [
427     lscp_fxsend_info_t info;
428     info.level = 0.0f;
429 capela 1820 ], ac_cv_fxsend_level="yes", ac_cv_fxsend_level="no")
430 capela 1033 ])
431 capela 1820 ac_fxsend_level=$ac_cv_fxsend_level
432 capela 1033 if test "x$ac_fxsend_level" = "xyes"; then
433     AC_DEFINE(CONFIG_FXSEND_LEVEL, 1, [Define if FX send level is available.])
434     fi
435 schoenebeck 1667 AC_CHECK_LIB(lscp, lscp_set_fxsend_name, [ac_fxsend_rename="yes"], [ac_fxsend_rename="no"])
436     if test "x$ac_fxsend_rename" = "xyes"; then
437     AC_DEFINE(CONFIG_FXSEND_RENAME, 1, [Define if FX send rename is available.])
438     fi
439 capela 1022 fi
440    
441     AC_CACHE_CHECK([for audio_routing array type],
442 capela 1820 ac_cv_audio_routing, [
443 capela 1022 AC_TRY_COMPILE([#include "lscp/client.h"], [
444 capela 1166 lscp_channel_info_t info;
445     char ch = info.audio_routing[0][0];
446 capela 1820 ], ac_cv_audio_routing="no", ac_cv_audio_routing="yes")
447 capela 1022 ])
448 capela 1820 ac_audio_routing=$ac_cv_audio_routing
449 capela 1022 if test "x$ac_audio_routing" = "xyes"; then
450     AC_DEFINE(CONFIG_AUDIO_ROUTING, 1, [Define if audio_routing is an integer array.])
451     fi
452    
453 capela 1034 AC_CHECK_LIB(lscp, lscp_set_volume, [ac_volume="yes"], [ac_volume="no"])
454     if test "x$ac_volume" = "xyes"; then
455     AC_DEFINE(CONFIG_VOLUME, 1, [Define if global volume is available.])
456     fi
457    
458 capela 1414 AC_CHECK_LIB(lscp, lscp_edit_channel_instrument, [ac_edit_instrument="yes"], [ac_edit_instrument="no"])
459 schoenebeck 1366 if test "x$ac_edit_instrument" = "xyes"; then
460     AC_DEFINE(CONFIG_EDIT_INSTRUMENT, 1, [Define if instrument editing is available.])
461     fi
462    
463 schoenebeck 1691 AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp],
464 capela 1820 ac_cv_channel_midi_event, [
465 schoenebeck 1691 AC_TRY_COMPILE([
466     #include "lscp/client.h"
467     #include "lscp/event.h"
468     ], [
469     lscp_event_t ev;
470     ev = LSCP_EVENT_CHANNEL_MIDI;
471 capela 1820 ], ac_cv_channel_midi_event="yes", ac_cv_channel_midi_event="no")
472 schoenebeck 1691 ])
473 capela 1820 ac_channel_midi_event=$ac_cv_channel_midi_event
474     if test "x$ac_channel_midi_event" = "xyes"; then
475 capela 1704 AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.])
476 schoenebeck 1691 fi
477    
478 schoenebeck 1698 AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp],
479 capela 1820 ac_cv_device_midi_event, [
480 schoenebeck 1698 AC_TRY_COMPILE([
481     #include "lscp/client.h"
482     #include "lscp/event.h"
483     ], [
484     lscp_event_t ev;
485     ev = LSCP_EVENT_DEVICE_MIDI;
486 capela 1820 ], ac_cv_device_midi_event="yes", ac_cv_device_midi_event="no")
487 schoenebeck 1698 ])
488 capela 1820 ac_device_midi_event=$ac_cv_device_midi_event
489     if test "x$ac_device_midi_event" = "xyes"; then
490 capela 1704 AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.])
491 schoenebeck 1698 fi
492    
493 schoenebeck 1803 AC_CHECK_LIB(lscp, lscp_get_voices, [ac_max_voices="yes"], [ac_max_voices="no"])
494     if test "x$ac_max_voices" = "xyes"; then
495     AC_DEFINE(CONFIG_MAX_VOICES, 1, [Define if max. voices / streams is available.])
496     fi
497    
498 schoenebeck 3668 AC_CHECK_LIB(lscp, lscp_client_connection_lost, [ac_lscp_conn_lost="yes"], [ac_lscp_conn_lost="no"])
499     if test "x$ac_lscp_conn_lost" = "xyes"; then
500     AC_DEFINE(CONFIG_LSCP_CLIENT_CONNECTION_LOST, 1, [Define if liblscp function lscp_client_connection_lost() is available.])
501     fi
502    
503 capela 753 # Check for optional libraries.
504     if test "x$ac_libgig" = "xyes"; then
505 capela 2988 PKG_CHECK_MODULES([GIG], [gig >= 3.3.0], [ac_libgig="yes"], [ac_libgig="no"])
506 capela 753 fi
507 capela 2988 if test "x$ac_libgig" = "xyes"; then
508     AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.])
509     ac_cflags="$ac_cflags $GIG_CFLAGS"
510     ac_libs="$ac_libs $GIG_LIBS"
511 capela 3086 CFLAGS="$CFLAGS $GIG_CFLAGS"
512     CPPFLAGS="$CPPFLAGS $GIG_CFLAGS"
513     LIBS="$LIBS $GIG_LIBS"
514 capela 2988 AC_DEFINE(CONFIG_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.])
515     ac_libgig_setautoload="yes"
516     else
517     AC_MSG_WARN([*** GIG library not found (libgig).])
518     fi
519 capela 753
520 capela 972 # Check for round math function.
521     AC_CHECK_LIB(m, lroundf, [ac_round="yes"], [ac_round="no"])
522     if test "x$ac_round" = "xyes"; then
523     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
524     fi
525    
526 capela 2839
527 capela 753 # Checks for header files.
528     AC_HEADER_STDC
529     AC_HEADER_SYS_WAIT
530 persson 2144 AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h sys/socket.h)
531 capela 753
532 capela 2646 if test "x$ac_libgig" = "xyes"; then
533 capela 2660 AC_CHECK_HEADER(libgig/SF.h, [ac_libgig_sf2="yes"], [ac_libgig_sf2="no"])
534 capela 2646 if test "x$ac_libgig_sf2" = "xyes"; then
535 capela 2660 AC_DEFINE(CONFIG_LIBGIG_SF2, 1, [Define if libgig/SF.h is available.])
536 capela 2646 fi
537     fi
538    
539 capela 3496 # Check for unique/single instance support.
540 capela 3434 if test "x$ac_xunique" = "xyes"; then
541 capela 3833 if test $ac_qt_version_major -lt 6; then
542     PKG_CHECK_MODULES([QT5NETWORK], [Qt5Network], [ac_xunique="yes"], [ac_xunique="no"])
543     else
544     PKG_CHECK_MODULES([QT6NETWORK], [Qt6Network], [ac_xunique="yes"], [ac_xunique="no"])
545 capela 2996 fi
546     fi
547 capela 3833 if test "x$ac_xunique" = "xyes"; then
548     AC_DEFINE(CONFIG_XUNIQUE, 1, [Define if unique/single instance is enabled.])
549     ac_qnetwork="network"
550     fi
551 capela 3496 AC_SUBST(ac_qnetwork)
552 capela 2996
553     # Check for debugging stack-trace.
554     if test "x$ac_stacktrace" = "xyes"; then
555     AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.])
556     fi
557    
558 capela 2988 AC_SUBST(ac_cflags)
559     AC_SUBST(ac_ldflags)
560 capela 2996 AC_SUBST(ac_incpath)
561     AC_SUBST(ac_libs)
562 capela 2988
563    
564 capela 753 # Checks for typedefs, structures, and compiler characteristics.
565     # AC_C_CONST
566    
567     # Checks for library functions.
568     AC_CHECK_FUNCS(system)
569    
570     # Finally produce a configure header file and the makefiles.
571     AC_OUTPUT
572    
573     # make clean > /dev/null 2>&1
574    
575 capela 1463 # Output summary message
576    
577     echo
578 capela 3868 echo " $PACKAGE_NAME $ac_build_version (Qt $ac_qt_version)"
579 capela 1463 echo
580     echo " Build target . . . . . . . . . . . . . . . . . . .: $ac_debug"
581     echo
582     echo " LSCP instrument name support . . . . . . . . . . .: $ac_instrument_name"
583     echo " LSCP mute/solo support . . . . . . . . . . . . . .: $ac_mute_solo"
584     echo " LSCP MIDI instrument support . . . . . . . . . . .: $ac_midi_instrument"
585     echo " LSCP FX send support . . . . . . . . . . . . . . .: $ac_fxsend"
586     echo " LSCP FX send level support . . . . . . . . . . . .: $ac_fxsend_level"
587 schoenebeck 1667 echo " LSCP FX send rename support . . . . . . . . . . .: $ac_fxsend_rename"
588 capela 1463 echo " LSCP audio routing support . . . . . . . . . . . .: $ac_audio_routing"
589     echo " LSCP volume support . . . . . . . . . . . . . . .: $ac_volume"
590     echo " LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument"
591     echo " GigaSampler instrument file support (libgig) . . .: $ac_libgig"
592 schoenebeck 1527 if test "x$ac_libgig" = "xyes"; then
593 capela 2646 echo " libgig supports fast information retrieval . . . .: $ac_libgig_setautoload"
594     echo " libgig supports SoundFont2 instruments files . . .: $ac_libgig_sf2"
595 schoenebeck 1527 fi
596 capela 1820 echo " LSCP channel MIDI event support . . . . . . . . .: $ac_channel_midi_event"
597     echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event"
598 schoenebeck 1803 echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices"
599 schoenebeck 3668 echo " LSCP connection loss support . . . . . . . . . . .: $ac_lscp_conn_lost"
600 capela 1463 echo
601 capela 3496 echo " Unique/Single instance support . . . . . . . . . .: $ac_xunique"
602 capela 2065 echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace"
603     echo
604 capela 1463 echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"
605     echo
606 capela 753 echo "Now type 'make', followed by 'make install' as root."
607 capela 1463 echo

  ViewVC Help
Powered by ViewVC