summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-07-10 19:29:18 +0200
committerDavid Robillard <d@drobilla.net>2018-07-10 19:29:18 +0200
commit13285959bcc37effa66d69a7607976accc51abe2 (patch)
tree7215b3e9aa2ec6a2c9c8f7846ed7f9a4844a9dc8
parent594c7bb8229abf47d435576857f17f9c89bb69e8 (diff)
downloadlilv-13285959bcc37effa66d69a7607976accc51abe2.tar.gz
lilv-13285959bcc37effa66d69a7607976accc51abe2.tar.bz2
lilv-13285959bcc37effa66d69a7607976accc51abe2.zip
Fix use of clock_gettime on Darwin
-rw-r--r--wscript8
1 files changed, 6 insertions, 2 deletions
diff --git a/wscript b/wscript
index 21db692..556bbff 100644
--- a/wscript
+++ b/wscript
@@ -104,6 +104,10 @@ def configure(conf):
if conf.env.DEST_OS == 'darwin':
defines += ['_DARWIN_C_SOURCE']
+ rt_lib = ['rt']
+ if conf.env.DEST_OS == 'darwin' or conf.env.DEST_OS == 'win32':
+ rt_lib = []
+
autowaf.check_function(conf, 'c', 'flock',
header_name = 'sys/file.h',
defines = defines,
@@ -121,7 +125,7 @@ def configure(conf):
defines = ['_POSIX_C_SOURCE=200809L'],
define_name = 'HAVE_CLOCK_GETTIME',
uselib_store = 'CLOCK_GETTIME',
- lib = ['rt'],
+ lib = rt_lib,
mandatory = False)
conf.check_cc(define_name = 'HAVE_LIBDL',
@@ -422,7 +426,7 @@ def build(bld):
# lv2bench (less portable than other utilities)
if bld.is_defined('HAVE_CLOCK_GETTIME') and not bld.env.STATIC_PROGS:
obj = build_util(bld, 'utils/lv2bench', defines)
- if not bld.env.MSVC_COMPILER:
+ if not bld.env.MSVC_COMPILER and not bld.env.DEST_OS == 'darwin':
obj.lib = ['rt']
# Documentation