Add the option to selectively not use pkg-config during configuration - useful for OpenWrt

This commit is contained in:
Mike Brady
2015-05-04 17:45:30 +01:00
parent 9c94547b10
commit 282f79c95a
2 changed files with 15 additions and 5 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ There are two logically distinct parts to getting Shairport Sync to run properly
Shairport Sync reads its configuration from a configuration file at `/etc/shairport-sync.conf`. (While it can also take configuration settings from command line options, it is recommended that you use the configuration file method.)
When you run `$sudo make install`, a default configuration is installed at `/etc/shairport-sync.conf` (it won't replace an existing one) which should work in almost any system with a sound card. A sample configuration file is also installed or updated at `/etc/shairport-sync.conf.sample`. If there is a problem, it will be noted in the logfile, normally `/etc/log/syslog`. However, to get the most out of your software and hardware, you need to adjust some of the settings.
To understand what follows, note that settings and parameters are given to Shairport Sync via the file `/etc/shairport-sync.conf`. The purpose of the init script at `/etc/init.d/shairport-sync` is to launch and terminate Shairport Sync. You are perfectly free to remove the init script and launch and terminate Shairport Sync yourself directly; indeed it is useful when you are troubleshooting the program. If you do launch it directly, make sure it isn't running already!
To understand what follows, note that settings and parameters are given to Shairport Sync via the file `/etc/shairport-sync.conf`. The purpose of the init script at `/etc/init.d/shairport-sync` is merely to launch and terminate Shairport Sync. You are perfectly free to remove the init script and launch and terminate Shairport Sync yourself directly; indeed it is useful when you are troubleshooting the program. If you do launch it directly, make sure it isn't running already!
As well as the man page, don't forget you can launch Shairport Sync with the `-h` option to get some help on the options available.
+14 -4
View File
@@ -28,15 +28,25 @@ if test "x${with_os_type}" = xlinux; then
AC_CHECK_LIB([rt],[clock_gettime], , AC_MSG_ERROR(librt needed))
fi
##### Some build systems are not fully using pkg-config, so we can use the flag ${with_pkg_config} on a case-by-case basis
##### 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])
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)
PKG_CHECK_MODULES(
[POPT], [popt],
[LIBS="${POPT_LIBS} ${LIBS}"
AC_DEFINE([HAVE_LIBPOPT],[1],[Define to 1 if you have popt])])
if test "x${with_pkg_config}" = x1 ; then
PKG_CHECK_MODULES(
[POPT], [popt],
[LIBS="${POPT_LIBS} ${LIBS}"
AC_DEFINE([HAVE_LIBPOPT],[1],[Define to 1 if you have popt])])
else
AC_CHECK_LIB([popt],[poptGetContext], , AC_MSG_ERROR(libpopt needed))
fi
AC_ARG_WITH([initscript],
[ --with-initscript = include a startup script], ,[with_initscript=1])