dnl
+dnl CONFIG_OUTPUT option
+dnl
+
+AC_ARG_ENABLE([config_output],
+ AC_HELP_STRING([--enable-config-output],
+ [enable printing a default config if requested @<:@default=no@:>@]),
+ [want_config_output="$enableval"], [want_config_output=no])
+
+AM_CONDITIONAL(BUILD_CONFIG_OUTPUT, test x$want_config_output = xyes)
+if test x$want_config_output = xyes; then
+ AC_DEFINE(CONFIG_OUTPUT, 1, [Define if you want default config printing support])
+fi
+
+dnl
dnl OWN_WINDOW option
dnl
bin_PROGRAMS = conky
+if BUILD_CONFIG_OUTPUT
+config_output = defconfig.h
+conky_DEPENDENCIES = $(config_output)
+BUILT_SOURCES = $(config_output)
+CLEANFILES = $(config_output)
+$(config_output): ../doc/conky.conf
+ sh ../text2c.sh $< $@ defconfig
+endif
+
if BUILD_AUDACIOUS
audacious = audacious.c audacious.h
endif
endif
conky_SOURCES = \
+ $(config_output) \
$(audacious) \
$(bmpx) \
common.c \
-lm
EXTRA_DIST = \
+ $(config_output) \
audacious.c \
audacious.h \
bmpx.c \
#include <iconv.h>
#endif
+#ifdef CONFIG_OUTPUT
+#include "defconfig.h"
+#endif
+
#include "build.h"
#include "temphelper.h"
#ifdef HAVE_XDBE
"b"
#endif
+#ifdef CONFIG_OUTPUT
+ "C"
+#endif
#endif /* X11 */
;
{ "version", 0, NULL, 'V' },
{ "debug", 0, NULL, 'D' },
{ "config", 1, NULL, 'c' },
+#ifdef CONFIG_OUTPUT
+ { "print-config", 0, NULL, 'C' },
+#endif
{ "daemonize", 0, NULL, 'd' },
#ifdef X11
{ "alignment", 1, NULL, 'a' },
case 'h':
print_help(argv[0]);
return 0;
+#ifdef CONFIG_OUTPUT
+ case 'C':
+ print_defconfig();
+ return 0;
+#endif
#ifdef X11
case 'w':
window.window = strtol(optarg, 0, 0);