I've tried to export some CFLAGS so its possible to build packages without 
setting them every time. This seems to work with most packages, but there is 
something odd about python, in that it seems to simply ignore CFLAGS. So if 
CFLAGS has -m64 in it, so this is ignored.

Looking at the spkg-install, one can sence someone had this issue on a Mac too. 
Why else would they use the option --with-gcc="gcc -m64". The obvious thing 
would be to have CFLAGS to include -m64. But that does not work.

   if [ `uname` = "Darwin" ]; then
         if [ "$SAGE64" = "yes" ]; then
             echo "64 bit OSX 10.5 build enabled"
             OPT="-g -O3 -m64 -Wall -Wstrict-prototypes"; export OPT
             ./configure $EXTRAFLAGS --prefix="$SAGE_LOCAL" --without-libpng 
--enable-unicode=ucs4 \
             --with-gcc="gcc -m64" --disable-toolbox-glue
         else
             ./configure $EXTRAFLAGS --prefix="$SAGE_LOCAL" --without-libpng 
--enable-unicode=ucs4 \
             --disable-toolbox-glue
         fi
     else
         ./configure $EXTRAFLAGS --prefix="$SAGE_LOCAL" --without-libpng 
--enable-unicode=ucs4
     fi


What seems to work for me, is to have on the last configure line (one executed 
everywhere apart from OS X, is to add

CC="$CC $CFLAGS"

Then, it seems to magically understand CFLAGS.

If one runs configure --help, the configure script prints the usual things

Some influential environment variables:
   CC          C compiler command
   CFLAGS      C compiler flags


Except, CFLAGS does not seem very influential.

Has anyone got any explanation for this? I assume someone has hit this problem 
before, because of the unual way the OS X options are written.

Dave

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

Reply via email to