[gimp] configure.ac: escape backslash chars in compiler version string
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] configure.ac: escape backslash chars in compiler version string
- Date: Sun, 11 Nov 2018 10:49:39 +0000 (UTC)
commit c0b107531e65e47149c248449ca7bac8d20632ee
Author: Ell <ell_se yahoo com>
Date: Sun Nov 11 05:45:07 2018 -0500
configure.ac: escape backslash chars in compiler version string
When constructing CC_VERSION, escape backslash characters in the
compiler version string, so that they don't get interpreted as
escape sequences by the compiler. This is especially important on
Windows, where the version string of MinGW may contain backslash
characters as part of paths.
configure.ac | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7bfccdc972..5474e774f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -580,21 +580,23 @@ WARNING: GCC 7.2.0 has a serious bug affecting GEGL/GIMP. We advise
See https://bugzilla.gnome.org/show_bug.cgi?id=787222"
fi
# For GCC, use -v which has more information than --version.
- CC_VERSION="\\\\t`$CC -v 2>&1 | sed -e 's/$/\\\\n\\\\t/g' | tr -d '\n'`"
+ CC_VERSION="`$CC -v 2>&1`"
else
# This is the list of common options used by autotools to check
# versions for various compilers.
- CC_VERSION="\\\\t`$CC --version 2>&1 | sed -e 's/$/\\\\n\\\\t/g' | tr -d '\n'`"
+ CC_VERSION="`$CC --version 2>&1`"
if test $? != 0; then
- CC_VERSION="\\\\t`$CC -v 2>&1` | sed -e 's/$/\\\\n\\\\t/g' | tr -d '\n'"
+ CC_VERSION="`$CC -v 2>&1`"
if test $? != 0; then
- CC_VERSION="\\\\t`$CC -V 2>&1` | sed -e 's/$/\\\\n\\\\t/g' | tr -d '\n'"
+ CC_VERSION="`$CC -V 2>&1`"
if test $? != 0; then
- CC_VERSION="\\\\t`$CC -qversion 2>&1` | sed -e 's/$/\\\\n\\\\t/g' | tr -d '\n'"
+ CC_VERSION="`$CC -qversion 2>&1`"
fi
fi
fi
fi
+# Format and escape CC_VERSION
+CC_VERSION="\\t`echo "$CC_VERSION" | sed -e 's/\\\\/\\\\\\\\/g;s/$/\\\\n\\\\t/g' | tr -d '\n'`"
AC_SUBST(CC_VERSION)
AC_HEADER_STDC
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]