[include] re-enable the libtool PKG_BUILD_DEPENDS for PKG_FIXUP and emit a deprecatio...
[openwrt/svn-archive/archive.git] / include / autotools.mk
index f85026a944a496c67c9fa9a1f092d0a126e2c9fe..534add64258b01602bb97fb05e055ca5c971bd8e 100644 (file)
@@ -32,15 +32,13 @@ update_libtool_ucxx = \
        ) \
        $(call update_libtool_common)
 
+autoconf_bool = $(patsubst %,$(if $($(1)),--enable,--disable)-%,$(2))
 
 # prevent libtool from linking against host development libraries
 define libtool_fixup_libdir
        find $(1) -name '*.la' | $(XARGS) \
                $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_DIR)/usr/lib,g" \
-                   -e "s,$(STAGING_DIR)/usr/lib/\(libstdc++\|libsupc++\).la,$(TOOLCHAIN_DIR)/usr/lib/\1.la,g"
-       find $(2) -name '*.la' | $(XARGS) \
-               $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_DIR)/usr/lib,g" \
-                   -e "s,$(STAGING_DIR)/usr/lib/\(libstdc++\|libsupc++\).la,$(TOOLCHAIN_DIR)/usr/lib/\1.la,g"
+                   -e "s,$(STAGING_DIR)/usr/lib/\(libstdc++\|libsupc++\).la,$(TOOLCHAIN_DIR)/lib/\1.la,g"
 endef
 
 define remove_version_check
@@ -51,17 +49,21 @@ define remove_version_check
        fi
 endef
 
+# delete *.la-files from staging_dir - we can not yet remove respective lines within all package
+# Makefiles, since backfire still uses libtool v1.5.x which (may) require those files
+define libtool_remove_files
+       find $(1) -name '*.la' | $(XARGS) rm -f
+endef
+
+Hooks/InstallDev/Post += libtool_remove_files
+
 ifneq ($(filter libtool,$(PKG_FIXUP)),)
+  # WARNING: the use of PKG_FIXUP is DEPRECATED
   PKG_BUILD_DEPENDS += libtool
-  Hooks/Configure/Pre += update_libtool remove_version_check
-  Hooks/Configure/Post += update_libtool
-  Hooks/InstallDev/Post += libtool_fixup_libdir
 endif
-
 ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),)
+  # WARNING: the use of PKG_FIXUP is DEPRECATED
   PKG_BUILD_DEPENDS += libtool
-  Hooks/Configure/Pre += update_libtool_ucxx remove_version_check
-  Hooks/Configure/Post += update_libtool_ucxx
-  Hooks/InstallDev/Post += libtool_fixup_libdir
 endif