From: Jens Axboe Date: Thu, 24 Jan 2013 17:34:14 +0000 (-0700) Subject: configure: show help for bad option X-Git-Tag: fio-2.1~57^2~28 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=47f4463579ab92332ef995774d8578b0191da6e4;p=fio.git configure: show help for bad option Signed-off-by: Jens Axboe --- diff --git a/configure b/configure index 92734492..af2c1d97 100755 --- a/configure +++ b/configure @@ -104,6 +104,8 @@ cc="${CC-${cross_prefix}gcc}" # default options gfio="no" +show_help="no" +exit_val=0 # parse options for opt do @@ -116,16 +118,21 @@ for opt do gfio="yes" ;; --help) - echo "--cc= Specify compiler to use" - echo "--enable-gfio Enable building of gtk gfio" - exit 0 + show_help="yes" ;; *) echo "Bad option $opt" - exit 1 + show_help="yes" + exit_val=1 esac done +if test "$show_help" = "yes" ; then + echo "--cc= Specify compiler to use" + echo "--enable-gfio Enable building of gtk gfio" + exit $exit_val +fi + if check_define __linux__ ; then targetos="Linux" elif check_define __OpenBSD__ ; then