Commits

Ronald Oussoren  committed 7660c53

This check-in fixes two problems:

1) A non-critical off-by-one error in pythonw

2) A problem in the configure script that caused
builds with '--enable-framework --enable-universalsdk=/'
to fail on OSX 10.6.

  • Participants
  • Parent commits 73e5e3e
  • Branches legacy-trunk

Comments (0)

Files changed (3)

File Mac/Tools/pythonw.c

 		end --;
 	}
 	end++;
-	if (end[1] == '.') {
+	if (*end == '.') {
 		end++;
 	}
 	strcpy(end, "Resources/Python.app/Contents/MacOS/" PYTHONFRAMEWORK);
 		setup_spawnattr(&spawnattr);		
 		posix_spawn(NULL, exec_path, NULL,
 			&spawnattr, argv, environ);
-		err(1, "posix_spawn: %s", argv[0]);
+		err(1, "posix_spawn: %s", exec_path);
 	}
 #endif
 	execve(exec_path, argv, environ);
 #! /bin/sh
-# From configure.in Revision: 78964 .
+# From configure.in Revision: 79652 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for python 2.7.
 #
 LIBTOOL_CRUFT
 SO
 LDSHARED
+LDCXXSHARED
 BLDSHARED
 CCSHARED
 LINKFORSHARED
   { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 
 
 	        if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
 		   UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
 		   ARCH_RUN_32BIT=""
-		   LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
-
-
-		   # You have to use different flags on various versions of
-		   # OSX to extract PPC code from an universal binary, basically
-		   # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
-		   # newer.
-		   # Because '-arch pp7400' works on OSX 10.5 or higher this
-		   # test is only present in the '32-bit' branch, all other
-		   # branches require OSX 10.5 to compile.
-
-		   { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
-echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
-		   FN="test.$$"
-		   cat >${FN}.c <<-EOF
-		   	int main() { return 0; }
-EOF
-		   ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
-		   if test $? != 0 ; then
-			   rm ${FN} ${FN}.c
-			   { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
-echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
-		   else
-		   	lipo -extract -output "${FN}.out" -arch ppc7400 "${FN}" 2>/dev/null
-			if test $? != 0 ; then
-		   		LIPO_32BIT_FLAGS="-extract ppc -extract i386"
-			   	{ echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
-echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
-			else
-			   	{ echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
-echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
-			fi
-		        rm -f ${FN} ${FN}.c ${FN}.out
-		   fi
+		   LIPO_32BIT_FLAGS=""
 
 	         elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
 		   UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
 else
   ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 fi
 
 else
   ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 fi
 
 
 
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 { echo "$as_me:$LINENO: result: $was_it_defined" >&5
 echo "${ECHO_T}$was_it_defined" >&6; }
 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
 
 
 
+
 # SO is the extension of shared libraries `(including the dot!)
 # -- usually .so, .sl on HP-UX, .dll on Cygwin
 { echo "$as_me:$LINENO: checking SO" >&5
 	IRIX/5*) LDSHARED="ld -shared";;
 	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
 	SunOS/5*)
-		if test "$GCC" = "yes"
-		then LDSHARED='$(CC) -shared'
-		else LDSHARED='$(CC) -G';
+		if test "$GCC" = "yes" ; then
+			LDSHARED='$(CC) -shared'
+			LDCXXSHARED='$(CXX) -shared'
+		else
+			LDSHARED='$(CC) -G'
+			LDCXXSHARED='$(CXX) -G'
 		fi ;;
 	hp*|HP*)
-		if test "$GCC" = "yes"
-		then LDSHARED='$(CC) -shared'
-		else LDSHARED='ld -b';
+		if test "$GCC" = "yes" ; then
+			LDSHARED='$(CC) -shared'
+			LDCXXSHARED='$(CXX) -shared'
+		else
+			LDSHARED='ld -b'
 		fi ;;
 	OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
 	Darwin/1.3*)
 		LDSHARED='$(CC) $(LDFLAGS) -bundle'
+		LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
 		if test "$enable_framework" ; then
 			# Link against the framework. All externals should be defined.
 			BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 			LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+			LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 		else
 			# No framework. Ignore undefined symbols, assuming they come from Python
 			LDSHARED="$LDSHARED -undefined suppress"
+			LDCXXSHARED="$LDCXXSHARED -undefined suppress"
 		fi ;;
 	Darwin/1.4*|Darwin/5.*|Darwin/6.*)
 		LDSHARED='$(CC) $(LDFLAGS) -bundle'
+		LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
 		if test "$enable_framework" ; then
 			# Link against the framework. All externals should be defined.
 			BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 			LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+			LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 		else
 			# No framework, use the Python app as bundle-loader
 			BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
 			LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
+			LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
 		fi ;;
 	Darwin/*)
 		# Use -undefined dynamic_lookup whenever possible (10.3 and later).
 				LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
 			fi
 			LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
+			LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
 			BLDSHARED="$LDSHARED"
 		else
 			LDSHARED='$(CC) $(LDFLAGS) -bundle'
+			LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
 			if test "$enable_framework" ; then
 				# Link against the framework. All externals should be defined.
 				BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 				LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+				LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 			else
 				# No framework, use the Python app as bundle-loader
 				BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
 				LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
+				LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
 			fi
 		fi
 		;;
-	Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
-	BSD/OS*/4*) LDSHARED="gcc -shared";;
+	Linux*|GNU*|QNX*)
+		LDSHARED='$(CC) -shared'
+		LDCXXSHARED='$(CXX) -shared';;
+	BSD/OS*/4*)
+		LDSHARED="gcc -shared"
+		LDCXXSHARED="g++ -shared";;
 	FreeBSD*)
 		if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
 		then
 			LDSHARED='$(CC) -shared ${LDFLAGS}'
+			LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
 		else
 			LDSHARED="ld -Bshareable ${LDFLAGS}"
 		fi;;
 		if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
 		then
 				LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
+				LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
 		else
 				case `uname -r` in
 				[01].* | 2.[0-7] | 2.[0-7].*)
 				   ;;
 				*)
 				   LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
+				   LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
 				   ;;
 				esac
 		fi;;
-	NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
+	NetBSD*|DragonFly*)
+		LDSHARED="cc -shared ${LDFLAGS}"
+		LDCXXSHARED="c++ -shared ${LDFLAGS}";;
 	OpenUNIX*|UnixWare*)
-		if test "$GCC" = "yes"
-		then LDSHARED='$(CC) -shared'
-		else LDSHARED='$(CC) -G'
+		if test "$GCC" = "yes" ; then
+			LDSHARED='$(CC) -shared'
+			LDCXXSHARED='$(CXX) -shared'
+		else
+			LDSHARED='$(CC) -G'
+			LDCXXSHARED='$(CXX) -G'
 		fi;;
-	SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
-	CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
-	atheos*) LDSHARED="gcc -shared";;
+	SCO_SV*)
+		LDSHARED='$(CC) -Wl,-G,-Bexport'
+		LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
+	CYGWIN*)
+		LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
+		LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
+	atheos*)
+		LDSHARED="gcc -shared"
+		LDCXXSHARED="g++ -shared";;
 	*)	LDSHARED="ld";;
 	esac
 fi
 { echo "$as_me:$LINENO: result: $LDSHARED" >&5
 echo "${ECHO_T}$LDSHARED" >&6; }
+LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
 BLDSHARED=${BLDSHARED-$LDSHARED}
 # CCSHARED are the C *flags* used to create objects to go into a shared
 # library (module) -- this is only needed for a few systems
 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; }
   $EGREP "yes" >/dev/null 2>&1; then
   ipv6type=$i
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		kame)
 				ipv6libdir=/usr/local/v6/lib
 				ipv6trylibc=yes
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		linux-glibc)
   ipv6type=$i;
 				ipv6trylibc=yes
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		linux-inet6)
 				ipv6lib=inet6;
 				ipv6libdir=/usr/local/v6/lib
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		v6d)
 				ipv6libdir=/usr/local/v6/lib;
 				BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		zeta)
 				ipv6lib=inet6;
 				ipv6libdir=/usr/local/v6/lib
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 			;;
 		esac
 _ACEOF
 
 fi
-rm -f conftest*
+rm -f -r conftest*
 
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 fi
 
 _ACEOF
 
 fi
-rm -f conftest*
+rm -f -r conftest*
 
 fi
 
 LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
 SO!$SO$ac_delim
 LDSHARED!$LDSHARED$ac_delim
-BLDSHARED!$BLDSHARED$ac_delim
+LDCXXSHARED!$LDCXXSHARED$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+BLDSHARED!$BLDSHARED$ac_delim
 CCSHARED!$CCSHARED$ac_delim
 LINKFORSHARED!$LINKFORSHARED$ac_delim
 CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

File configure.in

 	        if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
 		   UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
 		   ARCH_RUN_32BIT=""
-		   LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
-
-
-		   # You have to use different flags on various versions of
-		   # OSX to extract PPC code from an universal binary, basically
-		   # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
-		   # newer. 
-		   # Because '-arch pp7400' works on OSX 10.5 or higher this
-		   # test is only present in the '32-bit' branch, all other
-		   # branches require OSX 10.5 to compile.
-			
-		   AC_MSG_CHECKING(lipo flag for extracting ppc code)
-		   FN="test.$$"
-		   cat >${FN}.c <<-EOF
-		   	int main() { return 0; }
-EOF
-		   ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
-		   if test $? != 0 ; then
-			   rm ${FN} ${FN}.c
-			   AC_MSG_RESULT([failed, assumee -extract ppc7400])
-		   else
-		   	lipo -extract -output "${FN}.out" -arch ppc7400 "${FN}" 2>/dev/null
-			if test $? != 0 ; then
-		   		LIPO_32BIT_FLAGS="-extract ppc -extract i386"
-			   	AC_MSG_RESULT("'-extract ppc'")
-			else
-			   	AC_MSG_RESULT("'-extract ppc7400'")
-			fi
-		        rm -f ${FN} ${FN}.c ${FN}.out
-		   fi
+		   LIPO_32BIT_FLAGS=""
 
 	         elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
 		   UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"