summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-02 22:30:45 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-02 22:30:45 +0000
commit1aff381f59b508a422f6fe03965fbc3728d3c45a (patch)
tree0ab8cc20988d9eba0a1405ac95bbd11ce518c7be /configure
parent9903da21e34d84a01ab6dfc30a01f619e6ef5415 (diff)
downloadqemu-1aff381f59b508a422f6fe03965fbc3728d3c45a.tar.gz
qemu-1aff381f59b508a422f6fe03965fbc3728d3c45a.tar.bz2
qemu-1aff381f59b508a422f6fe03965fbc3728d3c45a.zip
gcc4 warning (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1596 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index 98ef82b6e1..ee3b7f33eb 100755
--- a/configure
+++ b/configure
@@ -88,6 +88,7 @@ kqemu="no"
kernel_path=""
cocoa="no"
check_gfx="yes"
+check_gcc="yes"
# OS specific
targetos=`uname -s`
@@ -200,6 +201,8 @@ for opt do
;;
--disable-gfx-check) check_gfx="no"
;;
+ --disable-gcc-check) check_gcc="no"
+ ;;
esac
done
@@ -277,6 +280,23 @@ if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/nu
have_gcc3_options="yes"
fi
+# Check for gcc4
+if test "$check_gcc" = "yes" ; then
+ cat > $TMPC <<EOF
+#if __GNUC__ >= 4
+#error gcc4
+#endif
+int main(){return 0;}
+EOF
+ if ! $cc -o $TMPO $TMPC 2>/dev/null ; then
+ echo "ERROR: \"$cc\" looks like gcc 4.x"
+ echo "QEMU is known to have problems when compiled with gcc 4.x"
+ echo "It is recommended that you use gcc 3.x to build QEMU"
+ echo "To use this compiler anyway, configure with --disable-gcc-check"
+ exit 1;
+ fi
+fi
+
##########################################
# SDL probe