From: Ian Campbell Subject: Re: [Xen-users] configure.ac not correct with test about libm ? (patch included) Date: Mon, 23 Jul 2012 12:59:22 +0100 Message-ID: <1343044762.5797.14.camel@zakaz.uk.xensource.com> References: <20120723114918.GA24474@bloms.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120723114918.GA24474@bloms.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dieter Bloms Cc: "xen-users@lists.xen.org" , Roger Pau Monne , xen-devel List-Id: xen-devel@lists.xenproject.org On Mon, 2012-07-23 at 12:49 +0100, Dieter Bloms wrote: > Hi, > > I want to compile xen-unstable (last commit 25622:3c426da4788e) on > alpinelinux. > > During the run of configure there is an error message like: > > "checking for isnan in -lm... no" > > I discussed this with the maintainer of the alpinelinux distribution > and he told me, that the macro in configure.ac is wrong. > > I found out, that isnan is a macro not a function, so we have to use > AC_CHECK_DECLS instead of AC_CHECK_LIB. Is isnan always macro, or just in this particular libc implementation? Or does AC_CHECK_DECLS work right whether it is a macro or a function? > So made this little patch to get it work: > > --snip-- > diff -r 3c426da4788e tools/configure.ac > --- a/tools/configure.ac Sun Jul 22 16:37:25 2012 +0100 > +++ b/tools/configure.ac Mon Jul 23 13:43:16 2012 +0200 > @@ -133,7 +133,7 @@ > AC_SUBST(zlib) > AC_CHECK_LIB([aio], [io_setup], [system_aio="y"], [system_aio="n"]) > AC_SUBST(system_aio) > -AC_CHECK_LIB([m], [isnan], [], [AC_MSG_ERROR([Could not find libm])]) > +AC_CHECK_DECLS([isnan], [], [AC_MSG_ERROR([Could not find libm])], [[#include ]]) > AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])]) > AC_CHECK_LIB([ext2fs], [ext2fs_open2], [libext2fs="y"], [libext2fs="n"]) > AC_SUBST(libext2fs) > --snip-- > > maybe someone of the developers is willing to add this little patch. Please submit patches to xen-devel according to the procedure in http://wiki.xen.org/wiki/SubmittingXenPatches , I've CC'd it this time for you In particular it will need a Signed off by line. Ian.