minidlna: Fix automagic dependency to libiconv

minidlna will detect and use the libiconv library if
the package is selected. In that case, we need to link
against -liconv.

Fixes the following linking problem:

tagutils/tagutils.o: In function `do_iconv.constprop.6':
tagutils.c:(.text+0x4d5c): undefined reference to `libiconv_open'
tagutils.c:(.text+0x4da0): undefined reference to `libiconv'
tagutils.c:(.text+0x4e08): undefined reference to `libiconv_close'

[Peter: wrap COMMON_LIBS line]
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Markos Chandras 2013-08-23 18:26:34 +01:00 committed by Peter Korsgaard
parent 5628776c4a
commit 86116e4f25
1 changed files with 12 additions and 1 deletions

View File

@ -19,12 +19,23 @@ MINIDLNA_CFLAGS=$(TARGET_CFLAGS) \
-I"$(STAGING_DIR)/usr/include/libavcodec" \
-I"$(STAGING_DIR)/usr/include/libavformat"
MINIDLNA_COMMON_LIBS = \
-lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec \
-lid3tag -lFLAC -logg -lvorbis
ifeq ($(BR2_PACKAGE_GETTEXT),y)
MINIDLNA_DEPENDENCIES += gettext
# we need to link with libintl
MINIDLNA_MAKE_OPTS += LIBS='-lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis -lintl'
MINIDLNA_COMMON_LIBS += -lintl
endif
ifeq ($(BR2_PACKAGE_LIBICONV),y)
MINIDLNA_DEPENDENCIES += libiconv
MINIDLNA_COMMON_LIBS += -liconv
endif
MINIDLNA_MAKE_OPTS += LIBS='$(MINIDLNA_COMMON_LIBS)'
define MINIDLNA_BUILD_CMDS
PREFIX=$(STAGING_DIR)/usr \
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \