102 |
# convert absolute LS plugin dir into relative dir |
# convert absolute LS plugin dir into relative dir |
103 |
# (see ch 27.10 of the automake manual, |
# (see ch 27.10 of the automake manual, |
104 |
# "Installing to Hard-Coded Locations") |
# "Installing to Hard-Coded Locations") |
105 |
LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib\//\${libdir}\//g'` |
# this one is extended to work with digit postfixed lib directories |
106 |
echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}" |
# (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) |
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) |
AC_CONFIG_HEADERS(config.h) |
174 |
AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE") |
AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE") |
175 |
|
|