Backport r60537: have order of CPPFLAGS and LDFLAGS be honored.
diff --git a/Misc/NEWS b/Misc/NEWS
index d83b9cf..5f28bd3 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -260,6 +260,9 @@
 Build
 -----
 
+- Have the search path for building extensions follow the declared order in
+  $CPPFLAGS and $LDFLAGS.
+
 - Bug #1234: Fixed semaphore errors on AIX 5.2
 
 - Bug #1699: Define _BSD_SOURCE only on OpenBSD.