[Python-checkins] Allow configure to handle PATH elements with spaces (#3935) (#3937)

Ned Deily webhook-mailer at python.org
Mon Oct 9 14:31:02 EDT 2017


https://github.com/python/cpython/commit/ac360fc56c111ec19895ba445e0ec6863f825625
commit: ac360fc56c111ec19895ba445e0ec6863f825625
branch: 3.6
author: Ned Deily <nad at python.org>
committer: GitHub <noreply at github.com>
date: 2017-10-09T14:30:59-04:00
summary:

Allow configure to handle PATH elements with spaces (#3935) (#3937)

Fix some tests in ./configure for determining macOS compiler choices that could fail if a $PATH element contained spaces.

files:
M configure
M configure.ac

diff --git a/configure b/configure
index ed305a89b4b..0b950502d2b 100755
--- a/configure
+++ b/configure
@@ -3536,14 +3536,14 @@ then
 		for as_dir in $PATH
 		do
 			IFS=$as_save_IFS
-			if test -x $as_dir/gcc; then
+			if test -x "${as_dir}/gcc"; then
 				if test -z "${found_gcc}"; then
-					found_gcc=$as_dir/gcc
+					found_gcc="${as_dir}/gcc"
 				fi
 			fi
-			if test -x $as_dir/clang; then
+			if test -x "${as_dir}/clang"; then
 				if test -z "${found_clang}"; then
-					found_clang=$as_dir/clang
+					found_clang="${as_dir}/clang"
 				fi
 			fi
 		done
diff --git a/configure.ac b/configure.ac
index e400fa187de..056c5db4a68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -642,14 +642,14 @@ then
 		for as_dir in $PATH
 		do
 			IFS=$as_save_IFS
-			if test -x $as_dir/gcc; then
+			if test -x "${as_dir}/gcc"; then
 				if test -z "${found_gcc}"; then
-					found_gcc=$as_dir/gcc
+					found_gcc="${as_dir}/gcc"
 				fi
 			fi
-			if test -x $as_dir/clang; then
+			if test -x "${as_dir}/clang"; then
 				if test -z "${found_clang}"; then
-					found_clang=$as_dir/clang
+					found_clang="${as_dir}/clang"
 				fi
 			fi
 		done



More information about the Python-checkins mailing list