add support for machine type too
This commit is contained in:
parent
00bf08178c
commit
d6e5e810ab
|
@ -229,8 +229,12 @@ main(int argc, char *argv[])
|
||||||
if(!a_strcmp("-v", argv[1]) || !a_strcmp("--version", argv[1]))
|
if(!a_strcmp("-v", argv[1]) || !a_strcmp("--version", argv[1]))
|
||||||
{
|
{
|
||||||
printf("awesome version " VERSION " (" RELEASE ")\ncompiled on "__DATE__" "__TIME__);
|
printf("awesome version " VERSION " (" RELEASE ")\ncompiled on "__DATE__" "__TIME__);
|
||||||
#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
|
#if defined(__GNUC__) \
|
||||||
printf(" by gcc version %d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
|
&& defined(__GNUC_MINOR__) \
|
||||||
|
&& defined(__GNUC_PATCHLEVEL__) \
|
||||||
|
&& defined(AWESOME_COMPILE_MACHINE)
|
||||||
|
printf(" for %s by gcc version %d.%d.%d",
|
||||||
|
AWESOME_COMPILE_MACHINE, __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
|
||||||
#endif
|
#endif
|
||||||
#if defined(AWESOME_COMPILE_HOST) && defined(AWESOME_COMPILE_BY)
|
#if defined(AWESOME_COMPILE_HOST) && defined(AWESOME_COMPILE_BY)
|
||||||
printf(" (" AWESOME_COMPILE_BY "@" AWESOME_COMPILE_HOST ")");
|
printf(" (" AWESOME_COMPILE_BY "@" AWESOME_COMPILE_HOST ")");
|
||||||
|
|
|
@ -25,8 +25,9 @@ subdir-objects
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([RELEASE], ["Productivity Breaker"])
|
AC_DEFINE_UNQUOTED([RELEASE], ["Productivity Breaker"])
|
||||||
AC_DEFINE_UNQUOTED([AWESOME_COMPILE_HOST], ["`hostname`"])
|
AC_DEFINE_UNQUOTED([AWESOME_COMPILE_HOST], ["`type hostname > /dev/null && hostname`"])
|
||||||
AC_DEFINE_UNQUOTED([AWESOME_COMPILE_BY], ["`whoami`"])
|
AC_DEFINE_UNQUOTED([AWESOME_COMPILE_BY], ["`type whoami > /dev/null && whoami`"])
|
||||||
|
AC_DEFINE_UNQUOTED([AWESOME_COMPILE_MACHINE], ["`type uname > /dev/null && uname -m`"])
|
||||||
|
|
||||||
AC_MSG_CHECKING([package version according to autoconf])
|
AC_MSG_CHECKING([package version according to autoconf])
|
||||||
AC_MSG_RESULT([${PACKAGE_VERSION}])
|
AC_MSG_RESULT([${PACKAGE_VERSION}])
|
||||||
|
|
Loading…
Reference in New Issue