package/shairport-sync: fix static builds
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 30 Nov 2014 11:42:56 +0000 (12:42 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 30 Nov 2014 22:59:24 +0000 (23:59 +0100)
commitac1ac9e628a405e62e4eccb12010c3e364ed1053
tree2bed4c0e59c462e989c89ac1fc3cf5a9e954b917
parent514d7cab61ce908d567a1144efa02b3352480196
package/shairport-sync: fix static builds

Because shairport-sync uses AC_CHECK_LIB to find some of the needed
libraries (opensl, alsa, popt...), it fails to bring in the dependencies
of those libraries; for example, -lssl requires -lz.

When doing a dynamically-linked build, those dependent libraries are
pulled in thanks to the DT_NEEDED ELF tags, but those are not available
in static libraries.

Use PKG_CHECK_MODULES instead of AC_CHECK_LIB, and emulate the results
of AC_CJECK_LIB (i.e. set the HAVE_LIBxxx and the LIBS variable
appropriately) to minimise the amount of code touched.

This should fix:
    http://autobuild.buildroot.net/results/1a5/1a56dbff3583bed0d693508dfc16859086846ecd/
    http://autobuild.buildroot.net/results/6d5/6d5a8157592f7a2c9469bf71b0453796ef982ab1/

At the same time, remove a comment at the end of a variable assignment,
since this has proven to cause some problems.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Jörg Krause <jkrause@posteo.de>
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/shairport-sync/0001-fix-static-link-openssl.patch [new file with mode: 0644]
package/shairport-sync/0002-fix-static-link-alsa.patch [new file with mode: 0644]
package/shairport-sync/0003-fix-static-link-popt.patch [new file with mode: 0644]
package/shairport-sync/shairport-sync.mk