]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Include the -pthread flag -- including the pthread library with -lpthread isn't alway...
authorMike Brady <mikebrady@eircom.net>
Tue, 13 Feb 2018 17:17:37 +0000 (17:17 +0000)
committerMike Brady <mikebrady@eircom.net>
Tue, 13 Feb 2018 17:17:37 +0000 (17:17 +0000)
Makefile.am
configure.ac

index 45f3b53907eb5899a1fc45dedc26ea1ca0c9ce67..373ae010a323103b8bf9404b0b5b95ec1456c0db 100644 (file)
@@ -6,7 +6,7 @@ bin_PROGRAMS = shairport-sync
 
 shairport_sync_SOURCES = shairport.c rtsp.c mdns.c mdns_external.c common.c rtp.c player.c alac.c audio.c loudness.c
 
-AM_CFLAGS = -Wno-multichar -DSYSCONFDIR=\"$(sysconfdir)\"
+AM_CFLAGS = -Wno-multichar -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
 if BUILD_FOR_FREEBSD
   AM_CPPFLAGS = -I/usr/local/include -Wno-multichar -DSYSCONFDIR=\"$(sysconfdir)\" -O2
 else
index dec61a387ce07c086e6aa489f3331aeae192eace..b81b2fe1b1cb82f164a038a1428e3f106cfb476d 100644 (file)
@@ -51,6 +51,9 @@ else
   AC_CHECK_LIB([daemon],[daemon_fork], , AC_MSG_ERROR(libdaemon needed))
 fi
 
+##### The following check for the pthreads library doesn't put the compiler into the correct pthread mode
+##### so we add the -pthread compilation flag in AMFLAGS in the Makefile.am as well.
+
 AC_CHECK_LIB([pthread],[pthread_create], , AC_MSG_ERROR(pthread library needed))
 AC_CHECK_LIB([m],[exp], , AC_MSG_ERROR(maths library needed))