Hex Artifact Content

Artifact d20191ea0eeffd7545cfb223f6e0b50a5ba844a3:


0000: 23 21 2f 62 69 6e 2f 62 61 73 68 20 2d 6e 6f 72  #!/bin/bash -nor
0010: 63 0a 64 6e 6c 09 54 68 69 73 20 66 69 6c 65 20  c.dnl.This file 
0020: 69 73 20 61 6e 20 69 6e 70 75 74 20 66 69 6c 65  is an input file
0030: 20 75 73 65 64 20 62 79 20 74 68 65 20 47 4e 55   used by the GNU
0040: 20 22 61 75 74 6f 63 6f 6e 66 22 20 70 72 6f 67   "autoconf" prog
0050: 72 61 6d 20 74 6f 0a 64 6e 6c 09 67 65 6e 65 72  ram to.dnl.gener
0060: 61 74 65 20 74 68 65 20 66 69 6c 65 20 22 63 6f  ate the file "co
0070: 6e 66 69 67 75 72 65 22 2c 20 77 68 69 63 68 20  nfigure", which 
0080: 69 73 20 72 75 6e 20 64 75 72 69 6e 67 20 54 63  is run during Tc
0090: 6c 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 0a 64  l installation.d
00a0: 6e 6c 09 74 6f 20 63 6f 6e 66 69 67 75 72 65 20  nl.to configure 
00b0: 74 68 65 20 73 79 73 74 65 6d 20 66 6f 72 20 74  the system for t
00c0: 68 65 20 6c 6f 63 61 6c 20 65 6e 76 69 72 6f 6e  he local environ
00d0: 6d 65 6e 74 2e 0a 64 6e 6c 20 0a 64 6e 6c 20 54  ment..dnl .dnl T
00e0: 68 69 73 20 66 69 6c 65 20 63 6f 6e 74 61 69 6e  his file contain
00f0: 73 20 63 6f 64 65 20 74 6f 20 67 65 6e 65 72 61  s code to genera
0100: 74 65 20 22 74 6c 73 22 20 75 73 69 6e 67 20 65  te "tls" using e
0110: 69 74 68 65 72 20 74 68 65 0a 64 6e 6c 20 4f 70  ither the.dnl Op
0120: 65 6e 53 53 4c 20 6c 69 62 72 61 72 69 65 73 20  enSSL libraries 
0130: 6f 72 20 6c 69 62 72 61 72 69 65 73 20 66 72 6f  or libraries fro
0140: 6d 20 74 68 65 20 63 6f 6d 6d 65 72 63 69 61 6c  m the commercial
0150: 20 42 53 41 46 45 20 53 53 4c 2d 43 0a 64 6e 6c   BSAFE SSL-C.dnl
0160: 20 70 72 6f 64 75 63 74 20 66 72 6f 6d 20 52 53   product from RS
0170: 41 20 53 65 63 75 72 69 74 79 2e 20 20 49 6e 20  A Security.  In 
0180: 74 68 65 20 55 6e 69 74 65 64 20 53 74 61 74 65  the United State
0190: 73 2c 20 69 74 20 69 73 20 6e 65 63 65 73 73 61  s, it is necessa
01a0: 72 79 0a 64 6e 6c 20 74 6f 20 75 73 65 20 74 68  ry.dnl to use th
01b0: 65 20 52 53 41 20 42 53 41 46 45 20 6c 69 62 72  e RSA BSAFE libr
01c0: 61 72 69 65 73 20 66 6f 72 20 61 6e 79 20 70 72  aries for any pr
01d0: 6f 64 75 63 74 20 64 65 76 65 6c 6f 70 65 64 20  oduct developed 
01e0: 66 6f 72 0a 64 6e 6c 20 63 6f 6d 6d 65 72 63 69  for.dnl commerci
01f0: 61 6c 20 75 73 65 2e 20 4c 69 63 65 6e 73 69 6e  al use. Licensin
0200: 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 6f  g information fo
0210: 72 20 42 53 41 46 45 20 53 53 4c 2d 43 20 6d 61  r BSAFE SSL-C ma
0220: 79 20 62 65 0a 64 6e 6c 20 6f 62 74 61 69 6e 65  y be.dnl obtaine
0230: 64 20 66 72 6f 6d 20 52 53 41 20 44 61 74 61 20  d from RSA Data 
0240: 53 63 75 72 69 74 79 20 49 6e 63 2e 2c 20 53 61  Scurity Inc., Sa
0250: 6e 20 4d 61 74 65 6f 2c 20 43 61 6c 69 66 6f 72  n Mateo, Califor
0260: 6e 69 61 2c 20 55 53 41 2e 0a 64 6e 6c 20 54 68  nia, USA..dnl Th
0270: 65 69 72 20 68 6f 6d 65 20 70 61 67 65 20 6f 6e  eir home page on
0280: 20 74 68 65 20 77 65 62 20 69 73 20 22 77 77 77   the web is "www
0290: 2e 72 73 61 73 65 63 75 72 69 74 79 2e 63 6f 6d  .rsasecurity.com
02a0: 22 2e 20 0a 23 0a 23 20 52 43 53 3a 20 40 28 23  ". .#.# RCS: @(#
02b0: 29 20 24 49 64 3a 20 63 6f 6e 66 69 67 75 72 65  ) $Id: configure
02c0: 2e 69 6e 2c 76 20 31 2e 32 32 20 32 30 30 36 2f  .in,v 1.22 2006/
02d0: 30 36 2f 32 32 20 31 34 3a 30 33 3a 32 33 20 70  06/22 14:03:23 p
02e0: 61 74 74 68 6f 79 74 73 20 45 78 70 20 24 0a 0a  atthoyts Exp $..
02f0: 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  .#--------------
0300: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0310: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0320: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0330: 2d 2d 2d 2d 2d 2d 0a 23 20 6d 61 63 72 6f 20 75  ------.# macro u
0340: 73 65 64 20 74 6f 20 76 65 72 69 66 79 20 74 68  sed to verify th
0350: 61 74 20 74 68 65 20 63 6f 6e 66 69 67 75 72 65  at the configure
0360: 20 73 63 72 69 70 74 20 63 61 6e 20 66 69 6e 64   script can find
0370: 20 74 68 65 20 73 6f 75 72 63 65 73 0a 23 2d 2d   the sources.#--
0380: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0390: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
03a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
03b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
03c0: 2d 2d 0a 0a 41 43 5f 49 4e 49 54 28 5b 74 6c 73  --..AC_INIT([tls
03d0: 5d 2c 20 5b 31 2e 35 2e 31 5d 29 0a 0a 54 45 41  ], [1.5.1])..TEA
03e0: 5f 49 4e 49 54 28 5b 33 2e 35 5d 29 0a 0a 41 43  _INIT([3.5])..AC
03f0: 5f 43 4f 4e 46 49 47 5f 41 55 58 5f 44 49 52 28  _CONFIG_AUX_DIR(
0400: 74 63 6c 63 6f 6e 66 69 67 29 0a 0a 23 2d 2d 2d  tclconfig)..#---
0410: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0420: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0430: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0440: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0450: 2d 0a 23 20 4c 6f 61 64 20 74 68 65 20 74 63 6c  -.# Load the tcl
0460: 43 6f 6e 66 69 67 2e 73 68 20 66 69 6c 65 0a 23  Config.sh file.#
0470: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0480: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0490: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
04a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
04b0: 2d 2d 2d 2d 0a 0a 54 45 41 5f 50 41 54 48 5f 54  ----..TEA_PATH_T
04c0: 43 4c 43 4f 4e 46 49 47 0a 54 45 41 5f 4c 4f 41  CLCONFIG.TEA_LOA
04d0: 44 5f 54 43 4c 43 4f 4e 46 49 47 0a 0a 23 2d 2d  D_TCLCONFIG..#--
04e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
04f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0500: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0510: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0520: 2d 2d 2d 2d 2d 0a 23 20 48 61 6e 64 6c 65 20 74  -----.# Handle t
0530: 68 65 20 2d 2d 70 72 65 66 69 78 3d 2e 2e 2e 20  he --prefix=... 
0540: 6f 70 74 69 6f 6e 20 62 79 20 64 65 66 61 75 6c  option by defaul
0550: 74 69 6e 67 20 74 6f 20 77 68 61 74 20 54 63 6c  ting to what Tcl
0560: 20 67 61 76 65 2e 0a 23 20 4d 75 73 74 20 62 65   gave..# Must be
0570: 20 63 61 6c 6c 65 64 20 61 66 74 65 72 20 54 45   called after TE
0580: 41 5f 4c 4f 41 44 5f 54 43 4c 43 4f 4e 46 49 47  A_LOAD_TCLCONFIG
0590: 20 61 6e 64 20 62 65 66 6f 72 65 20 54 45 41 5f   and before TEA_
05a0: 53 45 54 55 50 5f 43 4f 4d 50 49 4c 45 52 2e 0a  SETUP_COMPILER..
05b0: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  #---------------
05c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
05d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
05e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
05f0: 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 54 45 41 5f 50 52  --------..TEA_PR
0600: 45 46 49 58 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d  EFIX..#---------
0610: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0620: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0630: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0640: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23  --------------.#
0650: 20 53 74 61 6e 64 61 72 64 20 63 6f 6d 70 69 6c   Standard compil
0660: 65 72 20 63 68 65 63 6b 73 2e 0a 23 20 54 68 69  er checks..# Thi
0670: 73 20 73 65 74 73 20 75 70 20 43 43 20 62 79 20  s sets up CC by 
0680: 75 73 69 6e 67 20 74 68 65 20 43 43 20 65 6e 76  using the CC env
0690: 20 76 61 72 2c 20 6f 72 20 6c 6f 6f 6b 73 20 66   var, or looks f
06a0: 6f 72 20 67 63 63 20 6f 74 68 65 72 77 69 73 65  or gcc otherwise
06b0: 2e 0a 23 20 54 68 69 73 20 61 6c 73 6f 20 63 61  ..# This also ca
06c0: 6c 6c 73 20 41 43 5f 50 52 4f 47 5f 43 43 2c 20  lls AC_PROG_CC, 
06d0: 41 43 5f 50 52 4f 47 5f 49 4e 53 54 41 4c 4c 20  AC_PROG_INSTALL 
06e0: 61 6e 64 20 61 20 66 65 77 20 6f 74 68 65 72 73  and a few others
06f0: 20 74 6f 20 63 72 65 61 74 65 0a 23 20 74 68 65   to create.# the
0700: 20 62 61 73 69 63 20 73 65 74 75 70 20 6e 65 63   basic setup nec
0710: 65 73 73 61 72 79 20 74 6f 20 63 6f 6d 70 69 6c  essary to compil
0720: 65 20 65 78 65 63 75 74 61 62 6c 65 73 2e 0a 23  e executables..#
0730: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0740: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0750: 2d 2d 2d 2d 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 0a 0a 54 45 41 5f 53 45 54  -------..TEA_SET
0780: 55 50 5f 43 4f 4d 50 49 4c 45 52 0a 0a 23 2d 2d  UP_COMPILER..#--
0790: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
07a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
07b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
07c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
07d0: 2d 2d 2d 2d 2d 0a 23 20 5f 5f 43 48 41 4e 47 45  -----.# __CHANGE
07e0: 5f 5f 0a 23 20 53 70 65 63 69 66 79 20 74 68 65  __.# Specify the
07f0: 20 43 20 73 6f 75 72 63 65 20 66 69 6c 65 73 20   C source files 
0800: 74 6f 20 63 6f 6d 70 69 6c 65 20 69 6e 20 54 45  to compile in TE
0810: 41 5f 41 44 44 5f 53 4f 55 52 43 45 53 2c 0a 23  A_ADD_SOURCES,.#
0820: 20 70 75 62 6c 69 63 20 68 65 61 64 65 72 73 20   public headers 
0830: 74 68 61 74 20 6e 65 65 64 20 74 6f 20 62 65 20  that need to be 
0840: 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 54 45 41  installed in TEA
0850: 5f 41 44 44 5f 48 45 41 44 45 52 53 2c 0a 23 20  _ADD_HEADERS,.# 
0860: 73 74 75 62 20 6c 69 62 72 61 72 79 20 43 20 73  stub library C s
0870: 6f 75 72 63 65 20 66 69 6c 65 73 20 74 6f 20 63  ource files to c
0880: 6f 6d 70 69 6c 65 20 69 6e 20 54 45 41 5f 41 44  ompile in TEA_AD
0890: 44 5f 53 54 55 42 5f 53 4f 55 52 43 45 53 2c 0a  D_STUB_SOURCES,.
08a0: 23 20 61 6e 64 20 72 75 6e 74 69 6d 65 20 54 63  # and runtime Tc
08b0: 6c 20 6c 69 62 72 61 72 79 20 66 69 6c 65 73 20  l library files 
08c0: 69 6e 20 54 45 41 5f 41 44 44 5f 54 43 4c 5f 53  in TEA_ADD_TCL_S
08d0: 4f 55 52 43 45 53 2e 0a 23 20 54 68 69 73 20 64  OURCES..# This d
08e0: 65 66 69 6e 65 73 20 50 4b 47 28 5f 53 54 55 42  efines PKG(_STUB
08f0: 29 5f 53 4f 55 52 43 45 53 2c 20 50 4b 47 28 5f  )_SOURCES, PKG(_
0900: 53 54 55 42 29 5f 4f 42 4a 45 43 54 53 2c 20 50  STUB)_OBJECTS, P
0910: 4b 47 5f 48 45 41 44 45 52 53 0a 23 20 61 6e 64  KG_HEADERS.# and
0920: 20 50 4b 47 5f 54 43 4c 5f 53 4f 55 52 43 45 53   PKG_TCL_SOURCES
0930: 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ..#-------------
0940: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0950: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0960: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0970: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 54 45 41 5f  ----------..TEA_
0980: 41 44 44 5f 53 4f 55 52 43 45 53 28 5b 5d 29 0a  ADD_SOURCES([]).
0990: 54 45 41 5f 41 44 44 5f 48 45 41 44 45 52 53 28  TEA_ADD_HEADERS(
09a0: 5b 5d 29 0a 54 45 41 5f 41 44 44 5f 49 4e 43 4c  []).TEA_ADD_INCL
09b0: 55 44 45 53 28 5b 5d 29 0a 54 45 41 5f 41 44 44  UDES([]).TEA_ADD
09c0: 5f 4c 49 42 53 28 5b 5d 29 0a 54 45 41 5f 41 44  _LIBS([]).TEA_AD
09d0: 44 5f 43 46 4c 41 47 53 28 5b 5d 29 0a 54 45 41  D_CFLAGS([]).TEA
09e0: 5f 41 44 44 5f 53 54 55 42 5f 53 4f 55 52 43 45  _ADD_STUB_SOURCE
09f0: 53 28 5b 5d 29 0a 54 45 41 5f 41 44 44 5f 54 43  S([]).TEA_ADD_TC
0a00: 4c 5f 53 4f 55 52 43 45 53 28 5b 5d 29 0a 0a 23  L_SOURCES([])..#
0a10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0a20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0a30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0a40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0a50: 2d 2d 2d 2d 0a 23 20 41 20 66 65 77 20 6d 69 73  ----.# A few mis
0a60: 63 65 6c 6c 61 6e 65 6f 75 73 20 70 6c 61 74 66  cellaneous platf
0a70: 6f 72 6d 2d 73 70 65 63 69 66 69 63 20 69 74 65  orm-specific ite
0a80: 6d 73 3a 0a 23 0a 23 20 44 65 66 69 6e 65 20 61  ms:.#.# Define a
0a90: 20 73 70 65 63 69 61 6c 20 73 79 6d 62 6f 6c 20   special symbol 
0aa0: 66 6f 72 20 57 69 6e 64 6f 77 73 20 28 42 55 49  for Windows (BUI
0ab0: 4c 44 5f 73 61 6d 70 6c 65 20 69 6e 20 74 68 69  LD_sample in thi
0ac0: 73 20 63 61 73 65 29 20 73 6f 0a 23 20 74 68 61  s case) so.# tha
0ad0: 74 20 77 65 20 63 72 65 61 74 65 20 74 68 65 20  t we create the 
0ae0: 65 78 70 6f 72 74 20 6c 69 62 72 61 72 79 20 77  export library w
0af0: 69 74 68 20 74 68 65 20 64 6c 6c 2e 20 20 53 65  ith the dll.  Se
0b00: 65 20 73 68 61 31 2e 68 20 6f 6e 20 68 6f 77 0a  e sha1.h on how.
0b10: 23 20 74 6f 20 75 73 65 20 74 68 69 73 2e 0a 23  # to use this..#
0b20: 0a 23 20 57 69 6e 64 6f 77 73 20 63 72 65 61 74  .# Windows creat
0b30: 65 73 20 61 20 66 65 77 20 65 78 74 72 61 20 66  es a few extra f
0b40: 69 6c 65 73 20 74 68 61 74 20 6e 65 65 64 20 74  iles that need t
0b50: 6f 20 62 65 20 63 6c 65 61 6e 65 64 20 75 70 2e  o be cleaned up.
0b60: 0a 23 20 59 6f 75 20 63 61 6e 20 61 64 64 20 6d  .# You can add m
0b70: 6f 72 65 20 66 69 6c 65 73 20 74 6f 20 63 6c 65  ore files to cle
0b80: 61 6e 20 69 66 20 79 6f 75 72 20 65 78 74 65 6e  an if your exten
0b90: 73 69 6f 6e 20 63 72 65 61 74 65 73 20 61 6e 79  sion creates any
0ba0: 20 65 78 74 72 61 0a 23 20 66 69 6c 65 73 2e 0a   extra.# files..
0bb0: 23 0a 23 20 44 65 66 69 6e 65 20 61 6e 79 20 65  #.# Define any e
0bc0: 78 74 72 61 20 63 6f 6d 70 69 6c 65 72 20 66 6c  xtra compiler fl
0bd0: 61 67 73 20 69 6e 20 74 68 65 20 50 41 43 4b 41  ags in the PACKA
0be0: 47 45 5f 43 46 4c 41 47 53 20 76 61 72 69 61 62  GE_CFLAGS variab
0bf0: 6c 65 2e 0a 23 20 54 68 65 73 65 20 77 69 6c 6c  le..# These will
0c00: 20 62 65 20 61 70 70 65 6e 64 65 64 20 74 6f 20   be appended to 
0c10: 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 74 20  the current set 
0c20: 6f 66 20 63 6f 6d 70 69 6c 65 72 20 66 6c 61 67  of compiler flag
0c30: 73 20 66 6f 72 0a 23 20 79 6f 75 72 20 73 79 73  s for.# your sys
0c40: 74 65 6d 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  tem..#----------
0c50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0c60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0c70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0c80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 69 66 20 74  ----------..if t
0c90: 65 73 74 20 22 24 7b 54 45 41 5f 50 4c 41 54 46  est "${TEA_PLATF
0ca0: 4f 52 4d 7d 22 20 3d 20 22 77 69 6e 64 6f 77 73  ORM}" = "windows
0cb0: 22 20 3b 20 74 68 65 6e 0a 20 20 20 20 41 43 5f  " ; then.    AC_
0cc0: 44 45 46 49 4e 45 28 42 55 49 4c 44 5f 74 6c 73  DEFINE(BUILD_tls
0cd0: 29 0a 20 20 20 20 41 43 5f 44 45 46 49 4e 45 28  ).    AC_DEFINE(
0ce0: 57 49 4e 44 4f 57 53 29 0a 20 20 20 20 43 4c 45  WINDOWS).    CLE
0cf0: 41 4e 46 49 4c 45 53 3d 22 70 6b 67 49 6e 64 65  ANFILES="pkgInde
0d00: 78 2e 74 63 6c 20 2a 2e 6c 69 62 20 2a 2e 64 6c  x.tcl *.lib *.dl
0d10: 6c 20 2a 2e 65 78 70 20 2a 2e 69 6c 6b 20 2a 2e  l *.exp *.ilk *.
0d20: 70 64 62 20 76 63 2a 2e 70 63 68 22 0a 65 6c 73  pdb vc*.pch".els
0d30: 65 0a 20 20 20 20 43 4c 45 41 4e 46 49 4c 45 53  e.    CLEANFILES
0d40: 3d 22 70 6b 67 49 6e 64 65 78 2e 74 63 6c 22 0a  ="pkgIndex.tcl".
0d50: 66 69 0a 41 43 5f 53 55 42 53 54 28 43 4c 45 41  fi.AC_SUBST(CLEA
0d60: 4e 46 49 4c 45 53 29 0a 0a 23 2d 2d 2d 2d 2d 2d  NFILES)..#------
0d70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0d80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0d90: 2d 2d 2d 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 0a 23  --------------.#
0db0: 20 43 68 6f 6f 73 65 20 77 68 69 63 68 20 68 65   Choose which he
0dc0: 61 64 65 72 73 20 79 6f 75 20 6e 65 65 64 2e 20  aders you need. 
0dd0: 20 45 78 74 65 6e 73 69 6f 6e 20 61 75 74 68 6f   Extension autho
0de0: 72 73 20 73 68 6f 75 6c 64 20 74 72 79 20 76 65  rs should try ve
0df0: 72 79 0a 23 20 68 61 72 64 20 74 6f 20 6f 6e 6c  ry.# hard to onl
0e00: 79 20 72 65 6c 79 20 6f 6e 20 74 68 65 20 54 63  y rely on the Tc
0e10: 6c 20 70 75 62 6c 69 63 20 68 65 61 64 65 72 20  l public header 
0e20: 66 69 6c 65 73 2e 20 20 49 6e 74 65 72 6e 61 6c  files.  Internal
0e30: 20 68 65 61 64 65 72 73 0a 23 20 63 6f 6e 74 61   headers.# conta
0e40: 69 6e 20 70 72 69 76 61 74 65 20 64 61 74 61 20  in private data 
0e50: 73 74 72 75 63 74 75 72 65 73 20 61 6e 64 20 61  structures and a
0e60: 72 65 20 73 75 62 6a 65 63 74 20 74 6f 20 63 68  re subject to ch
0e70: 61 6e 67 65 20 77 69 74 68 6f 75 74 0a 23 20 6e  ange without.# n
0e80: 6f 74 69 63 65 2e 0a 23 20 54 68 69 73 20 4d 55  otice..# This MU
0e90: 53 54 20 62 65 20 63 61 6c 6c 65 64 20 61 66 74  ST be called aft
0ea0: 65 72 20 54 45 41 5f 4c 4f 41 44 5f 54 43 4c 43  er TEA_LOAD_TCLC
0eb0: 4f 4e 46 49 47 20 2f 20 54 45 41 5f 4c 4f 41 44  ONFIG / TEA_LOAD
0ec0: 5f 54 4b 43 4f 4e 46 49 47 0a 23 2d 2d 2d 2d 2d  _TKCONFIG.#-----
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 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0ef0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0f00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
0f10: 0a 54 45 41 5f 50 55 42 4c 49 43 5f 54 43 4c 5f  .TEA_PUBLIC_TCL_
0f20: 48 45 41 44 45 52 53 0a 0a 23 2d 2d 2d 2d 2d 2d  HEADERS..#------
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 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0f60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23  --------------.#
0f70: 20 43 68 65 63 6b 20 77 68 65 74 68 65 72 20 2d   Check whether -
0f80: 2d 65 6e 61 62 6c 65 2d 74 68 72 65 61 64 73 20  -enable-threads 
0f90: 6f 72 20 2d 2d 64 69 73 61 62 6c 65 2d 74 68 72  or --disable-thr
0fa0: 65 61 64 73 20 77 61 73 20 67 69 76 65 6e 2e 0a  eads was given..
0fb0: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  #---------------
0fc0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0fd0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0fe0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0ff0: 2d 2d 2d 2d 2d 0a 0a 54 45 41 5f 45 4e 41 42 4c  -----..TEA_ENABL
1000: 45 5f 54 48 52 45 41 44 53 0a 0a 23 2d 2d 2d 2d  E_THREADS..#----
1010: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1020: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1030: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1040: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1050: 0a 23 20 54 68 65 20 73 74 61 74 65 6d 65 6e 74  .# The statement
1060: 20 62 65 6c 6f 77 20 64 65 66 69 6e 65 73 20 61   below defines a
1070: 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 73   collection of s
1080: 79 6d 62 6f 6c 73 20 72 65 6c 61 74 65 64 20 74  ymbols related t
1090: 6f 0a 23 20 62 75 69 6c 64 69 6e 67 20 61 73 20  o.# building as 
10a0: 61 20 73 68 61 72 65 64 20 6c 69 62 72 61 72 79  a shared library
10b0: 20 69 6e 73 74 65 61 64 20 6f 66 20 61 20 73 74   instead of a st
10c0: 61 74 69 63 20 6c 69 62 72 61 72 79 2e 0a 23 2d  atic library..#-
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 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
10f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1100: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1110: 2d 2d 2d 0a 0a 54 45 41 5f 45 4e 41 42 4c 45 5f  ---..TEA_ENABLE_
1120: 53 48 41 52 45 44 0a 0a 23 2d 2d 2d 2d 2d 2d 2d  SHARED..#-------
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 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1160: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20  -------------.# 
1170: 54 68 69 73 20 6d 61 63 72 6f 20 66 69 67 75 72  This macro figur
1180: 65 73 20 6f 75 74 20 77 68 61 74 20 66 6c 61 67  es out what flag
1190: 73 20 74 6f 20 75 73 65 20 77 69 74 68 20 74 68  s to use with th
11a0: 65 20 63 6f 6d 70 69 6c 65 72 2f 6c 69 6e 6b 65  e compiler/linke
11b0: 72 0a 23 20 77 68 65 6e 20 62 75 69 6c 64 69 6e  r.# when buildin
11c0: 67 20 73 68 61 72 65 64 2f 73 74 61 74 69 63 20  g shared/static 
11d0: 64 65 62 75 67 2f 6f 70 74 69 6d 69 7a 65 64 20  debug/optimized 
11e0: 6f 62 6a 65 63 74 73 2e 20 20 54 68 69 73 20 69  objects.  This i
11f0: 6e 66 6f 72 6d 61 74 69 6f 6e 0a 23 20 63 61 6e  nformation.# can
1200: 20 62 65 20 74 61 6b 65 6e 20 66 72 6f 6d 20 74   be taken from t
1210: 68 65 20 74 63 6c 43 6f 6e 66 69 67 2e 73 68 20  he tclConfig.sh 
1220: 66 69 6c 65 2c 20 62 75 74 20 74 68 69 73 20 66  file, but this f
1230: 69 67 75 72 65 73 20 69 74 20 61 6c 6c 20 6f 75  igures it all ou
1240: 74 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  t..#------------
1250: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1260: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1270: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1280: 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 54 45 41 5f 43 4f  --------..TEA_CO
1290: 4e 46 49 47 5f 43 46 4c 41 47 53 0a 0a 23 2d 2d  NFIG_CFLAGS..#--
12a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
12b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
12c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
12d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
12e0: 2d 2d 0a 23 20 53 65 74 20 74 68 65 20 64 65 66  --.# Set the def
12f0: 61 75 6c 74 20 63 6f 6d 70 69 6c 65 72 20 73 77  ault compiler sw
1300: 69 74 63 68 65 73 20 62 61 73 65 64 20 6f 6e 20  itches based on 
1310: 74 68 65 20 2d 2d 65 6e 61 62 6c 65 2d 73 79 6d  the --enable-sym
1320: 62 6f 6c 73 20 6f 70 74 69 6f 6e 2e 0a 23 2d 2d  bols option..#--
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 2d 2d 2d 2d  ----------------
1370: 2d 2d 0a 0a 54 45 41 5f 45 4e 41 42 4c 45 5f 53  --..TEA_ENABLE_S
1380: 59 4d 42 4f 4c 53 0a 0a 23 2d 2d 2d 2d 2d 2d 2d  YMBOLS..#-------
1390: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
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 0a 23 20  -------------.# 
13d0: 45 76 65 72 79 6f 6e 65 20 73 68 6f 75 6c 64 20  Everyone should 
13e0: 62 65 20 6c 69 6e 6b 69 6e 67 20 61 67 61 69 6e  be linking again
13f0: 73 74 20 74 68 65 20 54 63 6c 20 73 74 75 62 20  st the Tcl stub 
1400: 6c 69 62 72 61 72 79 2e 20 20 49 66 20 79 6f 75  library.  If you
1410: 0a 23 20 63 61 6e 27 74 20 66 6f 72 20 73 6f 6d  .# can't for som
1420: 65 20 72 65 61 73 6f 6e 2c 20 72 65 6d 6f 76 65  e reason, remove
1430: 20 74 68 69 73 20 64 65 66 69 6e 69 74 69 6f 6e   this definition
1440: 2e 20 20 49 66 20 79 6f 75 20 61 72 65 6e 27 74  .  If you aren't
1450: 20 75 73 69 6e 67 0a 23 20 73 74 75 62 73 2c 20   using.# stubs, 
1460: 79 6f 75 20 61 6c 73 6f 20 6e 65 65 64 20 74 6f  you also need to
1470: 20 6d 6f 64 69 66 79 20 74 68 65 20 53 48 4c 49   modify the SHLI
1480: 42 5f 4c 44 5f 4c 49 42 53 20 73 65 74 74 69 6e  B_LD_LIBS settin
1490: 67 20 62 65 6c 6f 77 20 74 6f 0a 23 20 6c 69 6e  g below to.# lin
14a0: 6b 20 61 67 61 69 6e 73 74 20 74 68 65 20 6e 6f  k against the no
14b0: 6e 2d 73 74 75 62 62 65 64 20 54 63 6c 20 6c 69  n-stubbed Tcl li
14c0: 62 72 61 72 79 2e 20 20 41 64 64 20 54 6b 20 74  brary.  Add Tk t
14d0: 6f 6f 20 69 66 20 6e 65 63 65 73 73 61 72 79 2e  oo if necessary.
14e0: 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  .#--------------
14f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1500: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1510: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1520: 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f 44 45 46 49 4e  ------..AC_DEFIN
1530: 45 28 55 53 45 5f 54 43 4c 5f 53 54 55 42 53 29  E(USE_TCL_STUBS)
1540: 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ..#-------------
1550: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1560: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1570: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1580: 2d 2d 2d 2d 2d 2d 2d 0a 23 20 49 66 20 74 68 65  -------.# If the
1590: 20 76 61 72 69 61 62 6c 65 20 4f 50 45 4e 53 53   variable OPENSS
15a0: 4c 20 69 73 20 73 65 74 2c 20 77 65 20 77 69 6c  L is set, we wil
15b0: 6c 20 62 75 69 6c 64 20 77 69 74 68 20 74 68 65  l build with the
15c0: 20 4f 70 65 6e 53 53 4c 0a 23 20 6c 69 62 72 61   OpenSSL.# libra
15d0: 72 69 65 73 2e 20 20 49 66 20 69 74 20 69 73 20  ries.  If it is 
15e0: 6e 6f 74 20 73 65 74 2c 20 74 68 65 6e 20 77 65  not set, then we
15f0: 20 77 69 6c 6c 20 75 73 65 20 52 53 41 20 42 53   will use RSA BS
1600: 41 46 45 20 53 53 4c 2d 43 0a 23 20 6c 69 62 72  AFE SSL-C.# libr
1610: 61 72 69 65 73 20 69 6e 73 74 65 61 64 20 6f 66  aries instead of
1620: 20 74 68 65 20 64 65 66 61 75 6c 74 20 4f 70 65   the default Ope
1630: 6e 53 53 4c 20 6c 69 62 61 72 69 65 73 2e 0a 23  nSSL libaries..#
1640: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1650: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1660: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1670: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1680: 2d 2d 2d 2d 0a 0a 4f 50 45 4e 53 53 4c 3d 22 31  ----..OPENSSL="1
1690: 22 0a 0a 54 4c 53 5f 43 48 45 43 4b 5f 53 53 4c  "..TLS_CHECK_SSL
16a0: 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ..#-------------
16b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
16c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
16d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
16e0: 2d 2d 2d 2d 2d 2d 2d 0a 23 20 44 65 74 65 72 6d  -------.# Determ
16f0: 69 6e 65 20 69 66 20 77 65 20 73 68 6f 75 6c 64  ine if we should
1700: 20 75 73 65 20 74 68 65 20 70 61 74 65 6e 74 65   use the patente
1710: 64 20 65 6e 63 72 79 70 74 69 6f 6e 20 63 6f 64  d encryption cod
1720: 65 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  e.#-------------
1730: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1740: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1750: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1760: 2d 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f 41 52 47 5f  -------..AC_ARG_
1770: 45 4e 41 42 4c 45 28 70 61 74 65 6e 74 73 2c 20  ENABLE(patents, 
1780: 5b 20 20 2d 2d 65 6e 61 62 6c 65 2d 70 61 74 65  [  --enable-pate
1790: 6e 74 73 20 20 20 20 20 20 20 20 55 73 65 20 70  nts        Use p
17a0: 61 74 65 6e 74 65 64 20 63 6f 64 65 2e 20 20 44  atented code.  D
17b0: 65 66 61 75 6c 74 20 69 73 20 65 6e 61 62 6c 65  efault is enable
17c0: 64 5d 2c 20 50 41 54 45 4e 54 53 3d 24 7b 65 6e  d], PATENTS=${en
17d0: 61 62 6c 65 76 61 6c 7d 2c 20 50 41 54 45 4e 54  ableval}, PATENT
17e0: 53 3d 79 65 73 29 20 20 0a 0a 69 66 20 74 65 73  S=yes)  ..if tes
17f0: 74 20 24 7b 50 41 54 45 4e 54 53 7d 20 3d 20 6e  t ${PATENTS} = n
1800: 6f 3b 20 74 68 65 6e 0a 20 20 20 20 41 43 5f 44  o; then.    AC_D
1810: 45 46 49 4e 45 28 5b 4e 4f 5f 50 41 54 45 4e 54  EFINE([NO_PATENT
1820: 53 5d 29 0a 66 69 0a 0a 23 2d 2d 2d 2d 2d 2d 2d  S]).fi..#-------
1830: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1840: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1850: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1860: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20  -------------.# 
1870: 54 68 69 73 20 6d 61 63 72 6f 20 67 65 6e 65 72  This macro gener
1880: 61 74 65 73 20 61 20 6c 69 6e 65 20 74 6f 20 75  ates a line to u
1890: 73 65 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67  se when building
18a0: 20 61 20 6c 69 62 72 61 72 79 2e 20 20 49 74 0a   a library.  It.
18b0: 23 20 64 65 70 65 6e 64 73 20 6f 6e 20 76 61 6c  # depends on val
18c0: 75 65 73 20 73 65 74 20 62 79 20 74 68 65 20 54  ues set by the T
18d0: 45 41 5f 45 4e 41 42 4c 45 5f 53 48 41 52 45 44  EA_ENABLE_SHARED
18e0: 2c 20 54 45 41 5f 45 4e 41 42 4c 45 5f 53 59 4d  , TEA_ENABLE_SYM
18f0: 42 4f 4c 53 2c 0a 23 20 61 6e 64 20 54 45 41 5f  BOLS,.# and TEA_
1900: 4c 4f 41 44 5f 54 43 4c 43 4f 4e 46 49 47 20 6d  LOAD_TCLCONFIG m
1910: 61 63 72 6f 73 20 61 62 6f 76 65 2e 0a 23 2d 2d  acros above..#--
1920: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1930: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1940: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1950: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1960: 2d 2d 0a 0a 54 45 41 5f 4d 41 4b 45 5f 4c 49 42  --..TEA_MAKE_LIB
1970: 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ..#-------------
1980: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1990: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
19a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
19b0: 2d 2d 2d 2d 2d 2d 2d 0a 23 20 53 68 61 72 65 64  -------.# Shared
19c0: 20 6c 69 62 72 61 72 69 65 73 20 61 6e 64 20 73   libraries and s
19d0: 74 61 74 69 63 20 6c 69 62 72 61 72 69 65 73 20  tatic libraries 
19e0: 68 61 76 65 20 64 69 66 66 65 72 65 6e 74 20 6e  have different n
19f0: 61 6d 65 73 2e 0a 23 20 41 6c 73 6f 2c 20 77 69  ames..# Also, wi
1a00: 6e 64 6f 77 73 20 6c 69 62 72 61 72 69 65 73 20  ndows libraries 
1a10: 61 6e 64 20 75 6e 69 78 20 6c 69 62 72 61 72 69  and unix librari
1a20: 65 73 20 68 61 76 65 20 64 69 66 66 65 72 65 6e  es have differen
1a30: 74 20 6e 61 6d 65 73 2e 0a 23 20 46 6f 72 20 74  t names..# For t
1a40: 68 65 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69  he OpenSSL versi
1a50: 6f 6e 2c 20 49 20 63 68 6f 73 65 20 74 6f 20 75  on, I chose to u
1a60: 73 65 20 74 68 65 20 73 61 6d 65 20 6c 69 62 72  se the same libr
1a70: 61 72 79 20 6e 61 6d 65 73 20 74 68 61 74 0a 23  ary names that.#
1a80: 20 4f 70 65 6e 53 53 4c 20 75 73 65 73 20 61 73   OpenSSL uses as
1a90: 20 69 74 73 20 64 65 66 61 75 6c 74 20 6e 61 6d   its default nam
1aa0: 65 73 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  es..#-----------
1ab0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1ac0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1ad0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1ae0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 69 66 20 74 65  ---------..if te
1af0: 73 74 20 2d 6e 20 22 24 7b 4f 50 45 4e 53 53 4c  st -n "${OPENSSL
1b00: 7d 22 3b 20 74 68 65 6e 0a 20 20 20 20 69 66 20  }"; then.    if 
1b10: 74 65 73 74 20 22 24 7b 54 45 41 5f 50 4c 41 54  test "${TEA_PLAT
1b20: 46 4f 52 4d 7d 22 20 3d 20 22 77 69 6e 64 6f 77  FORM}" = "window
1b30: 73 22 20 3b 20 74 68 65 6e 0a 20 20 20 20 20 20  s" ; then.      
1b40: 20 20 69 66 20 74 65 73 74 20 22 24 47 43 43 22    if test "$GCC"
1b50: 20 3d 20 22 79 65 73 22 3b 20 74 68 65 6e 0a 20   = "yes"; then. 
1b60: 20 20 20 20 20 20 20 20 20 20 20 54 45 41 5f 41             TEA_A
1b70: 44 44 5f 4c 49 42 53 28 5b 2d 4c 24 7b 53 53 4c  DD_LIBS([-L${SSL
1b80: 5f 4c 49 42 5f 44 49 52 5f 4e 41 54 49 56 45 7d  _LIB_DIR_NATIVE}
1b90: 20 2d 6c 73 73 6c 65 61 79 33 32 20 2d 6c 6c 69   -lssleay32 -lli
1ba0: 62 65 61 79 33 32 5d 29 0a 20 20 20 20 20 20 20  beay32]).       
1bb0: 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 20 20   else.          
1bc0: 20 20 54 45 41 5f 41 44 44 5f 4c 49 42 53 28 5b    TEA_ADD_LIBS([
1bd0: 2d 6c 69 62 70 61 74 68 3a 24 7b 53 53 4c 5f 4c  -libpath:${SSL_L
1be0: 49 42 5f 44 49 52 5f 4e 41 54 49 56 45 7d 20 73  IB_DIR_NATIVE} s
1bf0: 73 6c 65 61 79 33 32 2e 6c 69 62 20 6c 69 62 65  sleay32.lib libe
1c00: 61 79 33 32 2e 6c 69 62 5d 29 0a 20 20 20 20 20  ay32.lib]).     
1c10: 20 20 20 66 69 0a 20 20 20 20 65 6c 73 65 0a 09     fi.    else..
1c20: 54 45 41 5f 41 44 44 5f 4c 49 42 53 28 5b 2d 4c  TEA_ADD_LIBS([-L
1c30: 24 7b 53 53 4c 5f 4c 49 42 5f 44 49 52 7d 20 2d  ${SSL_LIB_DIR} -
1c40: 6c 73 73 6c 20 2d 6c 63 72 79 70 74 6f 20 24 7b  lssl -lcrypto ${
1c50: 47 43 43 50 41 54 48 7d 20 24 7b 47 43 43 4c 49  GCCPATH} ${GCCLI
1c60: 42 7d 5d 29 0a 20 20 20 20 66 69 0a 65 6c 73 65  B}]).    fi.else
1c70: 0a 20 20 20 20 69 66 20 74 65 73 74 20 22 24 7b  .    if test "${
1c80: 54 45 41 5f 50 4c 41 54 46 4f 52 4d 7d 22 20 3d  TEA_PLATFORM}" =
1c90: 20 22 77 69 6e 64 6f 77 73 22 20 3b 20 74 68 65   "windows" ; the
1ca0: 6e 0a 20 20 20 20 20 20 20 20 69 66 20 74 65 73  n.        if tes
1cb0: 74 20 22 24 47 43 43 22 20 3d 20 22 79 65 73 22  t "$GCC" = "yes"
1cc0: 3b 20 74 68 65 6e 0a 20 20 20 20 20 20 20 20 20  ; then.         
1cd0: 20 20 20 54 45 41 5f 41 44 44 5f 4c 49 42 53 28     TEA_ADD_LIBS(
1ce0: 5b 2d 4c 24 7b 53 53 4c 5f 4c 49 42 5f 44 49 52  [-L${SSL_LIB_DIR
1cf0: 5f 4e 41 54 49 56 45 7d 20 2d 6c 73 73 6c 63 33  _NATIVE} -lsslc3
1d00: 32 5d 29 0a 20 20 20 20 20 20 20 20 65 6c 73 65  2]).        else
1d10: 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 45 41  .            TEA
1d20: 5f 41 44 44 5f 4c 49 42 53 28 5b 2d 6c 69 62 70  _ADD_LIBS([-libp
1d30: 61 74 68 3a 24 7b 53 53 4c 5f 4c 49 42 5f 44 49  ath:${SSL_LIB_DI
1d40: 52 5f 4e 41 54 49 56 45 7d 20 73 73 6c 63 33 32  R_NATIVE} sslc32
1d50: 2e 6c 69 62 5d 29 0a 20 20 20 20 20 20 20 20 66  .lib]).        f
1d60: 69 0a 20 20 20 20 65 6c 73 65 0a 09 54 45 41 5f  i.    else..TEA_
1d70: 41 44 44 5f 4c 49 42 53 28 5b 2d 4c 24 7b 53 53  ADD_LIBS([-L${SS
1d80: 4c 5f 4c 49 42 5f 44 49 52 7d 20 2d 6c 73 73 6c  L_LIB_DIR} -lssl
1d90: 63 5d 29 0a 20 20 20 20 66 69 0a 66 69 0a 0a 23  c]).    fi.fi..#
1da0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1db0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1dc0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1dd0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1de0: 2d 2d 2d 2d 0a 23 20 46 69 6e 64 20 74 63 6c 73  ----.# Find tcls
1df0: 68 20 73 6f 20 74 68 61 74 20 77 65 20 63 61 6e  h so that we can
1e00: 20 72 75 6e 20 70 6b 67 5f 6d 6b 49 6e 64 65 78   run pkg_mkIndex
1e10: 20 74 6f 20 67 65 6e 65 72 61 74 65 20 74 68 65   to generate the
1e20: 20 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 23 20   pkgIndex.tcl.# 
1e30: 66 69 6c 65 20 64 75 72 69 6e 67 20 74 68 65 20  file during the 
1e40: 69 6e 73 74 61 6c 6c 20 70 72 6f 63 65 73 73 2e  install process.
1e50: 20 20 44 6f 6e 27 74 20 72 75 6e 20 74 68 65 20    Don't run the 
1e60: 54 43 4c 53 48 5f 50 52 4f 47 20 74 68 72 6f 75  TCLSH_PROG throu
1e70: 67 68 0a 23 20 24 7b 43 59 47 50 41 54 48 7d 20  gh.# ${CYGPATH} 
1e80: 62 65 63 61 75 73 65 20 69 74 27 73 20 62 65 69  because it's bei
1e90: 6e 67 20 75 73 65 64 20 64 69 72 65 63 74 6c 79  ng used directly
1ea0: 20 62 79 20 6d 61 6b 65 2e 0a 23 20 52 65 71 75   by make..# Requ
1eb0: 69 72 65 20 74 68 61 74 20 77 65 20 75 73 65 20  ire that we use 
1ec0: 61 20 74 63 6c 73 68 20 73 68 65 6c 6c 20 76 65  a tclsh shell ve
1ed0: 72 73 69 6f 6e 20 38 2e 32 20 6f 72 20 6c 61 74  rsion 8.2 or lat
1ee0: 65 72 20 73 69 6e 63 65 20 65 61 72 6c 69 65 72  er since earlier
1ef0: 0a 23 20 76 65 72 73 69 6f 6e 73 20 68 61 76 65  .# versions have
1f00: 20 62 75 67 73 20 69 6e 20 74 68 65 20 70 6b 67   bugs in the pkg
1f10: 5f 6d 6b 49 6e 64 65 78 20 72 6f 75 74 69 6e 65  _mkIndex routine
1f20: 2e 0a 23 20 41 64 64 20 57 49 53 48 20 61 73 20  ..# Add WISH as 
1f30: 77 65 6c 6c 20 69 66 20 74 68 69 73 20 69 73 20  well if this is 
1f40: 61 20 54 6b 20 65 78 74 65 6e 73 69 6f 6e 2e 0a  a Tk extension..
1f50: 23 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 2d 0a 0a 54 45 41 5f 50 52 4f 47 5f  -----..TEA_PROG_
1fa0: 54 43 4c 53 48 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d  TCLSH..#--------
1fb0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1fc0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1fd0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1fe0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 46  ------------.# F
1ff0: 69 6e 61 6c 6c 79 2c 20 73 75 62 73 74 69 74 75  inally, substitu
2000: 74 65 20 61 6c 6c 20 6f 66 20 74 68 65 20 76 61  te all of the va
2010: 72 69 6f 75 73 20 76 61 6c 75 65 73 20 69 6e 74  rious values int
2020: 6f 20 74 68 65 20 4d 61 6b 65 66 69 6c 65 2e 0a  o the Makefile..
2030: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  #---------------
2040: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2050: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2060: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
2070: 2d 2d 2d 2d 2d 0a 0a 41 43 5f 4f 55 54 50 55 54  -----..AC_OUTPUT
2080: 28 5b 4d 61 6b 65 66 69 6c 65 5d 29 0a           ([Makefile]).