1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
PREREQUISITES
To build rlwrap, you'll need an ANSI C compiler (gcc will certainly
do) and GNU readline 4.2 or later. rlwrap should compile on most
unices and unix-like environments like linux, the BSDs, OS/X, solaris,
HP/UX, QNX, AIX and cygwin (special thanks to PolarHome for their
"dinosaur zoo" of ageing Unix systems!)
INSTALLATION
First, unzip the tarball or clone the git repository (git clone
https://github.com/hanslub42/rlwrap.git). Then go to the rlwrap
directory, and:
autoreconf --install # only needed if there is no ./configure script
then:
./configure
make
sudo make install
CONFIGURATION OPTIONS
configure can be called with a number of options (e.g. if you want to
install rlwrap in a non-standard place). Do
./configure --help
to see them all. Most of them are not specific to rlwrap, except the
following:
--with-libptytty (default: YES) Use libptytty instead of rlwrap's own
pty handling.
--enable-spy-on-readline (default: YES) If we want to keep the display
tidy when re-sizing the terminal window or printing multi-line
prompts, we have to know whether or not readline is in
horizontal-scroll-mode (i.e. wheter long lines are scrolled or
wrapped). At present, this involves a look at a private readline
variable - if you feel guilty about that, disable this option.
--enable-homegrown-redisplay (default: NO): some people report ddouble
echoing of user input. Enabling this option will cure the problem -
though the display will then flicker over slow connections
(cf. BUGS)
--enable-debug: (default: NO) Adds a --debug option to rlwrap's
repertoire. This will make rlwrap write debug information to a file
/tmp/rlwrap.debug (cf. the output of rlwrap --help for more info)
--enable-proc-mountpoint (default: /proc) mountpoint for Linux-style
procfs, used for determination of slave command's working directory.
--enable-multibyte-aware (default: YES) Prevent rlwrap from seeing
multibyte characters as multiple characters.
UNINSTALLATION
To uninstall, do 'make uninstall'
INSTALLING AS NON-ROOT
If you want to install rlwrap as non-root, you should call configure with
the --prefix option, like:
./configure --prefix=$HOME
after which 'make install' will install rlwrap in $HOME/bin
You may have to install GNU readline (e.g using ./configure
--prefix=$HOME in the readline source directory)
rlwrap's configure script will not find this installation automatically, but
./configure --prefix=$HOME CFLAGS=-I$HOME/include CPPFLAGS=-I$HOME/include LDFLAGS=-L$HOME/lib
should work. You can add '-static' to LDFLAGS if you want to build a statically linked rlwrap,
like so:
./configure --prefix=$HOME CFLAGS=-I$HOME/include CPPFLAGS=-I$HOME/include LDFLAGS=-L$HOME/lib' -static'
BUILD PROBLEMS
If configure complains about missing Xyz (where Xyz can be ncurses,
libptytty, or readline) and you are sure that Xyz is installed on your
system, consider installing Xyz-devel
completion.c is made from completion.rb by the program rbgen
(https://github.com/hanslub42/libredblack), but both files are included in
the tarball and the repository; rbgen is only needed when you want to change
completion.c. Sometimes, however, after a 'git pull', make will try to
recompile completion.rb and complain about not finding rbgen. A fresh
clone, or simply 'touch completion.c' will solve this.
If the configure script is not found, you can recreate it, and all of
the other files it needs, by:
aclocal
autoconf
autoheader
automake --add-missing
or, even shorter:
autoreconf --install
On recent OS X sytems, libreadline is not the real thing, but a
non-GNU replacement. If the linker complains about missing
symbols, install GNU readline and try again (or, better, use
a tool like brew)
|