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

Annotation of /qsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 824 - (hide annotations) (download)
Fri Dec 23 01:40:56 2005 UTC (18 years, 3 months ago) by capela
File size: 5353 byte(s)
* Whenever the listing of actual instrument names is not an
  option (e.g. due to lack of libgig support), the whole
  number of selectable Instrument items is now being graciously
  increased from just the bare 8 (eight) right up through 100
  (one hundred), on the sampler channel setup dialog.

* The selection buttons, on the right of the Instrument, Audio
  and MIDI devices combo-boxes, on the sampler channel dialog,
  are now expected to be a little better looking than it was
  before, at least for those Mac OS X eyes.

1 capela 753 # Process this file with autoconf to produce a configure script.
2 capela 824 AC_INIT(Qsampler, 0.1.2.15, rncbc@rncbc.org, qsampler)
3 capela 753 AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui.h)
4     AC_CONFIG_HEADERS(config.h)
5     AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec)
6    
7     # Set default installation prefix.
8     AC_PREFIX_DEFAULT(/usr/local)
9     ac_prefix=$prefix
10     if test "x$ac_prefix" = "xNONE"; then
11     ac_prefix=$ac_default_prefix
12     fi
13     AC_SUBST(ac_prefix)
14     AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.])
15    
16     # Enable debugging argument option.
17     AC_ARG_ENABLE(debug,
18     AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]),
19     [ac_debug="debug"],
20     [ac_debug="release"])
21     AC_SUBST(ac_debug)
22    
23     if test "x$ac_debug" = "xdebug"; then
24     AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])
25     fi
26    
27     # Enable libgig availability.
28     AC_ARG_ENABLE(libgig,
29     AC_HELP_STRING([--disable-libgig], [disable libgig interface (default=no)]),
30     [ac_libgig="no"],
31     [ac_libgig="yes"])
32    
33     # Checks for programs.
34     AC_PROG_CC
35     AC_PROG_CPP
36     AC_PROG_CXX
37     AC_PROG_CXXCPP
38     AC_PROG_GCC_TRADITIONAL
39    
40     # Checks for languages.
41     AC_LANG_C
42     AC_LANG_CPLUSPLUS
43    
44     # Check for QTDIR environment variable.
45     AC_MSG_CHECKING([whether QTDIR environment variable is set])
46     if test "x$QTDIR" = "x"; then
47     AC_MSG_RESULT([no])
48     AC_MSG_ERROR([QTDIR must be properly set.])
49     else
50     AC_MSG_RESULT([$QTDIR])
51     fi
52    
53     CFLAGS="$CFLAGS -I$QTDIR/include"
54     CPPFLAGS="$CPPFLAGS -I$QTDIR/include"
55     LIBS="-L$QTDIR/lib"
56     for X in qt qt3; do
57     if test -d $QTDIR/include/$X; then
58     CFLAGS="$CFLAGS -I$QTDIR/include/$X"
59     CPPFLAGS="$CPPFLAGS -I$QTDIR/include/$X"
60     fi
61     done
62    
63     # Checks for Qt library.
64     for X in qt-mt qt; do
65     if test "x$ac_qtlib" = "x"; then
66     AC_CHECK_LIB($X, main, [ac_qtlib=$X])
67     fi
68     done
69     if test "x$ac_qtlib" = "x"; then
70     AC_MSG_ERROR([Qt library not found. Maybe QTDIR isn't properly set.])
71     fi
72     AC_SUBST(ac_qtlib)
73    
74     # Check for Qt multi-thread support.
75     if test "x$ac_qtlib" = "xqt-mt"; then
76     ac_thread="thread"
77     fi
78     AC_SUBST(ac_thread)
79    
80     AC_CACHE_CHECK([for Qt library version >= 3.1.1],
81     ac_qtlib_version, [
82     AC_TRY_LINK([#include "qglobal.h"], [
83     #if QT_VERSION < 0x030101
84     #error Qt library 3.1.1 or greater required.
85     #endif
86     ],
87     ac_qtlib_version="yes", [
88     echo "no; Qt 3.1.1 or greater is required"
89     exit
90     ])
91     ])
92    
93     # A common error message:
94     ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt3-devel)."
95    
96     # Check for Qt qmake utility.
97     AC_PATH_PROG(ac_qmake, qmake, [no], $QTDIR/bin:${PATH})
98     if test "x$ac_qmake" = "xno"; then
99     AC_MSG_ERROR([qmake $ac_qtdir_errmsg])
100     fi
101     AC_SUBST(ac_qmake)
102    
103     # Check for Qt moc utility.
104     AC_PATH_PROG(ac_moc, moc, [no], $QTDIR/bin:${PATH})
105     if test "x$ac_moc" = "xno"; then
106     AC_MSG_ERROR([moc $ac_qtdir_errmsg])
107     fi
108     AC_SUBST(ac_moc)
109    
110     # Check for Qt uic utility.
111     AC_PATH_PROG(ac_uic, uic, [no], $QTDIR/bin:${PATH})
112     if test "x$ac_uic" = "xno"; then
113     AC_MSG_ERROR([uic $ac_qtdir_errmsg])
114     fi
115     AC_SUBST(ac_uic)
116    
117     # Checks for libraries.
118     AC_CHECK_LIB(m, main)
119     AC_CHECK_LIB(X11, main)
120     AC_CHECK_LIB(Xext, main)
121     AC_CHECK_LIB($ac_qtlib, main)
122    
123     # Check for round math function.
124     AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"])
125     if test "x$ac_round" = "xyes"; then
126     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
127     fi
128    
129     # Check for mandatory libraries.
130     AC_CHECK_LIB(lscp, main, [ac_liblscp="yes"], [ac_liblscp="no"])
131     if test "x$ac_liblscp" = "xno"; then
132     AC_MSG_ERROR([LSCP library not found.])
133     fi
134     ac_libs="-llscp"
135    
136     AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],
137     ac_instrument_name, [
138     AC_TRY_COMPILE([#include "lscp/client.h"], [
139     lscp_channel_info_t info;
140     info.instrument_name = 0;
141     ], ac_instrument_name="yes", ac_instrument_name="no")
142     ])
143     if test "x$ac_instrument_name" = "xyes"; then
144     AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.])
145     fi
146    
147     AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t],
148     ac_mute_solo, [
149     AC_TRY_COMPILE([#include "lscp/client.h"], [
150     lscp_channel_info_t info;
151     info.mute = 0;
152     info.solo = 0;
153     ], ac_mute_solo="yes", ac_mute_solo="no")
154     ])
155     if test "x$ac_mute_solo" = "xyes"; then
156     AC_CHECK_LIB(lscp, lscp_set_channel_mute, [ac_mute_solo="yes"], [ac_mute_solo="no"])
157     fi
158     if test "x$ac_mute_solo" = "xyes"; then
159     AC_CHECK_LIB(lscp, lscp_set_channel_solo, [ac_mute_solo="yes"], [ac_mute_solo="no"])
160     fi
161     if test "x$ac_mute_solo" = "xyes"; then
162     AC_DEFINE(CONFIG_MUTE_SOLO, 1, [Define if mute/solo is available.])
163     fi
164    
165     # Check for optional libraries.
166     if test "x$ac_libgig" = "xyes"; then
167     AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"])
168     if test "x$ac_libgig" = "xyes"; then
169     AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.])
170     ac_libs="-lgig $ac_libs"
171     fi
172     fi
173    
174     AC_SUBST(ac_libs)
175    
176     # Checks for header files.
177     AC_HEADER_STDC
178     AC_HEADER_SYS_WAIT
179     AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h)
180    
181     # AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"])
182     # if test "x$ac_lscp_h" = "xno"; then
183     # AC_MSG_ERROR([LSCP headers not found.])
184     # fi
185    
186     # Checks for typedefs, structures, and compiler characteristics.
187     # AC_C_CONST
188    
189     # Checks for library functions.
190     AC_CHECK_FUNCS(system)
191    
192     # Finally produce a configure header file and the makefiles.
193     AC_OUTPUT
194    
195     # make clean > /dev/null 2>&1
196    
197     echo ""
198     echo "Now type 'make', followed by 'make install' as root."
199     echo ""

  ViewVC Help
Powered by ViewVC