waf: added --disable-symbol-versions configure option
authorAndrew Tridgell <tridge@samba.org>
Wed, 8 Dec 2010 08:00:00 +0000 (19:00 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 8 Dec 2010 11:01:25 +0000 (12:01 +0100)
some people may not want symbol versions.

buildtools/wafsamba/wscript

index f3551253c62c309edf558632e1295a0b41d2a504..5756df4cb035a9f5289c2ec69004922d90e9ec4f 100644 (file)
@@ -61,6 +61,9 @@ def set_options(opt):
     gr.add_option('--nonshared-binary',
                    help=("Disable use of shared libs for the listed binaries"),
                    action="store", dest='NONSHARED_BINARIES', default='')
+    gr.add_option('--disable-symbol-versions',
+                   help=("Disable use of the --version-script linker option"),
+                   action="store_true", dest='disable_symbol_versions', default=False)
 
     opt.add_option('--with-modulesdir',
                    help=("modules directory [PREFIX/modules]"),
@@ -288,9 +291,11 @@ def configure(conf):
             # the user can of course always override it.
             conf.env.PRIVATELIBDIR = conf.env.LIBDIR
 
-    if not conf.env.DISABLE_SHARED and conf.CHECK_LIBRARY_SUPPORT(rpath=support_rpath,
-                                                                  version_script=True,
-                                                                  msg='-Wl,--version-script support'):
+    if (not conf.env.DISABLE_SHARED and
+        not Options.options.disable_symbol_versions and
+        conf.CHECK_LIBRARY_SUPPORT(rpath=support_rpath,
+                                   version_script=True,
+                                   msg='-Wl,--version-script support')):
         conf.env.HAVE_LD_VERSION_SCRIPT = True
     else:
         conf.env.HAVE_LD_VERSION_SCRIPT = False