build: track config args
Record the ./configure arguments used and make them user-visible.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
diff --git a/configure.ac b/configure.ac
index 33a1cd0..5a3f816 100755
--- a/configure.ac
+++ b/configure.ac
@@ -8,6 +8,8 @@
AC_PREREQ(2.53)
AC_INIT(Quagga, 0.99.24-rc1, [https://bugzilla.quagga.net])
+CONFIG_ARGS="$*"
+AC_SUBST(CONFIG_ARGS)
AC_CONFIG_SRCDIR(lib/zebra.h)
AC_CONFIG_MACRO_DIR([m4])
diff --git a/lib/command.c b/lib/command.c
index 8870a42..8317789 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -181,6 +181,7 @@
{
printf ("%s version %s\n", progname, QUAGGA_VERSION);
printf ("%s\n", QUAGGA_COPYRIGHT);
+ printf ("configured with:\n\t%s\n", QUAGGA_CONFIG_ARGS);
}
@@ -2951,6 +2952,8 @@
vty_out (vty, "Quagga %s (%s).%s", QUAGGA_VERSION, host.name?host.name:"",
VTY_NEWLINE);
vty_out (vty, "%s%s%s", QUAGGA_COPYRIGHT, GIT_INFO, VTY_NEWLINE);
+ vty_out (vty, "configured with:%s %s%s", VTY_NEWLINE,
+ QUAGGA_CONFIG_ARGS, VTY_NEWLINE);
return CMD_SUCCESS;
}
diff --git a/lib/version.h.in b/lib/version.h.in
index 7e9985f..aef1d09 100644
--- a/lib/version.h.in
+++ b/lib/version.h.in
@@ -45,6 +45,8 @@
#define QUAGGA_COPYRIGHT "Copyright 1996-2005 Kunihiro Ishiguro, et al."
+#define QUAGGA_CONFIG_ARGS "@CONFIG_ARGS@"
+
pid_t pid_output (const char *);
#ifndef HAVE_DAEMON