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

Contents of /gigedit/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2151 - (show annotations) (download)
Sun Nov 21 12:38:41 2010 UTC (13 years, 4 months ago) by persson
File size: 7579 byte(s)
* use Cairo instead of deprecated gdk drawing primitives
* avoid deprecated gtk methods when using newer gtk versions
* raised minimum supported gtkmm version to 2.8

1 dnl Process this file with autoconf to produce a configure script.
2 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
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 LIBGIGEDIT_LT_CURRENT=2
30 LIBGIGEDIT_LT_REVISION=0
31 LIBGIGEDIT_LT_AGE=0
32
33 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
38 AC_SUBST(SHLIB_VERSION_ARG)
39 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
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 GETTEXT_PACKAGE=gigedit
51 AC_SUBST([GETTEXT_PACKAGE])
52 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
58
59 IT_PROG_INTLTOOL(0.35.0)
60 AM_GLIB_GNU_GETTEXT
61
62 case $host in
63 *mingw*|*cygwin*) windows=yes ;;
64 *) windows=no ;;
65 esac
66 AM_CONDITIONAL(WINDOWS, test "$windows" = "yes")
67
68 PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.8 gthread-2.0 cairomm-1.0)
69 PKG_CHECK_MODULES(GIG, gig >= 3.3.0)
70
71 # check for presence of libsndfile
72 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)
73 AC_SUBST(SNDFILE_CFLAGS)
74 AC_SUBST(SNDFILE_LIBS)
75
76 # check for loop functionality in libsndfile
77 gigedit_save_CXXFLAGS=$CXXFLAGS
78 CXXFLAGS="$SNDFILE_CFLAGS $CXXFLAGS"
79 AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,
80 [AC_MSG_WARN([Your version of libsndfile does not support
81 reading of loop information. Gigedit will not be able to
82 extract loop information from sample files.])],
83 [#include <sndfile.h>])
84 CXXFLAGS=$gigedit_save_CXXFLAGS
85
86 # check for (optional) presence of liblinuxsampler
87 liblinuxsampler_version="0.5.0"
88 PKG_CHECK_MODULES(
89 LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,
90 have_linuxsampler=1, have_linuxsampler=0
91 )
92 LINUXSAMPLER_PLUGIN_DIR=
93 if test "$have_linuxsampler" = "0"; then
94 echo "Required liblinuxsampler version not found!"
95 echo "You need to have liblinuxsampler version ${liblinuxsampler_version}"
96 echo "installed. Support for on-the-fly editing with LinuxSampler will"
97 echo "be disabled."
98 else
99 echo "Found linuxsampler $liblinuxsampler_version"
100 echo -n "Retrieving LinuxSampler's plugin dir... "
101 LINUXSAMPLER_PLUGIN_DIR=`$PKG_CONFIG --variable plugindir linuxsampler`
102 if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then
103 have_linuxsampler=0
104 echo "Error"
105 echo "Could not retrieve LinuxSampler's plugin directory. Support"
106 echo "for on-the-fly editing with LinuxSampler will be disabled."
107 else
108 echo "${LINUXSAMPLER_PLUGIN_DIR} "
109 # convert absolute LS plugin dir into relative dir
110 # (see ch 27.10 of the automake manual,
111 # "Installing to Hard-Coded Locations")
112 # this one is extended to work with digit postfixed lib directories
113 # (e.g. "/usr/lib64/linuxsampler") as well
114 LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib[[0-9]]*\//\${libdir}\//g'`
115 if echo "${LINUXSAMPLER_PLUGIN_DIR}" | grep "\${libdir}" > /dev/null; then
116 echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}"
117 else
118 echo "*********************************************************"
119 echo "* ! WARNING ! : Could not resolve LinuxSampler's plugin"
120 echo "* directory as relative path. This is probably not an"
121 echo "* issue if you're just going to install gigedit by"
122 echo "* 'make install', but it IS a problem if you're"
123 echo "* installing to a certain destination directory and/or"
124 echo "* compile in sandbox (e.g. Debian package or Gentoo emerge)"
125 echo "*********************************************************"
126 fi
127 fi
128 fi
129 AC_SUBST(LINUXSAMPLER_CFLAGS)
130 AC_SUBST(LINUXSAMPLER_LIBS)
131 AC_SUBST(LINUXSAMPLER_PLUGIN_DIR)
132 AM_CONDITIONAL(HAVE_LINUXSAMPLER, test $have_linuxsampler = "1")
133 AC_DEFINE_UNQUOTED(
134 HAVE_LINUXSAMPLER, $have_linuxsampler,
135 [Define to 1 if you have LinuxSampler installed.]
136 )
137
138 have_ls_vmidi=0
139 if test $have_linuxsampler = "1"; then
140 AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices])
141 AC_LANG_SAVE
142 AC_LANG_CPLUSPLUS
143 LIBS="$LINUXSAMPLER_LIBS $LIBS"
144 CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS"
145 CXXFLAGS="$CXXFLAGS $CFLAGS"
146 AC_TRY_COMPILE([
147 #include <linuxsampler/drivers/midi/VirtualMidiDevice.h>
148 using namespace LinuxSampler;
149 ], [
150 bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0;
151 bool (VirtualMidiDevice::*ptr2)() = 0;
152 bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0;
153 uint8_t (VirtualMidiDevice::*ptr4)(uint8_t) = 0;
154 ptr1 = &VirtualMidiDevice::SendNoteOnToSampler;
155 ptr2 = &VirtualMidiDevice::NotesChanged;
156 ptr3 = &VirtualMidiDevice::NoteChanged;
157 ptr4 = &VirtualMidiDevice::NoteOffVelocity;
158 ], [
159 AC_MSG_RESULT(yes)
160 have_ls_vmidi=1
161 ], [
162 AC_MSG_RESULT(no)
163 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
164 echo "! Support for the virtual MIDI keyboard in gigedit will"
165 echo "! be disabled. You'll see the keyboard in gigedit, but"
166 echo "! you won't be able to trigger notes with it nor see"
167 echo "! active notes caused by external MIDI sources of LS."
168 echo "! Update LinuxSampler and recompile gigedit if you want"
169 echo "! this feature."
170 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
171 ]
172 )
173 AC_LANG_RESTORE
174 fi
175 AC_DEFINE_UNQUOTED(
176 HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi,
177 [Define to 1 if LinuxSampler supports virtual MIDI devices.]
178 )
179
180 AC_CONFIG_HEADERS(config.h)
181 AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE")
182
183 AC_CONFIG_FILES([
184 Makefile
185 src/Makefile
186 src/gigedit/Makefile
187 src/plugin/Makefile
188 gfx/Makefile
189 po/Makefile.in
190 debian/Makefile
191 doc/Makefile
192 doc/quickstart/Makefile
193 win32/libgigedit.dev
194 win32/gigedit.dev
195 win32/gigedit.nsi
196 win32/Makefile
197 gigedit.spec
198 ])
199 AC_OUTPUT

  ViewVC Help
Powered by ViewVC