summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-02-09 23:23:37 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-02-09 23:23:37 +0100
commit3d54f7408e2a42c6ec1868fad051a4bf3728878b (patch)
treef75b421dddb2dd664df6b340b2b996128030e25a
parente667c861ce6c22a055c9afdf01d80247df18ae9b (diff)
parent70d8c855a51a76c857a20d59247e89251a7e2dd5 (diff)
Merge branch 'master' into lv2opt
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac677
-rw-r--r--drumgizmo/Makefile.am4
-rw-r--r--lv2/Makefile.am2
-rw-r--r--man/Makefile.am4
-rw-r--r--man/drumgizmo.147
6 files changed, 402 insertions, 336 deletions
diff --git a/Makefile.am b/Makefile.am
index 10ee6ad..c2579ee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = gnu
-SUBDIRS = plugingui tools include src vst lv2 drumgizmo
-DISTDIRS = plugingui tools include src vst lv2 drumgizmo
+SUBDIRS = plugingui tools include src vst lv2 drumgizmo man
+DISTDIRS = plugingui tools include src vst lv2 drumgizmo man
EXTRA_DIST = \
version.h \
diff --git a/configure.ac b/configure.ac
index c768727..070677c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,3 @@
-# Filename: configure.in
-
AC_INIT([drumgizmo], m4_esyscmd([cat version.h | cut -d'"' -f2 | xargs echo -n]))dnl"
AC_CONFIG_SRCDIR([src/drumgizmo.cc])
@@ -20,12 +18,15 @@ dnl ======================
PKG_PROG_PKG_CONFIG(0.23)
HUGIN_PARM="-DDISABLE_HUGIN"
-AC_ARG_WITH(debug, [ --with-debug Build with debug support])
-if test x$with_debug == xyes; then
- AC_MSG_WARN([*** Building with debug support!])
- CXXFLAGS="$CXXFLAGS -Wall -Werror -g"
- HUGIN_PARM=""
-fi
+AC_ARG_WITH([debug],
+ AS_HELP_STRING([--with-debug], [Build with debug support]))
+
+AS_IF([test "x$with_debug" == "xyes"],
+ [AC_MSG_WARN([*** Building with debug support!])
+ CXXFLAGS="$CXXFLAGS -Wall -Werror -g"
+ HUGIN_PARM=""]
+)
+
CXXFLAGS="$CXXFLAGS $HUGIN_PARM"
dnl ===========================
@@ -33,57 +34,45 @@ dnl Check for GUI backend
dnl ===========================
AC_CANONICAL_HOST
AC_ARG_ENABLE([gui],
-[ --enable-gui[=backend] Use specified gui backend. Can be win32, x11, pugl or auto [default=auto]],,
+ AS_HELP_STRING([--enable-gui[=backend]], [Use specified gui backend. Can be win32, x11, pugl or auto [default=auto]]),,
[enable_gui="auto"])
-if test "x$enable_gui" = "xyes"; then
- enable_gui="auto"
-fi
-
-if test "x$enable_gui" = "xauto"; then
- AC_MSG_RESULT([Auto setting gui based on host: $host_os])
- case $host_os in
- darwin* )
- enable_gui=""
- ;;
- linux*|*BSD*)
- enable_gui="x11"
- ;;
- mingw*|windows*|winnt|cygwin)
- enable_gui="win32"
- ;;
- *)
- AC_MSG_ERROR([Your platform is not currently supported])
- ;;
- esac
-fi
-
-if test "x$enable_gui" = "xx11"; then
- AC_MSG_RESULT([Setting gui backend to X11])
-
- dnl ======================
+AS_IF([test "x$enable_gui" = "xyes"], [enable_gui="auto"])
+
+AS_IF([test "x$enable_gui" = "xauto"],
+ [AC_MSG_RESULT([Auto setting gui based on host: $host_os])
+ AS_CASE([$host_os],
+ [darwin*], [enable_gui=""],
+ [linux*|*BSD*], [enable_gui="x11"],
+ [mingw*|windows*|winnt|cygwin], [enable_gui="win32"],
+
+ AC_MSG_ERROR([Your platform is not currently supported])
+ )]
+)
+
+AS_IF(
+ [test "x$enable_gui" = "xx11"],
+ [AC_MSG_RESULT([Setting gui backend to X11])
+ dnl ======================
dnl Check for Xlib
dnl ======================
PKG_CHECK_MODULES(X11, x11 >= 1.0)
GUI_CFLAGS="-DX11 $X11_CFLAGS"
- GUI_LIBS="$X11_LIBS"
-
-elif test "x$enable_gui" = "xwin32"; then
+ GUI_LIBS="$X11_LIBS"],
- AC_MSG_RESULT([Setting gui backend to Win32])
+ [test "x$enable_gui" = "xwin32"],
+ [AC_MSG_RESULT([Setting gui backend to Win32])
GUI_CFLAGS="-DWIN32"
- GUI_LIBS="-lgdi32 -lsetupapi -lws2_32"
-
-elif test "x$enable_gui" = "xpugl"; then
+ GUI_LIBS="-lgdi32 -lsetupapi -lws2_32"],
- AC_MSG_RESULT([Setting gui backend to Pugl])
+ [test "x$enable_gui" = "xpugl"],
+ [AC_MSG_RESULT([Setting gui backend to Pugl])
GUI_CFLAGS="-DPUGL -I../../pugl"
- GUI_LIBS="-lGLU -lGL -lglut"
+ GUI_LIBS="-lGLU -lGL -lglut"],
-else
AC_MSG_ERROR([*** No GUI backend has been selected ***])
-fi
+)
AC_SUBST(GUI_CFLAGS)
AC_SUBST(GUI_LIBS)
@@ -93,49 +82,58 @@ AM_CONDITIONAL([ENABLE_PUGL], [test "x$enable_gui" = "xpugl"])
dnl ======================
dnl Compile unit tests
dnl ======================
-AC_ARG_WITH(test, [ --with-test Build unit tests])
-if test x$with_test == xyes; then
- AC_MSG_WARN([*** Building unittests!])
- AM_PATH_CPPUNIT(1.9.6)
- AC_CONFIG_FILES(test/Makefile)
-fi
+AC_ARG_WITH([test],
+ AS_HELP_STRING([--with-test], [Build unit tests]))
+
+AS_IF([test x$with_test == xyes],
+ [AC_MSG_WARN([*** Building unittests!])
+ AM_PATH_CPPUNIT(1.9.6)
+ AC_CONFIG_FILES(test/Makefile)]
+)
dnl ======================
dnl Compile LV2 plugin
dnl ======================
AC_ARG_ENABLE([lv2],
-[ --enable-lv2 Compile the LV2 plugin [default=no]],,
+ AS_HELP_STRING([--enable-lv2], [Compile the LV2 plugin [default=no]]),,
[enable_lv2="no"])
-if test "x$enable_lv2" = "xyes"; then
- enable_lv2=yes
- dnl ======================
- dnl Check for lv2core
- dnl ======================
- PKG_CHECK_MODULES(LV2, lv2 >= 1.0)
-else
- AC_MSG_RESULT([*** LV2 plugin will not be compiled ***])
- enable_lv2=no
-fi
+
+AS_IF(
+ [test "x$enable_lv2" = "xyes"],
+ [enable_lv2=yes
+ dnl ======================
+ dnl Check for lv2core
+ dnl ======================
+ PKG_CHECK_MODULES(LV2, lv2 >= 1.0)],
+
+ [AC_MSG_RESULT([*** LV2 plugin will not be compiled ***])
+ enable_lv2=no]
+)
+
AM_CONDITIONAL([ENABLE_LV2], [test "x$enable_lv2" = "xyes"])
dnl ======================
dnl Compile VST plugin
dnl ======================
-AC_ARG_WITH(vst_sources, [ --with-vst-sources Point this to the vstsdk24 directory])
+AC_ARG_WITH([vst_sources],
+ AS_HELP_STRING([--with-vst-sources], [Point this to the vstsdk24 directory]))
AC_ARG_ENABLE([vst],
-[ --enable-vst Compile the VST plugin [default=no]],,
+ AS_HELP_STRING([--enable-vst], [Compile the VST plugin [default=no]]),,
[enable_vst="no"])
-if test "x$enable_vst" = "xyes"; then
- enable_vst=yes
- VST_CPPFLAGS="-I$with_vst_sources -D__int64='long long int'"
- VST_SOURCE_PATH="$with_vst_sources"
- AC_SUBST(VST_SOURCE_PATH)
- AC_SUBST(VST_CPPFLAGS)
- AC_CONFIG_FILES(vst/Makefile.mingw32)
-else
- AC_MSG_RESULT([*** VST plugin will not be compiled ***])
- enable_vst=no
-fi
+
+AS_IF(
+ [test "x$enable_vst" = "xyes"],
+ [enable_vst=yes
+ VST_CPPFLAGS="-I$with_vst_sources -D__int64='long long int'"
+ VST_SOURCE_PATH="$with_vst_sources"
+ AC_SUBST(VST_SOURCE_PATH)
+ AC_SUBST(VST_CPPFLAGS)
+ AC_CONFIG_FILES(vst/Makefile.mingw32)],
+
+ [AC_MSG_RESULT([*** VST plugin will not be compiled ***])
+ enable_vst=no]
+)
+
AM_CONDITIONAL([ENABLE_VST], [test "x$enable_vst" = "xyes"])
@@ -146,7 +144,7 @@ dnl ======================
#[ --enable-au Compile the audio units plugin [default=no]],,
# [enable_au="no"])
#if test "x$enable_au" = "xyes"; then
-# enable_au=yes
+# enable_au=yes
#else
# AC_MSG_RESULT([*** Audio Units plugin will not be compiled ***])
# enable_au=no
@@ -157,148 +155,160 @@ dnl ======================
dnl Compile cli client
dnl ======================
AC_ARG_ENABLE([cli],
-[ --enable-cli Compile the command line interface [default=yes]],,
+ AS_HELP_STRING([--enable-cli], [Compile the command line interface [default=yes]]),,
[enable_cli="yes"])
-if test "x$enable_cli" = "xyes"; then
- enable_cli=yes
- dnl ======================
- dnl Check for getopt
- dnl ======================
- AC_CHECK_HEADERS(getopt.h)
-
- dnl ***
- dnl *** Input plugins
- dnl ***
-
- dnl *** Dummy
- AC_ARG_ENABLE([input_dummy],
- [ --disable-input-dummy Disable input dummy plugin [default=enabled]],,
+AS_IF(
+ [test "x$enable_cli" = "xyes"],
+ [enable_cli=yes
+
+ dnl ======================
+ dnl Check for getopt
+ dnl ======================
+ AC_CHECK_HEADERS(getopt.h)
+
+ dnl ***
+ dnl *** Input plugins
+ dnl ***
+
+ dnl *** Dummy
+ AC_ARG_ENABLE([input_dummy],
+ AS_HELP_STRING([--disable-input-dummy], [Disable input dummy plugin [default=enabled]]),,
[enable_input_dummy="yes"])
- if test "x$enable_input_dummy" = "xyes"; then
- have_input_dummy=yes
- else
- AC_MSG_RESULT([*** input dummy plugin disabled per user request ***])
- have_input_dummy=no
- fi
+
+ AS_IF(
+ [test "x$enable_input_dummy" = "xyes"],
+ [have_input_dummy=yes],
+
+ [AC_MSG_RESULT([*** input dummy plugin disabled per user request ***])
+ have_input_dummy=no]
+ )
- dnl *** Test
- AC_ARG_ENABLE([input_test],
- [ --disable-input-test Disable input test plugin [default=enabled]],,
+ dnl *** Test
+ AC_ARG_ENABLE([input_test],
+ AS_HELP_STRING([--disable-input-test], [Disable input test plugin [default=enabled]]),,
[enable_input_test="yes"])
- if test "x$enable_input_test" = "xyes"; then
- have_input_test=yes
- else
- AC_MSG_RESULT([*** input test plugin disabled per user request ***])
- have_input_test=no
- fi
-
- dnl *** Jackmidi
- AC_ARG_ENABLE([input_jackmidi],
- [ --disable-input-jackmidi Disable input jackmidi plugin [default=enabled]],,
+
+ AS_IF(
+ [test "x$enable_input_test" = "xyes"],
+ [have_input_test=yes],
+
+ [AC_MSG_RESULT([*** input test plugin disabled per user request ***])
+ have_input_test=no]
+ )
+
+ dnl *** Jackmidi
+ AC_ARG_ENABLE([input_jackmidi],
+ AS_HELP_STRING([--disable-input-jackmidi], [Disable input jackmidi plugin [default=enabled]]),,
[enable_input_jackmidi="yes"])
- if test "x$enable_input_jackmidi" = "xyes"; then
- have_input_jackmidi=yes
- need_jack=yes
- else
- AC_MSG_RESULT([*** input jackmidi plugin disabled per user request ***])
- have_input_jackmidi=no
- fi
-
- dnl *** Midifile
- AC_ARG_ENABLE([input_midifile],
- [ --disable-input-midifile Disable input midifile plugin [default=enabled]],,
+
+ AS_IF(
+ [test "x$enable_input_jackmidi" = "xyes"],
+ [have_input_jackmidi=yes
+ need_jack=yes],
+
+ [AC_MSG_RESULT([*** input jackmidi plugin disabled per user request ***])
+ have_input_jackmidi=no]
+ )
+
+ dnl *** Midifile
+ AC_ARG_ENABLE([input_midifile],
+ AS_HELP_STRING([--disable-input-midifile], [Disable input midifile plugin [default=enabled]]),,
[enable_input_midifile="yes"])
- if test "x$enable_input_midifile" = "xyes"; then
- have_input_midifile=yes
- dnl ======================
- dnl Check for libsmf
- dnl ======================
- PKG_CHECK_MODULES(SMF, smf >= 1.2)
- else
- AC_MSG_RESULT([*** input midifile plugin disabled per user request ***])
- have_input_midifile=no
- fi
-
- INPUT_PLUGINS="midifile jackmidi dummy test"
- AC_SUBST(INPUT_PLUGINS)
-
-
- dnl ***
- dnl *** Output plugins
- dnl ***
-
- dnl *** dummy
- AC_ARG_ENABLE([output_dummy],
- [ --disable-output-dummy Disable output dummy plugin [default=enabled]],,
+
+ AS_IF(
+ [test "x$enable_input_midifile" = "xyes"],
+ [have_input_midifile=yes
+ dnl ======================
+ dnl Check for libsmf
+ dnl ======================
+ PKG_CHECK_MODULES(SMF, smf >= 1.2)],
+
+ [AC_MSG_RESULT([*** input midifile plugin disabled per user request ***])
+ have_input_midifile=no]
+ )
+
+ INPUT_PLUGINS="midifile jackmidi dummy test"
+ AC_SUBST(INPUT_PLUGINS)
+
+ dnl ***
+ dnl *** Output plugins
+ dnl ***
+
+ dnl *** dummy
+ AC_ARG_ENABLE([output_dummy],
+ AS_HELP_STRING([--disable-output-dummy], [Disable output dummy plugin [default=enabled]]),,
[enable_output_dummy="yes"])
- if test "x$enable_output_dummy" = "xyes"; then
- have_output_dummy=yes
- else
- AC_MSG_RESULT([*** output dummy plugin disabled per user request ***])
- have_output_dummy=no
- fi
-
- dnl *** Jackaudio
- AC_ARG_ENABLE([output_jackaudio],
- [ --disable-output-jackaudio Disable output jack plugin [default=enabled]],,
+
+ AS_IF(
+ [test "x$enable_output_dummy" = "xyes"],
+ [have_output_dummy=yes],
+
+ [AC_MSG_RESULT([*** output dummy plugin disabled per user request ***])
+ have_output_dummy=no]
+ )
+
+ dnl *** Jackaudio
+ AC_ARG_ENABLE([output_jackaudio],
+ AS_HELP_STRING([--disable-output-jackaudio], [Disable output jack plugin [default=enabled]]),,
[enable_output_jackaudio="yes"])
- if test "x$enable_output_jackaudio" = "xyes"; then
- have_output_jackaudio=yes
- need_jack=yes
- else
- AC_MSG_RESULT([*** output jack plugin disabled per user request ***])
- have_output_jackaudio=no
- fi
-
- dnl *** alsa
- AC_ARG_ENABLE([output_alsa],
- [ --disable-output-alsa Disable output alsa plugin [default=enabled]],,
+
+ AS_IF(
+ [test "x$enable_output_jackaudio" = "xyes"],
+ [have_output_jackaudio=yes
+ need_jack=yes],
+
+ [AC_MSG_RESULT([*** output jack plugin disabled per user request ***])
+ have_output_jackaudio=no]
+ )
+
+ dnl *** alsa
+ AC_ARG_ENABLE([output_alsa],
+ AS_HELP_STRING([--disable-output-alsa], [Disable output alsa plugin [default=enabled]]),,
[enable_output_alsa="yes"])
- if test "x$enable_output_alsa" = "xyes"; then
- have_output_alsa=yes
- dnl ======================
- dnl Check for alsa library
- dnl ======================
- PKG_CHECK_MODULES(ALSA, alsa >= 1.0.18)
- else
- AC_MSG_RESULT([*** output alsa plugin disabled per user request ***])
- have_output_alsa=no
- fi
-
- dnl *** wavfile
- AC_ARG_ENABLE([output_wavfile],
- [ --disable-output-wavfile Disable output wavfile plugin [default=enabled]],,
+
+ AS_IF(
+ [test "x$enable_output_alsa" = "xyes"],
+ [have_output_alsa=yes
+ dnl ======================
+ dnl Check for alsa library
+ dnl ======================
+ PKG_CHECK_MODULES(ALSA, alsa >= 1.0.18)],
+
+ [AC_MSG_RESULT([*** output alsa plugin disabled per user request ***])
+ have_output_alsa=no]
+ )
+
+ dnl *** wavfile
+ AC_ARG_ENABLE([output_wavfile],
+ AS_HELP_STRING([--disable-output-wavfile], [Disable output wavfile plugin [default=enabled]]),,
[enable_output_wavfile="yes"])
- if test "x$enable_output_wavfile" = "xyes"; then
- have_output_wavfile=yes
- else
- AC_MSG_RESULT([*** output wavfile plugin disabled per user request ***])
- have_output_wavfile=no
- fi
-
- OUTPUT_PLUGINS="dummy alsa wavfile jackaudio"
- AC_SUBST(OUTPUT_PLUGINS)
-
- dnl
- dnl Setup plugin paths
- dnl
- dgplugindir=${libdir}/drumgizmo
- AC_SUBST([dgplugindir])
-
- INPUT_PLUGIN_DIR=${dgplugindir}/input
- OUTPUT_PLUGIN_DIR=${dgplugindir}/output
- AC_SUBST([INPUT_PLUGIN_DIR])
- AC_SUBST([OUTPUT_PLUGIN_DIR])
-
- AC_DEFINE_UNQUOTED(INPUT_PLUGIN_DIR, "${prefix}/lib/drumgizmo/input",
- [Input plugin dir])
- AC_DEFINE_UNQUOTED(OUTPUT_PLUGIN_DIR, "${prefix}/lib/drumgizmo/output",
- [Output plugin dir])
-else
- AC_MSG_RESULT([*** Command line interface disabled per user request ***])
- enable_cli=no
-fi
+
+ AS_IF(
+ [test "x$enable_output_wavfile" = "xyes"],
+ [have_output_wavfile=yes],
+
+ [AC_MSG_RESULT([*** output wavfile plugin disabled per user request ***])
+ have_output_wavfile=no]
+ )
+
+ OUTPUT_PLUGINS="dummy alsa wavfile jackaudio"
+ AC_SUBST(OUTPUT_PLUGINS)
+
+ dnl
+ dnl Setup plugin paths
+ dnl
+ dgplugindir=${libdir}/drumgizmo
+ AC_SUBST([dgplugindir])
+ INPUT_PLUGIN_DIR=${dgplugindir}/input
+ OUTPUT_PLUGIN_DIR=${dgplugindir}/output
+ AC_SUBST([INPUT_PLUGIN_DIR])
+ AC_SUBST([OUTPUT_PLUGIN_DIR])],
+
+ [AC_MSG_RESULT([*** Command line interface disabled per user request ***])
+ enable_cli=no]
+)
+
AM_CONDITIONAL([ENABLE_CLI], [test "x$enable_cli" == "xyes"])
AM_CONDITIONAL([HAVE_INPUT_DUMMY], [test "x$have_input_dummy" = "xyes"])
AM_CONDITIONAL([HAVE_INPUT_TEST], [test "x$have_input_test" = "xyes"])
@@ -317,81 +327,82 @@ PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.20)
AC_ARG_ENABLE([resampler],
-[ --enable-resampler[=lib] Enable resampler using either 'zita' or 'src' (libsamplerate). Use 'auto' for autodetect [default=auto]],,
+ AS_HELP_STRING([--enable-resampler[=lib]], [Enable resampler using either 'zita' or 'src' (libsamplerate). Use 'auto' for autodetect [default=auto]]),,
[enable_resampler="auto"])
-if test "x$enable_resampler" = "xyes"; then
- enable_resampler="auto"
-fi
+
+AS_IF([test "x$enable_resampler" = "xyes"], [enable_resampler="auto"])
has_src=no
has_zita=no
-if test x$enable_resampler != xno; then
- AC_MSG_WARN([*** Building resample support!])
- AC_DEFINE(WITH_RESAMPLER, [], [Use resample])
-
- if test x$enable_resampler == xauto || test x$enable_resampler == xsrc; then
- dnl ======================
- dnl Check for libsamplerate
- dnl ======================
- PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.1.7, has_src=yes, has_src=no)
- fi
-
- if test x$enable_resampler == xauto || test x$enable_resampler == xzita; then
- dnl ======================
- dnl Check for the zitaresampler library
- dnl ======================
- AC_LANG_PUSH([C++])
- tmp_CXXFLAGS="$CXXFLAGS"
- tmp_CPPFLAGS="$CPPFLAGS"
- tmp_CFLAGS="$CFLAGS"
- tmp_LDFLAGS="$LDFLAGS"
- tmp_LIBS="$LIBS"
- CXXFLAGS=""
- CPPFLAGS="$ZITA_CPPFLAGS"
- CFLAGS=""
- LDFLAGS="$ZITA_LDFLAGS"
- LIBS="-lzita-resampler -lpthread"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <zita-resampler/resampler.h>],
- [Resampler r] ) ], has_zita=yes, has_zita=no)
- ZITA_CPPFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
- ZITA_LIBS="$LDFLAGS $LIBS"
- CXXFLAGS="$tmp_CXXFLAGS"
- CPPFLAGS="$tmp_CPPFLAGS"
- CFLAGS="$tmp_CFLAGS"
- LDFLAGS="$tmp_LDFLAGS"
- LIBS="$tmp_LIBS"
- AC_SUBST(ZITA_CPPFLAGS)
- AC_SUBST(ZITA_LIBS)
- AC_LANG_POP([C++])
- fi
-fi
-
-if test x$enable_resampler == xauto; then
- if test x$has_zita == xyes; then
- enable_resampler=zita
- elif test x$has_src == xyes; then
- enable_resampler=src
- else
- AC_MSG_ERROR([*** No resampler library present. Either libsamplerate or zita-resampler must be installed.])
- fi
-fi
-
-if test x$enable_resampler == xzita; then
- if test x$has_zita == xyes; then
- AC_DEFINE(USE_ZITA, [], [zita-resampler is present])
- else
- AC_MSG_ERROR([*** zita-resampler library or headers not found. Set ZITA_LDFLAGS or ZITA_CPPFLAGS to add searchpath.])
- fi
-fi
-
-if test x$enable_resampler == xsrc; then
- if test x$has_src == xyes; then
- AC_DEFINE(USE_SRC, [], [libsamplerate is present])
- else
- AC_MSG_ERROR([*** Missing libsamplerate.])
- fi
-fi
+
+AS_IF([test x$enable_resampler != xno],
+ [AC_MSG_WARN([*** Building resample support!])
+ AC_DEFINE(WITH_RESAMPLER, [], [Use resample])
+
+ AS_IF([test x$enable_resampler == xauto || test x$enable_resampler == xsrc],
+ [dnl ======================
+ dnl Check for libsamplerate
+ dnl ======================
+ PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.1.7, has_src=yes, has_src=no)]
+ )
+
+ AS_IF([test x$enable_resampler == xauto || test x$enable_resampler == xzita],
+ [dnl ======================
+ dnl Check for the zitaresampler library
+ dnl ======================
+ AC_LANG_PUSH([C++])
+ tmp_CXXFLAGS="$CXXFLAGS"
+ tmp_CPPFLAGS="$CPPFLAGS"
+ tmp_CFLAGS="$CFLAGS"
+ tmp_LDFLAGS="$LDFLAGS"
+ tmp_LIBS="$LIBS"
+ CXXFLAGS=""
+ CPPFLAGS="$ZITA_CPPFLAGS"
+ CFLAGS=""
+ LDFLAGS="$ZITA_LDFLAGS"
+ LIBS="-lzita-resampler -lpthread"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([#include <zita-resampler/resampler.h>],
+ [Resampler r] ) ], has_zita=yes, has_zita=no)
+ ZITA_CPPFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
+ ZITA_LIBS="$LDFLAGS $LIBS"
+ CXXFLAGS="$tmp_CXXFLAGS"
+ CPPFLAGS="$tmp_CPPFLAGS"
+ CFLAGS="$tmp_CFLAGS"
+ LDFLAGS="$tmp_LDFLAGS"
+ LIBS="$tmp_LIBS"
+ AC_SUBST(ZITA_CPPFLAGS)
+ AC_SUBST(ZITA_LIBS)
+ AC_LANG_POP([C++])]
+ )]
+)
+
+AS_IF([test x$enable_resampler == xauto],
+ [AS_IF([test x$has_zita == xyes],
+ [enable_resampler=zita],
+
+ [test x$has_src == xyes],
+ [enable_resampler=src],
+
+ [AC_MSG_ERROR([*** No resampler library present. Either libsamplerate or zita-resampler must be installed.])]
+ )]
+)
+
+AS_IF([test x$enable_resampler == xzita],
+ [AS_IF([test x$has_zita == xyes],
+ [AC_DEFINE(USE_ZITA, [], [zita-resampler is present])],
+
+ [AC_MSG_ERROR([*** zita-resampler library or headers not found. Set ZITA_LDFLAGS or ZITA_CPPFLAGS to add searchpath.])]
+ )]
+)
+
+AS_IF([test x$enable_resampler == xsrc],
+ [AS_IF([test x$has_src == xyes],
+ [AC_DEFINE(USE_SRC, [], [libsamplerate is present])],
+
+ [AC_MSG_ERROR([*** Missing libsamplerate.])]
+ )]
+)
#dnl ======================
#dnl Check for zlib
@@ -452,61 +463,62 @@ dnl ===========================
dnl Check for SSE instructions
dnl ===========================
AC_ARG_ENABLE([sse],
-[ --enable-sse[=level] Enable SSE Level 1, 2, 3 or auto [default=auto]],,
+ AS_HELP_STRING([--enable-sse[=level]], [Enable SSE Level 1, 2, 3 or auto [default=auto]]),,
[enable_sse="auto"])
-if test "x$enable_sse" = "xyes"; then
- enable_sse="auto"
-fi
+
+AS_IF([test "x$enable_sse" = "xyes"], [enable_sse="auto"])
+
#AC_MSG_RESULT([SSE: $enable_sse])
-if test "x$enable_sse" = "x3"; then
- AC_MSG_RESULT([Setting sse level 3])
- SSEFLAGS="-DSSE -msse -msse2 -mss3"
-elif test "x$enable_sse" = "x2"; then
- AC_MSG_RESULT([Setting sse level 2])
- SSEFLAGS="-DSSE -msse -msse2"
-elif test "x$enable_sse" = "x1"; then
- AC_MSG_RESULT([Setting sse level 1])
- SSEFLAGS="-DSSE -msse"
-elif test "x$enable_sse" = "xauto"; then
- AC_MSG_RESULT([Auto setting sse level])
- AC_MSG_CHECKING([for sse3 instructions])
- if grep -q "sse3" /proc/cpuinfo
- then
- AC_MSG_RESULT([yes])
- SSEFLAGS="-msse3"
- AC_SUBST(SSEFLAGS)
- else
- AC_MSG_RESULT([no])
- fi
- AC_MSG_CHECKING([for sse2 instructions])
- if grep -q "sse2" /proc/cpuinfo
- then
- AC_MSG_RESULT([yes])
- SSEFLAGS="$SSEFLAGS -msse2"
- AC_SUBST(SSEFLAGS)
- else
- AC_MSG_RESULT([no])
- fi
- AC_MSG_CHECKING([for sse instructions])
- if grep -q "sse" /proc/cpuinfo
- then
- AC_MSG_RESULT([yes])
- SSEFLAGS="$SSEFLAGS -DSSE -msse"
- AC_SUBST(SSEFLAGS)
- else
- AC_MSG_RESULT([no])
- fi
-else
- AC_MSG_RESULT([*** Disabling SSE ***])
-fi
-
-if test "x$need_jack" = "xyes"
-then
- dnl ======================
- dnl Check for jack
- dnl ======================
- PKG_CHECK_MODULES(JACK, jack >= 0.120.1)
-fi
+
+AS_IF([test "x$enable_sse" = "x3"],
+ [AC_MSG_RESULT([Setting sse level 3])
+ SSEFLAGS="-DSSE -msse -msse2 -mss3"],
+
+ [test "x$enable_sse" = "x2"],
+ [AC_MSG_RESULT([Setting sse level 2])
+ SSEFLAGS="-DSSE -msse -msse2"],
+
+ [test "x$enable_sse" = "x1"],
+ [AC_MSG_RESULT([Setting sse level 1])
+ SSEFLAGS="-DSSE -msse"],
+
+ [test "x$enable_sse" = "xauto"],
+ [AC_MSG_RESULT([Auto setting sse level])
+
+ AC_MSG_CHECKING([for sse3 instructions])
+ AS_IF([grep -q "sse3" /proc/cpuinfo],
+ [AC_MSG_RESULT([yes])
+ SSEFLAGS="-msse3"
+ AC_SUBST(SSEFLAGS)],
+
+ [AC_MSG_RESULT([no])]
+ )
+
+ AC_MSG_CHECKING([for sse2 instructions])
+ AS_IF([grep -q "sse2" /proc/cpuinfo],
+ [AC_MSG_RESULT([yes])
+ SSEFLAGS="$SSEFLAGS -msse2"
+ AC_SUBST(SSEFLAGS)],
+
+ [AC_MSG_RESULT([no])]
+ )
+
+ AC_MSG_CHECKING([for sse instructions])
+ AS_IF([grep -q "sse" /proc/cpuinfo],
+ [AC_MSG_RESULT([yes])
+ SSEFLAGS="$SSEFLAGS -DSSE -msse"
+ AC_SUBST(SSEFLAGS)],
+
+ [AC_MSG_RESULT([no])]
+ )],
+
+ [AC_MSG_RESULT([*** Disabling SSE ***])]
+)
+
+dnl ======================
+dnl Check for jack
+dnl ======================
+AS_IF([test "x$need_jack" = "xyes"], [PKG_CHECK_MODULES(JACK, jack >= 0.120.1)])
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
@@ -525,6 +537,7 @@ AC_CONFIG_FILES(
lv2/Makefile
plugingui/Makefile
include/Makefile
+ man/Makefile
drumgizmo/Makefile
drumgizmo/input/Makefile
drumgizmo/input/dummy/Makefile
diff --git a/drumgizmo/Makefile.am b/drumgizmo/Makefile.am
index aaef1ee..b01b41f 100644
--- a/drumgizmo/Makefile.am
+++ b/drumgizmo/Makefile.am
@@ -12,7 +12,9 @@ drumgizmo_LDADD = $(DRUMGIZMO_LIBS) $(PTHREAD_LIBS) -ldl $(JACK_LIBS)
drumgizmo_CXXFLAGS = $(SNDFILE_CXXFLAGS) $(PTHREAD_CFLAGS) $(EXPAT_CFLAGS) \
-I$(top_srcdir)/include -I$(top_srcdir)/src \
- -I$(top_srcdir)/hugin -DWITH_HUG_MUTEX $(JACK_CFLAGS) $(SSEFLAGS)
+ -I$(top_srcdir)/hugin -DWITH_HUG_MUTEX $(JACK_CFLAGS) $(SSEFLAGS) \
+ -DINPUT_PLUGIN_DIR=\"${INPUT_PLUGIN_DIR}\" \
+ -DOUTPUT_PLUGIN_DIR=\"${OUTPUT_PLUGIN_DIR}\"
drumgizmo_SOURCES = \
audioinputenginedl.cc \
diff --git a/lv2/Makefile.am b/lv2/Makefile.am
index 10f079e..09ef24c 100644
--- a/lv2/Makefile.am
+++ b/lv2/Makefile.am
@@ -1,7 +1,7 @@
include $(top_srcdir)/plugingui/Makefile.am.plugingui
include $(top_srcdir)/src/Makefile.am.drumgizmo
-plugindir = $(prefix)/lib/lv2/drumgizmo.lv2
+plugindir = $(libdir)/lv2/drumgizmo.lv2
if ENABLE_LV2
plugin_LTLIBRARIES = drumgizmo.la
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..20d5b7c
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,4 @@
+man_MANS = drumgizmo.1
+
+EXTRA_DIST = $(man_MANS)
+
diff --git a/man/drumgizmo.1 b/man/drumgizmo.1
new file mode 100644
index 0000000..36968fd
--- /dev/null
+++ b/man/drumgizmo.1
@@ -0,0 +1,47 @@
+.TH "DRUMGIZMO" "1" "4 February 2015" "drumgizmo 0.9.7" ""
+
+.SH NAME
+drumgizmo \- drum application
+
+.SH SYNOPSIS
+\fBdrumgizmo\fR [OPTIONS] \fIdrumkitfile
+
+.SH "DESCRIPTION"
+.PP
+\fBDrumGizmo\fR is an open source cross-platform drum plugin and stand-alone application. It is comparable to several commercial drum plugin products.
+.PP
+DrumGizmo uses an open drumkit file format, allowing the community to create their own drumkits. It has multichannel output, making it possible to mix it just the way you would a real drumkit. The optional built-in humanizer analyzes the midi notes, adjusting velocities on-the-fly. This client can be a stand-alone midi renderer, generating .wav files, 1 for each channel. Or use DrumGizmo as a software sampler for an electronic drumkit. There are also plugin versions available.
+
+.SH "OPTIONS"
+.TP
+\fB-p, --preload
+Load entire kit audio files into memory (uses ALOT of memory).
+.TP
+\fB-i, --inputengine \fR{dummy|test|jackmidi|midifile}
+Use said event input engine.
+.TP
+\fB-I, --inputparms parmlist
+Set input engine parameters.
+.TP
+\fB-o, --outputengine \fR{dummy|alsa|jack|sndfile}
+Use said audio output engine.
+.TP
+\fB-O, --outputparms parmlist
+Set output engine parameters.
+.TP
+\fB-e, --endpos
+Number of samples to process, -1: infinite.
+.TP
+\fB-v, --version
+Print drumgizmo version and exit.
+.TP
+\fB-h, --help
+Print command line help and exit.
+.TP
+\fB\fIdrumkitfile
+Load the drumkitfile.
+.SH "BUGS"
+Report bugs to http://www.drumgizmo.org/wiki/doku.php?id=bugs.
+
+.SH "ADDITIONAL INFORMATION"
+For further information, visit the website http://www.drumgizmo.org/.