From: Jens Axboe Date: Tue, 29 Jan 2013 09:06:30 +0000 (+0100) Subject: configure: enable --extra-cflags for Windows X-Git-Tag: fio-2.0.14~67 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=899fab33f71cd9fd7037ee4c0df707daa86a0bbd configure: enable --extra-cflags for Windows Add configure help as well. Signed-off-by: Jens Axboe --- diff --git a/configure b/configure index 4402f3a4..583e3ab2 100755 --- a/configure +++ b/configure @@ -122,6 +122,9 @@ cpu="" cc="${CC-${cross_prefix}gcc}" +show_help="no" +exit_val=0 + # parse options for opt do optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'` @@ -130,12 +133,22 @@ for opt do ;; --extra-cflags=*) CFLAGS="$CFLAGS $optarg" ;; + --help) + 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 "--extra-cflags= Specify extra CFLAGS to pass to compiler" + exit $exit_val +fi + if check_define __linux__ ; then targetos="Linux" elif check_define __OpenBSD__ ; then @@ -188,7 +201,7 @@ CYGWIN*) output_sym "CONFIG_GETTIMEOFDAY" output_sym "CONFIG_CLOCK_GETTIME" echo "CC=$CC" >> $config_host_mak - echo "EXTFLAGS=-include config-host.h -D_GNU_SOURCE" >> $config_host_mak + echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak exit 0 esac