From d915fd0a238cc1bb9a0cb8824ac4cc81a1d1eab8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 10 Oct 2015 17:09:25 +0100 Subject: [PATCH] Attempt to fix built with new glibmm automatically rather than having to be told. --- wscript | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index 6ae1e995d..867b0385e 100644 --- a/wscript +++ b/wscript @@ -23,7 +23,7 @@ import sys import glob import distutils import distutils.spawn -from waflib import Logs +from waflib import Logs, Context APPNAME = 'dcpomatic' VERSION = '2.4.6devel' @@ -372,6 +372,15 @@ def configure(conf): lib=['boost_regex%s' % boost_lib_suffix], uselib_store='BOOST_REGEX') + # libxml++ requires glibmm and versions of glibmm 2.45.31 and later + # must be built with -std=c++11 as they use c++11 + # features and c++11 is not (yet) the default in gcc. + glibmm_version = conf.cmd_and_log(['pkg-config', '--modversion', 'glibmm-2.4'], output=Context.STDOUT, quiet=Context.BOTH) + s = glibmm_version.split('.') + v = (int(s[0]) << 16) | (int(s[1]) << 8) | int(s[2]) + if v >= 0x022D1F: + conf.env.append_value('CXXFLAGS', '-std=c++11') + # Other stuff conf.find_program('msgfmt', var='MSGFMT') -- 2.30.2