1 |
dnl Process this file with autoconf to produce a configure script. |
dnl Process this file with autoconf to produce a configure script. |
|
AC_INIT(configure.ac) |
|
|
AC_CONFIG_AUX_DIR([.]) |
|
2 |
|
|
3 |
#------------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------------ |
4 |
# The following is the current, official release version of gigedit: |
# The following is the current, official release version of gigedit: |
5 |
|
|
6 |
GIGEDIT_VER_MAJOR=0 |
m4_define(gigedit_ver_major, 0) |
7 |
GIGEDIT_VER_MINOR=2 |
m4_define(gigedit_ver_minor, 2) |
8 |
GIGEDIT_VER_RELEASE=0 |
m4_define(gigedit_ver_release, 0) |
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 |
# The following is the libtool / shared library version. This doesn't have to |
33 |
LIBGIGEDIT_LT_AGE=0 |
LIBGIGEDIT_LT_AGE=0 |
34 |
|
|
35 |
SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE" |
SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE" |
36 |
AC_LANG_CPLUSPLUS |
AC_LANG([C++]) |
37 |
AC_PROG_CXX |
AC_PROG_CXX |
38 |
AC_LIBTOOL_WIN32_DLL |
AC_LIBTOOL_WIN32_DLL |
39 |
AC_PROG_LIBTOOL |
AC_PROG_LIBTOOL |
40 |
AC_SUBST(SHLIB_VERSION_ARG) |
AC_SUBST(SHLIB_VERSION_ARG) |
41 |
AC_SUBST(SHARED_VERSION_INFO) |
AC_SUBST(SHARED_VERSION_INFO) |
42 |
AC_SUBST(GIGEDIT_VER_MAJOR) |
AC_SUBST(GIGEDIT_VER_MAJOR, gigedit_ver_major) |
43 |
AC_SUBST(GIGEDIT_VER_MINOR) |
AC_SUBST(GIGEDIT_VER_MINOR, gigedit_ver_minor) |
44 |
AC_SUBST(GIGEDIT_VER_RELEASE) |
AC_SUBST(GIGEDIT_VER_RELEASE, gigedit_ver_release) |
45 |
|
|
46 |
# configure checks for the following file's existence to make sure that |
# 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. |
# the directory that it is told contains the source code in fact does. |
61 |
IT_PROG_INTLTOOL(0.35.0) |
IT_PROG_INTLTOOL(0.35.0) |
62 |
AM_GLIB_GNU_GETTEXT |
AM_GLIB_GNU_GETTEXT |
63 |
|
|
64 |
|
windows=no |
65 |
|
mac=no |
66 |
case $host in |
case $host in |
67 |
*mingw*|*cygwin*) windows=yes ;; |
*mingw*|*cygwin*) windows=yes ;; |
68 |
*) windows=no ;; |
*-*-darwin*) mac=yes ;; |
69 |
esac |
esac |
70 |
AM_CONDITIONAL(WINDOWS, test "$windows" = "yes") |
AM_CONDITIONAL(WINDOWS, test "$windows" = "yes") |
71 |
|
AM_CONDITIONAL(MAC, test "$mac" = "yes") |
72 |
|
|
73 |
PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4.10 gthread-2.0) |
PKG_PROG_PKG_CONFIG |
74 |
PKG_CHECK_MODULES(GIG, gig >= 3.2.0) |
have_gtk3=no |
75 |
|
PKG_CHECK_EXISTS(gtkmm-3.0 >= 2.99, |
76 |
|
[PKG_CHECK_MODULES(GTKMM, gtkmm-3.0, have_gtk3=yes)], |
77 |
|
[PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.8 gthread-2.0 cairomm-1.0)]) |
78 |
|
AM_CONDITIONAL(HAVE_GTK3, [test "$have_gtk3" = "yes"]) |
79 |
|
|
80 |
|
PKG_CHECK_MODULES(SIGC, sigc++-2.0) |
81 |
|
AC_SUBST(SIGC_CFLAGS) |
82 |
|
AC_SUBST(SIGC_LIBS) |
83 |
|
|
84 |
|
PKG_CHECK_MODULES(GIG, gig >= 3.3.0) |
85 |
|
AC_SUBST(GIG_CFLAGS) |
86 |
|
AC_SUBST(GIG_LIBS) |
87 |
|
|
88 |
# check for presence of libsndfile |
# check for presence of libsndfile |
89 |
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2) |
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.11) |
90 |
AC_SUBST(SNDFILE_CFLAGS) |
AC_SUBST(SNDFILE_CFLAGS) |
91 |
AC_SUBST(SNDFILE_LIBS) |
AC_SUBST(SNDFILE_LIBS) |
92 |
|
|
|
# check for loop functionality in libsndfile |
|
|
gigedit_save_CXXFLAGS=$CXXFLAGS |
|
|
CXXFLAGS="$SNDFILE_CFLAGS $CXXFLAGS" |
|
|
AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],, |
|
|
[AC_MSG_WARN([Your version of libsndfile does not support |
|
|
reading of loop information. Gigedit will not be able to |
|
|
extract loop information from sample files.])], |
|
|
[#include <sndfile.h>]) |
|
|
CXXFLAGS=$gigedit_save_CXXFLAGS |
|
|
|
|
93 |
# check for (optional) presence of liblinuxsampler |
# check for (optional) presence of liblinuxsampler |
94 |
liblinuxsampler_version="0.5.0" |
liblinuxsampler_version="0.5.0" |
95 |
PKG_CHECK_MODULES( |
PKG_CHECK_MODULES( |
105 |
else |
else |
106 |
echo "Found linuxsampler $liblinuxsampler_version" |
echo "Found linuxsampler $liblinuxsampler_version" |
107 |
echo -n "Retrieving LinuxSampler's plugin dir... " |
echo -n "Retrieving LinuxSampler's plugin dir... " |
108 |
LINUXSAMPLER_PLUGIN_DIR=`pkg-config --variable plugindir linuxsampler` |
LINUXSAMPLER_PLUGIN_DIR=`$PKG_CONFIG --variable plugindir linuxsampler` |
109 |
if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then |
if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then |
110 |
have_linuxsampler=0 |
have_linuxsampler=0 |
111 |
echo "Error" |
echo "Error" |
145 |
have_ls_vmidi=0 |
have_ls_vmidi=0 |
146 |
if test $have_linuxsampler = "1"; then |
if test $have_linuxsampler = "1"; then |
147 |
AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices]) |
AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices]) |
148 |
AC_LANG_SAVE |
AC_LANG_PUSH([C++]) |
|
AC_LANG_CPLUSPLUS |
|
149 |
LIBS="$LINUXSAMPLER_LIBS $LIBS" |
LIBS="$LINUXSAMPLER_LIBS $LIBS" |
150 |
CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS" |
CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS" |
151 |
CXXFLAGS="$CXXFLAGS $CFLAGS" |
CXXFLAGS="$CXXFLAGS $CFLAGS" |
152 |
AC_TRY_COMPILE([ |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
153 |
#include <linuxsampler/drivers/midi/VirtualMidiDevice.h> |
#include <linuxsampler/drivers/midi/VirtualMidiDevice.h> |
154 |
using namespace LinuxSampler; |
using namespace LinuxSampler; |
155 |
], [ |
]], [[ |
156 |
bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0; |
bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0; |
157 |
bool (VirtualMidiDevice::*ptr2)() = 0; |
bool (VirtualMidiDevice::*ptr2)() = 0; |
158 |
bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0; |
bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0; |
161 |
ptr2 = &VirtualMidiDevice::NotesChanged; |
ptr2 = &VirtualMidiDevice::NotesChanged; |
162 |
ptr3 = &VirtualMidiDevice::NoteChanged; |
ptr3 = &VirtualMidiDevice::NoteChanged; |
163 |
ptr4 = &VirtualMidiDevice::NoteOffVelocity; |
ptr4 = &VirtualMidiDevice::NoteOffVelocity; |
164 |
], [ |
]])],[ |
165 |
AC_MSG_RESULT(yes) |
AC_MSG_RESULT(yes) |
166 |
have_ls_vmidi=1 |
have_ls_vmidi=1 |
167 |
], [ |
],[ |
168 |
AC_MSG_RESULT(no) |
AC_MSG_RESULT(no) |
169 |
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
170 |
echo "! Support for the virtual MIDI keyboard in gigedit will" |
echo "! Support for the virtual MIDI keyboard in gigedit will" |
174 |
echo "! Update LinuxSampler and recompile gigedit if you want" |
echo "! Update LinuxSampler and recompile gigedit if you want" |
175 |
echo "! this feature." |
echo "! this feature." |
176 |
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
177 |
] |
]) |
178 |
) |
AC_LANG_POP([C++]) |
|
AC_LANG_RESTORE |
|
179 |
fi |
fi |
180 |
AC_DEFINE_UNQUOTED( |
AC_DEFINE_UNQUOTED( |
181 |
HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi, |
HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi, |
183 |
) |
) |
184 |
|
|
185 |
AC_CONFIG_HEADERS(config.h) |
AC_CONFIG_HEADERS(config.h) |
186 |
AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE") |
AM_INIT_AUTOMAKE |
187 |
|
|
188 |
AC_CONFIG_FILES([ |
AC_CONFIG_FILES([ |
189 |
Makefile |
Makefile |