From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 2/2] configure: check for argp Date: Mon, 22 Jun 2015 12:13:42 +0100 Message-ID: <5587EDE6.5070908@eu.citrix.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> <20150622104536.GP28194@zion.uk.xensource.com> <5587E9B0.8070608@eu.citrix.com> <20150622111017.GQ28194@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z6zg7-0007qd-UH for xen-devel@lists.xenproject.org; Mon, 22 Jun 2015 11:14:16 +0000 In-Reply-To: <20150622111017.GQ28194@zion.uk.xensource.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: Wei Liu Cc: xen-devel@lists.xenproject.org, Olaf Hering , Ian Jackson , Ian Campbell , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org On 06/22/2015 12:10 PM, Wei Liu wrote: > On Mon, Jun 22, 2015 at 11:55:44AM +0100, George Dunlap wrote: >> On 06/22/2015 11:45 AM, Wei Liu wrote: >>> 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 fo= r 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 z= lib])]) >>>>> 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. >> >> Well the reason I was asking is that if it would be a big hassle for >> someone building on BSDs to install the argp library, then a better >> option might to just not build xenalyze. >> >> On the other hand, if it's no more difficult than installing libyajl (or >> any of the other dozen dependencies), then adding a dependency is fine. >> And naturally in that case making the dependency explicit is the right >> thing to do. >> > = > Yes, package argp exist in FreeBSD and NetBSD. In which case: Acked-by: George Dunlap