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

Annotation of /qsampler/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 93 - (hide annotations) (download)
Fri May 28 09:07:08 2004 UTC (19 years, 10 months ago) by capela
File size: 3717 byte(s)
Initial alpha release.

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     dnl Checks for programs.
26     AC_PROG_CC
27     AC_PROG_CPP
28     AC_PROG_CXX
29     AC_PROG_CXXCPP
30     AC_PROG_GCC_TRADITIONAL
31    
32     dnl Checks for languages.
33     AC_LANG_C
34     AC_LANG_CPLUSPLUS
35    
36     dnl Check for QTDIR environment variable.
37     AC_MSG_CHECKING([whether QTDIR environment variable is set])
38     if test "x$QTDIR" = "x"; then
39     AC_MSG_RESULT([no])
40     AC_MSG_ERROR([QTDIR must be properly set.])
41     else
42     AC_MSG_RESULT([$QTDIR])
43     fi
44    
45     dnl Checks for Qt library.
46     AC_CACHE_CHECK([for Qt library],
47     ac_qtlib, [
48     for X in qt-mt qt; do
49     if test "x$ac_qtlib" = "x"; then
50     if test -f $QTDIR/lib/lib$X.so -o -f $QTDIR/lib/lib$X.a; then
51     ac_qtlib=$X
52     fi
53     fi
54     done
55     ])
56     if test "x$ac_qtlib" = "x"; then
57     AC_MSG_ERROR([Qt library not found. Maybe QTDIR isn't properly set.])
58     fi
59     AC_SUBST(ac_qtlib)
60    
61     dnl Check for Qt multi-thread support.
62     if test "x$ac_qtlib" = "xqt-mt"; then
63     ac_thread="thread"
64     fi
65     AC_SUBST(ac_thread)
66    
67     CFLAGS="$CFLAGS -I$QTDIR/include"
68     CPPFLAGS="$CPPFLAGS -I$QTDIR/include"
69     LIBS="-L$QTDIR/lib -L/usr/X11R6/lib"
70    
71     AC_CACHE_CHECK([for Qt library version >= 3.1.1],
72     ac_qtlib_version, [
73     AC_TRY_LINK([#include "qglobal.h"], [
74     #if QT_VERSION < 0x030101
75     #error Qt library 3.1.1 or greater required.
76     #endif
77     ],
78     ac_qtlib_version="yes", [
79     echo "no; Qt 3.1.1 or greater is required"
80     exit
81     ])
82     ])
83    
84     dnl A common error message:
85     ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt3-devel)."
86    
87     dnl Check for Qt qmake utility.
88     AC_PATH_PROG(ac_qmake, qmake, [no], $ac_qtdir/bin:${PATH})
89     if test "x$ac_qmake" = "xno"; then
90     AC_MSG_ERROR([qmake $ac_qtdir_errmsg])
91     fi
92     AC_SUBST(ac_qmake)
93    
94     dnl Check for Qt moc utility.
95     AC_PATH_PROG(ac_moc, moc, [no])
96     if test "x$ac_moc" = "xno"; then
97     AC_MSG_ERROR([moc $ac_qtdir_errmsg])
98     fi
99     AC_SUBST(ac_moc)
100    
101     dnl Check for Qt uic utility.
102     AC_PATH_PROG(ac_uic, uic, [no])
103     if test "x$ac_uic" = "xno"; then
104     AC_MSG_ERROR([uic $ac_qtdir_errmsg])
105     fi
106     AC_SUBST(ac_uic)
107    
108     dnl Checks for libraries.
109     AC_CHECK_LIB(m, main)
110     AC_CHECK_LIB(X11, main)
111     AC_CHECK_LIB(Xext, main)
112     AC_CHECK_LIB($ac_qtlib, main)
113     AC_CHECK_LIB(lscp, main, [ac_lscp_lib="yes"], [ac_lscp_lib="no"])
114     if test "x$ac_lscp_lib" = "xno"; then
115     AC_MSG_ERROR([LSCP library not found.])
116     fi
117    
118     dnl Check for round math function.
119     AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"])
120     if test "x$ac_round" = "xyes"; then
121     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
122     fi
123    
124     dnl Checks for header files.
125     AC_HEADER_STDC
126     AC_HEADER_SYS_WAIT
127     AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
128    
129     dnl AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"])
130     dnl if test "x$ac_lscp_h" = "xno"; then
131     dnl AC_MSG_ERROR([LSCP headers not found.])
132     dnl fi
133    
134     dnl Checks for typedefs, structures, and compiler characteristics.
135     dnl AC_C_CONST
136    
137     dnl Checks for library functions.
138     AC_CHECK_FUNCS(system)
139    
140     dnl Finally produce a configure header file and the makefiles.
141     AC_OUTPUT(Makefile qsampler.pro)
142    
143     make clean > /dev/null 2>&1
144    
145     echo ""
146     echo "Now type 'make', followed by 'make install' as root."
147     echo ""

  ViewVC Help
Powered by ViewVC