On 11/19/2010 07:17 PM, Waldek Hebisch wrote:
Ralf Hemmecke wrote:
sorry that I am a bit late, but I've just browsed through
configure.ac. It seems to me that this code is missing a check
whether gmp is actually installed.
True. I was thinking about good test and it looked that the best
test is to compile the actual file (src/lib/gmp_wrap.c). However,
since Makefiles are not ready at configure time we can not do this in
regular way. So I decided to postpone this -- I you want to add test
you are welcome.
Done at
https://github.com/hemmecke/fricas/commit/7f3d90706378d535c6522eaf5229bcc45792e482
Actually, I have two other patches that switch from --with to --enable.
https://github.com/hemmecke/fricas/commit/126d08aae382254cabd61342973cf24a9420e623
https://github.com/hemmecke/fricas/commit/21faa0482484be49275ad6e423723446204be625
All these patches do not (yet) include a regeneration of "configure",
because I use autoconf 2.67 whereas Waldek usually uses 2.61.
Choose as you like.
Also, I think FriCAS should rather use --enable-gmp. With
--with-gmp I would expect to be able to say something like
--with-gmp=/path/to/package/gmp.
Well, you should be able to say where to find GMP. Quite possible
that we will need to split '--with-gmp' into '--enable-gmp' and
'--with-gmp-library' and '--with-gmp-headers'. ATM the idea is to
get _some_ way to use GMP and figure out later which options are
useful.
I haven't yet done the --with-gmp-library and --with-gmp-header since I
don't yet know of the canonical way to do this. We are probably not the
first that want to configure for gmp. So I guess there should be
something reliable for this check somewhere in the web.
You are right. However, GNU coding standards have rather rigid view
on some issues and real life is more fuzzy. Hence some confusion
which of 'enable' or 'with' to use. Note the following:
These options allow users to choose which optional features to build
and install. --enable-feature options should never make a feature
behave differently or cause one feature to replace another. They
should only cause parts of the program to be built rather than left
out.
;-) Yep. That's the problems with rules, laws, and conventions. Real
life never fits perfectly.
My distinction, however, is between "feature" (--enable) and "package"
(--with). But you are right that the above quote makes it actually
impossible to --enable an optimization, since it changes behaviour.
Also, at build time '--with-gmp' causes extra code to be built, but
at run-time it causes replacement of sbcl routines by GMP ones.
Yes, that is a border case. ;-)
BTW: I think it is not the first time where our usage does not fit
GNU standards...
Not a big deal, I can live with either as long as it is check that gmp
is actually available.
Ralf
PS:
In order to get the patches...
Either
git clone git://github.com/hemmecke/fricas.git
cd fricas
git checkout configure-ac
git format-patch -3
Or if you already have a FriCAS git repo... (this variant is faster
since it doesn't download all of fricas again)
cd fricas
git remote add hemmecke git://github.com/hemmecke/fricas.git
git fetch hemmecke
git checkout configure-ac
git format-patch -3
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.