Nice idea, but not the right answer.  Well, at least not for ntop.  Frankly,
FreeBSD should pick ONE as the default and put the symlink in, otherwise
every single package/port that refs libgd has to be tweaked.  So it should
be libgd and libgd2 or vice versa.

The right (clean) answer inside ntop is to experiment with the LDFLAGS,
CPPFLAGS and other options and then put any OS specific stuff in
configureextra...

In configureextra, you get access to the flags at the very beginning,
meaning that what is already set is pretty minimal.  The idea is to set
things before ntop goes looking, not to fix up what it finds.  But still,
you can get pretty creative in these files, for example:

LDFLAGS="-lgd2 ${LDFLAGS}"

tells ntop to use gd2.  You might want to put an if test in to make sure the
fool thing exists.

Or use the macro - look at the Solaris iconv line.


Look over the files - there's already examples of a lot of fixes there.

You might have to do the iconv-type stuff AND create the ln in the ntop work
directory, so that gcc can resolve -lgd, even though the -lgd2 you put at
the top takes precedence.

-----Burton




> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
> Stanley Hopcroft
> Sent: Sunday, January 25, 2004 2:34 AM
> To: [EMAIL PROTECTED]
> Subject: [Ntop] Building ntop (probably silly comments about gd).
>
>
> Dear Ladies and Gentlemen,
>
> My recent experience of configure failing to find -lgd with contemporary
> CVS ntop on FreeBSD systems may be helpful to some.
>
> libgd is packaged in two versions:-
>
> gd1 (eg gd-1.8.4,2)
> gd2 (eg gd-2.0.15)
>
> I am pretty sure that FreeBSD distinguishes the libraries by tagging
> them with the version number when they are installed. Thus the library
> file names are libgd1.so and libgd2.so.
>
> This means that ntops configure, which uses -lgd, to compile the gd
> library check will _not_ find the libgd1 library (and thus configure
> will fail to advance past the gd checks).
>
> An obvious, and for all I know wrong workaround, is to sym link libgd.so
> to libgd1.so and to have ldconfig regenerate the hints fine (ldconfig -r
> on FreeBSD).
>
> Yours sincerely.
>
>
> --
> ------------------------------------------------------------------------
> Stanley Hopcroft
> ------------------------------------------------------------------------
>
> '...No man is an island, entire of itself; every man is a piece of the
> continent, a part of the main. If a clod be washed away by the sea,
> Europe is the less, as well as if a promontory were, as well as if a
> manor of thy friend's or of thine own were. Any man's death diminishes
> me, because I am involved in mankind; and therefore never send to know
> for whom the bell tolls; it tolls for thee...'
>
> from Meditation 17, J Donne.
> _______________________________________________
> Ntop mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop
>

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to