13 |
|
|
14 |
dnl Enable debugging argument option. |
dnl Enable debugging argument option. |
15 |
AC_ARG_ENABLE(debug, |
AC_ARG_ENABLE(debug, |
16 |
[ --enable-debug enable debugging (default=no)], |
AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]), |
17 |
[ac_debug="debug"], |
[ac_debug="debug"], |
18 |
[ac_debug="release"]) |
[ac_debug="release"]) |
19 |
AC_SUBST(ac_debug) |
AC_SUBST(ac_debug) |
22 |
AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) |
AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) |
23 |
fi |
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. |
dnl Checks for programs. |
32 |
AC_PROG_CC |
AC_PROG_CC |
33 |
AC_PROG_CPP |
AC_PROG_CPP |
53 |
ac_qtlib, [ |
ac_qtlib, [ |
54 |
for X in qt-mt qt; do |
for X in qt-mt qt; do |
55 |
if test "x$ac_qtlib" = "x"; then |
if test "x$ac_qtlib" = "x"; then |
56 |
if test -f $QTDIR/lib/lib$X.so -o -f $QTDIR/lib/lib$X.a; then |
if test -f $QTDIR/lib/lib$X.so -o -f $QTDIR/lib/lib$X.a \ |
57 |
|
-o -f $QTDIR/lib/lib$X.la -o -f $QTDIR/lib/lib$X.dylib; then |
58 |
ac_qtlib=$X |
ac_qtlib=$X |
59 |
fi |
fi |
60 |
fi |
fi |
73 |
|
|
74 |
CFLAGS="$CFLAGS -I$QTDIR/include" |
CFLAGS="$CFLAGS -I$QTDIR/include" |
75 |
CPPFLAGS="$CPPFLAGS -I$QTDIR/include" |
CPPFLAGS="$CPPFLAGS -I$QTDIR/include" |
76 |
LIBS="-L$QTDIR/lib -L/usr/X11R6/lib" |
LIBS="-L$QTDIR/lib" |
77 |
|
for X in qt qt3; do |
78 |
|
if test -d $QTDIR/include/$X; then |
79 |
|
CFLAGS="$CFLAGS -I$QTDIR/include/$X" |
80 |
|
CPPFLAGS="$CPPFLAGS -I$QTDIR/include/$X" |
81 |
|
fi |
82 |
|
done |
83 |
|
|
84 |
AC_CACHE_CHECK([for Qt library version >= 3.1.1], |
AC_CACHE_CHECK([for Qt library version >= 3.1.1], |
85 |
ac_qtlib_version, [ |
ac_qtlib_version, [ |
124 |
AC_CHECK_LIB(Xext, main) |
AC_CHECK_LIB(Xext, main) |
125 |
AC_CHECK_LIB($ac_qtlib, main) |
AC_CHECK_LIB($ac_qtlib, main) |
126 |
|
|
127 |
|
dnl Check for round math function. |
128 |
|
AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"]) |
129 |
|
if test "x$ac_round" = "xyes"; then |
130 |
|
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
131 |
|
fi |
132 |
|
|
133 |
|
dnl Check for mandatory libraries. |
134 |
AC_CHECK_LIB(lscp, main, [ac_liblscp="yes"], [ac_liblscp="no"]) |
AC_CHECK_LIB(lscp, main, [ac_liblscp="yes"], [ac_liblscp="no"]) |
135 |
if test "x$ac_liblscp" = "xno"; then |
if test "x$ac_liblscp" = "xno"; then |
136 |
AC_MSG_ERROR([LSCP library not found.]) |
AC_MSG_ERROR([LSCP library not found.]) |
137 |
fi |
fi |
138 |
|
ac_libs="-llscp" |
139 |
|
|
140 |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
141 |
if test "x$ac_libgig" = "xyes"; then |
ac_instrument_name, [ |
142 |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
143 |
|
lscp_channel_info_t info; |
144 |
|
info.instrument_name = 0; |
145 |
|
], ac_instrument_name="yes", ac_instrument_name="no") |
146 |
|
]) |
147 |
|
if test "x$ac_instrument_name" = "xyes"; then |
148 |
|
AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.]) |
149 |
fi |
fi |
150 |
|
|
151 |
dnl Check for round math function. |
dnl Check for optional libraries. |
152 |
AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"]) |
if test "x$ac_libgig" = "xyes"; then |
153 |
if test "x$ac_round" = "xyes"; then |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
154 |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
if test "x$ac_libgig" = "xyes"; then |
155 |
|
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
156 |
|
ac_libs="-lgig $ac_libs" |
157 |
|
fi |
158 |
fi |
fi |
159 |
|
|
160 |
|
AC_SUBST(ac_libs) |
161 |
|
|
162 |
dnl Checks for header files. |
dnl Checks for header files. |
163 |
AC_HEADER_STDC |
AC_HEADER_STDC |
164 |
AC_HEADER_SYS_WAIT |
AC_HEADER_SYS_WAIT |
165 |
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h) |
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h) |
166 |
|
|
167 |
dnl AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"]) |
dnl AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"]) |
168 |
dnl if test "x$ac_lscp_h" = "xno"; then |
dnl if test "x$ac_lscp_h" = "xno"; then |
178 |
dnl Finally produce a configure header file and the makefiles. |
dnl Finally produce a configure header file and the makefiles. |
179 |
AC_OUTPUT(Makefile qsampler.pro) |
AC_OUTPUT(Makefile qsampler.pro) |
180 |
|
|
181 |
make clean > /dev/null 2>&1 |
dnl make clean > /dev/null 2>&1 |
182 |
|
|
183 |
echo "" |
echo "" |
184 |
echo "Now type 'make', followed by 'make install' as root." |
echo "Now type 'make', followed by 'make install' as root." |