Re: build problem on HPUX 11.00



Le Mon, Apr 05, 2004, à 04:48:44PM +0200, Gansser, Martin a écrit:
Hi,

I tried to compile dia-0.92.2 on HPUX11.00 with gnome-2.4, but this
fails with the following error message:

checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking for isinf in -lm... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
configure: error: Can't find neither a definition of
                           isinf nor ieeefp.h
make: *** [configure-work/main.d/dia-0.92.2/configure] Error 1


Now, this is very strange. We first look for isinf() in math.h with -lm, and
only then we try ieeefp.h (Solaris).

Why does the first test fail?

Hmmm. Can you see if either line solves the problem:
        CFLAGS="-g -O2 -Ae" ./configure
        CFLAGS="-g -O2 -Aa -D_HPUX_SOURCE" ./configure
?
Also, it would help to see the config.log file, say 40 lines around the word
"isinf"... 

D'oh! I see now. On HP-UX, isinf() is a macro. We find it in math.h, so the
first half of the first test "check that isinf exists and is in math.h AND
-lm" succeeds, but then we don't find it in -lm (configure uses a different
code snippet for the second test, which does NOT include math.h; instead, it
defines a bogus prototype and looks for a link failure, which is inevitable
on HP-UX).

Lars, an idea? Shouldn't we be a little more lax with the -lm test? I think
we should test in two steps:    
        1. isinf() in math.h (if no, go to step 3)
        2. isinf in -lm (if yes, add -lm to the command line, if no, don't
                        put -lm but let it run anyway).

        3. isinf() in ieeefp.h (and whatever library Solaris uses to put
                the definition of isinf(), if it doesn't use a macro)
        
        -- Cyrille


-- 



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