1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(SpiralSynthModular.C)
4 dnl Automake (can't use AC_CONFIG_HEADER - get complaints!)
5 AM_CONFIG_HEADER(config.h)
7 dnl Checks for programs.
12 dnl Checks for header files.
15 dnl Checks for typedefs, structures, and compiler characteristics.
19 dnl Check plugin directory
20 AC_ARG_WITH(plugindir,
21 [ --with-plugindir=dir give the plugin directory],
23 plugindir="/usr/lib/SpiralPlugins")
24 AC_SUBST(PLUGINDIR, $plugindir)
26 dnl Check whether to enable debugging
27 AC_ARG_ENABLE(debug, [ --enable-debug enable debugging ],
28 ac_arg_debug="Y", ac_arg_debug="N")
30 if test $ac_arg_debug = "Y" ; then
31 CFLAGS="-pipe -Wall -O0 -ggdb "
32 CXXFLAGS="-pipe -Wall -O0 -ggdb "
34 CFLAGS="-pipe -Wall -O3 -ffast-math -DNO_DEBUG -Wno-unused "
35 CXXFLAGS="-pipe -Wall -O3 -ffast-math -DNO_DEBUG -Wno-unused "
38 dnl build plugin list - plugins that do not require an optional component
39 dnl (i.e. Jack, and LADSPA)
41 PLUGINLIST="AmpPlugin AnotherFilterPlugin BeatMatchPlugin ControllerPlugin \
42 CounterPlugin DelayPlugin DiskWriterPlugin DistributorPlugin EchoPlugin \
43 EnvFollowerPlugin EnvelopePlugin FilterPlugin FlipflopPlugin FormantFilterPlugin \
44 KeyboardPlugin LFOPlugin LogicPlugin MasherPlugin MatrixPlugin \
45 MeterPlugin MidiPlugin MixSwitchPlugin MixerPlugin MoogFilterPlugin NoisePlugin \
46 NoteSnapPlugin OperatorPlugin OscillatorPlugin OutputPlugin PoshSamplerPlugin \
47 RingModPlugin SVFilterPlugin SampleHoldPlugin ScopePlugin SeqSelectorPlugin \
48 SmoothPlugin SpiralLoopPlugin SplitSwitchPlugin SplitterPlugin StereoMixerPlugin \
49 StreamPlugin SwitchPlugin TranslatePlugin TransposePlugin TrigPlugin WaveShaperPlugin \
50 WaveTablePlugin XFadePlugin"
52 dnl Check whether jack is present or has been disabled
56 [ --disable-jack Do not build JackPlugin],
57 [build_jack="n" ; jack_message="manually disabled"],
60 if test "$build_jack" = "y"; then
61 AC_CHECK_HEADER(jack/jack.h, [build_jack="y"], [build_jack="n" ; jack_message="No jack/jack.h found"])
63 if test "$build_jack" = "y"; then
64 AC_CHECK_LIB(jack, jack_client_new, [build_jack="y"], [build_jack="n" ; jack_message="No libjack found"])
66 if test "$build_jack" = "y" ; then
67 PLUGINLIST="JackPlugin $PLUGINLIST"
70 dnl Check whether LADSPA is present or has been disabled
74 [ --disable-ladspa Do not build LADSPAPlugin],
75 [build_ladspa="n" ; ladspa_message="manually disabled"],
78 if test "$build_ladspa" = "y"; then
79 AC_CHECK_HEADER(ladspa.h, [build_ladspa="y"], [build_ladspa="n" ; ladspa_message="No ladspa.h found"])
81 if test "$build_ladspa" = "y" ; then
82 PLUGINLIST="LADSPAPlugin $PLUGINLIST"
86 echo "$PLUGINLIST" > SpiralSound/PluginList.txt
88 dnl Check whether liblrdf is present or has been disabled
92 [ --disable-lrdf Disable liblrdf for LADSPA Plugin],
93 [use_liblrdf="n" ; lrdf_message="manually disabled"],
96 if test "$build_ladspa" = "n" ; then
98 lrdf_message="LADSPAPlugin not used"
100 if test "$use_liblrdf" = "y"; then
101 AC_CHECK_HEADER(lrdf.h, [use_liblrdf="y"], [use_liblrdf="n" ; lrdf_message="No lrdf.h found"])
103 if test "$use_liblrdf" = "y"; then
104 AC_CHECK_LIB(lrdf, lrdf_init, [use_liblrdf="y"], [use_liblrdf="n" ; lrdf_message="No liblrdf found"])
106 if test "$use_liblrdf" = "y"; then
107 AC_DEFINE(HAVE_LIBLRDF, , [Enable liblrdf support for LADSPA Plugin])
112 dnl Check whether alsa-midi is present or has been disabled
116 [ --disable-alsa-midi Disable alsa midi (use OSS)],
117 [use_alsa_midi="n"; amidi_message="manually disabled"],
120 if test "$use_alsa_midi" = "y"; then
121 AC_CHECK_HEADER(alsa/asoundlib.h, [use_alsa_midi="y"], [use_alsa_midi="n" ; amidi_message="No alsa/asoundlib.h found"])
123 if test "$use_alsa_midi" = "y"; then
124 AC_CHECK_LIB(asound, snd_seq_open, [use_alsa_midi="y"], [use_alsa_midi="n" ; amidi_message="No libasound found"])
126 if test "$use_alsa_midi" = "y"; then
127 AC_DEFINE(USE_ALSA_MIDI, , [Use ALSA MIDI not OSS])
131 AC_DEFINE(USE_OSS_MIDI, , [Use OSS MIDI not ALSA])
134 dnl Check whether libsndfile is present or has been disabled
138 [ --disable-sndfile Disable libsndfile for waveform loading],
139 [use_sndfile="n" ; sndfile_message="manually disabled"],
142 if test "$use_sndfile" = "y"; then
143 AC_CHECK_HEADER(sndfile.h, [use_sndfile="y"], [use_sndfile="n" ; sndfile_message="No sndfile.h found"])
145 if test "$use_sndfile" = "y"; then
146 AC_CHECK_LIB(sndfile, sf_open, [use_sndfile="y"], [use_sndfile="n" ; sndfile_message="No libsndfile found"])
148 if test "$use_sndfile" = "y"; then
149 AC_DEFINE(USE_LIBSNDFILE, , [Enable libsndfile for waveform loading])
154 dnl Checks for library functions.
156 AC_CHECK_HEADERS(math.h)
159 dnl AC_CHECK_HEADERS(X11/Xlib.h)
160 dnl AC_CHECK_LIB(X11, XDisplayName)
161 dnl AC_CHECK_LIB(Xext, main)
163 AC_PATH_PROG(FLTK_CONFIG, fltk-config, no)
164 if test "$FLTK_CONFIG" = "no"; then
167 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
168 AC_CHECK_HEADERS(GL/gl.h)
169 if test $ac_cv_header_GL_gl_h = "yes" ; then
170 AC_CHECK_LIB(GL, glBegin, LIBGL="-lGL")
172 AC_CHECK_HEADERS(FL/Fl.h)
173 if test $ac_cv_header_FL_Fl_h = "no" ; then
174 echo "*** FLTK headers missing."
177 AC_CHECK_LIB(fltk, main)
178 FLTK_CXXFLAGS="$X_CFLAGS"
179 FLTK_CFLAGS="$FLTK_CXXFLAGS"
180 FLTK_LIBS="$X_LIBS -lfltk $LIBGL"
182 FLTK_CXXFLAGS=`$FLTK_CONFIG $fltk_config_args --cxxflags`
183 FLTK_CFLAGS=`$FLTK_CONFIG $fltk_config_args --cxxflags`
184 FLTK_LIBS=`$FLTK_CONFIG $fltk_config_args --ldflags`
185 dnl This caused problems for debian users,
186 dnl It would be nice to find a more robust way of doing it.
187 dnl if test "${FLTK_LIBS/*-rpath*/yes}" != "yes"; then
188 dnl echo "*** FLTK needs to be configured with --enable-shared"
192 AC_SUBST(FLTK_CXXFLAGS)
193 AC_SUBST(FLTK_CFLAGS)
196 AC_CHECK_HEADERS(dlfcn.h)
197 AC_CHECK_LIB(dl, dlopen)
199 dnl Do we need png?????
200 dnl AC_CHECK_HEADERS(png.h)
201 dnl AC_CHECK_LIB(png, png_get_copyright)
203 dnl This is normally done with libtool but since we aren't using libtool
206 dnl FIXME: forced to add -fPIC here..
207 CFLAGS="$CFLAGS -fPIC"
208 CXXFLAGS="$CFLAGS -fPIC"
214 dnl Modify the output files.
216 SpiralSound/Plugins/AmpPlugin/Makefile
217 SpiralSound/Plugins/AnotherFilterPlugin/Makefile
218 SpiralSound/Plugins/BeatMatchPlugin/Makefile
219 SpiralSound/Plugins/ControllerPlugin/Makefile
220 SpiralSound/Plugins/CounterPlugin/Makefile
221 SpiralSound/Plugins/DelayPlugin/Makefile
222 SpiralSound/Plugins/DiskWriterPlugin/Makefile
223 SpiralSound/Plugins/DistributorPlugin/Makefile
224 SpiralSound/Plugins/EchoPlugin/Makefile
225 SpiralSound/Plugins/EnvFollowerPlugin/Makefile
226 SpiralSound/Plugins/EnvelopePlugin/Makefile
227 SpiralSound/Plugins/FilterPlugin/Makefile
228 SpiralSound/Plugins/FlipflopPlugin/Makefile
229 SpiralSound/Plugins/FormantFilterPlugin/Makefile
230 SpiralSound/Plugins/JackPlugin/Makefile
231 SpiralSound/Plugins/KeyboardPlugin/Makefile
232 SpiralSound/Plugins/LADSPAPlugin/Makefile
233 SpiralSound/Plugins/LFOPlugin/Makefile
234 SpiralSound/Plugins/LogicPlugin/Makefile
235 SpiralSound/Plugins/MasherPlugin/Makefile
236 SpiralSound/Plugins/MatrixPlugin/Makefile
237 SpiralSound/Plugins/MeterPlugin/Makefile
238 SpiralSound/Plugins/MidiPlugin/Makefile
239 SpiralSound/Plugins/MixSwitchPlugin/Makefile
240 SpiralSound/Plugins/MixerPlugin/Makefile
241 SpiralSound/Plugins/MoogFilterPlugin/Makefile
242 SpiralSound/Plugins/NoisePlugin/Makefile
243 SpiralSound/Plugins/NoteSnapPlugin/Makefile
244 SpiralSound/Plugins/OperatorPlugin/Makefile
245 SpiralSound/Plugins/OscillatorPlugin/Makefile
246 SpiralSound/Plugins/OutputPlugin/Makefile
247 SpiralSound/Plugins/PoshSamplerPlugin/Makefile
248 SpiralSound/Plugins/RingModPlugin/Makefile
249 SpiralSound/Plugins/SVFilterPlugin/Makefile
250 SpiralSound/Plugins/SampleHoldPlugin/Makefile
251 SpiralSound/Plugins/ScopePlugin/Makefile
252 SpiralSound/Plugins/SeqSelectorPlugin/Makefile
253 SpiralSound/Plugins/SmoothPlugin/Makefile
254 SpiralSound/Plugins/SpiralLoopPlugin/Makefile
255 SpiralSound/Plugins/SplitSwitchPlugin/Makefile
256 SpiralSound/Plugins/SplitterPlugin/Makefile
257 SpiralSound/Plugins/StereoMixerPlugin/Makefile
258 SpiralSound/Plugins/StreamPlugin/Makefile
259 SpiralSound/Plugins/SwitchPlugin/Makefile
260 SpiralSound/Plugins/TranslatePlugin/Makefile
261 SpiralSound/Plugins/TransposePlugin/Makefile
262 SpiralSound/Plugins/TrigPlugin/Makefile
263 SpiralSound/Plugins/WaveShaperPlugin/Makefile
264 SpiralSound/Plugins/WaveTablePlugin/Makefile
265 SpiralSound/Plugins/XFadePlugin/Makefile
266 SpiralSynthPluginLocation.h
270 echo -e "\nConfig options:"
271 echo -n "libsndfile support for wave loading - "
272 if test "$use_sndfile" = "y"; then
275 echo "Disabled - $sndfile_message"
277 echo -n " ALSA support for MidiPlugin - "
278 if test "$use_alsa_midi" = "y"; then
281 echo "Disabled - $amidi_message - Using OSS instead"
283 echo -n " Jack support (via JackPlugin) - "
284 if test "$build_jack" = "y"; then
287 echo "Disabled - $jack_message"
289 echo -n " LADSPA support (via LADSPAPlugin) - "
290 if test "$build_ladspa" = "y"; then
293 echo "Disabled - $ladspa_message"
295 echo -n " liblrdf support for LADSPAPlugin - "
296 if test "$use_liblrdf" = "y"; then
299 echo "Disabled - $lrdf_message"