From 899fab33f71cd9fd7037ee4c0df707daa86a0bbd Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 29 Jan 2013 10:06:30 +0100 Subject: [PATCH] configure: enable --extra-cflags for Windows Add configure help as well. Signed-off-by: Jens Axboe --- configure | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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 -- 2.25.1