Artifact
1947c51db279d1fa9d65e658428a29cd1e16ee1d:
0000: 64 6e 6c 20 44 65 66 69 6e 65 20 6f 75 72 73 65 dnl Define ourse
0010: 6c 76 65 73 0a 41 43 5f 49 4e 49 54 28 74 63 6c lves.AC_INIT(tcl
0020: 74 6c 73 2c 20 31 2e 37 2e 33 29 0a 0a 64 6e 6c tls, 1.7.3)..dnl
0030: 20 43 68 65 63 6b 73 20 66 6f 72 20 70 72 6f 67 Checks for prog
0040: 72 61 6d 73 2e 0a 41 43 5f 50 52 4f 47 5f 43 43 rams..AC_PROG_CC
0050: 0a 41 43 5f 50 52 4f 47 5f 4d 41 4b 45 5f 53 45 .AC_PROG_MAKE_SE
0060: 54 0a 41 43 5f 50 52 4f 47 5f 49 4e 53 54 41 4c T.AC_PROG_INSTAL
0070: 4c 0a 41 43 5f 47 4e 55 5f 53 4f 55 52 43 45 0a L.AC_GNU_SOURCE.
0080: 0a 64 6e 6c 20 44 65 74 65 72 6d 69 6e 65 20 73 .dnl Determine s
0090: 79 73 74 65 6d 20 69 6e 66 6f 72 6d 61 74 69 6f ystem informatio
00a0: 6e 0a 44 43 5f 43 48 4b 5f 4f 53 5f 49 4e 46 4f n.DC_CHK_OS_INFO
00b0: 0a 0a 64 6e 6c 20 4c 6f 6f 6b 20 66 6f 72 20 61 ..dnl Look for a
00c0: 70 70 72 6f 70 72 69 61 74 65 20 68 65 61 64 65 ppropriate heade
00d0: 72 73 0a 41 43 5f 43 48 45 43 4b 5f 48 45 41 44 rs.AC_CHECK_HEAD
00e0: 45 52 53 28 75 6e 69 73 74 64 2e 68 20 73 74 64 ERS(unistd.h std
00f0: 6c 69 62 2e 68 20 73 74 72 69 6e 67 2e 68 20 73 lib.h string.h s
0100: 74 72 69 6e 67 73 2e 68 29 0a 0a 64 6e 6c 20 50 trings.h)..dnl P
0110: 65 72 66 6f 72 6d 20 54 63 6c 20 45 78 74 65 6e erform Tcl Exten
0120: 73 69 6f 6e 20 72 65 71 75 69 72 65 64 20 73 74 sion required st
0130: 75 66 66 0a 54 43 4c 45 58 54 5f 49 4e 49 54 0a uff.TCLEXT_INIT.
0140: 0a 69 66 20 74 65 73 74 20 22 24 54 43 4c 45 58 .if test "$TCLEX
0150: 54 5f 42 55 49 4c 44 22 20 21 3d 20 27 73 74 61 T_BUILD" != 'sta
0160: 74 69 63 27 3b 20 74 68 65 6e 0a 09 64 6e 6c 20 tic'; then..dnl
0170: 44 65 74 65 72 6d 69 6e 65 20 68 6f 77 20 74 6f Determine how to
0180: 20 6d 61 6b 65 20 73 68 61 72 65 64 20 6f 62 6a make shared obj
0190: 65 63 74 73 0a 09 44 43 5f 47 45 54 5f 53 48 4f ects..DC_GET_SHO
01a0: 42 4a 46 4c 41 47 53 0a 0a 09 45 58 54 45 4e 53 BJFLAGS...EXTENS
01b0: 49 4f 4e 5f 54 41 52 47 45 54 3d 22 74 63 6c 74 ION_TARGET="tclt
01c0: 6c 73 2e 24 7b 53 48 4f 42 4a 45 58 54 7d 22 0a ls.${SHOBJEXT}".
01d0: 65 6c 73 65 0a 09 41 43 5f 43 48 45 43 4b 5f 54 else..AC_CHECK_T
01e0: 4f 4f 4c 28 5b 41 52 5d 2c 20 5b 61 72 5d 2c 20 OOL([AR], [ar],
01f0: 5b 66 61 6c 73 65 5d 29 0a 09 41 43 5f 43 48 45 [false])..AC_CHE
0200: 43 4b 5f 54 4f 4f 4c 28 5b 52 41 4e 4c 49 42 5d CK_TOOL([RANLIB]
0210: 2c 20 5b 72 61 6e 6c 69 62 5d 2c 20 5b 3a 5d 29 , [ranlib], [:])
0220: 0a 09 45 58 54 45 4e 53 49 4f 4e 5f 54 41 52 47 ..EXTENSION_TARG
0230: 45 54 3d 22 74 63 6c 74 6c 73 2e 24 7b 41 52 45 ET="tcltls.${ARE
0240: 58 54 7d 22 0a 66 69 0a 41 43 5f 53 55 42 53 54 XT}".fi.AC_SUBST
0250: 28 45 58 54 45 4e 53 49 4f 4e 5f 54 41 52 47 45 (EXTENSION_TARGE
0260: 54 29 0a 41 43 5f 53 55 42 53 54 28 54 43 4c 45 T).AC_SUBST(TCLE
0270: 58 54 5f 42 55 49 4c 44 29 0a 0a 64 6e 6c 20 44 XT_BUILD)..dnl D
0280: 65 74 65 72 6d 69 6e 65 20 77 68 61 74 20 53 53 etermine what SS
0290: 4c 20 6c 69 62 72 61 72 79 20 74 6f 20 6c 69 6e L library to lin
02a0: 6b 20 77 69 74 68 0a 41 43 5f 41 52 47 5f 57 49 k with.AC_ARG_WI
02b0: 54 48 28 5b 73 73 6c 5d 2c 20 41 53 5f 48 45 4c TH([ssl], AS_HEL
02c0: 50 5f 53 54 52 49 4e 47 28 5b 2d 2d 77 69 74 68 P_STRING([--with
02d0: 2d 73 73 6c 3d 3c 6e 61 6d 65 3e 5d 2c 20 5b 6e -ssl=<name>], [n
02e0: 61 6d 65 20 6f 66 20 73 73 6c 20 6c 69 62 72 61 ame of ssl libra
02f0: 72 79 20 74 6f 20 62 75 69 6c 64 20 61 67 61 69 ry to build agai
0300: 6e 73 74 20 28 6f 70 65 6e 73 73 6c 2c 20 6c 69 nst (openssl, li
0310: 62 72 65 73 73 6c 2c 20 6e 73 73 2c 20 61 75 74 bressl, nss, aut
0320: 6f 29 5d 29 2c 20 5b 0a 09 69 66 20 74 65 73 74 o)]), [..if test
0330: 20 22 24 77 69 74 68 76 61 6c 22 20 3d 20 22 6e "$withval" = "n
0340: 6f 22 3b 20 74 68 65 6e 0a 09 09 41 43 5f 4d 53 o"; then...AC_MS
0350: 47 5f 45 52 52 4f 52 28 5b 59 6f 75 20 6d 61 79 G_ERROR([You may
0360: 20 6e 6f 74 20 73 70 65 63 69 66 79 20 2d 2d 77 not specify --w
0370: 69 74 68 6f 75 74 2d 73 73 6c 5d 29 0a 09 66 69 ithout-ssl])..fi
0380: 0a 0a 09 69 66 20 74 65 73 74 20 22 24 77 69 74 ...if test "$wit
0390: 68 76 61 6c 22 20 3d 20 22 79 65 73 22 3b 20 74 hval" = "yes"; t
03a0: 68 65 6e 0a 09 09 41 43 5f 4d 53 47 5f 45 52 52 hen...AC_MSG_ERR
03b0: 4f 52 28 5b 49 66 20 79 6f 75 20 73 70 65 63 69 OR([If you speci
03c0: 66 79 20 2d 2d 77 69 74 68 2d 73 73 6c 20 74 68 fy --with-ssl th
03d0: 65 6e 20 79 6f 75 20 6d 75 73 74 20 70 72 6f 76 en you must prov
03e0: 69 64 65 20 61 20 76 61 6c 75 65 5d 29 0a 09 66 ide a value])..f
03f0: 69 0a 0a 09 74 63 6c 74 6c 73 5f 73 73 6c 5f 6c i...tcltls_ssl_l
0400: 69 62 3d 22 24 77 69 74 68 76 61 6c 22 0a 5d 2c ib="$withval".],
0410: 20 5b 0a 09 74 63 6c 74 6c 73 5f 73 73 6c 5f 6c [..tcltls_ssl_l
0420: 69 62 3d 27 61 75 74 6f 27 0a 5d 29 0a 0a 64 6e ib='auto'.])..dn
0430: 6c 20 45 6e 61 62 6c 65 20 73 75 70 70 6f 72 74 l Enable support
0440: 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 74 68 for building th
0450: 65 20 73 61 6d 65 20 6c 69 62 72 61 72 79 20 65 e same library e
0460: 76 65 72 79 20 74 69 6d 65 0a 74 63 6c 74 6c 73 very time.tcltls
0470: 5f 64 65 74 65 72 6d 69 6e 69 73 74 69 63 3d 27 _deterministic='
0480: 66 61 6c 73 65 27 0a 41 43 5f 41 52 47 5f 45 4e false'.AC_ARG_EN
0490: 41 42 4c 45 28 5b 64 65 74 65 72 6d 69 6e 69 73 ABLE([determinis
04a0: 74 69 63 5d 2c 20 41 53 5f 48 45 4c 50 5f 53 54 tic], AS_HELP_ST
04b0: 52 49 4e 47 28 5b 2d 2d 65 6e 61 62 6c 65 2d 64 RING([--enable-d
04c0: 65 74 65 72 6d 69 6e 69 73 74 69 63 5d 2c 20 5b eterministic], [
04d0: 65 6e 61 62 6c 65 20 64 65 74 65 72 6d 69 6e 69 enable determini
04e0: 73 74 69 63 20 70 61 72 61 6d 65 74 65 72 73 5d stic parameters]
04f0: 29 2c 20 5b 0a 09 69 66 20 74 65 73 74 20 22 24 ), [..if test "$
0500: 65 6e 61 62 6c 65 76 61 6c 22 20 3d 20 22 79 65 enableval" = "ye
0510: 73 22 3b 20 74 68 65 6e 0a 09 09 74 63 6c 74 6c s"; then...tcltl
0520: 73 5f 64 65 74 65 72 6d 69 6e 69 73 74 69 63 3d s_deterministic=
0530: 27 74 72 75 65 27 0a 09 66 69 0a 5d 29 0a 69 66 'true'..fi.]).if
0540: 20 74 65 73 74 20 22 24 74 63 6c 74 6c 73 5f 64 test "$tcltls_d
0550: 65 74 65 72 6d 69 6e 69 73 74 69 63 22 20 3d 20 eterministic" =
0560: 27 74 72 75 65 27 3b 20 74 68 65 6e 0a 09 47 45 'true'; then..GE
0570: 4e 5f 44 48 5f 50 41 52 41 4d 53 5f 41 52 47 53 N_DH_PARAMS_ARGS
0580: 3d 27 66 61 6c 6c 62 61 63 6b 27 0a 65 6c 73 65 ='fallback'.else
0590: 0a 09 47 45 4e 5f 44 48 5f 50 41 52 41 4d 53 5f ..GEN_DH_PARAMS_
05a0: 41 52 47 53 3d 27 27 0a 66 69 0a 41 43 5f 53 55 ARGS=''.fi.AC_SU
05b0: 42 53 54 28 47 45 4e 5f 44 48 5f 50 41 52 41 4d BST(GEN_DH_PARAM
05c0: 53 5f 41 52 47 53 29 0a 0a 64 6e 6c 20 41 6c 6c S_ARGS)..dnl All
05d0: 6f 77 20 74 68 65 20 75 73 65 72 20 74 6f 20 6d ow the user to m
05e0: 61 6e 75 61 6c 6c 79 20 64 69 73 61 62 6c 65 20 anually disable
05f0: 70 72 6f 74 6f 63 6f 6c 73 0a 64 6e 6c 20 23 23 protocols.dnl ##
0600: 20 53 53 4c 76 32 3a 20 44 69 73 61 62 6c 65 64 SSLv2: Disabled
0610: 20 62 79 20 64 65 66 61 75 6c 74 0a 74 63 6c 74 by default.tclt
0620: 6c 73 5f 73 73 6c 5f 73 73 6c 32 3d 27 66 61 6c ls_ssl_ssl2='fal
0630: 73 65 27 0a 41 43 5f 41 52 47 5f 45 4e 41 42 4c se'.AC_ARG_ENABL
0640: 45 28 5b 73 73 6c 76 32 5d 2c 20 41 53 5f 48 45 E([sslv2], AS_HE
0650: 4c 50 5f 53 54 52 49 4e 47 28 5b 2d 2d 65 6e 61 LP_STRING([--ena
0660: 62 6c 65 2d 73 73 6c 76 32 5d 2c 20 5b 65 6e 61 ble-sslv2], [ena
0670: 62 6c 65 20 53 53 4c 76 32 20 70 72 6f 74 6f 63 ble SSLv2 protoc
0680: 6f 6c 5d 29 2c 20 5b 0a 09 69 66 20 74 65 73 74 ol]), [..if test
0690: 20 22 24 65 6e 61 62 6c 65 76 61 6c 22 20 3d 20 "$enableval" =
06a0: 22 79 65 73 22 3b 20 74 68 65 6e 0a 09 09 74 63 "yes"; then...tc
06b0: 6c 74 6c 73 5f 73 73 6c 5f 73 73 6c 32 3d 27 66 ltls_ssl_ssl2='f
06c0: 6f 72 63 65 27 0a 09 66 69 0a 5d 29 0a 0a 64 6e orce'..fi.])..dn
06d0: 6c 20 23 23 20 53 53 4c 76 33 3a 20 44 69 73 61 l ## SSLv3: Disa
06e0: 62 6c 65 64 20 62 79 20 64 65 66 61 75 6c 74 0a bled by default.
06f0: 74 63 6c 74 6c 73 5f 73 73 6c 5f 73 73 6c 33 3d tcltls_ssl_ssl3=
0700: 27 66 61 6c 73 65 27 0a 41 43 5f 41 52 47 5f 45 'false'.AC_ARG_E
0710: 4e 41 42 4c 45 28 5b 73 73 6c 76 33 5d 2c 20 41 NABLE([sslv3], A
0720: 53 5f 48 45 4c 50 5f 53 54 52 49 4e 47 28 5b 2d S_HELP_STRING([-
0730: 2d 65 6e 61 62 6c 65 2d 73 73 6c 76 33 5d 2c 20 -enable-sslv3],
0740: 5b 65 6e 61 62 6c 65 20 53 53 4c 76 33 20 70 72 [enable SSLv3 pr
0750: 6f 74 6f 63 6f 6c 5d 29 2c 20 5b 0a 09 69 66 20 otocol]), [..if
0760: 74 65 73 74 20 22 24 65 6e 61 62 6c 65 76 61 6c test "$enableval
0770: 22 20 3d 20 22 79 65 73 22 3b 20 74 68 65 6e 0a " = "yes"; then.
0780: 09 09 74 63 6c 74 6c 73 5f 73 73 6c 5f 73 73 6c ..tcltls_ssl_ssl
0790: 33 3d 27 66 6f 72 63 65 27 0a 09 66 69 0a 5d 29 3='force'..fi.])
07a0: 0a 0a 64 6e 6c 20 23 23 20 54 4c 53 76 31 2e 30 ..dnl ## TLSv1.0
07b0: 3a 20 45 6e 61 62 6c 65 64 20 62 79 20 64 65 66 : Enabled by def
07c0: 61 75 6c 74 0a 74 63 6c 74 6c 73 5f 73 73 6c 5f ault.tcltls_ssl_
07d0: 74 6c 73 31 5f 30 3d 27 74 72 75 65 27 0a 41 43 tls1_0='true'.AC
07e0: 5f 41 52 47 5f 45 4e 41 42 4c 45 28 5b 74 6c 73 _ARG_ENABLE([tls
07f0: 76 31 2e 30 5d 2c 20 41 53 5f 48 45 4c 50 5f 53 v1.0], AS_HELP_S
0800: 54 52 49 4e 47 28 5b 2d 2d 64 69 73 61 62 6c 65 TRING([--disable
0810: 2d 74 6c 73 76 31 2e 30 5d 2c 20 5b 64 69 73 61 -tlsv1.0], [disa
0820: 62 6c 65 20 54 4c 53 76 31 2e 30 20 70 72 6f 74 ble TLSv1.0 prot
0830: 6f 63 6f 6c 5d 29 2c 20 5b 0a 09 69 66 20 74 65 ocol]), [..if te
0840: 73 74 20 22 24 65 6e 61 62 6c 65 76 61 6c 22 20 st "$enableval"
0850: 3d 20 22 6e 6f 22 3b 20 74 68 65 6e 0a 09 09 74 = "no"; then...t
0860: 63 6c 74 6c 73 5f 73 73 6c 5f 74 6c 73 31 5f 30 cltls_ssl_tls1_0
0870: 3d 27 66 61 6c 73 65 27 0a 09 66 69 0a 5d 29 0a ='false'..fi.]).
0880: 0a 64 6e 6c 20 23 23 20 54 4c 53 76 31 2e 31 3a .dnl ## TLSv1.1:
0890: 20 45 6e 61 62 6c 65 64 20 62 79 20 64 65 66 61 Enabled by defa
08a0: 75 6c 74 0a 74 63 6c 74 6c 73 5f 73 73 6c 5f 74 ult.tcltls_ssl_t
08b0: 6c 73 31 5f 31 3d 27 74 72 75 65 27 0a 41 43 5f ls1_1='true'.AC_
08c0: 41 52 47 5f 45 4e 41 42 4c 45 28 5b 74 6c 73 76 ARG_ENABLE([tlsv
08d0: 31 2e 31 5d 2c 20 41 53 5f 48 45 4c 50 5f 53 54 1.1], AS_HELP_ST
08e0: 52 49 4e 47 28 5b 2d 2d 64 69 73 61 62 6c 65 2d RING([--disable-
08f0: 74 6c 73 76 31 2e 31 5d 2c 20 5b 64 69 73 61 62 tlsv1.1], [disab
0900: 6c 65 20 54 4c 53 76 31 2e 31 20 70 72 6f 74 6f le TLSv1.1 proto
0910: 63 6f 6c 5d 29 2c 20 5b 0a 09 69 66 20 74 65 73 col]), [..if tes
0920: 74 20 22 24 65 6e 61 62 6c 65 76 61 6c 22 20 3d t "$enableval" =
0930: 20 22 6e 6f 22 3b 20 74 68 65 6e 0a 09 09 74 63 "no"; then...tc
0940: 6c 74 6c 73 5f 73 73 6c 5f 74 6c 73 31 5f 31 3d ltls_ssl_tls1_1=
0950: 27 66 61 6c 73 65 27 0a 09 66 69 0a 5d 29 0a 0a 'false'..fi.])..
0960: 64 6e 6c 20 23 23 20 54 4c 53 76 31 2e 31 3a 20 dnl ## TLSv1.1:
0970: 45 6e 61 62 6c 65 64 20 62 79 20 64 65 66 61 75 Enabled by defau
0980: 6c 74 0a 74 63 6c 74 6c 73 5f 73 73 6c 5f 74 6c lt.tcltls_ssl_tl
0990: 73 31 5f 32 3d 27 74 72 75 65 27 0a 41 43 5f 41 s1_2='true'.AC_A
09a0: 52 47 5f 45 4e 41 42 4c 45 28 5b 74 6c 73 76 31 RG_ENABLE([tlsv1
09b0: 2e 32 5d 2c 20 41 53 5f 48 45 4c 50 5f 53 54 52 .2], AS_HELP_STR
09c0: 49 4e 47 28 5b 2d 2d 64 69 73 61 62 6c 65 2d 74 ING([--disable-t
09d0: 6c 73 76 31 2e 32 5d 2c 20 5b 64 69 73 61 62 6c lsv1.2], [disabl
09e0: 65 20 54 4c 53 76 31 2e 32 20 70 72 6f 74 6f 63 e TLSv1.2 protoc
09f0: 6f 6c 5d 29 2c 20 5b 0a 09 69 66 20 74 65 73 74 ol]), [..if test
0a00: 20 22 24 65 6e 61 62 6c 65 76 61 6c 22 20 3d 20 "$enableval" =
0a10: 22 6e 6f 22 3b 20 74 68 65 6e 0a 09 09 74 63 6c "no"; then...tcl
0a20: 74 6c 73 5f 73 73 6c 5f 74 6c 73 31 5f 32 3d 27 tls_ssl_tls1_2='
0a30: 66 61 6c 73 65 27 0a 09 66 69 0a 5d 29 0a 0a 64 false'..fi.])..d
0a40: 6e 6c 20 45 6e 61 62 6c 65 20 73 75 70 70 6f 72 nl Enable suppor
0a50: 74 20 66 6f 72 20 61 20 64 65 62 75 67 67 69 6e t for a debuggin
0a60: 67 20 62 75 69 6c 64 0a 74 63 6c 74 6c 73 5f 64 g build.tcltls_d
0a70: 65 62 75 67 3d 27 66 61 6c 73 65 27 0a 41 43 5f ebug='false'.AC_
0a80: 41 52 47 5f 45 4e 41 42 4c 45 28 5b 64 65 62 75 ARG_ENABLE([debu
0a90: 67 5d 2c 20 41 53 5f 48 45 4c 50 5f 53 54 52 49 g], AS_HELP_STRI
0aa0: 4e 47 28 5b 2d 2d 65 6e 61 62 6c 65 2d 64 65 62 NG([--enable-deb
0ab0: 75 67 5d 2c 20 5b 65 6e 61 62 6c 65 20 64 65 62 ug], [enable deb
0ac0: 75 67 67 69 6e 67 20 70 61 72 61 6d 65 74 65 72 ugging parameter
0ad0: 73 5d 29 2c 20 5b 0a 09 69 66 20 74 65 73 74 20 s]), [..if test
0ae0: 22 24 65 6e 61 62 6c 65 76 61 6c 22 20 3d 20 22 "$enableval" = "
0af0: 79 65 73 22 3b 20 74 68 65 6e 0a 09 09 74 63 6c yes"; then...tcl
0b00: 74 6c 73 5f 64 65 62 75 67 3d 27 74 72 75 65 27 tls_debug='true'
0b10: 0a 09 66 69 0a 5d 29 0a 69 66 20 74 65 73 74 20 ..fi.]).if test
0b20: 22 24 74 63 6c 74 6c 73 5f 64 65 62 75 67 22 20 "$tcltls_debug"
0b30: 3d 20 27 74 72 75 65 27 3b 20 74 68 65 6e 0a 09 = 'true'; then..
0b40: 41 43 5f 44 45 46 49 4e 45 28 54 43 4c 45 58 54 AC_DEFINE(TCLEXT
0b50: 5f 54 43 4c 54 4c 53 5f 44 45 42 55 47 2c 20 5b _TCLTLS_DEBUG, [
0b60: 31 5d 2c 20 5b 45 6e 61 62 6c 65 20 64 65 62 75 1], [Enable debu
0b70: 67 67 69 6e 67 20 62 75 69 6c 64 5d 29 0a 66 69 gging build]).fi
0b80: 0a 0a 64 6e 6c 20 46 69 6e 64 20 22 78 78 64 22 ..dnl Find "xxd"
0b90: 20 73 6f 20 77 65 20 63 61 6e 20 62 75 69 6c 64 so we can build
0ba0: 20 74 68 65 20 74 6c 73 2e 74 63 6c 2e 68 20 66 the tls.tcl.h f
0bb0: 69 6c 65 0a 41 43 5f 43 48 45 43 4b 5f 50 52 4f ile.AC_CHECK_PRO
0bc0: 47 28 5b 58 58 44 5d 2c 20 5b 78 78 64 5d 2c 20 G([XXD], [xxd],
0bd0: 5b 78 78 64 5d 2c 20 5b 5f 5f 78 78 64 5f 5f 6e [xxd], [__xxd__n
0be0: 6f 74 5f 5f 66 6f 75 6e 64 5d 29 0a 0a 64 6e 6c ot__found])..dnl
0bf0: 20 46 69 6e 64 20 22 70 6b 67 2d 63 6f 6e 66 69 Find "pkg-confi
0c00: 67 22 20 73 69 6e 63 65 20 77 65 20 6e 65 65 64 g" since we need
0c10: 20 74 6f 20 75 73 65 20 69 74 0a 41 43 5f 43 48 to use it.AC_CH
0c20: 45 43 4b 5f 54 4f 4f 4c 28 5b 50 4b 47 43 4f 4e ECK_TOOL([PKGCON
0c30: 46 49 47 5d 2c 20 5b 70 6b 67 2d 63 6f 6e 66 69 FIG], [pkg-confi
0c40: 67 5d 2c 20 5b 66 61 6c 73 65 5d 29 0a 0a 64 6e g], [false])..dn
0c50: 6c 20 44 65 74 65 72 6d 69 6e 65 20 69 66 20 77 l Determine if w
0c60: 65 20 68 61 76 65 20 62 65 65 6e 20 61 73 6b 65 e have been aske
0c70: 64 20 74 6f 20 73 74 61 74 69 63 61 6c 6c 79 20 d to statically
0c80: 6c 69 6e 6b 20 74 6f 20 74 68 65 20 53 53 4c 20 link to the SSL
0c90: 6c 69 62 72 61 72 79 0a 54 43 4c 45 58 54 5f 54 library.TCLEXT_T
0ca0: 4c 53 5f 53 54 41 54 49 43 5f 53 53 4c 3d 27 6e LS_STATIC_SSL='n
0cb0: 6f 27 0a 41 43 5f 41 52 47 5f 45 4e 41 42 4c 45 o'.AC_ARG_ENABLE
0cc0: 28 5b 73 74 61 74 69 63 2d 73 73 6c 5d 2c 20 41 ([static-ssl], A
0cd0: 53 5f 48 45 4c 50 5f 53 54 52 49 4e 47 28 5b 2d S_HELP_STRING([-
0ce0: 2d 65 6e 61 62 6c 65 2d 73 74 61 74 69 63 2d 73 -enable-static-s
0cf0: 73 6c 5d 2c 20 5b 65 6e 61 62 6c 65 20 73 74 61 sl], [enable sta
0d00: 74 69 63 61 6c 6c 79 20 6c 69 6e 6b 69 6e 67 20 tically linking
0d10: 74 6f 20 74 68 65 20 73 70 65 63 69 66 69 65 64 to the specified
0d20: 20 53 53 4c 20 6c 69 62 72 61 72 79 5d 29 2c 20 SSL library]),
0d30: 5b 0a 09 69 66 20 74 65 73 74 20 22 24 65 6e 61 [..if test "$ena
0d40: 62 6c 65 76 61 6c 22 20 3d 20 27 79 65 73 27 3b bleval" = 'yes';
0d50: 20 74 68 65 6e 0a 09 09 54 43 4c 45 58 54 5f 54 then...TCLEXT_T
0d60: 4c 53 5f 53 54 41 54 49 43 5f 53 53 4c 3d 27 79 LS_STATIC_SSL='y
0d70: 65 73 27 0a 09 66 69 0a 5d 29 0a 0a 64 6e 6c 20 es'..fi.])..dnl
0d80: 58 58 58 3a 54 4f 44 4f 3a 20 41 75 74 6f 6d 61 XXX:TODO: Automa
0d90: 74 69 63 61 6c 6c 79 20 64 65 74 65 72 6d 69 6e tically determin
0da0: 65 20 74 68 65 20 53 53 4c 20 6c 69 62 72 61 72 e the SSL librar
0db0: 79 20 74 6f 20 75 73 65 0a 64 6e 6c 20 20 20 20 y to use.dnl
0dc0: 20 20 20 20 20 20 20 64 65 66 61 75 6c 74 69 6e defaultin
0dd0: 67 20 74 6f 20 4f 70 65 6e 53 53 4c 20 66 6f 72 g to OpenSSL for
0de0: 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 72 compatibility r
0df0: 65 61 73 6f 6e 73 0a 69 66 20 74 65 73 74 20 22 easons.if test "
0e00: 24 74 63 6c 74 6c 73 5f 73 73 6c 5f 6c 69 62 22 $tcltls_ssl_lib"
0e10: 20 3d 20 27 61 75 74 6f 27 3b 20 74 68 65 6e 0a = 'auto'; then.
0e20: 09 74 63 6c 74 6c 73 5f 73 73 6c 5f 6c 69 62 3d .tcltls_ssl_lib=
0e30: 27 6f 70 65 6e 73 73 6c 27 0a 66 69 0a 0a 41 43 'openssl'.fi..AC
0e40: 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 77 _MSG_CHECKING([w
0e50: 68 69 63 68 20 54 4c 53 20 6c 69 62 72 61 72 79 hich TLS library
0e60: 20 74 6f 20 75 73 65 5d 29 0a 41 43 5f 4d 53 47 to use]).AC_MSG
0e70: 5f 52 45 53 55 4c 54 28 5b 24 74 63 6c 74 6c 73 _RESULT([$tcltls
0e80: 5f 73 73 6c 5f 6c 69 62 5d 29 0a 0a 64 6e 6c 20 _ssl_lib])..dnl
0e90: 4d 61 6e 75 61 6c 6c 79 20 72 65 77 72 69 74 65 Manually rewrite
0ea0: 20 6c 69 62 72 65 73 73 6c 20 74 6f 20 4f 70 65 libressl to Ope
0eb0: 6e 53 53 4c 20 73 69 6e 63 65 20 77 65 20 75 73 nSSL since we us
0ec0: 65 20 74 68 65 0a 64 6e 6c 20 63 6f 6d 70 61 74 e the.dnl compat
0ed0: 69 62 69 6c 69 74 79 20 69 6e 74 65 72 66 61 63 ibility interfac
0ee0: 65 0a 69 66 20 74 65 73 74 20 22 24 74 63 6c 74 e.if test "$tclt
0ef0: 6c 73 5f 73 73 6c 5f 6c 69 62 22 20 3d 20 22 6c ls_ssl_lib" = "l
0f00: 69 62 72 65 73 73 6c 22 3b 20 74 68 65 6e 0a 09 ibressl"; then..
0f10: 74 63 6c 74 6c 73 5f 73 73 6c 5f 6c 69 62 3d 27 tcltls_ssl_lib='
0f20: 6f 70 65 6e 73 73 6c 27 0a 66 69 0a 0a 41 53 5f openssl'.fi..AS_
0f30: 43 41 53 45 28 5b 24 74 63 6c 74 6c 73 5f 73 73 CASE([$tcltls_ss
0f40: 6c 5f 6c 69 62 5d 2c 0a 09 5b 6f 70 65 6e 73 73 l_lib],..[openss
0f50: 6c 5d 2c 20 5b 0a 09 09 54 43 4c 54 4c 53 5f 53 l], [...TCLTLS_S
0f60: 53 4c 5f 4f 50 45 4e 53 53 4c 0a 09 5d 2c 0a 09 SL_OPENSSL..],..
0f70: 5b 6e 73 73 5d 2c 20 5b 0a 09 20 09 54 43 4c 54 [nss], [.. .TCLT
0f80: 4c 53 5f 53 53 4c 5f 4c 49 42 53 3d 22 22 0a 09 LS_SSL_LIBS=""..
0f90: 09 54 43 4c 54 4c 53 5f 53 53 4c 5f 43 46 4c 41 .TCLTLS_SSL_CFLA
0fa0: 47 53 3d 22 22 0a 09 09 54 43 4c 54 4c 53 5f 53 GS=""...TCLTLS_S
0fb0: 53 4c 5f 43 50 50 46 4c 41 47 53 3d 22 22 0a 09 SL_CPPFLAGS=""..
0fc0: 5d 2c 0a 09 5b 0a 09 09 41 43 5f 4d 53 47 5f 45 ],..[...AC_MSG_E
0fd0: 52 52 4f 52 28 5b 55 6e 73 75 70 70 6f 72 74 65 RROR([Unsupporte
0fe0: 64 20 53 53 4c 20 6c 69 62 72 61 72 79 3a 20 24 d SSL library: $
0ff0: 74 63 6c 74 6c 73 5f 73 73 6c 5f 6c 69 62 5d 29 tcltls_ssl_lib])
1000: 0a 09 5d 0a 29 0a 64 6e 6c 20 44 65 74 65 72 6d ..].).dnl Determ
1010: 69 6e 65 20 68 6f 77 20 74 6f 20 75 73 65 20 74 ine how to use t
1020: 68 69 73 20 53 53 4c 20 6c 69 62 72 61 72 79 0a his SSL library.
1030: 41 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 AC_MSG_CHECKING(
1040: 5b 68 6f 77 20 74 6f 20 75 73 65 20 24 74 63 6c [how to use $tcl
1050: 74 6c 73 5f 73 73 6c 5f 6c 69 62 5d 29 0a 4c 49 tls_ssl_lib]).LI
1060: 42 53 3d 22 24 7b 4c 49 42 53 7d 20 24 7b 54 43 BS="${LIBS} ${TC
1070: 4c 54 4c 53 5f 53 53 4c 5f 4c 49 42 53 7d 22 0a LTLS_SSL_LIBS}".
1080: 43 46 4c 41 47 53 3d 22 24 7b 43 46 4c 41 47 53 CFLAGS="${CFLAGS
1090: 7d 20 24 7b 54 43 4c 54 4c 53 5f 53 53 4c 5f 43 } ${TCLTLS_SSL_C
10a0: 46 4c 41 47 53 7d 22 0a 43 50 50 46 4c 41 47 53 FLAGS}".CPPFLAGS
10b0: 3d 22 24 7b 43 50 50 46 4c 41 47 53 7d 20 24 7b ="${CPPFLAGS} ${
10c0: 54 43 4c 54 4c 53 5f 53 53 4c 5f 43 50 50 46 4c TCLTLS_SSL_CPPFL
10d0: 41 47 53 7d 22 0a 41 43 5f 4d 53 47 5f 52 45 53 AGS}".AC_MSG_RES
10e0: 55 4c 54 28 5b 24 54 43 4c 54 4c 53 5f 53 53 4c ULT([$TCLTLS_SSL
10f0: 5f 43 50 50 46 4c 41 47 53 20 24 54 43 4c 54 4c _CPPFLAGS $TCLTL
1100: 53 5f 53 53 4c 5f 43 46 4c 41 47 53 20 24 54 43 S_SSL_CFLAGS $TC
1110: 4c 54 4c 53 5f 53 53 4c 5f 4c 49 42 53 5d 29 0a LTLS_SSL_LIBS]).
1120: 0a 64 6e 6c 20 53 79 6e 63 20 74 68 65 20 52 50 .dnl Sync the RP
1130: 41 54 48 20 69 66 20 72 65 71 75 65 73 74 65 64 ATH if requested
1140: 0a 69 66 20 74 65 73 74 20 22 24 54 43 4c 45 58 .if test "$TCLEX
1150: 54 5f 42 55 49 4c 44 22 20 21 3d 20 27 73 74 61 T_BUILD" != 'sta
1160: 74 69 63 27 3b 20 74 68 65 6e 0a 09 69 66 20 74 tic'; then..if t
1170: 65 73 74 20 22 24 54 43 4c 45 58 54 5f 54 4c 53 est "$TCLEXT_TLS
1180: 5f 53 54 41 54 49 43 5f 53 53 4c 22 20 3d 20 27 _STATIC_SSL" = '
1190: 79 65 73 27 3b 20 74 68 65 6e 0a 09 09 44 43 5f yes'; then...DC_
11a0: 53 59 4e 43 5f 52 50 41 54 48 28 5b 6e 6f 5d 29 SYNC_RPATH([no])
11b0: 0a 09 65 6c 73 65 0a 09 09 44 43 5f 53 59 4e 43 ..else...DC_SYNC
11c0: 5f 52 50 41 54 48 28 5b 79 65 73 5d 29 0a 09 66 _RPATH([yes])..f
11d0: 69 0a 66 69 0a 0a 64 6e 6c 20 50 72 6f 64 75 63 i.fi..dnl Produc
11e0: 65 20 6f 75 74 70 75 74 0a 41 43 5f 4f 55 54 50 e output.AC_OUTP
11f0: 55 54 28 4d 61 6b 65 66 69 6c 65 20 70 6b 67 49 UT(Makefile pkgI
1200: 6e 64 65 78 2e 74 63 6c 29 0a ndex.tcl).