pcre: add support for 16 bits and 32 bits variants
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 6 Mar 2013 10:22:43 +0000 (10:22 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 6 Mar 2013 20:53:49 +0000 (21:53 +0100)
Until now, we have been building only the 8bits PCRE variant. However,
Qt5 requires the 16bits variant. This commit therefore adds support to
build the 16bits and 32bits variants of PCRE. In order to preserve
backward compatibility, the 8bits variant is automatically chosen if
no specific variant is defined.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/pcre/Config.in
package/pcre/pcre.mk

index a4e2547cef9b3361b355ff09ed43d936414cd537..5d16e6d1bcdecf24b9788751ccda7b16289b69d2 100644 (file)
@@ -1,6 +1,28 @@
 config BR2_PACKAGE_PCRE
        bool "pcre"
+       # Ensure at least the default 8-bit library is enabled.
+       select BR2_PACKAGE_PCRE_8 if \
+              (!BR2_PACKAGE_PCRE_16 && !BR2_PACKAGE_PCRE_32)
        help
          Perl Compatible Regular Expressions
 
          http://www.pcre.org/
+
+if BR2_PACKAGE_PCRE
+
+config BR2_PACKAGE_PCRE_8
+       bool "8-bit pcre"
+       help
+         This option builds the 8-bits pcre library, i.e 'libpcre'
+
+config BR2_PACKAGE_PCRE_16
+       bool "16-bit pcre"
+       help
+         This option builds the 16-bits pcre library, i.e 'libpcre16'
+
+config BR2_PACKAGE_PCRE_32
+       bool "32-bit pcre"
+       help
+         This option builds the 32-bits pcre library, i.e 'libpcre32'
+
+endif
index 48266ff74d29b4ca7c40db49e1eca632607bb836..b1339fbbc472615a149796a7583d624d98ca482f 100644 (file)
@@ -16,4 +16,8 @@ ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
 PCRE_CONF_OPT = --disable-cpp
 endif
 
+PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_8),--enable-pcre8,--disable-pcre8)
+PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_16),--enable-pcre16,--disable-pcre16)
+PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_32),--enable-pcre32,--disable-pcre32)
+
 $(eval $(autotools-package))