Commit 2c19ea21 authored by Jehan's avatar Jehan

app: add compiler info in `gimp -v`.

parent 415f869f
......@@ -115,6 +115,7 @@ AM_CPPFLAGS = \
-DGIMP_USER_VERSION=\"$(GIMP_USER_VERSION)\" \
-DG_LOG_DOMAIN=\"Gimp\" \
-DGIMP_APP_GLUE_COMPILATION \
-DCC_VERSION=\""$(CC_VERSION)"\" \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
$(PANGOCAIRO_CFLAGS) \
......
......@@ -142,6 +142,7 @@ gimp_version_show (gboolean be_verbose)
{
g_print ("git-describe: %s", GIMP_GIT_VERSION);
g_print ("\n");
g_print ("C compiler:\n%s", CC_VERSION);
g_print ("\n");
gimp_show_library_versions ();
......
......@@ -539,7 +539,23 @@ WARNING: GCC 7.2.0 has a serious bug affecting GEGL/GIMP. We advise
further versions are fine).
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'`"
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'`"
if test $? != 0; then
CC_VERSION="\\\\t`$CC -v 2>&1` | sed -e 's/$/\\\\n\\\\t/g' | tr -d '\n'"
if test $? != 0; then
CC_VERSION="\\\\t`$CC -V 2>&1` | sed -e 's/$/\\\\n\\\\t/g' | tr -d '\n'"
if test $? != 0; then
CC_VERSION="\\\\t`$CC -qversion 2>&1` | sed -e 's/$/\\\\n\\\\t/g' | tr -d '\n'"
fi
fi
fi
fi
AC_SUBST(CC_VERSION)
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment