root/libremix/trunk/configure.ac

Revision 707, 5.3 kB (checked in by conrad, 2 years ago)

configure: set valgrind --num-callers to 50 (max)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(src/libremix/remix_base.c)
3
4 AM_INIT_AUTOMAKE(remix, 0.2.3)
5 AM_CONFIG_HEADER(config.h)
6
7 example_programs="noisedemo squaredemo"
8
9 dnl Checks for programs.
10 AM_PROG_LIBTOOL
11 AC_PROG_INSTALL
12 AC_PROG_MAKE_SET
13 AM_PROG_CC_C_O
14
15 # Check for doxygen
16 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
17 AM_CONDITIONAL(HAVE_DOXYGEN,$HAVE_DOXYGEN)
18 if test $HAVE_DOXYGEN = "false"; then
19              AC_MSG_WARN([*** doxygen not found, docs will not be built])
20 fi
21
22 # Check for valgrind
23 VALGRIND_ENVIRONMENT=""
24 ac_enable_valgrind=no
25 AC_ARG_ENABLE(valgrind-testing,
26      [  --enable-valgrind-testing     enable running of tests inside Valgrind ],     [ ac_enable_valgrind=yes ], [ ac_enable_valgrind=no] )
27
28 if test "x${ac_enable_valgrind}" = xyes ; then
29   if test "x${enable_shared}" = xyes ; then
30     VALGRIND_ENVIRONMENT="libtool --mode=execute "
31   fi
32
33   AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no)
34   if test "x$HAVE_VALGRIND" = xyes ; then
35     VALGRIND_ENVIRONMENT="$VALGRIND_ENVIRONMENT valgrind -q --leak-check=yes --show-reachable=yes --num-callers=50"
36     AC_SUBST(VALGRIND_ENVIRONMENT)
37     TESTS_INFO="'make check' test suite will be run under:
38   ${VALGRIND_ENVIRONMENT}"
39   else
40     TESTS_INFO="'make check' to run test suite (Valgrind not found)"
41   fi
42 else
43   TESTS_INFO="'make check' to run test suite (Valgrind testing not enabled)"
44 fi
45
46 dnl
47 dnl  Configuration option for building of experimental code.
48 dnl
49
50 ac_enable_experimental=no
51 AC_ARG_ENABLE(experimental,
52      [  --enable-experimental   enable building of experimental code ],
53      [ ac_enable_experimental=yes ])
54
55 if test "x${ac_enable_experimental}" = xyes ; then
56     AC_DEFINE(ANX_CONFIG_EXPERIMENTAL, [], [Define to build experimental code])
57 fi
58
59 dnl Checks for libraries.
60
61 dnl
62 dnl  Detect libsndfile 1.0
63 dnl
64
65
66 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.0,
67                   HAVE_LIBSNDFILE1="yes", HAVE_LIBSNDFILE1="no")
68
69 if test "$HAVE_LIBSNDFILE1" = "yes" ; then
70   AC_DEFINE([HAVE_LIBSNDFILE1], [], [Define if libsndfile version 1 found])
71   AC_SUBST(SNDFILE_LIBS)
72   AC_SUBST(SNDFILE_CFLAGS)
73   example_programs="${example_programs} sndfiledemo"
74 else
75   AC_CHECK_LIB(sndfile, sf_open, HAVE_LIBSNDFILE1="maybe")
76   if test "$HAVE_LIBSNDFILE1" = "maybe" ; then
77     AC_MSG_ERROR([
78 ***
79 *** libsndfile-1.0.0 or greater seems to exist on your system, however
80 *** the pkg-config tool cannot find its build information.
81 ***
82 *** Please set your PKG_CONFIG_PATH environment variable to include the
83 *** directory in which sndfile.pc was installed. For example, sndfile.pc
84 *** is installed in /usr/local/lib/pkgconfig by default; if that is the
85 *** case do:
86 ***
87 ***     export PKG_CONFIG_PATH="\$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"
88 ***
89 *** then run this ./configure again. If you configured libsndfile with a
90 *** different --prefix option, replace /usr/local above with that prefix.
91 ***
92 ])
93   fi
94 fi
95
96 AM_CONDITIONAL(HAVE_LIBSNDFILE1, test "x${HAVE_LIBSNDFILE1}" = xyes)
97
98
99 dnl Checks for header files.
100 AC_HEADER_STDC
101 AC_CHECK_HEADERS(limits.h)
102
103 dnl Checks for typedefs, structures, and compiler characteristics.
104 AC_C_CONST
105 AC_TYPE_SIZE_T
106 AC_TYPE_UID_T
107
108 dnl Checks for library functions.
109 AC_CHECK_FUNCS(strdup strerror)
110
111 dnl Test for sys/soundcard.h -- if user doesn't have it, don't build remix_monitor
112 HAVE_SYS_SOUNDCARD_H=0
113 AC_CHECK_HEADERS(sys/soundcard.h)
114   if test "x${ac_cv_header_sys_soundcard_h}" = xyes ; then
115     HAVE_SYS_SOUNDCARD_H=1
116     BUILD_MONITOR=1
117   fi
118 AC_SUBST(BUILD_MONITOR)
119 AM_CONDITIONAL(BUILD_MONITOR, test -n "$BUILD_MONITOR")
120
121 dnl
122 dnl Set PACKAGE_PLUGIN_DIR in Makefiles and config.h.
123 dnl
124
125 PACKAGE_PLUGIN_DIR="${libdir}/remix"
126 AC_SUBST(PACKAGE_PLUGIN_DIR)
127 if test "x${prefix}" = "xNONE"; then
128   PACKAGE_PLUGIN_DIR="${ac_default_prefix}/lib/remix"
129 else
130   PACKAGE_PLUGIN_DIR="${prefix}/lib/remix"
131 fi
132 AC_DEFINE_UNQUOTED(PACKAGE_PLUGIN_DIR, "$PACKAGE_PLUGIN_DIR",
133     [Set the plugin directory for remix])
134
135 AC_ARG_ENABLE(gcc-werror,
136         AC_HELP_STRING([--enable-gcc-werror], [enable -Werror in all Makefiles]))
137
138 dnl Use -Wall if we have gcc.
139 if test "x$ac_cv_prog_gcc" = xyes ; then
140   CFLAGS="$CFLAGS -Wall"
141
142   if test x$enable_gcc_werror = "xyes" ; then
143     CFLAGS="$CFLAGS -Werror"
144         fi
145
146 fi
147
148 AC_OUTPUT([
149 Makefile
150 doc/Makefile
151 doc/Doxyfile
152 include/Makefile
153 include/remix/Makefile
154 src/Makefile
155 src/ctxdata/Makefile
156 src/libremix/Makefile
157 src/plugins/Makefile
158 src/plugins/ladspa/Makefile
159 src/plugins/noise/Makefile
160 src/examples/Makefile
161 src/tests/Makefile
162 ctxdata.pc
163 remix.pc
164 remix.spec
165 ])
166
167 AC_MSG_RESULT([
168 ------------------------------------------------------------------------
169   $PACKAGE $VERSION:  Automatic configuration OK.
170
171   General configuration:
172
173     Experimental code: ........... ${ac_enable_experimental}
174
175   Plugins:
176
177     ladspa noise
178
179   Example programs (./src/examples):
180
181     ${example_programs}
182
183   Installation paths:
184
185     libremix: .................... ${prefix}/lib
186     Plugins: ..................... ${PACKAGE_PLUGIN_DIR}
187     C header files: .............. ${prefix}/include/remix
188     Documentation: ............... ${prefix}/share/doc/$PACKAGE
189
190   Building:
191
192     Type 'make' to compile $PACKAGE.
193
194     Type 'make install' to install $PACKAGE.
195
196     Type 'make check' to test $PACKAGE using the unit tests
197     contained in the src/tests directory.
198     ${TESTS_INFO}
199
200   Example programs will be built but not installed.
201 ------------------------------------------------------------------------
202 ])
203
Note: See TracBrowser for help on using the browser.