Make parse_makefile fallback to environment variables if nothing is
defined in the makefile. Get CFLAGS from the Makefile, instead of
getting OPT, BASE_CFLAGS and EXTRA_CFLAGS individually.
diff --git a/setup.py b/setup.py
index 302f5c2..a8e5804 100644
--- a/setup.py
+++ b/setup.py
@@ -171,8 +171,8 @@
         # unfortunately, distutils doesn't let us provide separate C and C++
         # compilers
         if compiler is not None:
-            (ccshared,opt,base) = sysconfig.get_config_vars('CCSHARED','OPT','BASECFLAGS')
-            args['compiler_so'] = compiler + ' ' + opt + ' ' + ccshared + ' ' + base
+            (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
+            args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
         self.compiler.set_executables(**args)
 
         build_ext.build_extensions(self)