changeset 2545:7cb89ed1d31e draft

Simplfy configure CC test. Thanks to Thomas De Schampheleire.
author Roy Marples <roy@marples.name>
date Sun, 22 Jun 2014 10:06:53 +0000
parents 995e4986ff30
children 06457f0bd444
files configure
diffstat 1 files changed, 2 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Jun 21 15:46:31 2014 +0000
+++ b/configure	Sun Jun 22 10:06:53 2014 +0000
@@ -272,19 +272,8 @@
 fi
 
 echo "Using compiler .. $CC"
-cat <<EOF >_test.c
-int main(void) {
-	return 0;
-}
-EOF
-_CC=true
-if $CC _test.c -o _test >/dev/null 2>&1; then
-	[ -x _test ] || _CC=false
-else
-	_CC=false
-fi
-rm -f _test.c _test
-if ! $_CC; then
+if ! echo "int main(void) { return 0; }" | $CC -x c -o /dev/null - 2>/dev/null
+then
 	echo "$CC does not create executables"
 	exit 1
 fi