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