On 5/19/05, Shugo Maeda <shugo / ruby-lang.org> wrote:
> Hi,
> 
> nobu.nokada / softhome.net wrote:
> > Hmmm, it looks like the file contained in libedit.
> 
> libedit on my machine (Debian sid) seems to lack
> history_get_history_state() etc....
> 
> I commited fixes for libedit to the CVS HEAD.
> Can anyone try it on Tiger?
> I'll backport it to the ruby_1_8 branch if it works on Tiger.
> 
> If you have both of GNU Readline and libedit, you can use libedit by
> --enable-libedit option.
> # Yes, this option is for me;)

It doesn't work on my tiger install. libedit's header file seems to be
/usr/include/histedit.h.

After making that change, it likes the config, and creates a makefile.
But it gives a fatal error in the build. I'm not sure which parts are
important, so I'm posting the whole thing:

-----

compiling readline
gcc -fno-common -g -O2 -pipe -fno-common  -I. -I../.. -I../../.
-I../.././ext/readline -DHAVE_HISTEDIT_H  -c readline.c
readline.c: In function 'readline_readline':
readline.c:72: error: 'rl_outstream' undeclared (first use in this function)
readline.c:72: error: (Each undeclared identifier is reported only once
readline.c:72: error: for each function it appears in.)
readline.c:74: error: 'rl_instream' undeclared (first use in this function)
readline.c:75: error: 'readline' undeclared (first use in this function)
readline.c: In function 'hist_get':
readline.c:501: error: 'HIST_ENTRY' undeclared (first use in this function)
readline.c:501: error: 'entry' undeclared (first use in this function)
readline.c:507: error: 'history_length' undeclared (first use in this function)
readline.c:509: error: 'history_base' undeclared (first use in this function)
readline.c: In function 'hist_pop':
readline.c:599: error: 'history_length' undeclared (first use in this function)
readline.c: In function 'hist_shift':
readline.c:611: error: 'history_length' undeclared (first use in this function)
readline.c: In function 'hist_each':
readline.c:622: error: 'HIST_ENTRY' undeclared (first use in this function)
readline.c:622: error: 'entry' undeclared (first use in this function)
readline.c:626: error: 'history_length' undeclared (first use in this function)
readline.c:627: error: 'history_base' undeclared (first use in this function)
readline.c: In function 'hist_length':
readline.c:640: error: 'history_length' undeclared (first use in this function)
readline.c: In function 'hist_empty_p':
readline.c:648: error: 'history_length' undeclared (first use in this function)
readline.c: In function 'hist_delete_at':
readline.c:661: error: 'history_length' undeclared (first use in this function)
readline.c: In function 'filename_completion_proc_call':
readline.c:678: error: 'filename_completion_function' undeclared
(first use in this function)
readline.c:678: warning: assignment makes pointer from integer without a cast
readline.c: In function 'username_completion_proc_call':
readline.c:705: error: 'username_completion_function' undeclared
(first use in this function)
readline.c:705: warning: assignment makes pointer from integer without a cast
readline.c: In function 'Init_readline':
readline.c:728: error: 'rl_readline_name' undeclared (first use in
this function)
readline.c:807: error: 'rl_attempted_completion_function' undeclared
(first use in this function)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1

-----

Hope this helps.

cheers,
Mark