summaryrefslogtreecommitdiff
path: root/package/pkg-autotools.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/pkg-autotools.mk')
-rw-r--r--package/pkg-autotools.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
index d1cdb89fb..00822e2a9 100644
--- a/package/pkg-autotools.mk
+++ b/package/pkg-autotools.mk
@@ -79,6 +79,15 @@ define LIBTOOL_PATCH_HOOK
endef
#
+# Hook to patch common issue with configure on powerpc64{,le} failing
+# to detect shared library support:
+#
+define CONFIGURE_FIX_POWERPC64_HOOK
+ @$(call MESSAGE,"Checking configure (powerpc64/powerpc64le)")
+ support/scripts/fix-configure-powerpc64.sh $($(PKG)_DIR)
+endef
+
+#
# Hook to gettextize the package if needed
#
define GETTEXTIZE_HOOK
@@ -255,6 +264,13 @@ endif
endif
+# Append a configure hook if building for a powerpc64 (or powerpc64le) arch.
+# Must be added after other pre-configure hooks that might regenerate the
+# configure script and overwrite the changes made here.
+ifneq ($$(filter powerpc64%,$$(if $$(filter target,$(4)),$$(ARCH),$$(HOSTARCH))),)
+$(2)_PRE_CONFIGURE_HOOKS += CONFIGURE_FIX_POWERPC64_HOOK
+endif
+
#
# Build step. Only define it if not already defined by the package .mk
# file.