mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-26 04:26:14 -05:00
[config] Many updates to configuration and feature checks
- Added custom checks for libraries and pkgconfig modules that test library presence with additional checks for use of headers and functions with given options. Also support correct additional feature library checks using provided flags. - Added custom enable/disable feature macros to simplify their use. - Use custom CFLAGS and LIBS variables for Makefiles to simplify maintenance. - Update many feature checks from platform to function. - Streamline many function checks. - Correctly check gnutls, gcrypt and gpg-error libraries. - Fix chromecast and spotify config and compile on FreeBSD - Added inotify, signalfd and kqueue, and byte swap checks. - Many clarifications of error messages. - Correct json-c checks to properly use supplied CFLAGS. - Correct many quoting inconsistencies - Use __DATE__ in place of BUILDDATE - Use full path for gperf and antlr3 - Remove unnecessary CFLAGS - Added tests for pthread_setname_np parameters - Added tests for clock_gettime and timer_settime - Added tests for time.h - Test if pthread, dl and rt libs are required/available. - Updated checks for libunistring
This commit is contained in:
14
src/main.c
14
src/main.c
@@ -39,7 +39,7 @@
|
||||
|
||||
#ifdef HAVE_SIGNALFD
|
||||
# include <sys/signalfd.h>
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#else
|
||||
# include <sys/time.h>
|
||||
# include <sys/event.h>
|
||||
#endif
|
||||
@@ -374,7 +374,7 @@ signal_signalfd_cb(int fd, short event, void *arg)
|
||||
event_add(sig_event, NULL);
|
||||
}
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#else
|
||||
|
||||
static void
|
||||
signal_kqueue_cb(int fd, short event, void *arg)
|
||||
@@ -468,7 +468,7 @@ main(int argc, char **argv)
|
||||
const char *gcry_version;
|
||||
sigset_t sigs;
|
||||
int sigfd;
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#ifdef HAVE_KQUEUE
|
||||
struct kevent ke_sigs[4];
|
||||
#endif
|
||||
int ret;
|
||||
@@ -607,14 +607,14 @@ main(int argc, char **argv)
|
||||
#ifdef MPD
|
||||
strcat(buildopts, " --enable-mpd");
|
||||
#endif
|
||||
#ifdef ALSA
|
||||
#ifdef HAVE_ALSA
|
||||
strcat(buildopts, " --with-alsa");
|
||||
#endif
|
||||
#ifdef PULSEAUDIO
|
||||
#ifdef HAVE_LIBPULSE
|
||||
strcat(buildopts, " --with-pulseaudio");
|
||||
#endif
|
||||
|
||||
DPRINTF(E_LOG, L_MAIN, "Built %s with:%s\n", BUILDDATE, buildopts);
|
||||
DPRINTF(E_LOG, L_MAIN, "Built %s with:%s\n", __DATE__, buildopts);
|
||||
|
||||
ret = av_lockmgr_register(ffmpeg_lockmgr);
|
||||
if (ret < 0)
|
||||
@@ -825,7 +825,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
sig_event = event_new(evbase_main, sigfd, EV_READ, signal_signalfd_cb, NULL);
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#else
|
||||
sigfd = kqueue();
|
||||
if (sigfd < 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user