From: Carl Worth Date: Thu, 13 Jun 2013 22:00:49 +0000 (-0700) Subject: configure: Add an early check for a functional C compiler X-Git-Url: https://git.cworth.org/git?p=fips;a=commitdiff_plain;h=18ff92375257efa1ba4a4441079b0cd587661bfe configure: Add an early check for a functional C compiler Without this, later compiler-based checks for header files, etc. would falsely claim that libraries were not installed, (when in fact, the libraries were installed but the compiler-based checks were failing because no compiler is available). --- diff --git a/configure b/configure index 7c5a38c..9428296 100755 --- a/configure +++ b/configure @@ -217,6 +217,32 @@ exit 1 fi +printf "Checking for working C compiler (${CC})... " +printf "int main(void){return 42;}\n" > minimal.c +if ${CC} -o minimal minimal.c > /dev/null 2>&1 +then + printf "Yes.\n" +else + printf "No.\n" + cat <