waf: remove the restriction that private libraries must not have a vnum
[nivanova/samba-autobuild/.git] / lib / tevent / wscript
index 677ab8c75ac2f0c8983d90a7814e98029e1cc90e..14c4c603194e42bf0bb76582a06a0f70fd5d641c 100644 (file)
@@ -19,7 +19,7 @@ samba_dist.DIST_DIRS('lib/tevent:. lib/replace:lib/replace lib/talloc:lib/talloc
 
 def set_options(opt):
     opt.BUILTIN_DEFAULT('replace')
-    opt.BUNDLED_EXTENSION_DEFAULT('tevent', noextension='tevent')
+    opt.PRIVATE_EXTENSION_DEFAULT('tevent', noextension='tevent')
     opt.RECURSE('lib/replace')
     opt.RECURSE('lib/talloc')
     if opt.IN_LAUNCH_DIR():
@@ -66,20 +66,23 @@ def build(bld):
     if bld.CONFIG_SET('HAVE_EPOLL'):
         SRC += ' tevent_epoll.c'
 
+    if bld.env.standalone_tevent:
+        bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+        bld.PKG_CONFIG_FILES('tevent.pc', vnum=VERSION)
+        bld.INSTALL_FILES('${INCLUDEDIR}', 'tevent.h')
+        private_library = False
+    else:
+        private_library = True
+
     if not bld.CONFIG_SET('USING_SYSTEM_TEVENT'):
         bld.SAMBA_LIBRARY('tevent',
                           SRC,
                           deps='replace talloc',
                           enabled= not bld.CONFIG_SET('USING_SYSTEM_TEVENT'),
-                          abi_file='ABI/tevent-%s.sigs' % VERSION,
+                          abi_directory='ABI',
                           abi_match='tevent_* _tevent_*',
-                          vnum=VERSION, 
-                          is_bundled=not bld.env.standalone_tevent)
-
-    if bld.env.standalone_tevent:
-        bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
-        bld.PKG_CONFIG_FILES('tevent.pc', vnum=VERSION)
-        bld.INSTALL_FILES('${INCLUDEDIR}', 'tevent.h')
+                          vnum=VERSION,
+                          private_library=private_library)
 
     bld.SAMBA_PYTHON('pytevent',
                      'pytevent.c',
@@ -96,3 +99,8 @@ def test(ctx):
 def dist():
     '''makes a tarball for distribution'''
     samba_dist.dist()
+
+def reconfigure(ctx):
+    '''reconfigure if config scripts have changed'''
+    import samba_utils
+    samba_utils.reconfigure(ctx)