prepare support for libiconv, libintl stub/full switching
SVN-Revision: 25302
This commit is contained in:
parent
bd8a1549eb
commit
1ada513817
2 changed files with 47 additions and 0 deletions
|
@ -140,6 +140,13 @@ menu "Global build settings"
|
||||||
In case software provides optional support for patented functionality,
|
In case software provides optional support for patented functionality,
|
||||||
this optional support will get disabled for this package.
|
this optional support will get disabled for this package.
|
||||||
|
|
||||||
|
config BUILD_NLS
|
||||||
|
default n
|
||||||
|
bool "Compile with full language support"
|
||||||
|
help
|
||||||
|
When this option is enabled, packages are built with the full versions of iconv and GNU gettext
|
||||||
|
instead of the default OpenWrt stubs.
|
||||||
|
|
||||||
config SHADOW_PASSWORDS
|
config SHADOW_PASSWORDS
|
||||||
bool
|
bool
|
||||||
prompt "Enable shadow password support"
|
prompt "Enable shadow password support"
|
||||||
|
|
40
include/nls.mk
Normal file
40
include/nls.mk
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2011 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
# iconv full
|
||||||
|
ifeq ($(CONFIG_BUILD_NLS),y)
|
||||||
|
ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-full
|
||||||
|
ICONV_FULL:=1
|
||||||
|
|
||||||
|
INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-full
|
||||||
|
INTL_FULL:=1
|
||||||
|
|
||||||
|
# iconv stub
|
||||||
|
else
|
||||||
|
ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-stub
|
||||||
|
ICONV_FULL:=
|
||||||
|
|
||||||
|
INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-stub
|
||||||
|
INTL_FULL:=
|
||||||
|
endif
|
||||||
|
|
||||||
|
PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS
|
||||||
|
PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:gettext
|
||||||
|
|
||||||
|
ICONV_DEPENDS:=+BUILD_NLS:libiconv-full
|
||||||
|
ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include
|
||||||
|
ICONV_CPPFLAGS:=-I$(ICONV_PREFIX)/include
|
||||||
|
ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib
|
||||||
|
|
||||||
|
INTL_DEPENDS:=+BUILD_NLS:libintl-full
|
||||||
|
INTL_CFLAGS:=-I$(INTL_PREFIX)/include
|
||||||
|
INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include
|
||||||
|
INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib
|
||||||
|
|
||||||
|
TARGET_CFLAGS += $(ICONV_CFLAGS) $(INTL_CFLAGS)
|
||||||
|
TARGET_CPPFLAGS += $(ICONV_CFLAGS) $(INTL_CPPFLAGS)
|
||||||
|
TARGET_LDFLAGS += $(ICONV_LDFLAGS) $(INTL_LDFLAGS)
|
Loading…
Reference in a new issue