SSLH_DEPENDENCIES = libconfig
+SSLH_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS)
+
+ifeq ($(BR2_PACKAGE_PCRE),y)
+SSLH_DEPENDENCIES += pcre
+SSLH_MAKE_OPTS += USELIBPCRE=1
+else
+SSLH_MAKE_OPTS += USELIBPCRE=
+endif
+
define SSLH_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+ $(TARGET_MAKE_ENV) $(MAKE1) $(SSLH_MAKE_OPTS) -C $(@D)
endef
define SSLH_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+ $(TARGET_MAKE_ENV) $(MAKE) $(SSLH_MAKE_OPTS) -C $(@D) \
+ DESTDIR=$(TARGET_DIR) install
endef
define SSLH_INSTALL_INIT_SYSV