From 3d6d4e85217f7c13e111ef243a175ee0b3a39c92 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Wed, 7 Sep 2016 22:18:29 +0200 Subject: [PATCH] [config] Print build info in the log --- configure.ac | 1 + src/main.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/configure.ac b/configure.ac index 0d4e6c58..a8d959ef 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,7 @@ AC_INIT([forked-daapd], [24.1]) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) +AC_DEFINE_UNQUOTED([BUILDDATE], ["`date -Idate`"], [Build date]) AM_INIT_AUTOMAKE([foreign -Wno-portability subdir-objects]) AC_USE_SYSTEM_EXTENSIONS diff --git a/src/main.c b/src/main.c index e64b5c79..4d24f96c 100644 --- a/src/main.c +++ b/src/main.c @@ -464,6 +464,7 @@ main(int argc, char **argv) char *logfile; char *ffid; char *pidfile; + char buildopts[256]; const char *gcry_version; sigset_t sigs; int sigfd; @@ -590,6 +591,32 @@ main(int argc, char **argv) DPRINTF(E_LOG, L_MAIN, "Forked Media Server Version %s taking off\n", VERSION); + /* Remember to check the size of buildopts when adding new opts */ + strcpy(buildopts, ""); +#ifdef ITUNES + strcat(buildopts, " --enable-itunes"); +#endif +#ifdef SPOTIFY + strcat(buildopts, " --enable-spotify"); +#endif +#ifdef LASTFM + strcat(buildopts, " --enable-lastfm"); +#endif +#ifdef CHROMECAST + strcat(buildopts, " --enable-chromecast"); +#endif +#ifdef MPD + strcat(buildopts, " --enable-mpd"); +#endif +#ifdef ALSA + strcat(buildopts, " --with-alsa"); +#endif +#ifdef PULSEAUDIO + strcat(buildopts, " --with-pulseaudio"); +#endif + + DPRINTF(E_LOG, L_MAIN, "Built %s with:%s\n", BUILDDATE, buildopts); + ret = av_lockmgr_register(ffmpeg_lockmgr); if (ret < 0) {