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

Diff of /qsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1704 by capela, Tue Feb 19 09:18:45 2008 UTC revision 3873 by capela, Thu Apr 15 13:28:01 2021 UTC
# Line 1  Line 1 
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.10, 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/^1_//')
14          ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/^[[_vV]]\+//')
15          ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/-g/git./')
16          ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/[[_|-]]/./g')
17          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       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       ac_cv_version=$(echo $PACKAGE_VERSION | sed -r 's/^([[0-9|\.]]+).*$/\1/')
31    ])
32    ac_version="$ac_cv_version"
33    AC_DEFINE_UNQUOTED(CONFIG_VERSION, ["$ac_version"], [Version string.])
34    AC_SUBST(ac_version)
35    
36  # Set default installation prefix.  # Set default installation prefix.
37  AC_PREFIX_DEFAULT(/usr/local)  AC_PREFIX_DEFAULT(/usr/local)
38  ac_prefix=$prefix  if test "x$prefix" = "xNONE"; then
39  if test "x$ac_prefix" = "xNONE"; then     prefix=$ac_default_prefix
40      ac_prefix=$ac_default_prefix  fi
41    if test "x$exec_prefix" = "xNONE"; then
42       exec_prefix=$prefix
43  fi  fi
44    eval ac_prefix=$prefix
45  AC_SUBST(ac_prefix)  AC_SUBST(ac_prefix)
46  AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.])  AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.])
47    
48    # 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  # Enable debugging argument option.  # Enable debugging argument option.
68  AC_ARG_ENABLE(debug,  AC_ARG_ENABLE(debug,
69    AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]),    AS_HELP_STRING([--enable-debug], [enable debugging (default=no)]),
70    [ac_debug="$enableval"])    [ac_debug="$enableval"])
71    
72    # 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  if test "x$ac_debug" = "xyes"; then  if test "x$ac_debug" = "xyes"; then
80     AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])     AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])
81       ac_stacktrace="yes"
82     ac_debug="debug"     ac_debug="debug"
83  else  else
84       ac_stacktrace="no"
85     ac_debug="release"     ac_debug="release"
86  fi  fi
87  AC_SUBST(ac_debug)  AC_SUBST(ac_debug)
88    
89    
90  # Enable libgig availability.  # Enable libgig availability.
91  AC_ARG_ENABLE(libgig,  AC_ARG_ENABLE(libgig,
92    AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]),    AS_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]),
93    [ac_libgig="$enableval"],    [ac_libgig="$enableval"],
94    [ac_libgig="yes"])    [ac_libgig="yes"])
95    
96  # Standard installation base dirs.  # Enable unique/single instance.
97  ac_with_paths="/usr /usr/local"  AC_ARG_ENABLE(xunique,
98      AS_HELP_STRING([--enable-xunique], [enable unique/single instance (default=yes)]),
99      [ac_xunique="$enableval"],
100      [ac_xunique="yes"])
101    
102    # Enable debugger stack-trace option (assumes --enable-debug).
103    AC_ARG_ENABLE(stacktrace,
104      AS_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]),
105      [ac_stacktrace="$enableval"])
106    
107  # Some a-la-debian alternatives...  
108  for X in /usr/lib /usr/share; do  # Standard installation base dirs.
109    for Y in qt qt4; do  ac_path=$PATH
110      if test -d $X/$Y/bin; then  ac_pkg_config_path=$PKG_CONFIG_PATH
111        ac_with_paths="$ac_with_paths $X/$Y"  ac_with_paths=""
     fi  
   done  
 done  
112    
113  # Set for alternate Qt installation dir.  # Set for alternate Qt installation dir.
114  AC_ARG_WITH(qt,  AC_ARG_WITH(qt,
115    AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]),    AS_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]),
116    [ac_with_paths="$ac_with_paths $withval"])    [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       ac_pkg_config_path="$ac_qt_path/lib/pkgconfig:$ac_pkg_config_path"
121    fi
122    
123  # Set for alternate liblscp installation dir.  # Set for alternate liblscp installation dir.
124  AC_ARG_WITH(liblscp,  AC_ARG_WITH(liblscp,
125    AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]),    AS_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]),
126    [ac_with_paths="$ac_with_paths $withval"])    [ac_with_paths="$ac_with_paths $withval"])
127    
128  # Set for alternate libgig installation dir.  # Set for alternate libgig installation dir.
129  AC_ARG_WITH(libgig,  AC_ARG_WITH(libgig,
130    AC_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]),    AS_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]),
131    [ac_with_paths="$ac_with_paths $withval"])    [ac_with_paths="$ac_with_paths $withval"])
132    
133    
134    # Honor user specified flags.
135    ac_cflags=$CFLAGS
136    ac_ldflags=$LDFLAGS
137    
138    
139  # Checks for programs.  # Checks for programs.
 AC_PROG_CC  
140  AC_PROG_CPP  AC_PROG_CPP
141  AC_PROG_CXX  AC_PROG_CXX
142  AC_PROG_CXXCPP  AC_PROG_CXXCPP
 AC_PROG_GCC_TRADITIONAL  
143    
144  # Checks for languages.  # Checks for languages.
 AC_LANG_C  
145  AC_LANG_CPLUSPLUS  AC_LANG_CPLUSPLUS
146    
147    # Check for pkg-config.
148    PKG_PROG_PKG_CONFIG
149    
150    # Check whether -std=c++11 support is necessary (4 < g++ version < 6).
151    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       fi
156       ac_gxx_version_major=$(($ac_cv_gxx_version_major + 0))
157    ])
158    ac_gxx_version_major=$ac_cv_gxx_version_major
159    if test $ac_gxx_version_major -ge 4 -a $ac_gxx_version_major -lt 6; then
160       CXXFLAGS="-std=c++11 $CXXFLAGS"
161       ac_cflags="-std=c++11 $ac_cflags"
162    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    fi
166    
167    # Check for proper flags.
168    ac_arch=$(uname -m)
169    
170    # Check for install paths and alternatives...
171    ac_libdirs="lib"
172    
173    if test "x$ac_arch" = "xx86_64"; then
174       ac_libdirs="$ac_libdirs lib64"
175    fi
176    
177    CFLAGS="-fPIC $CFLAGS"
178    CPPFLAGS="-fPIC $CPPFLAGS"
179    
180  # Prepend alternate dependencies paths.  # Prepend alternate dependencies paths.
 ac_path=$PATH  
181  for X in $ac_with_paths; do  for X in $ac_with_paths; do
182    if test -d $X/bin; then    if test -d $X/bin; then
183      ac_path="$X/bin:$ac_path"       ac_path="$X/bin:$ac_path"
   fi  
   if test -x $X/qmake; then  
     ac_path="$X:$ac_path"  
184    fi    fi
185    if test -d $X/include; then    if test -d $X/include; then
186      for Y in qt qt4; do       CFLAGS="-I$X/include $CFLAGS "
187        if test -d $X/include/$Y; then       CPPFLAGS="-I$X/include $CPPFLAGS"
188          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"  
189    fi    fi
190      for Y in $ac_libdirs; do
191         if test -d $X/$Y; then
192            LIBS="-L$X/$Y $LIBS"
193            ac_libs="-L$X/$Y $ac_libs"
194            if test -d $X/$Y/pkgconfig; then
195               ac_pkg_config_path="$X/$Y/pkgconfig:$ac_pkg_config_path"
196            fi
197         fi
198      done
199  done  done
200    
201  # Check for proper Qt version.  # Set pkg-config path.
202  AC_CACHE_CHECK([for Qt library version >= 4.1],  if test -n "$ac_pkg_config_path"; then
203    ac_qtlib_version, [     export PKG_CONFIG_PATH=$ac_pkg_config_path
204    AC_TRY_LINK([#include "Qt/qglobal.h"], [  fi
205  #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  
     ])  
 ])  
206    
207  # A common error message:  # A common error message:
208  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."
209    
210    # Check for qtchooser availability.
211    AC_PATH_TOOL(ac_qtchooser, qtchooser, [no], $ac_path)
212    if test -x $ac_qtchooser; then
213       if test "x$ac_qt6" = "xyes"; then
214          export QT_SELECT=6
215       else
216          export QT_SELECT=5
217       fi
218    fi
219    
220    # Check for proper qmake path/version alternatives.
221    AC_PATH_TOOL(ac_qmake, qmake, [no], $ac_path)
222    if test "x$ac_qmake" = "xno"; then
223       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    fi
231    
232    # Check for proper Qt major version.
233    AC_CACHE_CHECK([for Qt major version], [ac_cv_qt_version_major], [
234       ac_cv_qt_version=$($ac_qmake -query QT_VERSION)
235       ac_cv_qt_version_major=$(echo $ac_cv_qt_version | cut -d'.' -f1)
236       ac_cv_qt_version_major=$(($ac_cv_qt_version_major + 0))
237    ])
238    ac_qt_version=$ac_cv_qt_version
239    ac_qt_version_major=$ac_cv_qt_version_major
240    if test "x$ac_qmake" = "xno"; then
241       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    fi
247    
248  # Check for Qt qmake utility.  # Check for proper Qt install path.
249  AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path)  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    fi
256    
257    # Check it again, now with updated PATH, just in case...
258    AC_PATH_TOOL(ac_cv_qmake, qmake, [no], $ac_path)
259    ac_qmake=$ac_cv_qmake
260  if test "x$ac_qmake" = "xno"; then  if test "x$ac_qmake" = "xno"; then
261     AC_MSG_ERROR([qmake $ac_errmsg])     AC_MSG_ERROR([qmake $ac_errmsg])
262  fi  fi
263    
264  AC_SUBST(ac_qmake)  AC_SUBST(ac_qmake)
265    
266    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    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    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    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    # 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       ])
296    ])
297    
298  # Check for Qt moc utility.  # Check for Qt moc utility.
299  AC_PATH_PROG(ac_moc, moc, [no], $ac_path)  AC_PATH_TOOL(ac_moc, moc, [no], $ac_path)
300  if test "x$ac_moc" = "xno"; then  if test "x$ac_moc" = "xno"; then
301     AC_MSG_ERROR([moc $ac_errmsg])     AC_MSG_ERROR([moc $ac_errmsg])
302  fi  fi
303  AC_SUBST(ac_moc)  AC_SUBST(ac_moc)
304    
305  # Check for Qt uic utility.  # Check for Qt uic utility.
306  AC_PATH_PROG(ac_uic, uic, [no], $ac_path)  AC_PATH_TOOL(ac_uic, uic, [no], $ac_path)
307  if test "x$ac_uic" = "xno"; then  if test "x$ac_uic" = "xno"; then
308     AC_MSG_ERROR([uic $ac_errmsg])     AC_MSG_ERROR([uic $ac_errmsg])
309  fi  fi
310  AC_SUBST(ac_uic)  AC_SUBST(ac_uic)
311    
312    
313    # Check for Qt lupdate utility.
314    AC_PATH_TOOL(ac_lupdate, lupdate, [no], $ac_path)
315    if test "x$ac_lupdate" = "xno"; then
316       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       if test "x$ac_cv_lupdate" = "xno"; then
322          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       else
328          ac_lupdate=$ac_cv_lupdate;
329       fi
330    fi
331    AC_SUBST(ac_lupdate)
332    
333    # Check for Qt lrelease utility.
334    AC_PATH_TOOL(ac_lrelease, lrelease, [no], $ac_path)
335    if test "x$ac_lrelease" = "xno"; then
336       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       if test "x$ac_cv_lrelease" = "xno"; then
342          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       else
348          ac_lrelease=$ac_cv_lrelease;
349       fi
350    fi
351    AC_SUBST(ac_lrelease)
352    
353    
354  # Checks for libraries.  # Checks for libraries.
355  AC_CHECK_LIB(m, main)  AC_CHECK_LIB(m, main)
356  AC_CHECK_LIB(X11, main)  AC_CHECK_LIB(X11, main)
# Line 152  if test "x$ac_round" = "xyes"; then Line 363  if test "x$ac_round" = "xyes"; then
363  fi  fi
364    
365  # Check for mandatory libraries.  # Check for mandatory libraries.
366  AC_CHECK_LIB(lscp, main, [ac_liblscp="yes"], [ac_liblscp="no"])  PKG_CHECK_MODULES([LSCP], [lscp], [ac_liblscp="yes"], [ac_liblscp="no"])
367  if test "x$ac_liblscp" = "xno"; then  if test "x$ac_liblscp" = "xyes"; then
368     AC_MSG_ERROR([LSCP library not found.])     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       CFLAGS="$CFLAGS $LSCP_CFLAGS"
372       CPPFLAGS="$CPPFLAGS $LSCP_CFLAGS"
373       LIBS="$LIBS $LSCP_LIBS"
374    else
375       AC_MSG_ERROR([*** LSCP library not found (liblscp).])
376  fi  fi
377  ac_libs="$ac_libs -llscp"  
378    case "{$host}" in
379       *mingw*)
380       ac_libs="$ac_libs -lws2_32"
381       LIBS="$LIBS -lws2_32"
382       ;;
383    esac
384    
385  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],
386    ac_instrument_name, [    ac_cv_instrument_name, [
387    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
388          lscp_channel_info_t info;          lscp_channel_info_t info;
389          info.instrument_name = 0;          info.instrument_name = 0;
390      ], ac_instrument_name="yes", ac_instrument_name="no")      ], ac_cv_instrument_name="yes", ac_cv_instrument_name="no")
391  ])  ])
392    ac_instrument_name=$ac_cv_instrument_name
393  if test "x$ac_instrument_name" = "xyes"; then  if test "x$ac_instrument_name" = "xyes"; then
394     AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.])     AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.])
395  fi  fi
396    
397  AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t],  AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t],
398    ac_mute_solo, [    ac_cv_mute_solo, [
399    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
400          lscp_channel_info_t info;          lscp_channel_info_t info;
401          info.mute = 0;          info.mute = 0;
402          info.solo = 0;          info.solo = 0;
403      ], ac_mute_solo="yes", ac_mute_solo="no")      ], ac_cv_mute_solo="yes", ac_cv_mute_solo="no")
404  ])  ])
405    ac_mute_solo=$ac_cv_mute_solo
406  if test "x$ac_mute_solo" = "xyes"; then  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"])     AC_CHECK_LIB(lscp, lscp_set_channel_mute, [ac_mute_solo="yes"], [ac_mute_solo="no"])
408  fi  fi
# Line 196  AC_CHECK_LIB(lscp, lscp_create_fxsend, [ Line 422  AC_CHECK_LIB(lscp, lscp_create_fxsend, [
422  if test "x$ac_fxsend" = "xyes"; then  if test "x$ac_fxsend" = "xyes"; then
423    AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.])    AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.])
424    AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t],    AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t],
425      ac_fxsend_level, [      ac_cv_fxsend_level, [
426      AC_TRY_COMPILE([#include "lscp/client.h"], [      AC_TRY_COMPILE([#include "lscp/client.h"], [
427            lscp_fxsend_info_t info;            lscp_fxsend_info_t info;
428            info.level = 0.0f;            info.level = 0.0f;
429        ], ac_fxsend_level="yes", ac_fxsend_level="no")        ], ac_cv_fxsend_level="yes", ac_cv_fxsend_level="no")
430    ])    ])
431      ac_fxsend_level=$ac_cv_fxsend_level
432    if test "x$ac_fxsend_level" = "xyes"; then    if test "x$ac_fxsend_level" = "xyes"; then
433            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.])
434    fi    fi
# Line 212  if test "x$ac_fxsend" = "xyes"; then Line 439  if test "x$ac_fxsend" = "xyes"; then
439  fi  fi
440    
441  AC_CACHE_CHECK([for audio_routing array type],  AC_CACHE_CHECK([for audio_routing array type],
442    ac_audio_routing, [    ac_cv_audio_routing, [
443    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
444      lscp_channel_info_t info;      lscp_channel_info_t info;
445      char ch = info.audio_routing[0][0];      char ch = info.audio_routing[0][0];
446      ], ac_audio_routing="no", ac_audio_routing="yes")      ], ac_cv_audio_routing="no", ac_cv_audio_routing="yes")
447  ])  ])
448    ac_audio_routing=$ac_cv_audio_routing
449  if test "x$ac_audio_routing" = "xyes"; then  if test "x$ac_audio_routing" = "xyes"; then
450     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.])
451  fi  fi
# Line 233  if test "x$ac_edit_instrument" = "xyes"; Line 461  if test "x$ac_edit_instrument" = "xyes";
461  fi  fi
462    
463  AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp],  AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp],
464    ac_lscp_channel_midi_event, [    ac_cv_channel_midi_event, [
465    AC_TRY_COMPILE([    AC_TRY_COMPILE([
466          #include "lscp/client.h"          #include "lscp/client.h"
467          #include "lscp/event.h"          #include "lscp/event.h"
468          ], [          ], [
469          lscp_event_t ev;          lscp_event_t ev;
470          ev = LSCP_EVENT_CHANNEL_MIDI;          ev = LSCP_EVENT_CHANNEL_MIDI;
471      ], ac_lscp_channel_midi_event="yes", ac_lscp_channel_midi_event="no")      ], ac_cv_channel_midi_event="yes", ac_cv_channel_midi_event="no")
472  ])  ])
473  if test "x$ac_lscp_channel_midi_event" = "xyes"; then  ac_channel_midi_event=$ac_cv_channel_midi_event
474    if test "x$ac_channel_midi_event" = "xyes"; then
475     AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.])     AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.])
476  fi  fi
477    
478  AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp],  AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp],
479    ac_lscp_device_midi_event, [    ac_cv_device_midi_event, [
480    AC_TRY_COMPILE([    AC_TRY_COMPILE([
481          #include "lscp/client.h"          #include "lscp/client.h"
482          #include "lscp/event.h"          #include "lscp/event.h"
483          ], [          ], [
484          lscp_event_t ev;          lscp_event_t ev;
485          ev = LSCP_EVENT_DEVICE_MIDI;          ev = LSCP_EVENT_DEVICE_MIDI;
486      ], ac_lscp_device_midi_event="yes", ac_lscp_device_midi_event="no")      ], ac_cv_device_midi_event="yes", ac_cv_device_midi_event="no")
487  ])  ])
488  if test "x$ac_lscp_device_midi_event" = "xyes"; then  ac_device_midi_event=$ac_cv_device_midi_event
489    if test "x$ac_device_midi_event" = "xyes"; then
490     AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.])     AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.])
491  fi  fi
492    
493    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    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  # Check for optional libraries.  # Check for optional libraries.
504  if test "x$ac_libgig" = "xyes"; then  if test "x$ac_libgig" = "xyes"; then
505     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"])
506     if test "x$ac_libgig" = "xyes"; then  fi
507        AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.])  if test "x$ac_libgig" = "xyes"; then
508        ac_libs="$ac_libs -lgig"     AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.])
509        AC_MSG_CHECKING([for gig::File::SetAutoLoad() method in libgig])     ac_cflags="$ac_cflags $GIG_CFLAGS"
510        AC_LANG_SAVE     ac_libs="$ac_libs $GIG_LIBS"
511        AC_LANG_CPLUSPLUS     CFLAGS="$CFLAGS $GIG_CFLAGS"
512        CXXFLAGS="$ac_libs"     CPPFLAGS="$CPPFLAGS $GIG_CFLAGS"
513        AC_TRY_RUN([     LIBS="$LIBS $GIG_LIBS"
514  #include <stdlib.h>     AC_DEFINE(CONFIG_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.])
515  #include <gig.h>     ac_libgig_setautoload="yes"
516  int main() {  else
517      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  
518  fi  fi
519    
520  # Check for round math function.  # Check for round math function.
# Line 297  if test "x$ac_round" = "xyes"; then Line 523  if test "x$ac_round" = "xyes"; then
523     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
524  fi  fi
525    
 AC_SUBST(ac_libs)  
 AC_SUBST(ac_incpath)  
526    
527  # Checks for header files.  # Checks for header files.
528  AC_HEADER_STDC  AC_HEADER_STDC
529  AC_HEADER_SYS_WAIT  AC_HEADER_SYS_WAIT
530  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)
531    
532  AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"])  if test "x$ac_libgig" = "xyes"; then
533  if test "x$ac_lscp_h" = "xno"; then     AC_CHECK_HEADER(libgig/SF.h, [ac_libgig_sf2="yes"], [ac_libgig_sf2="no"])
534     AC_MSG_ERROR([LSCP headers not found.])     if test "x$ac_libgig_sf2" = "xyes"; then
535          AC_DEFINE(CONFIG_LIBGIG_SF2, 1, [Define if libgig/SF.h is available.])
536       fi
537    fi
538    
539    # Check for unique/single instance support.
540    if test "x$ac_xunique" = "xyes"; then
541       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       fi
546    fi
547    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    AC_SUBST(ac_qnetwork)
552    
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  fi
557    
558    AC_SUBST(ac_cflags)
559    AC_SUBST(ac_ldflags)
560    AC_SUBST(ac_incpath)
561    AC_SUBST(ac_libs)
562    
563    
564  # Checks for typedefs, structures, and compiler characteristics.  # Checks for typedefs, structures, and compiler characteristics.
565  # AC_C_CONST  # AC_C_CONST
566    
# Line 324  AC_OUTPUT Line 575  AC_OUTPUT
575  # Output summary message  # Output summary message
576    
577  echo  echo
578  echo "  $PACKAGE_NAME $PACKAGE_VERSION"  echo "  $PACKAGE_NAME $ac_build_version (Qt $ac_qt_version)"
579  echo  echo
580  echo "  Build target . . . . . . . . . . . . . . . . . . .: $ac_debug"  echo "  Build target . . . . . . . . . . . . . . . . . . .: $ac_debug"
581  echo  echo
# Line 339  echo "  LSCP volume support  . . . . . . Line 590  echo "  LSCP volume support  . . . . . .
590  echo "  LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument"  echo "  LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument"
591  echo "  GigaSampler instrument file support (libgig) . . .: $ac_libgig"  echo "  GigaSampler instrument file support (libgig) . . .: $ac_libgig"
592  if test "x$ac_libgig" = "xyes"; then  if test "x$ac_libgig" = "xyes"; then
593  echo "  libgig supports fast information retrieval . . . .: $have_libgig_setautoload"  echo "  libgig supports fast information retrieval . . . .: $ac_libgig_setautoload"
594    echo "  libgig supports SoundFont2 instruments files . . .: $ac_libgig_sf2"
595  fi  fi
596  echo "  LSCP channel MIDI event support  . . . . . . . . .: $ac_lscp_channel_midi_event"  echo "  LSCP channel MIDI event support  . . . . . . . . .: $ac_channel_midi_event"
597  echo "  LSCP device MIDI event support . . . . . . . . . .: $ac_lscp_device_midi_event"  echo "  LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event"
598    echo "  LSCP runtime max. voices / disk streams support  .: $ac_max_voices"
599    echo "  LSCP connection loss support . . . . . . . . . . .: $ac_lscp_conn_lost"
600    echo
601    echo "  Unique/Single instance support . . . . . . . . . .: $ac_xunique"
602    echo "  Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace"
603  echo  echo
604  echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"  echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"
605  echo  echo

Legend:
Removed from v.1704  
changed lines
  Added in v.3873

  ViewVC Help
Powered by ViewVC