problem with configure script and libgd

Brandon Gillespie brandon at roguetrader.com
Thu Oct 10 22:36:19 CEST 2002


Ok, so even though it said to 'get over it' I couldn't, I have a valid 
GD install which I used for another application.  It appears that with 
my configuration: nagios-1.0b6, gcc-3.2, libgd 1.8.4, the configure 
script is not making a valid executable.  It is using the following 
source-code test:

----------------------------------
char gdImagePng();

int main() {
gdImagePng()
; return 0; }
----------------------------------

Which exits with an error condition because gdImagePng requires two 
arguments, so the configure script presumes libgd doesn't work (wrong). 
  A better test would be:

----------------------------------
#include <gd.h>

int main() {
gdImagePtr im;
im = gdImageCreate(64, 64);
gdImagePng(im, stderr)
; return 0; }

----------------------------------

But why do it this way at all?  Wouldn't it be easier to just use 'nm' 
and see if the symbol exists in the library?

-Brandon Gillespie



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list