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

Bug#363218: issue with configure



On Sun, 2006-06-18 at 14:47 -0600, dann frazier wrote:
> 
> configure performs two tests - one to see if execinfo.h is present,
> the other to see if the backtrace() function is present. In both
> cases, it defines HAVE_BACKTRACE. In no case does it define
> HAVE_EXECINFO_H.

Actually, AFAICT it only defines HAVE_BACKTRACE if both tests succeed.

> In this context, it means that HAVE_EXECINFO_H will never be defined,
> and therefore execinfo.h will never be included.
> 
> Since xorg_backtrace is wrapped in HAVE_BACKTRACE (which is already
> set by configure, we don't need the definition wrapped in
> HAVE_EXECINFO_H) it will be compiled.
> 
> Although the patch in my NMU corrects this issue, I do now see that it
> will break on systems that do not have execinfo.h and we therefore
> need a cleaner fix.

Exactly.

> I see two possible approaches here:
>  1) remove the HAVE_EXECINFO_H logic, and rely only on HAVE_BACKTRACE
>  2) modify configure.ac so that when it finds execinfo.h it will define
>     HAVE_EXECINFO_H, not HAVE_BACKTRACE.
> 
> I prefer #2, since it seems like this was the original intent. I'm a
> novice with autoconf, so I'm not sure what a correct patch would be.

Given the above, I think 1) should do. FWIW, that builds without
warnings with -Wall here.


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer




Reply to: