Permalink
Browse files

Show built-in features in --version output

  • Loading branch information...
1 parent cd91689 commit 3613a51c4a6b2664cb5719413239bbabf889ba95 @zeha zeha committed Aug 24, 2013
Showing with 40 additions and 0 deletions.
  1. +6 −0 configure.ac
  2. +1 −0 pdns/pdns_recursor.cc
  3. +1 −0 pdns/receiver.cc
  4. +31 −0 pdns/version.cc
  5. +1 −0 pdns/version.hh
View
@@ -269,6 +269,11 @@ then
AC_DEFINE(HAVE_BOTAN18,1,[If we have botan 1.8])
fi
+if test "x$enable_cryptopp" = "xyes"
+then
+ AC_DEFINE(HAVE_CRYPTOPP,1,[If we have cryptopp])
+fi
+
AC_ARG_ENABLE(remotebackend_http, AC_HELP_STRING([--enable-remotebackend-http],[enable HTTP connector for remotebackend]),[enable_remotebackend_http=yes], [enable_remotebackend_http=no])
AC_MSG_CHECKING(whether to enable http connector in remotebackend)
AC_MSG_RESULT($enable_remotebackend_http)
@@ -327,6 +332,7 @@ AC_ARG_WITH(socketdir, AC_HELP_STRING([--with-socketdir],[where the controlsocke
AC_SUBST(moduledirs)
AC_SUBST(moduleobjects)
AC_SUBST(modulelibs)
+AC_DEFINE_UNQUOTED(PDNS_MODULES,"$modules", [Built-in modules])
AC_MSG_CHECKING(whether we will be building the server)
AC_ARG_ENABLE(pdns-server,
@@ -2115,6 +2115,7 @@ int main(int argc, char **argv)
}
if(::arg().mustDo("version")) {
showProductVersion();
+ showBuildConfiguration();
exit(99);
}
View
@@ -425,6 +425,7 @@ int main(int argc, char **argv)
if(::arg().mustDo("version")) {
showProductVersion();
+ showBuildConfiguration();
exit(99);
}
View
@@ -46,6 +46,37 @@ void showProductVersion()
"according to the terms of the GPL version 2." << endl;
}
+void showBuildConfiguration()
+{
+ theL()<<Logger::Warning<<"Features: "<<
+#ifdef HAVE_BOTAN110
+ "botan1.10 " <<
+#endif
+#ifdef HAVE_BOTAN18
+ "botan1.8" <<
+#endif
+#ifdef HAVE_CRYPTOPP
+ "cryptopp " <<
+#endif
+#ifdef HAVE_LIBDL
+ "libdl " <<
+#endif
+#ifdef HAVE_LUA
+ "lua " <<
+#endif
+#ifdef REMOTEBACKEND_HTTP
+ "remotebackend-http" <<
+#endif
+#ifdef VERBOSELOG
+ "verboselog" <<
+#endif
+ endl;
+#ifdef PDNS_MODULES
+ // Auth only
+ theL()<<Logger::Warning<<"Built-in modules: "<<PDNS_MODULES<<endl;
+#endif
+}
+
string fullVersionString()
{
ostringstream s;
View
@@ -22,6 +22,7 @@
string compilerVersion();
void showProductVersion();
+void showBuildConfiguration();
string fullVersionString();
void versionSetProduct(string product);

0 comments on commit 3613a51

Please sign in to comment.