The following patch normalizes all (most) messages as generated by configure so they are flagged as ERROR or WARNING (left some of the ones that look more informative without a flag even if they result in a fatal error).
All those messages are directed to stderr so they can be filtered/identified correctly if analyzed mechanically. Usage information is left in stdout as it doesn't denote abnormal behavior. The patch is based on a modified tree (which includes several of the previous patches sent) and won't apply cleanly and so it is not ready for merge yet. Carlo --- Index: configure =================================================================== RCS file: /sources/qemu/qemu/configure,v retrieving revision 1.165 diff -u -r1.165 configure --- configure 18 Oct 2007 20:51:48 -0000 1.165 +++ configure 23 Oct 2007 02:49:16 -0000 @@ -169,10 +168,10 @@ if test -f /opt/SUNWspro/prod/lib/libsunmath.so.1; then needs_libsunmath="yes" else - echo "QEMU will not link correctly on Solaris 8/X86 or 9/x86 without" - echo "libsunmath from the Sun Studio compilers tools, due to a lack of" - echo "C99 math features in libm.so in Solaris 8/x86 and Solaris 9/x86" - echo "Studio 11 can be downloaded from www.sun.com." + echo "QEMU will not link correctly on Solaris 8/X86 or 9/x86 without" 1>&2 + echo "libsunmath from the Sun Studio compilers tools, due to a lack of" 1>&2 + echo "C99 math features in libm.so in Solaris 8/x86 and Solaris 9/x86" 1>&2 + echo "Studio 11 can be downloaded from www.sun.com." 1>&2 exit 1 fi fi @@ -303,9 +300,11 @@ target_cpu="sparc"; cpu="sparc" ;; v9) SP_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m64" target_cpu="sparc64"; cpu="sparc64" ;; - *) echo "undefined SPARC architecture. Exiting";exit 1;; + *) echo "ERROR: undefined SPARC architecture. Exiting" 1>&2; exit 1;; esac ;; + *) echo "ERROR: unknown option $opt" 1>&2; show_help="yes" + ;; esac done @@ -412,7 +412,7 @@ if $cc -c -o $TMPO $TMPC 2> /dev/null ; then : C compiler works ok else - echo "ERROR: \"$cc\" either does not exist or does not work" + echo "ERROR: \"$cc\" either does not exist or does not work" 1>&2 exit 1 fi @@ -431,26 +431,26 @@ int main(){return 0;} EOF if "$cc" -o $TMPE $TMPC 2> /dev/null ; then - echo "WARNING: \"$cc\" looks like gcc 4.x" + echo "WARNING: \"$cc\" looks like gcc 4.x" 1>&2 found_compat_cc="no" if test "$gcc3_search" = "yes" ; then - echo "Looking for gcc 3.x" + echo "Looking for gcc 3.x" 1>&2 for compat_cc in $gcc3_list ; do if "$cross_prefix$compat_cc" --version 2> /dev/null | fgrep '(GCC) 3.' > /dev/null 2>&1 ; then - echo "Found \"$compat_cc\"" + echo "Found \"$compat_cc\"" 1>&2 cc="$cross_prefix$compat_cc" found_compat_cc="yes" break fi done if test "$found_compat_cc" = "no" ; then - echo "gcc 3.x not found!" + echo "ERROR: gcc 3.x not found!" 1>&2 fi fi if test "$found_compat_cc" = "no" ; then - 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" + echo "QEMU is known to have problems when compiled with gcc 4.x" 1>&2 + echo "It is recommended that you use gcc 3.x to build QEMU" 1>&2 + echo "To use this compiler anyway, configure with --disable-gcc-check" 1>&2 exit 1; fi fi @@ -467,30 +467,30 @@ if test "$solarisrev" -eq 10 -a "$check_gcc" = "yes" ; then solgcc=`which $cc` if test "$solgcc" = "/usr/sfw/bin/gcc" ; then - echo "Solaris 10/FCS gcc in /usr/sfw/bin will not compiled qemu correctly." - echo "please get gcc-3.4.3 or later, from www.blastwave.org using pkg-get -i gcc3" - echo "or get the latest patch from SunSolve for gcc" + echo "Solaris 10/FCS gcc in /usr/sfw/bin will not compiled qemu correctly." 1>&2 + echo "please get gcc-3.4.3 or later, from www.blastwave.org using pkg-get -i gcc3" 1>&2 + echo "or get the latest patch from SunSolve for gcc" 1>&2 exit 1 fi fi solinst=`which $install 2> /dev/null | /usr/bin/grep -v "no $install in"` if test -z "$solinst" ; then - echo "Solaris install program not found. Use --install=/usr/ucb/install or" - echo "install fileutils from www.blastwave.org using pkg-get -i fileutils" - echo "to get ginstall which is used by default (which lives in /opt/csw/bin)" + echo "Solaris install program not found. Use --install=/usr/ucb/install or" 1>&2 + echo "install fileutils from www.blastwave.org using pkg-get -i fileutils" 1>&2 + echo "to get ginstall which is used by default (which lives in /opt/csw/bin)" 1>&2 exit 1 fi if test "$solinst" = "/usr/sbin/install" ; then - echo "Error: Solaris /usr/sbin/install is not an appropriate install program." - echo "try ginstall from the GNU fileutils available from www.blastwave.org" - echo "using pkg-get -i fileutils, or use --install=/usr/ucb/install" + echo "Solaris /usr/sbin/install is not an appropriate install program." 1>&2 + echo "try ginstall from the GNU fileutils available from www.blastwave.org" 1>&2 + echo "using pkg-get -i fileutils, or use --install=/usr/ucb/install" 1>&2 exit 1 fi sol_ar=`which ar 2> /dev/null | /usr/bin/grep -v "no ar in"` if test -z "$sol_ar" ; then - echo "Error: No path includes ar" + echo "ERROR: No path includes ar" 1>&2 if test -f /usr/ccs/bin/ar ; then - echo "Add /usr/ccs/bin to your path and rerun configure" + echo "Add /usr/ccs/bin to your path and rerun configure" 1>&2 fi exit 1 fi @@ -514,7 +514,7 @@ target_list=`echo "$target_list" | sed -e 's/,/ /g'` fi if test -z "$target_list" ; then - echo "No targets enabled" + echo "ERROR: No targets enabled" 1>&2 exit 1 fi @@ -633,8 +633,8 @@ : else echo - echo "Error: Could not find alsa" - echo "Make sure to have the alsa libs and headers installed." + echo "ERROR: Could not find alsa" 1>&2 + echo "Make sure to have the alsa libs and headers installed." 1>&2 echo exit 1 fi @@ -697,8 +697,8 @@ if test "$fmod" = "yes"; then if test -z $fmod_lib || test -z $fmod_inc; then echo - echo "Error: You must specify path to FMOD library and headers" - echo "Example: --fmod-inc=/path/include/fmod --fmod-lib=/path/lib/libfmod-3.74.so" + echo "ERROR: You must specify path to FMOD library and headers" 1>&2 + echo "Example: --fmod-inc=/path/include/fmod --fmod-lib=/path/lib/libfmod-3.74.so" 1>&2 echo exit 1 fi @@ -722,11 +722,11 @@ echo "uname -r $uname_release" if test $sdl_too_old = "yes"; then -echo "-> Your SDL version is too old - please upgrade to have SDL support" +echo "ERROR: Your SDL version is too old - please upgrade to have SDL support" 1>&2 fi if [ -s /tmp/qemu-$$-sdl-config.log ]; then - echo "The error log from compiling the libSDL test is: " - cat /tmp/qemu-$$-sdl-config.log + echo "The error log from compiling the libSDL test is: " 1>&2 + cat /tmp/qemu-$$-sdl-config.log 1>&2 fi rm -f /tmp/qemu-$$-sdl-config.log #if test "$sdl_static" = "no"; then @@ -807,7 +807,7 @@ echo "ARCH=m68k" >> $config_mak echo "#define HOST_M68K 1" >> $config_h else - echo "Unsupported CPU = $cpu" + echo "ERROR: Unsupported CPU = $cpu" 1>&2 exit 1 fi if test "$bigendian" = "yes" ; then @@ -961,17 +961,15 @@ target_darwin_user="yes" ;; *) - echo "ERROR: Target '$target' not recognised" + echo "ERROR: Target '$target' not recognised" 1>&2 exit 1 ;; esac -if test "$target_user_only" = "no" -a "$check_gfx" = "yes" \ - -a "$sdl" = "no" -a "$cocoa" = "no" ; then - echo "ERROR: QEMU requires SDL or Cocoa for graphical output" - echo "To build QEMU without graphical output configure with --disable-gfx-check" - echo "Note that this will disable all output from the virtual graphics card." - exit 1; +if test "$target_user_only" = "no" -a "$sdl" = "no" -a "$cocoa" = "no" ; then + echo "WARNING: QEMU requires SDL or Cocoa for graphical output" 1>&2 + echo "Note that in order to be able to attach to the console you'll" 1>&2 + echo "need to start qemu's vncserver with --vnc and use a vnc client." 1>&2 fi #echo "Creating $config_mak, $config_h and $target_dir/Makefile" @@ -1108,7 +1106,7 @@ echo "#define TARGET_ARCH \"alpha\"" >> $config_h echo "#define TARGET_ALPHA 1" >> $config_h else - echo "Unsupported target CPU" + echo "ERROR: Unsupported target CPU" 1>&2 exit 1 fi if test "$target_bigendian" = "yes" ; then