Commit fdf7ed965281f7d68029580f6a652fa918018dbf

Authored by malc
1 parent e58ffeb3

Migrate to check_define

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6302 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 24 additions and 24 deletions
configure
... ... @@ -88,8 +88,14 @@ elif check_define __sparc__ ; then
88 88 else
89 89 cpu="sparc"
90 90 fi
  91 +elif check_define _ARCH_PPC ; then
  92 + if check_define _ARCH_PPC64 ; then
  93 + cpu="ppc64"
  94 + else
  95 + cpu="ppc"
  96 + fi
91 97 else
92   - cpu=`test $(uname -s) = AIX && uname -p || uname -m`
  98 + cpu=`uname -m`
93 99 fi
94 100  
95 101 target_list=""
... ... @@ -127,8 +133,11 @@ case "$cpu" in
127 133 mips64)
128 134 cpu="mips64"
129 135 ;;
130   - "Power Macintosh"|ppc|ppc64|powerpc)
131   - cpu="powerpc"
  136 + ppc)
  137 + cpu="ppc"
  138 + ;;
  139 + ppc64)
  140 + cpu="ppc64"
132 141 ;;
133 142 s390*)
134 143 cpu="s390"
... ... @@ -678,7 +687,8 @@ if test "$cpu" = "armv4b" \
678 687 -o "$cpu" = "m68k" \
679 688 -o "$cpu" = "mips" \
680 689 -o "$cpu" = "mips64" \
681   - -o "$cpu" = "powerpc" \
  690 + -o "$cpu" = "ppc" \
  691 + -o "$cpu" = "ppc64" \
682 692 -o "$cpu" = "s390" \
683 693 -o "$cpu" = "sparc" \
684 694 -o "$cpu" = "sparc64"; then
... ... @@ -692,20 +702,11 @@ hostlongbits="32"
692 702 if test "$cpu" = "x86_64" \
693 703 -o "$cpu" = "alpha" \
694 704 -o "$cpu" = "ia64" \
695   - -o "$cpu" = "sparc64"; then
  705 + -o "$cpu" = "sparc64" \
  706 + -o "$cpu" = "ppc64"; then
696 707 hostlongbits="64"
697 708 fi
698 709  
699   -# ppc specific hostlongbits selection
700   -if test "$cpu" = "powerpc" ; then
701   - if $cc $ARCH_CFLAGS -dM -E - -o $TMPI 2>/dev/null </dev/null; then
702   - grep -q __powerpc64__ $TMPI && hostlongbits=64
703   - else
704   - echo hostlongbits test failed
705   - exit 1
706   - fi
707   -fi
708   -
709 710 # check gcc options support
710 711 cat > $TMPC <<EOF
711 712 int main(void) {
... ... @@ -1210,14 +1211,13 @@ case &quot;$cpu&quot; in
1210 1211 echo "ARCH=mips64" >> $config_mak
1211 1212 echo "#define HOST_MIPS64 1" >> $config_h
1212 1213 ;;
1213   - powerpc)
1214   - if test "$hostlongbits" = "32"; then
1215   - echo "ARCH=ppc" >> $config_mak
1216   - echo "#define HOST_PPC 1" >> $config_h
1217   - else
1218   - echo "ARCH=ppc64" >> $config_mak
1219   - echo "#define HOST_PPC64 1" >> $config_h
1220   - fi
  1214 + ppc)
  1215 + echo "ARCH=ppc" >> $config_mak
  1216 + echo "#define HOST_PPC 1" >> $config_h
  1217 + ;;
  1218 + ppc64)
  1219 + echo "ARCH=ppc64" >> $config_mak
  1220 + echo "#define HOST_PPC64 1" >> $config_h
1221 1221 ;;
1222 1222 s390)
1223 1223 echo "ARCH=s390" >> $config_mak
... ... @@ -1534,7 +1534,7 @@ gdb_xml_files=&quot;&quot;
1534 1534  
1535 1535 # Make sure the target and host cpus are compatible
1536 1536 if test "$kvm" = "yes" -a ! \( "$target_cpu" = "$cpu" -o \
1537   - \( "$target_cpu" = "ppcemb" -a "$cpu" = "powerpc" \) -o \
  1537 + \( "$target_cpu" = "ppcemb" -a "$cpu" = "ppc" \) -o \
1538 1538 \( "$target_cpu" = "x86_64" -a "$cpu" = "i386" \) -o \
1539 1539 \( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) \) ; then
1540 1540 kvm="no"
... ...