From: Balazs S. <ba...@ba...> - 2011-01-13 15:58:16
|
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. -- Bazsi |