change codename
[awesome.git] / common / version.c
blob15ab41b37522a9e9dd466a1ed914fa76abf96467
1 /*
2 * version.c - version message utility functions
4 * Copyright © 2008 Julien Danjou <julien@danjou.info>
5 * Copyright © 2008 Hans Ulrich Niedermann <hun@n-dimensional.de>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #include <stdlib.h>
23 #include <stdio.h>
25 #include "config.h"
26 #include "common/version.h"
27 #include "awesome-version-internal.h"
29 /** \brief Print version message and quit program.
30 * \param executable program name
32 void
33 eprint_version(void)
35 printf("awesome " AWESOME_VERSION
36 " (" AWESOME_RELEASE ")\n"
37 " • Build:");
38 #if defined(__DATE__) && defined(__TIME__)
39 printf(" " __DATE__ " " __TIME__);
40 #endif
41 printf(" for %s", AWESOME_COMPILE_MACHINE);
42 #if defined(__GNUC__) \
43 && defined(__GNUC_MINOR__) \
44 && defined(__GNUC_PATCHLEVEL__)
45 printf(" by gcc version %d.%d.%d",
46 __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
47 #endif
48 printf(" (%s@%s)\n", AWESOME_COMPILE_BY, AWESOME_COMPILE_HOSTNAME);
49 printf(" • D-Bus support: ");
50 #ifdef WITH_DBUS
51 printf("✔\n");
52 #else
53 printf("✘\n");
54 #endif
55 exit(EXIT_SUCCESS);
58 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80