From b74aeb108e1adec74d596401a52d14b1c16feb25 Mon Sep 17 00:00:00 2001 From: Dimitri Stolnikov Date: Sun, 17 Feb 2013 00:11:22 +0100 Subject: [PATCH] print version information in startup message --- lib/config.h.in | 3 +++ lib/osmosdr_source_c_impl.cc | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/config.h.in b/lib/config.h.in index 0ca2be2..f48c591 100644 --- a/lib/config.h.in +++ b/lib/config.h.in @@ -1,6 +1,9 @@ #ifndef CONFIG_H_IN #define CONFIG_H_IN +#define GR_OSMOSDR_VERSION "@VERSION@" +#define GR_OSMOSDR_LIBVER "@LIBVER@" + #cmakedefine ENABLE_OSMOSDR #cmakedefine ENABLE_FCD #cmakedefine ENABLE_FILE diff --git a/lib/osmosdr_source_c_impl.cc b/lib/osmosdr_source_c_impl.cc index 47b1e48..ba17a83 100644 --- a/lib/osmosdr_source_c_impl.cc +++ b/lib/osmosdr_source_c_impl.cc @@ -113,7 +113,10 @@ osmosdr_source_c_impl::osmosdr_source_c_impl (const std::string &args) dev_types.push_back("miri"); #endif - std::cerr << "gr-osmosdr supported device types: "; + std::cerr << "gr-osmosdr (" + << GR_OSMOSDR_VERSION << " / " << GR_OSMOSDR_LIBVER + << ") supported device types:" << std::endl; + std::cerr << " " << std::flush; BOOST_FOREACH(std::string dev_type, dev_types) std::cerr << dev_type << " "; std::cerr << std::endl << std::flush;