GNOME Bugzilla – Bug 652290
vte on interix
Last modified: 2012-03-09 06:34:17 UTC
Created attachment 189631 [details] [review] vte build patch for interix may i ask for a review of the attached patch? it makes vte build (and work, of course ;)) on interix. the floor() check in configure.in is seemingly broken as it is (fixed by the patch), in that if floor() is only in -lm, HAVE_FLOOR is undefined, which is IMHO wrong. additional to this patch, i need --disable-Bsymbolic and --disable-gnome-pty-helper for vte to build. but thats ok :)
Isn't your round() implementation wrong? Should compare (x - floor(x) < .5), right? I let ChPe figure out what the correct autoconf magic is. I can't recall off the top of my head.
-AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=["$LIBS -lm"])) -AC_CHECK_FUNCS([ceil floor]) +AC_CHECK_LIB(m,floor,[LIBS="$LIBS -lm"; ac_cv_func_floor=yes]) +AC_CHECK_FUNCS([ceil floor round]) That's not quite equivalent to the previous code which only added -lm if linking to it is required to get floor, while now it's always added. And yes, the floor impl is wrong.
the problem with the original code was: 1) the floor check in -lm was ok, floor was found, HAVE_LIB_M_FLOOR (IIRC) defined 2) the normal floor check went bad, and HAVE_FLOOR was left undefined. 3) code didn't compile because HAVE_FLOOR is checked and undefined. so in the end HAVE_FLOOR was undefined, but -lm was added to the link. Thinking about it the second check should have succeeded, because the first one adds -lm, right...? hmmm, but it didn't... about the floor impl: ok, if it's wrong, i can turn it around. i just wanted to get it to work in the first place ;)
Any chance for an updated patch? :-)
is there some more insight into what would be the correct -lm check? i'm not sure whether what i'm doing is ok, yet the original version didn't add -lm although it was required... anyway. i'm just about to look into it right now (although no time .... as always ;)). updated patch in a few minutes to hours.
err... darn. i meant it didn't find floor, not that it didn't add -lm
Created attachment 194010 [details] [review] updated interix patch here we go. is this one better? build goes through with it, and the check is now more like what was intended in the first place... :)
I committed a slightly different patch to vte-0-32 branch; can you check that it works for you?
oh, yeah, i will try :) it just may take some time, since i'm on something completely different at work now - 2 more months, then i'll be back on interix.