Hex Artifact Content
Not logged in

Artifact 6a186fe216fbd9e6ccb086742be672422f74398a:


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 68 6f 6d  *-.# FILE: "/hom
0020: 65 2f 6a 6f 7a 65 2f 73 72 63 2f 74 63 6c 72 65  e/joze/src/tclre
0030: 61 64 6c 69 6e 65 2f 63 6f 6e 66 69 67 75 72 65  adline/configure
0040: 2e 69 6e 22 0a 23 20 4c 41 53 54 20 4d 4f 44 49  .in".# LAST MODI
0050: 46 49 43 41 54 49 4f 4e 3a 20 22 54 75 65 20 53  FICATION: "Tue S
0060: 65 70 20 32 31 20 32 31 3a 31 32 3a 32 33 20 31  ep 21 21:12:23 1
0070: 39 39 39 20 28 6a 6f 7a 65 29 22 0a 23 20 28 43  999 (joze)".# (C
0080: 29 20 31 39 39 38 2c 20 31 39 39 39 20 62 79 20  ) 1998, 1999 by 
0090: 4a 6f 68 61 6e 6e 65 73 20 5a 65 6c 6c 6e 65 72  Johannes Zellner
00a0: 2c 20 3c 6a 6f 68 61 6e 6e 65 73 40 7a 65 6c 6c  , <johannes@zell
00b0: 6e 65 72 2e 6f 72 67 3e 0a 23 20 24 49 64 24 0a  ner.org>.# $Id$.
00c0: 23 20 2d 2d 2d 0a 23 0a 23 20 74 63 6c 72 65 61  # ---.#.# tclrea
00d0: 64 6c 69 6e 65 20 2d 2d 20 67 6e 75 20 72 65 61  dline -- gnu rea
00e0: 64 6c 69 6e 65 20 66 6f 72 20 74 63 6c 0a 23 20  dline for tcl.# 
00f0: 43 6f 70 79 72 69 67 68 74 20 28 43 29 20 31 39  Copyright (C) 19
0100: 39 39 20 20 4a 6f 68 61 6e 6e 65 73 20 5a 65 6c  99  Johannes Zel
0110: 6c 6e 65 72 0a 23 0a 23 20 54 68 69 73 20 70 72  lner.#.# This pr
0120: 6f 67 72 61 6d 20 69 73 20 66 72 65 65 20 73 6f  ogram is free so
0130: 66 74 77 61 72 65 3b 20 79 6f 75 20 63 61 6e 20  ftware; you can 
0140: 72 65 64 69 73 74 72 69 62 75 74 65 20 69 74 20  redistribute it 
0150: 61 6e 64 2f 6f 72 0a 23 20 6d 6f 64 69 66 79 20  and/or.# modify 
0160: 69 74 20 75 6e 64 65 72 20 74 68 65 20 74 65 72  it under the ter
0170: 6d 73 20 6f 66 20 74 68 65 20 47 4e 55 20 47 65  ms of the GNU Ge
0180: 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 63  neral Public Lic
0190: 65 6e 73 65 0a 23 20 61 73 20 70 75 62 6c 69 73  ense.# as publis
01a0: 68 65 64 20 62 79 20 74 68 65 20 46 72 65 65 20  hed by the Free 
01b0: 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 61 74  Software Foundat
01c0: 69 6f 6e 3b 20 65 69 74 68 65 72 20 76 65 72 73  ion; either vers
01d0: 69 6f 6e 20 32 0a 23 20 6f 66 20 74 68 65 20 4c  ion 2.# of the L
01e0: 69 63 65 6e 73 65 2c 20 6f 72 20 28 61 74 20 79  icense, or (at y
01f0: 6f 75 72 20 6f 70 74 69 6f 6e 29 20 61 6e 79 20  our option) any 
0200: 6c 61 74 65 72 20 76 65 72 73 69 6f 6e 2e 0a 23  later version..#
0210: 0a 23 20 54 68 69 73 20 70 72 6f 67 72 61 6d 20  .# This program 
0220: 69 73 20 64 69 73 74 72 69 62 75 74 65 64 20 69  is distributed i
0230: 6e 20 74 68 65 20 68 6f 70 65 20 74 68 61 74 20  n the hope that 
0240: 69 74 20 77 69 6c 6c 20 62 65 20 75 73 65 66 75  it will be usefu
0250: 6c 2c 0a 23 20 62 75 74 20 57 49 54 48 4f 55 54  l,.# but WITHOUT
0260: 20 41 4e 59 20 57 41 52 52 41 4e 54 59 3b 20 77   ANY WARRANTY; w
0270: 69 74 68 6f 75 74 20 65 76 65 6e 20 74 68 65 20  ithout even the 
0280: 69 6d 70 6c 69 65 64 20 77 61 72 72 61 6e 74 79  implied warranty
0290: 20 6f 66 0a 23 20 4d 45 52 43 48 41 4e 54 41 42   of.# MERCHANTAB
02a0: 49 4c 49 54 59 20 6f 72 20 46 49 54 4e 45 53 53  ILITY or FITNESS
02b0: 20 46 4f 52 20 41 20 50 41 52 54 49 43 55 4c 41   FOR A PARTICULA
02c0: 52 20 50 55 52 50 4f 53 45 2e 20 20 53 65 65 20  R PURPOSE.  See 
02d0: 74 68 65 0a 23 20 47 4e 55 20 47 65 6e 65 72 61  the.# GNU Genera
02e0: 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65  l Public License
02f0: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c   for more detail
0300: 73 2e 0a 23 0a 23 20 59 6f 75 20 73 68 6f 75 6c  s..#.# You shoul
0310: 64 20 68 61 76 65 20 72 65 63 65 69 76 65 64 20  d have received 
0320: 61 20 63 6f 70 79 20 6f 66 20 74 68 65 20 47 4e  a copy of the GN
0330: 55 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63  U General Public
0340: 20 4c 69 63 65 6e 73 65 0a 23 20 61 6c 6f 6e 67   License.# along
0350: 20 77 69 74 68 20 74 68 69 73 20 70 72 6f 67 72   with this progr
0360: 61 6d 3b 20 69 66 20 6e 6f 74 2c 20 77 72 69 74  am; if not, writ
0370: 65 20 74 6f 20 74 68 65 20 46 72 65 65 20 53 6f  e to the Free So
0380: 66 74 77 61 72 65 0a 23 20 46 6f 75 6e 64 61 74  ftware.# Foundat
0390: 69 6f 6e 2c 20 49 6e 63 2e 2c 20 35 39 20 54 65  ion, Inc., 59 Te
03a0: 6d 70 6c 65 20 50 6c 61 63 65 20 2d 20 53 75 69  mple Place - Sui
03b0: 74 65 20 33 33 30 2c 20 42 6f 73 74 6f 6e 2c 20  te 330, Boston, 
03c0: 4d 41 20 20 30 32 31 31 31 2d 31 33 30 37 2c 20  MA  02111-1307, 
03d0: 55 53 41 2e 0a 23 0a 23 20 6a 6f 68 61 6e 6e 65  USA..#.# johanne
03e0: 73 40 7a 65 6c 6c 6e 65 72 2e 6f 72 67 0a 23 20  s@zellner.org.# 
03f0: 68 74 74 70 3a 2f 2f 77 77 77 2e 7a 65 6c 6c 6e  http://www.zelln
0400: 65 72 2e 6f 72 67 2f 74 63 6c 72 65 61 64 6c 69  er.org/tclreadli
0410: 6e 65 2f 0a 23 0a 23 20 3d 3d 3d 3d 3d 3d 3d 3d  ne/.#.# ========
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 20 2a 2f 20 20 0a  ========== */  .
0460: 0a 64 6e 6c 09 54 68 69 73 20 66 69 6c 65 20 69  .dnl.This file i
0470: 73 20 61 6e 20 69 6e 70 75 74 20 66 69 6c 65 20  s an input file 
0480: 75 73 65 64 20 62 79 20 74 68 65 20 47 4e 55 20  used by the GNU 
0490: 22 61 75 74 6f 63 6f 6e 66 22 20 70 72 6f 67 72  "autoconf" progr
04a0: 61 6d 20 74 6f 0a 64 6e 6c 09 67 65 6e 65 72 61  am to.dnl.genera
04b0: 74 65 20 74 68 65 20 66 69 6c 65 20 22 63 6f 6e  te the file "con
04c0: 66 69 67 75 72 65 22 2c 20 77 68 69 63 68 20 69  figure", which i
04d0: 73 20 72 75 6e 20 64 75 72 69 6e 67 20 54 6b 20  s run during Tk 
04e0: 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 0a 64 6e 6c  installation.dnl
04f0: 09 74 6f 20 63 6f 6e 66 69 67 75 72 65 20 74 68  .to configure th
0500: 65 20 73 79 73 74 65 6d 20 66 6f 72 20 74 68 65  e system for the
0510: 20 6c 6f 63 61 6c 20 65 6e 76 69 72 6f 6e 6d 65   local environme
0520: 6e 74 2e 0a 0a 41 43 5f 52 45 56 49 53 49 4f 4e  nt...AC_REVISION
0530: 28 24 52 65 76 69 73 69 6f 6e 24 29 0a 0a 41 43  ($Revision$)..AC
0540: 5f 49 4e 49 54 28 74 63 6c 72 65 61 64 6c 69 6e  _INIT(tclreadlin
0550: 65 2e 63 29 0a 41 43 5f 43 4f 4e 46 49 47 5f 48  e.c).AC_CONFIG_H
0560: 45 41 44 45 52 28 63 6f 6e 66 69 67 2e 68 29 0a  EADER(config.h).
0570: 0a 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4d 41 4a  .TCLREADLINE_MAJ
0580: 4f 52 5f 56 45 52 53 49 4f 4e 3d 31 0a 54 43 4c  OR_VERSION=1.TCL
0590: 52 45 41 44 4c 49 4e 45 5f 4d 49 4e 4f 52 5f 56  READLINE_MINOR_V
05a0: 45 52 53 49 4f 4e 3d 30 0a 54 43 4c 52 45 41 44  ERSION=0.TCLREAD
05b0: 4c 49 4e 45 5f 50 41 54 43 48 4c 45 56 45 4c 3d  LINE_PATCHLEVEL=
05c0: 31 0a 54 43 4c 52 45 41 44 4c 49 4e 45 5f 56 45  1.TCLREADLINE_VE
05d0: 52 53 49 4f 4e 3d 24 54 43 4c 52 45 41 44 4c 49  RSION=$TCLREADLI
05e0: 4e 45 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e  NE_MAJOR_VERSION
05f0: 2e 24 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4d 49  .$TCLREADLINE_MI
0600: 4e 4f 52 5f 56 45 52 53 49 4f 4e 0a 54 43 4c 52  NOR_VERSION.TCLR
0610: 45 41 44 4c 49 4e 45 5f 50 41 54 43 48 4c 45 56  EADLINE_PATCHLEV
0620: 45 4c 5f 53 54 52 3d 24 7b 54 43 4c 52 45 41 44  EL_STR=${TCLREAD
0630: 4c 49 4e 45 5f 56 45 52 53 49 4f 4e 7d 2e 24 7b  LINE_VERSION}.${
0640: 54 43 4c 52 45 41 44 4c 49 4e 45 5f 50 41 54 43  TCLREADLINE_PATC
0650: 48 4c 45 56 45 4c 7d 0a 56 45 52 53 49 4f 4e 3d  HLEVEL}.VERSION=
0660: 24 54 43 4c 52 45 41 44 4c 49 4e 45 5f 56 45 52  $TCLREADLINE_VER
0670: 53 49 4f 4e 0a 0a 0a 41 43 5f 50 52 45 52 45 51  SION...AC_PREREQ
0680: 28 32 2e 31 33 29 0a 41 43 5f 43 4f 4e 46 49 47  (2.13).AC_CONFIG
0690: 5f 41 55 58 5f 44 49 52 28 2e 2f 61 75 78 29 0a  _AUX_DIR(./aux).
06a0: 41 43 5f 43 41 4e 4f 4e 49 43 41 4c 5f 48 4f 53  AC_CANONICAL_HOS
06b0: 54 0a 0a 0a 54 43 4c 52 45 41 44 4c 49 4e 45 5f  T...TCLREADLINE_
06c0: 4c 50 41 54 48 3d 60 65 63 68 6f 20 24 4c 44 5f  LPATH=`echo $LD_
06d0: 4c 49 42 52 41 52 59 5f 50 41 54 48 20 24 4c 44  LIBRARY_PATH $LD
06e0: 5f 52 55 4e 5f 50 41 54 48 20 24 4c 50 41 54 48  _RUN_PATH $LPATH
06f0: 20 7c 20 73 65 64 20 27 73 2f 3a 2f 20 2f 67 27   | sed 's/:/ /g'
0700: 60 0a 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 50  `.TCLREADLINE_LP
0710: 41 54 48 3d 22 24 54 43 4c 52 45 41 44 4c 49 4e  ATH="$TCLREADLIN
0720: 45 5f 4c 50 41 54 48 20 2f 75 73 72 2f 6c 6f 63  E_LPATH /usr/loc
0730: 61 6c 2f 6c 69 62 20 2f 6c 69 62 20 2f 75 73 72  al/lib /lib /usr
0740: 2f 6c 69 62 20 2f 75 73 72 2f 73 68 6c 69 62 22  /lib /usr/shlib"
0750: 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ...#------------
0760: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
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 0a 23 20 20 20 53 65 65  --------.#   See
07a0: 20 69 66 20 74 68 65 72 65 20 77 61 73 20 61 20   if there was a 
07b0: 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65 20 6f 70 74  command-line opt
07c0: 69 6f 6e 20 66 6f 72 20 77 68 65 72 65 20 54 63  ion for where Tc
07d0: 6c 20 69 73 3b 20 20 69 66 0a 23 20 20 20 6e 6f  l is;  if.#   no
07e0: 74 2c 20 73 65 61 72 63 68 20 66 6f 72 20 54 63  t, search for Tc
07f0: 6c 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  l..#------------
0800: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0810: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0820: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0830: 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f 41 52 47  --------..AC_ARG
0840: 5f 57 49 54 48 28 0a 20 20 20 20 74 63 6c 2c 0a  _WITH(.    tcl,.
0850: 20 20 20 20 5b 20 20 2d 2d 77 69 74 68 2d 74 63      [  --with-tc
0860: 6c 3d 44 49 52 20 20 20 20 20 20 20 20 20 20 77  l=DIR          w
0870: 68 65 72 65 20 74 6f 20 6c 6f 6f 6b 20 66 6f 72  here to look for
0880: 20 74 63 6c 43 6f 6e 66 69 67 2e 73 68 5d 2c 0a   tclConfig.sh],.
0890: 20 20 20 20 74 63 6c 5f 73 65 61 72 63 68 3d 24      tcl_search=$
08a0: 77 69 74 68 76 61 6c 2c 0a 20 20 20 20 74 63 6c  withval,.    tcl
08b0: 5f 73 65 61 72 63 68 3d 22 22 0a 29 0a 0a 41 43  _search="".)..AC
08c0: 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 77  _MSG_CHECKING([w
08d0: 68 69 63 68 20 74 63 6c 43 6f 6e 66 69 67 2e 73  hich tclConfig.s
08e0: 68 20 74 6f 20 75 73 65 5d 29 0a 54 43 4c 5f 4c  h to use]).TCL_L
08f0: 49 42 5f 44 49 52 3d 22 22 0a 66 6f 72 20 64 69  IB_DIR="".for di
0900: 72 20 69 6e 20 24 74 63 6c 5f 73 65 61 72 63 68  r in $tcl_search
0910: 20 2f 75 73 72 2f 6c 69 62 20 2f 75 73 72 2f 6c   /usr/lib /usr/l
0920: 6f 63 61 6c 2f 6c 69 62 20 24 65 78 65 63 5f 70  ocal/lib $exec_p
0930: 72 65 66 69 78 2f 6c 69 62 20 2f 75 73 72 2f 6c  refix/lib /usr/l
0940: 6f 63 61 6c 2f 6c 69 62 2f 75 6e 69 78 20 2f 6f  ocal/lib/unix /o
0950: 70 74 2f 74 63 6c 2f 6c 69 62 3b 20 64 6f 0a 20  pt/tcl/lib; do. 
0960: 20 20 20 69 66 20 74 65 73 74 20 2d 72 20 24 64     if test -r $d
0970: 69 72 2f 74 63 6c 43 6f 6e 66 69 67 2e 73 68 3b  ir/tclConfig.sh;
0980: 20 74 68 65 6e 0a 20 20 20 20 20 20 20 20 54 43   then.        TC
0990: 4c 5f 4c 49 42 5f 44 49 52 3d 24 64 69 72 0a 20  L_LIB_DIR=$dir. 
09a0: 20 20 20 20 20 20 20 62 72 65 61 6b 0a 20 20 20         break.   
09b0: 20 66 69 0a 64 6f 6e 65 0a 0a 69 66 20 74 65 73   fi.done..if tes
09c0: 74 20 2d 7a 20 22 24 54 43 4c 5f 4c 49 42 5f 44  t -z "$TCL_LIB_D
09d0: 49 52 22 3b 20 74 68 65 6e 0a 20 20 20 20 41 43  IR"; then.    AC
09e0: 5f 4d 53 47 5f 45 52 52 4f 52 28 43 61 6e 27 74  _MSG_ERROR(Can't
09f0: 20 66 69 6e 64 20 54 63 6c 20 6c 69 62 72 61 72   find Tcl librar
0a00: 69 65 73 2e 20 20 55 73 65 20 2d 2d 77 69 74 68  ies.  Use --with
0a10: 2d 74 63 6c 20 74 6f 20 73 70 65 63 69 66 79 20  -tcl to specify 
0a20: 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 63 6f  the directory co
0a30: 6e 74 61 69 6e 69 6e 67 20 74 63 6c 43 6f 6e 66  ntaining tclConf
0a40: 69 67 2e 73 68 20 6f 6e 20 79 6f 75 72 20 73 79  ig.sh on your sy
0a50: 73 74 65 6d 2e 29 0a 65 6c 73 65 0a 20 20 20 20  stem.).else.    
0a60: 2e 20 24 54 43 4c 5f 4c 49 42 5f 44 49 52 2f 74  . $TCL_LIB_DIR/t
0a70: 63 6c 43 6f 6e 66 69 67 2e 73 68 0a 20 20 20 20  clConfig.sh.    
0a80: 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 24 54  AC_MSG_RESULT($T
0a90: 43 4c 5f 4c 49 42 5f 44 49 52 2f 74 63 6c 43 6f  CL_LIB_DIR/tclCo
0aa0: 6e 66 69 67 2e 73 68 29 0a 20 20 20 20 41 43 5f  nfig.sh).    AC_
0ab0: 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 66 6f  MSG_CHECKING([fo
0ac0: 72 20 79 6f 75 72 20 74 63 6c 20 76 65 72 73 69  r your tcl versi
0ad0: 6f 6e 5d 29 0a 20 20 20 20 41 43 5f 4d 53 47 5f  on]).    AC_MSG_
0ae0: 52 45 53 55 4c 54 28 5b 24 54 43 4c 5f 56 45 52  RESULT([$TCL_VER
0af0: 53 49 4f 4e 2c 20 70 61 74 63 68 6c 65 76 65 6c  SION, patchlevel
0b00: 20 24 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 45   $TCL_PATCH_LEVE
0b10: 4c 5d 29 0a 66 69 0a 0a 23 2d 2d 2d 2d 2d 2d 2d  L]).fi..#-------
0b20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0b30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0b40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0b50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20  -------------.# 
0b60: 20 20 52 65 61 64 20 69 6e 20 63 6f 6e 66 69 67    Read in config
0b70: 75 72 61 74 69 6f 6e 20 69 6e 66 6f 72 6d 61 74  uration informat
0b80: 69 6f 6e 20 67 65 6e 65 72 61 74 65 64 20 62 79  ion generated by
0b90: 20 54 63 6c 20 66 6f 72 20 73 68 61 72 65 64 0a   Tcl for shared.
0ba0: 23 20 20 20 6c 69 62 72 61 72 69 65 73 2c 20 61  #   libraries, a
0bb0: 6e 64 20 61 72 72 61 6e 67 65 20 66 6f 72 20 69  nd arrange for i
0bc0: 74 20 74 6f 20 62 65 20 73 75 62 73 74 69 74 75  t to be substitu
0bd0: 74 65 64 20 69 6e 74 6f 20 6f 75 72 0a 23 20 20  ted into our.#  
0be0: 20 4d 61 6b 65 66 69 6c 65 2e 0a 23 2d 2d 2d 2d   Makefile..#----
0bf0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0c00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0c10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0c20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0c30: 0a 0a 0a 53 48 4c 49 42 5f 43 46 4c 41 47 53 3d  ...SHLIB_CFLAGS=
0c40: 24 54 43 4c 5f 53 48 4c 49 42 5f 43 46 4c 41 47  $TCL_SHLIB_CFLAG
0c50: 53 0a 53 48 4c 49 42 5f 4c 44 3d 24 54 43 4c 5f  S.SHLIB_LD=$TCL_
0c60: 53 48 4c 49 42 5f 4c 44 0a 69 66 20 74 65 73 74  SHLIB_LD.if test
0c70: 20 24 54 43 4c 5f 53 48 4c 49 42 5f 53 55 46 46   $TCL_SHLIB_SUFF
0c80: 49 58 20 3d 20 22 22 3b 20 74 68 65 6e 0a 20 20  IX = ""; then.  
0c90: 20 20 41 43 5f 4d 53 47 5f 45 52 52 4f 52 28 54    AC_MSG_ERROR(T
0ca0: 43 4c 5f 53 48 4c 49 42 5f 53 55 46 46 49 58 20  CL_SHLIB_SUFFIX 
0cb0: 6e 6f 74 20 64 65 66 69 6e 65 64 20 2d 2d 20 73  not defined -- s
0cc0: 68 6f 75 6c 64 20 62 65 20 73 6f 6d 65 74 68 69  hould be somethi
0cd0: 6e 67 20 6c 69 6b 65 20 2e 73 6f 20 6f 72 20 2e  ng like .so or .
0ce0: 73 6c 20 6f 6e 20 75 6e 69 78 2e 29 0a 65 6c 73  sl on unix.).els
0cf0: 65 0a 20 20 20 20 53 48 4c 49 42 5f 53 55 46 46  e.    SHLIB_SUFF
0d00: 49 58 3d 24 54 43 4c 5f 53 48 4c 49 42 5f 53 55  IX=$TCL_SHLIB_SU
0d10: 46 46 49 58 0a 66 69 0a 44 4c 5f 4c 49 42 53 3d  FFIX.fi.DL_LIBS=
0d20: 24 54 43 4c 5f 44 4c 5f 4c 49 42 53 0a 4c 44 5f  $TCL_DL_LIBS.LD_
0d30: 46 4c 41 47 53 3d 24 54 43 4c 5f 4c 44 5f 46 4c  FLAGS=$TCL_LD_FL
0d40: 41 47 53 0a 53 48 4c 49 42 5f 4c 44 5f 4c 49 42  AGS.SHLIB_LD_LIB
0d50: 53 3d 24 54 43 4c 5f 53 48 4c 49 42 5f 4c 44 5f  S=$TCL_SHLIB_LD_
0d60: 4c 49 42 53 0a 54 43 4c 52 45 41 44 4c 49 4e 45  LIBS.TCLREADLINE
0d70: 5f 50 41 43 4b 41 47 45 5f 50 41 54 48 3d 24 54  _PACKAGE_PATH=$T
0d80: 43 4c 5f 50 41 43 4b 41 47 45 5f 50 41 54 48 0a  CL_PACKAGE_PATH.
0d90: 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ..#-------------
0da0: 2d 2d 2d 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 0a 23 20 20 20 43 68 65 63  -------.#   Chec
0de0: 6b 2c 20 69 66 20 74 63 6c 5f 76 65 72 73 69 6f  k, if tcl_versio
0df0: 6e 20 69 73 20 3e 20 38 2e 30 0a 23 2d 2d 2d 2d  n is > 8.0.#----
0e00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
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: 0a 69 66 20 74 65 73 74 20 24 54 43 4c 5f 4d 41  .if test $TCL_MA
0e50: 4a 4f 52 5f 56 45 52 53 49 4f 4e 20 2d 6c 74 20  JOR_VERSION -lt 
0e60: 38 3b 20 74 68 65 6e 0a 20 20 20 20 41 43 5f 4d  8; then.    AC_M
0e70: 53 47 5f 45 52 52 4f 52 28 6e 65 65 64 20 74 63  SG_ERROR(need tc
0e80: 6c 20 38 2e 30 20 6f 72 20 68 69 67 68 65 72 2e  l 8.0 or higher.
0e90: 29 0a 66 69 0a 0a 0a 0a 23 20 2d 2d 2d 2d 2d 2d  ).fi....# ------
0ea0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0eb0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0ec0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0ed0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0ee0: 2d 0a 23 20 20 20 53 65 74 20 75 70 20 61 20 6e  -.#   Set up a n
0ef0: 65 77 20 64 65 66 61 75 6c 74 20 2d 2d 70 72 65  ew default --pre
0f00: 66 69 78 2e 0a 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d  fix..# ---------
0f10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0f20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0f30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0f40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a  --------------..
0f50: 23 20 74 68 69 73 20 69 73 20 74 68 65 20 64 65  # this is the de
0f60: 66 61 75 6c 74 20 61 6e 79 77 61 79 3a 0a 23 20  fault anyway:.# 
0f70: 41 43 5f 50 52 45 46 49 58 5f 44 45 46 41 55 4c  AC_PREFIX_DEFAUL
0f80: 54 28 2f 75 73 72 2f 6c 6f 63 61 6c 29 0a 0a 69  T(/usr/local)..i
0f90: 66 20 74 65 73 74 20 22 24 7b 70 72 65 66 69 78  f test "${prefix
0fa0: 7d 22 20 3d 20 22 4e 4f 4e 45 22 3b 20 74 68 65  }" = "NONE"; the
0fb0: 6e 0a 20 20 20 20 70 72 65 66 69 78 3d 24 54 43  n.    prefix=$TC
0fc0: 4c 5f 50 52 45 46 49 58 0a 66 69 0a 69 66 20 74  L_PREFIX.fi.if t
0fd0: 65 73 74 20 22 24 7b 65 78 65 63 5f 70 72 65 66  est "${exec_pref
0fe0: 69 78 7d 22 20 3d 20 22 4e 4f 4e 45 22 3b 20 74  ix}" = "NONE"; t
0ff0: 68 65 6e 0a 20 20 20 20 65 78 65 63 5f 70 72 65  hen.    exec_pre
1000: 66 69 78 3d 24 54 43 4c 5f 45 58 45 43 5f 50 52  fix=$TCL_EXEC_PR
1010: 45 46 49 58 0a 65 6c 73 65 0a 20 20 20 20 54 43  EFIX.else.    TC
1020: 4c 52 45 41 44 4c 49 4e 45 5f 50 41 43 4b 41 47  LREADLINE_PACKAG
1030: 45 5f 50 41 54 48 3d 24 7b 65 78 65 63 5f 70 72  E_PATH=${exec_pr
1040: 65 66 69 78 7d 2f 6c 69 62 0a 66 69 0a 0a 54 43  efix}/lib.fi..TC
1050: 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 52 41 52  LREADLINE_LIBRAR
1060: 59 3d 24 7b 65 78 65 63 5f 70 72 65 66 69 78 7d  Y=${exec_prefix}
1070: 2f 6c 69 62 2f 74 63 6c 72 65 61 64 6c 69 6e 65  /lib/tclreadline
1080: 24 54 43 4c 52 45 41 44 4c 49 4e 45 5f 56 45 52  $TCLREADLINE_VER
1090: 53 49 4f 4e 0a 0a 0a 23 20 2d 2d 2d 2d 2d 2d 2d  SION...# -------
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 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
10c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
10d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
10e0: 0a 23 20 20 20 43 68 65 63 6b 20 66 6f 72 20 73  .#   Check for s
10f0: 6f 6d 65 20 70 72 6f 67 72 61 6d 73 20 68 65 72  ome programs her
1100: 65 2e 0a 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  e..# -----------
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 2d 2d 2d 2d  ----------------
1140: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 41 43  ------------..AC
1150: 5f 50 52 4f 47 5f 49 4e 53 54 41 4c 4c 0a 41 43  _PROG_INSTALL.AC
1160: 5f 50 52 4f 47 5f 52 41 4e 4c 49 42 0a 41 43 5f  _PROG_RANLIB.AC_
1170: 50 52 4f 47 5f 4c 4e 5f 53 0a 0a 0a 0a 23 20 2d  PROG_LN_S....# -
1180: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1190: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
11a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
11b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
11c0: 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 50 72 65 66 65  ------.#   Prefe
11d0: 72 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 2c 20  r the compiler, 
11e0: 77 68 69 63 68 20 77 61 73 20 75 73 65 64 0a 23  which was used.#
11f0: 20 20 20 74 6f 20 62 75 69 6c 64 20 74 63 6c 2e     to build tcl.
1200: 0a 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  .# -------------
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 0a 0a 0a 41 43 5f  ----------...AC_
1250: 41 52 47 5f 45 4e 41 42 4c 45 28 67 63 63 2c 20  ARG_ENABLE(gcc, 
1260: 5b 20 20 2d 2d 65 6e 61 62 6c 65 2d 67 63 63 20  [  --enable-gcc 
1270: 20 20 20 20 20 20 20 20 20 20 20 61 6c 6c 6f 77             allow
1280: 20 75 73 65 20 6f 66 20 67 63 63 20 69 66 20 61   use of gcc if a
1290: 76 61 69 6c 61 62 6c 65 5d 2c 0a 20 20 20 20 5b  vailable],.    [
12a0: 67 63 63 5f 6f 6b 3d 24 65 6e 61 62 6c 65 76 61  gcc_ok=$enableva
12b0: 6c 5d 2c 20 5b 67 63 63 5f 6f 6b 3d 6e 6f 5d 29  l], [gcc_ok=no])
12c0: 0a 69 66 20 74 65 73 74 20 22 24 67 63 63 5f 6f  .if test "$gcc_o
12d0: 6b 22 20 3d 20 22 79 65 73 22 3b 20 74 68 65 6e  k" = "yes"; then
12e0: 0a 20 20 20 20 41 43 5f 50 52 4f 47 5f 43 43 0a  .    AC_PROG_CC.
12f0: 65 6c 73 65 0a 20 20 20 20 43 43 3d 24 54 43 4c  else.    CC=$TCL
1300: 5f 43 43 0a 20 20 20 20 41 43 5f 53 55 42 53 54  _CC.    AC_SUBST
1310: 28 43 43 29 0a 66 69 0a 0a 0a 0a 0a 23 20 2d 2d  (CC).fi.....# --
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 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1340: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1350: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1360: 2d 2d 2d 2d 2d 0a 23 20 20 20 63 68 65 63 6b 69  -----.#   checki
1370: 6e 67 20 66 6f 72 20 74 68 65 20 70 72 65 70 72  ng for the prepr
1380: 6f 63 65 73 73 6f 72 2e 0a 23 20 20 20 46 49 58  ocessor..#   FIX
1390: 4d 45 3a 20 64 6f 20 77 65 20 6e 65 65 64 20 74  ME: do we need t
13a0: 68 69 73 20 3f 0a 23 20 2d 2d 2d 2d 2d 2d 2d 2d  his ?.# --------
13b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
13f0: 0a 41 43 5f 50 52 4f 47 5f 43 50 50 0a 0a 0a 0a  .AC_PROG_CPP....
1400: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  #---------------
1410: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1420: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1430: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1440: 2d 2d 2d 2d 2d 0a 23 20 20 20 49 66 20 74 68 69  -----.#   If thi
1450: 73 20 69 73 20 67 63 63 2c 20 61 64 64 20 73 6f  s is gcc, add so
1460: 6d 65 20 65 78 74 72 61 20 63 6f 6d 70 69 6c 65  me extra compile
1470: 20 66 6c 61 67 73 2e 0a 23 2d 2d 2d 2d 2d 2d 2d   flags..#-------
1480: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1490: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
14a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
14b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 41  -------------..A
14c0: 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b  C_MSG_CHECKING([
14d0: 77 68 65 74 68 65 72 20 43 20 63 6f 6d 70 69 6c  whether C compil
14e0: 65 72 20 69 73 20 67 63 63 5d 29 0a 41 43 5f 43  er is gcc]).AC_C
14f0: 41 43 48 45 5f 56 41 4c 28 74 63 6c 72 65 61 64  ACHE_VAL(tclread
1500: 6c 69 6e 65 5f 63 76 5f 70 72 6f 67 5f 67 63 63  line_cv_prog_gcc
1510: 2c 0a 20 20 20 20 41 43 5f 45 47 52 45 50 5f 43  ,.    AC_EGREP_C
1520: 50 50 28 5f 63 63 5f 69 73 5f 67 63 63 5f 2c 20  PP(_cc_is_gcc_, 
1530: 5b 0a 23 69 66 64 65 66 20 5f 5f 47 4e 55 43 5f  [.#ifdef __GNUC_
1540: 5f 0a 5f 63 63 5f 69 73 5f 67 63 63 5f 0a 23 65  _._cc_is_gcc_.#e
1550: 6e 64 69 66 0a 5d 2c 20 20 20 20 20 20 5b 74 63  ndif.],      [tc
1560: 6c 72 65 61 64 6c 69 6e 65 5f 63 76 5f 70 72 6f  lreadline_cv_pro
1570: 67 5f 67 63 63 3d 79 65 73 5d 2c 20 5b 74 63 6c  g_gcc=yes], [tcl
1580: 72 65 61 64 6c 69 6e 65 5f 63 76 5f 70 72 6f 67  readline_cv_prog
1590: 5f 67 63 63 3d 6e 6f 5d 29 29 0a 41 43 5f 4d 53  _gcc=no])).AC_MS
15a0: 47 5f 52 45 53 55 4c 54 28 5b 24 74 63 6c 72 65  G_RESULT([$tclre
15b0: 61 64 6c 69 6e 65 5f 63 76 5f 70 72 6f 67 5f 67  adline_cv_prog_g
15c0: 63 63 5d 29 0a 0a 69 66 20 74 65 73 74 20 2d 7a  cc])..if test -z
15d0: 20 22 24 43 46 4c 41 47 53 22 20 3b 20 74 68 65   "$CFLAGS" ; the
15e0: 6e 0a 20 20 20 20 43 46 4c 41 47 53 3d 24 54 43  n.    CFLAGS=$TC
15f0: 4c 5f 43 46 4c 41 47 53 5f 4f 50 54 49 4d 49 5a  L_CFLAGS_OPTIMIZ
1600: 45 0a 66 69 0a 69 66 20 74 65 73 74 20 22 24 74  E.fi.if test "$t
1610: 63 6c 72 65 61 64 6c 69 6e 65 5f 63 76 5f 70 72  clreadline_cv_pr
1620: 6f 67 5f 67 63 63 22 20 3d 20 22 79 65 73 22 20  og_gcc" = "yes" 
1630: 3b 20 74 68 65 6e 0a 20 20 20 20 43 46 4c 41 47  ; then.    CFLAG
1640: 53 3d 22 24 43 46 4c 41 47 53 20 2d 57 73 68 61  S="$CFLAGS -Wsha
1650: 64 6f 77 20 2d 57 74 72 61 64 69 74 69 6f 6e 61  dow -Wtraditiona
1660: 6c 20 2d 57 61 6c 6c 22 0a 66 69 0a 0a 41 43 5f  l -Wall".fi..AC_
1670: 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 64 65  MSG_CHECKING([de
1680: 66 61 75 6c 74 20 63 6f 6d 70 69 6c 65 72 20 66  fault compiler f
1690: 6c 61 67 73 5d 29 0a 41 43 5f 41 52 47 5f 57 49  lags]).AC_ARG_WI
16a0: 54 48 28 63 66 6c 61 67 73 2c 20 5b 20 20 2d 2d  TH(cflags, [  --
16b0: 77 69 74 68 2d 63 66 6c 61 67 73 3d 46 4c 41 47  with-cflags=FLAG
16c0: 53 20 20 20 20 20 73 65 74 20 63 6f 6d 70 69 6c  S     set compil
16d0: 65 72 20 66 6c 61 67 73 20 74 6f 20 46 4c 41 47  er flags to FLAG
16e0: 53 5d 2c 0a 20 20 20 20 5b 43 46 4c 41 47 53 3d  S],.    [CFLAGS=
16f0: 22 24 77 69 74 68 5f 63 66 6c 61 67 73 22 5d 29  "$with_cflags"])
1700: 0a 0a 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28  ..AC_MSG_RESULT(
1710: 5b 24 43 46 4c 41 47 53 5d 29 0a 0a 69 66 20 74  [$CFLAGS])..if t
1720: 65 73 74 20 22 24 54 43 4c 5f 43 43 22 20 21 3d  est "$TCL_CC" !=
1730: 20 22 24 43 43 22 20 3b 20 74 68 65 6e 0a 20 20   "$CC" ; then.  
1740: 20 20 65 63 68 6f 20 22 22 0a 20 20 20 20 65 63    echo "".    ec
1750: 68 6f 20 22 57 41 52 4e 49 4e 47 3a 20 20 43 6f  ho "WARNING:  Co
1760: 6d 70 69 6c 65 72 20 69 73 20 24 43 43 20 62 75  mpiler is $CC bu
1770: 74 20 54 63 6c 20 77 61 73 20 63 6f 6d 70 69 6c  t Tcl was compil
1780: 65 64 20 77 69 74 68 20 24 54 43 4c 5f 43 43 22  ed with $TCL_CC"
1790: 0a 20 20 20 20 65 63 68 6f 20 22 22 0a 66 69 0a  .    echo "".fi.
17a0: 0a 23 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 2d 2d 2d 2d 2d 2d  ----------------
17e0: 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 54 68 65 20 73  ------.#   The s
17f0: 74 61 74 65 6d 65 6e 74 73 20 62 65 6c 6f 77 20  tatements below 
1800: 64 65 66 69 6e 65 20 61 20 63 6f 6c 6c 65 63 74  define a collect
1810: 69 6f 6e 20 6f 66 20 73 79 6d 62 6f 6c 73 20 72  ion of symbols r
1820: 65 6c 61 74 65 64 20 74 6f 0a 23 20 20 20 62 75  elated to.#   bu
1830: 69 6c 64 69 6e 67 20 6c 69 62 74 63 6c 72 65 61  ilding libtclrea
1840: 64 6c 69 6e 65 20 61 73 20 61 20 73 68 61 72 65  dline as a share
1850: 64 20 6c 69 62 72 61 72 79 20 69 6e 73 74 65 61  d library instea
1860: 64 20 6f 66 20 61 20 73 74 61 74 69 63 20 6c 69  d of a static li
1870: 62 72 61 72 79 2e 0a 23 20 20 20 28 73 74 61 74  brary..#   (stat
1880: 69 63 20 69 73 20 6e 6f 74 20 69 6d 70 6c 65 6d  ic is not implem
1890: 65 6e 74 65 64 20 79 65 74 20 61 6e 79 77 61 79  ented yet anyway
18a0: 29 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  )..#------------
18b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
18c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
18d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
18e0: 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f 41 52 47  --------..AC_ARG
18f0: 5f 45 4e 41 42 4c 45 28 73 68 61 72 65 64 2c 0a  _ENABLE(shared,.
1900: 20 20 20 20 5b 20 20 2d 2d 64 69 73 61 62 6c 65      [  --disable
1910: 2d 73 68 61 72 65 64 20 20 20 20 20 20 20 20 64  -shared        d
1920: 6f 6e 27 74 20 62 75 69 6c 64 20 6c 69 62 74 63  on't build libtc
1930: 6c 72 65 61 64 6c 69 6e 65 20 61 73 20 61 20 73  lreadline as a s
1940: 68 61 72 65 64 20 6c 69 62 72 61 72 79 0a 20 20  hared library.  
1950: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
1960: 20 20 20 20 20 20 20 20 28 6e 6f 74 20 69 6d 70          (not imp
1970: 6c 65 6d 65 6e 74 65 64 20 2d 2d 20 70 72 6f 62  lemented -- prob
1980: 61 62 6c 79 20 6e 65 76 65 72 29 2e 5d 2c 0a 20  ably never).],. 
1990: 20 20 20 5b 6f 6b 3d 24 65 6e 61 62 6c 65 76 61     [ok=$enableva
19a0: 6c 5d 2c 20 5b 6f 6b 3d 79 65 73 5d 29 0a 69 66  l], [ok=yes]).if
19b0: 20 74 65 73 74 20 22 24 6f 6b 22 20 3d 20 22 79   test "$ok" = "y
19c0: 65 73 22 3b 20 74 68 65 6e 0a 20 20 20 20 69 66  es"; then.    if
19d0: 20 74 65 73 74 20 24 7b 54 43 4c 5f 53 48 41 52   test ${TCL_SHAR
19e0: 45 44 5f 42 55 49 4c 44 7d 20 3d 20 30 3b 20 74  ED_BUILD} = 0; t
19f0: 68 65 6e 0a 20 20 20 20 20 20 20 20 41 43 5f 4d  hen.        AC_M
1a00: 53 47 5f 45 52 52 4f 52 28 54 63 6c 20 77 61 73  SG_ERROR(Tcl was
1a10: 20 6e 6f 74 20 62 75 69 6c 74 20 77 69 74 68 20   not built with 
1a20: 2d 2d 65 6e 61 62 6c 65 2d 73 68 61 72 65 64 2c  --enable-shared,
1a30: 20 73 6f 20 79 6f 75 20 63 61 6e 27 74 20 75 73   so you can't us
1a40: 65 20 73 68 61 72 65 64 20 6c 69 62 72 61 72 69  e shared librari
1a50: 65 73 2e 29 0a 20 20 20 20 66 69 0a 20 20 20 20  es.).    fi.    
1a60: 53 48 4c 49 42 5f 43 46 4c 41 47 53 3d 22 24 7b  SHLIB_CFLAGS="${
1a70: 53 48 4c 49 42 5f 43 46 4c 41 47 53 7d 22 0a 20  SHLIB_CFLAGS}". 
1a80: 20 20 20 65 76 61 6c 20 22 54 43 4c 52 45 41 44     eval "TCLREAD
1a90: 4c 49 4e 45 5f 4c 49 42 5f 46 49 4c 45 3d 6c 69  LINE_LIB_FILE=li
1aa0: 62 74 63 6c 72 65 61 64 6c 69 6e 65 24 7b 56 45  btclreadline${VE
1ab0: 52 53 49 4f 4e 7d 24 7b 53 48 4c 49 42 5f 53 55  RSION}${SHLIB_SU
1ac0: 46 46 49 58 7d 22 0a 20 20 20 20 54 43 4c 52 45  FFIX}".    TCLRE
1ad0: 41 44 4c 49 4e 45 5f 50 4b 47 5f 46 49 4c 45 3d  ADLINE_PKG_FILE=
1ae0: 22 5b 5b 66 69 6c 65 20 6a 6f 69 6e 20 5b 66 69  "[[file join [fi
1af0: 6c 65 20 64 69 72 6e 61 6d 65 20 5c 24 64 69 72  le dirname \$dir
1b00: 5d 20 24 7b 54 43 4c 52 45 41 44 4c 49 4e 45 5f  ] ${TCLREADLINE_
1b10: 4c 49 42 5f 46 49 4c 45 7d 5d 5d 22 0a 20 20 20  LIB_FILE}]]".   
1b20: 20 4d 41 4b 45 5f 4c 49 42 3d 22 5c 24 28 53 48   MAKE_LIB="\$(SH
1b30: 4c 49 42 5f 4c 44 29 20 2d 6f 20 24 7b 54 43 4c  LIB_LD) -o ${TCL
1b40: 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 46 49 4c  READLINE_LIB_FIL
1b50: 45 7d 20 5c 24 28 4f 42 4a 53 29 20 24 7b 53 48  E} \$(OBJS) ${SH
1b60: 4c 49 42 5f 4c 44 5f 4c 49 42 53 7d 22 0a 20 20  LIB_LD_LIBS}".  
1b70: 20 20 52 41 4e 4c 49 42 3d 22 3a 22 0a 65 6c 73    RANLIB=":".els
1b80: 65 0a 20 20 20 20 41 43 5f 4d 53 47 5f 45 52 52  e.    AC_MSG_ERR
1b90: 4f 52 28 6e 6f 6e 2d 73 68 61 72 65 64 20 6e 6f  OR(non-shared no
1ba0: 74 20 69 6d 70 6c 65 6d 65 6e 74 65 64 20 79 65  t implemented ye
1bb0: 74 2e 20 28 70 72 6f 62 61 62 6c 79 20 6e 65 76  t. (probably nev
1bc0: 65 72 29 29 0a 20 20 20 20 53 48 4c 49 42 5f 43  er)).    SHLIB_C
1bd0: 46 4c 41 47 53 3d 22 22 0a 20 20 20 20 65 76 61  FLAGS="".    eva
1be0: 6c 20 22 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c  l "TCLREADLINE_L
1bf0: 49 42 5f 46 49 4c 45 3d 6c 69 62 74 63 6c 72 65  IB_FILE=libtclre
1c00: 61 64 6c 69 6e 65 24 7b 56 45 52 53 49 4f 4e 7d  adline${VERSION}
1c10: 2e 61 22 0a 20 20 20 20 54 43 4c 52 45 41 44 4c  .a".    TCLREADL
1c20: 49 4e 45 5f 50 4b 47 5f 46 49 4c 45 3d 22 22 0a  INE_PKG_FILE="".
1c30: 20 20 20 20 4d 41 4b 45 5f 4c 49 42 3d 22 61 72      MAKE_LIB="ar
1c40: 20 63 72 20 24 7b 54 43 4c 52 45 41 44 4c 49 4e   cr ${TCLREADLIN
1c50: 45 5f 4c 49 42 5f 46 49 4c 45 7d 20 5c 24 7b 4f  E_LIB_FILE} \${O
1c60: 42 4a 53 7d 22 0a 66 69 0a 0a 23 20 4e 6f 74 65  BJS}".fi..# Note
1c70: 3a 20 20 69 6e 20 74 68 65 20 66 6f 6c 6c 6f 77  :  in the follow
1c80: 69 6e 67 20 76 61 72 69 61 62 6c 65 2c 20 69 74  ing variable, it
1c90: 27 73 20 69 6d 70 6f 72 74 61 6e 74 20 74 6f 20  's important to 
1ca0: 75 73 65 20 74 68 65 20 61 62 73 6f 6c 75 74 65  use the absolute
1cb0: 0a 23 20 70 61 74 68 20 6e 61 6d 65 20 6f 66 20  .# path name of 
1cc0: 74 68 65 20 54 63 6c 20 64 69 72 65 63 74 6f 72  the Tcl director
1cd0: 79 20 72 61 74 68 65 72 20 74 68 61 6e 20 22 2e  y rather than ".
1ce0: 2e 22 3a 20 20 74 68 69 73 20 69 73 20 62 65 63  .":  this is bec
1cf0: 61 75 73 65 0a 23 20 41 49 58 20 72 65 6d 65 6d  ause.# AIX remem
1d00: 62 65 72 73 20 74 68 69 73 20 70 61 74 68 20 61  bers this path a
1d10: 6e 64 20 77 69 6c 6c 20 61 74 74 65 6d 70 74 20  nd will attempt 
1d20: 74 6f 20 75 73 65 20 69 74 20 61 74 20 72 75 6e  to use it at run
1d30: 2d 74 69 6d 65 20 74 6f 20 6c 6f 6f 6b 0a 23 20  -time to look.# 
1d40: 75 70 20 74 68 65 20 54 63 6c 20 6c 69 62 72 61  up the Tcl libra
1d50: 72 79 2e 0a 0a 69 66 20 74 65 73 74 20 22 24 7b  ry...if test "${
1d60: 54 43 4c 5f 4c 49 42 5f 56 45 52 53 49 4f 4e 53  TCL_LIB_VERSIONS
1d70: 5f 4f 4b 7d 22 20 3d 20 22 6f 6b 22 3b 20 74 68  _OK}" = "ok"; th
1d80: 65 6e 0a 20 20 20 20 54 43 4c 52 45 41 44 4c 49  en.    TCLREADLI
1d90: 4e 45 5f 42 55 49 4c 44 5f 4c 49 42 5f 53 50 45  NE_BUILD_LIB_SPE
1da0: 43 3d 22 2d 4c 60 70 77 64 60 20 2d 6c 74 63 6c  C="-L`pwd` -ltcl
1db0: 72 65 61 64 6c 69 6e 65 24 7b 56 45 52 53 49 4f  readline${VERSIO
1dc0: 4e 7d 22 0a 20 20 20 20 54 43 4c 52 45 41 44 4c  N}".    TCLREADL
1dd0: 49 4e 45 5f 4c 49 42 5f 53 50 45 43 3d 22 2d 4c  INE_LIB_SPEC="-L
1de0: 24 7b 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 49  ${TCLREADLINE_LI
1df0: 42 52 41 52 59 7d 20 2d 6c 74 63 6c 72 65 61 64  BRARY} -ltclread
1e00: 6c 69 6e 65 24 7b 56 45 52 53 49 4f 4e 7d 22 0a  line${VERSION}".
1e10: 65 6c 73 65 0a 20 20 20 20 54 43 4c 52 45 41 44  else.    TCLREAD
1e20: 4c 49 4e 45 5f 42 55 49 4c 44 5f 4c 49 42 5f 53  LINE_BUILD_LIB_S
1e30: 50 45 43 3d 22 2d 4c 60 70 77 64 60 20 2d 6c 74  PEC="-L`pwd` -lt
1e40: 63 6c 72 65 61 64 6c 69 6e 65 60 65 63 68 6f 20  clreadline`echo 
1e50: 24 7b 56 45 52 53 49 4f 4e 7d 20 7c 20 74 72 20  ${VERSION} | tr 
1e60: 2d 64 20 2e 60 22 0a 20 20 20 20 54 43 4c 52 45  -d .`".    TCLRE
1e70: 41 44 4c 49 4e 45 5f 4c 49 42 5f 53 50 45 43 3d  ADLINE_LIB_SPEC=
1e80: 22 2d 4c 24 7b 54 43 4c 52 45 41 44 4c 49 4e 45  "-L${TCLREADLINE
1e90: 5f 4c 49 42 52 41 52 59 7d 20 2d 6c 74 63 6c 72  _LIBRARY} -ltclr
1ea0: 65 61 64 6c 69 6e 65 60 65 63 68 6f 20 24 7b 56  eadline`echo ${V
1eb0: 45 52 53 49 4f 4e 7d 20 7c 20 74 72 20 2d 64 20  ERSION} | tr -d 
1ec0: 2e 60 22 0a 66 69 0a 0a 0a 0a 0a 23 20 48 45 41  .`".fi.....# HEA
1ed0: 44 45 52 20 43 48 45 43 4b 53 0a 23 0a 41 43 5f  DER CHECKS.#.AC_
1ee0: 48 45 41 44 45 52 5f 53 54 44 43 0a 0a 0a 23 2d  HEADER_STDC...#-
1ef0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1f00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1f10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1f20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1f30: 2d 2d 2d 0a 23 20 20 20 43 68 65 63 6b 20 66 6f  ---.#   Check fo
1f40: 72 20 74 63 6c 2e 68 0a 23 2d 2d 2d 2d 2d 2d 2d  r tcl.h.#-------
1f50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1f60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1f70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1f80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 41  -------------..A
1f90: 43 5f 41 52 47 5f 57 49 54 48 28 74 63 6c 2d 69  C_ARG_WITH(tcl-i
1fa0: 6e 63 6c 75 64 65 73 2c 0a 20 20 20 20 20 20 20  ncludes,.       
1fb0: 20 20 20 20 20 5b 20 20 2d 2d 77 69 74 68 2d 74       [  --with-t
1fc0: 63 6c 2d 69 6e 63 6c 75 64 65 73 3d 44 49 52 20  cl-includes=DIR 
1fd0: 77 68 65 72 65 20 74 6f 20 6c 6f 6f 6b 20 66 6f  where to look fo
1fe0: 72 20 74 63 6c 2e 68 5d 2c 0a 20 20 20 20 20 20  r tcl.h],.      
1ff0: 20 20 20 20 20 20 74 63 6c 5f 69 6e 63 6c 75 64        tcl_includ
2000: 65 73 3d 24 77 69 74 68 76 61 6c 2c 20 74 63 6c  es=$withval, tcl
2010: 5f 69 6e 63 6c 75 64 65 73 3d 24 70 72 65 66 69  _includes=$prefi
2020: 78 2f 69 6e 63 6c 75 64 65 29 0a 0a 41 43 5f 4d  x/include)..AC_M
2030: 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 77 68 65  SG_CHECKING([whe
2040: 72 65 20 74 6f 20 6c 6f 6f 6b 20 66 6f 72 20 74  re to look for t
2050: 63 6c 2e 68 5d 29 0a 54 43 4c 5f 49 4e 43 4c 55  cl.h]).TCL_INCLU
2060: 44 45 5f 44 49 52 3d 22 22 0a 66 6f 72 20 64 69  DE_DIR="".for di
2070: 72 20 69 6e 20 24 74 63 6c 5f 69 6e 63 6c 75 64  r in $tcl_includ
2080: 65 73 20 24 70 72 65 66 69 78 2f 69 6e 63 6c 75  es $prefix/inclu
2090: 64 65 2f 20 2f 75 73 72 2f 69 6e 63 6c 75 64 65  de/ /usr/include
20a0: 3b 20 64 6f 0a 20 20 20 20 69 66 20 74 65 73 74  ; do.    if test
20b0: 20 2d 72 20 24 64 69 72 2f 74 63 6c 2e 68 3b 20   -r $dir/tcl.h; 
20c0: 74 68 65 6e 0a 20 20 20 20 20 20 20 20 54 43 4c  then.        TCL
20d0: 5f 49 4e 43 4c 55 44 45 5f 44 49 52 3d 24 64 69  _INCLUDE_DIR=$di
20e0: 72 0a 20 20 20 20 20 20 20 20 62 72 65 61 6b 0a  r.        break.
20f0: 20 20 20 20 66 69 0a 64 6f 6e 65 0a 0a 69 66 20      fi.done..if 
2100: 74 65 73 74 20 2d 7a 20 22 24 54 43 4c 5f 49 4e  test -z "$TCL_IN
2110: 43 4c 55 44 45 5f 44 49 52 22 3b 20 74 68 65 6e  CLUDE_DIR"; then
2120: 0a 20 20 20 20 41 43 5f 4d 53 47 5f 45 52 52 4f  .    AC_MSG_ERRO
2130: 52 28 5b 0a 20 20 43 61 6e 27 74 20 66 69 6e 64  R([.  Can't find
2140: 20 74 63 6c 2e 68 2e 20 20 55 73 65 20 2d 2d 77   tcl.h.  Use --w
2150: 69 74 68 2d 74 63 6c 2d 69 6e 63 6c 75 64 65 73  ith-tcl-includes
2160: 20 74 6f 20 73 70 65 63 69 66 79 20 74 68 65 20   to specify the 
2170: 64 69 72 65 63 74 6f 72 79 0a 20 20 63 6f 6e 74  directory.  cont
2180: 61 69 6e 69 6e 67 20 74 63 6c 2e 68 20 6f 6e 20  aining tcl.h on 
2190: 79 6f 75 72 20 73 79 73 74 65 6d 2e 5d 29 0a 65  your system.]).e
21a0: 6c 73 65 0a 20 20 20 20 41 43 5f 4d 53 47 5f 52  lse.    AC_MSG_R
21b0: 45 53 55 4c 54 28 24 54 43 4c 5f 49 4e 43 4c 55  ESULT($TCL_INCLU
21c0: 44 45 5f 44 49 52 2f 74 63 6c 2e 68 29 0a 66 69  DE_DIR/tcl.h).fi
21d0: 0a 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ....#-----------
21e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
21f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2200: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2210: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 43 68  ---------.#   Ch
2220: 65 63 6b 20 66 6f 72 20 72 65 61 64 6c 69 6e 65  eck for readline
2230: 2e 68 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  .h.#------------
2240: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2250: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2260: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2270: 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f 41 52 47  --------..AC_ARG
2280: 5f 57 49 54 48 28 72 65 61 64 6c 69 6e 65 2d 69  _WITH(readline-i
2290: 6e 63 6c 75 64 65 73 2c 0a 20 20 20 20 20 20 20  ncludes,.       
22a0: 20 20 20 20 20 5b 20 20 2d 2d 77 69 74 68 2d 72       [  --with-r
22b0: 65 61 64 6c 69 6e 65 2d 69 6e 63 6c 75 64 65 73  eadline-includes
22c0: 3d 44 49 52 0a 20 20 20 20 20 20 20 20 20 20 20  =DIR.           
22d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72                 r
22e0: 65 61 64 6c 69 6e 65 20 69 6e 63 6c 75 64 65 20  eadline include 
22f0: 66 69 6c 65 73 20 69 6e 20 44 49 52 5d 2c 0a 20  files in DIR],. 
2300: 20 20 20 20 20 20 20 20 20 20 20 72 6c 5f 69 6e             rl_in
2310: 63 6c 75 64 65 73 3d 24 77 69 74 68 76 61 6c 2c  cludes=$withval,
2320: 20 72 6c 5f 69 6e 63 6c 75 64 65 73 3d 22 22 29   rl_includes="")
2330: 0a 0a 41 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e  ..AC_MSG_CHECKIN
2340: 47 28 5b 77 68 65 72 65 20 74 6f 20 6c 6f 6f 6b  G([where to look
2350: 20 66 6f 72 20 72 65 61 64 6c 69 6e 65 2e 68 5d   for readline.h]
2360: 29 0a 52 45 41 44 4c 49 4e 45 5f 49 4e 43 4c 55  ).READLINE_INCLU
2370: 44 45 5f 44 49 52 3d 22 22 0a 66 6f 72 20 64 69  DE_DIR="".for di
2380: 72 20 69 6e 20 24 72 6c 5f 69 6e 63 6c 75 64 65  r in $rl_include
2390: 73 20 2f 75 73 72 2f 6c 6f 63 61 6c 2f 69 6e 63  s /usr/local/inc
23a0: 6c 75 64 65 2f 72 65 61 64 6c 69 6e 65 20 2f 75  lude/readline /u
23b0: 73 72 2f 6c 6f 63 61 6c 2f 69 6e 63 6c 75 64 65  sr/local/include
23c0: 20 2f 75 73 72 2f 69 6e 63 6c 75 64 65 2f 72 65   /usr/include/re
23d0: 61 64 6c 69 6e 65 20 2f 75 73 72 2f 69 6e 63 6c  adline /usr/incl
23e0: 75 64 65 20 3b 20 64 6f 0a 20 20 20 20 69 66 20  ude ; do.    if 
23f0: 74 65 73 74 20 2d 72 20 24 64 69 72 2f 72 65 61  test -r $dir/rea
2400: 64 6c 69 6e 65 2e 68 3b 20 74 68 65 6e 0a 20 20  dline.h; then.  
2410: 20 20 20 20 20 20 52 45 41 44 4c 49 4e 45 5f 49        READLINE_I
2420: 4e 43 4c 55 44 45 5f 44 49 52 3d 24 64 69 72 0a  NCLUDE_DIR=$dir.
2430: 20 20 20 20 20 20 20 20 62 72 65 61 6b 0a 20 20          break.  
2440: 20 20 66 69 0a 64 6f 6e 65 0a 0a 69 66 20 74 65    fi.done..if te
2450: 73 74 20 2d 7a 20 22 24 52 45 41 44 4c 49 4e 45  st -z "$READLINE
2460: 5f 49 4e 43 4c 55 44 45 5f 44 49 52 22 3b 20 74  _INCLUDE_DIR"; t
2470: 68 65 6e 0a 20 20 20 20 41 43 5f 4d 53 47 5f 45  hen.    AC_MSG_E
2480: 52 52 4f 52 28 5b 0a 20 20 43 61 6e 27 74 20 66  RROR([.  Can't f
2490: 69 6e 64 20 72 65 61 64 6c 69 6e 65 2e 68 2e 0a  ind readline.h..
24a0: 20 20 55 73 65 20 2d 2d 77 69 74 68 2d 72 65 61    Use --with-rea
24b0: 64 6c 69 6e 65 2d 69 6e 63 6c 75 64 65 73 20 74  dline-includes t
24c0: 6f 20 73 70 65 63 69 66 79 20 74 68 65 20 64 69  o specify the di
24d0: 72 65 63 74 6f 72 79 0a 20 20 63 6f 6e 74 61 69  rectory.  contai
24e0: 6e 69 6e 67 20 72 65 61 64 6c 69 6e 65 2e 68 20  ning readline.h 
24f0: 6f 6e 20 79 6f 75 72 20 73 79 73 74 65 6d 2e 5d  on your system.]
2500: 29 0a 65 6c 73 65 0a 20 20 20 20 41 43 5f 4d 53  ).else.    AC_MS
2510: 47 5f 52 45 53 55 4c 54 28 24 52 45 41 44 4c 49  G_RESULT($READLI
2520: 4e 45 5f 49 4e 43 4c 55 44 45 5f 44 49 52 2f 72  NE_INCLUDE_DIR/r
2530: 65 61 64 6c 69 6e 65 2e 68 29 0a 09 62 61 73 65  eadline.h)..base
2540: 3d 22 60 28 62 61 73 65 6e 61 6d 65 20 24 7b 52  ="`(basename ${R
2550: 45 41 44 4c 49 4e 45 5f 49 4e 43 4c 55 44 45 5f  EADLINE_INCLUDE_
2560: 44 49 52 7d 29 20 32 3e 2f 64 65 76 2f 6e 75 6c  DIR}) 2>/dev/nul
2570: 6c 60 22 0a 09 69 66 20 74 65 73 74 20 22 78 24  l`"..if test "x$
2580: 7b 62 61 73 65 7d 22 20 21 3d 20 22 78 72 65 61  {base}" != "xrea
2590: 64 6c 69 6e 65 22 3b 20 74 68 65 6e 0a 09 09 41  dline"; then...A
25a0: 43 5f 44 45 46 49 4e 45 5f 55 4e 51 55 4f 54 45  C_DEFINE_UNQUOTE
25b0: 44 28 52 45 41 44 4c 49 4e 45 5f 4c 49 42 52 41  D(READLINE_LIBRA
25c0: 52 59 2c 20 31 29 0a 09 66 69 0a 66 69 0a 0a 0a  RY, 1)..fi.fi...
25d0: 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  .#--------------
25e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
25f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2600: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2610: 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 43 68 65 63 6b  ------.#   Check
2620: 20 66 6f 72 20 6c 69 62 72 65 61 64 6c 69 6e 65   for libreadline
2630: 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  .#--------------
2640: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2650: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2660: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2670: 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f 41 52 47 5f 57  ------..AC_ARG_W
2680: 49 54 48 28 72 65 61 64 6c 69 6e 65 2d 6c 69 62  ITH(readline-lib
2690: 72 61 72 79 2c 0a 20 20 20 20 20 20 20 20 20 20  rary,.          
26a0: 20 20 5b 20 20 2d 2d 77 69 74 68 2d 72 65 61 64    [  --with-read
26b0: 6c 69 6e 65 2d 6c 69 62 72 61 72 79 3d 44 49 52  line-library=DIR
26c0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
26d0: 20 20 20 20 20 20 20 20 20 20 20 72 65 61 64 6c             readl
26e0: 69 6e 65 20 6c 69 62 72 61 72 79 20 66 69 6c 65  ine library file
26f0: 73 20 69 6e 20 44 49 52 5d 2c 0a 20 20 20 20 20  s in DIR],.     
2700: 20 20 20 20 20 20 20 72 6c 5f 6c 69 62 72 61 72         rl_librar
2710: 79 3d 24 77 69 74 68 76 61 6c 2c 20 72 6c 5f 6c  y=$withval, rl_l
2720: 69 62 72 61 72 79 3d 22 22 29 0a 0a 41 43 5f 4d  ibrary="")..AC_M
2730: 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 77 68 65  SG_CHECKING([whe
2740: 72 65 20 74 6f 20 6c 6f 6f 6b 20 66 6f 72 20 6c  re to look for l
2750: 69 62 72 65 61 64 6c 69 6e 65 24 53 48 4c 49 42  ibreadline$SHLIB
2760: 5f 53 55 46 46 49 58 5d 29 0a 52 45 41 44 4c 49  _SUFFIX]).READLI
2770: 4e 45 5f 4c 49 42 5f 44 49 52 3d 22 22 0a 52 45  NE_LIB_DIR="".RE
2780: 41 44 4c 49 4e 45 5f 56 45 52 53 49 4f 4e 5f 53  ADLINE_VERSION_S
2790: 55 46 46 49 58 3d 22 22 0a 66 6f 72 20 64 69 72  UFFIX="".for dir
27a0: 20 69 6e 20 24 72 6c 5f 6c 69 62 72 61 72 79 20   in $rl_library 
27b0: 24 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 50 41  $TCLREADLINE_LPA
27c0: 54 48 20 24 70 72 65 66 69 78 2f 6c 69 62 2f 72  TH $prefix/lib/r
27d0: 65 61 64 6c 69 6e 65 3b 20 64 6f 0a 20 20 20 20  eadline; do.    
27e0: 69 66 20 74 65 73 74 20 2d 72 20 24 64 69 72 2f  if test -r $dir/
27f0: 6c 69 62 72 65 61 64 6c 69 6e 65 24 53 48 4c 49  libreadline$SHLI
2800: 42 5f 53 55 46 46 49 58 3b 20 74 68 65 6e 0a 20  B_SUFFIX; then. 
2810: 20 20 20 20 20 20 20 52 45 41 44 4c 49 4e 45 5f         READLINE_
2820: 4c 49 42 5f 44 49 52 3d 24 64 69 72 0a 20 20 20  LIB_DIR=$dir.   
2830: 20 20 20 20 20 62 72 65 61 6b 0a 20 20 20 20 66       break.    f
2840: 69 0a 20 20 20 20 69 66 20 74 65 73 74 20 2d 72  i.    if test -r
2850: 20 24 64 69 72 2f 6c 69 62 72 65 61 64 6c 69 6e   $dir/libreadlin
2860: 65 24 53 48 4c 49 42 5f 53 55 46 46 49 58 2e 34  e$SHLIB_SUFFIX.4
2870: 2e 30 3b 20 74 68 65 6e 0a 20 20 20 20 20 20 20  .0; then.       
2880: 20 52 45 41 44 4c 49 4e 45 5f 56 45 52 53 49 4f   READLINE_VERSIO
2890: 4e 5f 53 55 46 46 49 58 3d 22 2e 34 2e 30 22 0a  N_SUFFIX=".4.0".
28a0: 20 20 20 20 20 20 20 20 52 45 41 44 4c 49 4e 45          READLINE
28b0: 5f 4c 49 42 5f 44 49 52 3d 24 64 69 72 0a 20 20  _LIB_DIR=$dir.  
28c0: 20 20 20 20 20 20 62 72 65 61 6b 0a 20 20 20 20        break.    
28d0: 66 69 0a 20 20 20 20 69 66 20 74 65 73 74 20 2d  fi.    if test -
28e0: 72 20 24 64 69 72 2f 6c 69 62 72 65 61 64 6c 69  r $dir/libreadli
28f0: 6e 65 24 53 48 4c 49 42 5f 53 55 46 46 49 58 2e  ne$SHLIB_SUFFIX.
2900: 33 2e 30 3b 20 74 68 65 6e 0a 20 20 20 20 20 20  3.0; then.      
2910: 20 20 52 45 41 44 4c 49 4e 45 5f 56 45 52 53 49    READLINE_VERSI
2920: 4f 4e 5f 53 55 46 46 49 58 3d 22 2e 33 2e 30 22  ON_SUFFIX=".3.0"
2930: 0a 20 20 20 20 20 20 20 20 52 45 41 44 4c 49 4e  .        READLIN
2940: 45 5f 4c 49 42 5f 44 49 52 3d 24 64 69 72 0a 20  E_LIB_DIR=$dir. 
2950: 20 20 20 20 20 20 20 62 72 65 61 6b 0a 20 20 20         break.   
2960: 20 66 69 0a 64 6f 6e 65 0a 0a 69 66 20 74 65 73   fi.done..if tes
2970: 74 20 2d 7a 20 22 24 52 45 41 44 4c 49 4e 45 5f  t -z "$READLINE_
2980: 4c 49 42 5f 44 49 52 22 3b 20 74 68 65 6e 0a 20  LIB_DIR"; then. 
2990: 20 20 20 41 43 5f 4d 53 47 5f 45 52 52 4f 52 28     AC_MSG_ERROR(
29a0: 5b 0a 20 20 43 61 6e 27 74 20 66 69 6e 64 20 6c  [.  Can't find l
29b0: 69 62 72 65 61 64 6c 69 6e 65 24 53 48 4c 49 42  ibreadline$SHLIB
29c0: 5f 53 55 46 46 49 58 2e 0a 20 20 55 73 65 20 2d  _SUFFIX..  Use -
29d0: 2d 77 69 74 68 2d 72 65 61 64 6c 69 6e 65 2d 6c  -with-readline-l
29e0: 69 62 72 61 72 79 20 74 6f 20 73 70 65 63 69 66  ibrary to specif
29f0: 79 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 0a  y the directory.
2a00: 20 20 63 6f 6e 74 61 69 6e 69 6e 67 20 6c 69 62    containing lib
2a10: 72 65 61 64 6c 69 6e 65 24 53 48 4c 49 42 5f 53  readline$SHLIB_S
2a20: 55 46 46 49 58 20 6f 6e 20 79 6f 75 72 20 73 79  UFFIX on your sy
2a30: 73 74 65 6d 2e 5d 29 0a 65 6c 73 65 0a 20 20 20  stem.]).else.   
2a40: 20 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 24   AC_MSG_RESULT($
2a50: 7b 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 44 49  {READLINE_LIB_DI
2a60: 52 7d 2f 6c 69 62 72 65 61 64 6c 69 6e 65 24 7b  R}/libreadline${
2a70: 53 48 4c 49 42 5f 53 55 46 46 49 58 7d 24 7b 52  SHLIB_SUFFIX}${R
2a80: 45 41 44 4c 49 4e 45 5f 56 45 52 53 49 4f 4e 5f  EADLINE_VERSION_
2a90: 53 55 46 46 49 58 7d 29 0a 66 69 0a 0a 0a 0a 23  SUFFIX}).fi....#
2aa0: 20 2d 2d 2d 0a 23 20 63 68 65 63 6b 20 66 6f 72   ---.# check for
2ab0: 20 74 68 65 20 74 65 72 6d 69 6e 61 6c 20 6c 69   the terminal li
2ac0: 62 72 61 72 79 2e 0a 23 20 2d 2d 2d 0a 0a 6f 6c  brary..# ---..ol
2ad0: 69 62 73 3d 24 7b 4c 49 42 53 7d 0a 41 43 5f 41  ibs=${LIBS}.AC_A
2ae0: 52 47 5f 57 49 54 48 28 74 6c 69 62 2d 6c 69 62  RG_WITH(tlib-lib
2af0: 72 61 72 79 2c 0a 20 20 20 20 20 20 20 20 20 20  rary,.          
2b00: 20 20 5b 20 20 2d 2d 77 69 74 68 2d 74 6c 69 62    [  --with-tlib
2b10: 2d 6c 69 62 72 61 72 79 3d 44 49 52 0a 20 20 20  -library=DIR.   
2b20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
2b30: 20 20 20 20 20 20 20 77 68 65 72 65 20 74 6f 20         where to 
2b40: 73 65 61 72 63 68 20 66 6f 72 20 63 75 72 73 65  search for curse
2b50: 73 20 2f 20 74 65 72 6d 63 61 70 5d 2c 0a 20 20  s / termcap],.  
2b60: 20 20 20 20 20 20 20 20 20 20 74 6c 69 62 5f 6c            tlib_l
2b70: 69 62 72 61 72 79 3d 24 77 69 74 68 76 61 6c 2c  ibrary=$withval,
2b80: 20 74 6c 69 62 5f 6c 69 62 72 61 72 79 3d 22 22   tlib_library=""
2b90: 29 0a 0a 41 43 5f 4d 53 47 5f 43 48 45 43 4b 49  )..AC_MSG_CHECKI
2ba0: 4e 47 28 5b 77 68 65 72 65 20 74 6f 20 6c 6f 6f  NG([where to loo
2bb0: 6b 20 66 6f 72 20 74 68 65 20 74 65 72 6d 69 6e  k for the termin
2bc0: 61 6c 20 6c 69 62 72 61 72 79 5d 29 0a 54 45 52  al library]).TER
2bd0: 4d 4c 49 42 5f 44 49 52 3d 22 22 0a 54 45 52 4d  MLIB_DIR="".TERM
2be0: 4c 49 42 5f 56 45 52 53 49 4f 4e 5f 53 55 46 46  LIB_VERSION_SUFF
2bf0: 49 58 3d 22 22 0a 66 6f 72 20 64 69 72 20 69 6e  IX="".for dir in
2c00: 20 24 74 6c 69 62 5f 6c 69 62 72 61 72 79 20 24   $tlib_library $
2c10: 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 50 41 54  TCLREADLINE_LPAT
2c20: 48 20 24 70 72 65 66 69 78 2f 6c 69 62 2f 3b 20  H $prefix/lib/; 
2c30: 64 6f 0a 09 66 6f 72 20 74 6c 69 62 20 69 6e 20  do..for tlib in 
2c40: 6e 63 75 72 73 65 73 20 74 65 72 6d 6c 69 62 20  ncurses termlib 
2c50: 74 65 72 6d 63 61 70 20 63 75 72 73 65 73 3b 20  termcap curses; 
2c60: 64 6f 0a 09 09 64 6e 6c 20 49 74 27 73 20 70 6f  do...dnl It's po
2c70: 73 73 69 62 6c 65 20 74 68 61 74 20 61 20 6c 69  ssible that a li
2c80: 62 72 61 72 79 20 69 73 20 66 6f 75 6e 64 20 62  brary is found b
2c90: 75 74 20 69 74 20 64 6f 65 73 6e 27 74 20 77 6f  ut it doesn't wo
2ca0: 72 6b 0a 09 09 64 6e 6c 20 65 2e 67 2e 2c 20 73  rk...dnl e.g., s
2cb0: 68 61 72 65 64 20 6c 69 62 72 61 72 79 20 74 68  hared library th
2cc0: 61 74 20 63 61 6e 6e 6f 74 20 62 65 20 66 6f 75  at cannot be fou
2cd0: 6e 64 0a 09 09 64 6e 6c 20 63 6f 6d 70 69 6c 65  nd...dnl compile
2ce0: 20 61 6e 64 20 72 75 6e 20 61 20 74 65 73 74 20   and run a test 
2cf0: 70 72 6f 67 72 61 6d 20 74 6f 20 62 65 20 73 75  program to be su
2d00: 72 65 0a 09 09 64 6e 6c 20 65 63 68 6f 20 22 22  re...dnl echo ""
2d10: 0a 09 09 64 6e 6c 20 65 63 68 6f 20 22 22 0a 09  ...dnl echo ""..
2d20: 09 4c 49 42 53 3d 22 2d 4c 24 7b 64 69 72 7d 20  .LIBS="-L${dir} 
2d30: 2d 6c 24 7b 74 6c 69 62 7d 22 0a 09 09 41 43 5f  -l${tlib}"...AC_
2d40: 54 52 59 5f 52 55 4e 28 5b 0a 23 69 66 64 65 66  TRY_RUN([.#ifdef
2d50: 20 48 41 56 45 5f 54 45 52 4d 43 41 50 5f 48 0a   HAVE_TERMCAP_H.
2d60: 23 20 69 6e 63 6c 75 64 65 20 3c 74 65 72 6d 63  # include <termc
2d70: 61 70 2e 68 3e 0a 23 65 6e 64 69 66 0a 6d 61 69  ap.h>.#endif.mai
2d80: 6e 28 29 20 7b 63 68 61 72 20 2a 73 3b 20 73 3d  n() {char *s; s=
2d90: 28 63 68 61 72 20 2a 29 74 67 6f 74 6f 28 22 25  (char *)tgoto("%
2da0: 70 31 25 64 22 2c 20 30 2c 20 31 29 3b 20 65 78  p1%d", 0, 1); ex
2db0: 69 74 28 30 29 3b 20 7d 5d 2c 0a 09 72 65 73 3d  it(0); }],..res=
2dc0: 22 4f 4b 22 2c 20 72 65 73 3d 22 46 41 49 4c 22  "OK", res="FAIL"
2dd0: 2c 20 72 65 73 3d 22 46 41 49 4c 22 29 0a 09 09  , res="FAIL")...
2de0: 69 66 20 74 65 73 74 20 22 24 72 65 73 22 20 3d  if test "$res" =
2df0: 20 22 4f 4b 22 3b 20 74 68 65 6e 0a 09 09 09 54   "OK"; then....T
2e00: 45 52 4d 4c 49 42 5f 44 49 52 3d 2d 4c 24 7b 64  ERMLIB_DIR=-L${d
2e10: 69 72 7d 0a 09 09 09 69 66 20 74 65 73 74 20 22  ir}....if test "
2e20: 60 28 75 6e 61 6d 65 29 20 32 3e 2f 64 65 76 2f  `(uname) 2>/dev/
2e30: 6e 75 6c 6c 60 22 20 3d 20 53 75 6e 4f 53 20 26  null`" = SunOS &
2e40: 26 0a 09 09 09 09 75 6e 61 6d 65 20 2d 72 20 7c  &.....uname -r |
2e50: 20 67 72 65 70 20 27 5e 35 27 20 3e 2f 64 65 76   grep '^5' >/dev
2e60: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09  /null; then.....
2e70: 54 45 52 4d 4c 49 42 5f 44 49 52 5f 52 3d 22 24  TERMLIB_DIR_R="$
2e80: 7b 54 45 52 4d 4c 49 42 5f 44 49 52 7d 20 2d 52  {TERMLIB_DIR} -R
2e90: 24 7b 64 69 72 7d 22 0a 09 09 09 66 69 0a 09 09  ${dir}"....fi...
2ea0: 09 54 45 52 4d 4c 49 42 3d 2d 6c 24 7b 74 6c 69  .TERMLIB=-l${tli
2eb0: 62 7d 0a 09 09 09 62 72 65 61 6b 0a 09 09 66 69  b}....break...fi
2ec0: 0a 09 09 69 66 20 74 65 73 74 20 22 78 24 7b 54  ...if test "x${T
2ed0: 45 52 4d 4c 49 42 5f 44 49 52 7d 22 20 3d 20 22  ERMLIB_DIR}" = "
2ee0: 78 22 3b 20 74 68 65 6e 0a 09 09 09 41 43 5f 4d  x"; then....AC_M
2ef0: 53 47 5f 52 45 53 55 4c 54 28 24 4c 49 42 53 20  SG_RESULT($LIBS 
2f00: 69 73 20 75 6e 75 73 61 62 6c 65 29 0a 09 09 65  is unusable)...e
2f10: 6c 73 65 0a 09 09 09 62 72 65 61 6b 0a 09 09 66  lse....break...f
2f20: 69 0a 09 64 6f 6e 65 0a 09 69 66 20 74 65 73 74  i..done..if test
2f30: 20 22 78 24 7b 54 45 52 4d 4c 49 42 5f 44 49 52   "x${TERMLIB_DIR
2f40: 7d 22 20 21 3d 20 22 78 22 3b 20 74 68 65 6e 0a  }" != "x"; then.
2f50: 09 09 62 72 65 61 6b 0a 09 66 69 0a 64 6f 6e 65  ..break..fi.done
2f60: 0a 0a 69 66 20 74 65 73 74 20 22 78 24 54 45 52  ..if test "x$TER
2f70: 4d 4c 49 42 5f 44 49 52 22 20 3d 20 22 78 22 3b  MLIB_DIR" = "x";
2f80: 20 74 68 65 6e 0a 09 41 43 5f 4d 53 47 5f 45 52   then..AC_MSG_ER
2f90: 52 4f 52 28 5b 0a 6e 6f 20 74 65 72 6d 69 6e 61  ROR([.no termina
2fa0: 6c 20 6c 69 62 72 61 72 79 20 66 6f 75 6e 64 2e  l library found.
2fb0: 20 50 6c 65 61 73 65 20 72 65 74 72 79 20 77 69   Please retry wi
2fc0: 74 68 20 74 68 65 20 2d 2d 77 69 74 68 2d 74 6c  th the --with-tl
2fd0: 69 62 20 61 72 67 75 6d 65 6e 74 2e 5d 29 0a 65  ib argument.]).e
2fe0: 6c 73 65 0a 09 41 43 5f 4d 53 47 5f 52 45 53 55  lse..AC_MSG_RESU
2ff0: 4c 54 28 24 7b 54 45 52 4d 4c 49 42 5f 44 49 52  LT(${TERMLIB_DIR
3000: 7d 20 24 7b 54 45 52 4d 4c 49 42 7d 29 0a 66 69  } ${TERMLIB}).fi
3010: 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ...#------------
3020: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
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 0a 23 20 20 20 43 68 65  --------.#   Che
3060: 63 6b 20 66 6f 72 20 61 70 70 72 6f 70 72 69 61  ck for appropria
3070: 74 65 20 76 65 72 73 69 6f 6e 20 6f 66 20 67 6e  te version of gn
3080: 75 20 72 65 61 64 6c 69 6e 65 0a 23 20 20 20 28  u readline.#   (
3090: 6f 6c 64 65 72 20 76 65 72 73 69 6f 6e 73 20 6f  older versions o
30a0: 66 20 67 6e 75 20 72 65 61 64 6c 69 6e 65 20 64  f gnu readline d
30b0: 6f 6e 27 74 20 68 61 76 65 0a 23 20 20 20 20 72  on't have.#    r
30c0: 6c 5f 63 61 6c 6c 62 61 63 6b 5f 72 65 61 64 5f  l_callback_read_
30d0: 63 68 61 72 20 28 29 29 2e 0a 23 2d 2d 2d 2d 2d  char ())..#-----
30e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
30f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3100: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3110: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
3120: 0a 4c 49 42 53 3d 22 2d 4c 24 52 45 41 44 4c 49  .LIBS="-L$READLI
3130: 4e 45 5f 4c 49 42 5f 44 49 52 20 24 7b 54 45 52  NE_LIB_DIR ${TER
3140: 4d 4c 49 42 5f 44 49 52 7d 20 2d 6c 72 65 61 64  MLIB_DIR} -lread
3150: 6c 69 6e 65 20 24 54 45 52 4d 4c 49 42 20 24 6f  line $TERMLIB $o
3160: 6c 69 62 73 22 0a 61 6c 74 65 72 6e 61 74 65 3d  libs".alternate=
3170: 6e 6f 0a 41 43 5f 43 48 45 43 4b 5f 46 55 4e 43  no.AC_CHECK_FUNC
3180: 28 0a 20 20 20 20 72 6c 5f 63 61 6c 6c 62 61 63  (.    rl_callbac
3190: 6b 5f 72 65 61 64 5f 63 68 61 72 2c 20 61 6c 74  k_read_char, alt
31a0: 65 72 6e 61 74 65 3d 79 65 73 2c 20 61 6c 74 65  ernate=yes, alte
31b0: 72 6e 61 74 65 3d 6e 6f 0a 29 0a 69 66 20 74 65  rnate=no.).if te
31c0: 73 74 20 22 24 61 6c 74 65 72 6e 61 74 65 22 20  st "$alternate" 
31d0: 3d 20 22 6e 6f 22 3b 20 74 68 65 6e 0a 20 20 20  = "no"; then.   
31e0: 20 41 43 5f 4d 53 47 5f 45 52 52 4f 52 28 61 6c   AC_MSG_ERROR(al
31f0: 74 65 72 6e 61 74 65 20 69 6e 74 65 72 66 61 63  ternate interfac
3200: 65 20 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 20  e not supported 
3210: 62 79 20 74 68 69 73 20 72 65 61 64 6c 69 6e 65  by this readline
3220: 20 76 65 72 73 69 6f 6e 2e 29 0a 66 69 0a 0a 0a   version.).fi...
3230: 23 20 63 68 65 63 6b 20 66 6f 72 20 72 65 61 64  # check for read
3240: 6c 69 6e 65 27 73 20 28 6d 61 63 72 6f 2e 63 29  line's (macro.c)
3250: 20 70 72 69 76 61 74 65 20 76 61 72 69 61 62 6c   private variabl
3260: 65 0a 23 20 5f 72 6c 5f 65 78 65 63 75 74 69 6e  e.# _rl_executin
3270: 67 5f 6d 61 63 72 6f 2e 0a 0a 41 43 5f 4d 53 47  g_macro...AC_MSG
3280: 5f 43 48 45 43 4b 49 4e 47 28 5b 66 6f 72 20 5f  _CHECKING([for _
3290: 72 6c 5f 65 78 65 63 75 74 69 6e 67 5f 6d 61 63  rl_executing_mac
32a0: 72 6f 20 69 6e 20 2d 6c 72 65 61 64 6c 69 6e 65  ro in -lreadline
32b0: 5d 29 0a 41 43 5f 54 52 59 5f 4c 49 4e 4b 28 2c  ]).AC_TRY_LINK(,
32c0: 5b 0a 09 65 78 74 65 72 6e 20 63 68 61 72 2a 20  [..extern char* 
32d0: 5f 72 6c 5f 65 78 65 63 75 74 69 6e 67 5f 6d 61  _rl_executing_ma
32e0: 63 72 6f 3b 0a 09 5f 72 6c 5f 65 78 65 63 75 74  cro;.._rl_execut
32f0: 69 6e 67 5f 6d 61 63 72 6f 20 3d 20 28 63 68 61  ing_macro = (cha
3300: 72 2a 29 20 30 3b 0a 5d 2c 0a 20 20 20 20 41 43  r*) 0;.],.    AC
3310: 5f 4d 53 47 5f 52 45 53 55 4c 54 28 79 65 73 29  _MSG_RESULT(yes)
3320: 3b 20 41 43 5f 44 45 46 49 4e 45 5f 55 4e 51 55  ; AC_DEFINE_UNQU
3330: 4f 54 45 44 28 45 58 45 43 55 54 49 4e 47 5f 4d  OTED(EXECUTING_M
3340: 41 43 52 4f 5f 48 41 43 4b 2c 20 31 29 2c 0a 20  ACRO_HACK, 1),. 
3350: 20 20 20 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54     AC_MSG_RESULT
3360: 28 6e 6f 29 29 0a 0a 23 20 63 68 65 63 6b 20 66  (no))..# check f
3370: 6f 72 20 72 65 61 64 6c 69 6e 65 27 73 20 72 6c  or readline's rl
3380: 5f 63 6c 65 61 6e 75 70 5f 61 66 74 65 72 5f 73  _cleanup_after_s
3390: 69 67 6e 61 6c 0a 0a 41 43 5f 4d 53 47 5f 43 48  ignal..AC_MSG_CH
33a0: 45 43 4b 49 4e 47 28 5b 66 6f 72 20 72 6c 5f 63  ECKING([for rl_c
33b0: 6c 65 61 6e 75 70 5f 61 66 74 65 72 5f 73 69 67  leanup_after_sig
33c0: 6e 61 6c 28 29 20 69 6e 20 2d 6c 72 65 61 64 6c  nal() in -lreadl
33d0: 69 6e 65 5d 29 0a 41 43 5f 54 52 59 5f 4c 49 4e  ine]).AC_TRY_LIN
33e0: 4b 28 2c 5b 0a 20 20 20 20 65 78 74 65 72 6e 20  K(,[.    extern 
33f0: 76 6f 69 64 20 72 6c 5f 63 6c 65 61 6e 75 70 5f  void rl_cleanup_
3400: 61 66 74 65 72 5f 73 69 67 6e 61 6c 28 29 3b 0a  after_signal();.
3410: 09 72 6c 5f 63 6c 65 61 6e 75 70 5f 61 66 74 65  .rl_cleanup_afte
3420: 72 5f 73 69 67 6e 61 6c 28 29 3b 0a 5d 2c 0a 20  r_signal();.],. 
3430: 20 20 20 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54     AC_MSG_RESULT
3440: 28 79 65 73 29 3b 20 41 43 5f 44 45 46 49 4e 45  (yes); AC_DEFINE
3450: 5f 55 4e 51 55 4f 54 45 44 28 43 4c 45 41 4e 55  _UNQUOTED(CLEANU
3460: 50 5f 41 46 45 52 5f 53 49 47 4e 41 4c 2c 20 31  P_AFER_SIGNAL, 1
3470: 29 2c 0a 20 20 20 20 41 43 5f 4d 53 47 5f 52 45  ),.    AC_MSG_RE
3480: 53 55 4c 54 28 6e 6f 29 29 0a 0a 0a 41 43 5f 4d  SULT(no))...AC_M
3490: 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 66 6f 72  SG_CHECKING([for
34a0: 20 74 68 65 20 72 65 61 64 6c 69 6e 65 20 76 65   the readline ve
34b0: 72 73 69 6f 6e 20 6e 75 6d 62 65 72 5d 29 0a 41  rsion number]).A
34c0: 43 5f 54 52 59 5f 52 55 4e 28 5b 0a 23 69 6e 63  C_TRY_RUN([.#inc
34d0: 6c 75 64 65 20 3c 73 74 64 69 6f 2e 68 3e 0a 69  lude <stdio.h>.i
34e0: 6e 74 20 6d 61 69 6e 20 28 29 20 7b 0a 20 20 20  nt main () {.   
34f0: 20 46 49 4c 45 20 2a 66 70 20 3d 20 66 6f 70 65   FILE *fp = fope
3500: 6e 28 22 63 6f 6e 66 74 65 73 74 76 65 72 73 69  n("conftestversi
3510: 6f 6e 22 2c 20 22 77 22 29 3b 0a 20 20 20 20 65  on", "w");.    e
3520: 78 74 65 72 6e 20 63 68 61 72 20 2a 72 6c 5f 6c  xtern char *rl_l
3530: 69 62 72 61 72 79 5f 76 65 72 73 69 6f 6e 3b 0a  ibrary_version;.
3540: 20 20 20 20 66 70 72 69 6e 74 66 28 66 70 2c 20      fprintf(fp, 
3550: 22 25 73 22 2c 20 72 6c 5f 6c 69 62 72 61 72 79  "%s", rl_library
3560: 5f 76 65 72 73 69 6f 6e 29 3b 0a 20 20 20 20 63  _version);.    c
3570: 6c 6f 73 65 28 66 70 29 3b 0a 20 20 20 20 72 65  lose(fp);.    re
3580: 74 75 72 6e 20 30 3b 0a 7d 5d 2c 0a 20 20 20 20  turn 0;.}],.    
3590: 52 45 41 44 4c 49 4e 45 5f 56 45 52 53 49 4f 4e  READLINE_VERSION
35a0: 3d 60 63 61 74 20 63 6f 6e 66 74 65 73 74 76 65  =`cat conftestve
35b0: 72 73 69 6f 6e 60 0a 20 20 20 20 41 43 5f 4d 53  rsion`.    AC_MS
35c0: 47 5f 52 45 53 55 4c 54 28 24 52 45 41 44 4c 49  G_RESULT($READLI
35d0: 4e 45 5f 56 45 52 53 49 4f 4e 29 2c 0a 20 20 20  NE_VERSION),.   
35e0: 20 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 66   AC_MSG_RESULT(f
35f0: 61 69 6c 65 64 29 2c 0a 20 20 20 20 41 43 5f 4d  ailed),.    AC_M
3600: 53 47 5f 52 45 53 55 4c 54 28 6e 6f 20 63 72 6f  SG_RESULT(no cro
3610: 73 73 20 63 6f 6d 70 69 6c 69 6e 67 29 29 0a 0a  ss compiling))..
3620: 0a 0a 0a 23 20 54 68 69 73 20 69 73 20 61 20 74  ...# This is a t
3630: 65 73 74 0a 23 41 43 5f 43 5f 42 49 47 45 4e 44  est.#AC_C_BIGEND
3640: 49 41 4e 0a 0a 23 20 54 4f 44 4f 3a 20 63 68 65  IAN..# TODO: che
3650: 63 6b 20 66 6f 72 20 72 65 61 64 6c 69 6e 65 20  ck for readline 
3660: 76 65 72 73 69 6f 6e 0a 23 20 28 6c 69 6e 6b 20  version.# (link 
3670: 74 65 73 74 70 72 6f 67 72 61 6d 20 77 69 74 68  testprogram with
3680: 20 2d 6c 72 65 61 64 6c 69 6e 65 29 0a 0a 41 43   -lreadline)..AC
3690: 5f 53 55 42 53 54 28 54 43 4c 52 45 41 44 4c 49  _SUBST(TCLREADLI
36a0: 4e 45 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e  NE_MAJOR_VERSION
36b0: 29 0a 41 43 5f 53 55 42 53 54 28 54 43 4c 52 45  ).AC_SUBST(TCLRE
36c0: 41 44 4c 49 4e 45 5f 4d 49 4e 4f 52 5f 56 45 52  ADLINE_MINOR_VER
36d0: 53 49 4f 4e 29 0a 41 43 5f 53 55 42 53 54 28 54  SION).AC_SUBST(T
36e0: 43 4c 52 45 41 44 4c 49 4e 45 5f 56 45 52 53 49  CLREADLINE_VERSI
36f0: 4f 4e 29 0a 41 43 5f 53 55 42 53 54 28 54 43 4c  ON).AC_SUBST(TCL
3700: 52 45 41 44 4c 49 4e 45 5f 50 41 54 43 48 4c 45  READLINE_PATCHLE
3710: 56 45 4c 29 0a 41 43 5f 53 55 42 53 54 28 54 43  VEL).AC_SUBST(TC
3720: 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 52 41 52  LREADLINE_LIBRAR
3730: 59 29 0a 41 43 5f 53 55 42 53 54 28 54 43 4c 52  Y).AC_SUBST(TCLR
3740: 45 41 44 4c 49 4e 45 5f 50 41 54 43 48 4c 45 56  EADLINE_PATCHLEV
3750: 45 4c 5f 53 54 52 29 0a 0a 0a 41 43 5f 53 55 42  EL_STR)...AC_SUB
3760: 53 54 28 54 43 4c 5f 4c 49 42 5f 44 49 52 29 0a  ST(TCL_LIB_DIR).
3770: 41 43 5f 53 55 42 53 54 28 54 43 4c 5f 49 4e 43  AC_SUBST(TCL_INC
3780: 4c 55 44 45 5f 44 49 52 29 0a 41 43 5f 53 55 42  LUDE_DIR).AC_SUB
3790: 53 54 28 52 45 41 44 4c 49 4e 45 5f 49 4e 43 4c  ST(READLINE_INCL
37a0: 55 44 45 5f 44 49 52 29 0a 0a 41 43 5f 53 55 42  UDE_DIR)..AC_SUB
37b0: 53 54 28 43 46 4c 41 47 53 29 0a 41 43 5f 53 55  ST(CFLAGS).AC_SU
37c0: 42 53 54 28 44 4c 5f 4c 49 42 53 29 0a 41 43 5f  BST(DL_LIBS).AC_
37d0: 53 55 42 53 54 28 4c 44 5f 46 4c 41 47 53 29 0a  SUBST(LD_FLAGS).
37e0: 41 43 5f 53 55 42 53 54 28 52 41 4e 4c 49 42 29  AC_SUBST(RANLIB)
37f0: 0a 0a 41 43 5f 53 55 42 53 54 28 4d 41 4b 45 5f  ..AC_SUBST(MAKE_
3800: 4c 49 42 29 0a 41 43 5f 53 55 42 53 54 28 53 48  LIB).AC_SUBST(SH
3810: 4c 49 42 5f 43 46 4c 41 47 53 29 0a 0a 41 43 5f  LIB_CFLAGS)..AC_
3820: 53 55 42 53 54 28 53 48 4c 49 42 5f 4c 44 29 0a  SUBST(SHLIB_LD).
3830: 41 43 5f 53 55 42 53 54 28 53 48 4c 49 42 5f 4c  AC_SUBST(SHLIB_L
3840: 44 5f 4c 49 42 53 29 0a 0a 41 43 5f 53 55 42 53  D_LIBS)..AC_SUBS
3850: 54 28 53 48 4c 49 42 5f 53 55 46 46 49 58 29 0a  T(SHLIB_SUFFIX).
3860: 0a 41 43 5f 53 55 42 53 54 28 54 45 52 4d 4c 49  .AC_SUBST(TERMLI
3870: 42 29 0a 41 43 5f 53 55 42 53 54 28 54 45 52 4d  B).AC_SUBST(TERM
3880: 4c 49 42 5f 44 49 52 29 0a 41 43 5f 53 55 42 53  LIB_DIR).AC_SUBS
3890: 54 28 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 44  T(READLINE_LIB_D
38a0: 49 52 29 0a 0a 41 43 5f 53 55 42 53 54 28 54 43  IR)..AC_SUBST(TC
38b0: 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 46 49  LREADLINE_LIB_FI
38c0: 4c 45 29 0a 41 43 5f 53 55 42 53 54 28 54 43 4c  LE).AC_SUBST(TCL
38d0: 52 45 41 44 4c 49 4e 45 5f 42 55 49 4c 44 5f 4c  READLINE_BUILD_L
38e0: 49 42 5f 53 50 45 43 29 0a 41 43 5f 53 55 42 53  IB_SPEC).AC_SUBS
38f0: 54 28 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 49  T(TCLREADLINE_LI
3900: 42 5f 53 50 45 43 29 0a 0a 41 43 5f 53 55 42 53  B_SPEC)..AC_SUBS
3910: 54 28 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 49  T(TCLREADLINE_LI
3920: 42 5f 44 49 52 29 0a 41 43 5f 53 55 42 53 54 28  B_DIR).AC_SUBST(
3930: 54 43 4c 52 45 41 44 4c 49 4e 45 5f 50 4b 47 5f  TCLREADLINE_PKG_
3940: 46 49 4c 45 29 0a 0a 41 43 5f 53 55 42 53 54 28  FILE)..AC_SUBST(
3950: 54 43 4c 52 45 41 44 4c 49 4e 45 5f 50 41 43 4b  TCLREADLINE_PACK
3960: 41 47 45 5f 50 41 54 48 29 0a 0a 0a 41 43 5f 4f  AGE_PATH)...AC_O
3970: 55 54 50 55 54 28 4d 61 6b 65 66 69 6c 65 20 74  UTPUT(Makefile t
3980: 63 6c 72 65 61 64 6c 69 6e 65 2e 68 20 74 63 6c  clreadline.h tcl
3990: 72 65 61 64 6c 69 6e 65 49 6e 69 74 2e 74 63 6c  readlineInit.tcl
39a0: 20 74 63 6c 72 65 61 64 6c 69 6e 65 53 65 74 75   tclreadlineSetu
39b0: 70 2e 74 63 6c 20 74 63 6c 72 65 61 64 6c 69 6e  p.tcl tclreadlin
39c0: 65 43 6f 6e 66 69 67 2e 73 68 20 74 63 6c 72 65  eConfig.sh tclre
39d0: 61 64 6c 69 6e 65 2e 6e 20 70 6b 67 49 6e 64 65  adline.n pkgInde
39e0: 78 2e 74 63 6c 29 0a 0a 0a 23 54 43 4c 5f 43 43  x.tcl)...#TCL_CC
39f0: 3d 27 63 63 27 0a 23 54 43 4c 5f 43 46 4c 41 47  ='cc'.#TCL_CFLAG
3a00: 53 5f 44 45 42 55 47 3d 27 2d 67 27 0a 23 54 43  S_DEBUG='-g'.#TC
3a10: 4c 5f 43 46 4c 41 47 53 5f 4f 50 54 49 4d 49 5a  L_CFLAGS_OPTIMIZ
3a20: 45 3d 27 2d 4f 27 0a 23 54 43 4c 5f 53 48 41 52  E='-O'.#TCL_SHAR
3a30: 45 44 5f 42 55 49 4c 44 3d 31 0a 23 0a 23 54 43  ED_BUILD=1.#.#TC
3a40: 4c 5f 50 52 45 46 49 58 3d 27 2f 75 73 72 2f 6c  L_PREFIX='/usr/l
3a50: 6f 63 61 6c 27 0a 23 54 43 4c 5f 45 58 45 43 5f  ocal'.#TCL_EXEC_
3a60: 50 52 45 46 49 58 3d 27 2f 75 73 72 2f 6c 6f 63  PREFIX='/usr/loc
3a70: 61 6c 27 0a 23 0a 23 54 43 4c 5f 53 48 4c 49 42  al'.#.#TCL_SHLIB
3a80: 5f 43 46 4c 41 47 53 3d 27 2d 66 50 49 43 27 0a  _CFLAGS='-fPIC'.
3a90: 23 54 43 4c 5f 53 48 4c 49 42 5f 4c 44 3d 27 63  #TCL_SHLIB_LD='c
3aa0: 63 20 2d 73 68 61 72 65 64 27 0a 23 54 43 4c 5f  c -shared'.#TCL_
3ab0: 53 48 4c 49 42 5f 53 55 46 46 49 58 3d 27 2e 73  SHLIB_SUFFIX='.s
3ac0: 6f 27 0a 23 54 43 4c 5f 44 4c 5f 4c 49 42 53 3d  o'.#TCL_DL_LIBS=
3ad0: 27 2d 6c 64 6c 27 0a 23 54 43 4c 5f 4c 44 5f 46  '-ldl'.#TCL_LD_F
3ae0: 4c 41 47 53 3d 27 2d 72 64 79 6e 61 6d 69 63 27  LAGS='-rdynamic'
3af0: 0a 23 54 43 4c 5f 4c 44 5f 53 45 41 52 43 48 5f  .#TCL_LD_SEARCH_
3b00: 46 4c 41 47 53 3d 27 27 0a 23 54 43 4c 5f 52 41  FLAGS=''.#TCL_RA
3b10: 4e 4c 49 42 3d 27 3a 27 0a 23 54 43 4c 5f 50 41  NLIB=':'.#TCL_PA
3b20: 43 4b 41 47 45 5f 50 41 54 48 3d 27 2f 75 73 72  CKAGE_PATH='/usr
3b30: 2f 6c 6f 63 61 6c 2f 6c 69 62 27 0a              /local/lib'.