|
From: Mojca M. <moj...@gm...> - 2011-03-09 18:59:33
|
On Wed, Mar 9, 2011 at 19:24, Ethan A Merritt
<sf...@us...> wrote:
> On Wednesday, March 09, 2011 07:12:54 am Mojca Miklavec wrote:
>> What happens?
>> --------------------
>> If I don't install AquaTerm manually, the version provided by MacPorts
>> doesn't suffice to compile gnuplot with aquaterm terminal which is
>> probably a flaw in gnuplot configuration. Priority number one would be
>> to fix that one.
>
> This is not very helpful as a bug report.
> What do you mean "doesn't suffice"?
I wrote down most details, but I my explanation wasn't too clear.
If I use
CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib ./configure
--disable-wxwidgets
then it works, but it would be much better if it wasn't required to
manually set flags. (I didn't even come to the idea to do that until
now.)
There is
/opt/local/lib/libaquaterm.dylib
but the folder /opt/local/ is not searched by default (without
-L/opt/local/lib), so -laquaterm fails. The same is true for headers.
There is
/opt/local/include/aquaterm/aquaterm.h
but it is not found without -I/opt/local/include/ either.
> The output from the configure script should indicate what piece
> has not been found.
That is the output:
configure:6792: checking for aqtInit in -laquaterm
configure:6817: gcc -o conftest -g -O2 conftest.c -laquaterm -lobjc >&5
ld: library not found for -laquaterm
Compare the options with:
configure:8736: gcc -o conftest -g -O2 -I/opt/local/include
-L/opt/local/lib conftest.c -lgd >&5
If the test for aquaterm would have been performed with the same
options (-I/opt/local/include -L/opt/local/lib), it wouldn't fail
either, but now that these options are missing, it doesn't find
AquaTerm.
> It could be a problem with PATH, or with the
> location of a header file, or with something else entirely like a
> required support library that the configure script doesn't allow for.
It's a problem of missing -I and -L switches to search for header and
library files.
>> All the other libraries (pango, cairo, pdflib, gd, freetype, ...) are
>> easily found from MacPorts. Here is what config.log has to say about
>> pdf or gd for example:
>>
>> configure:9085: found /opt/local/bin/pdflib-config
>
> That means pdflib comes with a path configuration file.
> The configure script executes that file in order to find the
> correct -I and -L directories and also a list of required libraries.
> So one fix would be for the MacPorts version of aquaterm to also have
> a path configuration file.
>
> There is a separate, but very similar, mechanism called pkgconfig.
> pkgconfig is (at least on linux) how the configuration for cairo
> and freetype is found.
> So if aquaterm had a *.pc file for pkgconfig, that would also work.
So all that's needed is to ask the maintainer of MacPorts package to
add a file aquaterm.pc? That is probably easier and shorter than
writing aquaterm-config script. Are you ready to fix gnuplot
configuration if that gets done? (That is: if aquaterm.pc exists,
respect its flags; if it doesn't, just try the old test to see if
-laquaterm works at all.)
The fix that should be applied right away (without waiting for
MacPorts developer) is not to print out "yes" in
aqua terminal (MacOS X): yes
unconditionally on any given mac, but to report what configure script
has found (most probably that is ac_cv_lib_aquaterm_aqtInit). And
maybe print out the warning at the end of configure script when both
x11 and aquaterm are missing (or for the more general case: if unknown
terminal will be set as the default one).
Mojca
|