Skip to content

Commit b850646

Browse files
Merge remote-tracking branch 'apple/master' into port-transform-and-use-libbsd
Fix src/Makefile.am
2 parents c10f0da + b2ccfeb commit b850646

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ config.status
2828
config
2929
configure
3030
libtool
31-
31+
.dirstamp

configure.ac

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,11 @@ AS_IF([test -n "$apple_libpthread_source_path" -a -n "$apple_xnu_source_osfmk_pa
164164
])
165165
AC_CHECK_HEADERS([pthread_machdep.h pthread/qos.h])
166166
AC_CHECK_HEADERS([pthread/workqueue_private.h pthread_workqueue.h],
167-
[AC_DEFINE(HAVE_PTHREAD_WORKQUEUES, 1, [Define if pthread work queues are present])]
167+
[AC_DEFINE(HAVE_PTHREAD_WORKQUEUES, 1, [Define if pthread work queues are present])
168+
have_pthread_workqueues=true],
169+
[have_pthread_workqueues=false]
168170
)
171+
AM_CONDITIONAL(HAVE_PTHREAD_WORKQUEUES, $have_pthread_workqueues)
169172
AC_CHECK_HEADERS([libproc_internal.h], [], [], [#include <mach/mach.h>])
170173
AC_CHECK_FUNCS([pthread_workqueue_setdispatch_np _pthread_workqueue_init])
171174
AS_IF([test -n "$apple_libpthread_source_path" -a -n "$apple_xnu_source_osfmk_path"], [

src/Makefile.am

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ AM_OBJCFLAGS=$(DISPATCH_CFLAGS) $(CBLOCKS_FLAGS)
5656
AM_CXXFLAGS=$(DISPATCH_CFLAGS) $(CXXBLOCKS_FLAGS)
5757
AM_OBJCXXFLAGS=$(DISPATCH_CFLAGS) $(CXXBLOCKS_FLAGS)
5858

59-
libdispatch_la_LIBADD = $(BSD_OVERLAY_LIBS)
59+
if HAVE_PTHREAD_WORKQUEUES
60+
PTHREAD_WORKQUEUE_LIBS=-lpthread_workqueue
61+
endif
62+
6063
libdispatch_la_LDFLAGS=-avoid-version
64+
libdispatch_la_LIBADD=$(KQUEUE_LIBS) $(PTHREAD_WORKQUEUE_LIBS) $(BSD_OVERLAY_LIBS)
6165

6266
if HAVE_DARWIN_LD
6367
libdispatch_la_LDFLAGS+=-Wl,-compatibility_version,1 \

0 commit comments

Comments
 (0)