From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [PATCH 07 of 10 v3] libxl: explicitly check for libmath in autoconf Date: Wed, 04 Jul 2012 18:18:06 +0200 Message-ID: <6fd693e7f3bc8b4d9bd2.1341418686@Solace> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Andre Przywara , Ian Campbell , Stefano Stabellini , George Dunlap , Juergen Gross , Ian Jackson , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Dario Faggioli # 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 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])]) 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 \