You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

303 lines
9.7KB

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(SpiralSynthModular.C)
  3. dnl Automake (can't use AC_CONFIG_HEADER - get complaints!)
  4. AM_CONFIG_HEADER(config.h)
  5. dnl Checks for programs.
  6. AC_PROG_CC
  7. AC_PROG_CPP
  8. AC_PROG_INSTALL
  9. dnl Checks for header files.
  10. AC_HEADER_STDC
  11. dnl Checks for typedefs, structures, and compiler characteristics.
  12. AC_C_CONST
  13. AC_C_INLINE
  14. dnl Check plugin directory
  15. AC_ARG_WITH(plugindir,
  16. [ --with-plugindir=dir give the plugin directory],
  17. plugindir="$withval",
  18. plugindir="/usr/lib/SpiralPlugins")
  19. AC_SUBST(PLUGINDIR, $plugindir)
  20. dnl Check whether to enable debugging
  21. AC_ARG_ENABLE(debug, [ --enable-debug enable debugging ],
  22. ac_arg_debug="Y", ac_arg_debug="N")
  23. if test $ac_arg_debug = "Y" ; then
  24. CFLAGS="-pipe -Wall -O0 -ggdb "
  25. CXXFLAGS="-pipe -Wall -O0 -ggdb "
  26. else
  27. CFLAGS="-pipe -Wall -O3 -ffast-math -DNO_DEBUG -Wno-unused "
  28. CXXFLAGS="-pipe -Wall -O3 -ffast-math -DNO_DEBUG -Wno-unused "
  29. fi
  30. dnl build plugin list - plugins that do not require an optional component
  31. dnl (i.e. Jack, and LADSPA)
  32. PLUGINLIST="AmpPlugin AnotherFilterPlugin BeatMatchPlugin ControllerPlugin \
  33. CounterPlugin DelayPlugin DiskWriterPlugin DistributorPlugin EchoPlugin \
  34. EnvFollowerPlugin EnvelopePlugin FilterPlugin FlipflopPlugin FormantFilterPlugin \
  35. KeyboardPlugin LFOPlugin LogicPlugin MasherPlugin MatrixPlugin \
  36. MeterPlugin MidiPlugin MixSwitchPlugin MixerPlugin MoogFilterPlugin MousePlugin NoisePlugin \
  37. NoteSnapPlugin OperatorPlugin OscillatorPlugin OutputPlugin PoshSamplerPlugin \
  38. RingModPlugin SVFilterPlugin SampleHoldPlugin ScopePlugin SeqSelectorPlugin \
  39. SmoothPlugin SpiralLoopPlugin SplitSwitchPlugin SplitterPlugin StereoMixerPlugin \
  40. StreamPlugin SwitchPlugin TranslatePlugin TransposePlugin TrigPlugin WaveShaperPlugin \
  41. WaveTablePlugin XFadePlugin"
  42. dnl Check whether jack is present or has been disabled
  43. jack_message=""
  44. AC_ARG_ENABLE(
  45. jack,
  46. [ --disable-jack Do not build JackPlugin],
  47. [build_jack="n" ; jack_message="manually disabled"],
  48. [build_jack="y"]
  49. )
  50. if test "$build_jack" = "y"; then
  51. AC_CHECK_HEADER(jack/jack.h, [build_jack="y"], [build_jack="n" ; jack_message="No jack/jack.h found"])
  52. fi
  53. if test "$build_jack" = "y"; then
  54. AC_CHECK_LIB(jack, jack_client_new, [build_jack="y"], [build_jack="n" ; jack_message="No libjack found"])
  55. fi
  56. if test "$build_jack" = "y" ; then
  57. PLUGINLIST="JackPlugin $PLUGINLIST"
  58. fi
  59. dnl Check whether LADSPA is present or has been disabled
  60. ladspa_message=""
  61. AC_ARG_ENABLE(
  62. ladspa,
  63. [ --disable-ladspa Do not build LADSPAPlugin],
  64. [build_ladspa="n" ; ladspa_message="manually disabled"],
  65. [build_ladspa="y"]
  66. )
  67. if test "$build_ladspa" = "y"; then
  68. AC_CHECK_HEADER(ladspa.h, [build_ladspa="y"], [build_ladspa="n" ; ladspa_message="No ladspa.h found"])
  69. fi
  70. if test "$build_ladspa" = "y" ; then
  71. PLUGINLIST="LADSPAPlugin $PLUGINLIST"
  72. fi
  73. dnl build plugin list
  74. echo "$PLUGINLIST" > SpiralSound/PluginList.txt
  75. dnl Check whether liblrdf is present or has been disabled
  76. lrdf_message=""
  77. AC_ARG_ENABLE(
  78. lrdf,
  79. [ --disable-lrdf Disable liblrdf for LADSPA Plugin],
  80. [use_liblrdf="n" ; lrdf_message="manually disabled"],
  81. [use_liblrdf="y"]
  82. )
  83. if test "$build_ladspa" = "n" ; then
  84. use_liblrdf="n"
  85. lrdf_message="LADSPAPlugin not used"
  86. fi
  87. if test "$use_liblrdf" = "y"; then
  88. AC_CHECK_HEADER(lrdf.h, [use_liblrdf="y"], [use_liblrdf="n" ; lrdf_message="No lrdf.h found"])
  89. fi
  90. if test "$use_liblrdf" = "y"; then
  91. AC_CHECK_LIB(lrdf, lrdf_init, [use_liblrdf="y"], [use_liblrdf="n" ; lrdf_message="No liblrdf found"])
  92. fi
  93. if test "$use_liblrdf" = "y"; then
  94. AC_DEFINE(HAVE_LIBLRDF, , [Enable liblrdf support for LADSPA Plugin])
  95. LRDFLIBS="-llrdf"
  96. AC_SUBST(LRDFLIBS)
  97. fi
  98. dnl Check whether alsa-midi is present or has been disabled
  99. amidi_message=""
  100. AC_ARG_ENABLE(
  101. alsa_midi,
  102. [ --disable-alsa-midi Disable alsa midi (use OSS)],
  103. [use_alsa_midi="n"; amidi_message="manually disabled"],
  104. [use_alsa_midi="y"]
  105. )
  106. if test "$use_alsa_midi" = "y"; then
  107. AC_CHECK_HEADER(alsa/asoundlib.h, [use_alsa_midi="y"], [use_alsa_midi="n" ; amidi_message="No alsa/asoundlib.h found"])
  108. fi
  109. if test "$use_alsa_midi" = "y"; then
  110. AC_CHECK_LIB(asound, snd_seq_open, [use_alsa_midi="y"], [use_alsa_midi="n" ; amidi_message="No libasound found"])
  111. fi
  112. if test "$use_alsa_midi" = "y"; then
  113. AC_DEFINE(USE_ALSA_MIDI, , [Use ALSA MIDI not OSS])
  114. AMIDILIBS="-lasound"
  115. AC_SUBST(AMIDILIBS)
  116. else
  117. AC_DEFINE(USE_OSS_MIDI, , [Use OSS MIDI not ALSA])
  118. fi
  119. dnl Check whether libsndfile is present or has been disabled
  120. sndfile_message=""
  121. AC_ARG_ENABLE(
  122. sndfile,
  123. [ --disable-sndfile Disable libsndfile for waveform loading],
  124. [use_sndfile="n" ; sndfile_message="manually disabled"],
  125. [use_sndfile="y"]
  126. )
  127. if test "$use_sndfile" = "y"; then
  128. AC_CHECK_HEADER(sndfile.h, [use_sndfile="y"], [use_sndfile="n" ; sndfile_message="No sndfile.h found"])
  129. fi
  130. if test "$use_sndfile" = "y"; then
  131. AC_CHECK_LIB(sndfile, sf_open, [use_sndfile="y"], [use_sndfile="n" ; sndfile_message="No libsndfile found"])
  132. fi
  133. if test "$use_sndfile" = "y"; then
  134. AC_DEFINE(USE_LIBSNDFILE, , [Enable libsndfile for waveform loading])
  135. SFLIBS="-lsndfile"
  136. AC_SUBST(SFLIBS)
  137. fi
  138. dnl Checks for library functions.
  139. AC_CHECK_HEADERS(math.h)
  140. AC_CHECK_LIB(m, sin)
  141. dnl AC_CHECK_HEADERS(X11/Xlib.h)
  142. dnl AC_CHECK_LIB(X11, XDisplayName)
  143. dnl AC_CHECK_LIB(Xext, main)
  144. AC_PATH_PROG(FLTK_CONFIG, fltk-config, no)
  145. if test "$FLTK_CONFIG" = "no"; then
  146. AC_PATH_XTRA
  147. LIBGL=""
  148. CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  149. AC_CHECK_HEADERS(GL/gl.h)
  150. if test $ac_cv_header_GL_gl_h = "yes" ; then
  151. AC_CHECK_LIB(GL, glBegin, LIBGL="-lGL")
  152. fi
  153. AC_CHECK_HEADERS(FL/Fl.h)
  154. if test $ac_cv_header_FL_Fl_h = "no" ; then
  155. echo "*** FLTK headers missing."
  156. exit 1
  157. fi
  158. AC_CHECK_LIB(fltk, main)
  159. FLTK_CXXFLAGS="$X_CFLAGS"
  160. FLTK_CFLAGS="$FLTK_CXXFLAGS"
  161. FLTK_LIBS="$X_LIBS -lfltk $LIBGL"
  162. else
  163. FLTK_CXXFLAGS=`$FLTK_CONFIG $fltk_config_args --cxxflags`
  164. FLTK_CFLAGS=`$FLTK_CONFIG $fltk_config_args --cxxflags`
  165. FLTK_LIBS=`$FLTK_CONFIG $fltk_config_args --ldflags`
  166. dnl This caused problems for debian users,
  167. dnl It would be nice to find a more robust way of doing it.
  168. dnl if test "${FLTK_LIBS/*-rpath*/yes}" != "yes"; then
  169. dnl echo "*** FLTK needs to be configured with --enable-shared"
  170. dnl exit 1
  171. dnl fi
  172. fi
  173. AC_SUBST(FLTK_CXXFLAGS)
  174. AC_SUBST(FLTK_CFLAGS)
  175. AC_SUBST(FLTK_LIBS)
  176. AC_CHECK_HEADERS(dlfcn.h)
  177. AC_CHECK_LIB(dl, dlopen)
  178. dnl Do we need png?????
  179. dnl AC_CHECK_HEADERS(png.h)
  180. dnl AC_CHECK_LIB(png, png_get_copyright)
  181. dnl This is normally done with libtool but since we aren't using libtool
  182. dnl yet to it here.
  183. dnl FIXME: forced to add -fPIC here..
  184. CFLAGS="$CFLAGS -fPIC"
  185. CXXFLAGS="$CFLAGS -fPIC"
  186. AC_SUBST(CFLAGS)
  187. AC_SUBST(CXXFLAGS)
  188. AC_SUBST(PLUGINLIST)
  189. dnl Modify the output files.
  190. AC_OUTPUT(
  191. SpiralSound/Plugins/AmpPlugin/Makefile
  192. SpiralSound/Plugins/AnotherFilterPlugin/Makefile
  193. SpiralSound/Plugins/BeatMatchPlugin/Makefile
  194. SpiralSound/Plugins/ControllerPlugin/Makefile
  195. SpiralSound/Plugins/CounterPlugin/Makefile
  196. SpiralSound/Plugins/DelayPlugin/Makefile
  197. SpiralSound/Plugins/DiskWriterPlugin/Makefile
  198. SpiralSound/Plugins/DistributorPlugin/Makefile
  199. SpiralSound/Plugins/EchoPlugin/Makefile
  200. SpiralSound/Plugins/EnvFollowerPlugin/Makefile
  201. SpiralSound/Plugins/EnvelopePlugin/Makefile
  202. SpiralSound/Plugins/FilterPlugin/Makefile
  203. SpiralSound/Plugins/FlipflopPlugin/Makefile
  204. SpiralSound/Plugins/FormantFilterPlugin/Makefile
  205. SpiralSound/Plugins/JackPlugin/Makefile
  206. SpiralSound/Plugins/KeyboardPlugin/Makefile
  207. SpiralSound/Plugins/LADSPAPlugin/Makefile
  208. SpiralSound/Plugins/LFOPlugin/Makefile
  209. SpiralSound/Plugins/LogicPlugin/Makefile
  210. SpiralSound/Plugins/MasherPlugin/Makefile
  211. SpiralSound/Plugins/MatrixPlugin/Makefile
  212. SpiralSound/Plugins/MeterPlugin/Makefile
  213. SpiralSound/Plugins/MidiPlugin/Makefile
  214. SpiralSound/Plugins/MixSwitchPlugin/Makefile
  215. SpiralSound/Plugins/MixerPlugin/Makefile
  216. SpiralSound/Plugins/MoogFilterPlugin/Makefile
  217. SpiralSound/Plugins/MousePlugin/Makefile
  218. SpiralSound/Plugins/NoisePlugin/Makefile
  219. SpiralSound/Plugins/NoteSnapPlugin/Makefile
  220. SpiralSound/Plugins/OperatorPlugin/Makefile
  221. SpiralSound/Plugins/OscillatorPlugin/Makefile
  222. SpiralSound/Plugins/OutputPlugin/Makefile
  223. SpiralSound/Plugins/PoshSamplerPlugin/Makefile
  224. SpiralSound/Plugins/RingModPlugin/Makefile
  225. SpiralSound/Plugins/SVFilterPlugin/Makefile
  226. SpiralSound/Plugins/SampleHoldPlugin/Makefile
  227. SpiralSound/Plugins/ScopePlugin/Makefile
  228. SpiralSound/Plugins/SeqSelectorPlugin/Makefile
  229. SpiralSound/Plugins/SmoothPlugin/Makefile
  230. SpiralSound/Plugins/SpiralLoopPlugin/Makefile
  231. SpiralSound/Plugins/SplitSwitchPlugin/Makefile
  232. SpiralSound/Plugins/SplitterPlugin/Makefile
  233. SpiralSound/Plugins/StereoMixerPlugin/Makefile
  234. SpiralSound/Plugins/StreamPlugin/Makefile
  235. SpiralSound/Plugins/SwitchPlugin/Makefile
  236. SpiralSound/Plugins/TranslatePlugin/Makefile
  237. SpiralSound/Plugins/TransposePlugin/Makefile
  238. SpiralSound/Plugins/TrigPlugin/Makefile
  239. SpiralSound/Plugins/WaveShaperPlugin/Makefile
  240. SpiralSound/Plugins/WaveTablePlugin/Makefile
  241. SpiralSound/Plugins/XFadePlugin/Makefile
  242. SpiralSynthPluginLocation.h
  243. Makefile
  244. )
  245. echo -e "\nConfig options:"
  246. echo -n "libsndfile support for wave loading - "
  247. if test "$use_sndfile" = "y"; then
  248. echo "Enabled"
  249. else
  250. echo "Disabled - $sndfile_message"
  251. fi
  252. echo -n " ALSA support for MidiPlugin - "
  253. if test "$use_alsa_midi" = "y"; then
  254. echo "Enabled"
  255. else
  256. echo "Disabled - $amidi_message - Using OSS instead"
  257. fi
  258. echo -n " Jack support (via JackPlugin) - "
  259. if test "$build_jack" = "y"; then
  260. echo "Enabled"
  261. else
  262. echo "Disabled - $jack_message"
  263. fi
  264. echo -n " LADSPA support (via LADSPAPlugin) - "
  265. if test "$build_ladspa" = "y"; then
  266. echo "Enabled"
  267. else
  268. echo "Disabled - $ladspa_message"
  269. fi
  270. echo -n " liblrdf support for LADSPAPlugin - "
  271. if test "$use_liblrdf" = "y"; then
  272. echo "Enabled"
  273. else
  274. echo "Disabled - $lrdf_message"
  275. fi
  276. echo ""