From ea460149b3e87a11d3ed4b5c2d48aa980c0735d2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 23 May 2016 16:16:55 +0100 Subject: Hack to fix build on gcc 4.1. --- wscript | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'wscript') diff --git a/wscript b/wscript index 78454565f..93a9fc493 100644 --- a/wscript +++ b/wscript @@ -83,6 +83,10 @@ def configure(conf): '-Wno-deprecated-declarations', '-D_FILE_OFFSET_BITS=64']) + gcc = conf.env['CC_VERSION'] + if int(gcc[0]) >= 4 and int(gcc[1]) > 1: + conf.env.append_value('CXXFLAGS', ['-Wno-unused-result']) + if conf.options.enable_debug: conf.env.append_value('CXXFLAGS', ['-g', '-DDCPOMATIC_DEBUG', '-fno-omit-frame-pointer']) else: -- cgit v1.2.3 From 4ba821a8b0251767e06b57d4498296140ebfbb0c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 23 May 2016 16:17:22 +0100 Subject: Fix previous. --- wscript | 1 - 1 file changed, 1 deletion(-) (limited to 'wscript') diff --git a/wscript b/wscript index 93a9fc493..121fa8d80 100644 --- a/wscript +++ b/wscript @@ -78,7 +78,6 @@ def configure(conf): '-Wall', '-Wno-attributes', '-Wextra', - '-Wno-unused-result', # Remove auto_ptr warnings from libxml++-2.6 '-Wno-deprecated-declarations', '-D_FILE_OFFSET_BITS=64']) -- cgit v1.2.3 From 2b2823284b07354d1f480e54aded1aba45716cf5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 23 May 2016 17:18:57 +0100 Subject: Be stricter about curl version. --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wscript') diff --git a/wscript b/wscript index 121fa8d80..e31299883 100644 --- a/wscript +++ b/wscript @@ -160,7 +160,7 @@ def configure(conf): conf.env.STLIB_CURL = ['curl'] conf.env.LIB_CURL = ['ssh2', 'idn'] else: - conf.check_cfg(package='libcurl', args='--cflags --libs', uselib_store='CURL', mandatory=True) + conf.check_cfg(package='libcurl', args='--cflags --libs', atleast_version='7.19.1', uselib_store='CURL', mandatory=True) # libicu if conf.check_cfg(package='icu-i18n', args='--cflags --libs', uselib_store='ICU', mandatory=False) is None: -- cgit v1.2.3 From 3739c62f626b65da929d37fb7efc44a8e349e6f1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 23 May 2016 21:17:23 +0100 Subject: Attempt to make more concessions for Centos 5. --- src/lib/image_examiner.cc | 2 +- src/lib/magick_image_proxy.cc | 5 +++-- wscript | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) (limited to 'wscript') diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index e0be15794..b9cd1caf5 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -43,7 +43,7 @@ ImageExaminer::ImageExaminer (shared_ptr film, shared_ptrpath(0).string (); diff --git a/src/lib/magick_image_proxy.cc b/src/lib/magick_image_proxy.cc index cb168ce63..98054b8df 100644 --- a/src/lib/magick_image_proxy.cc +++ b/src/lib/magick_image_proxy.cc @@ -108,9 +108,10 @@ MagickImageProxy::image (optional) const /* Write line-by-line here as _image must be aligned, and write() cannot be told about strides */ uint8_t* p = _image->data()[0]; for (int i = 0; i < size.height; ++i) { -#ifdef DCPOMATIC_IMAGE_MAGICK +#ifdef DCPOMATIC_HAVE_MAGICKCORE_NAMESPACE using namespace MagickCore; -#else +#endif +#ifdef DCPOMATIC_HAVE_MAGICKLIB_NAMESPACE using namespace MagickLib; #endif magick_image->write (0, i, size.width, 1, "RGB", CharPixel, p); diff --git a/wscript b/wscript index e31299883..dd2e18e0e 100644 --- a/wscript +++ b/wscript @@ -199,6 +199,25 @@ def configure(conf): if graphics is not None: conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_GRAPHICS_MAGICK') + # See if we are using the MagickCore or MagickLib namespaces + conf.check_cxx(fragment=""" + #include + using namespace MagickCore; + """, + mandatory=False, + msg='Checking for MagickCore namespace', + okmsg='yes', + define_name='DCPOMATIC_HAVE_MAGICKCORE_NAMESPACE') + + conf.check_cxx(fragment=""" + #include + using namespace MagickLib + """, + mandatory=False, + msg='Checking for MagickLib namespace', + okmsg='yes', + define_name='DCPOMATIC_HAVE_MAGICKLIB_NAMESPACE') + # libzip conf.check_cfg(package='libzip', args='--cflags --libs', uselib_store='ZIP', mandatory=True) -- cgit v1.2.3