-define remove_version_check
- if [ -f "$(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/configure" ]; then \
- $(SED) \
- 's,\(gentoo\|pardus\)_ltmain_version=.*,\1_ltmain_version="$$$$\1_lt_version",' \
- $(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/configure; \
- fi
+ifneq ($(filter patch-libtool,$(PKG_FIXUP)),)
+ Hooks/Configure/Pre += patch_libtool_target
+endif
+
+ifneq ($(filter libtool,$(PKG_FIXUP)),)
+ 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)))