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

Contents of /gigedit/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2956 - (show annotations) (download)
Sat Jul 16 15:31:47 2016 UTC (2 years, 2 months ago) by schoenebeck
File size: 7729 byte(s)
* Script Editor: Added "Font Size ..." to editor's menu.
* Bumped version (1.0.0.svn18).

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

  ViewVC Help
Powered by ViewVC