diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 541c66c..e699edb 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -1,29 +1,17 @@
 # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-#
-# Copyright (c) 2014 University of Memphis,
-#                    Regents of the University of California
-#
-# GPL 3.0 license, see the COPYING.md file for more information
 
 from waflib import Logs, Configure
 
 def options(opt):
-    opt.add_option('--with-c++11', action='store_true', default=False, dest='use_cxx11',
-                   help='''Enable C++11 mode (experimental, may not work)''')
     opt.add_option('--debug', '--with-debug', action='store_true', default=False, dest='debug',
-                   help='''Compile in debugging mode without all optimizations (-O0)''')
+                   help='''Compile in debugging mode without optimizations (-O0 or -Og)''')
 
 def configure(conf):
     areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0)
-    defaultFlags = []
-
-    if conf.options.use_cxx11:
-        defaultFlags += ['-std=c++0x', '-std=c++11']
-    else:
-        defaultFlags += ['-std=c++03']
-
-    # defaultFlags += ['-pedantic', '-Wall', '-Wno-long-long']
-    defaultFlags += ['-Wall', '-Wno-long-long']
+    defaultFlags = ['-std=c++0x', '-std=c++11',
+                    '-stdlib=libc++', # clang on OSX < 10.9 by default uses a non
+                                      # C++11-compatible STL library
+                    '-Wall', '-Wno-long-long']
 
     if conf.options.debug:
         conf.define('_DEBUG', 1)
@@ -32,7 +20,11 @@
                          '-g3',
                          '-fcolor-diagnostics', # clang
                          '-fdiagnostics-color', # gcc >= 4.9
-                         '-Werror'
+                         '-Werror',
+                         '-Wno-error=deprecated-register',
+                         '-Wno-error=maybe-uninitialized', # Bug #1615
+                         '-Wno-error=unneeded-internal-declaration', # Bug #1588
+                         '-Wno-nested-anon-types',
                         ]
         if areCustomCxxflagsPresent:
             missingFlags = [x for x in defaultFlags if x not in conf.env.CXXFLAGS]
@@ -47,17 +39,35 @@
         if not areCustomCxxflagsPresent:
             conf.add_supported_cxxflags(defaultFlags)
 
+    # clang on OSX < 10.9 by default uses a non C++11-compatible STL library
+    conf.add_supported_linkflags(['-stdlib=libc++'])
+
 @Configure.conf
 def add_supported_cxxflags(self, cxxflags):
     """
     Check which cxxflags are supported by compiler and add them to env.CXXFLAGS variable
     """
-    self.start_msg('Checking allowed flags for c++ compiler')
+    self.start_msg('Checking allowed compile-stage flags for c++ compiler')
 
     supportedFlags = []
     for flag in cxxflags:
-        if self.check_cxx(cxxflags=[flag], mandatory=False):
+        if self.check_cxx(cxxflags=['-Werror', flag], mandatory=False):
             supportedFlags += [flag]
 
     self.end_msg(' '.join(supportedFlags))
     self.env.CXXFLAGS = supportedFlags + self.env.CXXFLAGS
+
+@Configure.conf
+def add_supported_linkflags(self, linkflags):
+    """
+    Check which linkflags are supported by compiler and add them to env.LINKFLAGS variable
+    """
+    self.start_msg('Checking allowed link-stage flags for c++ compiler')
+
+    supportedFlags = []
+    for flag in linkflags:
+        if self.check_cxx(linkflags=['-Werror', flag], mandatory=False):
+            supportedFlags += [flag]
+
+    self.end_msg(' '.join(supportedFlags))
+    self.env.LINKFLAGS = supportedFlags + self.env.LINKFLAGS
