From 888c939a755840d37b6695c525c3c0db6b114a4d Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 2 Feb 2017 13:47:19 +0000 Subject: [PATCH] Include enabled compile-time build options in the help header. --- dump1090.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/dump1090.c b/dump1090.c index d3d6076..82eda50 100644 --- a/dump1090.c +++ b/dump1090.c @@ -260,11 +260,28 @@ void snipMode(int level) { // ================================ Main ==================================== // void showHelp(void) { - printf( - "-----------------------------------------------------------------------------\n" - "| dump1090 ModeS Receiver %45s |\n" - "-----------------------------------------------------------------------------\n", - MODES_DUMP1090_VARIANT " " MODES_DUMP1090_VERSION); + + printf("-----------------------------------------------------------------------------\n"); + printf("| dump1090 ModeS Receiver %45s |\n", MODES_DUMP1090_VARIANT " " MODES_DUMP1090_VERSION); + printf("| build options: %-58s |\n", + "" +#ifdef ENABLE_RTLSDR + "ENABLE_RTLSDR " +#endif +#ifdef ENABLE_BLADERF + "ENABLE_BLADERF " +#endif +#ifdef SC16Q11_TABLE_BITS + // This is a little silly, but that's how the preprocessor works.. +#define _stringize(x) #x +#define stringize(x) _stringize(x) + "SC16Q11_TABLE_BITS=" stringize(SC16Q11_TABLE_BITS) +#undef stringize +#undef _stringize +#endif + ); + printf("-----------------------------------------------------------------------------\n"); + printf("\n"); sdrShowHelp();