-$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
- (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
+ifneq ($(BR2_COMPILE_OPENVPN_WITH_LZO),y)
+DISABLE_LZO:=--disable-lzo
+else
+PKG_DEPEND+=", liblzo"
+endif
+
+ifneq ($(BR2_COMPILE_OPENVPN_WITH_SERVER),y)
+DISABLE_SERVER:=--disable-server
+endif
+ifneq ($(BR2_COMPILE_OPENVPN_WITH_HTTP),y)
+DISABLE_HTTP:=--disable-http
+endif
+ifeq ($(BR2_COMPILE_OPENVPN_WITH_PASSWORD_SAVE),y)
+ENABLE_PASSWORD_SAVE:=--enable-password-save
+endif
+ifeq ($(BR2_COMPILE_OPENVPN_WITH_SMALL),y)
+ENABLE_SMALL:=--enable-small
+endif
+
+$(PKG_BUILD_DIR)/.configured:
+ (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \