On Wed, 2011-01-05 at 18:03 -0800, Matthew Hall wrote:
> On Tue, Jan 04, 2011 at 06:20:11PM -0800, Matthew Hall wrote:
> > 3) To work around these problems for now I'm going to patch configure.in 
> > and rerun autoconf unless there is an alternative proposal.
> > 
> > Thanks,
> > Matthew Hall.
> As promised, a hacky workaround patch is pasted below.
> I'd like to improve upon this bad situation, probably by appending the 
> user CFLAGS after the custom package CFLAGS to take priority (the last 
> entries generally take precedence, AIUI), but I'm not incredibly 
> experienced with how this code is supposed to work so I'd like some 
> advice before trying something like this.

autoconf automatically adds values to variables like CFLAGS (like it
automatically adds -O2 if the user doesn't specify it in the
environment). Since this is the default behaviour, packages often
completely wipe out the CFLAGS value in their debug-builds in order to
avoid -O2 being present.

The solution in my configure scripts is to use the shell variable
"ac_cv_env_CFLAGS_value", which stores the original user-sipplied value.

This way, those don't get ignore in debug builds, but I can strip out
-O2 unless explicitly specified by the user.


Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
libdbi-users mailing list

Reply via email to