/ Hex Artifact Content
Login

Artifact 93d43c79e936fb16556e22498177d7e8571efa04:


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 23 0a 23 20 52 43 53 3a 20 40  ment..#.# RCS: @
00e0: 28 23 29 20 24 49 64 3a 20 63 6f 6e 66 69 67 75  (#) $Id: configu
00f0: 72 65 2e 69 6e 2c 76 20 31 2e 34 33 20 32 30 30  re.in,v 1.43 200
0100: 35 2f 30 37 2f 32 36 20 31 39 3a 31 37 3a 30 35  5/07/26 19:17:05
0110: 20 6d 64 65 6a 6f 6e 67 20 45 78 70 20 24 0a 0a   mdejong Exp $..
0120: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  #---------------
0130: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0140: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0150: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0160: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 53 61 6d 70 6c  --------.# Sampl
0170: 65 20 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 66  e configure.in f
0180: 6f 72 20 54 63 6c 20 45 78 74 65 6e 73 69 6f 6e  or Tcl Extension
0190: 73 2e 20 20 54 68 65 20 6f 6e 6c 79 20 70 6c 61  s.  The only pla
01a0: 63 65 73 20 79 6f 75 20 73 68 6f 75 6c 64 0a 23  ces you should.#
01b0: 20 6e 65 65 64 20 74 6f 20 6d 6f 64 69 66 79 20   need to modify 
01c0: 74 68 69 73 20 66 69 6c 65 20 61 72 65 20 6d 61  this file are ma
01d0: 72 6b 65 64 20 62 79 20 74 68 65 20 73 74 72 69  rked by the stri
01e0: 6e 67 20 5f 5f 43 48 41 4e 47 45 5f 5f 0a 23 2d  ng __CHANGE__.#-
01f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0200: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0210: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0220: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0230: 2d 2d 2d 2d 2d 2d 0a 0a 23 2d 2d 2d 2d 2d 2d 2d  ------..#-------
0240: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0250: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0260: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0270: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0280: 0a 23 20 5f 5f 43 48 41 4e 47 45 5f 5f 0a 23 20  .# __CHANGE__.# 
0290: 53 65 74 20 79 6f 75 72 20 70 61 63 6b 61 67 65  Set your package
02a0: 20 6e 61 6d 65 20 61 6e 64 20 76 65 72 73 69 6f   name and versio
02b0: 6e 20 6e 75 6d 62 65 72 73 20 68 65 72 65 2e 0a  n numbers here..
02c0: 23 0a 23 20 54 68 69 73 20 69 6e 69 74 69 61 6c  #.# This initial
02d0: 69 7a 65 73 20 74 68 65 20 65 6e 76 69 72 6f 6e  izes the environ
02e0: 6d 65 6e 74 20 77 69 74 68 20 50 41 43 4b 41 47  ment with PACKAG
02f0: 45 5f 4e 41 4d 45 20 61 6e 64 20 50 41 43 4b 41  E_NAME and PACKA
0300: 47 45 5f 56 45 52 53 49 4f 4e 0a 23 20 73 65 74  GE_VERSION.# set
0310: 20 61 73 20 70 72 6f 76 69 64 65 64 2e 20 20 54   as provided.  T
0320: 68 65 73 65 20 77 69 6c 6c 20 61 6c 73 6f 20 62  hese will also b
0330: 65 20 61 64 64 65 64 20 61 73 20 2d 44 20 64 65  e added as -D de
0340: 66 73 20 69 6e 20 79 6f 75 72 20 4d 61 6b 65 66  fs in your Makef
0350: 69 6c 65 0a 23 20 73 6f 20 79 6f 75 20 63 61 6e  ile.# so you can
0360: 20 65 6e 63 6f 64 65 20 74 68 65 20 70 61 63 6b   encode the pack
0370: 61 67 65 20 76 65 72 73 69 6f 6e 20 64 69 72 65  age version dire
0380: 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 73 6f  ctly into the so
0390: 75 72 63 65 20 66 69 6c 65 73 2e 0a 23 2d 2d 2d  urce files..#---
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 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
03d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
03e0: 2d 2d 2d 2d 0a 0a 41 43 5f 49 4e 49 54 28 5b 73  ----..AC_INIT([s
03f0: 71 6c 69 74 65 5d 2c 20 5b 33 2e 37 2e 34 5d 29  qlite], [3.7.4])
0400: 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ..#-------------
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 0a 23 20 43 61 6c 6c 20 54  -------.# Call T
0450: 45 41 5f 49 4e 49 54 20 61 73 20 74 68 65 20 66  EA_INIT as the f
0460: 69 72 73 74 20 54 45 41 5f 20 6d 61 63 72 6f 20  irst TEA_ macro 
0470: 74 6f 20 73 65 74 20 75 70 20 69 6e 69 74 69 61  to set up initia
0480: 6c 20 76 61 72 73 2e 0a 23 20 54 68 69 73 20 77  l vars..# This w
0490: 69 6c 6c 20 64 65 66 69 6e 65 20 61 20 24 7b 54  ill define a ${T
04a0: 45 41 5f 50 4c 41 54 46 4f 52 4d 7d 20 76 61 72  EA_PLATFORM} var
04b0: 69 61 62 6c 65 20 3d 3d 20 22 75 6e 69 78 22 20  iable == "unix" 
04c0: 6f 72 20 22 77 69 6e 64 6f 77 73 22 0a 23 20 61  or "windows".# a
04d0: 73 20 77 65 6c 6c 20 61 73 20 50 4b 47 5f 4c 49  s well as PKG_LI
04e0: 42 5f 46 49 4c 45 20 61 6e 64 20 50 4b 47 5f 53  B_FILE and PKG_S
04f0: 54 55 42 5f 4c 49 42 5f 46 49 4c 45 2e 0a 23 2d  TUB_LIB_FILE..#-
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 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0530: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0540: 2d 2d 2d 0a 0a 54 45 41 5f 49 4e 49 54 28 5b 33  ---..TEA_INIT([3
0550: 2e 39 5d 29 0a 0a 41 43 5f 43 4f 4e 46 49 47 5f  .9])..AC_CONFIG_
0560: 41 55 58 5f 44 49 52 28 74 63 6c 63 6f 6e 66 69  AUX_DIR(tclconfi
0570: 67 29 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  g)..#-----------
0580: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0590: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
05a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
05b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 4c 6f 61 64  ---------.# Load
05c0: 20 74 68 65 20 74 63 6c 43 6f 6e 66 69 67 2e 73   the tclConfig.s
05d0: 68 20 66 69 6c 65 0a 23 2d 2d 2d 2d 2d 2d 2d 2d  h file.#--------
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 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0600: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0610: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 54 45  ------------..TE
0620: 41 5f 50 41 54 48 5f 54 43 4c 43 4f 4e 46 49 47  A_PATH_TCLCONFIG
0630: 0a 54 45 41 5f 4c 4f 41 44 5f 54 43 4c 43 4f 4e  .TEA_LOAD_TCLCON
0640: 46 49 47 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  FIG..#----------
0650: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0660: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0670: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0680: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 4c 6f 61  ----------.# Loa
0690: 64 20 74 68 65 20 74 6b 43 6f 6e 66 69 67 2e 73  d the tkConfig.s
06a0: 68 20 66 69 6c 65 20 69 66 20 6e 65 63 65 73 73  h file if necess
06b0: 61 72 79 20 28 54 6b 20 65 78 74 65 6e 73 69 6f  ary (Tk extensio
06c0: 6e 29 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  n).#------------
06d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
06e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
06f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0700: 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 23 54 45 41 5f 50  --------..#TEA_P
0710: 41 54 48 5f 54 4b 43 4f 4e 46 49 47 0a 23 54 45  ATH_TKCONFIG.#TE
0720: 41 5f 4c 4f 41 44 5f 54 4b 43 4f 4e 46 49 47 0a  A_LOAD_TKCONFIG.
0730: 0a 23 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 2d 2d 0a 23 20 48 61 6e 64  ---------.# Hand
0780: 6c 65 20 74 68 65 20 2d 2d 70 72 65 66 69 78 3d  le the --prefix=
0790: 2e 2e 2e 20 6f 70 74 69 6f 6e 20 62 79 20 64 65  ... option by de
07a0: 66 61 75 6c 74 69 6e 67 20 74 6f 20 77 68 61 74  faulting to what
07b0: 20 54 63 6c 20 67 61 76 65 2e 0a 23 20 4d 75 73   Tcl gave..# Mus
07c0: 74 20 62 65 20 63 61 6c 6c 65 64 20 61 66 74 65  t be called afte
07d0: 72 20 54 45 41 5f 4c 4f 41 44 5f 54 43 4c 43 4f  r TEA_LOAD_TCLCO
07e0: 4e 46 49 47 20 61 6e 64 20 62 65 66 6f 72 65 20  NFIG and before 
07f0: 54 45 41 5f 53 45 54 55 50 5f 43 4f 4d 50 49 4c  TEA_SETUP_COMPIL
0800: 45 52 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ER..#-----------
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 2d  ----------------
0840: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 54 45  ------------..TE
0850: 41 5f 50 52 45 46 49 58 0a 0a 23 2d 2d 2d 2d 2d  A_PREFIX..#-----
0860: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0870: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0880: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0890: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
08a0: 2d 2d 0a 23 20 53 74 61 6e 64 61 72 64 20 63 6f  --.# Standard co
08b0: 6d 70 69 6c 65 72 20 63 68 65 63 6b 73 2e 0a 23  mpiler checks..#
08c0: 20 54 68 69 73 20 73 65 74 73 20 75 70 20 43 43   This sets up CC
08d0: 20 62 79 20 75 73 69 6e 67 20 74 68 65 20 43 43   by using the CC
08e0: 20 65 6e 76 20 76 61 72 2c 20 6f 72 20 6c 6f 6f   env var, or loo
08f0: 6b 73 20 66 6f 72 20 67 63 63 20 6f 74 68 65 72  ks for gcc other
0900: 77 69 73 65 2e 0a 23 20 54 68 69 73 20 61 6c 73  wise..# This als
0910: 6f 20 63 61 6c 6c 73 20 41 43 5f 50 52 4f 47 5f  o calls AC_PROG_
0920: 43 43 2c 20 41 43 5f 50 52 4f 47 5f 49 4e 53 54  CC, AC_PROG_INST
0930: 41 4c 4c 20 61 6e 64 20 61 20 66 65 77 20 6f 74  ALL and a few ot
0940: 68 65 72 73 20 74 6f 20 63 72 65 61 74 65 0a 23  hers to create.#
0950: 20 74 68 65 20 62 61 73 69 63 20 73 65 74 75 70   the basic setup
0960: 20 6e 65 63 65 73 73 61 72 79 20 74 6f 20 63 6f   necessary to co
0970: 6d 70 69 6c 65 20 65 78 65 63 75 74 61 62 6c 65  mpile executable
0980: 73 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  s..#------------
0990: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
09a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
09b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
09c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 54 45 41  -----------..TEA
09d0: 5f 53 45 54 55 50 5f 43 4f 4d 50 49 4c 45 52 0a  _SETUP_COMPILER.
09e0: 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  .#--------------
09f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0a00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0a10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0a20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 5f 5f 43 48  ---------.# __CH
0a30: 41 4e 47 45 5f 5f 0a 23 20 53 70 65 63 69 66 79  ANGE__.# Specify
0a40: 20 74 68 65 20 43 20 73 6f 75 72 63 65 20 66 69   the C source fi
0a50: 6c 65 73 20 74 6f 20 63 6f 6d 70 69 6c 65 20 69  les to compile i
0a60: 6e 20 54 45 41 5f 41 44 44 5f 53 4f 55 52 43 45  n TEA_ADD_SOURCE
0a70: 53 2c 0a 23 20 70 75 62 6c 69 63 20 68 65 61 64  S,.# public head
0a80: 65 72 73 20 74 68 61 74 20 6e 65 65 64 20 74 6f  ers that need to
0a90: 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 20 69 6e   be installed in
0aa0: 20 54 45 41 5f 41 44 44 5f 48 45 41 44 45 52 53   TEA_ADD_HEADERS
0ab0: 2c 0a 23 20 73 74 75 62 20 6c 69 62 72 61 72 79  ,.# stub library
0ac0: 20 43 20 73 6f 75 72 63 65 20 66 69 6c 65 73 20   C source files 
0ad0: 74 6f 20 63 6f 6d 70 69 6c 65 20 69 6e 20 54 45  to compile in TE
0ae0: 41 5f 41 44 44 5f 53 54 55 42 5f 53 4f 55 52 43  A_ADD_STUB_SOURC
0af0: 45 53 2c 0a 23 20 61 6e 64 20 72 75 6e 74 69 6d  ES,.# and runtim
0b00: 65 20 54 63 6c 20 6c 69 62 72 61 72 79 20 66 69  e Tcl library fi
0b10: 6c 65 73 20 69 6e 20 54 45 41 5f 41 44 44 5f 54  les in TEA_ADD_T
0b20: 43 4c 5f 53 4f 55 52 43 45 53 2e 0a 23 20 54 68  CL_SOURCES..# Th
0b30: 69 73 20 64 65 66 69 6e 65 73 20 50 4b 47 28 5f  is defines PKG(_
0b40: 53 54 55 42 29 5f 53 4f 55 52 43 45 53 2c 20 50  STUB)_SOURCES, P
0b50: 4b 47 28 5f 53 54 55 42 29 5f 4f 42 4a 45 43 54  KG(_STUB)_OBJECT
0b60: 53 2c 20 50 4b 47 5f 48 45 41 44 45 52 53 0a 23  S, PKG_HEADERS.#
0b70: 20 61 6e 64 20 50 4b 47 5f 54 43 4c 5f 53 4f 55   and PKG_TCL_SOU
0b80: 52 43 45 53 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d  RCES..#---------
0b90: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0ba0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0bb0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0bc0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a  --------------..
0bd0: 54 45 41 5f 41 44 44 5f 53 4f 55 52 43 45 53 28  TEA_ADD_SOURCES(
0be0: 5b 74 63 6c 73 71 6c 69 74 65 33 2e 63 5d 29 0a  [tclsqlite3.c]).
0bf0: 54 45 41 5f 41 44 44 5f 48 45 41 44 45 52 53 28  TEA_ADD_HEADERS(
0c00: 5b 5d 29 0a 54 45 41 5f 41 44 44 5f 49 4e 43 4c  []).TEA_ADD_INCL
0c10: 55 44 45 53 28 5b 2d 49 5c 22 60 5c 24 7b 43 59  UDES([-I\"`\${CY
0c20: 47 50 41 54 48 7d 20 5c 24 7b 73 72 63 64 69 72  GPATH} \${srcdir
0c30: 7d 2f 67 65 6e 65 72 69 63 60 5c 22 5d 29 0a 54  }/generic`\"]).T
0c40: 45 41 5f 41 44 44 5f 4c 49 42 53 28 5b 5d 29 0a  EA_ADD_LIBS([]).
0c50: 54 45 41 5f 41 44 44 5f 43 46 4c 41 47 53 28 5b  TEA_ADD_CFLAGS([
0c60: 2d 44 53 51 4c 49 54 45 5f 45 4e 41 42 4c 45 5f  -DSQLITE_ENABLE_
0c70: 46 54 53 33 3d 31 5d 29 0a 54 45 41 5f 41 44 44  FTS3=1]).TEA_ADD
0c80: 5f 43 46 4c 41 47 53 28 5b 2d 44 53 51 4c 49 54  _CFLAGS([-DSQLIT
0c90: 45 5f 33 5f 53 55 46 46 49 58 5f 4f 4e 4c 59 3d  E_3_SUFFIX_ONLY=
0ca0: 31 5d 29 0a 54 45 41 5f 41 44 44 5f 43 46 4c 41  1]).TEA_ADD_CFLA
0cb0: 47 53 28 5b 2d 44 53 51 4c 49 54 45 5f 45 4e 41  GS([-DSQLITE_ENA
0cc0: 42 4c 45 5f 52 54 52 45 45 3d 31 5d 29 0a 54 45  BLE_RTREE=1]).TE
0cd0: 41 5f 41 44 44 5f 43 46 4c 41 47 53 28 5b 2d 44  A_ADD_CFLAGS([-D
0ce0: 53 51 4c 49 54 45 5f 4f 4d 49 54 5f 44 45 50 52  SQLITE_OMIT_DEPR
0cf0: 45 43 41 54 45 44 3d 31 5d 29 0a 54 45 41 5f 41  ECATED=1]).TEA_A
0d00: 44 44 5f 53 54 55 42 5f 53 4f 55 52 43 45 53 28  DD_STUB_SOURCES(
0d10: 5b 5d 29 0a 54 45 41 5f 41 44 44 5f 54 43 4c 5f  []).TEA_ADD_TCL_
0d20: 53 4f 55 52 43 45 53 28 5b 5d 29 0a 0a 23 2d 2d  SOURCES([])..#--
0d30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0d40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0d50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0d60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0d70: 2d 2d 0a 23 20 54 68 65 20 2d 2d 77 69 74 68 2d  --.# The --with-
0d80: 73 79 73 74 65 6d 2d 73 71 6c 69 74 65 20 63 61  system-sqlite ca
0d90: 75 73 65 73 20 74 68 65 20 54 43 4c 20 62 69 6e  uses the TCL bin
0da0: 64 69 6e 67 73 20 74 6f 20 53 51 4c 69 74 65 20  dings to SQLite 
0db0: 74 6f 20 75 73 65 0a 23 20 74 68 65 20 73 79 73  to use.# the sys
0dc0: 74 65 6d 20 73 68 61 72 65 64 20 6c 69 62 72 61  tem shared libra
0dd0: 72 79 20 66 6f 72 20 53 51 4c 69 74 65 20 72 61  ry for SQLite ra
0de0: 74 68 65 72 20 74 68 61 6e 20 73 74 61 74 69 63  ther than static
0df0: 61 6c 6c 79 20 6c 69 6e 6b 69 6e 67 0a 23 20 61  ally linking.# a
0e00: 67 61 69 6e 73 74 20 69 74 73 20 6f 77 6e 20 70  gainst its own p
0e10: 72 69 76 61 74 65 20 63 6f 70 79 2e 20 20 54 68  rivate copy.  Th
0e20: 69 73 20 69 73 20 64 61 6e 67 65 72 6f 75 73 20  is is dangerous 
0e30: 61 6e 64 20 6c 65 61 64 73 20 74 6f 0a 23 20 75  and leads to.# u
0e40: 6e 64 65 72 73 69 72 61 62 6c 65 20 64 65 70 65  ndersirable depe
0e50: 6e 64 65 6e 63 65 73 20 61 6e 64 20 69 73 20 6e  ndences and is n
0e60: 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a  ot recommended..
0e70: 23 20 50 61 74 63 68 73 20 66 72 6f 6d 20 72 6d  # Patchs from rm
0e80: 61 78 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ax..#-----------
0e90: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0ea0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0eb0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0ec0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 41 43 5f 41 52 47  ---------.AC_ARG
0ed0: 5f 57 49 54 48 28 5b 73 79 73 74 65 6d 2d 73 71  _WITH([system-sq
0ee0: 6c 69 74 65 5d 2c 0a 20 5b 41 43 5f 48 45 4c 50  lite],. [AC_HELP
0ef0: 5f 53 54 52 49 4e 47 28 5b 2d 2d 77 69 74 68 2d  _STRING([--with-
0f00: 73 79 73 74 65 6d 2d 73 71 6c 69 74 65 5d 2c 0a  system-sqlite],.
0f10: 20 20 20 5b 75 73 65 20 61 20 73 79 73 74 65 6d     [use a system
0f20: 2d 73 75 70 70 6c 69 65 64 20 6c 69 62 73 71 6c  -supplied libsql
0f30: 69 74 65 33 20 69 6e 73 74 65 61 64 20 6f 66 20  ite3 instead of 
0f40: 74 68 65 20 62 75 6e 64 6c 65 64 20 6f 6e 65 5d  the bundled one]
0f50: 29 5d 2c 0a 20 5b 5d 2c 20 5b 77 69 74 68 5f 73  )],. [], [with_s
0f60: 79 73 74 65 6d 5f 73 71 6c 69 74 65 3d 6e 6f 5d  ystem_sqlite=no]
0f70: 29 0a 69 66 20 74 65 73 74 20 78 24 77 69 74 68  ).if test x$with
0f80: 5f 73 79 73 74 65 6d 5f 73 71 6c 69 74 65 20 21  _system_sqlite !
0f90: 3d 20 78 6e 6f 3b 20 74 68 65 6e 0a 20 41 43 5f  = xno; then. AC_
0fa0: 43 48 45 43 4b 5f 48 45 41 44 45 52 28 5b 73 71  CHECK_HEADER([sq
0fb0: 6c 69 74 65 33 2e 68 5d 2c 0a 20 20 20 5b 41 43  lite3.h],.   [AC
0fc0: 5f 43 48 45 43 4b 5f 4c 49 42 28 5b 73 71 6c 69  _CHECK_LIB([sqli
0fd0: 74 65 33 5d 2c 5b 73 71 6c 69 74 65 33 5f 69 6e  te3],[sqlite3_in
0fe0: 69 74 69 61 6c 69 7a 65 5d 2c 0a 20 20 20 20 20  itialize],.     
0ff0: 5b 41 43 5f 44 45 46 49 4e 45 28 55 53 45 5f 53  [AC_DEFINE(USE_S
1000: 59 53 54 45 4d 5f 53 51 4c 49 54 45 29 0a 20 20  YSTEM_SQLITE).  
1010: 20 20 20 20 4c 49 42 53 3d 22 24 4c 49 42 53 20      LIBS="$LIBS 
1020: 2d 6c 73 71 6c 69 74 65 33 22 5d 29 5d 29 0a 66  -lsqlite3"])]).f
1030: 69 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  i..#------------
1040: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1050: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1060: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1070: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 5f 5f 43 48 41  --------.# __CHA
1080: 4e 47 45 5f 5f 0a 23 20 43 68 6f 6f 73 65 20 77  NGE__.# Choose w
1090: 68 69 63 68 20 68 65 61 64 65 72 73 20 79 6f 75  hich headers you
10a0: 20 6e 65 65 64 2e 20 20 45 78 74 65 6e 73 69 6f   need.  Extensio
10b0: 6e 20 61 75 74 68 6f 72 73 20 73 68 6f 75 6c 64  n authors should
10c0: 20 74 72 79 20 76 65 72 79 0a 23 20 68 61 72 64   try very.# hard
10d0: 20 74 6f 20 6f 6e 6c 79 20 72 65 6c 79 20 6f 6e   to only rely on
10e0: 20 74 68 65 20 54 63 6c 20 70 75 62 6c 69 63 20   the Tcl public 
10f0: 68 65 61 64 65 72 20 66 69 6c 65 73 2e 20 20 49  header files.  I
1100: 6e 74 65 72 6e 61 6c 20 68 65 61 64 65 72 73 0a  nternal headers.
1110: 23 20 63 6f 6e 74 61 69 6e 20 70 72 69 76 61 74  # contain privat
1120: 65 20 64 61 74 61 20 73 74 72 75 63 74 75 72 65  e data structure
1130: 73 20 61 6e 64 20 61 72 65 20 73 75 62 6a 65 63  s and are subjec
1140: 74 20 74 6f 20 63 68 61 6e 67 65 20 77 69 74 68  t to change with
1150: 6f 75 74 0a 23 20 6e 6f 74 69 63 65 2e 0a 23 20  out.# notice..# 
1160: 54 68 69 73 20 4d 55 53 54 20 62 65 20 63 61 6c  This MUST be cal
1170: 6c 65 64 20 61 66 74 65 72 20 54 45 41 5f 4c 4f  led after TEA_LO
1180: 41 44 5f 54 43 4c 43 4f 4e 46 49 47 20 2f 20 54  AD_TCLCONFIG / T
1190: 45 41 5f 4c 4f 41 44 5f 54 4b 43 4f 4e 46 49 47  EA_LOAD_TKCONFIG
11a0: 0a 23 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 2d 2d 2d  ----------------
11d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
11e0: 2d 2d 2d 2d 2d 2d 0a 0a 54 45 41 5f 50 55 42 4c  ------..TEA_PUBL
11f0: 49 43 5f 54 43 4c 5f 48 45 41 44 45 52 53 0a 23  IC_TCL_HEADERS.#
1200: 54 45 41 5f 50 52 49 56 41 54 45 5f 54 43 4c 5f  TEA_PRIVATE_TCL_
1210: 48 45 41 44 45 52 53 0a 0a 23 54 45 41 5f 50 55  HEADERS..#TEA_PU
1220: 42 4c 49 43 5f 54 4b 5f 48 45 41 44 45 52 53 0a  BLIC_TK_HEADERS.
1230: 23 54 45 41 5f 50 52 49 56 41 54 45 5f 54 4b 5f  #TEA_PRIVATE_TK_
1240: 48 45 41 44 45 52 53 0a 23 54 45 41 5f 50 41 54  HEADERS.#TEA_PAT
1250: 48 5f 58 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  H_X..#----------
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 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1290: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 43 68 65  ----------.# Che
12a0: 63 6b 20 77 68 65 74 68 65 72 20 2d 2d 65 6e 61  ck whether --ena
12b0: 62 6c 65 2d 74 68 72 65 61 64 73 20 6f 72 20 2d  ble-threads or -
12c0: 2d 64 69 73 61 62 6c 65 2d 74 68 72 65 61 64 73  -disable-threads
12d0: 20 77 61 73 20 67 69 76 65 6e 2e 0a 23 20 54 68   was given..# Th
12e0: 69 73 20 61 75 74 6f 2d 65 6e 61 62 6c 65 73 20  is auto-enables 
12f0: 69 66 20 54 63 6c 20 77 61 73 20 63 6f 6d 70 69  if Tcl was compi
1300: 6c 65 64 20 74 68 72 65 61 64 65 64 2e 0a 23 2d  led threaded..#-
1310: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1320: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1330: 2d 2d 2d 2d 2d 2d 2d 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 0a 0a 54 45 41 5f 45 4e 41 42 4c 45 5f  ---..TEA_ENABLE_
1360: 54 48 52 45 41 44 53 0a 69 66 20 74 65 73 74 20  THREADS.if test 
1370: 22 24 7b 54 43 4c 5f 54 48 52 45 41 44 53 7d 22  "${TCL_THREADS}"
1380: 20 3d 20 22 31 22 20 3b 20 74 68 65 6e 0a 20 20   = "1" ; then.  
1390: 20 20 41 43 5f 44 45 46 49 4e 45 28 53 51 4c 49    AC_DEFINE(SQLI
13a0: 54 45 5f 54 48 52 45 41 44 53 41 46 45 2c 20 31  TE_THREADSAFE, 1
13b0: 2c 20 5b 54 72 69 67 67 65 72 20 73 71 6c 69 74  , [Trigger sqlit
13c0: 65 20 74 68 72 65 61 64 73 61 66 65 20 62 75 69  e threadsafe bui
13d0: 6c 64 5d 29 0a 20 20 20 20 23 20 4e 6f 74 20 61  ld]).    # Not a
13e0: 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 61 64 64  utomatically add
13f0: 65 64 20 62 79 20 54 63 6c 20 62 65 63 61 75 73  ed by Tcl becaus
1400: 65 20 69 74 73 20 61 73 73 75 6d 65 64 20 54 63  e its assumed Tc
1410: 6c 20 6c 69 6e 6b 73 20 74 6f 20 74 68 65 6d 2c  l links to them,
1420: 0a 20 20 20 20 23 20 62 75 74 20 69 74 20 6d 61  .    # but it ma
1430: 79 20 6e 6f 74 20 69 66 20 69 74 20 69 73 6e 27  y not if it isn'
1440: 74 20 72 65 61 6c 6c 79 20 61 20 74 68 72 65 61  t really a threa
1450: 64 65 64 20 62 75 69 6c 64 2e 0a 20 20 20 20 54  ded build..    T
1460: 45 41 5f 41 44 44 5f 4c 49 42 53 28 5b 24 54 48  EA_ADD_LIBS([$TH
1470: 52 45 41 44 53 5f 4c 49 42 53 5d 29 0a 65 6c 73  READS_LIBS]).els
1480: 65 0a 20 20 20 20 41 43 5f 44 45 46 49 4e 45 28  e.    AC_DEFINE(
1490: 53 51 4c 49 54 45 5f 54 48 52 45 41 44 53 41 46  SQLITE_THREADSAF
14a0: 45 2c 20 30 2c 20 5b 54 72 69 67 67 65 72 20 73  E, 0, [Trigger s
14b0: 71 6c 69 74 65 20 6e 6f 6e 2d 74 68 72 65 61 64  qlite non-thread
14c0: 73 61 66 65 20 62 75 69 6c 64 5d 29 0a 66 69 0a  safe build]).fi.
14d0: 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  .#--------------
14e0: 2d 2d 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 0a 23 20 54 68 65 20 73 74 61  ------.# The sta
1520: 74 65 6d 65 6e 74 20 62 65 6c 6f 77 20 64 65 66  tement below def
1530: 69 6e 65 73 20 61 20 63 6f 6c 6c 65 63 74 69 6f  ines a collectio
1540: 6e 20 6f 66 20 73 79 6d 62 6f 6c 73 20 72 65 6c  n of symbols rel
1550: 61 74 65 64 20 74 6f 0a 23 20 62 75 69 6c 64 69  ated to.# buildi
1560: 6e 67 20 61 73 20 61 20 73 68 61 72 65 64 20 6c  ng as a shared l
1570: 69 62 72 61 72 79 20 69 6e 73 74 65 61 64 20 6f  ibrary instead o
1580: 66 20 61 20 73 74 61 74 69 63 20 6c 69 62 72 61  f a static libra
1590: 72 79 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ry..#-----------
15a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
15b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
15c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
15d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 54 45 41 5f 45  ---------..TEA_E
15e0: 4e 41 42 4c 45 5f 53 48 41 52 45 44 0a 0a 23 2d  NABLE_SHARED..#-
15f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1600: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1610: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1620: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1630: 2d 2d 2d 0a 23 20 54 68 69 73 20 6d 61 63 72 6f  ---.# This macro
1640: 20 66 69 67 75 72 65 73 20 6f 75 74 20 77 68 61   figures out wha
1650: 74 20 66 6c 61 67 73 20 74 6f 20 75 73 65 20 77  t flags to use w
1660: 69 74 68 20 74 68 65 20 63 6f 6d 70 69 6c 65 72  ith the compiler
1670: 2f 6c 69 6e 6b 65 72 0a 23 20 77 68 65 6e 20 62  /linker.# when b
1680: 75 69 6c 64 69 6e 67 20 73 68 61 72 65 64 2f 73  uilding shared/s
1690: 74 61 74 69 63 20 64 65 62 75 67 2f 6f 70 74 69  tatic debug/opti
16a0: 6d 69 7a 65 64 20 6f 62 6a 65 63 74 73 2e 20 20  mized objects.  
16b0: 54 68 69 73 20 69 6e 66 6f 72 6d 61 74 69 6f 6e  This information
16c0: 0a 23 20 63 61 6e 20 62 65 20 74 61 6b 65 6e 20  .# can be taken 
16d0: 66 72 6f 6d 20 74 68 65 20 74 63 6c 43 6f 6e 66  from the tclConf
16e0: 69 67 2e 73 68 20 66 69 6c 65 2c 20 62 75 74 20  ig.sh file, but 
16f0: 74 68 69 73 20 66 69 67 75 72 65 73 20 69 74 20  this figures it 
1700: 61 6c 6c 20 6f 75 74 2e 0a 23 2d 2d 2d 2d 2d 2d  all out..#------
1710: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1720: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
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 0a 0a  --------------..
1750: 54 45 41 5f 43 4f 4e 46 49 47 5f 43 46 4c 41 47  TEA_CONFIG_CFLAG
1760: 53 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  S..#------------
1770: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1780: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1790: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
17a0: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 53 65 74 20 74  --------.# Set t
17b0: 68 65 20 64 65 66 61 75 6c 74 20 63 6f 6d 70 69  he default compi
17c0: 6c 65 72 20 73 77 69 74 63 68 65 73 20 62 61 73  ler switches bas
17d0: 65 64 20 6f 6e 20 74 68 65 20 2d 2d 65 6e 61 62  ed on the --enab
17e0: 6c 65 2d 73 79 6d 62 6f 6c 73 20 6f 70 74 69 6f  le-symbols optio
17f0: 6e 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  n..#------------
1800: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1810: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1820: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1830: 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 54 45 41 5f 45 4e  --------..TEA_EN
1840: 41 42 4c 45 5f 53 59 4d 42 4f 4c 53 0a 0a 23 2d  ABLE_SYMBOLS..#-
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 2d 2d 2d  ----------------
1870: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1880: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1890: 2d 2d 2d 0a 23 20 45 76 65 72 79 6f 6e 65 20 73  ---.# Everyone s
18a0: 68 6f 75 6c 64 20 62 65 20 6c 69 6e 6b 69 6e 67  hould be linking
18b0: 20 61 67 61 69 6e 73 74 20 74 68 65 20 54 63 6c   against the Tcl
18c0: 20 73 74 75 62 20 6c 69 62 72 61 72 79 2e 20 20   stub library.  
18d0: 49 66 20 79 6f 75 0a 23 20 63 61 6e 27 74 20 66  If you.# can't f
18e0: 6f 72 20 73 6f 6d 65 20 72 65 61 73 6f 6e 2c 20  or some reason, 
18f0: 72 65 6d 6f 76 65 20 74 68 69 73 20 64 65 66 69  remove this defi
1900: 6e 69 74 69 6f 6e 2e 20 20 49 66 20 79 6f 75 20  nition.  If you 
1910: 61 72 65 6e 27 74 20 75 73 69 6e 67 0a 23 20 73  aren't using.# s
1920: 74 75 62 73 2c 20 79 6f 75 20 61 6c 73 6f 20 6e  tubs, you also n
1930: 65 65 64 20 74 6f 20 6d 6f 64 69 66 79 20 74 68  eed to modify th
1940: 65 20 53 48 4c 49 42 5f 4c 44 5f 4c 49 42 53 20  e SHLIB_LD_LIBS 
1950: 73 65 74 74 69 6e 67 20 62 65 6c 6f 77 20 74 6f  setting below to
1960: 0a 23 20 6c 69 6e 6b 20 61 67 61 69 6e 73 74 20  .# link against 
1970: 74 68 65 20 6e 6f 6e 2d 73 74 75 62 62 65 64 20  the non-stubbed 
1980: 54 63 6c 20 6c 69 62 72 61 72 79 2e 20 20 41 64  Tcl library.  Ad
1990: 64 20 54 6b 20 74 6f 6f 20 69 66 20 6e 65 63 65  d Tk too if nece
19a0: 73 73 61 72 79 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d  ssary..#--------
19b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
19c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
19d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
19e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 41 43  ------------..AC
19f0: 5f 44 45 46 49 4e 45 28 55 53 45 5f 54 43 4c 5f  _DEFINE(USE_TCL_
1a00: 53 54 55 42 53 2c 20 31 2c 20 5b 55 73 65 20 54  STUBS, 1, [Use T
1a10: 63 6c 20 73 74 75 62 73 5d 29 0a 23 41 43 5f 44  cl stubs]).#AC_D
1a20: 45 46 49 4e 45 28 55 53 45 5f 54 4b 5f 53 54 55  EFINE(USE_TK_STU
1a30: 42 53 2c 20 31 2c 20 5b 55 73 65 20 54 6b 20 73  BS, 1, [Use Tk s
1a40: 74 75 62 73 5d 29 0a 0a 0a 23 2d 2d 2d 2d 2d 2d  tubs])...#------
1a50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1a60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1a70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1a80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23  --------------.#
1a90: 20 52 65 64 65 66 69 6e 65 20 66 64 61 74 61 73   Redefine fdatas
1aa0: 79 6e 63 20 61 73 20 66 73 79 6e 63 20 6f 6e 20  ync as fsync on 
1ab0: 73 79 73 74 65 6d 73 20 74 68 61 74 20 6c 61 63  systems that lac
1ac0: 6b 20 66 64 61 74 61 73 79 6e 63 0a 23 2d 2d 2d  k fdatasync.#---
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 2d 2d 2d 2d 2d 2d 2d  ----------------
1af0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1b00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1b10: 2d 0a 23 0a 23 41 43 5f 43 48 45 43 4b 5f 46 55  -.#.#AC_CHECK_FU
1b20: 4e 43 28 66 64 61 74 61 73 79 6e 63 2c 20 2c 20  NC(fdatasync, , 
1b30: 41 43 5f 44 45 46 49 4e 45 28 66 64 61 74 61 73  AC_DEFINE(fdatas
1b40: 79 6e 63 2c 20 66 73 79 6e 63 29 29 0a 23 20 43  ync, fsync)).# C
1b50: 68 65 63 6b 20 66 6f 72 20 6c 69 62 72 61 72 79  heck for library
1b60: 20 66 75 6e 63 74 69 6f 6e 73 20 74 68 61 74 20   functions that 
1b70: 53 51 4c 69 74 65 20 63 61 6e 20 6f 70 74 69 6f  SQLite can optio
1b80: 6e 61 6c 6c 79 20 75 73 65 2e 0a 41 43 5f 43 48  nally use..AC_CH
1b90: 45 43 4b 5f 46 55 4e 43 53 28 5b 66 64 61 74 61  ECK_FUNCS([fdata
1ba0: 73 79 6e 63 20 75 73 6c 65 65 70 20 66 75 6c 6c  sync usleep full
1bb0: 66 73 79 6e 63 20 6c 6f 63 61 6c 74 69 6d 65 5f  fsync localtime_
1bc0: 72 20 67 6d 74 69 6d 65 5f 72 5d 29 0a 0a 41 43  r gmtime_r])..AC
1bd0: 5f 46 55 4e 43 5f 53 54 52 45 52 52 4f 52 5f 52  _FUNC_STRERROR_R
1be0: 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ...#------------
1bf0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1c00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1c10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1c20: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 54 68 69 73 20  --------.# This 
1c30: 6d 61 63 72 6f 20 67 65 6e 65 72 61 74 65 73 20  macro generates 
1c40: 61 20 6c 69 6e 65 20 74 6f 20 75 73 65 20 77 68  a line to use wh
1c50: 65 6e 20 62 75 69 6c 64 69 6e 67 20 61 20 6c 69  en building a li
1c60: 62 72 61 72 79 2e 20 20 49 74 0a 23 20 64 65 70  brary.  It.# dep
1c70: 65 6e 64 73 20 6f 6e 20 76 61 6c 75 65 73 20 73  ends on values s
1c80: 65 74 20 62 79 20 74 68 65 20 54 45 41 5f 45 4e  et by the TEA_EN
1c90: 41 42 4c 45 5f 53 48 41 52 45 44 2c 20 54 45 41  ABLE_SHARED, TEA
1ca0: 5f 45 4e 41 42 4c 45 5f 53 59 4d 42 4f 4c 53 2c  _ENABLE_SYMBOLS,
1cb0: 0a 23 20 61 6e 64 20 54 45 41 5f 4c 4f 41 44 5f  .# and TEA_LOAD_
1cc0: 54 43 4c 43 4f 4e 46 49 47 20 6d 61 63 72 6f 73  TCLCONFIG macros
1cd0: 20 61 62 6f 76 65 2e 0a 23 2d 2d 2d 2d 2d 2d 2d   above..#-------
1ce0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1cf0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1d00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1d10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 54  -------------..T
1d20: 45 41 5f 4d 41 4b 45 5f 4c 49 42 0a 0a 23 2d 2d  EA_MAKE_LIB..#--
1d30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1d40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1d50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1d60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1d70: 2d 2d 0a 23 20 44 65 74 65 72 6d 69 6e 65 20 74  --.# Determine t
1d80: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 74  he name of the t
1d90: 63 6c 73 68 20 61 6e 64 2f 6f 72 20 77 69 73 68  clsh and/or wish
1da0: 20 65 78 65 63 75 74 61 62 6c 65 73 20 69 6e 20   executables in 
1db0: 74 68 65 0a 23 20 54 63 6c 20 61 6e 64 20 54 6b  the.# Tcl and Tk
1dc0: 20 62 75 69 6c 64 20 64 69 72 65 63 74 6f 72 69   build directori
1dd0: 65 73 20 6f 72 20 74 68 65 20 6c 6f 63 61 74 69  es or the locati
1de0: 6f 6e 20 74 68 65 79 20 77 65 72 65 20 69 6e 73  on they were ins
1df0: 74 61 6c 6c 65 64 0a 23 20 69 6e 74 6f 2e 20 54  talled.# into. T
1e00: 68 65 73 65 20 70 61 74 68 73 20 61 72 65 20 75  hese paths are u
1e10: 73 65 64 20 74 6f 20 73 75 70 70 6f 72 74 20 72  sed to support r
1e20: 75 6e 6e 69 6e 67 20 74 65 73 74 20 63 61 73 65  unning test case
1e30: 73 20 6f 6e 6c 79 2c 0a 23 20 74 68 65 20 4d 61  s only,.# the Ma
1e40: 6b 65 66 69 6c 65 20 73 68 6f 75 6c 64 20 6e 6f  kefile should no
1e50: 74 20 62 65 20 6d 61 6b 69 6e 67 20 75 73 65 20  t be making use 
1e60: 6f 66 20 74 68 65 73 65 20 70 61 74 68 73 20 74  of these paths t
1e70: 6f 20 67 65 6e 65 72 61 74 65 0a 23 20 61 20 70  o generate.# a p
1e80: 6b 67 49 6e 64 65 78 2e 74 63 6c 20 66 69 6c 65  kgIndex.tcl file
1e90: 20 6f 72 20 61 6e 79 74 68 69 6e 67 20 65 6c 73   or anything els
1ea0: 65 20 61 74 20 65 78 74 65 6e 73 69 6f 6e 20 62  e at extension b
1eb0: 75 69 6c 64 20 74 69 6d 65 2e 0a 23 2d 2d 2d 2d  uild time..#----
1ec0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1ed0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1ee0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1ef0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1f00: 0a 0a 54 45 41 5f 50 52 4f 47 5f 54 43 4c 53 48  ..TEA_PROG_TCLSH
1f10: 0a 23 54 45 41 5f 50 52 4f 47 5f 57 49 53 48 0a  .#TEA_PROG_WISH.
1f20: 0a 23 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 2d 2d 2d 2d 2d 2d  ----------------
1f40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1f50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1f60: 2d 2d 2d 2d 2d 2d 0a 23 20 46 69 6e 61 6c 6c 79  ------.# Finally
1f70: 2c 20 73 75 62 73 74 69 74 75 74 65 20 61 6c 6c  , substitute all
1f80: 20 6f 66 20 74 68 65 20 76 61 72 69 6f 75 73 20   of the various 
1f90: 76 61 6c 75 65 73 20 69 6e 74 6f 20 74 68 65 20  values into the 
1fa0: 4d 61 6b 65 66 69 6c 65 2e 0a 23 20 59 6f 75 20  Makefile..# You 
1fb0: 6d 61 79 20 61 6c 74 65 72 6e 61 74 69 76 65 6c  may alternativel
1fc0: 79 20 68 61 76 65 20 61 20 73 70 65 63 69 61 6c  y have a special
1fd0: 20 70 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69 6e   pkgIndex.tcl.in
1fe0: 20 6f 72 20 6f 74 68 65 72 20 66 69 6c 65 73 0a   or other files.
1ff0: 23 20 77 68 69 63 68 20 72 65 71 75 69 72 65 20  # which require 
2000: 73 75 62 73 74 69 74 75 74 69 6e 67 20 74 68 20  substituting th 
2010: 41 43 20 76 61 72 69 61 62 6c 65 73 20 69 6e 2e  AC variables in.
2020: 20 20 49 6e 63 6c 75 64 65 20 74 68 65 73 65 20    Include these 
2030: 68 65 72 65 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d  here..#---------
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 2d 2d 2d 2d 2d 2d 0a 0a 41 43 5f  -----------..AC_
2080: 4f 55 54 50 55 54 28 5b 4d 61 6b 65 66 69 6c 65  OUTPUT([Makefile
2090: 20 70 6b 67 49 6e 64 65 78 2e 74 63 6c 5d 29 0a   pkgIndex.tcl]).