#12672: Build PPL with its C interface
--------------------------------------+-------------------------------------
Reporter: SimonKing | Owner: tbd
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.9
Component: packages: standard | Resolution:
Keywords: PPL C interface | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Simon King | Merged in:
Dependencies: | Stopgaps:
--------------------------------------+-------------------------------------
Comment (by kcrisman):
Here is a first try.
{{{
#!diff
diff --git a/spkg-install b/spkg-install
--- a/spkg-install
+++ b/spkg-install
@@ -39,9 +39,21 @@
fi
done
-./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" \
- --with-gmp-prefix="$SAGE_LOCAL" --enable-coefficients=mpz \
- --enable-interfaces="c++ c" --disable-fpmath
+# If m4 is not recent enough, we fall back to only enabling the C++
interface
+M4_VERSION=`m4 --version | grep GNU | cut -d " " -f 3`
+if [[ $M4_VERSION < 1.4.5 ]]; then
+ echo "Configuring only for C++ interface"
+ echo "Install GNU M4 1.4.5 or later for C interface"
+ ./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" \
+ --with-gmp-prefix="$SAGE_LOCAL" --enable-coefficients=mpz \
+ --enable-interfaces=c++ --disable-fpmath
+else
+ echo "Great, you have GNU M4 1.4.5 or later"
+ echo "Configuring for C++ and C interfaces"
+ ./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" \
+ --with-gmp-prefix="$SAGE_LOCAL" --enable-coefficients=mpz \
+ --enable-interfaces="c++ c" --disable-fpmath
+fi
if [ $? -ne 0 ]; then
echo >&2 "Error configuring the Parma Polyhedra Library."
exit 1
}}}
But it doesn't work, because the extended bash test doesn't quite do what
we want.
{{{
$ if [[ 1.4.11 > 1.4.5 ]]; then echo "bigger"; fi
$
}}}
I cringe at the more comprehensive solutions to this problem I found on
the internet, though. The `sort -V` command might have been helpful, but
that flag isn't universally available.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12672#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.