[config] Print build info in the log

This commit is contained in:
ejurgensen 2016-09-07 22:18:29 +02:00
parent 53e3a6a7b2
commit 3d6d4e8521
2 changed files with 28 additions and 0 deletions

View File

@ -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

View File

@ -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)
{