[syslog-ng] [PATCH 1/2] configure: Allow disabling the compile date

Peter Czanik czanik at balabit.hu
Tue Sep 6 14:23:33 CEST 2011


Hello,
Just tested on this mornings git, and this option does not seem to work.
I run configure with --without-compile-date, but the resulting syslog-ng
binary still shows the date. Tested on openSUSE Factory and FreeBSD 8.1.
Bye,
CzP

On 08/30/2011 07:52 PM, Gergely Nagy wrote:
> 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,


-- 
Peter Czanik (CzP) <czanik at balabit.hu>
BalaBit IT Security / syslog-ng upstream
http://czanik.blogs.balabit.com/




More information about the syslog-ng mailing list