Makefile
doc/Makefile
src/Makefile
+ src/build.h
)
uname=`uname`
esac
AM_CONDITIONAL(BUILD_LINUX, test x$uname = xLinux)
-AM_CONDITIONAL(BUILD_SOLARIS, test x$uname = xSunOS)
+#AM_CONDITIONAL(BUILD_SOLARIS, test x$uname = xSunOS)
AM_CONDITIONAL(BUILD_FREEBSD, test x$uname = xFreeBSD)
-AM_CONDITIONAL(BUILD_NETBSD, test x$uname = xNetBSD)
+#AM_CONDITIONAL(BUILD_NETBSD, test x$uname = xNetBSD)
# AM_CONDITIONAL(BUILD_OPENBSD, test x$uname = xOpenBSD)
+BUILD_DATE=$(LANG=en_US LC_ALL=en_US LOCALE=en_US date)
+BUILD_ARCH="$(uname -sr) ($(uname -m))"
+AC_SUBST(BUILD_DATE)
+AC_SUBST(BUILD_ARCH)
+
dnl
dnl XFT option
dnl
PTHREAD_LIBS = -lpthread
endif
-if BUILD_SOLARIS
-solaris = solaris.c
-endif
+#if BUILD_SOLARIS
+#solaris = solaris.c
+#endif
if BUILD_FREEBSD
freebsd = freebsd.c
PTHREAD_LIBS = -pthread
endif
-if BUILD_NETBSD
-netbsd = netbsd.c
-endif
+#if BUILD_NETBSD
+#netbsd = netbsd.c
+#endif
if BUILD_PORT_MONITORS
port_monitors = libtcp-portmon.h libtcp-portmon.c hash.h hash.c
--- /dev/null
+#ifndef __BUILD_H
+#define __BUILD_H
+
+/* Conky build info */
+
+#define BUILD_DATE "@BUILD_DATE@"
+#define BUILD_ARCH "@BUILD_ARCH@"
+
+#endif /* __BUILD_H */
#include <iconv.h>
#endif
+#include "build.h"
+
#define CONFIG_FILE "$HOME/.conkyrc"
#define MAIL_FILE "$MAIL"
#define MAX_IF_BLOCK_DEPTH 5
static void set_font();
+static void print_version()
+{
+ printf("Conky %s compiled %s for %s\n",
+ VERSION, BUILD_DATE, BUILD_ARCH);
+ exit(0);
+}
+
int addfont(const char *data_in)
{
if (font_count > MAX_FONTS) {
switch (c) {
case 'v':
case 'V':
- printf
- ("Conky " VERSION " compiled " __DATE__ "\n");
- return 0;
-
+ print_version();
case 'c':
/* if current_config is set to a strdup of CONFIG_FILE, free it (even
* though free() does the NULL check itself;), then load optarg value */