minidlna: fix static linking
authorPeter Korsgaard <peter@korsgaard.com>
Wed, 8 Jan 2014 08:00:11 +0000 (09:00 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 8 Jan 2014 08:00:11 +0000 (09:00 +0100)
The configure script / Makefile forgets to link with some of the dependent
libraries breaking static linking, so help it along.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/minidlna/Config.in
package/minidlna/minidlna.mk

index 9ec4bb473b20cdd83c35fe5dd5d8098cd4758c7d..1fcecde0f766bdeb476958064ebf30bfd09b7119 100644 (file)
@@ -4,8 +4,6 @@ config BR2_PACKAGE_MINIDLNA
        depends on BR2_INET_IPV6 # ffmpeg
        depends on BR2_USE_MMU # fork
        depends on BR2_TOOLCHAIN_HAS_THREADS
-       # static build is broken w.r.t libgcc_s
-       depends on !BR2_PREFER_STATIC_LIB
        select BR2_PACKAGE_FFMPEG
        select BR2_PACKAGE_FLAC
        select BR2_PACKAGE_LIBVORBIS # selects libogg
index df9c3bb7b03277cbf49aee5966819d751d3025ce..94c2641b8e96fe5fcea461fd46ed5aebd973d9bc 100644 (file)
@@ -13,8 +13,14 @@ MINIDLNA_DEPENDENCIES = \
        ffmpeg flac libvorbis libogg libid3tag libexif libjpeg sqlite \
        host-xutil_makedepend
 
-# static build is broken w.r.t libgcc_s
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+# the configure script / Makefile forgets to link with some of the dependent
+# libraries breaking static linking, so help it along
+MINIDLNA_CONF_ENV = \
+       LIBS='-lavformat -lavcodec -lavutil -logg -lz -lpthread -lm'
+else
 MINIDLNA_CONF_OPT = \
        --disable-static
+endif
 
 $(eval $(autotools-package))