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) |
24 |
|
|
25 |
dnl Enable libgig availability. |
dnl Enable libgig availability. |
26 |
AC_ARG_ENABLE(libgig, |
AC_ARG_ENABLE(libgig, |
27 |
[ --enable-libgig enable libgig (default=no)], |
AC_HELP_STRING([--disable-libgig], [disable libgig interface (default=no)]), |
28 |
[ac_libgig="yes"], |
[ac_libgig="no"], |
29 |
[ac_libgig="no"]) |
[ac_libgig="yes"]) |
30 |
|
|
31 |
dnl Checks for programs. |
dnl Checks for programs. |
32 |
AC_PROG_CC |
AC_PROG_CC |
48 |
AC_MSG_RESULT([$QTDIR]) |
AC_MSG_RESULT([$QTDIR]) |
49 |
fi |
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. |
dnl Checks for Qt library. |
62 |
AC_CACHE_CHECK([for Qt library], |
for X in qt-mt qt; do |
63 |
ac_qtlib, [ |
if test "x$ac_qtlib" = "x"; then |
64 |
for X in qt-mt qt; do |
AC_CHECK_LIB($X, main, [ac_qtlib=$X]) |
65 |
if test "x$ac_qtlib" = "x"; then |
fi |
66 |
if test -f $QTDIR/lib/lib$X.so -o -f $QTDIR/lib/lib$X.a; then |
done |
|
ac_qtlib=$X |
|
|
fi |
|
|
fi |
|
|
done |
|
|
]) |
|
67 |
if test "x$ac_qtlib" = "x"; then |
if test "x$ac_qtlib" = "x"; then |
68 |
AC_MSG_ERROR([Qt library not found. Maybe QTDIR isn't properly set.]) |
AC_MSG_ERROR([Qt library not found. Maybe QTDIR isn't properly set.]) |
69 |
fi |
fi |
75 |
fi |
fi |
76 |
AC_SUBST(ac_thread) |
AC_SUBST(ac_thread) |
77 |
|
|
|
CFLAGS="$CFLAGS -I$QTDIR/include" |
|
|
CPPFLAGS="$CPPFLAGS -I$QTDIR/include" |
|
|
LIBS="-L$QTDIR/lib -L/usr/X11R6/lib" |
|
|
|
|
78 |
AC_CACHE_CHECK([for Qt library version >= 3.1.1], |
AC_CACHE_CHECK([for Qt library version >= 3.1.1], |
79 |
ac_qtlib_version, [ |
ac_qtlib_version, [ |
80 |
AC_TRY_LINK([#include "qglobal.h"], [ |
AC_TRY_LINK([#include "qglobal.h"], [ |
131 |
fi |
fi |
132 |
ac_libs="-llscp" |
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 |
dnl Check for optional libraries. |
dnl Check for optional libraries. |
146 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
147 |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
156 |
dnl Checks for header files. |
dnl Checks for header files. |
157 |
AC_HEADER_STDC |
AC_HEADER_STDC |
158 |
AC_HEADER_SYS_WAIT |
AC_HEADER_SYS_WAIT |
159 |
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h) |
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h) |
160 |
|
|
161 |
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"]) |
162 |
dnl if test "x$ac_lscp_h" = "xno"; then |
dnl if test "x$ac_lscp_h" = "xno"; then |
172 |
dnl Finally produce a configure header file and the makefiles. |
dnl Finally produce a configure header file and the makefiles. |
173 |
AC_OUTPUT(Makefile qsampler.pro) |
AC_OUTPUT(Makefile qsampler.pro) |
174 |
|
|
175 |
make clean > /dev/null 2>&1 |
dnl make clean > /dev/null 2>&1 |
176 |
|
|
177 |
echo "" |
echo "" |
178 |
echo "Now type 'make', followed by 'make install' as root." |
echo "Now type 'make', followed by 'make install' as root." |