Check-in [46ef5876f1]
Not logged in
Overview
Comment: Modified Files: Makefile.in README configure.in sample.tclshrc tclreadlineSetup.tcl.in
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:46ef5876f192089735be5951d64ad9cc78277291
User & Date: johannes@zellner.org on 1999-08-23 15:51:07
Other Links: manifest | tags
Context
1999-08-23
15:55
Modified Files: Makefile.in sources check-in: 2f48c6f953 user: johannes@zellner.org tags: trunk
15:51
Modified Files: Makefile.in README configure.in sample.tclshrc tclreadlineSetup.tcl.in check-in: 46ef5876f1 user: johannes@zellner.org tags: trunk
09:17
configure.in check-in: e356777f67 user: johannes@zellner.org tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Modified Makefile.in from [52fb3dea44] to [6c49ace40a].

1
2
3
4
5
6
7
8
9
10
...
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
...
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
...
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# -*- make -*-
# FILE: "/home/joze/src/tclreadline/Makefile.in"
# LAST MODIFICATION: "Sat Aug 21 00:21:27 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
................................................................................
RANLIB               = @RANLIB@
TOP_DIR              = $(srcdir)
TCL_INCLUDE_DIR      = @TCL_INCLUDE_DIR@
READLINE_INCLUDE_DIR = @READLINE_INCLUDE_DIR@
TCLREADLINE_LIB_FILE = @TCLREADLINE_LIB_FILE@

READLINE_LIB         = -L@READLINE_LIB_DIR@ -lreadline
TERMCAP_LIB          = -L@TERMCAP_LIB_DIR@ -l@TERMCAP_LIB@

#----------------------------------------------------------------
# The information below should be usable as is.  The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------

................................................................................
.SUFFIXES: .c .o .so .sl .tcl

all: $(TCLREADLINE_LIB_FILE)


@TCLREADLINE_LIB_FILE@: ${OBJS}
	rm -f $(TCLREADLINE_LIB_FILE)
	@MAKE_LIB@ $(TERMCAP_LIB) $(READLINE_LIB)
	$(RANLIB) $(TCLREADLINE_LIB_FILE)

install: install-binaries install-libraries install-man
install-man: $(MANN_INSTALL_DIR)/$(MAN)

install-binaries: $(TCLREADLINE_LIB_FILE)
	@$(MKINSTALLDIRS) $(LIBRARY_INSTALL_DIR)
................................................................................

clean:
	rm -f *.a *.o core errs *~ \#* tags* *.E a.out errors so_locations

distclean: clean
	rm -f \
	Makefile *.so *.sl pkgIndex.tcl tclreadlineInit.tcl \
        tclreadlineSetup.tcl\
 	tclreadlineConfig.sh config.status config.log config.cache

depend:
	makedepend -- $(CC_SWITCHES) -- $(CSRCS)

configure: configure.in
	autoconf

|
|







 







|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
...
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
...
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
...
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# -*- make -*-
# FILE: "/diska/home/joze/src/tclreadline/Makefile.in"
# LAST MODIFICATION: "Mon Aug 23 17:10:16 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
................................................................................
RANLIB               = @RANLIB@
TOP_DIR              = $(srcdir)
TCL_INCLUDE_DIR      = @TCL_INCLUDE_DIR@
READLINE_INCLUDE_DIR = @READLINE_INCLUDE_DIR@
TCLREADLINE_LIB_FILE = @TCLREADLINE_LIB_FILE@

READLINE_LIB         = -L@READLINE_LIB_DIR@ -lreadline
TERM_LIB             = @TERM_LIB@

#----------------------------------------------------------------
# The information below should be usable as is.  The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------

................................................................................
.SUFFIXES: .c .o .so .sl .tcl

all: $(TCLREADLINE_LIB_FILE)


@TCLREADLINE_LIB_FILE@: ${OBJS}
	rm -f $(TCLREADLINE_LIB_FILE)
	@MAKE_LIB@ $(TERM_LIB) $(READLINE_LIB)
	$(RANLIB) $(TCLREADLINE_LIB_FILE)

install: install-binaries install-libraries install-man
install-man: $(MANN_INSTALL_DIR)/$(MAN)

install-binaries: $(TCLREADLINE_LIB_FILE)
	@$(MKINSTALLDIRS) $(LIBRARY_INSTALL_DIR)
................................................................................

clean:
	rm -f *.a *.o core errs *~ \#* tags* *.E a.out errors so_locations

distclean: clean
	rm -f \
	Makefile *.so *.sl pkgIndex.tcl tclreadlineInit.tcl \
        tclreadlineSetup.tcl tclreadline.h tclreadline.n \
 	tclreadlineConfig.sh config.status config.log config.cache

depend:
	makedepend -- $(CC_SWITCHES) -- $(CSRCS)

configure: configure.in
	autoconf

Modified README from [109aca9237] to [5f6392bebf].

1
2
3
4
5
6
7
8
9
10
..
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
..
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

    FILE: "/home/joze/src/tclreadline/README"
    LAST MODIFICATION: "Mon Aug 23 00:21:24 1999 (joze)"
    (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    ---

    tclreadline -- gnu readline for tcl
    Copyright (C) 1999  Johannes Zellner

................................................................................
---------------------------------------

This release will probably only build under UNIX (Linux).

Before trying to compile tclreadline you should do the following things:

    (a) Make sure you have tcl 8.0 or higher.  I've tested tclreadline
        with tcl 8.0.3 and 8.0.4.  tclreadline relies on a proper tcl
        installation:
        It uses the tclConfig.sh file, which should reside somewhere
        in /usr/local/lib/ or /usr/local/lib/tcl8.0/...

    (b) Make sure you have gnu readline 2.2 or higher.
        tclreadline uses the gnu readline callback handler, which
        wasn't implemented in early releases.

................................................................................
          proc tclreadline::Setup and can be used with the command
          namespace import tclreadline::ls (see sample.tclshrc).

    bug fixes:
        - lines added to tcl's history. (were only in readline's hist.)
        - macro mappings didn't work. (only when hitting
          mapped characters more than once.)
        - minor fixes in configure.in

tclreadline-0.8: (May 1999)
    - adapted for tcl8.1.
    - minor bug fixes.

tclreadline-0.7: (Mar 1999)
    first `public release'.

|
|







 







|
|







 







|







1
2
3
4
5
6
7
8
9
10
..
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
..
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

    FILE: "/diska/home/joze/src/tclreadline/README"
    LAST MODIFICATION: "Mon Aug 23 17:46:01 1999 (joze)"
    (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    ---

    tclreadline -- gnu readline for tcl
    Copyright (C) 1999  Johannes Zellner

................................................................................
---------------------------------------

This release will probably only build under UNIX (Linux).

Before trying to compile tclreadline you should do the following things:

    (a) Make sure you have tcl 8.0 or higher.  I've tested tclreadline
        with tcl 8.0.3, 8.0.4, 8.0.5, 8.1.0, 8.1.1 and 8.2.0.
        tclreadline relies on a proper tcl installation:
        It uses the tclConfig.sh file, which should reside somewhere
        in /usr/local/lib/ or /usr/local/lib/tcl8.0/...

    (b) Make sure you have gnu readline 2.2 or higher.
        tclreadline uses the gnu readline callback handler, which
        wasn't implemented in early releases.

................................................................................
          proc tclreadline::Setup and can be used with the command
          namespace import tclreadline::ls (see sample.tclshrc).

    bug fixes:
        - lines added to tcl's history. (were only in readline's hist.)
        - macro mappings didn't work. (only when hitting
          mapped characters more than once.)
        - various changes and fixes in configure.in

tclreadline-0.8: (May 1999)
    - adapted for tcl8.1.
    - minor bug fixes.

tclreadline-0.7: (Mar 1999)
    first `public release'.

Modified configure.in from [bb83c845d2] to [217aaced79].

1
2
3
4
5
6
7
8
9
10
...
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413






























414
415
416
417
418
419
420
...
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
# -*- autoconf -*-
# FILE: "/diska/home/joze/src/tclreadline/configure.in"
# LAST MODIFICATION: "Mon Aug 23 10:59:40 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
................................................................................
  Use --with-readline-library to specify the directory
  containing libreadline$SHLIB_SUFFIX on your system.])
else
    AC_MSG_RESULT({READLINE_LIB_DIR}/libreadline${SHLIB_SUFFIX}${READLINE_VERSION_SUFFIX})
fi



#--------------------------------------------------------------------
#   Specify termlib or curses library
#--------------------------------------------------------------------

opt_curses=no
AC_ARG_WITH(curses, 
[  --with-curses           force using the curses library instead of termcap],
opt_curses=$withval)

if test "$opt_curses" = "yes"; then
    TERMCAP_CHECK="curses ncurses"
else
    TERMCAP_CHECK="termcap curses ncurses"
fi


#--------------------------------------------------------------------
#   Check for termlib / curses / ncurses library.
#--------------------------------------------------------------------

AC_ARG_WITH(termcap-library,
            [  --with-termcap-library=DIR
                          search termcap (or curses / ncurses) library in DIR],
            termcap_lib=$withval, termcap_lib=$exec_prefix/lib)

tcheck_path="$termcap_lib $TCLREADLINE_LPATH $prefix/lib"
for tcheck in $TERMCAP_CHECK; do
    AC_MSG_CHECKING([whether we use lib$tcheck$SHLIB_SUFFIX])
    TERMCAP_LIB_DIR=""
    for dir in $tcheck_path; do
        if test -r $dir/lib$tcheck$SHLIB_SUFFIX; then
            TERMCAP_LIB_DIR=$dir
            break
        fi
    done

    if test -z "$TERMCAP_LIB_DIR"; then
        AC_MSG_RESULT(no)
    else
        TERMCAP_LIB=$tcheck
        TERMCAP_LOAD_PATH=${TERMCAP_LIB_DIR}/lib${tcheck}${SHLIB_SUFFIX}
        AC_MSG_RESULT(yes: $TERMCAP_LOAD_PATH)
        break
    fi
done

if test -z "$TERMCAP_LIB_DIR"; then
    AC_MSG_ERROR([
  None of "$TERMCAP_CHECK" found in:
  $tcheck_path
  Use --with-termcap-library to specify the directory containing 
  lib$TERMCAP_LIB$SHLIB_SUFFIX on your system.])
fi



#--------------------------------------------------------------------
#   Check for appropriate version of gnu readline
#   (older versions of gnu readline don't have
#    rl_callback_read_char ()).
#--------------------------------------------------------------------

save=$LIBS

LIBS="-L$READLINE_LIB_DIR -lreadline -L$TERMCAP_LIB_DIR -l$TERMCAP_LIB"
alternate=no
AC_CHECK_LIB(readline, rl_callback_read_char, alternate=yes, alternate=no, -l$TERMCAP_LIB)
if test $alternate = "no"; then
    AC_MSG_ERROR(alternate interface not supported by this readline version.)
fi































AC_MSG_CHECKING([for the readline version number])
AC_TRY_RUN([
#include <stdio.h>
int main () {
    FILE *fp = fopen ("conftestversion", "w");
    extern char *rl_library_version;
    fprintf (fp, "%s", rl_library_version);
................................................................................
AC_SUBST(SHLIB_CFLAGS)

AC_SUBST(SHLIB_LD)
AC_SUBST(SHLIB_LD_LIBS)

AC_SUBST(SHLIB_SUFFIX)

AC_SUBST(TERMCAP_LIB_DIR)
AC_SUBST(TERMCAP_LIB)
AC_SUBST(READLINE_LIB_DIR)

AC_SUBST(TCLREADLINE_LIB_FILE)
AC_SUBST(TCLREADLINE_BUILD_LIB_SPEC)
AC_SUBST(TCLREADLINE_LIB_SPEC)

AC_SUBST(TCLREADLINE_LIB_DIR)


|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
|

|
|



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







<
|







1
2
3
4
5
6
7
8
9
10
...
335
336
337
338
339
340
341
























































342
343
344
345
346
347
348
349

350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
...
427
428
429
430
431
432
433

434
435
436
437
438
439
440
441
# -*- autoconf -*-
# FILE: "/diska/home/joze/src/tclreadline/configure.in"
# LAST MODIFICATION: "Mon Aug 23 16:45:33 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
................................................................................
  Use --with-readline-library to specify the directory
  containing libreadline$SHLIB_SUFFIX on your system.])
else
    AC_MSG_RESULT({READLINE_LIB_DIR}/libreadline${SHLIB_SUFFIX}${READLINE_VERSION_SUFFIX})
fi



























































#--------------------------------------------------------------------
#   Check for appropriate version of gnu readline
#   (older versions of gnu readline don't have
#    rl_callback_read_char ()).
#--------------------------------------------------------------------

save=$LIBS

LIBS="-L$READLINE_LIB_DIR -lreadline"
alternate=no
AC_CHECK_LIB(readline, rl_callback_read_char, alternate=yes, alternate=no)
if test "$alternate" = "no"; then
    AC_MSG_ERROR(alternate interface not supported by this readline version.)
fi


# ---
# check, if curses or termcap is already
# linked with libreadline. (on newer Linux
# systems it is.)
# ---

AC_CHECK_LIB(readline, tputs, termcaps=yes, termcaps=no)
if test "$termcaps" = "no"; then

    # ---
    # nope. tputs() is unresolved in libreadline, so
    # check if we want libcurses or libtermcap.
    # ---

    AC_ARG_WITH(
        termcap, 
        [  --with-termcap          use termcap library instead of curses.],
        TERM_LIB="termcap",
        TERM_LIB="curses"
    )
    AC_CHECK_LIB($TERM_LIB, tputs, tputs_ok=yes, tputs_ok=no)
    if test "$tputs_ok" = "no"; then
        AC_MSG_ERROR(tputs() not found in lib$TERM_LIB.)
    else
        TERM_LIB=-l$TERM_LIB
    fi
fi
# ===========================================

AC_MSG_CHECKING([for the readline version number])
AC_TRY_RUN([
#include <stdio.h>
int main () {
    FILE *fp = fopen ("conftestversion", "w");
    extern char *rl_library_version;
    fprintf (fp, "%s", rl_library_version);
................................................................................
AC_SUBST(SHLIB_CFLAGS)

AC_SUBST(SHLIB_LD)
AC_SUBST(SHLIB_LD_LIBS)

AC_SUBST(SHLIB_SUFFIX)


AC_SUBST(TERM_LIB)
AC_SUBST(READLINE_LIB_DIR)

AC_SUBST(TCLREADLINE_LIB_FILE)
AC_SUBST(TCLREADLINE_BUILD_LIB_SPEC)
AC_SUBST(TCLREADLINE_LIB_SPEC)

AC_SUBST(TCLREADLINE_LIB_DIR)

Modified sample.tclshrc from [75407d3132] to [d234ad5a9b].

1
2
3
4
5
6
7
8
9
10
..
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
#!/bin/sh
# FILE: "/home/joze/src/tclreadline/sample.tclshrc"
# LAST MODIFICATION: "Mon Aug 23 00:55:51 1999 (joze)"
# (C) 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# vim:set ft=tcl: \
exec tclsh "$0" "$@"


if {$tcl_interactive} {
................................................................................
    #         tclreadline::ls
    #     }
    # }

    # uncomment the following line to use
    # tclreadline's fancy ls proc.
    #
    # namespace import ::tclreadline::ls

    # tclreadline::Print is on (`yes') by default.
    # This mimics the command echoing like in the
    # non-readline interactive tclsh.
    # If you don't like this, uncomment the following
    # line.
    #
    # ::tclreadline::Print no

    # uncomment the folling line, if you want
    # to change tclreadline's print behaviour
    # frequently with less typing.
    #
    # namespace import ::tclreadline::Print

    # go to tclrealdine's main loop.

    ::tclreadline::Loop
}


|
|







 







|







|





|


>
|


1
2
3
4
5
6
7
8
9
10
..
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
#!/bin/sh
# FILE: "/diska/home/joze/src/tclreadline/sample.tclshrc"
# LAST MODIFICATION: "Mon Aug 23 17:50:54 1999 (joze)"
# (C) 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# vim:set ft=tcl: \
exec tclsh "$0" "$@"


if {$tcl_interactive} {
................................................................................
    #         tclreadline::ls
    #     }
    # }

    # uncomment the following line to use
    # tclreadline's fancy ls proc.
    #
    # namespace import tclreadline::ls

    # tclreadline::Print is on (`yes') by default.
    # This mimics the command echoing like in the
    # non-readline interactive tclsh.
    # If you don't like this, uncomment the following
    # line.
    #
    # tclreadline::Print no

    # uncomment the folling line, if you want
    # to change tclreadline's print behaviour
    # frequently with less typing.
    #
    # namespace import tclreadline::Print

    # go to tclrealdine's main loop.
    #
    tclreadline::Loop
}

Modified tclreadlineSetup.tcl.in from [2a8fdfa53f] to [71baf77ef1].

1
2
3
4
5
6
7
8
9
10
...
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/usr/local/bin/tclsh
# FILE: "/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Mon Aug 23 00:54:01 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
................................................................................
            }
        }
    }
    return -code error "invalid command name \"$name\""
}

namespace eval tclreadline:: {
    namespace export Setup Glob Loop InitCmds InitTclCmds InitTkCmds Print
}

# get the longest common completion
# e.g. str == {tcl_version tclreadline_version tclreadline_library}
# --> [tclreadline::GetCommon ${str}] == "tcl"
#
proc tclreadline::GetCommon {str} {

|
|







 







|







1
2
3
4
5
6
7
8
9
10
...
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/usr/local/bin/tclsh
# FILE: "/diska/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Mon Aug 23 17:34:09 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
................................................................................
            }
        }
    }
    return -code error "invalid command name \"$name\""
}

namespace eval tclreadline:: {
    namespace export Setup Glob Loop InitCmds InitTclCmds InitTkCmds Print ls
}

# get the longest common completion
# e.g. str == {tcl_version tclreadline_version tclreadline_library}
# --> [tclreadline::GetCommon ${str}] == "tcl"
#
proc tclreadline::GetCommon {str} {