From eafd2ac39fc4b608fc24b755670ff5138b9173ee Mon Sep 17 00:00:00 2001 From: Alex Lapenkou Date: Tue, 18 Jan 2022 17:20:57 -0800 Subject: [PATCH] Forbid spaces in prefix and exec_prefix Spaces in these are also not handled correctly by Make, so there's sense in not allowing that. --- configure.ac | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 6a5d082a..0661005d 100644 --- a/configure.ac +++ b/configure.ac @@ -131,12 +131,14 @@ abs_objroot="`pwd`/" AC_SUBST([abs_objroot]) dnl Munge install path variables. -if test "x$prefix" = "xNONE" ; then - prefix="/usr/local" -fi -if test "x$exec_prefix" = "xNONE" ; then - exec_prefix=$prefix -fi +case "$prefix" in + *\ * ) AC_MSG_ERROR([Prefix should not contain spaces]) ;; + "NONE" ) prefix="/usr/local" ;; +esac +case "$exec_prefix" in + *\ * ) AC_MSG_ERROR([Exec prefix should not contain spaces]) ;; + "NONE" ) exec_prefix=$prefix ;; +esac PREFIX=$prefix AC_SUBST([PREFIX]) BINDIR=`eval echo $bindir`