/[svn]/gigedit/trunk/configure.ac
ViewVC logotype

Diff of /gigedit/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1411 by schoenebeck, Fri Oct 12 17:46:29 2007 UTC revision 2344 by persson, Sun Apr 29 16:15:45 2012 UTC
# Line 6  AC_CONFIG_AUX_DIR([.]) Line 6  AC_CONFIG_AUX_DIR([.])
6  # The following is the current, official release version of gigedit:  # The following is the current, official release version of gigedit:
7    
8  GIGEDIT_VER_MAJOR=0  GIGEDIT_VER_MAJOR=0
9  GIGEDIT_VER_MINOR=0  GIGEDIT_VER_MINOR=2
10  GIGEDIT_VER_RELEASE=3  GIGEDIT_VER_RELEASE=0
11    
12  #------------------------------------------------------------------------------------  #------------------------------------------------------------------------------------
13  # The following is the libtool / shared library version. This doesn't have to  # The following is the libtool / shared library version. This doesn't have to
# Line 26  GIGEDIT_VER_RELEASE=3 Line 26  GIGEDIT_VER_RELEASE=3
26  #  6. If any interfaces have been removed since the last public release, then set age  #  6. If any interfaces have been removed since the last public release, then set age
27  #     to 0.  #     to 0.
28    
29  LIBGIGEDIT_LT_CURRENT=0  LIBGIGEDIT_LT_CURRENT=2
30  LIBGIGEDIT_LT_REVISION=0  LIBGIGEDIT_LT_REVISION=0
31  LIBGIGEDIT_LT_AGE=0  LIBGIGEDIT_LT_AGE=0
32    
33  SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE"  SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE"
34  AC_LANG_CPLUSPLUS  AC_LANG_CPLUSPLUS
35  AC_PROG_CXX  AC_PROG_CXX
36    AC_LIBTOOL_WIN32_DLL
37  AC_PROG_LIBTOOL  AC_PROG_LIBTOOL
38  AC_SUBST(SHLIB_VERSION_ARG)  AC_SUBST(SHLIB_VERSION_ARG)
39  AC_SUBST(SHARED_VERSION_INFO)  AC_SUBST(SHARED_VERSION_INFO)
# Line 58  AC_PROG_CXX Line 59  AC_PROG_CXX
59  IT_PROG_INTLTOOL(0.35.0)  IT_PROG_INTLTOOL(0.35.0)
60  AM_GLIB_GNU_GETTEXT  AM_GLIB_GNU_GETTEXT
61    
62  PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4.10 gthread-2.0)  case $host in
63  PKG_CHECK_MODULES(GIG, gig >= 3.1.1)      *mingw*|*cygwin*) windows=yes ;;
64        *)                windows=no ;;
65    esac
66    AM_CONDITIONAL(WINDOWS, test "$windows" = "yes")
67    
68    PKG_PROG_PKG_CONFIG
69    have_gtk3=no
70    PKG_CHECK_EXISTS(gtkmm-3.0 >= 2.99,
71            [PKG_CHECK_MODULES(GTKMM, gtkmm-3.0, have_gtk3=yes)],
72            [PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.8 gthread-2.0 cairomm-1.0)])
73    AM_CONDITIONAL(HAVE_GTK3, [test "$have_gtk3" = "yes"])
74    
75    PKG_CHECK_MODULES(GIG, gig >= 3.3.0)
76    
77  # check for presence of libsndfile  # check for presence of libsndfile
78  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)
# Line 67  AC_SUBST(SNDFILE_CFLAGS) Line 80  AC_SUBST(SNDFILE_CFLAGS)
80  AC_SUBST(SNDFILE_LIBS)  AC_SUBST(SNDFILE_LIBS)
81    
82  # check for loop functionality in libsndfile  # check for loop functionality in libsndfile
83  gigedit_save_CFLAGS=$CFLAGS  gigedit_save_CXXFLAGS=$CXXFLAGS
84  CFLAGS="$SNDFILE_CFLAGS $CFLAGS"  CXXFLAGS="$SNDFILE_CFLAGS $CXXFLAGS"
85  AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,  AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,
86                   [AC_MSG_WARN([Your version of libsndfile does not support                   [AC_MSG_WARN([Your version of libsndfile does not support
87      reading of loop information. Gigedit will not be able to      reading of loop information. Gigedit will not be able to
88      extract loop information from sample files.])],      extract loop information from sample files.])],
89                   [#include <sndfile.h>])                   [#include <sndfile.h>])
90  CFLAGS=$gigedit_save_CFLAGS  CXXFLAGS=$gigedit_save_CXXFLAGS
91    
92  # check for (optional) presence of liblinuxsampler  # check for (optional) presence of liblinuxsampler
93  liblinuxsampler_version="0.4.0.5cvs"  liblinuxsampler_version="0.5.0"
94  PKG_CHECK_MODULES(  PKG_CHECK_MODULES(
95      LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,      LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,
96      have_linuxsampler=1, have_linuxsampler=0      have_linuxsampler=1, have_linuxsampler=0
# Line 91  if test "$have_linuxsampler" = "0"; then Line 104  if test "$have_linuxsampler" = "0"; then
104  else  else
105      echo "Found linuxsampler $liblinuxsampler_version"      echo "Found linuxsampler $liblinuxsampler_version"
106      echo -n "Retrieving LinuxSampler's plugin dir... "      echo -n "Retrieving LinuxSampler's plugin dir... "
107      LINUXSAMPLER_PLUGIN_DIR=`pkg-config --variable plugindir linuxsampler`      LINUXSAMPLER_PLUGIN_DIR=`$PKG_CONFIG --variable plugindir linuxsampler`
108      if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then      if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then
109          have_linuxsampler=0          have_linuxsampler=0
110          echo "Error"          echo "Error"
# Line 102  else Line 115  else
115          # convert absolute LS plugin dir into relative dir          # convert absolute LS plugin dir into relative dir
116          # (see ch 27.10 of the automake manual,          # (see ch 27.10 of the automake manual,
117          #  "Installing to Hard-Coded Locations")          #  "Installing to Hard-Coded Locations")
118          LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib\//\${libdir}\//g'`          # this one is extended to work with digit postfixed lib directories
119          echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}"          # (e.g. "/usr/lib64/linuxsampler") as well
120            LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib[[0-9]]*\//\${libdir}\//g'`
121            if echo "${LINUXSAMPLER_PLUGIN_DIR}" | grep "\${libdir}" > /dev/null; then
122                echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}"
123            else
124                echo "*********************************************************"
125                echo "* ! WARNING ! : Could not resolve LinuxSampler's plugin"
126                echo "* directory as relative path. This is probably not an"
127                echo "* issue if you're just going to install gigedit by"
128                echo "* 'make install', but it IS a problem if you're"
129                echo "* installing to a certain destination directory and/or"
130                echo "* compile in sandbox (e.g. Debian package or Gentoo emerge)"
131                echo "*********************************************************"
132            fi
133      fi      fi
134  fi  fi
135  AC_SUBST(LINUXSAMPLER_CFLAGS)  AC_SUBST(LINUXSAMPLER_CFLAGS)
# Line 115  AC_DEFINE_UNQUOTED( Line 141  AC_DEFINE_UNQUOTED(
141      [Define to 1 if you have LinuxSampler installed.]      [Define to 1 if you have LinuxSampler installed.]
142  )  )
143    
144    have_ls_vmidi=0
145    if test $have_linuxsampler = "1"; then
146        AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices])
147        AC_LANG_SAVE
148        AC_LANG_CPLUSPLUS
149        LIBS="$LINUXSAMPLER_LIBS $LIBS"
150        CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS"
151        CXXFLAGS="$CXXFLAGS $CFLAGS"
152        AC_TRY_COMPILE([
153                #include <linuxsampler/drivers/midi/VirtualMidiDevice.h>
154                using namespace LinuxSampler;
155            ], [
156                bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0;
157                bool (VirtualMidiDevice::*ptr2)() = 0;
158                bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0;
159                uint8_t (VirtualMidiDevice::*ptr4)(uint8_t) = 0;
160                ptr1 = &VirtualMidiDevice::SendNoteOnToSampler;
161                ptr2 = &VirtualMidiDevice::NotesChanged;
162                ptr3 = &VirtualMidiDevice::NoteChanged;
163                ptr4 = &VirtualMidiDevice::NoteOffVelocity;
164            ], [
165                AC_MSG_RESULT(yes)
166                have_ls_vmidi=1
167            ], [
168                AC_MSG_RESULT(no)
169                echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
170                echo "! Support for the virtual MIDI keyboard in gigedit will"
171                echo "! be disabled. You'll see the keyboard in gigedit, but"
172                echo "! you won't be able to trigger notes with it nor see"
173                echo "! active notes caused by external MIDI sources of LS."
174                echo "! Update LinuxSampler and recompile gigedit if you want"
175                echo "! this feature."
176                echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
177            ]
178        )
179        AC_LANG_RESTORE
180    fi
181    AC_DEFINE_UNQUOTED(
182        HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi,
183        [Define to 1 if LinuxSampler supports virtual MIDI devices.]
184    )
185    
186  AC_CONFIG_HEADERS(config.h)  AC_CONFIG_HEADERS(config.h)
187  AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE")  AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE")
188    
# Line 130  AC_CONFIG_FILES([ Line 198  AC_CONFIG_FILES([
198          doc/quickstart/Makefile          doc/quickstart/Makefile
199          win32/libgigedit.dev          win32/libgigedit.dev
200          win32/gigedit.dev          win32/gigedit.dev
201            win32/gigedit.nsi
202          win32/Makefile          win32/Makefile
203            gigedit.spec
204  ])  ])
205  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.1411  
changed lines
  Added in v.2344

  ViewVC Help
Powered by ViewVC