Commit b1a550a0da91d0b14e9202f1f5a84c4a920d5812
1 parent
0f8134bf
Remove non-portable code from configure.
Allow newline at end of VERSION file. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1816 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
33 additions
and
35 deletions
VERSION
configure
| ... | ... | @@ -83,6 +83,7 @@ alsa="no" |
| 83 | 83 | fmod="no" |
| 84 | 84 | fmod_lib="" |
| 85 | 85 | fmod_inc="" |
| 86 | +bsd="no" | |
| 86 | 87 | linux="no" |
| 87 | 88 | kqemu="no" |
| 88 | 89 | profiler="no" |
| ... | ... | @@ -133,7 +134,7 @@ fi |
| 133 | 134 | esac |
| 134 | 135 | |
| 135 | 136 | if [ "$bsd" = "yes" ] ; then |
| 136 | - if [ ! "$darwin" = "yes" ] ; then | |
| 137 | + if [ "$darwin" != "yes" ] ; then | |
| 137 | 138 | make="gmake" |
| 138 | 139 | fi |
| 139 | 140 | fi |
| ... | ... | @@ -152,31 +153,32 @@ else |
| 152 | 153 | fi |
| 153 | 154 | |
| 154 | 155 | for opt do |
| 156 | + optarg=`expr "$opt" : '[^=]*=\(.*\)'` | |
| 155 | 157 | case "$opt" in |
| 156 | 158 | --help|-h) show_help=yes |
| 157 | 159 | ;; |
| 158 | - --prefix=*) prefix=`echo $opt | cut -d '=' -f 2` | |
| 160 | + --prefix=*) prefix="$optarg" | |
| 159 | 161 | ;; |
| 160 | - --interp-prefix=*) interp_prefix=`echo $opt | cut -d '=' -f 2` | |
| 162 | + --interp-prefix=*) interp_prefix="$optarg" | |
| 161 | 163 | ;; |
| 162 | - --source-path=*) source_path=`echo $opt | cut -d '=' -f 2` | |
| 164 | + --source-path=*) source_path="$optarg" | |
| 163 | 165 | source_path_used="yes" |
| 164 | 166 | ;; |
| 165 | - --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2` | |
| 167 | + --cross-prefix=*) cross_prefix="$optarg" | |
| 166 | 168 | ;; |
| 167 | - --cc=*) cc=`echo $opt | cut -d '=' -f 2` | |
| 169 | + --cc=*) cc="$optarg" | |
| 168 | 170 | ;; |
| 169 | - --host-cc=*) host_cc=`echo $opt | cut -d '=' -f 2` | |
| 171 | + --host-cc=*) host_cc="$optarg" | |
| 170 | 172 | ;; |
| 171 | - --make=*) make=`echo $opt | cut -d '=' -f 2` | |
| 173 | + --make=*) make="$optarg" | |
| 172 | 174 | ;; |
| 173 | - --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}" | |
| 175 | + --extra-cflags=*) CFLAGS="$optarg" | |
| 174 | 176 | ;; |
| 175 | - --extra-ldflags=*) LDFLAGS="${opt#--extra-ldflags=}" | |
| 177 | + --extra-ldflags=*) LDFLAGS="$optarg" | |
| 176 | 178 | ;; |
| 177 | - --cpu=*) cpu=`echo $opt | cut -d '=' -f 2` | |
| 179 | + --cpu=*) cpu="$optarg" | |
| 178 | 180 | ;; |
| 179 | - --target-list=*) target_list=${opt#--target-list=} | |
| 181 | + --target-list=*) target_list="$optarg" | |
| 180 | 182 | ;; |
| 181 | 183 | --enable-gprof) gprof="yes" |
| 182 | 184 | ;; |
| ... | ... | @@ -192,9 +194,9 @@ for opt do |
| 192 | 194 | ;; |
| 193 | 195 | --enable-fmod) fmod="yes" |
| 194 | 196 | ;; |
| 195 | - --fmod-lib=*) fmod_lib=${opt#--fmod-lib=} | |
| 197 | + --fmod-lib=*) fmod_lib="$optarg" | |
| 196 | 198 | ;; |
| 197 | - --fmod-inc=*) fmod_inc=${opt#--fmod-inc=} | |
| 199 | + --fmod-inc=*) fmod_inc="$optarg" | |
| 198 | 200 | ;; |
| 199 | 201 | --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" |
| 200 | 202 | ;; |
| ... | ... | @@ -206,7 +208,7 @@ for opt do |
| 206 | 208 | ;; |
| 207 | 209 | --enable-profiler) profiler="yes" |
| 208 | 210 | ;; |
| 209 | - --kernel-path=*) kernel_path=${opt#--kernel-path=} | |
| 211 | + --kernel-path=*) kernel_path="$optarg" | |
| 210 | 212 | ;; |
| 211 | 213 | --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no" |
| 212 | 214 | ;; |
| ... | ... | @@ -297,7 +299,7 @@ if test -z "$target_list" ; then |
| 297 | 299 | target_list="i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user $target_list" |
| 298 | 300 | fi |
| 299 | 301 | else |
| 300 | - target_list=$(echo "$target_list" | sed -e 's/,/ /g') | |
| 302 | + target_list=`echo "$target_list" | sed -e 's/,/ /g'` | |
| 301 | 303 | fi |
| 302 | 304 | if test -z "$target_list" ; then |
| 303 | 305 | echo "No targets enabled" |
| ... | ... | @@ -348,15 +350,15 @@ if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/nu |
| 348 | 350 | have_gcc3_options="yes" |
| 349 | 351 | fi |
| 350 | 352 | |
| 351 | -# Check for gcc4 | |
| 353 | +# Check for gcc4, error if pre-gcc4 | |
| 352 | 354 | if test "$check_gcc" = "yes" ; then |
| 353 | 355 | cat > $TMPC <<EOF |
| 354 | -#if __GNUC__ >= 4 | |
| 355 | -#error gcc4 | |
| 356 | +#if __GNUC__ < 4 | |
| 357 | +#error gcc3 | |
| 356 | 358 | #endif |
| 357 | 359 | int main(){return 0;} |
| 358 | 360 | EOF |
| 359 | - if ! $cc -o $TMPO $TMPC 2>/dev/null ; then | |
| 361 | + if $cc -o $TMPO $TMPC 2>/dev/null ; then | |
| 360 | 362 | echo "ERROR: \"$cc\" looks like gcc 4.x" |
| 361 | 363 | echo "QEMU is known to have problems when compiled with gcc 4.x" |
| 362 | 364 | echo "It is recommended that you use gcc 3.x to build QEMU" |
| ... | ... | @@ -463,7 +465,6 @@ echo "Adlib support $adlib" |
| 463 | 465 | echo "CoreAudio support $coreaudio" |
| 464 | 466 | echo "ALSA support $alsa" |
| 465 | 467 | echo "DSound support $dsound" |
| 466 | -echo -n "FMOD support $fmod" | |
| 467 | 468 | if test "$fmod" = "yes"; then |
| 468 | 469 | if test -z $fmod_lib || test -z $fmod_inc; then |
| 469 | 470 | echo |
| ... | ... | @@ -472,9 +473,11 @@ if test "$fmod" = "yes"; then |
| 472 | 473 | echo |
| 473 | 474 | exit 1 |
| 474 | 475 | fi |
| 475 | - echo -n " (lib='$fmod_lib' include='$fmod_inc')" | |
| 476 | + fmod_support=" (lib='$fmod_lib' include='$fmod_inc')" | |
| 477 | +else | |
| 478 | + fmod_support="" | |
| 476 | 479 | fi |
| 477 | -echo "" | |
| 480 | +echo "FMOD support $fmod $fmod_support" | |
| 478 | 481 | echo "kqemu support $kqemu" |
| 479 | 482 | |
| 480 | 483 | if test $sdl_too_old = "yes"; then |
| ... | ... | @@ -483,7 +486,6 @@ fi |
| 483 | 486 | #if test "$sdl_static" = "no"; then |
| 484 | 487 | # echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output" |
| 485 | 488 | #fi |
| 486 | - | |
| 487 | 489 | config_mak="config-host.mak" |
| 488 | 490 | config_h="config-host.h" |
| 489 | 491 | |
| ... | ... | @@ -610,12 +612,9 @@ if test "$fmod" = "yes" ; then |
| 610 | 612 | echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak |
| 611 | 613 | echo "#define CONFIG_FMOD 1" >> $config_h |
| 612 | 614 | fi |
| 613 | -echo -n "VERSION=" >>$config_mak | |
| 614 | -head $source_path/VERSION >>$config_mak | |
| 615 | -echo "" >>$config_mak | |
| 616 | -echo -n "#define QEMU_VERSION \"" >> $config_h | |
| 617 | -head $source_path/VERSION >> $config_h | |
| 618 | -echo "\"" >> $config_h | |
| 615 | +qemu_version=`head $source_path/VERSION` | |
| 616 | +echo "VERSION=$qemu_version" >>$config_mak | |
| 617 | +echo "#define QEMU_VERSION $qemu_version" >> $config_h | |
| 619 | 618 | |
| 620 | 619 | echo "SRC_PATH=$source_path" >> $config_mak |
| 621 | 620 | if [ "$source_path_used" = "yes" ]; then |
| ... | ... | @@ -631,7 +630,6 @@ if [ "$bsd" = "yes" ] ; then |
| 631 | 630 | fi |
| 632 | 631 | |
| 633 | 632 | for target in $target_list; do |
| 634 | - | |
| 635 | 633 | target_dir="$target" |
| 636 | 634 | config_mak=$target_dir/config.mak |
| 637 | 635 | config_h=$target_dir/config.h |
| ... | ... | @@ -761,11 +759,11 @@ if test "$target_user_only" = "no"; then |
| 761 | 759 | else |
| 762 | 760 | echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak |
| 763 | 761 | fi |
| 764 | - echo -n "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak | |
| 765 | 762 | if [ "${aa}" = "yes" ] ; then |
| 766 | - echo -n " `aalib-config --cflags`" >> $config_mak ; | |
| 763 | + echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_mak | |
| 764 | + else | |
| 765 | + echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak | |
| 767 | 766 | fi |
| 768 | - echo "" >> $config_mak | |
| 769 | 767 | fi |
| 770 | 768 | fi |
| 771 | 769 | ... | ... |