[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87361pwf8k.fsf@toke.dk>
Date: Wed, 04 Nov 2020 12:09:15 +0100
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Hangbin Liu <haliu@...hat.com>, David Ahern <dsahern@...il.com>
Cc: Stephen Hemminger <stephen@...workplumber.org>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
David Miller <davem@...emloft.net>,
Jesper Dangaard Brouer <brouer@...hat.com>,
netdev@...r.kernel.org, bpf@...r.kernel.org,
Jiri Benc <jbenc@...hat.com>,
Andrii Nakryiko <andrii@...nel.org>
Subject: Re: [PATCHv3 iproute2-next 1/5] configure: add check_libbpf() for
later libbpf support
Hangbin Liu <haliu@...hat.com> writes:
> On Tue, Nov 03, 2020 at 10:32:37AM -0700, David Ahern wrote:
>> configure scripts usually allow you to control options directly,
>> overriding the autoprobe.
>
> What do you think of the follow update? It's a little rough and only controls
> libbpf.
>
> $ git diff
> diff --git a/configure b/configure
> index 711bb69c..be35c024 100755
> --- a/configure
> +++ b/configure
> @@ -442,6 +442,35 @@ endif
> EOF
> }
>
> +usage()
> +{
> + cat <<EOF
> +Usage: $0 [OPTIONS]
> + -h | --help Show this usage info
> + --no-libbpf build the package without libbpf
> + --libbpf-dir=DIR build the package with self defined libbpf dir
> +EOF
> + exit $1
> +}
This would be the only command line arg that configure takes; all other
options are passed via the environment. I think we should be consistent
here; and since converting the whole configure script is probably out of
scope for this patch, why not just use the existing FORCE_LIBBPF
variable?
I.e., FORCE_LIBBPF=on will fail if not libbpf is present,
FORCE_LIBBPF=off will disable libbpf entirely, and if the variable is
unset, libbpf will be used if found?
Alternatively, keep them as two separate variables (FORCE_LIBBPF and
DISABLE_LIBBPF?). I don't have any strong preference as to which of
those is best, but I think they'd both be more consistent with the
existing configure script logic...
-Toke
Powered by blists - more mailing lists