From d61faf072c4f4e7f2f582c2c668e30bea4530cdb Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <vital.had@gmail.com>
Date: Tue, 27 Dec 2022 22:36:42 +0700
Subject: [PATCH 2/2] Rosetta hack

---
 Makefile              | 4 ++++
 autoconf/config.guess | 2 +-
 config.guess          | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 9e624bf1..5c24c9af 100644
--- a/Makefile
+++ b/Makefile
@@ -151,6 +151,9 @@ ifneq ($(OPTION),)
     endif
   else
   ifeq ($(POSIXOS),darwin)
+    ifeq ($(OPTION),Rosetta)
+      newarch=powerpc-apple-darwin10
+    else
     ifeq ($(PLATFORM),powerpc)
       ifeq ($(OPTION),64bits)
         newarch=$(subst powerpc,powerpc64,$(ARCH))
@@ -168,6 +171,7 @@ ifneq ($(OPTION),)
       endif
       endif
     endif
+    endif
   else
   ifeq ($(POSIXOS),cygwin)
     ifeq ($(OPTION),32bits)
diff --git a/autoconf/config.guess b/autoconf/config.guess
index 2e9ad7fe..f7bc7ba7 100755
--- a/autoconf/config.guess
+++ b/autoconf/config.guess
@@ -1321,7 +1321,7 @@ EOF
 	    # that Apple uses in portable devices.
 	    UNAME_PROCESSOR=x86_64
 	fi
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	echo powerpc-apple-darwin10
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
diff --git a/config.guess b/config.guess
index 2e9ad7fe..f7bc7ba7 100755
--- a/config.guess
+++ b/config.guess
@@ -1321,7 +1321,7 @@ EOF
 	    # that Apple uses in portable devices.
 	    UNAME_PROCESSOR=x86_64
 	fi
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	echo powerpc-apple-darwin10
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
-- 
2.37.3

