--- gigedit/trunk/configure.ac 2007/10/12 17:46:29 1411 +++ gigedit/trunk/configure.ac 2009/01/10 11:47:00 1824 @@ -6,8 +6,8 @@ # The following is the current, official release version of gigedit: GIGEDIT_VER_MAJOR=0 -GIGEDIT_VER_MINOR=0 -GIGEDIT_VER_RELEASE=3 +GIGEDIT_VER_MINOR=1 +GIGEDIT_VER_RELEASE=1 #------------------------------------------------------------------------------------ # The following is the libtool / shared library version. This doesn't have to @@ -26,13 +26,14 @@ # 6. If any interfaces have been removed since the last public release, then set age # to 0. -LIBGIGEDIT_LT_CURRENT=0 +LIBGIGEDIT_LT_CURRENT=1 LIBGIGEDIT_LT_REVISION=0 LIBGIGEDIT_LT_AGE=0 SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE" AC_LANG_CPLUSPLUS AC_PROG_CXX +AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_SUBST(SHLIB_VERSION_ARG) AC_SUBST(SHARED_VERSION_INFO) @@ -58,8 +59,14 @@ IT_PROG_INTLTOOL(0.35.0) AM_GLIB_GNU_GETTEXT +case $host in + *mingw*|*cygwin*) windows=yes ;; + *) windows=no ;; +esac +AM_CONDITIONAL(WINDOWS, test "$windows" = "yes") + PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4.10 gthread-2.0) -PKG_CHECK_MODULES(GIG, gig >= 3.1.1) +PKG_CHECK_MODULES(GIG, gig >= 3.2.0) # check for presence of libsndfile PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2) @@ -67,17 +74,17 @@ AC_SUBST(SNDFILE_LIBS) # check for loop functionality in libsndfile -gigedit_save_CFLAGS=$CFLAGS -CFLAGS="$SNDFILE_CFLAGS $CFLAGS" +gigedit_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="$SNDFILE_CFLAGS $CXXFLAGS" AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],, [AC_MSG_WARN([Your version of libsndfile does not support reading of loop information. Gigedit will not be able to extract loop information from sample files.])], [#include ]) -CFLAGS=$gigedit_save_CFLAGS +CXXFLAGS=$gigedit_save_CXXFLAGS # check for (optional) presence of liblinuxsampler -liblinuxsampler_version="0.4.0.5cvs" +liblinuxsampler_version="0.5.0" PKG_CHECK_MODULES( LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version, have_linuxsampler=1, have_linuxsampler=0 @@ -102,8 +109,21 @@ # convert absolute LS plugin dir into relative dir # (see ch 27.10 of the automake manual, # "Installing to Hard-Coded Locations") - LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib\//\${libdir}\//g'` - echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}" + # this one is extended to work with digit postfixed lib directories + # (e.g. "/usr/lib64/linuxsampler") as well + LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib[[0-9]]*\//\${libdir}\//g'` + if echo "${LINUXSAMPLER_PLUGIN_DIR}" | grep "\${libdir}" > /dev/null; then + echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}" + else + echo "*********************************************************" + echo "* ! WARNING ! : Could not resolve LinuxSampler's plugin" + echo "* directory as relative path. This is probably not an" + echo "* issue if you're just going to install gigedit by" + echo "* 'make install', but it IS a problem if you're" + echo "* installing to a certain destination directory and/or" + echo "* compile in sandbox (e.g. Debian package or Gentoo emerge)" + echo "*********************************************************" + fi fi fi AC_SUBST(LINUXSAMPLER_CFLAGS) @@ -115,6 +135,48 @@ [Define to 1 if you have LinuxSampler installed.] ) +have_ls_vmidi=0 +if test $have_linuxsampler = "1"; then + AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + LIBS="$LINUXSAMPLER_LIBS $LIBS" + CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS" + CXXFLAGS="$CXXFLAGS $CFLAGS" + AC_TRY_COMPILE([ + #include + using namespace LinuxSampler; + ], [ + bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0; + bool (VirtualMidiDevice::*ptr2)() = 0; + bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0; + uint8_t (VirtualMidiDevice::*ptr4)(uint8_t) = 0; + ptr1 = &VirtualMidiDevice::SendNoteOnToSampler; + ptr2 = &VirtualMidiDevice::NotesChanged; + ptr3 = &VirtualMidiDevice::NoteChanged; + ptr4 = &VirtualMidiDevice::NoteOffVelocity; + ], [ + AC_MSG_RESULT(yes) + have_ls_vmidi=1 + ], [ + AC_MSG_RESULT(no) + echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + echo "! Support for the virtual MIDI keyboard in gigedit will" + echo "! be disabled. You'll see the keyboard in gigedit, but" + echo "! you won't be able to trigger notes with it nor see" + echo "! active notes caused by external MIDI sources of LS." + echo "! Update LinuxSampler and recompile gigedit if you want" + echo "! this feature." + echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + ] + ) + AC_LANG_RESTORE +fi +AC_DEFINE_UNQUOTED( + HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi, + [Define to 1 if LinuxSampler supports virtual MIDI devices.] +) + AC_CONFIG_HEADERS(config.h) AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE") @@ -130,6 +192,8 @@ doc/quickstart/Makefile win32/libgigedit.dev win32/gigedit.dev + win32/gigedit.nsi win32/Makefile + gigedit.spec ]) AC_OUTPUT