/[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 1230 by schoenebeck, Sun Jun 10 11:58:01 2007 UTC revision 1793 by persson, Sun Nov 16 19:23:57 2008 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=1
10    GIGEDIT_VER_RELEASE=1
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=1
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_PROG_LIBTOOL  AC_PROG_LIBTOOL
37  AC_SUBST(SHLIB_VERSION_ARG)  AC_SUBST(SHLIB_VERSION_ARG)
38  AC_SUBST(SHARED_VERSION_INFO)  AC_SUBST(SHARED_VERSION_INFO)
39    AC_SUBST(GIGEDIT_VER_MAJOR)
40    AC_SUBST(GIGEDIT_VER_MINOR)
41    AC_SUBST(GIGEDIT_VER_RELEASE)
42    
43  # configure checks for the following file's existence to make sure that  # configure checks for the following file's existence to make sure that
44  # 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 46  AC_SUBST(SHARED_VERSION_INFO)
46  # `--srcdir'; this is a safety check.  # `--srcdir'; this is a safety check.
47  AC_CONFIG_SRCDIR(src/gigedit/main.cpp)  AC_CONFIG_SRCDIR(src/gigedit/main.cpp)
48    
 AC_CONFIG_HEADERS(config.h)  
 AM_INIT_AUTOMAKE  
   
49  GETTEXT_PACKAGE=gigedit  GETTEXT_PACKAGE=gigedit
50  AC_SUBST([GETTEXT_PACKAGE])  AC_SUBST([GETTEXT_PACKAGE])
51  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
52    
53    # the libgig header files need this
54    AC_C_BIGENDIAN
55    
56  AC_PROG_CXX  AC_PROG_CXX
57    
58  IT_PROG_INTLTOOL(0.35.0)  IT_PROG_INTLTOOL(0.35.0)
59  AM_GLIB_GNU_GETTEXT  AM_GLIB_GNU_GETTEXT
60    
61  PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.6.1 gthread-2.0)  PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4.10 gthread-2.0)
62  PKG_CHECK_MODULES(GIG, gig >= 3.1.1)  PKG_CHECK_MODULES(GIG, gig >= 3.2.0)
63    
64  # check for presence of libsndfile  # check for presence of libsndfile
65  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)
66  AC_SUBST(SNDFILE_CFLAGS)  AC_SUBST(SNDFILE_CFLAGS)
67  AC_SUBST(SNDFILE_LIBS)  AC_SUBST(SNDFILE_LIBS)
68    
69    # check for loop functionality in libsndfile
70    gigedit_save_CXXFLAGS=$CXXFLAGS
71    CXXFLAGS="$SNDFILE_CFLAGS $CXXFLAGS"
72    AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,
73                     [AC_MSG_WARN([Your version of libsndfile does not support
74        reading of loop information. Gigedit will not be able to
75        extract loop information from sample files.])],
76                     [#include <sndfile.h>])
77    CXXFLAGS=$gigedit_save_CXXFLAGS
78    
79  # check for (optional) presence of liblinuxsampler  # check for (optional) presence of liblinuxsampler
80  liblinuxsampler_version="0.4.0.5cvs"  liblinuxsampler_version="0.5.0"
81  PKG_CHECK_MODULES(  PKG_CHECK_MODULES(
82      LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,      LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,
83      have_linuxsampler=1, have_linuxsampler=0      have_linuxsampler=1, have_linuxsampler=0
# Line 75  else Line 99  else
99          echo "for on-the-fly editing with LinuxSampler will be disabled."          echo "for on-the-fly editing with LinuxSampler will be disabled."
100      else      else
101          echo "${LINUXSAMPLER_PLUGIN_DIR} "          echo "${LINUXSAMPLER_PLUGIN_DIR} "
102            # convert absolute LS plugin dir into relative dir
103            # (see ch 27.10 of the automake manual,
104            #  "Installing to Hard-Coded Locations")
105            # this one is extended to work with digit postfixed lib directories
106            # (e.g. "/usr/lib64/linuxsampler") as well
107            LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib[[0-9]]*\//\${libdir}\//g'`
108            if echo "${LINUXSAMPLER_PLUGIN_DIR}" | grep "\${libdir}" > /dev/null; then
109                echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}"
110            else
111                echo "*********************************************************"
112                echo "* ! WARNING ! : Could not resolve LinuxSampler's plugin"
113                echo "* directory as relative path. This is probably not an"
114                echo "* issue if you're just going to install gigedit by"
115                echo "* 'make install', but it IS a problem if you're"
116                echo "* installing to a certain destination directory and/or"
117                echo "* compile in sandbox (e.g. Debian package or Gentoo emerge)"
118                echo "*********************************************************"
119            fi
120      fi      fi
121  fi  fi
122  AC_SUBST(LINUXSAMPLER_CFLAGS)  AC_SUBST(LINUXSAMPLER_CFLAGS)
# Line 86  AC_DEFINE_UNQUOTED( Line 128  AC_DEFINE_UNQUOTED(
128      [Define to 1 if you have LinuxSampler installed.]      [Define to 1 if you have LinuxSampler installed.]
129  )  )
130    
131    have_ls_vmidi=0
132    if test $have_linuxsampler = "1"; then
133        AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices])
134        AC_LANG_SAVE
135        AC_LANG_CPLUSPLUS
136        LIBS="$LINUXSAMPLER_LIBS $LIBS"
137        CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS"
138        CXXFLAGS="$CXXFLAGS $CFLAGS"
139        AC_TRY_COMPILE([
140                #include <linuxsampler/drivers/midi/VirtualMidiDevice.h>
141                using namespace LinuxSampler;
142            ], [
143                bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0;
144                bool (VirtualMidiDevice::*ptr2)() = 0;
145                bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0;
146                uint8_t (VirtualMidiDevice::*ptr4)(uint8_t) = 0;
147                ptr1 = &VirtualMidiDevice::SendNoteOnToSampler;
148                ptr2 = &VirtualMidiDevice::NotesChanged;
149                ptr3 = &VirtualMidiDevice::NoteChanged;
150                ptr4 = &VirtualMidiDevice::NoteOffVelocity;
151            ], [
152                AC_MSG_RESULT(yes)
153                have_ls_vmidi=1
154            ], [
155                AC_MSG_RESULT(no)
156                echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
157                echo "! Support for the virtual MIDI keyboard in gigedit will"
158                echo "! be disabled. You'll see the keyboard in gigedit, but"
159                echo "! you won't be able to trigger notes with it nor see"
160                echo "! active notes caused by external MIDI sources of LS."
161                echo "! Update LinuxSampler and recompile gigedit if you want"
162                echo "! this feature."
163                echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
164            ]
165        )
166        AC_LANG_RESTORE
167    fi
168    AC_DEFINE_UNQUOTED(
169        HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi,
170        [Define to 1 if LinuxSampler supports virtual MIDI devices.]
171    )
172    
173    AC_CONFIG_HEADERS(config.h)
174    AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE")
175    
176  AC_CONFIG_FILES([  AC_CONFIG_FILES([
177          Makefile          Makefile
178          src/Makefile          src/Makefile
179          src/gigedit/Makefile          src/gigedit/Makefile
180          src/plugin/Makefile          src/plugin/Makefile
181            gfx/Makefile
182          po/Makefile.in          po/Makefile.in
183          debian/Makefile          debian/Makefile
184            doc/Makefile
185            doc/quickstart/Makefile
186            win32/libgigedit.dev
187            win32/gigedit.dev
188            win32/gigedit.nsi
189            win32/Makefile
190  ])  ])
191  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.1230  
changed lines
  Added in v.1793

  ViewVC Help
Powered by ViewVC