From 00bf08178cc278eaa0444cc0d2fb4236315b2fb4 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 24 Jan 2008 21:57:55 +0100 Subject: [PATCH] add some useless infos in version :-) --- awesome.c | 9 ++++++++- configure.ac | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/awesome.c b/awesome.c index 8ea726188..797ca252c 100644 --- a/awesome.c +++ b/awesome.c @@ -228,7 +228,14 @@ main(int argc, char *argv[]) args_ok = 0; if(!a_strcmp("-v", argv[1]) || !a_strcmp("--version", argv[1])) { - printf("awesome " VERSION " (" RELEASE ")\n"); + printf("awesome version " VERSION " (" RELEASE ")\ncompiled on "__DATE__" "__TIME__); +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) + printf(" by gcc version %d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__); +#endif +#if defined(AWESOME_COMPILE_HOST) && defined(AWESOME_COMPILE_BY) + printf(" (" AWESOME_COMPILE_BY "@" AWESOME_COMPILE_HOST ")"); +#endif + printf("\n"); return EXIT_SUCCESS; } else if(!a_strcmp("-h", argv[1]) || !a_strcmp("--help", argv[1])) diff --git a/configure.ac b/configure.ac index 901a44350..f35973823 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,8 @@ subdir-objects ]) AC_DEFINE_UNQUOTED([RELEASE], ["Productivity Breaker"]) +AC_DEFINE_UNQUOTED([AWESOME_COMPILE_HOST], ["`hostname`"]) +AC_DEFINE_UNQUOTED([AWESOME_COMPILE_BY], ["`whoami`"]) AC_MSG_CHECKING([package version according to autoconf]) AC_MSG_RESULT([${PACKAGE_VERSION}])