/[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 1671 by capela, Wed Feb 6 09:18:21 2008 UTC revision 2511 by capela, Fri Jan 24 16:34:11 2014 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.5, rncbc@rncbc.org, qsampler)  AC_INIT(Qsampler, 0.2.3.1, 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)
31    
32    
33    # Enable Qt4/5 availability.
34    AC_ARG_ENABLE(qt4,
35      AC_HELP_STRING([--enable-qt4], [enable Qt4 build (default=yes)]),
36      [ac_qt4="$enableval"],
37      [ac_qt4="yes"])
38    
39    AC_ARG_ENABLE(qt5,
40      AC_HELP_STRING([--enable-qt5], [enable Qt5 build (default=no)]),
41      [ac_qt5="$enableval"],
42      [ac_qt5="no"])
43    
44    if test "x$ac_qt4" = "xno"; then
45       ac_qt5="yes"
46    fi
47    if test "x$ac_qt5" = "xyes"; then
48       ac_qt4="no"
49    fi
50    
51    
52  # Enable libgig availability.  # Enable libgig availability.
53  AC_ARG_ENABLE(libgig,  AC_ARG_ENABLE(libgig,
54    AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]),    AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]),
55    [ac_libgig="$enableval"],    [ac_libgig="$enableval"],
56    [ac_libgig="yes"])    [ac_libgig="yes"])
57    
58    # Enable debugger stack-trace option (assumes --enable-debug).
59    AC_ARG_ENABLE(stacktrace,
60      AC_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]),
61      [ac_stacktrace="$enableval"])
62    
63    
64  # Standard installation base dirs.  # Standard installation base dirs.
65  ac_with_paths="/usr /usr/local"  ac_with_paths="/usr /usr/local"
66    
 # Some a-la-debian alternatives...  
 for X in /usr/lib /usr/share; do  
   for Y in qt qt4; do  
     if test -d $X/$Y/bin; then  
       ac_with_paths="$ac_with_paths $X/$Y"  
     fi  
   done  
 done  
   
67  # Set for alternate Qt installation dir.  # Set for alternate Qt installation dir.
68  AC_ARG_WITH(qt,  AC_ARG_WITH(qt,
69    AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]),    AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]),
# Line 71  AC_PROG_GCC_TRADITIONAL Line 90  AC_PROG_GCC_TRADITIONAL
90  AC_LANG_C  AC_LANG_C
91  AC_LANG_CPLUSPLUS  AC_LANG_CPLUSPLUS
92    
93    
94    # Check for proper flags.
95    ac_arch=`uname -m`
96    
97    # Check for some a-la-debian alternatives...
98    ac_qtdirs="qt"
99    
100    if test "x$ac_qt4" = "xyes"; then
101       ac_qtdirs="qt4 $ac_qtdirs"
102    fi
103    if test "x$ac_qt5" = "xyes"; then
104       ac_qtdirs="qt5 $ac_qtdirs"
105    fi
106    
107    ac_topdirs="/usr/share /usr/lib"
108    
109    if test "x$ac_arch" = "xx86_64"; then
110       CFLAGS="-fPIC $CFLAGS"
111       CPPFLAGS="-fPIC $CPPFLAGS"
112       ac_topdirs="$ac_topdirs /usr/lib64"
113    fi
114    
115    for X in $ac_topdirs; do
116      for Y in $ac_qtdirs; do
117        if test -d $X/$Y/bin; then
118          ac_with_paths="$X/$Y $ac_with_paths"
119        fi
120      done
121    done
122    
123  # Prepend alternate dependencies paths.  # Prepend alternate dependencies paths.
124  ac_path=$PATH  ac_path=$PATH
125  for X in $ac_with_paths; do  for X in $ac_with_paths; do
126    if test -d $X/bin; then    if test -d $X/bin; then
127      ac_path="$X/bin:$ac_path"      ac_path="$X/bin:$ac_path"
128    fi    fi
129    if test -x $X/qmake; then  # if test -x $X/qmake; then
130      ac_path="$X:$ac_path"  #   ac_path="$X:$ac_path"
131    fi  # fi
132    if test -d $X/include; then    if test -d $X/include; then
133      for Y in qt qt4; do      for Y in $ac_qtdirs; do
134        if test -d $X/include/$Y; then        if test -d $X/include/$Y; then
135          CFLAGS="-I$X/include/$Y $CFLAGS"          CFLAGS="-I$X/include/$Y $CFLAGS"
136          CPPFLAGS="-I$X/include/$Y $CPPFLAGS"          CPPFLAGS="-I$X/include/$Y $CPPFLAGS"
# Line 92  for X in $ac_with_paths; do Line 141  for X in $ac_with_paths; do
141      CPPFLAGS="-I$X/include $CPPFLAGS"      CPPFLAGS="-I$X/include $CPPFLAGS"
142      ac_incpath="$X/include $ac_incpath"      ac_incpath="$X/include $ac_incpath"
143    fi    fi
144    if test -d $X/lib64; then    if test "x$ac_arch" = "xx86_64" -a -d $X/lib64; then
145      LIBS="-L$X/lib64 $LIBS"      LIBS="-L$X/lib64 $LIBS"
146      ac_libs="-L$X/lib64 $ac_libs"      ac_libs="-L$X/lib64 $ac_libs"
147    fi    fi
# Line 102  for X in $ac_with_paths; do Line 151  for X in $ac_with_paths; do
151    fi    fi
152  done  done
153    
154    
155  # Check for proper Qt version.  # Check for proper Qt version.
156  AC_CACHE_CHECK([for Qt library version >= 4.1],  AC_CACHE_CHECK([for Qt library version >= 4.4],
157    ac_qtlib_version, [    ac_cv_qtversion, [
158    AC_TRY_LINK([#include "Qt/qglobal.h"], [    AC_TRY_LINK([#include "QtCore/qglobal.h"], [
159  #if QT_VERSION < 0x040100  #if QT_VERSION < 0x040400
160  #error Qt library 4.1 or greater required.  #error Qt library 4.4 or greater required.
161  #endif  #endif
162      ],      ], ac_cv_qtversion="yes", [
163      ac_qtlib_version="yes", [        echo "no; Qt 4.4 or greater is required"
       echo "no; Qt 4.1 or greater is required"  
164        exit        exit
165      ])      ])
166  ])  ])
167    
168    
169  # A common error message:  # A common error message:
170  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 (qt-devel)."
171    
# Line 140  if test "x$ac_uic" = "xno"; then Line 190  if test "x$ac_uic" = "xno"; then
190  fi  fi
191  AC_SUBST(ac_uic)  AC_SUBST(ac_uic)
192    
193    # Check for Qt lupdate utility.
194    AC_PATH_PROG(ac_lupdate, lupdate, [no], $ac_path)
195    if test "x$ac_lupdate" = "xno"; then
196       AC_MSG_ERROR([lupdate $ac_errmsg])
197    fi
198    AC_SUBST(ac_lupdate)
199    
200    # Check for Qt lrelease utility.
201    AC_PATH_PROG(ac_lrelease, lrelease, [no], $ac_path)
202    if test "x$ac_release" = "xno"; then
203       AC_MSG_ERROR([lrelease $ac_errmsg])
204    fi
205    AC_SUBST(ac_lrelease)
206    
207  # Checks for libraries.  # Checks for libraries.
208  AC_CHECK_LIB(m, main)  AC_CHECK_LIB(m, main)
209  AC_CHECK_LIB(X11, main)  AC_CHECK_LIB(X11, main)
# Line 157  if test "x$ac_liblscp" = "xno"; then Line 221  if test "x$ac_liblscp" = "xno"; then
221     AC_MSG_ERROR([LSCP library not found.])     AC_MSG_ERROR([LSCP library not found.])
222  fi  fi
223  ac_libs="$ac_libs -llscp"  ac_libs="$ac_libs -llscp"
224    case "{$host}" in
225         *mingw*)
226         ac_libs="$ac_libs -lws2_32"
227         LIBS="$LIBS -lws2_32"
228         ;;
229    esac
230    
231  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],
232    ac_instrument_name, [    ac_cv_instrument_name, [
233    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
234          lscp_channel_info_t info;          lscp_channel_info_t info;
235          info.instrument_name = 0;          info.instrument_name = 0;
236      ], ac_instrument_name="yes", ac_instrument_name="no")      ], ac_cv_instrument_name="yes", ac_cv_instrument_name="no")
237  ])  ])
238    ac_instrument_name=$ac_cv_instrument_name
239  if test "x$ac_instrument_name" = "xyes"; then  if test "x$ac_instrument_name" = "xyes"; then
240     AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.])     AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.])
241  fi  fi
242    
243  AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t],  AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t],
244    ac_mute_solo, [    ac_cv_mute_solo, [
245    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
246          lscp_channel_info_t info;          lscp_channel_info_t info;
247          info.mute = 0;          info.mute = 0;
248          info.solo = 0;          info.solo = 0;
249      ], ac_mute_solo="yes", ac_mute_solo="no")      ], ac_cv_mute_solo="yes", ac_cv_mute_solo="no")
250  ])  ])
251    ac_mute_solo=$ac_cv_mute_solo
252  if test "x$ac_mute_solo" = "xyes"; then  if test "x$ac_mute_solo" = "xyes"; then
253     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"])
254  fi  fi
# Line 196  AC_CHECK_LIB(lscp, lscp_create_fxsend, [ Line 268  AC_CHECK_LIB(lscp, lscp_create_fxsend, [
268  if test "x$ac_fxsend" = "xyes"; then  if test "x$ac_fxsend" = "xyes"; then
269    AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.])    AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.])
270    AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t],    AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t],
271      ac_fxsend_level, [      ac_cv_fxsend_level, [
272      AC_TRY_COMPILE([#include "lscp/client.h"], [      AC_TRY_COMPILE([#include "lscp/client.h"], [
273            lscp_fxsend_info_t info;            lscp_fxsend_info_t info;
274            info.level = 0.0f;            info.level = 0.0f;
275        ], ac_fxsend_level="yes", ac_fxsend_level="no")        ], ac_cv_fxsend_level="yes", ac_cv_fxsend_level="no")
276    ])    ])
277      ac_fxsend_level=$ac_cv_fxsend_level
278    if test "x$ac_fxsend_level" = "xyes"; then    if test "x$ac_fxsend_level" = "xyes"; then
279            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.])
280    fi    fi
# Line 212  if test "x$ac_fxsend" = "xyes"; then Line 285  if test "x$ac_fxsend" = "xyes"; then
285  fi  fi
286    
287  AC_CACHE_CHECK([for audio_routing array type],  AC_CACHE_CHECK([for audio_routing array type],
288    ac_audio_routing, [    ac_cv_audio_routing, [
289    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
290      lscp_channel_info_t info;      lscp_channel_info_t info;
291      char ch = info.audio_routing[0][0];      char ch = info.audio_routing[0][0];
292      ], ac_audio_routing="no", ac_audio_routing="yes")      ], ac_cv_audio_routing="no", ac_cv_audio_routing="yes")
293  ])  ])
294    ac_audio_routing=$ac_cv_audio_routing
295  if test "x$ac_audio_routing" = "xyes"; then  if test "x$ac_audio_routing" = "xyes"; then
296     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.])
297  fi  fi
# Line 232  if test "x$ac_edit_instrument" = "xyes"; Line 306  if test "x$ac_edit_instrument" = "xyes";
306    AC_DEFINE(CONFIG_EDIT_INSTRUMENT, 1, [Define if instrument editing is available.])    AC_DEFINE(CONFIG_EDIT_INSTRUMENT, 1, [Define if instrument editing is available.])
307  fi  fi
308    
309    AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp],
310      ac_cv_channel_midi_event, [
311      AC_TRY_COMPILE([
312            #include "lscp/client.h"
313            #include "lscp/event.h"
314            ], [
315            lscp_event_t ev;
316            ev = LSCP_EVENT_CHANNEL_MIDI;
317        ], ac_cv_channel_midi_event="yes", ac_cv_channel_midi_event="no")
318    ])
319    ac_channel_midi_event=$ac_cv_channel_midi_event
320    if test "x$ac_channel_midi_event" = "xyes"; then
321       AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.])
322    fi
323    
324    AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp],
325      ac_cv_device_midi_event, [
326      AC_TRY_COMPILE([
327            #include "lscp/client.h"
328            #include "lscp/event.h"
329            ], [
330            lscp_event_t ev;
331            ev = LSCP_EVENT_DEVICE_MIDI;
332        ], ac_cv_device_midi_event="yes", ac_cv_device_midi_event="no")
333    ])
334    ac_device_midi_event=$ac_cv_device_midi_event
335    if test "x$ac_device_midi_event" = "xyes"; then
336       AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.])
337    fi
338    
339    AC_CHECK_LIB(lscp, lscp_get_voices, [ac_max_voices="yes"], [ac_max_voices="no"])
340    if test "x$ac_max_voices" = "xyes"; then
341      AC_DEFINE(CONFIG_MAX_VOICES, 1, [Define if max. voices / streams is available.])
342    fi
343    
344  # Check for optional libraries.  # Check for optional libraries.
345  if test "x$ac_libgig" = "xyes"; then  if test "x$ac_libgig" = "xyes"; then
346     AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"])     AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"])
# Line 242  if test "x$ac_libgig" = "xyes"; then Line 351  if test "x$ac_libgig" = "xyes"; then
351        AC_LANG_SAVE        AC_LANG_SAVE
352        AC_LANG_CPLUSPLUS        AC_LANG_CPLUSPLUS
353        CXXFLAGS="$ac_libs"        CXXFLAGS="$ac_libs"
354        AC_TRY_RUN([        AC_TRY_COMPILE([
355  #include <stdlib.h>  #include <stdlib.h>
356  #include <gig.h>  #include <gig.h>
357  int main() {        ],[
358      gig::File file;      gig::File file;
359      file.SetAutoLoad(false);      file.SetAutoLoad(false);
     exit(0);  
 }  
360        ],        ],
361        have_libgig_setautoload="yes",        have_libgig_setautoload="yes",
       have_libgig_setautoload="no",  
362        have_libgig_setautoload="no"        have_libgig_setautoload="no"
363        )        )
364        AC_LANG_RESTORE        AC_LANG_RESTORE
# Line 269  if test "x$ac_round" = "xyes"; then Line 375  if test "x$ac_round" = "xyes"; then
375     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
376  fi  fi
377    
378    # Check for debugging stack-trace.
379    if test "x$ac_stacktrace" = "xyes"; then
380       AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.])
381    fi
382    
383    # Some recent distros (eg. fedora, debian) require this.
384    if test "x$ac_cv_lib_X11_main" = "xyes"; then
385       ac_libs="$ac_libs -lX11"
386    fi
387    
388  AC_SUBST(ac_libs)  AC_SUBST(ac_libs)
389  AC_SUBST(ac_incpath)  AC_SUBST(ac_incpath)
390    
391  # Checks for header files.  # Checks for header files.
392  AC_HEADER_STDC  AC_HEADER_STDC
393  AC_HEADER_SYS_WAIT  AC_HEADER_SYS_WAIT
394  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)
395    
396  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"])
397  if test "x$ac_lscp_h" = "xno"; then  if test "x$ac_lscp_h" = "xno"; then
# Line 313  echo "  GigaSampler instrument file supp Line 429  echo "  GigaSampler instrument file supp
429  if test "x$ac_libgig" = "xyes"; then  if test "x$ac_libgig" = "xyes"; then
430  echo "  libgig supports fast information retrieval . . . .: $have_libgig_setautoload"  echo "  libgig supports fast information retrieval . . . .: $have_libgig_setautoload"
431  fi  fi
432    echo "  LSCP channel MIDI event support  . . . . . . . . .: $ac_channel_midi_event"
433    echo "  LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event"
434    echo "  LSCP runtime max. voices / disk streams support  .: $ac_max_voices"
435    echo
436    echo "  Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace"
437  echo  echo
438  echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"  echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"
439  echo  echo

Legend:
Removed from v.1671  
changed lines
  Added in v.2511

  ViewVC Help
Powered by ViewVC