+PATCH_DIR:=$(firstword $(wildcard ./patches-$(PKG_VERSION)$(PKG_EXTRAVERSION) ./patches-$(PKG_VERSION)))
+CONFIG_DIR:=$(firstword $(wildcard ./config-$(PKG_VERSION)$(PKG_EXTRAVERSION) ./config-$(PKG_VERSION)))
+PATCH_DIR:=$(if $(CONFIG_UCLIBC_VERSION_NPTL),./patches-nptl,$(PATCH_DIR))
+CONFIG_DIR:=$(if $(CONFIG_UCLIBC_VERSION_NPTL),./config-nptl,$(CONFIG_DIR))
+PATCH_DIR:=$(if $(PKG_VERSION_SNAPSHOT),,$(PATCH_DIR))
+CONFIG_DIR:=$(if $(PKG_VERSION_SNAPSHOT),./config-0.9.30,$(CONFIG_DIR))