Handle quoted assignment arguments with whitespace

If we are going to set e.g. CXXFLAGS to more than one value, the
quotes must be preserved at the same time as the list is laundered
(for autotools-variables)
This commit is contained in:
Roland Kaufmann
2013-03-04 22:48:44 +01:00
parent 78a0a11e3d
commit a09d9fa919

5
configure vendored
View File

@@ -280,7 +280,10 @@ done
shift $((OPTIND-1))
# remove Autotools-specific variables
ENVVARS=${@/ACLOCAL_*=*/}
for a in "$@"; do
a="${a/ACLOCAL_*=*/}"
[ -n "$a" ] && ENVVARS="$ENVVARS \"${a/\"/\\\"}\""
done
# pass everything on to CMake
CMDLINE="env ${ENVVARS} ${CMAKE_COMMAND} \"${srcdir}\" \"-DCMAKE_INSTALL_PREFIX=$prefix\" -DCMAKE_BUILD_TYPE=${buildtype}${pch_use}${silent_rules}${debug_loc} ${FEATURES}"