]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2446. [func] Add a new log message about build options on startup.
authorTatuya JINMEI 神明達哉 <jinmei@isc.org>
Tue, 23 Sep 2008 17:25:47 +0000 (17:25 +0000)
committerTatuya JINMEI 神明達哉 <jinmei@isc.org>
Tue, 23 Sep 2008 17:25:47 +0000 (17:25 +0000)
A new command-line option '-V' for named is also
provided to show this information. [RT# 18645]

CHANGES
bin/named/Makefile.in
bin/named/include/named/globals.h
bin/named/main.c
bin/named/named.docbook
configure.in

diff --git a/CHANGES b/CHANGES
index 1840256760efed453377f0c76d199718c9022313..1d05d06380aceaedaed753319dc2f4ba87098888 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+2446.  [func]          Add a new log message about build options on startup.
+                       A new command-line option '-V' for named is also
+                       provided to show this information. [RT# 18645]
+
 2445.  [doc]           ARM out-of-date on empty reverse zones (list includes
                        RFC1918 address, but these are not yet compiled in).
                        [RT #18578]
index c07d4dfa154a01602b25f44c0e438ce3ecc87df0..4d800a69edafe466d6a2887b96c0c43e9251ff9e 100644 (file)
@@ -13,7 +13,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: Makefile.in,v 1.100 2008/03/31 05:00:29 marka Exp $
+# $Id: Makefile.in,v 1.101 2008/09/23 17:25:47 jinmei Exp $
 
 srcdir =       @srcdir@
 VPATH =                @srcdir@
@@ -21,6 +21,8 @@ top_srcdir =  @top_srcdir@
 
 @BIND9_VERSION@
 
+@BIND9_CONFIGARGS@
+
 @BIND9_MAKE_INCLUDES@
 
 #
@@ -105,6 +107,7 @@ MANOBJS =   ${MANPAGES} ${HTMLPAGES}
 main.@O@: main.c
        ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
                -DVERSION=\"${VERSION}\" \
+               -DCONFIGARGS="\"${CONFIGARGS}\"" \
                -DNS_LOCALSTATEDIR=\"${localstatedir}\" \
                -DNS_SYSCONFDIR=\"${sysconfdir}\" -c ${srcdir}/main.c
 
index bf12083bc9284c06518ea5b9e18cd0637f3488ae..e218d2f05b381f37aa587b0d022cb80f9572ee13 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: globals.h,v 1.75 2008/01/02 23:47:01 tbox Exp $ */
+/* $Id: globals.h,v 1.76 2008/09/23 17:25:47 jinmei Exp $ */
 
 #ifndef NAMED_GLOBALS_H
 #define NAMED_GLOBALS_H 1
@@ -58,6 +58,7 @@ EXTERN isc_timermgr_t *               ns_g_timermgr           INIT(NULL);
 EXTERN isc_socketmgr_t *       ns_g_socketmgr          INIT(NULL);
 EXTERN cfg_parser_t *          ns_g_parser             INIT(NULL);
 EXTERN const char *            ns_g_version            INIT(VERSION);
+EXTERN const char *            ns_g_configargs         INIT(CONFIGARGS);
 EXTERN in_port_t               ns_g_port               INIT(0);
 EXTERN in_port_t               lwresd_g_listenport     INIT(0);
 
index 005485f61902ad76f90f4cba2861c6fbd74934e4..ec65990ff7f10f1cf3fd042f75dda9d3006f517a 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: main.c,v 1.163 2008/08/20 23:57:59 jinmei Exp $ */
+/* $Id: main.c,v 1.164 2008/09/23 17:25:47 jinmei Exp $ */
 
 /*! \file */
 
@@ -358,7 +358,7 @@ parse_command_line(int argc, char *argv[]) {
        isc_commandline_errprint = ISC_FALSE;
        while ((ch = isc_commandline_parse(argc, argv,
                                           "46c:C:d:fgi:lm:n:N:p:P:"
-                                          "sS:t:T:u:vx:")) != -1) {
+                                          "sS:t:T:u:vVx:")) != -1) {
                switch (ch) {
                case '4':
                        if (disable4)
@@ -462,6 +462,10 @@ parse_command_line(int argc, char *argv[]) {
                case 'v':
                        printf("BIND %s\n", ns_g_version);
                        exit(0);
+               case 'V':
+                       printf("BIND %s built with %s\n", ns_g_version,
+                               ns_g_configargs);
+                       exit(0);
                case '?':
                        usage();
                        if (isc_commandline_option == '?')
@@ -669,6 +673,9 @@ setup(void) {
                      ISC_LOG_NOTICE, "starting BIND %s%s", ns_g_version,
                      saved_command_line);
 
+       isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "built with %s", ns_g_configargs);
+
        /*
         * Get the initial resource limits.
         */
index 3948eb35cfaf66ccbfcdcc79092b84c49a7d86c8..3fe94396c2c73ca197a763a7152d338bdba5406b 100644 (file)
@@ -18,7 +18,7 @@
  - PERFORMANCE OF THIS SOFTWARE.
 -->
 
-<!-- $Id: named.docbook,v 1.21 2008/08/21 23:47:18 tbox Exp $ -->
+<!-- $Id: named.docbook,v 1.22 2008/09/23 17:25:47 jinmei Exp $ -->
 <refentry id="man.named">
   <refentryinfo>
     <date>June 30, 2000</date>
@@ -69,6 +69,7 @@
       <arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
       <arg><option>-u <replaceable class="parameter">user</replaceable></option></arg>
       <arg><option>-v</option></arg>
+      <arg><option>-V</option></arg>
       <arg><option>-x <replaceable class="parameter">cache-file</replaceable></option></arg>
     </cmdsynopsis>
   </refsynopsisdiv>
         </listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term>-V</term>
+        <listitem>
+          <para>
+            Report the version number and build options, and exit.
+          </para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term>-x <replaceable class="parameter">cache-file</replaceable></term>
         <listitem>
index 3353218bb93522fb95f3400cf945537358072af5..8303dcc724a80de0994dafa2007a216bb46c438d 100644 (file)
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
 esyscmd([sed "s/^/# /" COPYRIGHT])dnl
 AC_DIVERT_POP()dnl
 
-AC_REVISION($Revision: 1.447 $)
+AC_REVISION($Revision: 1.448 $)
 
 AC_INIT(lib/dns/name.c)
 AC_PREREQ(2.59)
@@ -2662,6 +2662,18 @@ BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
 BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
 AC_SUBST(BIND9_VERSION)
 
+if test -z "$ac_configure_args"; then
+       BIND9_CONFIGARGS="defaults"
+else
+       for a in $ac_configure_args
+       do
+               BIND9_CONFIGARGS="$BIND9_CONFIGARGS $a"
+       done
+fi
+BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`"
+BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}"
+AC_SUBST(BIND9_CONFIGARGS)
+
 AC_SUBST_FILE(LIBISC_API)
 LIBISC_API=$srcdir/lib/isc/api