Use -std=c++11 for new libxml++ versions.
authorCarl Hetherington <cth@carlh.net>
Wed, 3 Feb 2016 11:42:35 +0000 (11:42 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 3 Feb 2016 11:42:35 +0000 (11:42 +0000)
waf
wscript

diff --git a/waf b/waf
index 178461f113668f7b3bb794abe3cb788e7c69322c..4b322f1a7eb0abb577ad4779da730ff957e63fd9 100755 (executable)
Binary files a/waf and b/waf differ
diff --git a/wscript b/wscript
index 9a2d46987680401b94be50385aa5c5724d313293..6042358c5c8e90adfab25c72c88daefe06c50844 100644 (file)
--- a/wscript
+++ b/wscript
@@ -1,3 +1,5 @@
+from waflib import Context
+
 APPNAME = 'libcxml'
 VERSION = '0.15.0devel'
 API_VERSION = '0.0.0'
@@ -45,6 +47,13 @@ def configure(conf):
 
         conf.recurse('test')
 
+    # libxml++ 2.39.1 and later must be built with -std=c++11
+    libxmlpp_version = conf.cmd_and_log(['pkg-config', '--modversion', 'libxml++-2.6'], output=Context.STDOUT, quiet=Context.BOTH)
+    s = libxmlpp_version.split('.')
+    v = (int(s[0]) << 16) | (int(s[1]) << 8) | int(s[2])
+    if v >= 0x022701:
+        conf.env.append_value('CXXFLAGS', '-std=c++11')
+        
 def build(bld):
 
     bld(source='libcxml.pc.in',