Commit 9e407a85f1b291cecd5178e55ea7c8a86ef1371b
1 parent
342debdc
Reject invalid targets.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2863 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
17 additions
and
14 deletions
configure
... | ... | @@ -874,23 +874,26 @@ target_bigendian="no" |
874 | 874 | [ "$target_cpu" = "sh4eb" ] && target_bigendian=yes |
875 | 875 | [ "$target_cpu" = "m68k" ] && target_bigendian=yes |
876 | 876 | target_softmmu="no" |
877 | -if expr $target : '.*-softmmu' > /dev/null ; then | |
878 | - target_softmmu="yes" | |
879 | -fi | |
880 | 877 | target_user_only="no" |
881 | -if expr $target : '.*-user' > /dev/null ; then | |
882 | - target_user_only="yes" | |
883 | -fi | |
884 | - | |
885 | 878 | target_linux_user="no" |
886 | -if expr $target : '.*-linux-user' > /dev/null ; then | |
887 | - target_linux_user="yes" | |
888 | -fi | |
889 | - | |
890 | 879 | target_darwin_user="no" |
891 | -if expr $target : '.*-darwin-user' > /dev/null ; then | |
892 | - target_darwin_user="yes" | |
893 | -fi | |
880 | +case "$target" in | |
881 | + ${target_cpu}-softmmu) | |
882 | + target_softmmu="yes" | |
883 | + ;; | |
884 | + ${target_cpu}-linux-user) | |
885 | + target_user_only="yes" | |
886 | + target_linux_user="yes" | |
887 | + ;; | |
888 | + ${target_cpu}-darwin-user) | |
889 | + target_user_only="yes" | |
890 | + target_darwin_user="yes" | |
891 | + ;; | |
892 | + *) | |
893 | + echo "ERROR: Target '$target' not recognised" | |
894 | + exit 1 | |
895 | + ;; | |
896 | +esac | |
894 | 897 | |
895 | 898 | if test "$target_user_only" = "no" -a "$check_gfx" = "yes" \ |
896 | 899 | -a "$sdl" = "no" -a "$cocoa" = "no" ; then | ... | ... |