/[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 1322 by schoenebeck, Tue Sep 4 11:04:56 2007 UTC revision 2169 by persson, Sun Mar 6 07:51:04 2011 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.
2  AC_INIT(gigedit,0.0.3)  AC_INIT(configure.ac)
3    AC_CONFIG_AUX_DIR([.])
4    
5    #------------------------------------------------------------------------------------
6    # The following is the current, official release version of gigedit:
7    
8    GIGEDIT_VER_MAJOR=0
9    GIGEDIT_VER_MINOR=2
10    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 18  AC_INIT(gigedit,0.0.3) Line 26  AC_INIT(gigedit,0.0.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
35    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)
40    AC_SUBST(GIGEDIT_VER_MAJOR)
41    AC_SUBST(GIGEDIT_VER_MINOR)
42    AC_SUBST(GIGEDIT_VER_RELEASE)
43    
44  # configure checks for the following file's existence to make sure that  # configure checks for the following file's existence to make sure that
45  # 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 32  AC_SUBST(SHARED_VERSION_INFO) Line 47  AC_SUBST(SHARED_VERSION_INFO)
47  # `--srcdir'; this is a safety check.  # `--srcdir'; this is a safety check.
48  AC_CONFIG_SRCDIR(src/gigedit/main.cpp)  AC_CONFIG_SRCDIR(src/gigedit/main.cpp)
49    
 AC_CONFIG_HEADERS(config.h)  
 AM_INIT_AUTOMAKE  
   
50  GETTEXT_PACKAGE=gigedit  GETTEXT_PACKAGE=gigedit
51  AC_SUBST([GETTEXT_PACKAGE])  AC_SUBST([GETTEXT_PACKAGE])
52  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
53    
54    # the libgig header files need this
55    AC_C_BIGENDIAN
56    
57  AC_PROG_CXX  AC_PROG_CXX
58    
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.11 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    PKG_CHECK_EXISTS(gtkmm-3.0 >= 2.99,
70            [PKG_CHECK_MODULES(GTKMM, gtkmm-3.0)],
71            [PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.8 gthread-2.0 cairomm-1.0)])
72    
73    PKG_CHECK_MODULES(GIG, gig >= 3.3.0)
74    
75  # check for presence of libsndfile  # check for presence of libsndfile
76  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)
# Line 53  AC_SUBST(SNDFILE_CFLAGS) Line 78  AC_SUBST(SNDFILE_CFLAGS)
78  AC_SUBST(SNDFILE_LIBS)  AC_SUBST(SNDFILE_LIBS)
79    
80  # check for loop functionality in libsndfile  # check for loop functionality in libsndfile
81  gigedit_save_CFLAGS=$CFLAGS  gigedit_save_CXXFLAGS=$CXXFLAGS
82  CFLAGS="$SNDFILE_CFLAGS $CFLAGS"  CXXFLAGS="$SNDFILE_CFLAGS $CXXFLAGS"
83  AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,  AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,
84                   [AC_MSG_WARN([Your version of libsndfile does not support                   [AC_MSG_WARN([Your version of libsndfile does not support
85      reading of loop information. Gigedit will not be able to      reading of loop information. Gigedit will not be able to
86      extract loop information from sample files.])],      extract loop information from sample files.])],
87                   [#include <sndfile.h>])                   [#include <sndfile.h>])
88  CFLAGS=$gigedit_save_CFLAGS  CXXFLAGS=$gigedit_save_CXXFLAGS
89    
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 77  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 88  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 101  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_SAVE
146        AC_LANG_CPLUSPLUS
147        LIBS="$LINUXSAMPLER_LIBS $LIBS"
148        CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS"
149        CXXFLAGS="$CXXFLAGS $CFLAGS"
150        AC_TRY_COMPILE([
151                #include <linuxsampler/drivers/midi/VirtualMidiDevice.h>
152                using namespace LinuxSampler;
153            ], [
154                bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0;
155                bool (VirtualMidiDevice::*ptr2)() = 0;
156                bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0;
157                uint8_t (VirtualMidiDevice::*ptr4)(uint8_t) = 0;
158                ptr1 = &VirtualMidiDevice::SendNoteOnToSampler;
159                ptr2 = &VirtualMidiDevice::NotesChanged;
160                ptr3 = &VirtualMidiDevice::NoteChanged;
161                ptr4 = &VirtualMidiDevice::NoteOffVelocity;
162            ], [
163                AC_MSG_RESULT(yes)
164                have_ls_vmidi=1
165            ], [
166                AC_MSG_RESULT(no)
167                echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
168                echo "! Support for the virtual MIDI keyboard in gigedit will"
169                echo "! be disabled. You'll see the keyboard in gigedit, but"
170                echo "! you won't be able to trigger notes with it nor see"
171                echo "! active notes caused by external MIDI sources of LS."
172                echo "! Update LinuxSampler and recompile gigedit if you want"
173                echo "! this feature."
174                echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
175            ]
176        )
177        AC_LANG_RESTORE
178    fi
179    AC_DEFINE_UNQUOTED(
180        HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi,
181        [Define to 1 if LinuxSampler supports virtual MIDI devices.]
182    )
183    
184    AC_CONFIG_HEADERS(config.h)
185    AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE")
186    
187  AC_CONFIG_FILES([  AC_CONFIG_FILES([
188          Makefile          Makefile
189          src/Makefile          src/Makefile
190          src/gigedit/Makefile          src/gigedit/Makefile
191          src/plugin/Makefile          src/plugin/Makefile
192            gfx/Makefile
193          po/Makefile.in          po/Makefile.in
194          debian/Makefile          debian/Makefile
195          doc/Makefile          doc/Makefile
196          doc/quickstart/Makefile          doc/quickstart/Makefile
197            win32/libgigedit.dev
198            win32/gigedit.dev
199            win32/gigedit.nsi
200            win32/Makefile
201            gigedit.spec
202  ])  ])
203  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.1322  
changed lines
  Added in v.2169

  ViewVC Help
Powered by ViewVC