Pass the Makefile's value of CC and LDSHARED to the environment of setup.py.
This fixes the problem reported in bug report #438786.
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 2bd9ba3..1e4334d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -288,7 +288,7 @@
 
 # Build the shared modules
 sharedmods: $(PYTHON)
-	./$(PYTHON) -E $(srcdir)/setup.py build
+	CC='$(CC)' LDSHARED='$(LDSHARED)' ./$(PYTHON) -E $(srcdir)/setup.py build
 
 # buildno should really depend on something like LIBRARY_SRC
 buildno: $(PARSER_OBJS) \