/[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 758 by capela, Sun Aug 28 00:31:34 2005 UTC revision 1461 by schoenebeck, Sun Oct 28 23:30:36 2007 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.2.8, rncbc@rncbc.org, qsampler)  AC_INIT(Qsampler, 0.1.5.1, rncbc@rncbc.org, qsampler)
3  AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui.h)  AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui.h)
4  AC_CONFIG_HEADERS(config.h)  AC_CONFIG_HEADERS(config.h)
5  AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec)  AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec qsampler.desktop)
6    
7  # Set default installation prefix.  # Set default installation prefix.
8  AC_PREFIX_DEFAULT(/usr/local)  AC_PREFIX_DEFAULT(/usr/local)
# Line 16  AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_ Line 16  AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_
16  # Enable debugging argument option.  # Enable debugging argument option.
17  AC_ARG_ENABLE(debug,  AC_ARG_ENABLE(debug,
18    AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]),    AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]),
19    [ac_debug="debug"],    [ac_debug="$enableval"])
   [ac_debug="release"])  
 AC_SUBST(ac_debug)  
20    
21  if test "x$ac_debug" = "xdebug"; then  if test "x$ac_debug" = "xyes"; then
22     AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])     AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])
23       ac_debug="debug"
24    else
25       ac_debug="release"
26  fi  fi
27    AC_SUBST(ac_debug)
28    
29  # Enable libgig availability.  # Enable libgig availability.
30  AC_ARG_ENABLE(libgig,  AC_ARG_ENABLE(libgig,
31    AC_HELP_STRING([--disable-libgig], [disable libgig interface (default=no)]),    AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]),
32    [ac_libgig="no"],    [ac_libgig="$enableval"],
33    [ac_libgig="yes"])    [ac_libgig="yes"])
34    
35    # Standard installation base dirs.
36    ac_with_paths="/usr /usr/local"
37    
38    # Some a-la-debian alternatives...
39    for X in /usr/lib /usr/share; do
40      for Y in qt qt4; do
41        if test -d $X/$Y/bin; then
42          ac_with_paths="$ac_with_paths $X/$Y"
43        fi
44      done
45    done
46    
47    # Set for alternate liblscp installation dir.
48    AC_ARG_WITH(liblscp,
49      AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]),
50      [ac_with_paths="$ac_with_paths $withval"])
51    
52    # Set for alternate libgig installation dir.
53    AC_ARG_WITH(libgig,
54      AC_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]),
55      [ac_with_paths="$ac_with_paths $withval"])
56    
57  # Checks for programs.  # Checks for programs.
58  AC_PROG_CC  AC_PROG_CC
59  AC_PROG_CPP  AC_PROG_CPP
# Line 45  AC_LANG_CPLUSPLUS Line 69  AC_LANG_CPLUSPLUS
69  AC_MSG_CHECKING([whether QTDIR environment variable is set])  AC_MSG_CHECKING([whether QTDIR environment variable is set])
70  if test "x$QTDIR" = "x"; then  if test "x$QTDIR" = "x"; then
71    AC_MSG_RESULT([no])    AC_MSG_RESULT([no])
   AC_MSG_ERROR([QTDIR must be properly set.])  
72  else  else
73    AC_MSG_RESULT([$QTDIR])    AC_MSG_RESULT([$QTDIR])
74      ac_with_paths="$ac_with_paths $QTDIR"
75  fi  fi
76    
77  CFLAGS="$CFLAGS -I$QTDIR/include"  # Prepend alternate dependencies paths.
78  CPPFLAGS="$CPPFLAGS -I$QTDIR/include"  ac_path=$PATH
79  LIBS="-L$QTDIR/lib"  for X in $ac_with_paths; do
80  for X in qt qt3; do    if test -d $X/bin; then
81    if test -d $QTDIR/include/$X; then      ac_path="$X/bin:$ac_path"
82      CFLAGS="$CFLAGS -I$QTDIR/include/$X"    fi
83      CPPFLAGS="$CPPFLAGS -I$QTDIR/include/$X"    if test -d $X/include; then
84        for Y in qt qt4; do
85          if test -d $X/include/$Y; then
86            CFLAGS="-I$X/include/$Y $CFLAGS"
87            CPPFLAGS="-I$X/include/$Y $CPPFLAGS"
88            ac_incpath="$X/include/$Y $ac_incpath"
89          fi
90        done
91        CFLAGS="-I$X/include $CFLAGS"
92        CPPFLAGS="-I$X/include $CPPFLAGS"
93        ac_incpath="$X/include $ac_incpath"
94      fi
95      if test -d $X/lib64; then
96        LIBS="-L$X/lib64 $LIBS"
97        ac_libs="-L$X/lib64 $ac_libs"
98      fi
99      if test -d $X/lib; then
100        LIBS="-L$X/lib $LIBS"
101        ac_libs="-L$X/lib $ac_libs"
102    fi    fi
103  done  done
104    
# Line 77  if test "x$ac_qtlib" = "xqt-mt"; then Line 119  if test "x$ac_qtlib" = "xqt-mt"; then
119  fi  fi
120  AC_SUBST(ac_thread)  AC_SUBST(ac_thread)
121    
122  AC_CACHE_CHECK([for Qt library version >= 3.1.1],  AC_CACHE_CHECK([for Qt library version >= 4.0.0],
123    ac_qtlib_version, [    ac_qtlib_version, [
124    AC_TRY_LINK([#include "qglobal.h"], [    AC_TRY_LINK([#include <Qt/qglobal.h>], [
125  #if QT_VERSION < 0x030101  #ifndef QT_VERSION
126  #error Qt library 3.1.1 or greater required.  #error QT_VERSION macro not defined!
127    #endif
128    #if QT_VERSION < 0x040000
129    #error Qt library 4.0.0 or greater required.
130  #endif  #endif
131      ],      ],
132      ac_qtlib_version="yes", [      ac_qtlib_version="yes", [
133        echo "no; Qt 3.1.1 or greater is required"        echo "no; Qt 4.0.0 or greater is required"
134        exit        exit
135      ])      ])
136  ])  ])
137    
138  # A common error message:  # A common error message:
139  ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt3-devel)."  ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt4-devel)."
140    
141  # Check for Qt qmake utility.  # Check for Qt qmake utility.
142  AC_PATH_PROG(ac_qmake, qmake, [no], $QTDIR/bin:${PATH})  AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path)
143  if test "x$ac_qmake" = "xno"; then  if test "x$ac_qmake" = "xno"; then
144     AC_MSG_ERROR([qmake $ac_qtdir_errmsg])     AC_MSG_ERROR([qmake $ac_qtdir_errmsg])
145  fi  fi
146  AC_SUBST(ac_qmake)  AC_SUBST(ac_qmake)
147    
148  # Check for Qt moc utility.  # Check for Qt moc utility.
149  AC_PATH_PROG(ac_moc, moc, [no], $QTDIR/bin:${PATH})  AC_PATH_PROG(ac_moc, moc, [no], $ac_path)
150  if test "x$ac_moc" = "xno"; then  if test "x$ac_moc" = "xno"; then
151     AC_MSG_ERROR([moc $ac_qtdir_errmsg])     AC_MSG_ERROR([moc $ac_qtdir_errmsg])
152  fi  fi
153  AC_SUBST(ac_moc)  AC_SUBST(ac_moc)
154    
155  # Check for Qt uic utility.  # Check for Qt uic utility.
156  AC_PATH_PROG(ac_uic, uic, [no], $QTDIR/bin:${PATH})  AC_PATH_PROG(ac_uic, uic, [no], $ac_path)
157  if test "x$ac_uic" = "xno"; then  if test "x$ac_uic" = "xno"; then
158     AC_MSG_ERROR([uic $ac_qtdir_errmsg])     AC_MSG_ERROR([uic $ac_qtdir_errmsg])
159  fi  fi
# Line 131  AC_CHECK_LIB(lscp, main, [ac_liblscp="ye Line 176  AC_CHECK_LIB(lscp, main, [ac_liblscp="ye
176  if test "x$ac_liblscp" = "xno"; then  if test "x$ac_liblscp" = "xno"; then
177     AC_MSG_ERROR([LSCP library not found.])     AC_MSG_ERROR([LSCP library not found.])
178  fi  fi
179  ac_libs="-llscp"  ac_libs="$ac_libs -llscp"
180    
181  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],
182    ac_instrument_name, [    ac_instrument_name, [
# Line 162  if test "x$ac_mute_solo" = "xyes"; then Line 207  if test "x$ac_mute_solo" = "xyes"; then
207     AC_DEFINE(CONFIG_MUTE_SOLO, 1, [Define if mute/solo is available.])     AC_DEFINE(CONFIG_MUTE_SOLO, 1, [Define if mute/solo is available.])
208  fi  fi
209    
210    AC_CHECK_LIB(lscp, lscp_map_midi_instrument, [ac_midi_instrument="yes"], [ac_midi_instrument="no"])
211    if test "x$ac_midi_instrument" = "xyes"; then
212      AC_DEFINE(CONFIG_MIDI_INSTRUMENT, 1, [Define if MIDI instrument mapping is available.])
213    fi
214    
215    AC_CHECK_LIB(lscp, lscp_create_fxsend, [ac_fxsend="yes"], [ac_fxsend="no"])
216    if test "x$ac_fxsend" = "xyes"; then
217      AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.])
218      AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t],
219        ac_fxsend_level, [
220        AC_TRY_COMPILE([#include "lscp/client.h"], [
221              lscp_fxsend_info_t info;
222              info.level = 0.0f;
223          ], ac_fxsend_level="yes", ac_fxsend_level="no")
224      ])
225      if test "x$ac_fxsend_level" = "xyes"; then
226              AC_DEFINE(CONFIG_FXSEND_LEVEL, 1, [Define if FX send level is available.])
227      fi
228    fi
229    
230    AC_CACHE_CHECK([for audio_routing array type],
231      ac_audio_routing, [
232      AC_TRY_COMPILE([#include "lscp/client.h"], [
233        lscp_channel_info_t info;
234        char ch = info.audio_routing[0][0];
235        ], ac_audio_routing="no", ac_audio_routing="yes")
236    ])
237    if test "x$ac_audio_routing" = "xyes"; then
238       AC_DEFINE(CONFIG_AUDIO_ROUTING, 1, [Define if audio_routing is an integer array.])
239    fi
240    
241    AC_CHECK_LIB(lscp, lscp_set_volume, [ac_volume="yes"], [ac_volume="no"])
242    if test "x$ac_volume" = "xyes"; then
243      AC_DEFINE(CONFIG_VOLUME, 1, [Define if global volume is available.])
244    fi
245    
246    AC_CHECK_LIB(lscp, lscp_edit_channel_instrument, [ac_edit_instrument="yes"], [ac_edit_instrument="no"])
247    if test "x$ac_edit_instrument" = "xyes"; then
248      AC_DEFINE(CONFIG_EDIT_INSTRUMENT, 1, [Define if instrument editing is available.])
249    fi
250    
251  # Check for optional libraries.  # Check for optional libraries.
252  if test "x$ac_libgig" = "xyes"; then  if test "x$ac_libgig" = "xyes"; then
253     AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"])     AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"])
254     if test "x$ac_libgig" = "xyes"; then     if test "x$ac_libgig" = "xyes"; then
255        AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.])        AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.])
256        ac_libs="-lgig $ac_libs"        ac_libs="$ac_libs -lgig"
257     fi     fi
258  fi  fi
259    
260    # Check for round math function.
261    AC_CHECK_LIB(m, lroundf, [ac_round="yes"], [ac_round="no"])
262    if test "x$ac_round" = "xyes"; then
263       AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
264    fi
265    
266  AC_SUBST(ac_libs)  AC_SUBST(ac_libs)
267    AC_SUBST(ac_incpath)
268    
269  # Checks for header files.  # Checks for header files.
270  AC_HEADER_STDC  AC_HEADER_STDC
271  AC_HEADER_SYS_WAIT  AC_HEADER_SYS_WAIT
272  AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h)  AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h)
273    
274  # 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"])
275  # if test "x$ac_lscp_h" = "xno"; then  if test "x$ac_lscp_h" = "xno"; then
276  #    AC_MSG_ERROR([LSCP headers not found.])     AC_MSG_ERROR([LSCP headers not found.])
277  # fi  fi
278    
279  # Checks for typedefs, structures, and compiler characteristics.  # Checks for typedefs, structures, and compiler characteristics.
280  # AC_C_CONST  # AC_C_CONST

Legend:
Removed from v.758  
changed lines
  Added in v.1461

  ViewVC Help
Powered by ViewVC