libglib2: use system pcre when available
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 9 Mar 2013 08:21:30 +0000 (08:21 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 9 Mar 2013 20:18:29 +0000 (21:18 +0100)
By default, glib builds its own internal copy of the pcre library, but
it also allows to use the one available from the system. Use this
possibility when pcre is already selected in the Buildroot
configuration.

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

index b108b89c045f2405c5a158a6c0dc819f0068b2fb..4ca6ca3cbd19f559cb0e6bf3b9acd6ea8ad5ae24 100644 (file)
@@ -81,6 +81,13 @@ LIBGLIB2_CONF_OPT += --with-libiconv=gnu
 LIBGLIB2_DEPENDENCIES += libiconv
 endif
 
+ifeq ($(BR2_PACKAGE_PCRE),y)
+LIBGLIB2_CONF_OPT += --with-pcre=system
+LIBGLIB2_DEPENDENCIES += pcre
+else
+LIBGLIB2_CONF_OPT += --with-pcre=internal
+endif
+
 define LIBGLIB2_REMOVE_DEV_FILES
        rm -rf $(TARGET_DIR)/usr/lib/glib-2.0
        rm -rf $(TARGET_DIR)/usr/share/glib-2.0/gettext