From: Wei Liu Subject: Re: [PATCH 2/2] configure: check for argp Date: Fri, 19 Jun 2015 14:10:06 +0100 Message-ID: <20150619131006.GI28194@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> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z5w3f-0000gM-9B for xen-devel@lists.xenproject.org; Fri, 19 Jun 2015 13:10:11 +0000 Content-Disposition: inline In-Reply-To: <1434704305-64692-3-git-send-email-roger.pau@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: Roger Pau Monne Cc: Olaf Hering , Wei Liu , Ian Campbell , George Dunlap , Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Fri, Jun 19, 2015 at 10:58:25AM +0200, 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 Acked-by: Wei Liu > --- > 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 zlib]= )]) > 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) > = > # FDT is needed only on ARM > case "$host_cpu" in > diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile > index 7d874a3..2f57bda 100644 > --- a/tools/xentrace/Makefile > +++ b/tools/xentrace/Makefile > @@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk > CFLAGS +=3D -Werror > = > CFLAGS +=3D $(CFLAGS_libxenctrl) > -LDLIBS +=3D $(LDLIBS_libxenctrl) > +LDLIBS +=3D $(LDLIBS_libxenctrl) $(ARGP_LDFLAGS) > = > BIN-$(CONFIG_X86) =3D xenalyze > BIN =3D $(BIN-y) > -- = > 1.9.5 (Apple Git-50.3)