[uClinux-dev] [patch] use AC_MSG_ERROR() instead of echo;exit 1

Greg Ungerer gerg at snapgear.com
Tue Jan 2 22:49:38 EST 2007


Hi Mike,

Mike Frysinger wrote:
> the proper way to do error message output is with AC_MSG_ERROR() ... patch 
> attached

Committed to CVS.

Thanks
Greg



> ------------------------------------------------------------------------
> 
> Index: configure.in
> ===================================================================
> RCS file: /var/cvs/elf2flt/configure.in,v
> retrieving revision 1.9
> diff -u -p -r1.9 configure.in
> --- configure.in	10 Jul 2006 22:23:46 -0000	1.9
> +++ configure.in	30 Dec 2006 03:27:45 -0000
> @@ -81,29 +81,29 @@ fi
>  binutils_ldscript_dir="$ac_binutils_ldscript_dir"
>  
>  if test "$ac_libbfd" = "NONE" -o "$ac_libiberty" = "NONE" ; then
> -	echo
> -	echo "You need to specify the location of the libfd.a and libiberty.a"
> -	echo "host libraries from the binutils package."
> -	echo
> -	echo "Run configure again specifying these options:"
> -	echo
> -	echo "  ./configure --target=<ARCH> --with-bfd-include-dir=<dir> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>"
> -	echo
> -	exit 1
> +	AC_MSG_ERROR([
> +
> +You need to specify the location of the libfd.a and libiberty.a
> +host libraries from the binutils package.
> +	
> +Run configure again specifying these options:
> +	
> +  ./configure --target=<ARCH> --with-bfd-include-dir=<dir> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>
> +])
>  fi
>  
>  if test "$ac_bfd_include_dir" = "NONE" ; then
> -	echo
> -	echo "You need to specify the location of the bfd.h header from a"
> -	echo "configured/compiled version of the binutils package for your target."
> -	echo "Without this your elf2flt may crash as it will try to use the"
> -	echo "systems bfd.h which may be from a different binutils package."
> -	echo
> -	echo "Run configure again specifying these options:"
> -	echo
> -	echo "  ./configure --target=<ARCH> --with-bfd-include-dir=<dir> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>"
> -	echo
> -	exit 1
> +	AC_MSG_ERROR([
> +
> +You need to specify the location of the bfd.h header from a
> +configured/compiled version of the binutils package for your target.
> +Without this your elf2flt may crash as it will try to use the
> +systems bfd.h which may be from a different binutils package.
> +
> +Run configure again specifying these options:
> +
> +  ./configure --target=<ARCH> --with-bfd-include-dir=<dir> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>
> +])
>  fi
>  
>  dnl Checks for header files.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg at snapgear.com
SnapGear -- a Secure Computing Company      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com


More information about the uClinux-dev mailing list