From 265af2b9e52dc63aafb0d6875b0a8ffeb3fd7594 Mon Sep 17 00:00:00 2001 From: Kp Date: Thu, 22 Dec 2016 05:21:17 +0000 Subject: [PATCH] Extend SConf diagnostics for failed system headers --- SConstruct | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 7bf17754c..4f4dc01dc 100644 --- a/SConstruct +++ b/SConstruct @@ -881,7 +881,10 @@ int main(int argc,char**argv){(void)argc;(void)argv; return (0, "Header %s is usable, but library %s is not usable." % (header, lib)) if Compile(context, text=include, main='', msg='for parseable header %s' % header, testflags=successflags): return (1, "Header %s is parseable, but cannot compile the test program." % header) - return (2, "Header %s is missing or unusable." % header) + successflags.setdefault('CXXFLAGS', []).append('-E') + if Compile(context, text=include, main='', msg='for parseable header %s' % header, testflags=successflags): + return (2, "Header %s exists, but cannot compile an empty program." % header) + return (3, "Header %s is missing or unusable." % header) # Compile and link a program that uses a system library. On # success, return None. On failure, abort the SConf run. def _check_system_library(self,*args,**kwargs):