configure: abort if dirs with spaces are used
Abort early if the source directory, build directory, or prefix
contains spaces (either the supplied directory, or the canonicalized
version of the directory). This prevents users from getting cryptic
errors later in configure and/or make.
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
(cherry picked from commit 8841b12489
)
Этот коммит содержится в:
родитель
a4e8655fbe
Коммит
2e1808203b
20
configure.ac
20
configure.ac
@ -111,6 +111,26 @@ AM_SILENT_RULES([yes])
|
||||
# Make configure depend on the VERSION file, since it's used in AC_INIT
|
||||
AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
|
||||
|
||||
# Sanity checks
|
||||
AC_DEFUN([OMPI_CHECK_DIR_FOR_SPACES],[
|
||||
dir="$1"
|
||||
article="$2"
|
||||
label="$3"
|
||||
|
||||
AC_MSG_CHECKING([directory of $label])
|
||||
AC_MSG_RESULT([$dir])
|
||||
AS_IF([test -n "`echo $dir | grep ' '`"],
|
||||
[AC_MSG_WARN([This version of Open MPI does not support $article $label])
|
||||
AC_MSG_WARN([with a path that contains spaces])
|
||||
AC_MSG_ERROR([Cannot continue.])])
|
||||
])
|
||||
|
||||
OMPI_CHECK_DIR_FOR_SPACES([$srcdir], [a], [source tree])
|
||||
OMPI_CHECK_DIR_FOR_SPACES([`readlink -f $srcdir`], [an], [absolute source tree])
|
||||
OMPI_CHECK_DIR_FOR_SPACES([`readlink -f .`], [a], [build tree])
|
||||
OMPI_CHECK_DIR_FOR_SPACES([$prefix], [a], [prefix])
|
||||
OMPI_CHECK_DIR_FOR_SPACES([`readlink -f $prefix`], [an], [absolute prefix])
|
||||
|
||||
opal_show_subtitle "Checking versions"
|
||||
|
||||
# Get the version of OMPI that we are installing
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user