From: Markos Chandras Date: Fri, 23 Aug 2013 17:26:34 +0000 (+0100) Subject: minidlna: Fix automagic dependency to libiconv X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86116e4f252d47fbbb71fb8d59591c2b87da3ba2;p=buildroot.git 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 Signed-off-by: Peter Korsgaard --- diff --git a/package/minidlna/minidlna.mk b/package/minidlna/minidlna.mk index 10e3b33b67..077e2572c0 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) \