[Python-checkins] r74672 - in python/trunk: Lib/plat-mac/aepack.py Lib/plat-mac/applesingle.py Lib/plat-mac/buildtools.py Lib/plat-mac/macresource.py Lib/test/test_aepack.py Mac/scripts/BuildApplet.py Makefile.pre.in Misc/NEWS configure configure.in

ronald.oussoren python-checkins at python.org
Sun Sep 6 12:00:32 CEST 2009


Author: ronald.oussoren
Date: Sun Sep  6 12:00:26 2009
New Revision: 74672

Log:
Fix build issues on OSX 10.6 (issue 6802)

Modified:
   python/trunk/Lib/plat-mac/aepack.py
   python/trunk/Lib/plat-mac/applesingle.py
   python/trunk/Lib/plat-mac/buildtools.py
   python/trunk/Lib/plat-mac/macresource.py
   python/trunk/Lib/test/test_aepack.py
   python/trunk/Mac/scripts/BuildApplet.py
   python/trunk/Makefile.pre.in
   python/trunk/Misc/NEWS
   python/trunk/configure
   python/trunk/configure.in

Modified: python/trunk/Lib/plat-mac/aepack.py
==============================================================================
--- python/trunk/Lib/plat-mac/aepack.py	(original)
+++ python/trunk/Lib/plat-mac/aepack.py	Sun Sep  6 12:00:26 2009
@@ -58,7 +58,11 @@
 # Some python types we need in the packer:
 #
 AEDescType = AE.AEDescType
-FSSType = Carbon.File.FSSpecType
+try:
+    FSSType = Carbon.File.FSSpecType
+except AttributeError:
+    class FSSType:
+        pass
 FSRefType = Carbon.File.FSRefType
 AliasType = Carbon.File.AliasType
 

Modified: python/trunk/Lib/plat-mac/applesingle.py
==============================================================================
--- python/trunk/Lib/plat-mac/applesingle.py	(original)
+++ python/trunk/Lib/plat-mac/applesingle.py	Sun Sep  6 12:00:26 2009
@@ -119,8 +119,13 @@
     if not hasattr(infile, 'read'):
         if isinstance(infile, Carbon.File.Alias):
             infile = infile.ResolveAlias()[0]
-        if isinstance(infile, (Carbon.File.FSSpec, Carbon.File.FSRef)):
-            infile = infile.as_pathname()
+
+        if hasattr(Carbon.File, "FSSpec"):
+            if isinstance(infile, (Carbon.File.FSSpec, Carbon.File.FSRef)):
+                infile = infile.as_pathname()
+        else:
+            if isinstance(infile, Carbon.File.FSRef):
+                infile = infile.as_pathname()
         infile = open(infile, 'rb')
 
     asfile = AppleSingle(infile, verbose=verbose)

Modified: python/trunk/Lib/plat-mac/buildtools.py
==============================================================================
--- python/trunk/Lib/plat-mac/buildtools.py	(original)
+++ python/trunk/Lib/plat-mac/buildtools.py	Sun Sep  6 12:00:26 2009
@@ -15,7 +15,10 @@
 import MacOS
 import macostools
 import macresource
-import EasyDialogs
+try:
+    import EasyDialogs
+except ImportError:
+    EasyDialogs = None
 import shutil
 
 
@@ -67,9 +70,13 @@
         rsrcname=None, others=[], raw=0, progress="default", destroot=""):
 
     if progress == "default":
-        progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120)
-        progress.label("Compiling...")
-        progress.inc(0)
+        if EasyDialogs is None:
+            print "Compiling %s"%(os.path.split(filename)[1],)
+            process = None
+        else:
+            progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120)
+            progress.label("Compiling...")
+            progress.inc(0)
     # check for the script name being longer than 32 chars. This may trigger a bug
     # on OSX that can destroy your sourcefile.
     if '#' in os.path.split(filename)[1]:
@@ -119,7 +126,11 @@
     if MacOS.runtimemodel == 'macho':
         raise BuildError, "No updating yet for MachO applets"
     if progress:
-        progress = EasyDialogs.ProgressBar("Updating %s..."%os.path.split(filename)[1], 120)
+        if EasyDialogs is None:
+            print "Updating %s"%(os.path.split(filename)[1],)
+            progress = None
+        else:
+            progress = EasyDialogs.ProgressBar("Updating %s..."%os.path.split(filename)[1], 120)
     else:
         progress = None
     if not output:

Modified: python/trunk/Lib/plat-mac/macresource.py
==============================================================================
--- python/trunk/Lib/plat-mac/macresource.py	(original)
+++ python/trunk/Lib/plat-mac/macresource.py	Sun Sep  6 12:00:26 2009
@@ -77,52 +77,38 @@
 def open_pathname(pathname, verbose=0):
     """Open a resource file given by pathname, possibly decoding an
     AppleSingle file"""
+    # No resource fork. We may be on OSX, and this may be either
+    # a data-fork based resource file or a AppleSingle file
+    # from the CVS repository.
     try:
-        refno = Res.FSpOpenResFile(pathname, 1)
+        refno = Res.FSOpenResourceFile(pathname, u'', 1)
     except Res.Error, arg:
-        if arg[0] in (-37, -39):
-            # No resource fork. We may be on OSX, and this may be either
-            # a data-fork based resource file or a AppleSingle file
-            # from the CVS repository.
-            try:
-                refno = Res.FSOpenResourceFile(pathname, u'', 1)
-            except Res.Error, arg:
-                if arg[0] != -199:
-                    # -199 is "bad resource map"
-                    raise
-            else:
-                return refno
-            # Finally try decoding an AppleSingle file
-            pathname = _decode(pathname, verbose=verbose)
-            refno = Res.FSOpenResourceFile(pathname, u'', 1)
-        else:
+        if arg[0] != -199:
+            # -199 is "bad resource map"
             raise
-    return refno
+    else:
+        return refno
+    # Finally try decoding an AppleSingle file
+    pathname = _decode(pathname, verbose=verbose)
+    refno = Res.FSOpenResourceFile(pathname, u'', 1)
 
 def resource_pathname(pathname, verbose=0):
     """Return the pathname for a resource file (either DF or RF based).
     If the pathname given already refers to such a file simply return it,
     otherwise first decode it."""
+    # No resource fork. We may be on OSX, and this may be either
+    # a data-fork based resource file or a AppleSingle file
+    # from the CVS repository.
     try:
-        refno = Res.FSpOpenResFile(pathname, 1)
-        Res.CloseResFile(refno)
+        refno = Res.FSOpenResourceFile(pathname, u'', 1)
     except Res.Error, arg:
-        if arg[0] in (-37, -39):
-            # No resource fork. We may be on OSX, and this may be either
-            # a data-fork based resource file or a AppleSingle file
-            # from the CVS repository.
-            try:
-                refno = Res.FSOpenResourceFile(pathname, u'', 1)
-            except Res.Error, arg:
-                if arg[0] != -199:
-                    # -199 is "bad resource map"
-                    raise
-            else:
-                return refno
-            # Finally try decoding an AppleSingle file
-            pathname = _decode(pathname, verbose=verbose)
-        else:
+        if arg[0] != -199:
+            # -199 is "bad resource map"
             raise
+    else:
+        return refno
+    # Finally try decoding an AppleSingle file
+    pathname = _decode(pathname, verbose=verbose)
     return pathname
 
 def open_error_resource():

Modified: python/trunk/Lib/test/test_aepack.py
==============================================================================
--- python/trunk/Lib/test/test_aepack.py	(original)
+++ python/trunk/Lib/test/test_aepack.py	Sun Sep  6 12:00:26 2009
@@ -60,6 +60,9 @@
             import Carbon.File
         except:
             return
+
+        if not hasattr(Carbon.File, "FSSpec"):
+            return
         o = Carbon.File.FSSpec(os.curdir)
         packed = aepack.pack(o)
         unpacked = aepack.unpack(packed)
@@ -70,6 +73,8 @@
             import Carbon.File
         except:
             return
+        if not hasattr(Carbon.File, "FSSpec"):
+            return
         o = Carbon.File.FSSpec(os.curdir).NewAliasMinimal()
         packed = aepack.pack(o)
         unpacked = aepack.unpack(packed)

Modified: python/trunk/Mac/scripts/BuildApplet.py
==============================================================================
--- python/trunk/Mac/scripts/BuildApplet.py	(original)
+++ python/trunk/Mac/scripts/BuildApplet.py	Sun Sep  6 12:00:26 2009
@@ -12,7 +12,10 @@
 
 import os
 import MacOS
-import EasyDialogs
+try:
+    import EasyDialogs
+except ImportError:
+    EasyDialogs = None
 import buildtools
 import getopt
 
@@ -32,7 +35,10 @@
     try:
         buildapplet()
     except buildtools.BuildError, detail:
-        EasyDialogs.Message(detail)
+        if EasyDialogs is None:
+            print detail
+        else:
+            EasyDialogs.Message(detail)
 
 
 def buildapplet():
@@ -46,6 +52,10 @@
     # Ask for source text if not specified in sys.argv[1:]
 
     if not sys.argv[1:]:
+        if EasyDialogs is None:
+            usage()
+            sys.exit(1)
+
         filename = EasyDialogs.AskFileForOpen(message='Select Python source or applet:',
                 typeList=('TEXT', 'APPL'))
         if not filename:

Modified: python/trunk/Makefile.pre.in
==============================================================================
--- python/trunk/Makefile.pre.in	(original)
+++ python/trunk/Makefile.pre.in	Sun Sep  6 12:00:26 2009
@@ -770,6 +770,7 @@
 	(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
 	-rm -f $(DESTDIR)$(BINDIR)/python-config
 	(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config)
+	-test -d $(DESTDIR)$(LIBPC) || $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC)
 	-rm -f $(DESTDIR)$(LIBPC)/python.pc
 	(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python.pc)
 

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sun Sep  6 12:00:26 2009
@@ -1189,6 +1189,8 @@
 Build
 -----
 
+- Issue #6802: Fix build issues on MacOSX 10.6
+
 - Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6.
 
 - Issue 5390: Add uninstall icon independent of whether file

Modified: python/trunk/configure
==============================================================================
--- python/trunk/configure	(original)
+++ python/trunk/configure	Sun Sep  6 12:00:26 2009
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 74644 .
+# From configure.in Revision: 74667 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for python 2.7.
 #
@@ -1911,7 +1911,6 @@
 
 
 
-ARCH_RUN_32BIT=
 
 
 UNIVERSAL_ARCHS="32-bit"
@@ -3852,7 +3851,7 @@
   { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 
 
@@ -4689,6 +4688,7 @@
 
 	         elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
 		   UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
+		   ARCH_RUN_32BIT="true"
 
 	         elif test "$UNIVERSAL_ARCHS" = "all" ; then
 		   UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
@@ -4714,12 +4714,22 @@
 	    cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
 	    if test ${cur_target} '>' 10.2; then
 		    cur_target=10.3
-	    fi
-	    if test "${UNIVERSAL_ARCHS}" = "all"; then
-		    # Ensure that the default platform for a 4-way
-		    # universal build is OSX 10.5, that's the first
-		    # OS release where 4-way builds make sense.
-		    cur_target='10.5'
+		    if test ${enable_universalsdk}; then
+			    if test "${UNIVERSAL_ARCHS}" = "all"; then
+				    # Ensure that the default platform for a
+				    # 4-way universal build is OSX 10.5,
+				    # that's the first OS release where
+				    # 4-way builds make sense.
+				    cur_target='10.5'
+			    fi
+		    else
+			    if test `arch` = "i386"; then
+				    # On Intel macs default to a deployment
+				    # target of 10.4, that's the first OSX
+				    # release with Intel support.
+				    cur_target="10.4"
+			    fi
+		    fi
 	    fi
 	    CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
 
@@ -5381,7 +5391,7 @@
 else
   ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 fi
 
@@ -5402,7 +5412,7 @@
 else
   ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 fi
 
@@ -6500,7 +6510,7 @@
 
 
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 { echo "$as_me:$LINENO: result: $was_it_defined" >&5
 echo "${ECHO_T}$was_it_defined" >&6; }
@@ -7030,7 +7040,7 @@
 else
   ac_cv_type_uid_t=no
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
@@ -14457,13 +14467,15 @@
 esac
 
 
+ARCH_RUN_32BIT=""
+
 case $ac_sys_system/$ac_sys_release in
   Darwin/[01567]\..*)
     LIBTOOL_CRUFT="-framework System -lcc_dynamic"
     if test "${enable_universalsdk}"; then
 	    :
     else
-	LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
+        LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
     fi
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
@@ -14475,7 +14487,93 @@
         else
             LIBTOOL_CRUFT=""
     fi
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
+    if test "$cross_compiling" = yes; then
+  ac_osx_32bit=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+[
+    #include <unistd.h>
+    int main(int argc, char*argv[])
+    {
+      if (sizeof(long) == 4) {
+    	  return 0;
+      } else {
+      	  return 1;
+      }
+    ]
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_osx_32bit=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_osx_32bit=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    if test "${ac_osx_32bit}" = "yes"; then
+    	case `arch` in
+    	i386)
+    		MACOSX_DEFAULT_ARCH="i386"
+    		;;
+    	ppc)
+    		MACOSX_DEFAULT_ARCH="ppc"
+    		;;
+    	*)
+    		{ { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
+echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
+   { (exit 1); exit 1; }; }
+    		;;
+    	esac
+    else
+    	case `arch` in
+    	i386)
+    		MACOSX_DEFAULT_ARCH="x86_64"
+    		;;
+    	ppc)
+    		MACOSX_DEFAULT_ARCH="ppc64"
+    		;;
+    	*)
+    		{ { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
+echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
+   { (exit 1); exit 1; }; }
+    		;;
+    	esac
+
+	#ARCH_RUN_32BIT="true"
+    fi
+
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
 esac
@@ -15601,7 +15699,7 @@
 else
   unistd_defines_pthreads=no
 fi
-rm -f conftest*
+rm -f -r conftest*
 
     { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
 echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
@@ -17215,7 +17313,7 @@
   $EGREP "yes" >/dev/null 2>&1; then
   ipv6type=$i
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		kame)
@@ -17238,7 +17336,7 @@
 				ipv6libdir=/usr/local/v6/lib
 				ipv6trylibc=yes
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		linux-glibc)
@@ -17259,7 +17357,7 @@
   ipv6type=$i;
 				ipv6trylibc=yes
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		linux-inet6)
@@ -17297,7 +17395,7 @@
 				ipv6lib=inet6;
 				ipv6libdir=/usr/local/v6/lib
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		v6d)
@@ -17320,7 +17418,7 @@
 				ipv6libdir=/usr/local/v6/lib;
 				BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		zeta)
@@ -17342,7 +17440,7 @@
 				ipv6lib=inet6;
 				ipv6libdir=/usr/local/v6/lib
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		esac
@@ -25159,7 +25257,7 @@
 _ACEOF
 
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 fi
 
@@ -25429,7 +25527,7 @@
 _ACEOF
 
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 fi
 

Modified: python/trunk/configure.in
==============================================================================
--- python/trunk/configure.in	(original)
+++ python/trunk/configure.in	Sun Sep  6 12:00:26 2009
@@ -109,7 +109,6 @@
 ])
 AC_SUBST(UNIVERSALSDK)
 
-ARCH_RUN_32BIT=
 AC_SUBST(ARCH_RUN_32BIT)
 
 UNIVERSAL_ARCHS="32-bit"
@@ -947,6 +946,7 @@
 
 	         elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
 		   UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
+		   ARCH_RUN_32BIT="true"
 
 	         elif test "$UNIVERSAL_ARCHS" = "all" ; then
 		   UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
@@ -970,12 +970,22 @@
 	    cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
 	    if test ${cur_target} '>' 10.2; then
 		    cur_target=10.3
-	    fi
-	    if test "${UNIVERSAL_ARCHS}" = "all"; then
-		    # Ensure that the default platform for a 4-way
-		    # universal build is OSX 10.5, that's the first
-		    # OS release where 4-way builds make sense.
-		    cur_target='10.5'
+		    if test ${enable_universalsdk}; then
+			    if test "${UNIVERSAL_ARCHS}" = "all"; then
+				    # Ensure that the default platform for a 
+				    # 4-way universal build is OSX 10.5, 
+				    # that's the first OS release where 
+				    # 4-way builds make sense.
+				    cur_target='10.5'
+			    fi
+		    else
+			    if test `arch` = "i386"; then
+				    # On Intel macs default to a deployment
+				    # target of 10.4, that's the first OSX
+				    # release with Intel support.
+				    cur_target="10.4"
+			    fi
+		    fi
 	    fi
 	    CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
 	    
@@ -1508,6 +1518,8 @@
     ;;
 esac
 
+
+ARCH_RUN_32BIT=""
 AC_SUBST(LIBTOOL_CRUFT)
 case $ac_sys_system/$ac_sys_release in
   Darwin/@<:@01567@:>@\..*) 
@@ -1515,7 +1527,7 @@
     if test "${enable_universalsdk}"; then
 	    :
     else
-	LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
+        LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
     fi
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
@@ -1527,7 +1539,48 @@
         else 
             LIBTOOL_CRUFT=""
     fi
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
+    AC_TRY_RUN([[
+    #include <unistd.h>
+    int main(int argc, char*argv[])
+    {
+      if (sizeof(long) == 4) {
+    	  return 0;
+      } else {
+      	  return 1;
+      }
+    ]], ac_osx_32bit=yes,
+       ac_osx_32bit=no,
+       ac_osx_32bit=no)
+    
+    if test "${ac_osx_32bit}" = "yes"; then
+    	case `arch` in
+    	i386) 
+    		MACOSX_DEFAULT_ARCH="i386" 
+    		;;
+    	ppc) 
+    		MACOSX_DEFAULT_ARCH="ppc" 
+    		;;
+    	*)
+    		AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
+    		;;
+    	esac
+    else
+    	case `arch` in
+    	i386) 
+    		MACOSX_DEFAULT_ARCH="x86_64" 
+    		;;
+    	ppc) 
+    		MACOSX_DEFAULT_ARCH="ppc64" 
+    		;;
+    	*)
+    		AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
+    		;;
+    	esac
+
+	#ARCH_RUN_32BIT="true"
+    fi
+
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
 esac


More information about the Python-checkins mailing list