Hex Artifact Content
Not logged in

Artifact 2d822276ab6820ca861f27a13054f9cdb09e7c34:


0000: 23 20 2d 2a 2d 20 61 75 74 6f 63 6f 6e 66 20 2d  # -*- autoconf -
0010: 2a 2d 0a 23 20 46 49 4c 45 3a 20 22 2f 64 69 73  *-.# FILE: "/dis
0020: 6b 61 2f 68 6f 6d 65 2f 6a 6f 7a 65 2f 73 72 63  ka/home/joze/src
0030: 2f 74 63 6c 72 65 61 64 6c 69 6e 65 2f 63 6f 6e  /tclreadline/con
0040: 66 69 67 75 72 65 2e 69 6e 22 0a 23 20 4c 41 53  figure.in".# LAS
0050: 54 20 4d 4f 44 49 46 49 43 41 54 49 4f 4e 3a 20  T MODIFICATION: 
0060: 22 46 72 69 20 41 75 67 20 32 30 20 31 35 3a 33  "Fri Aug 20 15:3
0070: 35 3a 31 30 20 31 39 39 39 20 28 6a 6f 7a 65 29  5:10 1999 (joze)
0080: 22 0a 23 20 28 43 29 20 31 39 39 38 2c 20 31 39  ".# (C) 1998, 19
0090: 39 39 20 62 79 20 4a 6f 68 61 6e 6e 65 73 20 5a  99 by Johannes Z
00a0: 65 6c 6c 6e 65 72 2c 20 3c 6a 6f 68 61 6e 6e 65  ellner, <johanne
00b0: 73 40 7a 65 6c 6c 6e 65 72 2e 6f 72 67 3e 0a 23  s@zellner.org>.#
00c0: 20 24 49 64 24 0a 23 20 2d 2d 2d 0a 23 0a 23 20   $Id$.# ---.#.# 
00d0: 74 63 6c 72 65 61 64 6c 69 6e 65 20 2d 2d 20 67  tclreadline -- g
00e0: 6e 75 20 72 65 61 64 6c 69 6e 65 20 66 6f 72 20  nu readline for 
00f0: 74 63 6c 0a 23 20 43 6f 70 79 72 69 67 68 74 20  tcl.# Copyright 
0100: 28 43 29 20 31 39 39 39 20 20 4a 6f 68 61 6e 6e  (C) 1999  Johann
0110: 65 73 20 5a 65 6c 6c 6e 65 72 0a 23 0a 23 20 54  es Zellner.#.# T
0120: 68 69 73 20 70 72 6f 67 72 61 6d 20 69 73 20 66  his program is f
0130: 72 65 65 20 73 6f 66 74 77 61 72 65 3b 20 79 6f  ree software; yo
0140: 75 20 63 61 6e 20 72 65 64 69 73 74 72 69 62 75  u can redistribu
0150: 74 65 20 69 74 20 61 6e 64 2f 6f 72 0a 23 20 6d  te it and/or.# m
0160: 6f 64 69 66 79 20 69 74 20 75 6e 64 65 72 20 74  odify it under t
0170: 68 65 20 74 65 72 6d 73 20 6f 66 20 74 68 65 20  he terms of the 
0180: 47 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 62 6c  GNU General Publ
0190: 69 63 20 4c 69 63 65 6e 73 65 0a 23 20 61 73 20  ic License.# as 
01a0: 70 75 62 6c 69 73 68 65 64 20 62 79 20 74 68 65  published by the
01b0: 20 46 72 65 65 20 53 6f 66 74 77 61 72 65 20 46   Free Software F
01c0: 6f 75 6e 64 61 74 69 6f 6e 3b 20 65 69 74 68 65  oundation; eithe
01d0: 72 20 76 65 72 73 69 6f 6e 20 32 0a 23 20 6f 66  r version 2.# of
01e0: 20 74 68 65 20 4c 69 63 65 6e 73 65 2c 20 6f 72   the License, or
01f0: 20 28 61 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e   (at your option
0200: 29 20 61 6e 79 20 6c 61 74 65 72 20 76 65 72 73  ) any later vers
0210: 69 6f 6e 2e 0a 23 0a 23 20 54 68 69 73 20 70 72  ion..#.# This pr
0220: 6f 67 72 61 6d 20 69 73 20 64 69 73 74 72 69 62  ogram is distrib
0230: 75 74 65 64 20 69 6e 20 74 68 65 20 68 6f 70 65  uted in the hope
0240: 20 74 68 61 74 20 69 74 20 77 69 6c 6c 20 62 65   that it will be
0250: 20 75 73 65 66 75 6c 2c 0a 23 20 62 75 74 20 57   useful,.# but W
0260: 49 54 48 4f 55 54 20 41 4e 59 20 57 41 52 52 41  ITHOUT ANY WARRA
0270: 4e 54 59 3b 20 77 69 74 68 6f 75 74 20 65 76 65  NTY; without eve
0280: 6e 20 74 68 65 20 69 6d 70 6c 69 65 64 20 77 61  n the implied wa
0290: 72 72 61 6e 74 79 20 6f 66 0a 23 20 4d 45 52 43  rranty of.# MERC
02a0: 48 41 4e 54 41 42 49 4c 49 54 59 20 6f 72 20 46  HANTABILITY or F
02b0: 49 54 4e 45 53 53 20 46 4f 52 20 41 20 50 41 52  ITNESS FOR A PAR
02c0: 54 49 43 55 4c 41 52 20 50 55 52 50 4f 53 45 2e  TICULAR PURPOSE.
02d0: 20 20 53 65 65 20 74 68 65 0a 23 20 47 4e 55 20    See the.# GNU 
02e0: 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 4c  General Public L
02f0: 69 63 65 6e 73 65 20 66 6f 72 20 6d 6f 72 65 20  icense for more 
0300: 64 65 74 61 69 6c 73 2e 0a 23 0a 23 20 59 6f 75  details..#.# You
0310: 20 73 68 6f 75 6c 64 20 68 61 76 65 20 72 65 63   should have rec
0320: 65 69 76 65 64 20 61 20 63 6f 70 79 20 6f 66 20  eived a copy of 
0330: 74 68 65 20 47 4e 55 20 47 65 6e 65 72 61 6c 20  the GNU General 
0340: 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 0a 23  Public License.#
0350: 20 61 6c 6f 6e 67 20 77 69 74 68 20 74 68 69 73   along with this
0360: 20 70 72 6f 67 72 61 6d 3b 20 69 66 20 6e 6f 74   program; if not
0370: 2c 20 77 72 69 74 65 20 74 6f 20 74 68 65 20 46  , write to the F
0380: 72 65 65 20 53 6f 66 74 77 61 72 65 0a 23 20 46  ree Software.# F
0390: 6f 75 6e 64 61 74 69 6f 6e 2c 20 49 6e 63 2e 2c  oundation, Inc.,
03a0: 20 35 39 20 54 65 6d 70 6c 65 20 50 6c 61 63 65   59 Temple Place
03b0: 20 2d 20 53 75 69 74 65 20 33 33 30 2c 20 42 6f   - Suite 330, Bo
03c0: 73 74 6f 6e 2c 20 4d 41 20 20 30 32 31 31 31 2d  ston, MA  02111-
03d0: 31 33 30 37 2c 20 55 53 41 2e 0a 23 0a 23 20 6a  1307, USA..#.# j
03e0: 6f 68 61 6e 6e 65 73 40 7a 65 6c 6c 6e 65 72 2e  ohannes@zellner.
03f0: 6f 72 67 0a 23 20 68 74 74 70 3a 2f 2f 77 77 77  org.# http://www
0400: 2e 7a 65 6c 6c 6e 65 72 2e 6f 72 67 2f 74 63 6c  .zellner.org/tcl
0410: 72 65 61 64 6c 69 6e 65 2f 0a 23 0a 23 20 3d 3d  readline/.#.# ==
0420: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0430: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0440: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0450: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0460: 20 2a 2f 20 20 0a 0a 64 6e 6c 09 54 68 69 73 20   */  ..dnl.This 
0470: 66 69 6c 65 20 69 73 20 61 6e 20 69 6e 70 75 74  file is an input
0480: 20 66 69 6c 65 20 75 73 65 64 20 62 79 20 74 68   file used by th
0490: 65 20 47 4e 55 20 22 61 75 74 6f 63 6f 6e 66 22  e GNU "autoconf"
04a0: 20 70 72 6f 67 72 61 6d 20 74 6f 0a 64 6e 6c 09   program to.dnl.
04b0: 67 65 6e 65 72 61 74 65 20 74 68 65 20 66 69 6c  generate the fil
04c0: 65 20 22 63 6f 6e 66 69 67 75 72 65 22 2c 20 77  e "configure", w
04d0: 68 69 63 68 20 69 73 20 72 75 6e 20 64 75 72 69  hich is run duri
04e0: 6e 67 20 54 6b 20 69 6e 73 74 61 6c 6c 61 74 69  ng Tk installati
04f0: 6f 6e 0a 64 6e 6c 09 74 6f 20 63 6f 6e 66 69 67  on.dnl.to config
0500: 75 72 65 20 74 68 65 20 73 79 73 74 65 6d 20 66  ure the system f
0510: 6f 72 20 74 68 65 20 6c 6f 63 61 6c 20 65 6e 76  or the local env
0520: 69 72 6f 6e 6d 65 6e 74 2e 0a 0a 41 43 5f 52 45  ironment...AC_RE
0530: 56 49 53 49 4f 4e 28 24 52 65 76 69 73 69 6f 6e  VISION($Revision
0540: 24 29 0a 0a 41 43 5f 49 4e 49 54 28 74 63 6c 72  $)..AC_INIT(tclr
0550: 65 61 64 6c 69 6e 65 2e 63 29 0a 0a 54 43 4c 52  eadline.c)..TCLR
0560: 45 41 44 4c 49 4e 45 5f 4d 41 4a 4f 52 5f 56 45  EADLINE_MAJOR_VE
0570: 52 53 49 4f 4e 3d 30 0a 54 43 4c 52 45 41 44 4c  RSION=0.TCLREADL
0580: 49 4e 45 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f  INE_MINOR_VERSIO
0590: 4e 3d 38 0a 54 43 4c 52 45 41 44 4c 49 4e 45 5f  N=8.TCLREADLINE_
05a0: 56 45 52 53 49 4f 4e 3d 24 54 43 4c 52 45 41 44  VERSION=$TCLREAD
05b0: 4c 49 4e 45 5f 4d 41 4a 4f 52 5f 56 45 52 53 49  LINE_MAJOR_VERSI
05c0: 4f 4e 2e 24 54 43 4c 52 45 41 44 4c 49 4e 45 5f  ON.$TCLREADLINE_
05d0: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 0a 56 45  MINOR_VERSION.VE
05e0: 52 53 49 4f 4e 3d 24 54 43 4c 52 45 41 44 4c 49  RSION=$TCLREADLI
05f0: 4e 45 5f 56 45 52 53 49 4f 4e 0a 0a 0a 41 43 5f  NE_VERSION...AC_
0600: 50 52 45 52 45 51 28 32 2e 31 33 29 0a 41 43 5f  PREREQ(2.13).AC_
0610: 43 4f 4e 46 49 47 5f 41 55 58 5f 44 49 52 28 2e  CONFIG_AUX_DIR(.
0620: 2f 61 75 78 29 0a 41 43 5f 43 41 4e 4f 4e 49 43  /aux).AC_CANONIC
0630: 41 4c 5f 48 4f 53 54 0a 0a 0a 54 43 4c 52 45 41  AL_HOST...TCLREA
0640: 44 4c 49 4e 45 5f 4c 50 41 54 48 3d 60 65 63 68  DLINE_LPATH=`ech
0650: 6f 20 24 4c 44 5f 4c 49 42 52 41 52 59 5f 50 41  o $LD_LIBRARY_PA
0660: 54 48 20 24 4c 44 5f 52 55 4e 5f 50 41 54 48 20  TH $LD_RUN_PATH 
0670: 24 4c 50 41 54 48 20 7c 20 73 65 64 20 27 73 2f  $LPATH | sed 's/
0680: 3a 2f 20 2f 67 27 60 0a 54 43 4c 52 45 41 44 4c  :/ /g'`.TCLREADL
0690: 49 4e 45 5f 4c 50 41 54 48 3d 22 24 54 43 4c 52  INE_LPATH="$TCLR
06a0: 45 41 44 4c 49 4e 45 5f 4c 50 41 54 48 20 2f 6c  EADLINE_LPATH /l
06b0: 69 62 20 2f 75 73 72 2f 6c 69 62 20 2f 75 73 72  ib /usr/lib /usr
06c0: 2f 6c 6f 63 61 6c 2f 6c 69 62 22 0a 0a 0a 23 2d  /local/lib"...#-
06d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
06e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
06f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0700: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0710: 2d 2d 2d 0a 23 20 20 20 53 65 65 20 69 66 20 74  ---.#   See if t
0720: 68 65 72 65 20 77 61 73 20 61 20 63 6f 6d 6d 61  here was a comma
0730: 6e 64 2d 6c 69 6e 65 20 6f 70 74 69 6f 6e 20 66  nd-line option f
0740: 6f 72 20 77 68 65 72 65 20 54 63 6c 20 69 73 3b  or where Tcl is;
0750: 20 20 69 66 0a 23 20 20 20 6e 6f 74 2c 20 73 65    if.#   not, se
0760: 61 72 63 68 20 66 6f 72 20 54 63 6c 2e 0a 23 2d  arch for Tcl..#-
0770: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0780: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0790: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
07a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
07b0: 2d 2d 2d 0a 0a 41 43 5f 41 52 47 5f 57 49 54 48  ---..AC_ARG_WITH
07c0: 28 0a 20 20 20 20 74 63 6c 2c 0a 20 20 20 20 5b  (.    tcl,.    [
07d0: 20 20 2d 2d 77 69 74 68 2d 74 63 6c 3d 44 49 52    --with-tcl=DIR
07e0: 20 20 20 20 20 20 20 20 20 20 75 73 65 20 54 63            use Tc
07f0: 6c 20 38 2e 78 20 62 69 6e 61 72 69 65 73 20 66  l 8.x binaries f
0800: 72 6f 6d 20 44 49 52 5d 2c 0a 20 20 20 20 74 63  rom DIR],.    tc
0810: 6c 5f 73 65 61 72 63 68 3d 24 77 69 74 68 76 61  l_search=$withva
0820: 6c 2c 0a 20 20 20 20 74 63 6c 5f 73 65 61 72 63  l,.    tcl_searc
0830: 68 3d 22 22 0a 29 0a 0a 41 43 5f 4d 53 47 5f 43  h="".)..AC_MSG_C
0840: 48 45 43 4b 49 4e 47 28 5b 77 68 69 63 68 20 74  HECKING([which t
0850: 63 6c 43 6f 6e 66 69 67 2e 73 68 20 74 6f 20 75  clConfig.sh to u
0860: 73 65 5d 29 0a 54 43 4c 5f 4c 49 42 5f 44 49 52  se]).TCL_LIB_DIR
0870: 3d 22 22 0a 66 6f 72 20 64 69 72 20 69 6e 20 24  ="".for dir in $
0880: 74 63 6c 5f 73 65 61 72 63 68 20 2f 75 73 72 2f  tcl_search /usr/
0890: 6c 69 62 20 2f 75 73 72 2f 6c 6f 63 61 6c 2f 6c  lib /usr/local/l
08a0: 69 62 20 24 65 78 65 63 5f 70 72 65 66 69 78 2f  ib $exec_prefix/
08b0: 6c 69 62 20 2f 75 73 72 2f 6c 6f 63 61 6c 2f 6c  lib /usr/local/l
08c0: 69 62 2f 75 6e 69 78 3b 20 64 6f 0a 20 20 20 20  ib/unix; do.    
08d0: 69 66 20 74 65 73 74 20 2d 72 20 24 64 69 72 2f  if test -r $dir/
08e0: 74 63 6c 43 6f 6e 66 69 67 2e 73 68 3b 20 74 68  tclConfig.sh; th
08f0: 65 6e 0a 20 20 20 20 20 20 20 20 54 43 4c 5f 4c  en.        TCL_L
0900: 49 42 5f 44 49 52 3d 24 64 69 72 0a 20 20 20 20  IB_DIR=$dir.    
0910: 20 20 20 20 62 72 65 61 6b 0a 20 20 20 20 66 69      break.    fi
0920: 0a 64 6f 6e 65 0a 0a 69 66 20 74 65 73 74 20 2d  .done..if test -
0930: 7a 20 22 24 54 43 4c 5f 4c 49 42 5f 44 49 52 22  z "$TCL_LIB_DIR"
0940: 3b 20 74 68 65 6e 0a 20 20 20 20 41 43 5f 4d 53  ; then.    AC_MS
0950: 47 5f 45 52 52 4f 52 28 43 61 6e 27 74 20 66 69  G_ERROR(Can't fi
0960: 6e 64 20 54 63 6c 20 6c 69 62 72 61 72 69 65 73  nd Tcl libraries
0970: 2e 20 20 55 73 65 20 2d 2d 77 69 74 68 2d 74 63  .  Use --with-tc
0980: 6c 20 74 6f 20 73 70 65 63 69 66 79 20 74 68 65  l to specify the
0990: 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61   directory conta
09a0: 69 6e 69 6e 67 20 74 63 6c 43 6f 6e 66 69 67 2e  ining tclConfig.
09b0: 73 68 20 6f 6e 20 79 6f 75 72 20 73 79 73 74 65  sh on your syste
09c0: 6d 2e 29 0a 65 6c 73 65 0a 20 20 20 20 41 43 5f  m.).else.    AC_
09d0: 4d 53 47 5f 52 45 53 55 4c 54 28 24 54 43 4c 5f  MSG_RESULT($TCL_
09e0: 4c 49 42 5f 44 49 52 2f 74 63 6c 43 6f 6e 66 69  LIB_DIR/tclConfi
09f0: 67 2e 73 68 29 0a 66 69 0a 0a 23 2d 2d 2d 2d 2d  g.sh).fi..#-----
0a00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0a10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0a20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0a30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
0a40: 23 20 20 20 52 65 61 64 20 69 6e 20 63 6f 6e 66  #   Read in conf
0a50: 69 67 75 72 61 74 69 6f 6e 20 69 6e 66 6f 72 6d  iguration inform
0a60: 61 74 69 6f 6e 20 67 65 6e 65 72 61 74 65 64 20  ation generated 
0a70: 62 79 20 54 63 6c 20 66 6f 72 20 73 68 61 72 65  by Tcl for share
0a80: 64 0a 23 20 20 20 6c 69 62 72 61 72 69 65 73 2c  d.#   libraries,
0a90: 20 61 6e 64 20 61 72 72 61 6e 67 65 20 66 6f 72   and arrange for
0aa0: 20 69 74 20 74 6f 20 62 65 20 73 75 62 73 74 69   it to be substi
0ab0: 74 75 74 65 64 20 69 6e 74 6f 20 6f 75 72 0a 23  tuted into our.#
0ac0: 20 20 20 4d 61 6b 65 66 69 6c 65 2e 0a 23 2d 2d     Makefile..#--
0ad0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0ae0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0af0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0b00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0b10: 2d 2d 0a 0a 66 69 6c 65 3d 24 54 43 4c 5f 4c 49  --..file=$TCL_LI
0b20: 42 5f 44 49 52 2f 74 63 6c 43 6f 6e 66 69 67 2e  B_DIR/tclConfig.
0b30: 73 68 0a 2e 20 24 66 69 6c 65 0a 0a 53 48 4c 49  sh.. $file..SHLI
0b40: 42 5f 43 46 4c 41 47 53 3d 24 54 43 4c 5f 53 48  B_CFLAGS=$TCL_SH
0b50: 4c 49 42 5f 43 46 4c 41 47 53 0a 53 48 4c 49 42  LIB_CFLAGS.SHLIB
0b60: 5f 4c 44 3d 24 54 43 4c 5f 53 48 4c 49 42 5f 4c  _LD=$TCL_SHLIB_L
0b70: 44 0a 69 66 20 74 65 73 74 20 24 54 43 4c 5f 53  D.if test $TCL_S
0b80: 48 4c 49 42 5f 53 55 46 46 49 58 20 3d 20 22 22  HLIB_SUFFIX = ""
0b90: 3b 20 74 68 65 6e 0a 20 20 20 20 41 43 5f 4d 53  ; then.    AC_MS
0ba0: 47 5f 45 52 52 4f 52 28 54 43 4c 5f 53 48 4c 49  G_ERROR(TCL_SHLI
0bb0: 42 5f 53 55 46 46 49 58 20 6e 6f 74 20 64 65 66  B_SUFFIX not def
0bc0: 69 6e 65 64 20 2d 2d 20 73 68 6f 75 6c 64 20 62  ined -- should b
0bd0: 65 20 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65  e something like
0be0: 20 2e 73 6f 20 6f 72 20 2e 73 6c 20 6f 6e 20 75   .so or .sl on u
0bf0: 6e 69 78 2e 29 0a 65 6c 73 65 0a 20 20 20 20 53  nix.).else.    S
0c00: 48 4c 49 42 5f 53 55 46 46 49 58 3d 24 54 43 4c  HLIB_SUFFIX=$TCL
0c10: 5f 53 48 4c 49 42 5f 53 55 46 46 49 58 0a 66 69  _SHLIB_SUFFIX.fi
0c20: 0a 44 4c 5f 4c 49 42 53 3d 24 54 43 4c 5f 44 4c  .DL_LIBS=$TCL_DL
0c30: 5f 4c 49 42 53 0a 4c 44 5f 46 4c 41 47 53 3d 24  _LIBS.LD_FLAGS=$
0c40: 54 43 4c 5f 4c 44 5f 46 4c 41 47 53 0a 53 48 4c  TCL_LD_FLAGS.SHL
0c50: 49 42 5f 4c 44 5f 4c 49 42 53 3d 24 54 43 4c 5f  IB_LD_LIBS=$TCL_
0c60: 53 48 4c 49 42 5f 4c 44 5f 4c 49 42 53 0a 54 43  SHLIB_LD_LIBS.TC
0c70: 4c 52 45 41 44 4c 49 4e 45 5f 50 41 43 4b 41 47  LREADLINE_PACKAG
0c80: 45 5f 50 41 54 48 3d 24 54 43 4c 5f 50 41 43 4b  E_PATH=$TCL_PACK
0c90: 41 47 45 5f 50 41 54 48 0a 0a 0a 23 2d 2d 2d 2d  AGE_PATH...#----
0ca0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0cb0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0cc0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0cd0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0ce0: 0a 23 20 20 20 43 68 65 63 6b 2c 20 69 66 20 74  .#   Check, if t
0cf0: 63 6c 5f 76 65 72 73 69 6f 6e 20 69 73 20 3e 20  cl_version is > 
0d00: 38 2e 30 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  8.0.#-----------
0d10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0d20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0d30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0d40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 69 66 20 74 65 73  ---------.if tes
0d50: 74 20 24 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52  t $TCL_MAJOR_VER
0d60: 53 49 4f 4e 20 2d 6c 74 20 38 3b 20 74 68 65 6e  SION -lt 8; then
0d70: 0a 20 20 20 20 41 43 5f 4d 53 47 5f 45 52 52 4f  .    AC_MSG_ERRO
0d80: 52 28 6e 65 65 64 20 74 63 6c 20 38 2e 30 20 6f  R(need tcl 8.0 o
0d90: 72 20 68 69 67 68 65 72 2e 29 0a 66 69 0a 0a 0a  r higher.).fi...
0da0: 0a 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  .# -------------
0db0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0dc0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0dd0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0de0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 53  ----------.#   S
0df0: 65 74 20 75 70 20 61 20 6e 65 77 20 64 65 66 61  et up a new defa
0e00: 75 6c 74 20 2d 2d 70 72 65 66 69 78 2e 0a 23 20  ult --prefix..# 
0e10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0e20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0e30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0e40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0e50: 2d 2d 2d 2d 2d 2d 2d 0a 0a 23 20 41 43 5f 50 52  -------..# AC_PR
0e60: 45 46 49 58 5f 44 45 46 41 55 4c 54 28 2f 75 73  EFIX_DEFAULT(/us
0e70: 72 2f 6c 6f 63 61 6c 29 0a 0a 69 66 20 74 65 73  r/local)..if tes
0e80: 74 20 22 24 7b 70 72 65 66 69 78 7d 22 20 3d 20  t "${prefix}" = 
0e90: 22 4e 4f 4e 45 22 3b 20 74 68 65 6e 0a 20 20 20  "NONE"; then.   
0ea0: 20 70 72 65 66 69 78 3d 24 54 43 4c 5f 50 52 45   prefix=$TCL_PRE
0eb0: 46 49 58 0a 66 69 0a 69 66 20 74 65 73 74 20 22  FIX.fi.if test "
0ec0: 24 7b 65 78 65 63 5f 70 72 65 66 69 78 7d 22 20  ${exec_prefix}" 
0ed0: 3d 20 22 4e 4f 4e 45 22 3b 20 74 68 65 6e 0a 20  = "NONE"; then. 
0ee0: 20 20 20 65 78 65 63 5f 70 72 65 66 69 78 3d 24     exec_prefix=$
0ef0: 54 43 4c 5f 45 58 45 43 5f 50 52 45 46 49 58 0a  TCL_EXEC_PREFIX.
0f00: 65 6c 73 65 0a 20 20 20 20 54 43 4c 52 45 41 44  else.    TCLREAD
0f10: 4c 49 4e 45 5f 50 41 43 4b 41 47 45 5f 50 41 54  LINE_PACKAGE_PAT
0f20: 48 3d 24 7b 65 78 65 63 5f 70 72 65 66 69 78 7d  H=${exec_prefix}
0f30: 2f 6c 69 62 0a 66 69 0a 0a 54 43 4c 52 45 41 44  /lib.fi..TCLREAD
0f40: 4c 49 4e 45 5f 4c 49 42 52 41 52 59 3d 24 54 43  LINE_LIBRARY=$TC
0f50: 4c 52 45 41 44 4c 49 4e 45 5f 50 41 43 4b 41 47  LREADLINE_PACKAG
0f60: 45 5f 50 41 54 48 2f 74 63 6c 72 65 61 64 6c 69  E_PATH/tclreadli
0f70: 6e 65 24 54 43 4c 52 45 41 44 4c 49 4e 45 5f 56  ne$TCLREADLINE_V
0f80: 45 52 53 49 4f 4e 0a 0a 0a 23 20 2d 2d 2d 2d 2d  ERSION...# -----
0f90: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0fa0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0fb0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0fc0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0fd0: 2d 2d 0a 23 20 20 20 43 68 65 63 6b 20 66 6f 72  --.#   Check for
0fe0: 20 73 6f 6d 65 20 70 72 6f 67 72 61 6d 73 20 68   some programs h
0ff0: 65 72 65 2e 0a 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d  ere..# ---------
1000: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1010: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1020: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1030: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a  --------------..
1040: 41 43 5f 50 52 4f 47 5f 49 4e 53 54 41 4c 4c 0a  AC_PROG_INSTALL.
1050: 41 43 5f 50 52 4f 47 5f 52 41 4e 4c 49 42 0a 41  AC_PROG_RANLIB.A
1060: 43 5f 50 52 4f 47 5f 4c 4e 5f 53 0a 0a 0a 0a 23  C_PROG_LN_S....#
1070: 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ---------------
1080: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1090: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
10a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
10b0: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 50 72 65  --------.#   Pre
10c0: 66 65 72 20 74 68 65 20 63 6f 6d 70 69 6c 65 72  fer the compiler
10d0: 2c 20 77 68 69 63 68 20 77 61 73 20 75 73 65 64  , which was used
10e0: 0a 23 20 20 20 74 6f 20 62 75 69 6c 64 20 74 63  .#   to build tc
10f0: 6c 2e 0a 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  l..# -----------
1100: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1110: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1120: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1130: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 0a 41  ------------...A
1140: 43 5f 41 52 47 5f 45 4e 41 42 4c 45 28 67 63 63  C_ARG_ENABLE(gcc
1150: 2c 20 5b 20 20 2d 2d 65 6e 61 62 6c 65 2d 67 63  , [  --enable-gc
1160: 63 20 20 20 20 20 20 20 20 20 20 20 20 61 6c 6c  c            all
1170: 6f 77 20 75 73 65 20 6f 66 20 67 63 63 20 69 66  ow use of gcc if
1180: 20 61 76 61 69 6c 61 62 6c 65 5d 2c 0a 20 20 20   available],.   
1190: 20 5b 67 63 63 5f 6f 6b 3d 24 65 6e 61 62 6c 65   [gcc_ok=$enable
11a0: 76 61 6c 5d 2c 20 5b 67 63 63 5f 6f 6b 3d 6e 6f  val], [gcc_ok=no
11b0: 5d 29 0a 69 66 20 74 65 73 74 20 22 24 67 63 63  ]).if test "$gcc
11c0: 5f 6f 6b 22 20 3d 20 22 79 65 73 22 3b 20 74 68  _ok" = "yes"; th
11d0: 65 6e 0a 20 20 20 20 41 43 5f 50 52 4f 47 5f 43  en.    AC_PROG_C
11e0: 43 0a 65 6c 73 65 0a 20 20 20 20 43 43 3d 24 54  C.else.    CC=$T
11f0: 43 4c 5f 43 43 0a 20 20 20 20 41 43 5f 53 55 42  CL_CC.    AC_SUB
1200: 53 54 28 43 43 29 0a 66 69 0a 0a 0a 0a 0a 23 20  ST(CC).fi.....# 
1210: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1220: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1230: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1240: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1250: 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 63 68 65 63  -------.#   chec
1260: 6b 69 6e 67 20 66 6f 72 20 74 68 65 20 70 72 65  king for the pre
1270: 70 72 6f 63 65 73 73 6f 72 2e 0a 23 20 20 20 46  processor..#   F
1280: 49 58 4d 45 3a 20 64 6f 20 77 65 20 6e 65 65 64  IXME: do we need
1290: 20 74 68 69 73 20 3f 0a 23 20 2d 2d 2d 2d 2d 2d   this ?.# ------
12a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
12b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
12c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
12d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
12e0: 2d 0a 0a 41 43 5f 50 52 4f 47 5f 43 50 50 0a 0a  -..AC_PROG_CPP..
12f0: 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ..#-------------
1300: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1310: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1320: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1330: 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 49 66 20 74  -------.#   If t
1340: 68 69 73 20 69 73 20 67 63 63 2c 20 61 64 64 20  his is gcc, add 
1350: 73 6f 6d 65 20 65 78 74 72 61 20 63 6f 6d 70 69  some extra compi
1360: 6c 65 20 66 6c 61 67 73 2e 0a 23 2d 2d 2d 2d 2d  le flags..#-----
1370: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1380: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1390: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
13b0: 0a 41 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47  .AC_MSG_CHECKING
13c0: 28 5b 77 68 65 74 68 65 72 20 43 20 63 6f 6d 70  ([whether C comp
13d0: 69 6c 65 72 20 69 73 20 67 63 63 5d 29 0a 41 43  iler is gcc]).AC
13e0: 5f 43 41 43 48 45 5f 56 41 4c 28 74 63 6c 72 65  _CACHE_VAL(tclre
13f0: 61 64 6c 69 6e 65 5f 63 76 5f 70 72 6f 67 5f 67  adline_cv_prog_g
1400: 63 63 2c 0a 20 20 20 20 41 43 5f 45 47 52 45 50  cc,.    AC_EGREP
1410: 5f 43 50 50 28 5f 63 63 5f 69 73 5f 67 63 63 5f  _CPP(_cc_is_gcc_
1420: 2c 20 5b 0a 23 69 66 64 65 66 20 5f 5f 47 4e 55  , [.#ifdef __GNU
1430: 43 5f 5f 0a 5f 63 63 5f 69 73 5f 67 63 63 5f 0a  C__._cc_is_gcc_.
1440: 23 65 6e 64 69 66 0a 5d 2c 20 20 20 20 20 20 5b  #endif.],      [
1450: 74 63 6c 72 65 61 64 6c 69 6e 65 5f 63 76 5f 70  tclreadline_cv_p
1460: 72 6f 67 5f 67 63 63 3d 79 65 73 5d 2c 20 5b 74  rog_gcc=yes], [t
1470: 63 6c 72 65 61 64 6c 69 6e 65 5f 63 76 5f 70 72  clreadline_cv_pr
1480: 6f 67 5f 67 63 63 3d 6e 6f 5d 29 29 0a 41 43 5f  og_gcc=no])).AC_
1490: 4d 53 47 5f 52 45 53 55 4c 54 28 5b 24 74 63 6c  MSG_RESULT([$tcl
14a0: 72 65 61 64 6c 69 6e 65 5f 63 76 5f 70 72 6f 67  readline_cv_prog
14b0: 5f 67 63 63 5d 29 0a 0a 69 66 20 74 65 73 74 20  _gcc])..if test 
14c0: 2d 7a 20 22 24 43 46 4c 41 47 53 22 20 3b 20 74  -z "$CFLAGS" ; t
14d0: 68 65 6e 0a 20 20 20 20 43 46 4c 41 47 53 3d 24  hen.    CFLAGS=$
14e0: 54 43 4c 5f 43 46 4c 41 47 53 5f 4f 50 54 49 4d  TCL_CFLAGS_OPTIM
14f0: 49 5a 45 0a 66 69 0a 69 66 20 74 65 73 74 20 22  IZE.fi.if test "
1500: 24 74 63 6c 72 65 61 64 6c 69 6e 65 5f 63 76 5f  $tclreadline_cv_
1510: 70 72 6f 67 5f 67 63 63 22 20 3d 20 22 79 65 73  prog_gcc" = "yes
1520: 22 20 3b 20 74 68 65 6e 0a 20 20 20 20 43 46 4c  " ; then.    CFL
1530: 41 47 53 3d 22 24 43 46 4c 41 47 53 20 2d 57 73  AGS="$CFLAGS -Ws
1540: 68 61 64 6f 77 20 2d 57 74 72 61 64 69 74 69 6f  hadow -Wtraditio
1550: 6e 61 6c 20 2d 57 61 6c 6c 22 0a 66 69 0a 0a 41  nal -Wall".fi..A
1560: 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b  C_MSG_CHECKING([
1570: 64 65 66 61 75 6c 74 20 63 6f 6d 70 69 6c 65 72  default compiler
1580: 20 66 6c 61 67 73 5d 29 0a 41 43 5f 41 52 47 5f   flags]).AC_ARG_
1590: 57 49 54 48 28 63 66 6c 61 67 73 2c 20 5b 20 20  WITH(cflags, [  
15a0: 2d 2d 77 69 74 68 2d 63 66 6c 61 67 73 3d 46 4c  --with-cflags=FL
15b0: 41 47 53 20 20 20 20 20 73 65 74 20 63 6f 6d 70  AGS     set comp
15c0: 69 6c 65 72 20 66 6c 61 67 73 20 74 6f 20 46 4c  iler flags to FL
15d0: 41 47 53 5d 2c 0a 20 20 20 20 5b 43 46 4c 41 47  AGS],.    [CFLAG
15e0: 53 3d 22 24 77 69 74 68 5f 63 66 6c 61 67 73 22  S="$with_cflags"
15f0: 5d 29 0a 0a 41 43 5f 4d 53 47 5f 52 45 53 55 4c  ])..AC_MSG_RESUL
1600: 54 28 5b 24 43 46 4c 41 47 53 5d 29 0a 0a 69 66  T([$CFLAGS])..if
1610: 20 74 65 73 74 20 22 24 54 43 4c 5f 43 43 22 20   test "$TCL_CC" 
1620: 21 3d 20 22 24 43 43 22 20 3b 20 74 68 65 6e 0a  != "$CC" ; then.
1630: 20 20 20 20 65 63 68 6f 20 22 22 0a 20 20 20 20      echo "".    
1640: 65 63 68 6f 20 22 57 41 52 4e 49 4e 47 3a 20 20  echo "WARNING:  
1650: 43 6f 6d 70 69 6c 65 72 20 69 73 20 24 43 43 20  Compiler is $CC 
1660: 62 75 74 20 54 63 6c 20 77 61 73 20 63 6f 6d 70  but Tcl was comp
1670: 69 6c 65 64 20 77 69 74 68 20 24 54 43 4c 5f 43  iled with $TCL_C
1680: 43 22 0a 20 20 20 20 65 63 68 6f 20 22 22 0a 66  C".    echo "".f
1690: 69 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  i..#------------
16a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
16b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
16c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
16d0: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 54 68 65  --------.#   The
16e0: 20 73 74 61 74 65 6d 65 6e 74 73 20 62 65 6c 6f   statements belo
16f0: 77 20 64 65 66 69 6e 65 20 61 20 63 6f 6c 6c 65  w define a colle
1700: 63 74 69 6f 6e 20 6f 66 20 73 79 6d 62 6f 6c 73  ction of symbols
1710: 20 72 65 6c 61 74 65 64 20 74 6f 0a 23 20 20 20   related to.#   
1720: 62 75 69 6c 64 69 6e 67 20 6c 69 62 74 63 6c 72  building libtclr
1730: 65 61 64 6c 69 6e 65 20 61 73 20 61 20 73 68 61  eadline as a sha
1740: 72 65 64 20 6c 69 62 72 61 72 79 20 69 6e 73 74  red library inst
1750: 65 61 64 20 6f 66 20 61 20 73 74 61 74 69 63 20  ead of a static 
1760: 6c 69 62 72 61 72 79 2e 0a 23 20 20 20 28 73 74  library..#   (st
1770: 61 74 69 63 20 69 73 20 6e 6f 74 20 69 6d 70 6c  atic is not impl
1780: 65 6d 65 6e 74 65 64 20 79 65 74 20 61 6e 79 77  emented yet anyw
1790: 61 79 29 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ay)..#----------
17a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
17b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
17c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
17d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f 41  ----------..AC_A
17e0: 52 47 5f 45 4e 41 42 4c 45 28 73 68 61 72 65 64  RG_ENABLE(shared
17f0: 2c 0a 20 20 20 20 5b 20 20 2d 2d 64 69 73 61 62  ,.    [  --disab
1800: 6c 65 2d 73 68 61 72 65 64 20 20 20 20 20 20 20  le-shared       
1810: 20 64 6f 6e 27 74 20 62 75 69 6c 64 20 6c 69 62   don't build lib
1820: 74 63 6c 72 65 61 64 6c 69 6e 65 20 61 73 20 61  tclreadline as a
1830: 20 73 68 61 72 65 64 20 6c 69 62 72 61 72 79 0a   shared library.
1840: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
1850: 20 20 20 20 20 20 20 20 20 20 28 6e 6f 74 20 69            (not i
1860: 6d 70 6c 65 6d 65 6e 74 65 64 20 2d 2d 20 70 72  mplemented -- pr
1870: 6f 62 61 62 6c 79 20 6e 65 76 65 72 29 2e 5d 2c  obably never).],
1880: 0a 20 20 20 20 5b 6f 6b 3d 24 65 6e 61 62 6c 65  .    [ok=$enable
1890: 76 61 6c 5d 2c 20 5b 6f 6b 3d 79 65 73 5d 29 0a  val], [ok=yes]).
18a0: 69 66 20 74 65 73 74 20 22 24 6f 6b 22 20 3d 20  if test "$ok" = 
18b0: 22 79 65 73 22 3b 20 74 68 65 6e 0a 20 20 20 20  "yes"; then.    
18c0: 69 66 20 74 65 73 74 20 24 7b 54 43 4c 5f 53 48  if test ${TCL_SH
18d0: 41 52 45 44 5f 42 55 49 4c 44 7d 20 3d 20 30 3b  ARED_BUILD} = 0;
18e0: 20 74 68 65 6e 0a 20 20 20 20 20 20 20 20 41 43   then.        AC
18f0: 5f 4d 53 47 5f 45 52 52 4f 52 28 54 63 6c 20 77  _MSG_ERROR(Tcl w
1900: 61 73 20 6e 6f 74 20 62 75 69 6c 74 20 77 69 74  as not built wit
1910: 68 20 2d 2d 65 6e 61 62 6c 65 2d 73 68 61 72 65  h --enable-share
1920: 64 2c 20 73 6f 20 79 6f 75 20 63 61 6e 27 74 20  d, so you can't 
1930: 75 73 65 20 73 68 61 72 65 64 20 6c 69 62 72 61  use shared libra
1940: 72 69 65 73 2e 29 0a 20 20 20 20 66 69 0a 20 20  ries.).    fi.  
1950: 20 20 53 48 4c 49 42 5f 43 46 4c 41 47 53 3d 22    SHLIB_CFLAGS="
1960: 24 7b 53 48 4c 49 42 5f 43 46 4c 41 47 53 7d 22  ${SHLIB_CFLAGS}"
1970: 0a 20 20 20 20 65 76 61 6c 20 22 54 43 4c 52 45  .    eval "TCLRE
1980: 41 44 4c 49 4e 45 5f 4c 49 42 5f 46 49 4c 45 3d  ADLINE_LIB_FILE=
1990: 6c 69 62 74 63 6c 72 65 61 64 6c 69 6e 65 24 7b  libtclreadline${
19a0: 56 45 52 53 49 4f 4e 7d 24 7b 53 48 4c 49 42 5f  VERSION}${SHLIB_
19b0: 53 55 46 46 49 58 7d 22 0a 20 20 20 20 54 43 4c  SUFFIX}".    TCL
19c0: 52 45 41 44 4c 49 4e 45 5f 50 4b 47 5f 46 49 4c  READLINE_PKG_FIL
19d0: 45 3d 22 5b 5b 66 69 6c 65 20 6a 6f 69 6e 20 5b  E="[[file join [
19e0: 66 69 6c 65 20 64 69 72 6e 61 6d 65 20 5c 24 64  file dirname \$d
19f0: 69 72 5d 20 24 7b 54 43 4c 52 45 41 44 4c 49 4e  ir] ${TCLREADLIN
1a00: 45 5f 4c 49 42 5f 46 49 4c 45 7d 5d 5d 22 0a 20  E_LIB_FILE}]]". 
1a10: 20 20 20 4d 41 4b 45 5f 4c 49 42 3d 22 5c 24 28     MAKE_LIB="\$(
1a20: 53 48 4c 49 42 5f 4c 44 29 20 2d 6f 20 24 7b 54  SHLIB_LD) -o ${T
1a30: 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 46  CLREADLINE_LIB_F
1a40: 49 4c 45 7d 20 5c 24 28 4f 42 4a 53 29 20 24 7b  ILE} \$(OBJS) ${
1a50: 53 48 4c 49 42 5f 4c 44 5f 4c 49 42 53 7d 22 0a  SHLIB_LD_LIBS}".
1a60: 20 20 20 20 52 41 4e 4c 49 42 3d 22 3a 22 0a 65      RANLIB=":".e
1a70: 6c 73 65 0a 20 20 20 20 41 43 5f 4d 53 47 5f 45  lse.    AC_MSG_E
1a80: 52 52 4f 52 28 6e 6f 6e 2d 73 68 61 72 65 64 20  RROR(non-shared 
1a90: 6e 6f 74 20 69 6d 70 6c 65 6d 65 6e 74 65 64 20  not implemented 
1aa0: 79 65 74 2e 20 28 70 72 6f 62 61 62 6c 79 20 6e  yet. (probably n
1ab0: 65 76 65 72 29 29 0a 20 20 20 20 53 48 4c 49 42  ever)).    SHLIB
1ac0: 5f 43 46 4c 41 47 53 3d 22 22 0a 20 20 20 20 65  _CFLAGS="".    e
1ad0: 76 61 6c 20 22 54 43 4c 52 45 41 44 4c 49 4e 45  val "TCLREADLINE
1ae0: 5f 4c 49 42 5f 46 49 4c 45 3d 6c 69 62 74 63 6c  _LIB_FILE=libtcl
1af0: 72 65 61 64 6c 69 6e 65 24 7b 56 45 52 53 49 4f  readline${VERSIO
1b00: 4e 7d 2e 61 22 0a 20 20 20 20 54 43 4c 52 45 41  N}.a".    TCLREA
1b10: 44 4c 49 4e 45 5f 50 4b 47 5f 46 49 4c 45 3d 22  DLINE_PKG_FILE="
1b20: 22 0a 20 20 20 20 4d 41 4b 45 5f 4c 49 42 3d 22  ".    MAKE_LIB="
1b30: 61 72 20 63 72 20 24 7b 54 43 4c 52 45 41 44 4c  ar cr ${TCLREADL
1b40: 49 4e 45 5f 4c 49 42 5f 46 49 4c 45 7d 20 5c 24  INE_LIB_FILE} \$
1b50: 7b 4f 42 4a 53 7d 22 0a 66 69 0a 0a 23 20 4e 6f  {OBJS}".fi..# No
1b60: 74 65 3a 20 20 69 6e 20 74 68 65 20 66 6f 6c 6c  te:  in the foll
1b70: 6f 77 69 6e 67 20 76 61 72 69 61 62 6c 65 2c 20  owing variable, 
1b80: 69 74 27 73 20 69 6d 70 6f 72 74 61 6e 74 20 74  it's important t
1b90: 6f 20 75 73 65 20 74 68 65 20 61 62 73 6f 6c 75  o use the absolu
1ba0: 74 65 0a 23 20 70 61 74 68 20 6e 61 6d 65 20 6f  te.# path name o
1bb0: 66 20 74 68 65 20 54 63 6c 20 64 69 72 65 63 74  f the Tcl direct
1bc0: 6f 72 79 20 72 61 74 68 65 72 20 74 68 61 6e 20  ory rather than 
1bd0: 22 2e 2e 22 3a 20 20 74 68 69 73 20 69 73 20 62  "..":  this is b
1be0: 65 63 61 75 73 65 0a 23 20 41 49 58 20 72 65 6d  ecause.# AIX rem
1bf0: 65 6d 62 65 72 73 20 74 68 69 73 20 70 61 74 68  embers this path
1c00: 20 61 6e 64 20 77 69 6c 6c 20 61 74 74 65 6d 70   and will attemp
1c10: 74 20 74 6f 20 75 73 65 20 69 74 20 61 74 20 72  t to use it at r
1c20: 75 6e 2d 74 69 6d 65 20 74 6f 20 6c 6f 6f 6b 0a  un-time to look.
1c30: 23 20 75 70 20 74 68 65 20 54 63 6c 20 6c 69 62  # up the Tcl lib
1c40: 72 61 72 79 2e 0a 0a 69 66 20 74 65 73 74 20 22  rary...if test "
1c50: 24 7b 54 43 4c 5f 4c 49 42 5f 56 45 52 53 49 4f  ${TCL_LIB_VERSIO
1c60: 4e 53 5f 4f 4b 7d 22 20 3d 20 22 6f 6b 22 3b 20  NS_OK}" = "ok"; 
1c70: 74 68 65 6e 0a 20 20 20 20 54 43 4c 52 45 41 44  then.    TCLREAD
1c80: 4c 49 4e 45 5f 42 55 49 4c 44 5f 4c 49 42 5f 53  LINE_BUILD_LIB_S
1c90: 50 45 43 3d 22 2d 4c 60 70 77 64 60 20 2d 6c 74  PEC="-L`pwd` -lt
1ca0: 63 6c 72 65 61 64 6c 69 6e 65 24 7b 56 45 52 53  clreadline${VERS
1cb0: 49 4f 4e 7d 22 0a 20 20 20 20 54 43 4c 52 45 41  ION}".    TCLREA
1cc0: 44 4c 49 4e 45 5f 4c 49 42 5f 53 50 45 43 3d 22  DLINE_LIB_SPEC="
1cd0: 2d 4c 24 7b 54 43 4c 52 45 41 44 4c 49 4e 45 5f  -L${TCLREADLINE_
1ce0: 4c 49 42 52 41 52 59 7d 20 2d 6c 74 63 6c 72 65  LIBRARY} -ltclre
1cf0: 61 64 6c 69 6e 65 24 7b 56 45 52 53 49 4f 4e 7d  adline${VERSION}
1d00: 22 0a 65 6c 73 65 0a 20 20 20 20 54 43 4c 52 45  ".else.    TCLRE
1d10: 41 44 4c 49 4e 45 5f 42 55 49 4c 44 5f 4c 49 42  ADLINE_BUILD_LIB
1d20: 5f 53 50 45 43 3d 22 2d 4c 60 70 77 64 60 20 2d  _SPEC="-L`pwd` -
1d30: 6c 74 63 6c 72 65 61 64 6c 69 6e 65 60 65 63 68  ltclreadline`ech
1d40: 6f 20 24 7b 56 45 52 53 49 4f 4e 7d 20 7c 20 74  o ${VERSION} | t
1d50: 72 20 2d 64 20 2e 60 22 0a 20 20 20 20 54 43 4c  r -d .`".    TCL
1d60: 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 53 50 45  READLINE_LIB_SPE
1d70: 43 3d 22 2d 4c 24 7b 54 43 4c 52 45 41 44 4c 49  C="-L${TCLREADLI
1d80: 4e 45 5f 4c 49 42 52 41 52 59 7d 20 2d 6c 74 63  NE_LIBRARY} -ltc
1d90: 6c 72 65 61 64 6c 69 6e 65 60 65 63 68 6f 20 24  lreadline`echo $
1da0: 7b 56 45 52 53 49 4f 4e 7d 20 7c 20 74 72 20 2d  {VERSION} | tr -
1db0: 64 20 2e 60 22 0a 66 69 0a 0a 0a 0a 0a 23 20 48  d .`".fi.....# H
1dc0: 45 41 44 45 52 20 43 48 45 43 4b 53 0a 23 0a 41  EADER CHECKS.#.A
1dd0: 43 5f 48 45 41 44 45 52 5f 53 54 44 43 0a 0a 0a  C_HEADER_STDC...
1de0: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  #---------------
1df0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1e00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1e10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1e20: 2d 2d 2d 2d 2d 0a 23 20 20 20 43 68 65 63 6b 20  -----.#   Check 
1e30: 66 6f 72 20 74 63 6c 2e 68 0a 23 2d 2d 2d 2d 2d  for tcl.h.#-----
1e40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1e50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1e60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1e70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
1e80: 0a 41 43 5f 41 52 47 5f 57 49 54 48 28 74 63 6c  .AC_ARG_WITH(tcl
1e90: 2d 69 6e 63 6c 75 64 65 73 2c 0a 20 20 20 20 20  -includes,.     
1ea0: 20 20 20 20 20 20 20 5b 20 20 2d 2d 77 69 74 68         [  --with
1eb0: 2d 74 63 6c 2d 69 6e 63 6c 75 64 65 73 3d 44 49  -tcl-includes=DI
1ec0: 52 20 77 68 65 72 65 20 74 6f 20 6c 6f 6f 6b 20  R where to look 
1ed0: 66 6f 72 20 74 63 6c 2e 68 5d 2c 0a 20 20 20 20  for tcl.h],.    
1ee0: 20 20 20 20 20 20 20 20 74 63 6c 5f 69 6e 63 6c          tcl_incl
1ef0: 75 64 65 73 3d 24 77 69 74 68 76 61 6c 2c 20 74  udes=$withval, t
1f00: 63 6c 5f 69 6e 63 6c 75 64 65 73 3d 24 70 72 65  cl_includes=$pre
1f10: 66 69 78 2f 69 6e 63 6c 75 64 65 29 0a 0a 41 43  fix/include)..AC
1f20: 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 77  _MSG_CHECKING([w
1f30: 68 65 72 65 20 74 6f 20 6c 6f 6f 6b 20 66 6f 72  here to look for
1f40: 20 74 63 6c 2e 68 5d 29 0a 54 43 4c 5f 49 4e 43   tcl.h]).TCL_INC
1f50: 4c 55 44 45 5f 44 49 52 3d 22 22 0a 66 6f 72 20  LUDE_DIR="".for 
1f60: 64 69 72 20 69 6e 20 24 74 63 6c 5f 69 6e 63 6c  dir in $tcl_incl
1f70: 75 64 65 73 20 24 70 72 65 66 69 78 2f 69 6e 63  udes $prefix/inc
1f80: 6c 75 64 65 2f 20 2f 75 73 72 2f 69 6e 63 6c 75  lude/ /usr/inclu
1f90: 64 65 3b 20 64 6f 0a 20 20 20 20 69 66 20 74 65  de; do.    if te
1fa0: 73 74 20 2d 72 20 24 64 69 72 2f 74 63 6c 2e 68  st -r $dir/tcl.h
1fb0: 3b 20 74 68 65 6e 0a 20 20 20 20 20 20 20 20 54  ; then.        T
1fc0: 43 4c 5f 49 4e 43 4c 55 44 45 5f 44 49 52 3d 24  CL_INCLUDE_DIR=$
1fd0: 64 69 72 0a 20 20 20 20 20 20 20 20 62 72 65 61  dir.        brea
1fe0: 6b 0a 20 20 20 20 66 69 0a 64 6f 6e 65 0a 0a 69  k.    fi.done..i
1ff0: 66 20 74 65 73 74 20 2d 7a 20 22 24 54 43 4c 5f  f test -z "$TCL_
2000: 49 4e 43 4c 55 44 45 5f 44 49 52 22 3b 20 74 68  INCLUDE_DIR"; th
2010: 65 6e 0a 20 20 20 20 41 43 5f 4d 53 47 5f 45 52  en.    AC_MSG_ER
2020: 52 4f 52 28 5b 0a 20 20 43 61 6e 27 74 20 66 69  ROR([.  Can't fi
2030: 6e 64 20 74 63 6c 2e 68 2e 20 20 55 73 65 20 2d  nd tcl.h.  Use -
2040: 2d 77 69 74 68 2d 74 63 6c 2d 69 6e 63 6c 75 64  -with-tcl-includ
2050: 65 73 20 74 6f 20 73 70 65 63 69 66 79 20 74 68  es to specify th
2060: 65 20 64 69 72 65 63 74 6f 72 79 0a 20 20 63 6f  e directory.  co
2070: 6e 74 61 69 6e 69 6e 67 20 74 63 6c 2e 68 20 6f  ntaining tcl.h o
2080: 6e 20 79 6f 75 72 20 73 79 73 74 65 6d 2e 5d 29  n your system.])
2090: 0a 65 6c 73 65 0a 20 20 20 20 41 43 5f 4d 53 47  .else.    AC_MSG
20a0: 5f 52 45 53 55 4c 54 28 24 54 43 4c 5f 49 4e 43  _RESULT($TCL_INC
20b0: 4c 55 44 45 5f 44 49 52 2f 74 63 6c 2e 68 29 0a  LUDE_DIR/tcl.h).
20c0: 66 69 0a 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d  fi....#---------
20d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
20e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
20f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2100: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20  -----------.#   
2110: 43 68 65 63 6b 20 66 6f 72 20 72 65 61 64 6c 69  Check for readli
2120: 6e 65 2e 68 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ne.h.#----------
2130: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2140: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2150: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2160: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f 41  ----------..AC_A
2170: 52 47 5f 57 49 54 48 28 72 65 61 64 6c 69 6e 65  RG_WITH(readline
2180: 2d 69 6e 63 6c 75 64 65 73 2c 0a 20 20 20 20 20  -includes,.     
2190: 20 20 20 20 20 20 20 5b 20 20 2d 2d 77 69 74 68         [  --with
21a0: 2d 72 65 61 64 6c 69 6e 65 2d 69 6e 63 6c 75 64  -readline-includ
21b0: 65 73 3d 44 49 52 0a 20 20 20 20 20 20 20 20 20  es=DIR.         
21c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
21d0: 20 72 65 61 64 6c 69 6e 65 20 69 6e 63 6c 75 64   readline includ
21e0: 65 20 66 69 6c 65 73 20 69 6e 20 44 49 52 5d 2c  e files in DIR],
21f0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 6c 5f  .            rl_
2200: 69 6e 63 6c 75 64 65 73 3d 24 77 69 74 68 76 61  includes=$withva
2210: 6c 2c 20 72 6c 5f 69 6e 63 6c 75 64 65 73 3d 24  l, rl_includes=$
2220: 70 72 65 66 69 78 2f 69 6e 63 6c 75 64 65 29 0a  prefix/include).
2230: 0a 41 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47  .AC_MSG_CHECKING
2240: 28 5b 77 68 65 72 65 20 74 6f 20 6c 6f 6f 6b 20  ([where to look 
2250: 66 6f 72 20 72 65 61 64 6c 69 6e 65 2e 68 5d 29  for readline.h])
2260: 0a 52 45 41 44 4c 49 4e 45 5f 49 4e 43 4c 55 44  .READLINE_INCLUD
2270: 45 5f 44 49 52 3d 22 22 0a 66 6f 72 20 64 69 72  E_DIR="".for dir
2280: 20 69 6e 20 24 72 6c 5f 69 6e 63 6c 75 64 65 73   in $rl_includes
2290: 20 24 70 72 65 66 69 78 2f 69 6e 63 6c 75 64 65   $prefix/include
22a0: 2f 72 65 61 64 6c 69 6e 65 20 2f 75 73 72 2f 69  /readline /usr/i
22b0: 6e 63 6c 75 64 65 3b 20 64 6f 0a 20 20 20 20 69  nclude; do.    i
22c0: 66 20 74 65 73 74 20 2d 72 20 24 64 69 72 2f 72  f test -r $dir/r
22d0: 65 61 64 6c 69 6e 65 2e 68 3b 20 74 68 65 6e 0a  eadline.h; then.
22e0: 20 20 20 20 20 20 20 20 52 45 41 44 4c 49 4e 45          READLINE
22f0: 5f 49 4e 43 4c 55 44 45 5f 44 49 52 3d 24 64 69  _INCLUDE_DIR=$di
2300: 72 0a 20 20 20 20 20 20 20 20 62 72 65 61 6b 0a  r.        break.
2310: 20 20 20 20 66 69 0a 64 6f 6e 65 0a 0a 69 66 20      fi.done..if 
2320: 74 65 73 74 20 2d 7a 20 22 24 52 45 41 44 4c 49  test -z "$READLI
2330: 4e 45 5f 49 4e 43 4c 55 44 45 5f 44 49 52 22 3b  NE_INCLUDE_DIR";
2340: 20 74 68 65 6e 0a 20 20 20 20 41 43 5f 4d 53 47   then.    AC_MSG
2350: 5f 45 52 52 4f 52 28 5b 0a 20 20 43 61 6e 27 74  _ERROR([.  Can't
2360: 20 66 69 6e 64 20 72 65 61 64 6c 69 6e 65 2e 68   find readline.h
2370: 2e 0a 20 20 55 73 65 20 2d 2d 77 69 74 68 2d 72  ..  Use --with-r
2380: 65 61 64 6c 69 6e 65 2d 69 6e 63 6c 75 64 65 73  eadline-includes
2390: 20 74 6f 20 73 70 65 63 69 66 79 20 74 68 65 20   to specify the 
23a0: 64 69 72 65 63 74 6f 72 79 0a 20 20 63 6f 6e 74  directory.  cont
23b0: 61 69 6e 69 6e 67 20 72 65 61 64 6c 69 6e 65 2e  aining readline.
23c0: 68 20 6f 6e 20 79 6f 75 72 20 73 79 73 74 65 6d  h on your system
23d0: 2e 5d 29 0a 65 6c 73 65 0a 20 20 20 20 41 43 5f  .]).else.    AC_
23e0: 4d 53 47 5f 52 45 53 55 4c 54 28 24 52 45 41 44  MSG_RESULT($READ
23f0: 4c 49 4e 45 5f 49 4e 43 4c 55 44 45 5f 44 49 52  LINE_INCLUDE_DIR
2400: 2f 72 65 61 64 6c 69 6e 65 2e 68 29 0a 66 69 0a  /readline.h).fi.
2410: 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ...#------------
2420: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2430: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2440: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2450: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 43 68 65  --------.#   Che
2460: 63 6b 20 66 6f 72 20 6c 69 62 72 65 61 64 6c 69  ck for libreadli
2470: 6e 65 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ne.#------------
2480: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2490: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
24a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
24b0: 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f 41 52 47  --------..AC_ARG
24c0: 5f 57 49 54 48 28 72 65 61 64 6c 69 6e 65 2d 6c  _WITH(readline-l
24d0: 69 62 72 61 72 79 2c 0a 20 20 20 20 20 20 20 20  ibrary,.        
24e0: 20 20 20 20 5b 20 20 2d 2d 77 69 74 68 2d 72 65      [  --with-re
24f0: 61 64 6c 69 6e 65 2d 6c 69 62 72 61 72 79 3d 44  adline-library=D
2500: 49 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 20  IR.             
2510: 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 61               rea
2520: 64 6c 69 6e 65 20 6c 69 62 72 61 72 79 20 66 69  dline library fi
2530: 6c 65 73 20 69 6e 20 44 49 52 5d 2c 0a 20 20 20  les in DIR],.   
2540: 20 20 20 20 20 20 20 20 20 72 6c 5f 6c 69 62 72           rl_libr
2550: 61 72 79 3d 24 77 69 74 68 76 61 6c 2c 20 72 6c  ary=$withval, rl
2560: 5f 6c 69 62 72 61 72 79 3d 24 65 78 65 63 5f 70  _library=$exec_p
2570: 72 65 66 69 78 2f 6c 69 62 29 0a 0a 41 43 5f 4d  refix/lib)..AC_M
2580: 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 77 68 65  SG_CHECKING([whe
2590: 72 65 20 74 6f 20 6c 6f 6f 6b 20 66 6f 72 20 6c  re to look for l
25a0: 69 62 72 65 61 64 6c 69 6e 65 24 53 48 4c 49 42  ibreadline$SHLIB
25b0: 5f 53 55 46 46 49 58 5d 29 0a 52 45 41 44 4c 49  _SUFFIX]).READLI
25c0: 4e 45 5f 4c 49 42 5f 44 49 52 3d 22 22 0a 52 45  NE_LIB_DIR="".RE
25d0: 41 44 4c 49 4e 45 5f 56 45 52 53 49 4f 4e 5f 53  ADLINE_VERSION_S
25e0: 55 46 46 49 58 3d 22 22 0a 66 6f 72 20 64 69 72  UFFIX="".for dir
25f0: 20 69 6e 20 24 72 6c 5f 6c 69 62 72 61 72 79 20   in $rl_library 
2600: 24 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 50 41  $TCLREADLINE_LPA
2610: 54 48 20 24 70 72 65 66 69 78 2f 6c 69 62 2f 72  TH $prefix/lib/r
2620: 65 61 64 6c 69 6e 65 3b 20 64 6f 0a 20 20 20 20  eadline; do.    
2630: 69 66 20 74 65 73 74 20 2d 72 20 24 64 69 72 2f  if test -r $dir/
2640: 6c 69 62 72 65 61 64 6c 69 6e 65 24 53 48 4c 49  libreadline$SHLI
2650: 42 5f 53 55 46 46 49 58 3b 20 74 68 65 6e 0a 20  B_SUFFIX; then. 
2660: 20 20 20 20 20 20 20 52 45 41 44 4c 49 4e 45 5f         READLINE_
2670: 4c 49 42 5f 44 49 52 3d 24 64 69 72 0a 20 20 20  LIB_DIR=$dir.   
2680: 20 20 20 20 20 62 72 65 61 6b 0a 20 20 20 20 66       break.    f
2690: 69 0a 20 20 20 20 69 66 20 74 65 73 74 20 2d 72  i.    if test -r
26a0: 20 24 64 69 72 2f 6c 69 62 72 65 61 64 6c 69 6e   $dir/libreadlin
26b0: 65 24 53 48 4c 49 42 5f 53 55 46 46 49 58 2e 33  e$SHLIB_SUFFIX.3
26c0: 2e 30 3b 20 74 68 65 6e 0a 20 20 20 20 20 20 20  .0; then.       
26d0: 20 52 45 41 44 4c 49 4e 45 5f 56 45 52 53 49 4f   READLINE_VERSIO
26e0: 4e 5f 53 55 46 46 49 58 3d 22 2e 33 2e 30 22 0a  N_SUFFIX=".3.0".
26f0: 20 20 20 20 20 20 20 20 52 45 41 44 4c 49 4e 45          READLINE
2700: 5f 4c 49 42 5f 44 49 52 3d 24 64 69 72 0a 20 20  _LIB_DIR=$dir.  
2710: 20 20 20 20 20 20 62 72 65 61 6b 0a 20 20 20 20        break.    
2720: 66 69 0a 20 20 20 20 69 66 20 74 65 73 74 20 2d  fi.    if test -
2730: 72 20 24 64 69 72 2f 6c 69 62 72 65 61 64 6c 69  r $dir/libreadli
2740: 6e 65 24 53 48 4c 49 42 5f 53 55 46 46 49 58 2e  ne$SHLIB_SUFFIX.
2750: 34 2e 30 3b 20 74 68 65 6e 0a 20 20 20 20 20 20  4.0; then.      
2760: 20 20 52 45 41 44 4c 49 4e 45 5f 56 45 52 53 49    READLINE_VERSI
2770: 4f 4e 5f 53 55 46 46 49 58 3d 22 2e 34 2e 30 22  ON_SUFFIX=".4.0"
2780: 0a 20 20 20 20 20 20 20 20 52 45 41 44 4c 49 4e  .        READLIN
2790: 45 5f 4c 49 42 5f 44 49 52 3d 24 64 69 72 0a 20  E_LIB_DIR=$dir. 
27a0: 20 20 20 20 20 20 20 62 72 65 61 6b 0a 20 20 20         break.   
27b0: 20 66 69 0a 64 6f 6e 65 0a 0a 69 66 20 74 65 73   fi.done..if tes
27c0: 74 20 2d 7a 20 22 24 52 45 41 44 4c 49 4e 45 5f  t -z "$READLINE_
27d0: 4c 49 42 5f 44 49 52 22 3b 20 74 68 65 6e 0a 20  LIB_DIR"; then. 
27e0: 20 20 20 41 43 5f 4d 53 47 5f 45 52 52 4f 52 28     AC_MSG_ERROR(
27f0: 5b 0a 20 20 43 61 6e 27 74 20 66 69 6e 64 20 6c  [.  Can't find l
2800: 69 62 72 65 61 64 6c 69 6e 65 24 53 48 4c 49 42  ibreadline$SHLIB
2810: 5f 53 55 46 46 49 58 2e 0a 20 20 55 73 65 20 2d  _SUFFIX..  Use -
2820: 2d 77 69 74 68 2d 72 65 61 64 6c 69 6e 65 2d 6c  -with-readline-l
2830: 69 62 72 61 72 79 20 74 6f 20 73 70 65 63 69 66  ibrary to specif
2840: 79 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 0a  y the directory.
2850: 20 20 63 6f 6e 74 61 69 6e 69 6e 67 20 6c 69 62    containing lib
2860: 72 65 61 64 6c 69 6e 65 24 53 48 4c 49 42 5f 53  readline$SHLIB_S
2870: 55 46 46 49 58 20 6f 6e 20 79 6f 75 72 20 73 79  UFFIX on your sy
2880: 73 74 65 6d 2e 5d 29 0a 65 6c 73 65 0a 20 20 20  stem.]).else.   
2890: 20 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 7b   AC_MSG_RESULT({
28a0: 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 44 49 52  READLINE_LIB_DIR
28b0: 7d 2f 6c 69 62 72 65 61 64 6c 69 6e 65 24 7b 53  }/libreadline${S
28c0: 48 4c 49 42 5f 53 55 46 46 49 58 7d 24 7b 52 45  HLIB_SUFFIX}${RE
28d0: 41 44 4c 49 4e 45 5f 56 45 52 53 49 4f 4e 5f 53  ADLINE_VERSION_S
28e0: 55 46 46 49 58 7d 29 0a 66 69 0a 0a 0a 0a 23 2d  UFFIX}).fi....#-
28f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2900: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2910: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2920: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2930: 2d 2d 2d 0a 23 20 20 20 53 70 65 63 69 66 79 20  ---.#   Specify 
2940: 74 65 72 6d 6c 69 62 20 6f 72 20 63 75 72 73 65  termlib or curse
2950: 73 20 6c 69 62 72 61 72 79 0a 23 2d 2d 2d 2d 2d  s library.#-----
2960: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2970: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2980: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2990: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
29a0: 0a 6f 70 74 5f 63 75 72 73 65 73 3d 6e 6f 0a 41  .opt_curses=no.A
29b0: 43 5f 41 52 47 5f 57 49 54 48 28 63 75 72 73 65  C_ARG_WITH(curse
29c0: 73 2c 20 0a 5b 20 20 2d 2d 77 69 74 68 2d 63 75  s, .[  --with-cu
29d0: 72 73 65 73 20 20 20 20 20 20 20 20 20 20 20 66  rses           f
29e0: 6f 72 63 65 20 75 73 69 6e 67 20 74 68 65 20 63  orce using the c
29f0: 75 72 73 65 73 20 6c 69 62 72 61 72 79 20 69 6e  urses library in
2a00: 73 74 65 61 64 20 6f 66 20 74 65 72 6d 63 61 70  stead of termcap
2a10: 5d 2c 0a 6f 70 74 5f 63 75 72 73 65 73 3d 24 77  ],.opt_curses=$w
2a20: 69 74 68 76 61 6c 29 0a 0a 69 66 20 74 65 73 74  ithval)..if test
2a30: 20 22 24 6f 70 74 5f 63 75 72 73 65 73 22 20 3d   "$opt_curses" =
2a40: 20 22 79 65 73 22 3b 20 74 68 65 6e 0a 20 20 20   "yes"; then.   
2a50: 20 54 45 52 4d 43 41 50 5f 43 48 45 43 4b 3d 22   TERMCAP_CHECK="
2a60: 63 75 72 73 65 73 20 6e 63 75 72 73 65 73 22 0a  curses ncurses".
2a70: 65 6c 73 65 0a 20 20 20 20 54 45 52 4d 43 41 50  else.    TERMCAP
2a80: 5f 43 48 45 43 4b 3d 22 74 65 72 6d 63 61 70 20  _CHECK="termcap 
2a90: 63 75 72 73 65 73 20 6e 63 75 72 73 65 73 22 0a  curses ncurses".
2aa0: 66 69 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  fi...#----------
2ab0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2ac0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2ad0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2ae0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 43  ----------.#   C
2af0: 68 65 63 6b 20 66 6f 72 20 74 65 72 6d 6c 69 62  heck for termlib
2b00: 20 2f 20 63 75 72 73 65 73 20 2f 20 6e 63 75 72   / curses / ncur
2b10: 73 65 73 20 6c 69 62 72 61 72 79 2e 0a 23 2d 2d  ses library..#--
2b20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2b30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2b40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2b50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2b60: 2d 2d 0a 0a 41 43 5f 41 52 47 5f 57 49 54 48 28  --..AC_ARG_WITH(
2b70: 74 65 72 6d 63 61 70 2d 6c 69 62 72 61 72 79 2c  termcap-library,
2b80: 0a 20 20 20 20 20 20 20 20 20 20 20 20 5b 20 20  .            [  
2b90: 2d 2d 77 69 74 68 2d 74 65 72 6d 63 61 70 2d 6c  --with-termcap-l
2ba0: 69 62 72 61 72 79 3d 44 49 52 0a 20 20 20 20 20  ibrary=DIR.     
2bb0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
2bc0: 20 20 20 20 20 73 65 61 72 63 68 20 74 65 72 6d       search term
2bd0: 63 61 70 20 28 6f 72 20 63 75 72 73 65 73 20 2f  cap (or curses /
2be0: 20 6e 63 75 72 73 65 73 29 20 6c 69 62 72 61 72   ncurses) librar
2bf0: 79 20 69 6e 20 44 49 52 5d 2c 0a 20 20 20 20 20  y in DIR],.     
2c00: 20 20 20 20 20 20 20 74 65 72 6d 63 61 70 5f 6c         termcap_l
2c10: 69 62 3d 24 77 69 74 68 76 61 6c 2c 20 74 65 72  ib=$withval, ter
2c20: 6d 63 61 70 5f 6c 69 62 3d 24 65 78 65 63 5f 70  mcap_lib=$exec_p
2c30: 72 65 66 69 78 2f 6c 69 62 29 0a 0a 74 63 68 65  refix/lib)..tche
2c40: 63 6b 5f 70 61 74 68 3d 22 24 74 65 72 6d 63 61  ck_path="$termca
2c50: 70 5f 6c 69 62 20 24 54 43 4c 52 45 41 44 4c 49  p_lib $TCLREADLI
2c60: 4e 45 5f 4c 50 41 54 48 20 24 70 72 65 66 69 78  NE_LPATH $prefix
2c70: 2f 6c 69 62 22 0a 66 6f 72 20 74 63 68 65 63 6b  /lib".for tcheck
2c80: 20 69 6e 20 24 54 45 52 4d 43 41 50 5f 43 48 45   in $TERMCAP_CHE
2c90: 43 4b 3b 20 64 6f 0a 20 20 20 20 41 43 5f 4d 53  CK; do.    AC_MS
2ca0: 47 5f 43 48 45 43 4b 49 4e 47 28 5b 77 68 65 74  G_CHECKING([whet
2cb0: 68 65 72 20 77 65 20 75 73 65 20 6c 69 62 24 74  her we use lib$t
2cc0: 63 68 65 63 6b 24 53 48 4c 49 42 5f 53 55 46 46  check$SHLIB_SUFF
2cd0: 49 58 5d 29 0a 20 20 20 20 54 45 52 4d 43 41 50  IX]).    TERMCAP
2ce0: 5f 4c 49 42 5f 44 49 52 3d 22 22 0a 20 20 20 20  _LIB_DIR="".    
2cf0: 66 6f 72 20 64 69 72 20 69 6e 20 24 74 63 68 65  for dir in $tche
2d00: 63 6b 5f 70 61 74 68 3b 20 64 6f 0a 20 20 20 20  ck_path; do.    
2d10: 20 20 20 20 69 66 20 74 65 73 74 20 2d 72 20 24      if test -r $
2d20: 64 69 72 2f 6c 69 62 24 74 63 68 65 63 6b 24 53  dir/lib$tcheck$S
2d30: 48 4c 49 42 5f 53 55 46 46 49 58 3b 20 74 68 65  HLIB_SUFFIX; the
2d40: 6e 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 45  n.            TE
2d50: 52 4d 43 41 50 5f 4c 49 42 5f 44 49 52 3d 24 64  RMCAP_LIB_DIR=$d
2d60: 69 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 62  ir.            b
2d70: 72 65 61 6b 0a 20 20 20 20 20 20 20 20 66 69 0a  reak.        fi.
2d80: 20 20 20 20 64 6f 6e 65 0a 0a 20 20 20 20 69 66      done..    if
2d90: 20 74 65 73 74 20 2d 7a 20 22 24 54 45 52 4d 43   test -z "$TERMC
2da0: 41 50 5f 4c 49 42 5f 44 49 52 22 3b 20 74 68 65  AP_LIB_DIR"; the
2db0: 6e 0a 20 20 20 20 20 20 20 20 41 43 5f 4d 53 47  n.        AC_MSG
2dc0: 5f 52 45 53 55 4c 54 28 6e 6f 29 0a 20 20 20 20  _RESULT(no).    
2dd0: 65 6c 73 65 0a 20 20 20 20 20 20 20 20 54 45 52  else.        TER
2de0: 4d 43 41 50 5f 4c 49 42 3d 24 74 63 68 65 63 6b  MCAP_LIB=$tcheck
2df0: 0a 20 20 20 20 20 20 20 20 54 45 52 4d 43 41 50  .        TERMCAP
2e00: 5f 4c 4f 41 44 5f 50 41 54 48 3d 24 7b 54 45 52  _LOAD_PATH=${TER
2e10: 4d 43 41 50 5f 4c 49 42 5f 44 49 52 7d 2f 6c 69  MCAP_LIB_DIR}/li
2e20: 62 24 7b 74 63 68 65 63 6b 7d 24 7b 53 48 4c 49  b${tcheck}${SHLI
2e30: 42 5f 53 55 46 46 49 58 7d 0a 20 20 20 20 20 20  B_SUFFIX}.      
2e40: 20 20 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28    AC_MSG_RESULT(
2e50: 79 65 73 3a 20 24 54 45 52 4d 43 41 50 5f 4c 4f  yes: $TERMCAP_LO
2e60: 41 44 5f 50 41 54 48 29 0a 20 20 20 20 20 20 20  AD_PATH).       
2e70: 20 62 72 65 61 6b 0a 20 20 20 20 66 69 0a 64 6f   break.    fi.do
2e80: 6e 65 0a 0a 69 66 20 74 65 73 74 20 2d 7a 20 22  ne..if test -z "
2e90: 24 54 45 52 4d 43 41 50 5f 4c 49 42 5f 44 49 52  $TERMCAP_LIB_DIR
2ea0: 22 3b 20 74 68 65 6e 0a 20 20 20 20 41 43 5f 4d  "; then.    AC_M
2eb0: 53 47 5f 45 52 52 4f 52 28 5b 0a 20 20 4e 6f 6e  SG_ERROR([.  Non
2ec0: 65 20 6f 66 20 22 24 54 45 52 4d 43 41 50 5f 43  e of "$TERMCAP_C
2ed0: 48 45 43 4b 22 20 66 6f 75 6e 64 20 69 6e 3a 0a  HECK" found in:.
2ee0: 20 20 24 74 63 68 65 63 6b 5f 70 61 74 68 0a 20    $tcheck_path. 
2ef0: 20 55 73 65 20 2d 2d 77 69 74 68 2d 74 65 72 6d   Use --with-term
2f00: 63 61 70 2d 6c 69 62 72 61 72 79 20 74 6f 20 73  cap-library to s
2f10: 70 65 63 69 66 79 20 74 68 65 20 64 69 72 65 63  pecify the direc
2f20: 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20  tory containing 
2f30: 0a 20 20 6c 69 62 24 54 45 52 4d 43 41 50 5f 4c  .  lib$TERMCAP_L
2f40: 49 42 24 53 48 4c 49 42 5f 53 55 46 46 49 58 20  IB$SHLIB_SUFFIX 
2f50: 6f 6e 20 79 6f 75 72 20 73 79 73 74 65 6d 2e 5d  on your system.]
2f60: 29 0a 66 69 0a 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d  ).fi....#-------
2f70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2f80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2f90: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2fa0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20  -------------.# 
2fb0: 20 20 43 68 65 63 6b 20 66 6f 72 20 61 70 70 72    Check for appr
2fc0: 6f 70 72 69 61 74 65 20 76 65 72 73 69 6f 6e 20  opriate version 
2fd0: 6f 66 20 67 6e 75 20 72 65 61 64 6c 69 6e 65 0a  of gnu readline.
2fe0: 23 20 20 20 28 6f 6c 64 65 72 20 76 65 72 73 69  #   (older versi
2ff0: 6f 6e 73 20 6f 66 20 67 6e 75 20 72 65 61 64 6c  ons of gnu readl
3000: 69 6e 65 20 64 6f 6e 27 74 20 68 61 76 65 0a 23  ine don't have.#
3010: 20 20 20 20 72 6c 5f 63 61 6c 6c 62 61 63 6b 5f      rl_callback_
3020: 72 65 61 64 5f 63 68 61 72 20 28 29 29 2e 0a 23  read_char ())..#
3030: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3040: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3050: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3060: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3070: 2d 2d 2d 2d 0a 0a 73 61 76 65 3d 24 4c 49 42 53  ----..save=$LIBS
3080: 0a 0a 4c 49 42 53 3d 22 2d 4c 24 52 45 41 44 4c  ..LIBS="-L$READL
3090: 49 4e 45 5f 4c 49 42 5f 44 49 52 20 2d 6c 72 65  INE_LIB_DIR -lre
30a0: 61 64 6c 69 6e 65 20 2d 4c 24 54 45 52 4d 43 41  adline -L$TERMCA
30b0: 50 5f 4c 49 42 5f 44 49 52 20 2d 6c 24 54 45 52  P_LIB_DIR -l$TER
30c0: 4d 43 41 50 5f 4c 49 42 22 0a 61 6c 74 65 72 6e  MCAP_LIB".altern
30d0: 61 74 65 3d 6e 6f 0a 41 43 5f 43 48 45 43 4b 5f  ate=no.AC_CHECK_
30e0: 4c 49 42 28 72 65 61 64 6c 69 6e 65 2c 20 72 6c  LIB(readline, rl
30f0: 5f 63 61 6c 6c 62 61 63 6b 5f 72 65 61 64 5f 63  _callback_read_c
3100: 68 61 72 2c 20 61 6c 74 65 72 6e 61 74 65 3d 79  har, alternate=y
3110: 65 73 2c 20 61 6c 74 65 72 6e 61 74 65 3d 6e 6f  es, alternate=no
3120: 2c 20 2d 6c 24 54 45 52 4d 43 41 50 5f 4c 49 42  , -l$TERMCAP_LIB
3130: 29 0a 69 66 20 74 65 73 74 20 24 61 6c 74 65 72  ).if test $alter
3140: 6e 61 74 65 20 3d 20 22 6e 6f 22 3b 20 74 68 65  nate = "no"; the
3150: 6e 0a 20 20 20 20 41 43 5f 4d 53 47 5f 45 52 52  n.    AC_MSG_ERR
3160: 4f 52 28 61 6c 74 65 72 6e 61 74 65 20 69 6e 74  OR(alternate int
3170: 65 72 66 61 63 65 20 6e 6f 74 20 73 75 70 70 6f  erface not suppo
3180: 72 74 65 64 20 62 79 20 74 68 69 73 20 72 65 61  rted by this rea
3190: 64 6c 69 6e 65 20 76 65 72 73 69 6f 6e 2e 29 0a  dline version.).
31a0: 66 69 0a 0a 41 43 5f 4d 53 47 5f 43 48 45 43 4b  fi..AC_MSG_CHECK
31b0: 49 4e 47 28 5b 66 6f 72 20 74 68 65 20 72 65 61  ING([for the rea
31c0: 64 6c 69 6e 65 20 76 65 72 73 69 6f 6e 20 6e 75  dline version nu
31d0: 6d 62 65 72 5d 29 0a 41 43 5f 54 52 59 5f 52 55  mber]).AC_TRY_RU
31e0: 4e 28 5b 0a 23 69 6e 63 6c 75 64 65 20 3c 73 74  N([.#include <st
31f0: 64 69 6f 2e 68 3e 0a 69 6e 74 20 6d 61 69 6e 20  dio.h>.int main 
3200: 28 29 20 7b 0a 20 20 20 20 46 49 4c 45 20 2a 66  () {.    FILE *f
3210: 70 20 3d 20 66 6f 70 65 6e 20 28 22 63 6f 6e 66  p = fopen ("conf
3220: 74 65 73 74 76 65 72 73 69 6f 6e 22 2c 20 22 77  testversion", "w
3230: 22 29 3b 0a 20 20 20 20 65 78 74 65 72 6e 20 63  ");.    extern c
3240: 68 61 72 20 2a 72 6c 5f 6c 69 62 72 61 72 79 5f  har *rl_library_
3250: 76 65 72 73 69 6f 6e 3b 0a 20 20 20 20 66 70 72  version;.    fpr
3260: 69 6e 74 66 20 28 66 70 2c 20 22 25 73 22 2c 20  intf (fp, "%s", 
3270: 72 6c 5f 6c 69 62 72 61 72 79 5f 76 65 72 73 69  rl_library_versi
3280: 6f 6e 29 3b 0a 20 20 20 20 63 6c 6f 73 65 20 28  on);.    close (
3290: 66 70 29 3b 0a 20 20 20 20 72 65 74 75 72 6e 20  fp);.    return 
32a0: 28 30 29 3b 0a 7d 5d 2c 0a 20 20 20 20 52 45 41  (0);.}],.    REA
32b0: 44 4c 49 4e 45 5f 56 45 52 53 49 4f 4e 3d 60 63  DLINE_VERSION=`c
32c0: 61 74 20 63 6f 6e 66 74 65 73 74 76 65 72 73 69  at conftestversi
32d0: 6f 6e 60 0a 20 20 20 20 41 43 5f 4d 53 47 5f 52  on`.    AC_MSG_R
32e0: 45 53 55 4c 54 28 24 52 45 41 44 4c 49 4e 45 5f  ESULT($READLINE_
32f0: 56 45 52 53 49 4f 4e 29 2c 0a 20 20 20 20 41 43  VERSION),.    AC
3300: 5f 4d 53 47 5f 52 45 53 55 4c 54 28 66 61 69 6c  _MSG_RESULT(fail
3310: 65 64 29 2c 0a 20 20 20 20 41 43 5f 4d 53 47 5f  ed),.    AC_MSG_
3320: 52 45 53 55 4c 54 28 6e 6f 20 63 72 6f 73 73 20  RESULT(no cross 
3330: 63 6f 6d 70 69 6c 69 6e 67 29 29 0a 0a 0a 4c 49  compiling))...LI
3340: 42 53 3d 24 4c 49 42 53 0a 0a 0a 0a 23 20 54 68  BS=$LIBS....# Th
3350: 69 73 20 69 73 20 61 20 74 65 73 74 0a 23 41 43  is is a test.#AC
3360: 5f 43 5f 42 49 47 45 4e 44 49 41 4e 0a 0a 23 20  _C_BIGENDIAN..# 
3370: 54 4f 44 4f 3a 20 63 68 65 63 6b 20 66 6f 72 20  TODO: check for 
3380: 72 65 61 64 6c 69 6e 65 20 76 65 72 73 69 6f 6e  readline version
3390: 0a 23 20 28 6c 69 6e 6b 20 74 65 73 74 70 72 6f  .# (link testpro
33a0: 67 72 61 6d 20 77 69 74 68 20 2d 6c 72 65 61 64  gram with -lread
33b0: 6c 69 6e 65 29 0a 0a 41 43 5f 53 55 42 53 54 28  line)..AC_SUBST(
33c0: 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4d 41 4a 4f  TCLREADLINE_MAJO
33d0: 52 5f 56 45 52 53 49 4f 4e 29 0a 41 43 5f 53 55  R_VERSION).AC_SU
33e0: 42 53 54 28 54 43 4c 52 45 41 44 4c 49 4e 45 5f  BST(TCLREADLINE_
33f0: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 41  MINOR_VERSION).A
3400: 43 5f 53 55 42 53 54 28 54 43 4c 52 45 41 44 4c  C_SUBST(TCLREADL
3410: 49 4e 45 5f 56 45 52 53 49 4f 4e 29 0a 0a 41 43  INE_VERSION)..AC
3420: 5f 53 55 42 53 54 28 54 43 4c 5f 4c 49 42 5f 44  _SUBST(TCL_LIB_D
3430: 49 52 29 0a 41 43 5f 53 55 42 53 54 28 54 43 4c  IR).AC_SUBST(TCL
3440: 5f 49 4e 43 4c 55 44 45 5f 44 49 52 29 0a 41 43  _INCLUDE_DIR).AC
3450: 5f 53 55 42 53 54 28 52 45 41 44 4c 49 4e 45 5f  _SUBST(READLINE_
3460: 49 4e 43 4c 55 44 45 5f 44 49 52 29 0a 0a 41 43  INCLUDE_DIR)..AC
3470: 5f 53 55 42 53 54 28 43 46 4c 41 47 53 29 0a 41  _SUBST(CFLAGS).A
3480: 43 5f 53 55 42 53 54 28 44 4c 5f 4c 49 42 53 29  C_SUBST(DL_LIBS)
3490: 0a 41 43 5f 53 55 42 53 54 28 4c 44 5f 46 4c 41  .AC_SUBST(LD_FLA
34a0: 47 53 29 0a 41 43 5f 53 55 42 53 54 28 52 41 4e  GS).AC_SUBST(RAN
34b0: 4c 49 42 29 0a 0a 41 43 5f 53 55 42 53 54 28 4d  LIB)..AC_SUBST(M
34c0: 41 4b 45 5f 4c 49 42 29 0a 41 43 5f 53 55 42 53  AKE_LIB).AC_SUBS
34d0: 54 28 53 48 4c 49 42 5f 43 46 4c 41 47 53 29 0a  T(SHLIB_CFLAGS).
34e0: 0a 41 43 5f 53 55 42 53 54 28 53 48 4c 49 42 5f  .AC_SUBST(SHLIB_
34f0: 4c 44 29 0a 41 43 5f 53 55 42 53 54 28 53 48 4c  LD).AC_SUBST(SHL
3500: 49 42 5f 4c 44 5f 4c 49 42 53 29 0a 0a 41 43 5f  IB_LD_LIBS)..AC_
3510: 53 55 42 53 54 28 53 48 4c 49 42 5f 53 55 46 46  SUBST(SHLIB_SUFF
3520: 49 58 29 0a 0a 41 43 5f 53 55 42 53 54 28 54 45  IX)..AC_SUBST(TE
3530: 52 4d 43 41 50 5f 4c 49 42 5f 44 49 52 29 0a 41  RMCAP_LIB_DIR).A
3540: 43 5f 53 55 42 53 54 28 54 45 52 4d 43 41 50 5f  C_SUBST(TERMCAP_
3550: 4c 49 42 29 0a 41 43 5f 53 55 42 53 54 28 52 45  LIB).AC_SUBST(RE
3560: 41 44 4c 49 4e 45 5f 4c 49 42 5f 44 49 52 29 0a  ADLINE_LIB_DIR).
3570: 0a 41 43 5f 53 55 42 53 54 28 54 43 4c 52 45 41  .AC_SUBST(TCLREA
3580: 44 4c 49 4e 45 5f 4c 49 42 5f 46 49 4c 45 29 0a  DLINE_LIB_FILE).
3590: 41 43 5f 53 55 42 53 54 28 54 43 4c 52 45 41 44  AC_SUBST(TCLREAD
35a0: 4c 49 4e 45 5f 42 55 49 4c 44 5f 4c 49 42 5f 53  LINE_BUILD_LIB_S
35b0: 50 45 43 29 0a 41 43 5f 53 55 42 53 54 28 54 43  PEC).AC_SUBST(TC
35c0: 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 53 50  LREADLINE_LIB_SP
35d0: 45 43 29 0a 0a 41 43 5f 53 55 42 53 54 28 54 43  EC)..AC_SUBST(TC
35e0: 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 44 49  LREADLINE_LIB_DI
35f0: 52 29 0a 41 43 5f 53 55 42 53 54 28 54 43 4c 52  R).AC_SUBST(TCLR
3600: 45 41 44 4c 49 4e 45 5f 50 4b 47 5f 46 49 4c 45  EADLINE_PKG_FILE
3610: 29 0a 0a 41 43 5f 53 55 42 53 54 28 54 43 4c 52  )..AC_SUBST(TCLR
3620: 45 41 44 4c 49 4e 45 5f 50 41 43 4b 41 47 45 5f  EADLINE_PACKAGE_
3630: 50 41 54 48 29 0a 41 43 5f 53 55 42 53 54 28 54  PATH).AC_SUBST(T
3640: 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 52 41  CLREADLINE_LIBRA
3650: 52 59 29 0a 0a 0a 41 43 5f 4f 55 54 50 55 54 28  RY)...AC_OUTPUT(
3660: 4d 61 6b 65 66 69 6c 65 20 74 63 6c 72 65 61 64  Makefile tclread
3670: 6c 69 6e 65 2e 68 20 74 63 6c 72 65 61 64 6c 69  line.h tclreadli
3680: 6e 65 49 6e 69 74 2e 74 63 6c 20 74 63 6c 72 65  neInit.tcl tclre
3690: 61 64 6c 69 6e 65 53 65 74 75 70 2e 74 63 6c 20  adlineSetup.tcl 
36a0: 74 63 6c 72 65 61 64 6c 69 6e 65 43 6f 6e 66 69  tclreadlineConfi
36b0: 67 2e 73 68 20 74 63 6c 72 65 61 64 6c 69 6e 65  g.sh tclreadline
36c0: 2e 6e 20 70 6b 67 49 6e 64 65 78 2e 74 63 6c 29  .n pkgIndex.tcl)
36d0: 0a 0a 0a 23 54 43 4c 5f 43 43 3d 27 63 63 27 0a  ...#TCL_CC='cc'.
36e0: 23 54 43 4c 5f 43 46 4c 41 47 53 5f 44 45 42 55  #TCL_CFLAGS_DEBU
36f0: 47 3d 27 2d 67 27 0a 23 54 43 4c 5f 43 46 4c 41  G='-g'.#TCL_CFLA
3700: 47 53 5f 4f 50 54 49 4d 49 5a 45 3d 27 2d 4f 27  GS_OPTIMIZE='-O'
3710: 0a 23 54 43 4c 5f 53 48 41 52 45 44 5f 42 55 49  .#TCL_SHARED_BUI
3720: 4c 44 3d 31 0a 23 0a 23 54 43 4c 5f 50 52 45 46  LD=1.#.#TCL_PREF
3730: 49 58 3d 27 2f 75 73 72 2f 6c 6f 63 61 6c 27 0a  IX='/usr/local'.
3740: 23 54 43 4c 5f 45 58 45 43 5f 50 52 45 46 49 58  #TCL_EXEC_PREFIX
3750: 3d 27 2f 75 73 72 2f 6c 6f 63 61 6c 27 0a 23 0a  ='/usr/local'.#.
3760: 23 54 43 4c 5f 53 48 4c 49 42 5f 43 46 4c 41 47  #TCL_SHLIB_CFLAG
3770: 53 3d 27 2d 66 50 49 43 27 0a 23 54 43 4c 5f 53  S='-fPIC'.#TCL_S
3780: 48 4c 49 42 5f 4c 44 3d 27 63 63 20 2d 73 68 61  HLIB_LD='cc -sha
3790: 72 65 64 27 0a 23 54 43 4c 5f 53 48 4c 49 42 5f  red'.#TCL_SHLIB_
37a0: 53 55 46 46 49 58 3d 27 2e 73 6f 27 0a 23 54 43  SUFFIX='.so'.#TC
37b0: 4c 5f 44 4c 5f 4c 49 42 53 3d 27 2d 6c 64 6c 27  L_DL_LIBS='-ldl'
37c0: 0a 23 54 43 4c 5f 4c 44 5f 46 4c 41 47 53 3d 27  .#TCL_LD_FLAGS='
37d0: 2d 72 64 79 6e 61 6d 69 63 27 0a 23 54 43 4c 5f  -rdynamic'.#TCL_
37e0: 4c 44 5f 53 45 41 52 43 48 5f 46 4c 41 47 53 3d  LD_SEARCH_FLAGS=
37f0: 27 27 0a 23 54 43 4c 5f 52 41 4e 4c 49 42 3d 27  ''.#TCL_RANLIB='
3800: 3a 27 0a 23 54 43 4c 5f 50 41 43 4b 41 47 45 5f  :'.#TCL_PACKAGE_
3810: 50 41 54 48 3d 27 2f 75 73 72 2f 6c 6f 63 61 6c  PATH='/usr/local
3820: 2f 6c 69 62 27 0a                                /lib'.