xerces: only add -liconv when locale are disabled
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 29 Jul 2010 20:03:33 +0000 (22:03 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 29 Jul 2010 20:18:58 +0000 (22:18 +0200)
The iconv library can only be present when locale are disabled in the
toolchain. When locale are enabled in the toolchain, iconv is directly
implemented by the C library.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/xerces/xerces.mk

index fd0417d26644e99b7fe97ee533788c72017518d4..1dcc10a1f0b19db8b5995be87832fb57e6a757ab 100644 (file)
@@ -39,6 +39,10 @@ XERCES_APPS:= \
 
 XERCES_INCLUDES:=/usr/include/xercesc
 
+ifneq ($(BR2_ENABLE_LOCALE),y)
+XERCES_MAKE_OPT=LIBS="-liconv"
+endif
+
 $(DL_DIR)/$(XERCES_SOURCE):
         $(call DOWNLOAD,$(XERCES_SITE),$(XERCES_SOURCE))
 
@@ -74,7 +78,7 @@ $(XERCES_DIR)/.configured: $(XERCES_DIR)/.unpacked
        touch $@
 
 $(XERCES_DIR)/src/.libs/$(LIBXERCES_BINARY): $(XERCES_DIR)/.configured
-       $(MAKE) $(TARGET_CONFIGURE_OPTS) LIBS="-liconv" -C $(XERCES_DIR)
+       $(MAKE) $(TARGET_CONFIGURE_OPTS) $(XERCES_MAKE_OPT) -C $(XERCES_DIR)
 
 $(STAGING_DIR)/usr/lib/$(LIBXERCES_BINARY): $(XERCES_DIR)/src/.libs/$(LIBXERCES_BINARY)
        $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(STAGING_DIR) \