From: Roy Marples Date: Sun, 22 Jun 2014 10:06:53 +0000 (+0000) Subject: Simplfy configure CC test. Thanks to Thomas De Schampheleire. X-Git-Tag: v6.4.1~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e8e0b721eef879b85b0f20c30f15a7e413d50f6;p=thirdparty%2Fdhcpcd.git Simplfy configure CC test. Thanks to Thomas De Schampheleire. --- diff --git a/configure b/configure index b0b15cb9..a0d093ae 100755 --- a/configure +++ b/configure @@ -272,19 +272,8 @@ if ! type "$CC" >/dev/null 2>&1; then fi echo "Using compiler .. $CC" -cat <_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