[Gretl-devel] Contribute to Gretl code (FIX for gnuplot 4.2).

Riccardo (Jack) Lucchetti r.lucchetti at univpm.it
Thu Apr 17 10:24:35 EDT 2008


On Thu, 10 Apr 2008, Hélio Guilherme wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Allin, Jack and developers,
>
> I upgraded my gnuplot to it's latest version, 4.2, and then gretl's
> graphics got broken, like saving to a PNG. So here is a fix for it.
>
> New gnuplot 4.2 syntax made a change from "set term" to "set terminal".
> The fix modifies files in gui2 and also the configure script, to provide
> gnuplot version detection, and PNG support (it advises users to install
> PNG support in gnuplot).
>
> I decided to send the complete files and not patches because I am too
> lazy ;).
>
> Have fun,
>
> Hélio Guilherme
>

It's great to receive patches. Thanks!

However, I'm a bit surprised by your report. "set term" has always been an 
abbreviation for "set terminal" in gnuplot. "set term" works 
just fine on my version of gnuplot, which is 4.2. So, the only thing I can 
think is that your local version of gnuplot does not accept for some 
mysterious reasons the abbreviation "set term" instead of "set terminal" 
(but then, gretl uses abbreviations of gnuplot commands a lot, like for 
example "set outp" which, as far as I understand, works ok on your 
system). What happens if you run gnuplot from a console and type in the 
command "set term png" by hand?

If I were you, I'd consider sending a bug report to the gnuplot folks 
reporting that "set term" doesn't work on your system (I may be missing 
something, though).

Anyway, I guess it's no harm to anyone to replace all occurrences of 
"set term" to "set terminal" in the gretl source, which I'll try to do 
later today.

This should make you changes to the configure script unnecessary, except 
for

--- configure   2008-04-10 22:20:28.000000000 +0200
+++ /home/jack/src/gretl/configure      2008-02-23 19:52:14.000000000 +0100
@@ -25353,7 +25353,7 @@
       else
         echo "*** Could not run LAPACK test program, checking why..."
         CFLAGS="$LAPACK_CFLAGS $CFLAGS"
-       LIBS="$LAPACK_LIBS $LIBS"
+       LIBS="$LIBS $LAPACK_LIBS"
         cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF

which look unrelated to gnuplot. Could you please explain what its 
rationale is?

In any case, please not that the configure script is automatically 
generated. If you need to modify anything, you should edit configure.in 
and run autoconf on it.

Thanks again!


Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche

r.lucchetti at univpm.it
http://www.econ.univpm.it/lucchetti


More information about the Gretl-devel mailing list