[gimp] app: add compiler info in `gimp -v`.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add compiler info in `gimp -v`.
- Date: Sat, 9 Sep 2017 23:22:19 +0000 (UTC)
commit 2c19ea21457b5e79b1c8621ed79337f07c273143
Author: Jehan <jehan girinstud io>
Date: Sun Sep 10 01:20:13 2017 +0200
app: add compiler info in `gimp -v`.
app/Makefile.am | 1 +
app/version.c | 1 +
configure.ac | 16 ++++++++++++++++
3 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index 97807cb..59591e9 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -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) \
diff --git a/app/version.c b/app/version.c
index 0a54217..de439bc 100644
--- a/app/version.c
+++ b/app/version.c
@@ -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 ();
diff --git a/configure.ac b/configure.ac
index dcff8d8..33665f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]