summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2013-08-23 17:26:34 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2013-08-27 22:16:25 (GMT)
commit86116e4f252d47fbbb71fb8d59591c2b87da3ba2 (patch)
tree39d5285bc5cde9f8ea16225712be24b00f10f7df
parent5628776c4a4d29d0715633ea463b64cc19e19c5a (diff)
downloadbuildroot-86116e4f252d47fbbb71fb8d59591c2b87da3ba2.tar.gz
buildroot-86116e4f252d47fbbb71fb8d59591c2b87da3ba2.tar.bz2
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>
-rw-r--r--package/minidlna/minidlna.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/package/minidlna/minidlna.mk b/package/minidlna/minidlna.mk
index 10e3b33..077e257 100644
--- a/package/minidlna/minidlna.mk
+++ b/package/minidlna/minidlna.mk
@@ -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) \