From 5101ab2d13e2b89ea3c1276df5fb7413634eeccd Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Sat, 25 Aug 2018 13:08:37 +0100 Subject: [PATCH 1/5] Sometimes libsoxr is built to rely on libavutil. If libavutil is detected, link to it when building libsoxr. Add pgk_config support to soxr selection. --- configure.ac | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0c917a43..2b6fddb3 100644 --- a/configure.ac +++ b/configure.ac @@ -176,7 +176,20 @@ AC_ARG_WITH(ssl, [ choose --with-ssl=openssl, --with-ssl=mbedtls or --with-ssl=p # Look for soxr flag AC_ARG_WITH(soxr, [ --with-soxr = choose libsoxr for high-quality interpolation], [ AC_MSG_RESULT(>>Including support for soxr-based interpolation) - AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!))], ) + if test "x${with_pkg_config}" = xyes ; then + PKG_CHECK_MODULES( + [SOXR], [soxr], + [LIBS="${SOXR_LIBS} ${LIBS}"]) + else + AC_CHECK_LIB([avutil],[av_get_cpu_flags]) + if test "x${ac_cv_lib_avutil_av_get_cpu_flags}" = xyes ; then + # soxr may link against libavutil, depending on the architecture, but for the sake of simplicity link with it if it is found + AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!), [-lavutil]) + else + AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!)) + fi + fi +], ) # Look for metadata flag -- set flag for conditional compilation AC_ARG_WITH(metadata, [ --with-metadata = include support for a metadata feed], [ From 39c46dbc77717f1ddd8c3fcef7ecf4dcb30e70be Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Sat, 25 Aug 2018 13:09:43 +0100 Subject: [PATCH 2/5] Sometimes libsoxr is built to rely on libavutil. If libavutil is detected, link to it when building libsoxr. Add pgk_config support to soxr selection. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2b6fddb3..508faf9b 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [3.3d3], [mikebrady@eircom.net]) +AC_INIT([shairport-sync], [3.3avs0], [mikebrady@eircom.net]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) From 19e572e94aa45f6cd78de3f9b295a559f3648c69 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Tue, 28 Aug 2018 09:38:44 +0100 Subject: [PATCH 3/5] Update configure.ac --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 508faf9b..50d8e006 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [3.3avs0], [mikebrady@eircom.net]) +AC_INIT([shairport-sync], [3.3d4], [mikebrady@eircom.net]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) From 805b1d701c5fe2fb8d47d8b715255c5ddffa23a7 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Tue, 28 Aug 2018 09:47:07 +0100 Subject: [PATCH 4/5] Update RELEASENOTES.md --- RELEASENOTES.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 63aeb9ce..bbc81907 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,3 +1,10 @@ +Version 3.3d4 +==== +* Sometimes `libsoxr` is built to rely on `libavutil`. With the present changes to `configure.ac`, if `libavutil` is present, link to it when linking to `libsoxr`, but if it's not present, don't link to it when linking to `libsoxr`. +* Add `pgk_config` support to `libsoxr` selection. + +Thanks to [Jörg Krause](https://github.com/joerg-krause) for identifying these issues and proposing fixes. + Version 3.3d3 ==== * Modify the code that synchronises the Shairport Sync system's clock with the source clock to try to take account of the sources's nominal rate, which (oddly, e.g. iTunes on a Mac) might not be exactly 44,100 fps. There may be a 32-bit unsigned overflow error here somewhere! From 8d152bf2d505d320951db671cedb98d8cf437c7c Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Tue, 28 Aug 2018 17:09:31 +0100 Subject: [PATCH 5/5] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 802fc671..bfd61851 100644 --- a/README.md +++ b/README.md @@ -67,9 +67,11 @@ See [here](https://github.com/mikebrady/shairport-sync/blob/development/INSTALL. The following procedures will build and install the `shairport-sync` application into your system. -**Remove Old Versions Of Shairport Sync** +**Remove Old Versions of Shairport Sync and its Startup Scripts** -You should check to see if `shairport-sync` is already installed – you can use the command `$ which shairport-sync` to find where it is located, if installed. If it is installed you should delete it – you may need superuser privileges. After deleting, check again in case further copies are installed elsewhere. You should also remove the file `/etc/systemd/system/shairport-sync.service` if it exists. +You should check to see if `shairport-sync` is already installed – you can use the command `$ which shairport-sync` to find where it is located, if installed. If it is installed you should delete it – you may need superuser privileges. After deleting, check again in case further copies are installed elsewhere. + +You should also remove the initialisation script files `/etc/systemd/system/shairport-sync.service` and `/etc/init.d/shairport-sync` if they exist – new ones will be installed in necessary. **FreeBSD**