summaryrefslogtreecommitdiff
path: root/lib/tevent/wscript
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-28 16:38:27 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:13 +1000
commitbfbf43cc36ab360b34b49d7e07c2f594e2b7e7c9 (patch)
tree35e0b133c53a859c90962d0678b0e5218943b6f8 /lib/tevent/wscript
parent505e902436b2a31a7b828fdeddf599339d0229e5 (diff)
downloadsamba-bfbf43cc36ab360b34b49d7e07c2f594e2b7e7c9.tar.gz
samba-bfbf43cc36ab360b34b49d7e07c2f594e2b7e7c9.tar.bz2
samba-bfbf43cc36ab360b34b49d7e07c2f594e2b7e7c9.zip
s4-waf: support the use of system libraries
distros can set --bundled-libraries=NONE to force use of all system libraries. If the right version isn't found then configure will fail. Users may choose which libraries to use from the system, and which to use bundled libs. The default is to try system libs, and use them if their version matches the one in the source tree.
Diffstat (limited to 'lib/tevent/wscript')
-rw-r--r--lib/tevent/wscript13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/tevent/wscript b/lib/tevent/wscript
index f017581fae..e6ef67a8d6 100644
--- a/lib/tevent/wscript
+++ b/lib/tevent/wscript
@@ -22,6 +22,9 @@ def configure(conf):
conf.sub_config(LIBREPLACE_DIR)
conf.sub_config(LIBTALLOC_DIR)
+ if conf.CHECK_BUNDLED_SYSTEM('tevent', minversion=VERSION):
+ conf.define('USING_SYSTEM_TEVENT', 1)
+
if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
conf.DEFINE('HAVE_EPOLL', 1)
@@ -38,7 +41,9 @@ def build(bld):
if bld.CONFIG_SET('HAVE_EPOLL'):
SRC += ' tevent_epoll.c'
- bld.SAMBA_LIBRARY('tevent',
- SRC,
- deps='replace talloc',
- vnum=VERSION)
+ if not bld.CONFIG_SET('USING_SYSTEM_TEVENT'):
+ bld.SAMBA_LIBRARY('tevent',
+ SRC,
+ deps='replace talloc',
+ enabled= not bld.CONFIG_SET('USING_SYSTEM_TEVENT'),
+ vnum=VERSION)