|
From: Ethan M. <merritt@u.washington.edu> - 2009-01-14 18:40:52
|
On Wednesday 14 January 2009 09:17:45 Mojca Miklavec wrote:
> On Wed, Jan 14, 2009 at 5:24 PM, Ethan A Merritt wrote:
> >
> >> The MacOS libreadline is apparently not powerful enough, so it
> >> wouldn't help. (But it would be nice to detect that deficiency and
> >> switch to built-in readline during configuration step instead of
> >> throwing an error.)
> >
> > If you can figure out how to detect and configure around the OSX
> > defective readline library, that would be great. So far, I have not
> > seen a way to do this. It claims to be readline, but it isn't.
>
> How do you detect the standard libreadline?
AC_CHECK_LIB(readline, remove_history,
[TERMLIBS="-lreadline $gp_tcap $TERMLIBS"],, [${gp_tcap}])
We test for the presence of remove_history() because this was introduced
in whatever version of libreadline that is the minimal requirement.
> >> The built-in readline would be fine, but suboptimal (I've seen the
> >> switch that forces usage of built-in readline.)
> >
> > 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?
> command.c: In function 'rlgets':
> command.c:2427: error: invalid type argument of '->'
> make[3]: *** [command.o] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
> There are the following files (not sure about the first two, but the
> last four are from Mac OS X Developer tools that need to be installed
> in order to be able to compile anything).
>
> /usr/lib/libedit.2.dylib
> /usr/lib/libedit.dylib
> /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libedit.2.dylib
> /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libedit.dylib
> /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libedit.2.dylib
> /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libedit.dylib
>
> But I only have
> /sw/include/editline/readline.h
> and /sw doesn't cound into standard libraries (that's fink).
>
> There's also
> /Developer/SDKs/MacOSX10.4u.sdk/usr/include/readline/readline.h
> but that path is not included when building gnuplot.
>
> Mojca
>
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|