Commit 86116e4f authored by Markos Chandras's avatar Markos Chandras Committed by Peter Korsgaard
Browse files

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: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 5628776c
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -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) \