From a758dad8a73b25b89b8b6f1890fcbc6bde528e2a Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 9 Jan 2022 08:01:53 +0000 Subject: [PATCH] Fix linux build and macos liblo --- bootstrap-common.sh | 10 ++++++---- bootstrap-plugins.sh | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/bootstrap-common.sh b/bootstrap-common.sh index eb65784..6cb0f1f 100755 --- a/bootstrap-common.sh +++ b/bootstrap-common.sh @@ -189,11 +189,13 @@ if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then fi # otherwise tests fail -export EXTRA_CFLAGS="-fno-associative-math -fno-reciprocal-math -frounding-math" +export EXTRA_CFLAGS="-fno-associative-math -frounding-math" -# if [ "${MACOS}" -eq 0 ]; then -# export EXTRA_CFLAGS+=" -fsignaling-nans" -# fi +if [ "${MACOS}" -eq 1 ]; then + export EXTRA_CFLAGS+=" -fno-reciprocal-math" +else + export EXTRA_CFLAGS+=" -fsignaling-nans" +fi download libsndfile "${LIBSNDFILE_VERSION}" "${LIBSNDFILE_URL}" "tar.bz2" diff --git a/bootstrap-plugins.sh b/bootstrap-plugins.sh index 9a36762..731d2d9 100755 --- a/bootstrap-plugins.sh +++ b/bootstrap-plugins.sh @@ -91,8 +91,26 @@ fi # --------------------------------------------------------------------------------------------------------------------- # liblo +LIBLO_EXTRAFLAGS="--enable-threads --disable-examples --disable-tools" + +if [ "${CROSS_COMPILING}" -eq 1 ]; then + LIBLO_EXTRAFLAGS+=" --disable-tests" +fi + +# auto-detection fails +if [ "${MACOS}" -eq 1 ]; then + LIBLO_EXTRAFLAGS+=" ac_cv_func_select=yes ac_cv_func_poll=yes ac_cv_func_setvbuf=yes" + if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then + LIBLO_EXTRAFLAGS+=" ac_cv_c_bigendian=universal" + fi +fi + download liblo "${LIBLO_VERSION}" "${LIBLO_URL}" -build_autoconf liblo "${LIBLO_VERSION}" "--enable-threads --disable-examples --disable-tests --disable-tools" +build_autoconf liblo "${LIBLO_VERSION}" "${LIBLO_EXTRAFLAGS}" + +if [ "${CROSS_COMPILING}" -eq 0 ]; then + run_make liblo "${LIBLO_VERSION}" check +fi # --------------------------------------------------------------------------------------------------------------------- # pcre (needed for sord_validate, only relevant if we can run the resulting binaries)