/[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 1527 by schoenebeck, Mon Nov 26 16:00:21 2007 UTC revision 2480 by capela, Fri Nov 1 17:44:30 2013 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.0.21, rncbc@rncbc.org, qsampler)  AC_INIT(Qsampler, 0.2.2.41, 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 src/qsampler.desktop)
7    
8  # Set default installation prefix.  # Set default installation prefix.
9  AC_PREFIX_DEFAULT(/usr/local)  AC_PREFIX_DEFAULT(/usr/local)
# Line 21  AC_ARG_ENABLE(debug, Line 21  AC_ARG_ENABLE(debug,
21    
22  if test "x$ac_debug" = "xyes"; then  if test "x$ac_debug" = "xyes"; then
23     AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])     AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])
24       ac_stacktrace="yes"
25     ac_debug="debug"     ac_debug="debug"
26  else  else
27       ac_stacktrace="no"
28     ac_debug="release"     ac_debug="release"
29  fi  fi
30  AC_SUBST(ac_debug)  AC_SUBST(ac_debug)
# Line 33  AC_ARG_ENABLE(libgig, Line 35  AC_ARG_ENABLE(libgig,
35    [ac_libgig="$enableval"],    [ac_libgig="$enableval"],
36    [ac_libgig="yes"])    [ac_libgig="yes"])
37    
38    # Enable debugger stack-trace option (assumes --enable-debug).
39    AC_ARG_ENABLE(stacktrace,
40      AC_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]),
41      [ac_stacktrace="$enableval"])
42    
43    
44    if test "$cross_compiling" != yes; then
45  # Standard installation base dirs.  # Standard installation base dirs.
46  ac_with_paths="/usr /usr/local"  ac_with_paths="/usr /usr/local"
47    
48  # Some a-la-debian alternatives...  # Some a-la-debian alternatives...
49  for X in /usr/lib /usr/share; do  for X in /usr/lib /usr/lib64 /usr/share; do
50    for Y in qt qt4; do    for Y in qt qt4 qt5; do
51      if test -d $X/$Y/bin; then      if test -d $X/$Y/bin; then
52        ac_with_paths="$ac_with_paths $X/$Y"        ac_with_paths="$ac_with_paths $X/$Y"
53      fi      fi
54    done    done
55  done  done
56    fi
57    
58  # Set for alternate Qt installation dir.  # Set for alternate Qt installation dir.
59  AC_ARG_WITH(qt,  AC_ARG_WITH(qt,
# Line 77  for X in $ac_with_paths; do Line 87  for X in $ac_with_paths; do
87    if test -d $X/bin; then    if test -d $X/bin; then
88      ac_path="$X/bin:$ac_path"      ac_path="$X/bin:$ac_path"
89    fi    fi
90    if test -x $X/qmake; then  # if test -x $X/qmake; then
91      ac_path="$X:$ac_path"  #   ac_path="$X:$ac_path"
92    fi  # fi
93    if test -d $X/include; then    if test -d $X/include; then
94      for Y in qt qt4; do      for Y in qt qt4 qt5; do
95        if test -d $X/include/$Y; then        if test -d $X/include/$Y; then
96          CFLAGS="-I$X/include/$Y $CFLAGS"          CFLAGS="-I$X/include/$Y $CFLAGS"
97          CPPFLAGS="-I$X/include/$Y $CPPFLAGS"          CPPFLAGS="-I$X/include/$Y $CPPFLAGS"
# Line 102  for X in $ac_with_paths; do Line 112  for X in $ac_with_paths; do
112    fi    fi
113  done  done
114    
115    # Check for proper flags.
116    ac_arch=`uname -m`
117    if test "$ac_arch" == "x86_64"; then
118       CFLAGS="-fPIC $CFLAGS"
119       CPPFLAGS="-fPIC $CPPFLAGS"
120    fi
121    
122  # Check for proper Qt version.  # Check for proper Qt version.
123  AC_CACHE_CHECK([for Qt library version >= 4.1],  AC_CACHE_CHECK([for Qt library version >= 4.4],
124    ac_qtlib_version, [    ac_cv_qtversion, [
125    AC_TRY_LINK([#include "Qt/qglobal.h"], [    AC_TRY_LINK([#include "QtCore/qglobal.h"], [
126  #if QT_VERSION < 0x040100  #if QT_VERSION < 0x040400
127  #error Qt library 4.1 or greater required.  #error Qt library 4.4 or greater required.
128  #endif  #endif
129      ],      ], ac_cv_qtversion="yes", [
130      ac_qtlib_version="yes", [        echo "no; Qt 4.4 or greater is required"
       echo "no; Qt 4.1 or greater is required"  
131        exit        exit
132      ])      ])
133  ])  ])
# Line 140  if test "x$ac_uic" = "xno"; then Line 156  if test "x$ac_uic" = "xno"; then
156  fi  fi
157  AC_SUBST(ac_uic)  AC_SUBST(ac_uic)
158    
159    # Check for Qt lupdate utility.
160    AC_PATH_PROG(ac_lupdate, lupdate, [no], $ac_path)
161    if test "x$ac_lupdate" = "xno"; then
162       AC_MSG_ERROR([lupdate $ac_errmsg])
163    fi
164    AC_SUBST(ac_lupdate)
165    
166    # Check for Qt lrelease utility.
167    AC_PATH_PROG(ac_lrelease, lrelease, [no], $ac_path)
168    if test "x$ac_release" = "xno"; then
169       AC_MSG_ERROR([lrelease $ac_errmsg])
170    fi
171    AC_SUBST(ac_lrelease)
172    
173  # Checks for libraries.  # Checks for libraries.
174  AC_CHECK_LIB(m, main)  AC_CHECK_LIB(m, main)
175  AC_CHECK_LIB(X11, main)  AC_CHECK_LIB(X11, main)
# Line 157  if test "x$ac_liblscp" = "xno"; then Line 187  if test "x$ac_liblscp" = "xno"; then
187     AC_MSG_ERROR([LSCP library not found.])     AC_MSG_ERROR([LSCP library not found.])
188  fi  fi
189  ac_libs="$ac_libs -llscp"  ac_libs="$ac_libs -llscp"
190    case "{$host}" in
191         *mingw*)
192         ac_libs="$ac_libs -lws2_32"
193         LIBS="$LIBS -lws2_32"
194         ;;
195    esac
196    
197  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],
198    ac_instrument_name, [    ac_cv_instrument_name, [
199    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
200          lscp_channel_info_t info;          lscp_channel_info_t info;
201          info.instrument_name = 0;          info.instrument_name = 0;
202      ], ac_instrument_name="yes", ac_instrument_name="no")      ], ac_cv_instrument_name="yes", ac_cv_instrument_name="no")
203  ])  ])
204    ac_instrument_name=$ac_cv_instrument_name
205  if test "x$ac_instrument_name" = "xyes"; then  if test "x$ac_instrument_name" = "xyes"; then
206     AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.])     AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.])
207  fi  fi
208    
209  AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t],  AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t],
210    ac_mute_solo, [    ac_cv_mute_solo, [
211    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
212          lscp_channel_info_t info;          lscp_channel_info_t info;
213          info.mute = 0;          info.mute = 0;
214          info.solo = 0;          info.solo = 0;
215      ], ac_mute_solo="yes", ac_mute_solo="no")      ], ac_cv_mute_solo="yes", ac_cv_mute_solo="no")
216  ])  ])
217    ac_mute_solo=$ac_cv_mute_solo
218  if test "x$ac_mute_solo" = "xyes"; then  if test "x$ac_mute_solo" = "xyes"; then
219     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"])
220  fi  fi
# Line 196  AC_CHECK_LIB(lscp, lscp_create_fxsend, [ Line 234  AC_CHECK_LIB(lscp, lscp_create_fxsend, [
234  if test "x$ac_fxsend" = "xyes"; then  if test "x$ac_fxsend" = "xyes"; then
235    AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.])    AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.])
236    AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t],    AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t],
237      ac_fxsend_level, [      ac_cv_fxsend_level, [
238      AC_TRY_COMPILE([#include "lscp/client.h"], [      AC_TRY_COMPILE([#include "lscp/client.h"], [
239            lscp_fxsend_info_t info;            lscp_fxsend_info_t info;
240            info.level = 0.0f;            info.level = 0.0f;
241        ], ac_fxsend_level="yes", ac_fxsend_level="no")        ], ac_cv_fxsend_level="yes", ac_cv_fxsend_level="no")
242    ])    ])
243      ac_fxsend_level=$ac_cv_fxsend_level
244    if test "x$ac_fxsend_level" = "xyes"; then    if test "x$ac_fxsend_level" = "xyes"; then
245            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.])
246    fi    fi
247      AC_CHECK_LIB(lscp, lscp_set_fxsend_name, [ac_fxsend_rename="yes"], [ac_fxsend_rename="no"])
248      if test "x$ac_fxsend_rename" = "xyes"; then
249              AC_DEFINE(CONFIG_FXSEND_RENAME, 1, [Define if FX send rename is available.])
250      fi
251  fi  fi
252    
253  AC_CACHE_CHECK([for audio_routing array type],  AC_CACHE_CHECK([for audio_routing array type],
254    ac_audio_routing, [    ac_cv_audio_routing, [
255    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
256      lscp_channel_info_t info;      lscp_channel_info_t info;
257      char ch = info.audio_routing[0][0];      char ch = info.audio_routing[0][0];
258      ], ac_audio_routing="no", ac_audio_routing="yes")      ], ac_cv_audio_routing="no", ac_cv_audio_routing="yes")
259  ])  ])
260    ac_audio_routing=$ac_cv_audio_routing
261  if test "x$ac_audio_routing" = "xyes"; then  if test "x$ac_audio_routing" = "xyes"; then
262     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.])
263  fi  fi
# Line 228  if test "x$ac_edit_instrument" = "xyes"; Line 272  if test "x$ac_edit_instrument" = "xyes";
272    AC_DEFINE(CONFIG_EDIT_INSTRUMENT, 1, [Define if instrument editing is available.])    AC_DEFINE(CONFIG_EDIT_INSTRUMENT, 1, [Define if instrument editing is available.])
273  fi  fi
274    
275    AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp],
276      ac_cv_channel_midi_event, [
277      AC_TRY_COMPILE([
278            #include "lscp/client.h"
279            #include "lscp/event.h"
280            ], [
281            lscp_event_t ev;
282            ev = LSCP_EVENT_CHANNEL_MIDI;
283        ], ac_cv_channel_midi_event="yes", ac_cv_channel_midi_event="no")
284    ])
285    ac_channel_midi_event=$ac_cv_channel_midi_event
286    if test "x$ac_channel_midi_event" = "xyes"; then
287       AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.])
288    fi
289    
290    AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp],
291      ac_cv_device_midi_event, [
292      AC_TRY_COMPILE([
293            #include "lscp/client.h"
294            #include "lscp/event.h"
295            ], [
296            lscp_event_t ev;
297            ev = LSCP_EVENT_DEVICE_MIDI;
298        ], ac_cv_device_midi_event="yes", ac_cv_device_midi_event="no")
299    ])
300    ac_device_midi_event=$ac_cv_device_midi_event
301    if test "x$ac_device_midi_event" = "xyes"; then
302       AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.])
303    fi
304    
305    AC_CHECK_LIB(lscp, lscp_get_voices, [ac_max_voices="yes"], [ac_max_voices="no"])
306    if test "x$ac_max_voices" = "xyes"; then
307      AC_DEFINE(CONFIG_MAX_VOICES, 1, [Define if max. voices / streams is available.])
308    fi
309    
310  # Check for optional libraries.  # Check for optional libraries.
311  if test "x$ac_libgig" = "xyes"; then  if test "x$ac_libgig" = "xyes"; then
312     AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"])     AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"])
# Line 238  if test "x$ac_libgig" = "xyes"; then Line 317  if test "x$ac_libgig" = "xyes"; then
317        AC_LANG_SAVE        AC_LANG_SAVE
318        AC_LANG_CPLUSPLUS        AC_LANG_CPLUSPLUS
319        CXXFLAGS="$ac_libs"        CXXFLAGS="$ac_libs"
320        AC_TRY_RUN([        AC_TRY_COMPILE([
321  #include <stdlib.h>  #include <stdlib.h>
322  #include <gig.h>  #include <gig.h>
323  int main() {        ],[
324      gig::File file;      gig::File file;
325      file.SetAutoLoad(false);      file.SetAutoLoad(false);
     exit(0);  
 }  
326        ],        ],
327        have_libgig_setautoload="yes",        have_libgig_setautoload="yes",
       have_libgig_setautoload="no",  
328        have_libgig_setautoload="no"        have_libgig_setautoload="no"
329        )        )
330        AC_LANG_RESTORE        AC_LANG_RESTORE
# Line 265  if test "x$ac_round" = "xyes"; then Line 341  if test "x$ac_round" = "xyes"; then
341     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
342  fi  fi
343    
344    # Check for debugging stack-trace.
345    if test "x$ac_stacktrace" = "xyes"; then
346       AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.])
347    fi
348    
349    # Some recent distros (eg. fedora, debian) require this.
350    if test "x$ac_cv_lib_X11_main" = "xyes"; then
351       ac_libs="$ac_libs -lX11"
352    fi
353    
354  AC_SUBST(ac_libs)  AC_SUBST(ac_libs)
355  AC_SUBST(ac_incpath)  AC_SUBST(ac_incpath)
356    
357  # Checks for header files.  # Checks for header files.
358  AC_HEADER_STDC  AC_HEADER_STDC
359  AC_HEADER_SYS_WAIT  AC_HEADER_SYS_WAIT
360  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)
361    
362  AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"])  AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"])
363  if test "x$ac_lscp_h" = "xno"; then  if test "x$ac_lscp_h" = "xno"; then
# Line 301  echo "  LSCP mute/solo support . . . . . Line 387  echo "  LSCP mute/solo support . . . . .
387  echo "  LSCP MIDI instrument support . . . . . . . . . . .: $ac_midi_instrument"  echo "  LSCP MIDI instrument support . . . . . . . . . . .: $ac_midi_instrument"
388  echo "  LSCP FX send support . . . . . . . . . . . . . . .: $ac_fxsend"  echo "  LSCP FX send support . . . . . . . . . . . . . . .: $ac_fxsend"
389  echo "  LSCP FX send level support . . . . . . . . . . . .: $ac_fxsend_level"  echo "  LSCP FX send level support . . . . . . . . . . . .: $ac_fxsend_level"
390    echo "  LSCP FX send rename support  . . . . . . . . . . .: $ac_fxsend_rename"
391  echo "  LSCP audio routing support . . . . . . . . . . . .: $ac_audio_routing"  echo "  LSCP audio routing support . . . . . . . . . . . .: $ac_audio_routing"
392  echo "  LSCP volume support  . . . . . . . . . . . . . . .: $ac_volume"  echo "  LSCP volume support  . . . . . . . . . . . . . . .: $ac_volume"
393  echo "  LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument"  echo "  LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument"
# Line 308  echo "  GigaSampler instrument file supp Line 395  echo "  GigaSampler instrument file supp
395  if test "x$ac_libgig" = "xyes"; then  if test "x$ac_libgig" = "xyes"; then
396  echo "  libgig supports fast information retrieval . . . .: $have_libgig_setautoload"  echo "  libgig supports fast information retrieval . . . .: $have_libgig_setautoload"
397  fi  fi
398    echo "  LSCP channel MIDI event support  . . . . . . . . .: $ac_channel_midi_event"
399    echo "  LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event"
400    echo "  LSCP runtime max. voices / disk streams support  .: $ac_max_voices"
401    echo
402    echo "  Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace"
403  echo  echo
404  echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"  echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"
405  echo  echo

Legend:
Removed from v.1527  
changed lines
  Added in v.2480

  ViewVC Help
Powered by ViewVC