]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Simplfy configure CC test. Thanks to Thomas De Schampheleire.
authorRoy Marples <roy@marples.name>
Sun, 22 Jun 2014 10:06:53 +0000 (10:06 +0000)
committerRoy Marples <roy@marples.name>
Sun, 22 Jun 2014 10:06:53 +0000 (10:06 +0000)
configure

index b0b15cb9c0b37b79a206f5edd287fde5f5fcec67..a0d093ae4a1c54cc4db6282c1d8139ff5ee927d2 100755 (executable)
--- a/configure
+++ b/configure
@@ -272,19 +272,8 @@ if ! type "$CC" >/dev/null 2>&1; then
 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