|
AC_INIT(configure.in) |
|
|
|
|
1 |
#------------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------------ |
2 |
# LinuxSampler's / liblinuxsampler's "official" release version: |
# LinuxSampler's / liblinuxsampler's "official" release version: |
3 |
|
|
4 |
LINUXSAMPLER_RELEASE_MAJOR=1 |
m4_define(linuxsampler_release_major, 1) |
5 |
LINUXSAMPLER_RELEASE_MINOR=0 |
m4_define(linuxsampler_release_minor, 0) |
6 |
LINUXSAMPLER_RELEASE_BUILD=0.svn18 |
m4_define(linuxsampler_release_build, 0.svn34) |
7 |
|
|
8 |
|
|
9 |
|
AC_INIT([linuxsampler],[linuxsampler_release_major.linuxsampler_release_minor.linuxsampler_release_build]) |
10 |
|
AC_CONFIG_SRCDIR([configure.ac]) |
11 |
|
|
12 |
#------------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------------ |
13 |
# 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 |
35 |
# the LSCP specification version this LinuSampler release complies with: |
# the LSCP specification version this LinuSampler release complies with: |
36 |
|
|
37 |
LSCP_RELEASE_MAJOR=1 |
LSCP_RELEASE_MAJOR=1 |
38 |
LSCP_RELEASE_MINOR=5 |
LSCP_RELEASE_MINOR=6 |
39 |
|
|
40 |
AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.]) |
AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.]) |
41 |
AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.]) |
AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.]) |
42 |
|
|
43 |
AC_PROG_CXX |
AC_PROG_CXX |
44 |
AC_LIBTOOL_WIN32_DLL |
AC_LIBTOOL_WIN32_DLL |
45 |
AM_PROG_LIBTOOL |
AC_PROG_LIBTOOL |
46 |
|
AC_PROG_YACC |
47 |
|
|
48 |
AC_SUBST(SHLIB_VERSION_ARG) |
AC_SUBST(SHLIB_VERSION_ARG) |
49 |
AC_SUBST(SHARED_VERSION_INFO) |
AC_SUBST(SHARED_VERSION_INFO) |
50 |
|
|
51 |
|
module=yes eval LIB_EXT=$shrext_cmds |
52 |
|
AC_SUBST(LIB_EXT) |
53 |
|
|
54 |
AC_C_BIGENDIAN |
AC_C_BIGENDIAN |
55 |
AC_CANONICAL_HOST |
AC_CANONICAL_HOST |
56 |
|
|
107 |
AM_CONDITIONAL(HAVE_WINDOWS, test $have_windows = "1") |
AM_CONDITIONAL(HAVE_WINDOWS, test $have_windows = "1") |
108 |
|
|
109 |
AC_MSG_CHECKING([whether UNIX98 compatible]) |
AC_MSG_CHECKING([whether UNIX98 compatible]) |
110 |
AC_LANG_SAVE |
AC_LANG_PUSH([C]) |
111 |
AC_LANG_C |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
|
AC_TRY_RUN([ |
|
112 |
#ifndef _GNU_SOURCE |
#ifndef _GNU_SOURCE |
113 |
#define _GNU_SOURCE 1 |
#define _GNU_SOURCE 1 |
114 |
#endif |
#endif |
120 |
exit(-1); /* not UNIX98 compatible */ |
exit(-1); /* not UNIX98 compatible */ |
121 |
#endif |
#endif |
122 |
} |
} |
123 |
], |
]])], |
124 |
have_unix98="yes", |
have_unix98="yes", |
125 |
have_unix98="no", |
have_unix98="no", |
126 |
have_unix98="no" |
have_unix98="no" |
127 |
) |
) |
128 |
AC_LANG_RESTORE |
AC_LANG_POP([C]) |
129 |
AC_MSG_RESULT([$have_unix98]) |
AC_MSG_RESULT([$have_unix98]) |
130 |
if test "$have_unix98" = "no" -a "have_windows" = "0"; then |
if test "$have_unix98" = "no" -a "$have_windows" = "0" -a "$mac" = "no" ; then |
131 |
if test "x$HAVE_UNIX98" = "x"; then |
if test "x$HAVE_UNIX98" = "x"; then |
132 |
echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for" |
echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for" |
133 |
echo "pthread_mutexattr_settype() call in Mutex.cpp. You may want to run |
echo "pthread_mutexattr_settype() call in Mutex.cpp. You may want to run" |
134 |
echo "./configure with environment variable HAVE_UNIX98=1 in case you think you |
echo "./configure with environment variable HAVE_UNIX98=1 in case you think you" |
135 |
echo "have a UNIX98 compatible system." |
echo "have a UNIX98 compatible system." |
136 |
exit -1; |
exit -1; |
137 |
fi |
fi |
183 |
AC_CHECK_HEADERS(uuid/uuid.h) |
AC_CHECK_HEADERS(uuid/uuid.h) |
184 |
AC_SEARCH_LIBS(uuid_generate, uuid) |
AC_SEARCH_LIBS(uuid_generate, uuid) |
185 |
|
|
186 |
|
# In case Bison is available, determine the exact version, since we need to |
187 |
|
# use different custom parser code for Bison 2.x vs. Bison 3.x generated |
188 |
|
# parser yacc tables. |
189 |
|
if echo "$YACC" | grep -q bison; then |
190 |
|
# NOTE: m4 removes [], that's why it needs to be escaped |
191 |
|
bison_version=[`$YACC --version | head -n 1 | sed -e 's/[^0-9.]*\([-0-9.]\+\)$/\1/'`] |
192 |
|
bison_version_major=`echo $bison_version | cut -d. -f1` |
193 |
|
bison_version_minor=`echo $bison_version | cut -d. -f2` |
194 |
|
AC_DEFINE_UNQUOTED(HAVE_BISON_MAJ,$bison_version_major,[Define to the major version of the GNU Bison program installed.]) |
195 |
|
AC_DEFINE_UNQUOTED(HAVE_BISON_MIN,$bison_version_minor,[Define to the minor version of the GNU Bison program installed.]) |
196 |
|
fi |
197 |
|
|
198 |
|
|
199 |
|
|
200 |
########################################################################### |
########################################################################### |
229 |
fi |
fi |
230 |
|
|
231 |
echo -n "checking Alsa version... " |
echo -n "checking Alsa version... " |
232 |
AC_LANG_SAVE |
AC_LANG_PUSH([C]) |
233 |
AC_LANG_C |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
|
AC_TRY_RUN([ |
|
234 |
#include <alsa/asoundlib.h> |
#include <alsa/asoundlib.h> |
235 |
void main(void) { |
void main(void) { |
236 |
/* ensure backward compatibility */ |
/* ensure backward compatibility */ |
239 |
#endif |
#endif |
240 |
exit(SND_LIB_MAJOR); |
exit(SND_LIB_MAJOR); |
241 |
} |
} |
242 |
], |
]])], |
243 |
alsa_major=0, |
alsa_major=0, |
244 |
alsa_major=$?, |
alsa_major=$?, |
245 |
alsa_major=0 |
alsa_major=0 |
246 |
) |
) |
247 |
AC_TRY_RUN([ |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
248 |
#include <alsa/asoundlib.h> |
#include <alsa/asoundlib.h> |
249 |
void main(void) { |
void main(void) { |
250 |
/* ensure backward compatibility */ |
/* ensure backward compatibility */ |
253 |
#endif |
#endif |
254 |
exit(SND_LIB_MINOR); |
exit(SND_LIB_MINOR); |
255 |
} |
} |
256 |
], |
]])], |
257 |
alsa_minor=0, |
alsa_minor=0, |
258 |
alsa_minor=$?, |
alsa_minor=$?, |
259 |
alsa_minor=0 |
alsa_minor=0 |
260 |
) |
) |
261 |
AC_TRY_RUN([ |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
262 |
#include <alsa/asoundlib.h> |
#include <alsa/asoundlib.h> |
263 |
void main(void) { |
void main(void) { |
264 |
/* ensure backward compatibility */ |
/* ensure backward compatibility */ |
267 |
#endif |
#endif |
268 |
exit(SND_LIB_SUBMINOR); |
exit(SND_LIB_SUBMINOR); |
269 |
} |
} |
270 |
], |
]])], |
271 |
alsa_subminor=0, |
alsa_subminor=0, |
272 |
alsa_subminor=$?, |
alsa_subminor=$?, |
273 |
alsa_subminor=0 |
alsa_subminor=0 |
274 |
) |
) |
275 |
AC_LANG_RESTORE |
AC_LANG_POP([C]) |
276 |
echo "$alsa_major.$alsa_minor.$alsa_subminor"; |
echo "$alsa_major.$alsa_minor.$alsa_subminor"; |
277 |
AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.]) |
AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.]) |
278 |
AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.]) |
AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.]) |
303 |
AC_SUBST(JACK_CFLAGS) |
AC_SUBST(JACK_CFLAGS) |
304 |
linuxsampler_save_LIBS=$LIBS |
linuxsampler_save_LIBS=$LIBS |
305 |
LIBS="$JACK_LIBS $LIBS" |
LIBS="$JACK_LIBS $LIBS" |
306 |
AC_CHECK_FUNCS(jack_client_name_size jack_client_open) |
AC_CHECK_FUNCS(jack_client_name_size jack_client_open \ |
307 |
|
jack_on_info_shutdown) |
308 |
LIBS=$linuxsampler_save_LIBS |
LIBS=$linuxsampler_save_LIBS |
309 |
have_audio_output_driver="true"; |
have_audio_output_driver="true"; |
310 |
fi |
fi |
529 |
AM_CONDITIONAL(HAVE_DSSI, test $config_have_dssi = "yes") |
AM_CONDITIONAL(HAVE_DSSI, test $config_have_dssi = "yes") |
530 |
|
|
531 |
# LV2 |
# LV2 |
532 |
PKG_CHECK_MODULES(LV2, lv2, |
PKG_CHECK_MODULES(LV2, lv2 >= 1.0.0, config_have_lv2="yes", config_have_lv2="no") |
|
[config_have_lv2="yes" |
|
|
AC_DEFINE(HAVE_LV2_PACKAGE, 1, |
|
|
[Define to 1 if you have the lv2 package installed.])], |
|
|
[config_have_lv2="no" |
|
|
PKG_CHECK_MODULES(LV2, lv2core, config_have_lv2="yes", |
|
|
[AC_CHECK_HEADER(lv2.h, config_have_lv2="yes")])]) |
|
|
|
|
533 |
AC_SUBST(LV2_CFLAGS) |
AC_SUBST(LV2_CFLAGS) |
534 |
AC_SUBST(LV2_LIBS) |
AC_SUBST(LV2_LIBS) |
535 |
AM_CONDITIONAL(HAVE_LV2, test $config_have_lv2 = "yes") |
AM_CONDITIONAL(HAVE_LV2, test $config_have_lv2 = "yes") |
641 |
AC_SUBST(SNDFILE_CFLAGS) |
AC_SUBST(SNDFILE_CFLAGS) |
642 |
AC_SUBST(SNDFILE_LIBS) |
AC_SUBST(SNDFILE_LIBS) |
643 |
|
|
644 |
# Check for Vorbis support in libsndfile |
# Check for Vorbis and FLAC support in libsndfile |
645 |
linuxsampler_save_CFLAGS=$CFLAGS |
linuxsampler_save_CFLAGS=$CFLAGS |
646 |
CFLAGS="$SNDFILE_CFLAGS $CFLAGS" |
CFLAGS="$SNDFILE_CFLAGS $CFLAGS" |
647 |
AC_CHECK_DECLS([SF_FORMAT_VORBIS], [], [], [[#include <sndfile.h>]]) |
AC_CHECK_DECLS([SF_FORMAT_VORBIS, SF_FORMAT_FLAC], [], [], [[#include <sndfile.h>]]) |
648 |
|
|
649 |
# Check for loop functionality in libsndfile |
# Check for loop functionality in libsndfile |
650 |
AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],, |
AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],, |
1236 |
########################################################################### |
########################################################################### |
1237 |
# Automatic Benchmarks (to detect the best algorithms for the system) |
# Automatic Benchmarks (to detect the best algorithms for the system) |
1238 |
|
|
|
AC_LANG_SAVE |
|
|
|
|
1239 |
if test "$config_signed_triang_algo" = "benchmark"; then |
if test "$config_signed_triang_algo" = "benchmark"; then |
1240 |
echo -n "benchmarking for the best (signed) triangular oscillator algorithm... " |
echo -n "benchmarking for the best (signed) triangular oscillator algorithm... " |
1241 |
AC_LANG_CPLUSPLUS |
AC_LANG_PUSH([C++]) |
1242 |
AC_TRY_RUN([ |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
1243 |
#define SIGNED 1 |
#define SIGNED 1 |
1244 |
#define SILENT 1 |
#define SILENT 1 |
1245 |
#include "${srcdir}/benchmarks/triang.cpp" |
#include "${srcdir}/benchmarks/triang.cpp" |
1246 |
], |
]])], |
1247 |
triang_signed=0, |
triang_signed=0, |
1248 |
triang_signed=$?, |
triang_signed=$?, |
1249 |
triang_signed=0 |
triang_signed=0 |
1250 |
) |
) |
1251 |
|
AC_LANG_POP([C++]) |
1252 |
if test "$triang_signed" = "2"; then |
if test "$triang_signed" = "2"; then |
1253 |
config_signed_triang_algo="intmath" |
config_signed_triang_algo="intmath" |
1254 |
echo "integer math" |
echo "integer math" |
1279 |
|
|
1280 |
if test "$config_unsigned_triang_algo" = "benchmark"; then |
if test "$config_unsigned_triang_algo" = "benchmark"; then |
1281 |
echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... " |
echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... " |
1282 |
AC_LANG_CPLUSPLUS |
AC_LANG_PUSH([C++]) |
1283 |
AC_TRY_RUN([ |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
1284 |
#define SIGNED 0 |
#define SIGNED 0 |
1285 |
#define SILENT 1 |
#define SILENT 1 |
1286 |
#include "${srcdir}/benchmarks/triang.cpp" |
#include "${srcdir}/benchmarks/triang.cpp" |
1287 |
], |
]])], |
1288 |
triang_unsigned=0, |
triang_unsigned=0, |
1289 |
triang_unsigned=$?, |
triang_unsigned=$?, |
1290 |
triang_unsigned=0 |
triang_unsigned=0 |
1291 |
) |
) |
1292 |
|
AC_LANG_POP([C++]) |
1293 |
if test "$triang_unsigned" = "2"; then |
if test "$triang_unsigned" = "2"; then |
1294 |
config_unsigned_triang_algo="intmath" |
config_unsigned_triang_algo="intmath" |
1295 |
echo "integer math" |
echo "integer math" |
1318 |
fi |
fi |
1319 |
AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.]) |
AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.]) |
1320 |
|
|
|
AC_LANG_RESTORE |
|
|
|
|
1321 |
|
|
1322 |
########################################################################### |
########################################################################### |
1323 |
# Create Build Files |
# Create Build Files |
1324 |
|
|
1325 |
AM_CONFIG_HEADER(config.h) |
AC_CONFIG_HEADERS([config.h]) |
1326 |
AM_INIT_AUTOMAKE(linuxsampler, "$LINUXSAMPLER_RELEASE_MAJOR.$LINUXSAMPLER_RELEASE_MINOR.$LINUXSAMPLER_RELEASE_BUILD") |
AM_INIT_AUTOMAKE([subdir-objects]) |
1327 |
|
|
1328 |
AC_LANG_CPLUSPLUS |
AC_LANG([C++]) |
1329 |
|
|
1330 |
# autoconf 2.59/libtool 1.5.12 bug? work-around. Without a check like |
# autoconf 2.59/libtool 1.5.12 bug? work-around. Without a check like |
1331 |
# this, the dlfcn.h check in am_prog_libtool may fail. |
# this, the dlfcn.h check in am_prog_libtool may fail. |
1332 |
AC_CHECK_HEADER(stdlib.h) |
AC_CHECK_HEADER(stdlib.h) |
1333 |
|
|
1334 |
AC_OUTPUT( \ |
AC_CONFIG_FILES([\ |
1335 |
Makefile \ |
Makefile \ |
1336 |
man/Makefile \ |
man/Makefile \ |
1337 |
man/linuxsampler.1 \ |
man/linuxsampler.1 \ |
1338 |
|
man/lscp.1 \ |
1339 |
src/Makefile \ |
src/Makefile \ |
1340 |
src/db/Makefile \ |
src/db/Makefile \ |
1341 |
src/network/Makefile \ |
src/network/Makefile \ |
1354 |
src/hostplugins/Makefile \ |
src/hostplugins/Makefile \ |
1355 |
src/hostplugins/dssi/Makefile \ |
src/hostplugins/dssi/Makefile \ |
1356 |
src/hostplugins/lv2/Makefile \ |
src/hostplugins/lv2/Makefile \ |
1357 |
|
src/hostplugins/lv2/manifest.ttl \ |
1358 |
src/hostplugins/vst/Makefile \ |
src/hostplugins/vst/Makefile \ |
1359 |
src/hostplugins/au/Makefile \ |
src/hostplugins/au/Makefile \ |
1360 |
|
src/shell/Makefile \ |
1361 |
linuxsampler.spec \ |
linuxsampler.spec \ |
1362 |
debian/Makefile \ |
debian/Makefile \ |
1363 |
Artwork/Makefile \ |
Artwork/Makefile \ |
1369 |
Documentation/Engines/gig/Makefile \ |
Documentation/Engines/gig/Makefile \ |
1370 |
linuxsampler.pc \ |
linuxsampler.pc \ |
1371 |
Doxyfile \ |
Doxyfile \ |
1372 |
) |
]) |
1373 |
|
AC_OUTPUT |
1374 |
|
|
1375 |
# resolve all nested variables in '${config_plugin_dir}' |
# resolve all nested variables in '${config_plugin_dir}' |
1376 |
# (merely for providing a human readable summary below) |
# (merely for providing a human readable summary below) |
1386 |
echo "#####################################################################" |
echo "#####################################################################" |
1387 |
echo "# LinuxSampler Configuration #" |
echo "# LinuxSampler Configuration #" |
1388 |
echo "#-------------------------------------------------------------------#" |
echo "#-------------------------------------------------------------------#" |
1389 |
echo "# Release Version: ${LINUXSAMPLER_RELEASE_MAJOR}.${LINUXSAMPLER_RELEASE_MINOR}.${LINUXSAMPLER_RELEASE_BUILD}" |
echo "# Release Version: ${VERSION}" |
1390 |
echo "# LSCP Version: ${LSCP_RELEASE_MAJOR}.${LSCP_RELEASE_MINOR}" |
echo "# LSCP Version: ${LSCP_RELEASE_MAJOR}.${LSCP_RELEASE_MINOR}" |
1391 |
echo "#-------------------------------------------------------------------" |
echo "#-------------------------------------------------------------------" |
1392 |
echo "# Assembly Optimizations: ${config_asm}" |
echo "# Assembly Optimizations: ${config_asm}" |