Check-in [f90495f90f]
Not logged in
Overview
Comment: introduced tclshrl and wishrl because a user wants statically linked binaries.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f90495f90f356d6406494a8c8b9e79b99b1e3cde
User & Date: johannes@zellner.org on 1999-12-16 21:53:03
Other Links: manifest | tags
Context
1999-12-16
21:53
Thu Dec 16 22:22:08 CET 1999 check-in: 5d555b6f90 user: johannes@zellner.org tags: trunk
21:53
introduced tclshrl and wishrl because a user wants statically linked binaries. check-in: f90495f90f user: johannes@zellner.org tags: trunk
1999-09-30
16:03
Thu Sep 30 18:03:05 MEST 1999 check-in: 5df4b8fab3 user: johannes@zellner.org tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Modified Makefile.in from [eef7262ac3] to [7533740ddd].

     1      1   # -*- make -*-
     2         -# FILE: "/disk01/home/joze/src/tclreadline/Makefile.in"
     3         -# LAST MODIFICATION: "Wed Sep 29 10:57:20 1999 (joze)"
            2  +# FILE: "/home/joze/src/tclreadline/Makefile.in"
            3  +# LAST MODIFICATION: "Thu Dec 16 22:09:55 1999 (joze)"
     4      4   # (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
     5      5   # $Id$
     6      6   # ---
     7      7   #
     8      8   # tclreadline -- gnu readline for tcl
     9      9   # Copyright (C) 1999  Johannes Zellner
    10     10   #
................................................................................
    54     54   # specific files (exec_prefix) and machine-independent files such
    55     55   # as scripts (prefix).  The values specified here may be overridden
    56     56   # at configure-time with the --exec-prefix and --prefix options
    57     57   # to the "configure" script.
    58     58   
    59     59   prefix      = @prefix@
    60     60   exec_prefix = @exec_prefix@
           61  +
           62  +bindir      = @bindir@
    61     63   
    62     64   # The following definition can be set to non-null for special systems
    63     65   # like AFS with replication.  It allows the pathnames used for installation
    64     66   # to be different than those used for actually reference files at
    65     67   # run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
    66     68   # when installing files.
    67     69   INSTALL_ROOT =
................................................................................
   134    136   # Makefile is generated from Makefile.in.  You shouldn't normally
   135    137   # modify any of this stuff by hand.
   136    138   #----------------------------------------------------------------
   137    139   
   138    140   RANLIB               = @RANLIB@
   139    141   TOP_DIR              = $(srcdir)
   140    142   TCL_INCLUDE_DIR      = @TCL_INCLUDE_DIR@
          143  +TCL_LIB_SPEC         = @TCL_LIB_SPEC@
          144  +TK_LIB_SPEC          = @TK_LIB_SPEC@
   141    145   READLINE_INCLUDE_DIR = @READLINE_INCLUDE_DIR@
   142    146   TCLREADLINE_LIB_FILE = @TCLREADLINE_LIB_FILE@
   143    147   
   144    148   READLINE_LIB         = -L@READLINE_LIB_DIR@ -lreadline
   145    149   TERMLIB              = @TERMLIB@
   146    150   TERMLIB_DIR          = @TERMLIB_DIR@
   147    151   
................................................................................
   174    178       config.h.in \
   175    179       tclreadline.c \
   176    180       tclreadline.h.in \
   177    181       tclreadline.n.in \
   178    182       tclreadlineConfig.sh.in \
   179    183       tclreadlineInit.tcl.in \
   180    184       tclreadlineSetup.tcl.in \
   181         -    tclreadlineCompleter.tcl
          185  +    tclreadlineCompleter.tcl \
          186  +    tclshrl.c \
          187  +    wishrl.c
   182    188   
   183    189   MISC = TODO
   184    190   
   185    191   AUXILIARY = \
   186    192       aux/config.guess \
   187    193       aux/config.sub \
   188    194       aux/install-sh \
................................................................................
   191    197   
   192    198   MAN = tclreadline.n
   193    199   HTML = tclreadline.n.html
   194    200   
   195    201   CIFLAGS = -f -t-"gnu readline for tcl" -m"before initial relase"
   196    202   
   197    203   all: $(TCLREADLINE_LIB_FILE)
          204  +
   198    205   
   199    206   .PHONY: clean distclean ctags tcltags vimtags tags ci co
   200    207   
   201    208   .SUFFIXES: .c .o .so .sl .tcl
   202    209   
   203    210   
   204    211   
   205    212   @TCLREADLINE_LIB_FILE@: ${OBJS}
   206    213   	rm -f $(TCLREADLINE_LIB_FILE)
   207    214   	@MAKE_LIB@ $(TERMLIB_DIR) $(READLINE_LIB) $(TERMLIB)
   208    215   	$(RANLIB) $(TCLREADLINE_LIB_FILE)
   209    216   
          217  +shells: tclshrl wishrl
          218  +
          219  +tclshrl: $(OBJS) tclshrl.o
          220  +	$(CC) -o tclshrl tclshrl.o $(OBJS) $(TERMLIB_DIR) $(READLINE_LIB) $(TERMLIB) $(TCL_LIB_SPEC)
          221  +
          222  +wishrl: $(OBJS) wishrl.o
          223  +	$(CC) -o wishrl wishrl.o $(OBJS) $(TERMLIB_DIR) $(READLINE_LIB) $(TERMLIB) $(TK_LIB_SPEC)
          224  +
   210    225   install: install-binaries install-libraries install-man
          226  +
          227  +install-shells: install-tclshrl install-wishrl
          228  +
          229  +install-tclshrl:
          230  +	$(MKINSTALLDIRS) $(bindir)
          231  +	$(INSTALL_PROGRAM) tclshrl $(bindir)/tclshrl
          232  +
          233  +install-wishrl:
          234  +	$(MKINSTALLDIRS) $(bindir)
          235  +	$(INSTALL_PROGRAM) wishrl $(bindir)/wishrl
          236  +
   211    237   install-man: $(MANN_INSTALL_DIR)/$(MAN)
   212    238   
   213    239   install-binaries: $(TCLREADLINE_LIB_FILE)
   214    240   	@$(MKINSTALLDIRS) $(LIBRARY_INSTALL_DIR)
   215    241   	@echo "Installing $(TCLREADLINE_LIB_FILE)"
   216    242   	@$(INSTALL_DATA) $(TCLREADLINE_LIB_FILE) \
   217    243               $(LIBRARY_INSTALL_DIR)/$(TCLREADLINE_LIB_FILE)
................................................................................
   257    283   
   258    284   configure: configure.in
   259    285   	autoconf
   260    286   
   261    287   tclreadline.o:	$(TOP_DIR)/tclreadline.c Makefile
   262    288   	$(CC) -c $(CC_SWITCHES) $(DEFS) $(TOP_DIR)/tclreadline.c
   263    289   
          290  +tclshrl.o:	$(TOP_DIR)/tclshrl.c Makefile
          291  +	$(CC) -c $(CC_SWITCHES) $(DEFS) $(TOP_DIR)/tclshrl.c
          292  +
          293  +wishrl.o:	$(TOP_DIR)/wishrl.c Makefile
          294  +	$(CC) -c $(CC_SWITCHES) $(DEFS) $(TOP_DIR)/wishrl.c
          295  +
   264    296   ctags:
   265    297   	ctags -R
   266    298   
   267    299   tcltags: ctags tclreadlineInit.tcl.in tclreadlineSetup.tcl.in \
   268    300               tclreadlineCompleter.tcl
   269    301   	tcltags -a tclreadlineInit.tcl.in tclreadlineSetup.tcl.in \
   270    302               tclreadlineCompleter.tcl

Modified README from [a78ad2a391] to [fe12ffe1fc].

     1      1   
     2      2       FILE: "/home/joze/src/tclreadline/README"
     3         -    LAST MODIFICATION: "Tue Sep 21 21:21:36 1999 (joze)"
            3  +    LAST MODIFICATION: "Thu Dec 16 22:17:39 1999 (joze)"
     4      4       (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
     5      5       $Id$
     6      6       ---
     7      7   
     8      8       tclreadline -- gnu readline for tcl
     9      9       Copyright (C) 1999  Johannes Zellner
    10     10   
................................................................................
    56     56           It uses the tclConfig.sh file, which should reside somewhere
    57     57           in /usr/local/lib/ or /usr/local/lib/tcl8.0/...
    58     58   
    59     59       (b) Make sure you have gnu readline 2.2 or higher.
    60     60           tclreadline uses the gnu readline callback handler, which
    61     61           wasn't implemented in early releases.
    62     62   
    63         -The usual ./configure; make; make install sequence should do the rest.
           63  +    (c) The usual ./configure; make; make install sequence should do the rest.
           64  +
           65  +    (d) Optionally (or additionally) you can build the executables
           66  +        tclshrl and / or wishrl which are a readline enhanced replacement
           67  +        for tclsh and wish. To compile these executable you should type
           68  +            make tclshrl
           69  +        or
           70  +            make wishrl
           71  +        or
           72  +            make shells
           73  +        the latter will compile both shells. To install these shells
           74  +        you should type
           75  +            make install-tclshrl
           76  +        or
           77  +            make install-wishrl
           78  +        or
           79  +            make install-shells
           80  +        Building these executables is discouraged but necessary
           81  +        on systems which don't support shared libs.
    64     82   
    65     83   
    66     84   4. Using tclreadline for interactive tcl scripting.
    67     85   ---------------------------------------------------
    68     86   
    69     87   copy the sample.tclshrc to $HOME/.tclshrc. If you use another interpreter
    70     88   like wish, you should copy the file sample.tclshrc to $HOME/.wishrc

Modified configure.in from [60c4ecbda9] to [c19b6f76b5].

     1         -# -*- autoconf -*-
     2         -# FILE: "/home/joze/src/tclreadline/configure.in"
     3         -# LAST MODIFICATION: "Tue Sep 28 22:51:45 1999 (joze)"
     4         -# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
     5         -# $Id$
     6         -# ---
     7         -#
     8         -# tclreadline -- gnu readline for tcl
     9         -# Copyright (C) 1999  Johannes Zellner
    10         -#
    11         -# This program is free software; you can redistribute it and/or
    12         -# modify it under the terms of the GNU General Public License
    13         -# as published by the Free Software Foundation; either version 2
    14         -# of the License, or (at your option) any later version.
    15         -#
    16         -# This program is distributed in the hope that it will be useful,
    17         -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    18         -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    19         -# GNU General Public License for more details.
    20         -#
    21         -# You should have received a copy of the GNU General Public License
    22         -# along with this program; if not, write to the Free Software
    23         -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    24         -#
    25         -# johannes@zellner.org
    26         -# http://www.zellner.org/tclreadline/
    27         -#
    28         -# ================================================================== */  
            1  +dnl -*- autoconf -*-
            2  +dnl FILE: "/home/joze/src/tclreadline/configure.in"
            3  +dnl LAST MODIFICATION: "Thu Dec 16 22:01:33 1999 (joze)"
            4  +dnl (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
            5  +dnl $Id$
            6  +dnl ---
            7  +dnl
            8  +dnl tclreadline -- gnu readline for tcl
            9  +dnl Copyright (C) 1999  Johannes Zellner
           10  +dnl
           11  +dnl This program is free software; you can redistribute it and/or
           12  +dnl modify it under the terms of the GNU General Public License
           13  +dnl as published by the Free Software Foundation; either version 2
           14  +dnl of the License, or (at your option) any later version.
           15  +dnl
           16  +dnl This program is distributed in the hope that it will be useful,
           17  +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
           18  +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
           19  +dnl GNU General Public License for more details.
           20  +dnl
           21  +dnl You should have received a copy of the GNU General Public License
           22  +dnl along with this program; if not, write to the Free Software
           23  +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
           24  +dnl
           25  +dnl johannes@zellner.org
           26  +dnl http://www.zellner.org/tclreadline/
           27  +dnl
           28  +dnl ================================================================== */  
    29     29   
    30     30   dnl	This file is an input file used by the GNU "autoconf" program to
    31     31   dnl	generate the file "configure", which is run during Tk installation
    32     32   dnl	to configure the system for the local environment.
    33     33   
    34         -AC_REVISION($Revision$)
    35     34   
    36     35   AC_INIT(tclreadline.c)
    37     36   AC_CONFIG_HEADER(config.h)
           37  +AC_PREREQ(2.13)
           38  +AC_REVISION($Revision$)
           39  +AC_CONFIG_AUX_DIR(./aux)
    38     40   
    39     41   TCLREADLINE_MAJOR_VERSION=1
    40     42   TCLREADLINE_MINOR_VERSION=0
    41         -TCLREADLINE_PATCHLEVEL=3
           43  +TCLREADLINE_PATCHLEVEL=5
    42     44   TCLREADLINE_VERSION=$TCLREADLINE_MAJOR_VERSION.$TCLREADLINE_MINOR_VERSION
    43     45   TCLREADLINE_PATCHLEVEL_STR=${TCLREADLINE_VERSION}.${TCLREADLINE_PATCHLEVEL}
    44     46   VERSION=$TCLREADLINE_VERSION
    45     47   
           48  +dnl AM_INIT_AUTOMAKE(tclreadline, $VERSION)
    46     49   
    47         -AC_PREREQ(2.13)
    48         -AC_CONFIG_AUX_DIR(./aux)
    49     50   AC_CANONICAL_HOST
    50     51   
    51     52   
    52     53   TCLREADLINE_LPATH=`echo $LD_LIBRARY_PATH $LD_RUN_PATH $LPATH | sed 's/:/ /g'`
    53     54   TCLREADLINE_LPATH="$TCLREADLINE_LPATH /usr/local/lib /lib /usr/lib /usr/shlib"
    54     55   
    55     56   
................................................................................
    78     79       AC_MSG_ERROR(Can't find Tcl libraries.  Use --with-tcl to specify the directory containing tclConfig.sh on your system.)
    79     80   else
    80     81       . $TCL_LIB_DIR/tclConfig.sh
    81     82       AC_MSG_RESULT($TCL_LIB_DIR/tclConfig.sh)
    82     83       AC_MSG_CHECKING([for your tcl version])
    83     84       AC_MSG_RESULT([$TCL_VERSION, patchlevel $TCL_PATCH_LEVEL])
    84     85   fi
           86  +
           87  +#--------------------------------------------------------------------
           88  +#    eventually check for tkConfig.sh
           89  +#--------------------------------------------------------------------
           90  +
           91  +tk_search="no"
           92  +AC_ARG_WITH(
           93  +    tk,
           94  +    [  --with-tk=DIR           where to look for tclConfig.sh],
           95  +    tk_search=$withval,
           96  +    tk_search="yes"
           97  +)
           98  +
           99  +if test "$tk_search" != "no"; then
          100  +    AC_MSG_CHECKING([which tkConfig.sh to use])
          101  +    TK_LIB_DIR=""
          102  +    for dir in $tk_search /usr/lib /usr/local/lib $exec_prefix/lib /usr/local/lib/unix /opt/tcl/lib; do
          103  +	if test -r $dir/tkConfig.sh; then
          104  +	    TK_LIB_DIR=$dir
          105  +	    break
          106  +	fi
          107  +    done
          108  +
          109  +    if test -z "$TK_LIB_DIR"; then
          110  +	AC_MSG_ERROR(Can't find Tk libraries.)
          111  +    else
          112  +	. $TK_LIB_DIR/tkConfig.sh
          113  +	AC_MSG_RESULT($TK_LIB_DIR/tkConfig.sh)
          114  +	AC_MSG_CHECKING([for your tk version])
          115  +	AC_MSG_RESULT([$TK_VERSION, patchlevel $TK_PATCH_LEVEL])
          116  +    fi
          117  +    AC_SUBST(TK_LIB_SPEC)
          118  +fi
    85    119   
    86    120   #--------------------------------------------------------------------
    87    121   #   Read in configuration information generated by Tcl for shared
    88    122   #   libraries, and arrange for it to be substituted into our
    89    123   #   Makefile.
    90    124   #--------------------------------------------------------------------
    91    125   
................................................................................
   203    237   #--------------------------------------------------------------------
   204    238   #   The statements below define a collection of symbols related to
   205    239   #   building libtclreadline as a shared library instead of a static library.
   206    240   #   (static is not implemented yet anyway).
   207    241   #--------------------------------------------------------------------
   208    242   
   209    243   AC_ARG_ENABLE(shared,
   210         -    [  --disable-shared        don't build libtclreadline as a shared library
   211         -                          (not implemented -- probably never).],
          244  +    [  --disable-shared        don't build libtclreadline as a shared library.],
   212    245       [ok=$enableval], [ok=yes])
   213    246   if test "$ok" = "yes"; then
   214    247       if test ${TCL_SHARED_BUILD} = 0; then
   215    248           AC_MSG_ERROR(Tcl was not built with --enable-shared, so you can't use shared libraries.)
   216    249       fi
   217    250       SHLIB_CFLAGS="${SHLIB_CFLAGS}"
   218    251       eval "TCLREADLINE_LIB_FILE=libtclreadline${VERSION}${SHLIB_SUFFIX}"
   219    252       TCLREADLINE_PKG_FILE="[[file join [file dirname \$dir] ${TCLREADLINE_LIB_FILE}]]"
   220    253       MAKE_LIB="\$(SHLIB_LD) -o ${TCLREADLINE_LIB_FILE} \$(OBJS) ${SHLIB_LD_LIBS}"
   221    254       RANLIB=":"
   222    255   else
   223         -    AC_MSG_ERROR(non-shared not implemented yet. (probably never))
   224    256       SHLIB_CFLAGS=""
   225    257       eval "TCLREADLINE_LIB_FILE=libtclreadline${VERSION}.a"
   226         -    TCLREADLINE_PKG_FILE=""
          258  +    TCLREADLINE_PKG_FILE="[[file join [file dirname \$dir] ${TCLREADLINE_LIB_FILE}]]"
   227    259       MAKE_LIB="ar cr ${TCLREADLINE_LIB_FILE} \${OBJS}"
   228    260   fi
   229    261   
   230    262   # Note:  in the following variable, it's important to use the absolute
   231    263   # path name of the Tcl directory rather than "..":  this is because
   232    264   # AIX remembers this path and will attempt to use it at run-time to look
   233    265   # up the Tcl library.
................................................................................
   298    330     Can't find readline.h.
   299    331     Use --with-readline-includes to specify the directory
   300    332     containing readline.h on your system.])
   301    333   else
   302    334       AC_MSG_RESULT($READLINE_INCLUDE_DIR/readline.h)
   303    335   	base="`(basename ${READLINE_INCLUDE_DIR}) 2>/dev/null`"
   304    336   	if test "x${base}" != "xreadline"; then
   305         -		AC_DEFINE_UNQUOTED(READLINE_LIBRARY, 1)
          337  +		AC_DEFINE_UNQUOTED(READLINE_LIBRARY, 1, [ Define if we have libreadline. ])
   306    338   	fi
   307    339   fi
   308    340   
   309    341   
   310    342   
   311    343   #--------------------------------------------------------------------
   312    344   #   Check for libreadline
................................................................................
   423    455   # _rl_executing_macro.
   424    456   
   425    457   AC_MSG_CHECKING([for _rl_executing_macro in -lreadline])
   426    458   AC_TRY_LINK(,[
   427    459   	extern char* _rl_executing_macro;
   428    460   	_rl_executing_macro = (char*) 0;
   429    461   ],
   430         -    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(EXECUTING_MACRO_HACK, 1),
          462  +    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(EXECUTING_MACRO_HACK, 1, [define, if _rl_executing_macro is resolved in libreadline]),
   431    463       AC_MSG_RESULT(no))
   432    464   
   433    465   # check for readline's rl_cleanup_after_signal
   434    466   
   435    467   AC_MSG_CHECKING([for rl_cleanup_after_signal() in -lreadline])
   436    468   AC_TRY_LINK(,[
   437    469       extern void rl_cleanup_after_signal();
   438    470   	rl_cleanup_after_signal();
   439    471   ],
   440         -    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(CLEANUP_AFER_SIGNAL, 1),
          472  +    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(CLEANUP_AFER_SIGNAL, 1, [define, if rl_cleanup_after_signal is resolved in libreadline]),
   441    473       AC_MSG_RESULT(no))
   442    474   
   443    475   
   444    476   AC_MSG_CHECKING([for the readline version number])
   445    477   AC_TRY_RUN([
   446    478   #include <stdio.h>
   447    479   int main () {
................................................................................
   470    502   AC_SUBST(TCLREADLINE_VERSION)
   471    503   AC_SUBST(TCLREADLINE_PATCHLEVEL)
   472    504   AC_SUBST(TCLREADLINE_LIBRARY)
   473    505   AC_SUBST(TCLREADLINE_PATCHLEVEL_STR)
   474    506   
   475    507   
   476    508   AC_SUBST(TCL_LIB_DIR)
          509  +AC_SUBST(TCL_LIB_SPEC)
   477    510   AC_SUBST(TCL_INCLUDE_DIR)
   478    511   AC_SUBST(READLINE_INCLUDE_DIR)
   479    512   
   480    513   AC_SUBST(CFLAGS)
   481    514   AC_SUBST(DL_LIBS)
   482    515   AC_SUBST(LD_FLAGS)
   483    516   AC_SUBST(RANLIB)

Modified tclreadlineInit.tcl.in from [a1f8bae947] to [a9533293b7].

     1      1   #!/usr/local/bin/tclsh
     2         -# FILE: "/disk01/home/joze/src/tclreadline/tclreadlineInit.tcl.in"
     3         -# LAST MODIFICATION: "Wed Sep 15 15:23:16 1999 (joze)"
            2  +# FILE: "/home/joze/src/tclreadline/tclreadlineInit.tcl.in"
            3  +# LAST MODIFICATION: "Thu Dec 16 21:44:31 1999 (joze)"
     4      4   # (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
     5      5   # $Id$
     6      6   # ---
     7      7   #
     8      8   # tclreadline -- gnu readline for tcl
     9      9   # Copyright (C) 1999  Johannes Zellner
    10     10   #
................................................................................
    30     30   package provide tclreadline @TCLREADLINE_VERSION@
    31     31   
    32     32   namespace eval tclreadline:: {
    33     33   	namespace export Init
    34     34   }
    35     35   
    36     36   proc ::tclreadline::Init {} {
    37         -	
    38         -	if [catch {load @TCLREADLINE_LIBRARY@/@TCLREADLINE_LIB_FILE@} msg] {
           37  +    uplevel #0 {
           38  +	if ![info exists tclreadline::library] {
           39  +	    if [catch {load /usr/lib/tclreadline1.0/libtclreadline1.0.so} msg] {
    39     40   		puts stderr $msg
    40     41   		exit 2
           42  +	    }
    41     43   	}
           44  +    }
    42     45   }
    43     46   
    44     47   tclreadline::Init
    45     48   ::tclreadline::readline customcompleter ::tclreadline::ScriptCompleter
    46     49   
    47     50   source [file join [file dirname [info script]] tclreadlineSetup.tcl]
    48     51   
    49     52   set auto_index(::tclreadline::ScriptCompleter) \
    50     53   [list source [file join [file dirname [info script]] tclreadlineCompleter.tcl]]