/[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 1166 by capela, Sat May 5 11:57:28 2007 UTC revision 2050 by capela, Mon Jan 18 08:52:45 2010 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.1.4, rncbc@rncbc.org, qsampler)  AC_INIT(Qsampler, 0.2.2.8, rncbc@rncbc.org, qsampler)
3  AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui.h)  
4    AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui)
5  AC_CONFIG_HEADERS(config.h)  AC_CONFIG_HEADERS(config.h)
6  AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec)  AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec qsampler.desktop)
7    
8  # Set default installation prefix.  # Set default installation prefix.
9  AC_PREFIX_DEFAULT(/usr/local)  AC_PREFIX_DEFAULT(/usr/local)
# Line 36  AC_ARG_ENABLE(libgig, Line 37  AC_ARG_ENABLE(libgig,
37  ac_with_paths="/usr /usr/local"  ac_with_paths="/usr /usr/local"
38    
39  # Some a-la-debian alternatives...  # Some a-la-debian alternatives...
40  for X in /usr/lib /usr/share; do  for X in /usr/lib /usr/lib64 /usr/share; do
41    for Y in qt qt3; do    for Y in qt qt4; do
42      if test -d $X/$Y/bin; then      if test -d $X/$Y/bin; then
43        ac_with_paths="$ac_with_paths $X/$Y"        ac_with_paths="$ac_with_paths $X/$Y"
44      fi      fi
45    done    done
46  done  done
47    
48    # Set for alternate Qt installation dir.
49    AC_ARG_WITH(qt,
50      AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]),
51      [ac_with_paths="$ac_with_paths $withval"])
52    
53  # Set for alternate liblscp installation dir.  # Set for alternate liblscp installation dir.
54  AC_ARG_WITH(liblscp,  AC_ARG_WITH(liblscp,
55    AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]),    AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]),
# Line 65  AC_PROG_GCC_TRADITIONAL Line 71  AC_PROG_GCC_TRADITIONAL
71  AC_LANG_C  AC_LANG_C
72  AC_LANG_CPLUSPLUS  AC_LANG_CPLUSPLUS
73    
 # Check for QTDIR environment variable.  
 AC_MSG_CHECKING([whether QTDIR environment variable is set])  
 if test "x$QTDIR" = "x"; then  
   AC_MSG_RESULT([no])  
 else  
   AC_MSG_RESULT([$QTDIR])  
   ac_with_paths="$ac_with_paths $QTDIR"  
 fi  
   
74  # Prepend alternate dependencies paths.  # Prepend alternate dependencies paths.
75  ac_path=$PATH  ac_path=$PATH
76  for X in $ac_with_paths; do  for X in $ac_with_paths; do
77    if test -d $X/bin; then    if test -d $X/bin; then
78      ac_path="$X/bin:$ac_path"      ac_path="$X/bin:$ac_path"
79    fi    fi
80      if test -x $X/qmake; then
81        ac_path="$X:$ac_path"
82      fi
83    if test -d $X/include; then    if test -d $X/include; then
84      for Y in qt qt3; do      for Y in qt qt4; do
85        if test -d $X/include/$Y; then        if test -d $X/include/$Y; then
86          CFLAGS="-I$X/include/$Y $CFLAGS"          CFLAGS="-I$X/include/$Y $CFLAGS"
87          CPPFLAGS="-I$X/include/$Y $CPPFLAGS"          CPPFLAGS="-I$X/include/$Y $CPPFLAGS"
# Line 102  for X in $ac_with_paths; do Line 102  for X in $ac_with_paths; do
102    fi    fi
103  done  done
104    
105  # Checks for Qt library.  # Check for proper Qt version.
106  for X in qt-mt qt; do  AC_CACHE_CHECK([for Qt library version >= 4.1],
107    if test "x$ac_qtlib" = "x"; then    ac_cv_qtversion, [
108       AC_CHECK_LIB($X, main, [ac_qtlib=$X])    AC_TRY_LINK([#include "Qt/qglobal.h"], [
109    fi  #if QT_VERSION < 0x040100
110  done  #error Qt library 4.1 or greater required.
 if test "x$ac_qtlib" = "x"; then  
   AC_MSG_ERROR([Qt library not found. Maybe QTDIR isn't properly set.])  
 fi  
 AC_SUBST(ac_qtlib)  
   
 # Check for Qt multi-thread support.  
 if test "x$ac_qtlib" = "xqt-mt"; then  
   ac_thread="thread"  
 fi  
 AC_SUBST(ac_thread)  
   
 AC_CACHE_CHECK([for Qt library version >= 3.1.1],  
   ac_qtlib_version, [  
   AC_TRY_LINK([#include "qglobal.h"], [  
 #if QT_VERSION < 0x030101  
 #error Qt library 3.1.1 or greater required.  
111  #endif  #endif
112      ],      ], ac_cv_qtversion="yes", [
113      ac_qtlib_version="yes", [        echo "no; Qt 4.1 or greater is required"
       echo "no; Qt 3.1.1 or greater is required"  
114        exit        exit
115      ])      ])
116  ])  ])
117    
118  # A common error message:  # A common error message:
119  ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt3-devel)."  ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)."
120    
121  # Check for Qt qmake utility.  # Check for Qt qmake utility.
122  AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path)  AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path)
123  if test "x$ac_qmake" = "xno"; then  if test "x$ac_qmake" = "xno"; then
124     AC_MSG_ERROR([qmake $ac_qtdir_errmsg])     AC_MSG_ERROR([qmake $ac_errmsg])
125  fi  fi
126  AC_SUBST(ac_qmake)  AC_SUBST(ac_qmake)
127    
128  # Check for Qt moc utility.  # Check for Qt moc utility.
129  AC_PATH_PROG(ac_moc, moc, [no], $ac_path)  AC_PATH_PROG(ac_moc, moc, [no], $ac_path)
130  if test "x$ac_moc" = "xno"; then  if test "x$ac_moc" = "xno"; then
131     AC_MSG_ERROR([moc $ac_qtdir_errmsg])     AC_MSG_ERROR([moc $ac_errmsg])
132  fi  fi
133  AC_SUBST(ac_moc)  AC_SUBST(ac_moc)
134    
135  # Check for Qt uic utility.  # Check for Qt uic utility.
136  AC_PATH_PROG(ac_uic, uic, [no], $ac_path)  AC_PATH_PROG(ac_uic, uic, [no], $ac_path)
137  if test "x$ac_uic" = "xno"; then  if test "x$ac_uic" = "xno"; then
138     AC_MSG_ERROR([uic $ac_qtdir_errmsg])     AC_MSG_ERROR([uic $ac_errmsg])
139  fi  fi
140  AC_SUBST(ac_uic)  AC_SUBST(ac_uic)
141    
142    # Check for Qt lupdate utility.
143    AC_PATH_PROG(ac_lupdate, lupdate, [no], $ac_path)
144    if test "x$ac_lupdate" = "xno"; then
145       AC_MSG_ERROR([lupdate $ac_errmsg])
146    fi
147    AC_SUBST(ac_lupdate)
148    
149    # Check for Qt lrelease utility.
150    AC_PATH_PROG(ac_lrelease, lrelease, [no], $ac_path)
151    if test "x$ac_release" = "xno"; then
152       AC_MSG_ERROR([lrelease $ac_errmsg])
153    fi
154    AC_SUBST(ac_lrelease)
155    
156  # Checks for libraries.  # Checks for libraries.
157  AC_CHECK_LIB(m, main)  AC_CHECK_LIB(m, main)
158  AC_CHECK_LIB(X11, main)  AC_CHECK_LIB(X11, main)
159  AC_CHECK_LIB(Xext, main)  AC_CHECK_LIB(Xext, main)
 AC_CHECK_LIB($ac_qtlib, main)  
160    
161  # Check for round math function.  # Check for round math function.
162  AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"])  AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"])
# Line 176  fi Line 172  fi
172  ac_libs="$ac_libs -llscp"  ac_libs="$ac_libs -llscp"
173    
174  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],
175    ac_instrument_name, [    ac_cv_instrument_name, [
176    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
177          lscp_channel_info_t info;          lscp_channel_info_t info;
178          info.instrument_name = 0;          info.instrument_name = 0;
179      ], ac_instrument_name="yes", ac_instrument_name="no")      ], ac_cv_instrument_name="yes", ac_cv_instrument_name="no")
180  ])  ])
181    ac_instrument_name=$ac_cv_instrument_name
182  if test "x$ac_instrument_name" = "xyes"; then  if test "x$ac_instrument_name" = "xyes"; then
183     AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.])     AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.])
184  fi  fi
185    
186  AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t],  AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t],
187    ac_mute_solo, [    ac_cv_mute_solo, [
188    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
189          lscp_channel_info_t info;          lscp_channel_info_t info;
190          info.mute = 0;          info.mute = 0;
191          info.solo = 0;          info.solo = 0;
192      ], ac_mute_solo="yes", ac_mute_solo="no")      ], ac_cv_mute_solo="yes", ac_cv_mute_solo="no")
193  ])  ])
194    ac_mute_solo=$ac_cv_mute_solo
195  if test "x$ac_mute_solo" = "xyes"; then  if test "x$ac_mute_solo" = "xyes"; then
196     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"])
197  fi  fi
# Line 213  AC_CHECK_LIB(lscp, lscp_create_fxsend, [ Line 211  AC_CHECK_LIB(lscp, lscp_create_fxsend, [
211  if test "x$ac_fxsend" = "xyes"; then  if test "x$ac_fxsend" = "xyes"; then
212    AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.])    AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.])
213    AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t],    AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t],
214      ac_fxsend_level, [      ac_cv_fxsend_level, [
215      AC_TRY_COMPILE([#include "lscp/client.h"], [      AC_TRY_COMPILE([#include "lscp/client.h"], [
216            lscp_fxsend_info_t info;            lscp_fxsend_info_t info;
217            info.level = 0.0f;            info.level = 0.0f;
218        ], ac_fxsend_level="yes", ac_fxsend_level="no")        ], ac_cv_fxsend_level="yes", ac_cv_fxsend_level="no")
219    ])    ])
220      ac_fxsend_level=$ac_cv_fxsend_level
221    if test "x$ac_fxsend_level" = "xyes"; then    if test "x$ac_fxsend_level" = "xyes"; then
222            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.])
223    fi    fi
224      AC_CHECK_LIB(lscp, lscp_set_fxsend_name, [ac_fxsend_rename="yes"], [ac_fxsend_rename="no"])
225      if test "x$ac_fxsend_rename" = "xyes"; then
226              AC_DEFINE(CONFIG_FXSEND_RENAME, 1, [Define if FX send rename is available.])
227      fi
228  fi  fi
229    
230  AC_CACHE_CHECK([for audio_routing array type],  AC_CACHE_CHECK([for audio_routing array type],
231    ac_audio_routing, [    ac_cv_audio_routing, [
232    AC_TRY_COMPILE([#include "lscp/client.h"], [    AC_TRY_COMPILE([#include "lscp/client.h"], [
233      lscp_channel_info_t info;      lscp_channel_info_t info;
234      char ch = info.audio_routing[0][0];      char ch = info.audio_routing[0][0];
235      ], ac_audio_routing="no", ac_audio_routing="yes")      ], ac_cv_audio_routing="no", ac_cv_audio_routing="yes")
236  ])  ])
237    ac_audio_routing=$ac_cv_audio_routing
238  if test "x$ac_audio_routing" = "xyes"; then  if test "x$ac_audio_routing" = "xyes"; then
239     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.])
240  fi  fi
# Line 240  if test "x$ac_volume" = "xyes"; then Line 244  if test "x$ac_volume" = "xyes"; then
244    AC_DEFINE(CONFIG_VOLUME, 1, [Define if global volume is available.])    AC_DEFINE(CONFIG_VOLUME, 1, [Define if global volume is available.])
245  fi  fi
246    
247    AC_CHECK_LIB(lscp, lscp_edit_channel_instrument, [ac_edit_instrument="yes"], [ac_edit_instrument="no"])
248    if test "x$ac_edit_instrument" = "xyes"; then
249      AC_DEFINE(CONFIG_EDIT_INSTRUMENT, 1, [Define if instrument editing is available.])
250    fi
251    
252    AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp],
253      ac_cv_channel_midi_event, [
254      AC_TRY_COMPILE([
255            #include "lscp/client.h"
256            #include "lscp/event.h"
257            ], [
258            lscp_event_t ev;
259            ev = LSCP_EVENT_CHANNEL_MIDI;
260        ], ac_cv_channel_midi_event="yes", ac_cv_channel_midi_event="no")
261    ])
262    ac_channel_midi_event=$ac_cv_channel_midi_event
263    if test "x$ac_channel_midi_event" = "xyes"; then
264       AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.])
265    fi
266    
267    AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp],
268      ac_cv_device_midi_event, [
269      AC_TRY_COMPILE([
270            #include "lscp/client.h"
271            #include "lscp/event.h"
272            ], [
273            lscp_event_t ev;
274            ev = LSCP_EVENT_DEVICE_MIDI;
275        ], ac_cv_device_midi_event="yes", ac_cv_device_midi_event="no")
276    ])
277    ac_device_midi_event=$ac_cv_device_midi_event
278    if test "x$ac_device_midi_event" = "xyes"; then
279       AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.])
280    fi
281    
282    AC_CHECK_LIB(lscp, lscp_get_voices, [ac_max_voices="yes"], [ac_max_voices="no"])
283    if test "x$ac_max_voices" = "xyes"; then
284      AC_DEFINE(CONFIG_MAX_VOICES, 1, [Define if max. voices / streams is available.])
285    fi
286    
287  # Check for optional libraries.  # Check for optional libraries.
288  if test "x$ac_libgig" = "xyes"; then  if test "x$ac_libgig" = "xyes"; then
289     AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"])     AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"])
290     if test "x$ac_libgig" = "xyes"; then     if test "x$ac_libgig" = "xyes"; then
291        AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.])        AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.])
292        ac_libs="$ac_libs -lgig"        ac_libs="$ac_libs -lgig"
293          AC_MSG_CHECKING([for gig::File::SetAutoLoad() method in libgig])
294          AC_LANG_SAVE
295          AC_LANG_CPLUSPLUS
296          CXXFLAGS="$ac_libs"
297          AC_TRY_RUN([
298    #include <stdlib.h>
299    #include <gig.h>
300    int main() {
301        gig::File file;
302        file.SetAutoLoad(false);
303        exit(0);
304    }
305          ],
306          have_libgig_setautoload="yes",
307          have_libgig_setautoload="no",
308          have_libgig_setautoload="no"
309          )
310          AC_LANG_RESTORE
311          AC_MSG_RESULT([$have_libgig_setautoload])
312          if test "x$have_libgig_setautoload" = "xyes"; then
313              AC_DEFINE(HAVE_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.])
314          fi
315     fi     fi
316  fi  fi
317    
# Line 279  AC_OUTPUT Line 345  AC_OUTPUT
345    
346  # make clean > /dev/null 2>&1  # make clean > /dev/null 2>&1
347    
348  echo ""  # Output summary message
349    
350    echo
351    echo "  $PACKAGE_NAME $PACKAGE_VERSION"
352    echo
353    echo "  Build target . . . . . . . . . . . . . . . . . . .: $ac_debug"
354    echo
355    echo "  LSCP instrument name support . . . . . . . . . . .: $ac_instrument_name"
356    echo "  LSCP mute/solo support . . . . . . . . . . . . . .: $ac_mute_solo"
357    echo "  LSCP MIDI instrument support . . . . . . . . . . .: $ac_midi_instrument"
358    echo "  LSCP FX send support . . . . . . . . . . . . . . .: $ac_fxsend"
359    echo "  LSCP FX send level support . . . . . . . . . . . .: $ac_fxsend_level"
360    echo "  LSCP FX send rename support  . . . . . . . . . . .: $ac_fxsend_rename"
361    echo "  LSCP audio routing support . . . . . . . . . . . .: $ac_audio_routing"
362    echo "  LSCP volume support  . . . . . . . . . . . . . . .: $ac_volume"
363    echo "  LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument"
364    echo "  GigaSampler instrument file support (libgig) . . .: $ac_libgig"
365    if test "x$ac_libgig" = "xyes"; then
366    echo "  libgig supports fast information retrieval . . . .: $have_libgig_setautoload"
367    fi
368    echo "  LSCP channel MIDI event support  . . . . . . . . .: $ac_channel_midi_event"
369    echo "  LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event"
370    echo "  LSCP runtime max. voices / disk streams support  .: $ac_max_voices"
371    echo
372    echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"
373    echo
374  echo "Now type 'make', followed by 'make install' as root."  echo "Now type 'make', followed by 'make install' as root."
375  echo ""  echo

Legend:
Removed from v.1166  
changed lines
  Added in v.2050

  ViewVC Help
Powered by ViewVC