From patchwork Fri May 28 12:35:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hangbin Liu X-Patchwork-Id: 449895 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2E25C4708C for ; Fri, 28 May 2021 12:37:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E1A5611C2 for ; Fri, 28 May 2021 12:37:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236698AbhE1MjX (ORCPT ); Fri, 28 May 2021 08:39:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236939AbhE1Mhs (ORCPT ); Fri, 28 May 2021 08:37:48 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A413DC06134B for ; Fri, 28 May 2021 05:35:59 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id z19-20020a7bc7d30000b029017521c1fb75so4500760wmk.0 for ; Fri, 28 May 2021 05:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=CAJJ5ylE6DY1LEIvtkhT4WtykTW0tludDFTq303oux4=; b=TIozvvJQPkXu4CDZis28mzSB0BsmPt8pL9vaufk0dUutEqrhpHh149Eh4msMIbh6oH 70TBMs4xNBKU38kNg2iV2Wmsmg1lj2fJsFTYHrxszRwMmyMP0AcSbNZGfTittXVJlzkj b8IuzRTY7b4gXF/VyEaZED9Wuz6cpeEcZzaq4bZXtkRfIkejsOMI5gmzeqwC726hnl5y 5WnHaFvUcXxzzS1MgP5jagPqz8OCh9Pg8OzOrUgmPbXJwUhk+nJ6U+FSKyV44M+R26Uo WILaB4/pbIbYSV653afrXUSsEF3vBFE3MV2Mj+96/eS3stEFFgPX3gQMEkJ+l+GS2xiB Jj9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CAJJ5ylE6DY1LEIvtkhT4WtykTW0tludDFTq303oux4=; b=gjCvksYOfyDHx3GHs8lXTbQIJBMm7OCBA0WU/9JOrAowJrTuBjgY2Sy+IjyOrn0l7G tcDjCtzKpO4mVGpWihFjxS34ImpJaTr5vC5oX8VixVhk1wZJYwyAl5jGq/0H/APUGkrG 4lDp9tZF83p90XuMZmI2RjzkLnNblELjDJONFbS5pv6QenFnoTytcU/jSy2LcfJhEDhU Sga2hleAOcpSDuYhOgYif9Y8zjF38SSt9S/NILN9f2UGqnpoXowY0ZPHFBViGcq+88GJ 43/CERlAq4yudG9Het8d1mM67huIW4lX/8u72uFCS8VSjMaU9O9XbllnYojT5c0/XHcw 5/Nw== X-Gm-Message-State: AOAM531E9nhh3nmqIp8KCGuM9Y1a5BcXhyeFN9LgfrQ74q7Mw0imAvau I0Fgz82Ur0oxR5ba6OFx+XDMw/oyQHlZh4Xt X-Google-Smtp-Source: ABdhPJw8cMgGTksLR+xZtQGlN63wWp8cPEbNaz8t7M7JwJDM/gJGGXB4FJYoh9RwoxL98+c0ZGkVLw== X-Received: by 2002:a05:600c:2cd2:: with SMTP id l18mr8275963wmc.142.1622205357884; Fri, 28 May 2021 05:35:57 -0700 (PDT) Received: from wsfd-netdev-buildsys.ntdv.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id l8sm3980580wrf.0.2021.05.28.05.35.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 May 2021 05:35:57 -0700 (PDT) From: Hangbin Liu To: netdev@vger.kernel.org Cc: David Ahern , Stephen Hemminger , Hangbin Liu Subject: [Draft iproute2-next PATCH] configure: add options ability Date: Fri, 28 May 2021 08:35:43 -0400 Message-Id: <20210528123543.3836-1-liuhangbin@gmail.com> X-Mailer: git-send-email 2.18.1 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Hangbin Liu Hi David, As we talked in my previous libbpf support patchset. You'd like to make configure with option settings. Here is a draft patch. Not sure if this is what you want. There are also a lot variables that I not sure if we should add options for them. e.g. PKG_CONFIG, CC, IPTC, IPT_LIB_DIR, etc. Do you have any suggestions? --- As there are more and more global environment variables in configures. it would be more clear with options for users. Add related options for variables. Keep using the same name so the old way (set global env) is still working. Signed-off-by: Hangbin Liu --- configure | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 179eae08..aae324c9 100755 --- a/configure +++ b/configure @@ -1,13 +1,8 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # This is not an autoconf generated configure -# -# Influential LIBBPF environment variables: -# LIBBPF_FORCE={on,off} on: require link against libbpf; -# off: disable libbpf probing -# LIBBPF_DIR Path to libbpf DESTDIR to use -INCLUDE=${1:-"$PWD/include"} +INCLUDE="$PWD/include" # Output file which is input to Makefile CONFIG=config.mk @@ -486,6 +481,44 @@ endif EOF } +usage() +{ + cat <$CONFIG quiet_config >> $CONFIG