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

Re: [Xen-devel] [PATCH 07 of 10 v3] libxl: explicitly check for libmath in autoconf



On Wed, 2012-07-04 at 17:18 +0100, Dario Faggioli wrote:
> # HG changeset patch
> # User Dario Faggioli <raistlin@xxxxxxxx>
> # Date 1341416324 -7200
> # Node ID 6fd693e7f3bc8b4d9bd20befff2c13de5591a7c5
> # Parent  3b65112bedc0656512312e29b89652f1c4ca0083
> libxl: explicitly check for libmath in autoconf
> 
> As well as explicitly add -lm to libxl's Makefile.
> 
> This is because next patch uses floating point arithmetic, and
> it is better to state it clearly that we need libmath (just in
> case we find a libc  that wants that to be explicitly enforced).
> 
> Notice that autoconf should be rerun after applying this change.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> 
> diff --git a/tools/configure.ac b/tools/configure.ac
> --- a/tools/configure.ac
> +++ b/tools/configure.ac
> @@ -133,6 +133,7 @@ AC_CHECK_LIB([lzo2], [lzo1x_decompress],
>  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 libmath])])

Should this be s/libmath/libm/ to avoid confusion? I will do this as I
commit if necessary.

Ian.


>  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)
> diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
> --- a/tools/libxl/Makefile
> +++ b/tools/libxl/Makefile
> @@ -61,7 +61,7 @@ ifeq ($(BISON),)
>                 scanners, please install it an rerun configure)
>  endif
>  
> -LIBXL_LIBS += -lyajl
> +LIBXL_LIBS += -lyajl -lm
>  
>  LIBXL_OBJS = flexarray.o libxl.o libxl_create.o libxl_dm.o libxl_pci.o \
>                       libxl_dom.o libxl_exec.o libxl_xshelp.o libxl_device.o \



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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