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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
|
# $Id: INSTALL,v 1.15 1998-08-14 00:04:17+09 hayashi Exp $
1. How to Install Term::ReadLine::Gnu
1.1 Install GNU Readline library 2.1 or later and their header files.
See the section `How to Install GNU Readline Library'.
1.2 Edit Makefile.PL
Specify directory for libreadline.a ($libreadlinedir) and
include files of GNU Readline library ($increadlinedir).
1.3 Make and install
% perl Makefile.PL
% make
% make test
% make install
1.4 Trouble Shooting
If you have any troubles during using this module, please let
me (hiroo.hayashi@computer.org) know them by E-Mail. It may
help people who has same problem. I'm sorry that I cannot
watch all articles on comp.lang.perl.modules.
When you report me your trouble, send me the result of `perl
-V' and which compiler you use to compile the GNU Readline
Library (libreadline.a).
2. How to Install GNU Readline Library
Now this module supports only GNU Readline Library 2.1 and
2.2.1. (readline-2.[12].tar.gz or libraries which are included
in the GNU Bash version 2.0 or later) Executing `perl
Makefile.PL` detects which version of the GNU Readline Library
is already installed and warns you if you have the unsupported
version.
Note that some free Unix distribution and Cygwin32-b19 include
the GNU Readline Library 2.0 which is not supported by this
module. (I can make readline-2.2 by ordinary configure and
make process even on Window 95 with Cygwin32 environment. But
my perl for Windows 95/NT does not work with it. Your
suggestion will be welcome.)
In following example, the install prefix directory is
`/usr/local/gnu'. If you install the library and header files
in another directory, you must edit `LIBS' and/or `INC'
section in Makefile.PL.
You DON'T have to build the library as shared library. If you
want, you can do. I don't know about building shared library
well. But Masahito Yamaga <yamaga@ipc.chiba-u.ac.jp>
contributed me a patch which adds the definitions for shared
library on Makefile.in of readline-2.2. With this patch I can
build a shared library easily on my Linux box, and it works
with Term::ReadLine::Gnu. If you have interested with it, try
the patch atteched at the end of this file.
Since the GNU Readline Library is 8 bit clean, I use Japanese
characters without any patch. But I have to hit Backspace key
twice to erase a Japanese character. If you want to handle
Japanese characters better, check the following URL.
ftp://ftp.yynet.tama.tokyo.jp/pub/misc/readline/
I've not tried it, but it should work with my module.
2.1. readline-2.2.1.tar.gz
readline-2.2.tar.gz has some bugs, so I strongly recommend you
to use readline-2.2.1.tar.gz instead.
1. get and extract readline-2.2.1.tar.gz
2. configure
% ./configure --prefix=/usr/local/gnu
3. make and install
% make install
2.2. readline-2.1.tar.gz
1. get and extract readline-2.1.tar.gz
2. add following patch;
========================================================================
*** Makefile.in.orig Wed Jun 4 00:29:31 1997
--- Makefile.in Sun Jul 13 23:31:09 1997
***************
*** 194,200 ****
-test -n "$(RANLIB)" && -$(RANLIB) -t $(libdir)/libreadline.a
-( if test -d doc ; then \
cd doc && \
! ${MAKE} ${MFLAGS} infodir=$(infodir) INSTALL_DATA=$(INSTALL_DATA) $@; \
fi )
installdirs: $(srcdir)/support/mkdirs
--- 194,200 ----
-test -n "$(RANLIB)" && -$(RANLIB) -t $(libdir)/libreadline.a
-( if test -d doc ; then \
cd doc && \
! ${MAKE} ${MFLAGS} infodir=$(infodir) INSTALL_DATA="$(INSTALL_DATA)" $@; \
fi )
installdirs: $(srcdir)/support/mkdirs
========================================================================
3. configure
% ./configure --prefix=/usr/local/gnu
4. make and install
% make install
2.3. libreadline.a in bash-2.0.tar.gz
# I reported this patch to Chet Ramey, the bash maintener, but he
# fixed Makefile.in as follows;
#
# $ grep -A2 ^install: bash-2.02/lib/readline/Makefile.in
# install:
# @echo "This version of the readline library should not be installed."
#
# Get readline-2.2.1.tar.gz and install it.
The libreadline.a which is made when you make bash does not
work as stand-alone library. You must make it without defining
a CPP macro `SHELL'.
1. get and extract bash-2.0.tar.gz
2. add following patch
(I reported this patch to bug-bash@prep.ai.mit.edu, so I
hope this patch will not be required by the future
releases.)
========================================================================
*** lib/readline/Makefile.in.orig Tue Nov 26 02:40:21 1996
--- lib/readline/Makefile.in Fri Dec 27 00:16:50 1996
***************
*** 4,9 ****
--- 4,16 ----
# #
####################################################################
+ # Include some boilerplate Gnu makefile definitions.
+ prefix = @prefix@
+
+ exec_prefix = @exec_prefix@
+ libdir = $(exec_prefix)/lib
+ includedir = @includedir@
+
srcdir = @srcdir@
VPATH = .:@srcdir@
topdir = @top_srcdir@
***************
*** 108,114 ****
done
-${MV} $(libdir)/libreadline.a $(libdir)/libreadline.old
${INSTALL_DATA} libreadline.a $(libdir)/libreadline.a
! -test -n "$(RANLIB)" && $(RANLIB) -t $(bindir)/libreadline.a
installdirs: $(topdir)/support/mkdirs
$(SHELL) $(topdir)/support/mkdirs $(includedir) \
--- 115,121 ----
done
-${MV} $(libdir)/libreadline.a $(libdir)/libreadline.old
${INSTALL_DATA} libreadline.a $(libdir)/libreadline.a
! -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libreadline.a
installdirs: $(topdir)/support/mkdirs
$(SHELL) $(topdir)/support/mkdirs $(includedir) \
========================================================================
3. configure
% ./configure --prefix=/usr/local/gnu
4. change directory to the Readline Library directory
% cd lib/readline
5. remove *.a and *.o, if you made libreadline.a for bash in
the directory
% make clean
6. make
% make
7. install
% make install
------------------------------------------------------------------------
3. Patch to build shared GNU Readline library
*** Makefile.in.orig Sat Apr 4 01:23:01 1998
--- Makefile.in Fri May 8 01:48:52 1998
***************
*** 94,99 ****
--- 94,133 ----
SHARED_HISTORY = libhistory.so.$(MAJOR)$(MINOR)
SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY)
+ # uncomment the proper one of the followings to build a shared library
+
+ # (Solaris2.x gcc, SunOS4.1.x gcc, NetBSD, FreeBSD, Linux)
+ #CC= gcc
+ #PICFLAG= -fpic
+ #LD= gcc
+ #SHLIB_OPTS= -shared
+
+ # (Solaris2.x /opt/SUNWspro/bin/cc)
+ #CC= /opt/SUNWspro/bin/cc
+ #PICFLAG= -KPIC
+ #LD= /usr/ccs/bin/ld
+ #SHLIB_OPTS= -G -z text
+
+ # (SunOS4.1.x cc)
+ #CC= cc
+ #PICFLAG= -pic
+ #LD= ld
+ #SHLIB_OPTS=
+
+ # (IRIX 5.x, 6.x)
+ #CC= cc
+ #PICFLAG= -KPIC
+ #LD= ld
+ #SHLIB_OPTS= -shared
+
+ # (HP-UX)
+ #CC= cc
+ #PICFLAG= +z
+ #LD= ld
+ #SHLIB_OPTS= -b
+ #SHARED_READLINE = libreadline.sl
+ #SHARED_HISTORY = libhistory.sl
+
# The C code source files for this library.
CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
$(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \
EOF
|