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.

305 lines
9.6KB

  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 (e.g. Jack)
  32. PLUGINLIST="AmpPlugin AnotherFilterPlugin BeatMatchPlugin ControllerPlugin \
  33. CounterPlugin DelayPlugin DiskWriterPlugin DistributorPlugin EchoPlugin \
  34. EnvFollowerPlugin EnvelopePlugin FilterPlugin FlipflopPlugin FormantFilterPlugin \
  35. KeyboardPlugin LADSPAPlugin LFOPlugin LogicPlugin MasherPlugin MatrixPlugin \
  36. MeterPlugin MidiPlugin MixSwitchPlugin MixerPlugin MoogFilterPlugin NoisePlugin \
  37. NoteSnapPlugin OperatorPlugin OscillatorPlugin OutputPlugin PoshSamplerPlugin \
  38. RingModPlugin SVFilterPlugin SampleHoldPlugin ScopePlugin SeqSelectorPlugin \
  39. SmoothPlugin SpiralLoopPlugin SplitSwitchPlugin SplitterPlugin StereoMixerPlugin \
  40. StreamPlugin SwitchPlugin 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="$PLUGINLIST JackPlugin"
  58. fi
  59. dnl build plugin list
  60. echo "$PLUGINLIST" > SpiralSound/PluginList.txt
  61. dnl Check whether alsa-midi is present or has been disabled
  62. amidi_message=""
  63. AC_ARG_ENABLE(
  64. alsa_midi,
  65. [ --disable-alsa-midi Disable alsa midi (use OSS)],
  66. [use_alsa_midi="n"; amidi_message="manually disabled"],
  67. [use_alsa_midi="y"]
  68. )
  69. if test "$use_alsa_midi" = "y"; then
  70. AC_CHECK_HEADER(alsa/asoundlib.h, [use_alsa_midi="y"], [use_alsa_midi="n" ; amidi_message="No alsa/asoundlib.h found"])
  71. fi
  72. if test "$use_alsa_midi" = "y"; then
  73. AC_CHECK_LIB(asound, snd_seq_open, [use_alsa_midi="y"], [use_alsa_midi="n" ; amidi_message="No libasound found"])
  74. fi
  75. if test "$use_alsa_midi" = "y"; then
  76. AC_DEFINE(USE_ALSA_MIDI, , [Use ALSA MIDI not OSS])
  77. AMIDILIBS="-lasound"
  78. AC_SUBST(AMIDILIBS)
  79. else
  80. AC_DEFINE(USE_OSS_MIDI, , [Use OSS MIDI not ALSA])
  81. fi
  82. dnl Check whether liblrdf is present or has been disabled
  83. lrdf_message=""
  84. AC_ARG_ENABLE(
  85. lrdf,
  86. [ --disable-lrdf Disable liblrdf for LADSPA Plugin],
  87. [use_liblrdf="n" ; lrdf_message="manually disabled"],
  88. [use_liblrdf="y"]
  89. )
  90. if test "$use_liblrdf" = "y"; then
  91. AC_CHECK_HEADER(lrdf.h, [use_liblrdf="y"], [use_liblrdf="n" ; lrdf_message="No lrdf.h found"])
  92. fi
  93. if test "$use_liblrdf" = "y"; then
  94. AC_CHECK_LIB(lrdf, lrdf_init, [use_liblrdf="y"], [use_liblrdf="n" ; lrdf_message="No liblrdf found"])
  95. fi
  96. if test "$use_liblrdf" = "y"; then
  97. AC_DEFINE(HAVE_LIBLRDF, , [Enable liblrdf support for LADSPA Plugin])
  98. LRDFLIBS="-llrdf"
  99. AC_SUBST(LRDFLIBS)
  100. fi
  101. dnl Check if POSIX SHM is present or has been disabled
  102. shm_message=""
  103. AC_ARG_ENABLE(
  104. posix-shm,
  105. [ --disable-posix-shm Disable POSIX SHM for LADSPA Plugin],
  106. [use_posix_shm="n" ; shm_message="manually disabled"],
  107. [use_posix_shm="y"]
  108. )
  109. if test "$use_posix_shm" = "y"; then
  110. AC_MSG_CHECKING([POSIX SHM support ])
  111. if test -d /dev/shm -a -w /dev/shm ; then
  112. AC_DEFINE(USE_POSIX_SHM, ,[Enable POSIX SHM support for LADSPA Plugin])
  113. AC_MSG_RESULT(found.)
  114. SHMLIBS="-lrt"
  115. AC_SUBST(SHMLIBS)
  116. else
  117. AC_MSG_RESULT(not found.)
  118. use_posix_shm="n"
  119. shm_message="/dev/shm not found";
  120. fi
  121. fi
  122. dnl Check whether libsndfile is present or has been disabled
  123. sndfile_message=""
  124. AC_ARG_ENABLE(
  125. sndfile,
  126. [ --disable-sndfile Disable libsndfile for waveform loading],
  127. [use_sndfile="n" ; sndfile_message="manually disabled"],
  128. [use_sndfile="y"]
  129. )
  130. if test "$use_sndfile" = "y"; then
  131. AC_CHECK_HEADER(sndfile.h, [use_sndfile="y"], [use_sndfile="n" ; sndfile_message="No sndfile.h found"])
  132. fi
  133. if test "$use_sndfile" = "y"; then
  134. AC_CHECK_LIB(sndfile, sf_open, [use_sndfile="y"], [use_sndfile="n" ; sndfile_message="No libXXXX found"])
  135. fi
  136. if test "$use_sndfile" = "y"; then
  137. AC_DEFINE(USE_LIBSNDFILE, , [Enable libsndfile for waveform loading])
  138. SFLIBS="-lsndfile"
  139. AC_SUBST(SFLIBS)
  140. fi
  141. dnl Checks for library functions.
  142. AC_CHECK_HEADERS(math.h)
  143. AC_CHECK_LIB(m, sin)
  144. dnl AC_CHECK_HEADERS(X11/Xlib.h)
  145. dnl AC_CHECK_LIB(X11, XDisplayName)
  146. dnl AC_CHECK_LIB(Xext, main)
  147. AC_PATH_PROG(FLTK_CONFIG, fltk-config, no)
  148. if test "$FLTK_CONFIG" = "no"; then
  149. AC_PATH_XTRA
  150. LIBGL=""
  151. CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  152. AC_CHECK_HEADERS(GL/gl.h)
  153. if test $ac_cv_header_GL_gl_h = "yes" ; then
  154. AC_CHECK_LIB(GL, glBegin, LIBGL="-lGL")
  155. fi
  156. AC_CHECK_HEADERS(FL/Fl.h)
  157. if test $ac_cv_header_FL_Fl_h = "no" ; then
  158. echo "*** FLTK headers missing."
  159. exit 1
  160. fi
  161. AC_CHECK_LIB(fltk, main)
  162. FLTK_CXXFLAGS="$X_CFLAGS"
  163. FLTK_CFLAGS="$FLTK_CXXFLAGS"
  164. FLTK_LIBS="$X_LIBS -lfltk $LIBGL"
  165. else
  166. FLTK_CXXFLAGS=`$FLTK_CONFIG $fltk_config_args --cxxflags`
  167. FLTK_CFLAGS=`$FLTK_CONFIG $fltk_config_args --cxxflags`
  168. FLTK_LIBS=`$FLTK_CONFIG $fltk_config_args --ldflags`
  169. dnl This caused problems for debian users,
  170. dnl It would be nice to find a more robust way of doing it.
  171. dnl if test "${FLTK_LIBS/*-rpath*/yes}" != "yes"; then
  172. dnl echo "*** FLTK needs to be configured with --enable-shared"
  173. dnl exit 1
  174. dnl fi
  175. fi
  176. AC_SUBST(FLTK_CXXFLAGS)
  177. AC_SUBST(FLTK_CFLAGS)
  178. AC_SUBST(FLTK_LIBS)
  179. AC_CHECK_HEADERS(dlfcn.h)
  180. AC_CHECK_LIB(dl, dlopen)
  181. dnl Do we need png?????
  182. dnl AC_CHECK_HEADERS(png.h)
  183. dnl AC_CHECK_LIB(png, png_get_copyright)
  184. dnl This is normally done with libtool but since we aren't using libtool
  185. dnl yet to it here.
  186. dnl FIXME: forced to add -fPIC here..
  187. CFLAGS="$CFLAGS -fPIC"
  188. CXXFLAGS="$CFLAGS -fPIC"
  189. AC_SUBST(CFLAGS)
  190. AC_SUBST(CXXFLAGS)
  191. AC_SUBST(PLUGINLIST)
  192. dnl Modify the output files.
  193. AC_OUTPUT(
  194. SpiralSound/Plugins/AmpPlugin/Makefile
  195. SpiralSound/Plugins/AnotherFilterPlugin/Makefile
  196. SpiralSound/Plugins/BeatMatchPlugin/Makefile
  197. SpiralSound/Plugins/ControllerPlugin/Makefile
  198. SpiralSound/Plugins/CounterPlugin/Makefile
  199. SpiralSound/Plugins/DelayPlugin/Makefile
  200. SpiralSound/Plugins/DiskWriterPlugin/Makefile
  201. SpiralSound/Plugins/DistributorPlugin/Makefile
  202. SpiralSound/Plugins/EchoPlugin/Makefile
  203. SpiralSound/Plugins/EnvFollowerPlugin/Makefile
  204. SpiralSound/Plugins/EnvelopePlugin/Makefile
  205. SpiralSound/Plugins/FilterPlugin/Makefile
  206. SpiralSound/Plugins/FlipflopPlugin/Makefile
  207. SpiralSound/Plugins/FormantFilterPlugin/Makefile
  208. SpiralSound/Plugins/JackPlugin/Makefile
  209. SpiralSound/Plugins/KeyboardPlugin/Makefile
  210. SpiralSound/Plugins/LADSPAPlugin/Makefile
  211. SpiralSound/Plugins/LFOPlugin/Makefile
  212. SpiralSound/Plugins/LogicPlugin/Makefile
  213. SpiralSound/Plugins/MasherPlugin/Makefile
  214. SpiralSound/Plugins/MatrixPlugin/Makefile
  215. SpiralSound/Plugins/MeterPlugin/Makefile
  216. SpiralSound/Plugins/MidiPlugin/Makefile
  217. SpiralSound/Plugins/MixSwitchPlugin/Makefile
  218. SpiralSound/Plugins/MixerPlugin/Makefile
  219. SpiralSound/Plugins/MoogFilterPlugin/Makefile
  220. SpiralSound/Plugins/NoisePlugin/Makefile
  221. SpiralSound/Plugins/NoteSnapPlugin/Makefile
  222. SpiralSound/Plugins/OperatorPlugin/Makefile
  223. SpiralSound/Plugins/OscillatorPlugin/Makefile
  224. SpiralSound/Plugins/OutputPlugin/Makefile
  225. SpiralSound/Plugins/PoshSamplerPlugin/Makefile
  226. SpiralSound/Plugins/RingModPlugin/Makefile
  227. SpiralSound/Plugins/SVFilterPlugin/Makefile
  228. SpiralSound/Plugins/SampleHoldPlugin/Makefile
  229. SpiralSound/Plugins/ScopePlugin/Makefile
  230. SpiralSound/Plugins/SeqSelectorPlugin/Makefile
  231. SpiralSound/Plugins/SmoothPlugin/Makefile
  232. SpiralSound/Plugins/SpiralLoopPlugin/Makefile
  233. SpiralSound/Plugins/SplitSwitchPlugin/Makefile
  234. SpiralSound/Plugins/SplitterPlugin/Makefile
  235. SpiralSound/Plugins/StereoMixerPlugin/Makefile
  236. SpiralSound/Plugins/StreamPlugin/Makefile
  237. SpiralSound/Plugins/SwitchPlugin/Makefile
  238. SpiralSound/Plugins/TransposePlugin/Makefile
  239. SpiralSound/Plugins/TrigPlugin/Makefile
  240. SpiralSound/Plugins/WaveShaperPlugin/Makefile
  241. SpiralSound/Plugins/WaveTablePlugin/Makefile
  242. SpiralSound/Plugins/XFadePlugin/Makefile
  243. SpiralSynthPluginLocation.h
  244. Makefile
  245. )
  246. echo -e "\nConfig options:"
  247. echo -n "libsndfile support for wave loading - "
  248. if test "$use_sndfile" = "y"; then
  249. echo "Enabled"
  250. else
  251. echo "Disabled - $sndfile_message"
  252. fi
  253. echo -n " ALSA support for MidiPlugin - "
  254. if test "$use_alsa_midi" = "y"; then
  255. echo "Enabled"
  256. else
  257. echo "Disabled - $amidi_message - Using OSS instead"
  258. fi
  259. echo -n " Jack support (via JackPlugin) - "
  260. if test "$build_jack" = "y"; then
  261. echo "Enabled"
  262. else
  263. echo "Disabled - $jack_message"
  264. fi
  265. echo -n " liblrdf support for LADSPAPlugin - "
  266. if test "$use_liblrdf" = "y"; then
  267. echo "Enabled"
  268. else
  269. echo "Disabled - $lrdf_message"
  270. fi
  271. echo -n " POSIX SHM support for LADSPAPlugin - "
  272. if test "$use_posix_shm" = "y"; then
  273. echo "Enabled"
  274. else
  275. echo "Disabled - $shm_message"
  276. fi
  277. echo ""