--- a/configure
+++ b/configure	2026-06-14 03:51:14.000000000 +0800
@@ -18225,6 +18225,12 @@
   aarch64-apple-darwin*|arm64-apple-darwin*) :
     mkdll_flags='-shared -undefined dynamic_lookup -Wl,-w'
       supports_shared_libraries=true ;; #(
+  powerpc64-apple-darwin*) :
+    mkdll_flags='-shared -undefined dynamic_lookup -Wl,-no_compact_unwind -Wl,-w'
+      supports_shared_libraries=true ;; #(
+  powerpc-apple-darwin*) :
+    mkdll_flags='-shared -undefined dynamic_lookup -Wl,-no_compact_unwind -Wl,-read_only_relocs,suppress -Wl,-w'
+      supports_shared_libraries=true ;; #(
   *-w64-mingw32*|*-pc-windows|*-*-cygwin) :
     mkdll_flags="-chain ${flexdll_chain} ${flexlink_flags}"
       mkdll_exp="flexlink ${mkdll_flags}"
@@ -18328,6 +18334,8 @@
     natdynlink=true ;; #(
   aarch64-*-darwin*) :
     natdynlink=true ;; #(
+  powerpc*-*-darwin*) :
+    natdynlink=true ;; #(
   x86_64-*-darwin*) :
     natdynlink=true ;; #(
   s390x*-*-linux*) :
@@ -18590,6 +18598,10 @@
     has_native_backend=yes; arch=arm64; system=macosx ;; #(
   aarch64-*-darwin*) :
     has_native_backend=yes; arch=arm64; system=macosx ;; #(
+  powerpc64-*-darwin*) :
+    arch=power; model=ppc64; system=rhapsody ;; #(
+  powerpc-*-darwin*) :
+    arch=power; model=ppc; system=rhapsody ;; #(
   x86_64-*-darwin*) :
     has_native_backend=yes; arch=amd64; system=macosx ;; #(
   x86_64-w64-mingw32*) :
@@ -18893,6 +18905,10 @@
 if test -z "$PARTIALLD"
 then :
   case "$target,$ocaml_cc_vendor" in #(
+  powerpc64-*-darwin*,gcc-*) :
+    PACKLD_FLAGS=' -arch ppc64' ;; #(
+  powerpc-*-darwin*,gcc-*) :
+    PACKLD_FLAGS=' -arch ppc' ;; #(
   x86_64-*-darwin*,gcc-*) :
     PACKLD_FLAGS=' -arch x86_64' ;; #(
   powerpc64le*-*-linux*,gcc-*) :
@@ -18999,6 +19015,12 @@
   *-*-darwin*,clang-*) :
     default_as="$default_as -Wno-trigraphs"
     default_aspp="$default_as" ;; #(
+  powerpc64-*-darwin*,gcc-*) :
+    default_as="$default_as -m64"
+    default_aspp="$default_as -c" ;; #(
+  powerpc-*-darwin*,gcc-*) :
+    default_as="$default_as -m32"
+    default_aspp="$default_as -c" ;; #(
   *) :
      ;;
 esac
