/[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 2398 by persson, Sun Jan 13 09:14:29 2013 UTC
# Line 1  Line 1 
1  dnl Process this file with autoconf to produce a configure script.  dnl Process this file with autoconf to produce a configure script.
 AC_INIT(configure.ac)  
 AC_CONFIG_AUX_DIR([.])  
2    
3  #------------------------------------------------------------------------------------  #------------------------------------------------------------------------------------
4  # The following is the current, official release version of gigedit:  # The following is the current, official release version of gigedit:
5    
6  GIGEDIT_VER_MAJOR=0  m4_define(gigedit_ver_major, 0)
7  GIGEDIT_VER_MINOR=0  m4_define(gigedit_ver_minor, 2)
8  GIGEDIT_VER_RELEASE=3  m4_define(gigedit_ver_release, 0)
9    
10    AC_INIT([gigedit], [gigedit_ver_major.gigedit_ver_minor.gigedit_ver_release])
11    AC_CONFIG_SRCDIR([configure.ac])
12    AC_CONFIG_AUX_DIR([.])
13    
14  #------------------------------------------------------------------------------------  #------------------------------------------------------------------------------------
15  # 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 28  GIGEDIT_VER_RELEASE=3
28  #  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
29  #     to 0.  #     to 0.
30    
31  LIBGIGEDIT_LT_CURRENT=0  LIBGIGEDIT_LT_CURRENT=2
32  LIBGIGEDIT_LT_REVISION=0  LIBGIGEDIT_LT_REVISION=0
33  LIBGIGEDIT_LT_AGE=0  LIBGIGEDIT_LT_AGE=0
34    
35  SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE"  SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE"
36  AC_LANG_CPLUSPLUS  AC_LANG([C++])
37  AC_PROG_CXX  AC_PROG_CXX
38    AC_LIBTOOL_WIN32_DLL
39  AC_PROG_LIBTOOL  AC_PROG_LIBTOOL
40  AC_SUBST(SHLIB_VERSION_ARG)  AC_SUBST(SHLIB_VERSION_ARG)
41  AC_SUBST(SHARED_VERSION_INFO)  AC_SUBST(SHARED_VERSION_INFO)
42  AC_SUBST(GIGEDIT_VER_MAJOR)  AC_SUBST(GIGEDIT_VER_MAJOR, gigedit_ver_major)
43  AC_SUBST(GIGEDIT_VER_MINOR)  AC_SUBST(GIGEDIT_VER_MINOR, gigedit_ver_minor)
44  AC_SUBST(GIGEDIT_VER_RELEASE)  AC_SUBST(GIGEDIT_VER_RELEASE, gigedit_ver_release)
45    
46  # configure checks for the following file's existence to make sure that  # configure checks for the following file's existence to make sure that
47  # the directory that it is told contains the source code in fact does.  # the directory that it is told contains the source code in fact does.
# Line 58  AC_PROG_CXX Line 61  AC_PROG_CXX
61  IT_PROG_INTLTOOL(0.35.0)  IT_PROG_INTLTOOL(0.35.0)
62  AM_GLIB_GNU_GETTEXT  AM_GLIB_GNU_GETTEXT
63    
64  PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4.10 gthread-2.0)  case $host in
65  PKG_CHECK_MODULES(GIG, gig >= 3.1.1)      *mingw*|*cygwin*) windows=yes ;;
66        *)                windows=no ;;
67    esac
68    AM_CONDITIONAL(WINDOWS, test "$windows" = "yes")
69    
70    PKG_PROG_PKG_CONFIG
71    have_gtk3=no
72    PKG_CHECK_EXISTS(gtkmm-3.0 >= 2.99,
73            [PKG_CHECK_MODULES(GTKMM, gtkmm-3.0, have_gtk3=yes)],
74            [PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.8 gthread-2.0 cairomm-1.0)])
75    AM_CONDITIONAL(HAVE_GTK3, [test "$have_gtk3" = "yes"])
76    
77    PKG_CHECK_MODULES(SIGC, sigc++-2.0)
78    AC_SUBST(SIGC_CFLAGS)
79    AC_SUBST(SIGC_LIBS)
80    
81    PKG_CHECK_MODULES(GIG, gig >= 3.3.0)
82    AC_SUBST(GIG_CFLAGS)
83    AC_SUBST(GIG_LIBS)
84    
85  # check for presence of libsndfile  # check for presence of libsndfile
86  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.11)
87  AC_SUBST(SNDFILE_CFLAGS)  AC_SUBST(SNDFILE_CFLAGS)
88  AC_SUBST(SNDFILE_LIBS)  AC_SUBST(SNDFILE_LIBS)
89    
 # check for loop functionality in libsndfile  
 gigedit_save_CFLAGS=$CFLAGS  
 CFLAGS="$SNDFILE_CFLAGS $CFLAGS"  
 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 <sndfile.h>])  
 CFLAGS=$gigedit_save_CFLAGS  
   
90  # check for (optional) presence of liblinuxsampler  # check for (optional) presence of liblinuxsampler
91  liblinuxsampler_version="0.4.0.5cvs"  liblinuxsampler_version="0.5.0"
92  PKG_CHECK_MODULES(  PKG_CHECK_MODULES(
93      LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,      LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,
94      have_linuxsampler=1, have_linuxsampler=0      have_linuxsampler=1, have_linuxsampler=0
# Line 91  if test "$have_linuxsampler" = "0"; then Line 102  if test "$have_linuxsampler" = "0"; then
102  else  else
103      echo "Found linuxsampler $liblinuxsampler_version"      echo "Found linuxsampler $liblinuxsampler_version"
104      echo -n "Retrieving LinuxSampler's plugin dir... "      echo -n "Retrieving LinuxSampler's plugin dir... "
105      LINUXSAMPLER_PLUGIN_DIR=`pkg-config --variable plugindir linuxsampler`      LINUXSAMPLER_PLUGIN_DIR=`$PKG_CONFIG --variable plugindir linuxsampler`
106      if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then      if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then
107          have_linuxsampler=0          have_linuxsampler=0
108          echo "Error"          echo "Error"
# Line 102  else Line 113  else
113          # convert absolute LS plugin dir into relative dir          # convert absolute LS plugin dir into relative dir
114          # (see ch 27.10 of the automake manual,          # (see ch 27.10 of the automake manual,
115          #  "Installing to Hard-Coded Locations")          #  "Installing to Hard-Coded Locations")
116          LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib\//\${libdir}\//g'`          # this one is extended to work with digit postfixed lib directories
117          echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}"          # (e.g. "/usr/lib64/linuxsampler") as well
118            LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib[[0-9]]*\//\${libdir}\//g'`
119            if echo "${LINUXSAMPLER_PLUGIN_DIR}" | grep "\${libdir}" > /dev/null; then
120                echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}"
121            else
122                echo "*********************************************************"
123                echo "* ! WARNING ! : Could not resolve LinuxSampler's plugin"
124                echo "* directory as relative path. This is probably not an"
125                echo "* issue if you're just going to install gigedit by"
126                echo "* 'make install', but it IS a problem if you're"
127                echo "* installing to a certain destination directory and/or"
128                echo "* compile in sandbox (e.g. Debian package or Gentoo emerge)"
129                echo "*********************************************************"
130            fi
131      fi      fi
132  fi  fi
133  AC_SUBST(LINUXSAMPLER_CFLAGS)  AC_SUBST(LINUXSAMPLER_CFLAGS)
# Line 115  AC_DEFINE_UNQUOTED( Line 139  AC_DEFINE_UNQUOTED(
139      [Define to 1 if you have LinuxSampler installed.]      [Define to 1 if you have LinuxSampler installed.]
140  )  )
141    
142    have_ls_vmidi=0
143    if test $have_linuxsampler = "1"; then
144        AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices])
145        AC_LANG_PUSH([C++])
146        LIBS="$LINUXSAMPLER_LIBS $LIBS"
147        CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS"
148        CXXFLAGS="$CXXFLAGS $CFLAGS"
149        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
150                #include <linuxsampler/drivers/midi/VirtualMidiDevice.h>
151                using namespace LinuxSampler;
152            ]], [[
153                bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0;
154                bool (VirtualMidiDevice::*ptr2)() = 0;
155                bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0;
156                uint8_t (VirtualMidiDevice::*ptr4)(uint8_t) = 0;
157                ptr1 = &VirtualMidiDevice::SendNoteOnToSampler;
158                ptr2 = &VirtualMidiDevice::NotesChanged;
159                ptr3 = &VirtualMidiDevice::NoteChanged;
160                ptr4 = &VirtualMidiDevice::NoteOffVelocity;
161            ]])],[
162                AC_MSG_RESULT(yes)
163                have_ls_vmidi=1
164            ],[
165                AC_MSG_RESULT(no)
166                echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
167                echo "! Support for the virtual MIDI keyboard in gigedit will"
168                echo "! be disabled. You'll see the keyboard in gigedit, but"
169                echo "! you won't be able to trigger notes with it nor see"
170                echo "! active notes caused by external MIDI sources of LS."
171                echo "! Update LinuxSampler and recompile gigedit if you want"
172                echo "! this feature."
173                echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
174        ])
175        AC_LANG_POP([C++])
176    fi
177    AC_DEFINE_UNQUOTED(
178        HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi,
179        [Define to 1 if LinuxSampler supports virtual MIDI devices.]
180    )
181    
182  AC_CONFIG_HEADERS(config.h)  AC_CONFIG_HEADERS(config.h)
183  AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE")  AM_INIT_AUTOMAKE
184    
185  AC_CONFIG_FILES([  AC_CONFIG_FILES([
186          Makefile          Makefile
# Line 130  AC_CONFIG_FILES([ Line 194  AC_CONFIG_FILES([
194          doc/quickstart/Makefile          doc/quickstart/Makefile
195          win32/libgigedit.dev          win32/libgigedit.dev
196          win32/gigedit.dev          win32/gigedit.dev
197            win32/gigedit.nsi
198          win32/Makefile          win32/Makefile
199            gigedit.spec
200  ])  ])
201  AC_OUTPUT  AC_OUTPUT

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

  ViewVC Help
Powered by ViewVC