提交 b1a550a0 编写于 作者: P pbrook

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
上级 0f8134bf
...@@ -83,6 +83,7 @@ alsa="no" ...@@ -83,6 +83,7 @@ alsa="no"
fmod="no" fmod="no"
fmod_lib="" fmod_lib=""
fmod_inc="" fmod_inc=""
bsd="no"
linux="no" linux="no"
kqemu="no" kqemu="no"
profiler="no" profiler="no"
...@@ -133,7 +134,7 @@ fi ...@@ -133,7 +134,7 @@ fi
esac esac
if [ "$bsd" = "yes" ] ; then if [ "$bsd" = "yes" ] ; then
if [ ! "$darwin" = "yes" ] ; then if [ "$darwin" != "yes" ] ; then
make="gmake" make="gmake"
fi fi
fi fi
...@@ -152,31 +153,32 @@ else ...@@ -152,31 +153,32 @@ else
fi fi
for opt do for opt do
optarg=`expr "$opt" : '[^=]*=\(.*\)'`
case "$opt" in case "$opt" in
--help|-h) show_help=yes --help|-h) show_help=yes
;; ;;
--prefix=*) prefix=`echo $opt | cut -d '=' -f 2` --prefix=*) prefix="$optarg"
;; ;;
--interp-prefix=*) interp_prefix=`echo $opt | cut -d '=' -f 2` --interp-prefix=*) interp_prefix="$optarg"
;; ;;
--source-path=*) source_path=`echo $opt | cut -d '=' -f 2` --source-path=*) source_path="$optarg"
source_path_used="yes" source_path_used="yes"
;; ;;
--cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2` --cross-prefix=*) cross_prefix="$optarg"
;; ;;
--cc=*) cc=`echo $opt | cut -d '=' -f 2` --cc=*) cc="$optarg"
;; ;;
--host-cc=*) host_cc=`echo $opt | cut -d '=' -f 2` --host-cc=*) host_cc="$optarg"
;; ;;
--make=*) make=`echo $opt | cut -d '=' -f 2` --make=*) make="$optarg"
;; ;;
--extra-cflags=*) CFLAGS="${opt#--extra-cflags=}" --extra-cflags=*) CFLAGS="$optarg"
;; ;;
--extra-ldflags=*) LDFLAGS="${opt#--extra-ldflags=}" --extra-ldflags=*) LDFLAGS="$optarg"
;; ;;
--cpu=*) cpu=`echo $opt | cut -d '=' -f 2` --cpu=*) cpu="$optarg"
;; ;;
--target-list=*) target_list=${opt#--target-list=} --target-list=*) target_list="$optarg"
;; ;;
--enable-gprof) gprof="yes" --enable-gprof) gprof="yes"
;; ;;
...@@ -192,9 +194,9 @@ for opt do ...@@ -192,9 +194,9 @@ for opt do
;; ;;
--enable-fmod) fmod="yes" --enable-fmod) fmod="yes"
;; ;;
--fmod-lib=*) fmod_lib=${opt#--fmod-lib=} --fmod-lib=*) fmod_lib="$optarg"
;; ;;
--fmod-inc=*) fmod_inc=${opt#--fmod-inc=} --fmod-inc=*) fmod_inc="$optarg"
;; ;;
--enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-"
;; ;;
...@@ -206,7 +208,7 @@ for opt do ...@@ -206,7 +208,7 @@ for opt do
;; ;;
--enable-profiler) profiler="yes" --enable-profiler) profiler="yes"
;; ;;
--kernel-path=*) kernel_path=${opt#--kernel-path=} --kernel-path=*) kernel_path="$optarg"
;; ;;
--enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no" --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no"
;; ;;
...@@ -297,7 +299,7 @@ if test -z "$target_list" ; then ...@@ -297,7 +299,7 @@ if test -z "$target_list" ; then
target_list="i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user $target_list" target_list="i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user $target_list"
fi fi
else else
target_list=$(echo "$target_list" | sed -e 's/,/ /g') target_list=`echo "$target_list" | sed -e 's/,/ /g'`
fi fi
if test -z "$target_list" ; then if test -z "$target_list" ; then
echo "No targets enabled" echo "No targets enabled"
...@@ -348,15 +350,15 @@ if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/nu ...@@ -348,15 +350,15 @@ if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/nu
have_gcc3_options="yes" have_gcc3_options="yes"
fi fi
# Check for gcc4 # Check for gcc4, error if pre-gcc4
if test "$check_gcc" = "yes" ; then if test "$check_gcc" = "yes" ; then
cat > $TMPC <<EOF cat > $TMPC <<EOF
#if __GNUC__ >= 4 #if __GNUC__ < 4
#error gcc4 #error gcc3
#endif #endif
int main(){return 0;} int main(){return 0;}
EOF EOF
if ! $cc -o $TMPO $TMPC 2>/dev/null ; then if $cc -o $TMPO $TMPC 2>/dev/null ; then
echo "ERROR: \"$cc\" looks like gcc 4.x" echo "ERROR: \"$cc\" looks like gcc 4.x"
echo "QEMU is known to have problems when compiled with 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 "It is recommended that you use gcc 3.x to build QEMU"
...@@ -463,7 +465,6 @@ echo "Adlib support $adlib" ...@@ -463,7 +465,6 @@ echo "Adlib support $adlib"
echo "CoreAudio support $coreaudio" echo "CoreAudio support $coreaudio"
echo "ALSA support $alsa" echo "ALSA support $alsa"
echo "DSound support $dsound" echo "DSound support $dsound"
echo -n "FMOD support $fmod"
if test "$fmod" = "yes"; then if test "$fmod" = "yes"; then
if test -z $fmod_lib || test -z $fmod_inc; then if test -z $fmod_lib || test -z $fmod_inc; then
echo echo
...@@ -472,9 +473,11 @@ if test "$fmod" = "yes"; then ...@@ -472,9 +473,11 @@ if test "$fmod" = "yes"; then
echo echo
exit 1 exit 1
fi fi
echo -n " (lib='$fmod_lib' include='$fmod_inc')" fmod_support=" (lib='$fmod_lib' include='$fmod_inc')"
else
fmod_support=""
fi fi
echo "" echo "FMOD support $fmod $fmod_support"
echo "kqemu support $kqemu" echo "kqemu support $kqemu"
if test $sdl_too_old = "yes"; then if test $sdl_too_old = "yes"; then
...@@ -483,7 +486,6 @@ fi ...@@ -483,7 +486,6 @@ fi
#if test "$sdl_static" = "no"; then #if test "$sdl_static" = "no"; then
# echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output" # echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output"
#fi #fi
config_mak="config-host.mak" config_mak="config-host.mak"
config_h="config-host.h" config_h="config-host.h"
...@@ -610,12 +612,9 @@ if test "$fmod" = "yes" ; then ...@@ -610,12 +612,9 @@ if test "$fmod" = "yes" ; then
echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
echo "#define CONFIG_FMOD 1" >> $config_h echo "#define CONFIG_FMOD 1" >> $config_h
fi fi
echo -n "VERSION=" >>$config_mak qemu_version=`head $source_path/VERSION`
head $source_path/VERSION >>$config_mak echo "VERSION=$qemu_version" >>$config_mak
echo "" >>$config_mak echo "#define QEMU_VERSION $qemu_version" >> $config_h
echo -n "#define QEMU_VERSION \"" >> $config_h
head $source_path/VERSION >> $config_h
echo "\"" >> $config_h
echo "SRC_PATH=$source_path" >> $config_mak echo "SRC_PATH=$source_path" >> $config_mak
if [ "$source_path_used" = "yes" ]; then if [ "$source_path_used" = "yes" ]; then
...@@ -631,7 +630,6 @@ if [ "$bsd" = "yes" ] ; then ...@@ -631,7 +630,6 @@ if [ "$bsd" = "yes" ] ; then
fi fi
for target in $target_list; do for target in $target_list; do
target_dir="$target" target_dir="$target"
config_mak=$target_dir/config.mak config_mak=$target_dir/config.mak
config_h=$target_dir/config.h config_h=$target_dir/config.h
...@@ -761,11 +759,11 @@ if test "$target_user_only" = "no"; then ...@@ -761,11 +759,11 @@ if test "$target_user_only" = "no"; then
else else
echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak
fi fi
echo -n "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
if [ "${aa}" = "yes" ] ; then if [ "${aa}" = "yes" ] ; then
echo -n " `aalib-config --cflags`" >> $config_mak ; echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_mak
else
echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
fi fi
echo "" >> $config_mak
fi fi
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册