mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-24 11:55:43 +00:00
- Comment out NetBSD/SanOS garbage
- Print OS information in `conky -v` git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@688 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
d21378f258
commit
27731c50dc
10
configure.ac
10
configure.ac
@ -15,6 +15,7 @@ AC_CONFIG_FILES(
|
||||
Makefile
|
||||
doc/Makefile
|
||||
src/Makefile
|
||||
src/build.h
|
||||
)
|
||||
|
||||
uname=`uname`
|
||||
@ -50,11 +51,16 @@ case $uname in
|
||||
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
|
||||
|
@ -37,18 +37,18 @@ linux = linux.c top.c
|
||||
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
|
||||
|
9
src/build.h.in
Normal file
9
src/build.h.in
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef __BUILD_H
|
||||
#define __BUILD_H
|
||||
|
||||
/* Conky build info */
|
||||
|
||||
#define BUILD_DATE "@BUILD_DATE@"
|
||||
#define BUILD_ARCH "@BUILD_ARCH@"
|
||||
|
||||
#endif /* __BUILD_H */
|
14
src/conky.c
14
src/conky.c
@ -41,6 +41,8 @@
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
|
||||
#include "build.h"
|
||||
|
||||
#define CONFIG_FILE "$HOME/.conkyrc"
|
||||
#define MAIL_FILE "$MAIL"
|
||||
#define MAX_IF_BLOCK_DEPTH 5
|
||||
@ -104,6 +106,13 @@ struct font_list *fonts = NULL;
|
||||
|
||||
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) {
|
||||
@ -6874,10 +6883,7 @@ int main(int argc, char **argv)
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user