changeset 2548:4d25b57f18b2 draft

Revert [26bc10be24] as some compile can't output to /dev/null.
author Roy Marples <roy@marples.name>
date Mon, 30 Jun 2014 09:44:07 +0000
parents b3c982abad99
children 0e059c32919d
files configure
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sun Jun 29 02:58:19 2014 +0000
+++ b/configure	Mon Jun 30 09:44:07 2014 +0000
@@ -272,8 +272,17 @@
 fi
 
 echo "Using compiler .. $CC"
-if ! echo "int main(void) { return 0; }" | $CC -x c -o /dev/null - 2>/dev/null
-then
+cat <<EOF >_test.c
+int main(void) {
+	return 0;
+}
+EOF
+_CC=false
+if $CC _test.c -o _test >/dev/null 2>&1; then
+	[ -x _test ] && _CC=true
+fi
+rm -f _test.c _test
+if ! $_CC; then
 	echo "$CC does not create executables"
 	exit 1
 fi