Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
[dcpomatic.git] / wscript
diff --git a/wscript b/wscript
index 95ead6e5097aeeb20e33d3c6caf3a19cf4d390e7..dd2e18e0eb8ddc243791a73dc85689e422d1fc87 100644 (file)
--- a/wscript
+++ b/wscript
@@ -26,7 +26,7 @@ import distutils.spawn
 from waflib import Logs, Context
 
 APPNAME = 'dcpomatic'
-VERSION = '2.8.3devel'
+VERSION = '2.8.4devel'
 
 def options(opt):
     opt.load('compiler_cxx')
@@ -78,11 +78,14 @@ 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'])
 
+    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:
@@ -157,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:
@@ -196,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 <Magick++.h>
+                            using namespace MagickCore;
+                            """,
+                   mandatory=False,
+                   msg='Checking for MagickCore namespace',
+                   okmsg='yes',
+                   define_name='DCPOMATIC_HAVE_MAGICKCORE_NAMESPACE')
+
+    conf.check_cxx(fragment="""
+                            #include <Magick++.h>
+                            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)