|
From: <tim...@en...> - 2006-06-19 16:35:32
|
Daniel J Sebald wrote:
> Dr. Johannes Zellner wrote:
> =20
>> Hi,
>>
>> a big thanks for including the depth patch into gnuplot.
>>
>> But:
>>
>> in trm/post.trm there's a really ugly hardcoded path:
>>
>> #ifndef GNUPLOT_PS_DIR
>> #define GNUPLOT_PS_DIR "/usr/local/share/gnuplot/4.1/PostScript"
>> #endif
>> =20
>
> But that definition is only if GNUPLOT_PS_DIR is not defined, which sho=
uld probably have been done through the ./configure process. (Although, =
maybe just complaining that GNUPLOT_PS_DIR is not defined would be just a=
s good.) Something may have gone wrong with your build.
>
> =20
True, GNUPLOT_PS_DIR is defined in ./configure.
I don't have any opinion on what to do when GNUPLOT_PS_DIR is not=20
defined (ie when not using ./configure), the best is to make sure that=20
all custom makefile's do that properly (something else to do before 4.2=20
I think).
> and in config.h:
>
> /* Directory for PostScript prolog and associated files */
> #define GNUPLOT_PS_DIR "${prefix}/share/gnuplot/4.1/PostScript"
>
>
> apparently, prefix should have been expanded there.
> =20
This is a bug, but instead of fixing this bug by another hack with the=20
autotools, I propose to change the whole GNUPLOT_PS_DIR is defined to=20
make it more autotools-compliant :
In configure.in, remove the following lines, because no path should be=20
determined at ./configure time (because you should still be able to do=20
'make --prefix=3D...' or something like that later, and because it needs=20
an ugly hack when --prefix=3D... is not specified by the user) :
dnl location of PostScript prolog and adjunct files
GNUPLOT_PS_DIR=3D"$pkgdatadir/$VERSION_MAJOR/PostScript"
eval GNUPLOT_PS_DIR=3D${GNUPLOT_PS_DIR}
AC_DEFINE_UNQUOTED(GNUPLOT_PS_DIR,"${GNUPLOT_PS_DIR}",
[ Directory for PostScript prolog and associated files ])
and remove also :
AC_SUBST(GNUPLOT_PS_DIR)
In term/Makefile.am, remove the following lines :
# For Unix and MSDOS only
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(GNUPLOT_PS_DIR)
$(INSTALL_DATA) $(srcdir)/PostScript/*.ps=20
$(DESTDIR)$(GNUPLOT_PS_DIR)
uninstall-local:
@$(NORMAL_UNINSTALL)
echo " rm -f $(DESTDIR)$(GNUPLOT_PS_DIR)/*.ps"
rm -f $(DESTDIR)$(GNUPLOT_PS_DIR)/*.ps
In favor of the automake way of doing that :
postscriptdir =3D $(pkgdatadir)/$(VERSION_MAJOR)/PostScript
postscript_DATA =3D 8859-15.ps 8859-1.ps\
8859-2.ps cp1250.ps cp437.ps\
cp850.ps cp852.ps koi8r.ps koi8u.ps\
prologue.ps
And finally, in src/Makefile.am, add to AM_CPPFLAGS :
-DGNUPLOT_PS_DIR=3D\"$(pkgdatadir)/$(VERSION_MAJOR)/PostScript\"
These changes will prevent any problem with the expansions as Johannes=20
experienced (in addition to a lower number of lines !).
Best regards,
Timoth=E9e
|