[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-4.15] autoconf: check endian.h include path


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 4 Feb 2021 10:59:09 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=16gpnVe2bqK+U1OuPxS4+M70hUJQBvf7g9iJRjSl3oI=; b=n0NcN8nxrvAB8kC97a9C3UnUd8JzgIX0dcumVu1yiHuNNASFvi6PSWUUhXk2inahMxgJMUKBCA9cMwwGlgYv4ob/x14c3P33TA5/U8YORYCVrjVYAIjcdzOwQFyJbeu9InTq1GI55s3cPmC0b1pwLc6az5Hpbc286/5G5HgqX80TPsye+tc6A3IdioVPWHxXKN0aqc8Q0dummmjnI9GybJ3OffsPZFiMkRF5sEy59pEXmrK+vlZuhwnmXrdj2d01HB1+D4D0i6P4FtV1/UUHnJMH7NpyGQ9Yxcl43wYBD2Zda8ec75pmxvk+3Y0JDsDnaW2m+sjU36HGWlbvXc85IA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JbAeWZhFt8a5ECwoQk72MGtGSdXxcEXPTz5Qv9nkAxJaHaEXa4fzTfLd9a8vQwgajvKRcGTAMpMbeZqGIUOKL8YJY6hg472YC1Eur/uFyqKGaLfLz6+2nYb8c/HXV6fbe32Ip8PDEB0/4KH8uYa/aCd9uEId1bBXptuprX14G8gwHHneUULRWFCXCGvkomPtH3qmzlbcOVwyNZDFkzhAxrRlI3tndxV2GOShL7BZNIpJuarez3huJVav3UnzIBIBi5cHkN9AKFjLbQJNv0ZMWkxcgffx4EI0wNV/NwRo9Z5/Mf9dvp7yqfpUJZLCX1bD8sQSoyJk4Ebtdr8GQqAE2g==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 04 Feb 2021 09:59:38 +0000
  • Ironport-sdr: iNtYdhjJhDpc6caSqQvJcZ7qPYpYWUm+kzcRt4/szpqYb1rw2yVKXGhSuctJYuebLiAR6PefHp sUiGRo/OB/yzWqVz7iTTOC9jPlj+J5pX8tsmvyP1VAuNJmSl88oCqyFEEcEjnDBqKXCgKgOGdj tTSI9wTDZVK73rnc6aBPP0IPWrtWOV2mZZSlL1luhrP4aggBpiVJn0fgOT3P8oZ25Q0pabcum9 V6pgVwrqcLnsppE08qBjgNawg+0EK2DmUc8FsL7MScVN71DetHW0TkI+1G6gOhMgl845XssMe2 xqs=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Feb 04, 2021 at 10:46:58AM +0100, Jan Beulich wrote:
> On 04.02.2021 10:38, Roger Pau Monne wrote:
> > --- a/tools/configure.ac
> > +++ b/tools/configure.ac
> > @@ -74,6 +74,7 @@ m4_include([../m4/ax_compare_version.m4])
> >  m4_include([../m4/paths.m4])
> >  m4_include([../m4/systemd.m4])
> >  m4_include([../m4/golang.m4])
> > +m4_include([../m4/header.m4])
> >  
> >  AX_XEN_EXPAND_CONFIG()
> >  
> > @@ -517,4 +518,6 @@ AC_ARG_ENABLE([pvshim],
> >  ])
> >  AC_SUBST(pvshim)
> >  
> > +AX_FIND_HEADER([INCLUDE_ENDIAN_H], [endian.h sys/endian.h])
> 
> Instead of a new macro, can't you use AC_CHECK_HEADERS()?

AC_CHECK_HEADERS doesn't do what we want here: it will instead produce
a HAVE_header-file define for each header on the list that's present,
and the action-if-found doesn't get passed the path of the found
header according to the documentation.

Here I want the variable to be set to the include path of the first
header on the list that's present on the system.

> I'm also not certain about the order of checks - what if both
> exist?

With my macro the first one will be picked.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.