|
From: Ethan M. <merritt@u.washington.edu> - 2009-01-14 20:08:24
|
On Wednesday 14 January 2009 10:40:39 Ethan Merritt wrote:
> On Wednesday 14 January 2009 09:17:45 Mojca Miklavec wrote:
> > > I have been told that the OSX "libreadline" library is actually a disguised
> > > version of the BSD libedit. Since as of recently gnuplot can use libedit
> > > instead of libreadline, the best solution would be (if it works) would be
> > > to force the --with-readline=bsd on OSX configurations. Unfortunately,
> > > I do not know if OSX also provides an un-wrapped libedit that doesn't
> > > pretend to be libreadline. Could you please try
> > > ./configure --with-readline=bsd
> > > and see how it works?
> >
> > It doesn't.
> >
> > Making all in wxterminal
> > make[3]: Nothing to be done for `all'.
> > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../term -I../term
> > -DBINDIR=\"/Users/mojca/moje/dev/gnuplot/git/gnuplot-static/support_libs/bin\"
> > -DX11_DRIVER_DIR=\"/Users/mojca/moje/dev/gnuplot/git/gnuplot-static/support_libs/libexec/gnuplot/4.3\"
> > -DGNUPLOT_PS_DIR=\"/Users/mojca/moje/dev/gnuplot/git/gnuplot-static/support_libs/share/gnuplot/4.3/PostScript\"
> > -DCONTACT=\"gnu...@li...\"
> > -DHELPFILE=\"/Users/mojca/moje/dev/gnuplot/git/gnuplot-static/support_libs/share/gnuplot/4.3/gnuplot.gih\"
> > -DGNUPLOT_X11=\"`echo gnuplot_x11 | sed 's,x,x,'`\"
> > -I/Users/mojca/moje/dev/gnuplot/git/gnuplot-static/support_libs/include
> > -I/Users/mojca/moje/dev/gnuplot/git/gnuplot-static/support_libs/include
> > -g -O2 -ObjC -MT command.o -MD -MP -MF ".deps/command.Tpo" -c -o
> > command.o command.c; \
> > then mv -f ".deps/command.Tpo" ".deps/command.Po"; else rm -f
> > ".deps/command.Tpo"; exit 1; fi
> > In file included from command.c:76:
> > gp_hist.h:73:32: error: editline/readline.h: No such file or directory
>
> Actually, that looks like maybe it *did* work.
> It apparently found the library correctly, but then failed to find the
> corresponding header files. Is there an OSX developer's kit or something
> that contains the header files for system libraries?
I have now tried it myself, on an OSX 10.4 machine
I got this warning message from running ./configure --with-readline=bsd
checking for editline/readline.h... no
configure: WARNING: found BSD editline library but not readline.h
please add path to readline.h to CPPFLAGS in Makefile
If I copy that header file over from a linux machine, then the
configure + make is successful under OSX 10.4 (Leopard), except that I
had to manually add -lhistory to the compile command. That is easily
fixable in the configure script.
The resulting executable works fine for tab-completion, line editing,
and within-session history commands. It does not seem to remember
the commands from previous sessions (not sure whether that is fixable
or not, but I can live without it).
So I'd say this is 99% of the way towards a successful automated
configure+build on a stock OSX 10.4 (Leopard) machine, with full support for
readline via the BSD editline that ships with OSX. The only trick is
figuring out where OSX users are supposed to get the editline/readline.h
header file. Is there some standard development kit we can tell them
is required?
Ethan
|