--- scripts/pkg/private/configure_make.m.orig	2016-11-20 12:18:47.000000000 -0700
+++ scripts/pkg/private/configure_make.m	2016-11-23 20:04:21.000000000 -0700
@@ -54,6 +54,12 @@
       mkoctfile_program = [mkoctfile_program " --verbose"];
     endif
 
+    if (!isempty (getenv ("OCTAVE_ARCH")))
+      mkoctfile_program = ["/usr/bin/arch -arch " getenv("OCTAVE_ARCH")  " " mkoctfile_program];
+      octave_config_program = ["/usr/bin/arch -arch " getenv("OCTAVE_ARCH")  " " octave_config_program];
+      octave_binary = ["/usr/bin/arch -arch " getenv("OCTAVE_ARCH")  " " octave_binary];
+    endif
+
     cenv = {"MKOCTFILE"; mkoctfile_program;
             "OCTAVE_CONFIG"; octave_config_program;
             "OCTAVE"; octave_binary};
