Skip to content

Commit 6992c64

Browse files
committed
configure.ac: update directory space check
OMPI_CANONICALIZE_PATH broke on MacOS when `/usr/bin/python` disappeared (in favor of `/usr/bin/python3`) in MacOS Monterrey. Make things simpler by not canonicalizing the path to begin with. Specifically: just look at `pwd`, $srcdir, and $prefix. Even if $srcdir and/or $prefix are relative to the build dir, the union of all the checks will ensure that none of the target paths will contain spaces. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
1 parent f230304 commit 6992c64

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

configure.ac

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -128,29 +128,10 @@ AC_DEFUN([OMPI_CHECK_DIR_FOR_SPACES],[
128128
AC_MSG_ERROR([Cannot continue.])])
129129
])
130130

131-
AC_DEFUN([OMPI_CANONICALIZE_PATH],[
132-
case $host_os in
133-
darwin*)
134-
# MacOS does not have "readlink -f" or realpath (at least as
135-
# of MacOS Cataline / 10.15). Instead, use Python, because we
136-
# know MacOS comes with a /usr/bin/python that has
137-
# os.path.realpath.
138-
$2=`/usr/bin/python -c 'import os; print os.path.realpath("'$1'")'`
139-
;;
140-
*)
141-
$2=`readlink -f $1`
142-
;;
143-
esac
144-
])
145-
146-
OMPI_CHECK_DIR_FOR_SPACES([$srcdir], [a], [source tree])
147-
OMPI_CANONICALIZE_PATH([$srcdir], [ompi_dir])
148-
OMPI_CHECK_DIR_FOR_SPACES([$ompi_dir], [an], [absolute source tree])
149-
OMPI_CANONICALIZE_PATH([.], [ompi_dir])
131+
ompi_dir=`pwd`
150132
OMPI_CHECK_DIR_FOR_SPACES([$ompi_dir], [a], [build tree])
133+
OMPI_CHECK_DIR_FOR_SPACES([$srcdir], [a], [source tree])
151134
OMPI_CHECK_DIR_FOR_SPACES([$prefix], [a], [prefix])
152-
OMPI_CANONICALIZE_PATH([$prefix], [ompi_dir])
153-
OMPI_CHECK_DIR_FOR_SPACES([$ompi_dir], [an], [absolute prefix])
154135

155136
opal_show_subtitle "Checking versions"
156137

0 commit comments

Comments
 (0)