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

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

# 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_CHECK_LIB([aio], [io_setup], [system_aio="y"], [system_aio="n"])
+AC_CHECK_LIB([m], [isnan], [], [AC_MSG_ERROR([Could not find libmath])])
 AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])])
 AC_CHECK_LIB([ext2fs], [ext2fs_open2], [libext2fs="y"], [libext2fs="n"])
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)
-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



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