--- build-macos.orig	2023-05-02 00:55:12.000000000 -0700
+++ build-macos	2023-05-02 00:56:35.000000000 -0700
@@ -151,10 +151,15 @@
         opts="${opts} --enable-universal"
     fi
 
+    if [ X"$PREFIX" == "X" ] ; then
+        PREFIX=/usr
+        export PREFIX
+    fi
+
     # now compile ourself
     echo "Compiling DOSBox-X"
     chmod +x configure
-    ./configure --enable-debug=heavy --prefix=/usr "${opts}" "${@}" || exit 1
+    ./configure --enable-debug=heavy --prefix="$PREFIX" "${opts}" "${@}" || exit 1
     make -j3 || exit 1
 
     cp src/dosbox-x "src/dosbox-x-${arch}"
