depends on BR2_INSTALL_LIBSTDCPP
        depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
        depends on !BR2_STATIC_LIBS # dlopen()
-       select BR2_PACKAGE_PCRE
        select BR2_PACKAGE_ZLIB
        help
          Sconeserver is a modular, object-orientated and extremely
 
 SCONESERVER_LICENSE_FILES = COPYING
 # fetching from Git, we need to generate the configure script
 SCONESERVER_AUTORECONF = YES
-SCONESERVER_DEPENDENCIES = host-pkgconf pcre zlib
+SCONESERVER_DEPENDENCIES = \
+       host-pkgconf \
+       $(if $(BR2_PACKAGE_PCRE),pcre) \
+       zlib
 # disable markdown module because its git submodule cmark
 # https://github.com/sconemad/sconeserver/tree/master/markdown
 # has no cross-compile support provided by the sconeserver build system