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

Annotation of /gigedit/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2359 - (hide annotations) (download)
Sun Aug 5 13:21:12 2012 UTC (11 years, 7 months ago) by persson
File size: 7896 byte(s)
* fixed building on Debian testing (#186)

1 persson 1052 dnl Process this file with autoconf to produce a configure script.
2 schoenebeck 1396 AC_INIT(configure.ac)
3 persson 1356 AC_CONFIG_AUX_DIR([.])
4 schoenebeck 1213
5     #------------------------------------------------------------------------------------
6 schoenebeck 1396 # The following is the current, official release version of gigedit:
7    
8     GIGEDIT_VER_MAJOR=0
9 persson 1959 GIGEDIT_VER_MINOR=2
10     GIGEDIT_VER_RELEASE=0
11 schoenebeck 1396
12     #------------------------------------------------------------------------------------
13 schoenebeck 1213 # The following is the libtool / shared library version. This doesn't have to
14     # do anything with the release version. It MUST conform to the following rules:
15     #
16     # 1. Start with version information of `0:0:0' for each libtool library.
17     # 2. Update the version information only immediately before a public release of
18     # your software. More frequent updates are unnecessary, and only guarantee
19     # that the current interface number gets larger faster.
20     # 3. If the library source code has changed at all since the last update, then
21     # increment revision (`c:r:a' becomes `c:r+1:a').
22     # 4. If any interfaces have been added, removed, or changed since the last update,
23     # increment current, and set revision to 0.
24     # 5. If any interfaces have been added since the last public release, then increment
25     # age.
26     # 6. If any interfaces have been removed since the last public release, then set age
27     # to 0.
28    
29 persson 1959 LIBGIGEDIT_LT_CURRENT=2
30 schoenebeck 1213 LIBGIGEDIT_LT_REVISION=0
31     LIBGIGEDIT_LT_AGE=0
32 schoenebeck 1396
33 schoenebeck 1213 SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE"
34 schoenebeck 1396 AC_LANG_CPLUSPLUS
35     AC_PROG_CXX
36 persson 1809 AC_LIBTOOL_WIN32_DLL
37 schoenebeck 1213 AC_PROG_LIBTOOL
38     AC_SUBST(SHLIB_VERSION_ARG)
39     AC_SUBST(SHARED_VERSION_INFO)
40 schoenebeck 1396 AC_SUBST(GIGEDIT_VER_MAJOR)
41     AC_SUBST(GIGEDIT_VER_MINOR)
42     AC_SUBST(GIGEDIT_VER_RELEASE)
43 schoenebeck 1213
44 schoenebeck 1228 # 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.
46     # Occasionally people accidentally specify the wrong directory with
47     # `--srcdir'; this is a safety check.
48     AC_CONFIG_SRCDIR(src/gigedit/main.cpp)
49    
50 persson 1052 GETTEXT_PACKAGE=gigedit
51     AC_SUBST([GETTEXT_PACKAGE])
52     AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
53    
54 persson 1331 # the libgig header files need this
55     AC_C_BIGENDIAN
56    
57 persson 1052 AC_PROG_CXX
58    
59 persson 1073 IT_PROG_INTLTOOL(0.35.0)
60 persson 1052 AM_GLIB_GNU_GETTEXT
61    
62 persson 1823 case $host in
63     *mingw*|*cygwin*) windows=yes ;;
64     *) windows=no ;;
65     esac
66     AM_CONDITIONAL(WINDOWS, test "$windows" = "yes")
67    
68 persson 2169 PKG_PROG_PKG_CONFIG
69 persson 2344 have_gtk3=no
70 persson 2169 PKG_CHECK_EXISTS(gtkmm-3.0 >= 2.99,
71 persson 2344 [PKG_CHECK_MODULES(GTKMM, gtkmm-3.0, have_gtk3=yes)],
72 persson 2169 [PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.8 gthread-2.0 cairomm-1.0)])
73 persson 2344 AM_CONDITIONAL(HAVE_GTK3, [test "$have_gtk3" = "yes"])
74 persson 2169
75 persson 2359 PKG_CHECK_MODULES(SIGC, sigc++-2.0)
76     AC_SUBST(SIGC_CFLAGS)
77     AC_SUBST(SIGC_LIBS)
78    
79 schoenebeck 1961 PKG_CHECK_MODULES(GIG, gig >= 3.3.0)
80 persson 2359 AC_SUBST(GIG_CFLAGS)
81     AC_SUBST(GIG_LIBS)
82 persson 1052
83 schoenebeck 1085 # check for presence of libsndfile
84     PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)
85     AC_SUBST(SNDFILE_CFLAGS)
86     AC_SUBST(SNDFILE_LIBS)
87    
88 persson 1303 # check for loop functionality in libsndfile
89 persson 1793 gigedit_save_CXXFLAGS=$CXXFLAGS
90     CXXFLAGS="$SNDFILE_CFLAGS $CXXFLAGS"
91 persson 1303 AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,
92     [AC_MSG_WARN([Your version of libsndfile does not support
93     reading of loop information. Gigedit will not be able to
94     extract loop information from sample files.])],
95     [#include <sndfile.h>])
96 persson 1793 CXXFLAGS=$gigedit_save_CXXFLAGS
97 persson 1303
98 schoenebeck 1213 # check for (optional) presence of liblinuxsampler
99 persson 1441 liblinuxsampler_version="0.5.0"
100 schoenebeck 1213 PKG_CHECK_MODULES(
101     LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,
102     have_linuxsampler=1, have_linuxsampler=0
103     )
104 schoenebeck 1230 LINUXSAMPLER_PLUGIN_DIR=
105 schoenebeck 1213 if test "$have_linuxsampler" = "0"; then
106     echo "Required liblinuxsampler version not found!"
107     echo "You need to have liblinuxsampler version ${liblinuxsampler_version}"
108     echo "installed. Support for on-the-fly editing with LinuxSampler will"
109     echo "be disabled."
110     else
111 schoenebeck 1230 echo "Found linuxsampler $liblinuxsampler_version"
112     echo -n "Retrieving LinuxSampler's plugin dir... "
113 persson 2129 LINUXSAMPLER_PLUGIN_DIR=`$PKG_CONFIG --variable plugindir linuxsampler`
114 schoenebeck 1230 if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then
115     have_linuxsampler=0
116     echo "Error"
117     echo "Could not retrieve LinuxSampler's plugin directory. Support"
118     echo "for on-the-fly editing with LinuxSampler will be disabled."
119     else
120     echo "${LINUXSAMPLER_PLUGIN_DIR} "
121 schoenebeck 1322 # convert absolute LS plugin dir into relative dir
122     # (see ch 27.10 of the automake manual,
123     # "Installing to Hard-Coded Locations")
124 schoenebeck 1645 # this one is extended to work with digit postfixed lib directories
125     # (e.g. "/usr/lib64/linuxsampler") as well
126     LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib[[0-9]]*\//\${libdir}\//g'`
127     if echo "${LINUXSAMPLER_PLUGIN_DIR}" | grep "\${libdir}" > /dev/null; then
128     echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}"
129     else
130     echo "*********************************************************"
131     echo "* ! WARNING ! : Could not resolve LinuxSampler's plugin"
132     echo "* directory as relative path. This is probably not an"
133     echo "* issue if you're just going to install gigedit by"
134     echo "* 'make install', but it IS a problem if you're"
135     echo "* installing to a certain destination directory and/or"
136     echo "* compile in sandbox (e.g. Debian package or Gentoo emerge)"
137     echo "*********************************************************"
138     fi
139 schoenebeck 1230 fi
140 schoenebeck 1213 fi
141     AC_SUBST(LINUXSAMPLER_CFLAGS)
142     AC_SUBST(LINUXSAMPLER_LIBS)
143 schoenebeck 1230 AC_SUBST(LINUXSAMPLER_PLUGIN_DIR)
144 schoenebeck 1213 AM_CONDITIONAL(HAVE_LINUXSAMPLER, test $have_linuxsampler = "1")
145     AC_DEFINE_UNQUOTED(
146     HAVE_LINUXSAMPLER, $have_linuxsampler,
147     [Define to 1 if you have LinuxSampler installed.]
148     )
149    
150 schoenebeck 1679 have_ls_vmidi=0
151     if test $have_linuxsampler = "1"; then
152     AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices])
153     AC_LANG_SAVE
154     AC_LANG_CPLUSPLUS
155     LIBS="$LINUXSAMPLER_LIBS $LIBS"
156     CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS"
157     CXXFLAGS="$CXXFLAGS $CFLAGS"
158     AC_TRY_COMPILE([
159     #include <linuxsampler/drivers/midi/VirtualMidiDevice.h>
160     using namespace LinuxSampler;
161     ], [
162     bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0;
163     bool (VirtualMidiDevice::*ptr2)() = 0;
164     bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0;
165     uint8_t (VirtualMidiDevice::*ptr4)(uint8_t) = 0;
166     ptr1 = &VirtualMidiDevice::SendNoteOnToSampler;
167     ptr2 = &VirtualMidiDevice::NotesChanged;
168     ptr3 = &VirtualMidiDevice::NoteChanged;
169     ptr4 = &VirtualMidiDevice::NoteOffVelocity;
170     ], [
171     AC_MSG_RESULT(yes)
172     have_ls_vmidi=1
173     ], [
174     AC_MSG_RESULT(no)
175     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
176     echo "! Support for the virtual MIDI keyboard in gigedit will"
177     echo "! be disabled. You'll see the keyboard in gigedit, but"
178     echo "! you won't be able to trigger notes with it nor see"
179     echo "! active notes caused by external MIDI sources of LS."
180     echo "! Update LinuxSampler and recompile gigedit if you want"
181     echo "! this feature."
182     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
183     ]
184     )
185     AC_LANG_RESTORE
186     fi
187     AC_DEFINE_UNQUOTED(
188     HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi,
189     [Define to 1 if LinuxSampler supports virtual MIDI devices.]
190     )
191    
192 schoenebeck 1396 AC_CONFIG_HEADERS(config.h)
193     AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE")
194    
195 persson 1052 AC_CONFIG_FILES([
196 schoenebeck 1213 Makefile
197     src/Makefile
198 schoenebeck 1226 src/gigedit/Makefile
199 schoenebeck 1213 src/plugin/Makefile
200 schoenebeck 1411 gfx/Makefile
201 schoenebeck 1213 po/Makefile.in
202     debian/Makefile
203 schoenebeck 1396 doc/Makefile
204     doc/quickstart/Makefile
205     win32/libgigedit.dev
206     win32/gigedit.dev
207 schoenebeck 1451 win32/gigedit.nsi
208 schoenebeck 1396 win32/Makefile
209 schoenebeck 1824 gigedit.spec
210 persson 1052 ])
211     AC_OUTPUT

  ViewVC Help
Powered by ViewVC