--- wscript.orig	2014-03-11 08:50:10 UTC
+++ wscript
@@ -87,14 +87,8 @@ def configure(ctx):
     for (lib, uselib) in req_libs:
         ctx.check_cxx(lib = lib, uselib_store = uselib)
 
-    # Check required functions
-    req_funcs = [('memset', 'string.h', []) ,('sqrt', 'math.h', ['m'])]
-    for func, header, uselib in req_funcs:
-        ctx.check_cxx(function_name = func, header_name = header,
-                      uselib = uselib, mandatory = True)
-
     # Check for a supported version of libpng
-    supp_png_pkgs = (('libpng12', '1.2'), ('libpng15', '1.5'),)
+    supp_png_pkgs = (('libpng12', '1.2'), ('libpng16', '1.6'),)
     have_png = False
     for (pkg, atleast) in supp_png_pkgs:
         try:
@@ -123,7 +117,7 @@ def configure(ctx):
         ctx.check_cfg(package = pkg, uselib_store = uselib,
                       args = '--cflags --libs', mandatory = mandatory)
 
-    ctx.env.append_unique('CXXFLAGS', '-Werror -Wall -Wextra -Wnon-virtual-dtor'.split(' '))
+    ctx.env.append_unique('CXXFLAGS', '-Wall -Wextra -Wnon-virtual-dtor'.split(' '))
 
     # Prepend -O# and -g flags so that they can be overriden by the
     # CFLAGS environment variable
@@ -132,6 +126,9 @@ def configure(ctx):
     if Options.options.debug:
         ctx.env.prepend_value('CXXFLAGS', '-g')
 
+    # Fix manpages path for FreeBSD
+    ctx.env.MANDIR = '%s/man' % ctx.env.PREFIX
+
     ctx.env.HAVE_EXTRAS = False
     if Options.options.extras_path is not None:
         ctx.env.HAVE_EXTRAS = True
