Hex Artifact Content
Not logged in

Artifact 6f48a841a330988e6ba95f61a1d9710995179f34:


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 30 31 2f 68 6f 6d 65 2f 6a 6f 7a 65 2f 73 72  k01/home/joze/sr
0030: 63 2f 74 63 6c 72 65 61 64 6c 69 6e 65 2f 63 6f  c/tclreadline/co
0040: 6e 66 69 67 75 72 65 2e 69 6e 22 0a 23 20 4c 41  nfigure.in".# LA
0050: 53 54 20 4d 4f 44 49 46 49 43 41 54 49 4f 4e 3a  ST MODIFICATION:
0060: 20 22 4d 6f 6e 20 53 65 70 20 32 30 20 30 32 3a   "Mon Sep 20 02:
0070: 33 37 3a 30 33 20 31 39 39 39 20 28 6a 6f 7a 65  37:03 1999 (joze
0080: 29 22 0a 23 20 28 43 29 20 31 39 39 38 2c 20 31  )".# (C) 1998, 1
0090: 39 39 39 20 62 79 20 4a 6f 68 61 6e 6e 65 73 20  999 by Johannes 
00a0: 5a 65 6c 6c 6e 65 72 2c 20 3c 6a 6f 68 61 6e 6e  Zellner, <johann
00b0: 65 73 40 7a 65 6c 6c 6e 65 72 2e 6f 72 67 3e 0a  es@zellner.org>.
00c0: 23 20 24 49 64 24 0a 23 20 2d 2d 2d 0a 23 0a 23  # $Id$.# ---.#.#
00d0: 20 74 63 6c 72 65 61 64 6c 69 6e 65 20 2d 2d 20   tclreadline -- 
00e0: 67 6e 75 20 72 65 61 64 6c 69 6e 65 20 66 6f 72  gnu readline for
00f0: 20 74 63 6c 0a 23 20 43 6f 70 79 72 69 67 68 74   tcl.# Copyright
0100: 20 28 43 29 20 31 39 39 39 20 20 4a 6f 68 61 6e   (C) 1999  Johan
0110: 6e 65 73 20 5a 65 6c 6c 6e 65 72 0a 23 0a 23 20  nes Zellner.#.# 
0120: 54 68 69 73 20 70 72 6f 67 72 61 6d 20 69 73 20  This program is 
0130: 66 72 65 65 20 73 6f 66 74 77 61 72 65 3b 20 79  free software; y
0140: 6f 75 20 63 61 6e 20 72 65 64 69 73 74 72 69 62  ou can redistrib
0150: 75 74 65 20 69 74 20 61 6e 64 2f 6f 72 0a 23 20  ute it and/or.# 
0160: 6d 6f 64 69 66 79 20 69 74 20 75 6e 64 65 72 20  modify it under 
0170: 74 68 65 20 74 65 72 6d 73 20 6f 66 20 74 68 65  the terms of the
0180: 20 47 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 62   GNU General Pub
0190: 6c 69 63 20 4c 69 63 65 6e 73 65 0a 23 20 61 73  lic License.# as
01a0: 20 70 75 62 6c 69 73 68 65 64 20 62 79 20 74 68   published by th
01b0: 65 20 46 72 65 65 20 53 6f 66 74 77 61 72 65 20  e Free Software 
01c0: 46 6f 75 6e 64 61 74 69 6f 6e 3b 20 65 69 74 68  Foundation; eith
01d0: 65 72 20 76 65 72 73 69 6f 6e 20 32 0a 23 20 6f  er version 2.# o
01e0: 66 20 74 68 65 20 4c 69 63 65 6e 73 65 2c 20 6f  f the License, o
01f0: 72 20 28 61 74 20 79 6f 75 72 20 6f 70 74 69 6f  r (at your optio
0200: 6e 29 20 61 6e 79 20 6c 61 74 65 72 20 76 65 72  n) any later ver
0210: 73 69 6f 6e 2e 0a 23 0a 23 20 54 68 69 73 20 70  sion..#.# This p
0220: 72 6f 67 72 61 6d 20 69 73 20 64 69 73 74 72 69  rogram is distri
0230: 62 75 74 65 64 20 69 6e 20 74 68 65 20 68 6f 70  buted in the hop
0240: 65 20 74 68 61 74 20 69 74 20 77 69 6c 6c 20 62  e that it will b
0250: 65 20 75 73 65 66 75 6c 2c 0a 23 20 62 75 74 20  e useful,.# but 
0260: 57 49 54 48 4f 55 54 20 41 4e 59 20 57 41 52 52  WITHOUT ANY WARR
0270: 41 4e 54 59 3b 20 77 69 74 68 6f 75 74 20 65 76  ANTY; without ev
0280: 65 6e 20 74 68 65 20 69 6d 70 6c 69 65 64 20 77  en the implied w
0290: 61 72 72 61 6e 74 79 20 6f 66 0a 23 20 4d 45 52  arranty of.# MER
02a0: 43 48 41 4e 54 41 42 49 4c 49 54 59 20 6f 72 20  CHANTABILITY or 
02b0: 46 49 54 4e 45 53 53 20 46 4f 52 20 41 20 50 41  FITNESS FOR A PA
02c0: 52 54 49 43 55 4c 41 52 20 50 55 52 50 4f 53 45  RTICULAR PURPOSE
02d0: 2e 20 20 53 65 65 20 74 68 65 0a 23 20 47 4e 55  .  See the.# GNU
02e0: 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 20   General Public 
02f0: 4c 69 63 65 6e 73 65 20 66 6f 72 20 6d 6f 72 65  License for more
0300: 20 64 65 74 61 69 6c 73 2e 0a 23 0a 23 20 59 6f   details..#.# Yo
0310: 75 20 73 68 6f 75 6c 64 20 68 61 76 65 20 72 65  u should have re
0320: 63 65 69 76 65 64 20 61 20 63 6f 70 79 20 6f 66  ceived a copy of
0330: 20 74 68 65 20 47 4e 55 20 47 65 6e 65 72 61 6c   the GNU General
0340: 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 0a   Public License.
0350: 23 20 61 6c 6f 6e 67 20 77 69 74 68 20 74 68 69  # along with thi
0360: 73 20 70 72 6f 67 72 61 6d 3b 20 69 66 20 6e 6f  s program; if no
0370: 74 2c 20 77 72 69 74 65 20 74 6f 20 74 68 65 20  t, write to the 
0380: 46 72 65 65 20 53 6f 66 74 77 61 72 65 0a 23 20  Free Software.# 
0390: 46 6f 75 6e 64 61 74 69 6f 6e 2c 20 49 6e 63 2e  Foundation, Inc.
03a0: 2c 20 35 39 20 54 65 6d 70 6c 65 20 50 6c 61 63  , 59 Temple Plac
03b0: 65 20 2d 20 53 75 69 74 65 20 33 33 30 2c 20 42  e - Suite 330, B
03c0: 6f 73 74 6f 6e 2c 20 4d 41 20 20 30 32 31 31 31  oston, MA  02111
03d0: 2d 31 33 30 37 2c 20 55 53 41 2e 0a 23 0a 23 20  -1307, USA..#.# 
03e0: 6a 6f 68 61 6e 6e 65 73 40 7a 65 6c 6c 6e 65 72  johannes@zellner
03f0: 2e 6f 72 67 0a 23 20 68 74 74 70 3a 2f 2f 77 77  .org.# http://ww
0400: 77 2e 7a 65 6c 6c 6e 65 72 2e 6f 72 67 2f 74 63  w.zellner.org/tc
0410: 6c 72 65 61 64 6c 69 6e 65 2f 0a 23 0a 23 20 3d  lreadline/.#.# =
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: 3d 20 2a 2f 20 20 0a 0a 64 6e 6c 09 54 68 69 73  = */  ..dnl.This
0470: 20 66 69 6c 65 20 69 73 20 61 6e 20 69 6e 70 75   file is an inpu
0480: 74 20 66 69 6c 65 20 75 73 65 64 20 62 79 20 74  t file used by t
0490: 68 65 20 47 4e 55 20 22 61 75 74 6f 63 6f 6e 66  he GNU "autoconf
04a0: 22 20 70 72 6f 67 72 61 6d 20 74 6f 0a 64 6e 6c  " program to.dnl
04b0: 09 67 65 6e 65 72 61 74 65 20 74 68 65 20 66 69  .generate the fi
04c0: 6c 65 20 22 63 6f 6e 66 69 67 75 72 65 22 2c 20  le "configure", 
04d0: 77 68 69 63 68 20 69 73 20 72 75 6e 20 64 75 72  which is run dur
04e0: 69 6e 67 20 54 6b 20 69 6e 73 74 61 6c 6c 61 74  ing Tk installat
04f0: 69 6f 6e 0a 64 6e 6c 09 74 6f 20 63 6f 6e 66 69  ion.dnl.to confi
0500: 67 75 72 65 20 74 68 65 20 73 79 73 74 65 6d 20  gure the system 
0510: 66 6f 72 20 74 68 65 20 6c 6f 63 61 6c 20 65 6e  for the local en
0520: 76 69 72 6f 6e 6d 65 6e 74 2e 0a 0a 41 43 5f 52  vironment...AC_R
0530: 45 56 49 53 49 4f 4e 28 24 52 65 76 69 73 69 6f  EVISION($Revisio
0540: 6e 24 29 0a 0a 41 43 5f 49 4e 49 54 28 74 63 6c  n$)..AC_INIT(tcl
0550: 72 65 61 64 6c 69 6e 65 2e 63 29 0a 41 43 5f 43  readline.c).AC_C
0560: 4f 4e 46 49 47 5f 48 45 41 44 45 52 28 63 6f 6e  ONFIG_HEADER(con
0570: 66 69 67 2e 68 29 0a 0a 54 43 4c 52 45 41 44 4c  fig.h)..TCLREADL
0580: 49 4e 45 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f  INE_MAJOR_VERSIO
0590: 4e 3d 31 0a 54 43 4c 52 45 41 44 4c 49 4e 45 5f  N=1.TCLREADLINE_
05a0: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 3d 30 0a  MINOR_VERSION=0.
05b0: 54 43 4c 52 45 41 44 4c 49 4e 45 5f 50 41 54 43  TCLREADLINE_PATC
05c0: 48 4c 45 56 45 4c 3d 30 0a 54 43 4c 52 45 41 44  HLEVEL=0.TCLREAD
05d0: 4c 49 4e 45 5f 56 45 52 53 49 4f 4e 3d 24 54 43  LINE_VERSION=$TC
05e0: 4c 52 45 41 44 4c 49 4e 45 5f 4d 41 4a 4f 52 5f  LREADLINE_MAJOR_
05f0: 56 45 52 53 49 4f 4e 2e 24 54 43 4c 52 45 41 44  VERSION.$TCLREAD
0600: 4c 49 4e 45 5f 4d 49 4e 4f 52 5f 56 45 52 53 49  LINE_MINOR_VERSI
0610: 4f 4e 0a 54 43 4c 52 45 41 44 4c 49 4e 45 5f 50  ON.TCLREADLINE_P
0620: 41 54 43 48 4c 45 56 45 4c 5f 53 54 52 3d 24 7b  ATCHLEVEL_STR=${
0630: 54 43 4c 52 45 41 44 4c 49 4e 45 5f 56 45 52 53  TCLREADLINE_VERS
0640: 49 4f 4e 7d 2e 24 7b 54 43 4c 52 45 41 44 4c 49  ION}.${TCLREADLI
0650: 4e 45 5f 50 41 54 43 48 4c 45 56 45 4c 7d 0a 56  NE_PATCHLEVEL}.V
0660: 45 52 53 49 4f 4e 3d 24 54 43 4c 52 45 41 44 4c  ERSION=$TCLREADL
0670: 49 4e 45 5f 56 45 52 53 49 4f 4e 0a 0a 0a 41 43  INE_VERSION...AC
0680: 5f 50 52 45 52 45 51 28 32 2e 31 33 29 0a 41 43  _PREREQ(2.13).AC
0690: 5f 43 4f 4e 46 49 47 5f 41 55 58 5f 44 49 52 28  _CONFIG_AUX_DIR(
06a0: 2e 2f 61 75 78 29 0a 41 43 5f 43 41 4e 4f 4e 49  ./aux).AC_CANONI
06b0: 43 41 4c 5f 48 4f 53 54 0a 0a 0a 54 43 4c 52 45  CAL_HOST...TCLRE
06c0: 41 44 4c 49 4e 45 5f 4c 50 41 54 48 3d 60 65 63  ADLINE_LPATH=`ec
06d0: 68 6f 20 24 4c 44 5f 4c 49 42 52 41 52 59 5f 50  ho $LD_LIBRARY_P
06e0: 41 54 48 20 24 4c 44 5f 52 55 4e 5f 50 41 54 48  ATH $LD_RUN_PATH
06f0: 20 24 4c 50 41 54 48 20 7c 20 73 65 64 20 27 73   $LPATH | sed 's
0700: 2f 3a 2f 20 2f 67 27 60 0a 54 43 4c 52 45 41 44  /:/ /g'`.TCLREAD
0710: 4c 49 4e 45 5f 4c 50 41 54 48 3d 22 24 54 43 4c  LINE_LPATH="$TCL
0720: 52 45 41 44 4c 49 4e 45 5f 4c 50 41 54 48 20 2f  READLINE_LPATH /
0730: 75 73 72 2f 6c 6f 63 61 6c 2f 6c 69 62 20 2f 6c  usr/local/lib /l
0740: 69 62 20 2f 75 73 72 2f 6c 69 62 20 2f 75 73 72  ib /usr/lib /usr
0750: 2f 73 68 6c 69 62 22 0a 0a 0a 23 2d 2d 2d 2d 2d  /shlib"...#-----
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 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
07a0: 23 20 20 20 53 65 65 20 69 66 20 74 68 65 72 65  #   See if there
07b0: 20 77 61 73 20 61 20 63 6f 6d 6d 61 6e 64 2d 6c   was a command-l
07c0: 69 6e 65 20 6f 70 74 69 6f 6e 20 66 6f 72 20 77  ine option for w
07d0: 68 65 72 65 20 54 63 6c 20 69 73 3b 20 20 69 66  here Tcl is;  if
07e0: 0a 23 20 20 20 6e 6f 74 2c 20 73 65 61 72 63 68  .#   not, search
07f0: 20 66 6f 72 20 54 63 6c 2e 0a 23 2d 2d 2d 2d 2d   for Tcl..#-----
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 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
0840: 0a 41 43 5f 41 52 47 5f 57 49 54 48 28 0a 20 20  .AC_ARG_WITH(.  
0850: 20 20 74 63 6c 2c 0a 20 20 20 20 5b 20 20 2d 2d    tcl,.    [  --
0860: 77 69 74 68 2d 74 63 6c 3d 44 49 52 20 20 20 20  with-tcl=DIR    
0870: 20 20 20 20 20 20 77 68 65 72 65 20 74 6f 20 6c        where to l
0880: 6f 6f 6b 20 66 6f 72 20 74 63 6c 43 6f 6e 66 69  ook for tclConfi
0890: 67 2e 73 68 5d 2c 0a 20 20 20 20 74 63 6c 5f 73  g.sh],.    tcl_s
08a0: 65 61 72 63 68 3d 24 77 69 74 68 76 61 6c 2c 0a  earch=$withval,.
08b0: 20 20 20 20 74 63 6c 5f 73 65 61 72 63 68 3d 22      tcl_search="
08c0: 22 0a 29 0a 0a 41 43 5f 4d 53 47 5f 43 48 45 43  ".)..AC_MSG_CHEC
08d0: 4b 49 4e 47 28 5b 77 68 69 63 68 20 74 63 6c 43  KING([which tclC
08e0: 6f 6e 66 69 67 2e 73 68 20 74 6f 20 75 73 65 5d  onfig.sh to use]
08f0: 29 0a 54 43 4c 5f 4c 49 42 5f 44 49 52 3d 22 22  ).TCL_LIB_DIR=""
0900: 0a 66 6f 72 20 64 69 72 20 69 6e 20 24 74 63 6c  .for dir in $tcl
0910: 5f 73 65 61 72 63 68 20 2f 75 73 72 2f 6c 69 62  _search /usr/lib
0920: 20 2f 75 73 72 2f 6c 6f 63 61 6c 2f 6c 69 62 20   /usr/local/lib 
0930: 24 65 78 65 63 5f 70 72 65 66 69 78 2f 6c 69 62  $exec_prefix/lib
0940: 20 2f 75 73 72 2f 6c 6f 63 61 6c 2f 6c 69 62 2f   /usr/local/lib/
0950: 75 6e 69 78 20 2f 6f 70 74 2f 74 63 6c 2f 6c 69  unix /opt/tcl/li
0960: 62 3b 20 64 6f 0a 20 20 20 20 69 66 20 74 65 73  b; do.    if tes
0970: 74 20 2d 72 20 24 64 69 72 2f 74 63 6c 43 6f 6e  t -r $dir/tclCon
0980: 66 69 67 2e 73 68 3b 20 74 68 65 6e 0a 20 20 20  fig.sh; then.   
0990: 20 20 20 20 20 54 43 4c 5f 4c 49 42 5f 44 49 52       TCL_LIB_DIR
09a0: 3d 24 64 69 72 0a 20 20 20 20 20 20 20 20 62 72  =$dir.        br
09b0: 65 61 6b 0a 20 20 20 20 66 69 0a 64 6f 6e 65 0a  eak.    fi.done.
09c0: 0a 69 66 20 74 65 73 74 20 2d 7a 20 22 24 54 43  .if test -z "$TC
09d0: 4c 5f 4c 49 42 5f 44 49 52 22 3b 20 74 68 65 6e  L_LIB_DIR"; then
09e0: 0a 20 20 20 20 41 43 5f 4d 53 47 5f 45 52 52 4f  .    AC_MSG_ERRO
09f0: 52 28 43 61 6e 27 74 20 66 69 6e 64 20 54 63 6c  R(Can't find Tcl
0a00: 20 6c 69 62 72 61 72 69 65 73 2e 20 20 55 73 65   libraries.  Use
0a10: 20 2d 2d 77 69 74 68 2d 74 63 6c 20 74 6f 20 73   --with-tcl to s
0a20: 70 65 63 69 66 79 20 74 68 65 20 64 69 72 65 63  pecify the direc
0a30: 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20  tory containing 
0a40: 74 63 6c 43 6f 6e 66 69 67 2e 73 68 20 6f 6e 20  tclConfig.sh on 
0a50: 79 6f 75 72 20 73 79 73 74 65 6d 2e 29 0a 65 6c  your system.).el
0a60: 73 65 0a 20 20 20 20 2e 20 24 54 43 4c 5f 4c 49  se.    . $TCL_LI
0a70: 42 5f 44 49 52 2f 74 63 6c 43 6f 6e 66 69 67 2e  B_DIR/tclConfig.
0a80: 73 68 0a 20 20 20 20 41 43 5f 4d 53 47 5f 52 45  sh.    AC_MSG_RE
0a90: 53 55 4c 54 28 24 54 43 4c 5f 4c 49 42 5f 44 49  SULT($TCL_LIB_DI
0aa0: 52 2f 74 63 6c 43 6f 6e 66 69 67 2e 73 68 29 0a  R/tclConfig.sh).
0ab0: 20 20 20 20 41 43 5f 4d 53 47 5f 43 48 45 43 4b      AC_MSG_CHECK
0ac0: 49 4e 47 28 5b 66 6f 72 20 79 6f 75 72 20 74 63  ING([for your tc
0ad0: 6c 20 76 65 72 73 69 6f 6e 5d 29 0a 20 20 20 20  l version]).    
0ae0: 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 5b 24  AC_MSG_RESULT([$
0af0: 54 43 4c 5f 56 45 52 53 49 4f 4e 2c 20 70 61 74  TCL_VERSION, pat
0b00: 63 68 6c 65 76 65 6c 20 24 54 43 4c 5f 50 41 54  chlevel $TCL_PAT
0b10: 43 48 5f 4c 45 56 45 4c 5d 29 0a 66 69 0a 0a 23  CH_LEVEL]).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 2d 2d 2d  ----------------
0b60: 2d 2d 2d 2d 0a 23 20 20 20 52 65 61 64 20 69 6e  ----.#   Read in
0b70: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 69   configuration i
0b80: 6e 66 6f 72 6d 61 74 69 6f 6e 20 67 65 6e 65 72  nformation gener
0b90: 61 74 65 64 20 62 79 20 54 63 6c 20 66 6f 72 20  ated by Tcl for 
0ba0: 73 68 61 72 65 64 0a 23 20 20 20 6c 69 62 72 61  shared.#   libra
0bb0: 72 69 65 73 2c 20 61 6e 64 20 61 72 72 61 6e 67  ries, and arrang
0bc0: 65 20 66 6f 72 20 69 74 20 74 6f 20 62 65 20 73  e for it to be s
0bd0: 75 62 73 74 69 74 75 74 65 64 20 69 6e 74 6f 20  ubstituted into 
0be0: 6f 75 72 0a 23 20 20 20 4d 61 6b 65 66 69 6c 65  our.#   Makefile
0bf0: 2e 0a 23 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: 2d 2d 2d 2d 2d 2d 2d 0a 0a 0a 53 48 4c 49 42 5f  -------...SHLIB_
0c40: 43 46 4c 41 47 53 3d 24 54 43 4c 5f 53 48 4c 49  CFLAGS=$TCL_SHLI
0c50: 42 5f 43 46 4c 41 47 53 0a 53 48 4c 49 42 5f 4c  B_CFLAGS.SHLIB_L
0c60: 44 3d 24 54 43 4c 5f 53 48 4c 49 42 5f 4c 44 0a  D=$TCL_SHLIB_LD.
0c70: 69 66 20 74 65 73 74 20 24 54 43 4c 5f 53 48 4c  if test $TCL_SHL
0c80: 49 42 5f 53 55 46 46 49 58 20 3d 20 22 22 3b 20  IB_SUFFIX = ""; 
0c90: 74 68 65 6e 0a 20 20 20 20 41 43 5f 4d 53 47 5f  then.    AC_MSG_
0ca0: 45 52 52 4f 52 28 54 43 4c 5f 53 48 4c 49 42 5f  ERROR(TCL_SHLIB_
0cb0: 53 55 46 46 49 58 20 6e 6f 74 20 64 65 66 69 6e  SUFFIX not defin
0cc0: 65 64 20 2d 2d 20 73 68 6f 75 6c 64 20 62 65 20  ed -- should be 
0cd0: 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65 20 2e  something like .
0ce0: 73 6f 20 6f 72 20 2e 73 6c 20 6f 6e 20 75 6e 69  so or .sl on uni
0cf0: 78 2e 29 0a 65 6c 73 65 0a 20 20 20 20 53 48 4c  x.).else.    SHL
0d00: 49 42 5f 53 55 46 46 49 58 3d 24 54 43 4c 5f 53  IB_SUFFIX=$TCL_S
0d10: 48 4c 49 42 5f 53 55 46 46 49 58 0a 66 69 0a 44  HLIB_SUFFIX.fi.D
0d20: 4c 5f 4c 49 42 53 3d 24 54 43 4c 5f 44 4c 5f 4c  L_LIBS=$TCL_DL_L
0d30: 49 42 53 0a 4c 44 5f 46 4c 41 47 53 3d 24 54 43  IBS.LD_FLAGS=$TC
0d40: 4c 5f 4c 44 5f 46 4c 41 47 53 0a 53 48 4c 49 42  L_LD_FLAGS.SHLIB
0d50: 5f 4c 44 5f 4c 49 42 53 3d 24 54 43 4c 5f 53 48  _LD_LIBS=$TCL_SH
0d60: 4c 49 42 5f 4c 44 5f 4c 49 42 53 0a 54 43 4c 52  LIB_LD_LIBS.TCLR
0d70: 45 41 44 4c 49 4e 45 5f 50 41 43 4b 41 47 45 5f  EADLINE_PACKAGE_
0d80: 50 41 54 48 3d 24 54 43 4c 5f 50 41 43 4b 41 47  PATH=$TCL_PACKAG
0d90: 45 5f 50 41 54 48 0a 0a 0a 23 2d 2d 2d 2d 2d 2d  E_PATH...#------
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 2d 2d 2d 2d 2d 2d 2d 0a 23  --------------.#
0de0: 20 20 20 43 68 65 63 6b 2c 20 69 66 20 74 63 6c     Check, if tcl
0df0: 5f 76 65 72 73 69 6f 6e 20 69 73 20 3e 20 38 2e  _version is > 8.
0e00: 30 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  0.#-------------
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 0a 69 66 20 74 65 73 74 20  -------.if test 
0e50: 24 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49  $TCL_MAJOR_VERSI
0e60: 4f 4e 20 2d 6c 74 20 38 3b 20 74 68 65 6e 0a 20  ON -lt 8; then. 
0e70: 20 20 20 41 43 5f 4d 53 47 5f 45 52 52 4f 52 28     AC_MSG_ERROR(
0e80: 6e 65 65 64 20 74 63 6c 20 38 2e 30 20 6f 72 20  need tcl 8.0 or 
0e90: 68 69 67 68 65 72 2e 29 0a 66 69 0a 0a 0a 0a 23  higher.).fi....#
0ea0: 20 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 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 53 65 74  --------.#   Set
0ef0: 20 75 70 20 61 20 6e 65 77 20 64 65 66 61 75 6c   up a new defaul
0f00: 74 20 2d 2d 70 72 65 66 69 78 2e 0a 23 20 2d 2d  t --prefix..# --
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 2d 2d  ----------------
0f50: 2d 2d 2d 2d 2d 0a 0a 23 20 74 68 69 73 20 69 73  -----..# this is
0f60: 20 74 68 65 20 64 65 66 61 75 6c 74 20 61 6e 79   the default any
0f70: 77 61 79 3a 0a 23 20 41 43 5f 50 52 45 46 49 58  way:.# AC_PREFIX
0f80: 5f 44 45 46 41 55 4c 54 28 2f 75 73 72 2f 6c 6f  _DEFAULT(/usr/lo
0f90: 63 61 6c 29 0a 0a 69 66 20 74 65 73 74 20 22 24  cal)..if test "$
0fa0: 7b 70 72 65 66 69 78 7d 22 20 3d 20 22 4e 4f 4e  {prefix}" = "NON
0fb0: 45 22 3b 20 74 68 65 6e 0a 20 20 20 20 70 72 65  E"; then.    pre
0fc0: 66 69 78 3d 24 54 43 4c 5f 50 52 45 46 49 58 0a  fix=$TCL_PREFIX.
0fd0: 66 69 0a 69 66 20 74 65 73 74 20 22 24 7b 65 78  fi.if test "${ex
0fe0: 65 63 5f 70 72 65 66 69 78 7d 22 20 3d 20 22 4e  ec_prefix}" = "N
0ff0: 4f 4e 45 22 3b 20 74 68 65 6e 0a 20 20 20 20 65  ONE"; then.    e
1000: 78 65 63 5f 70 72 65 66 69 78 3d 24 54 43 4c 5f  xec_prefix=$TCL_
1010: 45 58 45 43 5f 50 52 45 46 49 58 0a 65 6c 73 65  EXEC_PREFIX.else
1020: 0a 20 20 20 20 54 43 4c 52 45 41 44 4c 49 4e 45  .    TCLREADLINE
1030: 5f 50 41 43 4b 41 47 45 5f 50 41 54 48 3d 24 7b  _PACKAGE_PATH=${
1040: 65 78 65 63 5f 70 72 65 66 69 78 7d 2f 6c 69 62  exec_prefix}/lib
1050: 0a 66 69 0a 0a 54 43 4c 52 45 41 44 4c 49 4e 45  .fi..TCLREADLINE
1060: 5f 4c 49 42 52 41 52 59 3d 24 7b 65 78 65 63 5f  _LIBRARY=${exec_
1070: 70 72 65 66 69 78 7d 2f 6c 69 62 2f 74 63 6c 72  prefix}/lib/tclr
1080: 65 61 64 6c 69 6e 65 24 54 43 4c 52 45 41 44 4c  eadline$TCLREADL
1090: 49 4e 45 5f 56 45 52 53 49 4f 4e 0a 0a 0a 23 20  INE_VERSION...# 
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: 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 43 68 65 63  -------.#   Chec
10f0: 6b 20 66 6f 72 20 73 6f 6d 65 20 70 72 6f 67 72  k for some progr
1100: 61 6d 73 20 68 65 72 65 2e 0a 23 20 2d 2d 2d 2d  ams here..# ----
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 2d 2d 2d 2d  ----------------
1150: 2d 2d 2d 0a 0a 41 43 5f 50 52 4f 47 5f 49 4e 53  ---..AC_PROG_INS
1160: 54 41 4c 4c 0a 41 43 5f 50 52 4f 47 5f 52 41 4e  TALL.AC_PROG_RAN
1170: 4c 49 42 0a 41 43 5f 50 52 4f 47 5f 4c 4e 5f 53  LIB.AC_PROG_LN_S
1180: 0a 0a 0a 0a 23 20 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 2d 2d 2d 2d 2d 2d 2d 0a 23 20  -------------.# 
11d0: 20 20 50 72 65 66 65 72 20 74 68 65 20 63 6f 6d    Prefer the com
11e0: 70 69 6c 65 72 2c 20 77 68 69 63 68 20 77 61 73  piler, which was
11f0: 20 75 73 65 64 0a 23 20 20 20 74 6f 20 62 75 69   used.#   to bui
1200: 6c 64 20 74 63 6c 2e 0a 23 20 2d 2d 2d 2d 2d 2d  ld tcl..# ------
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 0a 0a 0a 41 43 5f 41 52 47 5f 45 4e 41 42 4c  -...AC_ARG_ENABL
1260: 45 28 67 63 63 2c 20 5b 20 20 2d 2d 65 6e 61 62  E(gcc, [  --enab
1270: 6c 65 2d 67 63 63 20 20 20 20 20 20 20 20 20 20  le-gcc          
1280: 20 20 61 6c 6c 6f 77 20 75 73 65 20 6f 66 20 67    allow use of g
1290: 63 63 20 69 66 20 61 76 61 69 6c 61 62 6c 65 5d  cc if available]
12a0: 2c 0a 20 20 20 20 5b 67 63 63 5f 6f 6b 3d 24 65  ,.    [gcc_ok=$e
12b0: 6e 61 62 6c 65 76 61 6c 5d 2c 20 5b 67 63 63 5f  nableval], [gcc_
12c0: 6f 6b 3d 6e 6f 5d 29 0a 69 66 20 74 65 73 74 20  ok=no]).if test 
12d0: 22 24 67 63 63 5f 6f 6b 22 20 3d 20 22 79 65 73  "$gcc_ok" = "yes
12e0: 22 3b 20 74 68 65 6e 0a 20 20 20 20 41 43 5f 50  "; then.    AC_P
12f0: 52 4f 47 5f 43 43 0a 65 6c 73 65 0a 20 20 20 20  ROG_CC.else.    
1300: 43 43 3d 24 54 43 4c 5f 43 43 0a 20 20 20 20 41  CC=$TCL_CC.    A
1310: 43 5f 53 55 42 53 54 28 43 43 29 0a 66 69 0a 0a  C_SUBST(CC).fi..
1320: 0a 0a 0a 23 20 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 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20  ------------.#  
1370: 20 63 68 65 63 6b 69 6e 67 20 66 6f 72 20 74 68   checking for th
1380: 65 20 70 72 65 70 72 6f 63 65 73 73 6f 72 2e 0a  e preprocessor..
1390: 23 20 20 20 46 49 58 4d 45 3a 20 64 6f 20 77 65  #   FIXME: do we
13a0: 20 6e 65 65 64 20 74 68 69 73 20 3f 0a 23 20 2d   need this ?.# -
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 2d  ----------------
13f0: 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f 50 52 4f 47 5f  ------..AC_PROG_
1400: 43 50 50 0a 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d  CPP....#--------
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 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20  ------------.#  
1450: 20 49 66 20 74 68 69 73 20 69 73 20 67 63 63 2c   If this is gcc,
1460: 20 61 64 64 20 73 6f 6d 65 20 65 78 74 72 61 20   add some extra 
1470: 63 6f 6d 70 69 6c 65 20 66 6c 61 67 73 2e 0a 23  compile 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 2d 2d 2d  ----------------
14c0: 2d 2d 2d 2d 0a 0a 41 43 5f 4d 53 47 5f 43 48 45  ----..AC_MSG_CHE
14d0: 43 4b 49 4e 47 28 5b 77 68 65 74 68 65 72 20 43  CKING([whether C
14e0: 20 63 6f 6d 70 69 6c 65 72 20 69 73 20 67 63 63   compiler is gcc
14f0: 5d 29 0a 41 43 5f 43 41 43 48 45 5f 56 41 4c 28  ]).AC_CACHE_VAL(
1500: 74 63 6c 72 65 61 64 6c 69 6e 65 5f 63 76 5f 70  tclreadline_cv_p
1510: 72 6f 67 5f 67 63 63 2c 0a 20 20 20 20 41 43 5f  rog_gcc,.    AC_
1520: 45 47 52 45 50 5f 43 50 50 28 5f 63 63 5f 69 73  EGREP_CPP(_cc_is
1530: 5f 67 63 63 5f 2c 20 5b 0a 23 69 66 64 65 66 20  _gcc_, [.#ifdef 
1540: 5f 5f 47 4e 55 43 5f 5f 0a 5f 63 63 5f 69 73 5f  __GNUC__._cc_is_
1550: 67 63 63 5f 0a 23 65 6e 64 69 66 0a 5d 2c 20 20  gcc_.#endif.],  
1560: 20 20 20 20 5b 74 63 6c 72 65 61 64 6c 69 6e 65      [tclreadline
1570: 5f 63 76 5f 70 72 6f 67 5f 67 63 63 3d 79 65 73  _cv_prog_gcc=yes
1580: 5d 2c 20 5b 74 63 6c 72 65 61 64 6c 69 6e 65 5f  ], [tclreadline_
1590: 63 76 5f 70 72 6f 67 5f 67 63 63 3d 6e 6f 5d 29  cv_prog_gcc=no])
15a0: 29 0a 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28  ).AC_MSG_RESULT(
15b0: 5b 24 74 63 6c 72 65 61 64 6c 69 6e 65 5f 63 76  [$tclreadline_cv
15c0: 5f 70 72 6f 67 5f 67 63 63 5d 29 0a 0a 69 66 20  _prog_gcc])..if 
15d0: 74 65 73 74 20 2d 7a 20 22 24 43 46 4c 41 47 53  test -z "$CFLAGS
15e0: 22 20 3b 20 74 68 65 6e 0a 20 20 20 20 43 46 4c  " ; then.    CFL
15f0: 41 47 53 3d 24 54 43 4c 5f 43 46 4c 41 47 53 5f  AGS=$TCL_CFLAGS_
1600: 4f 50 54 49 4d 49 5a 45 0a 66 69 0a 69 66 20 74  OPTIMIZE.fi.if t
1610: 65 73 74 20 22 24 74 63 6c 72 65 61 64 6c 69 6e  est "$tclreadlin
1620: 65 5f 63 76 5f 70 72 6f 67 5f 67 63 63 22 20 3d  e_cv_prog_gcc" =
1630: 20 22 79 65 73 22 20 3b 20 74 68 65 6e 0a 20 20   "yes" ; then.  
1640: 20 20 43 46 4c 41 47 53 3d 22 24 43 46 4c 41 47    CFLAGS="$CFLAG
1650: 53 20 2d 57 73 68 61 64 6f 77 20 2d 57 74 72 61  S -Wshadow -Wtra
1660: 64 69 74 69 6f 6e 61 6c 20 2d 57 61 6c 6c 22 0a  ditional -Wall".
1670: 66 69 0a 0a 41 43 5f 4d 53 47 5f 43 48 45 43 4b  fi..AC_MSG_CHECK
1680: 49 4e 47 28 5b 64 65 66 61 75 6c 74 20 63 6f 6d  ING([default com
1690: 70 69 6c 65 72 20 66 6c 61 67 73 5d 29 0a 41 43  piler flags]).AC
16a0: 5f 41 52 47 5f 57 49 54 48 28 63 66 6c 61 67 73  _ARG_WITH(cflags
16b0: 2c 20 5b 20 20 2d 2d 77 69 74 68 2d 63 66 6c 61  , [  --with-cfla
16c0: 67 73 3d 46 4c 41 47 53 20 20 20 20 20 73 65 74  gs=FLAGS     set
16d0: 20 63 6f 6d 70 69 6c 65 72 20 66 6c 61 67 73 20   compiler flags 
16e0: 74 6f 20 46 4c 41 47 53 5d 2c 0a 20 20 20 20 5b  to FLAGS],.    [
16f0: 43 46 4c 41 47 53 3d 22 24 77 69 74 68 5f 63 66  CFLAGS="$with_cf
1700: 6c 61 67 73 22 5d 29 0a 0a 41 43 5f 4d 53 47 5f  lags"])..AC_MSG_
1710: 52 45 53 55 4c 54 28 5b 24 43 46 4c 41 47 53 5d  RESULT([$CFLAGS]
1720: 29 0a 0a 69 66 20 74 65 73 74 20 22 24 54 43 4c  )..if test "$TCL
1730: 5f 43 43 22 20 21 3d 20 22 24 43 43 22 20 3b 20  _CC" != "$CC" ; 
1740: 74 68 65 6e 0a 20 20 20 20 65 63 68 6f 20 22 22  then.    echo ""
1750: 0a 20 20 20 20 65 63 68 6f 20 22 57 41 52 4e 49  .    echo "WARNI
1760: 4e 47 3a 20 20 43 6f 6d 70 69 6c 65 72 20 69 73  NG:  Compiler is
1770: 20 24 43 43 20 62 75 74 20 54 63 6c 20 77 61 73   $CC but Tcl was
1780: 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 24   compiled with $
1790: 54 43 4c 5f 43 43 22 0a 20 20 20 20 65 63 68 6f  TCL_CC".    echo
17a0: 20 22 22 0a 66 69 0a 0a 23 2d 2d 2d 2d 2d 2d 2d   "".fi..#-------
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 2d 2d 2d 2d 2d 2d 2d 0a 23 20  -------------.# 
17f0: 20 20 54 68 65 20 73 74 61 74 65 6d 65 6e 74 73    The statements
1800: 20 62 65 6c 6f 77 20 64 65 66 69 6e 65 20 61 20   below define a 
1810: 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 73 79  collection of sy
1820: 6d 62 6f 6c 73 20 72 65 6c 61 74 65 64 20 74 6f  mbols related to
1830: 0a 23 20 20 20 62 75 69 6c 64 69 6e 67 20 6c 69  .#   building li
1840: 62 74 63 6c 72 65 61 64 6c 69 6e 65 20 61 73 20  btclreadline as 
1850: 61 20 73 68 61 72 65 64 20 6c 69 62 72 61 72 79  a shared library
1860: 20 69 6e 73 74 65 61 64 20 6f 66 20 61 20 73 74   instead of a st
1870: 61 74 69 63 20 6c 69 62 72 61 72 79 2e 0a 23 20  atic library..# 
1880: 20 20 28 73 74 61 74 69 63 20 69 73 20 6e 6f 74    (static is not
1890: 20 69 6d 70 6c 65 6d 65 6e 74 65 64 20 79 65 74   implemented yet
18a0: 20 61 6e 79 77 61 79 29 2e 0a 23 2d 2d 2d 2d 2d   anyway)..#-----
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 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
18f0: 0a 41 43 5f 41 52 47 5f 45 4e 41 42 4c 45 28 73  .AC_ARG_ENABLE(s
1900: 68 61 72 65 64 2c 0a 20 20 20 20 5b 20 20 2d 2d  hared,.    [  --
1910: 64 69 73 61 62 6c 65 2d 73 68 61 72 65 64 20 20  disable-shared  
1920: 20 20 20 20 20 20 64 6f 6e 27 74 20 62 75 69 6c        don't buil
1930: 64 20 6c 69 62 74 63 6c 72 65 61 64 6c 69 6e 65  d libtclreadline
1940: 20 61 73 20 61 20 73 68 61 72 65 64 20 6c 69 62   as a shared lib
1950: 72 61 72 79 0a 20 20 20 20 20 20 20 20 20 20 20  rary.           
1960: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28                 (
1970: 6e 6f 74 20 69 6d 70 6c 65 6d 65 6e 74 65 64 20  not implemented 
1980: 2d 2d 20 70 72 6f 62 61 62 6c 79 20 6e 65 76 65  -- probably neve
1990: 72 29 2e 5d 2c 0a 20 20 20 20 5b 6f 6b 3d 24 65  r).],.    [ok=$e
19a0: 6e 61 62 6c 65 76 61 6c 5d 2c 20 5b 6f 6b 3d 79  nableval], [ok=y
19b0: 65 73 5d 29 0a 69 66 20 74 65 73 74 20 22 24 6f  es]).if test "$o
19c0: 6b 22 20 3d 20 22 79 65 73 22 3b 20 74 68 65 6e  k" = "yes"; then
19d0: 0a 20 20 20 20 69 66 20 74 65 73 74 20 24 7b 54  .    if test ${T
19e0: 43 4c 5f 53 48 41 52 45 44 5f 42 55 49 4c 44 7d  CL_SHARED_BUILD}
19f0: 20 3d 20 30 3b 20 74 68 65 6e 0a 20 20 20 20 20   = 0; then.     
1a00: 20 20 20 41 43 5f 4d 53 47 5f 45 52 52 4f 52 28     AC_MSG_ERROR(
1a10: 54 63 6c 20 77 61 73 20 6e 6f 74 20 62 75 69 6c  Tcl was not buil
1a20: 74 20 77 69 74 68 20 2d 2d 65 6e 61 62 6c 65 2d  t with --enable-
1a30: 73 68 61 72 65 64 2c 20 73 6f 20 79 6f 75 20 63  shared, so you c
1a40: 61 6e 27 74 20 75 73 65 20 73 68 61 72 65 64 20  an't use shared 
1a50: 6c 69 62 72 61 72 69 65 73 2e 29 0a 20 20 20 20  libraries.).    
1a60: 66 69 0a 20 20 20 20 53 48 4c 49 42 5f 43 46 4c  fi.    SHLIB_CFL
1a70: 41 47 53 3d 22 24 7b 53 48 4c 49 42 5f 43 46 4c  AGS="${SHLIB_CFL
1a80: 41 47 53 7d 22 0a 20 20 20 20 65 76 61 6c 20 22  AGS}".    eval "
1a90: 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f  TCLREADLINE_LIB_
1aa0: 46 49 4c 45 3d 6c 69 62 74 63 6c 72 65 61 64 6c  FILE=libtclreadl
1ab0: 69 6e 65 24 7b 56 45 52 53 49 4f 4e 7d 24 7b 53  ine${VERSION}${S
1ac0: 48 4c 49 42 5f 53 55 46 46 49 58 7d 22 0a 20 20  HLIB_SUFFIX}".  
1ad0: 20 20 54 43 4c 52 45 41 44 4c 49 4e 45 5f 50 4b    TCLREADLINE_PK
1ae0: 47 5f 46 49 4c 45 3d 22 5b 5b 66 69 6c 65 20 6a  G_FILE="[[file j
1af0: 6f 69 6e 20 5b 66 69 6c 65 20 64 69 72 6e 61 6d  oin [file dirnam
1b00: 65 20 5c 24 64 69 72 5d 20 24 7b 54 43 4c 52 45  e \$dir] ${TCLRE
1b10: 41 44 4c 49 4e 45 5f 4c 49 42 5f 46 49 4c 45 7d  ADLINE_LIB_FILE}
1b20: 5d 5d 22 0a 20 20 20 20 4d 41 4b 45 5f 4c 49 42  ]]".    MAKE_LIB
1b30: 3d 22 5c 24 28 53 48 4c 49 42 5f 4c 44 29 20 2d  ="\$(SHLIB_LD) -
1b40: 6f 20 24 7b 54 43 4c 52 45 41 44 4c 49 4e 45 5f  o ${TCLREADLINE_
1b50: 4c 49 42 5f 46 49 4c 45 7d 20 5c 24 28 4f 42 4a  LIB_FILE} \$(OBJ
1b60: 53 29 20 24 7b 53 48 4c 49 42 5f 4c 44 5f 4c 49  S) ${SHLIB_LD_LI
1b70: 42 53 7d 22 0a 20 20 20 20 52 41 4e 4c 49 42 3d  BS}".    RANLIB=
1b80: 22 3a 22 0a 65 6c 73 65 0a 20 20 20 20 41 43 5f  ":".else.    AC_
1b90: 4d 53 47 5f 45 52 52 4f 52 28 6e 6f 6e 2d 73 68  MSG_ERROR(non-sh
1ba0: 61 72 65 64 20 6e 6f 74 20 69 6d 70 6c 65 6d 65  ared not impleme
1bb0: 6e 74 65 64 20 79 65 74 2e 20 28 70 72 6f 62 61  nted yet. (proba
1bc0: 62 6c 79 20 6e 65 76 65 72 29 29 0a 20 20 20 20  bly never)).    
1bd0: 53 48 4c 49 42 5f 43 46 4c 41 47 53 3d 22 22 0a  SHLIB_CFLAGS="".
1be0: 20 20 20 20 65 76 61 6c 20 22 54 43 4c 52 45 41      eval "TCLREA
1bf0: 44 4c 49 4e 45 5f 4c 49 42 5f 46 49 4c 45 3d 6c  DLINE_LIB_FILE=l
1c00: 69 62 74 63 6c 72 65 61 64 6c 69 6e 65 24 7b 56  ibtclreadline${V
1c10: 45 52 53 49 4f 4e 7d 2e 61 22 0a 20 20 20 20 54  ERSION}.a".    T
1c20: 43 4c 52 45 41 44 4c 49 4e 45 5f 50 4b 47 5f 46  CLREADLINE_PKG_F
1c30: 49 4c 45 3d 22 22 0a 20 20 20 20 4d 41 4b 45 5f  ILE="".    MAKE_
1c40: 4c 49 42 3d 22 61 72 20 63 72 20 24 7b 54 43 4c  LIB="ar cr ${TCL
1c50: 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 46 49 4c  READLINE_LIB_FIL
1c60: 45 7d 20 5c 24 7b 4f 42 4a 53 7d 22 0a 66 69 0a  E} \${OBJS}".fi.
1c70: 0a 23 20 4e 6f 74 65 3a 20 20 69 6e 20 74 68 65  .# Note:  in the
1c80: 20 66 6f 6c 6c 6f 77 69 6e 67 20 76 61 72 69 61   following varia
1c90: 62 6c 65 2c 20 69 74 27 73 20 69 6d 70 6f 72 74  ble, it's import
1ca0: 61 6e 74 20 74 6f 20 75 73 65 20 74 68 65 20 61  ant to use the a
1cb0: 62 73 6f 6c 75 74 65 0a 23 20 70 61 74 68 20 6e  bsolute.# path n
1cc0: 61 6d 65 20 6f 66 20 74 68 65 20 54 63 6c 20 64  ame of the Tcl d
1cd0: 69 72 65 63 74 6f 72 79 20 72 61 74 68 65 72 20  irectory rather 
1ce0: 74 68 61 6e 20 22 2e 2e 22 3a 20 20 74 68 69 73  than "..":  this
1cf0: 20 69 73 20 62 65 63 61 75 73 65 0a 23 20 41 49   is because.# AI
1d00: 58 20 72 65 6d 65 6d 62 65 72 73 20 74 68 69 73  X remembers this
1d10: 20 70 61 74 68 20 61 6e 64 20 77 69 6c 6c 20 61   path and will a
1d20: 74 74 65 6d 70 74 20 74 6f 20 75 73 65 20 69 74  ttempt to use it
1d30: 20 61 74 20 72 75 6e 2d 74 69 6d 65 20 74 6f 20   at run-time to 
1d40: 6c 6f 6f 6b 0a 23 20 75 70 20 74 68 65 20 54 63  look.# up the Tc
1d50: 6c 20 6c 69 62 72 61 72 79 2e 0a 0a 69 66 20 74  l library...if t
1d60: 65 73 74 20 22 24 7b 54 43 4c 5f 4c 49 42 5f 56  est "${TCL_LIB_V
1d70: 45 52 53 49 4f 4e 53 5f 4f 4b 7d 22 20 3d 20 22  ERSIONS_OK}" = "
1d80: 6f 6b 22 3b 20 74 68 65 6e 0a 20 20 20 20 54 43  ok"; then.    TC
1d90: 4c 52 45 41 44 4c 49 4e 45 5f 42 55 49 4c 44 5f  LREADLINE_BUILD_
1da0: 4c 49 42 5f 53 50 45 43 3d 22 2d 4c 60 70 77 64  LIB_SPEC="-L`pwd
1db0: 60 20 2d 6c 74 63 6c 72 65 61 64 6c 69 6e 65 24  ` -ltclreadline$
1dc0: 7b 56 45 52 53 49 4f 4e 7d 22 0a 20 20 20 20 54  {VERSION}".    T
1dd0: 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 53  CLREADLINE_LIB_S
1de0: 50 45 43 3d 22 2d 4c 24 7b 54 43 4c 52 45 41 44  PEC="-L${TCLREAD
1df0: 4c 49 4e 45 5f 4c 49 42 52 41 52 59 7d 20 2d 6c  LINE_LIBRARY} -l
1e00: 74 63 6c 72 65 61 64 6c 69 6e 65 24 7b 56 45 52  tclreadline${VER
1e10: 53 49 4f 4e 7d 22 0a 65 6c 73 65 0a 20 20 20 20  SION}".else.    
1e20: 54 43 4c 52 45 41 44 4c 49 4e 45 5f 42 55 49 4c  TCLREADLINE_BUIL
1e30: 44 5f 4c 49 42 5f 53 50 45 43 3d 22 2d 4c 60 70  D_LIB_SPEC="-L`p
1e40: 77 64 60 20 2d 6c 74 63 6c 72 65 61 64 6c 69 6e  wd` -ltclreadlin
1e50: 65 60 65 63 68 6f 20 24 7b 56 45 52 53 49 4f 4e  e`echo ${VERSION
1e60: 7d 20 7c 20 74 72 20 2d 64 20 2e 60 22 0a 20 20  } | tr -d .`".  
1e70: 20 20 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 49    TCLREADLINE_LI
1e80: 42 5f 53 50 45 43 3d 22 2d 4c 24 7b 54 43 4c 52  B_SPEC="-L${TCLR
1e90: 45 41 44 4c 49 4e 45 5f 4c 49 42 52 41 52 59 7d  EADLINE_LIBRARY}
1ea0: 20 2d 6c 74 63 6c 72 65 61 64 6c 69 6e 65 60 65   -ltclreadline`e
1eb0: 63 68 6f 20 24 7b 56 45 52 53 49 4f 4e 7d 20 7c  cho ${VERSION} |
1ec0: 20 74 72 20 2d 64 20 2e 60 22 0a 66 69 0a 0a 0a   tr -d .`".fi...
1ed0: 0a 0a 23 20 48 45 41 44 45 52 20 43 48 45 43 4b  ..# HEADER CHECK
1ee0: 53 0a 23 0a 41 43 5f 48 45 41 44 45 52 5f 53 54  S.#.AC_HEADER_ST
1ef0: 44 43 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  DC...#----------
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 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 20 43  ----------.#   C
1f40: 68 65 63 6b 20 66 6f 72 20 74 63 6c 2e 68 0a 23  heck for 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 2d 2d 2d  ----------------
1f90: 2d 2d 2d 2d 0a 0a 41 43 5f 41 52 47 5f 57 49 54  ----..AC_ARG_WIT
1fa0: 48 28 74 63 6c 2d 69 6e 63 6c 75 64 65 73 2c 0a  H(tcl-includes,.
1fb0: 20 20 20 20 20 20 20 20 20 20 20 20 5b 20 20 2d              [  -
1fc0: 2d 77 69 74 68 2d 74 63 6c 2d 69 6e 63 6c 75 64  -with-tcl-includ
1fd0: 65 73 3d 44 49 52 20 77 68 65 72 65 20 74 6f 20  es=DIR where to 
1fe0: 6c 6f 6f 6b 20 66 6f 72 20 74 63 6c 2e 68 5d 2c  look for tcl.h],
1ff0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 63 6c  .            tcl
2000: 5f 69 6e 63 6c 75 64 65 73 3d 24 77 69 74 68 76  _includes=$withv
2010: 61 6c 2c 20 74 63 6c 5f 69 6e 63 6c 75 64 65 73  al, tcl_includes
2020: 3d 24 70 72 65 66 69 78 2f 69 6e 63 6c 75 64 65  =$prefix/include
2030: 29 0a 0a 41 43 5f 4d 53 47 5f 43 48 45 43 4b 49  )..AC_MSG_CHECKI
2040: 4e 47 28 5b 77 68 65 72 65 20 74 6f 20 6c 6f 6f  NG([where to loo
2050: 6b 20 66 6f 72 20 74 63 6c 2e 68 5d 29 0a 54 43  k for tcl.h]).TC
2060: 4c 5f 49 4e 43 4c 55 44 45 5f 44 49 52 3d 22 22  L_INCLUDE_DIR=""
2070: 0a 66 6f 72 20 64 69 72 20 69 6e 20 24 74 63 6c  .for dir in $tcl
2080: 5f 69 6e 63 6c 75 64 65 73 20 24 70 72 65 66 69  _includes $prefi
2090: 78 2f 69 6e 63 6c 75 64 65 2f 20 2f 75 73 72 2f  x/include/ /usr/
20a0: 69 6e 63 6c 75 64 65 3b 20 64 6f 0a 20 20 20 20  include; do.    
20b0: 69 66 20 74 65 73 74 20 2d 72 20 24 64 69 72 2f  if test -r $dir/
20c0: 74 63 6c 2e 68 3b 20 74 68 65 6e 0a 20 20 20 20  tcl.h; then.    
20d0: 20 20 20 20 54 43 4c 5f 49 4e 43 4c 55 44 45 5f      TCL_INCLUDE_
20e0: 44 49 52 3d 24 64 69 72 0a 20 20 20 20 20 20 20  DIR=$dir.       
20f0: 20 62 72 65 61 6b 0a 20 20 20 20 66 69 0a 64 6f   break.    fi.do
2100: 6e 65 0a 0a 69 66 20 74 65 73 74 20 2d 7a 20 22  ne..if test -z "
2110: 24 54 43 4c 5f 49 4e 43 4c 55 44 45 5f 44 49 52  $TCL_INCLUDE_DIR
2120: 22 3b 20 74 68 65 6e 0a 20 20 20 20 41 43 5f 4d  "; then.    AC_M
2130: 53 47 5f 45 52 52 4f 52 28 5b 0a 20 20 43 61 6e  SG_ERROR([.  Can
2140: 27 74 20 66 69 6e 64 20 74 63 6c 2e 68 2e 20 20  't find tcl.h.  
2150: 55 73 65 20 2d 2d 77 69 74 68 2d 74 63 6c 2d 69  Use --with-tcl-i
2160: 6e 63 6c 75 64 65 73 20 74 6f 20 73 70 65 63 69  ncludes to speci
2170: 66 79 20 74 68 65 20 64 69 72 65 63 74 6f 72 79  fy the directory
2180: 0a 20 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 63  .  containing tc
2190: 6c 2e 68 20 6f 6e 20 79 6f 75 72 20 73 79 73 74  l.h on your syst
21a0: 65 6d 2e 5d 29 0a 65 6c 73 65 0a 20 20 20 20 41  em.]).else.    A
21b0: 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 24 54 43  C_MSG_RESULT($TC
21c0: 4c 5f 49 4e 43 4c 55 44 45 5f 44 49 52 2f 74 63  L_INCLUDE_DIR/tc
21d0: 6c 2e 68 29 0a 66 69 0a 0a 0a 0a 23 2d 2d 2d 2d  l.h).fi....#----
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 2d 2d 2d 2d 2d 2d 2d  ----------------
2220: 0a 23 20 20 20 43 68 65 63 6b 20 66 6f 72 20 72  .#   Check for r
2230: 65 61 64 6c 69 6e 65 2e 68 0a 23 2d 2d 2d 2d 2d  eadline.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 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
2280: 0a 41 43 5f 41 52 47 5f 57 49 54 48 28 72 65 61  .AC_ARG_WITH(rea
2290: 64 6c 69 6e 65 2d 69 6e 63 6c 75 64 65 73 2c 0a  dline-includes,.
22a0: 20 20 20 20 20 20 20 20 20 20 20 20 5b 20 20 2d              [  -
22b0: 2d 77 69 74 68 2d 72 65 61 64 6c 69 6e 65 2d 69  -with-readline-i
22c0: 6e 63 6c 75 64 65 73 3d 44 49 52 0a 20 20 20 20  ncludes=DIR.    
22d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
22e0: 20 20 20 20 20 20 72 65 61 64 6c 69 6e 65 20 69        readline i
22f0: 6e 63 6c 75 64 65 20 66 69 6c 65 73 20 69 6e 20  nclude files in 
2300: 44 49 52 5d 2c 0a 20 20 20 20 20 20 20 20 20 20  DIR],.          
2310: 20 20 72 6c 5f 69 6e 63 6c 75 64 65 73 3d 24 77    rl_includes=$w
2320: 69 74 68 76 61 6c 2c 20 72 6c 5f 69 6e 63 6c 75  ithval, rl_inclu
2330: 64 65 73 3d 22 22 29 0a 0a 41 43 5f 4d 53 47 5f  des="")..AC_MSG_
2340: 43 48 45 43 4b 49 4e 47 28 5b 77 68 65 72 65 20  CHECKING([where 
2350: 74 6f 20 6c 6f 6f 6b 20 66 6f 72 20 72 65 61 64  to look for read
2360: 6c 69 6e 65 2e 68 5d 29 0a 52 45 41 44 4c 49 4e  line.h]).READLIN
2370: 45 5f 49 4e 43 4c 55 44 45 5f 44 49 52 3d 22 22  E_INCLUDE_DIR=""
2380: 0a 66 6f 72 20 64 69 72 20 69 6e 20 24 72 6c 5f  .for dir in $rl_
2390: 69 6e 63 6c 75 64 65 73 20 2f 75 73 72 2f 6c 6f  includes /usr/lo
23a0: 63 61 6c 2f 69 6e 63 6c 75 64 65 2f 72 65 61 64  cal/include/read
23b0: 6c 69 6e 65 20 2f 75 73 72 2f 6c 6f 63 61 6c 2f  line /usr/local/
23c0: 69 6e 63 6c 75 64 65 20 2f 75 73 72 2f 69 6e 63  include /usr/inc
23d0: 6c 75 64 65 2f 72 65 61 64 6c 69 6e 65 20 2f 75  lude/readline /u
23e0: 73 72 2f 69 6e 63 6c 75 64 65 20 3b 20 64 6f 0a  sr/include ; do.
23f0: 20 20 20 20 69 66 20 74 65 73 74 20 2d 72 20 24      if test -r $
2400: 64 69 72 2f 72 65 61 64 6c 69 6e 65 2e 68 3b 20  dir/readline.h; 
2410: 74 68 65 6e 0a 20 20 20 20 20 20 20 20 52 45 41  then.        REA
2420: 44 4c 49 4e 45 5f 49 4e 43 4c 55 44 45 5f 44 49  DLINE_INCLUDE_DI
2430: 52 3d 24 64 69 72 0a 20 20 20 20 20 20 20 20 62  R=$dir.        b
2440: 72 65 61 6b 0a 20 20 20 20 66 69 0a 64 6f 6e 65  reak.    fi.done
2450: 0a 0a 69 66 20 74 65 73 74 20 2d 7a 20 22 24 52  ..if test -z "$R
2460: 45 41 44 4c 49 4e 45 5f 49 4e 43 4c 55 44 45 5f  EADLINE_INCLUDE_
2470: 44 49 52 22 3b 20 74 68 65 6e 0a 20 20 20 20 41  DIR"; then.    A
2480: 43 5f 4d 53 47 5f 45 52 52 4f 52 28 5b 0a 20 20  C_MSG_ERROR([.  
2490: 43 61 6e 27 74 20 66 69 6e 64 20 72 65 61 64 6c  Can't find readl
24a0: 69 6e 65 2e 68 2e 0a 20 20 55 73 65 20 2d 2d 77  ine.h..  Use --w
24b0: 69 74 68 2d 72 65 61 64 6c 69 6e 65 2d 69 6e 63  ith-readline-inc
24c0: 6c 75 64 65 73 20 74 6f 20 73 70 65 63 69 66 79  ludes to specify
24d0: 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 0a 20   the directory. 
24e0: 20 63 6f 6e 74 61 69 6e 69 6e 67 20 72 65 61 64   containing read
24f0: 6c 69 6e 65 2e 68 20 6f 6e 20 79 6f 75 72 20 73  line.h on your s
2500: 79 73 74 65 6d 2e 5d 29 0a 65 6c 73 65 0a 20 20  ystem.]).else.  
2510: 20 20 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28    AC_MSG_RESULT(
2520: 24 52 45 41 44 4c 49 4e 45 5f 49 4e 43 4c 55 44  $READLINE_INCLUD
2530: 45 5f 44 49 52 2f 72 65 61 64 6c 69 6e 65 2e 68  E_DIR/readline.h
2540: 29 0a 09 62 61 73 65 3d 22 60 28 62 61 73 65 6e  )..base="`(basen
2550: 61 6d 65 20 24 7b 52 45 41 44 4c 49 4e 45 5f 49  ame ${READLINE_I
2560: 4e 43 4c 55 44 45 5f 44 49 52 7d 29 20 32 3e 2f  NCLUDE_DIR}) 2>/
2570: 64 65 76 2f 6e 75 6c 6c 60 22 0a 09 69 66 20 74  dev/null`"..if t
2580: 65 73 74 20 22 78 24 7b 62 61 73 65 7d 22 20 21  est "x${base}" !
2590: 3d 20 22 78 72 65 61 64 6c 69 6e 65 22 3b 20 74  = "xreadline"; t
25a0: 68 65 6e 0a 09 09 41 43 5f 44 45 46 49 4e 45 5f  hen...AC_DEFINE_
25b0: 55 4e 51 55 4f 54 45 44 28 52 45 41 44 4c 49 4e  UNQUOTED(READLIN
25c0: 45 5f 4c 49 42 52 41 52 59 2c 20 31 29 0a 09 66  E_LIBRARY, 1)..f
25d0: 69 0a 66 69 0a 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d  i.fi....#-------
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 2d 2d 2d 2d 2d 2d 2d 0a 23 20  -------------.# 
2620: 20 20 43 68 65 63 6b 20 66 6f 72 20 6c 69 62 72    Check for libr
2630: 65 61 64 6c 69 6e 65 0a 23 2d 2d 2d 2d 2d 2d 2d  eadline.#-------
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 2d 2d 2d 2d 2d 2d 2d 0a 0a 41  -------------..A
2680: 43 5f 41 52 47 5f 57 49 54 48 28 72 65 61 64 6c  C_ARG_WITH(readl
2690: 69 6e 65 2d 6c 69 62 72 61 72 79 2c 0a 20 20 20  ine-library,.   
26a0: 20 20 20 20 20 20 20 20 20 5b 20 20 2d 2d 77 69           [  --wi
26b0: 74 68 2d 72 65 61 64 6c 69 6e 65 2d 6c 69 62 72  th-readline-libr
26c0: 61 72 79 3d 44 49 52 0a 20 20 20 20 20 20 20 20  ary=DIR.        
26d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
26e0: 20 20 72 65 61 64 6c 69 6e 65 20 6c 69 62 72 61    readline libra
26f0: 72 79 20 66 69 6c 65 73 20 69 6e 20 44 49 52 5d  ry files in DIR]
2700: 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 6c  ,.            rl
2710: 5f 6c 69 62 72 61 72 79 3d 24 77 69 74 68 76 61  _library=$withva
2720: 6c 2c 20 72 6c 5f 6c 69 62 72 61 72 79 3d 22 22  l, rl_library=""
2730: 29 0a 0a 41 43 5f 4d 53 47 5f 43 48 45 43 4b 49  )..AC_MSG_CHECKI
2740: 4e 47 28 5b 77 68 65 72 65 20 74 6f 20 6c 6f 6f  NG([where to loo
2750: 6b 20 66 6f 72 20 6c 69 62 72 65 61 64 6c 69 6e  k for libreadlin
2760: 65 24 53 48 4c 49 42 5f 53 55 46 46 49 58 5d 29  e$SHLIB_SUFFIX])
2770: 0a 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 44 49  .READLINE_LIB_DI
2780: 52 3d 22 22 0a 52 45 41 44 4c 49 4e 45 5f 56 45  R="".READLINE_VE
2790: 52 53 49 4f 4e 5f 53 55 46 46 49 58 3d 22 22 0a  RSION_SUFFIX="".
27a0: 66 6f 72 20 64 69 72 20 69 6e 20 24 72 6c 5f 6c  for dir in $rl_l
27b0: 69 62 72 61 72 79 20 24 54 43 4c 52 45 41 44 4c  ibrary $TCLREADL
27c0: 49 4e 45 5f 4c 50 41 54 48 20 24 70 72 65 66 69  INE_LPATH $prefi
27d0: 78 2f 6c 69 62 2f 72 65 61 64 6c 69 6e 65 3b 20  x/lib/readline; 
27e0: 64 6f 0a 20 20 20 20 69 66 20 74 65 73 74 20 2d  do.    if test -
27f0: 72 20 24 64 69 72 2f 6c 69 62 72 65 61 64 6c 69  r $dir/libreadli
2800: 6e 65 24 53 48 4c 49 42 5f 53 55 46 46 49 58 3b  ne$SHLIB_SUFFIX;
2810: 20 74 68 65 6e 0a 20 20 20 20 20 20 20 20 52 45   then.        RE
2820: 41 44 4c 49 4e 45 5f 4c 49 42 5f 44 49 52 3d 24  ADLINE_LIB_DIR=$
2830: 64 69 72 0a 20 20 20 20 20 20 20 20 62 72 65 61  dir.        brea
2840: 6b 0a 20 20 20 20 66 69 0a 20 20 20 20 69 66 20  k.    fi.    if 
2850: 74 65 73 74 20 2d 72 20 24 64 69 72 2f 6c 69 62  test -r $dir/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 2e 34 2e 30 3b 20 74 68 65 6e 0a  UFFIX.4.0; then.
2880: 20 20 20 20 20 20 20 20 52 45 41 44 4c 49 4e 45          READLINE
2890: 5f 56 45 52 53 49 4f 4e 5f 53 55 46 46 49 58 3d  _VERSION_SUFFIX=
28a0: 22 2e 34 2e 30 22 0a 20 20 20 20 20 20 20 20 52  ".4.0".        R
28b0: 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 44 49 52 3d  EADLINE_LIB_DIR=
28c0: 24 64 69 72 0a 20 20 20 20 20 20 20 20 62 72 65  $dir.        bre
28d0: 61 6b 0a 20 20 20 20 66 69 0a 20 20 20 20 69 66  ak.    fi.    if
28e0: 20 74 65 73 74 20 2d 72 20 24 64 69 72 2f 6c 69   test -r $dir/li
28f0: 62 72 65 61 64 6c 69 6e 65 24 53 48 4c 49 42 5f  breadline$SHLIB_
2900: 53 55 46 46 49 58 2e 33 2e 30 3b 20 74 68 65 6e  SUFFIX.3.0; then
2910: 0a 20 20 20 20 20 20 20 20 52 45 41 44 4c 49 4e  .        READLIN
2920: 45 5f 56 45 52 53 49 4f 4e 5f 53 55 46 46 49 58  E_VERSION_SUFFIX
2930: 3d 22 2e 33 2e 30 22 0a 20 20 20 20 20 20 20 20  =".3.0".        
2940: 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 44 49 52  READLINE_LIB_DIR
2950: 3d 24 64 69 72 0a 20 20 20 20 20 20 20 20 62 72  =$dir.        br
2960: 65 61 6b 0a 20 20 20 20 66 69 0a 64 6f 6e 65 0a  eak.    fi.done.
2970: 0a 69 66 20 74 65 73 74 20 2d 7a 20 22 24 52 45  .if test -z "$RE
2980: 41 44 4c 49 4e 45 5f 4c 49 42 5f 44 49 52 22 3b  ADLINE_LIB_DIR";
2990: 20 74 68 65 6e 0a 20 20 20 20 41 43 5f 4d 53 47   then.    AC_MSG
29a0: 5f 45 52 52 4f 52 28 5b 0a 20 20 43 61 6e 27 74  _ERROR([.  Can't
29b0: 20 66 69 6e 64 20 6c 69 62 72 65 61 64 6c 69 6e   find libreadlin
29c0: 65 24 53 48 4c 49 42 5f 53 55 46 46 49 58 2e 0a  e$SHLIB_SUFFIX..
29d0: 20 20 55 73 65 20 2d 2d 77 69 74 68 2d 72 65 61    Use --with-rea
29e0: 64 6c 69 6e 65 2d 6c 69 62 72 61 72 79 20 74 6f  dline-library to
29f0: 20 73 70 65 63 69 66 79 20 74 68 65 20 64 69 72   specify the dir
2a00: 65 63 74 6f 72 79 0a 20 20 63 6f 6e 74 61 69 6e  ectory.  contain
2a10: 69 6e 67 20 6c 69 62 72 65 61 64 6c 69 6e 65 24  ing libreadline$
2a20: 53 48 4c 49 42 5f 53 55 46 46 49 58 20 6f 6e 20  SHLIB_SUFFIX on 
2a30: 79 6f 75 72 20 73 79 73 74 65 6d 2e 5d 29 0a 65  your system.]).e
2a40: 6c 73 65 0a 20 20 20 20 41 43 5f 4d 53 47 5f 52  lse.    AC_MSG_R
2a50: 45 53 55 4c 54 28 24 7b 52 45 41 44 4c 49 4e 45  ESULT(${READLINE
2a60: 5f 4c 49 42 5f 44 49 52 7d 2f 6c 69 62 72 65 61  _LIB_DIR}/librea
2a70: 64 6c 69 6e 65 24 7b 53 48 4c 49 42 5f 53 55 46  dline${SHLIB_SUF
2a80: 46 49 58 7d 24 7b 52 45 41 44 4c 49 4e 45 5f 56  FIX}${READLINE_V
2a90: 45 52 53 49 4f 4e 5f 53 55 46 46 49 58 7d 29 0a  ERSION_SUFFIX}).
2aa0: 66 69 0a 0a 0a 0a 23 20 2d 2d 2d 0a 23 20 63 68  fi....# ---.# ch
2ab0: 65 63 6b 20 66 6f 72 20 74 68 65 20 74 65 72 6d  eck for the term
2ac0: 69 6e 61 6c 20 6c 69 62 72 61 72 79 2e 0a 23 20  inal library..# 
2ad0: 2d 2d 2d 0a 0a 6f 6c 69 62 73 3d 24 7b 4c 49 42  ---..olibs=${LIB
2ae0: 53 7d 0a 41 43 5f 41 52 47 5f 57 49 54 48 28 74  S}.AC_ARG_WITH(t
2af0: 6c 69 62 2d 6c 69 62 72 61 72 79 2c 0a 20 20 20  lib-library,.   
2b00: 20 20 20 20 20 20 20 20 20 5b 20 20 2d 2d 77 69           [  --wi
2b10: 74 68 2d 74 6c 69 62 2d 6c 69 62 72 61 72 79 3d  th-tlib-library=
2b20: 44 49 52 0a 20 20 20 20 20 20 20 20 20 20 20 20  DIR.            
2b30: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68                wh
2b40: 65 72 65 20 74 6f 20 73 65 61 72 63 68 20 66 6f  ere to search fo
2b50: 72 20 63 75 72 73 65 73 20 2f 20 74 65 72 6d 63  r curses / termc
2b60: 61 70 5d 2c 0a 20 20 20 20 20 20 20 20 20 20 20  ap],.           
2b70: 20 74 6c 69 62 5f 6c 69 62 72 61 72 79 3d 24 77   tlib_library=$w
2b80: 69 74 68 76 61 6c 2c 20 74 6c 69 62 5f 6c 69 62  ithval, tlib_lib
2b90: 72 61 72 79 3d 22 22 29 0a 0a 41 43 5f 4d 53 47  rary="")..AC_MSG
2ba0: 5f 43 48 45 43 4b 49 4e 47 28 5b 77 68 65 72 65  _CHECKING([where
2bb0: 20 74 6f 20 6c 6f 6f 6b 20 66 6f 72 20 74 68 65   to look for the
2bc0: 20 74 65 72 6d 69 6e 61 6c 20 6c 69 62 72 61 72   terminal librar
2bd0: 79 5d 29 0a 54 45 52 4d 4c 49 42 5f 44 49 52 3d  y]).TERMLIB_DIR=
2be0: 22 22 0a 54 45 52 4d 4c 49 42 5f 56 45 52 53 49  "".TERMLIB_VERSI
2bf0: 4f 4e 5f 53 55 46 46 49 58 3d 22 22 0a 66 6f 72  ON_SUFFIX="".for
2c00: 20 64 69 72 20 69 6e 20 24 74 6c 69 62 5f 6c 69   dir in $tlib_li
2c10: 62 72 61 72 79 20 24 54 43 4c 52 45 41 44 4c 49  brary $TCLREADLI
2c20: 4e 45 5f 4c 50 41 54 48 20 24 70 72 65 66 69 78  NE_LPATH $prefix
2c30: 2f 6c 69 62 2f 3b 20 64 6f 0a 09 66 6f 72 20 74  /lib/; do..for t
2c40: 6c 69 62 20 69 6e 20 6e 63 75 72 73 65 73 20 74  lib in ncurses t
2c50: 65 72 6d 6c 69 62 20 74 65 72 6d 63 61 70 20 63  ermlib termcap c
2c60: 75 72 73 65 73 3b 20 64 6f 0a 20 20 20 20 20 20  urses; do.      
2c70: 20 20 64 6e 6c 20 65 63 68 6f 20 22 28 6c 73 20    dnl echo "(ls 
2c80: 24 7b 64 69 72 7d 2f 6c 69 62 24 7b 74 6c 69 62  ${dir}/lib${tlib
2c90: 7d 24 7b 53 48 4c 49 42 5f 53 55 46 46 49 58 7d  }${SHLIB_SUFFIX}
2ca0: 2a 29 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 22 0a  *) 2>/dev/null".
2cb0: 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 3d 22          result="
2cc0: 60 28 6c 73 20 2d 72 20 24 7b 64 69 72 7d 2f 6c  `(ls -r ${dir}/l
2cd0: 69 62 24 7b 74 6c 69 62 7d 24 7b 53 48 4c 49 42  ib${tlib}${SHLIB
2ce0: 5f 53 55 46 46 49 58 7d 2a 29 20 32 3e 2f 64 65  _SUFFIX}*) 2>/de
2cf0: 76 2f 6e 75 6c 6c 60 22 0a 09 09 64 6e 6c 20 65  v/null`"...dnl e
2d00: 63 68 6f 20 72 65 73 75 6c 74 20 3d 20 24 72 65  cho result = $re
2d10: 73 75 6c 74 0a 09 09 69 66 20 74 65 73 74 20 22  sult...if test "
2d20: 78 24 72 65 73 75 6c 74 22 20 21 3d 20 22 78 22  x$result" != "x"
2d30: 3b 20 74 68 65 6e 0a 09 09 09 66 6f 72 20 6c 69  ; then....for li
2d40: 62 20 69 6e 20 24 7b 74 6c 69 62 7d 3b 20 64 6f  b in ${tlib}; do
2d50: 0a 09 09 09 09 64 6e 6c 20 49 74 27 73 20 70 6f  .....dnl It's po
2d60: 73 73 69 62 6c 65 20 74 68 61 74 20 61 20 6c 69  ssible that a li
2d70: 62 72 61 72 79 20 69 73 20 66 6f 75 6e 64 20 62  brary is found b
2d80: 75 74 20 69 74 20 64 6f 65 73 6e 27 74 20 77 6f  ut it doesn't wo
2d90: 72 6b 0a 09 09 09 09 64 6e 6c 20 65 2e 67 2e 2c  rk.....dnl e.g.,
2da0: 20 73 68 61 72 65 64 20 6c 69 62 72 61 72 79 20   shared library 
2db0: 74 68 61 74 20 63 61 6e 6e 6f 74 20 62 65 20 66  that cannot be f
2dc0: 6f 75 6e 64 0a 09 09 09 09 64 6e 6c 20 63 6f 6d  ound.....dnl com
2dd0: 70 69 6c 65 20 61 6e 64 20 72 75 6e 20 61 20 74  pile and run a t
2de0: 65 73 74 20 70 72 6f 67 72 61 6d 20 74 6f 20 62  est program to b
2df0: 65 20 73 75 72 65 0a 09 09 09 09 4c 49 42 53 3d  e sure.....LIBS=
2e00: 2d 6c 24 7b 6c 69 62 7d 0a 09 09 09 09 41 43 5f  -l${lib}.....AC_
2e10: 54 52 59 5f 52 55 4e 28 5b 0a 23 69 66 64 65 66  TRY_RUN([.#ifdef
2e20: 20 48 41 56 45 5f 54 45 52 4d 43 41 50 5f 48 0a   HAVE_TERMCAP_H.
2e30: 23 20 69 6e 63 6c 75 64 65 20 3c 74 65 72 6d 63  # include <termc
2e40: 61 70 2e 68 3e 0a 23 65 6e 64 69 66 0a 6d 61 69  ap.h>.#endif.mai
2e50: 6e 28 29 20 7b 63 68 61 72 20 2a 73 3b 20 73 3d  n() {char *s; s=
2e60: 28 63 68 61 72 20 2a 29 74 67 6f 74 6f 28 22 25  (char *)tgoto("%
2e70: 70 31 25 64 22 2c 20 30 2c 20 31 29 3b 20 65 78  p1%d", 0, 1); ex
2e80: 69 74 28 30 29 3b 20 7d 5d 2c 0a 09 09 09 72 65  it(0); }],....re
2e90: 73 3d 22 4f 4b 22 2c 20 72 65 73 3d 22 46 41 49  s="OK", res="FAI
2ea0: 4c 22 2c 20 72 65 73 3d 22 46 41 49 4c 22 29 0a  L", res="FAIL").
2eb0: 09 09 09 09 69 66 20 74 65 73 74 20 22 24 72 65  ....if test "$re
2ec0: 73 22 20 3d 20 22 4f 4b 22 3b 20 74 68 65 6e 0a  s" = "OK"; then.
2ed0: 09 09 09 09 09 54 45 52 4d 4c 49 42 5f 44 49 52  .....TERMLIB_DIR
2ee0: 3d 2d 4c 24 7b 64 69 72 7d 0a 09 09 09 09 09 69  =-L${dir}......i
2ef0: 66 20 74 65 73 74 20 22 60 28 75 6e 61 6d 65 29  f test "`(uname)
2f00: 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 60 22 20 3d   2>/dev/null`" =
2f10: 20 53 75 6e 4f 53 20 26 26 0a 09 09 09 09 09 09   SunOS &&.......
2f20: 75 6e 61 6d 65 20 2d 72 20 7c 20 67 72 65 70 20  uname -r | grep 
2f30: 27 5e 35 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b  '^5' >/dev/null;
2f40: 20 74 68 65 6e 0a 09 09 09 09 09 09 54 45 52 4d   then.......TERM
2f50: 4c 49 42 5f 44 49 52 5f 52 3d 22 24 7b 54 45 52  LIB_DIR_R="${TER
2f60: 4d 4c 49 42 5f 44 49 52 7d 20 2d 52 24 7b 64 69  MLIB_DIR} -R${di
2f70: 72 7d 22 0a 09 09 09 09 09 66 69 0a 09 09 09 09  r}"......fi.....
2f80: 09 54 45 52 4d 4c 49 42 3d 2d 6c 24 7b 74 6c 69  .TERMLIB=-l${tli
2f90: 62 7d 0a 09 09 09 09 09 62 72 65 61 6b 0a 09 09  b}......break...
2fa0: 09 09 66 69 0a 09 09 09 64 6f 6e 65 0a 09 09 09  ..fi....done....
2fb0: 69 66 20 74 65 73 74 20 22 78 24 7b 54 45 52 4d  if test "x${TERM
2fc0: 4c 49 42 5f 44 49 52 7d 22 20 3d 20 22 78 22 3b  LIB_DIR}" = "x";
2fd0: 20 74 68 65 6e 0a 09 09 09 09 41 43 5f 4d 53 47   then.....AC_MSG
2fe0: 5f 52 45 53 55 4c 54 28 6e 6f 6e 65 20 6f 66 20  _RESULT(none of 
2ff0: 24 6c 69 62 6e 61 6d 65 20 69 73 20 75 73 61 62  $libname is usab
3000: 6c 65 29 0a 09 20 20 20 20 20 20 20 20 65 6c 73  le)..        els
3010: 65 0a 09 09 09 09 62 72 65 61 6b 0a 09 09 09 66  e.....break....f
3020: 69 0a 09 09 66 69 0a 09 64 6f 6e 65 0a 09 69 66  i...fi..done..if
3030: 20 74 65 73 74 20 22 78 24 7b 54 45 52 4d 4c 49   test "x${TERMLI
3040: 42 5f 44 49 52 7d 22 20 21 3d 20 22 78 22 3b 20  B_DIR}" != "x"; 
3050: 74 68 65 6e 0a 09 09 62 72 65 61 6b 0a 09 66 69  then...break..fi
3060: 0a 64 6f 6e 65 0a 0a 69 66 20 74 65 73 74 20 22  .done..if test "
3070: 78 24 54 45 52 4d 4c 49 42 5f 44 49 52 22 20 3d  x$TERMLIB_DIR" =
3080: 20 22 78 22 3b 20 74 68 65 6e 0a 09 41 43 5f 4d   "x"; then..AC_M
3090: 53 47 5f 45 52 52 4f 52 28 5b 0a 6e 6f 20 74 65  SG_ERROR([.no te
30a0: 72 6d 69 6e 61 6c 20 6c 69 62 72 61 72 79 20 66  rminal library f
30b0: 6f 75 6e 64 2e 20 50 6c 65 61 73 65 20 72 65 74  ound. Please ret
30c0: 72 79 20 77 69 74 68 20 74 68 65 20 2d 2d 77 69  ry with the --wi
30d0: 74 68 2d 74 6c 69 62 20 61 72 67 75 6d 65 6e 74  th-tlib argument
30e0: 2e 5d 29 0a 65 6c 73 65 0a 09 41 43 5f 4d 53 47  .]).else..AC_MSG
30f0: 5f 52 45 53 55 4c 54 28 24 7b 54 45 52 4d 4c 49  _RESULT(${TERMLI
3100: 42 5f 44 49 52 7d 20 24 7b 54 45 52 4d 4c 49 42  B_DIR} ${TERMLIB
3110: 7d 29 0a 66 69 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d  }).fi...#-------
3120: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3130: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3140: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3150: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20  -------------.# 
3160: 20 20 43 68 65 63 6b 20 66 6f 72 20 61 70 70 72    Check for appr
3170: 6f 70 72 69 61 74 65 20 76 65 72 73 69 6f 6e 20  opriate version 
3180: 6f 66 20 67 6e 75 20 72 65 61 64 6c 69 6e 65 0a  of gnu readline.
3190: 23 20 20 20 28 6f 6c 64 65 72 20 76 65 72 73 69  #   (older versi
31a0: 6f 6e 73 20 6f 66 20 67 6e 75 20 72 65 61 64 6c  ons of gnu readl
31b0: 69 6e 65 20 64 6f 6e 27 74 20 68 61 76 65 0a 23  ine don't have.#
31c0: 20 20 20 20 72 6c 5f 63 61 6c 6c 62 61 63 6b 5f      rl_callback_
31d0: 72 65 61 64 5f 63 68 61 72 20 28 29 29 2e 0a 23  read_char ())..#
31e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
31f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3200: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3210: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3220: 2d 2d 2d 2d 0a 0a 4c 49 42 53 3d 22 2d 4c 24 52  ----..LIBS="-L$R
3230: 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 44 49 52 20  EADLINE_LIB_DIR 
3240: 24 7b 54 45 52 4d 4c 49 42 5f 44 49 52 7d 20 2d  ${TERMLIB_DIR} -
3250: 6c 72 65 61 64 6c 69 6e 65 20 24 54 45 52 4d 4c  lreadline $TERML
3260: 49 42 20 24 6f 6c 69 62 73 22 0a 61 6c 74 65 72  IB $olibs".alter
3270: 6e 61 74 65 3d 6e 6f 0a 41 43 5f 43 48 45 43 4b  nate=no.AC_CHECK
3280: 5f 46 55 4e 43 28 0a 20 20 20 20 72 6c 5f 63 61  _FUNC(.    rl_ca
3290: 6c 6c 62 61 63 6b 5f 72 65 61 64 5f 63 68 61 72  llback_read_char
32a0: 2c 20 61 6c 74 65 72 6e 61 74 65 3d 79 65 73 2c  , alternate=yes,
32b0: 20 61 6c 74 65 72 6e 61 74 65 3d 6e 6f 0a 29 0a   alternate=no.).
32c0: 69 66 20 74 65 73 74 20 22 24 61 6c 74 65 72 6e  if test "$altern
32d0: 61 74 65 22 20 3d 20 22 6e 6f 22 3b 20 74 68 65  ate" = "no"; the
32e0: 6e 0a 20 20 20 20 41 43 5f 4d 53 47 5f 45 52 52  n.    AC_MSG_ERR
32f0: 4f 52 28 61 6c 74 65 72 6e 61 74 65 20 69 6e 74  OR(alternate int
3300: 65 72 66 61 63 65 20 6e 6f 74 20 73 75 70 70 6f  erface not suppo
3310: 72 74 65 64 20 62 79 20 74 68 69 73 20 72 65 61  rted by this rea
3320: 64 6c 69 6e 65 20 76 65 72 73 69 6f 6e 2e 29 0a  dline version.).
3330: 66 69 0a 0a 0a 23 20 63 68 65 63 6b 20 66 6f 72  fi...# check for
3340: 20 72 65 61 64 6c 69 6e 65 27 73 20 28 6d 61 63   readline's (mac
3350: 72 6f 2e 63 29 20 70 72 69 76 61 74 65 20 76 61  ro.c) private va
3360: 72 69 61 62 6c 65 0a 23 20 5f 72 6c 5f 65 78 65  riable.# _rl_exe
3370: 63 75 74 69 6e 67 5f 6d 61 63 72 6f 2e 0a 0a 41  cuting_macro...A
3380: 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b  C_MSG_CHECKING([
3390: 66 6f 72 20 5f 72 6c 5f 65 78 65 63 75 74 69 6e  for _rl_executin
33a0: 67 5f 6d 61 63 72 6f 20 69 6e 20 2d 6c 72 65 61  g_macro in -lrea
33b0: 64 6c 69 6e 65 5d 29 0a 41 43 5f 54 52 59 5f 4c  dline]).AC_TRY_L
33c0: 49 4e 4b 28 2c 5b 0a 09 65 78 74 65 72 6e 20 63  INK(,[..extern c
33d0: 68 61 72 2a 20 5f 72 6c 5f 65 78 65 63 75 74 69  har* _rl_executi
33e0: 6e 67 5f 6d 61 63 72 6f 3b 0a 09 5f 72 6c 5f 65  ng_macro;.._rl_e
33f0: 78 65 63 75 74 69 6e 67 5f 6d 61 63 72 6f 20 3d  xecuting_macro =
3400: 20 28 63 68 61 72 2a 29 20 30 3b 0a 5d 2c 0a 20   (char*) 0;.],. 
3410: 20 20 20 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54     AC_MSG_RESULT
3420: 28 79 65 73 29 3b 20 41 43 5f 44 45 46 49 4e 45  (yes); AC_DEFINE
3430: 5f 55 4e 51 55 4f 54 45 44 28 45 58 45 43 55 54  _UNQUOTED(EXECUT
3440: 49 4e 47 5f 4d 41 43 52 4f 5f 48 41 43 4b 2c 20  ING_MACRO_HACK, 
3450: 31 29 2c 0a 20 20 20 20 41 43 5f 4d 53 47 5f 52  1),.    AC_MSG_R
3460: 45 53 55 4c 54 28 6e 6f 29 29 0a 0a 23 20 63 68  ESULT(no))..# ch
3470: 65 63 6b 20 66 6f 72 20 72 65 61 64 6c 69 6e 65  eck for readline
3480: 27 73 20 72 6c 5f 63 6c 65 61 6e 75 70 5f 61 66  's rl_cleanup_af
3490: 74 65 72 5f 73 69 67 6e 61 6c 0a 0a 41 43 5f 4d  ter_signal..AC_M
34a0: 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 66 6f 72  SG_CHECKING([for
34b0: 20 72 6c 5f 63 6c 65 61 6e 75 70 5f 61 66 74 65   rl_cleanup_afte
34c0: 72 5f 73 69 67 6e 61 6c 28 29 20 69 6e 20 2d 6c  r_signal() in -l
34d0: 72 65 61 64 6c 69 6e 65 5d 29 0a 41 43 5f 54 52  readline]).AC_TR
34e0: 59 5f 4c 49 4e 4b 28 2c 5b 0a 20 20 20 20 65 78  Y_LINK(,[.    ex
34f0: 74 65 72 6e 20 76 6f 69 64 20 72 6c 5f 63 6c 65  tern void rl_cle
3500: 61 6e 75 70 5f 61 66 74 65 72 5f 73 69 67 6e 61  anup_after_signa
3510: 6c 28 29 3b 0a 09 72 6c 5f 63 6c 65 61 6e 75 70  l();..rl_cleanup
3520: 5f 61 66 74 65 72 5f 73 69 67 6e 61 6c 28 29 3b  _after_signal();
3530: 0a 5d 2c 0a 20 20 20 20 41 43 5f 4d 53 47 5f 52  .],.    AC_MSG_R
3540: 45 53 55 4c 54 28 79 65 73 29 3b 20 41 43 5f 44  ESULT(yes); AC_D
3550: 45 46 49 4e 45 5f 55 4e 51 55 4f 54 45 44 28 43  EFINE_UNQUOTED(C
3560: 4c 45 41 4e 55 50 5f 41 46 45 52 5f 53 49 47 4e  LEANUP_AFER_SIGN
3570: 41 4c 2c 20 31 29 2c 0a 20 20 20 20 41 43 5f 4d  AL, 1),.    AC_M
3580: 53 47 5f 52 45 53 55 4c 54 28 6e 6f 29 29 0a 0a  SG_RESULT(no))..
3590: 0a 41 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47  .AC_MSG_CHECKING
35a0: 28 5b 66 6f 72 20 74 68 65 20 72 65 61 64 6c 69  ([for the readli
35b0: 6e 65 20 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65  ne version numbe
35c0: 72 5d 29 0a 41 43 5f 54 52 59 5f 52 55 4e 28 5b  r]).AC_TRY_RUN([
35d0: 0a 23 69 6e 63 6c 75 64 65 20 3c 73 74 64 69 6f  .#include <stdio
35e0: 2e 68 3e 0a 69 6e 74 20 6d 61 69 6e 20 28 29 20  .h>.int main () 
35f0: 7b 0a 20 20 20 20 46 49 4c 45 20 2a 66 70 20 3d  {.    FILE *fp =
3600: 20 66 6f 70 65 6e 28 22 63 6f 6e 66 74 65 73 74   fopen("conftest
3610: 76 65 72 73 69 6f 6e 22 2c 20 22 77 22 29 3b 0a  version", "w");.
3620: 20 20 20 20 65 78 74 65 72 6e 20 63 68 61 72 20      extern char 
3630: 2a 72 6c 5f 6c 69 62 72 61 72 79 5f 76 65 72 73  *rl_library_vers
3640: 69 6f 6e 3b 0a 20 20 20 20 66 70 72 69 6e 74 66  ion;.    fprintf
3650: 28 66 70 2c 20 22 25 73 22 2c 20 72 6c 5f 6c 69  (fp, "%s", rl_li
3660: 62 72 61 72 79 5f 76 65 72 73 69 6f 6e 29 3b 0a  brary_version);.
3670: 20 20 20 20 63 6c 6f 73 65 28 66 70 29 3b 0a 20      close(fp);. 
3680: 20 20 20 72 65 74 75 72 6e 20 30 3b 0a 7d 5d 2c     return 0;.}],
3690: 0a 20 20 20 20 52 45 41 44 4c 49 4e 45 5f 56 45  .    READLINE_VE
36a0: 52 53 49 4f 4e 3d 60 63 61 74 20 63 6f 6e 66 74  RSION=`cat conft
36b0: 65 73 74 76 65 72 73 69 6f 6e 60 0a 20 20 20 20  estversion`.    
36c0: 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 24 52  AC_MSG_RESULT($R
36d0: 45 41 44 4c 49 4e 45 5f 56 45 52 53 49 4f 4e 29  EADLINE_VERSION)
36e0: 2c 0a 20 20 20 20 41 43 5f 4d 53 47 5f 52 45 53  ,.    AC_MSG_RES
36f0: 55 4c 54 28 66 61 69 6c 65 64 29 2c 0a 20 20 20  ULT(failed),.   
3700: 20 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 6e   AC_MSG_RESULT(n
3710: 6f 20 63 72 6f 73 73 20 63 6f 6d 70 69 6c 69 6e  o cross compilin
3720: 67 29 29 0a 0a 0a 4c 49 42 53 3d 24 4c 49 42 53  g))...LIBS=$LIBS
3730: 0a 0a 0a 0a 23 20 54 68 69 73 20 69 73 20 61 20  ....# This is a 
3740: 74 65 73 74 0a 23 41 43 5f 43 5f 42 49 47 45 4e  test.#AC_C_BIGEN
3750: 44 49 41 4e 0a 0a 23 20 54 4f 44 4f 3a 20 63 68  DIAN..# TODO: ch
3760: 65 63 6b 20 66 6f 72 20 72 65 61 64 6c 69 6e 65  eck for readline
3770: 20 76 65 72 73 69 6f 6e 0a 23 20 28 6c 69 6e 6b   version.# (link
3780: 20 74 65 73 74 70 72 6f 67 72 61 6d 20 77 69 74   testprogram wit
3790: 68 20 2d 6c 72 65 61 64 6c 69 6e 65 29 0a 0a 41  h -lreadline)..A
37a0: 43 5f 53 55 42 53 54 28 54 43 4c 52 45 41 44 4c  C_SUBST(TCLREADL
37b0: 49 4e 45 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f  INE_MAJOR_VERSIO
37c0: 4e 29 0a 41 43 5f 53 55 42 53 54 28 54 43 4c 52  N).AC_SUBST(TCLR
37d0: 45 41 44 4c 49 4e 45 5f 4d 49 4e 4f 52 5f 56 45  EADLINE_MINOR_VE
37e0: 52 53 49 4f 4e 29 0a 41 43 5f 53 55 42 53 54 28  RSION).AC_SUBST(
37f0: 54 43 4c 52 45 41 44 4c 49 4e 45 5f 56 45 52 53  TCLREADLINE_VERS
3800: 49 4f 4e 29 0a 41 43 5f 53 55 42 53 54 28 54 43  ION).AC_SUBST(TC
3810: 4c 52 45 41 44 4c 49 4e 45 5f 50 41 54 43 48 4c  LREADLINE_PATCHL
3820: 45 56 45 4c 29 0a 41 43 5f 53 55 42 53 54 28 54  EVEL).AC_SUBST(T
3830: 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 52 41  CLREADLINE_LIBRA
3840: 52 59 29 0a 41 43 5f 53 55 42 53 54 28 54 43 4c  RY).AC_SUBST(TCL
3850: 52 45 41 44 4c 49 4e 45 5f 50 41 54 43 48 4c 45  READLINE_PATCHLE
3860: 56 45 4c 5f 53 54 52 29 0a 0a 0a 41 43 5f 53 55  VEL_STR)...AC_SU
3870: 42 53 54 28 54 43 4c 5f 4c 49 42 5f 44 49 52 29  BST(TCL_LIB_DIR)
3880: 0a 41 43 5f 53 55 42 53 54 28 54 43 4c 5f 49 4e  .AC_SUBST(TCL_IN
3890: 43 4c 55 44 45 5f 44 49 52 29 0a 41 43 5f 53 55  CLUDE_DIR).AC_SU
38a0: 42 53 54 28 52 45 41 44 4c 49 4e 45 5f 49 4e 43  BST(READLINE_INC
38b0: 4c 55 44 45 5f 44 49 52 29 0a 0a 41 43 5f 53 55  LUDE_DIR)..AC_SU
38c0: 42 53 54 28 43 46 4c 41 47 53 29 0a 41 43 5f 53  BST(CFLAGS).AC_S
38d0: 55 42 53 54 28 44 4c 5f 4c 49 42 53 29 0a 41 43  UBST(DL_LIBS).AC
38e0: 5f 53 55 42 53 54 28 4c 44 5f 46 4c 41 47 53 29  _SUBST(LD_FLAGS)
38f0: 0a 41 43 5f 53 55 42 53 54 28 52 41 4e 4c 49 42  .AC_SUBST(RANLIB
3900: 29 0a 0a 41 43 5f 53 55 42 53 54 28 4d 41 4b 45  )..AC_SUBST(MAKE
3910: 5f 4c 49 42 29 0a 41 43 5f 53 55 42 53 54 28 53  _LIB).AC_SUBST(S
3920: 48 4c 49 42 5f 43 46 4c 41 47 53 29 0a 0a 41 43  HLIB_CFLAGS)..AC
3930: 5f 53 55 42 53 54 28 53 48 4c 49 42 5f 4c 44 29  _SUBST(SHLIB_LD)
3940: 0a 41 43 5f 53 55 42 53 54 28 53 48 4c 49 42 5f  .AC_SUBST(SHLIB_
3950: 4c 44 5f 4c 49 42 53 29 0a 0a 41 43 5f 53 55 42  LD_LIBS)..AC_SUB
3960: 53 54 28 53 48 4c 49 42 5f 53 55 46 46 49 58 29  ST(SHLIB_SUFFIX)
3970: 0a 0a 41 43 5f 53 55 42 53 54 28 54 45 52 4d 4c  ..AC_SUBST(TERML
3980: 49 42 29 0a 41 43 5f 53 55 42 53 54 28 54 45 52  IB).AC_SUBST(TER
3990: 4d 4c 49 42 5f 44 49 52 29 0a 41 43 5f 53 55 42  MLIB_DIR).AC_SUB
39a0: 53 54 28 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f  ST(READLINE_LIB_
39b0: 44 49 52 29 0a 0a 41 43 5f 53 55 42 53 54 28 54  DIR)..AC_SUBST(T
39c0: 43 4c 52 45 41 44 4c 49 4e 45 5f 4c 49 42 5f 46  CLREADLINE_LIB_F
39d0: 49 4c 45 29 0a 41 43 5f 53 55 42 53 54 28 54 43  ILE).AC_SUBST(TC
39e0: 4c 52 45 41 44 4c 49 4e 45 5f 42 55 49 4c 44 5f  LREADLINE_BUILD_
39f0: 4c 49 42 5f 53 50 45 43 29 0a 41 43 5f 53 55 42  LIB_SPEC).AC_SUB
3a00: 53 54 28 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c  ST(TCLREADLINE_L
3a10: 49 42 5f 53 50 45 43 29 0a 0a 41 43 5f 53 55 42  IB_SPEC)..AC_SUB
3a20: 53 54 28 54 43 4c 52 45 41 44 4c 49 4e 45 5f 4c  ST(TCLREADLINE_L
3a30: 49 42 5f 44 49 52 29 0a 41 43 5f 53 55 42 53 54  IB_DIR).AC_SUBST
3a40: 28 54 43 4c 52 45 41 44 4c 49 4e 45 5f 50 4b 47  (TCLREADLINE_PKG
3a50: 5f 46 49 4c 45 29 0a 0a 41 43 5f 53 55 42 53 54  _FILE)..AC_SUBST
3a60: 28 54 43 4c 52 45 41 44 4c 49 4e 45 5f 50 41 43  (TCLREADLINE_PAC
3a70: 4b 41 47 45 5f 50 41 54 48 29 0a 0a 0a 41 43 5f  KAGE_PATH)...AC_
3a80: 4f 55 54 50 55 54 28 4d 61 6b 65 66 69 6c 65 20  OUTPUT(Makefile 
3a90: 74 63 6c 72 65 61 64 6c 69 6e 65 2e 68 20 74 63  tclreadline.h tc
3aa0: 6c 72 65 61 64 6c 69 6e 65 49 6e 69 74 2e 74 63  lreadlineInit.tc
3ab0: 6c 20 74 63 6c 72 65 61 64 6c 69 6e 65 53 65 74  l tclreadlineSet
3ac0: 75 70 2e 74 63 6c 20 74 63 6c 72 65 61 64 6c 69  up.tcl tclreadli
3ad0: 6e 65 43 6f 6e 66 69 67 2e 73 68 20 74 63 6c 72  neConfig.sh tclr
3ae0: 65 61 64 6c 69 6e 65 2e 6e 20 70 6b 67 49 6e 64  eadline.n pkgInd
3af0: 65 78 2e 74 63 6c 29 0a 0a 0a 23 54 43 4c 5f 43  ex.tcl)...#TCL_C
3b00: 43 3d 27 63 63 27 0a 23 54 43 4c 5f 43 46 4c 41  C='cc'.#TCL_CFLA
3b10: 47 53 5f 44 45 42 55 47 3d 27 2d 67 27 0a 23 54  GS_DEBUG='-g'.#T
3b20: 43 4c 5f 43 46 4c 41 47 53 5f 4f 50 54 49 4d 49  CL_CFLAGS_OPTIMI
3b30: 5a 45 3d 27 2d 4f 27 0a 23 54 43 4c 5f 53 48 41  ZE='-O'.#TCL_SHA
3b40: 52 45 44 5f 42 55 49 4c 44 3d 31 0a 23 0a 23 54  RED_BUILD=1.#.#T
3b50: 43 4c 5f 50 52 45 46 49 58 3d 27 2f 75 73 72 2f  CL_PREFIX='/usr/
3b60: 6c 6f 63 61 6c 27 0a 23 54 43 4c 5f 45 58 45 43  local'.#TCL_EXEC
3b70: 5f 50 52 45 46 49 58 3d 27 2f 75 73 72 2f 6c 6f  _PREFIX='/usr/lo
3b80: 63 61 6c 27 0a 23 0a 23 54 43 4c 5f 53 48 4c 49  cal'.#.#TCL_SHLI
3b90: 42 5f 43 46 4c 41 47 53 3d 27 2d 66 50 49 43 27  B_CFLAGS='-fPIC'
3ba0: 0a 23 54 43 4c 5f 53 48 4c 49 42 5f 4c 44 3d 27  .#TCL_SHLIB_LD='
3bb0: 63 63 20 2d 73 68 61 72 65 64 27 0a 23 54 43 4c  cc -shared'.#TCL
3bc0: 5f 53 48 4c 49 42 5f 53 55 46 46 49 58 3d 27 2e  _SHLIB_SUFFIX='.
3bd0: 73 6f 27 0a 23 54 43 4c 5f 44 4c 5f 4c 49 42 53  so'.#TCL_DL_LIBS
3be0: 3d 27 2d 6c 64 6c 27 0a 23 54 43 4c 5f 4c 44 5f  ='-ldl'.#TCL_LD_
3bf0: 46 4c 41 47 53 3d 27 2d 72 64 79 6e 61 6d 69 63  FLAGS='-rdynamic
3c00: 27 0a 23 54 43 4c 5f 4c 44 5f 53 45 41 52 43 48  '.#TCL_LD_SEARCH
3c10: 5f 46 4c 41 47 53 3d 27 27 0a 23 54 43 4c 5f 52  _FLAGS=''.#TCL_R
3c20: 41 4e 4c 49 42 3d 27 3a 27 0a 23 54 43 4c 5f 50  ANLIB=':'.#TCL_P
3c30: 41 43 4b 41 47 45 5f 50 41 54 48 3d 27 2f 75 73  ACKAGE_PATH='/us
3c40: 72 2f 6c 6f 63 61 6c 2f 6c 69 62 27 0a           r/local/lib'.