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

Contents of /qsampler/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 751 - (show annotations) (download)
Fri Aug 19 17:10:16 2005 UTC (18 years, 8 months ago) by capela
File size: 5312 byte(s)
* Added MUTE/SOLO buttons to individual channel strips.

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

  ViewVC Help
Powered by ViewVC