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

Annotation of /qsampler/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 340 - (hide annotations) (download)
Fri Jan 14 10:40:47 2005 UTC (15 years, 1 month ago) by capela
File size: 4281 byte(s)
Set to ignore the SIGPIPE (Broken pipe) signal, where available.

1 capela 93 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     [ --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 capela 299 dnl Enable libgig availability.
26     AC_ARG_ENABLE(libgig,
27 capela 303 [ --disable-libgig disable libgig interface (default=no)],
28     [ac_libgig="no"],
29     [ac_libgig="yes"])
30 capela 299
31 capela 93 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     dnl Checks for Qt library.
52     AC_CACHE_CHECK([for Qt library],
53     ac_qtlib, [
54     for X in qt-mt qt; do
55     if test "x$ac_qtlib" = "x"; then
56     if test -f $QTDIR/lib/lib$X.so -o -f $QTDIR/lib/lib$X.a; then
57     ac_qtlib=$X
58     fi
59     fi
60     done
61     ])
62     if test "x$ac_qtlib" = "x"; then
63     AC_MSG_ERROR([Qt library not found. Maybe QTDIR isn't properly set.])
64     fi
65     AC_SUBST(ac_qtlib)
66    
67     dnl Check for Qt multi-thread support.
68     if test "x$ac_qtlib" = "xqt-mt"; then
69     ac_thread="thread"
70     fi
71     AC_SUBST(ac_thread)
72    
73     CFLAGS="$CFLAGS -I$QTDIR/include"
74     CPPFLAGS="$CPPFLAGS -I$QTDIR/include"
75     LIBS="-L$QTDIR/lib -L/usr/X11R6/lib"
76    
77     AC_CACHE_CHECK([for Qt library version >= 3.1.1],
78     ac_qtlib_version, [
79     AC_TRY_LINK([#include "qglobal.h"], [
80     #if QT_VERSION < 0x030101
81     #error Qt library 3.1.1 or greater required.
82     #endif
83     ],
84     ac_qtlib_version="yes", [
85     echo "no; Qt 3.1.1 or greater is required"
86     exit
87     ])
88     ])
89    
90     dnl A common error message:
91     ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt3-devel)."
92    
93     dnl Check for Qt qmake utility.
94 capela 255 AC_PATH_PROG(ac_qmake, qmake, [no], $QTDIR/bin:${PATH})
95 capela 93 if test "x$ac_qmake" = "xno"; then
96     AC_MSG_ERROR([qmake $ac_qtdir_errmsg])
97     fi
98     AC_SUBST(ac_qmake)
99    
100     dnl Check for Qt moc utility.
101 capela 255 AC_PATH_PROG(ac_moc, moc, [no], $QTDIR/bin:${PATH})
102 capela 93 if test "x$ac_moc" = "xno"; then
103     AC_MSG_ERROR([moc $ac_qtdir_errmsg])
104     fi
105     AC_SUBST(ac_moc)
106    
107     dnl Check for Qt uic utility.
108 capela 255 AC_PATH_PROG(ac_uic, uic, [no], $QTDIR/bin:${PATH})
109 capela 93 if test "x$ac_uic" = "xno"; then
110     AC_MSG_ERROR([uic $ac_qtdir_errmsg])
111     fi
112     AC_SUBST(ac_uic)
113    
114     dnl Checks for libraries.
115     AC_CHECK_LIB(m, main)
116     AC_CHECK_LIB(X11, main)
117     AC_CHECK_LIB(Xext, main)
118     AC_CHECK_LIB($ac_qtlib, main)
119 capela 176
120 capela 299 dnl Check for round math function.
121     AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"])
122     if test "x$ac_round" = "xyes"; then
123     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
124     fi
125    
126     dnl Check for mandatory libraries.
127 capela 176 AC_CHECK_LIB(lscp, main, [ac_liblscp="yes"], [ac_liblscp="no"])
128     if test "x$ac_liblscp" = "xno"; then
129 capela 93 AC_MSG_ERROR([LSCP library not found.])
130     fi
131 capela 299 ac_libs="-llscp"
132 capela 93
133 capela 299 dnl Check for optional libraries.
134 capela 176 if test "x$ac_libgig" = "xyes"; then
135 capela 299 AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"])
136     if test "x$ac_libgig" = "xyes"; then
137     AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.])
138     ac_libs="-lgig $ac_libs"
139     fi
140 capela 176 fi
141    
142 capela 299 AC_SUBST(ac_libs)
143 capela 93
144     dnl Checks for header files.
145     AC_HEADER_STDC
146     AC_HEADER_SYS_WAIT
147 capela 340 AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h)
148 capela 93
149     dnl AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"])
150     dnl if test "x$ac_lscp_h" = "xno"; then
151     dnl AC_MSG_ERROR([LSCP headers not found.])
152     dnl fi
153    
154     dnl Checks for typedefs, structures, and compiler characteristics.
155     dnl AC_C_CONST
156    
157     dnl Checks for library functions.
158     AC_CHECK_FUNCS(system)
159    
160     dnl Finally produce a configure header file and the makefiles.
161     AC_OUTPUT(Makefile qsampler.pro)
162    
163     make clean > /dev/null 2>&1
164    
165     echo ""
166     echo "Now type 'make', followed by 'make install' as root."
167     echo ""

  ViewVC Help
Powered by ViewVC