- On OSX add -no-cpp-precomp to OPT. The user still has to manually specify
  the --with-suffix=.exe, but it seems that that is also true for cygwin
  (or not? should I automatically set it?)
- Got --with-next-framework to build on OSX. This is only the build bit,
  the install still has to be done manually. Moreover, the Python build order
  isn't really suited to frameworks (where you want to do 'build lib',
  'install lib and framework', 'link executable against installed framework'
  in that order).
diff --git a/configure.in b/configure.in
index 3ba4417..2d163d3 100644
--- a/configure.in
+++ b/configure.in
@@ -248,6 +248,7 @@
 if test "$with_next_framework"
 then
   LDLIBRARY='libpython$(VERSION).dylib'
+  DLLLIBRARY=$LDLIBRARY
 fi  
 
 # DG/UX requires some fancy ld contortions to produce a .so from an .a
@@ -327,6 +328,10 @@
 	    OPT="-O";;
 	esac
     esac
+    case $ac_sys_system in
+    Darwin*)
+    	OPT="$OPT -no-cpp-precomp";;
+    esac
 fi
 
 # The current (beta) Monterey compiler dies with optimizations
@@ -675,7 +680,7 @@
 case $ac_sys_system/$ac_sys_release in
   Darwin/*)
     ns_undef_sym='_environ'
-    LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
+    LIBTOOL_CRUFT="-framework Foundation -framework Carbon -lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
   next/4*)
     ns_undef_sym='__environ'
     LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
@@ -687,7 +692,7 @@
 AC_MSG_CHECKING(for --with-next-framework)
 if test "$with_next_framework"
 then
-	OPT="$OPT -fno-common"
+	OPT="$OPT -fno-common -dynamic"
 	# -U __environ is needed since bundles don't have access
 	# to crt0 when built but will always be linked against it
 	LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"