|
From: Ethan M. <merritt@u.washington.edu> - 2006-06-19 16:39:52
|
I'm sure glad someone around here understands the autotools,
because I sure don't.
Timoth=E9e, can you make a patch for this change and submit it
to cvs after testing?
Ethan
On Monday 19 June 2006 11:36 am, Timoth=E9e Lecomte wrote:
> Daniel J Sebald wrote:
> > Dr. Johannes Zellner wrote:
> >> 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
> >
> > But that definition is only if GNUPLOT_PS_DIR is not defined, which
> > should probably have been done through the ./configure process.=20
> > (Although, maybe just complaining that GNUPLOT_PS_DIR is not
> > defined would be just as good.) Something may have gone wrong with
> > your build.
>
> True, GNUPLOT_PS_DIR is defined in ./configure.
>
> I don't have any opinion on what to do when GNUPLOT_PS_DIR is not
> defined (ie when not using ./configure), the best is to make sure
> that all custom makefile's do that properly (something else to do
> before 4.2 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.
>
> This is a bug, but instead of fixing this bug by another hack with
> the autotools, I propose to change the whole GNUPLOT_PS_DIR is
> defined to make it more autotools-compliant :
>
> In configure.in, remove the following lines, because no path should
> be determined at ./configure time (because you should still be able
> to do 'make --prefix=3D...' or something like that later, and because
> it needs 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
> $(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 :
> =20
> -DGNUPLOT_PS_DIR=3D\"$(pkgdatadir)/$(VERSION_MAJOR)/PostScript\"
>
>
> These changes will prevent any problem with the expansions as
> Johannes experienced (in addition to a lower number of lines !).
>
> Best regards,
>
> Timoth=E9e
>
>
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
=2D-=20
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle WA
|