From: Wei Liu Subject: Re: [PATCH 2/2] configure: check for argp Date: Mon, 22 Jun 2015 11:45:36 +0100 Message-ID: <20150622104536.GP28194@zion.uk.xensource.com> References: <1434704305-64692-1-git-send-email-roger.pau@citrix.com> <1434704305-64692-3-git-send-email-roger.pau@citrix.com> <5587DF8B.7000400@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z6zEZ-0006N3-HQ for xen-devel@lists.xenproject.org; Mon, 22 Jun 2015 10:45:47 +0000 Content-Disposition: inline In-Reply-To: <5587DF8B.7000400@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Olaf Hering , Wei Liu , Ian Campbell , Ian Jackson , xen-devel@lists.xenproject.org, Roger Pau Monne List-Id: xen-devel@lists.xenproject.org On Mon, Jun 22, 2015 at 11:12:27AM +0100, George Dunlap wrote: > On 06/19/2015 09:58 AM, Roger Pau Monne wrote: > > argp is only present in the GNU C library, so add a specific check for = it in > > configure. Also check if -largp is needed for linking against it. > > = > > Please run autoconf after applying. > > = > > Signed-off-by: Roger Pau Monn=E9 > > Cc: George Dunlap > > Cc: Ian Jackson > > Cc: Ian Campbell > > Cc: Wei Liu > > Cc: Olaf Hering > > --- > > config/Tools.mk.in | 1 + > > tools/configure.ac | 4 ++++ > > tools/xentrace/Makefile | 2 +- > > 3 files changed, 6 insertions(+), 1 deletion(-) > > = > > diff --git a/config/Tools.mk.in b/config/Tools.mk.in > > index aef9ed6..9bd5f6c 100644 > > --- a/config/Tools.mk.in > > +++ b/config/Tools.mk.in > > @@ -78,5 +78,6 @@ CONFIG_GCRYPT :=3D @libgcrypt@ > > EXTFS_LIBS :=3D @EXTFS_LIBS@ > > CURSES_LIBS :=3D @CURSES_LIBS@ > > TINFO_LIBS :=3D @TINFO_LIBS@ > > +ARGP_LDFLAGS :=3D @argp_ldflags@ > > = > > FILE_OFFSET_BITS :=3D @FILE_OFFSET_BITS@ > > diff --git a/tools/configure.ac b/tools/configure.ac > > index 1a06ddf..5eb4799 100644 > > --- a/tools/configure.ac > > +++ b/tools/configure.ac > > @@ -356,6 +356,10 @@ AC_CHECK_LIB([yajl], [yajl_alloc], [], > > AC_CHECK_LIB([z], [deflateCopy], [], [AC_MSG_ERROR([Could not find zli= b])]) > > AC_CHECK_LIB([iconv], [libiconv_open], [libiconv=3D"y"], [libiconv=3D"= n"]) > > AC_SUBST(libiconv) > > +AC_CHECK_HEADER([argp.h], [ > > +AC_CHECK_LIB([argp], [argp_usage], [argp_ldflags=3D"-largp"]) > > +], [AC_MSG_ERROR([Could not find argp])]) > > +AC_SUBST(argp_ldflags) > = > Sorry if my config-fu isn't very good: Is this basically requiring the > user to have argp available at configure time? Does this make it more > difficult to build on BSDs? Or is it just a matter of adding one more > library to the already long list of dependencies? This is just to make that dependency explicit. This is a step towards the right direction. It's not going to make it easier or harder to build on BSDs. Wei. > = > -George