From 47f4463579ab92332ef995774d8578b0191da6e4 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 24 Jan 2013 10:34:14 -0700 Subject: [PATCH] configure: show help for bad option Signed-off-by: Jens Axboe --- configure | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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 -- 2.25.1