[syslog-ng] [PATCH 1/2] configure: Allow disabling the compile date
Gergely Nagy
algernon at balabit.hu
Tue Aug 30 19:52:37 CEST 2011
Add a new configure flag (--without-compile-date) that will remove the
compile date from the --version output, and not include it in the
binary at all.
Signed-off-by: Gergely Nagy <algernon at balabit.hu>
---
configure.in | 9 +++++++++
syslog-ng/main.c | 2 ++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in
index 13ff6bf..daa2b4d 100644
--- a/configure.in
+++ b/configure.in
@@ -185,6 +185,14 @@ AC_ARG_ENABLE(systemd,
[ --enable-systemd Enable systemd support (default: auto)]
,,enable_systemd="auto")
+AC_ARG_WITH(compile-date,
+ [ --without-compile-date Do not include the compile date in the binary]
+ ,, wcmp_date="1")
+if test "x$wcmp_date" != "xno"; then
+ wcmp_date="1"
+else
+ wcmp_date="0"
+fi
patheval()
{
@@ -1033,6 +1041,7 @@ fi
AC_DEFINE_UNQUOTED(MODULE_PATH, "$module_path", [module search path])
AC_DEFINE_UNQUOTED(DEFAULT_MODULES, "$default_modules", [The default set of modules loaded if an old config version is used or autoload-compiled-modules is 1])
+AC_DEFINE_UNQUOTED(WITH_COMPILE_DATE, $wcmp_date, [Include the compile date in the binary])
AC_DEFINE_UNQUOTED(ENABLE_DEBUG, `enable_value $enable_debug`, [Enable debugging])
AC_DEFINE_UNQUOTED(ENABLE_SSL, `enable_value $enable_ssl`, [Enable SSL support])
AC_DEFINE_UNQUOTED(ENABLE_GPROF, `enable_value $enable_gprof`, [Enable gcc profiling])
diff --git a/syslog-ng/main.c b/syslog-ng/main.c
index 4ee63ce..a03c253 100644
--- a/syslog-ng/main.c
+++ b/syslog-ng/main.c
@@ -128,7 +128,9 @@ version(void)
printf(PACKAGE " " VERSION "\n"
"Installer-Version: %s\n"
"Revision: " SOURCE_REVISION "\n"
+#if WITH_COMPILE_DATE
"Compile-Date: " __DATE__ " " __TIME__ "\n"
+#endif
"Default-Modules: %s\n"
"Available-Modules: ",
installer_version,
--
1.7.5.4
More information about the syslog-ng
mailing list