--- linuxsampler/trunk/configure.ac 2014/07/02 22:24:02 2662 +++ linuxsampler/trunk/configure.ac 2020/02/16 11:31:46 3747 @@ -1,9 +1,9 @@ #------------------------------------------------------------------------------------ # LinuxSampler's / liblinuxsampler's "official" release version: -m4_define(linuxsampler_release_major, 1) -m4_define(linuxsampler_release_minor, 0) -m4_define(linuxsampler_release_build, 0.svn56) +m4_define(linuxsampler_release_major, 2) +m4_define(linuxsampler_release_minor, 1) +m4_define(linuxsampler_release_build, 1.svn50) AC_INIT([linuxsampler],[linuxsampler_release_major.linuxsampler_release_minor.linuxsampler_release_build]) @@ -26,7 +26,7 @@ # 6. If any interfaces have been removed since the last public release, then set age # to 0. -LIBLINUXSAMPLER_LT_CURRENT=3 +LIBLINUXSAMPLER_LT_CURRENT=5 LIBLINUXSAMPLER_LT_REVISION=0 LIBLINUXSAMPLER_LT_AGE=0 SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT_CURRENT:$LIBLINUXSAMPLER_LT_REVISION:$LIBLINUXSAMPLER_LT_AGE" @@ -35,7 +35,7 @@ # the LSCP specification version this LinuSampler release complies with: LSCP_RELEASE_MAJOR=1 -LSCP_RELEASE_MINOR=6 +LSCP_RELEASE_MINOR=7 AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.]) AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.]) @@ -64,6 +64,12 @@ AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) +# make sure C++14 is supported by compiler +# (add CXXFLAGS if required [e.g. -std=c++14]) +m4_ifdef([m4_include(m4/ax_cxx_compile_stdcxx.m4)],, + [sinclude([m4/ax_cxx_compile_stdcxx.m4])]) +AX_CXX_COMPILE_STDCXX(14, [], mandatory) + AC_MSG_CHECKING([whether x86 architecture]) def_arch_x86=0 case $host_cpu in @@ -152,6 +158,13 @@ CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" CC="$PTHREAD_CC" + +# check for compiler's pragma diagnostic capabilities +m4_ifdef([m4_include(m4/pragma_diagnostics.m4)],, + [sinclude([m4/pragma_diagnostics.m4])]) +ACX_CXX_PRAGMA_DIAGNOSTICS + + # check for a bug in NPTL-enabled glibc # (see Gentoo bug report #194076) AC_ARG_ENABLE(nptl-bug-check, @@ -181,10 +194,102 @@ echo "NPTL glibc bug check disabled" fi -# FIXME: this is actually a dependency of libgig, not of LS directly, why -# isn't it hidden by libgig? -AC_CHECK_HEADERS(uuid/uuid.h) -AC_SEARCH_LIBS(uuid_generate, uuid) + +# check whether C++ compiler supports "designated initializers" +echo -n "Checking whether C++ compiler supports designated initializers (partly)... " +AC_LANG_PUSH([C++]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + struct Foo { + int a; + float b; + bool c; + char d; + }; + static void bar(Foo o) { + } + int main() { + bar({ + .a = 2, + .b = 4.3f, + .c = true, + .d = 'z' + }); + return 0; + } + ]])], + [cxx_designated_init_partly="yes"], + [cxx_designated_init_partly="no"] +) +AC_LANG_POP([C++]) +if test $cxx_designated_init_partly = "yes"; then + echo "yes" +else + echo "NO" + echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' + echo '! !' + echo '! ERROR: Selected C++ compiler does not support designated !' + echo '! initializers at all, not even partly! !' + echo '! !' + echo '! Please either update your C++ compiler or select a !' + echo '! different compiler (e.g. GCC >= 8 or clang >= 5). If you !' + echo '! have several C++ compilers installed on your machine, you !' + echo '! can easily select a different compiler by environment !' + echo '! variable, e.g. to compile with clang instead: !' + echo '! !' + echo '! CXX=clang++ CC=clang ./configure && make !' + echo '! !' + echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' + exit -1 +fi +echo -n "Checking whether C++ compiler fully supports designated initializers... " +AC_LANG_PUSH([C++]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + struct Foo { + int a; + float b; + bool c; + char d; + }; + static void bar(Foo o) { + } + int main() { + bar({ + .d = 'z', + .a = 2 + }); + return 0; + } + ]])], + [cxx_designated_init_fully="yes"], + [cxx_designated_init_fully="no"] +) +AC_LANG_POP([C++]) +if test $cxx_designated_init_fully = "yes"; then + echo "yes" +else + echo 'NO' + echo '***************************************************************' + echo '* *' + echo '* WARNING: Selected C++ compiler does not fully support *' + echo '* designated initializers (only partly)! *' + echo '* *' + echo '* You will be able to compile LinuxSampler, but you will not *' + echo '* be able to compile the test cases. Consider updating your *' + echo '* C++ compiler or switching to a different compiler. Chances *' + echo '* are that LinuxSampler will soon no longer support your *' + echo '* compiler. *' + echo '* *' + echo '* If you have several C++ compilers installed on your machine,*' + echo '* you can easily select a different compiler by environment *' + echo '* variable, e.g. to compile with clang instead: *' + echo '* *' + echo '* CXX=clang++ CC=clang ./configure && make *' + echo '* *' + echo '***************************************************************' +fi + # In case Bison is available, determine the exact version, since we need to # use different custom parser code for Bison 2.x vs. Bison 3.x generated @@ -533,6 +638,9 @@ # LV2 PKG_CHECK_MODULES(LV2, lv2 >= 1.0.0, config_have_lv2="yes", config_have_lv2="no") +if test "$config_have_lv2" != "yes"; then + PKG_CHECK_MODULES(LV2, lv2core >= 1.0.0, config_have_lv2="yes", config_have_lv2="no") +fi AC_SUBST(LV2_CFLAGS) AC_SUBST(LV2_LIBS) AM_CONDITIONAL(HAVE_LV2, test $config_have_lv2 = "yes") @@ -598,7 +706,7 @@ # Checks for various DLL libraries # Check presence of libgig -libgig_version="3.3.0" +libgig_version="4.2.0" PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false) if test "$HAVE_GIG" = "false"; then echo "Required libgig version not found!" @@ -1360,6 +1468,7 @@ src/hostplugins/vst/Makefile \ src/hostplugins/au/Makefile \ src/scriptvm/Makefile \ + src/scriptvm/editor/Makefile \ src/shell/Makefile \ linuxsampler.spec \ debian/Makefile \