From 670dd933a2069c3ff943029f093b2875839614fa Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Sat, 1 Aug 2015 14:36:42 +0200 Subject: [PATCH] Use the renamed linux compilation flag renamed to include the word freebsd --- README.md | 4 +-- RELEASENOTES.md | 18 ++++++++++++++ common.c | 3 ++- configure.ac | 66 +++++++++++++++++++------------------------------ 4 files changed, 48 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 937c0328..fb2fa085 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,9 @@ Choose the appropriate `--with-*` options: Here is an example, suitable for most installations: -`$ ./configure --with-alsa --with-avahi --with-ssl=openssl --with-metadata --with-soxr` +`$ ./configure --with-alsa --with-avahi --with-ssl=openssl --with-metadata --with-systemv --with-soxr` -Omit the `--with-soxr` if the libsoxr library is not available. +Omit the `--with-soxr` if the libsoxr library is not available. For installation into a `systemd` system, replace the `--with-systemv` with `--with-systemd`. `$ make` diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 53a2595c..9c395a7d 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,3 +1,21 @@ +Version 2.3.8 +---- +* Pesky changes you must make + * You must change the `./configure` arguments. The flag `with-initscript` has changed to `with-systemv`. It was previously enabled by default; now you must enable it explicitly. + +* Changes + * Support for installing into `systemd` and Fedora systems. For `systemd` support, use the configuration flag `--with-systemd` in place of `--with-systemv`. + * Renamed `with-initscript` configuration flag to `with-systemv` to better describe its role. + * System V startup script is no longer enabled by default; if you want is, ask for it with the `--with-systemv` configuration flag. + * Added limited support for FreeBSD. You must specify `LDFLAGS='-I/usr/local/lib'` and `CPPFLAGS='-L/usr/local/include'` before running `./configure --with-foo etc.` + * Removed "-configfile" annotation from the version string because it'n no longer optional; it's always there. + * Removed the `dummy`, `pipe` and `stdout` backends from the standard build -- they are now optional and are no longer automatically included in the build. + +* Bug fixes + * Allow more stack space to prevent a segfault in certain configurations. Thanks @joerg-krause. + * Add missing header files. Thanks @joerg-krause. + * Removed some (hopefully) mostly silent bugs from the configure.ac file. + Version 2.3.7 ---- * Changes diff --git a/common.c b/common.c index 83837437..fb8702e0 100644 --- a/common.c +++ b/common.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -472,7 +473,7 @@ double vol2attn(double vol, long max_db, long min_db) { uint64_t get_absolute_time_in_fp() { uint64_t time_now_fp; -#ifdef COMPILE_FOR_LINUX +#ifdef COMPILE_FOR_LINUX_AND_FREEBSD struct timespec tn; // can't use CLOCK_MONOTONIC_RAW as it's not implemented in OpenWrt clock_gettime(CLOCK_MONOTONIC, &tn); diff --git a/configure.ac b/configure.ac index af40f651..e74a187d 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], [2.3.7], [mikebrady@eircom.net]) +AC_INIT([shairport-sync], [2.3.8], [mikebrady@eircom.net]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) @@ -32,14 +32,14 @@ fi ##### to control how to deal with them AC_ARG_WITH([pkg_config], -[ --with-pkg-config = use pkg-config to find libraries], ,[with_pkg_config=1]) +[ --with-pkg-config = use pkg-config to find libraries], ,[with_pkg_config=yes]) AC_CHECK_LIB([daemon],[daemon_log], , AC_MSG_ERROR(libdaemon needed)) AC_CHECK_LIB([pthread],[pthread_create], , AC_MSG_ERROR(pthread library needed)) AC_CHECK_LIB([m],[exp], , AC_MSG_ERROR(maths library needed)) AC_MSG_RESULT(>>Including libpopt) -if test "x${with_pkg_config}" = x1 ; then +if test "x${with_pkg_config}" = xyes ; then PKG_CHECK_MODULES( [POPT], [popt], [LIBS="${POPT_LIBS} ${LIBS}" @@ -50,54 +50,41 @@ else fi AC_ARG_WITH([dummy],[ --with-dummy = include the dummy audio back end ],[AC_MSG_RESULT(>>Including the dummy audio back end) AC_DEFINE([CONFIG_DUMMY], 1, [Needed by the compiler.]) ], ) -AM_CONDITIONAL([USE_DUMMY], [test "x$with_dummy" = "x1" ]) +AM_CONDITIONAL([USE_DUMMY], [test "x$with_dummy" = "xyes" ]) AC_ARG_WITH([stdout],[ --with-stdout = include the stdout audio back end ],[ AC_MSG_RESULT(>>Including the stdout audio back end) AC_DEFINE([CONFIG_STDOUT], 1, [Needed by the compiler.]) ], ) -AM_CONDITIONAL([USE_STDOUT], [test "x$with_stdout" = "x1" ]) + +AM_CONDITIONAL([USE_STDOUT], [test "x$with_stdout" = "xyes" ]) AC_ARG_WITH([pipe],[ --with-pipe = include the pipe audio back end ],[ AC_MSG_RESULT(>>Including the pipe audio back end) AC_DEFINE([CONFIG_PIPE], 1, [Needed by the compiler.]) ], ) -AM_CONDITIONAL([USE_PIPE], [test "x$with_pipe" = "x1" ]) +AM_CONDITIONAL([USE_PIPE], [test "x$with_pipe" = "xyes" ]) -AC_ARG_WITH([initscript], -[ --with-initscript = include a startup script], ,[with_initscript=1]) -AM_CONDITIONAL([INSTALL_INITSCRIPT], [test "x$with_initscript" = "x1"]) +# Check to see if we should include the System V initscript + +AC_ARG_WITH([systemv], +[ --with-systemv = include a startup script], , ) +AM_CONDITIONAL([INSTALL_SYSTEMV], [test "x$with_systemv" = "xyes"]) + +# Check to see if we should include the systemd stuff to define it as a service AC_ARG_WITH([systemd], -[ --with-systemd = include a systemd service], ,[with_systemd=1]) -AM_CONDITIONAL([INSTALL_SYSTEMD], [test "x$with_systemd" = "x1"]) +[ --with-systemd = include a systemd service], , ) +AM_CONDITIONAL([INSTALL_SYSTEMD], [test "x$with_systemd" = "xyes"]) -# Check if we want to support reading arguments from the command line -AC_ARG_WITH([command_line_argument_support], -[ --with-command-line-argument-support = read configuration from command line arguments], ,[with_command_line_argument_support=1]) - -if test "x${with_command_line_argument_support}" = x1 ; then - AC_MSG_RESULT(>>Including command line argument support) - AC_DEFINE([COMMAND_LINE_ARGUMENT_SUPPORT],[1],[Define to 1 if you want to support command line arguments]) -fi - -# Check if we want to support reading from a configuration file chosen -- i.e. take parameters from /etc/shairport-sync.conf -AC_ARG_WITH([configfile_support], -[ --with-configfile-support = support reading of configuration from a configuration file], ,[with_configfile_support=1]) - -if test "x${with_configfile_support}" = x1 ; then - AC_MSG_RESULT(>>Including configuration file support) - if test "x${with_pkg_config}" = x1 ; then - PKG_CHECK_MODULES( - [LIBCONFIG], [libconfig], - [LIBS="${LIBCONFIG_LIBS} ${LIBS}"]) - else - AC_CHECK_LIB([config],[config_init], , AC_MSG_ERROR([libconfig library needed])) - fi - AC_DEFINE([SUPPORT_CONFIG_FILES],[1],[Define to 1 if you want to support configuration files]) +# Add the libconfig package +if test "x${with_pkg_config}" = xyes ; then + PKG_CHECK_MODULES( + [LIBCONFIG], [libconfig], + [LIBS="${LIBCONFIG_LIBS} ${LIBS}"]) +else + AC_CHECK_LIB([config],[config_init], , AC_MSG_ERROR([libconfig library needed])) fi AC_ARG_WITH([configfiles], -[ --with-configfiles = include configuration files in installation ], ,[with_configfiles=1]) -AM_CONDITIONAL([INSTALL_CONFIG_FILES], [test "x$with_configfiles" = "x1" -a "x$with_configfile_support" = "x1" ]) +[ --with-configfiles = include configuration files in installation ], ,[with_configfiles=yes]) +AM_CONDITIONAL([INSTALL_CONFIG_FILES], [test "x$with_configfiles" = "xyes"]) -# Check to see if we should include the initscript - # Look for piddir flag AC_ARG_WITH(piddir, [ --with-piddir= Specify a pathname to a directory in which to write the PID file.], [ AC_MSG_CHECKING(--with-piddir argument) @@ -146,9 +133,8 @@ AC_ARG_WITH(soxr, [ --with-soxr = choose libsoxr for high-quality interpolation # Look for metadata flag -- set flag for conditional compilation AC_ARG_WITH(metadata, [ --with-metadata = include support for a metadata feed], [ AC_MSG_RESULT(>>Including metadata support) - HAS_METADATA=1 AC_DEFINE([CONFIG_METADATA], 1, [Needed by the compiler.])], ) -AM_CONDITIONAL([USE_METADATA], [test "x$HAS_METADATA" = "x1"]) +AM_CONDITIONAL([USE_METADATA], [test "x$with_metadata" = "xyes"]) # What follows is a bit messy, because if the relevant library is requested, a compiler flag is defined, a file is included in the compilation # and the relevant link files are added.