autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about CFLAGS


From: Bob Friesenhahn
Subject: Re: Question about CFLAGS
Date: Wed, 16 Apr 2008 12:01:37 -0500 (CDT)

On Wed, 16 Apr 2008, Sérgio Durigan Júnior wrote:

Yes, it is a bug. What we want to know is if we should append $CFLAGS to
$BASECFLAGS (i.e., BASECFLAGS="$BASECFLAGS @CFLAGS@") or use *only*
$CFLAGS when the user provides it.

Presumably BASECFLAGS exists for some useful purpose?

Don't forget that you need to worry about linking as well so if you take this path, you need to think about LDFLAGS as well.

Yes, that's possible indeed. Actually, we're thinking in just use CC and
forget the whole CFLAGS thing... Maybe that's the most intelligent
approach.

That is the approach which worked for me. If you are using the IBM C compiler, then I believe that you can choose the architecture using an environment variable as well. The problem with using an environment variable when building Python is that Python may want to save the incantation which works for later use when building Python modules and it is unlikely to save the environment variable.

I use a different install prefix for 64-bit apps and have a config.site which automatically supplies 'CC' and 'CXX' definitions which are actually tiny shell scripts that look like this:

#!/bin/sh
exec gcc -m64 "$@"

With this approach, there is less chance that a bug in the package will mess things up. It makes building 64-bit apps as easy as adding --prefix=/usr/local64. A huge time-saver.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]