From 903d512dc9b8b334d39765ffda37db0d04258f69 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 26 Dec 2006 21:05:47 +0100 Subject: [PATCH] scarf.cc: make compatible with older versions of PolyLib value_subtract and value_addmul are not available in older versions. One day we should just require PolyLib 5.22.0 --- configure.in | 14 ++++++++++++++ scarf.cc | 1 + 2 files changed, 15 insertions(+) diff --git a/configure.in b/configure.in index 3242e55..9f40f6d 100644 --- a/configure.in +++ b/configure.in @@ -170,6 +170,20 @@ AC_EGREP_CPP(yes, [ AC_DEFINE(value_subtract,value_substract, [define to value_substract if missing from PolyLib])]) +AC_MSG_CHECKING([for value_addmul macro]) +AC_EGREP_CPP(yes, [ + #include + #ifdef value_addmul + yes + #endif + ],[AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) + AC_DEFINE([value_addmul(ref,val1,val2)],[do {Value _tmp; value_init(_tmp); dnl + value_multiply(_tmp,val1,val2); dnl + value_addto(ref,ref,_tmp); dnl + value_clear(_tmp); } while(0)], + [define if missing from PolyLib])]) + AC_ARG_WITH(piplib, [ --with-piplib=DIR DIR Location of PIP], [ echo "Package piplib : $withval" && piplib_package=$withval], diff --git a/scarf.cc b/scarf.cc index da2282f..69e970d 100644 --- a/scarf.cc +++ b/scarf.cc @@ -2,6 +2,7 @@ #include #include #include +#include "config.h" using std::vector; -- 2.11.4.GIT