+ PKG_BUILD_DEPENDS += libtool libintl libiconv
+ ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
+ Hooks/Configure/Pre += autoreconf_target
+ endif
+endif
+
+ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),)
+ PKG_BUILD_DEPENDS += libtool libintl libiconv
+ ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
+ Hooks/Configure/Pre += autoreconf_target
+ endif
+endif
+
+ifneq ($(filter autoreconf,$(PKG_FIXUP)),)
+ ifeq ($(filter autoreconf,$(Hooks/Configure/Pre)),)
+ Hooks/Configure/Pre += autoreconf_target
+ endif
+endif
+
+
+HOST_FIXUP?=$(PKG_FIXUP)
+HOST_LIBTOOL_PATHS?=$(if $(PKG_LIBTOOL_PATHS),$(PKG_LIBTOOL_PATHS),.)
+HOST_AUTOMAKE_PATHS?=$(if $(PKG_AUTOMAKE_PATHS),$(PKG_AUTOMAKE_PATHS),.)
+HOST_MACRO_PATHS?=$(if $(PKG_MACRO_PATHS),$(PKG_MACRO_PATHS),m4)
+HOST_REMOVE_FILES?=$(PKG_REMOVE_FILES)
+
+define autoreconf_host
+ $(strip $(call autoreconf, \
+ $(HOST_BUILD_DIR), $(HOST_REMOVE_FILES), \
+ $(HOST_AUTOMAKE_PATHS), $(HOST_LIBTOOL_PATHS), \
+ $(HOST_MACRO_PATHS)))
+endef
+
+ifneq ($(filter libtool,$(HOST_FIXUP)),)
+ ifeq ($(filter no-autoreconf,$(HOST_FIXUP)),)
+ Hooks/HostConfigure/Pre += autoreconf_host
+ endif
+endif
+
+ifneq ($(filter libtool-ucxx,$(HOST_FIXUP)),)
+ ifeq ($(filter no-autoreconf,$(HOST_FIXUP)),)
+ Hooks/HostConfigure/Pre += autoreconf_host
+ endif
+endif
+
+ifneq ($(filter autoreconf,$(HOST_FIXUP)),)
+ ifeq ($(filter autoreconf,$(Hooks/HostConfigure/Pre)),)
+ Hooks/HostConfigure/Pre += autoreconf_host
+ endif