On 28 Aug., 19:44, Martin Albrecht <[email protected]>
wrote:
> > If 'configure' determined the machine supports SSE2, __M4RI_HAVE_SSE2
> > is set to 1, but even if that's the case, you should still also test
> > __SSE2__ when compiling code later (including code *using* the
> > library).
>
> Why? I want that whoever links against M4RI lives in the same world as M4RI.

I'd add something like

#if defined(__M4RI_HAVE_SSE2) && __M4RI_HAVE_SSE2
#   if !defined(__SSE2__) || !__SSE2__
#       error Your current compiler and / or CFLAGS setting doesn't
allow SSE2 code. Please change that or these to the setting(s) you
used when compiling M4RI.
#   endif
#endif

since $CC and $CFLAGS, and hence also the necessity to add some
compiler flags (as determined at *configure* or build time of the M4RI
library *itself*) aren't invariants, at least not over the typical
lifetime of a Sage installation.

Any (manual or automatically triggered) './sage -b' might recompile
also modules *using* libm4ri, with settings potentially different to
those at the time M4RI was built, and $SAGE_LOCAL/include/m4ri/
m4ri_config.h created (which defines __M4RI_HAVE_SSE2) .


For more, the interested reader is referred to

http://trac.sagemath.org/sage_trac/ticket/11574#comment:49 ff.

;-)

> In the spirit of William's "post more" encouragement shouldn't we keep
> this on list? :)

(Sorry, William, but I think the number of postings has already grown
again recently.)


-leif

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to